gnu: python-click-log: Update to 0.2.1.
[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 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 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 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 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 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 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 ;;;
49 ;;; This file is part of GNU Guix.
50 ;;;
51 ;;; GNU Guix is free software; you can redistribute it and/or modify it
52 ;;; under the terms of the GNU General Public License as published by
53 ;;; the Free Software Foundation; either version 3 of the License, or (at
54 ;;; your option) any later version.
55 ;;;
56 ;;; GNU Guix is distributed in the hope that it will be useful, but
57 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
58 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59 ;;; GNU General Public License for more details.
60 ;;;
61 ;;; You should have received a copy of the GNU General Public License
62 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
63
64 (define-module (gnu packages python)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (gnu packages)
67 #:use-module (gnu packages algebra)
68 #:use-module (gnu packages adns)
69 #:use-module (gnu packages attr)
70 #:use-module (gnu packages backup)
71 #:use-module (gnu packages bash)
72 #:use-module (gnu packages check)
73 #:use-module (gnu packages compression)
74 #:use-module (gnu packages crypto)
75 #:use-module (gnu packages databases)
76 #:use-module (gnu packages file)
77 #:use-module (gnu packages fontutils)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages ghostscript)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages graphviz)
83 #:use-module (gnu packages graphics)
84 #:use-module (gnu packages gstreamer)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages icu4c)
87 #:use-module (gnu packages image)
88 #:use-module (gnu packages imagemagick)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages libffi)
91 #:use-module (gnu packages linux)
92 #:use-module (gnu packages machine-learning)
93 #:use-module (gnu packages man)
94 #:use-module (gnu packages maths)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages networking)
97 #:use-module (gnu packages ncurses)
98 #:use-module (gnu packages openstack)
99 #:use-module (gnu packages password-utils)
100 #:use-module (gnu packages pcre)
101 #:use-module (gnu packages perl)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages python-crypto)
104 #:use-module (gnu packages python-web)
105 #:use-module (gnu packages qt)
106 #:use-module (gnu packages readline)
107 #:use-module (gnu packages sdl)
108 #:use-module (gnu packages search)
109 #:use-module (gnu packages shells)
110 #:use-module (gnu packages ssh)
111 #:use-module (gnu packages statistics)
112 #:use-module (gnu packages tex)
113 #:use-module (gnu packages texinfo)
114 #:use-module (gnu packages time)
115 #:use-module (gnu packages tls)
116 #:use-module (gnu packages version-control)
117 #:use-module (gnu packages video)
118 #:use-module (gnu packages web)
119 #:use-module (gnu packages base)
120 #:use-module (gnu packages xml)
121 #:use-module (gnu packages xorg)
122 #:use-module (gnu packages xdisorg)
123 #:use-module (gnu packages tcl)
124 #:use-module (gnu packages bdw-gc)
125 #:use-module (guix packages)
126 #:use-module (guix download)
127 #:use-module (guix git-download)
128 #:use-module (guix utils)
129 #:use-module (guix build-system gnu)
130 #:use-module (guix build-system cmake)
131 #:use-module (guix build-system python)
132 #:use-module (guix build-system trivial)
133 #:use-module (srfi srfi-1))
134
135 (define-public python-2.7
136 (package
137 (name "python")
138 (version "2.7.13")
139 (source
140 (origin
141 (method url-fetch)
142 (uri (string-append "https://www.python.org/ftp/python/"
143 version "/Python-" version ".tar.xz"))
144 (sha256
145 (base32
146 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
147 (patches (search-patches "python-2.7-search-paths.patch"
148 "python-2-deterministic-build-info.patch"
149 "python-2.7-site-prefixes.patch"
150 "python-2.7-source-date-epoch.patch"
151 "python-2.7-getentropy-on-old-kernels.patch"))
152 (modules '((guix build utils)))
153 ;; suboptimal to delete failing tests here, but if we delete them in the
154 ;; arguments then we need to make sure to strip out that phase when it
155 ;; gets inherited by python and python-minimal.
156 (snippet
157 '(begin
158 (for-each delete-file
159 '("Lib/test/test_compileall.py"
160 "Lib/test/test_ctypes.py" ; fails on mips64el
161 "Lib/test/test_distutils.py"
162 "Lib/test/test_import.py"
163 "Lib/test/test_shutil.py"
164 "Lib/test/test_socket.py"
165 "Lib/test/test_subprocess.py"))
166 #t))))
167 (outputs '("out"
168 "tk")) ;tkinter; adds 50 MiB to the closure
169 (build-system gnu-build-system)
170 (arguments
171 `(;; 356 tests OK.
172 ;; 6 tests failed:
173 ;; test_compileall test_distutils test_import test_shutil test_socket
174 ;; test_subprocess
175 ;; 39 tests skipped:
176 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
177 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
178 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
179 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
180 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
181 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
182 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
183 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
184 ;; test_winreg test_winsound test_zipfile64
185 ;; 4 skips unexpected on linux2:
186 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
187 #:test-target "test"
188 #:configure-flags
189 (list "--enable-shared" ;allow embedding
190 "--with-system-ffi" ;build ctypes
191 "--with-ensurepip=install" ;install pip and setuptools
192 "--enable-unicode=ucs4"
193 (string-append "LDFLAGS=-Wl,-rpath="
194 (assoc-ref %outputs "out") "/lib"))
195
196 #:modules ((ice-9 ftw) (ice-9 match)
197 (guix build utils) (guix build gnu-build-system))
198 #:phases
199 (modify-phases %standard-phases
200 (add-before
201 'configure 'patch-lib-shells
202 (lambda _
203 ;; Filter for existing files, since some may not exist in all
204 ;; versions of python that are built with this recipe.
205 (substitute* (filter file-exists?
206 '("Lib/subprocess.py"
207 "Lib/popen2.py"
208 "Lib/distutils/tests/test_spawn.py"
209 "Lib/test/test_subprocess.py"))
210 (("/bin/sh") (which "sh")))
211
212 ;; Use zero as the timestamp in .pyc files so that builds are
213 ;; deterministic. TODO: Remove it when this variable is set in
214 ;; gnu-build-system.scm.
215 (setenv "SOURCE_DATE_EPOCH" "1")
216 #t))
217 (add-before 'configure 'do-not-record-configure-flags
218 (lambda* (#:key configure-flags #:allow-other-keys)
219 ;; Remove configure flags from the installed '_sysconfigdata.py'
220 ;; and 'Makefile' so we don't end up keeping references to the
221 ;; build tools.
222 ;;
223 ;; Preserve at least '--with-system-ffi' since otherwise the
224 ;; thing tries to build libffi, fails, and we end up with a
225 ;; Python that lacks ctypes.
226 (substitute* "configure"
227 (("^CONFIG_ARGS=.*$")
228 (format #f "CONFIG_ARGS='~a'\n"
229 (if (member "--with-system-ffi" configure-flags)
230 "--with-system-ffi"
231 ""))))
232 #t))
233 (add-before
234 'check 'pre-check
235 (lambda _
236 ;; 'Lib/test/test_site.py' needs a valid $HOME
237 (setenv "HOME" (getcwd))
238 #t))
239 (add-after
240 'unpack 'set-source-file-times-to-1980
241 ;; XXX One of the tests uses a ZIP library to pack up some of the
242 ;; source tree, and fails with "ZIP does not support timestamps
243 ;; before 1980". Work around this by setting the file times in the
244 ;; source tree to sometime in early 1980.
245 (lambda _
246 (let ((circa-1980 (* 10 366 24 60 60)))
247 (ftw "." (lambda (file stat flag)
248 (utime file circa-1980 circa-1980)
249 #t))
250 #t)))
251 (add-after 'install 'remove-tests
252 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
253 ;; because these files are used by some libraries out there.
254 (lambda* (#:key outputs #:allow-other-keys)
255 (let ((out (assoc-ref outputs "out")))
256 (match (scandir (string-append out "/lib")
257 (lambda (name)
258 (string-prefix? "python" name)))
259 ((pythonX.Y)
260 (let ((testdir (string-append out "/lib/" pythonX.Y
261 "/test")))
262 (with-directory-excursion testdir
263 (for-each delete-file-recursively
264 (scandir testdir
265 (match-lambda
266 ((or "." "..") #f)
267 (file
268 (not
269 (string-prefix? "test_support."
270 file))))))
271 (call-with-output-file "__init__.py" (const #t))
272 #t)))))))
273 (add-before 'strip 'make-libraries-writable
274 (lambda* (#:key outputs #:allow-other-keys)
275 ;; Make .so files writable so they can be stripped.
276 (let ((out (assoc-ref outputs "out")))
277 (for-each (lambda (file)
278 (chmod file #o755))
279 (find-files (string-append out "/lib")
280 "\\.so"))
281 #t)))
282 (add-after 'install 'move-tk-inter
283 (lambda* (#:key outputs #:allow-other-keys)
284 ;; When Tkinter support is built move it to a separate output so
285 ;; that the main output doesn't contain a reference to Tcl/Tk.
286 (let ((out (assoc-ref outputs "out"))
287 (tk (assoc-ref outputs "tk")))
288 (when tk
289 (match (find-files out "tkinter.*\\.so")
290 ((tkinter.so)
291 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
292 ;; want it under TK/lib/pythonX.Y/site-packages.
293 (let* ((len (string-length out))
294 (target (string-append
295 tk "/"
296 (string-drop
297 (dirname (dirname tkinter.so))
298 len)
299 "/site-packages")))
300 (install-file tkinter.so target)
301 (delete-file tkinter.so)))))
302 #t))))))
303 (inputs
304 `(("bzip2" ,bzip2)
305 ("gdbm" ,gdbm)
306 ("libffi" ,libffi) ; for ctypes
307 ("sqlite" ,sqlite) ; for sqlite extension
308 ("openssl" ,openssl)
309 ("readline" ,readline)
310 ("zlib" ,zlib)
311 ("tcl" ,tcl)
312 ("tk" ,tk))) ; for tkinter
313 (native-inputs
314 `(("pkg-config" ,pkg-config)))
315 (native-search-paths
316 (list (search-path-specification
317 (variable "PYTHONPATH")
318 (files '("lib/python2.7/site-packages")))))
319 (home-page "https://www.python.org")
320 (synopsis "High-level, dynamically-typed programming language")
321 (description
322 "Python is a remarkably powerful dynamic programming language that
323 is used in a wide variety of application domains. Some of its key
324 distinguishing features include: clear, readable syntax; strong
325 introspection capabilities; intuitive object orientation; natural
326 expression of procedural code; full modularity, supporting hierarchical
327 packages; exception-based error handling; and very high level dynamic
328 data types.")
329 (license license:psfl)))
330
331 ;; Current 2.x version.
332 (define-public python-2 python-2.7)
333
334 (define-public python-3.5
335 (package (inherit python-2)
336 (version "3.5.3")
337 (source (origin
338 (method url-fetch)
339 (uri (string-append "https://www.python.org/ftp/python/"
340 version "/Python-" version ".tar.xz"))
341 (patches (search-patches
342 "python-fix-tests.patch"
343 "python-3.5-fix-tests.patch"
344 "python-3.5-getentropy-on-old-kernels.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
348 (sha256
349 (base32
350 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
351 (snippet
352 '(begin
353 (for-each delete-file
354 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
355 "Lib/test/test_fcntl.py"))
356 #t))))
357 (arguments (substitute-keyword-arguments (package-arguments python-2)
358 ((#:tests? _) #t)))
359 (native-search-paths
360 (list (search-path-specification
361 (variable "PYTHONPATH")
362 (files (list (string-append "lib/python"
363 (version-major+minor version)
364 "/site-packages"))))))))
365
366 ;; Current 3.x version.
367 (define-public python-3 python-3.5)
368
369 ;; Current major version.
370 (define-public python python-3)
371
372 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
373 ;; Python (Tk -> libxcb -> Python.)
374
375 (define-public python2-minimal
376 (package (inherit python-2)
377 (name "python-minimal")
378 (outputs '("out"))
379
380 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
381 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
382 ;; libffi.
383 (inputs `(("libffi" ,libffi)
384 ("zlib" ,zlib)))))
385
386 (define-public python-minimal
387 (package (inherit python)
388 (name "python-minimal")
389 (outputs '("out"))
390
391 ;; Build fails due to missing ctypes without libffi.
392 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
393 ;; zlib is required by 'zipimport', used by pip.
394 (inputs `(("libffi" ,libffi)
395 ("openssl" ,openssl)
396 ("zlib" ,zlib)))))
397
398 (define* (wrap-python3 python
399 #:optional
400 (name (string-append (package-name python) "-wrapper")))
401 (package (inherit python)
402 (name name)
403 (source #f)
404 (build-system trivial-build-system)
405 (outputs '("out"))
406 (inputs `(("bash" ,bash)))
407 (propagated-inputs `(("python" ,python)))
408 (arguments
409 `(#:modules ((guix build utils))
410 #:builder
411 (begin
412 (use-modules (guix build utils))
413 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
414 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
415 (mkdir-p bin)
416 (for-each
417 (lambda (old new)
418 (symlink (string-append python old)
419 (string-append bin "/" new)))
420 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
421 `("python" ,"pydoc" ,"idle" ,"pip"))
422 ;; python-config outputs search paths based upon its location,
423 ;; use a bash wrapper to avoid changing its outputs.
424 (let ((bash (string-append (assoc-ref %build-inputs "bash")
425 "/bin/bash"))
426 (old (string-append python "python3-config"))
427 (new (string-append bin "/python-config")))
428 (with-output-to-file new
429 (lambda ()
430 (format #t "#!~a~%" bash)
431 (format #t "exec \"~a\" \"$@\"~%" old)
432 (chmod new #o755)
433 #t)))))))
434 (synopsis "Wrapper for the Python 3 commands")
435 (description
436 "This package provides wrappers for the commands of Python@tie{}3.x such
437 that they can be invoked under their usual name---e.g., @command{python}
438 instead of @command{python3}.")))
439
440 (define-public python-wrapper (wrap-python3 python))
441 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
442
443 (define-public python-psutil
444 (package
445 (name "python-psutil")
446 (version "4.3.0")
447 (source
448 (origin
449 (method url-fetch)
450 (uri (pypi-uri "psutil" version))
451 (sha256
452 (base32
453 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
454 (build-system python-build-system)
455 (arguments
456 ;; FIXME: some tests does not return and times out.
457 '(#:tests? #f))
458 (home-page "https://www.github.com/giampaolo/psutil")
459 (synopsis "Library for retrieving information on running processes")
460 (description
461 "psutil (Python system and process utilities) is a library for retrieving
462 information on running processes and system utilization (CPU, memory, disks,
463 network) in Python. It is useful mainly for system monitoring, profiling and
464 limiting process resources and management of running processes. It implements
465 many functionalities offered by command line tools such as: ps, top, lsof,
466 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
467 pidof, tty, taskset, pmap.")
468 (license license:bsd-3)))
469
470 (define-public python2-psutil
471 (package-with-python2 python-psutil))
472
473 (define-public python-clyent
474 (package
475 (name "python-clyent")
476 (version "1.2.1")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (pypi-uri "clyent" version))
481 (sha256
482 (base32
483 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
484 (build-system python-build-system)
485 (native-inputs
486 `(("python-mock" ,python-mock)))
487 (home-page "https://github.com/binstar/clyent")
488 (synopsis "Command line client library")
489 (description "Clyent is a Python command line utiliy library. It is used
490 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
491 (license license:bsd-3)))
492
493 (define-public python2-clyent
494 (package-with-python2 python-clyent))
495
496 (define-public python-babel
497 (package
498 (name "python-babel")
499 (version "2.3.4")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (pypi-uri "Babel" version))
504 (sha256
505 (base32
506 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
507 (build-system python-build-system)
508 (propagated-inputs
509 `(("python-pytz" ,python-pytz)))
510 (arguments `(#:tests? #f)) ; no test target
511 (home-page "http://babel.pocoo.org/")
512 (synopsis
513 "Tools for internationalizing Python applications")
514 (description
515 "Babel is composed of two major parts:
516 - tools to build and work with gettext message catalogs
517 - a Python interface to the CLDR (Common Locale Data Repository), providing
518 access to various locale display names, localized number and date formatting,
519 etc. ")
520 (license license:bsd-3)))
521
522 (define-public python2-babel
523 (package-with-python2 python-babel))
524
525 (define-public python2-backport-ssl-match-hostname
526 (package
527 (name "python2-backport-ssl-match-hostname")
528 (version "3.5.0.1")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (string-append
533 "https://pypi.python.org/packages/source/b/"
534 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
535 version ".tar.gz"))
536 (sha256
537 (base32
538 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
539 (build-system python-build-system)
540 (arguments
541 `(#:python ,python-2
542 #:tests? #f)) ; no test target
543 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
544 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
545 (description
546 "This backport brings the ssl.match_hostname() function to users of
547 earlier versions of Python. The function checks the hostname in the
548 certificate returned by the server to which a connection has been established,
549 and verifies that it matches the intended target hostname.")
550 (license license:psfl)))
551
552 (define-public python-hdf4
553 (package
554 (name "python-hdf4")
555 (version "0.9")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri name version))
560 (sha256
561 (base32
562 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
563 (build-system python-build-system)
564 (native-inputs `(("nose" ,python-nose)))
565 (propagated-inputs `(("numpy" ,python-numpy)))
566 (inputs
567 `(("hdf4" ,hdf4)
568 ("libjpeg" ,libjpeg)
569 ("zlib" ,zlib)))
570 (arguments
571 `(#:phases
572 (modify-phases %standard-phases
573 (replace 'check
574 (lambda _
575 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
576 ;; on to import numpy. Somehow this works on their CI system.
577 ;; Let's just manage PYTHONPATH here instead.
578 (substitute* "runexamples.sh"
579 (("export PYTHONPATH=.*") ""))
580 (setenv "PYTHONPATH"
581 (string-append (getcwd) ":"
582 (getenv "PYTHONPATH")))
583 (and (zero? (system* "./runexamples.sh"))
584 (zero? (system* "nosetests" "-v"))))))))
585 (home-page "https://github.com/fhs/python-hdf4")
586 (synopsis "Python interface to the NCSA HDF4 library")
587 (description
588 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
589 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
590 NetCDF files can also be read and modified. Python-HDF4 is a fork of
591 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
592 (license license:expat)))
593
594 (define-public python2-hdf4
595 (package-with-python2 python-hdf4))
596
597 (define-public python-h5py
598 (package
599 (name "python-h5py")
600 (version "2.7.0")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (pypi-uri "h5py" version))
605 (sha256
606 (base32
607 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
608 (build-system python-build-system)
609 (arguments
610 `(#:tests? #f ; no test target
611 #:phases
612 (modify-phases %standard-phases
613 (add-after 'unpack 'fix-hdf5-paths
614 (lambda* (#:key inputs #:allow-other-keys)
615 (let ((prefix (assoc-ref inputs "hdf5")))
616 (substitute* "setup_build.py"
617 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
618 (string-append "['" prefix "/lib" "']"))
619 (("'/opt/local/include', '/usr/local/include'")
620 (string-append "'" prefix "/include" "'")))
621 (substitute* "setup_configure.py"
622 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
623 (string-append "['" prefix "/lib" "']")))
624 #t))))))
625 (propagated-inputs
626 `(("python-six" ,python-six)
627 ("python-numpy" ,python-numpy)))
628 (inputs
629 `(("hdf5" ,hdf5)))
630 (native-inputs
631 `(("python-cython" ,python-cython)
632 ("python-pkgconfig" ,python-pkgconfig)))
633 (home-page "http://www.h5py.org/")
634 (synopsis "Read and write HDF5 files from Python")
635 (description
636 "The h5py package provides both a high- and low-level interface to the
637 HDF5 library from Python. The low-level interface is intended to be a
638 complete wrapping of the HDF5 API, while the high-level component supports
639 access to HDF5 files, datasets and groups using established Python and NumPy
640 concepts.")
641 (license license:bsd-3)))
642
643 (define-public python2-h5py
644 (package-with-python2 python-h5py))
645
646 (define-public python-netcdf4
647 (package
648 (name "python-netcdf4")
649 (version "1.2.9")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (pypi-uri "netCDF4" version))
654 (sha256
655 (base32
656 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
657 (build-system python-build-system)
658 (native-inputs
659 `(("python-cython" ,python-cython)))
660 (propagated-inputs
661 `(("python-numpy" ,python-numpy)))
662 (inputs
663 `(("netcdf" ,netcdf)
664 ("hdf4" ,hdf4)
665 ("hdf5" ,hdf5)))
666 (arguments
667 '(#:phases
668 (modify-phases %standard-phases
669 (replace 'check
670 (lambda _
671 (setenv "NO_NET" "1") ; disable opendap tests
672 (with-directory-excursion "test"
673 (setenv "PYTHONPATH" ; find and add the library we just built
674 (string-append
675 (car (find-files "../build" "lib.*"
676 #:directories? #:t
677 #:fail-on-error? #:t))
678 ":" (getenv "PYTHONPATH")))
679 (zero? (system* "python" "run_all.py"))))))))
680 (home-page
681 "https://github.com/Unidata/netcdf4-python")
682 (synopsis "Python/numpy interface to the netCDF library")
683 (description "Netcdf4-python is a Python interface to the netCDF C
684 library. netCDF version 4 has many features not found in earlier
685 versions of the library and is implemented on top of HDF5. This module
686 can read and write files in both the new netCDF 4 and the old netCDF 3
687 format, and can create files that are readable by HDF5 clients. The
688 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
689 to users of that module.")
690 ;; The software is mainly ISC, but includes some files covered
691 ;; by the Expat license.
692 (license (list license:isc license:expat))))
693
694 (define-public python2-netcdf4
695 (package-with-python2 python-netcdf4))
696
697 (define-public python-lockfile
698 (package
699 (name "python-lockfile")
700 (version "0.12.2")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
705 "lockfile-" version ".tar.gz"))
706 (sha256
707 (base32
708 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
709 (build-system python-build-system)
710 (arguments '(#:test-target "check"))
711 (native-inputs
712 `(("python-pbr" ,python-pbr)))
713 (home-page "https://launchpad.net/pylockfile")
714 (synopsis "Platform-independent file locking module")
715 (description
716 "The lockfile package exports a LockFile class which provides a simple
717 API for locking files.")
718 (license license:expat)))
719
720 (define-public python2-lockfile
721 (package-with-python2 python-lockfile))
722
723 (define-public python-setuptools
724 (package
725 (name "python-setuptools")
726 (version "31.0.0")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "setuptools" version))
731 (sha256
732 (base32
733 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
734 (modules '((guix build utils)))
735 (snippet
736 '(begin
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 #t))))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
745 (arguments
746 `(#:tests? #f))
747 (home-page "https://pypi.python.org/pypi/setuptools")
748 (synopsis
749 "Library designed to facilitate packaging Python projects")
750 (description
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
755 test hooks,
756 project installation,
757 platform-specific details,
758 Python 3 support.")
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 license:bsd-2))))
765
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
768
769 (define-public python-uniseg
770 (package
771 (name "python-uniseg")
772 (version "0.7.1")
773 (source
774 (origin
775 (method url-fetch)
776 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
777 "get/rel-" version ".tar.gz"))
778 (file-name (string-append name "-" version ".tar.gz"))
779 (sha256
780 (base32
781 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
782 (build-system python-build-system)
783 (arguments
784 '(#:tests? #f)) ; The test suite requires network access.
785 (home-page
786 "https://bitbucket.org/emptypage/uniseg-python")
787 (synopsis
788 "Python library to determine Unicode text segmentations")
789 (description
790 "Uniseg is a Python package used to determine Unicode text segmentations.
791 Supported segmentations include:
792 @enumerate
793 @item @dfn{Code point} (any value in the Unicode codespace)
794 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
795 multiple Unicode code points, e.g. \"G\" + acute-accent)
796 @item Word break
797 @item Sentence break
798 @item Line break
799 @end enumerate")
800 (license license:expat)))
801
802 (define-public python2-uniseg
803 (package-with-python2 python-uniseg))
804
805 (define-public python-humanfriendly
806 (package
807 (name "python-humanfriendly")
808 (version "4.4.1")
809 (source
810 (origin
811 (method url-fetch)
812 (uri (pypi-uri "humanfriendly" version))
813 (sha256
814 (base32
815 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
816 (build-system python-build-system)
817 (arguments
818 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
819 #:tests? #f))
820 (propagated-inputs
821 `(("python-monotonic" ,python-monotonic)))
822 (home-page "https://humanfriendly.readthedocs.io")
823 (synopsis "Human-friendly input and output in Python")
824 (description
825 "The functions and classes in @code{humanfriendly} can be used to make
826 text interfaces more user-friendly. It includes tools to parse and format
827 numbers, file sizes, and timespans, timers for long-running operations, menus
828 to allow the user to choose from a list of options, and terminal interaction
829 helpers.")
830 (license license:expat)))
831
832 (define-public python2-humanfriendly
833 (package-with-python2 python-humanfriendly))
834
835 (define-public python-capturer
836 (package
837 (name "python-capturer")
838 (version "2.4")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "capturer" version))
843 (sha256
844 (base32
845 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
846 (build-system python-build-system)
847 (arguments
848 `(#:tests? #f))
849 (propagated-inputs
850 `(("python-humanfriendly" ,python-humanfriendly)))
851 (home-page "https://capturer.readthedocs.io")
852 (synopsis "Capture stdout and stderr streams of the current process")
853 (description
854 "The capturer package makes it easy to capture the stdout and stderr
855 streams of the current process and subprocesses. Output can be relayed
856 to the terminal in real time but is also available to the Python program
857 for additional processing.")
858 (license license:expat)))
859
860 (define-public python2-capturer
861 (package-with-python2 python-capturer))
862
863 (define-public python-verboselogs
864 (package
865 (name "python-verboselogs")
866 (version "1.7")
867 (source
868 (origin
869 (method url-fetch)
870 (uri (pypi-uri "verboselogs" version))
871 (sha256
872 (base32
873 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
874 (build-system python-build-system)
875 (native-inputs
876 `(("python-mock" ,python-mock)
877 ("python-astroid" ,python-astroid)
878 ("python-pylint" ,python-pylint)))
879 (home-page "https://verboselogs.readthedocs.io")
880 (synopsis "Verbose logging level for Python's logging module")
881 (description
882 "The @code{verboselogs} package extends Python's @code{logging} module to
883 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
884 (license license:expat)))
885
886 (define-public python2-verboselogs
887 (package-with-python2 python-verboselogs))
888
889 (define-public python-coloredlogs
890 (package
891 (name "python-coloredlogs")
892 (version "7.3")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (pypi-uri "coloredlogs" version))
897 (sha256
898 (base32
899 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
900 (build-system python-build-system)
901 (arguments
902 `(;Tests require some updated modules
903 #:tests? #f))
904 (propagated-inputs
905 `(("python-capturer" ,python-capturer)))
906 (home-page "https://coloredlogs.readthedocs.io")
907 (synopsis "Colored stream handler for Python's logging module")
908 (description
909 "The @code{coloredlogs} package enables colored terminal output for
910 Python's logging module. The @code{ColoredFormatter} class inherits from
911 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
912 messages in color.")
913 (license license:expat)))
914
915 (define-public python2-coloredlogs
916 (package-with-python2 python-coloredlogs))
917
918 (define-public python-eventlet
919 (package
920 (name "python-eventlet")
921 (version "0.20.1")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "eventlet" version))
926 (sha256
927 (base32
928 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
929 (build-system python-build-system)
930 (propagated-inputs
931 `(("python-greenlet" ,python-greenlet)))
932 (arguments
933 ;; TODO: Requires unpackaged 'enum-compat'.
934 '(#:tests? #f))
935 (home-page "http://eventlet.net")
936 (synopsis "Concurrent networking library for Python")
937 (description
938 "Eventlet is a concurrent networking library for Python that
939 allows you to change how you run your code, not how you write it.
940 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
941 Coroutines ensure that the developer uses a blocking style of programming
942 that is similar to threading, but provide the benefits of non-blocking I/O.
943 The event dispatch is implicit, which means you can easily use @code{Eventlet}
944 from the Python interpreter, or as a small part of a larger application.")
945 (license license:expat)))
946
947 (define-public python2-eventlet
948 (let ((base (package-with-python2
949 (strip-python2-variant python-eventlet))))
950 (package (inherit base)
951 (propagated-inputs
952 `(("python2-enum34" ,python2-enum34)
953 ,@(package-propagated-inputs base))))))
954
955 (define-public python-six
956 (package
957 (name "python-six")
958 (version "1.10.0")
959 (source
960 (origin
961 (method url-fetch)
962 (uri (pypi-uri "six" version))
963 (sha256
964 (base32
965 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
966 (build-system python-build-system)
967 (native-inputs
968 `(("python-py" ,python-py)
969 ("python-pytest" ,python-pytest)))
970 (home-page "https://pypi.python.org/pypi/six/")
971 (synopsis "Python 2 and 3 compatibility utilities")
972 (description
973 "Six is a Python 2 and 3 compatibility library. It provides utility
974 functions for smoothing over the differences between the Python versions with
975 the goal of writing Python code that is compatible on both Python versions.
976 Six supports every Python version since 2.5. It is contained in only one
977 Python file, so it can be easily copied into your project.")
978 (license license:x11)))
979
980 (define-public python2-six
981 (package-with-python2 python-six))
982
983 (define-public python-schedule
984 (package
985 (name "python-schedule")
986 (version "0.4.3")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "schedule" version))
991 (sha256
992 (base32
993 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
994 (build-system python-build-system)
995 (native-inputs
996 `(("python-pytest" ,python-pytest)
997 ("python-mock" ,python-mock)))
998 (home-page "https://github.com/dbader/schedule")
999 (synopsis "Schedule periodic function calls in Python")
1000 (description
1001 "Schedule is an in-process scheduler for periodic jobs that uses the
1002 builder pattern for configuration. Schedule lets you run Python functions (or
1003 any other callable) periodically at pre-determined intervals using a simple,
1004 human-friendly syntax.")
1005 (license license:expat)))
1006
1007 (define-public python2-schedule
1008 (package-with-python2 python-schedule))
1009
1010 (define-public python-pandas
1011 (package
1012 (name "python-pandas")
1013 (version "0.19.2")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (pypi-uri "pandas" version))
1018 (sha256
1019 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1020 (patches
1021 (search-patches "python-pandas-skip-failing-tests.patch"))))
1022 (build-system python-build-system)
1023 (propagated-inputs
1024 `(("python-numpy" ,python-numpy)
1025 ("python-pytz" ,python-pytz)
1026 ("python-dateutil" ,python-dateutil)))
1027 (native-inputs
1028 `(("python-nose" ,python-nose)
1029 ("python-cython" ,python-cython)))
1030 (home-page "http://pandas.pydata.org")
1031 (synopsis "Data structures for data analysis, time series, and statistics")
1032 (description
1033 "Pandas is a Python package providing fast, flexible, and expressive data
1034 structures designed to make working with structured (tabular,
1035 multidimensional, potentially heterogeneous) and time series data both easy
1036 and intuitive. It aims to be the fundamental high-level building block for
1037 doing practical, real world data analysis in Python.")
1038 (license license:bsd-3)))
1039
1040 (define-public python2-pandas
1041 (package-with-python2 python-pandas))
1042
1043 (define-public python2-mechanize
1044 (package
1045 (name "python2-mechanize")
1046 (version "0.2.5")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1051 version ".tar.gz"))
1052 (sha256
1053 (base32
1054 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1055 (build-system python-build-system)
1056 (arguments
1057 `(#:python ,python-2 ; apparently incompatible with Python 3
1058 #:tests? #f))
1059 ;; test fails with message
1060 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1061 ;; (python-3.3.2) or
1062 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1063 ;; (python-2.7.5).
1064 ;; The source code is from March 2011 and probably not up-to-date
1065 ;; with respect to python unit tests.
1066 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1067 (synopsis
1068 "Stateful programmatic web browsing in Python")
1069 (description
1070 "Mechanize implements stateful programmatic web browsing in Python,
1071 after Andy Lester’s Perl module WWW::Mechanize.")
1072 (license (license:non-copyleft
1073 "file://COPYING"
1074 "See COPYING in the distribution."))))
1075
1076
1077 (define-public python-simplejson
1078 (package
1079 (name "python-simplejson")
1080 (version "3.10.0")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "simplejson" version))
1085 (sha256
1086 (base32
1087 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1088 (build-system python-build-system)
1089 (home-page "http://simplejson.readthedocs.org/en/latest/")
1090 (synopsis
1091 "Json library for Python")
1092 (description
1093 "JSON (JavaScript Object Notation) is a subset of JavaScript
1094 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1095 format.
1096
1097 Simplejson exposes an API familiar to users of the standard library marshal
1098 and pickle modules. It is the externally maintained version of the json
1099 library contained in Python 2.6, but maintains compatibility with Python 2.5
1100 and (currently) has significant performance advantages, even without using
1101 the optional C extension for speedups. Simplejson is also supported on
1102 Python 3.3+.")
1103 (license license:x11)))
1104
1105 (define-public python2-simplejson
1106 (package-with-python2 python-simplejson))
1107
1108
1109 (define-public python-pyicu
1110 (package
1111 (name "python-pyicu")
1112 (version "1.9.8")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (pypi-uri "PyICU" version))
1117 (sha256
1118 (base32
1119 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1120 (build-system python-build-system)
1121 (inputs
1122 `(("icu4c" ,icu4c)))
1123 (native-inputs
1124 `(("python-pytest" ,python-pytest)
1125 ("python-six" ,python-six)))
1126 (home-page "https://github.com/ovalhub/pyicu")
1127 (synopsis "Python extension wrapping the ICU C++ API")
1128 (description
1129 "PyICU is a python extension wrapping the ICU C++ API.")
1130 (properties `((python2-variant . ,(delay python2-pyicu))))
1131 (license license:x11)))
1132
1133 (define-public python2-pyicu
1134 (let ((base (package-with-python2
1135 (strip-python2-variant python-pyicu))))
1136 (package
1137 (inherit base)
1138 (arguments
1139 `(,@(package-arguments base)
1140 #:phases
1141 (modify-phases %standard-phases
1142 (add-before 'check 'delete-failing-test
1143 (λ _
1144 ;; XXX: This fails due to Unicode issues unique to Python 2,
1145 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1146 (delete-file "test/test_Script.py")
1147 #t))))))))
1148
1149 (define-public python2-dogtail
1150 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1151 ;; spaces in indentation" with Python 3.
1152 (package
1153 (name "python2-dogtail")
1154 (version "0.9.9")
1155 (source (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "dogtail" version))
1158 (sha256
1159 (base32
1160 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1161 (build-system python-build-system)
1162 (arguments `(#:python ,python-2
1163 #:tests? #f)) ; invalid command "test"
1164 ;; Currently no offical homepage.
1165 (home-page "https://pypi.python.org/pypi/dogtail/")
1166 (synopsis "GUI test tool and automation framework written in Python")
1167 (description
1168 "Dogtail is a GUI test tool and automation framework written in Python.
1169 It uses Accessibility (a11y) technologies to communicate with desktop
1170 applications. dogtail scripts are written in Python and executed like any
1171 other Python program.")
1172 (license license:gpl2+)))
1173
1174 (define-public python2-empy
1175 (package
1176 (name "python2-empy")
1177 (version "3.3")
1178 (source (origin
1179 (method url-fetch)
1180 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1181 version ".tar.gz"))
1182 (sha256
1183 (base32
1184 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1185 (build-system python-build-system)
1186 (arguments
1187 `(#:python ,python-2
1188 #:phases
1189 (modify-phases %standard-phases
1190 (replace 'check
1191 (lambda _
1192 (zero? (system* "./test.sh")))))))
1193 (home-page "http://www.alcyone.com/software/empy/")
1194 (synopsis "Templating system for Python")
1195 (description
1196 "EmPy is a system for embedding Python expressions and statements in
1197 template text; it takes an EmPy source file, processes it, and produces
1198 output. This is accomplished via expansions, which are special signals to the
1199 EmPy system and are set off by a special prefix (by default the at sign, @@).
1200 EmPy can expand arbitrary Python expressions and statements in this way, as
1201 well as a variety of special forms. Textual data not explicitly delimited in
1202 this way is sent unaffected to the output, allowing Python to be used in
1203 effect as a markup language. Also supported are callbacks via hooks,
1204 recording and playback via diversions, and dynamic, chainable filters. The
1205 system is highly configurable via command line options and embedded
1206 commands.")
1207 (license license:lgpl2.1+)))
1208
1209 (define-public python2-element-tree
1210 (package
1211 (name "python2-element-tree")
1212 (version "1.2.6")
1213 (source (origin
1214 (method url-fetch)
1215 (uri (string-append
1216 "http://effbot.org/media/downloads/elementtree-"
1217 version "-20050316.tar.gz"))
1218 (sha256
1219 (base32
1220 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1221 (build-system python-build-system)
1222 (arguments
1223 `(#:python ,python-2 ; seems to be part of Python 3
1224 #:tests? #f)) ; no 'test' sub-command
1225 (synopsis "Toolkit for XML processing in Python")
1226 (description
1227 "ElementTree is a Python library supporting lightweight XML processing.")
1228 (home-page "http://effbot.org/zone/element-index.htm")
1229 (license (license:x11-style
1230 "http://docs.python.org/2/license.html"
1231 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1232
1233 (define-public python2-pybugz
1234 (package
1235 (name "python2-pybugz")
1236 (version "0.6.11")
1237 (source (origin
1238 (method url-fetch)
1239 (uri (string-append
1240 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1241 version ".tar.gz"))
1242 (sha256
1243 (base32
1244 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1245 (patches (search-patches "pybugz-stty.patch"
1246 "pybugz-encode-error.patch"))))
1247 (build-system python-build-system)
1248 (arguments
1249 `(#:python ,python-2 ; SyntaxError with Python 3
1250 #:tests? #f)) ; no 'test' sub-command
1251 (propagated-inputs
1252 `(("element-tree" ,python2-element-tree)))
1253 (synopsis "Python and command-line interface to Bugzilla")
1254 (description
1255 "PyBugz is a Python library and command-line tool to query the Bugzilla
1256 bug tracking system. It is meant as an aid to speed up interaction with the
1257 bug tracker.")
1258 (home-page "http://www.liquidx.net/pybugz/")
1259 (license license:gpl2)))
1260
1261 (define-public python-enum34
1262 (package
1263 (name "python-enum34")
1264 (version "1.1.6")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "enum34" version))
1269 (sha256
1270 (base32
1271 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1272 (build-system python-build-system)
1273 (home-page "https://pypi.python.org/pypi/enum34")
1274 (synopsis "Backported Python 3.4 Enum")
1275 (description
1276 "Enum34 is the new Python stdlib enum module available in Python 3.4
1277 backported for previous versions of Python from 2.4 to 3.3.")
1278 (license license:bsd-3)))
1279
1280 (define-public python2-enum34
1281 (package-with-python2 python-enum34))
1282
1283 (define-public python-parse-type
1284 (package
1285 (name "python-parse-type")
1286 (version "0.3.4")
1287 (source
1288 (origin
1289 (method url-fetch)
1290 (uri (string-append "https://pypi.python.org/packages/source/p/"
1291 "parse_type/parse_type-" version ".tar.gz"))
1292 (sha256
1293 (base32
1294 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1295 (build-system python-build-system)
1296 (arguments
1297 `(#:phases
1298 (modify-phases %standard-phases
1299 (add-after 'unpack 'patch-tests
1300 (lambda _
1301 (substitute* "tests/test_parse_type_parse.py"
1302 ;; Newer Python versions don't have the problem this test tests.
1303 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1304 ""))
1305 #t)))))
1306 (propagated-inputs
1307 `(("python-six" ,python-six)
1308 ("python-parse" ,python-parse)))
1309 (native-inputs
1310 `(("python-pytest" ,python-pytest)
1311 ("python-pytest-runner" ,python-pytest-runner)))
1312 (home-page "https://github.com/jenisys/parse_type")
1313 (synopsis "Extended parse module")
1314 (description
1315 "Parse_type extends the python parse module.")
1316 (properties
1317 `((python2-variant . ,(delay python2-parse-type))))
1318 (license license:bsd-3)))
1319
1320 (define-public python2-parse-type
1321 (let ((base (package-with-python2
1322 (strip-python2-variant python-parse-type))))
1323 (package (inherit base)
1324 (propagated-inputs
1325 `(("python2-enum34" ,python2-enum34)
1326 ,@(package-propagated-inputs base))))))
1327
1328 (define-public python-parse
1329 (package
1330 (name "python-parse")
1331 (version "1.6.6")
1332 (source
1333 (origin
1334 (method url-fetch)
1335 (uri (pypi-uri "parse" version))
1336 (sha256
1337 (base32
1338 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1339 (patches (search-patches "python-parse-too-many-fields.patch"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:phases
1343 (modify-phases %standard-phases
1344 (replace 'check
1345 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1346 (home-page "https://github.com/r1chardj0n3s/parse")
1347 (synopsis "Parse strings")
1348 (description
1349 "Parse strings using a specification based on the Python format()
1350 syntax.")
1351 (license license:x11)))
1352
1353 (define-public python-polib
1354 (package
1355 (name "python-polib")
1356 (version "1.0.8")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "polib" version))
1360 (sha256
1361 (base32
1362 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1363 (build-system python-build-system)
1364 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1365 (synopsis "Manipulate, create and modify gettext files")
1366 (description "Polib can manipulate any gettext format (po, pot and mo)
1367 files. It can be used to create po files from scratch or to modify
1368 existing ones.")
1369 (license license:expat)))
1370
1371 (define-public python2-polib
1372 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1373 (package
1374 (inherit base)
1375 (arguments `(,@(package-arguments base)
1376 ;; Tests don't work with python2.
1377 #:tests? #f)))))
1378
1379 (define-public scons
1380 (package
1381 (name "scons")
1382 (version "3.0.1")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (string-append "mirror://sourceforge/scons/scons/" version
1386 "/scons-" version ".tar.gz"))
1387 (sha256
1388 (base32
1389 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:use-setuptools? #f ; still relies on distutils
1393 #:tests? #f)) ; no 'python setup.py test' command
1394 (home-page "http://scons.org/")
1395 (synopsis "Software construction tool written in Python")
1396 (description
1397 "SCons is a software construction tool. Think of SCons as an improved,
1398 cross-platform substitute for the classic Make utility with integrated
1399 functionality similar to autoconf/automake and compiler caches such as ccache.
1400 In short, SCons is an easier, more reliable and faster way to build
1401 software.")
1402 (license license:x11)))
1403
1404 (define-public scons-python2
1405 (package
1406 (inherit (package-with-python2 scons))
1407 (name "scons-python2")))
1408
1409 (define-public python-extras
1410 (package
1411 (name "python-extras")
1412 (version "0.0.3")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri (string-append
1417 "https://pypi.python.org/packages/source/e/extras/extras-"
1418 version ".tar.gz"))
1419 (sha256
1420 (base32
1421 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1422 (build-system python-build-system)
1423 (arguments
1424 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1425 '(#:tests? #f))
1426 (home-page "https://github.com/testing-cabal/extras")
1427 (synopsis "Useful extensions to the Python standard library")
1428 (description
1429 "Extras is a set of extensions to the Python standard library.")
1430 (license license:expat)))
1431
1432 (define-public python2-extras
1433 (package-with-python2 python-extras))
1434
1435 (define-public python-mimeparse
1436 (package
1437 (name "python-mimeparse")
1438 (version "0.1.4")
1439 (source
1440 (origin
1441 (method url-fetch)
1442 (uri (string-append
1443 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1444 version ".tar.gz"))
1445 (sha256
1446 (base32
1447 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1448 (build-system python-build-system)
1449 (arguments
1450 '(#:tests? #f)) ; no setup.py test command
1451 (home-page
1452 "https://github.com/dbtsai/python-mimeparse")
1453 (synopsis "Python library for parsing MIME types")
1454 (description
1455 "Mimeparse provides basic functions for parsing MIME type names and
1456 matching them against a list of media-ranges.")
1457 (license license:expat)))
1458
1459 (define-public python2-mimeparse
1460 (package-with-python2 python-mimeparse))
1461
1462 (define-public python-pafy
1463 (package
1464 (name "python-pafy")
1465 (version "0.5.3.1")
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (pypi-uri "pafy" version))
1470 (sha256
1471 (base32
1472 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1473 (build-system python-build-system)
1474 (arguments
1475 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1476 (propagated-inputs
1477 ;; Youtube-dl is a python package which is imported in the file
1478 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1479 `(("youtube-dl" ,youtube-dl)))
1480 (home-page "https://np1.github.io/pafy/")
1481 (synopsis "Retrieve YouTube content and metadata")
1482 (description
1483 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1484 (license license:lgpl3+)))
1485
1486 (define-public python-py
1487 (package
1488 (name "python-py")
1489 (version "1.4.32")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "py" version))
1494 (sha256
1495 (base32
1496 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1497 (build-system python-build-system)
1498 (arguments
1499 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1500 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1501 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1502 ;; Is this module globally installed?"
1503 '(#:tests? #f))
1504 (home-page "http://pylib.readthedocs.org/")
1505 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1506 (description
1507 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1508 code introspection, and logging.")
1509 (license license:expat)))
1510
1511 (define-public python2-py
1512 (package-with-python2 python-py))
1513
1514 ;; Recent versions of python-fixtures and python-testrepository need
1515 ;; python-pbr for packaging, which itself needs these two packages for
1516 ;; testing.
1517 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1518 ;; same source, just without any test dependencies and with tests disabled.
1519 ;; python-pbr-minmal is then used to package python-fixtures and
1520 ;; python-testrepository.
1521 ;; Strictly speaking we currently could remove the test-requirements from the
1522 ;; normal python-pbr package (and save this package) since test are disabled
1523 ;; there anyway. But this may change in future.
1524 (define-public python-pbr-minimal
1525 (package
1526 (name "python-pbr-minimal")
1527 (version "3.0.1")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "pbr" version))
1532 (sha256
1533 (base32
1534 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:tests? #f))
1538 (home-page "http://docs.openstack.org/developer/pbr/")
1539 (synopsis "Minimal build of python-pbr used for bootstrapping")
1540 (description
1541 "Used only for bootstrapping python2-pbr, you should not need this.")
1542 (license license:asl2.0)))
1543
1544 (define-public python2-pbr-minimal
1545 (package-with-python2 python-pbr-minimal))
1546
1547 (define-public python-pbr
1548 (package
1549 (inherit python-pbr-minimal)
1550 (name "python-pbr")
1551 (arguments
1552 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1553 (propagated-inputs
1554 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1555 (native-inputs
1556 `(("python-fixtures" ,python-fixtures)
1557 ;; discover, coverage, hacking, subunit
1558 ("python-mock" ,python-mock)
1559 ("python-six" ,python-six)
1560 ("python-sphinx" ,python-sphinx)
1561 ("python-testrepository" ,python-testrepository)
1562 ("python-testresources" ,python-testresources)
1563 ("python-testscenarios" ,python-testscenarios)
1564 ("python-testtools" ,python-testtools)
1565 ("python-virtualenv" ,python-virtualenv)))
1566 (synopsis "Enhance the default behavior of Python’s setuptools")
1567 (description
1568 "Python Build Reasonableness (PBR) is a library that injects some useful
1569 and sensible default behaviors into your setuptools run. It will set
1570 versions, process requirements files and generate AUTHORS and ChangeLog file
1571 from git information.
1572 ")))
1573
1574 (define-public python2-pbr
1575 (package-with-python2 python-pbr))
1576
1577 (define-public python-exif-read
1578 (package
1579 (name "python-exif-read")
1580 (version "2.1.2")
1581 (source (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "ExifRead" version))
1584 (sha256
1585 (base32
1586 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1587 (build-system python-build-system)
1588 (arguments `(#:tests? #f)) ; no tests
1589 (home-page "https://github.com/ianare/exif-py")
1590 (synopsis "Python library to extract EXIF data from image files")
1591 (description
1592 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1593 files.")
1594 (license license:bsd-3)))
1595
1596 (define-public python2-exif-read
1597 (package-with-python2 python-exif-read))
1598
1599 (define-public python-pyld
1600 (package
1601 (name "python-pyld")
1602 (version "0.7.1")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "PyLD" version))
1606 (sha256
1607 (base32
1608 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1609 (build-system python-build-system)
1610 (arguments `(#:tests? #f)) ; no tests
1611 (home-page "https://github.com/digitalbazaar/pyld")
1612 (synopsis "Python implementation of the JSON-LD specification")
1613 (description
1614 "PyLD is an implementation of the JSON-LD specification.")
1615 (license license:bsd-3)))
1616
1617 (define-public python2-pyld
1618 (package-with-python2 python-pyld))
1619
1620 (define-public python-click
1621 (package
1622 (name "python-click")
1623 (version "6.7")
1624 (source
1625 (origin
1626 (method url-fetch)
1627 (uri (pypi-uri "click" version))
1628 (sha256
1629 (base32
1630 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1631 (build-system python-build-system)
1632 (arguments
1633 `(#:phases
1634 (modify-phases %standard-phases
1635 (add-after 'unpack 'fix-paths
1636 (lambda* (#:key inputs #:allow-other-keys)
1637 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1638 "cross-libc" "libc"))))
1639 (substitute* "click/_unicodefun.py"
1640 (("'locale'")
1641 (string-append "'" glibc "/bin/locale'"))))
1642 #t))
1643 (replace 'check
1644 (lambda _
1645 (zero? (system* "make" "test")))))))
1646 (native-inputs
1647 `(("python-pytest" ,python-pytest)))
1648 (home-page "http://click.pocoo.org")
1649 (synopsis "Command line library for Python")
1650 (description
1651 "Click is a Python package for creating command line interfaces in a
1652 composable way with as little code as necessary. Its name stands for
1653 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1654 with sensible defaults out of the box.")
1655 (license license:bsd-3)))
1656
1657 (define-public python2-click
1658 (package-with-python2 python-click))
1659
1660 (define-public python-wheel
1661 (package
1662 (name "python-wheel")
1663 (version "0.30.0a0")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "wheel" version))
1668 (sha256
1669 (base32
1670 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1671 (build-system python-build-system)
1672 (native-inputs
1673 `(("python-jsonschema" ,python-jsonschema)
1674 ("python-pytest-cov" ,python-pytest-cov)))
1675 (home-page "https://bitbucket.org/pypa/wheel/")
1676 (synopsis "Format for built Python packages")
1677 (description
1678 "A wheel is a ZIP-format archive with a specially formatted filename and
1679 the @code{.whl} extension. It is designed to contain all the files for a PEP
1680 376 compatible install in a way that is very close to the on-disk format. Many
1681 packages will be properly installed with only the @code{Unpack} step and the
1682 unpacked archive preserves enough information to @code{Spread} (copy data and
1683 scripts to their final locations) at any later time. Wheel files can be
1684 installed with a newer @code{pip} or with wheel's own command line utility.")
1685 (license license:expat)
1686 (properties `((python2-variant . ,(delay python2-wheel))))))
1687
1688 (define-public python2-wheel
1689 (let ((wheel (package-with-python2
1690 (strip-python2-variant python-wheel))))
1691 (package (inherit wheel)
1692 (native-inputs `(("python2-functools32" ,python2-functools32)
1693 ,@(package-native-inputs wheel))))))
1694
1695 (define-public python-vcversioner
1696 (package
1697 (name "python-vcversioner")
1698 (version "2.16.0.0")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "vcversioner" version))
1703 (sha256
1704 (base32
1705 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1706 (build-system python-build-system)
1707 (synopsis "Python library for version number discovery")
1708 (description "Vcversioner is a Python library that inspects tagging
1709 information in a variety of version control systems in order to discover
1710 version numbers.")
1711 (home-page "https://github.com/habnabit/vcversioner")
1712 (license license:isc)))
1713
1714 (define-public python2-vcversioner
1715 (package-with-python2 python-vcversioner))
1716
1717 (define-public python-jsonschema
1718 (package
1719 (name "python-jsonschema")
1720 (version "2.5.1")
1721 (source (origin
1722 (method url-fetch)
1723 (uri
1724 (string-append
1725 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1726 version ".tar.gz"))
1727 (sha256
1728 (base32
1729 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
1730 (build-system python-build-system)
1731 (arguments
1732 '(#:phases
1733 (modify-phases %standard-phases
1734 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1735 (native-inputs
1736 `(("python-nose" ,python-nose)
1737 ("python-vcversioner" ,python-vcversioner)))
1738 (home-page "https://github.com/Julian/jsonschema")
1739 (synopsis "Implementation of JSON Schema for Python")
1740 (description
1741 "Jsonschema is an implementation of JSON Schema for Python.")
1742 (license license:expat)
1743 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1744
1745 (define-public python2-jsonschema
1746 (let ((jsonschema (package-with-python2
1747 (strip-python2-variant python-jsonschema))))
1748 (package (inherit jsonschema)
1749 (native-inputs
1750 `(("python2-mock" ,python2-mock)
1751 ,@(package-native-inputs jsonschema)))
1752 (propagated-inputs
1753 `(("python2-functools32" ,python2-functools32))))))
1754
1755 (define-public python-schema
1756 (package
1757 (name "python-schema")
1758 (version "0.6.6")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "schema" version))
1763 (sha256
1764 (base32
1765 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1766 (build-system python-build-system)
1767 (native-inputs
1768 `(("python-pytest" ,python-pytest)))
1769 (home-page "https://github.com/keleshev/schema")
1770 (synopsis "Simple data validation library")
1771 (description
1772 "@code{python-schema} is a library for validating Python data
1773 structures, such as those obtained from config-files, forms, external
1774 services or command-line parsing, converted from JSON/YAML (or
1775 something else) to Python data-types.")
1776 (license license:psfl)))
1777
1778 (define-public python2-schema
1779 (package-with-python2 python-schema))
1780
1781 (define-public python-schema-0.5
1782 (package (inherit python-schema)
1783 (version "0.5.0")
1784 (source
1785 (origin
1786 (method url-fetch)
1787 (uri (pypi-uri "schema" version))
1788 (sha256
1789 (base32
1790 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1791
1792 (define-public python2-schema-0.5
1793 (package-with-python2 python-schema-0.5))
1794
1795 (define-public python-kitchen
1796 (package
1797 (name "python-kitchen")
1798 (version "1.2.4")
1799 (source
1800 (origin
1801 (method url-fetch)
1802 (uri (pypi-uri "kitchen" version))
1803 (sha256
1804 (base32
1805 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
1806 (build-system python-build-system)
1807 (propagated-inputs
1808 `(("python-chardet" ,python-chardet)))
1809 (home-page "https://github.com/fedora-infra/kitchen")
1810 (synopsis "Python API for snippets")
1811 (description "@code{kitchen} module provides a python API for all sorts of
1812 little useful snippets of code that everybody ends up writing for their projects
1813 but never seem big enough to build an independent release. Use kitchen and stop
1814 cutting and pasting that code over and over.")
1815 (license (list license:lgpl2.1+
1816 ;; subprocess.py, test_subprocess.py,
1817 ;; kitchen/pycompat25/defaultdict.py:
1818 license:psfl))))
1819
1820 (define-public python2-kitchen
1821 (package-with-python2 python-kitchen))
1822
1823 (define-public python-unidecode
1824 (package
1825 (name "python-unidecode")
1826 (version "0.04.21")
1827 (source (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "Unidecode" version))
1830 (sha256
1831 (base32
1832 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
1833 (build-system python-build-system)
1834 (home-page "https://pypi.python.org/pypi/Unidecode")
1835 (synopsis "ASCII transliterations of Unicode text")
1836 (description
1837 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1838 useful when integrating with legacy code that doesn't support Unicode, or for
1839 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1840 machine identifiers from human-readable Unicode strings that should still be
1841 somewhat intelligible.")
1842 (license license:gpl2+)))
1843
1844 (define-public python2-unidecode
1845 (package-with-python2 python-unidecode))
1846
1847 (define-public python-pyjwt
1848 (package
1849 (name "python-pyjwt")
1850 (version "1.5.3")
1851 (source
1852 (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "PyJWT" version))
1855 (sha256
1856 (base32
1857 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1858 (modules '((guix build utils)))
1859 (snippet
1860 '(begin
1861 (for-each delete-file-recursively
1862 (find-files "." "\\.pyc$"))
1863 #t))))
1864 (build-system python-build-system)
1865 (native-inputs
1866 `(("python-pytest" ,python-pytest-3.0)
1867 ("python-pytest-cov" ,python-pytest-cov)
1868 ("python-pytest-runner" ,python-pytest-runner)))
1869 (home-page "https://github.com/progrium/pyjwt")
1870 (synopsis "JSON Web Token implementation in Python")
1871 (description
1872 "PyJWT is a JSON Web Token implementation written in Python.")
1873 (license license:expat)))
1874
1875 (define-public python2-pyjwt
1876 (package-with-python2 python-pyjwt))
1877
1878 (define-public python-pykka
1879 (package
1880 (name "python-pykka")
1881 (version "1.2.1")
1882 (source
1883 (origin
1884 (method url-fetch)
1885 (uri (pypi-uri "Pykka" version))
1886 (sha256
1887 (base32
1888 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1889 (build-system python-build-system)
1890 (native-inputs
1891 `(("python-mock" ,python-mock)
1892 ("python-nose" ,python-nose)
1893 ("python-gevent" ,python-gevent)
1894 ("python-eventlet" ,python-eventlet)))
1895 (home-page "https://www.pykka.org/")
1896 (synopsis "Pykka is a Python implementation of the actor model")
1897 (description
1898 "Pykka is a Python implementation of the actor model.
1899 The actor model introduces some simple rules to control the sharing
1900 of state and cooperation between execution units, which makes it
1901 easier to build concurrent applications.")
1902 (license license:asl2.0)))
1903
1904 (define-public python2-pykka
1905 (package-with-python2 python-pykka))
1906
1907 (define-public python-itsdangerous
1908 (package
1909 (name "python-itsdangerous")
1910 (version "0.24")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (string-append
1915 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1916 version ".tar.gz"))
1917 (sha256
1918 (base32
1919 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1920 (build-system python-build-system)
1921 (home-page "https://github.com/mitsuhiko/itsdangerous")
1922 (synopsis "Python library for passing data to/from untrusted environments")
1923 (description
1924 "Itsdangerous provides various helpers to pass trusted data to untrusted
1925 environments and back.")
1926 (license license:bsd-3)))
1927
1928 (define-public python2-itsdangerous
1929 (package-with-python2 python-itsdangerous))
1930
1931 (define-public python-pyyaml
1932 (package
1933 (name "python-pyyaml")
1934 (version "3.12")
1935 (source
1936 (origin
1937 (method url-fetch)
1938 (uri (pypi-uri "PyYAML" version))
1939 (sha256
1940 (base32
1941 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
1942 (build-system python-build-system)
1943 (inputs
1944 `(("libyaml" ,libyaml)))
1945 (home-page "http://pyyaml.org/wiki/PyYAML")
1946 (synopsis "YAML parser and emitter for Python")
1947 (description
1948 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1949 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1950 API, and sensible error messages. PyYAML supports standard YAML tags and
1951 provides Python-specific tags that allow to represent an arbitrary Python
1952 object.")
1953 (license license:expat)))
1954
1955 (define-public python2-pyyaml
1956 (package-with-python2 python-pyyaml))
1957
1958 (define-public python-virtualenv
1959 (package
1960 (name "python-virtualenv")
1961 (version "15.0.3")
1962 (source
1963 (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "virtualenv" version))
1966 (sha256
1967 (base32
1968 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
1969 (build-system python-build-system)
1970 (arguments
1971 `(#:phases
1972 (modify-phases %standard-phases
1973 (replace 'check
1974 (lambda _
1975 ;; Disable failing test. See upstream bug report
1976 ;; https://github.com/pypa/virtualenv/issues/957
1977 (substitute* "tests/test_virtualenv.py"
1978 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
1979 (zero? (system* "py.test")))))))
1980 (native-inputs
1981 `(("python-mock" ,python-mock)
1982 ("python-pytest" ,python-pytest)))
1983 (home-page "https://virtualenv.pypa.io/")
1984 (synopsis "Virtual Python environment builder")
1985 (description
1986 "Virtualenv is a tool to create isolated Python environments.")
1987 (license license:expat)))
1988
1989 (define-public python2-virtualenv
1990 (package-with-python2 python-virtualenv))
1991
1992 (define-public python-markupsafe
1993 (package
1994 (name "python-markupsafe")
1995 (version "0.23")
1996 (source
1997 (origin
1998 (method url-fetch)
1999 (uri (string-append
2000 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2001 version ".tar.gz"))
2002 (sha256
2003 (base32
2004 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2005 (build-system python-build-system)
2006 (home-page "https://github.com/mitsuhiko/markupsafe")
2007 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2008 (description
2009 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2010 for Python.")
2011 (license license:bsd-3)))
2012
2013 (define-public python2-markupsafe
2014 (package-with-python2 python-markupsafe))
2015
2016 (define-public python-jinja2
2017 (package
2018 (name "python-jinja2")
2019 (version "2.9.6")
2020 (source
2021 (origin
2022 (method url-fetch)
2023 (uri (pypi-uri "Jinja2" version))
2024 (sha256
2025 (base32
2026 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2027 (build-system python-build-system)
2028 (arguments
2029 `(#:phases
2030 (modify-phases %standard-phases
2031 ;; These files cannot be built with Python < 3.6. See
2032 ;; https://github.com/pallets/jinja/issues/655
2033 ;; FIXME: Remove this when the "python" package is upgraded.
2034 (add-after 'unpack 'delete-incompatible-files
2035 (lambda _
2036 (for-each delete-file
2037 '("jinja2/asyncsupport.py"
2038 "jinja2/asyncfilters.py"))
2039 #t)))))
2040 (propagated-inputs
2041 `(("python-markupsafe" ,python-markupsafe)))
2042 (home-page "http://jinja.pocoo.org/")
2043 (synopsis "Python template engine")
2044 (description
2045 "Jinja2 is a small but fast and easy to use stand-alone template engine
2046 written in pure Python.")
2047 (license license:bsd-3)))
2048
2049 (define-public python2-jinja2
2050 (package-with-python2 python-jinja2))
2051
2052 (define-public python-pystache
2053 (package
2054 (name "python-pystache")
2055 (version "0.5.4")
2056 (source (origin
2057 (method url-fetch)
2058 (uri (pypi-uri "pystache" version))
2059 (sha256
2060 (base32
2061 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2062 (build-system python-build-system)
2063 (arguments
2064 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2065 (home-page "http://defunkt.io/pystache/")
2066 (synopsis "Python logic-less template engine")
2067 (description
2068 "Pystache is a Python implementation of the framework agnostic,
2069 logic-free templating system Mustache.")
2070 (license license:expat)
2071 (properties `((python2-variant . ,(delay python2-pystache))))))
2072
2073 (define-public python2-pystache
2074 (package (inherit (package-with-python2
2075 (strip-python2-variant python-pystache)))
2076 (arguments
2077 `(#:python ,python-2
2078 #:phases
2079 (modify-phases %standard-phases
2080 (replace 'check
2081 (lambda _
2082 (zero? (system* "python" "test_pystache.py")))))))))
2083
2084 (define-public python-joblib
2085 (package
2086 (name "python-joblib")
2087 (version "0.10.3")
2088 (source (origin
2089 (method url-fetch)
2090 (uri (pypi-uri "joblib" version))
2091 (sha256
2092 (base32
2093 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2094 (modules '((guix build utils)))
2095 (snippet
2096 '(begin
2097 ;; Remove pre-compiled .pyc files from source.
2098 (for-each delete-file-recursively
2099 (find-files "." "__pycache__" #:directories? #t))
2100 (for-each delete-file (find-files "." "\\.pyc$"))
2101 #t))))
2102 (build-system python-build-system)
2103 (arguments
2104 `(#:phases
2105 (modify-phases %standard-phases
2106 (add-before 'check 'disable-failing-tests
2107 (lambda _
2108 ;; This numpydoc tests fails for unknown reasons
2109 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2110 ;; This numpydoc test depends on matplotlib, which is not a
2111 ;; required input.
2112 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2113 ;; These tests fail to execute sys.executable
2114 (substitute* "joblib/test/test_parallel.py"
2115 (("import nose" line)
2116 (string-append "from nose.plugins.skip import SkipTest\n" line))
2117 (("def test_nested_parallel_warnings" line)
2118 (string-append "@SkipTest\n" line))
2119 (("def test_parallel_with_interactively_defined_functions" line)
2120 (string-append "@SkipTest\n" line)))
2121 #t)))))
2122 ;; Provide nose to enable tests command
2123 (native-inputs
2124 `(("python-nose" ,python-nose)
2125 ("python-sphinx" ,python-sphinx)
2126 ("python-docutils" ,python-docutils)
2127 ("python-numpydoc" ,python-numpydoc)))
2128 (home-page "http://pythonhosted.org/joblib/")
2129 (synopsis "Using Python functions as pipeline jobs")
2130 (description
2131 "Joblib is a set of tools to provide lightweight pipelining in Python.
2132 In particular, joblib offers: transparent disk-caching of the output values
2133 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2134 logging and tracing of the execution.")
2135 (license license:bsd-3)))
2136
2137 (define-public python2-joblib
2138 (package-with-python2 python-joblib))
2139
2140 (define-public python-docutils
2141 (package
2142 (name "python-docutils")
2143 (version "0.14")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (pypi-uri "docutils" version))
2148 (sha256
2149 (base32
2150 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2151 (build-system python-build-system)
2152 (arguments
2153 '(#:tests? #f)) ; no setup.py test command
2154 (home-page "http://docutils.sourceforge.net/")
2155 (synopsis "Python Documentation Utilities")
2156 (description
2157 "Docutils is a modular system for processing documentation into useful
2158 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2159 reStructuredText.")
2160 ;; Most of the source code is public domain, but some source files are
2161 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2162 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2163
2164 (define-public python2-docutils
2165 (package-with-python2 python-docutils))
2166
2167 (define-public python-pygments
2168 (package
2169 (name "python-pygments")
2170 (version "2.2.0")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "Pygments" version))
2175 (sha256
2176 (base32
2177 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2178 (build-system python-build-system)
2179 (arguments
2180 ;; FIXME: Tests require sphinx, which depends on this.
2181 '(#:tests? #f))
2182 (home-page "http://pygments.org/")
2183 (synopsis "Syntax highlighting")
2184 (description
2185 "Pygments is a syntax highlighting package written in Python.")
2186 (license license:bsd-2)))
2187
2188 (define-public python2-pygments
2189 (package-with-python2 python-pygments))
2190
2191 (define-public python-sphinxcontrib-websupport
2192 (package
2193 (name "python-sphinxcontrib-websupport")
2194 (version "1.0.1")
2195 (source (origin
2196 (method url-fetch)
2197 (uri (pypi-uri "sphinxcontrib-websupport" version))
2198 (sha256
2199 (base32
2200 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2201 (build-system python-build-system)
2202 (propagated-inputs
2203 `(("python-mock" ,python-mock)
2204 ("python-pytest" ,python-pytest)
2205 ("python-xapian-bindings" ,python-xapian-bindings)))
2206 ;; Needed for running the test suite
2207 (native-inputs
2208 `(("python-six" ,python-six)
2209 ("python-jinja2" ,python-jinja2)
2210 ("python-docutils" ,python-docutils)
2211 ("python-sphinx" ,python-sphinx)
2212 ("python-sqlalchemy" ,python-sqlalchemy)
2213 ("python-whoosh" ,python-whoosh)))
2214 (home-page "http://sphinx-doc.org/")
2215 (synopsis "Sphinx API for web applications")
2216 (description "This package provides a Python API to easily integrate
2217 Sphinx documentation into your web application. It provides tools to
2218 integrate Sphinx documents in web templates and to handle searches.")
2219 (license license:bsd-3)))
2220
2221 (define-public python-sphinx
2222 (package
2223 (name "python-sphinx")
2224 (version "1.5.1")
2225 (source
2226 (origin
2227 (method url-fetch)
2228 (uri (pypi-uri "Sphinx" version))
2229 (sha256
2230 (base32
2231 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2232 (build-system python-build-system)
2233 (arguments
2234 `(#:phases
2235 (modify-phases %standard-phases
2236 (replace 'check
2237 (lambda _
2238 ;; Requires Internet access.
2239 (delete-file "tests/test_build_linkcheck.py")
2240 (zero? (system* "make" "test")))))))
2241 (propagated-inputs
2242 `(("python-imagesize" ,python-imagesize)
2243 ("python-sphinx-alabaster-theme"
2244 ,python-sphinx-alabaster-theme)
2245 ("python-babel" ,python-babel)
2246 ("python-snowballstemmer" ,python-snowballstemmer)
2247 ("python-docutils" ,python-docutils)
2248 ("python-jinja2" ,python-jinja2)
2249 ("python-pygments" ,python-pygments)
2250 ("python-requests" ,python-requests)
2251 ("python-six" ,python-six)))
2252 (native-inputs
2253 `(("graphviz" ,graphviz)
2254 ("python-html5lib" ,python-html5lib)
2255 ("python-mock" ,python-mock)
2256 ("python-nose" ,python-nose)))
2257 (home-page "http://sphinx-doc.org/")
2258 (synopsis "Python documentation generator")
2259 (description "Sphinx is a tool that makes it easy to create documentation
2260 for Python projects or other documents consisting of multiple reStructuredText
2261 sources.")
2262 (license license:bsd-3)
2263 (properties `((python2-variant . ,(delay python2-sphinx))))))
2264
2265 (define-public python-sphinx-1.6
2266 (package (inherit python-sphinx)
2267 (name "python-sphinx")
2268 (version "1.6.3")
2269 (source (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "Sphinx" version))
2272 (sha256
2273 (base32
2274 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2275 (arguments
2276 `(#:phases
2277 (modify-phases %standard-phases
2278 (replace 'check
2279 (lambda _
2280 ;; Requires Internet access.
2281 (delete-file "tests/test_build_linkcheck.py")
2282 (substitute* "tests/test_build_latex.py"
2283 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2284 "@pytest.mark.skip()"))
2285 (zero? (system* "make" "test")))))))
2286 (propagated-inputs
2287 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2288 ,@(package-propagated-inputs python-sphinx)))
2289 (native-inputs
2290 `(("python-pytest" ,python-pytest-3.0)
2291 ("imagemagick" ,imagemagick) ; for "convert"
2292 ,@(package-native-inputs python-sphinx)))
2293 (properties '())))
2294
2295 (define-public python-sphinx-1.5.3
2296 (package
2297 (inherit python-sphinx)
2298 (name "python-sphinx")
2299 (version "1.5.3")
2300 (source
2301 (origin
2302 (method url-fetch)
2303 (uri (pypi-uri "Sphinx" version))
2304 (sha256
2305 (base32
2306 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2307 (native-inputs
2308 `(("python-pytest" ,python-pytest-3.0)
2309 ,@(package-native-inputs python-sphinx)))))
2310
2311 (define-public python2-sphinx
2312 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2313 (package
2314 (inherit base)
2315 (native-inputs `(("python2-mock" ,python2-mock)
2316 ("python2-enum34" ,python2-enum34)
2317 ,@(package-native-inputs base)))
2318 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2319 ,@(package-propagated-inputs base))))))
2320
2321 (define-public python-sphinx-rtd-theme
2322 (package
2323 (name "python-sphinx-rtd-theme")
2324 (version "0.2.4")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (pypi-uri "sphinx_rtd_theme" version))
2329 (sha256
2330 (base32
2331 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2332 (build-system python-build-system)
2333 (arguments '(#:tests? #f)) ; No tests.
2334 (propagated-inputs
2335 `(("python-sphinx" ,python-sphinx)))
2336 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2337 (synopsis "ReadTheDocs.org theme for Sphinx")
2338 (description "A theme for Sphinx used by ReadTheDocs.org.")
2339 (license license:expat)))
2340
2341 (define-public python2-sphinx-rtd-theme
2342 (package-with-python2 python-sphinx-rtd-theme))
2343
2344 (define-public python-guzzle-sphinx-theme
2345 (package
2346 (name "python-guzzle-sphinx-theme")
2347 (version "0.7.11")
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (pypi-uri "guzzle_sphinx_theme" version))
2352 (sha256
2353 (base32
2354 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2355 (build-system python-build-system)
2356 (propagated-inputs
2357 `(("python-sphinx" ,python-sphinx)))
2358 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2359 (synopsis "Sphinx theme used by Guzzle")
2360 (description "This package provides guzzle_sphinx_theme, a theme for the
2361 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2362 and several other projects.")
2363 (license license:expat)))
2364
2365 (define-public python2-guzzle-sphinx-theme
2366 (package-with-python2 python-guzzle-sphinx-theme))
2367
2368 (define-public python-rst.linker
2369 (package
2370 (name "python-rst.linker")
2371 (version "1.7")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "rst.linker" version))
2376 (sha256
2377 (base32
2378 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2379 (build-system python-build-system)
2380 (propagated-inputs
2381 `(("python-dateutil" ,python-dateutil)
2382 ("python-six" ,python-six)))
2383 (native-inputs
2384 `(("python-setuptools-scm" ,python-setuptools-scm)))
2385 ;; Test would require path.py, which would introduce a cyclic dependence.
2386 (arguments `(#:tests? #f))
2387 ;; Note: As of version 1.7 the documentation is not worth building.
2388 (home-page "https://github.com/jaraco/rst.linker")
2389 (synopsis "Sphinx plugin to add links and timestamps")
2390 (description "rst.linker allows to automatically replace text by a
2391 reStructuredText external reference or timestamps. It's primary purpose is to
2392 augment the changelog, but it can be used for other documents, too.")
2393 (license license:expat)))
2394
2395 (define-public python2-rst.linker
2396 (package-with-python2 python-rst.linker))
2397
2398 (define-public python-feedgenerator
2399 (package
2400 (name "python-feedgenerator")
2401 (version "1.9")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "feedgenerator" version))
2406 (sha256
2407 (base32
2408 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2409 (modules '((guix build utils)))
2410 (snippet
2411 '(begin
2412 ;; Remove pre-compiled .pyc files from source.
2413 (for-each delete-file-recursively
2414 (find-files "." "__pycache__" #:directories? #t))
2415 (for-each delete-file (find-files "." "\\.pyc$"))
2416 #t))))
2417 (build-system python-build-system)
2418 (propagated-inputs
2419 `(("python-pytz" ,python-pytz)
2420 ("python-six" ,python-six)))
2421 (home-page "https://github.com/getpelican/feedgenerator")
2422 (synopsis
2423 "Standalone version of Django's Atom/RSS feed generator")
2424 (description
2425 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2426 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2427 (license license:bsd-3)))
2428
2429 (define-public python2-feedgenerator
2430 (package-with-python2 python-feedgenerator))
2431
2432 (define-public python-blinker
2433 (package
2434 (name "python-blinker")
2435 (version "1.4")
2436 (source
2437 (origin
2438 (method url-fetch)
2439 (uri (pypi-uri "blinker" version))
2440 (sha256
2441 (base32
2442 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2443 (build-system python-build-system)
2444 (home-page "http://pythonhosted.org/blinker/")
2445 (synopsis "Fast, simple object-to-object and broadcast signaling")
2446 (description
2447 "Blinker provides a fast dispatching system that allows any number of
2448 interested parties to subscribe to events, or \"signals\".")
2449 (license license:expat)))
2450
2451 (define-public python2-blinker
2452 (package-with-python2 python-blinker))
2453
2454 (define-public pelican
2455 (package
2456 (name "pelican")
2457 (version "3.6.3")
2458 (source
2459 (origin
2460 (method url-fetch)
2461 (uri (pypi-uri "pelican" version))
2462 (sha256
2463 (base32
2464 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2465 (build-system python-build-system)
2466 (propagated-inputs
2467 `(("python-feedgenerator" ,python-feedgenerator)
2468 ("python-jinja2" ,python-jinja2)
2469 ("python-pygments" ,python-pygments)
2470 ("python-docutils" ,python-docutils)
2471 ("python-pytz" ,python-pytz)
2472 ("python-blinker" ,python-blinker)
2473 ("python-unidecode" ,python-unidecode)
2474 ("python-six" ,python-six)
2475 ("python-dateutil" ,python-dateutil)))
2476 (home-page "http://getpelican.com/")
2477 (arguments
2478 `(;; XXX Requires a lot more packages to do unit tests :P
2479 #:tests? #f
2480 #:phases (modify-phases %standard-phases
2481 (add-before
2482 'install 'adjust-requires
2483 ;; Since feedgenerator is installed from git, it doesn't
2484 ;; conform to the version requirements.
2485 ;;
2486 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2487 ;; version requirement so setuptools doesn't get confused.
2488 (lambda _
2489 (substitute* "setup.py"
2490 (("['\"]feedgenerator.*?['\"]")
2491 "'feedgenerator'")))))))
2492 (synopsis "Python-based static site publishing system")
2493 (description
2494 "Pelican is a tool to generate a static blog from reStructuredText,
2495 Markdown input files, and more. Pelican uses Jinja2 for templating
2496 and is very extensible.")
2497 (license license:agpl3+)))
2498
2499 (define-public python-scikit-image
2500 (package
2501 (name "python-scikit-image")
2502 (version "0.11.3")
2503 (source
2504 (origin
2505 (method url-fetch)
2506 (uri (string-append
2507 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2508 version ".tar.gz"))
2509 (sha256
2510 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2511 (build-system python-build-system)
2512 (arguments
2513 ;; TODO: Some tests require running X11 server. Disable them?
2514 '(#:tests? #f))
2515 ;; See DEPENDS.txt for the list of build and run time requiremnts
2516 (propagated-inputs
2517 `(("python-matplotlib" ,python-matplotlib)
2518 ("python-networkx" ,python-networkx)
2519 ("python-scipy" ,python-scipy)
2520 ("python-pillow" ,python-pillow)))
2521 (native-inputs
2522 `(("python-numpy" ,python-numpy)
2523 ("python-cython" ,python-cython)
2524 ("python-six" ,python-six)))
2525 (home-page "http://scikit-image.org/")
2526 (synopsis "Image processing in Python")
2527 (description
2528 "Scikit-image is a collection of algorithms for image processing.")
2529 (license license:bsd-3)))
2530
2531 (define-public python2-scikit-image
2532 (package-with-python2 python-scikit-image))
2533
2534 (define-public python-cython
2535 (package
2536 (name "python-cython")
2537 (version "0.27")
2538 (source
2539 (origin
2540 (method url-fetch)
2541 (uri (pypi-uri "Cython" version))
2542 (sha256
2543 (base32
2544 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2545 (build-system python-build-system)
2546 ;; we need the full python package and not just the python-wrapper
2547 ;; because we need libpython3.3m.so
2548 (inputs
2549 `(("python" ,python)))
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (add-before 'check 'set-HOME
2554 ;; some tests require access to "$HOME/.cython"
2555 (lambda _ (setenv "HOME" "/tmp") #t))
2556 (replace 'check
2557 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2558 (home-page "http://cython.org/")
2559 (synopsis "C extensions for Python")
2560 (description "Cython is an optimising static compiler for both the Python
2561 programming language and the extended Cython programming language. It makes
2562 writing C extensions for Python as easy as Python itself.")
2563 (license license:asl2.0)
2564 (properties `((python2-variant . ,(delay python2-cython))))))
2565
2566 (define-public python2-cython
2567 (package (inherit (package-with-python2
2568 (strip-python2-variant python-cython)))
2569 (name "python2-cython")
2570 (inputs
2571 `(("python-2" ,python-2))))) ; this is not automatically changed
2572
2573 ;; The RPython toolchain currently does not support Python 3.
2574 (define-public python2-rpython
2575 (package
2576 (name "python2-rpython")
2577 (version "0.2.1")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "rpython" version))
2582 (sha256
2583 (base32
2584 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2585 (build-system python-build-system)
2586 (arguments `(#:python ,python-2))
2587 (native-inputs
2588 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2589 (home-page "https://rpython.readthedocs.org")
2590 (synopsis "Framework for implementing interpreters and virtual machines")
2591 (description "RPython is a translation and support framework for
2592 producing implementations of dynamic languages, emphasizing a clean separation
2593 between language specification and implementation aspects.")
2594 (license license:expat)))
2595
2596 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2597 ;; python-scipy still build, as these three packages are often used together.
2598 (define-public python-numpy
2599 (package
2600 (name "python-numpy")
2601 (version "1.12.0")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (string-append
2606 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2607 (file-name (string-append name "-" version ".tar.gz"))
2608 (sha256
2609 (base32
2610 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
2611 (build-system python-build-system)
2612 (inputs
2613 `(("openblas" ,openblas)
2614 ("lapack" ,lapack)))
2615 (native-inputs
2616 `(("python-cython" ,python-cython)
2617 ("python-nose" ,python-nose)
2618 ("gfortran" ,gfortran)))
2619 (arguments
2620 `(#:phases
2621 (modify-phases %standard-phases
2622 (add-before 'build 'configure-blas-lapack
2623 (lambda* (#:key inputs #:allow-other-keys)
2624 (call-with-output-file "site.cfg"
2625 (lambda (port)
2626 (format port
2627 "[openblas]
2628 libraries = openblas
2629 library_dirs = ~a/lib
2630 include_dirs = ~a/include
2631
2632 # backslash-n to make emacs happy
2633 \n[lapack]
2634 lapack_libs = lapack
2635 library_dirs = ~a/lib
2636 include_dirs = ~a/include
2637 "
2638 (assoc-ref inputs "openblas")
2639 (assoc-ref inputs "openblas")
2640 (assoc-ref inputs "lapack")
2641 (assoc-ref inputs "lapack"))))
2642 #t))
2643 (add-before 'build 'fix-executable-paths
2644 (lambda* (#:key inputs #:allow-other-keys)
2645 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2646 ;; instead of /bin/sh.
2647 (substitute* "numpy/distutils/exec_command.py"
2648 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2649 (string-append match-start (assoc-ref inputs "bash") match-end)))
2650 ;; Use "gcc" executable, not "cc".
2651 (substitute* "numpy/distutils/system_info.py"
2652 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2653 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2654 #t))
2655 ;; Tests can only be run after the library has been installed and not
2656 ;; within the source directory.
2657 (delete 'check)
2658 (add-after 'install 'check
2659 (lambda* (#:key outputs inputs #:allow-other-keys)
2660 ;; Make installed package available for running the tests
2661 (add-installed-pythonpath inputs outputs)
2662 (with-directory-excursion "/tmp"
2663 (zero? (system* "python" "-c"
2664 "import numpy; numpy.test(verbose=2)"))))))))
2665 (home-page "http://www.numpy.org/")
2666 (synopsis "Fundamental package for scientific computing with Python")
2667 (description "NumPy is the fundamental package for scientific computing
2668 with Python. It contains among other things: a powerful N-dimensional array
2669 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2670 and Fortran code, useful linear algebra, Fourier transform, and random number
2671 capabilities.")
2672 (license license:bsd-3)))
2673
2674 (define-public python2-numpy
2675 (package-with-python2 python-numpy))
2676
2677 (define-public python-numpy-next
2678 (package (inherit python-numpy)
2679 (name "python-numpy-next")
2680 (version "1.13.1")
2681 (source
2682 (origin
2683 (method url-fetch)
2684 (uri (pypi-uri "numpy" version ".zip"))
2685 (sha256
2686 (base32
2687 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
2688 (native-inputs
2689 `(("unzip" ,unzip)
2690 ("python-cython" ,python-cython)
2691 ("python-nose" ,python-nose)
2692 ("gfortran" ,gfortran)))))
2693
2694 (define-public python2-numpy-next
2695 (package-with-python2 python-numpy-next))
2696
2697 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2698 ;; interest only for legacy code going back to NumPy's predecessor
2699 ;; Numeric.
2700 (define-public python2-numpy-1.8
2701 (package (inherit python2-numpy)
2702 (version "1.8.2")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (string-append
2707 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2708 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2709 (sha256
2710 (base32
2711 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2712 (arguments
2713 (substitute-keyword-arguments (package-arguments python2-numpy)
2714 ((#:phases phases)
2715 `(modify-phases ,phases
2716 (replace 'configure-blas-lapack
2717 (lambda* (#:key inputs #:allow-other-keys)
2718 (call-with-output-file "site.cfg"
2719 (lambda (port)
2720 (format port
2721 "[openblas]
2722 libraries = openblas,lapack
2723 library_dirs = ~a/lib:~a/lib
2724 include_dirs = ~a/include:~a/include
2725 "
2726 (assoc-ref inputs "openblas")
2727 (assoc-ref inputs "lapack")
2728 (assoc-ref inputs "openblas")
2729 (assoc-ref inputs "lapack"))))
2730 #t))))))
2731 (description "NumPy is the fundamental package for scientific computing
2732 with Python. It contains among other things: a powerful N-dimensional array
2733 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2734 and Fortran code, useful linear algebra, Fourier transform, and random number
2735 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2736 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2737 Numeric.")
2738 (license license:bsd-3)))
2739
2740 (define-public python-munch
2741 (package
2742 (name "python-munch")
2743 (version "2.0.4")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "munch" version))
2748 (sha256
2749 (base32
2750 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2751 (build-system python-build-system)
2752 (home-page "https://github.com/Infinidat/munch")
2753 (synopsis "Dot-accessible dictionary")
2754 (description "Munch is a dot-accessible dictionary similar to JavaScript
2755 objects.")
2756 (license license:expat)))
2757
2758 (define-public python2-munch
2759 (package-with-python2 python-munch))
2760
2761 (define-public python-colormath
2762 (package
2763 (name "python-colormath")
2764 (version "2.1.1")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (pypi-uri "colormath" version))
2769 (sha256
2770 (base32
2771 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
2772 (build-system python-build-system)
2773 (propagated-inputs
2774 `(("python-networkx" ,python-networkx)
2775 ("python-numpy" ,python-numpy)))
2776 (home-page "https://github.com/gtaylor/python-colormath")
2777 (synopsis "Color math and conversion library")
2778 (description
2779 "This is a Python library for color math and conversions.")
2780 (license license:bsd-3)))
2781
2782 (define-public python2-colormath
2783 (package-with-python2 python-colormath))
2784
2785 (define-public python-spectra
2786 (package
2787 (name "python-spectra")
2788 (version "0.0.8")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (pypi-uri "spectra" version))
2793 (sha256
2794 (base32
2795 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
2796 (build-system python-build-system)
2797 (arguments
2798 `(#:phases
2799 (modify-phases %standard-phases
2800 (replace 'check
2801 (lambda _
2802 (zero? (system* "nosetests" "-v")))))))
2803 (propagated-inputs
2804 `(("python-colormath" ,python-colormath)))
2805 (native-inputs
2806 `(("python-nose" ,python-nose)))
2807 (home-page "https://github.com/jsvine/spectra")
2808 (synopsis "Color scales and color conversion")
2809 (description
2810 "This package provides a Python library intended to make color math,
2811 color scales, and color space conversion easy. It has support for:
2812
2813 @enumerate
2814 @item Color scales
2815 @item Color ranges
2816 @item Color blending
2817 @item Brightening/darkening colors
2818 @item Saturating/desaturating colors
2819 @item Conversion to/from multiple color spaces.
2820 @end enumerate\n")
2821 (license license:expat)))
2822
2823 (define-public python2-spectra
2824 (package-with-python2 python-spectra))
2825
2826 (define-public python2-fastlmm
2827 (package
2828 (name "python2-fastlmm")
2829 (version "0.2.21")
2830 (source
2831 (origin
2832 (method url-fetch)
2833 (uri (pypi-uri "fastlmm" version ".zip"))
2834 (sha256
2835 (base32
2836 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
2837 (build-system python-build-system)
2838 (arguments
2839 `(#:python ,python-2)) ; only Python 2.7 is supported
2840 (propagated-inputs
2841 `(("python2-numpy" ,python2-numpy)
2842 ("python2-scipy" ,python2-scipy)
2843 ("python2-matplotlib" ,python2-matplotlib)
2844 ("python2-pandas" ,python2-pandas)
2845 ("python2-scikit-learn" ,python2-scikit-learn)
2846 ("python2-pysnptools" ,python2-pysnptools)))
2847 (native-inputs
2848 `(("unzip" ,unzip)
2849 ("python2-cython" ,python2-cython)
2850 ("python2-mock" ,python2-mock)
2851 ("python2-nose" ,python2-nose)))
2852 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2853 (synopsis "Perform genome-wide association studies on large data sets")
2854 (description
2855 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2856 Models, is a program for performing both single-SNP and SNP-set genome-wide
2857 association studies (GWAS) on extremely large data sets.")
2858 (license license:asl2.0)))
2859
2860 (define-public python-numpy-documentation
2861 (package
2862 (name "python-numpy-documentation")
2863 (version (package-version python-numpy))
2864 (source (package-source python-numpy))
2865 (build-system python-build-system)
2866 (native-inputs
2867 `(("python-matplotlib" ,python-matplotlib)
2868 ("python-numpy" ,python-numpy)
2869 ("pkg-config" ,pkg-config)
2870 ("python-sphinx" ,python-sphinx)
2871 ("python-numpydoc" ,python-numpydoc)
2872 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2873 texlive-fonts-ec
2874 texlive-generic-ifxetex
2875 texlive-generic-pdftex
2876 texlive-latex-amsfonts
2877 texlive-latex-capt-of
2878 texlive-latex-cmap
2879 texlive-latex-environ
2880 texlive-latex-eqparbox
2881 texlive-latex-etoolbox
2882 texlive-latex-expdlist
2883 texlive-latex-fancyhdr
2884 texlive-latex-fancyvrb
2885 texlive-latex-fncychap
2886 texlive-latex-float
2887 texlive-latex-framed
2888 texlive-latex-geometry
2889 texlive-latex-graphics
2890 texlive-latex-hyperref
2891 texlive-latex-mdwtools
2892 texlive-latex-multirow
2893 texlive-latex-oberdiek
2894 texlive-latex-parskip
2895 texlive-latex-preview
2896 texlive-latex-tabulary
2897 texlive-latex-threeparttable
2898 texlive-latex-titlesec
2899 texlive-latex-trimspaces
2900 texlive-latex-ucs
2901 texlive-latex-upquote
2902 texlive-latex-url
2903 texlive-latex-varwidth
2904 texlive-latex-wrapfig)))
2905 ("texinfo" ,texinfo)
2906 ("perl" ,perl)
2907 ("scipy-sphinx-theme"
2908 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2909 (method git-fetch)
2910 (uri (git-reference
2911 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2912 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2913 (sha256
2914 (base32
2915 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2916 ,@(package-native-inputs python-numpy)))
2917 (arguments
2918 `(#:tests? #f ; we're only generating the documentation
2919 #:phases
2920 (modify-phases %standard-phases
2921 (delete 'build)
2922 (replace 'install
2923 (lambda* (#:key inputs outputs #:allow-other-keys)
2924 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2925 (doc (string-append
2926 data "/doc/" ,name "-"
2927 ,(package-version python-numpy)))
2928 (info-reader (string-append data "/info"))
2929 (html (string-append doc "/html"))
2930 (scipy-sphinx-theme "scipy-sphinx-theme")
2931 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2932 (pyver ,(string-append "PYVER=")))
2933
2934 ;; FIXME: this is needed to for texlive-union to generate
2935 ;; fonts, which are not found.
2936 (setenv "HOME" "/tmp")
2937
2938 (with-directory-excursion "doc"
2939 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2940 (mkdir-p html)
2941 (system* "make" "html" pyver)
2942 (system* "make" "latex" "PAPER=a4" pyver)
2943 (system* "make" "-C" "build/latex"
2944 "all-pdf" "PAPER=a4" pyver)
2945 ;; FIXME: Generation of the info file fails.
2946 ;; (system* "make" "info" pyver)
2947 ;; (mkdir-p info)
2948 ;; (copy-file "build/texinfo/numpy.info"
2949 ;; (string-append info "/numpy.info"))
2950 (for-each (lambda (file)
2951 (copy-file (string-append "build/latex" file)
2952 (string-append doc file)))
2953 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2954 (with-directory-excursion "build/html"
2955 (for-each (lambda (file)
2956 (let* ((dir (dirname file))
2957 (tgt-dir (string-append html "/" dir)))
2958 (unless (equal? "." dir)
2959 (mkdir-p tgt-dir))
2960 (install-file file html)))
2961 (find-files "." ".*")))))
2962 #t)))))
2963 (home-page (package-home-page python-numpy))
2964 (synopsis "Documentation for the python-numpy package")
2965 (description (package-description python-numpy))
2966 (license (package-license python-numpy))))
2967
2968 (define-public python2-numpy-documentation
2969 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
2970 (package
2971 (inherit numpy-documentation)
2972 (native-inputs `(("python2-functools32" ,python2-functools32)
2973 ,@(package-native-inputs numpy-documentation))))))
2974
2975 (define-public python-pygit2
2976 (package
2977 (name "python-pygit2")
2978 (version "0.26.0")
2979 (source
2980 (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "pygit2" version))
2983 (sha256
2984 (base32
2985 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
2986 (patches
2987 (search-patches "python-pygit2-disable-network-tests.patch"))))
2988 (build-system python-build-system)
2989 (propagated-inputs
2990 `(("python-six" ,python-six)
2991 ("python-cffi" ,python-cffi)
2992 ("libgit2" ,libgit2)
2993 ("python-tox" ,python-tox)))
2994 (home-page "https://github.com/libgit2/pygit2")
2995 (synopsis "Python bindings for libgit2")
2996 (description "Pygit2 is a set of Python bindings to the libgit2 shared
2997 library, libgit2 implements Git plumbing.")
2998 ;; GPL2.0 only, with linking exception.
2999 (license license:gpl2)))
3000
3001 (define-public python2-pygit2
3002 (package-with-python2 python-pygit2))
3003
3004 (define-public python-pyparsing
3005 (package
3006 (name "python-pyparsing")
3007 (version "2.2.0")
3008 (source
3009 (origin
3010 (method url-fetch)
3011 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3012 "/pyparsing-" version
3013 "/pyparsing-" version ".tar.gz"))
3014 (sha256
3015 (base32
3016 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3017 (build-system python-build-system)
3018 (outputs '("out" "doc"))
3019 (arguments
3020 `(#:tests? #f ; no test target
3021 #:phases
3022 (modify-phases %standard-phases
3023 (add-after 'install 'install-doc
3024 (lambda* (#:key outputs #:allow-other-keys)
3025 (let* ((doc (string-append (assoc-ref outputs "doc")
3026 "/share/doc/" ,name "-" ,version))
3027 (html-doc (string-append doc "/html"))
3028 (examples (string-append doc "/examples")))
3029 (mkdir-p html-doc)
3030 (mkdir-p examples)
3031 (for-each
3032 (lambda (dir tgt)
3033 (map (lambda (file)
3034 (install-file file tgt))
3035 (find-files dir ".*")))
3036 (list "docs" "htmldoc" "examples")
3037 (list doc html-doc examples))
3038 #t))))))
3039 (home-page "http://pyparsing.wikispaces.com")
3040 (synopsis "Python parsing class library")
3041 (description
3042 "The pyparsing module is an alternative approach to creating and
3043 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3044 of regular expressions. The pyparsing module provides a library of classes
3045 that client code uses to construct the grammar directly in Python code.")
3046 (license license:expat)))
3047
3048 (define-public python2-pyparsing
3049 (package-with-python2 python-pyparsing))
3050
3051 (define-public python-numpydoc
3052 (package
3053 (name "python-numpydoc")
3054 (version "0.5")
3055 (source
3056 (origin
3057 (method url-fetch)
3058 (uri (string-append
3059 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3060 version ".tar.gz"))
3061 (sha256
3062 (base32
3063 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3064 (modules '((guix build utils)))
3065 (snippet
3066 '(begin
3067 ;; Drop a test requiring matplotlib, which we cannot add as an
3068 ;; input since it would create a circular dependency: Extend the
3069 ;; test for Python 3, where it is already dropped, to Python 2.
3070 (substitute* "numpydoc/tests/test_plot_directive.py"
3071 (("3") "2"))))))
3072 (build-system python-build-system)
3073 (propagated-inputs
3074 `(("python-sphinx" ,python-sphinx)))
3075 (native-inputs
3076 `(("python-nose" ,python-nose)))
3077 (home-page "https://pypi.python.org/pypi/numpydoc")
3078 (synopsis
3079 "Numpy's Sphinx extensions")
3080 (description
3081 "Sphinx extension to support docstrings in Numpy format.")
3082 (license license:bsd-2)))
3083
3084 (define-public python2-numpydoc
3085 (package-with-python2 python-numpydoc))
3086
3087 (define-public python-numexpr
3088 (package
3089 (name "python-numexpr")
3090 (version "2.6.4")
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "numexpr" version))
3095 (sha256
3096 (base32
3097 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3098 (build-system python-build-system)
3099 (arguments `(#:tests? #f)) ; no tests included
3100 (propagated-inputs
3101 `(("python-numpy" ,python-numpy)))
3102 (home-page "https://github.com/pydata/numexpr")
3103 (synopsis "Fast numerical expression evaluator for NumPy")
3104 (description
3105 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3106 expressions that operate on arrays are accelerated and use less memory than
3107 doing the same calculation in Python. In addition, its multi-threaded
3108 capabilities can make use of all your cores, which may accelerate
3109 computations, most specially if they are not memory-bounded (e.g. those using
3110 transcendental functions).")
3111 (license license:expat)))
3112
3113 (define-public python2-numexpr
3114 (package-with-python2 python-numexpr))
3115
3116 (define-public python-cycler
3117 (package
3118 (name "python-cycler")
3119 (version "0.10.0")
3120 (source (origin
3121 (method url-fetch)
3122 (uri (pypi-uri "cycler" version))
3123 (sha256
3124 (base32
3125 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3126 (build-system python-build-system)
3127 (arguments
3128 ;; XXX: The current version requires 'coveralls' which we don't have.
3129 ;; Enable this for the next release which uses 'python-pytest'.
3130 '(#:tests? #f))
3131 (propagated-inputs
3132 `(("python-six" ,python-six)))
3133 (home-page "http://matplotlib.org/cycler/")
3134 (synopsis "Composable keyword argument iterator")
3135 (description
3136 "When using @code{matplotlib} and plotting more than one line, it is
3137 common to want to be able to want to be able to cycle over one or more artist
3138 styles; but the plotting logic can quickly become involved.
3139 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3140 @code{Cycler} class was developed.")
3141 (license license:bsd-3)))
3142
3143 (define-public python2-cycler
3144 (package-with-python2 python-cycler))
3145
3146 (define-public python-colorspacious
3147 (package
3148 (name "python-colorspacious")
3149 (version "1.1.0")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3154 version ".tar.gz"))
3155 (file-name (string-append name "-" version))
3156 (sha256
3157 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3158 (build-system python-build-system)
3159 (propagated-inputs
3160 `(("python-numpy" ,python-numpy)))
3161 (native-inputs
3162 `(("python-nose" ,python-nose)))
3163 (arguments
3164 `(#:phases
3165 (modify-phases %standard-phases
3166 (replace 'check
3167 (lambda _
3168 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3169 (home-page "https://github.com/njsmith/colorspacious")
3170 (synopsis "Python library for colorspace conversions")
3171 (description "@code{colorspacious} is a Python library that lets you
3172 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3173 (license license:expat)))
3174
3175 (define-public python2-colorspacious
3176 (package-with-python2 python-colorspacious))
3177
3178 (define-public python-matplotlib
3179 (package
3180 (name "python-matplotlib")
3181 (version "2.0.2")
3182 (source
3183 (origin
3184 (method url-fetch)
3185 (uri (pypi-uri "matplotlib" version))
3186 (sha256
3187 (base32
3188 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3189 (build-system python-build-system)
3190 (propagated-inputs ; the following packages are all needed at run time
3191 `(("python-cycler" ,python-cycler)
3192 ("python-pyparsing" ,python-pyparsing)
3193 ("python-pygobject" ,python-pygobject)
3194 ("gobject-introspection" ,gobject-introspection)
3195 ("python-tkinter" ,python "tk")
3196 ("python-dateutil" ,python-dateutil)
3197 ("python-numpy" ,python-numpy)
3198 ("python-pillow" ,python-pillow)
3199 ("python-pytz" ,python-pytz)
3200 ("python-six" ,python-six)
3201 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3202 ;; from 'gtk+') provides the required 'typelib' files used by
3203 ;; 'gobject-introspection'. The location of these files is set with the
3204 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3205 ;; is done automatically by a 'native-search-path' procedure. However,
3206 ;; at run-time the user must set this variable as follows:
3207 ;;
3208 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3209 ("gtk+" ,gtk+)
3210 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3211 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3212 ;; object. For this reason we need to import both libraries.
3213 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3214 ("python-pycairo" ,python-pycairo)
3215 ("python-cairocffi" ,python-cairocffi)))
3216 (inputs
3217 `(("libpng" ,libpng)
3218 ("imagemagick" ,imagemagick)
3219 ("freetype" ,freetype)
3220 ("cairo" ,cairo)
3221 ("glib" ,glib)
3222 ;; FIXME: Add backends when available.
3223 ;("python-wxpython" ,python-wxpython)
3224 ("python-pyqt" ,python-pyqt)
3225 ("tcl" ,tcl)
3226 ("tk" ,tk)))
3227 (native-inputs
3228 `(("pkg-config" ,pkg-config)
3229 ("python-nose" ,python-nose)
3230 ("python-mock" ,python-mock)))
3231 (arguments
3232 `(#:phases
3233 (modify-phases %standard-phases
3234 (add-before 'build 'configure-environment
3235 (lambda* (#:key outputs inputs #:allow-other-keys)
3236 (let ((cairo (assoc-ref inputs "cairo"))
3237 (gtk+ (assoc-ref inputs "gtk+")))
3238 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3239 ;; has not effect.
3240 (setenv "LD_LIBRARY_PATH"
3241 (string-append cairo "/lib:" gtk+ "/lib"))
3242 (setenv "HOME" (getcwd))
3243 (call-with-output-file "setup.cfg"
3244 (lambda (port)
3245 (format port "[directories]~%
3246 basedirlist = ~a,~a~%
3247 [rc_options]~%
3248 backend = TkAgg~%"
3249 (assoc-ref inputs "tcl")
3250 (assoc-ref inputs "tk")))))
3251 #t)))))
3252 (home-page "http://matplotlib.org")
3253 (synopsis "2D plotting library for Python")
3254 (description
3255 "Matplotlib is a Python 2D plotting library which produces publication
3256 quality figures in a variety of hardcopy formats and interactive environments
3257 across platforms. Matplotlib can be used in Python scripts, the python and
3258 ipython shell, web application servers, and six graphical user interface
3259 toolkits.")
3260 (license license:psfl)
3261 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3262
3263 (define-public python2-matplotlib
3264 (let ((matplotlib (package-with-python2
3265 (strip-python2-variant python-matplotlib))))
3266 (package (inherit matplotlib)
3267 ;; Make sure to use special packages for Python 2 instead
3268 ;; of those automatically rewritten by package-with-python2.
3269 (propagated-inputs
3270 `(("python2-pycairo" ,python2-pycairo)
3271 ("python2-functools32" ,python2-functools32)
3272 ("python2-pygobject-2" ,python2-pygobject-2)
3273 ("python2-subprocess32" ,python2-subprocess32)
3274 ("python2-tkinter" ,python-2 "tk")
3275 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3276 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3277
3278 (define-public python-matplotlib-documentation
3279 (package
3280 (name "python-matplotlib-documentation")
3281 (version (package-version python-matplotlib))
3282 (source (package-source python-matplotlib))
3283 (build-system python-build-system)
3284 (native-inputs
3285 `(("python-matplotlib" ,python-matplotlib)
3286 ("python-colorspacious" ,python-colorspacious)
3287 ("python-sphinx" ,python-sphinx)
3288 ("python-numpydoc" ,python-numpydoc)
3289 ("python-ipython" ,python-ipython)
3290 ("python-mock" ,python-mock)
3291 ("graphviz" ,graphviz)
3292 ("texlive" ,texlive)
3293 ("texinfo" ,texinfo)
3294 ,@(package-native-inputs python-matplotlib)))
3295 (arguments
3296 `(#:tests? #f ; we're only generating documentation
3297 #:phases
3298 (modify-phases %standard-phases
3299 (replace 'build
3300 (lambda _
3301 (chdir "doc")
3302 ;; Produce pdf in 'A4' format.
3303 (substitute* "conf.py"
3304 (("latex_paper_size = 'letter'") "")
3305 ;; latex_paper_size is deprecated -> set paper size using
3306 ;; latex_elements
3307 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3308 ;; insert at a point where latex_elements{} is defined:
3309 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3310 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3311 (replace 'install
3312 (lambda* (#:key inputs outputs #:allow-other-keys)
3313 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3314 (doc (string-append data "/doc/python-matplotlib-" ,version))
3315 (info (string-append data "/info"))
3316 (html (string-append doc "/html")))
3317 (mkdir-p html)
3318 (mkdir-p info)
3319 (copy-recursively "build/html" html)
3320 (symlink (string-append html "/_images")
3321 (string-append info "/matplotlib-figures"))
3322 (with-directory-excursion "build/texinfo"
3323 (substitute* "matplotlib.texi"
3324 (("@image\\{([^,]*)" all file)
3325 (string-append "@image{matplotlib-figures/" file)))
3326 (symlink (string-append html "/_images")
3327 "./matplotlib-figures")
3328 (system* "makeinfo" "--no-split"
3329 "-o" "matplotlib.info" "matplotlib.texi"))
3330 (copy-file "build/texinfo/matplotlib.info"
3331 (string-append info "/matplotlib.info"))
3332 (copy-file "build/latex/Matplotlib.pdf"
3333 (string-append doc "/Matplotlib.pdf")))
3334 #t)))))
3335 (home-page (package-home-page python-matplotlib))
3336 (synopsis "Documentation for the python-matplotlib package")
3337 (description (package-description python-matplotlib))
3338 (license (package-license python-matplotlib))))
3339
3340 (define-public python2-matplotlib-documentation
3341 (package-with-python2 python-matplotlib-documentation))
3342
3343 (define-public python2-pysnptools
3344 (package
3345 (name "python2-pysnptools")
3346 (version "0.3.9")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "pysnptools" version ".zip"))
3351 (sha256
3352 (base32
3353 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3354 (build-system python-build-system)
3355 (arguments
3356 `(#:python ,python-2)) ; only Python 2.7 is supported
3357 (propagated-inputs
3358 `(("python2-numpy" ,python2-numpy)
3359 ("python2-scipy" ,python2-scipy)
3360 ("python2-pandas" ,python2-pandas)))
3361 (native-inputs
3362 `(("python2-cython" ,python2-cython)))
3363 (native-inputs
3364 `(("unzip" ,unzip)))
3365 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3366 (synopsis "Library for reading and manipulating genetic data")
3367 (description
3368 "PySnpTools is a library for reading and manipulating genetic data. It
3369 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3370 those files. It can also efficiently manipulate ranges of integers using set
3371 operators such as union, intersection, and difference.")
3372 (license license:asl2.0)))
3373
3374 (define-public python-rpy2
3375 (package
3376 (name "python-rpy2")
3377 (version "2.9.0")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "rpy2" version))
3382 (sha256
3383 (base32
3384 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3385 (build-system python-build-system)
3386 (arguments
3387 '(#:modules ((ice-9 ftw)
3388 (srfi srfi-1)
3389 (srfi srfi-26)
3390 (guix build utils)
3391 (guix build python-build-system))
3392 #:phases
3393 (modify-phases %standard-phases
3394 ;; Without this phase the test loader cannot find the directories, in
3395 ;; which it is supposed to look for test files.
3396 (add-after 'unpack 'fix-tests
3397 (lambda* (#:key outputs #:allow-other-keys)
3398 (substitute* "rpy/tests.py"
3399 (("loader.discover\\(")
3400 "loader.discover(rpy_root + '/' +"))
3401 #t))
3402 (replace 'check
3403 (lambda* (#:key outputs inputs #:allow-other-keys)
3404 (let ((cwd (getcwd)))
3405 (setenv "PYTHONPATH"
3406 (string-append cwd "/build/"
3407 (find (cut string-prefix? "lib" <>)
3408 (scandir (string-append cwd "/build")))
3409 ":"
3410 (getenv "PYTHONPATH"))))
3411 ;; FIXME: Even when all tests pass, the check phase will fail.
3412 (system* "python" "-m" "rpy2.tests" "-v"))))))
3413 (propagated-inputs
3414 `(("python-six" ,python-six)
3415 ("python-jinja2" ,python-jinja2)
3416 ("python-pytz" ,python-pytz)))
3417 (inputs
3418 `(("readline" ,readline)
3419 ("icu4c" ,icu4c)
3420 ("pcre" ,pcre)
3421 ("r-minimal" ,r-minimal)
3422 ("r-survival" ,r-survival)
3423 ("r-ggplot2" ,r-ggplot2)
3424 ("r-rsqlite" ,r-rsqlite)
3425 ("r-dplyr" ,r-dplyr)
3426 ("r-dbplyr" ,r-dbplyr)
3427 ("python-numpy" ,python-numpy)))
3428 (native-inputs
3429 `(("zlib" ,zlib)))
3430 (home-page "http://rpy.sourceforge.net/")
3431 (synopsis "Python interface to the R language")
3432 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3433 low-level interface to R from Python, a proposed high-level interface,
3434 including wrappers to graphical libraries, as well as R-like structures and
3435 functions.")
3436 ;; Any of these licenses can be picked for the R interface. The whole
3437 ;; project is released under GPLv2+ according to the license declaration
3438 ;; in "setup.py".
3439 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3440
3441 (define-public python-scipy
3442 (package
3443 (name "python-scipy")
3444 (version "0.19.1")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "scipy" version))
3449 (sha256
3450 (base32
3451 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
3452 (build-system python-build-system)
3453 (propagated-inputs
3454 `(("python-numpy" ,python-numpy)
3455 ("python-matplotlib" ,python-matplotlib)
3456 ("python-pyparsing" ,python-pyparsing)))
3457 (inputs
3458 `(("lapack" ,lapack)
3459 ("openblas" ,openblas)))
3460 (native-inputs
3461 `(("python-cython" ,python-cython)
3462 ("python-nose" ,python-nose)
3463 ("python-sphinx" ,python-sphinx)
3464 ("python-numpydoc" ,python-numpydoc)
3465 ("gfortran" ,gfortran)
3466 ("perl" ,perl)))
3467 (outputs '("out" "doc"))
3468 (arguments
3469 `(#:phases
3470 (modify-phases %standard-phases
3471 (add-before 'build 'configure-openblas
3472 (lambda* (#:key inputs #:allow-other-keys)
3473 (call-with-output-file "site.cfg"
3474 (lambda (port)
3475 (format port
3476 "[blas]
3477 libraries = openblas
3478 library_dirs = ~a/lib
3479 include_dirs = ~a/include
3480
3481 # backslash-n to make emacs happy
3482 \n[atlas]
3483 library_dirs = ~a/lib
3484 atlas_libs = openblas
3485 "
3486 (assoc-ref inputs "openblas")
3487 (assoc-ref inputs "openblas")
3488 (assoc-ref inputs "openblas"))))
3489 #t))
3490 (add-after 'install 'install-doc
3491 (lambda* (#:key inputs outputs #:allow-other-keys)
3492 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3493 (doc (string-append data "/doc/" ,name "-" ,version))
3494 (html (string-append doc "/html"))
3495 (pyver ,(string-append "PYVER=")))
3496 ;; Make installed package available for building the
3497 ;; documentation
3498 (add-installed-pythonpath inputs outputs)
3499 (with-directory-excursion "doc"
3500 ;; Fix generation of images for mathematical expressions.
3501 (substitute* (find-files "source" "conf\\.py")
3502 (("pngmath_use_preview = True")
3503 "pngmath_use_preview = False"))
3504 (mkdir-p html)
3505 (system* "make" "html" pyver)
3506 (with-directory-excursion "build/html"
3507 (for-each (lambda (file)
3508 (let* ((dir (dirname file))
3509 (tgt-dir (string-append html "/" dir)))
3510 (install-file file html)))
3511 (find-files "." ".*")))))
3512 #t))
3513 (add-after 'unpack 'fix-tests
3514 (lambda _
3515 (substitute* "scipy/integrate/tests/test_quadpack.py"
3516 (("libm.so") "libm.so.6"))
3517 #t))
3518 ;; Tests can only be run after the library has been installed and not
3519 ;; within the source directory.
3520 (delete 'check)
3521 (add-after 'install 'check
3522 (lambda* (#:key inputs outputs #:allow-other-keys)
3523 (add-installed-pythonpath inputs outputs)
3524 (with-directory-excursion "/tmp"
3525 (zero? (system* "python" "-c"
3526 "import scipy; scipy.test('full')")))
3527 #t)))))
3528 (home-page "https://www.scipy.org/")
3529 (synopsis "The Scipy library provides efficient numerical routines")
3530 (description "The SciPy library is one of the core packages that make up
3531 the SciPy stack. It provides many user-friendly and efficient numerical
3532 routines such as routines for numerical integration and optimization.")
3533 (properties `((python2-variant . ,(delay python2-scipy))))
3534 (license license:bsd-3)))
3535
3536 (define-public python2-scipy
3537 (package-with-python2
3538 (strip-python2-variant python-scipy)))
3539
3540 (define-public python-socksipy-branch
3541 (package
3542 (name "python-socksipy-branch")
3543 (version "1.01")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "SocksiPy-branch" version))
3548 (sha256
3549 (base32
3550 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:tests? #f)) ; There are no tests
3554 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3555 (synopsis "Python SOCKS module")
3556 (description
3557 "SocksiPy - A Python SOCKS client module. It provides a
3558 socket-like interface that supports connections to any TCP
3559 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3560 The original version was developed by Dan Haim, this is a
3561 branch created by Mario Vilas to address some open issues,
3562 as the original project seems to have been abandoned circa 2007.")
3563 (license license:bsd-3)))
3564
3565 (define-public python2-socksipy-branch
3566 (package-with-python2 python-socksipy-branch))
3567
3568 (define-public python-pycodestyle
3569 (package
3570 (name "python-pycodestyle")
3571 (version "2.3.1")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (pypi-uri "pycodestyle" version))
3576 (sha256
3577 (base32
3578 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3579 (build-system python-build-system)
3580 (home-page "https://pycodestyle.readthedocs.io/")
3581 (synopsis "Python style guide checker")
3582 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3583 Python code against some of the style conventions in
3584 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3585 (license license:expat)))
3586
3587 (define-public python2-pycodestyle
3588 (package-with-python2 python-pycodestyle))
3589
3590 (define-public python-orderedmultidict
3591 (package
3592 (name "python-orderedmultidict")
3593 (version "0.7.11")
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (pypi-uri "orderedmultidict" version))
3598 (sha256
3599 (base32
3600 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3601 (build-system python-build-system)
3602 (arguments
3603 `(#:phases
3604 (modify-phases %standard-phases
3605 (add-after 'unpack 'fix-tests
3606 (lambda _
3607 ;; The package uses nosetest for running the tests.
3608 ;; Adding this initfile allows to run the test suite
3609 ;; without requiring nosetest.
3610 (zero? (system* "touch" "tests/__init__.py")))))))
3611 (propagated-inputs
3612 `(("python-six" ,python-six)))
3613 (native-inputs
3614 `(("python-pycodestyle" ,python-pycodestyle)))
3615 (home-page "https://github.com/gruns/orderedmultidict")
3616 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3617 (description "This package contains a library for ordered multivalue
3618 dictionaries. A multivalue dictionary is a dictionary that can store
3619 multiple values for the same key. An ordered multivalue dictionary is a
3620 multivalue dictionary that retains the order of insertions and deletions.")
3621 (license license:unlicense)))
3622
3623 (define-public python2-orderedmultidict
3624 (package-with-python2 python-orderedmultidict))
3625
3626 (define-public python-autopep8
3627 (package
3628 (name "python-autopep8")
3629 (version "1.3.2")
3630 (source
3631 (origin
3632 (method url-fetch)
3633 (uri (pypi-uri "autopep8" version))
3634 (sha256
3635 (base32
3636 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3637 (build-system python-build-system)
3638 (propagated-inputs
3639 `(("python-pycodestyle" ,python-pycodestyle)))
3640 (home-page "https://github.com/hhatto/autopep8")
3641 (synopsis "Format Python code according to the PEP 8 style guide")
3642 (description
3643 "@code{autopep8} automatically formats Python code to conform to
3644 the PEP 8 style guide. It uses the pycodestyle utility to determine
3645 what parts of the code needs to be formatted. @code{autopep8} is
3646 capable of fixing most of the formatting issues that can be reported
3647 by pycodestyle.")
3648 (license (license:non-copyleft
3649 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3650
3651 (define-public python2-autopep8
3652 (package-with-python2 python-autopep8))
3653
3654 (define-public python-distutils-extra
3655 (package
3656 (name "python-distutils-extra")
3657 (version "2.38")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3662 version "/+download/python-distutils-extra-"
3663 version ".tar.gz"))
3664 (sha256
3665 (base32
3666 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3667 (build-system python-build-system)
3668 (home-page "https://launchpad.net/python-distutils-extra/")
3669 (synopsis "Enhancements to Python's distutils")
3670 (description
3671 "The python-distutils-extra module enables you to easily integrate
3672 gettext support, themed icons, and scrollkeeper-based documentation into
3673 Python's distutils.")
3674 (license license:gpl2)))
3675
3676 (define-public python2-distutils-extra
3677 (package-with-python2 python-distutils-extra))
3678
3679 (define-public python2-elib.intl
3680 (package
3681 (name "python2-elib.intl")
3682 (version "0.0.3")
3683 (source
3684 (origin
3685 ;; This project doesn't tag releases or publish tarballs, so we take
3686 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3687 (method git-fetch)
3688 (uri (git-reference
3689 (url "https://github.com/dieterv/elib.intl.git")
3690 (commit "d09997cfef")))
3691 (sha256
3692 (base32
3693 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3694 (build-system python-build-system)
3695 (arguments
3696 ;; incompatible with Python 3 (exception syntax)
3697 `(#:python ,python-2
3698 #:tests? #f))
3699 (home-page "https://github.com/dieterv/elib.intl")
3700 (synopsis "Enhanced internationalization for Python")
3701 (description
3702 "The elib.intl module provides enhanced internationalization (I18N)
3703 services for your Python modules and applications.")
3704 (license license:lgpl3+)))
3705
3706 (define-public python-olefile
3707 (package
3708 (name "python-olefile")
3709 (version "0.44")
3710 (source
3711 (origin
3712 (method url-fetch)
3713 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3714 version ".tar.gz"))
3715 (file-name (string-append name "-" version ".tar.gz"))
3716 (sha256
3717 (base32
3718 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3719 (build-system python-build-system)
3720 (home-page
3721 "https://www.decalage.info/python/olefileio")
3722 (synopsis "Read and write Microsoft OLE2 files.")
3723 (description
3724 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3725 Storage or Compound Document, Microsoft Office). It is an improved version of
3726 the OleFileIO module from PIL, the Python Image Library.")
3727 (license license:bsd-3)))
3728
3729 (define-public python2-olefile
3730 (package-with-python2 python-olefile))
3731
3732 (define-public python-pillow
3733 (package
3734 (name "python-pillow")
3735 (version "4.3.0")
3736 (source
3737 (origin
3738 (method url-fetch)
3739 (uri (pypi-uri "Pillow" version))
3740 (sha256
3741 (base32
3742 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3743 (patch-flags '("-p1" "--binary"))
3744 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3745 (build-system python-build-system)
3746 (native-inputs
3747 `(("python-nose" ,python-nose)))
3748 (inputs
3749 `(("freetype" ,freetype)
3750 ("lcms" ,lcms)
3751 ("zlib" ,zlib)
3752 ("libjpeg" ,libjpeg)
3753 ("openjpeg" ,openjpeg)
3754 ("libtiff" ,libtiff)
3755 ("libwebp" ,libwebp)))
3756 (propagated-inputs
3757 `(("python-olefile" ,python-olefile)))
3758 (arguments
3759 `(#:phases (modify-phases %standard-phases
3760 (add-after
3761 'install 'check-installed
3762 (lambda* (#:key outputs inputs #:allow-other-keys)
3763 (begin
3764 (setenv "HOME" (getcwd))
3765 ;; Make installed package available for running the
3766 ;; tests
3767 (add-installed-pythonpath inputs outputs)
3768 (and (zero? (system* "python" "selftest.py"
3769 "--installed"))
3770 (zero? (system* "python" "test-installed.py"))))))
3771 (delete 'check))))
3772 (home-page "https://pypi.python.org/pypi/Pillow")
3773 (synopsis "Fork of the Python Imaging Library")
3774 (description
3775 "The Python Imaging Library adds image processing capabilities to your
3776 Python interpreter. This library provides extensive file format support, an
3777 efficient internal representation, and fairly powerful image processing
3778 capabilities. The core image library is designed for fast access to data
3779 stored in a few basic pixel formats. It should provide a solid foundation for
3780 a general image processing tool.")
3781 (license (license:x11-style
3782 "http://www.pythonware.com/products/pil/license.htm"
3783 "The PIL Software License"))))
3784
3785 (define-public python2-pillow
3786 (package-with-python2 python-pillow))
3787
3788 (define-public python-pycparser
3789 (package
3790 (name "python-pycparser")
3791 (version "2.17")
3792 (source
3793 (origin
3794 (method url-fetch)
3795 (uri (pypi-uri "pycparser" version))
3796 (sha256
3797 (base32
3798 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3799 (outputs '("out" "doc"))
3800 (build-system python-build-system)
3801 (native-inputs
3802 `(("pkg-config" ,pkg-config)))
3803 (arguments
3804 `(#:phases
3805 (modify-phases %standard-phases
3806 (replace 'check
3807 (lambda _
3808 (with-directory-excursion "tests"
3809 (zero? (system* "python" "all_tests.py")))))
3810 (add-after 'install 'install-doc
3811 (lambda* (#:key outputs #:allow-other-keys)
3812 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3813 (doc (string-append data "/doc/" ,name "-" ,version))
3814 (examples (string-append doc "/examples")))
3815 (mkdir-p examples)
3816 (for-each (lambda (file)
3817 (copy-file (string-append "." file)
3818 (string-append doc file)))
3819 '("/README.rst" "/CHANGES" "/LICENSE"))
3820 (copy-recursively "examples" examples)))))))
3821 (home-page "https://github.com/eliben/pycparser")
3822 (synopsis "C parser in Python")
3823 (description
3824 "Pycparser is a complete parser of the C language, written in pure Python
3825 using the PLY parsing library. It parses C code into an AST and can serve as
3826 a front-end for C compilers or analysis tools.")
3827 (license license:bsd-3)))
3828
3829 (define-public python2-pycparser
3830 (package-with-python2 python-pycparser))
3831
3832 (define-public python-xcffib
3833 (package
3834 (name "python-xcffib")
3835 (version "0.5.1")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "xcffib" version))
3840 (sha256
3841 (base32
3842 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
3843 (build-system python-build-system)
3844 (inputs
3845 `(("libxcb" ,libxcb)))
3846 (propagated-inputs
3847 `(("python-cffi" ,python-cffi) ; used at run time
3848 ("python-six" ,python-six)))
3849 (arguments
3850 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3851 #:tests? #f
3852 #:phases
3853 (modify-phases %standard-phases
3854 (add-after 'unpack 'fix-libxcb-path
3855 (lambda* (#:key inputs #:allow-other-keys)
3856 (let ((libxcb (assoc-ref inputs "libxcb")))
3857 (substitute* '("xcffib/__init__.py")
3858 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3859 #t)))
3860 (add-after 'install 'install-doc
3861 (lambda* (#:key outputs #:allow-other-keys)
3862 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3863 "/doc/" ,name "-" ,version)))
3864 (mkdir-p doc)
3865 (copy-file "README.md"
3866 (string-append doc "/README.md"))
3867 #t))))))
3868 (home-page "https://github.com/tych0/xcffib")
3869 (synopsis "XCB Python bindings")
3870 (description
3871 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3872 support for Python 3 and PyPy. It is based on cffi.")
3873 (license license:expat)))
3874
3875 (define-public python2-xcffib
3876 (package-with-python2 python-xcffib))
3877
3878 (define-public python-cairocffi
3879 (package
3880 (name "python-cairocffi")
3881 (version "0.8.0")
3882 (source
3883 (origin
3884 (method url-fetch)
3885 ;; The archive on pypi is missing the 'utils' directory!
3886 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
3887 version ".tar.gz"))
3888 (file-name (string-append name "-" version ".tar.gz"))
3889 (sha256
3890 (base32
3891 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
3892 (build-system python-build-system)
3893 (outputs '("out" "doc"))
3894 (inputs
3895 `(("gdk-pixbuf" ,gdk-pixbuf)
3896 ("cairo" ,cairo)))
3897 (native-inputs
3898 `(("pkg-config" ,pkg-config)
3899 ("python-sphinx" ,python-sphinx)
3900 ("python-docutils" ,python-docutils)))
3901 (propagated-inputs
3902 `(("python-xcffib" ,python-xcffib))) ; used at run time
3903 (arguments
3904 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
3905 #:tests? #f
3906 #:phases
3907 (modify-phases %standard-phases
3908 (add-after 'install 'install-doc
3909 (lambda* (#:key inputs outputs #:allow-other-keys)
3910 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3911 (doc (string-append data "/doc/" ,name "-" ,version))
3912 (html (string-append doc "/html")))
3913 (setenv "LD_LIBRARY_PATH"
3914 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3915 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3916 (setenv "LANG" "en_US.UTF-8")
3917 (mkdir-p html)
3918 (for-each (lambda (file)
3919 (copy-file (string-append "." file)
3920 (string-append doc file)))
3921 '("/README.rst" "/CHANGES" "/LICENSE"))
3922 (system* "python" "setup.py" "build_sphinx")
3923 (copy-recursively "docs/_build/html" html)
3924 #t))))))
3925 (home-page "https://github.com/Kozea/cairocffi")
3926 (synopsis "Python bindings and object-oriented API for Cairo")
3927 (description
3928 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3929 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3930 graphics library with support for multiple backends including image buffers,
3931 PNG, PostScript, PDF, and SVG file output.")
3932 (license license:bsd-3)))
3933
3934 (define-public python2-cairocffi
3935 (package-with-python2 python-cairocffi))
3936
3937 (define-public python-decorator
3938 (package
3939 (name "python-decorator")
3940 (version "4.1.2")
3941 (source
3942 (origin
3943 (method url-fetch)
3944 (uri (pypi-uri "decorator" version))
3945 (sha256
3946 (base32 "1d8npb11kxyi36mrvjdpcjij76l5zfyrz2f820brf0l0rcw4vdkw"))))
3947 (build-system python-build-system)
3948 (arguments '(#:tests? #f)) ; no test target
3949 (home-page "https://pypi.python.org/pypi/decorator/")
3950 (synopsis "Python module to simplify usage of decorators")
3951 (description
3952 "The aim of the decorator module is to simplify the usage of decorators
3953 for the average programmer, and to popularize decorators usage giving examples
3954 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3955 etc. The core of this module is a decorator factory.")
3956 (license license:expat)))
3957
3958 (define-public python2-decorator
3959 (package-with-python2 python-decorator))
3960
3961 (define-public python-drmaa
3962 (package
3963 (name "python-drmaa")
3964 (version "0.7.7")
3965 (source
3966 (origin
3967 (method url-fetch)
3968 (uri (pypi-uri "drmaa" version))
3969 (sha256
3970 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
3971 (build-system python-build-system)
3972 ;; The test suite requires libdrmaa which is provided by the cluster
3973 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3974 ;; should be set to the path of the libdrmaa library.
3975 (arguments '(#:tests? #f))
3976 (native-inputs
3977 `(("python-nose" ,python-nose)))
3978 (home-page "https://pypi.python.org/pypi/drmaa")
3979 (synopsis "Python bindings for the DRMAA library")
3980 (description
3981 "A Python package for Distributed Resource Management (DRM) job
3982 submission and control. This package is an implementation of the DRMAA 1.0
3983 Python language binding specification.")
3984 (license license:bsd-3)))
3985
3986 (define-public python2-drmaa
3987 (package-with-python2 python-drmaa))
3988
3989 (define-public python-grako
3990 (package
3991 (name "python-grako")
3992 (version "3.99.9")
3993 (source
3994 (origin
3995 (method url-fetch)
3996 (uri
3997 (pypi-uri "grako" version ".zip"))
3998 (sha256
3999 (base32
4000 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4001 (build-system python-build-system)
4002 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4003 (native-inputs
4004 `(("unzip" ,unzip)
4005 ("python-pytest" ,python-pytest-3.0)
4006 ("python-pytest-runner" ,python-pytest-runner)))
4007 (home-page "https://bitbucket.org/neogeny/grako")
4008 (synopsis "EBNF parser generator")
4009 (description
4010 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4011 memoizing PEG/Packrat parser in Python.")
4012 (license license:bsd-3)))
4013
4014 (define-public python2-grako
4015 (package-with-python2 python-grako))
4016
4017 (define-public python-gridmap
4018 (package
4019 (name "python-gridmap")
4020 (version "0.13.0")
4021 (source
4022 (origin
4023 (method url-fetch)
4024 (uri (string-append
4025 "https://github.com/pygridtools/gridmap/archive/v"
4026 version ".tar.gz"))
4027 (file-name (string-append name "-" version ".tar.gz"))
4028 (sha256
4029 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4030 (build-system python-build-system)
4031 (arguments
4032 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4033 (propagated-inputs
4034 `(("python-psutil" ,python-psutil)
4035 ("python-drmaa" ,python-drmaa)
4036 ("python-pyzmq" ,python-pyzmq)))
4037 (home-page "https://github.com/pygridtools/gridmap")
4038 (synopsis "Create jobs on a cluster directly from Python")
4039 (description
4040 "Gridmap is a Python package to allow you to easily create jobs on the
4041 cluster directly from Python. You can directly map Python functions onto the
4042 cluster without needing to write any wrapper code yourself.")
4043 (license license:gpl3+)))
4044
4045 (define-public python2-gridmap
4046 (package-with-python2 python-gridmap))
4047
4048 (define-public python-honcho
4049 (package
4050 (name "python-honcho")
4051 (version "1.0.1")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (string-append
4056 "https://github.com/nickstenning/honcho/archive/v"
4057 version ".tar.gz"))
4058 (file-name (string-append name "-" version ".tar.gz"))
4059 (sha256
4060 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4061 (build-system python-build-system)
4062 (native-inputs
4063 `(("python-pytest" ,python-pytest-3.0)
4064 ("python-mock" ,python-mock)
4065 ("python-tox" ,python-tox)
4066 ("which" ,which))) ;for tests
4067 (propagated-inputs
4068 `(("python-jinja2" ,python-jinja2)))
4069 (arguments
4070 `(#:phases
4071 (modify-phases %standard-phases
4072 (delete 'check)
4073 (add-after 'install 'check
4074 (lambda* (#:key outputs inputs #:allow-other-keys)
4075 ;; fix honcho path in testsuite
4076 (substitute* "tests/conftest.py"
4077 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4078 "/bin/honcho" "'")))
4079 ;; It's easier to run tests after install.
4080 ;; Make installed package available for running the tests
4081 (add-installed-pythonpath inputs outputs)
4082 (zero? (system* "py.test" "-v")))))))
4083 (home-page "https://github.com/nickstenning/honcho")
4084 (synopsis "Manage Procfile-based applications")
4085 (description
4086 "A Procfile is a file which describes how to run an application
4087 consisting of serveral processes. honcho starts all listed processes.
4088 The output of all running processes is collected by honcho and
4089 displayed.")
4090 (license license:expat)))
4091
4092 (define-public python2-honcho
4093 (package-with-python2 python-honcho))
4094
4095 (define-public python-pexpect
4096 (package
4097 (name "python-pexpect")
4098 (version "4.2.1")
4099 (source
4100 (origin
4101 (method url-fetch)
4102 (uri (pypi-uri "pexpect" version))
4103 (sha256
4104 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4105 (build-system python-build-system)
4106 (arguments
4107 `(#:phases
4108 (modify-phases %standard-phases
4109 (add-before 'check 'prepare-tests
4110 (lambda _
4111 (substitute* (find-files "tests")
4112 (("/bin/ls") (which "ls"))
4113 (("/bin/echo") (which "echo"))
4114 (("/bin/which") (which "which"))
4115 ;; Many tests try to use the /bin directory which
4116 ;; is not present in the build environment.
4117 ;; Use one that's non-empty and unlikely to change.
4118 (("/bin'") "/dev'"))
4119 ;; XXX: Socket connection test gets "Connection reset by peer".
4120 ;; Why does it not work? Delete for now.
4121 (delete-file "tests/test_socket.py")
4122 #t))
4123 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4124 (native-inputs
4125 `(("python-nose" ,python-nose)
4126 ("python-pytest" ,python-pytest-3.0)
4127 ("man-db" ,man-db)
4128 ("which" ,which)
4129 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4130 (propagated-inputs
4131 `(("python-ptyprocess" ,python-ptyprocess)))
4132 (home-page "http://pexpect.readthedocs.org/")
4133 (synopsis "Controlling interactive console applications")
4134 (description
4135 "Pexpect is a pure Python module for spawning child applications;
4136 controlling them; and responding to expected patterns in their output.
4137 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4138 child application and control it as if a human were typing commands.")
4139 (license license:isc)))
4140
4141 (define-public python2-pexpect
4142 (package-with-python2 python-pexpect))
4143
4144 (define-public python-setuptools-scm
4145 (package
4146 (name "python-setuptools-scm")
4147 (version "1.15.0")
4148 (source (origin
4149 (method url-fetch)
4150 (uri (pypi-uri "setuptools_scm" version))
4151 (sha256
4152 (base32
4153 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4154 (build-system python-build-system)
4155 (home-page "https://github.com/pypa/setuptools_scm/")
4156 (synopsis "Manage Python package versions in SCM metadata")
4157 (description
4158 "Setuptools_scm handles managing your Python package versions in
4159 @dfn{software configuration management} (SCM) metadata instead of declaring
4160 them as the version argument or in a SCM managed file.")
4161 (license license:expat)))
4162
4163 (define-public python2-setuptools-scm
4164 (package-with-python2 python-setuptools-scm))
4165
4166 (define-public python-pathpy
4167 (package
4168 (name "python-pathpy")
4169 (version "8.1.1")
4170 (source
4171 (origin
4172 (method url-fetch)
4173 (uri (string-append "https://pypi.python.org/packages/source/p/"
4174 "path.py/path.py-" version ".tar.gz"))
4175 (sha256
4176 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4177 (outputs '("out" "doc"))
4178 (build-system python-build-system)
4179 (propagated-inputs
4180 `(("python-appdirs" ,python-appdirs)))
4181 (native-inputs
4182 `(("python-setuptools-scm" ,python-setuptools-scm)
4183 ("python-sphinx" ,python-sphinx)
4184 ("python-rst.linker" ,python-rst.linker)
4185 ("python-pytest" ,python-pytest)
4186 ("python-pytest-runner" ,python-pytest-runner)))
4187 (arguments
4188 `(#:phases
4189 (modify-phases %standard-phases
4190 (add-after 'build 'build-doc
4191 (lambda _
4192 (setenv "LANG" "en_US.UTF-8")
4193 (zero? (system* "python" "setup.py" "build_sphinx"))))
4194 (add-after 'install 'install-doc
4195 (lambda* (#:key outputs #:allow-other-keys)
4196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4197 (doc (string-append data "/doc/" ,name "-" ,version))
4198 (html (string-append doc "/html")))
4199 (mkdir-p html)
4200 (for-each (lambda (file)
4201 (copy-file file (string-append doc "/" file)))
4202 '("README.rst" "CHANGES.rst"))
4203 (copy-recursively "build/sphinx/html" html)))))))
4204 (home-page "https://github.com/jaraco/path.py")
4205 (synopsis "Python module wrapper for built-in os.path")
4206 (description
4207 "@code{path.py} implements path objects as first-class entities, allowing
4208 common operations on files to be invoked on those path objects directly.")
4209 (license license:expat)))
4210
4211 (define-public python2-pathpy
4212 (package-with-python2 python-pathpy))
4213
4214 (define-public python-simplegeneric
4215 (package
4216 (name "python-simplegeneric")
4217 (version "0.8.1")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (string-append "https://pypi.python.org/packages/source/s/"
4222 "simplegeneric/simplegeneric-" version ".zip"))
4223 (sha256
4224 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4225 (build-system python-build-system)
4226 (native-inputs
4227 `(("unzip" ,unzip)))
4228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4229 (synopsis "Python module for simple generic functions")
4230 (description
4231 "The simplegeneric module lets you define simple single-dispatch generic
4232 functions, akin to Python’s built-in generic functions like @code{len()},
4233 @code{iter()} and so on. However, instead of using specially-named methods,
4234 these generic functions use simple lookup tables, akin to those used by
4235 e.g. @code{pickle.dump()} and other generic functions found in the Python
4236 standard library.")
4237 (license license:zpl2.1)))
4238
4239 (define-public python2-simplegeneric
4240 (package-with-python2 python-simplegeneric))
4241
4242 (define-public python-ipython-genutils
4243 ;; TODO: This package is retired, check if can be removed, see description.
4244 (package
4245 (name "python-ipython-genutils")
4246 (version "0.1.0")
4247 (source
4248 (origin
4249 (method url-fetch)
4250 (uri (string-append "https://pypi.python.org/packages/source/i/"
4251 "ipython_genutils/ipython_genutils-"
4252 version ".tar.gz"))
4253 (sha256
4254 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4255 (build-system python-build-system)
4256 (arguments `(#:tests? #f)) ; no tests
4257 (home-page "http://ipython.org")
4258 (synopsis "Vestigial utilities from IPython")
4259 (description
4260 "This package provides retired utilities from IPython. No packages
4261 outside IPython/Jupyter should depend on it.
4262
4263 This package shouldn't exist. It contains some common utilities shared by
4264 Jupyter and IPython projects during The Big Split. As soon as possible, those
4265 packages will remove their dependency on this, and this package will go
4266 away.")
4267 (license license:bsd-3)))
4268
4269 (define-public python2-ipython-genutils
4270 (package-with-python2 python-ipython-genutils))
4271
4272 (define-public python-traitlets
4273 (package
4274 (name "python-traitlets")
4275 (version "4.2.0")
4276 (source
4277 (origin
4278 (method url-fetch)
4279 (uri (pypi-uri "traitlets" version))
4280 (sha256
4281 (base32
4282 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4283 (build-system python-build-system)
4284 (arguments
4285 `(#:phases
4286 (modify-phases %standard-phases
4287 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4288 (propagated-inputs
4289 `(("python-ipython-genutils" ,python-ipython-genutils)
4290 ("python-decorator" ,python-decorator)))
4291 (native-inputs
4292 `(("python-mock" ,python-mock)
4293 ("python-nose" ,python-nose)))
4294 (home-page "http://ipython.org")
4295 (synopsis "Configuration system for Python applications")
4296 (description
4297 "Traitlets is a framework that lets Python classes have attributes with
4298 type checking, dynamically calculated default values, and ‘on change’
4299 callbacks. The package also includes a mechanism to use traitlets for
4300 configuration, loading values from files or from command line arguments. This
4301 is a distinct layer on top of traitlets, so you can use traitlets in your code
4302 without using the configuration machinery.")
4303 (license license:bsd-3)))
4304
4305 (define-public python2-traitlets
4306 (package-with-python2 python-traitlets))
4307
4308 (define-public python-jupyter-core
4309 (package
4310 (name "python-jupyter-core")
4311 (version "4.2.1")
4312 (source
4313 (origin
4314 (method url-fetch)
4315 (uri (string-append (pypi-uri "jupyter_core" version)))
4316 (sha256
4317 (base32
4318 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4319 (build-system python-build-system)
4320 ;; FIXME: not sure how to run the tests
4321 (arguments `(#:tests? #f))
4322 (propagated-inputs
4323 `(("python-traitlets" ,python-traitlets)))
4324 (home-page "http://jupyter.org/")
4325 (synopsis "Jupyter base package")
4326 (description
4327 "Jupyter core is the base package on which Jupyter projects rely.")
4328 (license license:bsd-3)))
4329
4330 (define-public python2-jupyter-core
4331 (package-with-python2 python-jupyter-core))
4332
4333 (define-public python-jupyter-client
4334 (package
4335 (name "python-jupyter-client")
4336 (version "4.4.0")
4337 (source
4338 (origin
4339 (method url-fetch)
4340 (uri (pypi-uri "jupyter_client" version))
4341 (sha256
4342 (base32
4343 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4344 (build-system python-build-system)
4345 ;; Tests fail because of missing native python kernel which I assume is
4346 ;; provided by the ipython package, which we cannot use because it would
4347 ;; cause a dependency cycle.
4348 (arguments `(#:tests? #f))
4349 (propagated-inputs
4350 `(("python-pyzmq" ,python-pyzmq)
4351 ("python-traitlets" ,python-traitlets)
4352 ("python-jupyter-core" ,python-jupyter-core)))
4353 (home-page "http://jupyter.org/")
4354 (synopsis "Jupyter protocol implementation and client libraries")
4355 (description
4356 "The @code{jupyter_client} package contains the reference implementation
4357 of the Jupyter protocol. It also provides client and kernel management APIs
4358 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4359 installing @code{kernelspec}s for use with Jupyter frontends.")
4360 (license license:bsd-3)))
4361
4362 (define-public python2-jupyter-client
4363 (package-with-python2 python-jupyter-client))
4364
4365 (define-public python-ipykernel
4366 (package
4367 (name "python-ipykernel")
4368 (version "4.5.2")
4369 (source
4370 (origin
4371 (method url-fetch)
4372 (uri (pypi-uri "ipykernel" version))
4373 (sha256
4374 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4375 (build-system python-build-system)
4376 ;; The tests load a submodule of IPython. However, IPython itself depends
4377 ;; on ipykernel.
4378 (arguments `(#:tests? #f))
4379 (propagated-inputs
4380 ;; imported at runtime during connect
4381 `(("python-jupyter-client" ,python-jupyter-client)))
4382 (home-page "http://ipython.org")
4383 (synopsis "IPython Kernel for Jupyter")
4384 (description
4385 "This package provides the IPython kernel for Jupyter.")
4386 (license license:bsd-3)))
4387
4388 (define-public python2-ipykernel
4389 (package-with-python2 python-ipykernel))
4390
4391 (define-public python-ipython
4392 (package
4393 (name "python-ipython")
4394 (version "5.3.0")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (pypi-uri "ipython" version ".tar.gz"))
4399 (sha256
4400 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
4401 (build-system python-build-system)
4402 (outputs '("out" "doc"))
4403 (propagated-inputs
4404 `(("python-pyzmq" ,python-pyzmq)
4405 ("python-prompt-toolkit" ,python-prompt-toolkit)
4406 ("python-terminado" ,python-terminado)
4407 ("python-matplotlib" ,python-matplotlib)
4408 ("python-numpy" ,python-numpy)
4409 ("python-numpydoc" ,python-numpydoc)
4410 ("python-jinja2" ,python-jinja2)
4411 ("python-jupyter-console"
4412 ;; The python-ipython and python-jupyter-console require each
4413 ;; other. To get the functionality in both packages working, strip
4414 ;; down the python-jupyter-console package when using it as an input
4415 ;; to python-ipython.
4416 ,python-jupyter-console-minimal)
4417 ("python-mistune" ,python-mistune)
4418 ("python-pexpect" ,python-pexpect)
4419 ("python-pickleshare" ,python-pickleshare)
4420 ("python-simplegeneric" ,python-simplegeneric)
4421 ("python-jsonschema" ,python-jsonschema)
4422 ("python-traitlets" ,python-traitlets)
4423 ("python-ipykernel" ,python-ipykernel)
4424 ("python-nbformat" ,python-nbformat)
4425 ("python-pygments" ,python-pygments)))
4426 (inputs
4427 `(("readline" ,readline)
4428 ("which" ,which)))
4429 (native-inputs
4430 `(("graphviz" ,graphviz)
4431 ("pkg-config" ,pkg-config)
4432 ("python-requests" ,python-requests) ;; for tests
4433 ("python-testpath" ,python-testpath)
4434 ("python-nose" ,python-nose)
4435 ("python-sphinx" ,python-sphinx)
4436 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4437 ;; FIXME: It's possible that a smaller union would work just as well.
4438 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4439 texlive-fonts-ec
4440 texlive-generic-ifxetex
4441 texlive-generic-pdftex
4442 texlive-latex-amsfonts
4443 texlive-latex-capt-of
4444 texlive-latex-cmap
4445 texlive-latex-environ
4446 texlive-latex-eqparbox
4447 texlive-latex-etoolbox
4448 texlive-latex-expdlist
4449 texlive-latex-fancyhdr
4450 texlive-latex-fancyvrb
4451 texlive-latex-fncychap
4452 texlive-latex-float
4453 texlive-latex-framed
4454 texlive-latex-geometry
4455 texlive-latex-graphics
4456 texlive-latex-hyperref
4457 texlive-latex-mdwtools
4458 texlive-latex-multirow
4459 texlive-latex-oberdiek
4460 texlive-latex-parskip
4461 texlive-latex-preview
4462 texlive-latex-tabulary
4463 texlive-latex-threeparttable
4464 texlive-latex-titlesec
4465 texlive-latex-trimspaces
4466 texlive-latex-ucs
4467 texlive-latex-upquote
4468 texlive-latex-url
4469 texlive-latex-varwidth
4470 texlive-latex-wrapfig)))
4471 ("texinfo" ,texinfo)))
4472 (arguments
4473 `(#:phases
4474 (modify-phases %standard-phases
4475 (add-after
4476 'install 'install-doc
4477 (lambda* (#:key inputs outputs #:allow-other-keys)
4478 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4479 (doc (string-append data "/doc/" ,name "-" ,version))
4480 (html (string-append doc "/html"))
4481 (man1 (string-append data "/man/man1"))
4482 (info (string-append data "/info"))
4483 (examples (string-append doc "/examples"))
4484 (python-arg (string-append "PYTHON=" (which "python"))))
4485 (setenv "LANG" "en_US.utf8")
4486 ;; Make installed package available for running the tests
4487 (add-installed-pythonpath inputs outputs)
4488 (with-directory-excursion "docs"
4489 ;; FIXME: pdf fails to build
4490 ;;(system* "make" "pdf" "PAPER=a4")
4491 (system* "make" python-arg "html")
4492 (system* "make" python-arg "info"))
4493 (copy-recursively "docs/man" man1)
4494 (copy-recursively "examples" examples)
4495 (copy-recursively "docs/build/html" html)
4496 ;; (copy-file "docs/build/latex/ipython.pdf"
4497 ;; (string-append doc "/ipython.pdf"))
4498 (mkdir-p info)
4499 (copy-file "docs/build/texinfo/ipython.info"
4500 (string-append info "/ipython.info"))
4501 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4502 ;; Tests can only be run after the library has been installed and not
4503 ;; within the source directory.
4504 (delete 'check)
4505 (add-after
4506 'install 'check
4507 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4508 (if tests?
4509 (with-directory-excursion "/tmp"
4510 ;; Make installed package available for running the tests
4511 (add-installed-pythonpath inputs outputs)
4512 (setenv "HOME" "/tmp/") ;; required by a test
4513 (zero? (system* (string-append (assoc-ref outputs "out")
4514 "/bin/iptest"))))
4515 #t)))
4516 (add-before
4517 'install 'fix-tests
4518 (lambda* (#:key inputs #:allow-other-keys)
4519 (substitute* "./IPython/utils/_process_posix.py"
4520 (("/usr/bin/env', 'which") (which "which")))
4521 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4522 (("#!/usr/bin/env python")
4523 (string-append "#!" (which "python"))))
4524 ;; Disable 1 failing test
4525 (substitute* "./IPython/core/tests/test_magic.py"
4526 (("def test_dirops\\(\\):" all)
4527 (string-append "@dec.skipif(True)\n" all))))))))
4528 (home-page "http://ipython.org")
4529 (synopsis "IPython is a tool for interactive computing in Python")
4530 (description
4531 "IPython provides a rich architecture for interactive computing with:
4532 Powerful interactive shells, a browser-based notebook, support for interactive
4533 data visualization, embeddable interpreters and tools for parallel
4534 computing.")
4535 (license license:bsd-3)
4536 (properties `((python2-variant . ,(delay python2-ipython))))))
4537
4538 (define-public python2-ipython
4539 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4540 (package
4541 (inherit ipython)
4542 ;; FIXME: add pyreadline once available.
4543 (propagated-inputs
4544 `(("python2-backports-shutil-get-terminal-size"
4545 ,python2-backports-shutil-get-terminal-size)
4546 ("python2-pathlib2" ,python2-pathlib2)
4547 ,@(package-propagated-inputs ipython)))
4548 (native-inputs
4549 `(("python2-mock" ,python2-mock)
4550 ,@(package-native-inputs ipython))))))
4551
4552 (define-public python-urwid
4553 (package
4554 (name "python-urwid")
4555 (version "1.3.1")
4556 (source
4557 (origin
4558 (method url-fetch)
4559 (uri (pypi-uri "urwid" version))
4560 (sha256
4561 (base32
4562 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4563 (build-system python-build-system)
4564 (arguments
4565 `(#:phases
4566 (modify-phases %standard-phases
4567 ;; Disable failing test. Bug filed upstream:
4568 ;; https://github.com/wardi/urwid/issues/164
4569 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4570 (add-after 'unpack 'disable-failing-test
4571 (lambda _
4572 (substitute* "urwid/tests/test_event_loops.py"
4573 (("test_remove_watch_file")
4574 "disable_remove_watch_file")))))))
4575 (home-page "http://urwid.org")
4576 (synopsis "Console user interface library for Python")
4577 (description
4578 "Urwid is a curses-based UI/widget library for Python. It includes many
4579 features useful for text console applications.")
4580 (license license:lgpl2.1+)))
4581
4582 (define-public python2-urwid
4583 (let ((python2-urwid (package-with-python2 python-urwid)))
4584 (package
4585 (inherit python2-urwid)
4586 (arguments
4587 (append
4588 `(;; Explicitly using Python 2 is necessary due the argument list being
4589 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4590 ;; package arguments, which by default assumes the use of Python 3.
4591 #:python ,python-2
4592 #:phases
4593 (modify-phases %standard-phases
4594 ;; Disable the vterm tests because of non-deterministic failures
4595 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4596 (add-after 'unpack 'delete-test_vterm.py
4597 (delete-file "urwid/tests/test_vterm.py"))))
4598 (package-arguments python-urwid))))))
4599
4600 (define-public python-urwidtrees
4601 (package
4602 (name "python-urwidtrees")
4603 (version "1.0.2")
4604 (source
4605 (origin
4606 (method url-fetch)
4607 ;; package author intends on distributing via github rather than pypi:
4608 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4609 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4610 version ".tar.gz"))
4611 (file-name (string-append name "-" version ".tar.gz"))
4612 (sha256
4613 (base32
4614 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4615 (build-system python-build-system)
4616 (arguments
4617 '(#:tests? #f)) ; no tests
4618 (propagated-inputs `(("python-urwid" ,python-urwid)))
4619 (home-page "https://github.com/pazz/urwidtrees")
4620 (synopsis "Tree widgets for urwid")
4621 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4622 toolkit. Use it to build trees of widgets.")
4623 (license license:gpl3+)))
4624
4625 (define-public python2-urwidtrees
4626 (package-with-python2 python-urwidtrees))
4627
4628 (define-public python-dbus
4629 (package
4630 (name "python-dbus")
4631 (version "1.2.0")
4632 (source
4633 (origin
4634 (method url-fetch)
4635 (uri (string-append
4636 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4637 version ".tar.gz"))
4638 (sha256
4639 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4640 (build-system gnu-build-system)
4641 (arguments
4642 '(#:phases
4643 (modify-phases %standard-phases
4644 (add-before
4645 'check 'pre-check
4646 (lambda _
4647 ;; XXX: For the missing '/etc/machine-id'.
4648 (substitute* "test/run-test.sh"
4649 (("DBUS_FATAL_WARNINGS=1")
4650 "DBUS_FATAL_WARNINGS=0"))
4651 #t)))))
4652 (native-inputs
4653 `(("pkg-config" ,pkg-config)))
4654 (inputs
4655 `(("python" ,python)
4656 ("dbus-glib" ,dbus-glib)))
4657 (synopsis "Python bindings for D-bus")
4658 (description "python-dbus provides bindings for libdbus, the reference
4659 implementation of D-Bus.")
4660 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4661 (license license:expat)))
4662
4663 (define-public python2-dbus
4664 (package (inherit python-dbus)
4665 (name "python2-dbus")
4666 (inputs `(("python" ,python-2)
4667 ,@(alist-delete "python"
4668 (package-inputs python-dbus)
4669 equal?)))
4670 ;; FIXME: on Python 2, the test_utf8 fails with:
4671 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4672 (arguments `(#:tests? #f))))
4673
4674 (define-public python-lxml
4675 (package
4676 (name "python-lxml")
4677 (version "3.8.0")
4678 (source
4679 (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "lxml" version))
4682 (sha256
4683 (base32
4684 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4685 (build-system python-build-system)
4686 (inputs
4687 `(("libxml2" ,libxml2)
4688 ("libxslt" ,libxslt)))
4689 (home-page "http://lxml.de/")
4690 (synopsis
4691 "Python XML processing library")
4692 (description
4693 "The lxml XML toolkit is a Pythonic binding for the C libraries
4694 libxml2 and libxslt.")
4695 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4696
4697 (define-public python2-lxml
4698 (package-with-python2 python-lxml))
4699
4700 ;; beautifulsoup4 has a totally different namespace than 3.x,
4701 ;; and pypi seems to put it under its own name, so I guess we should too
4702 (define-public python-beautifulsoup4
4703 (package
4704 (name "python-beautifulsoup4")
4705 (version "4.5.3")
4706 (source
4707 (origin
4708 (method url-fetch)
4709 (uri (pypi-uri "beautifulsoup4" version))
4710 (sha256
4711 (base32
4712 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4713 (build-system python-build-system)
4714 (arguments
4715 `(#:phases
4716 (modify-phases %standard-phases
4717 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4718 ;; must use this conversion script when building with Python 3. The
4719 ;; conversion script also runs the tests.
4720 ;; For more information, see the file 'convert-py3k' in the source
4721 ;; distribution.
4722 (replace 'check
4723 (lambda _ (zero? (system* "./convert-py3k")))))))
4724 (home-page
4725 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4726 (synopsis
4727 "Python screen-scraping library")
4728 (description
4729 "Beautiful Soup is a Python library designed for rapidly setting up
4730 screen-scraping projects. It offers Pythonic idioms for navigating,
4731 searching, and modifying a parse tree, providing a toolkit for
4732 dissecting a document and extracting what you need. It automatically
4733 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4734 (license license:expat)
4735 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4736
4737 (define-public python2-beautifulsoup4
4738 (package
4739 (inherit (package-with-python2
4740 (strip-python2-variant python-beautifulsoup4)))
4741 (arguments `(#:python ,python-2))))
4742
4743 (define-public python-netifaces
4744 (package
4745 (name "python-netifaces")
4746 (version "0.10.4")
4747 (source
4748 (origin
4749 (method url-fetch)
4750 (uri (string-append
4751 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4752 version
4753 ".tar.gz"))
4754 (sha256
4755 (base32
4756 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4757 (build-system python-build-system)
4758 (home-page
4759 "https://bitbucket.org/al45tair/netifaces")
4760 (synopsis
4761 "Python module for portable network interface information")
4762 (description
4763 "Netifaces is a Python module providing information on network
4764 interfaces in an easy and portable manner.")
4765 (license license:expat)))
4766
4767 (define-public python2-netifaces
4768 (package-with-python2 python-netifaces))
4769
4770 (define-public python-networkx
4771 (package
4772 (name "python-networkx")
4773 (version "1.11")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "networkx" version))
4778 (sha256
4779 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
4780 (build-system python-build-system)
4781 ;; python-decorator is needed at runtime
4782 (propagated-inputs
4783 `(("python-decorator" ,python-decorator)))
4784 (native-inputs
4785 `(("python-nose" ,python-nose)))
4786 (home-page "http://networkx.github.io/")
4787 (synopsis "Python module for creating and manipulating graphs and networks")
4788 (description
4789 "NetworkX is a Python package for the creation, manipulation, and study
4790 of the structure, dynamics, and functions of complex networks.")
4791 (license license:bsd-3)))
4792
4793 (define-public python2-networkx
4794 (package-with-python2 python-networkx))
4795
4796 ;; Define new package, because the current version of python-colormath does
4797 ;; not build against 2.0.
4798 (define-public python-networkx2
4799 (package (inherit python-networkx)
4800 (name "python-networkx2")
4801 (version "2.0")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (pypi-uri "networkx" version ".zip"))
4806 (sha256
4807 (base32
4808 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4809 (patches
4810 (search-patches "python-networkx2-reproducible-build.patch"))))))
4811
4812 (define-public python2-networkx2
4813 (package-with-python2 python-networkx2))
4814
4815 (define-public snakemake
4816 (package
4817 (name "snakemake")
4818 (version "4.2.0")
4819 (source
4820 (origin
4821 (method url-fetch)
4822 (uri (pypi-uri "snakemake" version))
4823 (sha256
4824 (base32 "0mgl44q152ws40zj2vicqark5szyd73vqy9pf26g6hk6dk0y0c79"))))
4825 (build-system python-build-system)
4826 (arguments
4827 ;; TODO: Package missing test dependencies.
4828 '(#:tests? #f
4829 #:phases
4830 (modify-phases %standard-phases
4831 ;; For cluster execution Snakemake will call Python. Since there is
4832 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4833 ;; this by calling the snakemake wrapper instead.
4834 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4835 (lambda* (#:key outputs #:allow-other-keys)
4836 (substitute* "snakemake/executors.py"
4837 (("\\{sys.executable\\} -m snakemake")
4838 (string-append (assoc-ref outputs "out")
4839 "/bin/snakemake")))
4840 #t)))))
4841 (propagated-inputs
4842 `(("python-wrapt" ,python-wrapt)
4843 ("python-requests" ,python-requests)
4844 ("python-appdirs" ,python-appdirs)
4845 ("python-configargparse" ,python-configargparse)
4846 ("python-pyyaml" ,python-pyyaml)
4847 ("python-ratelimiter" ,python-ratelimiter)))
4848 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
4849 (synopsis "Python-based execution environment for make-like workflows")
4850 (description
4851 "Snakemake aims to reduce the complexity of creating workflows by
4852 providing a clean and modern domain specific specification language (DSL) in
4853 Python style, together with a fast and comfortable execution environment.")
4854 (license license:expat)))
4855
4856 (define-public python-pyqrcode
4857 (package
4858 (name "python-pyqrcode")
4859 (version "1.2.1")
4860 (source
4861 (origin
4862 (method url-fetch)
4863 (uri (pypi-uri "PyQRCode" version))
4864 (sha256
4865 (base32
4866 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
4867 (build-system python-build-system)
4868 (home-page
4869 "https://github.com/mnooner256/pyqrcode")
4870 (synopsis "QR code generator")
4871 (description
4872 "Pyqrcode is a QR code generator written purely in Python with
4873 SVG, EPS, PNG and terminal output.")
4874 (license license:bsd-3)))
4875
4876 (define-public python-seaborn
4877 (package
4878 (name "python-seaborn")
4879 (version "0.7.1")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (pypi-uri "seaborn" version))
4884 (sha256
4885 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
4886 (build-system python-build-system)
4887 (arguments
4888 '(#:tests? #f)) ; Tests requires a running X11 server.
4889 (propagated-inputs
4890 `(("python-pandas" ,python-pandas)
4891 ("python-matplotlib" ,python-matplotlib)
4892 ("python-scipy" ,python-scipy)))
4893 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4894 (synopsis "Statistical data visualization")
4895 (description
4896 "Seaborn is a library for making attractive and informative statistical
4897 graphics in Python. It is built on top of matplotlib and tightly integrated
4898 with the PyData stack, including support for numpy and pandas data structures
4899 and statistical routines from scipy and statsmodels.")
4900 (license license:bsd-3)
4901 (properties `((python2-variant . ,(delay python2-seaborn))))))
4902
4903 (define-public python2-seaborn
4904 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4905 (package
4906 (inherit base)
4907 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4908 ,@(package-propagated-inputs base))))))
4909
4910 (define-public python-mpmath
4911 (package
4912 (name "python-mpmath")
4913 (version "0.19")
4914 (source (origin
4915 (method url-fetch)
4916 (uri (string-append "http://mpmath.org/files/mpmath-"
4917 version ".tar.gz"))
4918 (sha256
4919 (base32
4920 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
4921 (build-system python-build-system)
4922 (arguments
4923 '(#:phases
4924 (modify-phases %standard-phases
4925 (replace 'check
4926 (lambda _
4927 (zero?
4928 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
4929 (home-page "http://mpmath.org")
4930 (synopsis "Arbitrary-precision floating-point arithmetic in python")
4931 (description
4932 "@code{mpmath} can be used as an arbitrary-precision substitute for
4933 Python's float/complex types and math/cmath modules, but also does much
4934 more advanced mathematics.")
4935 (license license:bsd-3)))
4936
4937 (define-public python2-mpmath
4938 (package-with-python2 python-mpmath))
4939
4940 (define-public python-sympy
4941 (package
4942 (name "python-sympy")
4943 (version "1.1.1")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri (string-append
4948 "https://github.com/sympy/sympy/releases/download/sympy-"
4949 version "/sympy-" version ".tar.gz"))
4950 (sha256
4951 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
4952 (build-system python-build-system)
4953 (propagated-inputs
4954 `(("python-mpmath" ,python-mpmath)))
4955 (home-page "http://www.sympy.org/")
4956 (synopsis "Python library for symbolic mathematics")
4957 (description
4958 "SymPy is a Python library for symbolic mathematics. It aims to become a
4959 full-featured computer algebra system (CAS) while keeping the code as simple
4960 as possible in order to be comprehensible and easily extensible.")
4961 (license license:bsd-3)))
4962
4963 (define-public python2-sympy
4964 (package-with-python2 python-sympy))
4965
4966 (define-public python-q
4967 (package
4968 (name "python-q")
4969 (version "2.6")
4970 (source
4971 (origin
4972 (method url-fetch)
4973 (uri (pypi-uri "q" version))
4974 (sha256
4975 (base32
4976 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
4977 (build-system python-build-system)
4978 (home-page "https://github.com/zestyping/q")
4979 (synopsis "Quick-and-dirty debugging output for tired programmers")
4980 (description
4981 "q is a Python module for \"print\" style of debugging Python code. It
4982 provides convenient short API for print out of values, tracebacks, and
4983 falling into the Python interpreter.")
4984 (license license:asl2.0)))
4985
4986 (define-public python2-q
4987 (package-with-python2 python-q))
4988
4989 (define-public python2-xlib
4990 (package
4991 (name "python2-xlib")
4992 (version "0.14")
4993 (source (origin
4994 (method url-fetch)
4995 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
4996 "/" version "/"
4997 "python-xlib-" version ".tar.gz"))
4998 (sha256
4999 (base32
5000 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5001 (build-system python-build-system)
5002 (arguments
5003 `(#:python ,python-2 ;Python 2 only
5004 #:tests? #f)) ;no tests
5005 (home-page "http://python-xlib.sourceforge.net/")
5006 (synopsis "Python X11 client library")
5007 (description
5008 "The Python X Library is intended to be a fully functional X client
5009 library for Python programs. It is useful to implement low-level X clients.
5010 It is written entirely in Python.")
5011 (license license:gpl2+)))
5012
5013 (define-public python-singledispatch
5014 (package
5015 (name "python-singledispatch")
5016 (version "3.4.0.3")
5017 (source
5018 (origin
5019 (method url-fetch)
5020 (uri (pypi-uri "singledispatch" version))
5021 (sha256
5022 (base32
5023 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5024 (build-system python-build-system)
5025 (native-inputs
5026 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5027 (home-page
5028 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5029 (synopsis "Backport of singledispatch feature from Python 3.4")
5030 (description
5031 "This library brings functools.singledispatch from Python 3.4 to Python
5032 2.6-3.3.")
5033 (license license:expat)))
5034
5035 (define-public python2-singledispatch
5036 (package-with-python2 python-singledispatch))
5037
5038 ;; the python- version can be removed with python-3.5
5039 (define-public python-backports-abc
5040 (package
5041 (name "python-backports-abc")
5042 (version "0.5")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (pypi-uri "backports_abc" version))
5047 (sha256
5048 (base32
5049 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5050 (build-system python-build-system)
5051 (home-page "https://github.com/cython/backports_abc")
5052 (synopsis "Backport of additions to the 'collections.abc' module")
5053 (description
5054 "Python-backports-abc provides a backport of additions to the
5055 'collections.abc' module in Python-3.5.")
5056 (license license:psfl)))
5057
5058 (define-public python2-backports-abc
5059 (package-with-python2 python-backports-abc))
5060
5061 (define-public python-backports-csv
5062 (package
5063 (name "python-backports-csv")
5064 (version "1.0.5")
5065 (source
5066 (origin
5067 (method url-fetch)
5068 (uri (pypi-uri "backports.csv" version))
5069 (sha256
5070 (base32
5071 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5072 (build-system python-build-system)
5073 (home-page "https://github.com/ryanhiebert/backports.csv")
5074 (synopsis "Backport of Python 3's csv module for Python 2")
5075 (description
5076 "Provides a backport of Python 3's @code{csv} module for parsing
5077 comma separated values. The API of the @code{csv} module in Python 2
5078 is drastically different from the @code{csv} module in Python 3.
5079 This is due, for the most part, to the difference between str in
5080 Python 2 and Python 3.")
5081 (license license:psfl)))
5082
5083 (define-public python2-backports-csv
5084 (package-with-python2 python-backports-csv))
5085
5086 (define-public python2-backports-shutil-get-terminal-size
5087 (package
5088 (name "python2-backports-shutil-get-terminal-size")
5089 (version "1.0.0")
5090 (source
5091 (origin
5092 (method url-fetch)
5093 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5094 (sha256
5095 (base32
5096 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5097 (build-system python-build-system)
5098 (arguments
5099 `(#:python ,python-2
5100 #:phases
5101 (modify-phases %standard-phases
5102 (replace 'check
5103 (lambda _
5104 (zero? (system* "py.test" "-v")))))))
5105 (native-inputs
5106 `(("python2-pytest" ,python2-pytest)))
5107 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5108 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5109 (description
5110 "This package provides a backport of the @code{get_terminal_size
5111 function} from Python 3.3's @code{shutil}.
5112 Unlike the original version it is written in pure Python rather than C,
5113 so it might be a tiny bit slower.")
5114 (license license:expat)))
5115
5116 (define-public python-waf
5117 (package
5118 (name "python-waf")
5119 (version "1.9.8")
5120 (source (origin
5121 (method url-fetch)
5122 (uri (string-append "https://waf.io/"
5123 "waf-" version ".tar.bz2"))
5124 (sha256
5125 (base32
5126 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5127 (build-system python-build-system)
5128 (arguments
5129 '(#:phases
5130 (modify-phases %standard-phases
5131 (replace 'build
5132 (lambda _
5133 (zero? (system* "python" "waf-light" "configure" "build"))))
5134 (replace 'check
5135 (lambda _
5136 (zero? (system* "python" "waf" "--version"))))
5137 (replace 'install
5138 (lambda _
5139 (copy-file "waf" %output))))))
5140 (home-page "https://waf.io/")
5141 (synopsis "Python-based build system")
5142 (description
5143 "Waf is a Python-based framework for configuring, compiling and installing
5144 applications.")
5145 (license license:bsd-3)))
5146
5147 (define-public python2-waf
5148 (package-with-python2 python-waf))
5149
5150 (define-public python-pyzmq
5151 (package
5152 (name "python-pyzmq")
5153 (version "15.1.0")
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (pypi-uri "pyzmq" version))
5158 (sha256
5159 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5160 (build-system python-build-system)
5161 (arguments
5162 `(#:configure-flags
5163 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5164 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5165 ;; --inplace' for 'python setup.py test' to work.
5166 #:tests? #f))
5167 (inputs
5168 `(("zeromq" ,zeromq)))
5169 (native-inputs
5170 `(("pkg-config" ,pkg-config)
5171 ("python-nose" ,python-nose)))
5172 (home-page "https://github.com/zeromq/pyzmq")
5173 (synopsis "Python bindings for 0MQ")
5174 (description
5175 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5176 (license license:bsd-4)))
5177
5178 (define-public python2-pyzmq
5179 (package-with-python2 python-pyzmq))
5180
5181 (define-public python-pep8
5182 (package
5183 (name "python-pep8")
5184 (version "1.7.0")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (pypi-uri "pep8" version))
5189 (sha256
5190 (base32
5191 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5192 (build-system python-build-system)
5193 (home-page "http://pep8.readthedocs.org/")
5194 (synopsis "Python style guide checker")
5195 (description
5196 "This tools checks Python code against some of the style conventions in
5197 PEP 8.")
5198 (license license:expat)))
5199
5200 (define-public python2-pep8
5201 (package-with-python2 python-pep8))
5202
5203 (define-public python-pyflakes
5204 (package
5205 (name "python-pyflakes")
5206 (version "1.0.0")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "pyflakes" version))
5211 (sha256
5212 (base32
5213 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5214 (build-system python-build-system)
5215 (home-page
5216 "https://github.com/pyflakes/pyflakes")
5217 (synopsis "Passive checker of Python programs")
5218 (description
5219 "Pyflakes statically checks Python source code for common errors.")
5220 (license license:expat)))
5221
5222 (define-public python2-pyflakes
5223 (package-with-python2 python-pyflakes))
5224
5225 (define-public python-mccabe
5226 (package
5227 (name "python-mccabe")
5228 (version "0.4.0")
5229 (source
5230 (origin
5231 (method url-fetch)
5232 (uri (pypi-uri "mccabe" version))
5233 (sha256
5234 (base32
5235 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5236 (build-system python-build-system)
5237 (native-inputs
5238 `(("python-pytest" ,python-pytest)
5239 ("python-pytest-runner" ,python-pytest-runner)))
5240 (home-page "https://github.com/flintwork/mccabe")
5241 (synopsis "McCabe checker, plugin for flake8")
5242 (description
5243 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5244 complexity of Python source code.")
5245 (license license:expat)))
5246
5247 (define-public python2-mccabe
5248 (package-with-python2 python-mccabe))
5249
5250 (define-public python-mccabe-0.2.1
5251 (package (inherit python-mccabe)
5252 (version "0.2.1")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (pypi-uri "mccabe" version))
5257 (sha256
5258 (base32
5259 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5260
5261 (define-public python2-mccabe-0.2.1
5262 (package-with-python2 python-mccabe-0.2.1))
5263
5264 ;; Flake8 2.4.1 requires an older version of pep8.
5265 ;; This should be removed ASAP.
5266 (define-public python-pep8-1.5.7
5267 (package (inherit python-pep8)
5268 (version "1.5.7")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (string-append
5273 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5274 version
5275 ".tar.gz"))
5276 (sha256
5277 (base32
5278 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5279 (arguments
5280 ;; XXX Tests not compatible with Python 3.5.
5281 '(#:tests? #f))))
5282
5283 (define-public python2-pep8-1.5.7
5284 (package-with-python2 python-pep8-1.5.7))
5285
5286 ;; Flake8 2.4.1 requires an older version of pyflakes.
5287 ;; This should be removed ASAP.
5288 (define-public python-pyflakes-0.8.1
5289 (package (inherit python-pyflakes)
5290 (version "0.8.1")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (string-append
5295 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5296 version
5297 ".tar.gz"))
5298 (sha256
5299 (base32
5300 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5301 (arguments
5302 ;; XXX Tests not compatible with Python 3.5.
5303 '(#:tests? #f))))
5304
5305 (define-public python2-pyflakes-0.8.1
5306 (package-with-python2 python-pyflakes-0.8.1))
5307
5308 (define-public python-flake8
5309 (package
5310 (name "python-flake8")
5311 (version "2.5.4")
5312 (source
5313 (origin
5314 (method url-fetch)
5315 (uri (pypi-uri "flake8" version))
5316 (sha256
5317 (base32
5318 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5319 (modules '((guix build utils)))
5320 (snippet
5321 '(begin
5322 ;; Remove pre-compiled .pyc files from source.
5323 (for-each delete-file-recursively
5324 (find-files "." "__pycache__" #:directories? #t))
5325 (for-each delete-file (find-files "." "\\.pyc$"))
5326 #t))))
5327 (build-system python-build-system)
5328 (propagated-inputs
5329 `(("python-pep8" ,python-pep8)
5330 ("python-pyflakes" ,python-pyflakes)
5331 ("python-mccabe" ,python-mccabe)))
5332 (native-inputs
5333 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5334 ("python-nose" ,python-nose)))
5335 (home-page "https://gitlab.com/pycqa/flake8")
5336 (synopsis
5337 "The modular source code checker: pep8, pyflakes and co")
5338 (description
5339 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5340 (license license:expat)))
5341
5342 (define-public python2-flake8
5343 (package-with-python2 python-flake8))
5344
5345 (define-public python-flake8-polyfill
5346 (package
5347 (name "python-flake8-polyfill")
5348 (version "1.0.1")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "flake8-polyfill" version))
5353 (sha256
5354 (base32
5355 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
5356 (build-system python-build-system)
5357 (arguments
5358 '(#:phases
5359 (modify-phases %standard-phases
5360 (replace 'check
5361 (lambda _
5362 (setenv "PYTHONPATH"
5363 (string-append (getcwd) "/build/lib:"
5364 (getenv "PYTHONPATH")))
5365 (zero? (system* "py.test" "-v")))))))
5366 (native-inputs
5367 `(("python-flake8" ,python-flake8)
5368 ("python-mock" ,python-mock)
5369 ("python-pycodestyle" ,python-pycodestyle)
5370 ("python-pytest" ,python-pytest)))
5371 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5372 (synopsis "Polyfill package for Flake8 plugins")
5373 (description
5374 "This package that provides some compatibility helpers for Flake8
5375 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5376 (license license:expat)))
5377
5378 (define-public python2-flake8-polyfill
5379 (package-with-python2 python-flake8-polyfill))
5380
5381 (define-public python-mistune
5382 (package
5383 (name "python-mistune")
5384 (version "0.8.3")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (pypi-uri "mistune" version))
5389 (sha256
5390 (base32
5391 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5392 (build-system python-build-system)
5393 (native-inputs
5394 `(("python-nose" ,python-nose)
5395 ("python-cython" ,python-cython)))
5396 (home-page "https://github.com/lepture/mistune")
5397 (synopsis "Markdown parser in pure Python")
5398 (description "This package provides a fast markdown parser in pure
5399 Python.")
5400 (license license:bsd-3)))
5401
5402 (define-public python2-mistune
5403 (package-with-python2 python-mistune))
5404
5405 (define-public python-markdown
5406 (package
5407 (name "python-markdown")
5408 (version "2.6.8")
5409 (source
5410 (origin
5411 (method url-fetch)
5412 (uri (pypi-uri "Markdown" version))
5413 (sha256
5414 (base32
5415 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
5416 (build-system python-build-system)
5417 (arguments
5418 `(#:phases
5419 (modify-phases %standard-phases
5420 (replace 'check
5421 (lambda _
5422 (zero? (system* "python" "run-tests.py")))))))
5423 (native-inputs
5424 `(("python-nose" ,python-nose)
5425 ("python-pyyaml" ,python-pyyaml)))
5426 (home-page "https://pythonhosted.org/Markdown/")
5427 (synopsis "Python implementation of Markdown")
5428 (description
5429 "This package provides a Python implementation of John Gruber's
5430 Markdown. The library features international input, various Markdown
5431 extensions, and several HTML output formats. A command line wrapper
5432 markdown_py is also provided to convert Markdown files to HTML.")
5433 (license license:bsd-3)))
5434
5435 (define-public python2-markdown
5436 (package-with-python2 python-markdown))
5437
5438 (define-public python-ptyprocess
5439 (package
5440 (name "python-ptyprocess")
5441 (version "0.5.1")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (string-append
5446 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5447 version ".tar.gz"))
5448 (sha256
5449 (base32
5450 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
5451 (build-system python-build-system)
5452 (native-inputs
5453 `(("python-nose" ,python-nose)))
5454 (arguments
5455 `(#:phases
5456 (modify-phases %standard-phases
5457 (replace 'check
5458 (lambda _
5459 (zero? (system* "nosetests")))))))
5460 (home-page "https://github.com/pexpect/ptyprocess")
5461 (synopsis "Run a subprocess in a pseudo terminal")
5462 (description
5463 "This package provides a Python library used to launch a subprocess in a
5464 pseudo terminal (pty), and interact with both the process and its pty.")
5465 (license license:isc)))
5466
5467 (define-public python2-ptyprocess
5468 (package-with-python2 python-ptyprocess))
5469
5470 (define-public python-cram
5471 (package
5472 (name "python-cram")
5473 (version "0.7")
5474 (home-page "https://bitheap.org/cram/")
5475 (source (origin
5476 (method url-fetch)
5477 (uri (list (string-append home-page "cram-"
5478 version ".tar.gz")
5479 (pypi-uri "cram" version)))
5480 (sha256
5481 (base32
5482 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5483 (arguments
5484 '(#:phases
5485 (modify-phases %standard-phases
5486 (add-after 'unpack 'patch-source
5487 (lambda _
5488 (substitute* (find-files "cram" ".*\\.py$")
5489 ;; Replace default shell path.
5490 (("/bin/sh") (which "sh")))
5491 (substitute* (find-files "tests" ".*\\.t$")
5492 (("md5") "md5sum")
5493 (("/bin/bash") (which "bash"))
5494 (("/bin/sh") (which "sh")))
5495 (substitute* "cram/_test.py"
5496 ;; This hack works around a bug triggered by substituting
5497 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5498 ;; "cram -h", which breaks the output at 80 characters. This
5499 ;; causes the line showing the default shell to break into two
5500 ;; lines, but the test expects a single line...
5501 (("env\\['COLUMNS'\\] = '80'")
5502 "env['COLUMNS'] = '160'"))
5503 #t))
5504 (delete 'check)
5505 (add-after 'install 'check
5506 ;; The test phase uses the built library and executable.
5507 ;; It's easier to run it after install since the build
5508 ;; directory contains version-specific PATH.
5509 (lambda* (#:key inputs outputs #:allow-other-keys)
5510 (add-installed-pythonpath inputs outputs)
5511 (setenv "PATH" (string-append (getenv "PATH") ":"
5512 (assoc-ref outputs "out") "/bin"))
5513 (zero? (system* "make" "test")))))))
5514 (build-system python-build-system)
5515 (native-inputs
5516 `(("python-coverage" ,python-coverage)
5517 ("which" ,which)))
5518 (synopsis "Simple testing framework for command line applications")
5519 (description
5520 "Cram is a functional testing framework for command line applications.
5521 Cram tests look like snippets of interactive shell sessions. Cram runs each
5522 command and compares the command output in the test with the command’s actual
5523 output.")
5524 (license license:gpl2+)))
5525
5526 (define-public python2-cram
5527 (package-with-python2 python-cram))
5528
5529 (define-public python-straight-plugin
5530 (package
5531 (name "python-straight-plugin")
5532 (version "1.4.1")
5533 (source
5534 (origin
5535 (method url-fetch)
5536 (uri (pypi-uri "straight.plugin" version))
5537 (sha256
5538 (base32
5539 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5540 (build-system python-build-system)
5541 (home-page "https://github.com/ironfroggy/straight.plugin")
5542 (synopsis "Simple namespaced plugin facility")
5543 (description "Straight Plugin provides a type of plugin you can create from
5544 almost any existing Python modules, and an easy way for outside developers to
5545 add functionality and customization to your projects with their own plugins.")
5546 (license license:expat)))
5547
5548 (define-public python2-straight-plugin
5549 (package-with-python2 python-straight-plugin))
5550
5551 (define-public python-fonttools
5552 (package
5553 (name "python-fonttools")
5554 (version "3.15.1")
5555 (source (origin
5556 (method url-fetch)
5557 (uri (pypi-uri "fonttools" version ".zip"))
5558 (sha256
5559 (base32
5560 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5561 (build-system python-build-system)
5562 (arguments
5563 '(#:test-target "check"
5564 #:phases
5565 (modify-phases %standard-phases
5566 (add-after 'unpack 'patch-setuppy
5567 ;; Remove the undocumented "extra_path" argument, which adds an
5568 ;; intervening directories between site-packages and the package
5569 ;; directory.
5570 (lambda _
5571 (substitute* "setup.py"
5572 (("^[ \t]*extra_path *= *'FontTools',") ""))
5573 #t)))))
5574 (native-inputs
5575 `(("unzip" ,unzip)))
5576 (home-page "https://github.com/behdad/fonttools")
5577 (synopsis "Tools to manipulate font files")
5578 (description
5579 "FontTools/TTX is a library to manipulate font files from Python. It
5580 supports reading and writing of TrueType/OpenType fonts, reading and writing
5581 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5582 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5583 from an XML-based format.")
5584 (license (license:non-copyleft
5585 "file://LICENSE.txt"
5586 "See LICENSE.txt in the distribution."))))
5587
5588 (define-public python2-fonttools
5589 (package-with-python2 python-fonttools))
5590
5591 (define-public python-ly
5592 (package
5593 (name "python-ly")
5594 (version "0.9.4")
5595 (source
5596 (origin
5597 (method url-fetch)
5598 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5599 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5600 "/python-ly-" version ".tar.gz"))
5601 (sha256
5602 (base32
5603 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5604 (build-system python-build-system)
5605 (arguments
5606 ;; FIXME: Some tests need network access.
5607 '(#:tests? #f))
5608 (synopsis "Tool and library for manipulating LilyPond files")
5609 (description "This package provides a Python library to parse, manipulate
5610 or create documents in LilyPond format. A command line program ly is also
5611 provided that can be used to do various manipulations with LilyPond files.")
5612 (home-page "https://pypi.python.org/pypi/python-ly")
5613 (license license:gpl2+)))
5614
5615 (define-public python-appdirs
5616 (package
5617 (name "python-appdirs")
5618 (version "1.4.3")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (pypi-uri "appdirs" version))
5623 (sha256
5624 (base32
5625 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5626 (build-system python-build-system)
5627 (home-page "https://github.com/ActiveState/appdirs")
5628 (synopsis
5629 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5630 (description
5631 "This module provides a portable way of finding out where user data
5632 should be stored on various operating systems.")
5633 (license license:expat)))
5634
5635 (define-public python2-appdirs
5636 (package-with-python2 python-appdirs))
5637
5638 (define-public python-llfuse
5639 (package
5640 (name "python-llfuse")
5641 (version "1.2")
5642 (source (origin
5643 (method url-fetch)
5644 (uri (string-append
5645 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5646 "llfuse-" version ".tar.bz2"))
5647 (sha256
5648 (base32
5649 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
5650 (build-system python-build-system)
5651 (inputs
5652 `(("fuse" ,fuse)
5653 ("attr" ,attr)))
5654 (native-inputs
5655 `(("pkg-config" ,pkg-config)))
5656 (synopsis "Python bindings for FUSE")
5657 (description
5658 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5659 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5660 (license license:lgpl2.0+)
5661 (properties `((python2-variant . ,(delay python2-llfuse))))))
5662
5663 (define-public python2-llfuse
5664 (package (inherit (package-with-python2
5665 (strip-python2-variant python-llfuse)))
5666 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5667
5668 ;; For attic-0.16
5669 (define-public python-llfuse-0.41
5670 (package (inherit python-llfuse)
5671 (version "0.41.1")
5672 (source (origin
5673 (method url-fetch)
5674 (uri (string-append
5675 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5676 "llfuse-" version ".tar.bz2"))
5677 (sha256
5678 (base32
5679 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5680 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5681 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5682 (license (list license:expat license:lgpl2.0+))))
5683
5684 (define-public python-msgpack
5685 (package
5686 (name "python-msgpack")
5687 (version "0.4.8")
5688 (source (origin
5689 (method url-fetch)
5690 (uri (pypi-uri "msgpack-python" version))
5691 (sha256
5692 (base32
5693 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5694 (build-system python-build-system)
5695 (synopsis "MessagePack (de)serializer")
5696 (description "MessagePack is a fast, compact binary serialization format,
5697 suitable for similar data to JSON. This package provides CPython bindings for
5698 reading and writing MessagePack data.")
5699 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5700 (license license:asl2.0)))
5701
5702 (define-public python2-msgpack
5703 (package-with-python2 python-msgpack))
5704
5705 (define-public python-netaddr
5706 (package
5707 (name "python-netaddr")
5708 (version "0.7.19")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "netaddr" version))
5713 (sha256
5714 (base32
5715 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5716 (build-system python-build-system)
5717 (arguments `(#:tests? #f)) ;; No tests.
5718 (home-page "https://github.com/drkjam/netaddr/")
5719 (synopsis "Pythonic manipulation of network addresses")
5720 (description
5721 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5722 and MAC network addresses.")
5723 (license license:bsd-3)))
5724
5725 (define-public python2-netaddr
5726 (package-with-python2 python-netaddr))
5727
5728 (define-public python-wrapt
5729 (package
5730 (name "python-wrapt")
5731 (version "1.10.8")
5732 (source
5733 (origin
5734 (method url-fetch)
5735 (uri (pypi-uri "wrapt" version))
5736 (sha256
5737 (base32
5738 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
5739 (build-system python-build-system)
5740 (arguments
5741 ;; Tests are not included in the tarball, they are only available in the
5742 ;; git repository.
5743 `(#:tests? #f))
5744 (home-page "https://github.com/GrahamDumpleton/wrapt")
5745 (synopsis "Module for decorators, wrappers and monkey patching")
5746 (description
5747 "The aim of the wrapt module is to provide a transparent object proxy for
5748 Python, which can be used as the basis for the construction of function
5749 wrappers and decorator functions.")
5750 (license license:bsd-2)))
5751
5752 (define-public python2-wrapt
5753 (package-with-python2 python-wrapt))
5754
5755 (define-public python-xlrd
5756 (package
5757 (name "python-xlrd")
5758 (version "1.0.0")
5759 (source (origin
5760 (method url-fetch)
5761 (uri (pypi-uri "xlrd" version))
5762 (sha256
5763 (base32
5764 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5765 (build-system python-build-system)
5766 (arguments
5767 `(#:phases
5768 (modify-phases %standard-phases
5769 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
5770 ;; run tests instead for now.
5771 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5772 (native-inputs `(("python-nose" ,python-nose)))
5773 (home-page "http://www.python-excel.org/")
5774 (synopsis "Library for extracting data from Excel files")
5775 (description "This packages provides a library to extract data from
5776 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5777 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5778 Unicode-aware. It is not intended as an end-user tool.")
5779 (license license:bsd-3)))
5780
5781 (define-public python2-xlrd
5782 (package-with-python2 python-xlrd))
5783
5784 (define-public python-prettytable
5785 (package
5786 (name "python-prettytable")
5787 (version "0.7.2")
5788 (source
5789 (origin
5790 (method url-fetch)
5791 (uri (string-append
5792 "https://pypi.python.org/packages/source/P/PrettyTable/"
5793 "prettytable-" version ".tar.bz2"))
5794 (sha256
5795 (base32
5796 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5797 (build-system python-build-system)
5798 (home-page "http://code.google.com/p/prettytable/")
5799 (synopsis "Display tabular data in an ASCII table format")
5800 (description
5801 "A library designed to represent tabular data in visually appealing ASCII
5802 tables. PrettyTable allows for selection of which columns are to be printed,
5803 independent alignment of columns (left or right justified or centred) and
5804 printing of sub-tables by specifying a row range.")
5805 (license license:bsd-3)))
5806
5807 (define-public python2-prettytable
5808 (package-with-python2 python-prettytable))
5809
5810 (define-public python-tables
5811 (package
5812 (name "python-tables")
5813 (version "3.2.2")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (pypi-uri "tables" version))
5818 (sha256
5819 (base32
5820 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
5821 (modules '((guix build utils)))
5822 (snippet
5823 '(begin
5824 ;; Remove pre-compiled .pyc files from source.
5825 (for-each delete-file-recursively
5826 (find-files "." "__pycache__" #:directories? #t))
5827 (for-each delete-file (find-files "." "\\.pyc$"))
5828 #t))))
5829 (build-system python-build-system)
5830 (arguments
5831 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5832 ;; or "check", so we must override the build and check phases.
5833 #:phases
5834 (modify-phases %standard-phases
5835 (add-after 'unpack 'use-gcc
5836 (lambda _
5837 (substitute* "setup.py"
5838 (("compiler = new_compiler\\(\\)" line)
5839 (string-append line
5840 "\ncompiler.set_executables(compiler='gcc',"
5841 "compiler_so='gcc',"
5842 "linker_exe='gcc',"
5843 "linker_so='gcc -shared')")))
5844 #t))
5845 (replace 'build
5846 (lambda* (#:key inputs #:allow-other-keys)
5847 (zero? (system* "python" "setup.py" "build"
5848 (string-append "--hdf5="
5849 (assoc-ref inputs "hdf5"))))))
5850 (replace 'check
5851 (lambda* (#:key inputs #:allow-other-keys)
5852 (zero? (system* "python" "setup.py" "check"
5853 (string-append "--hdf5="
5854 (assoc-ref inputs "hdf5")))))))))
5855 (propagated-inputs
5856 `(("python-numexpr" ,python-numexpr)
5857 ("python-numpy" ,python-numpy)))
5858 (native-inputs
5859 `(("python-cython" ,python-cython)
5860 ("pkg-config" ,pkg-config)))
5861 (inputs
5862 `(("hdf5" ,hdf5)
5863 ("bzip2" ,bzip2)
5864 ("zlib" ,zlib)))
5865 (home-page "http://www.pytables.org/")
5866 (synopsis "Hierarchical datasets for Python")
5867 (description "PyTables is a package for managing hierarchical datasets and
5868 designed to efficiently cope with extremely large amounts of data.")
5869 (license license:bsd-3)))
5870
5871 (define-public python2-tables
5872 (package-with-python2 python-tables))
5873
5874 (define-public python-pyasn1
5875 (package
5876 (name "python-pyasn1")
5877 (version "0.2.3")
5878 (source
5879 (origin
5880 (method url-fetch)
5881 (uri (pypi-uri "pyasn1" version))
5882 (sha256
5883 (base32
5884 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
5885 (build-system python-build-system)
5886 (home-page "http://pyasn1.sourceforge.net/")
5887 (synopsis "ASN.1 types and codecs")
5888 (description
5889 "This is an implementation of ASN.1 types and codecs in Python. It is
5890 suitable for a wide range of protocols based on the ASN.1 specification.")
5891 (license license:bsd-2)))
5892
5893 (define-public python2-pyasn1
5894 (package-with-python2 python-pyasn1))
5895
5896 (define-public python-pyasn1-modules
5897 (package
5898 (name "python-pyasn1-modules")
5899 (version "0.0.8")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri "pyasn1-modules" version))
5904 (sha256
5905 (base32
5906 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5907 (build-system python-build-system)
5908 (propagated-inputs
5909 `(("python-pyasn1" ,python-pyasn1)))
5910 (home-page "https://sourceforge.net/projects/pyasn1/")
5911 (synopsis "ASN.1 codec implementations")
5912 (description
5913 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5914 implementations of ASN.1-based codecs and protocols.")
5915 (license license:bsd-3)))
5916
5917 (define-public python2-pyasn1-modules
5918 (package-with-python2 python-pyasn1-modules))
5919
5920 (define-public python-ipaddress
5921 (package
5922 (name "python-ipaddress")
5923 (version "1.0.18")
5924 (source (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "ipaddress" version))
5927 (sha256
5928 (base32
5929 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
5930 (build-system python-build-system)
5931 (home-page "https://github.com/phihag/ipaddress")
5932 (synopsis "IP address manipulation library")
5933 (description
5934 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5935 in Python. This library is used to create, poke at, and manipulate IPv4 and
5936 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5937 module to older versions of Python.")
5938 (license license:psfl)))
5939
5940 (define-public python2-ipaddress
5941 (package-with-python2 python-ipaddress))
5942
5943 (define-public python2-ipaddr
5944 (package
5945 (name "python2-ipaddr")
5946 (version "2.1.11")
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "ipaddr" version))
5951 (sha256
5952 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
5953 (build-system python-build-system)
5954 (arguments
5955 `(#:python ,python-2 ;version 2 only
5956 #:phases
5957 (modify-phases %standard-phases
5958 (replace 'check
5959 (lambda* _
5960 (zero? (system* "python" "ipaddr_test.py")))))))
5961 (home-page "https://github.com/google/ipaddr-py")
5962 (synopsis "IP address manipulation library")
5963 (description
5964 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
5965 IPv6 addresses and networks.
5966
5967 For new implementations you may prefer to use the standard module
5968 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
5969 versions of Python.")
5970 (license license:asl2.0)))
5971
5972 (define-public python-idna
5973 (package
5974 (name "python-idna")
5975 (version "2.5")
5976 (source
5977 (origin
5978 (method url-fetch)
5979 (uri (pypi-uri "idna" version))
5980 (sha256
5981 (base32
5982 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
5983 (build-system python-build-system)
5984 (home-page "https://github.com/kjd/idna")
5985 (synopsis "Internationalized domain names in applications")
5986 (description
5987 "This is a library to support the Internationalised Domain Names in
5988 Applications (IDNA) protocol as specified in RFC 5891. This version of the
5989 protocol is often referred to as “IDNA2008” and can produce different results
5990 from the earlier standard from 2003. The library is also intended to act as a
5991 suitable drop-in replacement for the “encodings.idna” module that comes with
5992 the Python standard library but currently only supports the older 2003
5993 specification.")
5994 (license license:bsd-4)))
5995
5996 (define-public python2-idna
5997 (package-with-python2 python-idna))
5998
5999 (define-public python-pretend
6000 (package
6001 (name "python-pretend")
6002 (version "1.0.8")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (string-append "https://pypi.python.org/packages/source/p/"
6007 "pretend/pretend-" version ".tar.gz"))
6008 (sha256
6009 (base32
6010 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6011 (build-system python-build-system)
6012 (home-page "https://github.com/alex/pretend")
6013 (synopsis "Library for stubbing in Python")
6014 (description
6015 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6016 technique for writing tests. You may hear the term mixed up with mocks,
6017 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6018 responses, rather than doing any computation.")
6019 (license license:bsd-3)))
6020
6021 (define-public python2-pretend
6022 (package-with-python2 python-pretend))
6023
6024 (define-public python-pip
6025 (package
6026 (name "python-pip")
6027 (version "9.0.1")
6028 (source
6029 (origin
6030 (method url-fetch)
6031 (uri (pypi-uri "pip" version))
6032 (sha256
6033 (base32
6034 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6035 (build-system python-build-system)
6036 (arguments
6037 '(#:tests? #f)) ; there are no tests in the pypi archive.
6038 (home-page "https://pip.pypa.io/")
6039 (synopsis "Package manager for Python software")
6040 (description
6041 "Pip is a package manager for Python software, that finds packages on the
6042 Python Package Index (PyPI).")
6043 (license license:expat)))
6044
6045 (define-public python2-pip
6046 (package-with-python2 python-pip))
6047
6048 (define-public python-tlsh
6049 (package
6050 (name "python-tlsh")
6051 (version "3.4.4")
6052 (home-page "https://github.com/trendmicro/tlsh")
6053 (source (origin
6054 (method url-fetch)
6055 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6056 version ".tar.gz"))
6057 (sha256
6058 (base32
6059 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6060 (file-name (string-append name "-" version ".tar.gz"))))
6061 (build-system cmake-build-system)
6062 (arguments
6063 '(#:out-of-source? #f
6064 #:phases (modify-phases %standard-phases
6065 (replace
6066 'install
6067 (lambda* (#:key outputs #:allow-other-keys)
6068 ;; Build and install the Python bindings. The underlying
6069 ;; C++ library is apparently not meant to be installed.
6070 (let ((out (assoc-ref outputs "out")))
6071 (with-directory-excursion "py_ext"
6072 (and (system* "python" "setup.py" "build")
6073 (system* "python" "setup.py" "install"
6074 (string-append "--prefix=" out))))))))))
6075 (inputs `(("python" ,python-wrapper))) ;for the bindings
6076 (synopsis "Fuzzy matching library for Python")
6077 (description
6078 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6079 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6080 value which can be used for similarity comparisons. Similar objects have
6081 similar hash values, which allows for the detection of similar objects by
6082 comparing their hash values. The byte stream should have a sufficient amount
6083 of complexity; for example, a byte stream of identical bytes will not generate
6084 a hash value.")
6085 (license license:asl2.0)))
6086
6087 (define-public python2-tlsh
6088 (package
6089 (inherit python-tlsh)
6090 (name "python2-tlsh")
6091 (inputs `(("python" ,python-2)))))
6092
6093 (define-public python-termcolor
6094 (package
6095 (name "python-termcolor")
6096 (version "1.1.0")
6097 (source
6098 (origin
6099 (method url-fetch)
6100 (uri (pypi-uri "termcolor" version))
6101 (sha256
6102 (base32
6103 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6104 (build-system python-build-system)
6105 (arguments
6106 ;; There are no tests.
6107 `(#:tests? #f))
6108 (home-page "https://pypi.python.org/pypi/termcolor")
6109 (synopsis "ANSII Color formatting for terminal output")
6110 (description
6111 "This package provides ANSII Color formatting for output in terminals.")
6112 (license license:expat)))
6113
6114 (define-public python2-termcolor
6115 (package-with-python2 python-termcolor))
6116
6117 (define-public python-libarchive-c
6118 (package
6119 (name "python-libarchive-c")
6120 (version "2.2")
6121 (source (origin
6122 (method url-fetch)
6123 (uri (pypi-uri "libarchive-c" version))
6124 (sha256
6125 (base32
6126 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6127 (build-system python-build-system)
6128 (arguments
6129 '(#:phases (modify-phases %standard-phases
6130 (add-before
6131 'build 'reference-libarchive
6132 (lambda* (#:key inputs #:allow-other-keys)
6133 ;; Retain the absolute file name of libarchive.so.
6134 (let ((libarchive (assoc-ref inputs "libarchive")))
6135 (substitute* "libarchive/ffi.py"
6136 (("find_library\\('archive'\\)")
6137 (string-append "'" libarchive
6138 "/lib/libarchive.so'")))))))))
6139 (inputs
6140 `(("libarchive" ,libarchive)))
6141 (home-page "https://github.com/Changaco/python-libarchive-c")
6142 (synopsis "Python interface to libarchive")
6143 (description
6144 "This package provides Python bindings to libarchive, a C library to
6145 access possibly compressed archives in many different formats. It uses
6146 Python's @code{ctypes} foreign function interface (FFI).")
6147 (license license:lgpl2.0+)))
6148
6149 (define-public python2-libarchive-c
6150 (package-with-python2 python-libarchive-c))
6151
6152 (define-public python-file
6153 (package
6154 (inherit file)
6155 (name "python-file")
6156 (build-system python-build-system)
6157 (arguments
6158 '(#:tests? #f ;no tests
6159 #:configure-flags '("--single-version-externally-managed" "--root=/")
6160 #:phases (modify-phases %standard-phases
6161 (add-before 'build 'change-directory
6162 (lambda _
6163 (chdir "python")
6164 #t))
6165 (add-before 'build 'set-library-file-name
6166 (lambda* (#:key inputs #:allow-other-keys)
6167 (let ((file (assoc-ref inputs "file")))
6168 (substitute* "magic.py"
6169 (("find_library\\('magic'\\)")
6170 (string-append "'" file "/lib/libmagic.so'")))
6171 #t))))))
6172 (inputs `(("file" ,file)))
6173 (self-native-input? #f)
6174 (synopsis "Python bindings to the libmagic file type guesser. Note that
6175 this module and the python-magic module both provide a \"magic.py\" file;
6176 these two modules, which are different and were developed separately, both
6177 serve the same purpose: provide Python bindings for libmagic.")))
6178
6179 (define-public python2-file
6180 (package-with-python2 python-file))
6181
6182 (define-public python-debian
6183 (package
6184 (name "python-debian")
6185 (version "0.1.28")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (pypi-uri name version))
6190 (sha256
6191 (base32
6192 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6193 (build-system python-build-system)
6194 (propagated-inputs
6195 `(("python-six" ,python-six)))
6196 (home-page "http://packages.debian.org/sid/python-debian")
6197 (synopsis "Debian package related modules")
6198 (description
6199 ;; XXX: Use @enumerate instead of @itemize to work around
6200 ;; <http://bugs.gnu.org/21772>.
6201 "This package provides Python modules that abstract many formats of
6202 Debian-related files, such as:
6203
6204 @enumerate
6205 @item Debtags information;
6206 @item @file{debian/changelog} files;
6207 @item packages files, pdiffs;
6208 @item control files of single or multiple RFC822-style paragraphs---e.g.
6209 @file{debian/control}, @file{.changes}, @file{.dsc};
6210 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6211 contained files and meta-information.
6212 @end enumerate\n")
6213
6214 ;; Modules are either GPLv2+ or GPLv3+.
6215 (license license:gpl3+)))
6216
6217 (define-public python2-debian
6218 (package-with-python2 python-debian))
6219
6220 (define-public python-nbformat
6221 (package
6222 (name "python-nbformat")
6223 (version "4.3.0")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "nbformat" version))
6228 (sha256
6229 (base32
6230 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
6231 (build-system python-build-system)
6232 (arguments `(#:tests? #f)) ; no test target
6233 (propagated-inputs
6234 `(("python-ipython-genutils" ,python-ipython-genutils)
6235 ("python-jsonschema" ,python-jsonschema)
6236 ("python-jupyter-core" ,python-jupyter-core)
6237 ("python-traitlets" ,python-traitlets)))
6238 (home-page "http://jupyter.org")
6239 (synopsis "Jupyter Notebook format")
6240 (description "This package provides the reference implementation of the
6241 Jupyter Notebook format and Python APIs for working with notebooks.")
6242 (license license:bsd-3)))
6243
6244 (define-public python2-nbformat
6245 (package-with-python2 python-nbformat))
6246
6247 (define-public python-bleach
6248 (package
6249 (name "python-bleach")
6250 (version "1.4.3")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "bleach" version))
6255 (sha256
6256 (base32
6257 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6258 (build-system python-build-system)
6259 (propagated-inputs
6260 `(("python-html5lib" ,python-html5lib-0.9)
6261 ("python-six" ,python-six)))
6262 (native-inputs
6263 `(("python-nose" ,python-nose)))
6264 (home-page "https://github.com/jsocol/bleach")
6265 (synopsis "Whitelist-based HTML-sanitizing tool")
6266 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6267 (license license:asl2.0)))
6268
6269 (define-public python2-bleach
6270 (package-with-python2 python-bleach))
6271
6272 (define-public python-entrypoints
6273 (package
6274 (name "python-entrypoints")
6275 (version "0.2.2")
6276 (source
6277 (origin
6278 (method url-fetch)
6279 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6280 version ".tar.gz"))
6281 (file-name (string-append name "-" version ".tar.gz"))
6282 (sha256
6283 (base32
6284 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6285 (build-system python-build-system)
6286 ;; The package does not come with a setup.py file, so we have to generate
6287 ;; one ourselves.
6288 (arguments
6289 `(#:tests? #f
6290 #:phases
6291 (modify-phases %standard-phases
6292 (add-after 'unpack 'create-setup.py
6293 (lambda _
6294 (call-with-output-file "setup.py"
6295 (lambda (port)
6296 (format port "\
6297 from setuptools import setup
6298 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6299 " ,version))))))))
6300 (home-page "https://github.com/takluyver/entrypoints")
6301 (synopsis "Discover and load entry points from installed Python packages")
6302 (description "Entry points are a way for Python packages to advertise
6303 objects with some common interface. The most common examples are
6304 @code{console_scripts} entry points, which define shell commands by
6305 identifying a Python function to run. The @code{entrypoints} module contains
6306 functions to find and load entry points.")
6307 (license license:expat)))
6308
6309 (define-public python2-entrypoints
6310 (package-with-python2 python-entrypoints))
6311
6312 (define-public python-nbconvert
6313 (package
6314 (name "python-nbconvert")
6315 (version "5.0.0b1")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "nbconvert" version))
6320 (sha256
6321 (base32
6322 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6323 (build-system python-build-system)
6324 (arguments
6325 `(;; The "bdist_egg" target is disabled by default, causing the installation
6326 ;; to fail.
6327 #:configure-flags (list "bdist_egg")
6328 ;; FIXME: 5 failures, 40 errors.
6329 #:tests? #f))
6330 ;; #:phases
6331 ;; (modify-phases %standard-phases
6332 ;; (replace 'check
6333 ;; (lambda _
6334 ;; (zero? (system* "py.test" "-v")))))
6335 (native-inputs
6336 `(("python-pytest" ,python-pytest)))
6337 (propagated-inputs
6338 `(("python-bleach" ,python-bleach)
6339 ("python-entrypoints" ,python-entrypoints)
6340 ("python-jinja2" ,python-jinja2)
6341 ("python-jupyter-core" ,python-jupyter-core)
6342 ("python-mistune" ,python-mistune)
6343 ("python-nbformat" ,python-nbformat)
6344 ("python-pygments" ,python-pygments)
6345 ("python-traitlets" ,python-traitlets)))
6346 (home-page "http://jupyter.org")
6347 (synopsis "Converting Jupyter Notebooks")
6348 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6349 notebooks to various other formats via Jinja templates. It allows you to
6350 convert an @code{.ipynb} notebook file into various static formats including:
6351
6352 @enumerate
6353 @item HTML
6354 @item LaTeX
6355 @item PDF
6356 @item Reveal JS
6357 @item Markdown (md)
6358 @item ReStructured Text (rst)
6359 @item executable script
6360 @end enumerate\n")
6361 (license license:bsd-3)))
6362
6363 (define-public python2-nbconvert
6364 (package-with-python2 python-nbconvert))
6365
6366 (define-public python-notebook
6367 (package
6368 (name "python-notebook")
6369 (version "4.2.3")
6370 (source (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "notebook" version))
6373 (sha256
6374 (base32
6375 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6376 (build-system python-build-system)
6377 (arguments
6378 `(#:phases
6379 (modify-phases %standard-phases
6380 (replace 'check
6381 (lambda _
6382 ;; HOME must be set for tests
6383 (setenv "HOME" "/tmp")
6384 (zero? (system* "nosetests")))))))
6385 (propagated-inputs
6386 `(("python-jupyter-core" ,python-jupyter-core)
6387 ("python-nbformat" ,python-nbformat)
6388 ("python-nbconvert" ,python-nbconvert)
6389 ("python-ipython" ,python-ipython)))
6390 (native-inputs
6391 `(("python-nose" ,python-nose)
6392 ("python-sphinx" ,python-sphinx)
6393 ("python-requests" ,python-requests)))
6394 (home-page "http://jupyter.org/")
6395 (synopsis "Web-based notebook environment for interactive computing")
6396 (description
6397 "The Jupyter HTML notebook is a web-based notebook environment for
6398 interactive computing.")
6399 (properties `((python2-variant . ,(delay python2-notebook))))
6400 (license license:bsd-3)))
6401
6402 (define-public python2-notebook
6403 (let ((base (package-with-python2
6404 (strip-python2-variant python-notebook))))
6405 (package (inherit base)
6406 (native-inputs
6407 `(("python2-mock" ,python2-mock)
6408 ,@(package-native-inputs base)))
6409 (arguments
6410 (substitute-keyword-arguments (package-arguments base)
6411 ((#:phases phases)
6412 `(modify-phases ,phases
6413 (add-before 'check 'disable-test-case
6414 ;; The test requires network access to localhost. Curiously it
6415 ;; fails with Python 2 only. Simply make the test-case return
6416 ;; immediately.
6417 (lambda _
6418 (substitute*
6419 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6420 (("formats = self.nbconvert_api") "return #")))))))))))
6421
6422 (define-public python-widgetsnbextension
6423 (package
6424 (name "python-widgetsnbextension")
6425 (version "1.2.6")
6426 (source
6427 (origin
6428 (method url-fetch)
6429 (uri (pypi-uri "widgetsnbextension" version))
6430 (sha256
6431 (base32
6432 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6433 (build-system python-build-system)
6434 (propagated-inputs
6435 `(("python-notebook" ,python-notebook)))
6436 (native-inputs
6437 `(("python-certifi" ,python-certifi)
6438 ("python-nose" ,python-nose)))
6439 (home-page "http://ipython.org")
6440 (synopsis "IPython HTML widgets for Jupyter")
6441 (description "This package provides interactive HTML widgets for Jupyter
6442 notebooks.")
6443 (license license:bsd-3)))
6444
6445 (define-public python2-widgetsnbextension
6446 (package-with-python2 python-widgetsnbextension))
6447
6448 (define-public python-ipywidgets
6449 (package
6450 (name "python-ipywidgets")
6451 (version "5.2.2")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "ipywidgets" version))
6456 (sha256
6457 (base32
6458 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6459 (build-system python-build-system)
6460 ;; FIXME: it's not clear how to run the tests.
6461 (arguments `(#:tests? #f))
6462 (propagated-inputs
6463 `(("python-ipykernel" ,python-ipykernel)
6464 ("python-ipython" ,python-ipython)
6465 ("python-traitlets" ,python-traitlets)
6466 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6467 (home-page "http://ipython.org")
6468 (synopsis "IPython HTML widgets for Jupyter")
6469 (description "Ipywidgets are interactive HTML widgets for Jupyter
6470 notebooks and the IPython kernel. Notebooks come alive when interactive
6471 widgets are used. Users gain control of their data and can visualize changes
6472 in the data.")
6473 (license license:bsd-3)))
6474
6475 (define-public python2-ipywidgets
6476 (package-with-python2 python-ipywidgets))
6477
6478 (define-public python-jupyter-console
6479 (package
6480 (name "python-jupyter-console")
6481 (version "5.0.0")
6482 (source
6483 (origin
6484 (method url-fetch)
6485 (uri (pypi-uri "jupyter_console" version))
6486 (sha256
6487 (base32
6488 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6489 (build-system python-build-system)
6490 ;; FIXME: it's not clear how to run the tests.
6491 (arguments `(#:tests? #f))
6492 (propagated-inputs
6493 `(("python-ipykernel" ,python-ipykernel)
6494 ("python-ipython" ,python-ipython)
6495 ("python-jupyter-client" ,python-jupyter-client)
6496 ("python-prompt-toolkit" ,python-prompt-toolkit)
6497 ("python-pygments" ,python-pygments)))
6498 (home-page "https://jupyter.org")
6499 (synopsis "Jupyter terminal console")
6500 (description "This package provides a terminal-based console frontend for
6501 Jupyter kernels. It also allows for console-based interaction with non-Python
6502 Jupyter kernels such as IJulia and IRKernel.")
6503 (license license:bsd-3)))
6504
6505 (define-public python2-jupyter-console
6506 (package-with-python2 python-jupyter-console))
6507
6508 ;; The python-ipython and python-jupyter-console require each other. To get
6509 ;; the functionality in both packages working, strip down the
6510 ;; python-jupyter-console package when using it as an input to python-ipython.
6511 (define python-jupyter-console-minimal
6512 (package
6513 (inherit python-jupyter-console)
6514 (name "python-jupyter-console-minimal")
6515 (arguments
6516 (substitute-keyword-arguments
6517 (package-arguments python-jupyter-console)
6518 ((#:phases phases)
6519 `(modify-phases ,phases
6520 (add-after 'install 'delete-bin
6521 (lambda* (#:key outputs #:allow-other-keys)
6522 ;; Delete the bin files, to avoid conflicts in profiles
6523 ;; where python-ipython and python-jupyter-console are
6524 ;; both present.
6525 (delete-file-recursively
6526 (string-append
6527 (assoc-ref outputs "out") "/bin"))))))))
6528 ;; Remove the python-ipython propagated input, to avoid the cycle
6529 (propagated-inputs
6530 (alist-delete
6531 "python-ipython"
6532 (package-propagated-inputs python-jupyter-console)))))
6533
6534 (define-public jupyter
6535 (package
6536 (name "jupyter")
6537 (version "1.0.0")
6538 (source
6539 (origin
6540 (method url-fetch)
6541 (uri (pypi-uri "jupyter" version))
6542 (sha256
6543 (base32
6544 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6545 (build-system python-build-system)
6546 ;; FIXME: it's not clear how to run the tests.
6547 (arguments `(#:tests? #f))
6548 (propagated-inputs
6549 `(("python-ipykernel" ,python-ipykernel)
6550 ("python-ipywidgets" ,python-ipywidgets)
6551 ("python-jupyter-console" ,python-jupyter-console)
6552 ("python-nbconvert" ,python-nbconvert)
6553 ("python-notebook" ,python-notebook)))
6554 (home-page "http://jupyter.org")
6555 (synopsis "Web application for interactive documents")
6556 (description
6557 "The Jupyter Notebook is a web application that allows you to create and
6558 share documents that contain live code, equations, visualizations and
6559 explanatory text. Uses include: data cleaning and transformation, numerical
6560 simulation, statistical modeling, machine learning and much more.")
6561 (license license:bsd-3)))
6562
6563 (define-public python-chardet
6564 (package
6565 (name "python-chardet")
6566 (version "3.0.4")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 (uri (pypi-uri "chardet" version))
6571 (sha256
6572 (base32
6573 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6574 (native-inputs
6575 `(("python-hypothesis" ,python-hypothesis)
6576 ("python-pytest" ,python-pytest)
6577 ("python-pytest-runner" ,python-pytest-runner)))
6578 (build-system python-build-system)
6579 (home-page "https://github.com/chardet/chardet")
6580 (synopsis "Universal encoding detector for Python 2 and 3")
6581 (description
6582 "This package provides @code{chardet}, a Python module that can
6583 automatically detect a wide range of file encodings.")
6584 (license license:lgpl2.1+)))
6585
6586 (define-public python2-chardet
6587 (package-with-python2 python-chardet))
6588
6589 (define-public python-docopt
6590 (package
6591 (name "python-docopt")
6592 (version "0.6.2")
6593 (source
6594 (origin
6595 (method url-fetch)
6596 ;; The release on PyPI does not include tests.
6597 (uri (string-append
6598 "https://github.com/docopt/docopt/archive/"
6599 version ".tar.gz"))
6600 (file-name (string-append name "-" version ".tar.gz"))
6601 (sha256
6602 (base32
6603 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6604 (build-system python-build-system)
6605 (native-inputs
6606 `(("python-pytest" ,python-pytest)))
6607 (arguments
6608 `(#:phases
6609 (modify-phases %standard-phases
6610 (replace 'check
6611 (lambda _ (zero? (system* "py.test")))))))
6612 (home-page "http://docopt.org")
6613 (synopsis "Command-line interface description language for Python")
6614 (description "This library allows the user to define a command-line
6615 interface from a program's help message rather than specifying it
6616 programatically with command-line parsers like @code{getopt} and
6617 @code{argparse}.")
6618 (license license:expat)))
6619
6620 (define-public python2-docopt
6621 (package-with-python2 python-docopt))
6622
6623 (define-public python-pythondialog
6624 (package
6625 (name "python-pythondialog")
6626 (version "3.4.0")
6627 (source
6628 (origin
6629 (method url-fetch)
6630 (uri (pypi-uri "pythondialog" version))
6631 (sha256
6632 (base32
6633 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6634 (build-system python-build-system)
6635 (arguments
6636 `(#:phases
6637 (modify-phases %standard-phases
6638 (add-after 'unpack 'patch-path
6639 (lambda* (#:key inputs #:allow-other-keys)
6640 (let* ((dialog (assoc-ref inputs "dialog")))
6641 ;; Since this library really wants to grovel the search path, we
6642 ;; must hardcode dialog's store path into it.
6643 (substitute* "dialog.py"
6644 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6645 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6646 #t))))
6647 #:tests? #f)) ; no test suite
6648 (propagated-inputs
6649 `(("dialog" ,dialog)))
6650 (home-page "http://pythondialog.sourceforge.net/")
6651 (synopsis "Python interface to the UNIX dialog utility")
6652 (description "A Python wrapper for the dialog utility. Its purpose is to
6653 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6654 This allows one to make simple text-mode user interfaces on Unix-like systems")
6655 (license license:lgpl2.1)
6656 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6657
6658 (define-public python2-pythondialog
6659 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6660 (package
6661 (inherit base)
6662 (version (package-version python-pythondialog))
6663 (source (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "python2-pythondialog" version))
6666 (sha256
6667 (base32
6668 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6669
6670 (define-public python-configobj
6671 (package
6672 (name "python-configobj")
6673 (version "5.0.6")
6674 (source (origin
6675 (method url-fetch)
6676 (uri (string-append
6677 "https://pypi.python.org/packages/source/c/configobj/"
6678 "configobj-" version ".tar.gz"))
6679 (sha256
6680 (base32
6681 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6682 ;; Patch setup.py so it looks for python-setuptools, which is
6683 ;; required to parse the keyword 'install_requires' in setup.py.
6684 (patches (search-patches "python-configobj-setuptools.patch"))))
6685 (build-system python-build-system)
6686 (propagated-inputs
6687 `(("python-six" ,python-six)))
6688 (synopsis "Config file reading, writing and validation")
6689 (description "ConfigObj is a simple but powerful config file reader and
6690 writer: an ini file round tripper. Its main feature is that it is very easy to
6691 use, with a straightforward programmer’s interface and a simple syntax for
6692 config files.")
6693 (home-page "https://github.com/DiffSK/configobj")
6694 (license license:bsd-3)))
6695
6696 (define-public python2-configobj
6697 (package-with-python2 python-configobj))
6698
6699 (define-public python-configargparse
6700 (package
6701 (name "python-configargparse")
6702 (version "0.12.0")
6703 (source (origin
6704 (method url-fetch)
6705 (uri (string-append
6706 "https://pypi.io/packages/source/C/ConfigArgParse/"
6707 "ConfigArgParse-" version ".tar.gz"))
6708 (sha256
6709 (base32
6710 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6711 (build-system python-build-system)
6712 (native-inputs
6713 `(("python-pyyaml" ,python-pyyaml)))
6714 (arguments
6715 `(#:phases
6716 (modify-phases %standard-phases
6717 (replace 'check
6718 (lambda _
6719 ;; Bypass setuptools-shim because one test relies on "setup.py"
6720 ;; being the first argument passed to the python call.
6721 ;;
6722 ;; NOTE: Many tests do not run because they rely on Python's
6723 ;; built-in test.test_argparse, but we remove the unit tests from
6724 ;; our Python installation.
6725 (zero? (system* "python" "setup.py" "test")))))))
6726 (synopsis "Replacement for argparse")
6727 (description "A drop-in replacement for argparse that allows options to also
6728 be set via config files and/or environment variables.")
6729 (home-page "https://github.com/bw2/ConfigArgParse")
6730 (license license:expat)))
6731
6732 (define-public python2-configargparse
6733 (package-with-python2 python-configargparse))
6734
6735 (define-public python-contextlib2
6736 (package
6737 (name "python-contextlib2")
6738 (version "0.4.0")
6739 (source
6740 (origin
6741 (method url-fetch)
6742 (uri (pypi-uri "contextlib2" version))
6743 (sha256
6744 (base32
6745 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6746 (build-system python-build-system)
6747 (arguments
6748 `(#:phases
6749 (modify-phases %standard-phases
6750 (replace 'check
6751 (lambda _ (zero?
6752 (system*
6753 "python" "test_contextlib2.py" "-v")))))))
6754 (home-page "http://contextlib2.readthedocs.org/")
6755 (synopsis "Tools for decorators and context managers")
6756 (description "This module is primarily a backport of the Python
6757 3.2 contextlib to earlier Python versions. Like contextlib, it
6758 provides utilities for common tasks involving decorators and context
6759 managers. It also contains additional features that are not part of
6760 the standard library.")
6761 (license license:psfl)))
6762
6763 (define-public python2-contextlib2
6764 (package-with-python2 python-contextlib2))
6765
6766 (define-public python-texttable
6767 (package
6768 (name "python-texttable")
6769 (version "0.8.7")
6770 (source
6771 (origin
6772 (method url-fetch)
6773 (uri (pypi-uri "texttable" version))
6774 (sha256
6775 (base32
6776 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
6777 (build-system python-build-system)
6778 (arguments '(#:tests? #f)) ; no tests
6779 (home-page "https://github.com/foutaise/texttable/")
6780 (synopsis "Python module for creating simple ASCII tables")
6781 (description "Texttable is a Python module for creating simple ASCII
6782 tables.")
6783 (license license:lgpl2.1+)))
6784
6785 (define-public python2-texttable
6786 (package-with-python2 python-texttable))
6787
6788 (define-public python-atomicwrites
6789 (package
6790 (name "python-atomicwrites")
6791 (version "1.1.5")
6792 (source (origin
6793 (method url-fetch)
6794 (uri (pypi-uri "atomicwrites" version))
6795 (sha256
6796 (base32
6797 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
6798 (build-system python-build-system)
6799 (synopsis "Atomic file writes in Python")
6800 (description "Library for atomic file writes using platform dependent tools
6801 for atomic file system operations.")
6802 (home-page "https://github.com/untitaker/python-atomicwrites")
6803 (license license:expat)))
6804
6805 (define-public python2-atomicwrites
6806 (package-with-python2 python-atomicwrites))
6807
6808 (define-public python-click-threading
6809 (package
6810 (name "python-click-threading")
6811 (version "0.4.4")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "click-threading" version))
6815 (sha256
6816 (base32
6817 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
6818 (build-system python-build-system)
6819 (propagated-inputs
6820 `(("python-click" ,python-click)))
6821 (synopsis "Utilities for multithreading in Click")
6822 (description "This package provides utilities for multithreading in Click
6823 applications.")
6824 (home-page "https://github.com/click-contrib/click-threading")
6825 (license license:expat)))
6826
6827 (define-public python-click-log
6828 (package
6829 (name "python-click-log")
6830 (version "0.2.1")
6831 (source (origin
6832 (method url-fetch)
6833 (uri (pypi-uri "click-log" version))
6834 (sha256
6835 (base32
6836 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
6837 (build-system python-build-system)
6838 (propagated-inputs
6839 `(("python-click" ,python-click)))
6840 (synopsis "Logging for click applications")
6841 (description "This package provides a Python library for logging Click
6842 applications.")
6843 (home-page "https://github.com/click-contrib/click-log")
6844 (license license:expat)))
6845
6846 (define-public python-apipkg
6847 (package
6848 (name "python-apipkg")
6849 (version "1.4")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (pypi-uri "apipkg" version))
6853 (sha256
6854 (base32
6855 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
6856 (build-system python-build-system)
6857 (native-inputs
6858 `(("python-pytest" ,python-pytest)))
6859 (synopsis "Namespace control and lazy-import mechanism")
6860 (description "With apipkg you can control the exported namespace of a Python
6861 package and greatly reduce the number of imports for your users. It is a small
6862 pure Python module that works on virtually all Python versions.")
6863 (home-page "https://bitbucket.org/hpk42/apipkg")
6864 (license license:expat)))
6865
6866 (define-public python2-apipkg
6867 (package-with-python2 python-apipkg))
6868
6869 (define-public python-execnet
6870 (package
6871 (name "python-execnet")
6872 (version "1.4.1")
6873 (source (origin
6874 (method url-fetch)
6875 (uri (pypi-uri "execnet" version))
6876 (sha256
6877 (base32
6878 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
6879 (build-system python-build-system)
6880 (arguments
6881 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
6882 ;; The two test failures are caused by the lack of an `ssh` executable.
6883 ;; The test suite can be run with pytest after the 'install' phase.
6884 #:tests? #f))
6885 (native-inputs
6886 `(("python-pytest" ,python-pytest)
6887 ("python-setuptools-scm" ,python-setuptools-scm)))
6888 (propagated-inputs
6889 `(("python-apipkg" ,python-apipkg)))
6890 (synopsis "Rapid multi-Python deployment")
6891 (description "Execnet provides a share-nothing model with
6892 channel-send/receive communication for distributing execution across many
6893 Python interpreters across version, platform and network barriers. It has a
6894 minimal and fast API targeting the following uses:
6895 @enumerate
6896 @item distribute tasks to (many) local or remote CPUs
6897 @item write and deploy hybrid multi-process applications
6898 @item write scripts to administer multiple environments
6899 @end enumerate")
6900 (home-page "http://codespeak.net/execnet/")
6901 (license license:expat)))
6902
6903 (define-public python2-execnet
6904 (package-with-python2 python-execnet))
6905
6906 (define-public python-icalendar
6907 (package
6908 (name "python-icalendar")
6909 (version "4.0.0")
6910 (source (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "icalendar" version))
6913 (sha256
6914 (base32
6915 "0jfp93x2pnpsbck92zw22dq7sl4pk0avv0gnb4x9vldrg6vlhyin"))))
6916 (build-system python-build-system)
6917 (propagated-inputs
6918 `(("python-dateutil" ,python-dateutil)
6919 ("python-pytz" ,python-pytz)))
6920 (synopsis "Python library for parsing iCalendar files")
6921 (description "The icalendar package is a parser/generator of iCalendar
6922 files for use with Python.")
6923 (home-page "https://github.com/collective/icalendar")
6924 (license license:bsd-2)))
6925
6926 (define-public python-sphinxcontrib-newsfeed
6927 (package
6928 (name "python-sphinxcontrib-newsfeed")
6929 (version "0.1.4")
6930 (source (origin
6931 (method url-fetch)
6932 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
6933 (sha256
6934 (base32
6935 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
6936 (arguments '(#:tests? #f)) ; No tests.
6937 (build-system python-build-system)
6938 (propagated-inputs
6939 `(("python-sphinx" ,python-sphinx)))
6940 (synopsis "News Feed extension for Sphinx")
6941 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
6942 Blog, News or Announcements section to a Sphinx website.")
6943 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
6944 (license license:bsd-2)))
6945
6946 (define-public python-args
6947 (package
6948 (name "python-args")
6949 (version "0.1.0")
6950 (source (origin
6951 (method url-fetch)
6952 (uri (pypi-uri "args" version))
6953 (sha256
6954 (base32
6955 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
6956 (build-system python-build-system)
6957 (home-page "https://github.com/kennethreitz/args")
6958 (synopsis "Command-line argument parser")
6959 (description
6960 "This library provides a Python module to parse command-line arguments.")
6961 (license license:bsd-3)))
6962
6963 (define-public python2-args
6964 (package-with-python2 python-args))
6965
6966 (define-public python-clint
6967 (package
6968 (name "python-clint")
6969 (version "0.5.1")
6970 (source (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "clint" version))
6973 (sha256
6974 (base32
6975 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
6976 (build-system python-build-system)
6977 (arguments
6978 '(#:phases
6979 (modify-phases %standard-phases
6980 (replace 'check
6981 (lambda _
6982 (zero? (system* "py.test" "-v")))))))
6983 (native-inputs
6984 `(("python-pytest" ,python-pytest)))
6985 (propagated-inputs
6986 `(("python-args" ,python-args)))
6987 (home-page "https://github.com/kennethreitz/clint")
6988 (synopsis "Command-line interface tools")
6989 (description
6990 "Clint is a Python module filled with a set of tools for developing
6991 command-line applications, including tools for colored and indented
6992 output, progress bar display, and pipes.")
6993 (license license:isc)))
6994
6995 (define-public python2-clint
6996 (package-with-python2 python-clint))
6997
6998 (define-public python-astor
6999 (package
7000 (name "python-astor")
7001 (version "0.5")
7002 (source (origin
7003 (method url-fetch)
7004 (uri (pypi-uri "astor" version))
7005 (sha256
7006 (base32
7007 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7008 (build-system python-build-system)
7009 (home-page "https://github.com/berkerpeksag/astor")
7010 (synopsis "Read and write Python ASTs")
7011 (description
7012 "Astor is designed to allow easy manipulation of Python source via the
7013 Abstract Syntax Tree.")
7014 (license license:bsd-3)))
7015
7016 (define-public python2-astor
7017 (package-with-python2 python-astor))
7018
7019 (define-public python-rply
7020 (package
7021 (name "python-rply")
7022 (version "0.7.4")
7023 (source (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "rply" version))
7026 (sha256
7027 (base32
7028 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7029 (build-system python-build-system)
7030 (propagated-inputs
7031 `(("python-appdirs" ,python-appdirs)))
7032 (home-page "https://github.com/alex/rply")
7033 (synopsis "Parser generator for Python")
7034 (description
7035 "This package provides a pure Python based parser generator, that also
7036 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7037 with a new public API, and RPython support.")
7038 (license license:bsd-3)))
7039
7040 (define-public python2-rply
7041 (package-with-python2 python-rply))
7042
7043 (define-public python-hy
7044 (package
7045 (name "python-hy")
7046 (version "0.13.0")
7047 (source (origin
7048 (method url-fetch)
7049 (uri (pypi-uri "hy" version))
7050 (sha256
7051 (base32
7052 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7053 (build-system python-build-system)
7054 (arguments
7055 '(#:phases
7056 (modify-phases %standard-phases
7057 (replace 'check
7058 (lambda _
7059 ;; Tests require write access to HOME.
7060 (setenv "HOME" "/tmp")
7061 (zero? (system* "nosetests")))))))
7062 (native-inputs
7063 `(("python-coverage" ,python-coverage)
7064 ("python-nose" ,python-nose)))
7065 (propagated-inputs
7066 `(("python-astor" ,python-astor)
7067 ("python-clint" ,python-clint)
7068 ("python-rply" ,python-rply)))
7069 (home-page "http://hylang.org/")
7070 (synopsis "Lisp frontend to Python")
7071 (description
7072 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7073 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7074 Python at your fingertips, in Lisp form.")
7075 (license license:expat)))
7076
7077 (define-public python2-hy
7078 (package-with-python2 python-hy))
7079
7080 (define-public python2-functools32
7081 (package
7082 (name "python2-functools32")
7083 (version "3.2.3-2")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (pypi-uri "functools32" version))
7088 (sha256
7089 (base32
7090 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7091 (build-system python-build-system)
7092 (arguments
7093 `(#:python ,python-2
7094 #:tests? #f)) ; no test target
7095 (home-page "https://github.com/MiCHiLU/python-functools32")
7096 (synopsis
7097 "Backport of the functools module from Python 3.2.3")
7098 (description
7099 "This package is a backport of the @code{functools} module from Python
7100 3.2.3 for use with older versions of Python and PyPy.")
7101 (license license:expat)))
7102
7103 (define-public python2-subprocess32
7104 (package
7105 (name "python2-subprocess32")
7106 (version "3.2.7")
7107 (source (origin
7108 (method url-fetch)
7109 (uri (pypi-uri "subprocess32" version))
7110 (sha256
7111 (base32
7112 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7113 (patches
7114 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7115 (build-system python-build-system)
7116 (arguments
7117 `(#:python ,python-2
7118 #:phases
7119 (modify-phases %standard-phases
7120 (add-after 'unpack 'patch-/bin/sh
7121 (lambda _
7122 (substitute* '("subprocess32.py"
7123 "test_subprocess32.py")
7124 (("/bin/sh") (which "sh")))
7125 #t))
7126 (delete 'check)
7127 (add-after 'install 'check
7128 (lambda* (#:key inputs outputs #:allow-other-keys)
7129 ;; For some reason this package fails to import
7130 ;; _posixsubprocess.so when PYTHONPATH is set to the build
7131 ;; directory. Running tests after install is easier.
7132 (add-installed-pythonpath inputs outputs)
7133 (zero? (system* "python" "test_subprocess32.py")))))))
7134 (home-page "https://github.com/google/python-subprocess32")
7135 (synopsis "Backport of the subprocess module from Python 3.2")
7136 (description
7137 "This is a backport of the @code{subprocess} standard library module
7138 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7139 new features. On POSIX systems it is guaranteed to be reliable when used
7140 in threaded applications. It includes timeout support from Python 3.3 but
7141 otherwise matches 3.2’s API.")
7142 (license license:psfl)))
7143
7144 (define-public python2-futures
7145 (package
7146 (name "python2-futures")
7147 (version "3.0.5")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "futures" version))
7152 (sha256
7153 (base32
7154 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7155 (build-system python-build-system)
7156 (arguments `(#:python ,python-2))
7157 (home-page "https://github.com/agronholm/pythonfutures")
7158 (synopsis
7159 "Backport of the concurrent.futures package from Python 3.2")
7160 (description
7161 "The concurrent.futures module provides a high-level interface for
7162 asynchronously executing callables. This package backports the
7163 concurrent.futures package from Python 3.2")
7164 (license license:bsd-3)))
7165
7166 (define-public python-promise
7167 (package
7168 (name "python-promise")
7169 (version "0.4.2")
7170 (source
7171 (origin
7172 (method url-fetch)
7173 (uri (pypi-uri "promise" version))
7174 (sha256
7175 (base32
7176 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7177 (build-system python-build-system)
7178 ;; Tests wants python-futures, which is a python2 only program, and
7179 ;; can't be found by python-promise at test time.
7180 (arguments `(#:tests? #f))
7181 (home-page "https://github.com/syrusakbary/promise")
7182 (synopsis "Promises/A+ implementation for Python")
7183 (description
7184 "Promises/A+ implementation for Python")
7185 (properties `((python2-variant . ,(delay python2-promise))))
7186 (license license:expat)))
7187
7188 (define-public python2-promise
7189 (let ((promise (package-with-python2
7190 (strip-python2-variant python-promise))))
7191 (package (inherit promise)
7192 (arguments (substitute-keyword-arguments (package-arguments promise)
7193 ((#:tests? _) #t)))
7194 (native-inputs
7195 `(("python2-futures" ,python2-futures)
7196 ("python2-pytest" ,python2-pytest)
7197 ,@(package-native-inputs promise))))))
7198
7199 (define-public python-colorama
7200 (package
7201 (name "python-colorama")
7202 (version "0.3.7")
7203 (source
7204 (origin
7205 (method url-fetch)
7206 (uri (pypi-uri "colorama" version))
7207 (sha256
7208 (base32
7209 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
7210 (build-system python-build-system)
7211 (synopsis "Colored terminal text rendering for Python")
7212 (description "Colorama is a Python library for rendering colored terminal
7213 text.")
7214 (home-page "https://pypi.python.org/pypi/colorama")
7215 (license license:bsd-3)))
7216
7217 (define-public python2-colorama
7218 (package-with-python2 python-colorama))
7219
7220 (define-public python-rsa
7221 (package
7222 (name "python-rsa")
7223 (version "3.4.2")
7224 (source
7225 (origin
7226 (method url-fetch)
7227 (uri (pypi-uri "rsa" version))
7228 (sha256
7229 (base32
7230 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7231 (build-system python-build-system)
7232 (propagated-inputs
7233 `(("python-pyasn1" ,python-pyasn1)))
7234 (synopsis "Pure-Python RSA implementation")
7235 (description "Python-RSA is a pure-Python RSA implementation. It supports
7236 encryption and decryption, signing and verifying signatures, and key
7237 generation according to PKCS#1 version 1.5. It can be used as a Python
7238 library as well as on the command line.")
7239 (home-page "https://stuvel.eu/rsa")
7240 (license license:asl2.0)))
7241
7242 (define-public python2-rsa
7243 (package-with-python2 python-rsa))
7244
7245 (define-public python-pluggy
7246 (package
7247 (name "python-pluggy")
7248 (version "0.3.1")
7249 (source
7250 (origin
7251 (method url-fetch)
7252 (uri (pypi-uri "pluggy" version))
7253 (sha256
7254 (base32
7255 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7256 (build-system python-build-system)
7257 (synopsis "Plugin and hook calling mechanism for Python")
7258 (description "Pluggy is an extraction of the plugin manager as used by
7259 Pytest but stripped of Pytest specific details.")
7260 (home-page "https://pypi.python.org/pypi/pluggy")
7261 (license license:expat)))
7262
7263 (define-public python2-pluggy
7264 (package-with-python2 python-pluggy))
7265
7266 (define-public python-tox
7267 (package
7268 (name "python-tox")
7269 (version "2.8.1")
7270 (source
7271 (origin
7272 (method url-fetch)
7273 (uri (pypi-uri "tox" version))
7274 (sha256
7275 (base32
7276 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7277 (build-system python-build-system)
7278 (arguments
7279 ;; FIXME: Tests require pytest-timeout, which itself requires
7280 ;; pytest>=2.8.0 for installation.
7281 '(#:tests? #f))
7282 (propagated-inputs
7283 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7284 ("python-py" ,python-py)
7285 ("python-virtualenv" ,python-virtualenv)))
7286 (native-inputs
7287 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7288 ("python-pytest" ,python-pytest) ; >= 2.3.5
7289 ("python-setuptools-scm" ,python-setuptools-scm)))
7290 (home-page "http://tox.testrun.org/")
7291 (synopsis "Virtualenv-based automation of test activities")
7292 (description "Tox is a generic virtualenv management and test command line
7293 tool. It can be used to check that a package installs correctly with
7294 different Python versions and interpreters, or run tests in each type of
7295 supported environment, or act as a frontend to continuous integration
7296 servers.")
7297 (license license:expat)))
7298
7299 (define-public python2-tox
7300 (package-with-python2 python-tox))
7301
7302 (define-public python-jmespath
7303 (package
7304 (name "python-jmespath")
7305 (version "0.9.0")
7306 (source
7307 (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "jmespath" version))
7310 (sha256
7311 (base32
7312 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7313 (build-system python-build-system)
7314 (native-inputs
7315 `(("python-nose" ,python-nose)))
7316 (synopsis "JSON Matching Expressions")
7317 (description "JMESPath (pronounced “james path”) is a Python library that
7318 allows one to declaratively specify how to extract elements from a JSON
7319 document.")
7320 (home-page "https://github.com/jmespath/jmespath.py")
7321 (license license:expat)))
7322
7323 (define-public python2-jmespath
7324 (package-with-python2 python-jmespath))
7325
7326 (define-public python-botocore
7327 (package
7328 (name "python-botocore")
7329 (version "1.7.9")
7330 (source
7331 (origin
7332 (method url-fetch)
7333 (uri (pypi-uri "botocore" version))
7334 (sha256
7335 (base32
7336 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
7337 (build-system python-build-system)
7338 (arguments
7339 ;; FIXME: Many tests are failing.
7340 '(#:tests? #f))
7341 (propagated-inputs
7342 `(("python-dateutil" ,python-dateutil)
7343 ("python-docutils" ,python-docutils)
7344 ("python-jmespath" ,python-jmespath)))
7345 (native-inputs
7346 `(("python-mock" ,python-mock)
7347 ("python-nose" ,python-nose)
7348 ("behave" ,behave)
7349 ("python-tox" ,python-tox)
7350 ("python-wheel" ,python-wheel)))
7351 (home-page "https://github.com/boto/botocore")
7352 (synopsis "Low-level interface to AWS")
7353 (description "Botocore is a Python library that provides a low-level
7354 interface to the Amazon Web Services (AWS) API.")
7355 (license license:asl2.0)))
7356
7357 (define-public python2-botocore
7358 (package-with-python2 python-botocore))
7359
7360 (define-public python-xdo
7361 (package
7362 (name "python-xdo")
7363 (version "0.3")
7364 (source (origin
7365 (method url-fetch)
7366 (uri (string-append
7367 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7368 "python-xdo_" version ".orig.tar.gz"))
7369 (sha256
7370 (base32
7371 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7372 (build-system python-build-system)
7373 (arguments
7374 '(#:phases
7375 (modify-phases %standard-phases
7376 (add-before 'install 'patch-libxdo-path
7377 ;; Hardcode the path of dynamically loaded libxdo library.
7378 (lambda* (#:key inputs #:allow-other-keys)
7379 (let ((libxdo (string-append
7380 (assoc-ref inputs "xdotool")
7381 "/lib/libxdo.so")))
7382 (substitute* "xdo/_xdo.py"
7383 (("find_library\\(\"xdo\"\\)")
7384 (simple-format #f "\"~a\"" libxdo)))
7385 #t))))
7386 #:tests? #f)) ; no tests provided
7387 (propagated-inputs
7388 `(("python-six" ,python-six)))
7389 (inputs
7390 `(("xdotool" ,xdotool)
7391 ("libX11" ,libx11)))
7392 (home-page "https://tracker.debian.org/pkg/python-xdo")
7393 (synopsis "Python library for simulating X11 keyboard/mouse input")
7394 (description "Provides bindings to libxdo for manipulating X11 via simulated
7395 input. (Note that this is mostly a legacy library; you may wish to look at
7396 python-xdo for newer bindings.)")
7397 (license license:bsd-3)))
7398
7399 (define-public python2-xdo
7400 (package-with-python2 python-xdo))
7401
7402 (define-public python-mako
7403 (package
7404 (name "python-mako")
7405 (version "1.0.6")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "Mako" version))
7410 (sha256
7411 (base32
7412 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7413 (build-system python-build-system)
7414 (propagated-inputs
7415 `(("python-markupsafe" ,python-markupsafe)))
7416 (native-inputs
7417 `(("python-mock" ,python-mock)
7418 ("python-nose" ,python-nose)
7419 ("python-pytest" ,python-pytest)))
7420 (home-page "http://www.makotemplates.org/")
7421 (synopsis "Templating language for Python")
7422 (description "Mako is a templating language for Python that compiles
7423 templates into Python modules.")
7424 (license license:expat)))
7425
7426 (define-public python2-mako
7427 (package-with-python2 python-mako))
7428
7429 (define-public python-waitress
7430 (package
7431 (name "python-waitress")
7432 (version "0.8.10")
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "waitress" version))
7437 (sha256
7438 (base32
7439 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
7440 (build-system python-build-system)
7441 (home-page "https://github.com/Pylons/waitress")
7442 (synopsis "Waitress WSGI server")
7443 (description "Waitress is meant to be a production-quality pure-Python WSGI
7444 server with very acceptable performance.")
7445 (license license:zpl2.1)))
7446
7447 (define-public python2-waitress
7448 (package-with-python2 python-waitress))
7449
7450 (define-public python-pyquery
7451 (package
7452 (name "python-pyquery")
7453 (version "1.2.17")
7454 (source
7455 (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "pyquery" version))
7458 (sha256
7459 (base32
7460 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7461 (build-system python-build-system)
7462 (native-inputs
7463 `(("python-webob" ,python-webob)
7464 ("python-webtest" ,python-webtest)))
7465 (propagated-inputs
7466 `(("python-lxml" ,python-lxml)
7467 ("python-cssselect" ,python-cssselect)))
7468 (home-page "https://github.com/gawel/pyquery")
7469 (synopsis "Make jQuery-like queries on xml documents")
7470 (description "pyquery allows you to make jQuery queries on xml documents.
7471 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7472 fast xml and html manipulation.")
7473 (license license:bsd-3)))
7474
7475 (define-public python2-pyquery
7476 (package-with-python2 python-pyquery))
7477
7478 (define-public python-anyjson
7479 (package
7480 (name "python-anyjson")
7481 (version "0.3.3")
7482 (source
7483 (origin
7484 (method url-fetch)
7485 (uri (pypi-uri "anyjson" version))
7486 (sha256
7487 (base32
7488 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7489 (build-system python-build-system)
7490 (arguments
7491 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7492 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7493 ;; whatever) so this transformation needs to be done before the tests
7494 ;; can be run. Maybe we could add a build step to transform beforehand
7495 ;; but it could be annoying/difficult.
7496 ;; We can enable tests for the Python 2 version, though, and do below.
7497 #:tests? #f))
7498 (home-page "https://bitbucket.org/runeh/anyjson/")
7499 (synopsis
7500 "Wraps best available JSON implementation in a common interface")
7501 (description
7502 "Anyjson loads whichever is the fastest JSON module installed
7503 and provides a uniform API regardless of which JSON implementation is used.")
7504 (license license:bsd-3)
7505 (properties `((python2-variant . ,(delay python2-anyjson))))))
7506
7507 (define-public python2-anyjson
7508 (let ((anyjson (package-with-python2
7509 (strip-python2-variant python-anyjson))))
7510 (package
7511 (inherit anyjson)
7512 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7513 #:tests? #t
7514 ,@(package-arguments anyjson)))
7515 (native-inputs `(("python2-nose" ,python2-nose))))))
7516
7517 (define-public python-amqp
7518 (package
7519 (name "python-amqp")
7520 (version "1.4.9")
7521 (source
7522 (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "amqp" version))
7525 (sha256
7526 (base32
7527 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7528 (build-system python-build-system)
7529 (native-inputs
7530 `(("python-nose" ,python-nose)
7531 ("python-mock" ,python-mock)))
7532 (home-page "https://github.com/celery/py-amqp")
7533 (synopsis
7534 "Low-level AMQP client for Python (fork of amqplib)")
7535 (description
7536 "This is a fork of amqplib which was originally written by Barry Pederson.
7537 It is maintained by the Celery project, and used by kombu as a pure python
7538 alternative when librabbitmq is not available.")
7539 (license license:lgpl2.1+)
7540 (properties `((python2-variant . ,(delay python2-amqp))))))
7541
7542 (define-public python2-amqp
7543 (let ((amqp (package-with-python2
7544 (strip-python2-variant python-amqp))))
7545 (package
7546 (inherit amqp)
7547 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7548 ;; unmaintained. Weirdly, does not do this on the python 3
7549 ;; version?
7550 #:tests? #f
7551 ,@(package-arguments amqp))))))
7552
7553 (define-public python-kombu
7554 (package
7555 (name "python-kombu")
7556 (version "3.0.37")
7557 (source
7558 (origin
7559 (method url-fetch)
7560 (uri (pypi-uri "kombu" version))
7561 (sha256
7562 (base32
7563 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7564 (build-system python-build-system)
7565 (native-inputs
7566 `(("python-mock" ,python-mock)
7567 ("python-nose" ,python-nose)))
7568 (propagated-inputs
7569 `(("python-anyjson" ,python-anyjson)
7570 ("python-amqp" ,python-amqp)
7571 ("python-redis" ,python-redis)))
7572 (home-page "http://kombu.readthedocs.org")
7573 (synopsis "Message passing library for Python")
7574 (description "The aim of Kombu is to make messaging in Python as easy as
7575 possible by providing an idiomatic high-level interface for the AMQ protocol,
7576 and also provide proven and tested solutions to common messaging problems.
7577 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7578 message orientation, queuing, routing, reliability and security, for which the
7579 RabbitMQ messaging server is the most popular implementation.")
7580 (license license:bsd-3)
7581 (properties `((python2-variant . ,(delay python2-kombu))))))
7582
7583 (define-public python2-kombu
7584 (let ((kombu (package-with-python2
7585 (strip-python2-variant python-kombu))))
7586 (package
7587 (inherit kombu)
7588 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7589 ;; It works fine on the python3 variant.
7590 #:tests? #f
7591 ,@(package-arguments kombu)))
7592 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7593 ,@(package-native-inputs kombu))))))
7594
7595 (define-public python-billiard
7596 (package
7597 (name "python-billiard")
7598 (version "3.3.0.23")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "billiard" version))
7603 (sha256
7604 (base32
7605 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7606 (build-system python-build-system)
7607 (native-inputs
7608 `(("python-nose" ,python-nose)))
7609 (home-page "https://github.com/celery/billiard")
7610 (synopsis
7611 "Python multiprocessing fork with improvements and bugfixes")
7612 (description
7613 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7614 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7615 pyprocessing package. This standalone variant is intended to be compatible with
7616 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7617 (license license:bsd-3)
7618 (properties `((python2-variant . ,(delay python2-billiard))))))
7619
7620 (define-public python2-billiard
7621 (let ((billiard (package-with-python2
7622 (strip-python2-variant python-billiard))))
7623 (package
7624 (inherit billiard)
7625 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7626 ("python2-mock" ,python2-mock)
7627 ,@(package-native-inputs billiard))))))
7628
7629 (define-public python-celery
7630 (package
7631 (name "python-celery")
7632 (version "3.1.24")
7633 (source
7634 (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "celery" version))
7637 (sha256
7638 (base32
7639 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7640 (build-system python-build-system)
7641 (arguments
7642 `(#:phases
7643 (modify-phases %standard-phases
7644 ;; These tests break with Python 3.5:
7645 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7646 (replace 'check
7647 (lambda _
7648 (zero?
7649 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7650 (native-inputs
7651 `(("python-nose" ,python-nose)))
7652 (propagated-inputs
7653 `(("python-pytz" ,python-pytz)
7654 ("python-billiard" ,python-billiard)
7655 ("python-kombu" ,python-kombu)))
7656 (home-page "http://celeryproject.org")
7657 (synopsis "Distributed Task Queue")
7658 (description "Celery is an asynchronous task queue/job queue based on
7659 distributed message passing. It is focused on real-time operation, but
7660 supports scheduling as well. The execution units, called tasks, are executed
7661 concurrently on a single or more worker servers using multiprocessing,
7662 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7663 synchronously (wait until ready).")
7664 (license license:bsd-3)
7665 (properties `((python2-variant . ,(delay python2-celery))))))
7666
7667 (define-public python2-celery
7668 (let ((celery (package-with-python2
7669 (strip-python2-variant python-celery))))
7670 (package
7671 (inherit celery)
7672 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7673 ("python2-mock" ,python2-mock)
7674 ,@(package-native-inputs celery))))))
7675
7676 (define-public python-translitcodec
7677 (package
7678 (name "python-translitcodec")
7679 (version "0.4.0")
7680 (source
7681 (origin
7682 (method url-fetch)
7683 (uri (pypi-uri "translitcodec" version))
7684 (sha256
7685 (base32
7686 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7687 (build-system python-build-system)
7688 (arguments
7689 `(#:tests? #f)) ; no tests provided
7690 (home-page
7691 "https://github.com/claudep/translitcodec")
7692 (synopsis
7693 "Unicode to 8-bit charset transliteration codec")
7694 (description
7695 "This package contains codecs for transliterating ISO 10646 texts into
7696 best-effort representations using smaller coded character sets (ASCII,
7697 ISO 8859, etc.).")
7698 (license license:expat)))
7699
7700 (define-public python2-translitcodec
7701 (package-with-python2 python-translitcodec))
7702
7703 (define-public python-editor
7704 (package
7705 (name "python-editor")
7706 (version "0.5")
7707 (source
7708 (origin
7709 (method url-fetch)
7710 (uri (pypi-uri "python-editor" version))
7711 (sha256
7712 (base32
7713 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
7714 (build-system python-build-system)
7715 (home-page
7716 "https://github.com/fmoo/python-editor")
7717 (synopsis
7718 "Programmatically open an editor, capture the result")
7719 (description
7720 "python-editor is a library that provides the editor module for
7721 programmatically interfacing with your system's $EDITOR.")
7722 (license license:asl2.0)))
7723
7724 (define-public python2-editor
7725 (package-with-python2 python-editor))
7726
7727 (define-public python-sphinxcontrib-programoutput
7728 (package
7729 (name "python-sphinxcontrib-programoutput")
7730 (version "0.10")
7731 (source (origin
7732 (method url-fetch)
7733 (uri (pypi-uri "sphinxcontrib-programoutput" version))
7734 (sha256
7735 (base32
7736 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
7737 (build-system python-build-system)
7738 (arguments
7739 ;; FIXME: Many tests are failing and the upstream is gone.
7740 '(#:tests? #f))
7741 (propagated-inputs
7742 `(("python-sphinx" ,python-sphinx)))
7743 (synopsis "Sphinx extension to include program output")
7744 (description "A Sphinx extension to literally insert the output of arbitrary
7745 commands into documents, helping you to keep your command examples up to date.")
7746 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
7747 (license license:bsd-2)))
7748
7749 (define-public python2-sphinxcontrib-programoutput
7750 (package-with-python2 python-sphinxcontrib-programoutput))
7751
7752 (define-public python-sphinx-repoze-autointerface
7753 (package
7754 (name "python-sphinx-repoze-autointerface")
7755 (version "0.8")
7756 (source (origin
7757 (method url-fetch)
7758 (uri (pypi-uri "repoze.sphinx.autointerface" version))
7759 (sha256
7760 (base32
7761 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
7762 (build-system python-build-system)
7763 (arguments '(#:tests? #f)) ; No tests.
7764 (propagated-inputs
7765 `(("python-sphinx" ,python-sphinx)
7766 ("python-zope-interface" ,python-zope-interface)))
7767 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
7768 (description "This package defines an extension for the Sphinx documentation
7769 system. The extension allows generation of API documentation by
7770 introspection of @code{zope.interface} instances in code.")
7771 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
7772 (license license:repoze)))
7773
7774 (define-public python2-sphinx-repoze-autointerface
7775 (package-with-python2 python-sphinx-repoze-autointerface))
7776
7777 (define-public python-vobject
7778 (package
7779 (name "python-vobject")
7780 (version "0.9.5")
7781 (source (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "vobject" version))
7784 (sha256
7785 (base32
7786 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
7787 (build-system python-build-system)
7788 (arguments
7789 '(;; The test suite relies on some non-portable Windows interfaces.
7790 #:tests? #f))
7791 (propagated-inputs
7792 `(("python-dateutil" ,python-dateutil)
7793 ("python-pyicu" ,python-pyicu)))
7794 (synopsis "Parse and generate vCard and vCalendar files")
7795 (description "Vobject is intended to be a full featured Python package for
7796 parsing and generating vCard and vCalendar files. Currently, iCalendar files
7797 are supported and well tested. vCard 3.0 files are supported, and all data
7798 should be imported, but only a few components are understood in a sophisticated
7799 way.")
7800 (home-page "http://eventable.github.io/vobject/")
7801 (license license:asl2.0)))
7802
7803 (define-public python2-vobject
7804 (package-with-python2 python-vobject))
7805
7806 (define-public python-munkres
7807 (package
7808 (name "python-munkres")
7809 (version "1.0.8")
7810 (source (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "munkres" version))
7813 (sha256
7814 (base32
7815 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
7816 (build-system python-build-system)
7817 (arguments
7818 '(#:tests? #f)) ; no test suite
7819 (home-page "http://software.clapper.org/munkres/")
7820 (synopsis "Implementation of the Munkres algorithm")
7821 (description "The Munkres module provides an implementation of the Munkres
7822 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
7823 useful for solving the Assignment Problem.")
7824 (license license:bsd-3)))
7825
7826 (define-public python2-munkres
7827 (package-with-python2 python-munkres))
7828
7829 (define-public python-whoosh
7830 (package
7831 (name "python-whoosh")
7832 (version "2.7.4")
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "Whoosh" version))
7837 (sha256
7838 (base32
7839 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
7840 (build-system python-build-system)
7841 (native-inputs
7842 `(("python-pytest" ,python-pytest)))
7843 (home-page "https://bitbucket.org/mchaput/whoosh")
7844 (synopsis "Full text indexing, search, and spell checking library")
7845 (description
7846 "Whoosh is a fast, pure-Python full text indexing, search, and spell
7847 checking library.")
7848 (license license:bsd-2)))
7849
7850 (define-public python2-whoosh
7851 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
7852 (package (inherit whoosh)
7853 (propagated-inputs
7854 `(("python2-backport-ssl-match-hostname"
7855 ,python2-backport-ssl-match-hostname)
7856 ,@(package-propagated-inputs whoosh))))))
7857
7858 (define-public python-pathlib
7859 (package
7860 (name "python-pathlib")
7861 (version "1.0.1")
7862 (source (origin
7863 (method url-fetch)
7864 (uri (pypi-uri "pathlib" version))
7865 (sha256
7866 (base32
7867 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
7868 (build-system python-build-system)
7869 ;; The tests depend on the internal "test" module, which does not provide
7870 ;; a stable interface.
7871 (arguments `(#:tests? #f))
7872 (home-page "https://pathlib.readthedocs.org/")
7873 (synopsis "Object-oriented file system paths")
7874 (description "Pathlib offers a set of classes to handle file system paths.
7875 It offers the following advantages over using string objects:
7876
7877 @enumerate
7878 @item No more cumbersome use of os and os.path functions. Everything can
7879 be done easily through operators, attribute accesses, and method calls.
7880 @item Embodies the semantics of different path types. For example,
7881 comparing Windows paths ignores casing.
7882 @item Well-defined semantics, eliminating any inconsistencies or
7883 ambiguities (forward vs. backward slashes, etc.).
7884 @end enumerate
7885
7886 Note: In Python 3.4, pathlib is now part of the standard library. For other
7887 Python versions please consider python-pathlib2 instead, which tracks the
7888 standard library module. This module (python-pathlib) isn't maintained
7889 anymore.")
7890 (license license:expat)))
7891
7892 (define-public python2-pathlib
7893 (package-with-python2 python-pathlib))
7894
7895 (define-public python2-pathlib2
7896 (package
7897 (name "python2-pathlib2")
7898 (version "2.1.0")
7899 (source (origin
7900 (method url-fetch)
7901 (uri (pypi-uri "pathlib2" version))
7902 (sha256
7903 (base32
7904 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
7905 (build-system python-build-system)
7906 ;; We only need the the Python 2 variant, since for Python 3 our minimum
7907 ;; version is 3.4 which already includes this package as part of the
7908 ;; standard library.
7909 (arguments
7910 `(#:python ,python-2))
7911 (native-inputs
7912 `(("python2-six" ,python2-six)))
7913 (home-page "https://pypi.python.org/pypi/pathlib2/")
7914 (synopsis "Object-oriented file system paths - backport of standard
7915 pathlib module")
7916 (description "The goal of pathlib2 is to provide a backport of standard
7917 pathlib module which tracks the standard library module, so all the newest
7918 features of the standard pathlib can be used also on older Python versions.
7919
7920 Pathlib offers a set of classes to handle file system paths. It offers the
7921 following advantages over using string objects:
7922
7923 @enumerate
7924 @item No more cumbersome use of os and os.path functions. Everything can
7925 be done easily through operators, attribute accesses, and method calls.
7926 @item Embodies the semantics of different path types. For example,
7927 comparing Windows paths ignores casing.
7928 @item Well-defined semantics, eliminating any inconsistencies or
7929 ambiguities (forward vs. backward slashes, etc.).
7930 @end enumerate")
7931 (license license:expat)))
7932
7933 (define-public python-jellyfish
7934 (package
7935 (name "python-jellyfish")
7936 (version "0.5.6")
7937 (source (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "jellyfish" version))
7940 (sha256
7941 (base32
7942 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
7943 (build-system python-build-system)
7944 (native-inputs
7945 `(("python-pytest" ,python-pytest)))
7946 (home-page "https://github.com/jamesturk/jellyfish")
7947 (synopsis "Approximate and phonetic matching of strings")
7948 (description "Jellyfish uses a variety of string comparison and phonetic
7949 encoding algorithms to do fuzzy string matching.")
7950 (license license:bsd-2)
7951 (properties `((python2-variant . ,(delay python2-jellyfish))))))
7952
7953 (define-public python2-jellyfish
7954 (let ((jellyfish (package-with-python2
7955 (strip-python2-variant python-jellyfish))))
7956 (package (inherit jellyfish)
7957 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
7958 ,@(package-native-inputs jellyfish))))))
7959
7960 (define-public python2-unicodecsv
7961 (package
7962 (name "python2-unicodecsv")
7963 (version "0.14.1")
7964 (source (origin
7965 (method url-fetch)
7966 ;; The test suite is not included in the PyPi release.
7967 ;; https://github.com/jdunck/python-unicodecsv/issues/19
7968 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
7969 "archive/" version ".tar.gz"))
7970 (file-name (string-append name "-" version ".tar.gz"))
7971 (sha256
7972 (base32
7973 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
7974 (build-system python-build-system)
7975 (arguments
7976 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
7977 #:python ,python-2))
7978 (native-inputs
7979 `(("python2-unittest2" ,python2-unittest2)))
7980 (home-page "https://github.com/jdunck/python-unicodecsv")
7981 (synopsis "Unicode CSV module for Python 2")
7982 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
7983 module, adding support for Unicode strings.")
7984 (license license:bsd-2)))
7985
7986 (define-public python-rarfile
7987 (package
7988 (name "python-rarfile")
7989 (version "2.8")
7990 (source (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "rarfile" version))
7993 (sha256
7994 (base32
7995 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
7996 (build-system python-build-system)
7997 (arguments
7998 '(#:phases
7999 (modify-phases %standard-phases
8000 (replace 'check
8001 ;; Many tests fail, but the installation proceeds.
8002 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8003 (native-inputs
8004 `(("which" ,which))) ; required for tests
8005 (propagated-inputs
8006 `(("libarchive" ,libarchive)))
8007 (home-page "https://github.com/markokr/rarfile")
8008 (synopsis "RAR archive reader for Python")
8009 (description "This is Python module for RAR archive reading. The interface
8010 is made as zipfile like as possible.")
8011 (license license:isc)))
8012
8013 (define-public python2-rarfile
8014 (package-with-python2 python-rarfile))
8015
8016 (define-public python-magic
8017 (package
8018 (name "python-magic")
8019 (version "0.4.3")
8020 (source
8021 (origin
8022 (method url-fetch)
8023 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8024 version ".tar.gz"))
8025 (sha256
8026 (base32
8027 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8028 (file-name (string-append name "-" version "-checkout"))))
8029 (build-system python-build-system)
8030 (arguments
8031 ;; The tests are unreliable, so don't run them. The tests fail
8032 ;; under Python3 because they were written for Python2 and
8033 ;; contain import statements that do not work in Python3. One of
8034 ;; the tests fails under Python2 because its assertions are
8035 ;; overly stringent; it relies on comparing output strings which
8036 ;; are brittle and can change depending on the version of
8037 ;; libmagic being used and the system on which the test is
8038 ;; running. In my case, under GuixSD 0.10.0, only one test
8039 ;; failed, and it seems to have failed only because the version
8040 ;; of libmagic that is packaged in Guix outputs a slightly
8041 ;; different (but not wrong) string than the one that the test
8042 ;; expected.
8043 '(#:tests? #f
8044 #:phases (modify-phases %standard-phases
8045 ;; Replace a specific method call with a hard-coded
8046 ;; path to the necessary libmagic.so file in the
8047 ;; store. If we don't do this, then the method call
8048 ;; will fail to find the libmagic.so file, which in
8049 ;; turn will cause any application using
8050 ;; python-magic to fail.
8051 (add-before 'build 'hard-code-path-to-libmagic
8052 (lambda* (#:key inputs #:allow-other-keys)
8053 (let ((file (assoc-ref inputs "file")))
8054 (substitute* "magic.py"
8055 (("ctypes.util.find_library\\('magic'\\)")
8056 (string-append "'" file "/lib/libmagic.so'")))
8057 #t)))
8058 (add-before 'install 'disable-egg-compression
8059 (lambda _
8060 (let ((port (open-file "setup.cfg" "a")))
8061 (display "\n[easy_install]\nzip_ok = 0\n"
8062 port)
8063 (close-port port)
8064 #t))))))
8065 (inputs
8066 ;; python-magic needs to be able to find libmagic.so.
8067 `(("file" ,file)))
8068 (home-page "https://github.com/ahupp/python-magic")
8069 (synopsis "File type identification using libmagic")
8070 (description
8071 "This module uses ctypes to access the libmagic file type
8072 identification library. It makes use of the local magic database and
8073 supports both textual and MIME-type output. Note that this module and
8074 the python-file module both provide a \"magic.py\" file; these two
8075 modules, which are different and were developed separately, both serve
8076 the same purpose: to provide Python bindings for libmagic.")
8077 (license license:expat)))
8078
8079 (define-public python2-magic
8080 (package-with-python2 python-magic))
8081
8082 (define-public python2-s3cmd
8083 (package
8084 (name "python2-s3cmd")
8085 (version "1.6.1")
8086 (source
8087 (origin
8088 (method url-fetch)
8089 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8090 "s3cmd-" version ".tar.gz"))
8091 (sha256
8092 (base32
8093 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8094 (build-system python-build-system)
8095 (arguments
8096 ;; s3cmd is written for python2 only and contains no tests.
8097 `(#:python ,python-2
8098 #:tests? #f))
8099 (propagated-inputs
8100 `(("python2-dateutil" ,python2-dateutil)
8101 ;; The python-file package also provides a magic.py module.
8102 ;; This is an unfortunate state of affairs; however, s3cmd
8103 ;; fails to install if it cannot find specifically the
8104 ;; python-magic package. Thus we include it, instead of using
8105 ;; python-file. Ironically, s3cmd sometimes works better
8106 ;; without libmagic bindings at all:
8107 ;; https://github.com/s3tools/s3cmd/issues/198
8108 ("python2-magic" ,python2-magic)))
8109 (home-page "http://s3tools.org/s3cmd")
8110 (synopsis "Command line tool for S3-compatible storage services")
8111 (description
8112 "S3cmd is a command line tool for uploading, retrieving and managing data
8113 in storage services that are compatible with the Amazon Simple Storage
8114 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8115 GnuPG encryption, and more. It also supports management of Amazon's
8116 CloudFront content delivery network.")
8117 (license license:gpl2+)))
8118
8119 (define-public python-pkgconfig
8120 (package
8121 (name "python-pkgconfig")
8122 (version "1.1.0")
8123 (source
8124 (origin
8125 (method url-fetch)
8126 (uri (pypi-uri "pkgconfig" version))
8127 (sha256
8128 (base32
8129 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8130 (build-system python-build-system)
8131 (native-inputs
8132 `(("python-nose" ,python-nose)))
8133 (inputs
8134 `(("pkg-config" ,pkg-config)))
8135 (arguments
8136 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8137 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8138 #:tests? #f
8139 ;; Hard-code the path to pkg-config.
8140 #:phases
8141 (modify-phases %standard-phases
8142 (add-before
8143 'build 'patch
8144 (lambda _
8145 (substitute* "pkgconfig/pkgconfig.py"
8146 (("cmd = 'pkg-config")
8147 (string-append "cmd = '" (which "pkg-config"))))
8148 #t)))))
8149 (home-page "https://github.com/matze/pkgconfig")
8150 (synopsis "Python interface for pkg-config")
8151 (description "This module provides a Python interface to pkg-config. It
8152 can be used to find all pkg-config packages, check if a package exists,
8153 check if a package meets certain version requirements, query CFLAGS and
8154 LDFLAGS and parse the output to build extensions with setup.py.")
8155 (license license:expat)))
8156
8157 (define-public python2-pkgconfig
8158 (package-with-python2 python-pkgconfig))
8159
8160 (define-public python-bz2file
8161 (package
8162 (name "python-bz2file")
8163 (version "0.98")
8164 (source
8165 (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "bz2file" version))
8168 (sha256
8169 (base32
8170 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8171 (build-system python-build-system)
8172 (arguments
8173 `(#:tests? #f)) ; Tests use deprecated python modules.
8174 (home-page "https://github.com/nvawda/bz2file")
8175 (synopsis "Read and write bzip2-compressed files")
8176 (description
8177 "Bz2file is a Python library for reading and writing bzip2-compressed
8178 files. It contains a drop-in replacement for the I/O interface in the
8179 standard library's @code{bz2} module, including features from the latest
8180 development version of CPython that are not available in older releases.")
8181 (license license:asl2.0)
8182 (properties `((python2-variant . ,(delay python2-bz2file))))))
8183
8184 (define-public python2-bz2file
8185 (let ((base (package-with-python2
8186 (strip-python2-variant python-bz2file))))
8187 (package
8188 (inherit base)
8189 (arguments
8190 `(#:python ,python-2
8191 #:phases
8192 (modify-phases %standard-phases
8193 ;; 'python setup.py test' does not work as of 0.98.
8194 ;; There is only the one test file, so we run it directly.
8195 (replace 'check
8196 (lambda _ (zero? (system* "python"
8197 "test_bz2file.py"))))))))))
8198
8199 (define-public python-future
8200 (package
8201 (name "python-future")
8202 (version "0.16.0")
8203 (source
8204 (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "future" version))
8207 (sha256
8208 (base32
8209 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8210 (build-system python-build-system)
8211 ;; Many tests connect to the network or are otherwise flawed.
8212 ;; https://github.com/PythonCharmers/python-future/issues/210
8213 (arguments
8214 `(#:tests? #f))
8215 (home-page "http://python-future.org")
8216 (synopsis "Single-source support for Python 3 and 2")
8217 (description
8218 "@code{python-future} is the missing compatibility layer between Python 2 and
8219 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8220 to support both Python 2 and Python 3 with minimal overhead.")
8221 (license license:expat)))
8222
8223 (define-public python2-future
8224 (package-with-python2 python-future))
8225
8226 (define-public python-cysignals
8227 (package
8228 (name "python-cysignals")
8229 (version "1.1.0")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8234 (sha256
8235 (base32
8236 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8237 (build-system python-build-system)
8238 (native-inputs
8239 `(("python-cython" ,python-cython)
8240 ("python-sphinx" ,python-sphinx)))
8241 (inputs
8242 `(("pari-gp" ,pari-gp)))
8243 (arguments
8244 `(#:modules ((guix build python-build-system)
8245 ((guix build gnu-build-system) #:prefix gnu:)
8246 (guix build utils))
8247 ;; FIXME: Tests are executed after installation and currently fail
8248 ;; when not installing into standard locations; the author is working
8249 ;; on a fix.
8250 #:tests? #f
8251 #:phases
8252 (modify-phases %standard-phases
8253 (add-before
8254 'build 'configure
8255 (assoc-ref gnu:%standard-phases 'configure)))))
8256 (home-page
8257 "https://github.com/sagemath/cysignals")
8258 (synopsis
8259 "Handling of interrupts and signals for Cython")
8260 (description
8261 "The cysignals package provides mechanisms to handle interrupts (and
8262 other signals and errors) in Cython code, using two related approaches,
8263 for mixed Cython/Python code or external C libraries and pure Cython code,
8264 respectively.")
8265 (license license:lgpl3+)))
8266
8267 (define-public python2-cysignals
8268 (package-with-python2 python-cysignals))
8269
8270 (define-public python2-shedskin
8271 (package
8272 (name "python2-shedskin")
8273 (version "0.9.4")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (string-append "https://github.com/shedskin/shedskin/"
8278 "releases/download/v" version
8279 "/shedskin-" version ".tgz"))
8280 (sha256
8281 (base32
8282 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8283 (build-system python-build-system)
8284 (arguments
8285 `(#:python ,python-2
8286 #:phases (modify-phases %standard-phases
8287 (add-after 'unpack 'fix-resulting-include-libs
8288 (lambda* (#:key inputs #:allow-other-keys)
8289 (let ((libgc (assoc-ref inputs "libgc"))
8290 (pcre (assoc-ref inputs "pcre")))
8291 (substitute* "shedskin/makefile.py"
8292 (("variable == 'CCFLAGS':[ ]*")
8293 (string-append "variable == 'CCFLAGS':\n"
8294 " line += ' -I " pcre "/include"
8295 " -I " libgc "/include'"))
8296 (("variable == 'LFLAGS':[ ]*")
8297 (string-append "variable == 'LFLAGS':\n"
8298 " line += ' -L" pcre "/lib"
8299 " -L " libgc "/lib'")))
8300 #t))))))
8301 (inputs `(("pcre" ,pcre)
8302 ("libgc" ,libgc)))
8303 (home-page "https://shedskin.github.io/")
8304 (synopsis "Experimental Python-2 to C++ Compiler")
8305 (description (string-append "This is an experimental compiler for a subset of
8306 Python. It generates C++ code and a Makefile."))
8307 (license (list license:gpl3 license:bsd-3 license:expat))))
8308
8309 (define-public python2-rope
8310 (package
8311 (name "python2-rope")
8312 (version "0.10.3")
8313 (source
8314 (origin
8315 (method url-fetch)
8316 (uri (pypi-uri "rope" version))
8317 (sha256
8318 (base32
8319 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8320 (arguments
8321 ;; Rope is currently python-2 only.
8322 ;; https://github.com/python-rope/rope/issues/57
8323 `(#:python ,python-2))
8324 (build-system python-build-system)
8325 (native-inputs
8326 `(("python2-unittest2" ,python2-unittest2)))
8327 (home-page "https://github.com/python-rope/rope")
8328 (synopsis "Refactoring library for Python")
8329 (description "Rope is a refactoring library for Python. It facilitates
8330 the renaming, moving and extracting of attributes, functions, modules, fields
8331 and parameters in Python 2 source code. These refactorings can also be applied
8332 to occurrences in strings and comments.")
8333 (license license:gpl2)))
8334
8335 (define-public python-py3status
8336 (package
8337 (name "python-py3status")
8338 (version "3.1")
8339 (source
8340 (origin
8341 (method url-fetch)
8342 (uri (pypi-uri "py3status" version))
8343 (sha256
8344 (base32
8345 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8346 (build-system python-build-system)
8347 (inputs
8348 `(("file" ,file)))
8349 (arguments
8350 '(#:phases
8351 (modify-phases %standard-phases
8352 ;; 'file' is used for detection of configuration file encoding
8353 ;; let's make link the dependency to particular input
8354 (add-before 'build 'patch-file-path
8355 (lambda* (#:key inputs #:allow-other-keys)
8356 (let ((file-path (assoc-ref inputs "file")))
8357 (substitute* "py3status/parse_config.py"
8358 (("check_output\\(\\['file'")
8359 (string-append "check_output(['" file-path "/bin/file'")))
8360 #t))))
8361 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8362 (home-page "https://github.com/ultrabug/py3status")
8363 (synopsis "Extensible i3status wrapper written in Python")
8364 (description "py3status is an i3status wrapper which extends i3status
8365 functionality in a modular way, allowing you to extend your panel with your
8366 own code, responding to click events and updating clock every second.")
8367 (license license:bsd-3)))
8368
8369 (define-public python-tblib
8370 (package
8371 (name "python-tblib")
8372 (version "1.3.0")
8373 (source (origin
8374 (method url-fetch)
8375 (uri (pypi-uri "tblib" version))
8376 (sha256 (base32
8377 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
8378 (build-system python-build-system)
8379 (arguments
8380 `(#:phases
8381 (modify-phases %standard-phases
8382 (replace 'check
8383 (lambda _
8384 ;; Upstream runs tests after installation and the package itself
8385 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8386 ;; found.
8387 (setenv "PYTHONPATH"
8388 (string-append (getcwd) "/build/lib:"
8389 (getenv "PYTHONPATH")))
8390 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8391 (native-inputs
8392 `(("python-pytest" ,python-pytest)
8393 ("python-six" ,python-six)))
8394 (home-page "https://github.com/ionelmc/python-tblib")
8395 (synopsis "Traceback serialization library")
8396 (description
8397 "Traceback serialization allows you to:
8398
8399 @enumerate
8400 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8401 different processes. This allows better error handling when running code over
8402 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8403
8404 @item Parse traceback strings and raise with the parsed tracebacks.
8405 @end enumerate\n")
8406 (license license:bsd-3)))
8407
8408 (define-public python2-tblib
8409 (package-with-python2 python-tblib))
8410
8411 (define-public python-greenlet
8412 (package
8413 (name "python-greenlet")
8414 (version "0.4.11")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "greenlet" version))
8418 (sha256
8419 (base32
8420 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8421 (build-system python-build-system)
8422 (home-page "https://greenlet.readthedocs.io/")
8423 (synopsis "Lightweight in-process concurrent programming")
8424 (description
8425 "Greenlet package is a spin-off of Stackless, a version of CPython
8426 that supports micro-threads called \"tasklets\". Tasklets run
8427 pseudo-concurrently (typically in a single or a few OS-level threads) and
8428 are synchronized with data exchanges on \"channels\".")
8429 (license (list license:psfl license:expat))))
8430
8431 (define-public python2-greenlet
8432 (package-with-python2 python-greenlet))
8433
8434 (define-public python-gevent
8435 (package
8436 (name "python-gevent")
8437 (version "1.1.1")
8438 (source (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "gevent" version))
8441 (sha256
8442 (base32
8443 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
8444 (modules '((guix build utils)))
8445 (snippet
8446 '(begin
8447 ;; unbunding libev and c-ares
8448 (for-each delete-file-recursively '("libev" "c-ares"))
8449 ;; fixing testsuite
8450 (call-with-output-file "greentest/__init__.py" noop)
8451 (substitute* "greentest/testrunner.py"
8452 (("import util") "from . import util")
8453 (("from util import log") "from .util import log"))))))
8454 (build-system python-build-system)
8455 (propagated-inputs
8456 `(("python-greenlet" ,python-greenlet)))
8457 (native-inputs
8458 `(("python-six" ,python-six)))
8459 (inputs
8460 `(("c-ares" ,c-ares)
8461 ("libev" ,libev)))
8462 (home-page "http://www.gevent.org/")
8463 (synopsis "Coroutine-based network library")
8464 (description
8465 "gevent is a coroutine-based Python networking library that uses greenlet
8466 to provide a high-level synchronous API on top of the libev event loop.")
8467 (license license:expat)))
8468
8469 (define-public python2-gevent
8470 (package-with-python2 python-gevent))
8471
8472 (define-public python-fastimport
8473 (package
8474 (name "python-fastimport")
8475 (version "0.9.6")
8476 (source
8477 (origin
8478 (method url-fetch)
8479 (uri (pypi-uri "fastimport" version))
8480 (sha256
8481 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8482 (build-system python-build-system)
8483 (home-page "https://github.com/jelmer/python-fastimport")
8484 (synopsis "VCS fastimport parser and generator in Python")
8485 (description "This package provides a parser for and generator of the Git
8486 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8487 format.")
8488 (license license:gpl2+)))
8489
8490 (define-public python2-fastimport
8491 (package-with-python2 python-fastimport))
8492
8493 (define-public python-twisted
8494 (package
8495 (name "python-twisted")
8496 (version "17.1.0")
8497 (source (origin
8498 (method url-fetch)
8499 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8500 (sha256
8501 (base32
8502 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8503 (build-system python-build-system)
8504 (arguments
8505 '(#:tests? #f)) ; FIXME: Some tests are failing.
8506 ;; #:phases
8507 ;; (modify-phases %standard-phases
8508 ;; (replace 'check
8509 ;; (lambda _
8510 ;; (zero? (system* "./bin/trial" "twisted")))))
8511 (propagated-inputs
8512 `(("python-zope-interface" ,python-zope-interface)
8513 ("python-incremental" ,python-incremental)
8514 ("python-constantly" ,python-constantly)
8515 ("python-automat" ,python-automat)))
8516 (home-page "https://twistedmatrix.com/")
8517 (synopsis "Asynchronous networking framework written in Python")
8518 (description
8519 "Twisted is an extensible framework for Python programming, with special
8520 focus on event-based network programming and multiprotocol integration.")
8521 (license license:expat)))
8522
8523 (define-public python2-twisted
8524 (package-with-python2 python-twisted))
8525
8526 (define-public python-pika
8527 (package
8528 (name "python-pika")
8529 (version "0.10.0")
8530 (source
8531 (origin
8532 (method url-fetch)
8533 (uri (pypi-uri "pika" version))
8534 (sha256
8535 (base32
8536 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8537 (build-system python-build-system)
8538 (native-inputs
8539 `(("python-pyev" ,python-pyev)
8540 ("python-tornado" ,python-tornado)
8541 ("python-twisted" ,python-twisted)))
8542 (home-page "https://pika.readthedocs.org")
8543 (synopsis "Pure Python AMQP Client Library")
8544 (description
8545 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8546 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8547 network support library.")
8548 (license license:bsd-3)))
8549
8550 (define-public python2-pika
8551 (package-with-python2 python-pika))
8552
8553 (define-public python-ply
8554 (package
8555 (name "python-ply")
8556 (version "3.9")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "ply" version))
8561 (sha256
8562 (base32
8563 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
8564 (build-system python-build-system)
8565 (home-page "http://www.dabeaz.com/ply/")
8566 (synopsis "Python Lex & Yacc")
8567 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8568 It uses LR parsing and does extensive error checking.")
8569 (license license:bsd-3)))
8570
8571 (define-public python2-ply
8572 (package-with-python2 python-ply))
8573
8574 (define-public python-tabulate
8575 (package
8576 (name "python-tabulate")
8577 (version "0.7.7")
8578 (source (origin
8579 (method url-fetch)
8580 (uri (pypi-uri "tabulate" version))
8581 (sha256
8582 (base32
8583 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8584 (build-system python-build-system)
8585 (arguments
8586 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8587 ;; and the latest release is not tagged in the upstream repository.
8588 '(#:tests? #f))
8589 (home-page "https://bitbucket.org/astanin/python-tabulate")
8590 (synopsis "Pretty-print tabular data")
8591 (description
8592 "Tabulate is a library and command-line utility to pretty-print tabular
8593 data in Python.")
8594 (license license:expat)))
8595
8596 (define-public python2-tabulate
8597 (package-with-python2 python-tabulate))
8598
8599 (define-public python-kazoo
8600 (package
8601 (name "python-kazoo")
8602 (version "2.2.1")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "kazoo" version))
8607 (sha256
8608 (base32
8609 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
8610 (build-system python-build-system)
8611 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8612 (propagated-inputs
8613 `(("python-six" ,python-six)))
8614 (home-page "https://kazoo.readthedocs.org")
8615 (synopsis "High-level Zookeeper client library")
8616 (description
8617 "Kazoo is a Python client library for the Apache Zookeeper distributed
8618 application service. It is designed to be easy to use and to avoid common
8619 programming errors.")
8620 (license license:asl2.0)))
8621
8622 (define-public python2-kazoo
8623 (package-with-python2 python-kazoo))
8624
8625 (define-public python-pykafka
8626 (package
8627 (name "python-pykafka")
8628 (version "2.4.0")
8629 (source (origin
8630 (method url-fetch)
8631 (uri (string-append
8632 "https://pypi.python.org/packages/8b/3e/"
8633 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8634 "pykafka-" version ".tar.gz"))
8635 (sha256
8636 (base32
8637 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8638 (build-system python-build-system)
8639 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8640 (propagated-inputs
8641 `(("python-gevent" ,python-gevent)
8642 ("python-kazoo" ,python-kazoo)
8643 ("python-tabulate" ,python-tabulate)))
8644 (inputs
8645 `(("librdkafka" ,librdkafka)))
8646 (home-page "https://pykafka.readthedocs.io/")
8647 (synopsis "Apache Kafka client for Python")
8648 (description
8649 "PyKafka is a client for the Apache Kafka distributed messaging system.
8650 It includes Python implementations of Kafka producers and consumers, which
8651 are optionally backed by a C extension built on librdkafka.")
8652 (license license:asl2.0)))
8653
8654 (define-public python2-pykafka
8655 (package-with-python2 python-pykafka))
8656
8657 (define-public python-wcwidth
8658 (package
8659 (name "python-wcwidth")
8660 (version "0.1.7")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "wcwidth" version))
8665 (sha256
8666 (base32
8667 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
8668 (build-system python-build-system)
8669 (home-page "https://github.com/jquast/wcwidth")
8670 (synopsis "Measure number of terminal column cells of wide-character codes")
8671 (description "Wcwidth measures the number of terminal column cells of
8672 wide-character codes. It is useful for those implementing a terminal emulator,
8673 or programs that carefully produce output to be interpreted by one. It is a
8674 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
8675 specified in POSIX.1-2001 and POSIX.1-2008.")
8676 (license license:expat)))
8677
8678 (define-public python2-wcwidth
8679 (package-with-python2 python-wcwidth))
8680
8681 (define-public python2-jsonrpclib
8682 (package
8683 (name "python2-jsonrpclib")
8684 (version "0.1.7")
8685 (source (origin
8686 (method url-fetch)
8687 (uri (string-append
8688 "https://pypi.python.org/packages/source/j/jsonrpclib/"
8689 "jsonrpclib-" version ".tar.gz"))
8690 (sha256
8691 (base32
8692 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
8693 (build-system python-build-system)
8694 (arguments
8695 `(#:tests? #f
8696 #:python ,python-2))
8697 (home-page "https://github.com/joshmarshall/jsonrpclib/")
8698 (synopsis "Implementation of JSON-RPC specification for Python")
8699 (description
8700 "This library is an implementation of the JSON-RPC specification.
8701 It supports both the original 1.0 specification, as well as the
8702 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
8703 etc.")
8704 (license license:asl2.0)))
8705
8706 (define-public python-chai
8707 (package
8708 (name "python-chai")
8709 (version "1.1.1")
8710 (source (origin
8711 (method url-fetch)
8712 (uri (pypi-uri "chai" version))
8713 (sha256
8714 (base32
8715 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
8716 (build-system python-build-system)
8717 (home-page "https://github.com/agoragames/chai")
8718 (synopsis "Mocking framework for Python")
8719 (description
8720 "Chai provides an api for mocking, stubbing and spying your python
8721 objects, patterned after the Mocha library for Ruby.")
8722 (license license:bsd-3)))
8723
8724 (define-public python2-chai
8725 (package-with-python2 python-chai))
8726
8727 (define-public python-inflection
8728 (package
8729 (name "python-inflection")
8730 (version "0.3.1")
8731 (source
8732 (origin (method url-fetch)
8733 (uri (pypi-uri "inflection" version))
8734 (sha256
8735 (base32
8736 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
8737 (build-system python-build-system)
8738 (native-inputs
8739 `(("python-pytest" ,python-pytest)))
8740 (home-page "https://github.com/jpvanhal/inflection")
8741 (synopsis "Python string transformation library")
8742 (description
8743 "Inflection is a string transformation library. It singularizes
8744 and pluralizes English words, and transforms strings from CamelCase to
8745 underscored string.")
8746 (license license:expat)))
8747
8748 (define-public python2-inflection
8749 (package-with-python2 python-inflection))
8750
8751 (define-public python-pylev
8752 (package
8753 (name "python-pylev")
8754 (version "1.3.0")
8755 (source (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "pylev" version))
8758 (sha256
8759 (base32
8760 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
8761 (build-system python-build-system)
8762 (home-page "https://github.com/toastdriven/pylev")
8763 (synopsis "Levenshtein distance implementation in Python")
8764 (description "Pure Python Levenshtein implementation, based off the
8765 Wikipedia code samples at
8766 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
8767 (license license:bsd-3)))
8768
8769 (define-public python2-pylev
8770 (package-with-python2 python-pylev))
8771
8772 (define-public python-cleo
8773 (package
8774 (name "python-cleo")
8775 (version "0.6.1")
8776 (source (origin
8777 (method url-fetch)
8778 (uri (pypi-uri "cleo" version))
8779 (sha256
8780 (base32
8781 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
8782 (build-system python-build-system)
8783 (native-inputs
8784 `(;; For testing
8785 ("python-mock" ,python-mock)
8786 ("python-pytest-mock" ,python-pytest-mock)
8787 ("python-pytest" ,python-pytest)))
8788 (propagated-inputs
8789 `(("python-backpack" ,python-backpack)
8790 ("python-pastel" ,python-pastel)
8791 ("python-pylev" ,python-pylev)))
8792 (home-page "https://github.com/sdispater/cleo")
8793 (synopsis "Command-line arguments library for Python")
8794 (description
8795 "Cleo allows you to create command-line commands with signature in
8796 docstring and colored output.")
8797 (license license:expat)))
8798
8799 (define-public python2-cleo
8800 (package-with-python2 python-cleo))
8801
8802 (define-public python-lazy-object-proxy
8803 (package
8804 (name "python-lazy-object-proxy")
8805 (version "1.2.2")
8806 (source (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "lazy-object-proxy" version))
8809 (sha256
8810 (base32
8811 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
8812 (build-system python-build-system)
8813 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
8814 (synopsis "Lazy object proxy for python")
8815 (description
8816 "Lazy object proxy is an object that wraps a callable but defers the call
8817 until the object is actually required, and caches the result of said call.")
8818 (license license:bsd-2)))
8819
8820 (define-public python2-lazy-object-proxy
8821 (package-with-python2 python-lazy-object-proxy))
8822
8823 (define-public python-dnspython
8824 (package
8825 (name "python-dnspython")
8826 (version "1.15.0")
8827 (source (origin
8828 (method url-fetch)
8829 (uri (string-append "http://www.dnspython.org/kits/"
8830 version "/dnspython-" version ".tar.gz"))
8831 (sha256
8832 (base32
8833 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
8834 (build-system python-build-system)
8835 (arguments '(#:tests? #f)) ; XXX: requires internet access
8836 (home-page "http://www.dnspython.org")
8837 (synopsis "DNS toolkit for Python")
8838 (description
8839 "dnspython is a DNS toolkit for Python. It supports almost all record
8840 types. It can be used for queries, zone transfers, and dynamic updates.
8841 It supports TSIG authenticated messages and EDNS0.")
8842 (license license:expat)))
8843
8844 (define-public python2-dnspython
8845 (package-with-python2 python-dnspython))
8846
8847 (define-public python-email-validator
8848 (package
8849 (name "python-email-validator")
8850 (version "1.0.2")
8851 (source
8852 (origin (method url-fetch)
8853 (uri (pypi-uri "email_validator" version))
8854 (sha256
8855 (base32
8856 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
8857 (build-system python-build-system)
8858 (arguments
8859 '(#:phases
8860 (modify-phases %standard-phases
8861 (add-before 'build 'use-dnspython
8862 (lambda _
8863 (substitute* "setup.py"
8864 (("dnspython3") "dnspython"))
8865 #t)))))
8866 (propagated-inputs
8867 `(("python-dnspython" ,python-dnspython)
8868 ("python-idna" ,python-idna)))
8869 (home-page "https://github.com/JoshData/python-email-validator")
8870 (synopsis "Email address validation library for Python")
8871 (description
8872 "This library validates email address syntax and deliverability.")
8873 (license license:cc0)))
8874
8875 (define-public python2-email-validator
8876 (package-with-python2 python-email-validator))
8877
8878 (define-public python-ukpostcodeparser
8879 (package
8880 (name "python-ukpostcodeparser")
8881 (version "1.0.3")
8882 (source (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "UkPostcodeParser" version))
8885 (sha256
8886 (base32
8887 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
8888 (build-system python-build-system)
8889 (home-page "https://github.com/hamstah/ukpostcodeparser")
8890 (synopsis "UK Postcode parser for Python")
8891 (description
8892 "This library provides the @code{parse_uk_postcode} function for
8893 parsing UK postcodes.")
8894 (license license:expat)))
8895
8896 (define-public python2-ukpostcodeparser
8897 (package-with-python2 python-ukpostcodeparser))
8898
8899 (define-public python-faker
8900 (package
8901 (name "python-faker")
8902 (version "0.7.9")
8903 (source (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "Faker" version))
8906 (sha256
8907 (base32
8908 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
8909 (patches
8910 (search-patches "python-faker-fix-build-32bit.patch"))
8911 (modules '((guix build utils)))
8912 (snippet
8913 '(begin
8914 (for-each delete-file (find-files "." "\\.pyc$"))
8915 #t))))
8916 (build-system python-build-system)
8917 (arguments
8918 '(#:phases
8919 (modify-phases %standard-phases
8920 (replace 'check
8921 (lambda _
8922 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
8923 (native-inputs
8924 `(;; For testing
8925 ("python-email-validator" ,python-email-validator)
8926 ("python-mock" ,python-mock)
8927 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
8928 (propagated-inputs
8929 `(("python-dateutil" ,python-dateutil)
8930 ("python-six" ,python-six)))
8931 (home-page "https://github.com/joke2k/faker")
8932 (synopsis "Python package that generates fake data")
8933 (description
8934 "Faker is a Python package that generates fake data such as names,
8935 addresses, and phone numbers.")
8936 (license license:expat)
8937 (properties `((python2-variant . ,(delay python2-faker))))))
8938
8939 (define-public python2-faker
8940 (let ((base (package-with-python2 (strip-python2-variant
8941 python-faker))))
8942 (package
8943 (inherit base)
8944 (propagated-inputs
8945 `(("python2-ipaddress" ,python2-ipaddress)
8946 ,@(package-propagated-inputs base))))))
8947
8948 (define-public python-pyaml
8949 (package
8950 (name "python-pyaml")
8951 (version "17.7.2")
8952 (source (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "pyaml" version))
8955 (sha256
8956 (base32
8957 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
8958 (build-system python-build-system)
8959 (native-inputs
8960 `(("python-unidecode" ,python-unidecode)))
8961 (propagated-inputs
8962 `(("python-pyyaml" ,python-pyyaml)))
8963 (home-page "https://github.com/mk-fg/pretty-yaml")
8964 (synopsis "YAML pretty-print library for Python")
8965 (description
8966 "pyaml is a PyYAML based python module to produce pretty and readable
8967 YAML-serialized data.")
8968 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
8969
8970 (define-public python2-pyaml
8971 (package-with-python2 python-pyaml))
8972
8973 (define-public python-backpack
8974 (package
8975 (name "python-backpack")
8976 (version "0.1")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "backpack" version))
8981 (sha256
8982 (base32
8983 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
8984 (build-system python-build-system)
8985 (native-inputs
8986 `(("python-pytest" ,python-pytest)
8987 ("python-nose" ,python-nose)))
8988 (propagated-inputs
8989 `(("python-simplejson" ,python-simplejson)))
8990 (home-page "https://github.com/sdispater/backpack")
8991 (synopsis "Utilities for working with Python collections")
8992 (description "Backpack provides some useful utilities for working with
8993 collections of data.")
8994 (license license:expat)))
8995
8996 (define-public python2-backpack
8997 (package-with-python2 python-backpack))
8998
8999 (define-public python-prompt-toolkit
9000 (package
9001 (name "python-prompt-toolkit")
9002 (version "1.0.15")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9007 (sha256
9008 (base32
9009 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9010 (build-system python-build-system)
9011 (arguments
9012 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9013 (propagated-inputs
9014 `(("python-wcwidth" ,python-wcwidth)
9015 ("python-six" ,python-six)
9016 ("python-pygments" ,python-pygments)))
9017 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9018 (synopsis "Library for building command line interfaces in Python")
9019 (description
9020 "Prompt-Toolkit is a library for building interactive command line
9021 interfaces in Python. It's like GNU Readline but it also features syntax
9022 highlighting while typing, out-of-the-box multi-line input editing, advanced
9023 code completion, incremental search, support for Chinese double-width
9024 characters, mouse support, and auto suggestions.")
9025 (license license:bsd-3)))
9026
9027 (define-public python2-prompt-toolkit
9028 (package-with-python2 python-prompt-toolkit))
9029
9030 (define-public python-jedi
9031 (package
9032 (name "python-jedi")
9033 (version "0.9.0")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "jedi" version))
9038 (sha256
9039 (base32
9040 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9041 (build-system python-build-system)
9042 (arguments
9043 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9044 '(#:tests? #f))
9045 (native-inputs
9046 `(("python-pytest" ,python-pytest)))
9047 (home-page "https://github.com/davidhalter/jedi")
9048 (synopsis
9049 "Autocompletion for Python that can be used for text editors")
9050 (description
9051 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9052 (license license:expat)))
9053
9054 (define-public python2-jedi
9055 (package-with-python2 python-jedi))
9056
9057 (define-public ptpython
9058 (package
9059 (name "ptpython")
9060 (version "0.34")
9061 (source (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "ptpython" version))
9064 (sha256
9065 (base32
9066 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9067 (build-system python-build-system)
9068 (arguments
9069 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9070 (propagated-inputs
9071 `(("python-docopt" ,python-docopt)
9072 ("python-jedi" ,python-jedi)
9073 ("python-prompt-toolkit" ,python-prompt-toolkit)
9074 ("python-pygments" ,python-pygments)))
9075 (home-page "https://github.com/jonathanslenders/ptpython")
9076 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9077 (description
9078 "ptpython is a Python read-eval-print loop with IDE-like features.
9079 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9080 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9081 etc.")
9082 (license license:bsd-3)
9083 (properties `((python2-variant . ,(delay ptpython-2))))))
9084
9085 (define-public ptpython-2
9086 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9087 (package
9088 (inherit base)
9089 (name "ptpython2"))))
9090
9091 (define-public python-stem
9092 (package
9093 (name "python-stem")
9094 (version "1.5.4")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "stem" version))
9099 (sha256
9100 (base32
9101 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
9102 (build-system python-build-system)
9103 (arguments
9104 `(#:phases
9105 (modify-phases %standard-phases
9106 (replace 'check
9107 (lambda _
9108 (zero? (system* "./run_tests.py" "--unit")))))))
9109 (native-inputs
9110 `(("python-mock" ,python-mock)
9111 ("python-pep8" ,python-pep8)
9112 ("python-pyflakes" ,python-pyflakes)))
9113 (home-page "https://stem.torproject.org/")
9114 (synopsis
9115 "Python controller library that allows applications to interact with Tor")
9116 (description
9117 "Stem is a Python controller library for Tor. With it you can use Tor's
9118 control protocol to script against the Tor process and read descriptor data
9119 relays publish about themselves.")
9120 (license license:lgpl3)))
9121
9122 (define-public python2-stem
9123 (package-with-python2 python-stem))
9124
9125 (define-public python-pyserial
9126 (package
9127 (name "python-pyserial")
9128 (version "3.1.1")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "pyserial" version))
9133 (sha256
9134 (base32
9135 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9136 (build-system python-build-system)
9137 (arguments
9138 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9139 ;; #:phases
9140 ;; (modify-phases %standard-phases
9141 ;; (replace 'check
9142 ;; (lambda _
9143 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9144 (home-page
9145 "https://github.com/pyserial/pyserial")
9146 (synopsis "Python Serial Port Bindings")
9147 (description "@code{pyserial} provide serial port bindings for Python. It
9148 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9149 and/or Xon/Xoff. The port is accessed in RAW mode.")
9150 (license license:bsd-3)))
9151
9152 (define-public python2-pyserial
9153 (package-with-python2 python-pyserial))
9154
9155 (define-public python-kivy
9156 (package
9157 (name "python-kivy")
9158 (version "1.9.1")
9159 (source
9160 (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "kivy" version))
9163 (file-name (string-append name "-" version ".tar.gz"))
9164 (sha256
9165 (base32
9166 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
9167 (build-system python-build-system)
9168 (arguments
9169 `(#:tests? #f ; Tests require many optional packages
9170 #:phases
9171 (modify-phases %standard-phases
9172 (replace 'build (lambda _ (zero? (system* "make" "force"))))
9173 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9174 (lambda* (#:key inputs #:allow-other-keys)
9175 (setenv "KIVY_SDL2_PATH"
9176 (string-append (assoc-ref inputs "sdl-union")
9177 "/include/SDL2"))
9178 #t)))))
9179 (native-inputs
9180 `(("pkg-config" ,pkg-config)
9181 ("python-cython" ,python-cython)))
9182 (inputs
9183 `(("gstreamer" ,gstreamer)
9184 ("mesa" ,mesa)
9185 ("sdl-union"
9186 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9187 (home-page "http://kivy.org")
9188 (synopsis
9189 "Multitouch application framework")
9190 (description
9191 "A software library for rapid development of
9192 hardware-accelerated multitouch applications.")
9193 (license license:expat)))
9194
9195 (define-public python2-kivy
9196 (package-with-python2 python-kivy))
9197
9198 (define-public python-kivy-next
9199 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9200 (revision "1"))
9201 (package (inherit python-kivy)
9202 (name "python-kivy-next")
9203 (version (string-append "1.9.1-" revision "."
9204 (string-take commit 7)))
9205 (source
9206 (origin
9207 (method git-fetch)
9208 (uri (git-reference
9209 (url "https://github.com/kivy/kivy")
9210 (commit commit)))
9211 (file-name (string-append name "-" version "-checkout"))
9212 (sha256
9213 (base32
9214 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9215
9216 (define-public python2-kivy-next
9217 (package-with-python2 python-kivy-next))
9218
9219 (define-public python-binaryornot
9220 (package
9221 (name "python-binaryornot")
9222 (version "0.4.0")
9223 (source (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "binaryornot" version))
9226 (sha256
9227 (base32
9228 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9229 (build-system python-build-system)
9230 (propagated-inputs
9231 `(("python-chardet" ,python-chardet)
9232 ("python-hypothesis" ,python-hypothesis)))
9233 (home-page "https://github.com/audreyr/binaryornot")
9234 (synopsis "Package to check if a file is binary or text")
9235 (description "Ultra-lightweight pure Python package to check if a file is
9236 binary or text.")
9237 (license license:bsd-3)
9238 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9239
9240 (define-public python2-binaryornot
9241 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9242 (package (inherit base)
9243 (propagated-inputs
9244 `(("python2-enum34" ,python2-enum34)
9245 ,@(package-propagated-inputs base))))))
9246
9247 (define-public python-nltk
9248 (package
9249 (name "python-nltk")
9250 (version "3.2.1")
9251 (source (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "nltk" version))
9254 (sha256
9255 (base32
9256 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9257 (build-system python-build-system)
9258 (arguments
9259 '(;; The tests require some extra resources to be downloaded.
9260 ;; TODO Try packaging these resources.
9261 #:tests? #f))
9262 (home-page "http://nltk.org/")
9263 (synopsis "Natural Language Toolkit")
9264 (description "It provides interfaces to over 50 corpora and lexical
9265 resources such as WordNet, along with a suite of text processing libraries
9266 for classification, tokenization, stemming, tagging, parsing, and semantic
9267 reasoning, wrappers for natural language processing libraries.")
9268 (license license:asl2.0)))
9269
9270 (define-public python2-nltk
9271 (package-with-python2 python-nltk))
9272
9273 (define-public python-pymongo
9274 (package
9275 (name "python-pymongo")
9276 (version "3.3.0")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "pymongo" version))
9280 (sha256
9281 (base32
9282 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9283 (build-system python-build-system)
9284 (propagated-inputs
9285 `(("python-certifi" ,python-certifi)))
9286 (home-page "https://github.com/mongodb/mongo-python-driver")
9287 (synopsis "Python driver for MongoDB")
9288 (description "Python driver for MongoDB.")
9289 (license license:asl2.0)))
9290
9291 (define-public python2-pymongo
9292 (package-with-python2 python-pymongo))
9293
9294 (define-public python-sh
9295 (package
9296 (name "python-sh")
9297 (version "1.11")
9298 (source (origin
9299 (method url-fetch)
9300 (uri (pypi-uri "sh" version))
9301 (sha256
9302 (base32
9303 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9304 (build-system python-build-system)
9305 (arguments
9306 `(#:tests? #f)) ; no tests
9307 (home-page "https://github.com/amoffat/sh")
9308 (synopsis "Python subprocess interface")
9309 (description "Abstracts process invocation by providing a function
9310 interface for programs.")
9311 (license license:expat)))
9312
9313 (define-public python2-sh
9314 (package-with-python2 python-sh))
9315
9316 (define-public python-consul
9317 (package
9318 (name "python-consul")
9319 (version "0.6.1")
9320 (source
9321 (origin
9322 (method url-fetch)
9323 (uri (pypi-uri "python-consul" version))
9324 (sha256
9325 (base32
9326 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9327 (build-system python-build-system)
9328 (native-inputs
9329 `(("python-pytest" ,python-pytest)))
9330 (propagated-inputs
9331 `(("python-requests" ,python-requests)
9332 ("python-six" ,python-six)))
9333 (home-page "https://github.com/cablehead/python-consul")
9334 (synopsis "Python client for Consul")
9335 (description
9336 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9337 discovery, monitoring and configuration.")
9338 (license license:expat)))
9339
9340 (define-public python2-consul
9341 (package-with-python2 python-consul))
9342
9343 (define-public python-schematics
9344 (package
9345 (name "python-schematics")
9346 (version "1.1.1")
9347 (source
9348 (origin
9349 (method url-fetch)
9350 (uri (string-append
9351 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9352 (file-name (string-append name "-" version ".tar.gz"))
9353 (sha256
9354 (base32
9355 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9356 (build-system python-build-system)
9357 (propagated-inputs
9358 `(("python-six" ,python-six)))
9359 (arguments
9360 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9361 ; version requirements (eg python-coveralls)
9362 (home-page "https://github.com/schematics/schematics")
9363 (synopsis "Python Data Structures for Humans")
9364 (description "Python Data Structures for Humans.")
9365 (license license:bsd-3)))
9366
9367 (define-public python2-schematics
9368 (package-with-python2 python-schematics))
9369
9370 (define-public python-odfpy
9371 (package
9372 (name "python-odfpy")
9373 (version "1.3.3")
9374 (source (origin
9375 (method url-fetch)
9376 (uri (pypi-uri "odfpy" version))
9377 (sha256
9378 (base32
9379 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9380 (arguments
9381 `(#:modules ((srfi srfi-1)
9382 (guix build python-build-system)
9383 (guix build utils))
9384 #:phases
9385 (modify-phases %standard-phases
9386 (replace 'check
9387 ;; The test runner invokes python2 and python3 for test*.py.
9388 ;; To avoid having both in inputs, we replicate it here.
9389 (lambda _
9390 (every (lambda (test-file)
9391 (zero? (system* "python" test-file)))
9392 (find-files "tests" "^test.*\\.py$")))))))
9393 (build-system python-build-system)
9394 (home-page "https://github.com/eea/odfpy")
9395 (synopsis "Python API and tools to manipulate OpenDocument files")
9396 (description "Collection of libraries and utility programs written in
9397 Python to manipulate OpenDocument 1.2 files.")
9398 (license
9399 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9400 ;; number of files with other licenses.
9401 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9402
9403 (define-public python2-odfpy
9404 (package-with-python2 python-odfpy))
9405
9406 (define-public python-natsort
9407 (package
9408 (name "python-natsort")
9409 (version "5.0.2")
9410 (source (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "natsort" version))
9413 (sha256
9414 (base32
9415 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9416 (build-system python-build-system)
9417 (arguments
9418 `(#:phases
9419 (modify-phases %standard-phases
9420 (add-before 'check 'set-cachedir
9421 ;; Tests require write access to $HOME by default
9422 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9423 (native-inputs
9424 `(("python-hypothesis" ,python-hypothesis)
9425 ("python-pytest-cache" ,python-pytest-cache)
9426 ("python-pytest-cov" ,python-pytest-cov)
9427 ("python-pytest-flakes" ,python-pytest-flakes)
9428 ("python-pytest-pep8" ,python-pytest-pep8)))
9429 (propagated-inputs ; TODO: Add python-fastnumbers.
9430 `(("python-pyicu" ,python-pyicu)))
9431 (home-page "https://github.com/SethMMorton/natsort")
9432 (synopsis "Natural sorting for python and shell")
9433 (description
9434 "Natsort lets you apply natural sorting on lists instead of
9435 lexicographical. If you use the built-in @code{sorted} method in python
9436 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9437 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9438 function @code{natsorted} that identifies numbers and sorts them separately
9439 from strings. It can also sort version numbers, real numbers, mixed types
9440 and more, and comes with a shell command @command{natsort} that exposes this
9441 functionality in the command line.")
9442 (license license:expat)
9443 (properties `((python2-variant . ,(delay python2-natsort))))))
9444
9445 (define-public python2-natsort
9446 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9447 (package (inherit base)
9448 (native-inputs
9449 `(("python2-pathlib" ,python2-pathlib)
9450 ("python2-mock" ,python2-mock)
9451 ("python2-enum34" ,python2-enum34)
9452 ,@(package-native-inputs base))))))
9453
9454 (define-public python-glances
9455 (package
9456 (name "python-glances")
9457 (version "2.7.1")
9458 (source
9459 (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "Glances" version))
9462 (sha256
9463 (base32
9464 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9465 (build-system python-build-system)
9466 (propagated-inputs
9467 `(("python-psutil" ,python-psutil)))
9468 (home-page
9469 "https://github.com/nicolargo/glances")
9470 (synopsis
9471 "A cross-platform curses-based monitoring tool")
9472 (description
9473 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9474 Glances uses the PsUtil library to get information from your system. It monitors
9475 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9476 (license license:lgpl3+)))
9477
9478 (define-public python2-glances
9479 (package-with-python2 python-glances))
9480
9481 (define-public python-graphql-core
9482 (package
9483 (name "python-graphql-core")
9484 (version "0.5.3")
9485 (source
9486 (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "graphql-core" version))
9489 (sha256
9490 (base32
9491 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9492 (build-system python-build-system)
9493 (arguments
9494 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9495 #:phases
9496 (modify-phases %standard-phases
9497 (add-after 'unpack 'patch-hardcoded-version
9498 (lambda _ (substitute*
9499 "setup.py"
9500 (("'gevent==1.1rc1'") "'gevent'"))
9501 #t)))))
9502 (native-inputs
9503 `(("python-gevent" ,python-gevent)
9504 ("python-mock" ,python-mock)
9505 ("python-pytest-mock" ,python-pytest-mock)))
9506 (propagated-inputs
9507 `(("python-promise" ,python-promise)
9508 ("python-six" ,python-six)))
9509 (home-page "https://github.com/graphql-python/graphql-core")
9510 (synopsis "GraphQL implementation for Python")
9511 (description
9512 "GraphQL implementation for Python. GraphQL is a data query language and
9513 runtime designed and used to request and deliver data to mobile and web apps.
9514 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9515 to Python.")
9516 (license license:expat)))
9517
9518 (define-public python2-graphql-core
9519 (package-with-python2 python-graphql-core))
9520
9521 (define-public python-graphql-relay
9522 (package
9523 (name "python-graphql-relay")
9524 (version "0.4.5")
9525 (source
9526 (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "graphql-relay" version))
9529 (sha256
9530 (base32
9531 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9532 (build-system python-build-system)
9533 (native-inputs
9534 `(("python-pytest" ,python-pytest)))
9535 (propagated-inputs
9536 `(("python-graphql-core" ,python-graphql-core)
9537 ("python-promise" ,python-promise)
9538 ("python-six" ,python-six)))
9539 (home-page "https://github.com/graphql-python/graphql-relay-py")
9540 (synopsis "Relay implementation for Python")
9541 (description
9542 "This is a library to allow the easy creation of Relay-compliant servers
9543 using the GraphQL Python reference implementation of a GraphQL server. It
9544 should be noted that the code is a exact port of the original
9545 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9546 from Facebook.")
9547 (license license:expat)))
9548
9549 (define-public python2-graphql-relay
9550 (package-with-python2 python-graphql-relay))
9551
9552 (define-public python-graphene
9553 (package
9554 (name "python-graphene")
9555 (version "0.10.2")
9556 (source
9557 (origin
9558 (method url-fetch)
9559 (uri (pypi-uri "graphene" version))
9560 (sha256
9561 (base32
9562 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9563 (build-system python-build-system)
9564 (propagated-inputs
9565 `(("python-graphql-core" ,python-graphql-core)
9566 ("python-graphql-relay" ,python-graphql-relay)
9567 ("python-iso8601" ,python-iso8601)
9568 ("python-promise" ,python-promise)
9569 ("python-six" ,python-six)))
9570 (arguments
9571 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9572 (home-page "http://graphene-python.org/")
9573 (synopsis "GraphQL Framework for Python")
9574 (description
9575 "Graphene is a Python library for building GraphQL schemas/types.
9576 A GraphQL schema describes your data model, and provides a GraphQL server
9577 with an associated set of resolve methods that know how to fetch data.")
9578 (properties `((python2-variant . ,(delay python2-graphene))))
9579 (license license:expat)))
9580
9581 (define-public python2-graphene
9582 (let ((base (package-with-python2
9583 (strip-python2-variant python-graphene))))
9584 (package (inherit base)
9585 (native-inputs
9586 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9587 ,@(package-native-inputs base))))))
9588
9589 (define-public python-nautilus
9590 (package
9591 (name "python-nautilus")
9592 (version "0.4.9")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "nautilus" version))
9597 (sha256
9598 (base32
9599 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9600 (build-system python-build-system)
9601 (arguments `(#:tests? #f)) ; fails to import test modules
9602 (propagated-inputs
9603 `(("python-bcrypt" ,python-bcrypt)
9604 ("python-click" ,python-click)
9605 ("python-consul" ,python-consul)
9606 ("python-graphene" ,python-graphene)
9607 ("python-jinja2" ,python-jinja2)
9608 ("python-peewee" ,python-peewee)
9609 ("python-pika" ,python-pika)
9610 ("python-tornado" ,python-tornado)
9611 ("python-wtforms" ,python-wtforms)))
9612 (native-inputs
9613 `(("python-nose2" ,python-nose2)))
9614 (home-page "https://github.com/AlecAivazis/nautilus")
9615 (synopsis "Library for creating microservice applications")
9616 (description
9617 "Nautilus is a framework for flux based microservices that looks to
9618 provide extendible implementations of common aspects of a cloud so that you can
9619 focus on building massively scalable web applications.")
9620 (license license:expat)))
9621
9622 (define-public python-snowballstemmer
9623 (package
9624 (name "python-snowballstemmer")
9625 (version "1.2.1")
9626 (source (origin
9627 (method url-fetch)
9628 (uri (pypi-uri "snowballstemmer" version))
9629 (sha256
9630 (base32
9631 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9632 (build-system python-build-system)
9633 (arguments
9634 `(;; No tests exist
9635 #:tests? #f))
9636 (home-page "https://github.com/shibukawa/snowball_py")
9637 (synopsis "Snowball stemming library collection for Python")
9638 (description "This package provides 16 word stemmer algorithms generated
9639 from Snowball algorithms. It includes the 15 original ones plus the Poerter
9640 English stemmer.")
9641 (license license:bsd-3)))
9642
9643 (define-public python2-snowballstemmer
9644 (package-with-python2 python-snowballstemmer))
9645
9646 (define-public python-sphinx-cloud-sptheme
9647 (package
9648 (name "python-sphinx-cloud-sptheme")
9649 (version "1.8.0")
9650 (source (origin
9651 (method url-fetch)
9652 (uri (pypi-uri "cloud_sptheme" version))
9653 (sha256
9654 (base32
9655 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
9656 (build-system python-build-system)
9657 ;; FIXME: The 'pypi' release archive does not contain tests.
9658 (arguments '(#:tests? #f))
9659 (native-inputs
9660 `(("python-sphinx" ,python-sphinx)))
9661 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
9662 (synopsis "'Cloud' theme for Sphinx documenter")
9663 (description "This package contains the \"Cloud\" theme for Sphinx and some
9664 related extensions.")
9665 (license license:bsd-3)))
9666
9667 (define-public python2-sphinx-cloud-sptheme
9668 (package-with-python2 python-sphinx-cloud-sptheme))
9669
9670 (define-public python-sphinx-alabaster-theme
9671 (package
9672 (name "python-sphinx-alabaster-theme")
9673 (version "0.7.9")
9674 (source (origin
9675 (method url-fetch)
9676 (uri (pypi-uri "alabaster" version))
9677 (sha256
9678 (base32
9679 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
9680 (build-system python-build-system)
9681 (propagated-inputs
9682 `(("python-pygments" ,python-pygments)))
9683 (home-page "https://alabaster.readthedocs.io/")
9684 (synopsis "Configurable sidebar-enabled Sphinx theme")
9685 (description "Alabaster is a visually (c)lean, responsive, configurable
9686 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
9687 (license license:bsd-3)))
9688
9689 (define-public python2-sphinx-alabaster-theme
9690 (package-with-python2 python-sphinx-alabaster-theme))
9691
9692 (define-public python-setproctitle
9693 (package
9694 (name "python-setproctitle")
9695 (version "1.1.10")
9696 (source
9697 (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "setproctitle" version))
9700 (sha256
9701 (base32
9702 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
9703 (build-system python-build-system)
9704 (arguments
9705 '(#:phases
9706 (modify-phases %standard-phases
9707 (add-before 'check 'patch-Makefile
9708 ;; Stricly this is only required for the python2 variant.
9709 ;; But adding a phase in an inherited package seems to be
9710 ;; cumbersum. So we patch even for python3.
9711 (lambda _
9712 (let ((nose (assoc-ref %build-inputs "python2-nose")))
9713 (when nose
9714 (substitute* "Makefile"
9715 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
9716 (string-append nose "/bin/nosetests "))))
9717 #t)))
9718 (replace 'check
9719 (lambda _
9720 (setenv "PYTHON" (or (which "python3") (which "python")))
9721 (setenv "PYCONFIG" (or (which "python3-config")
9722 (which "python-config")))
9723 (setenv "CC" "gcc")
9724 ;; No need to extend PYTHONPATH to find the built package, since
9725 ;; the Makefile will build anyway
9726 (zero? (system* "make" "check")))))))
9727 (native-inputs
9728 `(("procps" ,procps))) ; required for tests
9729 (home-page
9730 "https://github.com/dvarrazzo/py-setproctitle")
9731 (synopsis
9732 "Setproctitle implementation for Python to customize the process title")
9733 (description "The library allows a process to change its title (as displayed
9734 by system tools such as ps and top).
9735
9736 Changing the title is mostly useful in multi-process systems, for
9737 example when a master process is forked: changing the children's title
9738 allows to identify the task each process is busy with. The technique
9739 is used by PostgreSQL and the OpenSSH Server for example.")
9740 (license license:bsd-3)
9741 (properties `((python2-variant . ,(delay python2-setproctitle))))))
9742
9743 (define-public python2-setproctitle
9744 (let ((base (package-with-python2
9745 (strip-python2-variant python-setproctitle))))
9746 (package
9747 (inherit base)
9748 (native-inputs `(("python2-nose" ,python2-nose)
9749 ,@(package-native-inputs base))))))
9750
9751 (define-public python-validictory
9752 (package
9753 (name "python-validictory")
9754 (version "1.0.1")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "validictory" version))
9759 (sha256
9760 (base32
9761 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
9762 (build-system python-build-system)
9763 (arguments
9764 '(#:phases
9765 (modify-phases %standard-phases
9766 (add-after 'unpack 'bootstrap
9767 ;; Move the tests out of the package directory to avoid
9768 ;; packaging them.
9769 (lambda* _
9770 (rename-file "validictory/tests" "tests")
9771 (delete-file "tests/__init__.py")))
9772 (replace 'check
9773 (lambda _
9774 ;; Extend PYTHONPATH so the built package will be found.
9775 (setenv "PYTHONPATH"
9776 (string-append (getcwd) "/build/lib:"
9777 (getenv "PYTHONPATH")))
9778 (zero? (system* "py.test" "-vv" )))))))
9779 (native-inputs
9780 `(("python-pytest" ,python-pytest)))
9781 (home-page
9782 "https://github.com/jamesturk/validictory")
9783 (synopsis "General purpose Python data validator")
9784 (description "It allows validation of arbitrary Python data structures.
9785
9786 The schema format is based on the JSON Schema
9787 proposal (http://json-schema.org), so combined with json the library is also
9788 useful as a validator for JSON data.")
9789 (license license:expat)))
9790
9791 (define-public python2-validictory
9792 (package-with-python2 python-validictory))
9793
9794 (define-public python-pyev
9795 (package
9796 (name "python-pyev")
9797 (version "0.9.0")
9798 (source
9799 (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "pyev" version))
9802 (sha256
9803 (base32
9804 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
9805 (build-system python-build-system)
9806 (arguments
9807 `(#:tests? #f ; no test suite
9808 #:phases
9809 (modify-phases %standard-phases
9810 (add-after 'unpack 'patch
9811 (lambda* (#:key inputs #:allow-other-keys)
9812 (let ((libev (string-append (assoc-ref inputs "libev")
9813 "/lib/libev.so.4")))
9814 (substitute* "setup.py"
9815 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
9816 (string-append "libev_dll_name = \"" libev "\"")))))))))
9817 (inputs
9818 `(("libev" ,libev)))
9819 (home-page "http://pythonhosted.org/pyev/")
9820 (synopsis "Python libev interface")
9821 (description "Pyev provides a Python interface to libev.")
9822 (license license:gpl3)))
9823
9824 (define-public python2-pyev
9825 (package-with-python2 python-pyev))
9826
9827 (define-public python-imagesize
9828 (package
9829 (name "python-imagesize")
9830 (version "0.7.1")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "imagesize" version))
9835 (sha256
9836 (base32
9837 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
9838 (build-system python-build-system)
9839 (arguments
9840 '(;; Test files are not distributed on PyPi:
9841 ;; https://github.com/shibukawa/imagesize_py/issues/7
9842 #:tests? #f))
9843 (home-page "https://github.com/shibukawa/imagesize_py")
9844 (synopsis "Gets image size of files in variaous formats in Python")
9845 (description
9846 "This package allows determination of image size from
9847 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
9848 (license license:expat)))
9849
9850 (define-public python2-imagesize
9851 (package-with-python2 python-imagesize))
9852
9853 (define-public python-termstyle
9854 (package
9855 (name "python-termstyle")
9856 (version "0.1.11")
9857 (source
9858 (origin
9859 (method url-fetch)
9860 (uri (pypi-uri "termstyle" version))
9861 (sha256
9862 (base32
9863 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
9864 (build-system python-build-system)
9865 (arguments
9866 '(#:phases
9867 (modify-phases %standard-phases
9868 (replace 'check
9869 (lambda _
9870 (zero? (system* "python" "test3.py")))))))
9871 (home-page "https://github.com/gfxmonk/termstyle")
9872 (synopsis "Console text coloring for Python")
9873 (description "This package provides console text coloring for Python.")
9874 (license license:bsd-3)))
9875
9876 (define-public python-argcomplete
9877 (package
9878 (name "python-argcomplete")
9879 (version "1.7.0")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "argcomplete" version))
9884 (sha256
9885 (base32
9886 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
9887 (build-system python-build-system)
9888 (native-inputs
9889 `(("python-pexpect" ,python-pexpect)
9890 ("tcsh" ,tcsh)
9891 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
9892 (home-page "https://github.com/kislyuk/argcomplete")
9893 (synopsis "Shell tab completion for Python argparse")
9894 (description "argcomplete provides extensible command line tab completion
9895 of arguments and options for Python scripts using @code{argparse}. It's
9896 particularly useful for programs with many options or sub-parsers that can
9897 dynamically suggest completions; for example, when browsing resources over the
9898 network.")
9899 (license license:asl2.0)))
9900
9901 (define-public python2-argcomplete
9902 (package-with-python2 python-argcomplete))
9903
9904 (define-public python-xopen
9905 (package
9906 (name "python-xopen")
9907 (version "0.1.1")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "xopen" version))
9912 (sha256
9913 (base32
9914 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
9915 (file-name (string-append name "-" version ".tar.gz"))))
9916 (build-system python-build-system)
9917 (home-page "https://github.com/marcelm/xopen/")
9918 (synopsis "Open compressed files transparently")
9919 (description "This module provides an @code{xopen} function that works like
9920 Python's built-in @code{open} function, but can also deal with compressed files.
9921 Supported compression formats are gzip, bzip2 and, xz, and are automatically
9922 recognized by their file extensions. The focus is on being as efficient as
9923 possible on all supported Python versions.")
9924 (license license:expat)))
9925
9926 (define-public python2-xopen
9927 (package-with-python2 python-xopen))
9928
9929 (define-public python2-cheetah
9930 (package
9931 (name "python2-cheetah")
9932 (version "2.4.4")
9933 (source
9934 (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "Cheetah" version))
9937 (sha256
9938 (base32
9939 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
9940 (build-system python-build-system)
9941 (arguments
9942 `(#:python ,python-2))
9943 (propagated-inputs
9944 `(("python2-markdown" ,python2-markdown)))
9945 (home-page "https://pythonhosted.org/Cheetah/")
9946 (synopsis "Template engine")
9947 (description "Cheetah is a text-based template engine and Python code
9948 generator.
9949
9950 Cheetah can be used as a standalone templating utility or referenced as
9951 a library from other Python applications. It has many potential uses,
9952 but web developers looking for a viable alternative to ASP, JSP, PHP and
9953 PSP are expected to be its principle user group.
9954
9955 Features:
9956 @enumerate
9957 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
9958 text-based format.
9959 @item Cleanly separates content, graphic design, and program code.
9960 @item Blends the power and flexibility of Python with a simple template language
9961 that non-programmers can understand.
9962 @item Gives template writers full access to any Python data structure, module,
9963 function, object, or method in their templates.
9964 @item Makes code reuse easy by providing an object-orientated interface to
9965 templates that is accessible from Python code or other Cheetah templates.
9966 One template can subclass another and selectively reimplement sections of it.
9967 @item Provides a simple, yet powerful, caching mechanism that can dramatically
9968 improve the performance of a dynamic website.
9969 @item Compiles templates into optimized, yet readable, Python code.
9970 @end enumerate")
9971 (license (license:x11-style "file://LICENSE"))))
9972
9973 (define-public python-dulwich
9974 (package
9975 (name "python-dulwich")
9976 (version "0.18.6")
9977 (source
9978 (origin
9979 (method url-fetch)
9980 (uri (list (string-append "https://www.dulwich.io/releases/"
9981 "dulwich-" version ".tar.gz")
9982 (pypi-uri "dulwich" version)))
9983 (sha256
9984 (base32
9985 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
9986 (build-system python-build-system)
9987 (arguments
9988 `(#:phases
9989 (modify-phases %standard-phases
9990 (add-before 'check 'fix-tests
9991 (lambda* (#:key inputs #:allow-other-keys)
9992 ;; The tests use Popen with a custom environment which doesn't
9993 ;; include PATH.
9994 (substitute* "dulwich/tests/compat/utils.py"
9995 (("'git'") (string-append "'"
9996 (which "git")
9997 "'")))
9998 (substitute* '("dulwich/tests/test_repository.py"
9999 "dulwich/tests/test_hooks.py")
10000 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10001 (setenv "TEST_RUNNER" "unittest")
10002 (setenv "PYTHONHASHSEED" "random")
10003 #t)))))
10004 (propagated-inputs
10005 `(("python-fastimport" ,python-fastimport)))
10006 (native-inputs
10007 `(("python-mock" ,python-mock)
10008 ("python-geventhttpclient" ,python-geventhttpclient)
10009 ("git" ,git)))
10010 (home-page "https://www.dulwich.io/")
10011 (synopsis "Git implementation in Python")
10012 (description "Dulwich is an implementation of the Git file formats and
10013 protocols written in pure Python.")
10014 ;; Can be used with either license.
10015 (license (list license:asl2.0 license:gpl2+))))
10016
10017 (define-public python2-dulwich
10018 (package-with-python2 python-dulwich))
10019
10020 (define-public python-pbkdf2
10021 (package
10022 (name "python-pbkdf2")
10023 (version "1.3")
10024 (source
10025 (origin
10026 (method url-fetch)
10027 (uri (pypi-uri "pbkdf2" version))
10028 (sha256
10029 (base32
10030 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10031 (build-system python-build-system)
10032 (arguments
10033 '(#:phases
10034 (modify-phases %standard-phases
10035 (replace 'check
10036 (lambda _
10037 (setenv "PYTHONPATH"
10038 (string-append (getcwd) "/build/lib:"
10039 (getenv "PYTHONPATH")))
10040 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10041 (propagated-inputs
10042 `(("python-pycrypto" ,python-pycrypto))) ; optional
10043 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10044 (synopsis "Password-based key derivation")
10045 (description "This module implements the password-based key derivation
10046 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10047
10048 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10049 is part of the RSA Public Key Cryptography Standards series. The provided
10050 implementation takes a password or a passphrase and a salt value (and
10051 optionally a iteration count, a digest module, and a MAC module) and provides
10052 a file-like object from which an arbitrarly-sized key can be read.")
10053 (license license:expat)))
10054
10055 (define-public python2-pbkdf2
10056 (package-with-python2 python-pbkdf2))
10057
10058 (define-public python-qrcode
10059 (package
10060 (name "python-qrcode")
10061 (version "5.3")
10062 (source
10063 (origin
10064 (method url-fetch)
10065 (uri (pypi-uri "qrcode" version))
10066 (sha256
10067 (base32
10068 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10069 (build-system python-build-system)
10070 (arguments
10071 ;; FIXME: Tests require packaging 'pymaging'.
10072 '(#:tests? #f))
10073 (propagated-inputs
10074 `(("python-lxml" ,python-lxml) ; for SVG output
10075 ("python-pillow" ,python-pillow) ; for PNG output
10076 ("python-six" ,python-six)))
10077 (home-page "https://github.com/lincolnloop/python-qrcode")
10078 (synopsis "QR Code image generator")
10079 (description "This package provides a pure Python QR Code generator
10080 module. It uses the Python Imaging Library (PIL) to allow for the generation
10081 of QR Codes.
10082
10083 In addition this package provides a command line tool to generate QR codes and
10084 either write these QR codes to a file or do the output as ascii art at the
10085 console.")
10086 (license license:bsd-3)))
10087
10088 (define-public python2-qrcode
10089 (package-with-python2 python-qrcode))
10090
10091 (define-public python-rst2ansi
10092 (package
10093 (name "python-rst2ansi")
10094 (version "0.1.5")
10095 (source
10096 (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "rst2ansi" version))
10099 (sha256
10100 (base32
10101 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10102 (build-system python-build-system)
10103 (propagated-inputs
10104 `(("python-docutils" ,python-docutils)))
10105 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10106 (synopsis "Convert RST to ANSI-decorated console output")
10107 (description
10108 "Python module dedicated to rendering RST (reStructuredText) documents
10109 to ansi-escaped strings suitable for display in a terminal.")
10110 (license license:expat)))
10111
10112 (define-public python-ansi2html
10113 (package
10114 (name "python-ansi2html")
10115 (version "1.2.0")
10116 (source
10117 (origin
10118 (method url-fetch)
10119 (uri (pypi-uri "ansi2html" version))
10120 (sha256
10121 (base32
10122 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10123 (build-system python-build-system)
10124 (native-inputs
10125 `(("python-mock" ,python-mock)
10126 ("python-nose" ,python-nose)))
10127 (propagated-inputs
10128 `(("python-six" ,python-six)))
10129 (home-page "https://github.com/ralphbean/ansi2html")
10130 (synopsis "Convert ANSI-decorated console output to HTML")
10131 (description
10132 "@command{ansi2html} is a Python library and command line utility for
10133 convering text with ANSI color codes to HTML or LaTeX.")
10134 (license license:gpl3+)))
10135
10136 (define-public python2-ansi2html
10137 (package-with-python2 python-ansi2html))
10138
10139 (define-public python-ddt
10140 (package
10141 (name "python-ddt")
10142 (version "1.1.1")
10143 (source
10144 (origin
10145 (method url-fetch)
10146 (uri (pypi-uri "ddt" version))
10147 (sha256
10148 (base32
10149 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
10150 (build-system python-build-system)
10151 (native-inputs
10152 `(("python-mock" ,python-mock)
10153 ("python-nose" ,python-nose)))
10154 (propagated-inputs
10155 `(("python-six" ,python-six)
10156 ("python-pyyaml" ,python-pyyaml)))
10157 (home-page "https://github.com/txels/ddt")
10158 (synopsis "Data-Driven Tests")
10159 (description
10160 "DDT (Data-Driven Tests) allows you to multiply one test case by running
10161 it with different test data, and make it appear as multiple test cases.")
10162 (license license:expat)))
10163
10164 (define-public python2-ddt
10165 (package-with-python2 python-ddt))
10166
10167 (define-public python-pycosat
10168 (package
10169 (name "python-pycosat")
10170 (version "0.6.1")
10171 (source
10172 (origin
10173 (method url-fetch)
10174 (uri (pypi-uri "pycosat" version))
10175 (sha256
10176 (base32
10177 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10178 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10179 (build-system python-build-system)
10180 (home-page "https://github.com/ContinuumIO/pycosat")
10181 (synopsis "Bindings to picosat (a SAT solver)")
10182 (description
10183 "This package provides efficient Python bindings to @code{picosat} on
10184 the C level. When importing pycosat, the @code{picosat} solver becomes part
10185 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10186 Problem} (SAT) solver.")
10187 (license license:expat)))
10188
10189 (define-public python2-pycosat
10190 (package-with-python2 python-pycosat))
10191
10192 (define-public python2-ruamel.ordereddict
10193 (package
10194 (name "python2-ruamel.ordereddict")
10195 (version "0.4.9")
10196 (source
10197 (origin
10198 (method url-fetch)
10199 (uri (pypi-uri "ruamel.ordereddict" version))
10200 (sha256
10201 (base32
10202 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10203 (build-system python-build-system)
10204 (arguments
10205 `(#:python ,python-2
10206 #:phases
10207 (modify-phases %standard-phases
10208 (delete 'check)
10209 (add-after 'install 'check
10210 (lambda* (#:key inputs outputs #:allow-other-keys)
10211 (add-installed-pythonpath inputs outputs)
10212 (zero? (system* "python" "test/testordereddict.py")))))))
10213 (home-page "https://bitbucket.org/ruamel/ordereddict")
10214 (synopsis "Version of dict that keeps keys in insertion order")
10215 (description
10216 "This is an implementation of an ordered dictionary with @dfn{Key
10217 Insertion Order} (KIO: updates of values do not affect the position of the
10218 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10219 removed and put at the back). The standard library module @code{OrderedDict},
10220 implemented later, implements a subset of @code{ordereddict} functionality.
10221 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10222 Order} (KSO, no sorting function can be specified, but a transform can be
10223 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10224 (license license:expat)))
10225
10226 (define-public python-pypeg2
10227 (package
10228 (name "python-pypeg2")
10229 (version "2.15.2")
10230 (source
10231 (origin
10232 (method url-fetch)
10233 (uri (pypi-uri "pyPEG2" version))
10234 (sha256
10235 (base32
10236 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10237 (build-system python-build-system)
10238 (propagated-inputs `(("python-lxml" ,python-lxml)))
10239 (arguments
10240 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10241 '(#:tests? #f))
10242 (home-page "https://fdik.org/pyPEG/")
10243 (synopsis "Parsering Expression Grammars in Python")
10244 (description "PyPEG is an intrinsic parser interpreter framework for
10245 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10246 parse many formal languages.")
10247 (license license:gpl2)))
10248
10249 (define-public python-incremental
10250 (package
10251 (name "python-incremental")
10252 (version "17.5.0")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "incremental" version))
10257 (sha256
10258 (base32
10259 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10260 (build-system python-build-system)
10261 (home-page "https://github.com/hawkowl/incremental")
10262 (synopsis "Library for versioning Python projects")
10263 (description "Incremental is a small library that versions your Python
10264 projects.")
10265 (license license:expat)))
10266
10267 (define-public python2-incremental
10268 (package-with-python2 python-incremental))
10269
10270 (define-public python-automat
10271 (package
10272 (name "python-automat")
10273 (version "0.6.0")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "Automat" version))
10277 (sha256
10278 (base32
10279 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10280 (build-system python-build-system)
10281 ;; We disable the tests because they require python-twisted, while
10282 ;; python-twisted depends on python-automat. Twisted is optional, but the
10283 ;; tests fail if it is not available. Also see
10284 ;; <https://github.com/glyph/automat/issues/71>.
10285 (arguments '(#:tests? #f))
10286 (native-inputs
10287 `(("python-m2r" ,python-m2r)
10288 ("python-setuptools-scm" ,python-setuptools-scm)
10289 ("python-graphviz" ,python-graphviz)))
10290 (propagated-inputs
10291 `(("python-six" ,python-six)
10292 ("python-attrs" ,python-attrs)))
10293 (home-page "https://github.com/glyph/Automat")
10294 (synopsis "Self-service finite-state machines")
10295 (description "Automat is a library for concise, idiomatic Python
10296 expression of finite-state automata (particularly deterministic finite-state
10297 transducers).")
10298 (license license:expat)))
10299
10300 (define-public python2-automat
10301 (package-with-python2 python-automat))
10302
10303 (define-public python-m2r
10304 (package
10305 (name "python-m2r")
10306 (version "0.1.12")
10307 (source (origin
10308 (method url-fetch)
10309 (uri (pypi-uri "m2r" version))
10310 (sha256
10311 (base32
10312 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10313 (build-system python-build-system)
10314 (propagated-inputs
10315 `(("python-docutils" ,python-docutils)
10316 ("python-mistune" ,python-mistune)))
10317 (native-inputs
10318 `(("python-pygments" ,python-pygments)
10319 ("python-mock" ,python-mock)))
10320 (home-page "https://github.com/miyakogi/m2r")
10321 (synopsis "Markdown to reStructuredText converter")
10322 (description "M2R converts a markdown file including reST markups to valid
10323 reST format.")
10324 (license license:expat)))
10325
10326 (define-public python2-m2r
10327 (package-with-python2 python-m2r))
10328
10329 (define-public python-constantly
10330 (package
10331 (name "python-constantly")
10332 (version "15.1.0")
10333 (source (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "constantly" version))
10336 (sha256
10337 (base32
10338 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10339 (build-system python-build-system)
10340 (home-page "https://github.com/twisted/constantly")
10341 (synopsis "Symbolic constants in Python")
10342 (description "Constantly is a Python library that provides symbolic
10343 constant support. It includes collections and constants with text, numeric,
10344 and bit flag values.")
10345 (license license:expat)))
10346
10347 (define-public python2-constantly
10348 (package-with-python2 python-constantly))
10349
10350 (define-public python-attrs
10351 (package
10352 (name "python-attrs")
10353 (version "17.2.0")
10354 (source (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "attrs" version))
10357 (sha256
10358 (base32
10359 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10360 (build-system python-build-system)
10361 (native-inputs
10362 `(("python-pytest" ,python-pytest)
10363 ("python-hypothesis" ,python-hypothesis)
10364 ("python-zope-interface" ,python-zope-interface)
10365 ("python-six" ,python-six)))
10366 (home-page "https://github.com/python-attrs/attrs/")
10367 (synopsis "Attributes without boilerplate")
10368 (description "@code{attrs} is a Python package with class decorators that
10369 ease the chores of implementing the most common attribute-related object
10370 protocols.")
10371 (license license:expat)))
10372
10373 (define-public python2-attrs
10374 (package-with-python2 python-attrs))
10375
10376 (define-public python2-cliapp
10377 (package
10378 (name "python2-cliapp")
10379 (version "1.20170823")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (string-append
10384 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10385 version ".tar.gz"))
10386 (sha256
10387 (base32
10388 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10389 (build-system python-build-system)
10390 (arguments
10391 `(#:python ,python-2
10392 #:phases
10393 (modify-phases %standard-phases
10394 ;; check phase needs to be run before the build phase. If not,
10395 ;; coverage-test-runner looks for tests for the built source files,
10396 ;; and fails.
10397 (delete 'check)
10398 (add-before 'build 'check
10399 (lambda _
10400 ;; Disable python3 tests
10401 (substitute* "check"
10402 (("python3") "# python3"))
10403 (zero? (system* "./check")))))))
10404 (native-inputs
10405 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10406 ("python2-pep8" ,python2-pep8)))
10407 (propagated-inputs
10408 `(("python2-pyaml" ,python2-pyaml)))
10409 (home-page "https://liw.fi/cliapp/")
10410 (synopsis "Python framework for command line programs")
10411 (description "@code{python2-cliapp} is a python framework for
10412 command line programs. It contains the typical stuff such programs
10413 need to do, such as parsing the command line for options, and
10414 iterating over input files.")
10415 (license license:gpl2+)))
10416
10417 (define-public python2-ttystatus
10418 (package
10419 (name "python2-ttystatus")
10420 (version "0.35")
10421 (source
10422 (origin
10423 (method url-fetch)
10424 (uri (string-append
10425 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10426 version ".tar.gz"))
10427 (sha256
10428 (base32
10429 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10430 (build-system python-build-system)
10431 (native-inputs
10432 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10433 ("python2-pep8" ,python2-pep8)))
10434 (arguments
10435 `(#:python ,python-2
10436 #:phases
10437 (modify-phases %standard-phases
10438 ;; check phase needs to be run before the build phase. If not,
10439 ;; coverage-test-runner looks for tests for the built source files,
10440 ;; and fails.
10441 (delete 'check)
10442 (add-before 'build 'check
10443 (lambda _
10444 (zero? (system* "make" "check")))))))
10445 (home-page "https://liw.fi/ttystatus/")
10446 (synopsis "Python library for showing progress reporting and
10447 status updates on terminals")
10448 (description "@code{python2-ttystatus} is a python library for
10449 showing progress reporting and status updates on terminals, for
10450 command line programs. Output is automatically adapted to the width
10451 of the terminal: truncated if it does not fit, and resized if the
10452 terminal size changes.")
10453 (license license:gpl3+)))
10454
10455 (define-public python2-tracing
10456 (package
10457 (name "python2-tracing")
10458 (version "0.10")
10459 (source
10460 (origin
10461 (method url-fetch)
10462 (uri (string-append
10463 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10464 version ".tar.gz"))
10465 (sha256
10466 (base32
10467 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10468 (build-system python-build-system)
10469 (arguments
10470 `(#:python ,python-2))
10471 (home-page "https://liw.fi/tracing/")
10472 (synopsis "Python debug logging helper")
10473 (description "@code{python2-tracing} is a python library for
10474 logging debug messages. It provides a way to turn debugging messages
10475 on and off, based on the filename they occur in. It is much faster
10476 than using @code{logging.Filter} to accomplish the same thing, which
10477 matters when code is run in production mode. The actual logging still
10478 happens using the @code{logging} library.")
10479 (license license:gpl3+)))
10480
10481 (define-public python2-larch
10482 (package
10483 (name "python2-larch")
10484 (version "1.20151025")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (string-append
10489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10490 version ".tar.gz"))
10491 (patches (search-patches
10492 "python2-larch-coverage-4.0a6-compatibility.patch"))
10493 (sha256
10494 (base32
10495 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10496 (build-system python-build-system)
10497 (arguments
10498 `(#:python ,python-2
10499 #:phases
10500 (modify-phases %standard-phases
10501 ;; check phase needs to be run before the build phase. If not,
10502 ;; coverage-test-runner looks for tests for the built source files,
10503 ;; and fails.
10504 (delete 'check)
10505 (add-before 'build 'check
10506 (lambda _
10507 (zero? (system* "make" "check")))))))
10508 (native-inputs
10509 `(("cmdtest" ,cmdtest)
10510 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10511 (propagated-inputs
10512 `(("python2-tracing" ,python2-tracing)))
10513 (home-page "https://liw.fi/larch/")
10514 (synopsis "Python copy-on-write B-tree library")
10515 (description "@code{python2-larch} is an implementation of
10516 particular kind of B-tree, based on research by Ohad Rodeh. See
10517 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10518 on the data structure.
10519
10520 The distinctive feature of this B-tree is that a node is never
10521 (conceptually) modified. Instead, all updates are done by
10522 copy-on-write. This makes it easy to clone a tree, and modify only the
10523 clone, while other processes access the original tree.")
10524 (license license:gpl3+)))
10525
10526 (define-public python-astroid
10527 (package
10528 (name "python-astroid")
10529 (version "1.5.3")
10530 (source
10531 (origin
10532 (method url-fetch)
10533 (uri (string-append
10534 "https://github.com/PyCQA/astroid/archive/astroid-"
10535 version ".tar.gz"))
10536 (sha256
10537 (base32
10538 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10539 (build-system python-build-system)
10540 (propagated-inputs
10541 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10542 ("python-six" ,python-six)
10543 ("python-wrapt" ,python-wrapt)))
10544 (arguments
10545 `(#:phases
10546 (modify-phases %standard-phases
10547 (replace 'check
10548 (lambda _
10549 (zero? (system* "python" "-m" "unittest" "discover"
10550 "-p" "unittest*.py")))))))
10551 (home-page "https://github.com/PyCQA/astroid")
10552 (synopsis "Common base representation of python source code for pylint and
10553 other projects")
10554 (description "@code{python-astroid} provides a common base representation
10555 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10556
10557 It provides a compatible representation which comes from the _ast module. It
10558 rebuilds the tree generated by the builtin _ast module by recursively walking
10559 down the AST and building an extended ast. The new node classes have
10560 additional methods and attributes for different usages. They include some
10561 support for static inference and local name scopes. Furthermore, astroid
10562 builds partial trees by inspecting living objects.")
10563 (license license:lgpl2.1+)
10564 (properties `((python2-variant . ,(delay python2-astroid))))))
10565
10566 (define-public python2-astroid
10567 (let ((base (package-with-python2
10568 (strip-python2-variant python-astroid))))
10569 (package (inherit base)
10570 (propagated-inputs
10571 `(("python2-backports-functools-lru-cache"
10572 ,python2-backports-functools-lru-cache)
10573 ("python2-enum34" ,python2-enum34)
10574 ("python2-singledispatch" ,python2-singledispatch)
10575 ,@(package-propagated-inputs base))))))
10576
10577 (define-public python-isort
10578 (package
10579 (name "python-isort")
10580 (version "4.2.5")
10581 (source
10582 (origin
10583 (method url-fetch)
10584 (uri (string-append
10585 "https://github.com/timothycrosley/isort/archive/"
10586 version ".tar.gz"))
10587 (file-name (string-append name "-" version ".tar.gz"))
10588 (sha256
10589 (base32
10590 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10591 (build-system python-build-system)
10592 (native-inputs
10593 `(("python-mock" ,python-mock)
10594 ("python-pytest" ,python-pytest)))
10595 (home-page "https://github.com/timothycrosley/isort")
10596 (synopsis "Python utility/library to sort python imports")
10597 (description "@code{python-isort} is a python utility/library to sort
10598 imports alphabetically, and automatically separated into sections. It
10599 provides a command line utility, a python library and plugins for various
10600 editors.")
10601 (license license:expat)))
10602
10603 (define-public python2-isort
10604 (package-with-python2 python-isort))
10605
10606 (define-public python2-backports-functools-lru-cache
10607 (package
10608 (name "python2-backports-functools-lru-cache")
10609 (version "1.3")
10610 (source
10611 (origin
10612 (method url-fetch)
10613 ;; only the pypi tarballs contain the necessary metadata
10614 (uri (pypi-uri "backports.functools_lru_cache" version))
10615 (sha256
10616 (base32
10617 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10618 (build-system python-build-system)
10619 (native-inputs
10620 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10621 (arguments
10622 `(#:python ,python-2))
10623 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10624 (synopsis "Backport of functools.lru_cache from Python 3.3")
10625 (description "@code{python2-backports-functools-lru-cache} is a backport
10626 of @code{functools.lru_cache} from python 3.3.")
10627 (license license:expat)))
10628
10629 (define-public python-configparser
10630 (package
10631 (name "python-configparser")
10632 (version "3.5.0")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (string-append
10637 "https://bitbucket.org/ambv/configparser/get/"
10638 version ".tar.bz2"))
10639 (file-name (string-append name "-" version ".tar.gz"))
10640 (sha256
10641 (base32
10642 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
10643 (build-system python-build-system)
10644 (home-page "http://docs.python.org/py3k/library/configparser.html")
10645 (synopsis "Backport of configparser from python 3.5")
10646 (description "@code{python-configparser} is a backport of
10647 @code{configparser} from Python 3.5 so that it can be used directly
10648 in other versions.")
10649 (license license:expat)))
10650
10651 (define-public python2-configparser
10652 (package-with-python2 python-configparser))
10653
10654 (define-public python-mando
10655 (package
10656 (name "python-mando")
10657 (version "0.5")
10658 (source
10659 (origin
10660 (method url-fetch)
10661 (uri (pypi-uri "mando" version))
10662 (sha256
10663 (base32
10664 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
10665 (build-system python-build-system)
10666 (propagated-inputs
10667 `(("python-rst2ansi" ,python-rst2ansi)))
10668 (native-inputs
10669 `(("python-sphinx" ,python-sphinx-1.5.3)
10670 ("python-paramunittest" ,python-paramunittest)))
10671 (home-page "https://mando.readthedocs.org/")
10672 (synopsis
10673 "Wrapper around argparse, allowing creation of complete CLI applications")
10674 (description
10675 "This package is a wrapper around argparse, allowing you to write complete CLI
10676 applications in seconds while maintaining all the flexibility.")
10677 (license license:expat)))
10678
10679 (define-public python2-mando
10680 (package-with-python2 python-mando))
10681
10682 (define-public python-mando-0.3.1
10683 ;; python-radon (version 1.5.0) has a requirement
10684 ;; for mando<0.4,>=0.3
10685 (package
10686 (inherit python-mando)
10687 (name "python-mando")
10688 (version "0.3.1")
10689 (source
10690 (origin
10691 (method url-fetch)
10692 (uri (string-append "https://github.com/rubik/mando/archive/v"
10693 version
10694 ".tar.gz"))
10695 (sha256
10696 (base32
10697 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
10698
10699 (define-public python-fudge
10700 (package
10701 (name "python-fudge")
10702 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
10703 ;; package, which is currently the only use of this package.
10704 (version "0.9.6")
10705 (source
10706 (origin
10707 (method url-fetch)
10708 (uri (pypi-uri "fudge" version))
10709 (sha256
10710 (base32
10711 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
10712 (build-system python-build-system)
10713 (arguments
10714 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
10715 (home-page "https://github.com/fudge-py/fudge")
10716 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
10717 (description
10718 "Fudge is a Python module for using fake objects (mocks and stubs) to
10719 test real ones.
10720
10721 In readable Python code, you declare the methods available on your fake object
10722 and how they should be called. Then you inject that into your application and
10723 start testing. This declarative approach means you don’t have to record and
10724 playback actions and you don’t have to inspect your fakes after running code.
10725 If the fake object was used incorrectly then you’ll see an informative
10726 exception message with a traceback that points to the culprit.")
10727 (license license:expat)))
10728
10729 (define-public python2-fudge
10730 (package-with-python2 python-fudge))
10731
10732 (define-public python-mwclient
10733 (package
10734 (name "python-mwclient")
10735 (version "0.8.4")
10736 (source
10737 (origin
10738 (method url-fetch)
10739 ;; The PyPI version wouldn't contain tests.
10740 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
10741 "v" version ".tar.gz"))
10742 (sha256
10743 (base32
10744 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
10745 (build-system python-build-system)
10746 (propagated-inputs
10747 `(("python-requests" ,python-requests)
10748 ("python-requests-oauthlib"
10749 ,python-requests-oauthlib)
10750 ("python-six" ,python-six)))
10751 (native-inputs
10752 `(("python-mock" ,python-mock)
10753 ("python-pytest" ,python-pytest)
10754 ("python-pytest-pep8" ,python-pytest-pep8)
10755 ("python-pytest-cache" ,python-pytest-cache)
10756 ("python-pytest-cov" ,python-pytest-cov)
10757 ("python-responses" ,python-responses)))
10758 (home-page "https://github.com/btongminh/mwclient")
10759 (synopsis "MediaWiki API client")
10760 (description "This package provides a MediaWiki API client.")
10761 (license license:expat)))
10762
10763 (define-public python2-mwclient
10764 (package-with-python2 python-mwclient))
10765
10766 (define-public python-utils
10767 (package
10768 (name "python-utils")
10769 (version "2.1.0")
10770 (source (origin
10771 (method url-fetch)
10772 (uri (pypi-uri "python-utils" version))
10773 (sha256
10774 (base32
10775 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
10776 (build-system python-build-system)
10777 (native-inputs
10778 `(("pytest-runner" ,python-pytest-runner)
10779 ("pytest" ,python-pytest)
10780 ("six" ,python-six)))
10781 (home-page "https://github.com/WoLpH/python-utils")
10782 (synopsis "Convenient utilities not included with the standard Python install")
10783 (description
10784 "Python Utils is a collection of small Python functions and classes which
10785 make common patterns shorter and easier.")
10786 (license license:bsd-2)))
10787
10788 (define-public python2-utils
10789 (package-with-python2 python-utils))
10790
10791 (define-public python-sphinx-me
10792 (package
10793 (name "python-sphinx-me")
10794 (version "0.3")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "sphinx-me" version))
10799 (sha256
10800 (base32
10801 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
10802 (build-system python-build-system)
10803 (home-page "https://github.com/stephenmcd/sphinx-me")
10804 (synopsis "Create a Sphinx documentation shell")
10805 (description
10806 "Create a Sphinx documentation shell for your project and include the
10807 README file as the documentation index. It handles extracting the required
10808 meta data such as the project name, author and version from your project for
10809 use in your Sphinx docs.")
10810 (license license:bsd-2)))
10811
10812 (define-public python2-sphinx-me
10813 (package-with-python2 python-sphinx-me))
10814
10815 (define-public python-diff-match-patch
10816 (package
10817 (name "python-diff-match-patch")
10818 (version "20121119")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "diff-match-patch" version))
10823 (sha256
10824 (base32
10825 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
10826 (build-system python-build-system)
10827 (home-page "https://code.google.com/p/google-diff-match-patch")
10828 (synopsis "Synchronize plain text")
10829 (description "Diff Match and Patch libraries offer robust algorithms to
10830 perform the operations required for synchronizing plain text.")
10831 (license license:asl2.0)))
10832
10833 (define-public python2-diff-match-patch
10834 (package-with-python2 python-diff-match-patch))
10835
10836 (define-public python-dirsync
10837 (package
10838 (name "python-dirsync")
10839 (version "2.2.2")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "dirsync" version ".zip"))
10844 (sha256
10845 (base32
10846 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
10847 (build-system python-build-system)
10848 (native-inputs
10849 `(("unzip" ,unzip)))
10850 (propagated-inputs
10851 `(("six" ,python-six)))
10852 (home-page "https://bitbucket.org/tkhyn/dirsync")
10853 (synopsis "Advanced directory tree synchronisation tool")
10854 (description "Advanced directory tree synchronisation tool.")
10855 (license license:expat)))
10856
10857 (define-public python2-dirsync
10858 (package-with-python2 python-dirsync))
10859
10860 (define-public python-levenshtein
10861 (package
10862 (name "python-levenshtein")
10863 (version "0.12.0")
10864 (source
10865 (origin
10866 (method url-fetch)
10867 (uri (pypi-uri "python-Levenshtein" version))
10868 (sha256
10869 (base32
10870 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
10871 (build-system python-build-system)
10872 (home-page "https://github.com/ztane/python-Levenshtein")
10873 (synopsis "Fast computation of Levenshtein distance and string similarity")
10874 (description
10875 "The Levenshtein Python C extension module contains functions for fast computation of
10876 @enumerate
10877 @item Levenshtein (edit) distance, and edit operations
10878 @item string similarity
10879 @item approximate median strings, and generally string averaging
10880 @item string sequence and set similarity
10881 @end enumerate
10882 It supports both normal and Unicode strings.")
10883 (license license:gpl2+)))
10884
10885 (define-public python2-levenshtein
10886 (package-with-python2 python-levenshtein))
10887
10888 (define-public python-scandir
10889 (package
10890 (name "python-scandir")
10891 (version "1.4")
10892 (source
10893 (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "scandir" version))
10896 (sha256
10897 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
10898 (build-system python-build-system)
10899 (home-page "https://github.com/benhoyt/scandir")
10900 (synopsis "Directory iteration function")
10901 (description
10902 "Directory iteration function like os.listdir(), except that instead of
10903 returning a list of bare filenames, it yields DirEntry objects that include
10904 file type and stat information along with the name. Using scandir() increases
10905 the speed of os.walk() by 2-20 times (depending on the platform and file
10906 system) by avoiding unnecessary calls to os.stat() in most cases.")
10907 (license license:bsd-3)))
10908
10909 (define-public python2-scandir
10910 (package-with-python2 python-scandir))
10911
10912 (define-public python2-stemming
10913 (package
10914 (name "python2-stemming")
10915 (version "1.0.1")
10916 (source
10917 (origin
10918 (method url-fetch)
10919 (uri (pypi-uri "stemming" version))
10920 (sha256
10921 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
10922 (build-system python-build-system)
10923 (arguments
10924 `(#:python ,python-2))
10925 (home-page "https://bitbucket.org/mchaput/stemming/overview")
10926 (synopsis "Python implementations of various stemming algorithms")
10927 (description
10928 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
10929 stemming algorithms for English. These implementations are straightforward and
10930 efficient, unlike some Python versions of the same algorithms available on the
10931 Web. This package is an extraction of the stemming code included in the Whoosh
10932 search engine.")
10933 (license license:public-domain)))
10934
10935 (define-public python-factory-boy
10936 (package
10937 (name "python-factory-boy")
10938 (version "2.8.1")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "factory_boy" version))
10943 (sha256
10944 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
10945 (build-system python-build-system)
10946 (arguments
10947 ;; Tests are not included in the tarball.
10948 `(#:tests? #f))
10949 (propagated-inputs
10950 `(("faker" ,python-faker)))
10951 (home-page "https://github.com/benhoyt/scandir")
10952 (synopsis "Versatile test fixtures replacement")
10953 (description
10954 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
10955
10956 As a fixtures replacement tool, it aims to replace static, hard to maintain
10957 fixtures with easy-to-use factories for complex object.
10958
10959 Instead of building an exhaustive test setup with every possible combination
10960 of corner cases, factory_boy allows you to use objects customized for the
10961 current test, while only declaring the test-specific fields")
10962 (license license:expat)))
10963
10964 (define-public python2-factory-boy
10965 (package-with-python2 python-factory-boy))
10966
10967 (define-public python-translate-toolkit
10968 (package
10969 (name "python-translate-toolkit")
10970 (version "2.1.0")
10971 (source
10972 (origin
10973 (method url-fetch)
10974 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
10975 (sha256
10976 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
10977 (build-system python-build-system)
10978 (native-inputs
10979 `(("python-pytest" ,python-pytest)
10980 ("python-sphinx" ,python-sphinx)))
10981 (propagated-inputs
10982 `(("python-babel" ,python-babel)
10983 ("python-beautifulsoup4" ,python-beautifulsoup4)
10984 ("python-chardet" ,python-chardet)
10985 ("python-diff-match-patch" ,python-diff-match-patch)
10986 ("python-levenshtein" ,python-levenshtein)
10987 ("python-lxml" ,python-lxml)
10988 ("python-six" ,python-six)
10989 ("python-vobject" ,python-vobject)
10990 ("python-pyyaml" ,python-pyyaml)))
10991 (arguments
10992 ;; TODO: tests are not run, because they end with
10993 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
10994 ;; 'parse_funcs'
10995 ;; during test setup.
10996 `(#:tests? #f))
10997 (home-page "http://toolkit.translatehouse.org")
10998 (synopsis "Tools and API for translation and localization engineering")
10999 (description
11000 "Tools and API for translation and localization engineering. It contains
11001 several utilities, as well as an API for building localization tools.")
11002 (license license:gpl2+)))
11003
11004 (define-public python2-translate-toolkit
11005 (package-with-python2 python-translate-toolkit))
11006
11007 (define-public python-packaging
11008 (package
11009 (name "python-packaging")
11010 (version "16.8")
11011 (source
11012 (origin
11013 (method url-fetch)
11014 (uri (pypi-uri "packaging" version))
11015 (sha256
11016 (base32
11017 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11018 (build-system python-build-system)
11019 (native-inputs
11020 `(("python-pretend" ,python-pretend)
11021 ("python-pytest" ,python-pytest)))
11022 (propagated-inputs
11023 `(("python-pyparsing" ,python-pyparsing)
11024 ("python-six" ,python-six)))
11025 (home-page "https://github.com/pypa/packaging")
11026 (synopsis "Core utilities for Python packages")
11027 (description "Packaging is a Python module for dealing with Python packages.
11028 It offers an interface for working with package versions, names, and dependency
11029 information.")
11030 ;; From 'LICENSE': This software is made available under the terms of
11031 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11032 ;; Contributions to this software is made under the terms of *both* these
11033 ;; licenses.
11034 (license (list license:asl2.0 license:bsd-2))))
11035
11036 (define-public python2-packaging
11037 (package-with-python2 python-packaging))
11038
11039 (define-public python-relatorio
11040 (package
11041 (name "python-relatorio")
11042 (version "0.6.4")
11043 (source
11044 (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "relatorio" version))
11047 (sha256
11048 (base32
11049 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
11050 (build-system python-build-system)
11051 (propagated-inputs
11052 `(("python-lxml" ,python-lxml)
11053 ("python-genshi" ,python-genshi)))
11054 (home-page "https://relatorio.tryton.org/")
11055 (synopsis "Templating library able to output ODT and PDF files")
11056 (description "Relatorio is a templating library which provides a way to
11057 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11058 for more filetypes can be easily added by creating plugins for them.")
11059 (license license:gpl3+)))
11060
11061 (define-public python2-relatorio
11062 (package-with-python2 python-relatorio))
11063
11064 (define-public python-radon
11065 (package
11066 (name "python-radon")
11067 (version "1.5.0")
11068 (source
11069 (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "radon" version))
11072 (sha256
11073 (base32
11074 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
11075 (build-system python-build-system)
11076 (propagated-inputs
11077 `(("python-colorama" ,python-colorama)
11078 ("python-flake8-polyfill" ,python-flake8-polyfill)
11079 ("python-mando" ,python-mando-0.3.1)))
11080 (native-inputs
11081 `(("python-flake8" ,python-flake8)
11082 ("python-tox" ,python-tox)
11083 ("python-pytest" ,python-pytest)
11084 ("python-paramunittest" ,python-paramunittest)))
11085 (home-page "https://radon.readthedocs.org/")
11086 (synopsis "Code Metrics in Python")
11087 (description "Radon is a Python tool which computes various code metrics.
11088 Supported metrics are:
11089 @itemize @bullet
11090 @item raw metrics: SLOC, comment lines, blank lines, &c.
11091 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11092 @item Halstead metrics (all of them)
11093 @item the Maintainability Index (a Visual Studio metric)
11094 @end itemize")
11095 (license license:expat)))
11096
11097 (define-public python2-radon
11098 (package-with-python2 python-radon))
11099
11100 (define-public python-sure
11101 (package
11102 (name "python-sure")
11103 (version "1.4.6")
11104 (source
11105 (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "sure" version))
11108 (sha256
11109 (base32
11110 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11111 (build-system python-build-system)
11112 (propagated-inputs
11113 `(("python-mock" ,python-mock)
11114 ("python-six" ,python-six)))
11115 (native-inputs
11116 `(("python-nose" ,python-nose)))
11117 (home-page "https://github.com/gabrielfalcao/sure")
11118 (synopsis "Automated testing library in python for python")
11119 (description
11120 "Sure is a python library that leverages a DSL for writing assertions.
11121 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11122 (license license:gpl3+)))
11123
11124 (define-public python2-sure
11125 (package-with-python2 python-sure))
11126
11127 (define-public python2-couleur
11128 ;; This package does not seem to support python3 at all, hence,
11129 ;; only the python2 variant definition is provided.
11130 (package
11131 (name "python2-couleur")
11132 (version "0.6.2")
11133 (source
11134 (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "couleur" version))
11137 (sha256
11138 (base32
11139 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11140 (build-system python-build-system)
11141 (arguments
11142 `(#:python ,python-2))
11143 (home-page "https://github.com/gabrielfalcao/couleur")
11144 (synopsis
11145 "ANSI terminal tool for python, colored shell and other handy fancy features")
11146 (description
11147 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11148 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11149 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11150 ;; https://github.com/gabrielfalcao/couleur/issues/11
11151 (license license:lgpl3+)))
11152
11153 (define-public python-misaka
11154 (package
11155 (name "python-misaka")
11156 (version "2.1.0")
11157 (source
11158 (origin
11159 (method url-fetch)
11160 (uri (pypi-uri "misaka" version))
11161 (sha256
11162 (base32
11163 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11164 (build-system python-build-system)
11165 (arguments
11166 `(;; Line 37 of setup.py calls self.run_command('develop')
11167 ;; in the 'check' phase. This command seems to be trying
11168 ;; to write to
11169 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11170 ;; for which it does not have the permission to write.
11171 #:tests? #f))
11172 (propagated-inputs
11173 `(("python-cffi" ,python-cffi)))
11174 (home-page "https://github.com/FSX/misaka")
11175 (synopsis "Python binding for Hoedown")
11176 (description
11177 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11178 library written in C. It features a fast HTML renderer and functionality to make custom
11179 renderers (e.g. man pages or LaTeX).")
11180 (license license:expat)))
11181
11182 (define-public python2-misaka
11183 (package-with-python2 python-misaka))
11184
11185 (define-public python2-steadymark
11186 ;; This is forced into being a python2 only variant
11187 ;; due to its dependence on couleur that has no support
11188 ;; for python3
11189 (package
11190 (name "python2-steadymark")
11191 (version "0.7.3")
11192 (source
11193 (origin
11194 (method url-fetch)
11195 (uri (pypi-uri "steadymark" version))
11196 (sha256
11197 (base32
11198 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11199 (build-system python-build-system)
11200 (native-inputs
11201 `(("python-couleur" ,python2-couleur)
11202 ("python-sure" ,python2-sure)
11203 ("python-misaka" ,python2-misaka)))
11204 (arguments
11205 `(#:python ,python-2
11206 #:phases
11207 (modify-phases %standard-phases
11208 (add-before 'build 'patch-setup-py
11209 (lambda _
11210 ;; Update requirements from dependency==version
11211 ;; to dependency>=version
11212 (substitute* "setup.py"
11213 (("==") ">="))
11214 #t)))))
11215 (home-page "https://github.com/gabrielfalcao/steadymark")
11216 (synopsis "Markdown-based test runner for python")
11217 (description
11218 "@code{Steadymark} allows documentation to be written in github-flavoured
11219 markdown. The documentation may contain snippets of code surrounded by python
11220 code blocks and @code{Steadymark} will find these snippets and run them, making
11221 sure that there are no old malfunctional examples in the documentation examples.")
11222 (license license:expat)))
11223
11224 (define-public python-jsonpointer
11225 (package
11226 (name "python-jsonpointer")
11227 (version "1.10")
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "jsonpointer" version))
11232 (sha256
11233 (base32
11234 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11235 (build-system python-build-system)
11236 (home-page "https://github.com/stefankoegl/python-json-pointer")
11237 (synopsis "Identify specific nodes in a JSON document")
11238 (description "@code{jsonpointer} allows you to access specific nodes
11239 by path in a JSON document (see RFC 6901).")
11240 (license license:bsd-3)))
11241
11242 (define-public python2-jsonpointer
11243 (package-with-python2 python-jsonpointer))
11244
11245 (define-public python-jsonpatch
11246 (package
11247 (name "python-jsonpatch")
11248 (version "1.16")
11249 (source
11250 (origin
11251 (method url-fetch)
11252 ;; pypi version lacks tests.js
11253 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11254 "archive/v" version ".tar.gz"))
11255 (file-name (string-append name "-" version ".tar.gz"))
11256 (sha256
11257 (base32
11258 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11259 (build-system python-build-system)
11260 (native-inputs
11261 `(("python-jsonpointer" ,python-jsonpointer)))
11262 (home-page "https://github.com/stefankoegl/python-json-patch")
11263 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11264 (description "@code{jsonpatch} is a library and program that allows
11265 applying JSON Patches according to RFC 6902.")
11266 (license license:bsd-3)))
11267
11268 (define-public python2-jsonpatch
11269 (package-with-python2 python-jsonpatch))
11270
11271 (define-public python-jsonpatch-0.4
11272 (package (inherit python-jsonpatch)
11273 (name "python-jsonpatch")
11274 (version "0.4")
11275 (source
11276 (origin
11277 (method url-fetch)
11278 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11279 "archive/v" version ".tar.gz"))
11280 (file-name (string-append name "-" version ".tar.gz"))
11281 (sha256
11282 (base32
11283 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11284
11285 (define-public python2-jsonpatch-0.4
11286 (package-with-python2 python-jsonpatch-0.4))
11287
11288 (define-public python-rfc3987
11289 (package
11290 (name "python-rfc3987")
11291 (version "1.3.7")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (pypi-uri "rfc3987" version))
11296 (sha256
11297 (base32
11298 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11299 (build-system python-build-system)
11300 (home-page "https://pypi.python.org/pypi/rfc3987")
11301 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11302 (description "@code{rfc3987} provides routines for parsing and
11303 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11304 (license license:gpl3+)))
11305
11306 (define-public python2-rfc3987
11307 (package-with-python2 python-rfc3987))
11308
11309 (define-public python-validate-email
11310 (package
11311 (name "python-validate-email")
11312 (version "1.3")
11313 (source
11314 (origin
11315 (method url-fetch)
11316 (uri (pypi-uri "validate_email" version))
11317 (sha256
11318 (base32
11319 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11320 (build-system python-build-system)
11321 (home-page "https://github.com/syrusakbary/validate_email")
11322 (synopsis "Verifies if an email address is valid and really exists")
11323 (description "@code{validate_email} can be used to verify if an email
11324 address is valid and really exists.")
11325 (license license:lgpl3+)))
11326
11327 (define-public python2-validate-email
11328 (package-with-python2 python-validate-email))
11329
11330 (define-public python-flex
11331 (package
11332 (name "python-flex")
11333 (version "6.10.0")
11334 (source
11335 (origin
11336 (method url-fetch)
11337 (uri (pypi-uri "flex" version))
11338 (sha256
11339 (base32
11340 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11341 (build-system python-build-system)
11342 (propagated-inputs
11343 `(("python-click" ,python-click)
11344 ("python-iso8601" ,python-iso8601)
11345 ("python-jsonpointer" ,python-jsonpointer)
11346 ("python-pyyaml" ,python-pyyaml)
11347 ("python-requests" ,python-requests)
11348 ("python-rfc3987" ,python-rfc3987)
11349 ("python-six" ,python-six)
11350 ("python-validate-email" ,python-validate-email)))
11351 (home-page "https://github.com/pipermerriam/flex")
11352 (synopsis "Validates Swagger schemata")
11353 (description "@code{flex} can be used to validate Swagger schemata.")
11354 (license license:bsd-3)))
11355
11356 (define-public python2-flex
11357 (package-with-python2 python-flex))
11358
11359 (define-public python-marshmallow
11360 (package
11361 (name "python-marshmallow")
11362 (version "3.0.0b3")
11363 (source
11364 (origin
11365 (method url-fetch)
11366 (uri (pypi-uri "marshmallow" version))
11367 (sha256
11368 (base32
11369 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11370 (build-system python-build-system)
11371 (propagated-inputs
11372 `(("python-dateutil" ,python-dateutil)
11373 ("python-simplejson" ,python-simplejson)))
11374 (native-inputs
11375 `(("python-pytest-3.0" ,python-pytest-3.0)
11376 ("python-pytz" ,python-pytz)))
11377 (home-page "https://github.com/marshmallow-code/marshmallow")
11378 (synopsis "Convert complex datatypes to and from native
11379 Python datatypes.")
11380 (description "@code{marshmallow} provides a library for converting
11381 complex datatypes to and from native Python datatypes.")
11382 (license license:expat)))
11383
11384 (define-public python2-marshmallow
11385 (package-with-python2 python-marshmallow))
11386
11387 (define-public python-apispec
11388 (package
11389 (name "python-apispec")
11390 (version "0.25.3")
11391 (source
11392 (origin
11393 (method url-fetch)
11394 (uri (pypi-uri "apispec" version))
11395 (sha256
11396 (base32
11397 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11398 (build-system python-build-system)
11399 (propagated-inputs
11400 `(("python-pyyaml" ,python-pyyaml)))
11401 (native-inputs
11402 `(("python-pytest-3.0" ,python-pytest-3.0)
11403 ("python-flask" ,python-flask)
11404 ("python-marshmallow" ,python-marshmallow)
11405 ("python-tornado" ,python-tornado)
11406 ("python-bottle" ,python-bottle)
11407 ("python-mock" ,python-mock)))
11408 (home-page "https://github.com/marshmallow-code/apispec")
11409 (synopsis "Swagger 2.0 API specification generator")
11410 (description "@code{python-apispec} is a pluggable API specification
11411 generator. Currently supports the OpenAPI specification (f.k.a.
11412 Swagger 2.0).")
11413 (license license:expat)))
11414
11415 (define-public python2-apispec
11416 (package-with-python2 python-apispec))
11417
11418 (define-public python-flasgger
11419 (package
11420 (name "python-flasgger")
11421 (version "0.6.3")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11426 version ".tar.gz"))
11427 (file-name (string-append name "-" version ".tar.gz"))
11428 (sha256
11429 (base32
11430 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11431 (build-system python-build-system)
11432 (arguments
11433 `(#:phases
11434 (modify-phases %standard-phases
11435 (replace 'check
11436 (lambda* (#:key inputs outputs #:allow-other-keys)
11437 (substitute* "Makefile"
11438 (("flake8 flasgger --ignore=F403")
11439 "flake8 flasgger --ignore=E731,F403"))
11440 (setenv "PYTHONPATH" (string-append (getcwd)
11441 ":"
11442 (getenv "PYTHONPATH")))
11443 (zero? (system* "py.test")))))))
11444 (propagated-inputs
11445 `(("python-flask" ,python-flask)
11446 ("python-pyyaml" ,python-pyyaml)
11447 ("python-jsonschema" ,python-jsonschema)
11448 ("python-mistune" ,python-mistune)
11449 ("python-six" ,python-six)))
11450 (native-inputs
11451 `(("python-decorator" ,python-decorator)
11452 ("python-flake8" ,python-flake8)
11453 ("python-flask-restful" ,python-flask-restful)
11454 ("python-flex" ,python-flex)
11455 ("python-pytest-3.0" ,python-pytest-3.0)
11456 ("python-pytest-cov" ,python-pytest-cov)
11457 ("python-marshmallow" ,python-marshmallow)
11458 ("python-apispec" ,python-apispec)))
11459 (home-page "https://github.com/rochacbruno/flasgger/")
11460 (synopsis "Extract Swagger specs from your Flask project")
11461 (description "@code{python-flasgger} allows extracting Swagger specs
11462 from your Flask project. It is a fork of Flask-Swagger.")
11463 (license license:expat)))
11464
11465 (define-public python2-flasgger
11466 (package-with-python2 python-flasgger))
11467
11468 (define-public python-swagger-spec-validator
11469 (package
11470 (name "python-swagger-spec-validator")
11471 (version "2.1.0")
11472 (source
11473 (origin
11474 (method url-fetch)
11475 (uri (pypi-uri "swagger-spec-validator" version))
11476 (sha256
11477 (base32
11478 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11479 (build-system python-build-system)
11480 (propagated-inputs
11481 `(("python-jsonschema" ,python-jsonschema)
11482 ("python-six" ,python-six)))
11483 (home-page
11484 "https://github.com/Yelp/swagger_spec_validator")
11485 (synopsis "Validation of Swagger specifications")
11486 (description "@code{swagger_spec_validator} provides a library for
11487 validating Swagger API specifications.")
11488 (license license:asl2.0)))
11489
11490 (define-public python2-swagger-spec-validator
11491 (package-with-python2 python-swagger-spec-validator))
11492
11493 (define-public python-apache-libcloud
11494 (package
11495 (name "python-apache-libcloud")
11496 (version "2.0.0")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "apache-libcloud" version))
11501 (sha256
11502 (base32
11503 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11504 (build-system python-build-system)
11505 (arguments
11506 `(#:phases
11507 (modify-phases %standard-phases
11508 (add-after 'unpack 'patch-ssh
11509 (lambda* (#:key inputs #:allow-other-keys)
11510 (substitute* "libcloud/compute/ssh.py"
11511 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11512 "/bin/ssh" "'")))
11513 #t))
11514 (add-after 'unpack 'patch-tests
11515 (lambda _
11516 (substitute* "./libcloud/test/test_file_fixtures.py"
11517 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11518 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11519 return (httplib.OK,
11520 \"1234abcd\",
11521 {\"test\": \"value\"},
11522 httplib.responses[httplib.OK])
11523 def _ascii"))
11524 (substitute* "libcloud/test/compute/test_ssh_client.py"
11525 (("class ShellOutSSHClientTests")
11526 "@unittest.skip(\"Guix container doesn't have ssh service\")
11527 class ShellOutSSHClientTests")
11528 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11529 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11530 (("'.xF0', '.x90', '.x8D', '.x88'")
11531 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11532 #t)))))
11533 (inputs
11534 `(("openssh" ,openssh)))
11535 (propagated-inputs
11536 `(("python-paramiko" ,python-paramiko)
11537 ("python-requests" ,python-requests)))
11538 (native-inputs
11539 `(("python-lockfile" ,python-lockfile)
11540 ("python-mock" ,python-mock)
11541 ("python-requests-mock" ,python-requests-mock)))
11542 (home-page "https://libcloud.apache.org/")
11543 (synopsis "Unified Cloud API")
11544 (description "@code{libcloud} is a Python library for interacting with
11545 many of the popular cloud service providers using a unified API.")
11546 (license license:asl2.0)))
11547
11548 (define-public python2-apache-libcloud
11549 (package-with-python2 python-apache-libcloud))
11550
11551 (define-public python-smmap2
11552 (package
11553 (name "python-smmap2")
11554 (version "2.0.3")
11555 (source
11556 (origin
11557 (method url-fetch)
11558 (uri (pypi-uri "smmap2" version))
11559 (sha256
11560 (base32
11561 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11562 (build-system python-build-system)
11563 (native-inputs
11564 `(("python-nosexcover" ,python-nosexcover)))
11565 (home-page "https://github.com/Byron/smmap")
11566 (synopsis "Python sliding window memory map manager")
11567 (description "@code{smmap2} is a pure Python implementation of a sliding
11568 window memory map manager.")
11569 (license license:bsd-3)))
11570
11571 (define-public python2-smmap2
11572 (package-with-python2 python-smmap2))
11573
11574 (define-public python-regex
11575 (package
11576 (name "python-regex")
11577 (version "2017.06.07")
11578 (source (origin
11579 (method url-fetch)
11580 (uri (pypi-uri "regex" version))
11581 (sha256
11582 (base32
11583 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11584 (build-system python-build-system)
11585 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11586 (synopsis "Alternative regular expression module")
11587 (description "This regular expression implementation is backwards-
11588 compatible with the standard @code{re} module, but offers additional
11589 functionality like full case-folding for case-insensitive matches in Unicode.")
11590 (license license:psfl)))
11591
11592 (define-public python2-regex
11593 (package-with-python2 python-regex))
11594
11595 (define-public python2-pyopengl
11596 (package
11597 (name "python2-pyopengl")
11598 (version "3.1.0")
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "PyOpenGL" version))
11603 (sha256
11604 (base32
11605 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
11606 (arguments
11607 `(#:python ,python-2))
11608 (build-system python-build-system)
11609 (home-page "http://pyopengl.sourceforge.net")
11610 (synopsis "Standard OpenGL bindings for Python")
11611 (description
11612 "PyOpenGL is the most common cross platform Python binding to OpenGL and
11613 related APIs. The binding is created using the standard @code{ctypes}
11614 library.")
11615 (license license:bsd-3)))
11616
11617 (define-public python2-pyopengl-accelerate
11618 (package
11619 (inherit python2-pyopengl)
11620 (name "python2-pyopengl-accelerate")
11621 (version "3.1.0")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 (uri (pypi-uri "PyOpenGL-accelerate" version))
11626 (sha256
11627 (base32
11628 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
11629 (synopsis "Acceleration code for PyOpenGL")
11630 (description
11631 "This is the Cython-coded accelerator module for PyOpenGL.")))
11632
11633 (define-public python-rencode
11634 (package
11635 (name "python-rencode")
11636 (version "1.0.3")
11637 (source
11638 (origin
11639 (method url-fetch)
11640 (uri (pypi-uri "rencode" version))
11641 (sha256
11642 (base32
11643 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
11644 (build-system python-build-system)
11645 (native-inputs `(("pkg-config" ,pkg-config)
11646 ("python-cython", python-cython)))
11647 (home-page "https://github.com/aresch/rencode")
11648 (synopsis "Serialization of heterogeneous data structures")
11649 (description
11650 "The @code{rencode} module is a data structure serialization library,
11651 similar to @code{bencode} from the BitTorrent project. For complex,
11652 heterogeneous data structures with many small elements, r-encoding stake up
11653 significantly less space than b-encodings. This version of rencode is a
11654 complete rewrite in Cython to attempt to increase the performance over the
11655 pure Python module.")
11656 (license license:bsd-3)))
11657
11658 (define-public python2-rencode
11659 (package-with-python2 python-rencode))
11660
11661 (define-public python-xenon
11662 (package
11663 (name "python-xenon")
11664 (version "0.5.1")
11665 (source
11666 (origin
11667 (method url-fetch)
11668 (uri (pypi-uri "xenon" version))
11669 (sha256
11670 (base32
11671 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
11672 (build-system python-build-system)
11673 (native-inputs
11674 `(("python-pyyaml" ,python-pyyaml)
11675 ("python-radon" ,python-radon)
11676 ("python-requests" ,python-requests)
11677 ("python-flake8" ,python-flake8)
11678 ("python-tox" ,python-tox)))
11679 (arguments
11680 `(#:phases
11681 (modify-phases %standard-phases
11682 (add-before 'build 'patch-test-requirements
11683 (lambda* (#:key inputs #:allow-other-keys)
11684 ;; Update requirements from dependency==version to
11685 ;; dependency>=version.
11686 (substitute* "requirements.txt"
11687 (("==") ">=")
11688 ((",<1.5.0") ""))
11689 ;; Remove httpretty dependency for tests.
11690 (substitute* "setup.py"
11691 (("httpretty") ""))
11692 #t)))))
11693 (home-page "https://xenon.readthedocs.org/")
11694 (synopsis "Monitor code metrics for Python on your CI server")
11695 (description
11696 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
11697 Ideally, @code{xenon} is run every time code is committed. Through command
11698 line options, various thresholds can be set for the complexity of code. It
11699 will fail (i.e. it will exit with a non-zero exit code) when any of these
11700 requirements is not met.")
11701 (license license:expat)))
11702
11703 (define-public python2-xenon
11704 (package-with-python2 python-xenon))
11705
11706 (define-public python-pysocks
11707 (package
11708 (name "python-pysocks")
11709 (version "1.6.7")
11710 (source
11711 (origin
11712 (method url-fetch)
11713 (uri (pypi-uri "PySocks" version))
11714 (sha256
11715 (base32
11716 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
11717 (build-system python-build-system)
11718 (arguments `(#:tests? #f))
11719 (home-page "https://github.com/Anorov/PySocks")
11720 (synopsis "SOCKS client module")
11721 (description "@code{pysocks} is an updated and semi-actively maintained
11722 version of @code{SocksiPy} with bug fixes and extra features.")
11723 (license license:bsd-3)))
11724
11725 (define-public python2-pysocks
11726 (package-with-python2 python-pysocks))
11727
11728 (define-public python-pydiff
11729 (package
11730 (name "python-pydiff")
11731 (version "0.2")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "pydiff" version))
11736 (sha256
11737 (base32
11738 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
11739 (build-system python-build-system)
11740 (home-page "https://github.com/myint/pydiff")
11741 (synopsis "Library to diff two Python files at the bytecode level")
11742 (description
11743 "@code{pydiff} makes it easy to look for actual code changes while
11744 ignoring formatting changes.")
11745 (license license:expat)))
11746
11747 (define-public python2-pydiff
11748 (package-with-python2 python-pydiff))
11749
11750 (define-public python-tqdm
11751 (package
11752 (name "python-tqdm")
11753 (version "4.15.0")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "tqdm" version))
11758 (sha256
11759 (base32
11760 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
11761 (build-system python-build-system)
11762 (native-inputs
11763 `(("python-flake8" ,python-flake8)
11764 ("python-nose" ,python-nose)
11765 ("python-nose-timer" ,python-nose-timer)
11766 ("python-coverage" ,python-coverage)
11767 ("python-virtualenv" ,python-virtualenv)))
11768 (home-page "https://github.com/tqdm/tqdm")
11769 (synopsis "Fast, extensible progress meter")
11770 (description
11771 "Make loops show a progress bar on the console by just wrapping any
11772 iterable with @code{|tqdm(iterable)|}. Offers many options to define
11773 design and layout.")
11774 (license (list license:mpl2.0 license:expat))))
11775
11776 (define-public python2-tqdm
11777 (package-with-python2 python-tqdm))
11778
11779 (define-public python-pkginfo
11780 (package
11781 (name "python-pkginfo")
11782 (version "1.4.1")
11783 (source
11784 (origin
11785 (method url-fetch)
11786 (uri (pypi-uri "pkginfo" version))
11787 (sha256
11788 (base32
11789 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
11790 (build-system python-build-system)
11791 (arguments
11792 ;; The tests are broken upstream.
11793 '(#:tests? #f))
11794 (home-page
11795 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
11796 (synopsis
11797 "Query metadatdata from sdists, bdists, and installed packages")
11798 (description
11799 "API to query the distutils metadata written in @file{PKG-INFO} inside a
11800 source distriubtion (an sdist) or a binary distribution (e.g., created by
11801 running bdist_egg). It can also query the EGG-INFO directory of an installed
11802 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
11803 created by running @code{python setup.py develop}).")
11804 (license license:expat)))
11805
11806 (define-public python2-pkginfo
11807 (package-with-python2 python-pkginfo))
11808
11809 (define-public python-twine
11810 (package
11811 (name "python-twine")
11812 (version "1.9.1")
11813 (source
11814 (origin
11815 (method url-fetch)
11816 (uri (pypi-uri "twine" version))
11817 (sha256
11818 (base32
11819 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
11820 (build-system python-build-system)
11821 (propagated-inputs
11822 `(("python-tqdm" ,python-tqdm)
11823 ("python-pkginfo", python-pkginfo)
11824 ("python-requests" ,python-requests)
11825 ("python-requests-toolbelt" ,python-requests-toolbelt)))
11826 (home-page "https://github.com/pypa/twine")
11827 (synopsis "Collection of utilities for interacting with PyPI")
11828 (description
11829 "@code{twine} currently supports registering projects and uploading
11830 distributions. It authenticates the user over HTTPS, allows them to pre-sign
11831 their files and supports any packaging format (including wheels).")
11832 (license license:asl2.0)))
11833
11834 (define-public python2-twine
11835 (package-with-python2 python-twine))
11836
11837 (define-public python-linecache2
11838 (package
11839 (name "python-linecache2")
11840 (version "1.0.0")
11841 (source
11842 (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "linecache2" version))
11845 (sha256
11846 (base32
11847 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
11848 (build-system python-build-system)
11849 (arguments
11850 `(;; The tests depend on unittest2, and our version is a bit too old.
11851 #:tests? #f))
11852 (native-inputs
11853 `(("python-pbr" ,python-pbr)))
11854 (home-page
11855 "https://github.com/testing-cabal/linecache2")
11856 (synopsis "Backports of the linecache module")
11857 (description
11858 "The linecache module allows one to get any line from any file, while
11859 attempting to optimize internally, using a cache, the common case where many
11860 lines are read from a single file.")
11861 (license license:psfl)))
11862
11863 (define-public python2-linecache2
11864 (package-with-python2 python-linecache2))
11865
11866 (define-public python-traceback2
11867 (package
11868 (name "python-traceback2")
11869 (version "1.4.0")
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "traceback2" version))
11874 (sha256
11875 (base32
11876 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
11877 (build-system python-build-system)
11878 (arguments
11879 `(;; python-traceback2 and python-unittest2 depend on one another.
11880 #:tests? #f))
11881 (native-inputs
11882 `(("python-pbr" ,python-pbr)))
11883 (propagated-inputs
11884 `(("python-linecache2" ,python-linecache2)))
11885 (home-page
11886 "https://github.com/testing-cabal/traceback2")
11887 (synopsis "Backports of the traceback module")
11888 (description
11889 "This module provides a standard interface to extract, format and print
11890 stack traces of Python programs. It exactly mimics the behavior of the Python
11891 interpreter when it prints a stack trace.")
11892 (license license:psfl)))
11893
11894 (define-public python2-traceback2
11895 (package-with-python2 python-traceback2))
11896
11897 (define-public python-ratelimiter
11898 (package
11899 (name "python-ratelimiter")
11900 (version "1.2.0")
11901 (source
11902 (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "ratelimiter" version))
11905 (sha256
11906 (base32
11907 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
11908 (build-system python-build-system)
11909 (arguments
11910 '(#:tests? #f)) ; There are no tests in the pypi archive.
11911 (home-page "https://github.com/RazerM/ratelimiter")
11912 (synopsis "Simple rate limiting object")
11913 (description
11914 "The @code{ratelimiter} module ensures that an operation will not be
11915 executed more than a given number of times during a given period.")
11916 (license license:asl2.0)))
11917
11918 (define-public python2-ratelimiter
11919 (package-with-python2 python-ratelimiter))
11920
11921 (define-public python-dukpy
11922 (package
11923 (name "python-dukpy")
11924 (version "0.3")
11925 (source
11926 (origin
11927 (method url-fetch)
11928 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
11929 version ".tar.gz"))
11930 (sha256
11931 (base32
11932 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
11933 (build-system python-build-system)
11934 (home-page "https://github.com/kovidgoyal/dukpy")
11935 (synopsis "Run JavaScript in python")
11936 (description
11937 "dukpy is a JavaScript runtime environment for Python using the duktape
11938 embeddable JavaScript engine.")
11939 ;; Dukpy is licensed under MIT like the embedded duktape library,
11940 ;; with 'errors.c' as GPL3.
11941 (license (list license:expat license:gpl3))))
11942
11943 (define-public python2-dukpy
11944 (package-with-python2 python-dukpy))
11945
11946 (define-public python-jsonrpclib-pelix
11947 (package
11948 (name "python-jsonrpclib-pelix")
11949 (version "0.3.1")
11950 (source
11951 (origin
11952 (method url-fetch)
11953 (uri (pypi-uri "jsonrpclib-pelix" version))
11954 (sha256
11955 (base32
11956 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
11957 (build-system python-build-system)
11958 (home-page "https://github.com/tcalmant/jsonrpclib/")
11959 (synopsis "JSON-RPC 2.0 client library for Python")
11960 (description
11961 "This library implements the JSON-RPC v2.0
11962 specification (backwards-compatible) as a client library for Python. This
11963 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
11964 services.")
11965 (license license:asl2.0)))
11966
11967 (define-public python2-jsonrpclib-pelix
11968 (package-with-python2 python-jsonrpclib-pelix))
11969
11970 (define-public python-setuptools-scm-git-archive
11971 (package
11972 (name "python-setuptools-scm-git-archive")
11973 (version "1.0")
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "setuptools_scm_git_archive" version))
11978 (sha256
11979 (base32
11980 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
11981 (build-system python-build-system)
11982 (native-inputs
11983 `(("python-pytest-3.0" ,python-pytest-3.0)))
11984 (propagated-inputs
11985 `(("python-setuptools-scm" ,python-setuptools-scm)))
11986 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
11987 (synopsis "Setuptools_scm plugin for git archives")
11988 (description
11989 "The setuptools_scm_git_archive package is a plugin to
11990 setuptools_scm, which supports obtaining versions from git archives that
11991 belong to tagged versions.")
11992 (license license:expat)))
11993
11994 (define-public python2-setuptools-scm-git-archive
11995 (package-with-python2 python-setuptools-scm-git-archive))
11996
11997 (define-public python-pyclipper
11998 (package
11999 (name "python-pyclipper")
12000 (version "1.0.6")
12001 (source
12002 (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "pyclipper" version ".zip"))
12005 (sha256
12006 (base32
12007 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12008 (build-system python-build-system)
12009 (arguments
12010 `(#:tests? #f)); 8 Tests fail, 37 succeed
12011 (propagated-inputs
12012 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12013 (native-inputs
12014 `(("unzip" ,unzip)))
12015 (home-page "https://github.com/greginvm/pyclipper")
12016 (synopsis "Wrapper for Angus Johnson's Clipper library")
12017 (description
12018 "Pyclipper is a Cython wrapper for the C++ translation of the
12019 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12020 (license license:expat)))
12021
12022 (define-public python2-pyclipper
12023 (package-with-python2 python-pyclipper))
12024
12025 (define-public python2-booleanoperations
12026 (package
12027 (name "python2-booleanoperations")
12028 (version "0.7.1")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "booleanOperations" version ".zip"))
12033 (sha256
12034 (base32
12035 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12036 (build-system python-build-system)
12037 (arguments
12038 `(#:python ,python-2))
12039 (native-inputs
12040 `(("unzip" ,unzip)
12041 ("python2-pytest-3.0" ,python2-pytest-3.0)
12042 ("python2-pytest-runner" ,python2-pytest-runner)))
12043 (propagated-inputs
12044 `(("python-fonttools" ,python2-fonttools)
12045 ("python-pyclipper" ,python2-pyclipper)
12046 ("python-ufolib" ,python2-ufolib)))
12047 (home-page "https://github.com/typemytype/booleanOperations")
12048 (synopsis "Boolean operations on paths")
12049 (description
12050 "BooleanOperations provides a Python library that enables
12051 boolean operations on paths.")
12052 (license license:expat)))
12053
12054 (define-public python-tempdir
12055 (package
12056 (name "python-tempdir")
12057 (version "0.7.1")
12058 (source
12059 (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "tempdir" version))
12062 (sha256
12063 (base32
12064 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12065 (build-system python-build-system)
12066 (home-page "https://pypi.org/project/tempdir/")
12067 (arguments
12068 ;; the package has no tests
12069 '(#:tests? #f))
12070 (synopsis "Python library for managing temporary directories")
12071 (description
12072 "This library manages temporary directories that are automatically
12073 deleted with all their contents when they are no longer needed. It is
12074 particularly convenient for use in tests.")
12075 (license license:expat)))
12076
12077 (define-public python2-tempdir
12078 (package-with-python2 python-tempdir))
12079
12080 (define-public python-activepapers
12081 (package
12082 (name "python-activepapers")
12083 (version "0.2.2")
12084 (source
12085 (origin
12086 (method url-fetch)
12087 (uri (pypi-uri "ActivePapers.Py" version))
12088 (sha256
12089 (base32
12090 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12091 (build-system python-build-system)
12092 (arguments
12093 `(#:modules ((ice-9 ftw)
12094 (srfi srfi-1)
12095 (guix build utils)
12096 (guix build python-build-system))
12097
12098 #:phases
12099 (modify-phases %standard-phases
12100 (add-after 'unpack 'delete-python2-code
12101 (lambda _
12102 (for-each delete-file
12103 '("lib/activepapers/builtins2.py"
12104 "lib/activepapers/standardlib2.py"
12105 "lib/activepapers/utility2.py"))))
12106 (replace 'check
12107 (lambda _
12108 ;; Deactivate the test cases that download files
12109 (setenv "NO_NETWORK_ACCESS" "1")
12110 ;; For some strange reason, some tests fail if nosetests runs all
12111 ;; test modules in a single execution. They pass if each test
12112 ;; module is run individually.
12113 (for-each (lambda (filename)
12114 (invoke "nosetests"
12115 (string-append "tests/" filename)))
12116 (scandir "tests"
12117 (lambda (filename)
12118 (string-suffix? ".py" filename)))))))))
12119 (native-inputs
12120 `(("python-tempdir" ,python-tempdir)
12121 ("python-nose" ,python-nose)))
12122 (propagated-inputs
12123 `(("python-h5py" ,python-h5py)))
12124 (home-page "http://www.activepapers.org/")
12125 (synopsis "Executable papers for scientific computing")
12126 (description
12127 "ActivePapers is a tool for working with executable papers, which
12128 combine data, code, and documentation in single-file packages,
12129 suitable for publication as supplementary material or on repositories
12130 such as figshare or Zenodo.")
12131 (properties `((python2-variant . ,(delay python2-activepapers))))
12132 (license license:bsd-3)))
12133
12134 (define-public python2-activepapers
12135 (let ((base (package-with-python2
12136 (strip-python2-variant python-activepapers))))
12137 (package
12138 (inherit base)
12139 (arguments
12140 (substitute-keyword-arguments (package-arguments base)
12141 ((#:phases phases)
12142 `(modify-phases ,phases
12143 (delete 'delete-python2-code)
12144 (add-after 'unpack 'delete-python3-code
12145 (lambda _
12146 (for-each delete-file
12147 '("lib/activepapers/builtins3.py"
12148 "lib/activepapers/standardlib3.py"
12149 "lib/activepapers/utility3.py")))))))))))
12150
12151 (define-public python-semver
12152 (package
12153 (name "python-semver")
12154 (version "2.7.9")
12155 (source
12156 (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "semver" version))
12159 (sha256
12160 (base32
12161 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12162 (build-system python-build-system)
12163 (arguments
12164 `(#:phases
12165 (modify-phases %standard-phases
12166 (add-after 'unpack 'patch-test-requirements
12167 (lambda _
12168 (substitute* "setup.py"
12169 ;; Our Python is new enough.
12170 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12171 #t)))))
12172 (native-inputs
12173 `(("python-tox" ,python-tox)
12174 ("python-virtualenv" ,python-virtualenv)))
12175 (home-page "https://github.com/k-bx/python-semver")
12176 (synopsis "Python helper for Semantic Versioning")
12177 (description "This package provides a Python library for
12178 @url{Semantic Versioning, http://semver.org/}.")
12179 (license license:bsd-3)))
12180
12181 (define-public python2-semver
12182 (package-with-python2 python-semver))
12183
12184 (define-public python2-pyro
12185 (package
12186 (name "python2-pyro")
12187 (version "3.16")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "Pyro" version))
12192 (file-name (string-append "Pyro-" version ".tar.gz"))
12193 (sha256
12194 (base32
12195 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12196 (build-system python-build-system)
12197 (arguments
12198 ;; Pyro is not compatible with Python 3
12199 `(#:python ,python-2
12200 ;; Pyro has no test cases for automatic execution
12201 #:tests? #f))
12202 (home-page "http://pythonhosted.org/Pyro/")
12203 (synopsis "Distributed object manager for Python")
12204 (description "Pyro is a Distributed Object Technology system
12205 written in Python that is designed to be easy to use. It resembles
12206 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12207 which is a system and language independent Distributed Object Technology
12208 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12209 longer maintained. New projects should use Pyro4 instead, which
12210 is the new Pyro version that is actively developed.")
12211 (license license:expat)))
12212
12213 (define-public python2-scientific
12214 (package
12215 (name "python2-scientific")
12216 (version "2.9.4")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (string-append "https://bitbucket.org/khinsen/"
12221 "scientificpython/downloads/ScientificPython-"
12222 version ".tar.gz"))
12223 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12224 (sha256
12225 (base32
12226 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12227 (build-system python-build-system)
12228 (inputs
12229 `(("netcdf" ,netcdf)))
12230 (propagated-inputs
12231 `(("python-numpy" ,python2-numpy-1.8)
12232 ("python-pyro", python2-pyro)))
12233 (arguments
12234 ;; ScientificPython is not compatible with Python 3
12235 `(#:python ,python-2
12236 #:tests? #f ; No test suite
12237 #:phases
12238 (modify-phases %standard-phases
12239 (replace 'build
12240 (lambda* (#:key inputs #:allow-other-keys)
12241 (zero? (system* "python" "setup.py" "build"
12242 (string-append "--netcdf_prefix="
12243 (assoc-ref inputs "netcdf")))))))))
12244 (home-page "https://bitbucket.org/khinsen/scientificpython")
12245 (synopsis "Python modules for scientific computing")
12246 (description "ScientificPython is a collection of Python modules that are
12247 useful for scientific computing. Most modules are rather general (Geometry,
12248 physical units, automatic derivatives, ...) whereas others are more
12249 domain-specific (e.g. netCDF and PDB support). The library is currently
12250 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12251 (license license:cecill-c)))
12252
12253 (define-public python2-mmtk
12254 (package
12255 (name "python2-mmtk")
12256 (version "2.7.10")
12257 (source
12258 (origin
12259 (method url-fetch)
12260 (uri (string-append "https://bitbucket.org/khinsen/"
12261 "mmtk/downloads/MMTK-" version ".tar.gz"))
12262 (file-name (string-append "MMTK-" version ".tar.gz"))
12263 (sha256
12264 (base32
12265 "1k4gsd50zja89dbzgy3aji7h4zpvbvdfrds7rxr3whqrsgcffnir"))))
12266 (build-system python-build-system)
12267 (native-inputs
12268 `(("netcdf" ,netcdf)))
12269 (propagated-inputs
12270 `(("python-scientific" ,python2-scientific)
12271 ("python-tkinter" ,python-2 "tk")))
12272 (arguments
12273 `(#:python ,python-2
12274 #:tests? #f
12275 #:phases
12276 (modify-phases %standard-phases
12277 (add-before 'build 'includes-from-scientific
12278 (lambda* (#:key inputs #:allow-other-keys)
12279 (mkdir-p "Include/Scientific")
12280 (copy-recursively
12281 (string-append
12282 (assoc-ref inputs "python-scientific")
12283 "/include/python2.7/Scientific")
12284 "Include/Scientific"))))))
12285 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12286 (synopsis "Python library for molecular simulation")
12287 (description "MMTK is a library for molecular simulations with an emphasis
12288 on biomolecules. It provides widely used methods such as Molecular Dynamics
12289 and normal mode analysis, but also basic routines for implementing new methods
12290 for simulation and analysis. The library is currently not actively maintained
12291 and works only with Python 2 and NumPy < 1.9.")
12292 (license license:cecill-c)))