gnu: python-numpy: Update to 1.12.0.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4dcb135e 6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
7637de23 14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
6bd9ad69 26;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
df893a38 29;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
5220022a 34;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
819939cb 35;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
ec074213 36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
916aafa4 37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
1a917fc9 38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
a01b6da7
NK
39;;;
40;;; This file is part of GNU Guix.
41;;;
42;;; GNU Guix is free software; you can redistribute it and/or modify it
43;;; under the terms of the GNU General Public License as published by
44;;; the Free Software Foundation; either version 3 of the License, or (at
45;;; your option) any later version.
46;;;
47;;; GNU Guix is distributed in the hope that it will be useful, but
48;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50;;; GNU General Public License for more details.
51;;;
52;;; You should have received a copy of the GNU General Public License
53;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
1ffa7090 55(define-module (gnu packages python)
3f641af0 56 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 57 #:use-module (gnu packages)
8e451885 58 #:use-module (gnu packages algebra)
d79a343b 59 #:use-module (gnu packages adns)
89b2e0b0 60 #:use-module (gnu packages attr)
d96034ed 61 #:use-module (gnu packages backup)
3969ca54 62 #:use-module (gnu packages bash)
1ffa7090 63 #:use-module (gnu packages compression)
4ed20663 64 #:use-module (gnu packages databases)
ddc63a56 65 #:use-module (gnu packages django)
5e1c9367 66 #:use-module (gnu packages file)
4ed20663 67 #:use-module (gnu packages fontutils)
4ed20663
AE
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
6eb7af2a 70 #:use-module (gnu packages gl)
4ed20663 71 #:use-module (gnu packages glib)
c227458a 72 #:use-module (gnu packages graphviz)
6eb7af2a 73 #:use-module (gnu packages gstreamer)
4ed20663 74 #:use-module (gnu packages gtk)
421a80a2 75 #:use-module (gnu packages icu4c)
c937562e 76 #:use-module (gnu packages image)
4ed20663 77 #:use-module (gnu packages imagemagick)
d79a343b 78 #:use-module (gnu packages libevent)
b10ab723 79 #:use-module (gnu packages libffi)
89b2e0b0 80 #:use-module (gnu packages linux)
ed118043 81 #:use-module (gnu packages man)
0da98533 82 #:use-module (gnu packages maths)
4ed20663 83 #:use-module (gnu packages multiprecision)
45203542 84 #:use-module (gnu packages networking)
be7134bf 85 #:use-module (gnu packages ncurses)
b04a52a6 86 #:use-module (gnu packages openstack)
d488d5d6 87 #:use-module (gnu packages password-utils)
c9b1b4f9 88 #:use-module (gnu packages pcre)
4ed20663 89 #:use-module (gnu packages perl)
b10ab723 90 #:use-module (gnu packages pkg-config)
06ff0837 91 #:use-module (gnu packages protobuf)
4ed20663 92 #:use-module (gnu packages readline)
6eb7af2a 93 #:use-module (gnu packages sdl)
80ce42bd 94 #:use-module (gnu packages shells)
c9b1b4f9 95 #:use-module (gnu packages statistics)
8f9ac901 96 #:use-module (gnu packages tex)
1c65314c 97 #:use-module (gnu packages texinfo)
cc2b77df 98 #:use-module (gnu packages tls)
e25f0174 99 #:use-module (gnu packages version-control)
02f8f804 100 #:use-module (gnu packages video)
8d12be1e 101 #:use-module (gnu packages web)
ce0614dd 102 #:use-module (gnu packages base)
26b307e2 103 #:use-module (gnu packages xml)
6fa14469 104 #:use-module (gnu packages xorg)
0bdc1671 105 #:use-module (gnu packages xdisorg)
4ed20663 106 #:use-module (gnu packages zip)
afa181ff 107 #:use-module (gnu packages tcl)
63bcec71 108 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
109 #:use-module (guix packages)
110 #:use-module (guix download)
ea5456c8 111 #:use-module (guix git-download)
11bb85a1 112 #:use-module (guix utils)
acc26ff1 113 #:use-module (guix build-system gnu)
d8c4998f 114 #:use-module (guix build-system cmake)
898238b9 115 #:use-module (guix build-system python)
1c65314c
FB
116 #:use-module (guix build-system trivial)
117 #:use-module (srfi srfi-1))
a01b6da7 118
45848023 119(define-public python-2.7
a01b6da7
NK
120 (package
121 (name "python")
f0499100 122 (version "2.7.12")
a01b6da7
NK
123 (source
124 (origin
125 (method url-fetch)
9b43a0ff 126 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
127 version "/Python-" version ".tar.xz"))
128 (sha256
129 (base32
f0499100 130 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
131 (patches (search-patches "python-2.7-search-paths.patch"
132 "python-2-deterministic-build-info.patch"
15e57f57 133 "python-2.7-site-prefixes.patch"
c3052d6b 134 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
135 (modules '((guix build utils)))
136 ;; suboptimal to delete failing tests here, but if we delete them in the
137 ;; arguments then we need to make sure to strip out that phase when it
138 ;; gets inherited by python and python-minimal.
139 (snippet
140 '(begin
141 (for-each delete-file
142 '("Lib/test/test_compileall.py"
f0499100 143 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
144 "Lib/test/test_distutils.py"
145 "Lib/test/test_import.py"
146 "Lib/test/test_shutil.py"
147 "Lib/test/test_socket.py"
1bb163b0 148 "Lib/test/test_subprocess.py"))
10a42aa2 149 #t))))
02f0c3b2
LC
150 (outputs '("out"
151 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 152 (build-system gnu-build-system)
3fdc99da 153 (arguments
10a42aa2 154 `(;; 356 tests OK.
e7e7a1eb
EF
155 ;; 6 tests failed:
156 ;; test_compileall test_distutils test_import test_shutil test_socket
157 ;; test_subprocess
158 ;; 39 tests skipped:
ff6f33cf
ED
159 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
160 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
161 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
162 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
163 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
164 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
165 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
166 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
167 ;; test_winreg test_winsound test_zipfile64
168 ;; 4 skips unexpected on linux2:
169 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 170 #:test-target "test"
3fdc99da 171 #:configure-flags
6a20289d
LC
172 (list "--enable-shared" ;allow embedding
173 "--with-system-ffi" ;build ctypes
aaf75c89 174 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
175 (string-append "LDFLAGS=-Wl,-rpath="
176 (assoc-ref %outputs "out") "/lib"))
fd982732 177
d2cc9c7c
LC
178 #:modules ((ice-9 ftw) (ice-9 match)
179 (guix build utils) (guix build gnu-build-system))
fd982732 180 #:phases
46472ecd
MW
181 (modify-phases %standard-phases
182 (add-before
183 'configure 'patch-lib-shells
184 (lambda _
185 ;; Filter for existing files, since some may not exist in all
186 ;; versions of python that are built with this recipe.
187 (substitute* (filter file-exists?
188 '("Lib/subprocess.py"
189 "Lib/popen2.py"
190 "Lib/distutils/tests/test_spawn.py"
191 "Lib/test/test_subprocess.py"))
192 (("/bin/sh") (which "sh")))
dedc8320
LC
193
194 ;; Use zero as the timestamp in .pyc files so that builds are
195 ;; deterministic. TODO: Remove it when this variable is set in
196 ;; gnu-build-system.scm.
a665996f 197 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 198 #t))
5b4e2791
LC
199 (add-before 'configure 'do-not-record-configure-flags
200 (lambda* (#:key configure-flags #:allow-other-keys)
201 ;; Remove configure flags from the installed '_sysconfigdata.py'
202 ;; and 'Makefile' so we don't end up keeping references to the
203 ;; build tools.
204 ;;
205 ;; Preserve at least '--with-system-ffi' since otherwise the
206 ;; thing tries to build libffi, fails, and we end up with a
207 ;; Python that lacks ctypes.
208 (substitute* "configure"
209 (("^CONFIG_ARGS=.*$")
210 (format #f "CONFIG_ARGS='~a'\n"
211 (if (member "--with-system-ffi" configure-flags)
212 "--with-system-ffi"
213 ""))))
214 #t))
46472ecd
MW
215 (add-before
216 'check 'pre-check
217 (lambda _
218 ;; 'Lib/test/test_site.py' needs a valid $HOME
219 (setenv "HOME" (getcwd))
220 #t))
221 (add-after
222 'unpack 'set-source-file-times-to-1980
223 ;; XXX One of the tests uses a ZIP library to pack up some of the
224 ;; source tree, and fails with "ZIP does not support timestamps
225 ;; before 1980". Work around this by setting the file times in the
226 ;; source tree to sometime in early 1980.
227 (lambda _
228 (let ((circa-1980 (* 10 366 24 60 60)))
229 (ftw "." (lambda (file stat flag)
230 (utime file circa-1980 circa-1980)
231 #t))
02f0c3b2 232 #t)))
9ffe61b0
LC
233 (add-after 'install 'remove-tests
234 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
235 ;; because these files are used by some libraries out there.
236 (lambda* (#:key outputs #:allow-other-keys)
237 (let ((out (assoc-ref outputs "out")))
238 (match (scandir (string-append out "/lib")
239 (lambda (name)
240 (string-prefix? "python" name)))
241 ((pythonX.Y)
242 (let ((testdir (string-append out "/lib/" pythonX.Y
243 "/test")))
244 (with-directory-excursion testdir
245 (for-each delete-file-recursively
246 (scandir testdir
247 (match-lambda
248 ((or "." "..") #f)
249 (file
250 (not
251 (string-prefix? "test_support."
252 file))))))
253 (call-with-output-file "__init__.py" (const #t))
254 #t)))))))
216c283b
LC
255 (add-before 'strip 'make-libraries-writable
256 (lambda* (#:key outputs #:allow-other-keys)
257 ;; Make .so files writable so they can be stripped.
258 (let ((out (assoc-ref outputs "out")))
259 (for-each (lambda (file)
260 (chmod file #o755))
261 (find-files (string-append out "/lib")
262 "\\.so"))
263 #t)))
02f0c3b2
LC
264 (add-after 'install 'move-tk-inter
265 (lambda* (#:key outputs #:allow-other-keys)
266 ;; When Tkinter support is built move it to a separate output so
267 ;; that the main output doesn't contain a reference to Tcl/Tk.
268 (let ((out (assoc-ref outputs "out"))
269 (tk (assoc-ref outputs "tk")))
270 (when tk
271 (match (find-files out "tkinter.*\\.so")
272 ((tkinter.so)
273 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
274 ;; want it under TK/lib/pythonX.Y/site-packages.
275 (let* ((len (string-length out))
276 (target (string-append
277 tk "/"
278 (string-drop
279 (dirname (dirname tkinter.so))
280 len)
281 "/site-packages")))
282 (install-file tkinter.so target)
283 (delete-file tkinter.so)))))
284 #t))))))
a01b6da7 285 (inputs
3fdc99da
CR
286 `(("bzip2" ,bzip2)
287 ("gdbm" ,gdbm)
b10ab723 288 ("libffi" ,libffi) ; for ctypes
b88e1b0a 289 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 290 ("openssl" ,openssl)
3fdc99da 291 ("readline" ,readline)
afa181ff
LC
292 ("zlib" ,zlib)
293 ("tcl" ,tcl)
294 ("tk" ,tk))) ; for tkinter
b10ab723
CR
295 (native-inputs
296 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
297 (native-search-paths
298 (list (search-path-specification
299 (variable "PYTHONPATH")
af070955 300 (files '("lib/python2.7/site-packages")))))
f0499100 301 (home-page "https://www.python.org")
afa181ff 302 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
303 (description
304 "Python is a remarkably powerful dynamic programming language that
305is used in a wide variety of application domains. Some of its key
306distinguishing features include: clear, readable syntax; strong
307introspection capabilities; intuitive object orientation; natural
308expression of procedural code; full modularity, supporting hierarchical
309packages; exception-based error handling; and very high level dynamic
310data types.")
3f641af0 311 (license license:psfl)))
acc26ff1 312
45848023
HG
313;; Current 2.x version.
314(define-public python-2 python-2.7)
315
72df6680 316(define-public python-3.5
b24d1cfc 317 (package (inherit python-2)
72df6680 318 (version "3.5.2")
717003e3
LC
319 (source (origin
320 (method url-fetch)
321 (uri (string-append "https://www.python.org/ftp/python/"
322 version "/Python-" version ".tar.xz"))
fc1adab1
AK
323 (patches (search-patches
324 "python-fix-tests.patch"
72df6680 325 "python-3.5-fix-tests.patch"
fc1adab1
AK
326 "python-3-deterministic-build-info.patch"
327 "python-3-search-paths.patch"))
717003e3
LC
328 (patch-flags '("-p0"))
329 (sha256
330 (base32
72df6680 331 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
332 (arguments (substitute-keyword-arguments (package-arguments python-2)
333 ((#:tests? _) #t)))
1aebc0cb
AE
334 (native-search-paths
335 (list (search-path-specification
336 (variable "PYTHONPATH")
0e05d01e
SB
337 (files (list (string-append "lib/python"
338 (version-major+minor version)
339 "/site-packages"))))))))
f26a77ff 340
72df6680
LF
341(define-public python-3.4
342 (package (inherit python-3.5)
343 (version "3.4.5")
344 (source (origin
345 (method url-fetch)
346 (uri (string-append "https://www.python.org/ftp/python/"
347 version "/Python-" version ".tar.xz"))
348 (patches (search-patches
349 "python-fix-tests.patch"
350 "python-3.4-fix-tests.patch"
351 "python-3-deterministic-build-info.patch"
352 "python-3-search-paths.patch"))
353 (patch-flags '("-p0"))
354 (sha256
355 (base32
356 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
357
45848023 358;; Current 3.x version.
72df6680 359(define-public python-3 python-3.5)
45848023
HG
360
361;; Current major version.
362(define-public python python-3)
363
95288fcc
LC
364;; Minimal variants of Python, mostly used to break the cycle between Tk and
365;; Python (Tk -> libxcb -> Python.)
366
367(define-public python2-minimal
368 (package (inherit python-2)
369 (name "python-minimal")
02f0c3b2 370 (outputs '("out"))
95288fcc
LC
371 (arguments
372 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
373 ((#:configure-flags cf)
374 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
375 (inputs '()))) ;none of the optional dependencies
376
377(define-public python-minimal
898238b9 378 (package (inherit python)
95288fcc 379 (name "python-minimal")
02f0c3b2 380 (outputs '("out"))
95288fcc 381
d0b73960 382 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
383 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
384 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
385 (inputs `(("libffi" ,libffi)
386 ("openssl" ,openssl)
95288fcc
LC
387 ("zlib" ,zlib)))))
388
64cb064c
LC
389(define* (wrap-python3 python
390 #:optional
391 (name (string-append (package-name python) "-wrapper")))
898238b9 392 (package (inherit python)
95288fcc 393 (name name)
898238b9
AE
394 (source #f)
395 (build-system trivial-build-system)
02f0c3b2 396 (outputs '("out"))
3969ca54 397 (inputs `(("bash" ,bash)))
3c0f2329 398 (propagated-inputs `(("python" ,python)))
898238b9
AE
399 (arguments
400 `(#:modules ((guix build utils))
401 #:builder
402 (begin
403 (use-modules (guix build utils))
404 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
405 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
406 (mkdir-p bin)
407 (for-each
408 (lambda (old new)
409 (symlink (string-append python old)
410 (string-append bin "/" new)))
3969ca54
SB
411 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
412 `("python" ,"pydoc" ,"idle" ,"pip"))
413 ;; python-config outputs search paths based upon its location,
414 ;; use a bash wrapper to avoid changing its outputs.
415 (let ((bash (string-append (assoc-ref %build-inputs "bash")
416 "/bin/bash"))
417 (old (string-append python "python3-config"))
418 (new (string-append bin "/python-config")))
419 (with-output-to-file new
420 (lambda ()
421 (format #t "#!~a~%" bash)
422 (format #t "exec \"~a\" \"$@\"~%" old)
423 (chmod new #o755)
424 #t)))))))
0d56e3e1
LC
425 (synopsis "Wrapper for the Python 3 commands")
426 (description
427 "This package provides wrappers for the commands of Python@tie{}3.x such
428that they can be invoked under their usual name---e.g., @command{python}
429instead of @command{python3}.")))
430
95288fcc
LC
431(define-public python-wrapper (wrap-python3 python))
432(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 433
aaf625b8
RW
434(define-public python-psutil
435 (package
436 (name "python-psutil")
88535a44 437 (version "4.3.0")
aaf625b8
RW
438 (source
439 (origin
440 (method url-fetch)
f56777be 441 (uri (pypi-uri "psutil" version))
aaf625b8
RW
442 (sha256
443 (base32
88535a44 444 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 445 (build-system python-build-system)
fb08c4fe
MB
446 (arguments
447 ;; FIXME: some tests does not return and times out.
448 '(#:tests? #f))
88535a44 449 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
450 (synopsis "Library for retrieving information on running processes")
451 (description
452 "psutil (Python system and process utilities) is a library for retrieving
453information on running processes and system utilization (CPU, memory, disks,
454network) in Python. It is useful mainly for system monitoring, profiling and
455limiting process resources and management of running processes. It implements
456many functionalities offered by command line tools such as: ps, top, lsof,
457netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
458pidof, tty, taskset, pmap.")
3f641af0 459 (license license:bsd-3)))
aaf625b8
RW
460
461(define-public python2-psutil
462 (package-with-python2 python-psutil))
898238b9 463
f9da1d8a
ED
464(define-public python-passlib
465 (package
466 (name "python-passlib")
3b86a385 467 (version "1.7.1")
f9da1d8a
ED
468 (source
469 (origin
470 (method url-fetch)
690e8c66 471 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
472 (sha256
473 (base32
3b86a385 474 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
475 (build-system python-build-system)
476 (native-inputs
f3b98f4f 477 `(("python-nose" ,python-nose)))
f22efa01 478 (propagated-inputs
f9da1d8a
ED
479 `(("python-py-bcrypt" ,python-py-bcrypt)))
480 (arguments
481 `(#:phases
482 (alist-cons-before
483 'check 'set-PYTHON_EGG_CACHE
484 ;; some tests require access to "$HOME/.cython"
485 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
486 %standard-phases)))
487 (home-page "https://bitbucket.org/ecollins/passlib")
488 (synopsis
489 "Comprehensive password hashing framework")
490 (description
491 "Passlib is a password hashing library for Python 2 & 3, which provides
492cross-platform implementations of over 30 password hashing algorithms, as well
493as a framework for managing existing password hashes. It's designed to be
494useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
495to providing full-strength password hashing for multi-user application.")
3f641af0 496 (license license:bsd-3)))
f9da1d8a
ED
497
498(define-public python2-passlib
499 (package-with-python2 python-passlib))
500
feb0d9c3
ED
501(define-public python-py-bcrypt
502 (package
503 (name "python-py-bcrypt")
504 (version "0.4")
505 (source
506 (origin
507 (method url-fetch)
508 (uri (string-append
509 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
510 version
511 ".tar.gz"))
512 (sha256
513 (base32
514 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
515 (build-system python-build-system)
feb0d9c3
ED
516 (home-page "https://code.google.com/p/py-bcrypt")
517 (synopsis
518 "Bcrypt password hashing and key derivation")
519 (description
520 "A python wrapper of OpenBSD's Blowfish password hashing code. This
521system hashes passwords using a version of Bruce Schneier's Blowfish block
522cipher with modifications designed to raise the cost of off-line password
523cracking and frustrate fast hardware implementation. The computation cost of
524the algorithm is parametised, so it can be increased as computers get faster.
525The intent is to make a compromise of a password database less likely to
526result in an attacker gaining knowledge of the plaintext passwords (e.g. using
527John the Ripper).")
528 ;; "sha2.c" is under BSD-3;
529 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
530 ;; the rest is under ISC.
3f641af0 531 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
532
533(define-public python2-py-bcrypt
534 (package-with-python2 python-py-bcrypt))
535
536
429fdea1
ED
537(define-public python-paramiko
538 (package
539 (name "python-paramiko")
81b9bbbd 540 (version "1.16.0")
429fdea1
ED
541 (source
542 (origin
543 (method url-fetch)
81b9bbbd 544 (uri (pypi-uri "paramiko" version))
429fdea1
ED
545 (sha256
546 (base32
81b9bbbd 547 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 548 (build-system python-build-system)
49910e6a
MB
549 (arguments
550 '(;; FIXME: One test fails with "EOFError not raised by connect".
551 #:tests? #f))
552 ;; #:phases
553 ;; (modify-phases %standard-phases
554 ;; (replace 'check
555 ;; (lambda _
556 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 557 (propagated-inputs
f22efa01
HG
558 `(("python-pycrypto" ,python-pycrypto)
559 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
560 (home-page "http://www.paramiko.org/")
561 (synopsis "SSHv2 protocol library")
562 (description "Paramiko is a python implementation of the SSHv2 protocol,
563providing both client and server functionality. While it leverages a Python C
564extension for low level cryptography (PyCrypto), Paramiko itself is a pure
565Python interface around SSH networking concepts.")
3f641af0 566 (license license:lgpl2.1+)))
429fdea1
ED
567
568(define-public python2-paramiko
569 (package-with-python2 python-paramiko))
570
571
de73dbf6
ED
572(define-public python-httplib2
573 (package
574 (name "python-httplib2")
286f1bac 575 (version "0.9.2")
de73dbf6
ED
576 (source
577 (origin
578 (method url-fetch)
286f1bac 579 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
580 (sha256
581 (base32
286f1bac 582 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 583 (build-system python-build-system)
286f1bac 584 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
585 (synopsis "Comprehensive HTTP client library")
586 (description
587 "A comprehensive HTTP client library supporting many features left out of
588other HTTP libraries.")
589 (license license:expat)))
590
591(define-public python2-httplib2
592 (package-with-python2 python-httplib2))
593
67039875
ED
594(define-public python-ecdsa
595 (package
596 (name "python-ecdsa")
597 (version "0.13")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append
602 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
603 version
604 ".tar.gz"))
605 (sha256
606 (base32
607 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
608 (build-system python-build-system)
67039875
ED
609 (inputs
610 `(("openssl" ,openssl)))
611 (home-page
612 "http://github.com/warner/python-ecdsa")
613 (synopsis
614 "ECDSA cryptographic signature library (pure python)")
615 (description
616 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
617Curve Digital Signature Algorithm), implemented purely in Python. With this
618library, you can quickly create keypairs (signing key and verifying key), sign
619messages, and verify the signatures. The keys and signatures are very short,
620making them easy to handle and incorporate into other protocols.")
621 (license license:expat)))
622
623(define-public python2-ecdsa
624 (package-with-python2 python-ecdsa))
625
52323f32
ED
626(define-public python-ccm
627 (package
628 (name "python-ccm")
db5567f7 629 (version "2.1.6")
52323f32
ED
630 (source
631 (origin
632 (method url-fetch)
db5567f7 633 (uri (pypi-uri "ccm" version))
52323f32
ED
634 (sha256
635 (base32
db5567f7 636 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 637 (build-system python-build-system)
f22efa01 638 (propagated-inputs
52323f32 639 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
640 ;; Not listed in setup.py, but used in ccmlib/node.py for full
641 ;; functionality
642 ("python-psutil" ,python-psutil)
52323f32
ED
643 ("python-six" ,python-six)))
644 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
645 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
646localhost")
647 (description "Cassandra Cluster Manager is a development tool for testing
648local Cassandra clusters. It creates, launches and removes Cassandra clusters
649on localhost.")
3f641af0 650 (license license:asl2.0)))
52323f32
ED
651
652(define-public python2-ccm
653 (package-with-python2 python-ccm))
654
89114f39 655(define-public python-pytz
acc26ff1 656 (package
89114f39 657 (name "python-pytz")
a5f92ca0 658 (version "2016.10")
acc26ff1
CR
659 (source
660 (origin
661 (method url-fetch)
61c9babb 662 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
663 (sha256
664 (base32
a5f92ca0 665 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 666 (build-system python-build-system)
8498b8cf 667 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 668 (home-page "http://pythonhosted.org/pytz")
9e771e3b 669 (synopsis "Python timezone library")
acc26ff1
CR
670 (description
671 "This library allows accurate and cross platform timezone calculations
672using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 673 (license license:expat)))
5ace6e2f 674
89114f39 675(define-public python2-pytz
11bb85a1 676 (package-with-python2 python-pytz))
89114f39 677
fc50e9c6 678
89114f39 679(define-public python-babel
5ace6e2f 680 (package
89114f39 681 (name "python-babel")
ffb1e98d 682 (version "2.3.4")
5ace6e2f
CR
683 (source
684 (origin
685 (method url-fetch)
b850a6d8 686 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
687 (sha256
688 (base32
ffb1e98d 689 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 690 (build-system python-build-system)
f22efa01 691 (propagated-inputs
f3b98f4f 692 `(("python-pytz" ,python-pytz)))
8498b8cf 693 (arguments `(#:tests? #f)) ; no test target
e1804763 694 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
695 (synopsis
696 "Tools for internationalizing Python applications")
697 (description
698 "Babel is composed of two major parts:
699- tools to build and work with gettext message catalogs
700- a Python interface to the CLDR (Common Locale Data Repository), providing
701access to various locale display names, localized number and date formatting,
702etc. ")
3f641af0 703 (license license:bsd-3)))
89114f39
AE
704
705(define-public python2-babel
11bb85a1 706 (package-with-python2 python-babel))
73adf220 707
ed377cc6
RW
708(define-public python2-backport-ssl-match-hostname
709 (package
710 (name "python2-backport-ssl-match-hostname")
f2d06d46 711 (version "3.5.0.1")
ed377cc6
RW
712 (source
713 (origin
714 (method url-fetch)
715 (uri (string-append
716 "https://pypi.python.org/packages/source/b/"
717 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
718 version ".tar.gz"))
719 (sha256
720 (base32
f2d06d46 721 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 722 (build-system python-build-system)
f2d06d46
EF
723 (arguments
724 `(#:python ,python-2
725 #:tests? #f)) ; no test target
f2d06d46
EF
726 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
727 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
728 (description
729 "This backport brings the ssl.match_hostname() function to users of
730earlier versions of Python. The function checks the hostname in the
731certificate returned by the server to which a connection has been established,
732and verifies that it matches the intended target hostname.")
3f641af0 733 (license license:psfl)))
ed377cc6 734
d205f895
TD
735(define-public python-hdf4
736 (package
737 (name "python-hdf4")
738 (version "0.9")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (pypi-uri name version))
743 (sha256
744 (base32
745 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
746 (build-system python-build-system)
747 (native-inputs `(("nose" ,python-nose)))
748 (propagated-inputs `(("numpy" ,python-numpy)))
749 (inputs
750 `(("hdf4" ,hdf4)
751 ("libjpeg" ,libjpeg)
752 ("zlib" ,zlib)))
753 (arguments
754 `(#:phases
755 (modify-phases %standard-phases
756 (replace 'check
757 (lambda _
758 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
759 ;; on to import numpy. Somehow this works on their CI system.
760 ;; Let's just manage PYTHONPATH here instead.
761 (substitute* "runexamples.sh"
762 (("export PYTHONPATH=.*") ""))
763 (setenv "PYTHONPATH"
764 (string-append (getcwd) ":"
765 (getenv "PYTHONPATH")))
766 (and (zero? (system* "./runexamples.sh"))
767 (zero? (system* "nosetests" "-v"))))))))
768 (home-page "https://github.com/fhs/python-hdf4")
769 (synopsis "Python interface to the NCSA HDF4 library")
770 (description
771 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
772which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
773NetCDF files can also be read and modified. Python-HDF4 is a fork of
774@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
775 (license license:expat)))
776
777(define-public python2-hdf4
778 (package-with-python2 python-hdf4))
779
ef5cbf9b
RW
780(define-public python-h5py
781 (package
782 (name "python-h5py")
fe147c41 783 (version "2.6.0")
ef5cbf9b
RW
784 (source
785 (origin
786 (method url-fetch)
fe147c41 787 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
788 (sha256
789 (base32
fe147c41 790 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 791 (build-system python-build-system)
797e1401
RW
792 (arguments
793 `(#:tests? #f ; no test target
794 #:phases
795 (modify-phases %standard-phases
796 (add-after 'unpack 'fix-hdf5-paths
797 (lambda* (#:key inputs #:allow-other-keys)
798 (let ((prefix (assoc-ref inputs "hdf5")))
799 (substitute* "setup_build.py"
800 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']"))
802 (("'/opt/local/include', '/usr/local/include'")
803 (string-append "'" prefix "/include" "'")))
804 (substitute* "setup_configure.py"
805 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
806 (string-append "['" prefix "/lib" "']")))
807 #t))))))
3c4010b1 808 (propagated-inputs
69866690
HG
809 `(("python-six" ,python-six)
810 ("python-numpy" ,python-numpy)))
ef5cbf9b 811 (inputs
69866690 812 `(("hdf5" ,hdf5)))
ef5cbf9b 813 (native-inputs
fe147c41
EF
814 `(("python-cython" ,python-cython)
815 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
816 (home-page "http://www.h5py.org/")
817 (synopsis "Read and write HDF5 files from Python")
818 (description
819 "The h5py package provides both a high- and low-level interface to the
820HDF5 library from Python. The low-level interface is intended to be a
821complete wrapping of the HDF5 API, while the high-level component supports
822access to HDF5 files, datasets and groups using established Python and NumPy
823concepts.")
9820a028 824 (license license:bsd-3)))
ef5cbf9b
RW
825
826(define-public python2-h5py
9820a028 827 (package-with-python2 python-h5py))
ef5cbf9b 828
ea8450c8
TD
829(define-public python-netcdf4
830 (package
831 (name "python-netcdf4")
d5a97839 832 (version "1.2.7")
ea8450c8
TD
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "netCDF4" version))
837 (sha256
838 (base32
d5a97839 839 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-cython" ,python-cython)))
843 (propagated-inputs
844 `(("python-numpy" ,python-numpy)))
845 (inputs
846 `(("netcdf" ,netcdf)
847 ("hdf4" ,hdf4)
848 ("hdf5" ,hdf5)))
849 (arguments
850 '(#:phases
851 (modify-phases %standard-phases
852 (replace 'check
853 (lambda _
854 (setenv "NO_NET" "1") ; disable opendap tests
855 (with-directory-excursion "test"
856 (setenv "PYTHONPATH" ; find and add the library we just built
857 (string-append
858 (car (find-files "../build" "lib.*"
859 #:directories? #:t
860 #:fail-on-error? #:t))
861 ":" (getenv "PYTHONPATH")))
862 (zero? (system* "python" "run_all.py"))))))))
863 (home-page
864 "https://github.com/Unidata/netcdf4-python")
865 (synopsis "Python/numpy interface to the netCDF library")
866 (description "Netcdf4-python is a Python interface to the netCDF C
867library. netCDF version 4 has many features not found in earlier
868versions of the library and is implemented on top of HDF5. This module
869can read and write files in both the new netCDF 4 and the old netCDF 3
870format, and can create files that are readable by HDF5 clients. The
871API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
872to users of that module.")
873 ;; The software is mainly ISC, but includes some files covered
874 ;; by the Expat license.
875 (license (list license:isc license:expat))))
876
877(define-public python2-netcdf4
878 (package-with-python2 python-netcdf4))
879
c1448c69
EB
880(define-public python-lockfile
881 (package
882 (name "python-lockfile")
692add53 883 (version "0.12.2")
c1448c69
EB
884 (source
885 (origin
886 (method url-fetch)
887 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
888 "lockfile-" version ".tar.gz"))
889 (sha256
890 (base32
692add53 891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
692add53
BW
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
6a8f26a4 896 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900API for locking files.")
f210e944 901 (license license:expat)))
c1448c69
EB
902
903(define-public python2-lockfile
f210e944 904 (package-with-python2 python-lockfile))
c1448c69 905
5a1a4bf6
EB
906(define-public python-mock
907 (package
908 (name "python-mock")
909 (version "1.0.1")
910 (source
911 (origin
912 (method url-fetch)
6b7877e1 913 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
914 (sha256
915 (base32
916 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
917 (build-system python-build-system)
918 (arguments '(#:test-target "check"))
6b7877e1 919 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 920 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
921 (description
922 "Mock is a library for testing in Python. It allows you to replace parts
923of your system under test with mock objects and make assertions about how they
924have been used.")
bd3fa666 925 (license license:expat)))
5a1a4bf6
EB
926
927(define-public python2-mock
928 (package-with-python2 python-mock))
929
fc50e9c6 930
73adf220
AE
931(define-public python-setuptools
932 (package
933 (name "python-setuptools")
d660f7be 934 (version "31.0.0")
73adf220
AE
935 (source
936 (origin
937 (method url-fetch)
d660f7be 938 (uri (pypi-uri "setuptools" version))
73adf220
AE
939 (sha256
940 (base32
d660f7be 941 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
942 (modules '((guix build utils)))
943 (snippet
944 '(begin
945 ;; Remove included binaries which are used to build self-extracting
946 ;; installers for Windows.
947 ;; TODO: Find some way to build them ourself so we can include them.
948 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
949 #t))))
73adf220 950 (build-system python-build-system)
d3d656c5
AE
951 ;; FIXME: Tests require pytest, which itself relies on setuptools.
952 ;; One could bootstrap with an internal untested setuptools.
73adf220 953 (arguments
824af8ca 954 `(#:tests? #f))
73adf220
AE
955 (home-page "https://pypi.python.org/pypi/setuptools")
956 (synopsis
957 "Library designed to facilitate packaging Python projects")
958 (description
959 "Setuptools is a fully-featured, stable library designed to facilitate
960packaging Python projects, where packaging includes:
961Python package and module definitions,
962distribution package metadata,
963test hooks,
964project installation,
965platform-specific details,
966Python 3 support.")
d660f7be
MB
967 ;; TODO: setuptools now bundles the following libraries:
968 ;; packaging, pyparsing, six and appdirs. How to unbundle?
969 (license (list license:psfl ; setuptools itself
970 license:expat ; six, appdirs, pyparsing
971 license:asl2.0 ; packaging is dual ASL2/BSD-2
972 license:bsd-2))))
73adf220
AE
973
974(define-public python2-setuptools
975 (package-with-python2 python-setuptools))
fc50e9c6 976
aa21c764 977;;; Pycrypto is abandoned upstream:
1194575b 978;;;
aa21c764 979;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 980;;;
aa21c764 981;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
982(define-public python-pycrypto
983 (package
984 (name "python-pycrypto")
985 (version "2.6.1")
986 (source
987 (origin
988 (method url-fetch)
aa21c764
LF
989 (uri (pypi-uri "pycrypto" version))
990 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
991 (sha256
992 (base32
993 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
994 (build-system python-build-system)
cafc3f5a
EB
995 (inputs
996 `(("python" ,python)
997 ("gmp" ,gmp)))
998 (arguments
999 `(#:phases
1000 (alist-cons-before
1001 'build 'set-build-env
1002 ;; pycrypto runs an autoconf configure script behind the scenes
1003 (lambda _
1004 (setenv "CONFIG_SHELL" (which "bash")))
1005 %standard-phases)))
1006 (home-page "http://www.pycrypto.org/")
1007 (synopsis "Cryptographic modules for Python")
1008 (description
1009 "Pycrypto is a collection of both secure hash functions (such as SHA256
1010and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1011etc.). The package is structured to make adding new modules easy.")
3f641af0 1012 (license license:public-domain)))
cafc3f5a 1013
345f0611 1014(define-public python2-pycrypto
1c0059da
EF
1015 (let ((pycrypto (package-with-python2 python-pycrypto)))
1016 (package (inherit pycrypto)
1017 (inputs
1018 `(("python" ,python-2)
1019 ,@(alist-delete
1020 "python"
1021 (package-inputs pycrypto)))))))
345f0611 1022
de959250 1023(define-public python-eventlet
1024 (package
1025 (name "python-eventlet")
1026 (version "0.20.1")
1027 (source
1028 (origin
1029 (method url-fetch)
1030 (uri (pypi-uri "eventlet" version))
1031 (sha256
1032 (base32
1033 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1034 (build-system python-build-system)
1035 (propagated-inputs
1036 `(("python-greenlet" ,python-greenlet)))
1037 (home-page "http://eventlet.net")
1038 (synopsis "Concurrent networking library for Python")
1039 (description
1040 "Eventlet is a concurrent networking library for Python that
1041allows you to change how you run your code, not how you write it.
1042It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1043Coroutines ensure that the developer uses a blocking style of programming
1044that is similar to threading, but provide the benefits of non-blocking I/O.
1045The event dispatch is implicit, which means you can easily use @code{Eventlet}
1046from the Python interpreter, or as a small part of a larger application.")
1047 (license license:expat)))
1048
1049(define-public python2-eventlet
1050 (let ((base (package-with-python2
1051 (strip-python2-variant python-eventlet))))
1052 (package (inherit base)
1053 (propagated-inputs
1054 `(("python2-enum34" ,python2-enum34)
1055 ,@(package-propagated-inputs base))))))
1056
cafc3f5a
EB
1057(define-public python-keyring
1058 (package
1059 (name "python-keyring")
13f3ff35 1060 (version "8.7")
cafc3f5a
EB
1061 (source
1062 (origin
1063 (method url-fetch)
664e6c3a 1064 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1065 (sha256
1066 (base32
13f3ff35 1067 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1068 (build-system python-build-system)
1069 (native-inputs
13f3ff35 1070 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1071 (propagated-inputs
cafc3f5a
EB
1072 `(("python-pycrypto" ,python-pycrypto)))
1073 (arguments
664e6c3a 1074 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1075 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1076 (synopsis "Store and access your passwords safely")
1077 (description
1078 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1079service from python. It can be used in any application that needs safe
cafc3f5a
EB
1080password storage.")
1081 ;; "MIT" and PSF dual license
f210e944 1082 (license license:x11)))
cafc3f5a 1083
d7af1069 1084(define-public python2-keyring
f210e944 1085 (package-with-python2 python-keyring))
d7af1069 1086
a480bc41
EB
1087(define-public python-six
1088 (package
1089 (name "python-six")
b6ab89ef 1090 (version "1.10.0")
a480bc41
EB
1091 (source
1092 (origin
1093 (method url-fetch)
b6ab89ef 1094 (uri (pypi-uri "six" version))
a480bc41
EB
1095 (sha256
1096 (base32
b6ab89ef 1097 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1098 (build-system python-build-system)
4fd129ee
MB
1099 (native-inputs
1100 `(("python-py" ,python-py)
1101 ("python-pytest" ,python-pytest)))
a480bc41
EB
1102 (home-page "http://pypi.python.org/pypi/six/")
1103 (synopsis "Python 2 and 3 compatibility utilities")
1104 (description
35b9e423 1105 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1106functions for smoothing over the differences between the Python versions with
1107the goal of writing Python code that is compatible on both Python versions.
35b9e423 1108Six supports every Python version since 2.5. It is contained in only one
a480bc41 1109Python file, so it can be easily copied into your project.")
3f641af0 1110 (license license:x11)))
a480bc41 1111
0c20025c
AE
1112(define-public python2-six
1113 (package-with-python2 python-six))
1114
22d7360b 1115(define-public python-dateutil
cafc3f5a
EB
1116 (package
1117 (name "python-dateutil")
6bd9ad69 1118 (version "2.5.3")
cafc3f5a
EB
1119 (source
1120 (origin
1121 (method url-fetch)
394b8060 1122 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1123 (sha256
1124 (base32
6bd9ad69 1125 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
cafc3f5a 1126 (build-system python-build-system)
f22efa01 1127 (propagated-inputs
394b8060 1128 `(("python-six" ,python-six)))
b5a5fb19 1129 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1130 (synopsis "Extensions to the standard datetime module")
1131 (description
1132 "The dateutil module provides powerful extensions to the standard
1133datetime module, available in Python 2.3+.")
f210e944 1134 (license license:bsd-3)))
cafc3f5a 1135
fc50e9c6
AE
1136(define-public python2-dateutil
1137 (package-with-python2 python-dateutil))
1d08c01f 1138
cafc3f5a
EB
1139(define-public python-parsedatetime
1140 (package
1141 (name "python-parsedatetime")
eebf6f01 1142 (version "2.1")
cafc3f5a
EB
1143 (source
1144 (origin
1145 (method url-fetch)
eebf6f01 1146 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1147 (sha256
1148 (base32
eebf6f01 1149 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1150 (build-system python-build-system)
1151 (native-inputs
eebf6f01
EF
1152 `(("python-nose" ,python-nose)
1153 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1154 (home-page "http://github.com/bear/parsedatetime/")
1155 (synopsis
1156 "Parse human-readable date/time text")
1157 (description
e881752c 1158 "Parse human-readable date/time text.")
f210e944 1159 (license license:asl2.0)))
cafc3f5a 1160
38b8f9b2 1161(define-public python2-parsedatetime
f210e944 1162 (package-with-python2 python-parsedatetime))
38b8f9b2 1163
d072efcb
RW
1164(define-public python-pandas
1165 (package
1166 (name "python-pandas")
7d0c3c8d 1167 (version "0.18.1")
d072efcb
RW
1168 (source
1169 (origin
1b96f069 1170 (method url-fetch)
7d0c3c8d
EF
1171 (uri (string-append
1172 "https://pypi.python.org/packages/11/09/"
1173 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1174 "pandas-" version ".tar.gz"))
1b96f069 1175 (sha256
7d0c3c8d 1176 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1177 (build-system python-build-system)
d072efcb 1178 (propagated-inputs
f22efa01
HG
1179 `(("python-numpy" ,python-numpy)
1180 ("python-pytz" ,python-pytz)
22d7360b 1181 ("python-dateutil" ,python-dateutil)))
d072efcb 1182 (native-inputs
abcc7a0e
HG
1183 `(("python-nose" ,python-nose)
1184 ("python-cython" ,python-cython)))
d072efcb
RW
1185 (home-page "http://pandas.pydata.org")
1186 (synopsis "Data structures for data analysis, time series, and statistics")
1187 (description
1188 "Pandas is a Python package providing fast, flexible, and expressive data
1189structures designed to make working with structured (tabular,
1190multidimensional, potentially heterogeneous) and time series data both easy
1191and intuitive. It aims to be the fundamental high-level building block for
1192doing practical, real world data analysis in Python.")
f210e944 1193 (license license:bsd-3)))
d072efcb
RW
1194
1195(define-public python2-pandas
f210e944 1196 (package-with-python2 python-pandas))
d072efcb 1197
cafc3f5a
EB
1198(define-public python-tzlocal
1199 (package
1200 (name "python-tzlocal")
ed80839b 1201 (version "1.2.2")
cafc3f5a
EB
1202 (source
1203 (origin
1204 (method url-fetch)
226d3331 1205 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1206 (sha256
1207 (base32
ed80839b 1208 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1209 (build-system python-build-system)
f22efa01
HG
1210 (propagated-inputs
1211 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1212 (home-page "https://github.com/regebro/tzlocal")
1213 (synopsis
35b9e423 1214 "Local timezone information for Python")
cafc3f5a
EB
1215 (description
1216 "Tzlocal returns a tzinfo object with the local timezone information.
1217This module attempts to fix a glaring hole in pytz, that there is no way to
1218get the local timezone information, unless you know the zoneinfo name, and
1219under several distributions that's hard or impossible to figure out.")
3f641af0 1220 (license license:cc0)))
cafc3f5a 1221
1d08c01f
AE
1222(define-public python2-pysqlite
1223 (package
1224 (name "python2-pysqlite")
e80aaeb4 1225 (version "2.8.3")
1d08c01f
AE
1226 (source
1227 (origin
1228 (method url-fetch)
fe476868 1229 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1230 (sha256
1231 (base32
e80aaeb4 1232 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1233 (build-system python-build-system)
1234 (inputs
1235 `(("sqlite" ,sqlite)))
1236 (arguments
1237 `(#:python ,python-2 ; incompatible with Python 3
1238 #:tests? #f)) ; no test target
fe476868 1239 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1240 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1241 (description
1242 "Pysqlite provides SQLite bindings for Python that comply to the
1243Database API 2.0T.")
ed0cdf83 1244 (license license:zlib)))
1d08c01f 1245
2875caf5
AE
1246
1247(define-public python2-mechanize
1248 (package
1249 (name "python2-mechanize")
1250 (version "0.2.5")
1251 (source
1252 (origin
1253 (method url-fetch)
1254 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1255 version ".tar.gz"))
1256 (sha256
1257 (base32
1258 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1259 (build-system python-build-system)
2875caf5
AE
1260 (arguments
1261 `(#:python ,python-2 ; apparently incompatible with Python 3
1262 #:tests? #f))
1263 ;; test fails with message
1264 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1265 ;; (python-3.3.2) or
1266 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1267 ;; (python-2.7.5).
1268 ;; The source code is from March 2011 and probably not up-to-date
1269 ;; with respect to python unit tests.
1270 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1271 (synopsis
1272 "Stateful programmatic web browsing in Python")
1273 (description
1274 "Mechanize implements stateful programmatic web browsing in Python,
1275after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1276 (license (license:non-copyleft
1277 "file://COPYING"
1278 "See COPYING in the distribution."))))
2875caf5 1279
0352532e
AE
1280
1281(define-public python-simplejson
1282 (package
1283 (name "python-simplejson")
b2e6e150 1284 (version "3.10.0")
0352532e
AE
1285 (source
1286 (origin
1287 (method url-fetch)
988d1bad 1288 (uri (pypi-uri "simplejson" version))
0352532e
AE
1289 (sha256
1290 (base32
b2e6e150 1291 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1292 (build-system python-build-system)
1293 (home-page "http://simplejson.readthedocs.org/en/latest/")
1294 (synopsis
1295 "Json library for Python")
1296 (description
e881752c
AK
1297 "JSON (JavaScript Object Notation) is a subset of JavaScript
1298syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1299format.
0352532e
AE
1300
1301Simplejson exposes an API familiar to users of the standard library marshal
1302and pickle modules. It is the externally maintained version of the json
1303library contained in Python 2.6, but maintains compatibility with Python 2.5
1304and (currently) has significant performance advantages, even without using
1305the optional C extension for speedups. Simplejson is also supported on
1306Python 3.3+.")
3f641af0 1307 (license license:x11)))
0352532e
AE
1308
1309(define-public python2-simplejson
1310 (package-with-python2 python-simplejson))
421a80a2
AE
1311
1312
ed07b08d 1313(define-public python-pyicu
421a80a2 1314 (package
ed07b08d 1315 (name "python-pyicu")
2e161eaf 1316 (version "1.9.5")
421a80a2
AE
1317 (source
1318 (origin
1319 (method url-fetch)
2e161eaf 1320 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1321 (sha256
1322 (base32
2e161eaf 1323 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1324 (build-system python-build-system)
dc027d40
MB
1325 (arguments
1326 '(#:phases
1327 (modify-phases %standard-phases
1328 (add-before 'check 'delete-failing-test
1329 (lambda _
1330 ;; XXX: These tests require locales that are unavailable
1331 ;; in the build environment.
1332 (delete-file "test/test_DateTimeParserGenerator.py")
1333 #t)))))
421a80a2
AE
1334 (inputs
1335 `(("icu4c" ,icu4c)))
421a80a2 1336 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1337 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1338 (description
1339 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1340 (license license:x11)))
ed07b08d
LF
1341
1342(define-public python2-pyicu
f210e944 1343 (package-with-python2 python-pyicu))
cc20a22a
LC
1344
1345(define-public python2-dogtail
1346 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1347 ;; spaces in indentation" with Python 3.
1348 (package
1349 (name "python2-dogtail")
1350 (version "0.8.2")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append
1354 "https://fedorahosted.org/released/dogtail/dogtail-"
1355 version ".tar.gz"))
1356 (sha256
1357 (base32
1358 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1359 (build-system python-build-system)
1360 (arguments `(#:python ,python-2
1361 #:tests? #f)) ; invalid command "test"
1362 (home-page "https://fedorahosted.org/dogtail/")
1003fbcf 1363 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1364 (description
35b9e423 1365 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1366It uses Accessibility (a11y) technologies to communicate with desktop
1367applications. dogtail scripts are written in Python and executed like any
1368other Python program.")
3f641af0 1369 (license license:gpl2+)))
515e6878 1370
011b18c3
LC
1371(define-public python2-empy
1372 (package
1373 (name "python2-empy")
1374 (version "3.3")
1375 (source (origin
1376 (method url-fetch)
1377 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1378 version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:python ,python-2
1385 #:phases (alist-replace
1386 'check
1387 (lambda _
1388 (zero? (system* "./test.sh")))
1389 %standard-phases)))
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1392 (description
1393 "EmPy is a system for embedding Python expressions and statements in
1394template text; it takes an EmPy source file, processes it, and produces
1395output. This is accomplished via expansions, which are special signals to the
1cd4027c 1396EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1397EmPy can expand arbitrary Python expressions and statements in this way, as
1398well as a variety of special forms. Textual data not explicitly delimited in
1399this way is sent unaffected to the output, allowing Python to be used in
1400effect as a markup language. Also supported are callbacks via hooks,
1401recording and playback via diversions, and dynamic, chainable filters. The
1402system is highly configurable via command line options and embedded
1403commands.")
3f641af0 1404 (license license:lgpl2.1+)))
011b18c3 1405
8deeda0c
LC
1406(define-public python2-element-tree
1407 (package
1408 (name "python2-element-tree")
1409 (version "1.2.6")
1410 (source (origin
1411 (method url-fetch)
1412 (uri (string-append
1413 "http://effbot.org/media/downloads/elementtree-"
1414 version "-20050316.tar.gz"))
1415 (sha256
1416 (base32
1417 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1418 (build-system python-build-system)
1419 (arguments
1420 `(#:python ,python-2 ; seems to be part of Python 3
1421 #:tests? #f)) ; no 'test' sub-command
1422 (synopsis "Toolkit for XML processing in Python")
1423 (description
1424 "ElementTree is a Python library supporting lightweight XML processing.")
1425 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1426 (license (license:x11-style
1427 "http://docs.python.org/2/license.html"
1428 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1429
1430(define-public python2-pybugz
1431 (package
1432 (name "python2-pybugz")
1433 (version "0.6.11")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append
1437 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1438 version ".tar.gz"))
1439 (sha256
1440 (base32
6f194a1e 1441 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1442 (patches (search-patches "pybugz-stty.patch"
1443 "pybugz-encode-error.patch"))))
8deeda0c
LC
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:python ,python-2 ; SyntaxError with Python 3
1447 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1448 (propagated-inputs
1449 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1450 (synopsis "Python and command-line interface to Bugzilla")
1451 (description
1452 "PyBugz is a Python library and command-line tool to query the Bugzilla
1453bug tracking system. It is meant as an aid to speed up interaction with the
1454bug tracker.")
1455 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1456 (license license:gpl2)))
8deeda0c 1457
a480bc41
EB
1458(define-public python-enum34
1459 (package
1460 (name "python-enum34")
d39ae1e5 1461 (version "1.1.0")
a480bc41
EB
1462 (source
1463 (origin
1464 (method url-fetch)
d39ae1e5 1465 (uri (pypi-uri "enum34" version))
a480bc41
EB
1466 (sha256
1467 (base32
d39ae1e5 1468 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1469 (build-system python-build-system)
a480bc41
EB
1470 (arguments
1471 `(#:phases
1472 (alist-replace
1473 'check
1474 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1475 %standard-phases)))
1476 (home-page "https://pypi.python.org/pypi/enum34")
1477 (synopsis "Backported Python 3.4 Enum")
1478 (description
1479 "Enum34 is the new Python stdlib enum module available in Python 3.4
1480backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1481 (license license:bsd-3)))
a480bc41 1482
820acd1b
LF
1483(define-public python2-enum34
1484 (package-with-python2 python-enum34))
1485
a480bc41
EB
1486(define-public python-parse-type
1487 (package
1488 (name "python-parse-type")
1489 (version "0.3.4")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (string-append "https://pypi.python.org/packages/source/p/"
1494 "parse_type/parse_type-" version ".tar.gz"))
1495 (sha256
1496 (base32
1497 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1498 (build-system python-build-system)
f22efa01 1499 (propagated-inputs
f3b98f4f 1500 `(("python-six" ,python-six)
68f1cdec 1501 ("python-parse" ,python-parse)))
a480bc41
EB
1502 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1503 (home-page "https://github.com/jenisys/parse_type")
1504 (synopsis "Extended parse module")
1505 (description
1506 "Parse_type extends the python parse module.")
3f641af0 1507 (license license:bsd-3)))
a480bc41
EB
1508
1509(define-public python-parse
1510 (package
1511 (name "python-parse")
eb3d3503 1512 (version "1.6.6")
a480bc41
EB
1513 (source
1514 (origin
1515 (method url-fetch)
eb3d3503 1516 (uri (pypi-uri "parse" version))
a480bc41
EB
1517 (sha256
1518 (base32
aa6c09ed
EF
1519 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1520 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1521 (build-system python-build-system)
1522 (arguments
1523 `(#:phases
f9a65318
EF
1524 (modify-phases %standard-phases
1525 (replace 'check
1526 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1527 (home-page "https://github.com/r1chardj0n3s/parse")
1528 (synopsis "Parse strings")
1529 (description
1530 "Parse strings using a specification based on the Python format()
1531syntax.")
3f641af0 1532 (license license:x11)))
a480bc41 1533
d3eff97a
JL
1534(define-public python-polib
1535 (package
1536 (name "python-polib")
1537 (version "1.0.8")
1538 (source (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "polib" version))
1541 (sha256
1542 (base32
1543 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1544 (build-system python-build-system)
1545 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1546 (synopsis "Manipulate, create and modify gettext files")
1547 (description "Polib can manipulate any gettext format (po, pot and mo)
1548files. It can be used to create po files from scratch or to modify
1549existing ones.")
1550 (license license:expat)))
1551
1552(define-public python2-polib
1553 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1554 (package
1555 (inherit base)
1556 (arguments `(,@(package-arguments base)
1557 ;; Tests don't work with python2.
1558 #:tests? #f)))))
a480bc41 1559
515e6878
LC
1560(define-public scons
1561 (package
1562 (name "scons")
a3f61425 1563 (version "2.3.4")
515e6878
LC
1564 (source (origin
1565 (method url-fetch)
de67e922
LF
1566 (uri (string-append "mirror://sourceforge/scons/scons/" version
1567 "/scons-" version ".tar.gz"))
515e6878
LC
1568 (sha256
1569 (base32
a3f61425 1570 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1571 (build-system python-build-system)
1572 (arguments
1573 ;; With Python 3.x, fails to build with a syntax error.
1574 `(#:python ,python-2
b3e8b4bd 1575 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1576 #:tests? #f)) ; no 'python setup.py test' command
1577 (home-page "http://scons.org/")
1578 (synopsis "Software construction tool written in Python")
1579 (description
1580 "SCons is a software construction tool. Think of SCons as an improved,
1581cross-platform substitute for the classic Make utility with integrated
1582functionality similar to autoconf/automake and compiler caches such as ccache.
1583In short, SCons is an easier, more reliable and faster way to build
1584software.")
3f641af0 1585 (license license:x11)))
011b18c3 1586
c15a5c0e
DT
1587(define-public python-extras
1588 (package
1589 (name "python-extras")
1590 (version "0.0.3")
1591 (source
1592 (origin
1593 (method url-fetch)
1594 (uri (string-append
1595 "https://pypi.python.org/packages/source/e/extras/extras-"
1596 version ".tar.gz"))
1597 (sha256
1598 (base32
1599 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1600 (build-system python-build-system)
c15a5c0e
DT
1601 (arguments
1602 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1603 '(#:tests? #f))
1604 (home-page "https://github.com/testing-cabal/extras")
1605 (synopsis "Useful extensions to the Python standard library")
1606 (description
1607 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1608 (license license:expat)))
c15a5c0e
DT
1609
1610(define-public python2-extras
1611 (package-with-python2 python-extras))
1612
56ea0efd
DT
1613(define-public python-mimeparse
1614 (package
1615 (name "python-mimeparse")
1616 (version "0.1.4")
1617 (source
1618 (origin
1619 (method url-fetch)
1620 (uri (string-append
1621 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1622 version ".tar.gz"))
1623 (sha256
1624 (base32
1625 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1626 (build-system python-build-system)
56ea0efd
DT
1627 (arguments
1628 '(#:tests? #f)) ; no setup.py test command
1629 (home-page
1630 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1631 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1632 (description
1633 "Mimeparse provides basic functions for parsing MIME type names and
1634matching them against a list of media-ranges.")
bd3fa666 1635 (license license:expat)))
56ea0efd
DT
1636
1637(define-public python2-mimeparse
1638 (package-with-python2 python-mimeparse))
1639
4435427e
DT
1640(define-public python-nose
1641 (package
1642 (name "python-nose")
f7cb9841 1643 (version "1.3.7")
4435427e
DT
1644 (source
1645 (origin
1646 (method url-fetch)
f7cb9841 1647 (uri (pypi-uri "nose" version))
4435427e
DT
1648 (sha256
1649 (base32
f7cb9841 1650 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1651 (build-system python-build-system)
4435427e
DT
1652 (arguments
1653 '(#:tests? #f)) ; FIXME: test suite fails
1654 (home-page "http://readthedocs.org/docs/nose/")
1655 (synopsis "Python testing library")
1656 (description
1657 "Nose extends the unittest library to make testing easier.")
3f641af0 1658 (license license:lgpl2.0+)))
4435427e
DT
1659
1660(define-public python2-nose
1661 (package-with-python2 python-nose))
1662
0aea283a
EF
1663(define-public python-nose2
1664 (package
1665 (name "python-nose2")
1666 (version "0.6.5")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "nose2" version))
1671 (sha256
1672 (base32
1673 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1674 (build-system python-build-system)
1675 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1676 (propagated-inputs
0aea283a
EF
1677 `(("python-cov-core" ,python-cov-core)
1678 ("python-pytest-cov" ,python-pytest-cov)
1679 ("python-six" ,python-six)))
1680 (home-page "https://github.com/nose-devs/nose2")
1681 (synopsis "Next generation of nicer testing for Python")
1682 (description
1683 "Nose2 is the next generation of nicer testing for Python, based on the
1684plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1685better plugin api, being easier for users to configure, and simplifying internal
1686interfaces and processes.")
1687 (license license:bsd-2)))
1688
1689(define-public python2-nose2
1690 (package-with-python2 python-nose2))
1691
6cd9c356
DT
1692(define-public python-unittest2
1693 (package
1694 (name "python-unittest2")
1695 (version "0.5.1")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (string-append
1700 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1701 version ".tar.gz"))
1702 (sha256
1703 (base32
1704 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1705 (build-system python-build-system)
6cd9c356
DT
1706 (home-page "http://pypi.python.org/pypi/unittest2")
1707 (synopsis "Python unit testing library")
1708 (description
1709 "Unittest2 is a replacement for the unittest module in the Python
1710standard library.")
3f641af0 1711 (license license:psfl)))
6cd9c356
DT
1712
1713(define-public python2-unittest2
1714 (package (inherit python-unittest2)
1715 (name "python2-unittest2")
1716 (version "0.5.1")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (string-append
1721 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1722 version ".tar.gz"))
1723 (sha256
1724 (base32
1725 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1726 (arguments
1727 `(#:python ,python-2
1728 #:tests? #f)))) ; no setup.py test command
1729
02f8f804 1730(define-public python-pafy
1731 (package
1732 (name "python-pafy")
1733 (version "0.5.2")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "pafy" version))
1738 (sha256
1739 (base32
1740 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1741 (build-system python-build-system)
ed3fee5f 1742 (arguments
1743 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1744 (propagated-inputs
1745 ;; Youtube-dl is a python package which is imported in the file
1746 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1747 `(("youtube-dl" ,youtube-dl)))
1748 (home-page "https://np1.github.io/pafy/")
1749 (synopsis "Retrieve YouTube content and metadata")
1750 (description
1751 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1752 (license license:lgpl3+)))
1753
542ad60f
DT
1754(define-public python-py
1755 (package
1756 (name "python-py")
71c8a804 1757 (version "1.4.31")
542ad60f
DT
1758 (source
1759 (origin
1760 (method url-fetch)
71c8a804 1761 (uri (pypi-uri "py" version))
542ad60f
DT
1762 (sha256
1763 (base32
71c8a804 1764 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1765 (build-system python-build-system)
dcb0da7b
MB
1766 (arguments
1767 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1768 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1769 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1770 ;; Is this module globally installed?"
1771 '(#:tests? #f))
542ad60f
DT
1772 (home-page "http://pylib.readthedocs.org/")
1773 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1774 (description
1775 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1776code introspection, and logging.")
bd3fa666 1777 (license license:expat)))
542ad60f
DT
1778
1779(define-public python2-py
1780 (package-with-python2 python-py))
1781
855d4761
DT
1782(define-public python-pytest
1783 (package
1784 (name "python-pytest")
61a4332d 1785 (version "2.7.3")
855d4761
DT
1786 (source
1787 (origin
1788 (method url-fetch)
1789 (uri (string-append
1790 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1791 version ".tar.gz"))
1792 (sha256
1793 (base32
61a4332d 1794 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1795 (modules '((guix build utils)))
1796 (snippet
1797 ;; One of the tests involves the /usr directory, so it fails.
1798 '(substitute* "testing/test_argcomplete.py"
1799 (("def test_remove_dir_prefix\\(self\\):")
1800 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1801 (build-system python-build-system)
482d9591
HG
1802 (propagated-inputs
1803 `(("python-py" ,python-py)))
e7881f3d 1804 (native-inputs
482d9591 1805 `(("python-nose" ,python-nose)
855d4761
DT
1806 ("python-mock" ,python-mock)))
1807 (home-page "http://pytest.org")
1808 (synopsis "Python testing library")
1809 (description
1810 "Pytest is a testing tool that provides auto-discovery of test modules
1811and functions, detailed info on failing assert statements, modular fixtures,
1812and many external plugins.")
bd3fa666 1813 (license license:expat)))
855d4761
DT
1814
1815(define-public python2-pytest
1816 (package-with-python2 python-pytest))
1817
fca4ff35
LF
1818;; This package is used by Borg until we can upgrade all our Python packages to
1819;; use a more recent pytest.
1820(define-public python-pytest-2.9.2
1821 (package
1822 (inherit python-pytest)
1823 (name "python-pytest")
1824 (version "2.9.2")
1825 (source (origin
1826 (method url-fetch)
1827 (uri (pypi-uri "pytest" version))
1828 (sha256
1829 (base32
1830 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1831 (arguments
1832 `(#:phases
1833 (modify-phases %standard-phases
1834 (add-before 'check 'disable-invalid-test
1835 (lambda _
1836 (substitute* "testing/test_argcomplete.py"
1837 (("def test_remove_dir_prefix" line)
1838 (string-append "@pytest.mark.skip"
1839 "(reason=\"Assumes that /usr exists.\")\n "
1840 line)))
1841 #t)))))))
1842
358c3d61
EF
1843(define-public python-pytest-cov
1844 (package
1845 (name "python-pytest-cov")
545f4a1c 1846 (version "2.2.1")
358c3d61
EF
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (pypi-uri "pytest-cov" version))
1851 (sha256
545f4a1c
EF
1852 (base32
1853 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1854 (build-system python-build-system)
ce40b383
HG
1855 (arguments
1856 `(#:phases
1857 (modify-phases %standard-phases
1858 (replace 'check
1859 (lambda _
1860 ;; options taken from tox.ini
1861 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1862 ;; with "Duplicate implicit target name"
1863 (zero? (system* "python" "./setup.py" "check"
1864 "--strict" "--metadata")))))))
f22efa01 1865 (propagated-inputs
10468636
EF
1866 `(("python-coverage" ,python-coverage)
1867 ("python-pytest" ,python-pytest)))
10468636
EF
1868 (home-page "https://github.com/pytest-dev/pytest-cov")
1869 (synopsis "Pytest plugin for measuring coverage")
1870 (description
1871 "Pytest-cov produces coverage reports. It supports centralised testing and
1872distributed testing in both @code{load} and @code{each} modes. It also
1873supports coverage of subprocesses.")
f210e944 1874 (license license:expat)))
358c3d61
EF
1875
1876(define-public python2-pytest-cov
f210e944 1877 (package-with-python2 python-pytest-cov))
358c3d61 1878
6784f2e3
RW
1879(define-public python-pytest-runner
1880 (package
1881 (name "python-pytest-runner")
1882 (version "2.6.2")
1883 (source
1884 (origin
1885 (method url-fetch)
54cd239b 1886 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1887 (sha256
1888 (base32
1889 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1890 (build-system python-build-system)
1891 (arguments
1892 `(#:phases
1893 (modify-phases %standard-phases
1894 ;; The fancy way of setting the version with setuptools_scm does not
1895 ;; seem to work here.
1896 (add-after 'unpack 'set-version
1897 (lambda _
1898 (substitute* "docs/conf.py"
1899 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1900 (string-append "version = \"" ,version "\"")))
1901 #t)))))
1902 (native-inputs
1903 `(("python-pytest" ,python-pytest)
1904 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1905 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1906 (synopsis "Invoke py.test as a distutils command")
1907 (description
1908 "This package provides a @command{pytest-runner} command that
1909@file{setup.py} files can use to run tests.")
f210e944 1910 (license license:expat)))
54cd239b
EF
1911
1912(define-public python2-pytest-runner
f210e944 1913 (package-with-python2 python-pytest-runner))
6784f2e3 1914
44547e51
EF
1915(define-public python-pytest-mock
1916 (package
1917 (name "python-pytest-mock")
1918 (version "1.2")
1919 (source
1920 (origin
1921 (method url-fetch)
1922 (uri (pypi-uri "pytest-mock" version ".zip"))
1923 (sha256
1924 (base32
1925 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1926 (build-system python-build-system)
1927 (native-inputs
1928 `(("unzip" ,unzip)))
f22efa01 1929 (propagated-inputs
d5e41cf2 1930 `(("python-pytest" ,python-pytest)))
44547e51
EF
1931 (home-page "https://github.com/pytest-dev/pytest-mock/")
1932 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1933 (description
1934 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1935around the patching API provided by the @code{mock} package, but with the
1936benefit of not having to worry about undoing patches at the end of a test.
1937The mocker fixture has the same API as @code{mock.patch}, supporting the
1938same arguments.")
1939 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1940 (license license:expat)))
1941
1942(define-public python2-pytest-mock
1943 (let ((base (package-with-python2
1944 (strip-python2-variant python-pytest-mock))))
1945 (package (inherit base)
f22efa01 1946 (propagated-inputs
44547e51 1947 `(("python2-mock" ,python2-mock)
f22efa01 1948 ,@(package-propagated-inputs base))))))
44547e51 1949
8fa58fc9
CAW
1950(define-public python-pytest-xdist
1951 (package
1952 (name "python-pytest-xdist")
1953 (version "1.14")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (pypi-uri "pytest-xdist" version ".zip"))
1958 (sha256
1959 (base32
de585a7e
HG
1960 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1961 (modules '((guix build utils)))
1962 (snippet
1963 '(begin
1964 ;; Remove pre-compiled .pyc files from source.
1965 (for-each delete-file-recursively
1966 (find-files "." "__pycache__" #:directories? #t))
1967 (for-each delete-file (find-files "." "\\.pyc$"))
1968 #t))))
8fa58fc9 1969 (build-system python-build-system)
4eb385fb
MB
1970 (arguments
1971 '(#:tests? #f)) ;FIXME: Some tests are failing.
1972 ;; #:phases
1973 ;; (modify-phases %standard-phases
1974 ;; (delete 'check)
1975 ;; (add-after 'install 'check
1976 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1977 ;; (add-installed-pythonpath inputs outputs)
1978 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1979 (native-inputs
1980 `(("unzip" ,unzip)
8fa58fc9 1981 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1982 (propagated-inputs
c4516ad2 1983 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1984 ("python-pytest" ,python-pytest)
1985 ("python-py" ,python-py)))
1986 (home-page
1987 "https://github.com/pytest-dev/pytest-xdist")
1988 (synopsis
1989 "Plugin for py.test with distributed testing and loop-on-failing modes")
1990 (description
1991 "The pytest-xdist plugin extends py.test with some unique test execution
1992modes: parallelization, running tests in boxed subprocesses, the ability
1993to run tests repeatedly when failed, and the ability to run tests on multiple
1994Python interpreters or platforms. It uses rsync to copy the existing
1995program code to a remote location, executes there, and then syncs the
1996result back.")
f210e944 1997 (license license:expat)))
8fa58fc9
CAW
1998
1999(define-public python2-pytest-xdist
f210e944 2000 (package-with-python2 python-pytest-xdist))
8fa58fc9 2001
84d24017
DT
2002(define-public python-scripttest
2003 (package
2004 (name "python-scripttest")
2005 (version "1.3")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (string-append
2010 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2011 version ".tar.gz"))
2012 (sha256
2013 (base32
2014 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2015 (build-system python-build-system)
521b7772 2016 (native-inputs
f3b98f4f 2017 `(("python-pytest" ,python-pytest)))
84d24017
DT
2018 (home-page "http://pythonpaste.org/scripttest/")
2019 (synopsis "Python library to test command-line scripts")
2020 (description "Scripttest is a Python helper library for testing
2021interactive command-line applications. With it you can run a script in a
2022subprocess and see the output as well as any file modifications.")
bd3fa666 2023 (license license:expat)))
84d24017
DT
2024
2025(define-public python2-scripttest
2026 (package-with-python2 python-scripttest))
2027
d8fa80e1
DT
2028(define-public python-testtools
2029 (package
2030 (name "python-testtools")
7adb9031 2031 (version "1.4.0")
d8fa80e1
DT
2032 (source
2033 (origin
2034 (method url-fetch)
7adb9031 2035 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2036 (sha256
2037 (base32
7adb9031 2038 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2039 (build-system python-build-system)
7adb9031
DM
2040 (arguments
2041 `(#:phases
2042 (modify-phases %standard-phases
2043 (add-after 'unpack 'fix-module-imports
2044 (lambda _
2045 (substitute* "setup.py"
2046 (("'unittest2>=0.8.0',") ""))
2047 (substitute* '("testtools/testcase.py"
2048 "testtools/testsuite.py"
2049 "testtools/run.py"
2050 "testtools/tests/test_run.py"
2051 "testtools/tests/test_testsuite.py"
2052 "testtools/tests/test_deferredruntest.py")
2053 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2054 (("import unittest2 as unittest") "import unittest")
2055 (("import unittest2") "import unittest as unittest2")
2056 (("from unittest2 import") "from unittest import"))
2057 (substitute* "testtools/tests/test_testresult.py"
2058 ;; NUL in source code is not allowed (raises ValueError).
2059 (("\\x00\\x04") "\\x04"))
2060 #t)))))
0e88cbf8 2061 (propagated-inputs
f22efa01
HG
2062 `(("python-mimeparse" ,python-mimeparse)
2063 ("python-extras" ,python-extras)))
d8fa80e1
DT
2064 (home-page "https://github.com/testing-cabal/testtools")
2065 (synopsis
2066 "Extensions to the Python standard library unit testing framework")
2067 (description
2068 "Testtools extends the Python standard library unit testing framework to
2069provide matchers, more debugging information, and cross-Python
2070compatibility.")
3f641af0 2071 (license license:psfl)))
d8fa80e1
DT
2072
2073(define-public python2-testtools
2074 (package-with-python2 python-testtools))
2075
5bf3afea
DT
2076(define-public python-testscenarios
2077 (package
2078 (name "python-testscenarios")
2079 (version "0.4")
2080 (source
2081 (origin
2082 (method url-fetch)
2083 (uri (string-append
2084 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2085 version ".tar.gz"))
2086 (sha256
2087 (base32
2088 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2089 (build-system python-build-system)
f22efa01 2090 (propagated-inputs
8e73d3ba 2091 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2092 (home-page "https://launchpad.net/testscenarios")
2093 (synopsis "Pyunit extension for dependency injection")
2094 (description
2095 "Testscenarios provides clean dependency injection for Python unittest
2096style tests.")
3f641af0 2097 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2098
2099(define-public python2-testscenarios
2100 (package-with-python2 python-testscenarios))
2101
dac79ecc
DT
2102(define-public python-testresources
2103 (package
2104 (name "python-testresources")
2105 (version "0.2.7")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (string-append
2110 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2111 version ".tar.gz"))
2112 (sha256
2113 (base32
2114 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2115 (build-system python-build-system)
dac79ecc
DT
2116 (home-page "https://launchpad.net/testresources")
2117 (synopsis
2118 "Pyunit extension for managing test resources")
2119 (description
2120 "Testresources is an extension to Python's unittest to allow declarative
2121use of resources by test cases.")
3f641af0 2122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2123
2124(define-public python2-testresources
2125 (package-with-python2 python-testresources))
2126
070ab058
DT
2127(define-public python-subunit
2128 (package
2129 (name "python-subunit")
2130 (version "0.0.21")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (string-append
2135 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2136 version ".tar.gz"))
2137 (sha256
2138 (base32
2139 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2140 (build-system python-build-system)
f22efa01 2141 (propagated-inputs
b52ad371
HG
2142 `(("python-extras" ,python-extras)
2143 ("python-mimeparse" ,python-mimeparse)))
2144 (native-inputs
2145 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2146 (home-page "http://launchpad.net/subunit")
2147 (synopsis "Python implementation of the subunit protocol")
2148 (description
2149 "Python-subunit is a Python implementation of the subunit test streaming
2150protocol.")
3f641af0 2151 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2152
2153(define-public python2-subunit
2154 (package-with-python2 python-subunit))
2155
d2a8db92
HG
2156;; Recent versions of python-fixtures and python-testrepository need
2157;; python-pbr for packaging, which itself needs these two packages for
2158;; testing.
2159;; To fix this circular dependency, we use a build of python-pbr, based on the
2160;; same source, just without any test dependencies and with tests disabled.
2161;; python-pbr-minmal is then used to package python-fixtures and
2162;; python-testrepository.
2163;; Strictly speaking we currently could remove the test-requirements from the
2164;; normal python-pbr package (and save this package) since test are disabled
2165;; there anyway. But this may change in future.
2166(define python-pbr-minimal
cd49454b 2167 (package
d2a8db92 2168 (name "python-pbr-minimal")
5bbb2249 2169 (version "1.10.0")
7787ef76
CR
2170 (source
2171 (origin
2172 (method url-fetch)
d2a8db92 2173 (uri (pypi-uri "pbr" version))
7787ef76
CR
2174 (sha256
2175 (base32
a1e3ed6e
DM
2176 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2177 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2178 (build-system python-build-system)
2179 (arguments
d2a8db92
HG
2180 `(#:tests? #f))
2181 (home-page "http://docs.openstack.org/developer/pbr/")
2182 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2183 (description
d2a8db92 2184 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2185 (license license:asl2.0)))
7787ef76 2186
d2a8db92
HG
2187(define python2-pbr-minimal
2188 (package-with-python2 python-pbr-minimal))
7787ef76 2189
1ef09c0c 2190(define-public python-pbr
e25f0174 2191 (package
d2a8db92 2192 (inherit python-pbr-minimal)
e25f0174 2193 (name "python-pbr")
e25f0174
BW
2194 (arguments
2195 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2196 (propagated-inputs
d2a8db92
HG
2197 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2198 (native-inputs
e25f0174 2199 `(("python-fixtures" ,python-fixtures)
d2a8db92 2200 ;; discover, coverage, hacking, subunit
e25f0174 2201 ("python-mock" ,python-mock)
d2a8db92 2202 ("python-six" ,python-six)
e25f0174
BW
2203 ("python-sphinx" ,python-sphinx)
2204 ("python-testrepository" ,python-testrepository)
2205 ("python-testresources" ,python-testresources)
2206 ("python-testscenarios" ,python-testscenarios)
2207 ("python-testtools" ,python-testtools)
2208 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2209 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2210 (description
2211 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2212and sensible default behaviors into your setuptools run. It will set
2213versions, process requirements files and generate AUTHORS and ChangeLog file
2214from git information.
2215")))
1ef09c0c
BW
2216
2217(define-public python2-pbr
e25f0174 2218 (package-with-python2 python-pbr))
1ef09c0c 2219
7787ef76
CR
2220(define-public python-fixtures
2221 (package
2222 (name "python-fixtures")
13fcc6df 2223 (version "1.4.0")
7787ef76
CR
2224 (source
2225 (origin
2226 (method url-fetch)
13fcc6df 2227 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2228 (sha256
2229 (base32
13fcc6df 2230 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2231 (build-system python-build-system)
f6c1ef18
MB
2232 (arguments
2233 '(#:phases
2234 (modify-phases %standard-phases
2235 (replace 'check
2236 (lambda _
2237 (zero? (system* "python" "-m" "testtools.run"
2238 "fixtures.test_suite")))))))
7787ef76 2239 (propagated-inputs
ae92cadd 2240 `(("python-six" ,python-six)))
e7881f3d 2241 (native-inputs
f6c1ef18
MB
2242 `(("python-mock" ,python-mock)
2243 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2244 ("python-testtools" ,python-testtools)))
7787ef76
CR
2245 (home-page "https://launchpad.net/python-fixtures")
2246 (synopsis "Python test fixture library")
2247 (description
2248 "Fixtures provides a way to create reusable state, useful when writing
2249Python tests.")
3f641af0 2250 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2251
cd49454b
DT
2252(define-public python2-fixtures
2253 (package-with-python2 python-fixtures))
2254
b24a0c00
DT
2255(define-public python-testrepository
2256 (package
2257 (name "python-testrepository")
2258 (version "0.0.20")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (string-append
2263 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2264 version ".tar.gz"))
2265 (sha256
2266 (base32
2267 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2268 (build-system python-build-system)
90110ef9
MB
2269 (arguments
2270 ;; FIXME: Many tests are failing.
2271 '(#:tests? #f))
05de40c5 2272 (propagated-inputs
b2e66edf
HG
2273 `(("python-fixtures" ,python-fixtures)
2274 ("python-subunit" ,python-subunit)
b52ad371
HG
2275 ("python-testtools" ,python-testtools)))
2276 (native-inputs
2277 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2278 ("python-mimeparse" ,python-mimeparse)))
2279 (home-page "https://launchpad.net/testrepository")
2280 (synopsis "Database for Python test results")
2281 (description "Testrepository provides a database of test results which can
2282be used as part of a developer's workflow to check things such as what tests
2283have failed since the last commit or what tests are currently failing.")
3f641af0 2284 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2285
2286(define-public python2-testrepository
2287 (package-with-python2 python-testrepository))
2288
243a009a
DT
2289(define-public python-coverage
2290 (package
2291 (name "python-coverage")
4d4cf3dd 2292 (version "4.1")
243a009a
DT
2293 (source
2294 (origin
2295 (method url-fetch)
82a3c582 2296 (uri (pypi-uri "coverage" version))
243a009a
DT
2297 (sha256
2298 (base32
4d4cf3dd 2299 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2300 (build-system python-build-system)
bd10e677
MB
2301 (arguments
2302 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2303 '(#:tests? #f))
243a009a
DT
2304 (home-page "http://nedbatchelder.com/code/coverage")
2305 (synopsis "Code coverage measurement for Python")
2306 (description
2307 "Coverage measures code coverage, typically during test execution. It
2308uses the code analysis tools and tracing hooks provided in the Python standard
2309library to determine which lines are executable, and which have been
2310executed.")
3f641af0 2311 (license license:bsd-3)))
243a009a
DT
2312
2313(define-public python2-coverage
2314 (package-with-python2 python-coverage))
2315
12f839fd
EF
2316(define-public python-cov-core
2317 (package
2318 (name "python-cov-core")
2319 (version "1.15.0")
2320 (source
2321 (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "cov-core" version))
2324 (sha256
2325 (base32
2326 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2327 (build-system python-build-system)
f78e1c27 2328 (propagated-inputs
12f839fd
EF
2329 `(("python-coverage" ,python-coverage)))
2330 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2331 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2332 (description
49d5e338
TGR
2333 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2334and @code{nose2-cov}. It is useful for developing coverage plugins for these
2335testing frameworks.")
f210e944 2336 (license license:expat)))
12f839fd
EF
2337
2338(define-public python2-cov-core
f210e944 2339 (package-with-python2 python-cov-core))
12f839fd 2340
041358fb
DT
2341(define-public python-discover
2342 (package
2343 (name "python-discover")
2344 (version "0.4.0")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (string-append
2349 "https://pypi.python.org/packages/source/d/discover/discover-"
2350 version ".tar.gz"))
2351 (sha256
2352 (base32
2353 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2354 (build-system python-build-system)
041358fb
DT
2355 (home-page "http://pypi.python.org/pypi/discover/")
2356 (synopsis
2357 "Python test discovery for unittest")
2358 (description
2359 "Discover provides test discovery for unittest, a feature that has been
e881752c 2360backported from Python 2.7 for Python 2.4+.")
3f641af0 2361 (license license:bsd-3)))
041358fb
DT
2362
2363(define-public python2-discover
2364 (package-with-python2 python-discover))
2365
a480bc41
EB
2366(define-public behave
2367 (package
2368 (name "behave")
287cfd1a 2369 (version "1.2.5")
a480bc41
EB
2370 (source (origin
2371 (method url-fetch)
287cfd1a 2372 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2373 (sha256
2374 (base32
287cfd1a 2375 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2376 (build-system python-build-system)
f22efa01 2377 (propagated-inputs
f3b98f4f 2378 `(("python-six" ,python-six)
a480bc41
EB
2379 ("python-parse" ,python-parse)
2380 ("python-parse-type" ,python-parse-type)))
2381 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2382 ;PyHamcrest>=1.8
2383 (home-page "http://github.com/behave/behave")
2384 (synopsis "Python behavior-driven development")
2385 (description
2386 "Behave is a tool for behavior-driven development in python.
2387Behavior-driven development (or BDD) is an agile software development
2388technique that encourages collaboration between developers, QA and
2389non-technical or business participants in a software project. Behave uses
2390tests written in a natural language style, backed up by Python code.")
3f641af0 2391 (license license:x11)))
c7303d3c
DT
2392
2393(define-public python-exif-read
2394 (package
2395 (name "python-exif-read")
2a2d0981 2396 (version "2.1.2")
c7303d3c
DT
2397 (source (origin
2398 (method url-fetch)
2a2d0981 2399 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2400 (sha256
2401 (base32
2a2d0981 2402 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2403 (build-system python-build-system)
c7303d3c
DT
2404 (arguments `(#:tests? #f)) ; no tests
2405 (home-page "https://github.com/ianare/exif-py")
2406 (synopsis "Python library to extract EXIF data from image files")
2407 (description
2408 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2409files.")
3f641af0 2410 (license license:bsd-3)))
c7303d3c
DT
2411
2412(define-public python2-exif-read
2413 (package-with-python2 python-exif-read))
d5f89b22
DT
2414
2415(define-public python-pyld
2416 (package
2417 (name "python-pyld")
8957af32 2418 (version "0.7.1")
d5f89b22
DT
2419 (source (origin
2420 (method url-fetch)
af1ab773 2421 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2422 (sha256
2423 (base32
8957af32 2424 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2425 (build-system python-build-system)
d5f89b22
DT
2426 (arguments `(#:tests? #f)) ; no tests
2427 (home-page "http://github.com/digitalbazaar/pyld")
2428 (synopsis "Python implementation of the JSON-LD specification")
2429 (description
2430 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2431 (license license:bsd-3)))
d5f89b22
DT
2432
2433(define-public python2-pyld
2434 (package-with-python2 python-pyld))
3a1f9a68
DT
2435
2436(define-public python-certifi
2437 (package
2438 (name "python-certifi")
28576403 2439 (version "2017.1.23")
3a1f9a68
DT
2440 (source (origin
2441 (method url-fetch)
9a41f443 2442 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2443 (sha256
2444 (base32
28576403 2445 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2446 (build-system python-build-system)
28576403 2447 (home-page "https://certifi.io/")
3a1f9a68
DT
2448 (synopsis "Python CA certificate bundle")
2449 (description
2450 "Certifi is a Python library that contains a CA certificate bundle, which
2451is used by the Requests library to verify HTTPS requests.")
3f641af0 2452 (license license:asl2.0)))
3a1f9a68
DT
2453
2454(define-public python2-certifi
2455 (package-with-python2 python-certifi))
e6cfbd36 2456
12c270dd
RW
2457(define-public python-click
2458 (package
2459 (name "python-click")
d4acb6db 2460 (version "6.7")
12c270dd
RW
2461 (source
2462 (origin
2463 (method url-fetch)
375f224b 2464 (uri (pypi-uri "click" version))
12c270dd 2465 (sha256
43accb58 2466 (base32
d4acb6db 2467 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2468 (build-system python-build-system)
e2ab5a09
BW
2469 (arguments
2470 `(#:phases
2471 (modify-phases %standard-phases
2472 (add-after 'unpack 'fix-paths
2473 (lambda* (#:key inputs #:allow-other-keys)
2474 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2475 "cross-libc" "libc"))))
2476 (substitute* "click/_unicodefun.py"
2477 (("'locale'")
2478 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2479 #t))
2480 (replace 'check
2481 (lambda _
2482 (zero? (system* "make" "test")))))))
2483 (native-inputs
2484 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2485 (home-page "http://click.pocoo.org")
2486 (synopsis "Command line library for Python")
2487 (description
2488 "Click is a Python package for creating command line interfaces in a
2489composable way with as little code as necessary. Its name stands for
2490\"Command Line Interface Creation Kit\". It's highly configurable but comes
2491with sensible defaults out of the box.")
3f641af0 2492 (license license:bsd-3)))
12c270dd
RW
2493
2494(define-public python2-click
2495 (package-with-python2 python-click))
2496
addc808d
EF
2497(define-public python-wheel
2498 (package
2499 (name "python-wheel")
0e6df70b 2500 (version "0.30.0a0")
e1ba0749
EF
2501 (source
2502 (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "wheel" version))
2505 (sha256
2506 (base32
0e6df70b 2507 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2508 (build-system python-build-system)
2509 (native-inputs
f3b98f4f 2510 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2511 ("python-pytest-cov" ,python-pytest-cov)))
2512 (home-page "https://bitbucket.org/pypa/wheel/")
2513 (synopsis "Format for built Python packages")
2514 (description
2515 "A wheel is a ZIP-format archive with a specially formatted filename and
2516the @code{.whl} extension. It is designed to contain all the files for a PEP
2517376 compatible install in a way that is very close to the on-disk format. Many
2518packages will be properly installed with only the @code{Unpack} step and the
2519unpacked archive preserves enough information to @code{Spread} (copy data and
2520scripts to their final locations) at any later time. Wheel files can be
2521installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2522 (license license:expat)
2523 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2524
2525(define-public python2-wheel
8ad4ae20
LF
2526 (let ((wheel (package-with-python2
2527 (strip-python2-variant python-wheel))))
264ae686 2528 (package (inherit wheel)
8ad4ae20
LF
2529 (native-inputs `(("python2-functools32" ,python2-functools32)
2530 ,@(package-native-inputs wheel))))))
2531
addc808d 2532
ae641128 2533(define-public python-requests
e6cfbd36 2534 (package
ae641128 2535 (name "python-requests")
da5db988 2536 (version "2.13.0")
e6cfbd36
DT
2537 (source (origin
2538 (method url-fetch)
5d691657 2539 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2540 (sha256
2541 (base32
da5db988 2542 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2543 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2544 (build-system python-build-system)
cff0ccf9
MB
2545 (arguments
2546 ;; FIXME: Some tests require network access.
2547 '(#:tests? #f))
e6cfbd36
DT
2548 (home-page "http://python-requests.org/")
2549 (synopsis "Python HTTP library")
2550 (description
2551 "Requests is a Python HTTP client library. It aims to be easier to use
2552than Python’s urllib2 library.")
3f641af0 2553 (license license:asl2.0)))
864b5211 2554
e9005180
DT
2555;; Some software requires an older version of Requests, notably Docker
2556;; Compose.
2557(define-public python-requests-2.7
2558 (package (inherit python-requests)
2559 (version "2.7.0")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (pypi-uri "requests" version))
2563 (sha256
2564 (base32
2565 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2566
ae641128 2567(define-public python2-requests
8ad4ae20 2568 (package-with-python2 python-requests))
ae641128 2569
ea521b42
DT
2570(define-public python-vcversioner
2571 (package
2572 (name "python-vcversioner")
538fe019 2573 (version "2.16.0.0")
ea521b42
DT
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "vcversioner" version))
2578 (sha256
2579 (base32
538fe019 2580 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2581 (build-system python-build-system)
ea521b42
DT
2582 (synopsis "Python library for version number discovery")
2583 (description "Vcversioner is a Python library that inspects tagging
2584information in a variety of version control systems in order to discover
2585version numbers.")
2586 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2587 (license license:isc)))
ea521b42
DT
2588
2589(define-public python2-vcversioner
f210e944 2590 (package-with-python2 python-vcversioner))
ae641128 2591
864b5211
DT
2592(define-public python-jsonschema
2593 (package
2594 (name "python-jsonschema")
b3667afb 2595 (version "2.5.1")
864b5211
DT
2596 (source (origin
2597 (method url-fetch)
2598 (uri
2599 (string-append
2600 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2601 version ".tar.gz"))
2602 (sha256
2603 (base32
b3667afb 2604 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2605 (build-system python-build-system)
8bcd6b91
EF
2606 (arguments
2607 '(#:phases
2608 (modify-phases %standard-phases
2609 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2610 (native-inputs
8bcd6b91
EF
2611 `(("python-nose" ,python-nose)
2612 ("python-vcversioner" ,python-vcversioner)))
2613 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2614 (synopsis "Implementation of JSON Schema for Python")
2615 (description
2616 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2617 (license license:expat)
2618 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2619
2620(define-public python2-jsonschema
a14600ec
LF
2621 (let ((jsonschema (package-with-python2
2622 (strip-python2-variant python-jsonschema))))
264ae686 2623 (package (inherit jsonschema)
eaba9d66 2624 (native-inputs
8bcd6b91 2625 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2626 ,@(package-native-inputs jsonschema)))
2627 (propagated-inputs
2628 `(("python2-functools32" ,python2-functools32))))))
850189b8 2629
9f21414d 2630(define-public python-kitchen
2631 (package
2632 (name "python-kitchen")
2633 (version "1.2.4")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "kitchen" version))
2638 (sha256
2639 (base32
2640 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2641 (build-system python-build-system)
2642 (propagated-inputs
2643 `(("python-chardet" ,python-chardet)))
2644 (home-page "https://fedorahosted.org/kitchen")
2645 (synopsis "Python API for snippets")
2646 (description "@code{kitchen} module provides a python API for all sorts of
2647little useful snippets of code that everybody ends up writing for their projects
2648but never seem big enough to build an independent release. Use kitchen and stop
2649cutting and pasting that code over and over.")
2650 (license (list license:lgpl2.1+
2651 ;; subprocess.py, test_subprocess.py,
2652 ;; kitchen/pycompat25/defaultdict.py:
2653 license:psfl))))
2654
2655(define-public python2-kitchen
2656 (package-with-python2 python-kitchen))
2657
850189b8
DT
2658(define-public python-unidecode
2659 (package
2660 (name "python-unidecode")
5754fe95 2661 (version "0.04.20")
850189b8
DT
2662 (source (origin
2663 (method url-fetch)
8925d4f3 2664 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2665 (sha256
2666 (base32
5754fe95 2667 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2668 (build-system python-build-system)
850189b8
DT
2669 (home-page "https://pypi.python.org/pypi/Unidecode")
2670 (synopsis "ASCII transliterations of Unicode text")
2671 (description
2672 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2673useful when integrating with legacy code that doesn't support Unicode, or for
2674ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2675machine identifiers from human-readable Unicode strings that should still be
2676somewhat intelligeble.")
3f641af0 2677 (license license:gpl2+)))
850189b8
DT
2678
2679(define-public python2-unidecode
2680 (package-with-python2 python-unidecode))
6d45fef4
DT
2681
2682(define-public python-pyjwt
2683 (package
2684 (name "python-pyjwt")
eb31d4b4 2685 (version "1.4.0")
6d45fef4
DT
2686 (source
2687 (origin
2688 (method url-fetch)
eb31d4b4 2689 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2690 (sha256
2691 (base32
eb31d4b4 2692 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2693 (build-system python-build-system)
eb31d4b4 2694 (native-inputs
130fe994
HG
2695 `(("python-pytest" ,python-pytest)
2696 ("python-pytest-cov" ,python-pytest-cov)
2697 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2698 (home-page "http://github.com/progrium/pyjwt")
2699 (synopsis "JSON Web Token implementation in Python")
2700 (description
2701 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2702 (license license:expat)))
6d45fef4
DT
2703
2704(define-public python2-pyjwt
2705 (package-with-python2 python-pyjwt))
2706
a80488c2 2707(define-public python-pykka
2708 (package
2709 (name "python-pykka")
2710 (version "1.2.1")
2711 (source
2712 (origin
2713 (method url-fetch)
2714 (uri (pypi-uri "Pykka" version))
2715 (sha256
2716 (base32
2717 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2718 (build-system python-build-system)
2719 (native-inputs
2720 `(("python-mock" ,python-mock)
2721 ("python-nose" ,python-nose)
2722 ("python-gevent" ,python-gevent)
2723 ("python-eventlet" ,python-eventlet)))
2724 (home-page "https://www.pykka.org/")
2725 (synopsis "Pykka is a Python implementation of the actor model")
2726 (description
2727 "Pykka is a Python implementation of the actor model.
2728The actor model introduces some simple rules to control the sharing
2729of state and cooperation between execution units, which makes it
2730easier to build concurrent applications.")
2731 (license license:asl2.0)))
2732
2733(define-public python2-pykka
2734 (package-with-python2 python-pykka))
2735
2cec1f6f
DT
2736(define-public python-oauthlib
2737 (package
2738 (name "python-oauthlib")
bde2171d 2739 (version "1.0.3")
2cec1f6f
DT
2740 (source (origin
2741 (method url-fetch)
bde2171d 2742 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2743 (sha256
2744 (base32
bde2171d 2745 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2746 (build-system python-build-system)
bde2171d 2747 (native-inputs
bb06aa34 2748 `(("python-nose" ,python-nose)
c616b5d3 2749 ("python-mock" ,python-mock)
bde2171d 2750 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2751 ("python-pyjwt" ,python-pyjwt)
2752 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2753 (home-page "https://github.com/idan/oauthlib")
2754 (synopsis "OAuth implementation for Python")
2755 (description
2756 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2757OAuth request-signing logic.")
3f641af0 2758 (license license:bsd-3)
59f151ec 2759 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2760
2761(define-public python2-oauthlib
59f151ec 2762 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2763 (package
2764 (inherit base)
00e10c6e 2765 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2766 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2767
2768(define-public python-itsdangerous
2769 (package
2770 (name "python-itsdangerous")
2771 (version "0.24")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (string-append
2776 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2777 version ".tar.gz"))
2778 (sha256
2779 (base32
2780 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2781 (build-system python-build-system)
ec5dbb5c
DT
2782 (home-page "http://github.com/mitsuhiko/itsdangerous")
2783 (synopsis "Python library for passing data to/from untrusted environments")
2784 (description
2785 "Itsdangerous provides various helpers to pass trusted data to untrusted
2786environments and back.")
f210e944 2787 (license license:bsd-3)))
ec5dbb5c
DT
2788
2789(define-public python2-itsdangerous
f210e944 2790 (package-with-python2 python-itsdangerous))
5731cae3 2791
8d12be1e
RW
2792(define-public python-pyyaml
2793 (package
2794 (name "python-pyyaml")
bf5e4bc4 2795 (version "3.12")
8d12be1e
RW
2796 (source
2797 (origin
2798 (method url-fetch)
bf5e4bc4 2799 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2800 (sha256
2801 (base32
bf5e4bc4 2802 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2803 (build-system python-build-system)
2804 (inputs
2805 `(("libyaml" ,libyaml)))
8d12be1e
RW
2806 (home-page "http://pyyaml.org/wiki/PyYAML")
2807 (synopsis "YAML parser and emitter for Python")
2808 (description
2809 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2810complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2811API, and sensible error messages. PyYAML supports standard YAML tags and
2812provides Python-specific tags that allow to represent an arbitrary Python
2813object.")
2814 (license license:expat)))
2815
2816(define-public python2-pyyaml
2817 (package-with-python2 python-pyyaml))
2818
5731cae3
DT
2819(define-public python-virtualenv
2820 (package
2821 (name "python-virtualenv")
58d04dba 2822 (version "15.0.3")
5731cae3
DT
2823 (source
2824 (origin
2825 (method url-fetch)
17804240 2826 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2827 (sha256
2828 (base32
58d04dba 2829 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2830 (build-system python-build-system)
17804240
EF
2831 (arguments
2832 `(#:phases
2833 (modify-phases %standard-phases
58d04dba
RW
2834 (replace 'check
2835 (lambda _
2836 ;; Disable failing test. See upstream bug report
2837 ;; https://github.com/pypa/virtualenv/issues/957
2838 (substitute* "tests/test_virtualenv.py"
2839 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2840 (zero? (system* "py.test")))))))
e7881f3d 2841 (native-inputs
f3b98f4f 2842 `(("python-mock" ,python-mock)
17804240 2843 ("python-pytest" ,python-pytest)))
5731cae3
DT
2844 (home-page "https://virtualenv.pypa.io/")
2845 (synopsis "Virtual Python environment builder")
2846 (description
2847 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2848 (license license:expat)))
5731cae3
DT
2849
2850(define-public python2-virtualenv
2851 (package-with-python2 python-virtualenv))
8176d4d5
DT
2852
2853(define-public python-markupsafe
2854 (package
2855 (name "python-markupsafe")
2856 (version "0.23")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (string-append
2861 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2862 version ".tar.gz"))
2863 (sha256
2864 (base32
2865 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2866 (build-system python-build-system)
8176d4d5
DT
2867 (home-page "http://github.com/mitsuhiko/markupsafe")
2868 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2869 (description
2870 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2871for Python.")
3f641af0 2872 (license license:bsd-3)))
8176d4d5
DT
2873
2874(define-public python2-markupsafe
2875 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2876
2877(define-public python-jinja2
2878 (package
2879 (name "python-jinja2")
e98149b3 2880 (version "2.8")
fe34f0d1
DT
2881 (source
2882 (origin
2883 (method url-fetch)
e98149b3 2884 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2885 (sha256
2886 (base32
e98149b3 2887 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2888 (build-system python-build-system)
f22efa01 2889 (propagated-inputs
f3b98f4f 2890 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2891 (home-page "http://jinja.pocoo.org/")
2892 (synopsis "Python template engine")
2893 (description
2894 "Jinja2 is a small but fast and easy to use stand-alone template engine
2895written in pure Python.")
3f641af0 2896 (license license:bsd-3)))
fe34f0d1
DT
2897
2898(define-public python2-jinja2
2899 (package-with-python2 python-jinja2))
3580ab8b 2900
f7d17ac7
EE
2901(define-public python-pystache
2902 (package
2903 (name "python-pystache")
2904 (version "0.5.4")
2905 (source (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "pystache" version))
2908 (sha256
2909 (base32
2910 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2911 (build-system python-build-system)
8bd5164b
MB
2912 (arguments
2913 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2914 (home-page "http://defunkt.io/pystache/")
2915 (synopsis "Python logic-less template engine")
2916 (description
2917 "Pystache is a Python implementation of the framework agnostic,
2918logic-free templating system Mustache.")
8bd5164b
MB
2919 (license license:expat)
2920 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2921
2922(define-public python2-pystache
8bd5164b
MB
2923 (package (inherit (package-with-python2
2924 (strip-python2-variant python-pystache)))
2925 (arguments
2926 `(#:python ,python-2
2927 #:phases
2928 (modify-phases %standard-phases
2929 (replace 'check
2930 (lambda _
2931 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2932
1285119b
RW
2933(define-public python-joblib
2934 (package
2935 (name "python-joblib")
f34ef331 2936 (version "0.10.3")
1285119b
RW
2937 (source (origin
2938 (method url-fetch)
f34ef331 2939 (uri (pypi-uri "joblib" version))
1285119b
RW
2940 (sha256
2941 (base32
6aa5f1ca
HG
2942 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Remove pre-compiled .pyc files from source.
2947 (for-each delete-file-recursively
2948 (find-files "." "__pycache__" #:directories? #t))
2949 (for-each delete-file (find-files "." "\\.pyc$"))
2950 #t))))
1285119b 2951 (build-system python-build-system)
a8dd960a
RW
2952 (arguments
2953 `(#:phases
2954 (modify-phases %standard-phases
2955 (add-before 'check 'disable-failing-tests
2956 (lambda _
2957 ;; This numpydoc tests fails for unknown reasons
2958 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2959 ;; This numpydoc test depends on matplotlib, which is not a
2960 ;; required input.
2961 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2962 ;; These tests fail to execute sys.executable
2963 (substitute* "joblib/test/test_parallel.py"
2964 (("import nose" line)
2965 (string-append "from nose.plugins.skip import SkipTest\n" line))
2966 (("def test_nested_parallel_warnings" line)
2967 (string-append "@SkipTest\n" line))
2968 (("def test_parallel_with_interactively_defined_functions" line)
2969 (string-append "@SkipTest\n" line)))
2970 #t)))))
f052ec9a 2971 ;; Provide nose to enable tests command
1285119b 2972 (native-inputs
f3b98f4f 2973 `(("python-nose" ,python-nose)
f34ef331
RW
2974 ("python-sphinx" ,python-sphinx)
2975 ("python-docutils" ,python-docutils)
2976 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2977 (home-page "http://pythonhosted.org/joblib/")
2978 (synopsis "Using Python functions as pipeline jobs")
2979 (description
2980 "Joblib is a set of tools to provide lightweight pipelining in Python.
2981In particular, joblib offers: transparent disk-caching of the output values
2982and lazy re-evaluation (memoize pattern), easy simple parallel computing
2983logging and tracing of the execution.")
3f641af0 2984 (license license:bsd-3)))
1285119b
RW
2985
2986(define-public python2-joblib
2987 (package-with-python2 python-joblib))
2988
3580ab8b
DT
2989(define-public python-docutils
2990 (package
2991 (name "python-docutils")
00e0ca7c 2992 (version "0.13.1")
3580ab8b
DT
2993 (source
2994 (origin
2995 (method url-fetch)
00e0ca7c 2996 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2997 (sha256
2998 (base32
00e0ca7c 2999 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3000 (build-system python-build-system)
3580ab8b
DT
3001 (arguments
3002 '(#:tests? #f)) ; no setup.py test command
3003 (home-page "http://docutils.sourceforge.net/")
3004 (synopsis "Python Documentation Utilities")
3005 (description
3006 "Docutils is a modular system for processing documentation into useful
3007formats, such as HTML, XML, and LaTeX. For input Docutils supports
3008reStructuredText.")
3009 ;; Most of the source code is public domain, but some source files are
3010 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3011 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3012
3013(define-public python2-docutils
3014 (package-with-python2 python-docutils))
fb35b7c0
DT
3015
3016(define-public python-pygments
3017 (package
3018 (name "python-pygments")
7d2e758d 3019 (version "2.1.3")
fb35b7c0
DT
3020 (source
3021 (origin
3022 (method url-fetch)
9f442285 3023 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3024 (sha256
3025 (base32
7d2e758d 3026 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3027 (build-system python-build-system)
995cb99e
MB
3028 (arguments
3029 ;; FIXME: Tests require sphinx, which depends on this.
3030 '(#:tests? #f))
fb35b7c0
DT
3031 (home-page "http://pygments.org/")
3032 (synopsis "Syntax highlighting")
3033 (description
3034 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3035 (license license:bsd-2)))
fb35b7c0
DT
3036
3037(define-public python2-pygments
3038 (package-with-python2 python-pygments))
9dd6078d
DT
3039
3040(define-public python-sphinx
3041 (package
3042 (name "python-sphinx")
c227458a 3043 (version "1.5.1")
9dd6078d
DT
3044 (source
3045 (origin
3046 (method url-fetch)
9a8acd00 3047 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3048 (sha256
3049 (base32
c227458a 3050 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3051 (build-system python-build-system)
03cb5f9e 3052 (arguments
c227458a
DM
3053 `(#:phases
3054 (modify-phases %standard-phases
3055 (replace 'check
3056 (lambda _
3057 ;; Requires Internet access.
3058 (delete-file "tests/test_build_linkcheck.py")
3059 (zero? (system* "make" "test")))))))
f22efa01 3060 (propagated-inputs
9a8acd00
DM
3061 `(("python-imagesize" ,python-imagesize)
3062 ("python-sphinx-alabaster-theme"
3063 ,python-sphinx-alabaster-theme)
3064 ("python-babel" ,python-babel)
3065 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3066 ("python-docutils" ,python-docutils)
9a8acd00
DM
3067 ("python-jinja2" ,python-jinja2)
3068 ("python-pygments" ,python-pygments)
a10b9810 3069 ("python-requests" ,python-requests)
9a8acd00 3070 ("python-six" ,python-six)))
c227458a
DM
3071 (native-inputs
3072 `(("graphviz" ,graphviz)
3073 ("python-html5lib" ,python-html5lib)
3074 ("python-mock" ,python-mock)
a10b9810 3075 ("python-nose" ,python-nose)))
9dd6078d
DT
3076 (home-page "http://sphinx-doc.org/")
3077 (synopsis "Python documentation generator")
3078 (description "Sphinx is a tool that makes it easy to create documentation
3079for Python projects or other documents consisting of multiple reStructuredText
3080sources.")
9a8acd00
DM
3081 (license license:bsd-3)
3082 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d
DT
3083
3084(define-public python2-sphinx
9a8acd00
DM
3085 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3086 (package
3087 (inherit base)
3088 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3089 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3090 ,@(package-native-inputs base)))
3091 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3092 ,@(package-propagated-inputs base))))))
6888830b 3093
a50e0301
MB
3094;; This is needed for python-matplotlib@1.4 and python-scipy@0.16, at least.
3095;; Try removing this when they are updated.
3096(define-public python-sphinx-1.2.3
3097 (package (inherit python-sphinx)
3098 (version "1.2.3")
3099 (source (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "Sphinx" version))
3102 (sha256
3103 (base32
3104 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
3105 ;; XXX: "'NoneType' object has no attribute 'split'".
3106 (arguments '(#:tests? #f))))
3107
3108(define-public python2-sphinx-1.2.3
3109 (package (inherit (package-with-python2
3110 (strip-python2-variant python-sphinx-1.2.3)))))
6888830b 3111
ad320b20
RW
3112(define-public python-sphinx-rtd-theme
3113 (package
3114 (name "python-sphinx-rtd-theme")
3115 (version "0.1.6")
3116 (source
3117 (origin
3118 (method url-fetch)
3119 (uri (string-append "https://pypi.python.org/packages/source/s/"
3120 "sphinx_rtd_theme/sphinx_rtd_theme-"
3121 version ".tar.gz"))
3122 (sha256
3123 (base32
3124 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3125 (build-system python-build-system)
9893cff3 3126 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3127 (propagated-inputs
3128 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3129 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3130 (synopsis "ReadTheDocs.org theme for Sphinx")
3131 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3132 (license license:expat)))
ad320b20
RW
3133
3134(define-public python2-sphinx-rtd-theme
3135 (package-with-python2 python-sphinx-rtd-theme))
3136
fe94cf0c
HG
3137(define-public python-rst.linker
3138 (package
3139 (name "python-rst.linker")
3140 (version "1.7")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (pypi-uri "rst.linker" version))
3145 (sha256
3146 (base32
3147 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3148 (build-system python-build-system)
3149 (propagated-inputs
22d7360b 3150 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3151 ("python-six" ,python-six)))
3152 (native-inputs
3153 `(("python-setuptools-scm" ,python-setuptools-scm)))
3154 ;; Test would require path.py, which would introduce a cyclic dependence.
3155 (arguments `(#:tests? #f))
3156 ;; Note: As of version 1.7 the documentation is not worth building.
3157 (home-page "https://github.com/jaraco/rst.linker")
3158 (synopsis "Sphinx plugin to add links and timestamps")
3159 (description "rst.linker allows to automatically replace text by a
3160reStructuredText external reference or timestamps. It's primary purpose is to
3161augment the changelog, but it can be used for other documents, too.")
3162 (license license:expat)))
3163
3164(define-public python2-rst.linker
3165 (package-with-python2 python-rst.linker))
3166
f4de5b3b
CAW
3167(define-public python-feedgenerator
3168 (package
3169 (name "python-feedgenerator")
f0412aa2 3170 (version "1.8")
f4de5b3b 3171 (source
f4de5b3b 3172 (origin
f0412aa2
EF
3173 (method url-fetch)
3174 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3175 (sha256
3176 (base32
7c88bcf4
HG
3177 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3178 (modules '((guix build utils)))
3179 (snippet
3180 '(begin
3181 ;; Remove pre-compiled .pyc files from source.
3182 (for-each delete-file-recursively
3183 (find-files "." "__pycache__" #:directories? #t))
3184 (for-each delete-file (find-files "." "\\.pyc$"))
3185 #t))))
f4de5b3b 3186 (build-system python-build-system)
dae73d9b 3187 (propagated-inputs
f3b98f4f 3188 `(("python-pytz" ,python-pytz)
f4de5b3b 3189 ("python-six" ,python-six)))
f0412aa2 3190 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3191 (synopsis
3192 "Standalone version of Django's Atom/RSS feed generator")
3193 (description
3194 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3195which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3196 (license license:bsd-3)))
f4de5b3b
CAW
3197
3198(define-public python2-feedgenerator
3199 (package-with-python2 python-feedgenerator))
3200
59ad30e3
CAW
3201(define-public python-blinker
3202 (package
3203 (name "python-blinker")
7fb9ff4d 3204 (version "1.4")
59ad30e3
CAW
3205 (source
3206 (origin
3207 (method url-fetch)
7fb9ff4d 3208 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3209 (sha256
3210 (base32
7fb9ff4d 3211 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3212 (build-system python-build-system)
59ad30e3
CAW
3213 (home-page "http://pythonhosted.org/blinker/")
3214 (synopsis "Fast, simple object-to-object and broadcast signaling")
3215 (description
3216 "Blinker provides a fast dispatching system that allows any number of
3217interested parties to subscribe to events, or \"signals\".")
3218 (license license:expat)))
3219
3220(define-public python2-blinker
3221 (package-with-python2 python-blinker))
3222
b8050e71
CAW
3223(define-public pelican
3224 (package
3225 (name "pelican")
11f97c27 3226 (version "3.6.3")
b8050e71
CAW
3227 (source
3228 (origin
3229 (method url-fetch)
11f97c27 3230 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3231 (sha256
3232 (base32
11f97c27 3233 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3234 (build-system python-build-system)
f22efa01 3235 (propagated-inputs
b8050e71
CAW
3236 `(("python-feedgenerator" ,python-feedgenerator)
3237 ("python-jinja2" ,python-jinja2)
3238 ("python-pygments" ,python-pygments)
3239 ("python-docutils" ,python-docutils)
3240 ("python-pytz" ,python-pytz)
3241 ("python-blinker" ,python-blinker)
3242 ("python-unidecode" ,python-unidecode)
3243 ("python-six" ,python-six)
22d7360b 3244 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3245 (home-page "http://getpelican.com/")
3246 (arguments
3247 `(;; XXX Requires a lot more packages to do unit tests :P
3248 #:tests? #f
3249 #:phases (modify-phases %standard-phases
3250 (add-before
3251 'install 'adjust-requires
3252 ;; Since feedgenerator is installed from git, it doesn't
3253 ;; conform to the version requirements.
3254 ;;
3255 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3256 ;; version requirement so setuptools doesn't get confused.
3257 (lambda _
3258 (substitute* "setup.py"
3259 (("['\"]feedgenerator.*?['\"]")
3260 "'feedgenerator'")))))))
3261 (synopsis "Python-based static site publishing system")
3262 (description
3263 "Pelican is a tool to generate a static blog from reStructuredText,
3264Markdown input files, and more. Pelican uses Jinja2 for templating
3265and is very extensible.")
3f641af0 3266 (license license:agpl3+)))
b8050e71 3267
240ca4aa
RW
3268(define-public python-scikit-learn
3269 (package
3270 (name "python-scikit-learn")
8e401ab6 3271 (version "0.18.1")
240ca4aa
RW
3272 (source
3273 (origin
3274 (method url-fetch)
3275 (uri (string-append
3276 "https://github.com/scikit-learn/scikit-learn/archive/"
3277 version ".tar.gz"))
7e21b9fb 3278 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3279 (sha256
3280 (base32
8e401ab6 3281 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3282 (build-system python-build-system)
3283 (arguments
3284 `(#:phases
4d25c486
MB
3285 (modify-phases %standard-phases
3286 (delete 'check)
3287 (add-after 'install 'check
3288 ;; Running tests from the source directory requires
3289 ;; an "inplace" build with paths relative to CWD.
3290 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3291 ;; Use the installed version instead.
3292 (lambda* (#:key inputs outputs #:allow-other-keys)
3293 (add-installed-pythonpath inputs outputs)
3294 ;; some tests require access to "$HOME"
3295 (setenv "HOME" "/tmp")
3296 ;; Step out of the source directory just to be sure.
3297 (chdir "..")
3298 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3299 (inputs
328bb95d
HG
3300 `(("openblas" ,openblas)))
3301 (native-inputs
8e401ab6
RW
3302 `(("python-nose" ,python-nose)
3303 ("python-cython" ,python-cython)))
240ca4aa
RW
3304 (propagated-inputs
3305 `(("python-numpy" ,python-numpy)
3306 ("python-scipy" ,python-scipy)))
3307 (home-page "http://scikit-learn.org/")
3308 (synopsis "Machine Learning in Python")
3309 (description
3310 "Scikit-learn provides simple and efficient tools for data
3311mining and data analysis.")
1b5241c5 3312 (license license:bsd-3)))
240ca4aa
RW
3313
3314(define-public python2-scikit-learn
1b5241c5 3315 (package-with-python2 python-scikit-learn))
240ca4aa 3316
12f8f9bb
RW
3317(define-public python-scikit-image
3318 (package
3319 (name "python-scikit-image")
3320 (version "0.11.3")
3321 (source
3322 (origin
3323 (method url-fetch)
3324 (uri (string-append
3325 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3326 version ".tar.gz"))
3327 (sha256
3328 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3329 (build-system python-build-system)
9026e689
MB
3330 (arguments
3331 ;; TODO: Some tests require running X11 server. Disable them?
3332 '(#:tests? #f))
b83e2333 3333 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3334 (propagated-inputs
3335 `(("python-matplotlib" ,python-matplotlib)
3336 ("python-networkx" ,python-networkx)
12f8f9bb 3337 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3338 ("python-pillow" ,python-pillow)))
3339 (native-inputs
b83e2333
HG
3340 `(("python-numpy" ,python-numpy)
3341 ("python-cython" ,python-cython)
3342 ("python-six" ,python-six)))
12f8f9bb
RW
3343 (home-page "http://scikit-image.org/")
3344 (synopsis "Image processing in Python")
3345 (description
e881752c 3346 "Scikit-image is a collection of algorithms for image processing.")
12733594 3347 (license license:bsd-3)))
12f8f9bb
RW
3348
3349(define-public python2-scikit-image
12733594 3350 (package-with-python2 python-scikit-image))
12f8f9bb 3351
5394a6a6
RW
3352(define-public python-redis
3353 (package
3354 (name "python-redis")
911a8faf 3355 (version "2.10.5")
5394a6a6
RW
3356 (source
3357 (origin
3358 (method url-fetch)
911a8faf 3359 (uri (pypi-uri "redis" version))
5394a6a6 3360 (sha256
911a8faf 3361 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3362 (build-system python-build-system)
3363 ;; Tests require a running Redis server
3364 (arguments '(#:tests? #f))
cf8124b0
HG
3365 ;; As long as we are not running test, we do not need this input :-)
3366 ;;(native-inputs
3367 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3368 (home-page "https://github.com/andymccurdy/redis-py")
3369 (synopsis "Redis Python client")
3370 (description
3371 "This package provides a Python interface to the Redis key-value store.")
3372 (license license:expat)))
3373
3374(define-public python2-redis
3375 (package-with-python2 python-redis))
3376
748cef5b
RW
3377(define-public python-rq
3378 (package
3379 (name "python-rq")
3380 (version "0.5.2")
3381 (source
3382 (origin
3383 (method url-fetch)
3384 (uri (string-append
3385 "https://pypi.python.org/packages/source/r/rq/rq-"
3386 version ".tar.gz"))
3387 (sha256
3388 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3389 (build-system python-build-system)
3390 (propagated-inputs
3391 `(("python-click" ,python-click)
3392 ("python-redis" ,python-redis)))
748cef5b
RW
3393 (home-page "http://python-rq.org/")
3394 (synopsis "Simple job queues for Python")
3395 (description
3396 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3397processing them in the background with workers. It is backed by Redis and it
3398is designed to have a low barrier to entry.")
3f641af0 3399 (license license:bsd-2)))
748cef5b
RW
3400
3401(define-public python2-rq
3402 (package-with-python2 python-rq))
3403
6888830b
FB
3404(define-public python-cython
3405 (package
3406 (name "python-cython")
dd22efef 3407 (version "0.24.1")
6888830b
FB
3408 (source
3409 (origin
3410 (method url-fetch)
56918e26 3411 (uri (pypi-uri "Cython" version))
6888830b
FB
3412 (sha256
3413 (base32
dd22efef 3414 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3415 (build-system python-build-system)
3416 ;; we need the full python package and not just the python-wrapper
3417 ;; because we need libpython3.3m.so
3418 (inputs
3419 `(("python" ,python)))
3420 (arguments
3421 `(#:phases
b92f651b
EF
3422 (modify-phases %standard-phases
3423 (add-before 'check 'set-HOME
3424 ;; some tests require access to "$HOME/.cython"
3425 (lambda _ (setenv "HOME" "/tmp")))
3426 (replace 'check
3427 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3428 (home-page "http://cython.org/")
3429 (synopsis "C extensions for Python")
3430 (description "Cython is an optimising static compiler for both the Python
3431programming language and the extended Cython programming language. It makes
3432writing C extensions for Python as easy as Python itself.")
3f641af0 3433 (license license:asl2.0)
48b311b1 3434 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3435
3436(define-public python2-cython
48b311b1
LC
3437 (package (inherit (package-with-python2
3438 (strip-python2-variant python-cython)))
6888830b
FB
3439 (name "python2-cython")
3440 (inputs
3441 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3442
ee5fb7ee
AV
3443;; The RPython toolchain currently does not support Python 3.
3444(define-public python2-rpython
3445 (package
3446 (name "python2-rpython")
3447 (version "0.1.4")
3448 (source
3449 (origin
3450 (method url-fetch)
3451 (uri (pypi-uri "rpython" version))
3452 (sha256
3453 (base32
3454 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3455 (build-system python-build-system)
3456 (arguments `(#:python ,python-2))
3457 (native-inputs
f3b98f4f 3458 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3459 (home-page "https://rpython.readthedocs.org")
3460 (synopsis "Framework for implementing interpreters and virtual machines")
3461 (description "RPython is a translation and support framework for
3462producing implementations of dynamic languages, emphasizing a clean separation
3463between language specification and implementation aspects.")
3464 (license license:expat)))
3465
0da98533
FB
3466;; This version of numpy is missing the documentation and is only used to
3467;; build matplotlib which is required to build numpy's documentation.
7ccb71e0 3468(define-public python-numpy
0da98533 3469 (package
7ccb71e0
TD
3470 (name "python-numpy")
3471 (version "1.12.0")
0da98533
FB
3472 (source
3473 (origin
3474 (method url-fetch)
7ccb71e0
TD
3475 (uri (string-append
3476 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3477 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3478 (sha256
3479 (base32
7ccb71e0 3480 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3481 (build-system python-build-system)
3482 (inputs
328bb95d 3483 `(("openblas" ,openblas)
cba256f8 3484 ("lapack" ,lapack)))
0da98533 3485 (native-inputs
7ccb71e0
TD
3486 `(("python-cython" ,python-cython)
3487 ("python-nose" ,python-nose)
2efabc55 3488 ("gfortran" ,gfortran)))
0da98533
FB
3489 (arguments
3490 `(#:phases
2efabc55
HG
3491 (modify-phases %standard-phases
3492 (add-before 'build 'set-environment-variables
3493 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3494 (call-with-output-file "site.cfg"
3495 (lambda (port)
cba256f8
RW
3496 (format port
3497 "[openblas]
dbdfe515
RW
3498libraries = openblas
3499library_dirs = ~a/lib
3500include_dirs = ~a/include
cba256f8 3501
2efabc55
HG
3502# backslash-n to make emacs happy
3503\n[lapack]
cba256f8
RW
3504lapack_libs = lapack
3505library_dirs = ~a/lib
3506include_dirs = ~a/include
3507"
3508 (assoc-ref inputs "openblas")
3509 (assoc-ref inputs "openblas")
3510 (assoc-ref inputs "lapack")
3511 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3512 ;; Use "gcc" executable, not "cc".
3513 (substitute* "numpy/distutils/system_info.py"
3514 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3515 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3516 #t))
6a843168
FB
3517 ;; Tests can only be run after the library has been installed and not
3518 ;; within the source directory.
2efabc55
HG
3519 (delete 'check)
3520 (add-after 'install 'check
3521 (lambda* (#:key outputs inputs #:allow-other-keys)
3522 ;; Make installed package available for running the tests
3523 (add-installed-pythonpath inputs outputs)
6a843168 3524 (with-directory-excursion "/tmp"
89b5c60e 3525 (zero? (system* "python" "-c"
2efabc55 3526 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3527 (home-page "http://www.numpy.org/")
3528 (synopsis "Fundamental package for scientific computing with Python")
3529 (description "NumPy is the fundamental package for scientific computing
e881752c 3530with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3531object, sophisticated (broadcasting) functions, tools for integrating C/C++
3532and Fortran code, useful linear algebra, Fourier transform, and random number
3533capabilities.")
3f641af0 3534 (license license:bsd-3)))
0da98533 3535
7ccb71e0
TD
3536(define-public python2-numpy
3537 (package-with-python2 python-numpy))
15bfe6d6 3538
460fccd4 3539(define-public python-munch
3540 (package
3541 (name "python-munch")
3542 (version "2.0.4")
3543 (source
3544 (origin
3545 (method url-fetch)
3546 (uri (pypi-uri "munch" version))
3547 (sha256
3548 (base32
3549 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3550 (build-system python-build-system)
3551 (home-page "https://github.com/Infinidat/munch")
3552 (synopsis "Dot-accessible dictionary")
3553 (description "Munch is a dot-accessible dictionary similar to JavaScript
3554objects.")
3555 (license license:expat)))
3556
3557(define-public python2-munch
3558 (package-with-python2 python-munch))
3559
3a1bfe18
RW
3560(define-public python2-fastlmm
3561 (package
3562 (name "python2-fastlmm")
154d0016 3563 (version "0.2.21")
3a1bfe18
RW
3564 (source
3565 (origin
3566 (method url-fetch)
b074e7d4 3567 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3568 (sha256
3569 (base32
154d0016 3570 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3571 (build-system python-build-system)
3572 (arguments
3573 `(#:python ,python-2)) ; only Python 2.7 is supported
3574 (propagated-inputs
3575 `(("python2-numpy" ,python2-numpy)
3576 ("python2-scipy" ,python2-scipy)
3577 ("python2-matplotlib" ,python2-matplotlib)
3578 ("python2-pandas" ,python2-pandas)
3579 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3580 ("python2-pysnptools" ,python2-pysnptools)))
3581 (native-inputs
3582 `(("unzip" ,unzip)
2efabc55 3583 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3584 ("python2-mock" ,python2-mock)
3585 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3586 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3587 (synopsis "Perform genome-wide association studies on large data sets")
3588 (description
3589 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3590Models, is a program for performing both single-SNP and SNP-set genome-wide
3591association studies (GWAS) on extremely large data sets.")
3f641af0 3592 (license license:asl2.0)))
3a1bfe18 3593
7ccb71e0
TD
3594(define-public python-numpy-documentation
3595 (package
3596 (name "python-numpy-documentation")
3597 (version (package-version python-numpy))
3598 (source (package-source python-numpy))
3599 (build-system python-build-system)
2ee8869a 3600 (native-inputs
7ccb71e0
TD
3601 `(("python-matplotlib" ,python-matplotlib)
3602 ("python-numpy" ,python-numpy)
3603 ("pkg-config" ,pkg-config)
2efabc55
HG
3604 ("python-sphinx" ,python-sphinx)
3605 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3606 ("texlive" ,texlive)
3607 ("texinfo" ,texinfo)
3608 ("perl" ,perl)
7ccb71e0
TD
3609 ("scipy-sphinx-theme"
3610 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3611 (method git-fetch)
3612 (uri (git-reference
3613 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3614 (commit "c466764e22")))
3615 (sha256
3616 (base32
3617 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3618 ,@(package-native-inputs python-numpy)))
2ee8869a 3619 (arguments
7ccb71e0
TD
3620 `(#:tests? #f ; we're only generating the documentation
3621 #:phases
3622 (modify-phases %standard-phases
3623 (delete 'build)
3624 (replace 'install
3625 (lambda* (#:key inputs outputs #:allow-other-keys)
3626 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3627 (doc (string-append
3628 data "/doc/" ,name "-"
3629 ,(package-version python-numpy)))
3630 (info-reader (string-append data "/info"))
3631 (html (string-append doc "/html"))
3632 (scipy-sphinx-theme "scipy-sphinx-theme")
3633 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3634 (pyver ,(string-append "PYVER=")))
3635 (with-directory-excursion "doc"
3636 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3637 (mkdir-p html)
3638 (system* "make" "html" pyver)
3639 (system* "make" "latex" "PAPER=a4" pyver)
3640 (system* "make" "-C" "build/latex"
3641 "all-pdf" "PAPER=a4" pyver)
3642 ;; FIXME: Generation of the info file fails.
3643 ;; (system* "make" "info" pyver)
3644 ;; (mkdir-p info)
3645 ;; (copy-file "build/texinfo/numpy.info"
3646 ;; (string-append info "/numpy.info"))
3647 (for-each (lambda (file)
3648 (copy-file (string-append "build/latex" file)
3649 (string-append doc file)))
3650 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3651 (with-directory-excursion "build/html"
3652 (for-each (lambda (file)
3653 (let* ((dir (dirname file))
3654 (tgt-dir (string-append html "/" dir)))
3655 (unless (equal? "." dir)
3656 (mkdir-p tgt-dir))
3657 (install-file file html)))
3658 (find-files "." ".*")))))
3659 #t)))))
3660 (home-page (package-home-page python-numpy))
3661 (synopsis "Documentation for the python-numpy package")
3662 (description (package-description python-numpy))
3663 (license (package-license python-numpy))))
2ee8869a 3664
7ccb71e0
TD
3665(define-public python2-numpy-documentation
3666 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3667 (package
3668 (inherit numpy-documentation)
3669 (native-inputs `(("python2-functools32" ,python2-functools32)
3670 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3671
0151a8df 3672(define-public python-pygit2
3673 (package
3674 (name "python-pygit2")
022c9772 3675 (version "0.25.0")
0151a8df 3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "pygit2" version))
3680 (sha256
3681 (base32
bb6043fe
MB
3682 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3683 (patches
3684 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3685 (build-system python-build-system)
3686 (propagated-inputs
3687 `(("python-six" ,python-six)
3688 ("python-cffi" ,python-cffi)
3689 ("libgit2" ,libgit2)
3690 ("python-tox" ,python-tox)))
3691 (home-page "https://github.com/libgit2/pygit2")
3692 (synopsis "Python bindings for libgit2")
3693 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3694library, libgit2 implements Git plumbing.")
3695 ;; GPL2.0 only, with linking exception.
3696 (license license:gpl2)))
3697
3698(define-public python2-pygit2
3699 (package-with-python2 python-pygit2))
3700
15bfe6d6
FB
3701(define-public python-pyparsing
3702 (package
3703 (name "python-pyparsing")
e0669289 3704 (version "2.0.3")
15bfe6d6
FB
3705 (source
3706 (origin
3707 (method url-fetch)
de67e922
LF
3708 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3709 "/pyparsing-" version
15bfe6d6
FB
3710 "/pyparsing-" version ".tar.gz"))
3711 (sha256
3712 (base32
e0669289 3713 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3714 (build-system python-build-system)
3715 (outputs '("out" "doc"))
3716 (arguments
3717 `(#:tests? #f ; no test target
3718 #:modules ((guix build python-build-system)
3719 (guix build utils))
3720 #:phases
3721 (alist-cons-after
3722 'install 'install-doc
3723 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3724 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3725 "/share/doc/" ,name "-" ,version))
3726 (html-doc (string-append doc "/html"))
3727 (examples (string-append doc "/examples")))
3728 (mkdir-p html-doc)
3729 (mkdir-p examples)
89b5c60e 3730 (for-each
15bfe6d6 3731 (lambda (dir tgt)
89b5c60e 3732 (map (lambda (file)
96c46210 3733 (install-file file tgt))
15bfe6d6
FB
3734 (find-files dir ".*")))
3735 (list "docs" "htmldoc" "examples")
3736 (list doc html-doc examples))))
3737 %standard-phases)))
3738 (home-page "http://pyparsing.wikispaces.com")
3739 (synopsis "Python parsing class library")
3740 (description
3741 "The pyparsing module is an alternative approach to creating and
3742executing simple grammars, vs. the traditional lex/yacc approach, or the use
3743of regular expressions. The pyparsing module provides a library of classes
3744that client code uses to construct the grammar directly in Python code.")
bd3fa666 3745 (license license:expat)))
15bfe6d6
FB
3746
3747(define-public python2-pyparsing
3748 (package-with-python2 python-pyparsing))
3749
ec00de35
FB
3750(define-public python-numpydoc
3751 (package
3752 (name "python-numpydoc")
3753 (version "0.5")
3754 (source
3755 (origin
3756 (method url-fetch)
89b5c60e 3757 (uri (string-append
ec00de35
FB
3758 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3759 version ".tar.gz"))
3760 (sha256
3761 (base32
5e4d8f67
AE
3762 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3763 (modules '((guix build utils)))
3764 (snippet
3765 '(begin
3766 ;; Drop a test requiring matplotlib, which we cannot add as an
3767 ;; input since it would create a circular dependency: Extend the
3768 ;; test for Python 3, where it is already dropped, to Python 2.
3769 (substitute* "numpydoc/tests/test_plot_directive.py"
3770 (("3") "2"))))))
ec00de35 3771 (build-system python-build-system)
fe4a8da4 3772 (propagated-inputs
213d1745
HG
3773 `(("python-sphinx" ,python-sphinx)))
3774 (native-inputs
3775 `(("python-nose" ,python-nose)))
ec00de35
FB
3776 (home-page "https://pypi.python.org/pypi/numpydoc")
3777 (synopsis
3778 "Numpy's Sphinx extensions")
3779 (description
3780 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3781 (license license:bsd-2)))
ec00de35
FB
3782
3783(define-public python2-numpydoc
5e4d8f67 3784 (package-with-python2 python-numpydoc))
1c65314c 3785
1e656049
RW
3786(define-public python-numexpr
3787 (package
3788 (name "python-numexpr")
2ee57340 3789 (version "2.6.1")
1e656049
RW
3790 (source
3791 (origin
3792 (method url-fetch)
26112c0a 3793 (uri (pypi-uri "numexpr" version))
1e656049
RW
3794 (sha256
3795 (base32
2ee57340 3796 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3797 (build-system python-build-system)
3798 (arguments `(#:tests? #f)) ; no tests included
3799 (propagated-inputs
3800 `(("python-numpy" ,python-numpy)))
3801 (home-page "https://github.com/pydata/numexpr")
3802 (synopsis "Fast numerical expression evaluator for NumPy")
3803 (description
3804 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3805expressions that operate on arrays are accelerated and use less memory than
3806doing the same calculation in Python. In addition, its multi-threaded
3807capabilities can make use of all your cores, which may accelerate
3808computations, most specially if they are not memory-bounded (e.g. those using
3809transcendental functions).")
f210e944 3810 (license license:expat)))
1e656049
RW
3811
3812(define-public python2-numexpr
f210e944 3813 (package-with-python2 python-numexpr))
1e656049 3814
361d982c
MB
3815(define-public python-cycler
3816 (package
3817 (name "python-cycler")
3818 (version "0.10.0")
3819 (source (origin
3820 (method url-fetch)
3821 (uri (pypi-uri "cycler" version))
3822 (sha256
3823 (base32
3824 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3825 (build-system python-build-system)
3826 (arguments
3827 ;; XXX: The current version requires 'coveralls' which we don't have.
3828 ;; Enable this for the next release which uses 'python-pytest'.
3829 '(#:tests? #f))
3830 (propagated-inputs
3831 `(("python-six" ,python-six)))
3832 (home-page "http://matplotlib.org/cycler/")
3833 (synopsis "Composable keyword argument iterator")
3834 (description
3835 "When using @code{matplotlib} and plotting more than one line, it is
3836common to want to be able to want to be able to cycle over one or more artist
3837styles; but the plotting logic can quickly become involved.
3838To address this and enable easy cycling over arbitrary @code{kwargs}, the
3839@code{Cycler} class was developed.")
3840 (license license:bsd-3)))
3841
3842(define-public python2-cycler
3843 (package-with-python2 python-cycler))
3844
2aa6d3ae
TD
3845(define-public python-colorspacious
3846 (package
3847 (name "python-colorspacious")
3848 (version "1.1.0")
3849 (source
3850 (origin
3851 (method url-fetch)
3852 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3853 version ".tar.gz"))
3854 (file-name (string-append name "-" version))
3855 (sha256
3856 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3857 (build-system python-build-system)
3858 (propagated-inputs
3859 `(("python-numpy" ,python-numpy)))
3860 (home-page "https://github.com/njsmith/colorspacious")
3861 (synopsis "Python library for colorspace conversions")
3862 (description "@code{colorspacious} is a Python library that lets you
3863convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3864 (license license:expat)))
3865
3866(define-public python2-colorspacious
3867 (package-with-python2 python-colorspacious))
3868
1c65314c
FB
3869(define-public python-matplotlib
3870 (package
3871 (name "python-matplotlib")
1bbc659f 3872 (version "1.4.3")
1c65314c
FB
3873 (source
3874 (origin
3875 (method url-fetch)
de67e922
LF
3876 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3877 "/matplotlib-" version
1c65314c
FB
3878 "/matplotlib-" version ".tar.gz"))
3879 (sha256
3880 (base32
1bbc659f 3881 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3882 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3883 (build-system python-build-system)
3884 (outputs '("out" "doc"))
25f9a068
FB
3885 (propagated-inputs ; the following packages are all needed at run time
3886 `(("python-pyparsing" ,python-pyparsing)
3887 ("python-pygobject" ,python-pygobject)
3888 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3889 ("python-tkinter" ,python "tk")
22d7360b 3890 ("python-dateutil" ,python-dateutil)
7ccb71e0 3891 ("python-numpy" ,python-numpy)
ca33a3ad
HG
3892 ("python-pillow" ,python-pillow)
3893 ("python-pytz" ,python-pytz)
3894 ("python-six" ,python-six)
25f9a068
FB
3895 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3896 ;; from 'gtk+') provides the required 'typelib' files used by
3897 ;; 'gobject-introspection'. The location of these files is set with the
3898 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3899 ;; is done automatically by a 'native-search-path' procedure. However,
3900 ;; at run-time the user must set this variable as follows:
3901 ;;
3902 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3903 ("gtk+" ,gtk+)
3904 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3905 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3906 ;; object. For this reason we need to import both libraries.
3907 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3908 ("python-pycairo" ,python-pycairo)
3909 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3910 (inputs
ca33a3ad 3911 `(("libpng" ,libpng)
1c65314c
FB
3912 ("imagemagick" ,imagemagick)
3913 ("freetype" ,freetype)
25f9a068
FB
3914 ("cairo" ,cairo)
3915 ("glib" ,glib)
1c65314c 3916 ;; FIXME: Add backends when available.
1c65314c
FB
3917 ;("python-wxpython" ,python-wxpython)
3918 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3919 ("tcl" ,tcl)
3920 ("tk" ,tk)))
1c65314c
FB
3921 (native-inputs
3922 `(("pkg-config" ,pkg-config)
a50e0301 3923 ("python-sphinx" ,python-sphinx-1.2.3)
ca33a3ad
HG
3924 ("python-numpydoc" ,python-numpydoc)
3925 ("python-nose" ,python-nose)
3926 ("python-mock" ,python-mock)
1c65314c
FB
3927 ("texlive" ,texlive)
3928 ("texinfo" ,texinfo)))
3929 (arguments
3930 `(#:phases
42b7009a
DM
3931 (modify-phases %standard-phases
3932 (add-before 'build 'configure-environment
3933 (lambda* (#:key outputs inputs #:allow-other-keys)
3934 (let ((cairo (assoc-ref inputs "cairo"))
3935 (gtk+ (assoc-ref inputs "gtk+")))
3936 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3937 ;; has not effect.
3938 (setenv "LD_LIBRARY_PATH"
3939 (string-append cairo "/lib:" gtk+ "/lib"))
3940 (setenv "HOME" (getcwd))
3941 (call-with-output-file "setup.cfg"
3942 (lambda (port)
3943 (format port "[directories]~%
1bbc659f 3944basedirlist = ~a,~a~%
57b7b8cd 3945 [rc_options]~%
1bbc659f 3946backend = TkAgg~%"
42b7009a 3947 (assoc-ref inputs "tcl")
fdcbf10b
DM
3948 (assoc-ref inputs "tk"))))
3949 #t)))
42b7009a
DM
3950 (add-after 'install 'install-doc
3951 (lambda* (#:key inputs outputs #:allow-other-keys)
3952 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3953 (doc (string-append data "/doc/" ,name "-" ,version))
3954 (info (string-append data "/info"))
3955 (html (string-append doc "/html")))
3956 ;; Make installed package available for building the
3957 ;; documentation
3958 (add-installed-pythonpath inputs outputs)
3959 (with-directory-excursion "doc"
3960 ;; Produce pdf in 'A4' format.
3961 (substitute* (find-files "." "conf\\.py")
3962 (("latex_paper_size = 'letter'")
3963 "latex_paper_size = 'a4'"))
84e0f8c1
DM
3964 (substitute* "users/intro.rst"
3965 ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>)
3966 (("[[][*][]]") "[#]"))
42b7009a
DM
3967 (mkdir-p html)
3968 (mkdir-p info)
3969 ;; The doc recommends to run the 'html' target twice.
3970 (system* "python" "make.py" "html")
3971 (system* "python" "make.py" "html")
3972 (copy-recursively "build/html" html)
3973 (system* "python" "make.py" "latex")
3974 (system* "python" "make.py" "texinfo")
18b31516 3975 (symlink (string-append html "/_images")
42b7009a
DM
3976 (string-append info "/matplotlib-figures"))
3977 (with-directory-excursion "build/texinfo"
3978 (substitute* "matplotlib.texi"
3979 (("@image\\{([^,]*)" all file)
3980 (string-append "@image{matplotlib-figures/" file)))
3981 (symlink (string-append html "/_images")
3982 "./matplotlib-figures")
3983 (system* "makeinfo" "--no-split"
3984 "-o" "matplotlib.info" "matplotlib.texi"))
3985 (copy-file "build/texinfo/matplotlib.info"
3986 (string-append info "/matplotlib.info"))
3987 (copy-file "build/latex/Matplotlib.pdf"
fdcbf10b
DM
3988 (string-append doc "/Matplotlib.pdf")))
3989 #t))))))
1c65314c
FB
3990 (home-page "http://matplotlib.org")
3991 (synopsis "2D plotting library for Python")
3992 (description
3993 "Matplotlib is a Python 2D plotting library which produces publication
3994quality figures in a variety of hardcopy formats and interactive environments
3995across platforms. Matplotlib can be used in Python scripts, the python and
3996ipython shell, web application servers, and six graphical user interface
3997toolkits.")
3f641af0 3998 (license license:psfl)
57b7b8cd 3999 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 4000
764c077b 4001(define-public python2-matplotlib
57b7b8cd
LC
4002 (let ((matplotlib (package-with-python2
4003 (strip-python2-variant python-matplotlib))))
764c077b 4004 (package (inherit matplotlib)
88c26834
AE
4005 ;; Make sure to use special packages for Python 2 instead
4006 ;; of those automatically rewritten by package-with-python2.
a50e0301
MB
4007 (native-inputs
4008 `(("python2-sphinx" ,python2-sphinx-1.2.3)
4009 ,@(fold alist-delete (package-native-inputs matplotlib)
4010 '("python-sphinx"))))
89b5c60e 4011 (propagated-inputs
7ca0dbc3 4012 `(("python2-pycairo" ,python2-pycairo)
764c077b 4013 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
4014 ("python2-tkinter" ,python-2 "tk")
4015 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4016 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 4017
0dde6232
RW
4018(define-public python2-pysnptools
4019 (package
4020 (name "python2-pysnptools")
a800018e 4021 (version "0.3.9")
0dde6232
RW
4022 (source
4023 (origin
4024 (method url-fetch)
3f2e9675 4025 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4026 (sha256
4027 (base32
a800018e 4028 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4029 (build-system python-build-system)
4030 (arguments
4031 `(#:python ,python-2)) ; only Python 2.7 is supported
4032 (propagated-inputs
4033 `(("python2-numpy" ,python2-numpy)
4034 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4035 ("python2-pandas" ,python2-pandas)))
4036 (native-inputs
4037 `(("python2-cython" ,python2-cython)))
0dde6232 4038 (native-inputs
f3b98f4f 4039 `(("unzip" ,unzip)))
0dde6232
RW
4040 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4041 (synopsis "Library for reading and manipulating genetic data")
4042 (description
4043 "PySnpTools is a library for reading and manipulating genetic data. It
4044can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4045those files. It can also efficiently manipulate ranges of integers using set
4046operators such as union, intersection, and difference.")
3f641af0 4047 (license license:asl2.0)))
0dde6232 4048
c9b1b4f9
RW
4049(define-public python-rpy2
4050 (package
4051 (name "python-rpy2")
ec3bcbc7 4052 (version "2.7.6")
c9b1b4f9
RW
4053 (source
4054 (origin
4055 (method url-fetch)
ec3bcbc7 4056 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4057 (sha256
4058 (base32
ec3bcbc7 4059 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4060 (build-system python-build-system)
444464ec
MB
4061 (arguments
4062 '(#:phases
4063 (modify-phases %standard-phases
4064 (delete 'check)
4065 (add-after 'install 'check
4066 (lambda* (#:key outputs inputs #:allow-other-keys)
4067 ;; It's easier to run tests after install.
4068 ;; Make installed package available for running the tests
4069 (add-installed-pythonpath inputs outputs)
4070 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4071 (propagated-inputs
4072 `(("python-six" ,python-six)))
c9b1b4f9 4073 (inputs
482d9591 4074 `(("readline" ,readline)
c9b1b4f9
RW
4075 ("icu4c" ,icu4c)
4076 ("pcre" ,pcre)
4077 ("r" ,r)))
4078 (native-inputs
f3b98f4f 4079 `(("zlib" ,zlib)))
c9b1b4f9
RW
4080 (home-page "http://rpy.sourceforge.net/")
4081 (synopsis "Python interface to the R language")
4082 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4083low-level interface to R from Python, a proposed high-level interface,
4084including wrappers to graphical libraries, as well as R-like structures and
4085functions.")
3f641af0 4086 (license license:gpl3+)))
c9b1b4f9
RW
4087
4088(define-public python2-rpy2
4089 (let ((rpy2 (package-with-python2 python-rpy2)))
4090 (package (inherit rpy2)
4091 (native-inputs
4092 `(("python2-singledispatch" ,python2-singledispatch)
4093 ,@(package-native-inputs rpy2))))))
4094
bb986599
FB
4095(define-public python-scipy
4096 (package
4097 (name "python-scipy")
35093253 4098 (version "0.18.1")
bb986599
FB
4099 (source
4100 (origin
4101 (method url-fetch)
35093253
TD
4102 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4103 version ".tar.gz"))
4104 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4105 (sha256
4106 (base32
35093253 4107 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4108 (build-system python-build-system)
dd86c0d1 4109 (propagated-inputs
bb986599
FB
4110 `(("python-numpy" ,python-numpy)
4111 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4112 ("python-pyparsing" ,python-pyparsing)))
4113 (inputs
4114 `(("lapack" ,lapack)
719b01c1 4115 ("openblas" ,openblas)))
bb986599 4116 (native-inputs
35093253
TD
4117 `(("python-cython" ,python-cython)
4118 ("python-nose" ,python-nose)
4119 ("python-sphinx" ,python-sphinx)
5248d49e 4120 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4121 ("gfortran" ,gfortran)
bb986599
FB
4122 ("perl" ,perl)))
4123 (outputs '("out" "doc"))
4124 (arguments
4125 `(#:phases
16ca6aaa 4126 (modify-phases %standard-phases
16ca6aaa
MB
4127 (add-before 'build 'configure-openblas
4128 (lambda* (#:key inputs #:allow-other-keys)
4129 (call-with-output-file "site.cfg"
4130 (lambda (port)
4131 (format port
4132 "[blas]
719b01c1
RW
4133libraries = openblas
4134library_dirs = ~a/lib
4135include_dirs = ~a/include
d548e6aa
HG
4136
4137# backslash-n to make emacs happy
4138\n[atlas]
719b01c1
RW
4139library_dirs = ~a/lib
4140atlas_libs = openblas
4141"
16ca6aaa
MB
4142 (assoc-ref inputs "openblas")
4143 (assoc-ref inputs "openblas")
4144 (assoc-ref inputs "openblas"))))
db967b64 4145 #t))
35093253
TD
4146 (add-after 'install 'install-doc
4147 (lambda* (#:key inputs outputs #:allow-other-keys)
4148 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4149 (doc (string-append data "/doc/" ,name "-" ,version))
4150 (html (string-append doc "/html"))
4151 (pyver ,(string-append "PYVER=")))
4152 ;; Make installed package available for building the
4153 ;; documentation
4154 (add-installed-pythonpath inputs outputs)
4155 (with-directory-excursion "doc"
4156 ;; Fix generation of images for mathematical expressions.
4157 (substitute* (find-files "source" "conf\\.py")
4158 (("pngmath_use_preview = True")
4159 "pngmath_use_preview = False"))
4160 (mkdir-p html)
4161 (system* "make" "html" pyver)
4162 (with-directory-excursion "build/html"
4163 (for-each (lambda (file)
4164 (let* ((dir (dirname file))
4165 (tgt-dir (string-append html "/" dir)))
4166 (install-file file html)))
4167 (find-files "." ".*")))))
4168 #t))
4169 (add-after 'unpack 'fix-tests
4170 (lambda _
4171 (substitute* "scipy/integrate/tests/test_quadpack.py"
4172 (("libm.so") "libm.so.6"))
4173 #t))
4174 ;; Tests can only be run after the library has been installed and not
4175 ;; within the source directory.
4176 (delete 'check)
4177 (add-after 'install 'check
4178 (lambda* (#:key inputs outputs #:allow-other-keys)
4179 (add-installed-pythonpath inputs outputs)
4180 (with-directory-excursion "/tmp"
4181 (zero? (system* "python" "-c"
4182 "import scipy; scipy.test('full')")))
4183 #t)))))
bb986599
FB
4184 (home-page "http://www.scipy.org/")
4185 (synopsis "The Scipy library provides efficient numerical routines")
4186 (description "The SciPy library is one of the core packages that make up
4187the SciPy stack. It provides many user-friendly and efficient numerical
4188routines such as routines for numerical integration and optimization.")
9200fe14 4189 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4190 (license license:bsd-3)))
bb986599 4191
764c077b 4192(define-public python2-scipy
35093253
TD
4193 (package-with-python2
4194 (strip-python2-variant python-scipy)))
bb986599 4195
73acc193 4196(define-public python-socksipy-branch
4197 (package
4198 (name "python-socksipy-branch")
4199 (version "1.01")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "SocksiPy-branch" version))
4204 (sha256
4205 (base32
4206 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4207 (build-system python-build-system)
4208 (arguments
4209 `(#:tests? #f)) ; There are no tests
4210 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4211 (synopsis "Python SOCKS module")
4212 (description
4213 "SocksiPy - A Python SOCKS client module. It provides a
4214socket-like interface that supports connections to any TCP
4215service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4216The original version was developed by Dan Haim, this is a
4217branch created by Mario Vilas to address some open issues,
4218as the original project seems to have been abandoned circa 2007.")
4219 (license license:bsd-3)))
4220
4221(define-public python2-socksipy-branch
4222 (package-with-python2 python-socksipy-branch))
4223
94914805
EB
4224(define-public python-sqlalchemy
4225 (package
4226 (name "python-sqlalchemy")
a4ba286b 4227 (version "1.0.12")
94914805
EB
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (string-append "https://pypi.python.org/packages/source/S/"
4232 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4233 (sha256
4234 (base32
a4ba286b 4235 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4236 (build-system python-build-system)
4237 (native-inputs
4238 `(("python-cython" ,python-cython) ;for c extensions
4239 ("python-pytest" ,python-pytest)
4240 ("python-mock" ,python-mock))) ;for tests
4241 (arguments
4242 `(#:phases (alist-replace
4243 'check
4244 (lambda _ (zero? (system* "py.test")))
4245 %standard-phases)))
4246 (home-page "http://www.sqlalchemy.org")
4247 (synopsis "Database abstraction library")
4248 (description
4249 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4250gives application developers the full power and flexibility of SQL. It
4251provides a full suite of well known enterprise-level persistence patterns,
4252designed for efficient and high-performing database access, adapted into a
4253simple and Pythonic domain language.")
3f641af0 4254 (license license:x11)))
94914805
EB
4255
4256(define-public python2-sqlalchemy
4257 (package-with-python2 python-sqlalchemy))
c937562e 4258
4a093330
DM
4259(define-public python-pycodestyle
4260 (package
4261 (name "python-pycodestyle")
4262 (version "2.0.0")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "pycodestyle" version))
4267 (sha256
4268 (base32
4269 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4270 (build-system python-build-system)
4271 (home-page "https://pycodestyle.readthedocs.io/")
4272 (synopsis "Python style guide checker")
4273 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4274Python code against some of the style conventions in
4275@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4276 (license license:expat)))
4a093330
DM
4277
4278(define-public python2-pycodestyle
f210e944 4279 (package-with-python2 python-pycodestyle))
b91912c4
DM
4280
4281(define-public python-orderedmultidict
4282 (package
4283 (name "python-orderedmultidict")
9e2802cb 4284 (version "0.7.11")
b91912c4
DM
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (pypi-uri "orderedmultidict" version))
4289 (sha256
4290 (base32
9e2802cb 4291 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4292 (build-system python-build-system)
4293 (arguments
4294 `(#:phases
4295 (modify-phases %standard-phases
4296 (add-after 'unpack 'fix-tests
4297 (lambda _
4298 ;; The package uses nosetest for running the tests.
4299 ;; Adding this initfile allows to run the test suite
4300 ;; without requiring nosetest.
4301 (zero? (system* "touch" "tests/__init__.py")))))))
4302 (propagated-inputs
4303 `(("python-six" ,python-six)))
4304 (native-inputs
4305 `(("python-pycodestyle" ,python-pycodestyle)))
4306 (home-page "https://github.com/gruns/orderedmultidict")
4307 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4308 (description "This package contains a library for ordered multivalue
4309dictionaries. A multivalue dictionary is a dictionary that can store
4310multiple values for the same key. An ordered multivalue dictionary is a
4311multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4312 (license license:unlicense)))
b91912c4
DM
4313
4314(define-public python2-orderedmultidict
f210e944 4315 (package-with-python2 python-orderedmultidict))
9dede065
DM
4316
4317(define-public python-furl
4318 (package
4319 (name "python-furl")
4320 (version "0.5.6")
4321 (source
4322 (origin
4323 (method url-fetch)
4324 (uri (pypi-uri "furl" version))
4325 (sha256
4326 (base32
4327 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4328 (build-system python-build-system)
4329 (propagated-inputs
4330 `(("python-six" ,python-six)
4331 ("python-orderedmultidict" ,python-orderedmultidict)))
4332 (native-inputs
4333 `(("python-pycodestyle" ,python-pycodestyle)))
4334 (home-page "https://github.com/gruns/furl")
4335 (synopsis "URL manipulation in Python")
4336 (description "Furl provides an easy-to-use alternative to the
4337@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4338 (license license:unlicense)))
9dede065
DM
4339
4340(define-public python2-furl
f210e944 4341 (package-with-python2 python-furl))
462bf271
DM
4342
4343(define-public python-flask-babel
4344 (package
4345 (name "python-flask-babel")
4346 (version "0.11.1")
4347 (source
4348 (origin
4349 (method url-fetch)
4350 (uri (pypi-uri "Flask-Babel" version))
4351 (sha256
4352 (base32
4353 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4354 (build-system python-build-system)
4355 (propagated-inputs
4356 `(("python-flask" ,python-flask)
4357 ("python-babel" ,python-babel)
4358 ("python-jinja2" ,python-jinja2)
4359 ("python-pytz" ,python-pytz)))
4360 (home-page "https://github.com/python-babel/flask-babel")
4361 (synopsis "Add i18n/l10n support to Flask applications")
4362 (description "This package implements internationalization and localization
4363support for Flask. This is based on the Python babel module as well as pytz -
4364both of which are installed automatically if you install this library.")
f210e944 4365 (license license:bsd-3)))
462bf271
DM
4366
4367(define-public python2-flask-babel
f210e944 4368 (package-with-python2 python-flask-babel))
4a093330 4369
de2966cf
EF
4370(define-public python-sqlalchemy-utils
4371 (package
4372 (name "python-sqlalchemy-utils")
bb4b1706 4373 (version "0.32.11")
de2966cf
EF
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (pypi-uri "SQLAlchemy-Utils" version))
4378 (sha256
4379 (base32
bb4b1706 4380 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4381 (build-system python-build-system)
35d56b7b
MB
4382 (arguments
4383 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4384 ;; #:phases
4385 ;; (modify-phases %standard-phases
4386 ;; (replace 'check
4387 ;; (lambda _
4388 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4389 (propagated-inputs
de2966cf
EF
4390 `(("python-six" ,python-six)
4391 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4392 (native-inputs
22d7360b 4393 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4394 ("python-flexmock" ,python-flexmock)
4395 ("python-psycopg2" ,python-psycopg2)
4396 ("python-pytest" ,python-pytest)
4397 ("python-pytz" ,python-pytz)))
de2966cf
EF
4398 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4399 (synopsis "Various utility functions for SQLAlchemy")
4400 (description
4401 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4402for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4403
4404You might also want to install the following optional dependencies:
4405@enumerate
4406@item @code{python-passlib}
4407@item @code{python-babel}
4408@item @code{python-cryptography}
4409@item @code{python-pytz}
4410@item @code{python-psycopg2}
4411@item @code{python-furl}
4412@item @code{python-flask-babel}
4413@end enumerate
4414")
de2966cf
EF
4415 (license license:bsd-3)))
4416
4417(define-public python2-sqlalchemy-utils
f210e944 4418 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4419
af5a4602
CAW
4420(define-public python-alembic
4421 (package
4422 (name "python-alembic")
4418990d 4423 (version "0.8.10")
af5a4602
CAW
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (pypi-uri "alembic" version))
4428 (sha256
4429 (base32
4418990d 4430 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4431 (build-system python-build-system)
4432 (native-inputs
4433 `(("python-mock" ,python-mock)
4434 ("python-pytest-cov" ,python-pytest-cov)))
4435 (propagated-inputs
4436 `(("python-sqlalchemy" ,python-sqlalchemy)
4437 ("python-mako" ,python-mako)
4438 ("python-editor" ,python-editor)))
4439 (home-page "http://bitbucket.org/zzzeek/alembic")
4440 (synopsis
4441 "Database migration tool for SQLAlchemy")
4442 (description
4443 "Alembic is a lightweight database migration tool for usage with the
4444SQLAlchemy Database Toolkit for Python.")
f210e944 4445 (license license:expat)))
af5a4602
CAW
4446
4447(define-public python2-alembic
f210e944 4448 (package-with-python2 python-alembic))
af5a4602 4449
138adbbe
TD
4450(define-public python-autopep8
4451 (package
4452 (name "python-autopep8")
4453 (version "1.2.4")
4454 (source
4455 (origin
4456 (method url-fetch)
4457 (uri (pypi-uri "autopep8" version))
4458 (sha256
4459 (base32
4460 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4461 (build-system python-build-system)
4462 (propagated-inputs
4463 `(("python-pep8" ,python-pep8)))
4464 (home-page "https://github.com/hhatto/autopep8")
4465 (synopsis "Format Python code according to the PEP 8 style guide")
4466 (description
4467 "@code{autopep8} automatically formats Python code to conform to
4468the PEP 8 style guide. It uses the pycodestyle utility to determine
4469what parts of the code needs to be formatted. @code{autopep8} is
4470capable of fixing most of the formatting issues that can be reported
4471by pycodestyle.")
4472 (license (license:non-copyleft
4473 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4474
4475(define-public python2-autopep8
4476 (package-with-python2 python-autopep8))
4477
1671c07c
EB
4478(define-public python-distutils-extra
4479 (package
4480 (name "python-distutils-extra")
4481 (version "2.38")
4482 (source
4483 (origin
4484 (method url-fetch)
4485 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4486 version "/+download/python-distutils-extra-"
4487 version ".tar.gz"))
4488 (sha256
4489 (base32
4490 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4491 (build-system python-build-system)
1671c07c
EB
4492 (home-page "https://launchpad.net/python-distutils-extra/")
4493 (synopsis "Enhancements to Python's distutils")
4494 (description
4495 "The python-distutils-extra module enables you to easily integrate
4496gettext support, themed icons, and scrollkeeper-based documentation into
4497Python's distutils.")
3f641af0 4498 (license license:gpl2)))
1671c07c
EB
4499
4500(define-public python2-distutils-extra
4501 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4502
4503(define-public python2-elib.intl
4504 (package
4505 (name "python2-elib.intl")
4506 (version "0.0.3")
4507 (source
4508 (origin
4509 ;; This project doesn't tag releases or publish tarballs, so we take
4510 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4511 (method git-fetch)
4512 (uri (git-reference
4513 (url "https://github.com/dieterv/elib.intl.git")
4514 (commit "d09997cfef")))
4515 (sha256
4516 (base32
4517 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4518 (build-system python-build-system)
ea5456c8
EB
4519 (arguments
4520 ;; incompatible with Python 3 (exception syntax)
4521 `(#:python ,python-2
b41a05ce 4522 #:tests? #f))
ea5456c8
EB
4523 (home-page "https://github.com/dieterv/elib.intl")
4524 (synopsis "Enhanced internationalization for Python")
4525 (description
4526 "The elib.intl module provides enhanced internationalization (I18N)
4527services for your Python modules and applications.")
3f641af0 4528 (license license:lgpl3+)))
ea5456c8 4529
c937562e
EB
4530(define-public python-pillow
4531 (package
4532 (name "python-pillow")
aba5182c 4533 (version "3.3.3")
c937562e
EB
4534 (source
4535 (origin
4536 (method url-fetch)
f1d9231d 4537 (uri (pypi-uri "Pillow" version))
c937562e
EB
4538 (sha256
4539 (base32
aba5182c 4540 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4541 (build-system python-build-system)
4542 (native-inputs
f3b98f4f 4543 `(("python-nose" ,python-nose)))
c937562e 4544 (inputs
5ff408d9
SB
4545 `(("freetype" ,freetype)
4546 ("lcms" ,lcms)
c937562e
EB
4547 ("zlib" ,zlib)
4548 ("libjpeg" ,libjpeg)
4549 ("openjpeg" ,openjpeg)
5ff408d9
SB
4550 ("libtiff" ,libtiff)
4551 ("libwebp" ,libwebp)))
c937562e 4552 (arguments
e5358a6b 4553 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4554 (add-after
4555 'install 'check-installed
6151120a 4556 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4557 (begin
4558 (setenv "HOME" (getcwd))
6151120a
HG
4559 ;; Make installed package available for running the
4560 ;; tests
4561 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4562 (and (zero? (system* "python" "selftest.py"
4563 "--installed"))
4564 (zero? (system* "python" "test-installed.py"))))))
4565 (delete 'check))))
c937562e
EB
4566 (home-page "https://pypi.python.org/pypi/Pillow")
4567 (synopsis "Fork of the Python Imaging Library")
4568 (description
4569 "The Python Imaging Library adds image processing capabilities to your
4570Python interpreter. This library provides extensive file format support, an
4571efficient internal representation, and fairly powerful image processing
4572capabilities. The core image library is designed for fast access to data
4573stored in a few basic pixel formats. It should provide a solid foundation for
4574a general image processing tool.")
3f641af0 4575 (license (license:x11-style
c937562e
EB
4576 "http://www.pythonware.com/products/pil/license.htm"
4577 "The PIL Software License"))))
4578
4579(define-public python2-pillow
4580 (package-with-python2 python-pillow))
bb986599 4581
a415f036
FB
4582(define-public python-pycparser
4583 (package
4584 (name "python-pycparser")
5043b20d 4585 (version "2.17")
a415f036
FB
4586 (source
4587 (origin
4588 (method url-fetch)
38eb6919 4589 (uri (pypi-uri "pycparser" version))
a415f036
FB
4590 (sha256
4591 (base32
5043b20d 4592 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4593 (outputs '("out" "doc"))
4594 (build-system python-build-system)
4595 (native-inputs
f3b98f4f 4596 `(("pkg-config" ,pkg-config)))
a415f036 4597 (arguments
89b5c60e 4598 `(#:phases
819939cb
TGR
4599 (modify-phases %standard-phases
4600 (replace 'check
4601 (lambda _
4602 (with-directory-excursion "tests"
4603 (zero? (system* "python" "all_tests.py")))))
4604 (add-after 'install 'install-doc
4605 (lambda* (#:key outputs #:allow-other-keys)
4606 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4607 (doc (string-append data "/doc/" ,name "-" ,version))
4608 (examples (string-append doc "/examples")))
4609 (mkdir-p examples)
4610 (for-each (lambda (file)
4611 (copy-file (string-append "." file)
4612 (string-append doc file)))
4613 '("/README.rst" "/CHANGES" "/LICENSE"))
4614 (copy-recursively "examples" examples)))))))
a415f036
FB
4615 (home-page "https://github.com/eliben/pycparser")
4616 (synopsis "C parser in Python")
4617 (description
4618 "Pycparser is a complete parser of the C language, written in pure Python
4619using the PLY parsing library. It parses C code into an AST and can serve as
4620a front-end for C compilers or analysis tools.")
3f641af0 4621 (license license:bsd-3)))
a415f036
FB
4622
4623(define-public python2-pycparser
4624 (package-with-python2 python-pycparser))
57c3f716
FB
4625
4626(define-public python-cffi
4627 (package
4628 (name "python-cffi")
2d3a437c 4629 (version "1.4.2")
57c3f716
FB
4630 (source
4631 (origin
4632 (method url-fetch)
2d3a437c 4633 (uri (pypi-uri "cffi" version))
89b5c60e 4634 (sha256
2d3a437c 4635 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4636 (build-system python-build-system)
4637 (outputs '("out" "doc"))
4638 (inputs
4639 `(("libffi" ,libffi)))
4640 (propagated-inputs ; required at run-time
4641 `(("python-pycparser" ,python-pycparser)))
4642 (native-inputs
4643 `(("pkg-config" ,pkg-config)
4644 ("python-sphinx" ,python-sphinx)
f3b98f4f 4645 ("python-pytest" ,python-pytest)))
57c3f716 4646 (arguments
4179f952 4647 `(#:phases
57c3f716
FB
4648 (alist-cons-after
4649 'install 'install-doc
4650 (lambda* (#:key outputs #:allow-other-keys)
4651 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4652 (doc (string-append data "/doc/" ,name "-" ,version))
4653 (html (string-append doc "/html")))
4654 (with-directory-excursion "doc"
4655 (system* "make" "html")
4656 (mkdir-p html)
4657 (copy-recursively "build/html" html))
4658 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4659 %standard-phases)))
4660 (home-page "http://cffi.readthedocs.org")
4661 (synopsis "Foreign function interface for Python")
4662 (description
4663 "Foreign Function Interface for Python calling C code.")
bd3fa666 4664 (license license:expat)))
57c3f716
FB
4665
4666(define-public python2-cffi
4667 (package-with-python2 python-cffi))
6fa14469
FB
4668
4669(define-public python-xcffib
4670 (package
4671 (name "python-xcffib")
4672 (version "0.1.9")
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (string-append "https://pypi.python.org/packages/source/x/"
4677 "xcffib/xcffib-" version ".tar.gz"))
4678 (sha256
4679 (base32
4680 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4681 (build-system python-build-system)
4682 (inputs
482d9591 4683 `(("libxcb" ,libxcb)))
6fa14469 4684 (propagated-inputs
482d9591
HG
4685 `(("python-cffi" ,python-cffi) ; used at run time
4686 ("python-six" ,python-six)))
6fa14469 4687 (arguments
e2816ac7
MB
4688 `(;; FIXME: Tests cannot load libxcb.so.1
4689 #:tests? #f
4690 #:phases
c8cd850c
MB
4691 (modify-phases %standard-phases
4692 (add-after 'install 'install-doc
4693 (lambda* (#:key outputs #:allow-other-keys)
4694 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4695 "/doc/" ,name "-" ,version)))
4696 (mkdir-p doc)
4697 (copy-file "README.md"
4698 (string-append doc "/README.md"))
4699 #t))))))
6fa14469
FB
4700 (home-page "https://github.com/tych0/xcffib")
4701 (synopsis "XCB Python bindings")
4702 (description
4703 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4704support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4705 (license license:expat)))
6fa14469
FB
4706
4707(define-public python2-xcffib
4708 (package-with-python2 python-xcffib))
4709
9e099723
FB
4710(define-public python-cairocffi
4711 (package
4712 (name "python-cairocffi")
4713 (version "0.6")
4714 (source
4715 (origin
4716 (method url-fetch)
4717 ;; The archive on pypi is missing the 'utils' directory!
4718 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4719 version ".tar.gz"))
f586c877 4720 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4721 (sha256
4722 (base32
4723 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4724 (build-system python-build-system)
4725 (outputs '("out" "doc"))
4726 (inputs
4727 `(("gdk-pixbuf" ,gdk-pixbuf)
4728 ("cairo" ,cairo)))
4729 (native-inputs
4730 `(("pkg-config" ,pkg-config)
4731 ("python-sphinx" ,python-sphinx)
f3b98f4f 4732 ("python-docutils" ,python-docutils)))
9e099723
FB
4733 (propagated-inputs
4734 `(("python-xcffib" ,python-xcffib))) ; used at run time
4735 (arguments
a792e1aa
MB
4736 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4737 #:tests? #f
4738 #:phases
6734c7ba
MB
4739 (modify-phases %standard-phases
4740 (add-after 'install 'install-doc
4741 (lambda* (#:key inputs outputs #:allow-other-keys)
4742 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4743 (doc (string-append data "/doc/" ,name "-" ,version))
4744 (html (string-append doc "/html")))
4745 (setenv "LD_LIBRARY_PATH"
4746 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4747 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4748 (setenv "LANG" "en_US.UTF-8")
4749 (mkdir-p html)
4750 (for-each (lambda (file)
4751 (copy-file (string-append "." file)
4752 (string-append doc file)))
4753 '("/README.rst" "/CHANGES" "/LICENSE"))
4754 (system* "python" "setup.py" "build_sphinx")
4755 (copy-recursively "docs/_build/html" html)
4756 #t))))))
9e099723
FB
4757 (home-page "https://github.com/SimonSapin/cairocffi")
4758 (synopsis "Python bindings and object-oriented API for Cairo")
4759 (description
4760 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4761Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4762graphics library with support for multiple backends including image buffers,
4763PNG, PostScript, PDF, and SVG file output.")
3f641af0 4764 (license license:bsd-3)))
9e099723
FB
4765
4766(define-public python2-cairocffi
4767 (package-with-python2 python-cairocffi))
4768
3cff95cb
RW
4769(define-public python-decorator
4770 (package
4771 (name "python-decorator")
d79fa7da 4772 (version "4.0.10")
3cff95cb
RW
4773 (source
4774 (origin
4775 (method url-fetch)
e21338be 4776 (uri (pypi-uri "decorator" version))
3cff95cb 4777 (sha256
d79fa7da 4778 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4779 (build-system python-build-system)
4780 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4781 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4782 (synopsis "Python module to simplify usage of decorators")
4783 (description
4784 "The aim of the decorator module is to simplify the usage of decorators
4785for the average programmer, and to popularize decorators usage giving examples
4786of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4787etc. The core of this module is a decorator factory.")
4788 (license license:expat)))
4789
4790(define-public python2-decorator
4791 (package-with-python2 python-decorator))
4792
2c0499ad
RW
4793(define-public python-drmaa
4794 (package
4795 (name "python-drmaa")
4796 (version "0.7.6")
4797 (source
4798 (origin
4799 (method url-fetch)
4800 (uri (string-append
4801 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4802 version ".tar.gz"))
4803 (sha256
4804 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4805 (build-system python-build-system)
4806 ;; The test suite requires libdrmaa which is provided by the cluster
4807 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4808 ;; should be set to the path of the libdrmaa library.
4809 (arguments '(#:tests? #f))
4810 (native-inputs
f3b98f4f 4811 `(("python-nose" ,python-nose)))
2c0499ad
RW
4812 (home-page "https://pypi.python.org/pypi/drmaa")
4813 (synopsis "Python bindings for the DRMAA library")
4814 (description
4815 "A Python package for Distributed Resource Management (DRM) job
4816submission and control. This package is an implementation of the DRMAA 1.0
4817Python language binding specification.")
3f641af0 4818 (license license:bsd-3)))
2c0499ad
RW
4819
4820(define-public python2-drmaa
4821 (package-with-python2 python-drmaa))
4822
d05c6da0
RW
4823(define-public python-gridmap
4824 (package
4825 (name "python-gridmap")
4826 (version "0.13.0")
4827 (source
4828 (origin
4829 (method url-fetch)
4830 (uri (string-append
4831 "https://github.com/pygridtools/gridmap/archive/v"
4832 version ".tar.gz"))
4833 (file-name (string-append name "-" version ".tar.gz"))
4834 (sha256
4835 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4836 (build-system python-build-system)
ad348f9f
MB
4837 (arguments
4838 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4839 (propagated-inputs
d05c6da0
RW
4840 `(("python-psutil" ,python-psutil)
4841 ("python-drmaa" ,python-drmaa)
4842 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4843 (home-page "https://github.com/pygridtools/gridmap")
4844 (synopsis "Create jobs on a cluster directly from Python")
4845 (description
4846 "Gridmap is a Python package to allow you to easily create jobs on the
4847cluster directly from Python. You can directly map Python functions onto the
4848cluster without needing to write any wrapper code yourself.")
3f641af0 4849 (license license:gpl3+)))
d05c6da0
RW
4850
4851(define-public python2-gridmap
4852 (package-with-python2 python-gridmap))
4853
cb6d5c54
RW
4854(define-public python-pexpect
4855 (package
4856 (name "python-pexpect")
ed118043 4857 (version "4.2.1")
cb6d5c54
RW
4858 (source
4859 (origin
4860 (method url-fetch)
ed118043 4861 (uri (pypi-uri "pexpect" version))
cb6d5c54 4862 (sha256
ed118043 4863 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4864 (build-system python-build-system)
4865 (arguments
4866 `(#:phases
4867 (modify-phases %standard-phases
ed118043
MB
4868 (add-before 'check 'prepare-tests
4869 (lambda _
4870 (substitute* (find-files "tests")
4871 (("/bin/ls") (which "ls"))
4872 (("/bin/echo") (which "echo"))
4873 (("/bin/which") (which "which"))
4874 ;; Many tests try to use the /bin directory which
4875 ;; is not present in the build environment.
4876 ;; Use one that's non-empty and unlikely to change.
4877 (("/bin'") "/dev'"))
4878 ;; XXX: Socket connection test gets "Connection reset by peer".
4879 ;; Why does it not work? Delete for now.
4880 (delete-file "tests/test_socket.py")
4881 #t))
cb6d5c54
RW
4882 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4883 (native-inputs
ed118043
MB
4884 `(("python-nose" ,python-nose)
4885 ("python-pytest" ,python-pytest)
4886 ("man-db" ,man-db)
4887 ("which" ,which)))
4888 (propagated-inputs
4889 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4890 (home-page "http://pexpect.readthedocs.org/")
4891 (synopsis "Controlling interactive console applications")
4892 (description
4893 "Pexpect is a pure Python module for spawning child applications;
4894controlling them; and responding to expected patterns in their output.
4895Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4896child application and control it as if a human were typing commands.")
3f641af0 4897 (license license:isc)))
cb6d5c54
RW
4898
4899(define-public python2-pexpect
4900 (package-with-python2 python-pexpect))
4901
229ad120
RW
4902(define-public python-setuptools-scm
4903 (package
4904 (name "python-setuptools-scm")
5b1f31ff 4905 (version "1.15.0")
229ad120
RW
4906 (source (origin
4907 (method url-fetch)
383af6b0 4908 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4909 (sha256
4910 (base32
5b1f31ff 4911 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
4912 (build-system python-build-system)
4913 (home-page "https://github.com/pypa/setuptools_scm/")
4914 (synopsis "Manage Python package versions in SCM metadata")
4915 (description
383af6b0 4916 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4917@dfn{software configuration management} (SCM) metadata instead of declaring
4918them as the version argument or in a SCM managed file.")
4919 (license license:expat)))
4920
4921(define-public python2-setuptools-scm
4922 (package-with-python2 python-setuptools-scm))
4923
b74270ee
RW
4924(define-public python-pathpy
4925 (package
4926 (name "python-pathpy")
4927 (version "8.1.1")
4928 (source
4929 (origin
4930 (method url-fetch)
4931 (uri (string-append "https://pypi.python.org/packages/source/p/"
4932 "path.py/path.py-" version ".tar.gz"))
4933 (sha256
4934 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4935 (outputs '("out" "doc"))
b74270ee
RW
4936 (build-system python-build-system)
4937 (propagated-inputs
4938 `(("python-appdirs" ,python-appdirs)))
4939 (native-inputs
f3b98f4f 4940 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4941 ("python-sphinx" ,python-sphinx)
4942 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4943 ("python-pytest" ,python-pytest)
4944 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4945 (arguments
4946 `(#:phases
4947 (modify-phases %standard-phases
4948 (add-after 'build 'build-doc
4949 (lambda _
4950 (setenv "LANG" "en_US.UTF-8")
4951 (zero? (system* "python" "setup.py" "build_sphinx"))))
4952 (add-after 'install 'install-doc
4953 (lambda* (#:key outputs #:allow-other-keys)
4954 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4955 (doc (string-append data "/doc/" ,name "-" ,version))
4956 (html (string-append doc "/html")))
4957 (mkdir-p html)
4958 (for-each (lambda (file)
4959 (copy-file file (string-append doc "/" file)))
4960 '("README.rst" "CHANGES.rst"))
4961 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4962 (home-page "http://github.com/jaraco/path.py")
4963 (synopsis "Python module wrapper for built-in os.path")
4964 (description
4965 "@code{path.py} implements path objects as first-class entities, allowing
4966common operations on files to be invoked on those path objects directly.")
4967 (license license:expat)))
4968
4969(define-public python2-pathpy
4970 (package-with-python2 python-pathpy))
4971
0d34e01b
RW
4972(define-public python-pickleshare
4973 (package
4974 (name "python-pickleshare")
4975 (version "0.5")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (string-append "https://pypi.python.org/packages/source/p/"
4980 "pickleshare/pickleshare-" version ".tar.gz"))
4981 (sha256
4982 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4983 (build-system python-build-system)
4984 (propagated-inputs
4985 `(("python-pathpy" ,python-pathpy)))
4986 (home-page "https://github.com/vivainio/pickleshare")
4987 (synopsis "Tiny key value database with concurrency support")
4988 (description
4989 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4990Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4991shelve, many processes can access the database simultaneously. Changing a
4992value in database is immediately visible to other processes accessing the same
4993database. Concurrency is possible because the values are stored in separate
4994files. Hence the “database” is a directory where all files are governed by
4995PickleShare.")
4996 (license license:expat)))
4997
4998(define-public python2-pickleshare
4999 (package-with-python2 python-pickleshare))
5000
cd6e5189
RW
5001(define-public python-simplegeneric
5002 (package
5003 (name "python-simplegeneric")
5004 (version "0.8.1")
5005 (source
5006 (origin
5007 (method url-fetch)
5008 (uri (string-append "https://pypi.python.org/packages/source/s/"
5009 "simplegeneric/simplegeneric-" version ".zip"))
5010 (sha256
5011 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5012 (build-system python-build-system)
5013 (native-inputs
f3b98f4f 5014 `(("unzip" ,unzip)))
cd6e5189
RW
5015 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5016 (synopsis "Python module for simple generic functions")
5017 (description
5018 "The simplegeneric module lets you define simple single-dispatch generic
5019functions, akin to Python’s built-in generic functions like @code{len()},
5020@code{iter()} and so on. However, instead of using specially-named methods,
5021these generic functions use simple lookup tables, akin to those used by
5022e.g. @code{pickle.dump()} and other generic functions found in the Python
5023standard library.")
3f641af0 5024 (license license:zpl2.1)))
cd6e5189
RW
5025
5026(define-public python2-simplegeneric
5027 (package-with-python2 python-simplegeneric))
5028
ddc7d8ed 5029(define-public python-ipython-genutils
c4abbac3 5030 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5031 (package
5032 (name "python-ipython-genutils")
5033 (version "0.1.0")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (string-append "https://pypi.python.org/packages/source/i/"
5038 "ipython_genutils/ipython_genutils-"
5039 version ".tar.gz"))
5040 (sha256
5041 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5042 (build-system python-build-system)
5043 (arguments `(#:tests? #f)) ; no tests
5044 (home-page "http://ipython.org")
5045 (synopsis "Vestigial utilities from IPython")
5046 (description
c4abbac3
HG
5047 "This package provides retired utilities from IPython. No packages
5048outside IPython/Jupyter should depend on it.
5049
5050This package shouldn't exist. It contains some common utilities shared by
5051Jupyter and IPython projects during The Big Split. As soon as possible, those
5052packages will remove their dependency on this, and this package will go
5053away.")
3f641af0 5054 (license license:bsd-3)))
ddc7d8ed
RW
5055
5056(define-public python2-ipython-genutils
5057 (package-with-python2 python-ipython-genutils))
5058
2b10eb48
RW
5059(define-public python-traitlets
5060 (package
5061 (name "python-traitlets")
a5ba1481 5062 (version "4.2.0")
2b10eb48
RW
5063 (source
5064 (origin
5065 (method url-fetch)
cc0c4fde 5066 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5067 (sha256
5068 (base32
a5ba1481 5069 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5070 (build-system python-build-system)
5071 (arguments
5072 `(#:phases
5073 (modify-phases %standard-phases
5074 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5075 (propagated-inputs
5076 `(("python-ipython-genutils" ,python-ipython-genutils)
5077 ("python-decorator" ,python-decorator)))
5078 (native-inputs
cc0c4fde
EF
5079 `(("python-mock" ,python-mock)
5080 ("python-nose" ,python-nose)))
2b10eb48
RW
5081 (home-page "http://ipython.org")
5082 (synopsis "Configuration system for Python applications")
5083 (description
5084 "Traitlets is a framework that lets Python classes have attributes with
5085type checking, dynamically calculated default values, and ‘on change’
5086callbacks. The package also includes a mechanism to use traitlets for
5087configuration, loading values from files or from command line arguments. This
5088is a distinct layer on top of traitlets, so you can use traitlets in your code
5089without using the configuration machinery.")
3f641af0 5090 (license license:bsd-3)))
2b10eb48
RW
5091
5092(define-public python2-traitlets
5093 (package-with-python2 python-traitlets))
5094
4263b06f
RW
5095(define-public python-jupyter-core
5096 (package
5097 (name "python-jupyter-core")
45cc957c 5098 (version "4.2.1")
4263b06f
RW
5099 (source
5100 (origin
5101 (method url-fetch)
5102 (uri (string-append (pypi-uri "jupyter_core" version)))
5103 (sha256
5104 (base32
45cc957c 5105 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5106 (build-system python-build-system)
5107 ;; FIXME: not sure how to run the tests
5108 (arguments `(#:tests? #f))
5109 (propagated-inputs
5110 `(("python-traitlets" ,python-traitlets)))
5111 (home-page "http://jupyter.org/")
5112 (synopsis "Jupyter base package")
5113 (description
5114 "Jupyter core is the base package on which Jupyter projects rely.")
5115 (license license:bsd-3)))
5116
5117(define-public python2-jupyter-core
5118 (package-with-python2 python-jupyter-core))
5119
9ff01f2d
RW
5120(define-public python-jupyter-client
5121 (package
5122 (name "python-jupyter-client")
5123 (version "4.4.0")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (pypi-uri "jupyter_client" version))
5128 (sha256
5129 (base32
5130 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5131 (build-system python-build-system)
5132 ;; Tests fail because of missing native python kernel which I assume is
5133 ;; provided by the ipython package, which we cannot use because it would
5134 ;; cause a dependency cycle.
5135 (arguments `(#:tests? #f))
5136 (propagated-inputs
5137 `(("python-pyzmq" ,python-pyzmq)
5138 ("python-traitlets" ,python-traitlets)
5139 ("python-jupyter-core" ,python-jupyter-core)))
5140 (home-page "http://jupyter.org/")
5141 (synopsis "Jupyter protocol implementation and client libraries")
5142 (description
5143 "The @code{jupyter_client} package contains the reference implementation
5144of the Jupyter protocol. It also provides client and kernel management APIs
5145for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5146installing @code{kernelspec}s for use with Jupyter frontends.")
5147 (license license:bsd-3)))
5148
5149(define-public python2-jupyter-client
5150 (package-with-python2 python-jupyter-client))
5151
ab526102
RW
5152(define-public python-ipykernel
5153 (package
5154 (name "python-ipykernel")
f165648e 5155 (version "4.5.2")
ab526102
RW
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "ipykernel" version))
5160 (sha256
f165648e 5161 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5162 (build-system python-build-system)
5163 ;; The tests load a submodule of IPython. However, IPython itself depends
5164 ;; on ipykernel.
5165 (arguments `(#:tests? #f))
5166 (propagated-inputs
5167 ;; imported at runtime during connect
5168 `(("python-jupyter-client" ,python-jupyter-client)))
5169 (home-page "http://ipython.org")
5170 (synopsis "IPython Kernel for Jupyter")
5171 (description
5172 "This package provides the IPython kernel for Jupyter.")
5173 (license license:bsd-3)))
5174
5175(define-public python2-ipykernel
5176 (package-with-python2 python-ipykernel))
5177
5ff6effc
RW
5178(define-public python-testpath
5179 (package
5180 (name "python-testpath")
5181 (version "0.2")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5186 version ".tar.gz"))
5187 (file-name (string-append name "-" version ".tar.gz"))
5188 (sha256
5189 (base32
5190 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5191 (build-system python-build-system)
5192 (arguments
5193 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5194 #:modules ((guix build python-build-system)
5195 (guix build utils)
5196 (srfi srfi-1))
5197 #:imported-modules (,@%python-build-system-modules
5198 (srfi srfi-1))
5ff6effc
RW
5199 #:phases
5200 (modify-phases %standard-phases
5201 (delete 'install)
5202 (replace 'build
b320f7bf
TD
5203 (lambda* (#:key inputs outputs #:allow-other-keys)
5204 (let* ((version (last
5205 (string-split (assoc-ref inputs "python") #\-)))
5206 (x.y (string-join (take (string-split version #\.) 2)
5207 "."))
5208 (dir (string-append
5209 (assoc-ref outputs "out")
5210 "/lib/python" x.y "/site-packages/testpath")))
5211 (mkdir-p dir)
5212 (copy-recursively "testpath" dir))
5213 #t)))))
5ff6effc
RW
5214 (home-page "https://github.com/takluyver/testpath")
5215 (synopsis "Test utilities for code working with files and commands")
5216 (description
5217 "Testpath is a collection of utilities for Python code working with files
5218and commands. It contains functions to check things on the filesystem, and
5219tools for mocking system commands and recording calls to those.")
5220 (license license:expat)))
5221
5222(define-public python2-testpath
5223 (package-with-python2 python-testpath))
5224
ae1ab9fe
FB
5225(define-public python-ipython
5226 (package
5227 (name "python-ipython")
fb25d348 5228 (version "5.2.2")
ae1ab9fe
FB
5229 (source
5230 (origin
fceac880 5231 (method url-fetch)
accd5f99 5232 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5233 (sha256
fb25d348 5234 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5235 (build-system python-build-system)
5236 (outputs '("out" "doc"))
3a0b1b9a
FB
5237 (propagated-inputs
5238 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5239 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5240 ("python-terminado" ,python-terminado)
ae1ab9fe 5241 ("python-matplotlib" ,python-matplotlib)
5d26e542 5242 ("python-numpy" ,python-numpy)
ae1ab9fe 5243 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5244 ("python-jinja2" ,python-jinja2)
5245 ("python-mistune" ,python-mistune)
accd5f99
RW
5246 ("python-pexpect" ,python-pexpect)
5247 ("python-pickleshare" ,python-pickleshare)
5248 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5249 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5250 ("python-traitlets" ,python-traitlets)
5251 ("python-ipykernel" ,python-ipykernel)
fb25d348 5252 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5253 ("python-pygments" ,python-pygments)))
5254 (inputs
5255 `(("readline" ,readline)
5256 ("which" ,which)))
ae1ab9fe 5257 (native-inputs
fb25d348
TD
5258 `(("graphviz" ,graphviz)
5259 ("pkg-config" ,pkg-config)
accd5f99
RW
5260 ("python-requests" ,python-requests) ;; for tests
5261 ("python-testpath" ,python-testpath)
5262 ("python-nose" ,python-nose)
ae1ab9fe 5263 ("python-sphinx" ,python-sphinx)
fb25d348 5264 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5265 ("texlive" ,texlive)
f3b98f4f 5266 ("texinfo" ,texinfo)))
ae1ab9fe 5267 (arguments
89b5c60e 5268 `(#:phases
3a0b1b9a
FB
5269 (modify-phases %standard-phases
5270 (add-after
5271 'install 'install-doc
5272 (lambda* (#:key inputs outputs #:allow-other-keys)
5273 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5274 (doc (string-append data "/doc/" ,name "-" ,version))
5275 (html (string-append doc "/html"))
5276 (man1 (string-append data "/man/man1"))
5277 (info (string-append data "/info"))
fb25d348
TD
5278 (examples (string-append doc "/examples"))
5279 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5280 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5281 ;; Make installed package available for running the tests
5282 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5283 (with-directory-excursion "docs"
accd5f99
RW
5284 ;; FIXME: pdf fails to build
5285 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5286 (system* "make" python-arg "html")
5287 (system* "make" python-arg "info"))
3a0b1b9a
FB
5288 (copy-recursively "docs/man" man1)
5289 (copy-recursively "examples" examples)
accd5f99 5290 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5291 ;; (copy-file "docs/build/latex/ipython.pdf"
5292 ;; (string-append doc "/ipython.pdf"))
5293 (mkdir-p info)
5294 (copy-file "docs/build/texinfo/ipython.info"
5295 (string-append info "/ipython.info"))
5296 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5297 ;; Tests can only be run after the library has been installed and not
5298 ;; within the source directory.
5299 (delete 'check)
5300 (add-after
5301 'install 'check
eee5cd04 5302 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5303 (if tests?
5304 (with-directory-excursion "/tmp"
eee5cd04
HG
5305 ;; Make installed package available for running the tests
5306 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5307 (setenv "HOME" "/tmp/") ;; required by a test
5308 (zero? (system* (string-append (assoc-ref outputs "out")
5309 "/bin/iptest"))))
5310 #t)))
5311 (add-before
5312 'install 'fix-tests
5313 (lambda* (#:key inputs #:allow-other-keys)
5314 (substitute* "./IPython/utils/_process_posix.py"
5315 (("/usr/bin/env', 'which") (which "which")))
5316 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5317 (("#!/usr/bin/env python")
5318 (string-append "#!" (which "python"))))
5319 ;; Disable 1 failing test
5320 (substitute* "./IPython/core/tests/test_magic.py"
5321 (("def test_dirops\\(\\):" all)
5322 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5323 (home-page "http://ipython.org")
5324 (synopsis "IPython is a tool for interactive computing in Python")
5325 (description
5326 "IPython provides a rich architecture for interactive computing with:
5327Powerful interactive shells, a browser-based notebook, support for interactive
5328data visualization, embeddable interpreters and tools for parallel
5329computing.")
135ba811
EF
5330 (license license:bsd-3)
5331 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5332
5333(define-public python2-ipython
135ba811 5334 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5335 (package
5336 (inherit ipython)
3a0b1b9a 5337 ;; FIXME: add pyreadline once available.
fb25d348
TD
5338 (propagated-inputs
5339 `(("python2-backports-shutil-get-terminal-size"
5340 ,python2-backports-shutil-get-terminal-size)
5341 ("python2-pathlib2" ,python2-pathlib2)
5342 ,@(package-propagated-inputs ipython)))
e62600fe 5343 (native-inputs
135ba811 5344 `(("python2-mock" ,python2-mock)
77a6932a 5345 ,@(package-native-inputs ipython))))))
03411993
AE
5346
5347(define-public python-isodate
5348 (package
5349 (name "python-isodate")
b6785c2e 5350 (version "0.5.4")
03411993
AE
5351 (source
5352 (origin
5353 (method url-fetch)
b6785c2e 5354 (uri (pypi-uri "isodate" version))
03411993
AE
5355 (sha256
5356 (base32
b6785c2e 5357 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5358 (build-system python-build-system)
03411993
AE
5359 (home-page
5360 "http://cheeseshop.python.org/pypi/isodate")
5361 (synopsis
5362 "Python date parser and formatter")
5363 (description
5364 "Python-isodate is a python module for parsing and formatting
5365ISO 8601 dates, time and duration.")
3f641af0 5366 (license license:bsd-3)))
03411993
AE
5367
5368(define-public python2-isodate
5369 (package-with-python2 python-isodate))
673ab897
AE
5370
5371(define-public python-html5lib
5372 (package
5373 (name "python-html5lib")
a14061aa 5374 (version "1.0b10")
673ab897
AE
5375 (source
5376 (origin
5377 (method url-fetch)
fee04c19 5378 (uri (pypi-uri "html5lib" version))
673ab897
AE
5379 (sha256
5380 (base32
a14061aa 5381 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5382 (build-system python-build-system)
3dd75476 5383 (propagated-inputs
4eb6ed28
MB
5384 `(("python-six" ,python-six)
5385 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5386 (arguments
5387 `(#:test-target "check"))
5388 (home-page
5389 "https://github.com/html5lib/html5lib-python")
5390 (synopsis
5391 "Python HTML parser based on the WHATWG HTML specifcation")
5392 (description
5393 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5394and written in Python.")
bd3fa666 5395 (license license:expat)))
673ab897
AE
5396
5397(define-public python2-html5lib
5398 (package-with-python2 python-html5lib))
e99f4211 5399
8ee62c97
RW
5400;; Needed for python-bleach, a dependency of python-notebook
5401(define-public python-html5lib-0.9
5402 (package
5403 (inherit python-html5lib)
5404 (version "0.999")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (pypi-uri "html5lib" version))
5409 (sha256
5410 (base32
5411 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5412
5413(define-public python2-html5lib-0.9
5414 (package-with-python2 python-html5lib-0.9))
5415
adbca19e
MB
5416(define-public python-webencodings
5417 (package
5418 (name "python-webencodings")
5419 (version "0.5")
5420 (source (origin
5421 (method url-fetch)
5422 (uri (pypi-uri "webencodings" version))
5423 (sha256
5424 (base32
5425 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5426 (build-system python-build-system)
5427 (arguments
5428 '(#:phases
5429 (modify-phases %standard-phases
5430 (replace 'check
5431 (lambda _
5432 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5433 (native-inputs
5434 `(("python-pytest" ,python-pytest)))
5435 (home-page "https://github.com/SimonSapin/python-webencodings")
5436 (synopsis "Character encoding aliases for legacy web content")
5437 (description
5438 "In order to be compatible with legacy web content when interpreting
5439something like @code{Content-Type: text/html; charset=latin1}, tools need
5440to use a particular set of aliases for encoding labels as well as some
5441overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5442the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5443or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5444The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5445defines all such details so that implementations do not have to
5446reverse-engineer each other.
5447
5448This module implements the Encoding standard and has encoding labels and
5449BOM detection, but the actual implementation for encoders and decoders
5450is Python’s.")
5451 (license license:bsd-3)))
5452
5453(define-public python2-webencodings
5454 (package-with-python2 python-webencodings))
5455
e99f4211
MW
5456(define-public python-urwid
5457 (package
5458 (name "python-urwid")
51ff41f6 5459 (version "1.3.1")
e99f4211
MW
5460 (source
5461 (origin
5462 (method url-fetch)
b97c1bfd 5463 (uri (pypi-uri "urwid" version))
e99f4211
MW
5464 (sha256
5465 (base32
51ff41f6 5466 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5467 (build-system python-build-system)
b97c1bfd
LF
5468 (arguments
5469 `(#:phases
5470 (modify-phases %standard-phases
5471 ;; Disable failing test. Bug filed upstream:
5472 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5473 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5474 (add-after 'unpack 'disable-failing-test
5475 (lambda _
5476 (substitute* "urwid/tests/test_event_loops.py"
5477 (("test_remove_watch_file")
5478 "disable_remove_watch_file")))))))
e99f4211
MW
5479 (home-page "http://urwid.org")
5480 (synopsis "Console user interface library for Python")
5481 (description
5482 "Urwid is a curses-based UI/widget library for Python. It includes many
5483features useful for text console applications.")
3f641af0 5484 (license license:lgpl2.1+)))
e99f4211
MW
5485
5486(define-public python2-urwid
5487 (package-with-python2 python-urwid))
d95a56c6 5488
5220022a
JL
5489(define-public python-openid
5490 (package
5491 (name "python-openid")
5492 (version "3.0.10")
5493 (source
5494 (origin
5495 (method url-fetch)
5496 (uri (pypi-uri "python3-openid" version))
5497 (sha256
5498 (base32
5499 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5500 (build-system python-build-system)
5501 (home-page "https://github.com/necaris/python3-openid")
5502 (synopsis "OpenID support for servers and consumers")
5503 (description "This library provides OpenID authentication for Python, both
5504for clients and servers.")
5505 (license license:asl2.0)))
5506
3ef00f56 5507(define-public python2-openid
5508 (package
5509 (name "python2-openid")
5510 (version "2.2.5")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "python-openid" version))
5515 (sha256
5516 (base32
5517 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5518 (build-system python-build-system)
5519 (arguments
5520 ;; Python 3 support is in `python3-openid`, a separate package.
5521 `(#:python ,python-2))
5522 (home-page "https://github.com/openid/python-openid")
5523 (synopsis "OpenID support for servers and consumers")
5524 (description "This library provides OpenID authentication for Python, both
5525for clients and servers.")
5526 (license license:asl2.0)))
5527
47d0b292
TS
5528(define-public python-urwidtrees
5529 (package
5530 (name "python-urwidtrees")
37ec4623 5531 (version "1.0.2")
47d0b292
TS
5532 (source
5533 (origin
5534 (method url-fetch)
37ec4623
TS
5535 ;; package author intends on distributing via github rather than pypi:
5536 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5537 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5538 version ".tar.gz"))
5539 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5540 (sha256
5541 (base32
37ec4623 5542 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5543 (build-system python-build-system)
5544 (arguments
5545 '(#:tests? #f)) ; no tests
f22efa01 5546 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5547 (home-page "https://github.com/pazz/urwidtrees")
5548 (synopsis "Tree widgets for urwid")
5549 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5550toolkit. Use it to build trees of widgets.")
3f641af0 5551 (license license:gpl3+)))
47d0b292
TS
5552
5553(define-public python2-urwidtrees
5554 (package-with-python2 python-urwidtrees))
5555
d95a56c6
PAR
5556(define-public python-dbus
5557 (package
5558 (name "python-dbus")
5559 (version "1.2.0")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (string-append
5cc3096c 5564 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5565 version ".tar.gz"))
5566 (sha256
5567 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5568 (build-system gnu-build-system)
6717c879
SB
5569 (arguments
5570 '(#:phases
5571 (modify-phases %standard-phases
5572 (add-before
5573 'check 'pre-check
5574 (lambda _
5575 ;; XXX: For the missing '/etc/machine-id'.
5576 (substitute* "test/run-test.sh"
5577 (("DBUS_FATAL_WARNINGS=1")
5578 "DBUS_FATAL_WARNINGS=0"))
5579 #t)))))
d95a56c6
PAR
5580 (native-inputs
5581 `(("pkg-config" ,pkg-config)))
5582 (inputs
5583 `(("python" ,python)
2e88d113 5584 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5585 (synopsis "Python bindings for D-bus")
5586 (description "python-dbus provides bindings for libdbus, the reference
5587implementation of D-Bus.")
5588 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5589 (license license:expat)))
b52af02b
MW
5590
5591(define-public python2-dbus
5592 (package (inherit python-dbus)
5593 (name "python2-dbus")
5594 (inputs `(("python" ,python-2)
5595 ,@(alist-delete "python"
5596 (package-inputs python-dbus)
5597 equal?)))
5598 ;; FIXME: on Python 2, the test_utf8 fails with:
5599 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5600 (arguments `(#:tests? #f))))
a6ac8332
AE
5601
5602(define-public python-apsw
5603 (package
5604 (name "python-apsw")
917708c2 5605 (version "3.9.2-r1")
a6ac8332
AE
5606 (source
5607 (origin
5608 (method url-fetch)
917708c2 5609 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5610 (sha256
5611 (base32
917708c2 5612 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5613 (build-system python-build-system)
5614 (inputs
f3b98f4f 5615 `(("sqlite" ,sqlite)))
a6ac8332
AE
5616 (arguments
5617 `(#:phases
154d207c
MB
5618 (modify-phases %standard-phases
5619 (delete 'check)
5620 (add-after 'install 'check
5621 (lambda* (#:key inputs outputs #:allow-other-keys)
5622 (add-installed-pythonpath inputs outputs)
5623 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5624 (home-page "https://github.com/rogerbinns/apsw/")
5625 (synopsis "Another Python SQLite Wrapper")
5626 (description "APSW is a Python wrapper for the SQLite
5627embedded relational database engine. In contrast to other wrappers such as
5628pysqlite it focuses on being a minimal layer over SQLite attempting just to
5629translate the complete SQLite API into Python.")
abde5f37 5630 (license license:zlib)))
a6ac8332
AE
5631
5632(define-public python2-apsw
5633 (package-with-python2 python-apsw))
26b307e2
AE
5634
5635(define-public python-lxml
5636 (package
5637 (name "python-lxml")
d58a3203 5638 (version "3.6.0")
26b307e2
AE
5639 (source
5640 (origin
5641 (method url-fetch)
97bbc480 5642 (uri (pypi-uri "lxml" version))
26b307e2 5643 (sha256
d58a3203
EF
5644 (base32
5645 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5646 (build-system python-build-system)
5647 (inputs
5648 `(("libxml2" ,libxml2)
f3b98f4f 5649 ("libxslt" ,libxslt)))
26b307e2
AE
5650 (home-page "http://lxml.de/")
5651 (synopsis
5652 "Python XML processing library")
5653 (description
5654 "The lxml XML toolkit is a Pythonic binding for the C libraries
5655libxml2 and libxslt.")
3f641af0 5656 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5657
5658(define-public python2-lxml
5659 (package-with-python2 python-lxml))
4ed20663 5660
b32a1e47
CAW
5661;; beautifulsoup4 has a totally different namespace than 3.x,
5662;; and pypi seems to put it under its own name, so I guess we should too
5663(define-public python-beautifulsoup4
5664 (package
5665 (name "python-beautifulsoup4")
67fd4a12 5666 (version "4.5.1")
b32a1e47
CAW
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (pypi-uri "beautifulsoup4" version))
5671 (sha256
5672 (base32
67fd4a12 5673 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5674 (build-system python-build-system)
5f37f0b6
LF
5675 (arguments
5676 `(#:phases
5677 (modify-phases %standard-phases
5678 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5679 ;; must use this conversion script when building with Python 3. The
5680 ;; conversion script also runs the tests.
5681 ;; For more information, see the file 'convert-py3k' in the source
5682 ;; distribution.
5683 (replace 'check
5684 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5685 (home-page
5686 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5687 (synopsis
5688 "Python screen-scraping library")
5689 (description
5690 "Beautiful Soup is a Python library designed for rapidly setting up
5691screen-scraping projects. It offers Pythonic idioms for navigating,
5692searching, and modifying a parse tree, providing a toolkit for
5693dissecting a document and extracting what you need. It automatically
5694converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5695 (license license:expat)
5696 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5697
5698(define-public python2-beautifulsoup4
5699 (package
5700 (inherit (package-with-python2
5701 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5702 (arguments `(#:python ,python-2))))
b32a1e47 5703
4dcb135e 5704(define-public python-cssutils
092e86f5 5705 (package
4dcb135e 5706 (name "python-cssutils")
58d1d816 5707 (version "1.0.1")
092e86f5
AE
5708 (source
5709 (origin
5710 (method url-fetch)
58d1d816 5711 (uri (pypi-uri "cssutils" version))
092e86f5 5712 (sha256
58d1d816
EF
5713 (base32
5714 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5715 (build-system python-build-system)
5716 (native-inputs
4dcb135e 5717 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5718 (arguments
4dcb135e 5719 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5720 (home-page "http://cthedot.de/cssutils/")
5721 (synopsis
5722 "CSS Cascading Style Sheets library for Python")
5723 (description
5724 "Cssutils is a Python package for parsing and building CSS
5725Cascading Style Sheets. Currently it provides a DOM only and no rendering
5726options.")
3f641af0 5727 (license license:lgpl3+)))
880ff77c 5728
4dcb135e
EB
5729(define-public python2-cssutils
5730 (package-with-python2 python-cssutils))
5731
880ff77c
AE
5732(define-public python-cssselect
5733 (package
5734 (name "python-cssselect")
d5ccd9ab 5735 (version "0.9.2")
880ff77c
AE
5736 (source
5737 (origin
5738 (method url-fetch)
d5ccd9ab 5739 (uri (pypi-uri "cssselect" version))
880ff77c 5740 (sha256
d5ccd9ab
EF
5741 (base32
5742 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5743 (build-system python-build-system)
880ff77c
AE
5744 (arguments
5745 ;; tests fail with message
5746 ;; AttributeError: 'module' object has no attribute 'tests'
5747 `(#:tests? #f))
5748 (home-page
5749 "https://pythonhosted.org/cssselect/")
5750 (synopsis
5751 "CSS3 selector parser and translator to XPath 1.0")
5752 (description
5753 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5754them to XPath 1.0 expressions. Such expressions can be used in lxml or
5755another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5756 (license license:bsd-3)))
880ff77c
AE
5757
5758(define-public python2-cssselect
5759 (package-with-python2 python-cssselect))
60357f99 5760
03702173 5761(define-public python-openid-cla
5762 (package
5763 (name "python-openid-cla")
5764 (version "1.2")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "python-openid-cla" version))
5769 (sha256
5770 (base32
5771 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5772 (build-system python-build-system)
019ccdb6 5773 (arguments '(#:tests? #f)) ; No tests.
03702173 5774 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5775 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5776 (description "@code{openid-cla} is an implementation of the OpenID
5777contributor license agreement extension for python-openid.")
5778 (license license:bsd-3)))
5779
5780(define-public python2-openid-cla
5781 (package-with-python2 python-openid-cla))
5782
a0e41de4 5783(define-public python-openid-teams
5784 (package
5785 (name "python-openid-teams")
5786 (version "1.1")
5787 (source
5788 (origin
5789 (method url-fetch)
5790 (uri (pypi-uri "python-openid-teams" version))
5791 (sha256
5792 (base32
5793 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5794 (build-system python-build-system)
ac72d3d2 5795 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5796 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5797 (synopsis "Implementation of the OpenID teams extension for python-openid")
5798 (description
5799 "@code{openid-teams} is an implementation of the OpenID
5800teams extension for python-openid.")
5801 (license license:bsd-3)))
5802
5803(define-public python2-openid-teams
5804 (package-with-python2 python-openid-teams))
5805
60357f99
AE
5806(define-public python-netifaces
5807 (package
5808 (name "python-netifaces")
5809 (version "0.10.4")
5810 (source
5811 (origin
5812 (method url-fetch)
5813 (uri (string-append
5814 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5815 version
5816 ".tar.gz"))
5817 (sha256
5818 (base32
5819 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5820 (build-system python-build-system)
60357f99
AE
5821 (home-page
5822 "https://bitbucket.org/al45tair/netifaces")
5823 (synopsis
5824 "Python module for portable network interface information")
5825 (description
5826 "Netifaces is a Python module providing information on network
5827interfaces in an easy and portable manner.")
5828 (license license:expat)))
5829
5830(define-public python2-netifaces
5831 (package-with-python2 python-netifaces))
92cb152b 5832
32f77c04
RW
5833(define-public python-networkx
5834 (package
5835 (name "python-networkx")
a4d9609c 5836 (version "1.11")
32f77c04
RW
5837 (source
5838 (origin
5839 (method url-fetch)
a4d9609c 5840 (uri (pypi-uri "networkx" version))
32f77c04 5841 (sha256
a4d9609c 5842 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5843 (build-system python-build-system)
5844 ;; python-decorator is needed at runtime
5845 (propagated-inputs
5846 `(("python-decorator" ,python-decorator)))
5847 (native-inputs
f3b98f4f 5848 `(("python-nose" ,python-nose)))
32f77c04
RW
5849 (home-page "http://networkx.github.io/")
5850 (synopsis "Python module for creating and manipulating graphs and networks")
5851 (description
5852 "NetworkX is a Python package for the creation, manipulation, and study
5853of the structure, dynamics, and functions of complex networks.")
3f641af0 5854 (license license:bsd-3)))
32f77c04
RW
5855
5856(define-public python2-networkx
5857 (package-with-python2 python-networkx))
5858
92cb152b
RW
5859(define-public snakemake
5860 (package
5861 (name "snakemake")
7b93d866 5862 (version "3.9.0")
92cb152b
RW
5863 (source
5864 (origin
5865 (method url-fetch)
7b93d866 5866 (uri (pypi-uri "snakemake" version))
92cb152b 5867 (sha256
7b93d866 5868 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5869 (build-system python-build-system)
7b93d866
MB
5870 (arguments
5871 ;; TODO: Package missing test dependencies.
5872 '(#:tests? #f))
5873 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5874 (synopsis "Python-based execution environment for make-like workflows")
5875 (description
5876 "Snakemake aims to reduce the complexity of creating workflows by
5877providing a clean and modern domain specific specification language (DSL) in
5878Python style, together with a fast and comfortable execution environment.")
5879 (license license:expat)))
a1920bc9 5880
35de1fbd
RW
5881(define-public python-seaborn
5882 (package
5883 (name "python-seaborn")
ccc18762 5884 (version "0.7.1")
35de1fbd
RW
5885 (source
5886 (origin
5887 (method url-fetch)
fc899d4f 5888 (uri (pypi-uri "seaborn" version))
35de1fbd 5889 (sha256
ccc18762 5890 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5891 (build-system python-build-system)
6f976df6
MB
5892 (arguments
5893 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5894 (propagated-inputs
5895 `(("python-pandas" ,python-pandas)
5896 ("python-matplotlib" ,python-matplotlib)
5897 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5898 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5899 (synopsis "Statistical data visualization")
5900 (description
5901 "Seaborn is a library for making attractive and informative statistical
5902graphics in Python. It is built on top of matplotlib and tightly integrated
5903with the PyData stack, including support for numpy and pandas data structures
5904and statistical routines from scipy and statsmodels.")
3f641af0 5905 (license license:bsd-3)
fc899d4f 5906 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5907
5908(define-public python2-seaborn
fc899d4f
EF
5909 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5910 (package
5911 (inherit base)
5912 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5913 ,@(package-propagated-inputs base))))))
35de1fbd 5914
58a35665
MB
5915(define-public python-mpmath
5916 (package
5917 (name "python-mpmath")
5918 (version "0.19")
5919 (source (origin
5920 (method url-fetch)
5921 (uri (string-append "http://mpmath.org/files/mpmath-"
5922 version ".tar.gz"))
5923 (sha256
5924 (base32
5925 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5926 (build-system python-build-system)
5927 (arguments
5928 '(#:phases
5929 (modify-phases %standard-phases
5930 (replace 'check
5931 (lambda _
5932 (zero?
5933 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5934 (home-page "http://mpmath.org")
5935 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5936 (description
5937 "@code{mpmath} can be used as an arbitrary-precision substitute for
5938Python's float/complex types and math/cmath modules, but also does much
5939more advanced mathematics.")
5940 (license license:bsd-3)))
5941
5942(define-public python2-mpmath
5943 (package-with-python2 python-mpmath))
5944
90fc547f
RW
5945(define-public python-sympy
5946 (package
5947 (name "python-sympy")
52f622ef 5948 (version "1.0")
90fc547f
RW
5949 (source
5950 (origin
5951 (method url-fetch)
5952 (uri (string-append
5953 "https://github.com/sympy/sympy/releases/download/sympy-"
5954 version "/sympy-" version ".tar.gz"))
5955 (sha256
52f622ef 5956 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5957 (build-system python-build-system)
52f622ef
MB
5958 (propagated-inputs
5959 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5960 (home-page "http://www.sympy.org/")
5961 (synopsis "Python library for symbolic mathematics")
5962 (description
5963 "SymPy is a Python library for symbolic mathematics. It aims to become a
5964full-featured computer algebra system (CAS) while keeping the code as simple
5965as possible in order to be comprehensible and easily extensible.")
3f641af0 5966 (license license:bsd-3)))
90fc547f
RW
5967
5968(define-public python2-sympy
5969 (package-with-python2 python-sympy))
5970
e8c9b010
SR
5971(define-public python-q
5972 (package
5973 (name "python-q")
5974 (version "2.6")
5975 (source
5976 (origin
5977 (method url-fetch)
5978 (uri (pypi-uri "q" version))
5979 (sha256
5980 (base32
5981 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5982 (build-system python-build-system)
5983 (home-page "https://github.com/zestyping/q")
5984 (synopsis "Quick-and-dirty debugging output for tired programmers")
5985 (description
5986 "q is a Python module for \"print\" style of debugging Python code. It
5987provides convenient short API for print out of values, tracebacks, and
5988falling into the Python interpreter.")
f210e944 5989 (license license:asl2.0)))
e8c9b010
SR
5990
5991(define-public python2-q
f210e944 5992 (package-with-python2 python-q))
e8c9b010 5993
a1920bc9
FB
5994(define-public python-testlib
5995 (package
5996 (name "python-testlib")
5997 (version "0.6.5")
5998 (source
5999 (origin
6000 (method url-fetch)
6001 (uri (string-append
6002 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6003 version ".zip"))
6004 (sha256
6005 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6006 (build-system python-build-system)
a1920bc9 6007 (native-inputs
632735f2 6008 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6009 (synopsis "Python micro test suite harness")
6010 (description "A micro unittest suite harness for Python.")
6011 (home-page "https://github.com/trentm/testlib")
1cb9c006 6012 (license license:expat)))
a1920bc9
FB
6013
6014(define-public python2-testlib
6015 (package-with-python2 python-testlib))
db62afa5
LC
6016
6017(define-public python2-xlib
6018 (package
6019 (name "python2-xlib")
6020 (version "0.14")
6021 (source (origin
6022 (method url-fetch)
de67e922
LF
6023 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6024 "/" version "/"
db62afa5
LC
6025 "python-xlib-" version ".tar.gz"))
6026 (sha256
6027 (base32
6028 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6029 (build-system python-build-system)
6030 (arguments
6031 `(#:python ,python-2 ;Python 2 only
6032 #:tests? #f)) ;no tests
db62afa5
LC
6033 (home-page "http://python-xlib.sourceforge.net/")
6034 (synopsis "Python X11 client library")
6035 (description
6036 "The Python X Library is intended to be a fully functional X client
6037library for Python programs. It is useful to implement low-level X clients.
6038It is written entirely in Python.")
3f641af0 6039 (license license:gpl2+)))
0234ca06
DT
6040
6041(define-public python-singledispatch
6042 (package
6043 (name "python-singledispatch")
6044 (version "3.4.0.3")
6045 (source
6046 (origin
6047 (method url-fetch)
bdb67d84 6048 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6049 (sha256
6050 (base32
6051 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6052 (build-system python-build-system)
5e1c9d24
HG
6053 (native-inputs
6054 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6055 (home-page
6056 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6057 (synopsis "Backport of singledispatch feature from Python 3.4")
6058 (description
6059 "This library brings functools.singledispatch from Python 3.4 to Python
60602.6-3.3.")
6061 (license license:expat)))
6062
6063(define-public python2-singledispatch
6064 (package-with-python2 python-singledispatch))
feaae484 6065
310d218f
RW
6066(define-public python-tornado
6067 (package
6068 (name "python-tornado")
a724924b 6069 (version "4.3")
310d218f
RW
6070 (source
6071 (origin
6072 (method url-fetch)
a724924b 6073 (uri (pypi-uri "tornado" version))
310d218f 6074 (sha256
a724924b 6075 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 6076 (build-system python-build-system)
3fe2c209
MB
6077 (arguments
6078 '(;; FIXME: Two tests error out with:
6079 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6080 ;; #:phases
6081 ;; (modify-phases %standard-phases
6082 ;; (replace 'check
6083 ;; (lambda _
6084 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6085 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6086 ;; (zero? (system* "python" "-m" "tornado.test")))))
6087 #:tests? #f))
310d218f 6088 (native-inputs
b455439b 6089 `(("python-certifi" ,python-certifi)))
f22efa01 6090 (propagated-inputs
b455439b 6091 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6092 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6093 (synopsis "Python web framework and asynchronous networking library")
6094 (description
6095 "Tornado is a Python web framework and asynchronous networking library,
6096originally developed at FriendFeed. By using non-blocking network I/O,
6097Tornado can scale to tens of thousands of open connections, making it ideal
6098for long polling, WebSockets, and other applications that require a long-lived
6099connection to each user.")
3f641af0 6100 (license license:asl2.0)
b455439b 6101 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6102
6103(define-public python2-tornado
b455439b 6104 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6105 (package (inherit tornado)
f22efa01 6106 (propagated-inputs
310d218f
RW
6107 `(("python2-backport-ssl-match-hostname"
6108 ,python2-backport-ssl-match-hostname)
b455439b 6109 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6110 ,@(package-propagated-inputs tornado))))))
310d218f 6111
6b59fc10
EF
6112;; the python- version can be removed with python-3.5
6113(define-public python-backports-abc
6114 (package
6115 (name "python-backports-abc")
27f9148e 6116 (version "0.5")
6b59fc10
EF
6117 (source
6118 (origin
6119 (method url-fetch)
6120 (uri (pypi-uri "backports_abc" version))
6121 (sha256
6122 (base32
27f9148e 6123 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6124 (build-system python-build-system)
6b59fc10 6125 (home-page "https://github.com/cython/backports_abc")
66e07664 6126 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6127 (description
6128 "Python-backports-abc provides a backport of additions to the
6129'collections.abc' module in Python-3.5.")
3f641af0 6130 (license license:psfl)))
6b59fc10
EF
6131
6132(define-public python2-backports-abc
6133 (package-with-python2 python-backports-abc))
6134
ec074213
TD
6135(define-public python2-backports-shutil-get-terminal-size
6136 (package
6137 (name "python2-backports-shutil-get-terminal-size")
6138 (version "1.0.0")
6139 (source
6140 (origin
6141 (method url-fetch)
6142 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6143 (sha256
6144 (base32
6145 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6146 (build-system python-build-system)
6147 (arguments
c0446791
MB
6148 `(#:python ,python-2
6149 #:phases
6150 (modify-phases %standard-phases
6151 (replace 'check
6152 (lambda _
6153 (zero? (system* "py.test" "-v")))))))
6154 (native-inputs
6155 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6156 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6157 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6158 (description
6159 "This package provides a backport of the @code{get_terminal_size
6160function} from Python 3.3's @code{shutil}.
6161Unlike the original version it is written in pure Python rather than C,
6162so it might be a tiny bit slower.")
6163 (license license:expat)))
6164
feaae484
SB
6165(define-public python-waf
6166 (package
6167 (name "python-waf")
7dd55dfe 6168 (version "1.9.5")
feaae484
SB
6169 (source (origin
6170 (method url-fetch)
bae67829 6171 (uri (string-append "https://waf.io/"
feaae484
SB
6172 "waf-" version ".tar.bz2"))
6173 (sha256
6174 (base32
7dd55dfe 6175 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
6176 (build-system python-build-system)
6177 (arguments
6178 '(#:phases
6179 (modify-phases %standard-phases
6180 (replace 'build
7dd55dfe
EF
6181 (lambda _
6182 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6183 (replace 'check
7dd55dfe
EF
6184 (lambda _
6185 (zero? (system* "python" "waf" "--version"))))
feaae484 6186 (replace 'install
7dd55dfe
EF
6187 (lambda _
6188 (copy-file "waf" %output))))))
6189 (home-page "http://waf.io/")
feaae484
SB
6190 (synopsis "Python-based build system")
6191 (description
6192 "Waf is a Python-based framework for configuring, compiling and installing
6193applications.")
3f641af0 6194 (license license:bsd-3)))
feaae484
SB
6195
6196(define-public python2-waf
6197 (package-with-python2 python-waf))
45203542
RW
6198
6199(define-public python-pyzmq
6200 (package
6201 (name "python-pyzmq")
3655ee76 6202 (version "15.1.0")
45203542
RW
6203 (source
6204 (origin
6205 (method url-fetch)
3655ee76 6206 (uri (pypi-uri "pyzmq" version))
45203542 6207 (sha256
3655ee76 6208 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6209 (build-system python-build-system)
6210 (arguments
6211 `(#:configure-flags
6212 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6213 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6214 ;; --inplace' for 'python setup.py test' to work.
6215 #:tests? #f))
6216 (inputs
6217 `(("zeromq" ,zeromq)))
6218 (native-inputs
6219 `(("pkg-config" ,pkg-config)
f3b98f4f 6220 ("python-nose" ,python-nose)))
45203542
RW
6221 (home-page "http://github.com/zeromq/pyzmq")
6222 (synopsis "Python bindings for 0MQ")
6223 (description
6224 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6225 (license license:bsd-4)))
45203542
RW
6226
6227(define-public python2-pyzmq
6228 (package-with-python2 python-pyzmq))
d889e6c4
CR
6229
6230(define-public python-pep8
6231 (package
6232 (name "python-pep8")
db251311 6233 (version "1.7.0")
d889e6c4
CR
6234 (source
6235 (origin
6236 (method url-fetch)
db251311 6237 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6238 (sha256
6239 (base32
db251311 6240 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6241 (build-system python-build-system)
d889e6c4
CR
6242 (home-page "http://pep8.readthedocs.org/")
6243 (synopsis "Python style guide checker")
6244 (description
6245 "This tools checks Python code against some of the style conventions in
6246PEP 8.")
6247 (license license:expat)))
6248
6249(define-public python2-pep8
6250 (package-with-python2 python-pep8))
e31d7f44
CR
6251
6252(define-public python-pyflakes
6253 (package
6254 (name "python-pyflakes")
2abc3972 6255 (version "1.0.0")
e31d7f44
CR
6256 (source
6257 (origin
6258 (method url-fetch)
2abc3972 6259 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6260 (sha256
6261 (base32
2abc3972 6262 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6263 (build-system python-build-system)
e31d7f44
CR
6264 (home-page
6265 "https://github.com/pyflakes/pyflakes")
6266 (synopsis "Passive checker of Python programs")
6267 (description
6268 "Pyflakes statically checks Python source code for common errors.")
6269 (license license:expat)))
a59e017c 6270
7261d9eb
CR
6271(define-public python2-pyflakes
6272 (package-with-python2 python-pyflakes))
6273
a59e017c
CR
6274(define-public python-mccabe
6275 (package
6276 (name "python-mccabe")
c6ebd40d 6277 (version "0.4.0")
a59e017c
CR
6278 (source
6279 (origin
6280 (method url-fetch)
c6ebd40d 6281 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6282 (sha256
6283 (base32
c6ebd40d 6284 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6285 (build-system python-build-system)
328bb95d 6286 (native-inputs
c6ebd40d 6287 `(("python-pytest" ,python-pytest)
f3b98f4f 6288 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6289 (home-page "https://github.com/flintwork/mccabe")
6290 (synopsis "McCabe checker, plugin for flake8")
6291 (description
6292 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6293complexity of Python source code.")
7362371d 6294 (license license:expat)))
a59e017c
CR
6295
6296(define-public python2-mccabe
6297 (package-with-python2 python-mccabe))
e8df8f47 6298
7477fbb1
CR
6299(define-public python-mccabe-0.2.1
6300 (package (inherit python-mccabe)
6301 (version "0.2.1")
6302 (source
6303 (origin
6304 (method url-fetch)
6305 (uri (pypi-uri "mccabe" version))
6306 (sha256
6307 (base32
f3b98f4f 6308 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6309
6310(define-public python2-mccabe-0.2.1
6311 (package-with-python2 python-mccabe-0.2.1))
6312
e8df8f47
CR
6313;; Flake8 2.4.1 requires an older version of pep8.
6314;; This should be removed ASAP.
6315(define-public python-pep8-1.5.7
6316 (package (inherit python-pep8)
6317 (version "1.5.7")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (string-append
6322 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6323 version
6324 ".tar.gz"))
6325 (sha256
6326 (base32
73e3060d
MB
6327 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6328 (arguments
6329 ;; XXX Tests not compatible with Python 3.5.
6330 '(#:tests? #f))))
e8df8f47
CR
6331
6332(define-public python2-pep8-1.5.7
6333 (package-with-python2 python-pep8-1.5.7))
6334
6335;; Flake8 2.4.1 requires an older version of pyflakes.
6336;; This should be removed ASAP.
6337(define-public python-pyflakes-0.8.1
6338 (package (inherit python-pyflakes)
6339 (version "0.8.1")
6340 (source
6341 (origin
6342 (method url-fetch)
6343 (uri (string-append
6344 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6345 version
6346 ".tar.gz"))
6347 (sha256
6348 (base32
0d84e1ef
MB
6349 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6350 (arguments
6351 ;; XXX Tests not compatible with Python 3.5.
6352 '(#:tests? #f))))
e8df8f47
CR
6353
6354(define-public python2-pyflakes-0.8.1
7261d9eb 6355 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6356
6357(define-public python-flake8
6358 (package
6359 (name "python-flake8")
43789136 6360 (version "2.5.4")
e8df8f47
CR
6361 (source
6362 (origin
6363 (method url-fetch)
1b995533 6364 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6365 (sha256
6366 (base32
011271c7
HG
6367 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6368 (modules '((guix build utils)))
6369 (snippet
6370 '(begin
6371 ;; Remove pre-compiled .pyc files from source.
6372 (for-each delete-file-recursively
6373 (find-files "." "__pycache__" #:directories? #t))
6374 (for-each delete-file (find-files "." "\\.pyc$"))
6375 #t))))
e8df8f47 6376 (build-system python-build-system)
482d9591 6377 (propagated-inputs
f3b98f4f 6378 `(("python-pep8" ,python-pep8)
43789136 6379 ("python-pyflakes" ,python-pyflakes)
482d9591 6380 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6381 (native-inputs
6382 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6383 ("python-nose" ,python-nose)))
6384 (home-page "https://gitlab.com/pycqa/flake8")
6385 (synopsis
6386 "The modular source code checker: pep8, pyflakes and co")
6387 (description
6388 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6389 (license license:expat)))
6390
6391(define-public python2-flake8
6392 (package-with-python2 python-flake8))
61b9ac53 6393
abf21efc
CR
6394;; This will only be needed by the python-hacking package and will not be
6395;; necessary once python-hacking > 0.10.2 is released.
6396(define-public python-flake8-2.2.4
6397 (package (inherit python-flake8)
482d9591 6398 (propagated-inputs
f3b98f4f 6399 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6400 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6401 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6402 (native-inputs
482d9591 6403 `(("python-mock" ,python-mock)
abf21efc
CR
6404 ("python-nose" ,python-nose)))
6405 (version "2.2.4")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "flake8" version))
6410 (sha256
6411 (base32
b9c8ccce
HG
6412 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6413 (modules '((guix build utils)))
6414 (snippet
6415 '(begin
6416 ;; Remove pre-compiled .pyc files from source.
6417 (for-each delete-file-recursively
6418 (find-files "." "__pycache__" #:directories? #t))
6419 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6420 #t))))
6421 (arguments
6422 ;; XXX Fails with Python 3.5.
6423 '(#:tests? #f))))
abf21efc
CR
6424
6425(define-public python2-flake8-2.2.4
6426 (package-with-python2 python-flake8-2.2.4))
6427
1f42d824
MFM
6428(define-public python-flake8-polyfill
6429 (package
6430 (name "python-flake8-polyfill")
6431 (version "1.0.1")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "flake8-polyfill" version))
6436 (sha256
6437 (base32
6438 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6439 (build-system python-build-system)
2c1cad7a
MB
6440 (arguments
6441 '(#:phases
6442 (modify-phases %standard-phases
6443 (replace 'check
6444 (lambda _
6445 (setenv "PYTHONPATH"
6446 (string-append (getcwd) "/build/lib:"
6447 (getenv "PYTHONPATH")))
6448 (zero? (system* "py.test" "-v")))))))
6449 (native-inputs
6450 `(("python-flake8" ,python-flake8)
6451 ("python-mock" ,python-mock)
6452 ("python-pycodestyle" ,python-pycodestyle)
6453 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6454 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6455 (synopsis "Polyfill package for Flake8 plugins")
6456 (description
6457 "This package that provides some compatibility helpers for Flake8
6458plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6459 (license license:expat)))
6460
6461(define-public python2-flake8-polyfill
6462 (package-with-python2 python-flake8-polyfill))
6463
61b9ac53
FB
6464(define-public python-mistune
6465 (package
6466 (name "python-mistune")
08b81336 6467 (version "0.7.3")
61b9ac53
FB
6468 (source
6469 (origin
6470 (method url-fetch)
eff8d773 6471 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6472 (sha256
6473 (base32
08b81336 6474 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6475 (build-system python-build-system)
328bb95d 6476 (native-inputs
f3b98f4f 6477 `(("python-nose" ,python-nose)
61b9ac53
FB
6478 ("python-cython" ,python-cython)))
6479 (home-page "https://github.com/lepture/mistune")
6480 (synopsis "Markdown parser in pure Python")
6481 (description "This package provides a fast markdown parser in pure
6482Python.")
3f641af0 6483 (license license:bsd-3)))
61b9ac53
FB
6484
6485(define-public python2-mistune
6486 (package-with-python2 python-mistune))
6d992d07 6487
b9893908
EE
6488(define-public python-markdown
6489 (package
6490 (name "python-markdown")
791ac6a6 6491 (version "2.6.7")
b9893908
EE
6492 (source
6493 (origin
6494 (method url-fetch)
6495 (uri (pypi-uri "Markdown" version))
6496 (sha256
6497 (base32
791ac6a6 6498 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6499 (build-system python-build-system)
6500 (arguments
6501 `(#:phases
6502 (modify-phases %standard-phases
6503 (replace 'check
6504 (lambda _
6505 (zero? (system* "python" "run-tests.py")))))))
6506 (native-inputs
6507 `(("python-nose" ,python-nose)
6508 ("python-pyyaml" ,python-pyyaml)))
6509 (home-page "https://pythonhosted.org/Markdown/")
6510 (synopsis "Python implementation of Markdown")
6511 (description
6512 "This package provides a Python implementation of John Gruber's
6513Markdown. The library features international input, various Markdown
6514extensions, and several HTML output formats. A command line wrapper
6515markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6516 (license license:bsd-3)))
b9893908
EE
6517
6518(define-public python2-markdown
6519 (package-with-python2 python-markdown))
6520
6d992d07
FB
6521(define-public python-ptyprocess
6522 (package
6523 (name "python-ptyprocess")
6524 (version "0.5")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (string-append
6529 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6530 version ".tar.gz"))
6531 (sha256
6532 (base32
6533 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6534 (build-system python-build-system)
328bb95d 6535 (native-inputs
f3b98f4f 6536 `(("python-nose" ,python-nose)))
6d992d07
FB
6537 (arguments
6538 `(#:phases
6539 (modify-phases %standard-phases
6540 (replace 'check
6541 (lambda _
6542 (zero? (system* "nosetests")))))))
6543 (home-page "https://github.com/pexpect/ptyprocess")
6544 (synopsis "Run a subprocess in a pseudo terminal")
6545 (description
6546 "This package provides a Python library used to launch a subprocess in a
6547pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6548 (license license:isc)))
6d992d07
FB
6549
6550(define-public python2-ptyprocess
6551 (package-with-python2 python-ptyprocess))
4aadb1df 6552
df893a38
MB
6553(define-public python-cram
6554 (package
6555 (name "python-cram")
6556 (version "0.7")
6557 (home-page "https://bitheap.org/cram/")
6558 (source (origin
6559 (method url-fetch)
6560 (uri (list (string-append home-page "cram-"
6561 version ".tar.gz")
6562 (pypi-uri "cram" version)))
6563 (sha256
6564 (base32
6565 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6566 (arguments
6567 '(#:phases
6568 (modify-phases %standard-phases
6569 (add-after 'unpack 'patch-source
6570 (lambda _
6571 (substitute* (find-files "cram" ".*\\.py$")
6572 ;; Replace default shell path.
6573 (("/bin/sh") (which "sh")))
6574 (substitute* (find-files "tests" ".*\\.t$")
6575 (("md5") "md5sum")
6576 (("/bin/bash") (which "bash"))
6577 (("/bin/sh") (which "sh")))
6578 (substitute* "cram/_test.py"
6579 ;; This hack works around a bug triggered by substituting
6580 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6581 ;; "cram -h", which breaks the output at 80 characters. This
6582 ;; causes the line showing the default shell to break into two
6583 ;; lines, but the test expects a single line...
6584 (("env\\['COLUMNS'\\] = '80'")
6585 "env['COLUMNS'] = '160'"))
6586 #t))
6587 (delete 'check)
6588 (add-after 'install 'check
6589 ;; The test phase uses the built library and executable.
6590 ;; It's easier to run it after install since the build
6591 ;; directory contains version-specific PATH.
6592 (lambda* (#:key inputs outputs #:allow-other-keys)
6593 (add-installed-pythonpath inputs outputs)
6594 (setenv "PATH" (string-append (getenv "PATH") ":"
6595 (assoc-ref outputs "out") "/bin"))
6596 (zero? (system* "make" "test")))))))
6597 (build-system python-build-system)
6598 (native-inputs
6599 `(("python-coverage" ,python-coverage)
6600 ("which" ,which)))
6601 (synopsis "Simple testing framework for command line applications")
6602 (description
6603 "Cram is a functional testing framework for command line applications.
6604Cram tests look like snippets of interactive shell sessions. Cram runs each
6605command and compares the command output in the test with the command’s actual
6606output.")
6607 (license license:gpl2+)))
6608
6609(define-public python2-cram
6610 (package-with-python2 python-cram))
6611
4aadb1df
FB
6612(define-public python-terminado
6613 (package
6614 (name "python-terminado")
783fb0a3 6615 (version "0.6")
4aadb1df
FB
6616 (source
6617 (origin
6618 (method url-fetch)
783fb0a3 6619 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6620 (sha256
6621 (base32
783fb0a3 6622 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-tornado" ,python-tornado)
6626 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6627 (native-inputs
6628 `(("python-nose" ,python-nose)))
4aadb1df
FB
6629 (arguments
6630 `(#:phases
6631 (modify-phases %standard-phases
6632 (replace 'check
6633 (lambda _
6634 (zero? (system* "nosetests")))))))
6635 (home-page "https://github.com/takluyver/terminado")
6636 (synopsis "Terminals served to term.js using Tornado websockets")
6637 (description "This package provides a Tornado websocket backend for the
6638term.js Javascript terminal emulator library.")
3f641af0 6639 (license license:bsd-2)
783fb0a3 6640 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6641
6642(define-public python2-terminado
783fb0a3 6643 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6644 (package (inherit terminado)
783fb0a3
EF
6645 (propagated-inputs
6646 `(("python2-backport-ssl-match-hostname"
6647 ,python2-backport-ssl-match-hostname)
00e10c6e 6648 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6649
789de5e2 6650(define-public python-straight-plugin
6651 (package
6652 (name "python-straight-plugin")
6653 (version "1.4.1")
6654 (source
6655 (origin
6656 (method url-fetch)
6657 (uri (pypi-uri "straight.plugin" version))
6658 (sha256
6659 (base32
6660 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6661 (build-system python-build-system)
6662 (home-page "https://github.com/ironfroggy/straight.plugin")
6663 (synopsis "Simple namespaced plugin facility")
6664 (description "Straight Plugin provides a type of plugin you can create from
6665almost any existing Python modules, and an easy way for outside developers to
6666add functionality and customization to your projects with their own plugins.")
6667 (license license:expat)))
6668
6669(define-public python2-straight-plugin
6670 (package-with-python2 python-straight-plugin))
6671
d582eaac
SB
6672(define-public python-fonttools
6673 (package
6674 (name "python-fonttools")
6675 (version "2.5")
6676 (source (origin
6677 (method url-fetch)
6678 (uri (string-append
6679 "https://pypi.python.org/packages/source/F/FontTools/"
6680 "fonttools-" version ".tar.gz"))
6681 (sha256
6682 (base32
6683 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6684 (build-system python-build-system)
9e8c6a37
HG
6685 (arguments
6686 '(#:test-target "check"
6687 #:phases
6688 (modify-phases %standard-phases
6689 (add-after 'unpack 'patch-setuppy
6690 ;; Remove the undocumented "extra_path" argument, which adds an
6691 ;; intervening directories between site-packages and the package
6692 ;; directory.
6693 (lambda _
6694 (substitute* "setup.py"
6695 (("^[ \t]*extra_path *= *'FontTools',") ""))
6696 #t)))))
d582eaac
SB
6697 (home-page "http://github.com/behdad/fonttools")
6698 (synopsis "Tools to manipulate font files")
6699 (description
6700 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6701supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6702of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6703also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6704from an XML-based format.")
3f641af0
DC
6705 (license (license:non-copyleft
6706 "file://LICENSE.txt"
6707 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6708
6709(define-public python2-fonttools
6710 (package-with-python2 python-fonttools))
75710da6 6711
5faa5ce4
RW
6712(define-public python-ly
6713 (package
6714 (name "python-ly")
5135354f 6715 (version "0.9.4")
5faa5ce4
RW
6716 (source
6717 (origin
6718 (method url-fetch)
5135354f
RW
6719 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6720 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6721 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6722 (sha256
6723 (base32
5135354f 6724 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6725 (build-system python-build-system)
972cf9be
MB
6726 (arguments
6727 ;; FIXME: Some tests need network access.
6728 '(#:tests? #f))
5faa5ce4
RW
6729 (synopsis "Tool and library for manipulating LilyPond files")
6730 (description "This package provides a Python library to parse, manipulate
6731or create documents in LilyPond format. A command line program ly is also
6732provided that can be used to do various manipulations with LilyPond files.")
6733 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6734 (license license:gpl2+)))
7e7b27d9
CR
6735
6736(define-public python-appdirs
6737 (package
6738 (name "python-appdirs")
6739 (version "1.4.0")
6740 (source
6741 (origin
6742 (method url-fetch)
6743 (uri (string-append
6744 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6745 version
6746 ".tar.gz"))
6747 (sha256
6748 (base32
6749 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6750 (build-system python-build-system)
7e7b27d9
CR
6751 (home-page "http://github.com/ActiveState/appdirs")
6752 (synopsis
6753 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6754 (description
6755 "This module provides a portable way of finding out where user data
6756should be stored on various operating systems.")
6757 (license license:expat)))
6758
6759(define-public python2-appdirs
6760 (package-with-python2 python-appdirs))
89b2e0b0
LF
6761
6762(define-public python-llfuse
6763 (package
6764 (name "python-llfuse")
e36ace36 6765 (version "1.1.1")
89b2e0b0
LF
6766 (source (origin
6767 (method url-fetch)
6768 (uri (string-append
6769 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6770 "llfuse-" version ".tar.bz2"))
6771 (sha256
6772 (base32
e36ace36 6773 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6774 (build-system python-build-system)
6775 (inputs
6776 `(("fuse" ,fuse)
6777 ("attr" ,attr)))
6778 (native-inputs
f3b98f4f 6779 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6780 (synopsis "Python bindings for FUSE")
6781 (description
6782 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6783 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6784 (license license:lgpl2.0+)
cd0569c4 6785 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6786
6787(define-public python2-llfuse
cd0569c4
LF
6788 (package (inherit (package-with-python2
6789 (strip-python2-variant python-llfuse)))
6790 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6791
6792;; For attic-0.16
6793(define-public python-llfuse-0.41
6794 (package (inherit python-llfuse)
229b3661 6795 (version "0.41.1")
cd0569c4
LF
6796 (source (origin
6797 (method url-fetch)
6798 (uri (string-append
6799 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6800 "llfuse-" version ".tar.bz2"))
6801 (sha256
6802 (base32
229b3661 6803 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6804 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6805 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6806 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6807
6808(define-public python-msgpack
6809 (package
6810 (name "python-msgpack")
aed625bd 6811 (version "0.4.8")
641c9871
LF
6812 (source (origin
6813 (method url-fetch)
ae831df4 6814 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6815 (sha256
6816 (base32
aed625bd 6817 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6818 (build-system python-build-system)
641c9871
LF
6819 (synopsis "MessagePack (de)serializer")
6820 (description "MessagePack is a fast, compact binary serialization format,
6821suitable for similar data to JSON. This package provides CPython bindings for
6822reading and writing MessagePack data.")
6823 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6824 (license license:asl2.0)))
bd74be7b
LF
6825
6826(define-public python2-msgpack
f210e944 6827 (package-with-python2 python-msgpack))
641c9871 6828
6e5e39f4
CR
6829(define-public python-netaddr
6830 (package
6831 (name "python-netaddr")
6832 (version "0.7.18")
6833 (source
6834 (origin
6835 (method url-fetch)
6836 (uri (string-append
6837 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6838 version
6839 ".tar.gz"))
6840 (sha256
6841 (base32
6842 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6843 (build-system python-build-system)
6844 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6845 (home-page "https://github.com/drkjam/netaddr/")
6846 (synopsis "Pythonic manipulation of network addresses")
6847 (description
6848 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6849and MAC network addresses.")
3f641af0 6850 (license license:bsd-3)))
6e5e39f4
CR
6851
6852(define-public python2-netaddr
6853 (package-with-python2 python-netaddr))
8c692a52
CR
6854
6855(define-public python-wrapt
6856 (package
6857 (name "python-wrapt")
6858 (version "1.10.5")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (string-append
6863 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6864 version
6865 ".tar.gz"))
6866 (sha256
6867 (base32
6868 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6869 (build-system python-build-system)
6870 (arguments
6871 ;; Tests are not included in the tarball, they are only available in the
6872 ;; git repository.
6873 `(#:tests? #f))
8c692a52
CR
6874 (home-page "https://github.com/GrahamDumpleton/wrapt")
6875 (synopsis "Module for decorators, wrappers and monkey patching")
6876 (description
6877 "The aim of the wrapt module is to provide a transparent object proxy for
6878 Python, which can be used as the basis for the construction of function
6879 wrappers and decorator functions.")
3f641af0 6880 (license license:bsd-2)))
8c692a52
CR
6881
6882(define-public python2-wrapt
6883 (package-with-python2 python-wrapt))
b85c85be
CR
6884
6885(define-public python-iso8601
6886 (package
6887 (name "python-iso8601")
fe84bc9a 6888 (version "0.1.11")
b85c85be
CR
6889 (source
6890 (origin
6891 (method url-fetch)
fe84bc9a 6892 (uri (pypi-uri "iso8601" version))
b85c85be 6893 (sha256
fe84bc9a
EF
6894 (base32
6895 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6896 (build-system python-build-system)
63b02364
MB
6897 (native-inputs
6898 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6899 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6900 (synopsis "Module to parse ISO 8601 dates")
6901 (description
6902 "This module parses the most common forms of ISO 8601 date strings (e.g.
6903@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6904 (license license:expat)))
6905
6906(define-public python2-iso8601
6907 (package-with-python2 python-iso8601))
5e412b63
CR
6908
6909(define-public python-monotonic
6910 (package
6911 (name "python-monotonic")
6912 (version "0.3")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (string-append
6917 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6918 version
6919 ".tar.gz"))
6920 (sha256
6921 (base32
6922 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6923 (build-system python-build-system)
5e412b63
CR
6924 (home-page "https://github.com/atdt/monotonic")
6925 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6926 (description
6927 "This module provides a monotonic() function which returns the value (in
6928fractional seconds) of a clock which never goes backwards.")
3f641af0 6929 (license license:asl2.0)))
5e412b63
CR
6930
6931(define-public python2-monotonic
6932 (package-with-python2 python-monotonic))
de34afac
CR
6933
6934(define-public python-webob
6935 (package
6936 (name "python-webob")
b8834c21 6937 (version "1.5.1")
de34afac
CR
6938 (source
6939 (origin
6940 (method url-fetch)
b8834c21 6941 (uri (pypi-uri "WebOb" version))
de34afac
CR
6942 (sha256
6943 (base32
b8834c21 6944 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6945 (build-system python-build-system)
328bb95d 6946 (native-inputs
f3b98f4f 6947 `(("python-nose" ,python-nose)))
de34afac
CR
6948 (home-page "http://webob.org/")
6949 (synopsis "WSGI request and response object")
6950 (description
6951 "WebOb provides wrappers around the WSGI request environment, and an
6952object to help create WSGI responses.")
6953 (license license:expat)))
6954
6955(define-public python2-webob
6956 (package-with-python2 python-webob))
350ba0a3 6957
02a8a187
BW
6958(define-public python-xlrd
6959 (package
6960 (name "python-xlrd")
c2ad4d70 6961 (version "1.0.0")
02a8a187
BW
6962 (source (origin
6963 (method url-fetch)
e775f48e 6964 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6965 (sha256
6966 (base32
c2ad4d70 6967 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6968 (build-system python-build-system)
6969 (arguments
6970 `(#:phases
6971 (modify-phases %standard-phases
c2ad4d70 6972 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6973 ;; run tests instead for now.
6974 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6975 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6976 (home-page "http://www.python-excel.org/")
6977 (synopsis "Library for extracting data from Excel files")
6978 (description "This packages provides a library to extract data from
c598e35c 6979spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6980@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6981Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6982 (license license:bsd-3)))
02a8a187
BW
6983
6984(define-public python2-xlrd
6985 (package-with-python2 python-xlrd))
6986
350ba0a3
CR
6987(define-public python-prettytable
6988 (package
6989 (name "python-prettytable")
6990 (version "0.7.2")
6991 (source
6992 (origin
6993 (method url-fetch)
6994 (uri (string-append
6995 "https://pypi.python.org/packages/source/P/PrettyTable/"
6996 "prettytable-" version ".tar.bz2"))
6997 (sha256
6998 (base32
6999 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7000 (build-system python-build-system)
350ba0a3
CR
7001 (home-page "http://code.google.com/p/prettytable/")
7002 (synopsis "Display tabular data in an ASCII table format")
7003 (description
7004 "A library designed to represent tabular data in visually appealing ASCII
7005tables. PrettyTable allows for selection of which columns are to be printed,
7006independent alignment of columns (left or right justified or centred) and
7007printing of sub-tables by specifying a row range.")
3f641af0 7008 (license license:bsd-3)))
350ba0a3
CR
7009
7010(define-public python2-prettytable
7011 (package-with-python2 python-prettytable))
7a8ac75a 7012
9f8ee3fe
RW
7013(define-public python-tables
7014 (package
7015 (name "python-tables")
7016 (version "3.2.2")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (pypi-uri "tables" version))
7021 (sha256
7022 (base32
bac23672
HG
7023 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7024 (modules '((guix build utils)))
7025 (snippet
7026 '(begin
7027 ;; Remove pre-compiled .pyc files from source.
7028 (for-each delete-file-recursively
7029 (find-files "." "__pycache__" #:directories? #t))
7030 (for-each delete-file (find-files "." "\\.pyc$"))
7031 #t))))
9f8ee3fe
RW
7032 (build-system python-build-system)
7033 (arguments
7034 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7035 ;; or "check", so we must override the build and check phases.
7036 #:phases
7037 (modify-phases %standard-phases
7038 (add-after 'unpack 'use-gcc
7039 (lambda _
7040 (substitute* "setup.py"
7041 (("compiler = new_compiler\\(\\)" line)
7042 (string-append line
7043 "\ncompiler.set_executables(compiler='gcc',"
7044 "compiler_so='gcc',"
7045 "linker_exe='gcc',"
7046 "linker_so='gcc -shared')")))
7047 #t))
7048 (replace 'build
7049 (lambda* (#:key inputs #:allow-other-keys)
7050 (zero? (system* "python" "setup.py" "build"
7051 (string-append "--hdf5="
7052 (assoc-ref inputs "hdf5"))))))
7053 (replace 'check
7054 (lambda* (#:key inputs #:allow-other-keys)
7055 (zero? (system* "python" "setup.py" "check"
7056 (string-append "--hdf5="
7057 (assoc-ref inputs "hdf5")))))))))
7058 (propagated-inputs
7059 `(("python-numexpr" ,python-numexpr)
7060 ("python-numpy" ,python-numpy)))
7061 (native-inputs
f3b98f4f 7062 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7063 ("pkg-config" ,pkg-config)))
7064 (inputs
7065 `(("hdf5" ,hdf5)
7066 ("bzip2" ,bzip2)
7067 ("zlib" ,zlib)))
7068 (home-page "http://www.pytables.org/")
7069 (synopsis "Hierarchical datasets for Python")
7070 (description "PyTables is a package for managing hierarchical datasets and
7071designed to efficently cope with extremely large amounts of data.")
3f641af0 7072 (license license:bsd-3)))
9f8ee3fe
RW
7073
7074(define-public python2-tables
7075 (package-with-python2 python-tables))
7076
7a8ac75a
RW
7077(define-public python-pyasn1
7078 (package
7079 (name "python-pyasn1")
caa0edb3 7080 (version "0.1.9")
7a8ac75a
RW
7081 (source
7082 (origin
7083 (method url-fetch)
caa0edb3 7084 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7085 (sha256
7086 (base32
caa0edb3 7087 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
7088 (build-system python-build-system)
7089 (home-page "http://pyasn1.sourceforge.net/")
7090 (synopsis "ASN.1 types and codecs")
7091 (description
7092 "This is an implementation of ASN.1 types and codecs in Python. It is
7093suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7094 (license license:bsd-2)))
7a8ac75a
RW
7095
7096(define-public python2-pyasn1
7097 (package-with-python2 python-pyasn1))
9a49a535 7098
5988c299
EF
7099(define-public python-pyasn1-modules
7100 (package
7101 (name "python-pyasn1-modules")
7102 (version "0.0.8")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "pyasn1-modules" version))
7107 (sha256
7108 (base32
7109 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7110 (build-system python-build-system)
5988c299
EF
7111 (propagated-inputs
7112 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7113 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7114 (synopsis "ASN.1 codec implementations")
7115 (description
7116 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7117implementations of ASN.1-based codecs and protocols.")
3f641af0 7118 (license license:bsd-3)))
5988c299
EF
7119
7120(define-public python2-pyasn1-modules
7121 (package-with-python2 python-pyasn1-modules))
7122
520af157 7123(define-public python-ipaddress
9a49a535 7124 (package
520af157
DC
7125 (name "python-ipaddress")
7126 (version "1.0.16")
7127 (source (origin
7128 (method url-fetch)
7129 (uri (pypi-uri "ipaddress" version))
7130 (sha256
7131 (base32
7132 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 7133 (build-system python-build-system)
9a49a535
RW
7134 (home-page "https://github.com/phihag/ipaddress")
7135 (synopsis "IP address manipulation library")
7136 (description
520af157
DC
7137 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7138 in Python. This library is used to create, poke at, and manipulate IPv4 and
7139 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7140 module to older versions of Python.")
f210e944 7141 (license license:psfl)))
520af157
DC
7142
7143(define-public python2-ipaddress
f210e944 7144 (package-with-python2 python-ipaddress))
3f00e078 7145
4a238186
HG
7146(define-public python2-ipaddr
7147 (package
7148 (name "python2-ipaddr")
7149 (version "2.1.11")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "ipaddr" version))
7154 (sha256
7155 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7156 (build-system python-build-system)
7157 (arguments
7158 `(#:python ,python-2 ;version 2 only
7159 #:phases
7160 (modify-phases %standard-phases
7161 (replace 'check
7162 (lambda* _
7163 (zero? (system* "python" "ipaddr_test.py")))))))
7164 (home-page "https://github.com/google/ipaddr-py")
7165 (synopsis "IP address manipulation library")
7166 (description
7167 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7168IPv6 addresses and networks.
7169
7170For new implementations you may prefer to use the standard module
7171@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7172versions of Python.")
3f641af0 7173 (license license:asl2.0)))
4a238186 7174
3f00e078
RW
7175(define-public python-idna
7176 (package
7177 (name "python-idna")
7178 (version "2.0")
7179 (source
7180 (origin
7181 (method url-fetch)
7182 (uri (string-append "https://pypi.python.org/packages/source/i/"
7183 "idna/idna-" version ".tar.gz"))
7184 (sha256
7185 (base32
7186 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7187 (build-system python-build-system)
3f00e078
RW
7188 (home-page "https://github.com/kjd/idna")
7189 (synopsis "Internationalized domain names in applications")
7190 (description
7191 "This is a library to support the Internationalised Domain Names in
7192Applications (IDNA) protocol as specified in RFC 5891. This version of the
7193protocol is often referred to as “IDNA2008” and can produce different results
7194from the earlier standard from 2003. The library is also intended to act as a
7195suitable drop-in replacement for the “encodings.idna” module that comes with
7196the Python standard library but currently only supports the older 2003
7197specification.")
3f641af0 7198 (license license:bsd-4)))
3f00e078
RW
7199
7200(define-public python2-idna
7201 (package-with-python2 python-idna))
36ebf972
RW
7202
7203(define-public python-pretend
7204 (package
7205 (name "python-pretend")
7206 (version "1.0.8")
7207 (source
7208 (origin
7209 (method url-fetch)
7210 (uri (string-append "https://pypi.python.org/packages/source/p/"
7211 "pretend/pretend-" version ".tar.gz"))
7212 (sha256
7213 (base32
7214 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7215 (build-system python-build-system)
36ebf972
RW
7216 (home-page "https://github.com/alex/pretend")
7217 (synopsis "Library for stubbing in Python")
7218 (description
7219 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7220technique for writing tests. You may hear the term mixed up with mocks,
7221fakes, or doubles. Basically, a stub is an object that returns pre-canned
7222responses, rather than doing any computation.")
3f641af0 7223 (license license:bsd-3)))
36ebf972
RW
7224
7225(define-public python2-pretend
7226 (package-with-python2 python-pretend))
aa759a51
RW
7227
7228(define-public python-cryptography-vectors
7229 (package
7230 (name "python-cryptography-vectors")
27fab2bf 7231 (version "1.7.1")
aa759a51
RW
7232 (source
7233 (origin
7234 (method url-fetch)
9c509ca9 7235 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7236 (sha256
7237 (base32
27fab2bf 7238 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7239 (build-system python-build-system)
aa759a51 7240 (home-page "https://github.com/pyca/cryptography")
66e07664 7241 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7242 (description
7243 "This package contains test vectors for the cryptography package.")
7244 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7245 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7246
7247(define-public python2-cryptography-vectors
7248 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7249
7250(define-public python-cryptography
7251 (package
7252 (name "python-cryptography")
27fab2bf 7253 (version "1.7.1")
88b47cb0
RW
7254 (source
7255 (origin
7256 (method url-fetch)
9c509ca9 7257 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7258 (sha256
7259 (base32
27fab2bf 7260 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7261 (build-system python-build-system)
7262 (inputs
7263 `(("openssl" ,openssl)))
7264 (propagated-inputs
7265 `(("python-cffi" ,python-cffi)
7266 ("python-six" ,python-six)
7267 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7268 ("python-idna" ,python-idna)
7269 ("python-iso8601" ,python-iso8601)))
7270 (native-inputs
7271 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7272 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7273 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7274 ("python-pyasn1" ,python-pyasn1)
7275 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
7276 ("python-pytz" ,python-pytz)
7277 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
7278 (home-page "https://github.com/pyca/cryptography")
7279 (synopsis "Cryptographic recipes and primitives for Python")
7280 (description
7281 "cryptography is a package which provides cryptographic recipes and
7282primitives to Python developers. It aims to be the “cryptographic standard
7283library” for Python. The package includes both high level recipes, and low
7284level interfaces to common cryptographic algorithms such as symmetric ciphers,
7285message digests and key derivation functions.")
7286 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7287 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7288 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7289
7290(define-public python2-cryptography
519e2f4f
LF
7291 (let ((crypto (package-with-python2
7292 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7293 (package (inherit crypto)
7294 (propagated-inputs
7295 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7296 ("python2-backport-ssl-match-hostname"
7297 ,python2-backport-ssl-match-hostname)
68f1cdec 7298 ("python2-enum34" ,python2-enum34)
88b47cb0 7299 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7300
7301(define-public python-pyopenssl
7302 (package
7303 (name "python-pyopenssl")
61684de2 7304 (version "16.2.0")
5af999b8
RW
7305 (source
7306 (origin
7307 (method url-fetch)
eb68d268 7308 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7309 (sha256
7310 (base32
7c6bf660
MB
7311 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7312 (patches
7313 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7314 (build-system python-build-system)
30e0229a 7315 (arguments
7c6bf660
MB
7316 '(#:phases
7317 (modify-phases %standard-phases
7318 (delete 'check)
7319 (add-after 'install 'check
7320 (lambda* (#:key inputs outputs #:allow-other-keys)
7321 (add-installed-pythonpath inputs outputs)
7322 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7323 (propagated-inputs
7324 `(("python-cryptography" ,python-cryptography)
7325 ("python-six" ,python-six)))
7326 (inputs
7327 `(("openssl" ,openssl)))
30e0229a
MB
7328 (native-inputs
7329 `(("python-pytest" ,python-pytest)))
5af999b8
RW
7330 (home-page "https://github.com/pyca/pyopenssl")
7331 (synopsis "Python wrapper module around the OpenSSL library")
7332 (description
7333 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7334library.")
3f641af0 7335 (license license:asl2.0)))
5af999b8
RW
7336
7337(define-public python2-pyopenssl
519e2f4f 7338 (package-with-python2 python-pyopenssl))
643725a1
CR
7339
7340(define-public python-pip
7341 (package
7342 (name "python-pip")
392c26b0 7343 (version "9.0.1")
643725a1
CR
7344 (source
7345 (origin
7346 (method url-fetch)
6fb54e3b 7347 (uri (pypi-uri "pip" version))
643725a1
CR
7348 (sha256
7349 (base32
392c26b0 7350 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7351 (build-system python-build-system)
392c26b0
MC
7352 (arguments
7353 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7354 (home-page "https://pip.pypa.io/")
392c26b0 7355 (synopsis "Package manager for Python software")
643725a1 7356 (description
392c26b0 7357 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7358Python Package Index (PyPI).")
7359 (license license:expat)))
7360
7361(define-public python2-pip
7362 (package-with-python2 python-pip))
d8c4998f
LC
7363
7364(define-public python-tlsh
7365 (package
7366 (name "python-tlsh")
99b00dc7 7367 (version "3.4.4")
d8c4998f
LC
7368 (home-page "https://github.com/trendmicro/tlsh")
7369 (source (origin
99b00dc7
EF
7370 (method url-fetch)
7371 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7372 version ".tar.gz"))
d8c4998f
LC
7373 (sha256
7374 (base32
99b00dc7
EF
7375 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7376 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7377 (build-system cmake-build-system)
7378 (arguments
7379 '(#:out-of-source? #f
7380 #:phases (modify-phases %standard-phases
7381 (replace
7382 'install
7383 (lambda* (#:key outputs #:allow-other-keys)
7384 ;; Build and install the Python bindings. The underlying
7385 ;; C++ library is apparently not meant to be installed.
7386 (let ((out (assoc-ref outputs "out")))
7387 (with-directory-excursion "py_ext"
7388 (and (system* "python" "setup.py" "build")
7389 (system* "python" "setup.py" "install"
7390 (string-append "--prefix=" out))))))))))
7391 (inputs `(("python" ,python-wrapper))) ;for the bindings
7392 (synopsis "Fuzzy matching library for Python")
7393 (description
7394 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7395Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7396value which can be used for similarity comparisons. Similar objects have
7397similar hash values, which allows for the detection of similar objects by
7398comparing their hash values. The byte stream should have a sufficient amount
7399of complexity; for example, a byte stream of identical bytes will not generate
7400a hash value.")
3f641af0 7401 (license license:asl2.0)))
d8c4998f
LC
7402
7403(define-public python2-tlsh
7404 (package
7405 (inherit python-tlsh)
7406 (name "python2-tlsh")
7407 (inputs `(("python" ,python-2)))))
d96034ed 7408
67f66812
BW
7409(define-public python-termcolor
7410 (package
7411 (name "python-termcolor")
7412 (version "1.1.0")
7413 (source
7414 (origin
7415 (method url-fetch)
7416 (uri (pypi-uri "python-termcolor" version))
7417 (sha256
7418 (base32
7419 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7420 (build-system python-build-system)
7421 (arguments
7422 ;; There are no tests.
7423 `(#:tests? #f))
7424 (home-page "http://pypi.python.org/pypi/termcolor")
7425 (synopsis "ANSII Color formatting for terminal output")
7426 (description
7427 "This package provides ANSII Color formatting for output in terminals.")
7428 (license license:expat)))
7429
7430(define-public python2-termcolor
7431 (package-with-python2 python-termcolor))
7432
d96034ed
LC
7433(define-public python-libarchive-c
7434 (package
7435 (name "python-libarchive-c")
03fd001c 7436 (version "2.2")
d96034ed
LC
7437 (source (origin
7438 (method url-fetch)
03fd001c 7439 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7440 (sha256
7441 (base32
03fd001c 7442 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7443 (build-system python-build-system)
7444 (arguments
7445 '(#:phases (modify-phases %standard-phases
7446 (add-before
7447 'build 'reference-libarchive
7448 (lambda* (#:key inputs #:allow-other-keys)
7449 ;; Retain the absolute file name of libarchive.so.
7450 (let ((libarchive (assoc-ref inputs "libarchive")))
7451 (substitute* "libarchive/ffi.py"
7452 (("find_library\\('archive'\\)")
7453 (string-append "'" libarchive
b41a05ce 7454 "/lib/libarchive.so'")))))))))
d96034ed 7455 (inputs
f3b98f4f 7456 `(("libarchive" ,libarchive)))
d96034ed
LC
7457 (home-page "https://github.com/Changaco/python-libarchive-c")
7458 (synopsis "Python interface to libarchive")
7459 (description
7460 "This package provides Python bindings to libarchive, a C library to
7461access possibly compressed archives in many different formats. It uses
7462Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7463 (license license:lgpl2.0+)))
d96034ed
LC
7464
7465(define-public python2-libarchive-c
7466 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7467
7468(define-public python-file
7469 (package
7470 (inherit file)
7471 (name "python-file")
7ffa5d4a
LF
7472 (source (origin
7473 (inherit (package-source file))
7474 ;; This patch should not be applied to python2-file.
7475 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7476 (build-system python-build-system)
7477 (arguments
7478 '(#:tests? #f ;no tests
00bf74be 7479 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7480 #:phases (modify-phases %standard-phases
7481 (add-before 'build 'change-directory
7482 (lambda _
7483 (chdir "python")
7484 #t))
7485 (add-before 'build 'set-library-file-name
7486 (lambda* (#:key inputs #:allow-other-keys)
7487 (let ((file (assoc-ref inputs "file")))
7488 (substitute* "magic.py"
7489 (("find_library\\('magic'\\)")
7490 (string-append "'" file "/lib/libmagic.so'")))
7491 #t))))))
7492 (inputs `(("file" ,file)))
7493 (self-native-input? #f)
daeeea71
CM
7494 (synopsis "Python bindings to the libmagic file type guesser. Note that
7495this module and the python-magic module both provide a \"magic.py\" file;
7496these two modules, which are different and were developed separately, both
f210e944 7497serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7498
7499(define-public python2-file
f210e944 7500 (package-with-python2 python-file))
85d4aeac
LC
7501
7502(define-public python-debian
7503 (package
7504 (name "python-debian")
02d7f337 7505 (version "0.1.28")
85d4aeac
LC
7506 (source
7507 (origin
7508 (method url-fetch)
5e217a8b 7509 (uri (pypi-uri name version))
85d4aeac
LC
7510 (sha256
7511 (base32
02d7f337 7512 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7513 (build-system python-build-system)
f22efa01 7514 (propagated-inputs
85d4aeac 7515 `(("python-six" ,python-six)))
85d4aeac
LC
7516 (home-page "http://packages.debian.org/sid/python-debian")
7517 (synopsis "Debian package related modules")
7518 (description
5c7bdc9a
LC
7519 ;; XXX: Use @enumerate instead of @itemize to work around
7520 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7521 "This package provides Python modules that abstract many formats of
7522Debian-related files, such as:
7523
5c7bdc9a 7524@enumerate
85d4aeac
LC
7525@item Debtags information;
7526@item @file{debian/changelog} files;
7527@item packages files, pdiffs;
7528@item control files of single or multiple RFC822-style paragraphs---e.g.
7529 @file{debian/control}, @file{.changes}, @file{.dsc};
7530@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7531 contained files and meta-information.
5c7bdc9a 7532@end enumerate\n")
85d4aeac
LC
7533
7534 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7535 (license license:gpl3+)))
85d4aeac
LC
7536
7537(define-public python2-debian
7538 (package-with-python2 python-debian))
816a6538 7539
2d321bb2
RW
7540(define-public python-nbformat
7541 (package
7542 (name "python-nbformat")
7543 (version "4.1.0")
7544 (source
7545 (origin
7546 (method url-fetch)
7547 (uri (pypi-uri "nbformat" version))
7548 (sha256
7549 (base32
7550 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7551 (build-system python-build-system)
7552 (arguments `(#:tests? #f)) ; no test target
7553 (propagated-inputs
7554 `(("python-ipython-genutils" ,python-ipython-genutils)
7555 ("python-jsonschema" ,python-jsonschema)
7556 ("python-jupyter-core" ,python-jupyter-core)
7557 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7558 (home-page "http://jupyter.org")
7559 (synopsis "Jupyter Notebook format")
7560 (description "This package provides the reference implementation of the
7561Jupyter Notebook format and Python APIs for working with notebooks.")
7562 (license license:bsd-3)))
7563
7564(define-public python2-nbformat
7565 (package-with-python2 python-nbformat))
7566
55436048
RW
7567(define-public python-bleach
7568 (package
7569 (name "python-bleach")
7570 (version "1.4.3")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "bleach" version))
7575 (sha256
7576 (base32
7577 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7578 (build-system python-build-system)
7579 (propagated-inputs
7580 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7581 ("python-six" ,python-six)))
7582 (native-inputs
7583 `(("python-nose" ,python-nose)))
7584 (home-page "http://github.com/jsocol/bleach")
7585 (synopsis "Whitelist-based HTML-sanitizing tool")
7586 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7587 (license license:asl2.0)))
7588
7589(define-public python2-bleach
7590 (package-with-python2 python-bleach))
7591
60590a3a
RW
7592(define-public python-entrypoints
7593 (package
7594 (name "python-entrypoints")
7595 (version "0.2.2")
7596 (source
7597 (origin
7598 (method url-fetch)
7599 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7600 version ".tar.gz"))
7601 (file-name (string-append name "-" version ".tar.gz"))
7602 (sha256
7603 (base32
7604 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7605 (build-system python-build-system)
7606 ;; The package does not come with a setup.py file, so we have to generate
7607 ;; one ourselves.
7608 (arguments
7609 `(#:tests? #f
7610 #:phases
7611 (modify-phases %standard-phases
7612 (add-after 'unpack 'create-setup.py
7613 (lambda _
7614 (call-with-output-file "setup.py"
7615 (lambda (port)
7616 (format port "\
7617from setuptools import setup
7618setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7619" ,version))))))))
7620 (home-page "https://github.com/takluyver/entrypoints")
7621 (synopsis "Discover and load entry points from installed Python packages")
7622 (description "Entry points are a way for Python packages to advertise
7623objects with some common interface. The most common examples are
7624@code{console_scripts} entry points, which define shell commands by
7625identifying a Python function to run. The @code{entrypoints} module contains
7626functions to find and load entry points.")
7627 (license license:expat)))
7628
7629(define-public python2-entrypoints
7630 (package-with-python2 python-entrypoints))
7631
c60898a8
RW
7632(define-public python-nbconvert
7633 (package
7634 (name "python-nbconvert")
7635 (version "5.0.0b1")
7636 (source
7637 (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "nbconvert" version))
7640 (sha256
7641 (base32
7642 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7643 (build-system python-build-system)
497355dc
MB
7644 (arguments
7645 `(;; The "bdist_egg" target is disabled by default, causing the installation
7646 ;; to fail.
7647 #:configure-flags (list "bdist_egg")
7648 ;; FIXME: 5 failures, 40 errors.
7649 #:tests? #f))
7650 ;; #:phases
7651 ;; (modify-phases %standard-phases
7652 ;; (replace 'check
7653 ;; (lambda _
7654 ;; (zero? (system* "py.test" "-v")))))
7655 (native-inputs
7656 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7657 (propagated-inputs
7658 `(("python-bleach" ,python-bleach)
7659 ("python-entrypoints" ,python-entrypoints)
7660 ("python-jinja2" ,python-jinja2)
7661 ("python-jupyter-core" ,python-jupyter-core)
7662 ("python-mistune" ,python-mistune)
7663 ("python-nbformat" ,python-nbformat)
7664 ("python-pygments" ,python-pygments)
c60898a8
RW
7665 ("python-traitlets" ,python-traitlets)))
7666 (home-page "http://jupyter.org")
7667 (synopsis "Converting Jupyter Notebooks")
7668 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7669notebooks to various other formats via Jinja templates. It allows you to
7670convert an @code{.ipynb} notebook file into various static formats including:
7671
7672@enumerate
7673@item HTML
7674@item LaTeX
7675@item PDF
7676@item Reveal JS
7677@item Markdown (md)
7678@item ReStructured Text (rst)
7679@item executable script
7680@end enumerate\n")
7681 (license license:bsd-3)))
7682
7683(define-public python2-nbconvert
7684 (package-with-python2 python-nbconvert))
7685
a0d62280
RW
7686(define-public python-notebook
7687 (package
7688 (name "python-notebook")
7689 (version "4.2.3")
7690 (source (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "notebook" version))
7693 (sha256
7694 (base32
7695 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7696 (build-system python-build-system)
7697 (arguments
7698 `(#:phases
7699 (modify-phases %standard-phases
7700 (replace 'check
7701 (lambda _
7702 ;; HOME must be set for tests
7703 (setenv "HOME" "/tmp")
7704 (zero? (system* "nosetests")))))))
7705 (propagated-inputs
7706 `(("python-jupyter-core" ,python-jupyter-core)
7707 ("python-nbformat" ,python-nbformat)
7708 ("python-nbconvert" ,python-nbconvert)
7709 ("python-ipython" ,python-ipython)))
7710 (native-inputs
7711 `(("python-nose" ,python-nose)
7712 ("python-sphinx" ,python-sphinx)
7713 ("python-requests" ,python-requests)))
7714 (home-page "http://jupyter.org/")
7715 (synopsis "Web-based notebook environment for interactive computing")
7716 (description
7717 "The Jupyter HTML notebook is a web-based notebook environment for
7718interactive computing.")
3a735ecf 7719 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7720 (license license:bsd-3)))
7721
7722(define-public python2-notebook
3a735ecf
HG
7723 (let ((base (package-with-python2
7724 (strip-python2-variant python-notebook))))
7725 (package (inherit base)
7726 (native-inputs
7727 `(("python2-mock" ,python2-mock)
7728 ,@(package-native-inputs base)))
7729 (arguments
7730 (substitute-keyword-arguments (package-arguments base)
7731 ((#:phases phases)
7732 `(modify-phases ,phases
7733 (add-before 'check 'disable-test-case
7734 ;; The test requires network access to localhost. Curiously it
7735 ;; fails with Python 2 only. Simply make the test-case return
7736 ;; immediately.
7737 (lambda _
7738 (substitute*
7739 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7740 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7741
d55724ed
RW
7742(define-public python-widgetsnbextension
7743 (package
7744 (name "python-widgetsnbextension")
7745 (version "1.2.6")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "widgetsnbextension" version))
7750 (sha256
7751 (base32
7752 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-notebook" ,python-notebook)))
7756 (native-inputs
58f5fae7
MB
7757 `(("python-certifi" ,python-certifi)
7758 ("python-nose" ,python-nose)))
d55724ed
RW
7759 (home-page "http://ipython.org")
7760 (synopsis "IPython HTML widgets for Jupyter")
7761 (description "This package provides interactive HTML widgets for Jupyter
7762notebooks.")
7763 (license license:bsd-3)))
7764
7765(define-public python2-widgetsnbextension
7766 (package-with-python2 python-widgetsnbextension))
7767
4fe2e344
RW
7768(define-public python-ipywidgets
7769 (package
7770 (name "python-ipywidgets")
7771 (version "5.2.2")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "ipywidgets" version))
7776 (sha256
7777 (base32
7778 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7779 (build-system python-build-system)
7780 ;; FIXME: it's not clear how to run the tests.
7781 (arguments `(#:tests? #f))
7782 (propagated-inputs
7783 `(("python-ipykernel" ,python-ipykernel)
7784 ("python-ipython" ,python-ipython)
4fe2e344
RW
7785 ("python-traitlets" ,python-traitlets)
7786 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7787 (home-page "http://ipython.org")
7788 (synopsis "IPython HTML widgets for Jupyter")
7789 (description "Ipywidgets are interactive HTML widgets for Jupyter
7790notebooks and the IPython kernel. Notebooks come alive when interactive
7791widgets are used. Users gain control of their data and can visualize changes
7792in the data.")
7793 (license license:bsd-3)))
7794
7795(define-public python2-ipywidgets
7796 (package-with-python2 python-ipywidgets))
7797
8ceebf8f
RW
7798(define-public python-jupyter-console
7799 (package
7800 (name "python-jupyter-console")
7801 (version "5.0.0")
7802 (source
7803 (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "jupyter_console" version))
7806 (sha256
7807 (base32
7808 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7809 (build-system python-build-system)
7810 ;; FIXME: it's not clear how to run the tests.
7811 (arguments `(#:tests? #f))
7812 (propagated-inputs
7813 `(("python-ipykernel" ,python-ipykernel)
7814 ("python-ipython" ,python-ipython)
7815 ("python-jupyter-client" ,python-jupyter-client)
7816 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7817 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7818 (home-page "https://jupyter.org")
7819 (synopsis "Jupyter terminal console")
7820 (description "This package provides a terminal-based console frontend for
7821Jupyter kernels. It also allows for console-based interaction with non-Python
7822Jupyter kernels such as IJulia and IRKernel.")
7823 (license license:bsd-3)))
7824
7825(define-public python2-jupyter-console
7826 (package-with-python2 python-jupyter-console))
7827
c27ae827
RW
7828(define-public jupyter
7829 (package
7830 (name "jupyter")
7831 (version "1.0.0")
7832 (source
7833 (origin
7834 (method url-fetch)
7835 (uri (pypi-uri "jupyter" version))
7836 (sha256
7837 (base32
7838 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7839 (build-system python-build-system)
7840 ;; FIXME: it's not clear how to run the tests.
7841 (arguments `(#:tests? #f))
7842 (propagated-inputs
7843 `(("python-ipykernel" ,python-ipykernel)
7844 ("python-ipywidgets" ,python-ipywidgets)
7845 ("python-jupyter-console" ,python-jupyter-console)
7846 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7847 ("python-notebook" ,python-notebook)))
c27ae827
RW
7848 (home-page "http://jupyter.org")
7849 (synopsis "Web application for interactive documents")
7850 (description
7851 "The Jupyter Notebook is a web application that allows you to create and
7852share documents that contain live code, equations, visualizations and
7853explanatory text. Uses include: data cleaning and transformation, numerical
7854simulation, statistical modeling, machine learning and much more.")
7855 (license license:bsd-3)))
7856
816a6538
LC
7857(define-public python-chardet
7858 (package
7859 (name "python-chardet")
7860 (version "2.3.0")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (string-append
7865 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7866 version
7867 ".tar.gz"))
7868 (sha256
7869 (base32
7870 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7871 (build-system python-build-system)
816a6538
LC
7872 (home-page "https://github.com/chardet/chardet")
7873 (synopsis "Universal encoding detector for Python 2 and 3")
7874 (description
7875 "This package provides @code{chardet}, a Python module that can
7876automatically detect a wide range of file encodings.")
3f641af0 7877 (license license:lgpl2.1+)))
816a6538
LC
7878
7879(define-public python2-chardet
7880 (package-with-python2 python-chardet))
2fc5f186 7881
1872f1bb
KM
7882(define-public python-docopt
7883 (package
7884 (name "python-docopt")
7885 (version "0.6.2")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 ;; The release on PyPI does not include tests.
7890 (uri (string-append
7891 "https://github.com/docopt/docopt/archive/"
7892 version ".tar.gz"))
7893 (file-name (string-append name "-" version ".tar.gz"))
7894 (sha256
7895 (base32
7896 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7897 (build-system python-build-system)
7898 (native-inputs
f3b98f4f 7899 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7900 (arguments
7901 `(#:phases (alist-replace
7902 'check
7903 (lambda _ (zero? (system* "py.test")))
7904 %standard-phases)))
7905 (home-page "http://docopt.org")
7906 (synopsis "Command-line interface description language for Python")
7907 (description "This library allows the user to define a command-line
7908interface from a program's help message rather than specifying it
7909programatically with command-line parsers like @code{getopt} and
7910@code{argparse}.")
7911 (license license:expat)))
7912
7913(define-public python2-docopt
7914 (package-with-python2 python-docopt))
7915
2fc5f186
LF
7916(define-public python-zope-event
7917 (package
7918 (name "python-zope-event")
7919 (version "4.1.0")
7920 (source
7921 (origin
7922 (method url-fetch)
7923 (uri (string-append "https://pypi.python.org/packages/source/z"
7924 "/zope.event/zope.event-" version ".tar.gz"))
7925 (sha256
7926 (base32
7927 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7928 (build-system python-build-system)
2fc5f186
LF
7929 (home-page "http://pypi.python.org/pypi/zope.event")
7930 (synopsis "Event publishing system for Python")
7931 (description "Zope.event provides an event publishing API, intended for
7932use by applications which are unaware of any subscribers to their events. It
7933is a simple event-dispatching system on which more sophisticated event
7934dispatching systems can be built.")
3f641af0 7935 (license license:zpl2.1)))
2fc5f186
LF
7936
7937(define-public python2-zope-event
7938 (package-with-python2 python-zope-event))
97abe268
LF
7939
7940(define-public python-zope-interface
7941 (package
7942 (name "python-zope-interface")
7943 (version "4.1.3")
7944 (source
7945 (origin
7946 (method url-fetch)
7947 (uri (string-append "https://pypi.python.org/packages/source/z"
7948 "/zope.interface/zope.interface-" version ".tar.gz"))
7949 (sha256
7950 (base32
7951 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7952 (build-system python-build-system)
38d480a8 7953 (native-inputs
97abe268
LF
7954 `(("python-zope-event" ,python-zope-event)))
7955 (home-page "https://github.com/zopefoundation/zope.interface")
7956 (synopsis "Python implementation of the \"design by contract\"
7957methodology")
7958 (description "Zope.interface provides an implementation of \"object
7959interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7960conforming to a given API or contract.")
3f641af0 7961 (license license:zpl2.1)))
97abe268
LF
7962
7963(define-public python2-zope-interface
7964 (package-with-python2 python-zope-interface))
81f2373c
LF
7965
7966(define-public python-zope-exceptions
7967 (package
7968 (name "python-zope-exceptions")
7969 (version "4.0.8")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (string-append "https://pypi.python.org/packages/source/z"
7974 "/zope.exceptions/zope.exceptions-"
7975 version ".tar.gz"))
7976 (sha256
7977 (base32
7978 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7979 (build-system python-build-system)
7980 (arguments
7981 '(#:tests? #f)) ; circular dependency with zope.testrunner
7982 (propagated-inputs
7983 `(("python-zope-interface" ,python-zope-interface)))
7984 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7985 (synopsis "Zope exceptions")
7986 (description "Zope.exceptions provides general-purpose exception types
7987that have uses outside of the Zope framework.")
3f641af0 7988 (license license:zpl2.1)))
81f2373c
LF
7989
7990(define-public python2-zope-exceptions
7991 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7992
7993(define-public python-zope-testing
7994 (package
7995 (name "python-zope-testing")
7996 (version "4.5.0")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (string-append "https://pypi.python.org/packages/source/z"
8001 "/zope.testing/zope.testing-" version ".tar.gz"))
8002 (sha256
8003 (base32
b02f7a21
HG
8004 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8005 (modules '((guix build utils)))
8006 (snippet
8007 '(begin
8008 ;; Remove pre-compiled .pyc files backup files from source.
8009 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8010 #t))))
900e3c0e
LF
8011 (build-system python-build-system)
8012 (native-inputs
8013 `(("python-zope-exceptions" ,python-zope-exceptions)))
8014 (propagated-inputs
8015 `(("python-zope-interface" ,python-zope-interface)))
8016 (home-page "http://pypi.python.org/pypi/zope.testing")
8017 (synopsis "Zope testing helpers")
8018 (description "Zope.testing provides a number of testing utilities for HTML
8019forms, HTTP servers, regular expressions, and more.")
3f641af0 8020 (license license:zpl2.1)))
900e3c0e
LF
8021
8022(define-public python2-zope-testing
8023 (package-with-python2 python-zope-testing))
01614c4f
LF
8024
8025(define-public python-zope-testrunner
8026 (package
8027 (name "python-zope-testrunner")
8028 (version "4.4.9")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (string-append "https://pypi.python.org/packages/source/z"
8033 "/zope.testrunner/zope.testrunner-"
8034 version ".zip"))
8035 (sha256
8036 (base32
8037 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8038 (build-system python-build-system)
385871e5
MB
8039 (arguments
8040 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8041 (native-inputs
8042 `(("python-six" ,python-six)
e408ffc3 8043 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8044 ("python-zope-exceptions" ,python-zope-exceptions)
8045 ("python-zope-testing" ,python-zope-testing)
8046 ("unzip" ,unzip)))
8047 (propagated-inputs
8048 `(("python-zope-interface" ,python-zope-interface)))
8049 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8050 (synopsis "Zope testrunner script")
8051 (description "Zope.testrunner provides a script for running Python
8052tests.")
3f641af0 8053 (license license:zpl2.1)))
01614c4f
LF
8054
8055(define-public python2-zope-testrunner
8056 (let ((base (package-with-python2 python-zope-testrunner)))
8057 (package
8058 (inherit base)
8059 (native-inputs
8060 (append (package-native-inputs base)
8061 `(("python2-subunit" ,python2-subunit)
8062 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8063
8064(define-public python-zope-i18nmessageid
8065 (package
8066 (name "python-zope-i18nmessageid")
8067 (version "4.0.3")
8068 (source
8069 (origin
8070 (method url-fetch)
8071 (uri (string-append
8072 "https://pypi.python.org/packages/source/z"
8073 "/zope.i18nmessageid/zope.i18nmessageid-"
8074 version ".tar.gz"))
8075 (sha256
8076 (base32
8077 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8078 (build-system python-build-system)
6a5c710c
LF
8079 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8080 (synopsis "Message identifiers for internationalization")
8081 (description "Zope.i18nmessageid provides facilities for declaring
8082internationalized messages within program source text.")
3f641af0 8083 (license license:zpl2.1)))
6a5c710c
LF
8084
8085(define-public python2-zope-i18nmessageid
8086 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8087
8088(define-public python-zope-schema
8089 (package
8090 (name "python-zope-schema")
8091 (version "4.4.2")
8092 (source
8093 (origin
8094 (method url-fetch)
8095 (uri (string-append "https://pypi.python.org/packages/source/z"
8096 "/zope.schema/zope.schema-" version ".tar.gz"))
8097 (sha256
8098 (base32
8099 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8100 (build-system python-build-system)
22dba2ef
MB
8101 (arguments
8102 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8103 (propagated-inputs
8104 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8105 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8106 ("python-zope-interface" ,python-zope-interface)))
8107 (native-inputs
47f77210
HG
8108 `(("python-zope-testing" ,python-zope-testing)
8109 ("python-coverage" ,python-coverage)
8110 ("python-nose" ,python-nose)))
71fb09f3
LF
8111 (home-page "http://pypi.python.org/pypi/zope.schema")
8112 (synopsis "Zope data schemas")
8113 (description "Zope.scheme provides extensions to zope.interface for
8114defining data schemas.")
3f641af0 8115 (license license:zpl2.1)))
71fb09f3
LF
8116
8117(define-public python2-zope-schema
8118 (package-with-python2 python-zope-schema))
fbac9b17
LF
8119
8120(define-public python-zope-configuration
8121 (package
8122 (name "python-zope-configuration")
8123 (version "4.0.3")
8124 (source (origin
8125 (method url-fetch)
8126 (uri (string-append "https://pypi.python.org/packages/source/z"
8127 "/zope.configuration/zope.configuration-"
8128 version ".tar.gz"))
8129 (sha256
8130 (base32
8131 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8132 (build-system python-build-system)
7e8b1bfa
MB
8133 (arguments
8134 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8135 (propagated-inputs
8136 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8137 ("python-zope-schema" ,python-zope-schema)))
8138 (home-page "http://pypi.python.org/pypi/zope.configuration")
8139 (synopsis "Zope Configuration Markup Language")
8140 (description "Zope.configuration implements ZCML, the Zope Configuration
8141Markup Language.")
3f641af0 8142 (license license:zpl2.1)))
fbac9b17
LF
8143
8144(define-public python2-zope-configuration
8145 (package-with-python2 python-zope-configuration))
2ad52086
LF
8146
8147(define-public python-zope-proxy
8148 (package
8149 (name "python-zope-proxy")
8150 (version "4.1.6")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (string-append "https://pypi.python.org/packages/source/z"
8155 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8156 (sha256
8157 (base32
8158 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8159 (build-system python-build-system)
66b3aadb
MB
8160 (arguments
8161 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8162 (propagated-inputs
8163 `(("python-zope-interface" ,python-zope-interface)))
8164 (home-page "http://pypi.python.org/pypi/zope.proxy")
8165 (synopsis "Generic, transparent proxies")
8166 (description "Zope.proxy provides generic, transparent proxies for Python.
8167Proxies are special objects which serve as mostly-transparent wrappers around
8168another object, intervening in the apparent behavior of the wrapped object
8169only when necessary to apply the policy (e.g., access checking, location
8170brokering, etc.) for which the proxy is responsible.")
3f641af0 8171 (license license:zpl2.1)))
2ad52086
LF
8172
8173(define-public python2-zope-proxy
8174 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8175
8176(define-public python-zope-location
8177 (package
8178 (name "python-zope-location")
8179 (version "4.0.3")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (string-append "https://pypi.python.org/packages/source/z"
8184 "/zope.location/zope.location-" version ".tar.gz"))
8185 (sha256
8186 (base32
8187 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8188 (build-system python-build-system)
40bb8e07
MB
8189 (arguments
8190 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8191 (propagated-inputs
f404b5ea
LF
8192 `(("python-zope-proxy" ,python-zope-proxy)
8193 ("python-zope-schema" ,python-zope-schema)))
8194 (home-page "http://pypi.python.org/pypi/zope.location/")
8195 (synopsis "Zope location library")
8196 (description "Zope.location implements the concept of \"locations\" in
8197Zope3, which are are special objects that have a structural location.")
3f641af0 8198 (license license:zpl2.1)))
f404b5ea
LF
8199
8200(define-public python2-zope-location
8201 (package-with-python2 python-zope-location))
d4b77f36
LF
8202
8203(define-public python-zope-security
8204 (package
8205 (name "python-zope-security")
8206 (version "4.0.3")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (string-append "https://pypi.python.org/packages/source/z"
8211 "/zope.security/zope.security-" version ".tar.gz"))
8212 (sha256
8213 (base32
8214 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8215 (build-system python-build-system)
a74f9b12
MB
8216 (arguments
8217 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8218 (propagated-inputs
8219 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8220 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8221 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8222 (native-inputs
8223 `(("python-six" ,python-six)
8224 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8225 ("python-zope-configuration" ,python-zope-configuration)
8226 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8227 ("python-zope-testrunner" ,python-zope-testrunner)
8228 ("python-zope-testing" ,python-zope-testing)))
8229 (home-page "http://pypi.python.org/pypi/zope.security")
8230 (synopsis "Zope security framework")
8231 (description "Zope.security provides a generic mechanism to implement
8232security policies on Python objects.")
3f641af0 8233 (license license:zpl2.1)))
d4b77f36
LF
8234
8235(define-public python2-zope-security
04417662
EF
8236 (let ((zope-security (package-with-python2 python-zope-security)))
8237 (package (inherit zope-security)
8238 (propagated-inputs
8239 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8240 ,@(alist-delete
8241 "python-zope-testrunner"
8242 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8243
8244(define-public python-zope-component
8245 (package
8246 (name "python-zope-component")
8247 (version "4.2.2")
8248 (source
8249 (origin
8250 (method url-fetch)
8251 (uri (string-append "https://pypi.python.org/packages/source/z"
8252 "/zope.component/zope.component-" version ".tar.gz"))
8253 (sha256
8254 (base32
8255 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8256 (build-system python-build-system)
8257 (arguments
8258 ;; Skip tests due to circular dependency with python-zope-security.
8259 '(#:tests? #f))
8260 (native-inputs
8261 `(("python-zope-testing" ,python-zope-testing)))
8262 (propagated-inputs
8263 `(("python-zope-event" ,python-zope-event)
8264 ("python-zope-interface" ,python-zope-interface)
8265 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8266 ("python-zope-configuration" ,python-zope-configuration)))
8267 (home-page "https://github.com/zopefoundation/zope.component")
8268 (synopsis "Zope Component Architecture")
8269 (description "Zope.component represents the core of the Zope Component
8270Architecture. Together with the zope.interface package, it provides
8271facilities for defining, registering and looking up components.")
3f641af0 8272 (license license:zpl2.1)))
a6b61b27
LF
8273
8274(define-public python2-zope-component
8275 (package-with-python2 python-zope-component))
3859ac12 8276
1ae44b80 8277(define-public python-pythondialog
b5f218be 8278 (package
1ae44b80 8279 (name "python-pythondialog")
42c4b246 8280 (version "3.4.0")
b5f218be
LF
8281 (source
8282 (origin
8283 (method url-fetch)
1ae44b80 8284 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8285 (sha256
8286 (base32
1ae44b80 8287 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8288 (build-system python-build-system)
8289 (arguments
8290 `(#:phases
8291 (modify-phases %standard-phases
8292 (add-after 'unpack 'patch-path
8293 (lambda* (#:key inputs #:allow-other-keys)
8294 (let* ((dialog (assoc-ref inputs "dialog")))
8295 ;; Since this library really wants to grovel the search path, we
8296 ;; must hardcode dialog's store path into it.
8297 (substitute* "dialog.py"
8298 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8299 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8300 #t))))
b5f218be
LF
8301 #:tests? #f)) ; no test suite
8302 (propagated-inputs
8303 `(("dialog" ,dialog)))
8304 (home-page "http://pythondialog.sourceforge.net/")
8305 (synopsis "Python interface to the UNIX dialog utility")
8306 (description "A Python wrapper for the dialog utility. Its purpose is to
8307provide an easy to use, pythonic and comprehensive Python interface to dialog.
8308This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8309 (license license:lgpl2.1)
1ae44b80
LF
8310 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8311
8312(define-public python2-pythondialog
8313 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8314 (package
8315 (inherit base)
8316 (version (package-version python-pythondialog))
8317 (source (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "python2-pythondialog" version))
8320 (sha256
8321 (base32
8322 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8323
3859ac12
LF
8324(define-public python-pyrfc3339
8325 (package
8326 (name "python-pyrfc3339")
d9aa097b 8327 (version "1.0")
3859ac12
LF
8328 (source
8329 (origin
8330 (method url-fetch)
d9aa097b 8331 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8332 (sha256
8333 (base32
d9aa097b 8334 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8335 (build-system python-build-system)
8336 (propagated-inputs
8337 `(("python-pytz" ,python-pytz)))
8338 (native-inputs
f3b98f4f 8339 `(("python-nose" ,python-nose)))
3859ac12
LF
8340 (home-page "https://github.com/kurtraschke/pyRFC3339")
8341 (synopsis "Python timestamp library")
8342 (description "Python library for generating and parsing RFC 3339-compliant
8343timestamps.")
8344 (license license:expat)))
8345
8346(define-public python2-pyrfc3339
8347 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8348
8349(define-public python-werkzeug
8350 (package
8351 (name "python-werkzeug")
bbb99d6b 8352 (version "0.11.15")
5eea2005
LF
8353 (source
8354 (origin
8355 (method url-fetch)
4b47cbfa 8356 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8357 (sha256
8358 (base32
bbb99d6b 8359 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8360 (build-system python-build-system)
8361 (native-inputs
8362 `(("python-pytest" ,python-pytest)))
8363 (home-page "http://werkzeug.pocoo.org/")
8364 (synopsis "Utilities for WSGI applications")
8365 (description "One of the most advanced WSGI utility modules. It includes a
8366powerful debugger, full-featured request and response objects, HTTP utilities to
8367handle entity tags, cache control headers, HTTP dates, cookie handling, file
8368uploads, a powerful URL routing system and a bunch of community-contributed
8369addon modules.")
3f641af0 8370 (license license:x11)))
5eea2005
LF
8371
8372(define-public python2-werkzeug
8373 (package-with-python2 python-werkzeug))
99fffa8a
LF
8374
8375(define-public python-configobj
8376 (package
8377 (name "python-configobj")
8378 (version "5.0.6")
8379 (source (origin
8380 (method url-fetch)
8381 (uri (string-append
8382 "https://pypi.python.org/packages/source/c/configobj/"
8383 "configobj-" version ".tar.gz"))
8384 (sha256
8385 (base32
8386 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8387 ;; Patch setup.py so it looks for python-setuptools, which is
8388 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8389 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8390 (build-system python-build-system)
861f70c9 8391 (propagated-inputs
f3b98f4f 8392 `(("python-six" ,python-six)))
99fffa8a
LF
8393 (synopsis "Config file reading, writing and validation")
8394 (description "ConfigObj is a simple but powerful config file reader and
8395writer: an ini file round tripper. Its main feature is that it is very easy to
8396use, with a straightforward programmer’s interface and a simple syntax for
8397config files.")
8398 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8399 (license license:bsd-3)))
99fffa8a
LF
8400
8401(define-public python2-configobj
8402 (package-with-python2 python-configobj))
79e8a291
LF
8403
8404(define-public python-configargparse
8405 (package
8406 (name "python-configargparse")
8407 (version "0.10.0")
8408 (source (origin
8409 (method url-fetch)
8410 (uri (string-append
8411 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8412 "ConfigArgParse-" version ".tar.gz"))
8413 (sha256
8414 (base32
8415 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8416 (build-system python-build-system)
8417 (arguments
8418 ;; FIXME: Bug in test suite filed upstream:
8419 ;; https://github.com/bw2/ConfigArgParse/issues/32
8420 '(#:tests? #f))
8421 (synopsis "Replacement for argparse")
8422 (description "A drop-in replacement for argparse that allows options to also
8423be set via config files and/or environment variables.")
8424 (home-page "https://github.com/bw2/ConfigArgParse")
8425 (license license:expat)))
8426
8427(define-public python2-configargparse
8428 (package-with-python2 python-configargparse))
ab41f979
LF
8429
8430(define-public python-ndg-httpsclient
8431 (package
8432 (name "python-ndg-httpsclient")
ae476d01 8433 (version "0.4.2")
ab41f979
LF
8434 (source (origin
8435 (method url-fetch)
7be13d00 8436 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8437 (sha256
8438 (base32
ae476d01 8439 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8440 (build-system python-build-system)
a39cc016
LF
8441 (arguments
8442 '(;; The tests appear to require networking.
8443 #:tests? #f))
ab41f979
LF
8444 (propagated-inputs
8445 `(("python-pyopenssl" ,python-pyopenssl)))
8446 (synopsis "HTTPS support for Python's httplib and urllib2")
8447 (description "This is a HTTPS client implementation for httplib and urllib2
8448based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8449over the default provided with Python and importantly enables full verification
8450of the SSL peer.")
8451 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8452 (license license:bsd-3)))
ab41f979
LF
8453
8454;; python2-openssl requires special care, so package-with-python2 is
8455;; insufficient.
8456(define-public python2-ndg-httpsclient
8457 (package (inherit python-ndg-httpsclient)
8458 (name "python2-ndg-httpsclient")
8459 (arguments `(#:python ,python-2))
8460 (propagated-inputs
8461 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8462
8463(define-public python-contextlib2
8464 (package
8465 (name "python-contextlib2")
8466 (version "0.4.0")
8467 (source
8468 (origin
8469 (method url-fetch)
8470 (uri (pypi-uri "contextlib2" version))
8471 (sha256
8472 (base32
8473 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8474 (build-system python-build-system)
8475 (arguments
8476 `(#:phases
8477 (modify-phases %standard-phases
8478 (replace 'check
8479 (lambda _ (zero?
8480 (system*
b3546174 8481 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8482 (home-page "http://contextlib2.readthedocs.org/")
8483 (synopsis "Tools for decorators and context managers")
8484 (description "This module is primarily a backport of the Python
84853.2 contextlib to earlier Python versions. Like contextlib, it
8486provides utilities for common tasks involving decorators and context
8487managers. It also contains additional features that are not part of
8488the standard library.")
3f641af0 8489 (license license:psfl)))
03f964a5
CM
8490
8491(define-public python2-contextlib2
8492 (package-with-python2 python-contextlib2))
210bf497
DT
8493
8494(define-public python-texttable
8495 (package
8496 (name "python-texttable")
8497 (version "0.8.4")
8498 (source
8499 (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "texttable" version))
8502 (sha256
8503 (base32
8504 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8505 (build-system python-build-system)
8506 (arguments '(#:tests? #f)) ; no tests
8507 (home-page "https://github.com/foutaise/texttable/")
8508 (synopsis "Python module for creating simple ASCII tables")
8509 (description "Texttable is a Python module for creating simple ASCII
8510tables.")
3f641af0 8511 (license license:lgpl2.1+)))
210bf497
DT
8512
8513(define-public python2-texttable
8514 (package-with-python2 python-texttable))
67c52bb3
DT
8515
8516(define-public python-websocket-client
8517 (package
8518 (name "python-websocket-client")
6b810897 8519 (version "0.37.0")
67c52bb3
DT
8520 (source
8521 (origin
8522 (method url-fetch)
6b810897 8523 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8524 (sha256
8525 (base32
6b810897 8526 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8527 (build-system python-build-system)
a5333f7c
HG
8528 (propagated-inputs
8529 `(("python-six" ,python-six)))
67c52bb3
DT
8530 (home-page "https://github.com/liris/websocket-client")
8531 (synopsis "WebSocket client for Python")
8532 (description "The Websocket-client module provides the low level APIs for
8533WebSocket usage in Python programs.")
3f641af0 8534 (license license:lgpl2.1+)))
67c52bb3
DT
8535
8536(define-public python2-websocket-client
8537 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8538
8539(define-public python-atomicwrites
8540 (package
8541 (name "python-atomicwrites")
4e92d76a 8542 (version "1.1.0")
5c6eea2a
LF
8543 (source (origin
8544 (method url-fetch)
8545 (uri (pypi-uri "atomicwrites" version))
8546 (sha256
8547 (base32
4e92d76a 8548 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
8549 (build-system python-build-system)
8550 (synopsis "Atomic file writes in Python")
8551 (description "Library for atomic file writes using platform dependent tools
8f65585b 8552for atomic file system operations.")
5c6eea2a 8553 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8554 (license license:expat)))
9bb6d184
LF
8555
8556(define-public python2-atomicwrites
f210e944 8557 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8558
8559(define-public python-requests-toolbelt
8560 (package
8561 (name "python-requests-toolbelt")
c02af1c8 8562 (version "0.6.2")
561bb3cb
LF
8563 (source (origin
8564 (method url-fetch)
c02af1c8
LF
8565 (uri (string-append
8566 "https://pypi.python.org/packages/"
8567 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8568 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8569 (sha256
8570 (base32
c02af1c8 8571 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8572 (build-system python-build-system)
759aadd4
LF
8573 (native-inputs
8574 `(("python-betamax" ,python-betamax)
8575 ("python-mock" ,python-mock)
8576 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8577 (propagated-inputs
8578 `(("python-requests" ,python-requests)))
8579 (synopsis "Extensions to python-requests")
8580 (description "This is a toolbelt of useful classes and functions to be used
8581with python-requests.")
8582 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8583 (license license:asl2.0)))
d1deb90b
LF
8584
8585(define-public python-click-threading
8586 (package
8587 (name "python-click-threading")
3d2e0dbc 8588 (version "0.2.0")
d1deb90b
LF
8589 (source (origin
8590 (method url-fetch)
3d2e0dbc
LF
8591 (uri (string-append
8592 "https://pypi.python.org/packages/"
8593 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8594 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8595 (sha256
8596 (base32
3d2e0dbc 8597 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8598 (build-system python-build-system)
8599 (propagated-inputs
8600 `(("python-click" ,python-click)))
8601 (synopsis "Utilities for multithreading in Click")
8602 (description "This package provides utilities for multithreading in Click
8603applications.")
8604 (home-page "https://github.com/click-contrib/click-threading")
8605 (license license:expat)))
7b17cab9
LF
8606
8607(define-public python-click-log
8608 (package
8609 (name "python-click-log")
42734b9a 8610 (version "0.1.8")
7b17cab9
LF
8611 (source (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "click-log" version))
8614 (sha256
8615 (base32
42734b9a 8616 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8617 (build-system python-build-system)
8618 (propagated-inputs
8619 `(("python-click" ,python-click)))
8620 (synopsis "Logging for click applications")
8621 (description "This package provides a Python library for logging Click
8622applications.")
8623 (home-page "https://github.com/click-contrib/click-log")
8624 (license license:expat)))
7b3a4ee4
LF
8625
8626(define-public python-apipkg
8627 (package
8628 (name "python-apipkg")
8629 (version "1.4")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "apipkg" version))
8633 (sha256
8634 (base32
8635 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8636 (build-system python-build-system)
328bb95d 8637 (native-inputs
7b3a4ee4
LF
8638 `(("python-pytest" ,python-pytest)))
8639 (synopsis "Namespace control and lazy-import mechanism")
8640 (description "With apipkg you can control the exported namespace of a Python
8641package and greatly reduce the number of imports for your users. It is a small
8642pure Python module that works on virtually all Python versions.")
8643 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8644 (license license:expat)))
e08739c3
CAW
8645
8646(define-public python2-apipkg
f210e944 8647 (package-with-python2 python-apipkg))
848964fe
LF
8648
8649(define-public python-execnet
8650 (package
8651 (name "python-execnet")
8652 (version "1.4.1")
8653 (source (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "execnet" version))
8656 (sha256
8657 (base32
8658 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8659 (build-system python-build-system)
ca0eee9d
LF
8660 (arguments
8661 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8662 ;; The two test failures are caused by the lack of an `ssh` executable.
8663 ;; The test suite can be run with pytest after the 'install' phase.
8664 #:tests? #f))
848964fe 8665 (native-inputs
ca0eee9d
LF
8666 `(("python-pytest" ,python-pytest)
8667 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8668 (propagated-inputs
848964fe
LF
8669 `(("python-apipkg" ,python-apipkg)))
8670 (synopsis "Rapid multi-Python deployment")
8671 (description "Execnet provides a share-nothing model with
8672channel-send/receive communication for distributing execution across many
8673Python interpreters across version, platform and network barriers. It has a
8674minimal and fast API targetting the following uses:
8675@enumerate
8676@item distribute tasks to (many) local or remote CPUs
8677@item write and deploy hybrid multi-process applications
8678@item write scripts to administer multiple environments
8679@end enumerate")
8680 (home-page "http://codespeak.net/execnet/")
f210e944 8681 (license license:expat)))
16c84f90
CAW
8682
8683(define-public python2-execnet
f210e944 8684 (package-with-python2 python-execnet))
6720dbb4 8685
d5bbf806 8686(define-public python-trollius-redis
8687 (package
8688 (name "python-trollius-redis")
8689 (version "0.1.4")
8690 (source
8691 (origin
8692 (method url-fetch)
8693 (uri (pypi-uri "trollius_redis" version))
8694 (sha256
8695 (base32
8696 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8697 (build-system python-build-system)
97b62eb0
MB
8698 ;; TODO: Tests require packaging 'hiredis'.
8699 (arguments '(#:tests? #f))
d5bbf806 8700 (home-page "https://github.com/benjolitz/trollius-redis")
8701 (synopsis "Port of asyncio-redis to trollius")
8702 (description "@code{trollius-redis} is a Redis client for Python
8703 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8704 Redis protocol.")
8705 (license license:bsd-2)))
8706
8707(define-public python2-trollius-redis
8708 (package-with-python2 python-trollius-redis))
8709
6720dbb4
LF
8710;;; The software provided by this package was integrated into pytest 2.8.
8711(define-public python-pytest-cache
8712 (package
8713 (name "python-pytest-cache")
8714 (version "1.0")
8715 (source (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "pytest-cache" version))
8718 (sha256
8719 (base32
8720 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8721 (build-system python-build-system)
f22efa01 8722 (propagated-inputs
630d938f
EF
8723 `(("python-apipkg" ,python-apipkg)
8724 ("python-execnet" ,python-execnet)
8725 ("python-py" ,python-py)
8726 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8727 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8728 (description "The pytest-cache plugin provides tools to rerun failures from
8729the last py.test invocation.")
8730 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8731 (license license:expat)))
0adc21c2
EF
8732
8733(define-public python2-pytest-cache
f210e944 8734 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8735
8736(define-public python-pytest-localserver
8737 (package
8738 (name "python-pytest-localserver")
29f20168 8739 (version "0.3.5")
d7e729fe
LF
8740 (source (origin
8741 (method url-fetch)
29f20168 8742 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8743 (sha256
8744 (base32
29f20168 8745 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8746 (build-system python-build-system)
8747 (arguments
8748 `(#:phases (modify-phases %standard-phases
8749 (replace 'check
8750 (lambda _
8751 (zero? (system* "py.test" "--genscript=runtests.py"))
8752 (zero? (system* "py.test")))))))
8753 (native-inputs
d7e729fe
LF
8754 `(("python-pytest" ,python-pytest)
8755 ("python-requests" ,python-requests)
9ba40f05 8756 ("python-six" ,python-six)))
f22efa01 8757 (propagated-inputs
9ba40f05 8758 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8759 (synopsis "Py.test plugin to test server connections locally")
8760 (description "Pytest-localserver is a plugin for the pytest testing
8761framework which enables you to test server connections locally.")
8762 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8763 (license license:expat)))
28cecbb7
LF
8764
8765(define-public python-wsgi-intercept
8766 (package
8767 (name "python-wsgi-intercept")
909fbd2b 8768 (version "1.2.2")
28cecbb7
LF
8769 (source (origin
8770 (method url-fetch)
909fbd2b
LF
8771 (uri (string-append
8772 "https://pypi.python.org/packages/"
8773 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8774 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8775 (sha256
8776 (base32
909fbd2b 8777 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8778 (build-system python-build-system)
b9fc496f
HG
8779 (propagated-inputs
8780 `(("python-six" ,python-six)))
28cecbb7 8781 (native-inputs
9d813ec1 8782 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8783 ("python-httplib2" ,python-httplib2)
8784 ("python-requests" ,python-requests)
8757f050 8785 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8786 (synopsis "Puts a WSGI application in place of a real URI for testing")
8787 (description "Wsgi_intercept installs a WSGI application in place of a real
8788URI for testing. Testing a WSGI application normally involves starting a
8789server at a local host and port, then pointing your test code to that address.
8790Instead, this library lets you intercept calls to any specific host/port
8791combination and redirect them into a WSGI application importable by your test
8792program. Thus, you can avoid spawning multiple processes or threads to test
8793your Web app.")
8794 (home-page "https://github.com/cdent/wsgi-intercept")
8795 (license license:expat)))
89b8a551
LF
8796
8797(define-public python-pytest-xprocess
8798 (package
8799 (name "python-pytest-xprocess")
8800 (version "0.9.1")
8801 (source (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "pytest-xprocess" version))
8804 (sha256
8805 (base32
8806 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8807 (build-system python-build-system)
8808 (propagated-inputs
8809 `(("python-pytest" ,python-pytest)
8810 ("python-pytest-cache" ,python-pytest-cache)
8811 ("python-psutil" ,python-psutil)))
8812 (synopsis "Pytest plugin to manage external processes across test runs")
8813 (description "Pytest-xprocess is an experimental py.test plugin for managing
8814processes across test runs.")
8815 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8816 (license license:expat)))
5c299bf0
LF
8817
8818(define-public python-icalendar
8819 (package
8820 (name "python-icalendar")
b611d018 8821 (version "3.11.3")
5c299bf0
LF
8822 (source (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "icalendar" version))
8825 (sha256
8826 (base32
b611d018 8827 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
5c299bf0
LF
8828 (build-system python-build-system)
8829 (propagated-inputs
22d7360b 8830 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8831 ("python-pytz" ,python-pytz)))
8832 (synopsis "Python library for parsing iCalendar files")
8833 (description "The icalendar package is a parser/generator of iCalendar
8834files for use with Python.")
8835 (home-page "https://github.com/collective/icalendar")
3f641af0 8836 (license license:bsd-2)))
6bbbb53e
LF
8837
8838(define-public python-sphinxcontrib-newsfeed
8839 (package
8840 (name "python-sphinxcontrib-newsfeed")
8841 (version "0.1.4")
8842 (source (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8845 (sha256
8846 (base32
8847 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8848 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8849 (build-system python-build-system)
8850 (propagated-inputs
251ed7f2 8851 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8852 (synopsis "News Feed extension for Sphinx")
8853 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8854Blog, News or Announcements section to a Sphinx website.")
8855 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8856 (license license:bsd-2)))
2216e15c
SB
8857
8858(define-public python-args
8859 (package
8860 (name "python-args")
8861 (version "0.1.0")
8862 (source (origin
8863 (method url-fetch)
8864 (uri (pypi-uri "args" version))
8865 (sha256
8866 (base32
8867 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8868 (build-system python-build-system)
2216e15c
SB
8869 (home-page "https://github.com/kennethreitz/args")
8870 (synopsis "Command-line argument parser")
8871 (description
8872 "This library provides a Python module to parse command-line arguments.")
3f641af0 8873 (license license:bsd-3)))
2216e15c
SB
8874
8875(define-public python2-args
8876 (package-with-python2 python-args))
c06a3de9
SB
8877
8878(define-public python-clint
8879 (package
8880 (name "python-clint")
8881 (version "0.5.1")
8882 (source (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "clint" version))
8885 (sha256
8886 (base32
8887 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8888 (build-system python-build-system)
6145b604
MB
8889 (arguments
8890 '(#:phases
8891 (modify-phases %standard-phases
8892 (replace 'check
8893 (lambda _
8894 (zero? (system* "py.test" "-v")))))))
8895 (native-inputs
8896 `(("python-pytest" ,python-pytest)))
f22efa01 8897 (propagated-inputs
f3b98f4f 8898 `(("python-args" ,python-args)))
c06a3de9
SB
8899 (home-page "https://github.com/kennethreitz/clint")
8900 (synopsis "Command-line interface tools")
8901 (description
8902 "Clint is a Python module filled with a set of tools for developing
8903command-line applications, including tools for colored and indented
8904output, progress bar display, and pipes.")
3f641af0 8905 (license license:isc)))
c06a3de9
SB
8906
8907(define-public python2-clint
8908 (package-with-python2 python-clint))
4ecdeef8
SB
8909
8910(define-public python-astor
8911 (package
8912 (name "python-astor")
8913 (version "0.5")
8914 (source (origin
8915 (method url-fetch)
8916 (uri (pypi-uri "astor" version))
8917 (sha256
8918 (base32
8919 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8920 (build-system python-build-system)
4ecdeef8
SB
8921 (home-page "https://github.com/berkerpeksag/astor")
8922 (synopsis "Read and write Python ASTs")
8923 (description
8924 "Astor is designed to allow easy manipulation of Python source via the
8925Abstract Syntax Tree.")
3f641af0 8926 (license license:bsd-3)))
4ecdeef8
SB
8927
8928(define-public python2-astor
8929 (package-with-python2 python-astor))
e224b7d0
SB
8930
8931(define-public python-rply
8932 (package
8933 (name "python-rply")
8934 (version "0.7.4")
8935 (source (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "rply" version))
8938 (sha256
8939 (base32
8940 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8941 (build-system python-build-system)
f22efa01 8942 (propagated-inputs
f3b98f4f 8943 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8944 (home-page "https://github.com/alex/rply")
8945 (synopsis "Parser generator for Python")
8946 (description
8947 "This package provides a pure Python based parser generator, that also
8948works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8949with a new public API, and RPython support.")
3f641af0 8950 (license license:bsd-3)))
e224b7d0
SB
8951
8952(define-public python2-rply
8953 (package-with-python2 python-rply))
c3e919d7
SB
8954
8955(define-public python-hy
8956 (package
8957 (name "python-hy")
8958 (version "0.11.1")
8959 (source (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "hy" version))
8962 (sha256
8963 (base32
8964 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8965 (build-system python-build-system)
15c37077
MB
8966 (arguments
8967 '(#:phases
8968 (modify-phases %standard-phases
8969 (replace 'check
8970 (lambda _
8971 ;; Tests require write access to HOME.
8972 (setenv "HOME" "/tmp")
8973 (zero? (system* "nosetests")))))))
8974 (native-inputs
8975 `(("python-coverage" ,python-coverage)
8976 ("python-nose" ,python-nose)))
f22efa01 8977 (propagated-inputs
c3e919d7
SB
8978 `(("python-astor" ,python-astor)
8979 ("python-clint" ,python-clint)
f3b98f4f 8980 ("python-rply" ,python-rply)))
c3e919d7
SB
8981 (home-page "http://hylang.org/")
8982 (synopsis "Lisp frontend to Python")
8983 (description
8984 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8985its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8986Python at your fingertips, in Lisp form.")
8987 (license license:expat)))
8988
8989(define-public python2-hy
8990 (package-with-python2 python-hy))
7a5b944e 8991
81f7f297
EF
8992(define-public python-rauth
8993 (package
8994 (name "python-rauth")
8995 (version "0.7.2")
8996 (source
8997 (origin
8998 (method url-fetch)
8999 (uri (pypi-uri "rauth" version))
9000 (sha256
9001 (base32
9002 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9003 (build-system python-build-system)
9004 (arguments
9005 `(#:test-target "check"))
f22efa01 9006 (propagated-inputs
81f7f297
EF
9007 `(("python-requests" ,python-requests)))
9008 (home-page "https://github.com/litl/rauth")
9009 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9010 (description
9011 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9012provides service wrappers for convenient connection initialization and
9013authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9014 (license license:expat)
9015 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9016
9017(define-public python2-rauth
0848d8d3
EF
9018 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9019 (package
9020 (inherit base)
00e10c6e 9021 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9022 ,@(package-native-inputs base))))))
81f7f297 9023
1abe448d
EF
9024(define-public python2-functools32
9025 (package
9026 (name "python2-functools32")
9027 (version "3.2.3-2")
9028 (source
9029 (origin
9030 (method url-fetch)
9031 (uri (pypi-uri "functools32" version))
9032 (sha256
9033 (base32
9034 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9035 (build-system python-build-system)
9036 (arguments
9037 `(#:python ,python-2
9038 #:tests? #f)) ; no test target
1abe448d
EF
9039 (home-page "https://github.com/MiCHiLU/python-functools32")
9040 (synopsis
9041 "Backport of the functools module from Python 3.2.3")
9042 (description
9043 "This package is a backport of the @code{functools} module from Python
90443.2.3 for use with older versions of Python and PyPy.")
9045 (license license:expat)))
9046
877889f3 9047(define-public python2-futures
7a5b944e 9048 (package
877889f3 9049 (name "python2-futures")
7a5b944e
EF
9050 (version "3.0.3")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "futures" version))
9055 (sha256
9056 (base32
9057 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9058 (build-system python-build-system)
877889f3 9059 (arguments `(#:python ,python-2))
7a5b944e
EF
9060 (home-page "https://github.com/agronholm/pythonfutures")
9061 (synopsis
9062 "Backport of the concurrent.futures package from Python 3.2")
9063 (description
9064 "The concurrent.futures module provides a high-level interface for
9065asynchronously executing callables. This package backports the
9066concurrent.futures package from Python 3.2")
3f641af0 9067 (license license:bsd-3)))
7a5b944e 9068
5cb2fe44
EF
9069(define-public python-promise
9070 (package
9071 (name "python-promise")
9072 (version "0.4.2")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "promise" version))
9077 (sha256
9078 (base32
9079 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9080 (build-system python-build-system)
9081 ;; Tests wants python-futures, which is a python2 only program, and
9082 ;; can't be found by python-promise at test time.
9083 (arguments `(#:tests? #f))
9084 (home-page "https://github.com/syrusakbary/promise")
9085 (synopsis "Promises/A+ implementation for Python")
9086 (description
9087 "Promises/A+ implementation for Python")
9088 (properties `((python2-variant . ,(delay python2-promise))))
9089 (license license:expat)))
9090
9091(define-public python2-promise
9092 (let ((promise (package-with-python2
9093 (strip-python2-variant python-promise))))
9094 (package (inherit promise)
9095 (arguments (substitute-keyword-arguments (package-arguments promise)
9096 ((#:tests? _) #t)))
9097 (native-inputs
9098 `(("python2-futures" ,python2-futures)
9099 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9100 ,@(package-native-inputs promise))))))
9101
c18f6368
EF
9102(define-public python-urllib3
9103 (package
9104 (name "python-urllib3")
6178274d 9105 (version "1.18.1")
c18f6368
EF
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "urllib3" version))
9110 (sha256
9111 (base32
6178274d 9112 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9113 (build-system python-build-system)
9114 (arguments `(#:tests? #f))
9115 (native-inputs
f3b98f4f 9116 `(;; some packages for tests
c18f6368
EF
9117 ("python-nose" ,python-nose)
9118 ("python-mock" ,python-mock)
9119 ("python-tornado" ,python-tornado)))
9120 (propagated-inputs
8322749a 9121 `(;; extra packages for https security
c18f6368
EF
9122 ("python-certifi" ,python-certifi)
9123 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9124 ("python-pyasn1" ,python-pyasn1)
9125 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9126 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9127 (synopsis "HTTP library with thread-safe connection pooling")
9128 (description
9129 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9130can reuse the same socket connection for multiple requests, it can POST files,
9131supports url redirection and retries, and also gzip and deflate decoding.")
9132 (license license:expat)))
9133
9134(define-public python2-urllib3
9135 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9136
9137(define-public python-colorama
9138 (package
9139 (name "python-colorama")
f92576f9 9140 (version "0.3.7")
2b2f2fc1
DT
9141 (source
9142 (origin
9143 (method url-fetch)
9144 (uri (pypi-uri "colorama" version))
9145 (sha256
9146 (base32
f92576f9 9147 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9148 (build-system python-build-system)
46e110cc 9149 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9150 (description "Colorama is a Python library for rendering colored terminal
9151text.")
9152 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9153 (license license:bsd-3)))
2b2f2fc1
DT
9154
9155(define-public python2-colorama
9156 (package-with-python2 python-colorama))
f5bcec6e
DT
9157
9158(define-public python-rsa
9159 (package
9160 (name "python-rsa")
ecd68c53 9161 (version "3.4.2")
f5bcec6e
DT
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "rsa" version))
9166 (sha256
9167 (base32
ecd68c53 9168 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9169 (build-system python-build-system)
f22efa01 9170 (propagated-inputs
f3b98f4f 9171 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9172 (synopsis "Pure-Python RSA implementation")
9173 (description "Python-RSA is a pure-Python RSA implementation. It supports
9174encryption and decryption, signing and verifying signatures, and key
9175generation according to PKCS#1 version 1.5. It can be used as a Python
9176library as well as on the command line.")
9177 (home-page "http://stuvel.eu/rsa")
3f641af0 9178 (license license:asl2.0)))
f5bcec6e
DT
9179
9180(define-public python2-rsa
9181 (package-with-python2 python-rsa))
c0aacfa5
DT
9182
9183(define-public python-pluggy
9184 (package
9185 (name "python-pluggy")
9186 (version "0.3.1")
9187 (source
9188 (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "pluggy" version))
9191 (sha256
9192 (base32
9193 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9194 (build-system python-build-system)
c0aacfa5
DT
9195 (synopsis "Plugin and hook calling mechanism for Python")
9196 (description "Pluggy is an extraction of the plugin manager as used by
9197Pytest but stripped of Pytest specific details.")
9198 (home-page "https://pypi.python.org/pypi/pluggy")
9199 (license license:expat)))
9200
9201(define-public python2-pluggy
9202 (package-with-python2 python-pluggy))
a4af21ca
DT
9203
9204(define-public python-tox
9205 (package
9206 (name "python-tox")
9207 (version "2.3.1")
9208 (source
9209 (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "tox" version))
9212 (sha256
9213 (base32
9214 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9215 (build-system python-build-system)
9216 (arguments
7ba07edf
HG
9217 ;; FIXME: Tests require pytest-timeout, which itself requires
9218 ;; pytest>=2.8.0 for installation.
a4af21ca 9219 '(#:tests? #f))
482d9591
HG
9220 (propagated-inputs
9221 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9222 ("python-py" ,python-py)
482d9591 9223 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9224 (native-inputs
7ba07edf
HG
9225 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9226 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9227 (home-page "http://tox.testrun.org/")
9228 (synopsis "Virtualenv-based automation of test activities")
9229 (description "Tox is a generic virtualenv management and test command line
9230tool. It can be used to check that a package installs correctly with
9231different Python versions and interpreters, or run tests in each type of
9232supported environment, or act as a frontend to continuous integration
9233servers.")
9234 (license license:expat)))
9235
9236(define-public python2-tox
9237 (package-with-python2 python-tox))
ba9da248
DT
9238
9239(define-public python-jmespath
9240 (package
9241 (name "python-jmespath")
9242 (version "0.9.0")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "jmespath" version))
9247 (sha256
9248 (base32
9249 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9250 (build-system python-build-system)
52a75a83
MB
9251 (native-inputs
9252 `(("python-nose" ,python-nose)))
ba9da248
DT
9253 (synopsis "JSON Matching Expressions")
9254 (description "JMESPath (pronounced “james path”) is a Python library that
9255allows one to declaratively specify how to extract elements from a JSON
9256document.")
9257 (home-page "https://github.com/jmespath/jmespath.py")
9258 (license license:expat)))
9259
9260(define-public python2-jmespath
9261 (package-with-python2 python-jmespath))
935fcd5c
DT
9262
9263(define-public python-botocore
9264 (package
9265 (name "python-botocore")
0a7d96f8 9266 (version "1.5.10")
935fcd5c
DT
9267 (source
9268 (origin
9269 (method url-fetch)
9270 (uri (pypi-uri "botocore" version))
9271 (sha256
9272 (base32
0a7d96f8 9273 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
935fcd5c 9274 (build-system python-build-system)
877fdac9
MB
9275 (arguments
9276 ;; FIXME: Many tests are failing.
9277 '(#:tests? #f))
482d9591 9278 (propagated-inputs
22d7360b 9279 `(("python-dateutil" ,python-dateutil)
935fcd5c 9280 ("python-docutils" ,python-docutils)
482d9591 9281 ("python-jmespath" ,python-jmespath)))
8fa6890b 9282 (native-inputs
482d9591 9283 `(("python-mock" ,python-mock)
935fcd5c 9284 ("python-nose" ,python-nose)
482d9591 9285 ("behave" ,behave)
935fcd5c 9286 ("python-tox" ,python-tox)
482d9591 9287 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9288 (home-page "https://github.com/boto/botocore")
9289 (synopsis "Low-level interface to AWS")
9290 (description "Botocore is a Python library that provides a low-level
9291interface to the Amazon Web Services (AWS) API.")
3f641af0 9292 (license license:asl2.0)))
935fcd5c
DT
9293
9294(define-public python2-botocore
9295 (package-with-python2 python-botocore))
f861b8b8
DT
9296
9297(define-public awscli
9298 (package
9299 (name "awscli")
a9c15e8b 9300 (version "1.11.47")
f861b8b8
DT
9301 (source
9302 (origin
9303 (method url-fetch)
d5ccf71e 9304 (uri (pypi-uri name version))
f861b8b8
DT
9305 (sha256
9306 (base32
a9c15e8b 9307 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
f861b8b8 9308 (build-system python-build-system)
482d9591 9309 (propagated-inputs
f861b8b8 9310 `(("python-colorama" ,python-colorama)
482d9591
HG
9311 ("python-botocore" ,python-botocore)
9312 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9313 ("python-docutils" ,python-docutils)
482d9591 9314 ("python-rsa" ,python-rsa)))
619bfd81
MB
9315 (arguments
9316 ;; FIXME: The 'pypi' release does not contain tests.
9317 '(#:tests? #f))
60a8be3a 9318 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9319 (synopsis "Command line client for AWS")
9320 (description "AWS CLI provides a unified command line interface to the
9321Amazon Web Services (AWS) API.")
3f641af0 9322 (license license:asl2.0)))
6a44697d
LF
9323
9324(define-public python-hypothesis
9325 (package
9326 (name "python-hypothesis")
bea6d94d 9327 (version "3.1.0")
6a44697d
LF
9328 (source (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "hypothesis" version))
9331 (sha256
9332 (base32
bea6d94d 9333 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9334 (build-system python-build-system)
bd100c71 9335 (native-inputs
6a44697d
LF
9336 `(("python-flake8" ,python-flake8)
9337 ("python-pytest" ,python-pytest)))
9338 (synopsis "Library for property based testing")
9339 (description "Hypothesis is a library for testing your Python code against a
9340much larger range of examples than you would ever want to write by hand. It’s
9341based on the Haskell library, Quickcheck, and is designed to integrate
9342seamlessly into your existing Python unit testing work flow.")
9343 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9344 (license license:mpl2.0)
6f068e08 9345 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9346
9347(define-public python2-hypothesis
6f068e08
EF
9348 (let ((hypothesis (package-with-python2
9349 (strip-python2-variant python-hypothesis))))
9350 (package (inherit hypothesis)
9351 (native-inputs
bd100c71
MB
9352 `(("python2-enum34" ,python2-enum34)
9353 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9354
9355(define-public python-pytest-subtesthack
9356 (package
9357 (name "python-pytest-subtesthack")
9358 (version "0.1.1")
9359 (source (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "pytest-subtesthack" version))
9362 (sha256
9363 (base32
9364 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9365 (build-system python-build-system)
7517e73c
LF
9366 (propagated-inputs
9367 `(("python-pytest" ,python-pytest)))
9368 (synopsis "Set-up and tear-down fixtures for unit tests")
9369 (description "This plugin allows you to set up and tear down fixtures within
9370unit test functions that use @code{py.test}. This is useful for using
9371@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9372function multiple times, without setting up or tearing down fixture state as is
9373normally the case.")
9374 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9375 (license license:unlicense)))
7517e73c
LF
9376
9377(define-public python2-pytest-subtesthack
9378 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9379
7637de23 9380(define-public python-xdo
0bdc1671 9381 (package
7637de23 9382 (name "python-xdo")
e871c332 9383 (version "0.3")
0bdc1671
CAW
9384 (source (origin
9385 (method url-fetch)
9386 (uri (string-append
9387 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9388 "python-xdo_" version ".orig.tar.gz"))
9389 (sha256
9390 (base32
e871c332 9391 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9392 (build-system python-build-system)
9393 (arguments
736cfc10
SB
9394 '(#:phases
9395 (modify-phases %standard-phases
9396 (add-before 'install 'patch-libxdo-path
9397 ;; Hardcode the path of dynamically loaded libxdo library.
9398 (lambda* (#:key inputs #:allow-other-keys)
9399 (let ((libxdo (string-append
9400 (assoc-ref inputs "xdotool")
9401 "/lib/libxdo.so")))
9402 (substitute* "xdo/_xdo.py"
9403 (("find_library\\(\"xdo\"\\)")
9404 (simple-format #f "\"~a\"" libxdo)))
9405 #t))))
9406 #:tests? #f)) ; no tests provided
0b5e0863
SB
9407 (propagated-inputs
9408 `(("python-six" ,python-six)))
0bdc1671
CAW
9409 (inputs
9410 `(("xdotool" ,xdotool)
9411 ("libX11" ,libx11)))
9412 (home-page "https://tracker.debian.org/pkg/python-xdo")
9413 (synopsis "Python library for simulating X11 keyboard/mouse input")
9414 (description "Provides bindings to libxdo for manipulating X11 via simulated
9415input. (Note that this is mostly a legacy library; you may wish to look at
9416python-xdo for newer bindings.)")
3f641af0 9417 (license license:bsd-3)))
0bdc1671 9418
7637de23
LF
9419(define-public python2-xdo
9420 (package-with-python2 python-xdo))
9421
cb34dc6c
CAW
9422(define-public python-wtforms
9423 (package
9424 (name "python-wtforms")
9425 (version "2.1")
9426 (source
9427 (origin
9428 (method url-fetch)
9429 (uri (pypi-uri "WTForms" version ".zip"))
9430 (sha256
9431 (base32
9432 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9433 (build-system python-build-system)
13c4d874
EF
9434 (arguments
9435 '(#:phases
9436 (modify-phases %standard-phases
9437 (add-after 'unpack 'remove-django-test
9438 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9439 (lambda _
9440 (substitute*
9441 "tests/runtests.py"
9442 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9443 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9444 #t)))))
cb34dc6c
CAW
9445 (native-inputs
9446 `(("unzip" ,unzip)))
9447 (home-page "http://wtforms.simplecodes.com/")
9448 (synopsis
9449 "Form validation and rendering library for Python web development")
9450 (description
9451 "WTForms is a flexible forms validation and rendering library
9452for Python web development. It is very similar to the web form API
9453available in Django, but is a standalone package.")
f210e944 9454 (license license:bsd-3)))
cb34dc6c
CAW
9455
9456(define-public python2-wtforms
f210e944 9457 (package-with-python2 python-wtforms))
50aaec25
DT
9458
9459(define-public python-mako
9460 (package
9461 (name "python-mako")
3753f2e6 9462 (version "1.0.6")
50aaec25
DT
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "Mako" version))
9467 (sha256
9468 (base32
3753f2e6 9469 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9470 (build-system python-build-system)
482d9591
HG
9471 (propagated-inputs
9472 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9473 (native-inputs
482d9591 9474 `(("python-mock" ,python-mock)
e435af5c
MB
9475 ("python-nose" ,python-nose)
9476 ("python-pytest" ,python-pytest)))
50aaec25
DT
9477 (home-page "http://www.makotemplates.org/")
9478 (synopsis "Templating language for Python")
9479 (description "Mako is a templating language for Python that compiles
9480templates into Python modules.")
f210e944 9481 (license license:expat)))
50aaec25
DT
9482
9483(define-public python2-mako
f210e944 9484 (package-with-python2 python-mako))
ae00a41f
CAW
9485
9486(define-public python-waitress
9487 (package
9488 (name "python-waitress")
9489 (version "0.8.10")
9490 (source
9491 (origin
9492 (method url-fetch)
9493 (uri (pypi-uri "waitress" version))
9494 (sha256
9495 (base32
9496 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9497 (build-system python-build-system)
9498 (home-page "https://github.com/Pylons/waitress")
9499 (synopsis "Waitress WSGI server")
9500 (description "Waitress is meant to be a production-quality pure-Python WSGI
9501server with very acceptable performance.")
f210e944 9502 (license license:zpl2.1)))
ae00a41f
CAW
9503
9504(define-public python2-waitress
f210e944 9505 (package-with-python2 python-waitress))
778a284b
CAW
9506
9507(define-public python-wsgiproxy2
9508 (package
9509 (name "python-wsgiproxy2")
9510 (version "0.4.2")
9511 (source
9512 (origin
9513 (method url-fetch)
9514 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9515 (sha256
9516 (base32
9517 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9518 (build-system python-build-system)
e359b31a
LF
9519 (arguments
9520 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9521 ;; support Python 3:
9522 ;; https://github.com/benoitc/restkit/issues/140
9523 #:tests? #f))
778a284b
CAW
9524 (native-inputs
9525 `(("unzip" ,unzip)
9526 ("python-nose" ,python-nose)
9527 ("python-coverage" ,python-coverage)))
9528 (propagated-inputs
9529 `(("python-six" ,python-six)
9530 ("python-webob" ,python-webob)))
9531 (home-page
9532 "https://github.com/gawel/WSGIProxy2/")
9533 (synopsis "WSGI Proxy with various http client backends")
9534 (description "WSGI turns HTTP requests into WSGI function calls.
9535WSGIProxy turns WSGI function calls into HTTP requests.
9536It also includes code to sign requests and pass private data,
9537and to spawn subprocesses to handle requests.")
f210e944 9538 (license license:expat)))
778a284b
CAW
9539
9540(define-public python2-wsgiproxy2
f210e944 9541 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9542
9543(define-public python-pastedeploy
9544 (package
9545 (name "python-pastedeploy")
9546 (version "1.5.2")
9547 (source
9548 (origin
9549 (method url-fetch)
9550 (uri (pypi-uri "PasteDeploy" version))
9551 (sha256
9552 (base32
9553 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9554 (build-system python-build-system)
9555 (native-inputs
9556 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9557 (home-page "http://pythonpaste.org/deploy/")
9558 (synopsis
9559 "Load, configure, and compose WSGI applications and servers")
9560 (description
9561 "This tool provides code to load WSGI applications and servers from URIs;
9562these URIs can refer to Python Eggs for INI-style configuration files. Paste
9563Script provides commands to serve applications based on this configuration
9564file.")
9565 (license license:expat)))
9566
9567(define-public python2-pastedeploy
9568 (package-with-python2 python-pastedeploy))
1cf53652 9569
c4a7904c
CAW
9570(define-public python-paste
9571 (package
9572 (name "python-paste")
ba1731da 9573 (version "2.0.3")
c4a7904c
CAW
9574 (source
9575 (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "Paste" version))
9578 (sha256
9579 (base32
ba1731da 9580 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9581 (patches (search-patches "python-paste-remove-website-test.patch"
9582 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9583 (build-system python-build-system)
9584 (native-inputs
9585 `(("python-nose" ,python-nose)))
9586 (propagated-inputs
f3b98f4f 9587 `(("python-six" ,python-six)))
c4a7904c
CAW
9588 (home-page "http://pythonpaste.org")
9589 (synopsis
9590 "Python web development tools, focusing on WSGI")
9591 (description
9592 "Paste provides a variety of web development tools and middleware which
9593can be nested together to build web applications. Paste's design closely
9594follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9595 (license license:expat)))
c4a7904c
CAW
9596
9597(define-public python2-paste
ba1731da 9598 (package-with-python2 python-paste))
c4a7904c 9599
a8f20f63
CAW
9600(define-public python-pastescript
9601 (package
9602 (name "python-pastescript")
9603 (version "2.0.2")
9604 (source
9605 (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "PasteScript" version))
9608 (sha256
9609 (base32
9610 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9611 (build-system python-build-system)
9612 (native-inputs
9613 `(("python-nose" ,python-nose)))
9614 (propagated-inputs
f3b98f4f 9615 `(("python-paste" ,python-paste)
a8f20f63
CAW
9616 ("python-pastedeploy" ,python-pastedeploy)))
9617 (home-page "http://pythonpaste.org/script/")
9618 (arguments
9619 '(;; Unfortunately, this requires the latest unittest2,
9620 ;; but that requires traceback2 which requires linecache2 which requires
9621 ;; unittest2. So we're skipping tests for now.
9622 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9623 ;; so in theory we could get around this situation somehow.)
9624 #:tests? #f))
9625 (synopsis
9626 "Pluggable command line tool for serving web applications and more")
9627 (description
9628 "PasteScript is a plugin-friendly command line tool which provides a
9629variety of features, from launching web applications to bootstrapping project
9630layouts.")
9631 (license license:expat)))
9632
9633(define-public python2-pastescript
9634 (package-with-python2 python-pastescript))
9635
1cf53652
CAW
9636(define-public python-pyquery
9637 (package
9638 (name "python-pyquery")
ab0c3429 9639 (version "1.2.17")
1cf53652
CAW
9640 (source
9641 (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "pyquery" version))
9644 (sha256
9645 (base32
ab0c3429 9646 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9647 (build-system python-build-system)
2ddbfa8c
LF
9648 (native-inputs
9649 `(("python-webob" ,python-webob)
9650 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9651 (propagated-inputs
9652 `(("python-lxml" ,python-lxml)
9653 ("python-cssselect" ,python-cssselect)))
9654 (home-page "https://github.com/gawel/pyquery")
9655 (synopsis "Make jQuery-like queries on xml documents")
9656 (description "pyquery allows you to make jQuery queries on xml documents.
9657The API is as much as possible the similar to jQuery. pyquery uses lxml for
9658fast xml and html manipulation.")
f210e944 9659 (license license:bsd-3)))
1cf53652
CAW
9660
9661(define-public python2-pyquery
f210e944 9662 (package-with-python2 python-pyquery))
aa6313d6
CAW
9663
9664(define-public python-webtest
9665 (package
9666 (name "python-webtest")
9667 (version "2.0.20")
9668 (source
9669 (origin
9670 (method url-fetch)
9671 (uri (pypi-uri "WebTest" version))
9672 (sha256
9673 (base32
9674 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9675 (build-system python-build-system)
9676 (arguments
9677 `(;; Unfortunately we have to disable tests!
9678 ;; This release of WebTest is pinned to python-nose < 1.3,
9679 ;; but older versions of python-nose are plagued with the following
9680 ;; bug(s), which rears its ugly head during test execution:
9681 ;; https://github.com/nose-devs/nose/issues/759
9682 ;; https://github.com/nose-devs/nose/pull/811
9683 #:tests? #f))
9684 ;; Commented out code is no good, but in this case, once tests
9685 ;; are ready to be enabled again, we should put the following
9686 ;; in place:
9687 ;; (native-inputs
9688 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9689 ;; ; but see above comment
9690 ;; ("python-coverage" ,python-coverage)
9691 ;; ("python-mock" ,python-mock)
9692 ;; ("python-pastedeploy" ,python-pastedeploy)
9693 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9694 ;; ("python-pyquery" ,python-pyquery)))
9695 (propagated-inputs
9696 `(("python-waitress" ,python-waitress)
9697 ("python-webob" ,python-webob)
9698 ("python-six" ,python-six)
9699 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9700 (home-page "http://webtest.pythonpaste.org/")
9701 (synopsis "Helper to test WSGI applications")
9702 (description "Webtest allows you to test your Python web applications
9703without starting an HTTP server. It supports anything that supports the
9704minimum of WSGI.")
f210e944 9705 (license license:expat)))
aa6313d6
CAW
9706
9707(define-public python2-webtest
f210e944 9708 (package-with-python2 python-webtest))
4cb122cd
CAW
9709
9710(define-public python-anyjson
9711 (package
9712 (name "python-anyjson")
9713 (version "0.3.3")
9714 (source
9715 (origin
9716 (method url-fetch)
9717 (uri (pypi-uri "anyjson" version))
9718 (sha256
9719 (base32
9720 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9721 (build-system python-build-system)
9722 (arguments
9723 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9724 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9725 ;; whatever) so this transformation needs to be done before the tests
9726 ;; can be run. Maybe we could add a build step to transform beforehand
9727 ;; but it could be annoying/difficult.
9728 ;; We can enable tests for the Python 2 version, though, and do below.
9729 #:tests? #f))
9730 (home-page "http://bitbucket.org/runeh/anyjson/")
9731 (synopsis
9732 "Wraps best available JSON implementation in a common interface")
9733 (description
9734 "Anyjson loads whichever is the fastest JSON module installed
9735and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9736 (license license:bsd-3)
4cb122cd
CAW
9737 (properties `((python2-variant . ,(delay python2-anyjson))))))
9738
9739(define-public python2-anyjson
9740 (let ((anyjson (package-with-python2
9741 (strip-python2-variant python-anyjson))))
9742 (package
9743 (inherit anyjson)
9744 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9745 #:tests? #t
9746 ,@(package-arguments anyjson)))
00e10c6e 9747 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9748
9749(define-public python-amqp
9750 (package
9751 (name "python-amqp")
9752 (version "1.4.9")
9753 (source
9754 (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "amqp" version))
9757 (sha256
9758 (base32
9759 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9760 (build-system python-build-system)
9761 (native-inputs
9762 `(("python-nose" ,python-nose)
9763 ("python-mock" ,python-mock)))
9764 (home-page "http://github.com/celery/py-amqp")
9765 (synopsis
9766 "Low-level AMQP client for Python (fork of amqplib)")
9767 (description
9768 "This is a fork of amqplib which was originally written by Barry Pederson.
9769It is maintained by the Celery project, and used by kombu as a pure python
9770alternative when librabbitmq is not available.")
3f641af0 9771 (license license:lgpl2.1+)
8dfceab7
CAW
9772 (properties `((python2-variant . ,(delay python2-amqp))))))
9773
9774(define-public python2-amqp
9775 (let ((amqp (package-with-python2
9776 (strip-python2-variant python-amqp))))
9777 (package
9778 (inherit amqp)
9779 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9780 ;; unmaintained. Weirdly, does not do this on the python 3
9781 ;; version?
9782 #:tests? #f
00e10c6e 9783 ,@(package-arguments amqp))))))
7d387305
CAW
9784
9785(define-public python-kombu
9786 (package
9787 (name "python-kombu")
0cb59822 9788 (version "3.0.37")
7d387305
CAW
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (pypi-uri "kombu" version))
9793 (sha256
9794 (base32
0cb59822 9795 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9796 (build-system python-build-system)
9797 (native-inputs
9798 `(("python-mock" ,python-mock)
9799 ("python-nose" ,python-nose)))
9800 (propagated-inputs
9801 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9802 ("python-amqp" ,python-amqp)
9803 ("python-redis" ,python-redis)))
7d387305
CAW
9804 (home-page "http://kombu.readthedocs.org")
9805 (synopsis "Message passing library for Python")
9806 (description "The aim of Kombu is to make messaging in Python as easy as
9807possible by providing an idiomatic high-level interface for the AMQ protocol,
9808and also provide proven and tested solutions to common messaging problems.
9809AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9810message orientation, queuing, routing, reliability and security, for which the
9811RabbitMQ messaging server is the most popular implementation.")
3f641af0 9812 (license license:bsd-3)
7d387305
CAW
9813 (properties `((python2-variant . ,(delay python2-kombu))))))
9814
9815(define-public python2-kombu
9816 (let ((kombu (package-with-python2
9817 (strip-python2-variant python-kombu))))
9818 (package
9819 (inherit kombu)
752eb9e0
MB
9820 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9821 ;; It works fine on the python3 variant.
9822 #:tests? #f
9823 ,@(package-arguments kombu)))
328bb95d
HG
9824 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9825 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9826
9827(define-public python-billiard
9828 (package
9829 (name "python-billiard")
a6bb9e44 9830 (version "3.3.0.23")
b6f0b9fb
CAW
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "billiard" version))
9835 (sha256
9836 (base32
a6bb9e44 9837 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9838 (build-system python-build-system)
9839 (native-inputs
9840 `(("python-nose" ,python-nose)))
9841 (home-page "http://github.com/celery/billiard")
9842 (synopsis
9843 "Python multiprocessing fork with improvements and bugfixes")
9844 (description
9845 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9846multiprocessing package itself is a renamed and updated version of R Oudkerk's
9847pyprocessing package. This standalone variant is intended to be compatible with
9848Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9849 (license license:bsd-3)
b6f0b9fb
CAW
9850 (properties `((python2-variant . ,(delay python2-billiard))))))
9851
9852(define-public python2-billiard
9853 (let ((billiard (package-with-python2
9854 (strip-python2-variant python-billiard))))
9855 (package
9856 (inherit billiard)
00e10c6e 9857 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9858 ("python2-mock" ,python2-mock)
9859 ,@(package-native-inputs billiard))))))
22df6419
CAW
9860
9861(define-public python-celery
9862 (package
9863 (name "python-celery")
9ebe87fe 9864 (version "3.1.24")
22df6419
CAW
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "celery" version))
9869 (sha256
9870 (base32
9ebe87fe 9871 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9872 (build-system python-build-system)
9ebe87fe
LF
9873 (arguments
9874 `(#:phases
9875 (modify-phases %standard-phases
9876 ;; These tests break with Python 3.5:
9877 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9878 (replace 'check
9879 (lambda _
9880 (zero?
9881 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9882 (native-inputs
9883 `(("python-nose" ,python-nose)))
f22efa01 9884 (propagated-inputs
22df6419
CAW
9885 `(("python-pytz" ,python-pytz)
9886 ("python-billiard" ,python-billiard)
9887 ("python-kombu" ,python-kombu)))
9888 (home-page "http://celeryproject.org")
9889 (synopsis "Distributed Task Queue")
9890 (description "Celery is an asynchronous task queue/job queue based on
9891distributed message passing. It is focused on real-time operation, but
9892supports scheduling as well. The execution units, called tasks, are executed
9893concurrently on a single or more worker servers using multiprocessing,
9894Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9895synchronously (wait until ready).")
3f641af0 9896 (license license:bsd-3)
22df6419
CAW
9897 (properties `((python2-variant . ,(delay python2-celery))))))
9898
9899(define-public python2-celery
9900 (let ((celery (package-with-python2
9901 (strip-python2-variant python-celery))))
9902 (package
9903 (inherit celery)
00e10c6e 9904 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9905 ("python2-mock" ,python2-mock)
9906 ,@(package-native-inputs celery))))))
97e32948
CAW
9907
9908(define-public python-translitcodec
9909 (package
9910 (name "python-translitcodec")
9911 (version "0.4.0")
9912 (source
9913 (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "translitcodec" version))
9916 (sha256
9917 (base32
9918 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9919 (build-system python-build-system)
9920 (arguments
9921 `(#:tests? #f)) ; no tests provided
9922 (home-page
9923 "https://github.com/claudep/translitcodec")
9924 (synopsis
9925 "Unicode to 8-bit charset transliteration codec")
9926 (description
9927 "This package contains codecs for transliterating ISO 10646 texts into
9928best-effort representations using smaller coded character sets (ASCII,
9929ISO 8859, etc.).")
f210e944 9930 (license license:expat)))
97e32948
CAW
9931
9932(define-public python2-translitcodec
f210e944 9933 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9934
9935(define-public python-editor
9936 (package
9937 (name "python-editor")
9938 (version "0.5")
9939 (source
9940 (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "python-editor" version))
9943 (sha256
9944 (base32
9945 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9946 (build-system python-build-system)
9947 (home-page
9948 "https://github.com/fmoo/python-editor")
9949 (synopsis
9950 "Programmatically open an editor, capture the result")
9951 (description
9952 "python-editor is a library that provides the editor module for
9953programmatically interfacing with your system's $EDITOR.")
f210e944 9954 (license license:asl2.0)))
0c3b90d4
CAW
9955
9956(define-public python2-editor
f210e944 9957 (package-with-python2 python-editor))
3276517c
LF
9958
9959(define-public python-sphinxcontrib-programoutput
9960 (package
9961 (name "python-sphinxcontrib-programoutput")
9962 (version "0.8")
9963 (source (origin
9964 (method url-fetch)
9965 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9966 (sha256
9967 (base32
9968 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9969 (build-system python-build-system)
e2cb140e
MB
9970 (arguments
9971 ;; FIXME: Many tests are failing and the upstream is gone.
9972 '(#:tests? #f))
3276517c 9973 (propagated-inputs
a0a09859 9974 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9975 (synopsis "Sphinx extension to include program output")
9976 (description "A Sphinx extension to literally insert the output of arbitrary
9977commands into documents, helping you to keep your command examples up to date.")
9978 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9979 (license license:bsd-2)))
3276517c
LF
9980
9981(define-public python2-sphinxcontrib-programoutput
f210e944 9982 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9983
9984(define-public python-sphinx-repoze-autointerface
9985 (package
9986 (name "python-sphinx-repoze-autointerface")
328ae341 9987 (version "0.8")
548d7165
LF
9988 (source (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9991 (sha256
9992 (base32
328ae341 9993 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 9994 (build-system python-build-system)
5b3c3d4b 9995 (arguments '(#:tests? #f)) ; No tests.
548d7165 9996 (propagated-inputs
47c7dc4a 9997 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9998 ("python-zope-interface" ,python-zope-interface)))
9999 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10000 (description "This package defines an extension for the Sphinx documentation
10001system. The extension allows generation of API documentation by
10002introspection of @code{zope.interface} instances in code.")
10003 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10004 (license license:repoze)))
548d7165
LF
10005
10006(define-public python2-sphinx-repoze-autointerface
10007 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10008
10009(define-public python-psycopg2
10010 (package
10011 (name "python-psycopg2")
10012 (version "2.6.1")
10013 (source
10014 (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "psycopg2" version))
10017 (sha256
10018 (base32
10019 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
10020 (build-system python-build-system)
10021 (arguments
10022 ;; Tests would require a postgresql database "psycopg2_test"
10023 ;; and a running postgresql database management service.
10024 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10025 (inputs
10026 `(("postgresql" ,postgresql))) ; libpq
10027 (home-page "http://initd.org/psycopg/")
10028 (synopsis "Python PostgreSQL adapter")
10029 (description
10030 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10031 (license license:lgpl3+)))
b31fbea5
DM
10032
10033(define-public python2-psycopg2
f210e944 10034 (package-with-python2 python-psycopg2))
eed1a61f
LF
10035
10036(define-public python-vobject
10037 (package
10038 (name "python-vobject")
9bed9b15 10039 (version "0.9.2")
eed1a61f
LF
10040 (source (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "vobject" version))
10043 (sha256
10044 (base32
9bed9b15 10045 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 10046 (build-system python-build-system)
a9871b7b
LF
10047 (arguments
10048 '(;; The test suite relies on some non-portable Windows interfaces.
10049 #:tests? #f))
f22efa01 10050 (propagated-inputs
22d7360b 10051 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10052 ("python-pyicu" ,python-pyicu)))
10053 (synopsis "Parse and generate vCard and vCalendar files")
10054 (description "Vobject is intended to be a full featured Python package for
10055parsing and generating vCard and vCalendar files. Currently, iCalendar files
10056are supported and well tested. vCard 3.0 files are supported, and all data
10057should be imported, but only a few components are understood in a sophisticated
10058way.")
10059 (home-page "http://eventable.github.io/vobject/")
f210e944 10060 (license license:asl2.0)))
eed1a61f
LF
10061
10062(define-public python2-vobject
f210e944 10063 (package-with-python2 python-vobject))
cedac813
LF
10064
10065(define-public python-munkres
10066 (package
10067 (name "python-munkres")
38e81a2c 10068 (version "1.0.8")
cedac813
LF
10069 (source (origin
10070 (method url-fetch)
10071 (uri (pypi-uri "munkres" version))
10072 (sha256
10073 (base32
38e81a2c 10074 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10075 (build-system python-build-system)
10076 (arguments
10077 '(#:tests? #f)) ; no test suite
10078 (home-page "http://software.clapper.org/munkres/")
10079 (synopsis "Implementation of the Munkres algorithm")
10080 (description "The Munkres module provides an implementation of the Munkres
10081algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10082useful for solving the Assignment Problem.")
3f641af0 10083 (license license:bsd-3)))
cedac813
LF
10084
10085(define-public python2-munkres
10086 (package-with-python2 python-munkres))
f3b3d78f
LF
10087
10088(define-public python-flask
10089 (package
10090 (name "python-flask")
c6c80104 10091 (version "0.11.1")
f3b3d78f
LF
10092 (source (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "Flask" version))
10095 (sha256
10096 (base32
c6c80104 10097 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10098 (build-system python-build-system)
10099 (propagated-inputs
10100 `(("python-itsdangerous" ,python-itsdangerous)
10101 ("python-jinja2" ,python-jinja2)
8f35c030 10102 ("python-click" ,python-click)
f3b3d78f
LF
10103 ("python-werkzeug" ,python-werkzeug)))
10104 (home-page "https://github.com/mitsuhiko/flask/")
10105 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10106 (description "Flask is a micro web framework based on the Werkzeug toolkit
10107and Jinja2 template engine. It is called a micro framework because it does not
10108presume or force a developer to use a particular tool or library.")
f210e944 10109 (license license:bsd-3)))
f3b3d78f
LF
10110
10111(define-public python2-flask
f210e944 10112 (package-with-python2 python-flask))
603d665b 10113
a7ad802b 10114(define-public python-flask-wtf
10115 (package
10116 (name "python-flask-wtf")
10117 (version "0.13.1")
10118 (source
10119 (origin
10120 (method url-fetch)
10121 (uri (pypi-uri "Flask-WTF" version))
10122 (sha256
10123 (base32
10124 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10125 (build-system python-build-system)
d296d300
MB
10126 (arguments
10127 '(#:phases
10128 (modify-phases %standard-phases
10129 (add-before 'check 'drop-failing-test
10130 (lambda _
10131 ;; FIXME: This file tries resolving an external server, which
10132 ;; fails. Try to patch out the offending section instead of
10133 ;; deleting the whole thing.
10134 (delete-file "tests/test_recaptcha.py")
10135 #t)))))
a7ad802b 10136 (propagated-inputs
10137 `(("python-flask-babel" ,python-flask-babel)
10138 ("python-babel" ,python-babel)
10139 ("python-wtforms" ,python-wtforms)))
10140 (native-inputs
10141 `(("python-nose" ,python-nose)))
10142 (home-page "https://github.com/lepture/flask-wtf")
10143 (synopsis "Simple integration of Flask and WTForms")
10144 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10145upload, and reCAPTCHA.")
10146 (license license:bsd-3)))
10147
10148(define-public python2-flask-wtf
10149 (package-with-python2 python-flask-wtf))
10150
a2c7d88e 10151(define-public python-flask-multistatic
10152 (package
10153 (name "python-flask-multistatic")
10154 (version "1.0")
10155 (source
10156 (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "flask-multistatic" version))
10159 (sha256
10160 (base32
10161 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10162 (build-system python-build-system)
10163 (propagated-inputs
10164 `(("python-flask" ,python-flask)))
10165 (home-page "https://pagure.io/flask-multistatic")
10166 (synopsis "Flask plugin to allow overriding static files")
10167 (description "@code{flask-multistatic} is a flask plugin that adds support
10168for overriding static files.")
10169 (license license:gpl3+)))
10170
10171(define-public python2-flask-multistatic
10172 (package-with-python2 python-flask-multistatic))
10173
603d665b
LF
10174(define-public python-cookies
10175 (package
10176 (name "python-cookies")
10177 (version "2.2.1")
10178 (source (origin
10179 (method url-fetch)
10180 (uri (pypi-uri "cookies" version))
10181 (sha256
10182 (base32
10183 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10184 (build-system python-build-system)
10185 (arguments
10186 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10187 #:tests? #f))
10188 (native-inputs
10189 `(("python-pytest" ,python2-pytest)))
10190 (synopsis "HTTP cookie parser and renderer")
10191 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10192Python.")
10193 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10194 (license license:expat)))
603d665b
LF
10195
10196(define-public python2-cookies
f210e944 10197 (package-with-python2 python-cookies))
0efde7d6
LF
10198
10199(define-public python-responses
10200 (package
10201 (name "python-responses")
10202 (version "0.5.1")
10203 (source (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "responses" version))
10206 (sha256
10207 (base32
10208 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10209 (build-system python-build-system)
10210 (arguments
10211 `(;; Test suite is not distributed:
10212 ;; https://github.com/getsentry/responses/issues/38
10213 #:tests? #f))
10214 (native-inputs
d8ea5f2f 10215 `(("python-mock" ,python-mock)))
0efde7d6
LF
10216 (propagated-inputs
10217 `(("python-requests" ,python-requests)
d8ea5f2f 10218 ("python-cookies" ,python-cookies)
0efde7d6
LF
10219 ("python-six" ,python-six)))
10220 (home-page "https://github.com/getsentry/responses")
10221 (synopsis "Utility for mocking out the `requests` Python library")
10222 (description "A utility library for mocking out the `requests` Python
10223library.")
f210e944 10224 (license license:asl2.0)))
0efde7d6
LF
10225
10226(define-public python2-responses
f210e944 10227 (package-with-python2 python-responses))
76b94885 10228
b7afd018
RW
10229(define-public python-whoosh
10230 (package
10231 (name "python-whoosh")
10232 (version "2.7.4")
10233 (source
10234 (origin
10235 (method url-fetch)
10236 (uri (pypi-uri "Whoosh" version))
10237 (sha256
10238 (base32
10239 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10240 (build-system python-build-system)
10241 (native-inputs
f3b98f4f 10242 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10243 (home-page "http://bitbucket.org/mchaput/whoosh")
10244 (synopsis "Full text indexing, search, and spell checking library")
10245 (description
10246 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10247checking library.")
10248 (license license:bsd-2)))
10249
10250(define-public python2-whoosh
10251 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10252 (package (inherit whoosh)
10253 (propagated-inputs
10254 `(("python2-backport-ssl-match-hostname"
10255 ,python2-backport-ssl-match-hostname)
10256 ,@(package-propagated-inputs whoosh))))))
10257
76b94885
LF
10258(define-public python-pathlib
10259 (package
10260 (name "python-pathlib")
10261 (version "1.0.1")
10262 (source (origin
10263 (method url-fetch)
10264 (uri (pypi-uri "pathlib" version))
10265 (sha256
10266 (base32
10267 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10268 (build-system python-build-system)
92a312dc
RW
10269 ;; The tests depend on the internal "test" module, which does not provide
10270 ;; a stable interface.
10271 (arguments `(#:tests? #f))
76b94885 10272 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10273 (synopsis "Object-oriented file system paths")
10274 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10275It offers the following advantages over using string objects:
10276
10277@enumerate
10278@item No more cumbersome use of os and os.path functions. Everything can
10279be done easily through operators, attribute accesses, and method calls.
10280@item Embodies the semantics of different path types. For example,
10281comparing Windows paths ignores casing.
10282@item Well-defined semantics, eliminating any inconsistencies or
10283ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10284@end enumerate
10285
10286Note: In Python 3.4, pathlib is now part of the standard library. For other
10287Python versions please consider python-pathlib2 instead, which tracks the
10288standard library module. This module (python-pathlib) isn't maintained
10289anymore.")
76b94885
LF
10290 (license license:expat)))
10291
10292(define-public python2-pathlib
10293 (package-with-python2 python-pathlib))
25a7db0a 10294
b7703c81
HG
10295(define-public python2-pathlib2
10296 (package
10297 (name "python2-pathlib2")
10298 (version "2.1.0")
10299 (source (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "pathlib2" version))
10302 (sha256
10303 (base32
10304 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10305 (build-system python-build-system)
49a531f5
HG
10306 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10307 ;; version is 3.4 which already includes this package as part of the
10308 ;; standard library.
b7703c81
HG
10309 (arguments
10310 `(#:python ,python-2))
10311 (native-inputs
f3b98f4f 10312 `(("python2-six" ,python2-six)))
b7703c81
HG
10313 (home-page "http://pypi.python.org/pypi/pathlib2/")
10314 (synopsis "Object-oriented file system paths - backport of standard
10315pathlib module")
10316 (description "The goal of pathlib2 is to provide a backport of standard
10317pathlib module which tracks the standard library module, so all the newest
10318features of the standard pathlib can be used also on older Python versions.
10319
10320Pathlib offers a set of classes to handle file system paths. It offers the
10321following advantages over using string objects:
10322
10323@enumerate
10324@item No more cumbersome use of os and os.path functions. Everything can
10325be done easily through operators, attribute accesses, and method calls.
10326@item Embodies the semantics of different path types. For example,
10327comparing Windows paths ignores casing.
10328@item Well-defined semantics, eliminating any inconsistencies or
10329ambiguities (forward vs. backward slashes, etc.).
10330@end enumerate")
10331 (license license:expat)))
10332
25a7db0a
LF
10333(define-public python-jellyfish
10334 (package
10335 (name "python-jellyfish")
8c4964dd 10336 (version "0.5.6")
25a7db0a
LF
10337 (source (origin
10338 (method url-fetch)
10339 (uri (pypi-uri "jellyfish" version))
10340 (sha256
10341 (base32
8c4964dd 10342 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10343 (build-system python-build-system)
10344 (native-inputs
10345 `(("python-pytest" ,python-pytest)))
10346 (home-page "https://github.com/jamesturk/jellyfish")
10347 (synopsis "Approximate and phonetic matching of strings")
10348 (description "Jellyfish uses a variety of string comparison and phonetic
10349encoding algorithms to do fuzzy string matching.")
3f641af0 10350 (license license:bsd-2)
25a7db0a
LF
10351 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10352
10353(define-public python2-jellyfish
10354 (let ((jellyfish (package-with-python2
10355 (strip-python2-variant python-jellyfish))))
10356 (package (inherit jellyfish)
00e10c6e 10357 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10358 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10359
10360(define-public python2-unicodecsv
10361 (package
10362 (name "python2-unicodecsv")
10363 (version "0.14.1")
10364 (source (origin
10365 (method url-fetch)
10366 ;; The test suite is not included in the PyPi release.
10367 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10368 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10369 "archive/" version ".tar.gz"))
10370 (file-name (string-append name "-" version ".tar.gz"))
10371 (sha256
10372 (base32
10373 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10374 (build-system python-build-system)
10375 (arguments
10376 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10377 #:python ,python-2))
10378 (native-inputs
f3b98f4f 10379 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10380 (home-page "https://github.com/jdunck/python-unicodecsv")
10381 (synopsis "Unicode CSV module for Python 2")
10382 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10383module, adding support for Unicode strings.")
3f641af0 10384 (license license:bsd-2)))
064503aa
LF
10385
10386(define-public python-rarfile
10387 (package
10388 (name "python-rarfile")
67824447 10389 (version "2.8")
064503aa
LF
10390 (source (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "rarfile" version))
10393 (sha256
10394 (base32
67824447 10395 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10396 (build-system python-build-system)
10397 (arguments
10398 '(#:phases
10399 (modify-phases %standard-phases
10400 (replace 'check
10401 ;; Many tests fail, but the installation proceeds.
10402 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10403 (native-inputs
10404 `(("which" ,which))) ; required for tests
10405 (propagated-inputs
10406 `(("libarchive" ,libarchive)))
10407 (home-page "https://github.com/markokr/rarfile")
10408 (synopsis "RAR archive reader for Python")
10409 (description "This is Python module for RAR archive reading. The interface
10410is made as zipfile like as possible.")
3f641af0 10411 (license license:isc)))
064503aa
LF
10412
10413(define-public python2-rarfile
10414 (package-with-python2 python-rarfile))
daeeea71
CM
10415
10416(define-public python-magic
10417 (package
10418 (name "python-magic")
10419 (version "0.4.3")
10420 (source
10421 (origin
10422 (method url-fetch)
10423 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10424 version ".tar.gz"))
10425 (sha256
10426 (base32
10427 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10428 (file-name (string-append name "-" version "-checkout"))))
10429 (build-system python-build-system)
10430 (arguments
10431 ;; The tests are unreliable, so don't run them. The tests fail
10432 ;; under Python3 because they were written for Python2 and
10433 ;; contain import statements that do not work in Python3. One of
10434 ;; the tests fails under Python2 because its assertions are
10435 ;; overly stringent; it relies on comparing output strings which
10436 ;; are brittle and can change depending on the version of
10437 ;; libmagic being used and the system on which the test is
10438 ;; running. In my case, under GuixSD 0.10.0, only one test
10439 ;; failed, and it seems to have failed only because the version
10440 ;; of libmagic that is packaged in Guix outputs a slightly
10441 ;; different (but not wrong) string than the one that the test
10442 ;; expected.
10443 '(#:tests? #f
10444 #:phases (modify-phases %standard-phases
10445 ;; Replace a specific method call with a hard-coded
10446 ;; path to the necessary libmagic.so file in the
10447 ;; store. If we don't do this, then the method call
10448 ;; will fail to find the libmagic.so file, which in
10449 ;; turn will cause any application using
10450 ;; python-magic to fail.
10451 (add-before 'build 'hard-code-path-to-libmagic
10452 (lambda* (#:key inputs #:allow-other-keys)
10453 (let ((file (assoc-ref inputs "file")))
10454 (substitute* "magic.py"
10455 (("ctypes.util.find_library\\('magic'\\)")
10456 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10457 #t)))
10458 (add-before 'install 'disable-egg-compression
10459 (lambda _
10460 (let ((port (open-file "setup.cfg" "a")))
10461 (display "\n[easy_install]\nzip_ok = 0\n"
10462 port)
10463 (close-port port)
10464 #t))))))
daeeea71
CM
10465 (inputs
10466 ;; python-magic needs to be able to find libmagic.so.
10467 `(("file" ,file)))
10468 (home-page "https://github.com/ahupp/python-magic")
10469 (synopsis "File type identification using libmagic")
10470 (description
10471 "This module uses ctypes to access the libmagic file type
10472identification library. It makes use of the local magic database and
10473supports both textual and MIME-type output. Note that this module and
10474the python-file module both provide a \"magic.py\" file; these two
10475modules, which are different and were developed separately, both serve
10476the same purpose: to provide Python bindings for libmagic.")
10477 (license license:expat)))
10478
10479(define-public python2-magic
10480 (package-with-python2 python-magic))
12af303f
CM
10481
10482(define-public python2-s3cmd
10483 (package
10484 (name "python2-s3cmd")
10485 (version "1.6.1")
10486 (source
10487 (origin
10488 (method url-fetch)
de67e922 10489 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10490 "s3cmd-" version ".tar.gz"))
10491 (sha256
10492 (base32
10493 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10494 (build-system python-build-system)
10495 (arguments
10496 ;; s3cmd is written for python2 only and contains no tests.
10497 `(#:python ,python-2
10498 #:tests? #f))
f22efa01 10499 (propagated-inputs
12af303f
CM
10500 `(("python2-dateutil" ,python2-dateutil)
10501 ;; The python-file package also provides a magic.py module.
10502 ;; This is an unfortunate state of affairs; however, s3cmd
10503 ;; fails to install if it cannot find specifically the
10504 ;; python-magic package. Thus we include it, instead of using
10505 ;; python-file. Ironically, s3cmd sometimes works better
10506 ;; without libmagic bindings at all:
10507 ;; https://github.com/s3tools/s3cmd/issues/198
10508 ("python2-magic" ,python2-magic)))
10509 (home-page "http://s3tools.org/s3cmd")
10510 (synopsis "Command line tool for S3-compatible storage services")
10511 (description
10512 "S3cmd is a command line tool for uploading, retrieving and managing data
10513in storage services that are compatible with the Amazon Simple Storage
10514Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10515GnuPG encryption, and more. It also supports management of Amazon's
10516CloudFront content delivery network.")
3f641af0 10517 (license license:gpl2+)))
4323a5f0
AE
10518
10519(define-public python-pkgconfig
10520 (package
10521 (name "python-pkgconfig")
10522 (version "1.1.0")
10523 (source
10524 (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "pkgconfig" version))
10527 (sha256
10528 (base32
10529 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10530 (build-system python-build-system)
10531 (native-inputs
f3b98f4f 10532 `(("python-nose" ,python-nose)))
4323a5f0
AE
10533 (inputs
10534 `(("pkg-config" ,pkg-config)))
10535 (arguments
10536 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10537 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10538 #:tests? #f
4323a5f0
AE
10539 ;; Hard-code the path to pkg-config.
10540 #:phases
10541 (modify-phases %standard-phases
10542 (add-before
10543 'build 'patch
10544 (lambda _
10545 (substitute* "pkgconfig/pkgconfig.py"
10546 (("cmd = 'pkg-config")
10547 (string-append "cmd = '" (which "pkg-config"))))
10548 #t)))))
10549 (home-page "http://github.com/matze/pkgconfig")
10550 (synopsis "Python interface for pkg-config")
10551 (description "This module provides a Python interface to pkg-config. It
10552can be used to find all pkg-config packages, check if a package exists,
10553check if a package meets certain version requirements, query CFLAGS and
10554LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10555 (license license:expat)))
4323a5f0
AE
10556
10557(define-public python2-pkgconfig
10558 (package-with-python2 python-pkgconfig))
10559
2e697322
BW
10560(define-public python-bz2file
10561 (package
10562 (name "python-bz2file")
10563 (version "0.98")
10564 (source
10565 (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "bz2file" version))
10568 (sha256
10569 (base32
10570 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10571 (build-system python-build-system)
10572 (arguments
124df723 10573 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10574 (home-page "https://github.com/nvawda/bz2file")
10575 (synopsis "Read and write bzip2-compressed files")
10576 (description
10577 "Bz2file is a Python library for reading and writing bzip2-compressed
10578files. It contains a drop-in replacement for the I/O interface in the
10579standard library's @code{bz2} module, including features from the latest
10580development version of CPython that are not available in older releases.")
3f641af0 10581 (license license:asl2.0)
2e697322
BW
10582 (properties `((python2-variant . ,(delay python2-bz2file))))))
10583
10584(define-public python2-bz2file
10585 (let ((base (package-with-python2
10586 (strip-python2-variant python-bz2file))))
10587 (package
10588 (inherit base)
124df723 10589 (arguments
752bb447
BW
10590 `(#:python ,python-2
10591 #:phases
124df723
BW
10592 (modify-phases %standard-phases
10593 ;; 'python setup.py test' does not work as of 0.98.
10594 ;; There is only the one test file, so we run it directly.
10595 (replace 'check
10596 (lambda _ (zero? (system* "python"
10597 "test_bz2file.py"))))))))))
2e697322 10598
da4ac1aa
BW
10599(define-public python-future
10600 (package
10601 (name "python-future")
10602 (version "0.15.2")
10603 (source
10604 (origin
10605 (method url-fetch)
10606 (uri (pypi-uri "future" version))
10607 (sha256
10608 (base32
10609 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10610 (build-system python-build-system)
10611 ;; Many tests connect to the network or are otherwise flawed.
10612 ;; https://github.com/PythonCharmers/python-future/issues/210
10613 (arguments
10614 `(#:tests? #f))
10615 (home-page "http://python-future.org")
10616 (synopsis "Single-source support for Python 3 and 2")
10617 (description
10618 "@code{python-future} is the missing compatibility layer between Python 2 and
10619Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10620to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10621 (license license:expat)))
da4ac1aa
BW
10622
10623(define-public python2-future
f210e944 10624 (package-with-python2 python-future))
da4ac1aa 10625
8e451885
AE
10626(define-public python-cysignals
10627 (package
10628 (name "python-cysignals")
10629 (version "1.1.0")
10630 (source
10631 (origin
10632 (method url-fetch)
10633 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10634 (sha256
10635 (base32
10636 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10637 (build-system python-build-system)
10638 (native-inputs
10639 `(("python-cython" ,python-cython)
8e451885
AE
10640 ("python-sphinx" ,python-sphinx)))
10641 (inputs
10642 `(("pari-gp" ,pari-gp)))
10643 (arguments
10644 `(#:modules ((guix build python-build-system)
10645 ((guix build gnu-build-system) #:prefix gnu:)
10646 (guix build utils))
10647 ;; FIXME: Tests are executed after installation and currently fail
10648 ;; when not installing into standard locations; the author is working
10649 ;; on a fix.
10650 #:tests? #f
10651 #:phases
10652 (modify-phases %standard-phases
10653 (add-before
10654 'build 'configure
10655 (assoc-ref gnu:%standard-phases 'configure)))))
10656 (home-page
10657 "https://github.com/sagemath/cysignals")
10658 (synopsis
10659 "Handling of interrupts and signals for Cython")
10660 (description
10661 "The cysignals package provides mechanisms to handle interrupts (and
10662other signals and errors) in Cython code, using two related approaches,
10663for mixed Cython/Python code or external C libraries and pure Cython code,
10664respectively.")
3f641af0 10665 (license license:lgpl3+)))
8e451885
AE
10666
10667(define-public python2-cysignals
10668 (package-with-python2 python-cysignals))
10669
63bcec71
DM
10670(define-public python2-shedskin
10671 (package
10672 (name "python2-shedskin")
10673 (version "0.9.4")
10674 (source
10675 (origin
10676 (method url-fetch)
10677 (uri (string-append "https://github.com/shedskin/shedskin/"
10678 "releases/download/v" version
10679 "/shedskin-" version ".tgz"))
10680 (sha256
10681 (base32
10682 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10683 (build-system python-build-system)
10684 (arguments
10685 `(#:python ,python-2
10686 #:phases (modify-phases %standard-phases
10687 (add-after 'unpack 'fix-resulting-include-libs
10688 (lambda* (#:key inputs #:allow-other-keys)
10689 (let ((libgc (assoc-ref inputs "libgc"))
10690 (pcre (assoc-ref inputs "pcre")))
10691 (substitute* "shedskin/makefile.py"
10692 (("variable == 'CCFLAGS':[ ]*")
10693 (string-append "variable == 'CCFLAGS':\n"
10694 " line += ' -I " pcre "/include"
10695 " -I " libgc "/include'"))
10696 (("variable == 'LFLAGS':[ ]*")
10697 (string-append "variable == 'LFLAGS':\n"
10698 " line += ' -L" pcre "/lib"
10699 " -L " libgc "/lib'")))
10700 #t))))))
63bcec71
DM
10701 (inputs `(("pcre" ,pcre)
10702 ("libgc" ,libgc)))
10703 (home-page "https://shedskin.github.io/")
10704 (synopsis "Experimental Python-2 to C++ Compiler")
10705 (description (string-append "This is an experimental compiler for a subset of
10706Python. It generates C++ code and a Makefile."))
3f641af0 10707 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10708
10709(define-public python2-rope
10710 (package
10711 (name "python2-rope")
10712 (version "0.10.3")
10713 (source
10714 (origin
10715 (method url-fetch)
10716 (uri (pypi-uri "rope" version))
10717 (sha256
10718 (base32
10719 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10720 (arguments
10721 ;; Rope is currently python-2 only.
10722 ;; https://github.com/python-rope/rope/issues/57
10723 `(#:python ,python-2))
10724 (build-system python-build-system)
10725 (native-inputs
f3b98f4f 10726 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10727 (home-page "https://github.com/python-rope/rope")
10728 (synopsis "Refactoring library for Python")
10729 (description "Rope is a refactoring library for Python. It facilitates
10730the renaming, moving and extracting of attributes, functions, modules, fields
10731and parameters in Python 2 source code. These refactorings can also be applied
10732to occurences in strings and comments.")
3f641af0 10733 (license license:gpl2)))
6ba8ca17
10734
10735(define-public python-py3status
10736 (package
10737 (name "python-py3status")
d2262d70 10738 (version "3.1")
6ba8ca17
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "py3status" version))
10743 (sha256
10744 (base32
d2262d70 10745 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10746 (build-system python-build-system)
8653c1d5
MB
10747 (arguments
10748 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10749 (home-page "https://github.com/ultrabug/py3status")
10750 (synopsis "Extensible i3status wrapper written in Python")
10751 (description "py3status is an i3status wrapper which extends i3status
10752functionality in a modular way, allowing you to extend your panel with your
10753own code, responding to click events and updating clock every second.")
3f641af0 10754 (license license:bsd-3)))
b8fdbca3
HG
10755
10756(define-public python-tblib
10757 (package
10758 (name "python-tblib")
10759 (version "1.3.0")
10760 (source (origin
10761 (method url-fetch)
10762 (uri (pypi-uri "tblib" version))
10763 (sha256 (base32
10764 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10765 (build-system python-build-system)
10766 (arguments
10767 `(#:phases
10768 (modify-phases %standard-phases
10769 (replace 'check
10770 (lambda _
10771 ;; Upstream runs tests after installation and the package itself
10772 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10773 ;; found.
10774 (setenv "PYTHONPATH"
10775 (string-append (getcwd) "/build/lib:"
10776 (getenv "PYTHONPATH")))
10777 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10778 (native-inputs
10779 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10780 ("python-six" ,python-six)))
10781 (home-page "https://github.com/ionelmc/python-tblib")
10782 (synopsis "Traceback serialization library")
10783 (description
10784 "Traceback serialization allows you to:
10785
10786@enumerate
10787@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10788different processes. This allows better error handling when running code over
10789multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10790
10791@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10792@end enumerate\n")
3f641af0 10793 (license license:bsd-3)))
b8fdbca3
HG
10794
10795(define-public python2-tblib
10796 (package-with-python2 python-tblib))
1a024de4
HG
10797
10798(define-public python-sqlparse
10799 (package
10800 (name "python-sqlparse")
10801 (version "0.1.19")
10802 (source (origin
10803 (method url-fetch)
10804 (uri (pypi-uri "sqlparse" version))
10805 (sha256
10806 (base32
10807 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10808 (build-system python-build-system)
10809 (arguments
10810 `(#:phases
10811 (modify-phases %standard-phases
10812 (replace 'check
10813 (lambda* _
10814 ;; setup.py-integrated 2to3 only affects the build files, but
10815 ;; py.test is using the source files. So we need to convert them
10816 ;; manually.
10817 (when (zero? (system* "python3"))
10818 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10819 (zero? (system* "py.test")))))))
10820 (native-inputs
f3b98f4f 10821 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10822 (home-page "https://github.com/andialbrecht/sqlparse")
10823 (synopsis "Non-validating SQL parser")
10824 (description "Sqlparse is a non-validating SQL parser for Python. It
10825provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10826 (license license:bsd-3)))
1a024de4
HG
10827
10828(define-public python2-sqlparse
10829 (package-with-python2 python-sqlparse))
68b9d242
SB
10830
10831(define-public python-greenlet
10832 (package
10833 (name "python-greenlet")
1f89fb16 10834 (version "0.4.11")
68b9d242
SB
10835 (source (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "greenlet" version))
10838 (sha256
10839 (base32
1f89fb16 10840 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10841 (build-system python-build-system)
68b9d242
SB
10842 (home-page "https://greenlet.readthedocs.io/")
10843 (synopsis "Lightweight in-process concurrent programming")
10844 (description
10845 "Greenlet package is a spin-off of Stackless, a version of CPython
10846that supports micro-threads called \"tasklets\". Tasklets run
10847pseudo-concurrently (typically in a single or a few OS-level threads) and
10848are synchronized with data exchanges on \"channels\".")
3f641af0 10849 (license (list license:psfl license:expat))))
68b9d242
SB
10850
10851(define-public python2-greenlet
10852 (package-with-python2 python-greenlet))
d79a343b
SB
10853
10854(define-public python-gevent
10855 (package
10856 (name "python-gevent")
10857 (version "1.1.1")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "gevent" version))
10861 (sha256
10862 (base32
10863 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10864 (modules '((guix build utils)))
10865 (snippet
10866 '(begin
10867 ;; unbunding libev and c-ares
10868 (for-each delete-file-recursively '("libev" "c-ares"))
10869 ;; fixing testsuite
10870 (call-with-output-file "greentest/__init__.py" noop)
10871 (substitute* "greentest/testrunner.py"
10872 (("import util") "from . import util")
10873 (("from util import log") "from .util import log"))))))
10874 (build-system python-build-system)
10875 (propagated-inputs
10876 `(("python-greenlet" ,python-greenlet)))
10877 (native-inputs
f3b98f4f 10878 `(("python-six" ,python-six)))
d79a343b
SB
10879 (inputs
10880 `(("c-ares" ,c-ares)
10881 ("libev" ,libev)))
10882 (home-page "http://www.gevent.org/")
10883 (synopsis "Coroutine-based network library")
10884 (description
10885 "gevent is a coroutine-based Python networking library that uses greenlet
10886to provide a high-level synchronous API on top of the libev event loop.")
10887 (license license:expat)))
10888
10889(define-public python2-gevent
10890 (package-with-python2 python-gevent))
da3aeeb6 10891
c9a18125
MB
10892(define-public python-geventhttpclient
10893 (package
10894 (name "python-geventhttpclient")
10895 (version "1.3.1")
10896 (source (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "geventhttpclient" version))
10899 (sha256
10900 (base32
10901 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10902 (modules '((guix build utils)))
10903 (snippet
10904 '(begin
10905 ;; Delete pre-compiled files.
10906 (for-each delete-file (find-files "src/geventhttpclient"
10907 ".*\\.pyc"))
10908 #t))))
10909 (build-system python-build-system)
10910 (arguments
10911 '(#:phases
10912 (modify-phases %standard-phases
10913 (add-after 'unpack 'delete-network-tests
10914 (lambda _
10915 (delete-file "src/geventhttpclient/tests/test_client.py")
10916 #t))
10917 (delete 'check)
10918 (add-after 'install 'check
10919 (lambda* (#:key inputs outputs #:allow-other-keys)
10920 (add-installed-pythonpath inputs outputs)
10921 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10922 (native-inputs
10923 `(("python-pytest" ,python-pytest)))
10924 (propagated-inputs
10925 `(("python-certifi" ,python-certifi)
10926 ("python-gevent" ,python-gevent)
10927 ("python-six" ,python-six)))
10928 (home-page "https://github.com/gwik/geventhttpclient")
10929 (synopsis "HTTP client library for gevent")
10930 (description "@code{python-geventhttpclient} is a high performance,
10931concurrent HTTP client library for python using @code{gevent}.")
10932 (license license:expat)))
10933
10934(define-public python2-geventhttpclient
10935 (package-with-python2 python-geventhttpclient))
10936
b585e361
DM
10937(define-public python-fastimport
10938 (package
10939 (name "python-fastimport")
10940 (version "0.9.6")
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "fastimport" version))
10945 (sha256
10946 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10947 (build-system python-build-system)
10948 (home-page "https://github.com/jelmer/python-fastimport")
10949 (synopsis "VCS fastimport parser and generator in Python")
10950 (description "This package provides a parser for and generator of the Git
10951@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10952format.")
10953 (license license:gpl2+)))
10954
10955(define-public python2-fastimport
10956 (package-with-python2 python-fastimport))
10957
da3aeeb6
SB
10958(define-public python-twisted
10959 (package
10960 (name "python-twisted")
10961 (version "16.2.0")
10962 (source (origin
10963 (method url-fetch)
8ea8e8d3 10964 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10965 (sha256
10966 (base32
10967 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10968 (build-system python-build-system)
a960e73f
MB
10969 (arguments
10970 '(#:tests? #f)) ; FIXME: Some tests are failing.
10971 ;; #:phases
10972 ;; (modify-phases %standard-phases
10973 ;; (replace 'check
10974 ;; (lambda _
10975 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10976 (propagated-inputs
10977 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10978 (home-page "https://twistedmatrix.com/")
10979 (synopsis "Asynchronous networking framework written in Python")
10980 (description
10981 "Twisted is an extensible framework for Python programming, with special
10982focus on event-based network programming and multiprotocol integration.")
10983 (license license:expat)))
10984
10985(define-public python2-twisted
10986 (package-with-python2 python-twisted))
d0b6fed6 10987
4d3fa5a4
EF
10988(define-public python-pika
10989 (package
10990 (name "python-pika")
10991 (version "0.10.0")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "pika" version))
10996 (sha256
10997 (base32
10998 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10999 (build-system python-build-system)
11000 (native-inputs
269d9172
LF
11001 `(("python-pyev" ,python-pyev)
11002 ("python-tornado" ,python-tornado)
11003 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11004 (home-page "https://pika.readthedocs.org")
11005 (synopsis "Pure Python AMQP Client Library")
11006 (description
11007 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11008Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11009network support library.")
11010 (license license:bsd-3)))
11011
11012(define-public python2-pika
11013 (package-with-python2 python-pika))
11014
d0b6fed6
DM
11015(define-public python-ply
11016 (package
11017 (name "python-ply")
234ade2d 11018 (version "3.9")
d0b6fed6
DM
11019 (source
11020 (origin
11021 (method url-fetch)
234ade2d 11022 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11023 (sha256
11024 (base32
234ade2d 11025 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11026 (build-system python-build-system)
11027 (home-page "http://www.dabeaz.com/ply/")
11028 (synopsis "Python Lex & Yacc")
11029 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11030It uses LR parsing and does extensive error checking.")
f210e944 11031 (license license:bsd-3)))
d0b6fed6
DM
11032
11033(define-public python2-ply
f210e944 11034 (package-with-python2 python-ply))
d951bd54
SB
11035
11036(define-public python-tabulate
11037 (package
11038 (name "python-tabulate")
e6ace98d 11039 (version "0.7.7")
d951bd54
SB
11040 (source (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "tabulate" version))
11043 (sha256
11044 (base32
fe2ba3a8 11045 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11046 (build-system python-build-system)
fe2ba3a8
MB
11047 (arguments
11048 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11049 ;; and the latest release is not tagged in the upstream repository.
11050 '(#:tests? #f))
d951bd54
SB
11051 (home-page "https://bitbucket.org/astanin/python-tabulate")
11052 (synopsis "Pretty-print tabular data")
11053 (description
11054 "Tabulate is a library and command-line utility to pretty-print tabular
11055data in Python.")
11056 (license license:expat)))
11057
11058(define-public python2-tabulate
11059 (package-with-python2 python-tabulate))
1c4c8a33
SB
11060
11061(define-public python-kazoo
11062 (package
11063 (name "python-kazoo")
11064 (version "2.2.1")
11065 (source
11066 (origin
11067 (method url-fetch)
11068 (uri (pypi-uri "kazoo" version))
11069 (sha256
11070 (base32
11071 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11072 (build-system python-build-system)
11073 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11074 (propagated-inputs
11075 `(("python-six" ,python-six)))
1c4c8a33
SB
11076 (home-page "https://kazoo.readthedocs.org")
11077 (synopsis "High-level Zookeeper client library")
11078 (description
11079 "Kazoo is a Python client library for the Apache Zookeeper distributed
11080application service. It is designed to be easy to use and to avoid common
11081programming errors.")
3f641af0 11082 (license license:asl2.0)))
1c4c8a33
SB
11083
11084(define-public python2-kazoo
11085 (package-with-python2 python-kazoo))
45dda35e
SB
11086
11087(define-public python-pykafka
11088 (package
11089 (name "python-pykafka")
11090 (version "2.4.0")
11091 (source (origin
11092 (method url-fetch)
c6bccf71
EF
11093 (uri (string-append
11094 "https://pypi.python.org/packages/8b/3e/"
11095 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11096 "pykafka-" version ".tar.gz"))
45dda35e
SB
11097 (sha256
11098 (base32
11099 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11100 (build-system python-build-system)
11101 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11102 (propagated-inputs
45dda35e
SB
11103 `(("python-gevent" ,python-gevent)
11104 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11105 ("python-tabulate" ,python-tabulate)))
11106 (inputs
11107 `(("librdkafka" ,librdkafka)))
11108 (home-page "https://pykafka.readthedocs.io/")
11109 (synopsis "Apache Kafka client for Python")
11110 (description
11111 "PyKafka is a client for the Apache Kafka distributed messaging system.
11112It includes Python implementations of Kafka producers and consumers, which
11113are optionally backed by a C extension built on librdkafka.")
3f641af0 11114 (license license:asl2.0)))
45dda35e
SB
11115
11116(define-public python2-pykafka
11117 (package-with-python2 python-pykafka))
a44fd439
DM
11118
11119(define-public python-wcwidth
11120 (package
11121 (name "python-wcwidth")
11122 (version "0.1.6")
11123 (source
11124 (origin
11125 (method url-fetch)
11126 (uri (string-append
11127 "https://pypi.python.org/packages/"
11128 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
11129 "wcwidth-" version ".tar.gz"))
11130 (sha256
11131 (base32
11132 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
11133 (build-system python-build-system)
11134 (home-page "https://github.com/jquast/wcwidth")
66e07664 11135 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11136 (description "Wcwidth measures the number of terminal column cells of
11137wide-character codes. It is useful for those implementing a terminal emulator,
11138or programs that carefully produce output to be interpreted by one. It is a
11139Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11140specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11141 (license license:expat)))
a44fd439
DM
11142
11143(define-public python2-wcwidth
f210e944 11144 (package-with-python2 python-wcwidth))
0de78c95
DP
11145
11146(define-public python2-jsonrpclib
11147 (package
11148 (name "python2-jsonrpclib")
11149 (version "0.1.7")
11150 (source (origin
11151 (method url-fetch)
11152 (uri (string-append
11153 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11154 "jsonrpclib-" version ".tar.gz"))
11155 (sha256
11156 (base32
11157 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11158 (build-system python-build-system)
0de78c95
DP
11159 (arguments
11160 `(#:tests? #f
11161 #:python ,python-2))
11162 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11163 (synopsis "Implementation of JSON-RPC specification for Python")
11164 (description
11165 "This library is an implementation of the JSON-RPC specification.
11166It supports both the original 1.0 specification, as well as the
11167new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11168etc.")
3f641af0 11169 (license license:asl2.0)))
9250b0f3
SB
11170
11171(define-public python-chai
11172 (package
11173 (name "python-chai")
11174 (version "1.1.1")
11175 (source (origin
11176 (method url-fetch)
11177 (uri (pypi-uri "chai" version))
11178 (sha256
11179 (base32
11180 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11181 (build-system python-build-system)
9250b0f3
SB
11182 (home-page "https://github.com/agoragames/chai")
11183 (synopsis "Mocking framework for Python")
11184 (description
11185 "Chai provides an api for mocking, stubbing and spying your python
11186objects, patterned after the Mocha library for Ruby.")
3f641af0 11187 (license license:bsd-3)))
9250b0f3
SB
11188
11189(define-public python2-chai
11190 (package-with-python2 python-chai))
11191
ae43baa8
SB
11192(define-public python-arrow
11193 (package
11194 (name "python-arrow")
11195 (version "0.8.0")
11196 (source (origin
11197 (method url-fetch)
11198 (uri (pypi-uri "arrow" version))
11199 (sha256
11200 (base32
11201 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11202 (build-system python-build-system)
11203 (native-inputs
f3b98f4f 11204 `(;; For testing
ae43baa8
SB
11205 ("python-chai" ,python-chai)
11206 ("python-simplejson" ,python-simplejson)))
36aed736 11207 (propagated-inputs
22d7360b 11208 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11209 (home-page "https://github.com/crsmithdev/arrow/")
11210 (synopsis "Dates and times for Python")
11211 (description
11212 "Arrow is a Python library to creating, manipulating, formatting and
11213converting dates, times, and timestamps. It implements and updates the
11214datetime type.")
3f641af0 11215 (license license:asl2.0)))
ae43baa8
SB
11216
11217(define-public python2-arrow
11218 (package-with-python2 python-arrow))
11219
1f2b62a4
SB
11220(define-public python-inflection
11221 (package
11222 (name "python-inflection")
11223 (version "0.3.1")
11224 (source
11225 (origin (method url-fetch)
11226 (uri (pypi-uri "inflection" version))
11227 (sha256
11228 (base32
11229 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11230 (build-system python-build-system)
e9127525
MB
11231 (native-inputs
11232 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
11233 (home-page "http://github.com/jpvanhal/inflection")
11234 (synopsis "Python string transformation library")
11235 (description
11236 "Inflection is a string transformation library. It singularizes
11237and pluralizes English words, and transforms strings from CamelCase to
11238underscored string.")
11239 (license license:expat)))
11240
11241(define-public python2-inflection
11242 (package-with-python2 python-inflection))
11243
18995566
SB
11244(define-public python-pylev
11245 (package
11246 (name "python-pylev")
11247 (version "1.3.0")
11248 (source (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "pylev" version))
11251 (sha256
11252 (base32
11253 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11254 (build-system python-build-system)
18995566
SB
11255 (home-page "http://github.com/toastdriven/pylev")
11256 (synopsis "Levenshtein distance implementation in Python")
11257 (description "Pure Python Levenshtein implementation, based off the
11258Wikipedia code samples at
11259@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11260 (license license:bsd-3)))
18995566
SB
11261
11262(define-public python2-pylev
11263 (package-with-python2 python-pylev))
11264
f5deff7a
SB
11265(define-public python-cleo
11266 (package
11267 (name "python-cleo")
11268 (version "0.4.1")
11269 (source (origin
11270 (method url-fetch)
11271 (uri (pypi-uri "cleo" version))
11272 (sha256
11273 (base32
11274 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11275 (build-system python-build-system)
11276 (native-inputs
f3b98f4f 11277 `(;; For testing
f5deff7a
SB
11278 ("python-mock" ,python-mock)
11279 ("python-pytest" ,python-pytest)))
9403150a
SB
11280 (propagated-inputs
11281 `(("python-psutil" ,python-psutil)
11282 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11283 (home-page "https://github.com/sdispater/cleo")
11284 (synopsis "Command-line arguments library for Python")
11285 (description
11286 "Cleo allows you to create command-line commands with signature in
11287docstring and colored output.")
11288 (license license:expat)))
11289
11290(define-public python2-cleo
11291 (package-with-python2 python-cleo))
11292
77cadb43
SB
11293(define-public python-lazy-object-proxy
11294 (package
11295 (name "python-lazy-object-proxy")
11296 (version "1.2.2")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "lazy-object-proxy" version))
11300 (sha256
11301 (base32
11302 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11303 (build-system python-build-system)
77cadb43
SB
11304 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11305 (synopsis "Lazy object proxy for python")
11306 (description
11307 "Lazy object proxy is an object that wraps a callable but defers the call
11308until the object is actually required, and caches the result of said call.")
3f641af0 11309 (license license:bsd-2)))
77cadb43
SB
11310
11311(define-public python2-lazy-object-proxy
11312 (package-with-python2 python-lazy-object-proxy))
11313
5477e05f
SB
11314(define-public python-dnspython
11315 (package
11316 (name "python-dnspython")
6c514128 11317 (version "1.15.0")
5477e05f
SB
11318 (source (origin
11319 (method url-fetch)
11320 (uri (string-append "http://www.dnspython.org/kits/"
11321 version "/dnspython-" version ".tar.gz"))
11322 (sha256
11323 (base32
6c514128 11324 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11325 (build-system python-build-system)
11326 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11327 (home-page "http://www.dnspython.org")
11328 (synopsis "DNS toolkit for Python")
11329 (description
11330 "dnspython is a DNS toolkit for Python. It supports almost all record
11331types. It can be used for queries, zone transfers, and dynamic updates.
11332It supports TSIG authenticated messages and EDNS0.")
11333 (license license:expat)))
11334
11335(define-public python2-dnspython
11336 (package-with-python2 python-dnspython))
11337
22711e25
SB
11338(define-public python-email-validator
11339 (package
11340 (name "python-email-validator")
b165c215 11341 (version "1.0.2")
22711e25
SB
11342 (source
11343 (origin (method url-fetch)
11344 (uri (pypi-uri "email_validator" version))
11345 (sha256
11346 (base32
b165c215 11347 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11348 (build-system python-build-system)
11349 (arguments
11350 '(#:phases
11351 (modify-phases %standard-phases
11352 (add-before 'build 'use-dnspython
11353 (lambda _
11354 (substitute* "setup.py"
11355 (("dnspython3") "dnspython"))
11356 #t)))))
d42560bd 11357 (propagated-inputs
22711e25 11358 `(("python-dnspython" ,python-dnspython)
d42560bd 11359 ("python-idna" ,python-idna)))
22711e25
SB
11360 (home-page "https://github.com/JoshData/python-email-validator")
11361 (synopsis "Email address validation library for Python")
11362 (description
11363 "This library validates email address syntax and deliverability.")
3f641af0 11364 (license license:cc0)))
22711e25
SB
11365
11366(define-public python2-email-validator
11367 (package-with-python2 python-email-validator))
11368
8987d91e
SB
11369(define-public python-ukpostcodeparser
11370 (package
11371 (name "python-ukpostcodeparser")
11372 (version "1.0.3")
11373 (source (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "UkPostcodeParser" version))
11376 (sha256
11377 (base32
11378 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11379 (build-system python-build-system)
8987d91e
SB
11380 (home-page "https://github.com/hamstah/ukpostcodeparser")
11381 (synopsis "UK Postcode parser for Python")
11382 (description
11383 "This library provides the @code{parse_uk_postcode} function for
11384parsing UK postcodes.")
11385 (license license:expat)))
11386
11387(define-public python2-ukpostcodeparser
11388 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
11389
11390(define-public python-fake-factory
11391 (package
11392 (name "python-fake-factory")
7adc698f 11393 (version "0.7.2")
ea92ae01
SB
11394 (source (origin
11395 (method url-fetch)
11396 (uri (pypi-uri "fake-factory" version))
11397 (sha256
11398 (base32
42945fb5
MB
11399 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11400 (patches
11401 (search-patches
11402 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11403 (build-system python-build-system)
b7f3ea95
MB
11404 (arguments
11405 '(#:phases
11406 (modify-phases %standard-phases
11407 (replace 'check
11408 (lambda _
11409 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11410 (native-inputs
f3b98f4f 11411 `(;; For testing
ea92ae01
SB
11412 ("python-email-validator" ,python-email-validator)
11413 ("python-mock" ,python-mock)
11414 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11415 (propagated-inputs
22d7360b 11416 `(("python-dateutil" ,python-dateutil)
bbcd7297 11417 ("python-six" ,python-six)))
7adc698f 11418 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11419 (synopsis "Python package that generates fake data")
11420 (description
11421 "Faker is a Python package that generates fake data such as names,
11422addresses, and phone numbers.")
11423 (license license:expat)
11424 (properties `((python2-variant . ,(delay python2-fake-factory))))))
11425
11426(define-public python2-fake-factory
11427 (let ((base (package-with-python2 (strip-python2-variant
11428 python-fake-factory))))
11429 (package
11430 (inherit base)
24c9aa18 11431 (propagated-inputs
ea92ae01 11432 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11433 ,@(package-propagated-inputs base))))))
ea92ae01 11434
b49504fd
SB
11435(define-public python-pyaml
11436 (package
11437 (name "python-pyaml")
11438 (version "15.8.2")
11439 (source (origin
11440 (method url-fetch)
11441 (uri (pypi-uri "pyaml" version))
11442 (sha256
11443 (base32
11444 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11445 (build-system python-build-system)
f620311a
MB
11446 (native-inputs
11447 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11448 (propagated-inputs
11449 `(("python-pyyaml" ,python-pyyaml)))
11450 (home-page "https://github.com/mk-fg/pretty-yaml")
11451 (synopsis "YAML pretty-print library for Python")
11452 (description
11453 "pyaml is a PyYAML based python module to produce pretty and readable
11454YAML-serialized data.")
3f641af0 11455 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11456
11457(define-public python2-pyaml
11458 (package-with-python2 python-pyaml))
11459
347175a2
SB
11460(define-public python-flexmock
11461 (package
11462 (name "python-flexmock")
11463 (version "0.10.2")
11464 (source (origin
11465 (method url-fetch)
11466 (uri (pypi-uri "flexmock" version))
11467 (sha256
11468 (base32
11469 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11470 (build-system python-build-system)
347175a2
SB
11471 (home-page "https://flexmock.readthedocs.org")
11472 (synopsis "Testing library for Python")
11473 (description
11474 "flexmock is a testing library for Python that makes it easy to create
11475mocks, stubs and fakes.")
3f641af0 11476 (license license:bsd-3)))
347175a2
SB
11477
11478(define-public python2-flexmock
11479 (package-with-python2 python-flexmock))
11480
5a744191
SB
11481(define-public python-orator
11482 (package
11483 (name "python-orator")
11484 (version "0.8.2")
11485 (source (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "orator" version))
11488 (sha256
11489 (base32
11490 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11491 (build-system python-build-system)
11492 (arguments '(#:tests? #f)) ; no tests
b2676030 11493 (propagated-inputs
5a744191
SB
11494 `(("python-arrow" ,python-arrow)
11495 ("python-blinker" ,python-blinker)
11496 ("python-cleo" ,python-cleo)
11497 ("python-fake-factory" ,python-fake-factory)
11498 ("python-inflection" ,python-inflection)
11499 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11500 ("python-pyaml" ,python-pyaml)
5a744191
SB
11501 ("python-simplejson" ,python-simplejson)
11502 ("python-wrapt" ,python-wrapt)))
11503 (home-page "https://orator-orm.com/")
11504 (synopsis "ActiveRecord ORM for Python")
11505 (description
11506 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11507implementation for Python.")
11508 (license license:expat)
11509 (properties `((python2-variant . ,(delay python2-orator))))))
11510
11511(define-public python2-orator
11512 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11513 (package
11514 (inherit base)
06961617 11515 (propagated-inputs
5a744191 11516 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11517 ,@(package-propagated-inputs base))))))
f4155188
DM
11518
11519(define-public python-prompt-toolkit
11520 (package
11521 (name "python-prompt-toolkit")
6a34f4cc 11522 (version "1.0.9")
f4155188
DM
11523 (source
11524 (origin
11525 (method url-fetch)
d15e2ef0 11526 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11527 (sha256
11528 (base32
6a34f4cc 11529 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11530 (build-system python-build-system)
bae18710
LF
11531 (arguments
11532 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11533 (propagated-inputs
11534 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11535 ("python-six" ,python-six)
f22efa01 11536 ("python-pygments" ,python-pygments)))
f4155188
DM
11537 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11538 (synopsis "Library for building command line interfaces in Python")
11539 (description
11540 "Prompt-Toolkit is a library for building interactive command line
11541interfaces in Python. It's like GNU Readline but it also features syntax
11542highlighting while typing, out-of-the-box multi-line input editing, advanced
11543code completion, incremental search, support for Chinese double-width
11544characters, mouse support, and auto suggestions.")
f210e944 11545 (license license:bsd-3)))
f4155188
DM
11546
11547(define-public python2-prompt-toolkit
f210e944 11548 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11549
11550(define-public python-jedi
11551 (package
11552 (name "python-jedi")
11553 (version "0.9.0")
11554 (source
11555 (origin
11556 (method url-fetch)
11557 (uri (pypi-uri "jedi" version))
11558 (sha256
11559 (base32
11560 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11561 (build-system python-build-system)
bfce8a34
MB
11562 (arguments
11563 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11564 '(#:tests? #f))
11565 (native-inputs
11566 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11567 (home-page "https://github.com/davidhalter/jedi")
11568 (synopsis
11569 "Autocompletion for Python that can be used for text editors")
11570 (description
11571 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11572 (license license:expat)))
a502dfbf
DM
11573
11574(define-public python2-jedi
f210e944 11575 (package-with-python2 python-jedi))
c2f0dc6e
DM
11576
11577(define-public ptpython
11578 (package
11579 (name "ptpython")
11580 (version "0.34")
11581 (source (origin
11582 (method url-fetch)
11583 (uri (pypi-uri "ptpython" version))
11584 (sha256
11585 (base32
11586 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11587 (build-system python-build-system)
32955348
MB
11588 (arguments
11589 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11590 (propagated-inputs
c2f0dc6e
DM
11591 `(("python-docopt" ,python-docopt)
11592 ("python-jedi" ,python-jedi)
11593 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11594 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11595 (home-page "https://github.com/jonathanslenders/ptpython")
11596 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11597 (description
11598 "ptpython is a Python read-eval-print loop with IDE-like features.
11599It supports syntax highlighting, multiline editing, autocompletion, mouse,
11600color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11601etc.")
3f641af0 11602 (license license:bsd-3)
c2f0dc6e
DM
11603 (properties `((python2-variant . ,(delay ptpython-2))))))
11604
11605(define-public ptpython-2
11606 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11607 (package
11608 (inherit base)
11609 (name "ptpython2"))))
b227f0be 11610
b04a52a6
DJ
11611(define-public python-requests-oauthlib
11612 (package
11613 (name "python-requests-oauthlib")
11614 (version "0.6.2")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (pypi-uri "requests-oauthlib" version))
11619 (sha256
11620 (base32
11621 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11622 (build-system python-build-system)
11623 (arguments
11624 `(#:phases
11625 (modify-phases %standard-phases
11626 ;; removes tests that require network access
11627 (add-before 'check 'pre-check
11628 (lambda _
11629 (delete-file "tests/test_core.py")
11630 #t)))))
11631 (native-inputs
11632 `(("python-requests-mock" ,python-requests-mock)
11633 ("python-mock" ,python-mock)))
f22efa01 11634 (propagated-inputs
b04a52a6
DJ
11635 `(("python-oauthlib" ,python-oauthlib)
11636 ("python-requests" ,python-requests)))
11637 (home-page
11638 "https://github.com/requests/requests-oauthlib")
11639 (synopsis
11640 "OAuthlib authentication support for Requests")
11641 (description
11642 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11643provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11644 (license license:isc)))
b04a52a6
DJ
11645
11646(define-public python2-requests-oauthlib
f210e944 11647 (package-with-python2 python-requests-oauthlib))
b04a52a6 11648
b227f0be 11649(define-public python-stem
11650 (package
11651 (name "python-stem")
0bb1c35a 11652 (version "1.5.4")
b227f0be 11653 (source
11654 (origin
11655 (method url-fetch)
c976b319 11656 (uri (pypi-uri "stem" version))
b227f0be 11657 (sha256
11658 (base32
0bb1c35a 11659 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11660 (build-system python-build-system)
11661 (arguments
11662 `(#:phases
11663 (modify-phases %standard-phases
11664 (replace 'check
11665 (lambda _
11666 (zero? (system* "./run_tests.py" "--unit")))))))
11667 (native-inputs
11668 `(("python-mock" ,python-mock)
11669 ("python-pep8" ,python-pep8)
11670 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11671 (home-page "https://stem.torproject.org/")
11672 (synopsis
11673 "Python controller library that allows applications to interact with Tor")
11674 (description
11675 "Stem is a Python controller library for Tor. With it you can use Tor's
11676control protocol to script against the Tor process and read descriptor data
11677relays publish about themselves.")
3f641af0 11678 (license license:lgpl3)))
b227f0be 11679
11680(define-public python2-stem
11681 (package-with-python2 python-stem))
517a6c0c
DM
11682
11683(define-public python-pyserial
11684 (package
11685 (name "python-pyserial")
11686 (version "3.1.1")
11687 (source
11688 (origin
11689 (method url-fetch)
11690 (uri (pypi-uri "pyserial" version))
11691 (sha256
11692 (base32
11693 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11694 (build-system python-build-system)
0a702009
MB
11695 (arguments
11696 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11697 ;; #:phases
11698 ;; (modify-phases %standard-phases
11699 ;; (replace 'check
11700 ;; (lambda _
11701 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11702 (home-page
11703 "https://github.com/pyserial/pyserial")
11704 (synopsis "Python Serial Port Bindings")
11705 (description "@code{pyserial} provide serial port bindings for Python. It
11706supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11707and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11708 (license license:bsd-3)))
517a6c0c
DM
11709
11710(define-public python2-pyserial
f210e944 11711 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11712
11713(define-public python-kivy
11714 (package
11715 (name "python-kivy")
11716 (version "1.9.1")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "kivy" version))
11721 (file-name (string-append name "-" version ".tar.gz"))
11722 (sha256
11723 (base32
11724 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11725 (build-system python-build-system)
11726 (arguments
11727 `(#:tests? #f ; Tests require many optional packages
11728 #:phases
11729 (modify-phases %standard-phases
11730 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11731 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11732 (lambda* (#:key inputs #:allow-other-keys)
11733 (setenv "KIVY_SDL2_PATH"
11734 (string-append (assoc-ref inputs "sdl-union")
11735 "/include/SDL2"))
11736 #t)))))
11737 (native-inputs
f2516de2
HG
11738 `(("pkg-config" ,pkg-config)
11739 ("python-cython" ,python-cython)))
6eb7af2a 11740 (inputs
f2516de2 11741 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11742 ("mesa" ,mesa)
11743 ("sdl-union"
11744 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11745 (home-page "http://kivy.org")
11746 (synopsis
11747 "Multitouch application framework")
11748 (description
11749 "A software library for rapid development of
11750hardware-accelerated multitouch applications.")
11751 (license license:expat)))
11752
11753(define-public python2-kivy
11754 (package-with-python2 python-kivy))
11755
11756(define-public python-kivy-next
11757 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11758 (revision "1"))
11759 (package (inherit python-kivy)
11760 (name "python-kivy-next")
d80a71eb 11761 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11762 (string-take commit 7)))
11763 (source
11764 (origin
11765 (method git-fetch)
11766 (uri (git-reference
11767 (url "https://github.com/kivy/kivy")
11768 (commit commit)))
11769 (file-name (string-append name "-" version "-checkout"))
11770 (sha256
11771 (base32
11772 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11773
11774(define-public python2-kivy-next
11775 (package-with-python2 python-kivy-next))
8794bd8b
DC
11776
11777(define-public python-binaryornot
11778 (package
11779 (name "python-binaryornot")
11780 (version "0.4.0")
11781 (source (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "binaryornot" version))
11784 (sha256
11785 (base32
11786 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11787 (build-system python-build-system)
f22efa01 11788 (propagated-inputs
8794bd8b
DC
11789 `(("python-chardet" ,python-chardet)
11790 ("python-hypothesis" ,python-hypothesis)))
11791 (home-page "https://github.com/audreyr/binaryornot")
11792 (synopsis "Package to check if a file is binary or text")
11793 (description "Ultra-lightweight pure Python package to check if a file is
11794binary or text.")
11795 (license license:bsd-3)
11796 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11797
11798(define-public python2-binaryornot
11799 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11800 (package (inherit base)
f22efa01 11801 (propagated-inputs
8794bd8b 11802 `(("python2-enum34" ,python2-enum34)
f22efa01 11803 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11804
11805(define-public python-nltk
11806 (package
11807 (name "python-nltk")
11808 (version "3.2.1")
11809 (source (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "nltk" version))
11812 (sha256
11813 (base32
11814 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11815 (build-system python-build-system)
59f12985
LF
11816 (arguments
11817 '(;; The tests require some extra resources to be downloaded.
11818 ;; TODO Try packaging these resources.
11819 #:tests? #f))
a9ac982a
DC
11820 (home-page "http://nltk.org/")
11821 (synopsis "Natural Language Toolkit")
11822 (description "It provides interfaces to over 50 corpora and lexical
11823resources such as WordNet, along with a suite of text processing libraries
11824for classification, tokenization, stemming, tagging, parsing, and semantic
11825reasoning, wrappers for natural language processing libraries.")
f210e944 11826 (license license:asl2.0)))
a9ac982a
DC
11827
11828(define-public python2-nltk
f210e944 11829 (package-with-python2 python-nltk))
691cd90d
DC
11830
11831(define-public python-pymongo
11832 (package
11833 (name "python-pymongo")
11834 (version "3.3.0")
11835 (source (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "pymongo" version))
11838 (sha256
11839 (base32
11840 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11841 (build-system python-build-system)
f22efa01 11842 (propagated-inputs
691cd90d
DC
11843 `(("python-certifi" ,python-certifi)))
11844 (home-page "http://github.com/mongodb/mongo-python-driver")
11845 (synopsis "Python driver for MongoDB")
11846 (description "Python driver for MongoDB.")
f210e944 11847 (license license:asl2.0)))
691cd90d
DC
11848
11849(define-public python2-pymongo
f210e944 11850 (package-with-python2 python-pymongo))
6a6c9d43
DC
11851
11852(define-public python-sh
11853 (package
11854 (name "python-sh")
11855 (version "1.11")
11856 (source (origin
11857 (method url-fetch)
11858 (uri (pypi-uri "sh" version))
11859 (sha256
11860 (base32
11861 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11862 (build-system python-build-system)
11863 (arguments
11864 `(#:tests? #f)) ; no tests
11865 (home-page "https://github.com/amoffat/sh")
11866 (synopsis "Python subprocess interface")
11867 (description "Abstracts process invocation by providing a function
11868interface for programs.")
f210e944 11869 (license license:expat)))
6a6c9d43
DC
11870
11871(define-public python2-sh
f210e944 11872 (package-with-python2 python-sh))
05b59190 11873
25702397
EF
11874(define-public python-consul
11875 (package
11876 (name "python-consul")
11877 (version "0.6.1")
11878 (source
11879 (origin
11880 (method url-fetch)
11881 (uri (pypi-uri "python-consul" version))
11882 (sha256
11883 (base32
11884 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11885 (build-system python-build-system)
11886 (native-inputs
fd1d6de7
HG
11887 `(("python-pytest" ,python-pytest)))
11888 (propagated-inputs
11889 `(("python-requests" ,python-requests)
25702397
EF
11890 ("python-six" ,python-six)))
11891 (home-page "https://github.com/cablehead/python-consul")
11892 (synopsis "Python client for Consul")
11893 (description
11894 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11895discovery, monitoring and configuration.")
11896 (license license:expat)))
11897
11898(define-public python2-consul
f210e944 11899 (package-with-python2 python-consul))
25702397 11900
05b59190
DC
11901(define-public python-schematics
11902 (package
11903 (name "python-schematics")
11904 (version "1.1.1")
11905 (source
11906 (origin
11907 (method url-fetch)
11908 (uri (string-append
11909 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11910 (file-name (string-append name "-" version ".tar.gz"))
11911 (sha256
11912 (base32
11913 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11914 (build-system python-build-system)
f22efa01 11915 (propagated-inputs
05b59190
DC
11916 `(("python-six" ,python-six)))
11917 (arguments
11918 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11919 ; version requirements (eg python-coveralls)
11920 (home-page "https://github.com/schematics/schematics")
11921 (synopsis "Python Data Structures for Humans")
11922 (description "Python Data Structures for Humans.")
f210e944 11923 (license license:bsd-3)))
05b59190
DC
11924
11925(define-public python2-schematics
f210e944 11926 (package-with-python2 python-schematics))
d6907ff7
DC
11927
11928(define-public python-publicsuffix
11929 (package
11930 (name "python-publicsuffix")
11931 (version "1.1.0")
11932 (source (origin
11933 (method url-fetch)
11934 (uri (pypi-uri "publicsuffix" version))
11935 (sha256
11936 (base32
11937 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11938 (build-system python-build-system)
11939 (arguments
11940 `(#:tests? #f)) ; tests use the internet
11941 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11942 (synopsis "Get suffix for a domain name")
11943 (description "Get a public suffix for a domain name using the Public Suffix
11944List.")
f210e944 11945 (license license:expat)))
d6907ff7
DC
11946
11947(define-public python2-publicsuffix
f210e944 11948 (package-with-python2 python-publicsuffix))
b2319996
DC
11949
11950(define-public python-publicsuffix2
11951 (package
11952 (name "python-publicsuffix2")
11953 (version "2.20160621")
11954 (source
11955 (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11958 (sha256
11959 (base32
11960 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11961 (build-system python-build-system)
10797a0a
LF
11962 (arguments
11963 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11964 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11965 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11966 (description "Get a public suffix for a domain name using the Public Suffix
11967List. Forked from and using the same API as the publicsuffix package.")
f210e944 11968 (license (list license:expat license:mpl2.0))))
b2319996
DC
11969
11970(define-public python2-publicsuffix2
f210e944 11971 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11972
11973(define-public python-url
11974 (package
11975 (name "python-url")
11976 (version "0.2.0")
11977 (source (origin
11978 (method url-fetch)
11979 (uri (pypi-uri "url" version))
11980 (sha256
11981 (base32
11982 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11983 (build-system python-build-system)
f22efa01 11984 (propagated-inputs
81f1515d
DC
11985 `(("python-publicsuffix" ,python-publicsuffix)))
11986 (native-inputs
11987 `(("python-coverage" ,python-coverage)
11988 ("python-nose" ,python-nose)))
11989 (arguments
11990 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11991 (home-page "http://github.com/seomoz/url-py")
11992 (synopsis "URL Parsing")
11993 (description "Library for parsing urls.")
11994 (license license:expat)
11995 (properties `((python2-variant . ,(delay python2-url))))))
11996
11997(define-public python2-url
11998 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11999 (package (inherit base)
f22efa01 12000 (propagated-inputs
f210e944 12001 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12002
12003(define-public python-freezegun
12004 (package
12005 (name "python-freezegun")
0c315fb3 12006 (version "0.3.8")
974ee2c1
TS
12007 (source
12008 (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "freezegun" version))
12011 (sha256
12012 (base32
0c315fb3 12013 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12014 (build-system python-build-system)
12015 (native-inputs
12016 `(("python-mock" ,python-mock)
12017 ("python-nose" ,python-nose)
4e096968 12018 ("python-coverage" ,python-coverage)))
f22efa01 12019 (propagated-inputs
4e096968 12020 `(("python-six" ,python-six)
22d7360b 12021 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12022 (arguments
12023 `(#:phases (modify-phases %standard-phases
12024 ;; The tests are normally executed via `make test`, but the PyPi
12025 ;; package does not include the Makefile.
12026 (replace 'check
12027 (lambda _
12028 (zero? (system* "nosetests" "./tests/")))))))
12029 (home-page "https://github.com/spulec/freezegun")
12030 (synopsis "Test utility for mocking the datetime module")
12031 (description
12032 "FreezeGun is a library that allows your python tests to travel through
12033time by mocking the datetime module.")
12034 (license license:asl2.0)))
12035
12036(define-public python2-freezegun
f210e944
HG
12037 (package-with-python2 python-freezegun))
12038
dddcb25c
MB
12039
12040(define-public python-odfpy
12041 (package
12042 (name "python-odfpy")
12043 (version "1.3.3")
12044 (source (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "odfpy" version))
12047 (sha256
12048 (base32
12049 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12050 (arguments
12051 `(#:modules ((srfi srfi-1)
12052 (guix build python-build-system)
12053 (guix build utils))
12054 #:phases
12055 (modify-phases %standard-phases
12056 (replace 'check
12057 ;; The test runner invokes python2 and python3 for test*.py.
12058 ;; To avoid having both in inputs, we replicate it here.
12059 (lambda _
12060 (every (lambda (test-file)
12061 (zero? (system* "python" test-file)))
12062 (find-files "tests" "^test.*\\.py$")))))))
12063 (build-system python-build-system)
12064 (home-page "https://github.com/eea/odfpy")
12065 (synopsis "Python API and tools to manipulate OpenDocument files")
12066 (description "Collection of libraries and utility programs written in
12067Python to manipulate OpenDocument 1.2 files.")
12068 (license
12069 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12070 ;; number of files with other licenses.
12071 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12072
12073(define-public python2-odfpy
12074 (package-with-python2 python-odfpy))
b30565bd
MB
12075
12076(define-public python-cachecontrol
12077 (package
12078 (name "python-cachecontrol")
12079 (version "0.11.6")
12080 (source
12081 (origin
12082 (method url-fetch)
12083 ;; Pypi does not have tests.
12084 (uri (string-append
12085 "https://github.com/ionrock/cachecontrol/archive/v"
12086 version ".tar.gz"))
12087 (file-name (string-append name "-" version ".tar.gz"))
12088 (sha256
12089 (base32
12090 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12091 (build-system python-build-system)
12092 (arguments
12093 `(#:phases
12094 (modify-phases %standard-phases
12095 (replace 'check
12096 (lambda _
12097 ;; Drop test that requires internet access.
12098 (delete-file "tests/test_regressions.py")
12099 (setenv "PYTHONPATH"
12100 (string-append (getcwd) "/build/lib:"
12101 (getenv "PYTHONPATH")))
12102 (zero? (system* "py.test" "-vv")))))))
12103 (native-inputs
12104 `(("python-pytest" ,python-pytest)
12105 ("python-redis" ,python-redis)
12106 ("python-webtest" ,python-webtest)
12107 ("python-mock" ,python-mock)))
12108 (propagated-inputs
12109 `(("python-requests" ,python-requests)
12110 ("python-lockfile" ,python-lockfile)))
12111 (home-page "https://github.com/ionrock/cachecontrol")
12112 (synopsis "The httplib2 caching algorithms for use with requests")
12113 (description "CacheControl is a port of the caching algorithms in
12114@code{httplib2} for use with @code{requests} session objects.")
f210e944 12115 (license license:asl2.0)))
b30565bd
MB
12116
12117(define-public python2-cachecontrol
f210e944 12118 (package-with-python2 python-cachecontrol))
243db824
DM
12119
12120(define-public python-lit
12121 (package
12122 (name "python-lit")
12123 (version "0.5.0")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "lit" version))
12128 (sha256
12129 (base32
12130 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12131 (build-system python-build-system)
12132 (home-page "http://llvm.org/")
12133 (synopsis "LLVM Software Testing Tool")
12134 (description "@code{lit} is a portable tool for executing LLVM and Clang
12135style test suites, summarizing their results, and providing indication of
12136failures.")
f210e944 12137 (license license:ncsa)))
243db824
DM
12138
12139(define-public python2-lit
f210e944 12140 (package-with-python2 python-lit))
66f95b20
MB
12141
12142(define-public python-pytest-pep8
12143 (package
12144 (name "python-pytest-pep8")
12145 (version "1.0.6")
12146 (source (origin
12147 (method url-fetch)
12148 (uri (pypi-uri "pytest-pep8" version))
12149 (sha256
12150 (base32
12151 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12152 (build-system python-build-system)
12153 (arguments
b41a05ce 12154 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12155 (native-inputs
12156 `(("python-pytest" ,python-pytest)))
12157 (propagated-inputs
12158 `(("python-pep8" ,python-pep8)))
12159 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12160 (synopsis "Py.test plugin to check PEP8 requirements")
12161 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12162 (license license:expat)))
66f95b20
MB
12163
12164(define-public python2-pytest-pep8
f210e944 12165 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12166
12167(define-public python-pytest-flakes
12168 (package
12169 (name "python-pytest-flakes")
12170 (version "1.0.1")
12171 (source (origin
12172 (method url-fetch)
12173 (uri (pypi-uri "pytest-flakes" version))
12174 (sha256
12175 (base32
12176 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12177 (build-system python-build-system)
12178 (arguments
b41a05ce 12179 `(#:phases
df94a6b5
MB
12180 (modify-phases %standard-phases
12181 (delete 'check)
12182 (add-after 'install 'check
05c2fd36
HG
12183 (lambda* (#:key outputs inputs #:allow-other-keys)
12184 ;; It's easier to run tests after install.
12185 ;; Make installed package available for running the tests
12186 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12187 (zero? (system* "py.test" "-vv")))))))
12188 (native-inputs
12189 `(("python-coverage" ,python-coverage)
12190 ("python-pytest" ,python-pytest)
12191 ("python-pytest-cache" ,python-pytest-cache)
12192 ("python-pytest-pep8" ,python-pytest-pep8)))
12193 (propagated-inputs
12194 `(("python-pyflakes" ,python-pyflakes)))
12195 (home-page "https://github.com/fschulze/pytest-flakes")
12196 (synopsis "Py.test plugin to check source code with pyflakes")
12197 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12198 (license license:expat)))
df94a6b5
MB
12199
12200(define-public python2-pytest-flakes
f210e944 12201 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12202
12203(define-public python-natsort
12204 (package
12205 (name "python-natsort")
12206 (version "5.0.1")
12207 (source (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "natsort" version))
12210 (sha256
12211 (base32
12212 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12213 (build-system python-build-system)
12214 (arguments
12215 `(#:phases
12216 (modify-phases %standard-phases
12217 (add-before 'check 'set-cachedir
12218 ;; Tests require write access to $HOME by default
12219 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12220 (native-inputs
12221 `(("python-hypothesis" ,python-hypothesis)
12222 ("python-pytest-cache" ,python-pytest-cache)
12223 ("python-pytest-cov" ,python-pytest-cov)
12224 ("python-pytest-flakes" ,python-pytest-flakes)
12225 ("python-pytest-pep8" ,python-pytest-pep8)))
12226 (propagated-inputs ; TODO: Add python-fastnumbers.
12227 `(("python-pyicu" ,python-pyicu)))
12228 (home-page "https://github.com/SethMMorton/natsort")
12229 (synopsis "Natural sorting for python and shell")
12230 (description
12231 "Natsort lets you apply natural sorting on lists instead of
12232lexicographical. If you use the built-in @code{sorted} method in python
12233on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12234returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12235function @code{natsorted} that identifies numbers and sorts them separately
12236from strings. It can also sort version numbers, real numbers, mixed types
12237and more, and comes with a shell command @command{natsort} that exposes this
12238functionality in the command line.")
12239 (license license:expat)
12240 (properties `((python2-variant . ,(delay python2-natsort))))))
12241
12242(define-public python2-natsort
12243 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12244 (package (inherit base)
12245 (native-inputs
00e10c6e 12246 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12247 ("python2-mock" ,python2-mock)
12248 ("python2-enum34" ,python2-enum34)
12249 ,@(package-native-inputs base))))))
4efb9c54
SR
12250
12251(define-public python-glances
12252 (package
12253 (name "python-glances")
12254 (version "2.7.1")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "Glances" version))
12259 (sha256
12260 (base32
12261 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12262 (build-system python-build-system)
f22efa01 12263 (propagated-inputs
4efb9c54
SR
12264 `(("python-psutil" ,python-psutil)))
12265 (home-page
12266 "https://github.com/nicolargo/glances")
12267 (synopsis
12268 "A cross-platform curses-based monitoring tool")
12269 (description
12270 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12271Glances uses the PsUtil library to get information from your system. It monitors
12272CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12273 (license license:lgpl3+)))
4efb9c54
SR
12274
12275(define-public python2-glances
f210e944 12276 (package-with-python2 python-glances))
05b7a593
EF
12277
12278(define-public python-graphql-core
12279 (package
12280 (name "python-graphql-core")
12281 (version "0.5.3")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "graphql-core" version))
12286 (sha256
12287 (base32
12288 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12289 (build-system python-build-system)
12290 (arguments
326f8285
LF
12291 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12292 #:phases
05b7a593
EF
12293 (modify-phases %standard-phases
12294 (add-after 'unpack 'patch-hardcoded-version
12295 (lambda _ (substitute*
12296 "setup.py"
12297 (("'gevent==1.1rc1'") "'gevent'"))
12298 #t)))))
12299 (native-inputs
12300 `(("python-gevent" ,python-gevent)
12301 ("python-mock" ,python-mock)
12302 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12303 (propagated-inputs
05b7a593
EF
12304 `(("python-promise" ,python-promise)
12305 ("python-six" ,python-six)))
12306 (home-page "https://github.com/graphql-python/graphql-core")
12307 (synopsis "GraphQL implementation for Python")
12308 (description
12309 "GraphQL implementation for Python. GraphQL is a data query language and
12310runtime designed and used to request and deliver data to mobile and web apps.
12311This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12312to Python.")
05b7a593
EF
12313 (license license:expat)))
12314
12315(define-public python2-graphql-core
f210e944 12316 (package-with-python2 python-graphql-core))
7ee51575
EF
12317
12318(define-public python-graphql-relay
12319 (package
12320 (name "python-graphql-relay")
b13a5b4d 12321 (version "0.4.5")
7ee51575
EF
12322 (source
12323 (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "graphql-relay" version))
12326 (sha256
12327 (base32
b13a5b4d 12328 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12329 (build-system python-build-system)
12330 (native-inputs
12331 `(("python-pytest" ,python-pytest)))
f22efa01 12332 (propagated-inputs
7ee51575
EF
12333 `(("python-graphql-core" ,python-graphql-core)
12334 ("python-promise" ,python-promise)
12335 ("python-six" ,python-six)))
12336 (home-page "https://github.com/graphql-python/graphql-relay-py")
12337 (synopsis "Relay implementation for Python")
12338 (description
12339 "This is a library to allow the easy creation of Relay-compliant servers
12340using the GraphQL Python reference implementation of a GraphQL server. It
12341should be noted that the code is a exact port of the original
12342@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12343from Facebook.")
7ee51575
EF
12344 (license license:expat)))
12345
12346(define-public python2-graphql-relay
f210e944 12347 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12348
12349(define-public python-graphene
12350 (package
12351 (name "python-graphene")
12352 (version "0.10.2")
12353 (source
12354 (origin
12355 (method url-fetch)
12356 (uri (pypi-uri "graphene" version))
12357 (sha256
12358 (base32
12359 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12360 (build-system python-build-system)
12361 (native-inputs
12362 `(("python-django-filter" ,python-django-filter)
12363 ("python-mock" ,python-mock)
12364 ("python-psycopg2" ,python-psycopg2)
12365 ("python-pytest-django" ,python-pytest-django)
12366 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12367 (propagated-inputs
ddc63a56
EF
12368 `(("python-graphql-core" ,python-graphql-core)
12369 ("python-graphql-relay" ,python-graphql-relay)
12370 ("python-iso8601" ,python-iso8601)
12371 ("python-promise" ,python-promise)
12372 ("python-six" ,python-six)))
12373 (home-page "http://graphene-python.org/")
12374 (synopsis "GraphQL Framework for Python")
12375 (description
12376 "Graphene is a Python library for building GraphQL schemas/types.
12377A GraphQL schema describes your data model, and provides a GraphQL server
12378with an associated set of resolve methods that know how to fetch data.")
12379 (properties `((python2-variant . ,(delay python2-graphene))))
12380 (license license:expat)))
12381
12382(define-public python2-graphene
12383 (let ((base (package-with-python2
12384 (strip-python2-variant python-graphene))))
12385 (package (inherit base)
12386 (native-inputs
00e10c6e 12387 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12388 ,@(package-native-inputs base))))))
d488d5d6
EF
12389
12390(define-public python-nautilus
12391 (package
12392 (name "python-nautilus")
12393 (version "0.4.9")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (pypi-uri "nautilus" version))
12398 (sha256
12399 (base32
12400 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12401 (build-system python-build-system)
12402 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12403 (propagated-inputs
d488d5d6
EF
12404 `(("python-bcrypt" ,python-bcrypt)
12405 ("python-click" ,python-click)
12406 ("python-consul" ,python-consul)
d488d5d6
EF
12407 ("python-graphene" ,python-graphene)
12408 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12409 ("python-peewee" ,python-peewee)
12410 ("python-pika" ,python-pika)
d488d5d6
EF
12411 ("python-tornado" ,python-tornado)
12412 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12413 (native-inputs
12414 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12415 (home-page "https://github.com/AlecAivazis/nautilus")
12416 (synopsis "Library for creating microservice applications")
12417 (description
12418 "Nautilus is a framework for flux based microservices that looks to
12419provide extendible implementations of common aspects of a cloud so that you can
12420focus on building massively scalable web applications.")
12421 (license license:expat)))
94cffc63 12422
89cd988b
DM
12423(define-public python-snowballstemmer
12424 (package
12425 (name "python-snowballstemmer")
12426 (version "1.2.1")
12427 (source (origin
1bd858cc
MB
12428 (method url-fetch)
12429 (uri (pypi-uri "snowballstemmer" version))
12430 (sha256
12431 (base32
12432 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12433 (build-system python-build-system)
12434 (arguments
12435 `(;; No tests exist
12436 #:tests? #f))
12437 (home-page "https://github.com/shibukawa/snowball_py")
12438 (synopsis "Snowball stemming library collection for Python")
12439 (description "This package provides 16 word stemmer algorithms generated
12440from Snowball algorithms. It includes the 15 original ones plus the Poerter
12441English stemmer.")
12442 (license license:bsd-3)))
12443
12444(define-public python2-snowballstemmer
12445 (package-with-python2 python-snowballstemmer))
12446
754bfd70
DM
12447(define-public python-sphinx-cloud-sptheme
12448 (package
12449 (name "python-sphinx-cloud-sptheme")
12450 (version "1.7.1")
12451 (source (origin
1bd858cc
MB
12452 (method url-fetch)
12453 (uri (pypi-uri "cloud_sptheme" version))
12454 (sha256
12455 (base32
12456 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12457 (build-system python-build-system)
a31e2f1a
MB
12458 ;; FIXME: The 'pypi' release archive does not contain tests.
12459 (arguments '(#:tests? #f))
1bd858cc
MB
12460 (native-inputs
12461 `(("python-sphinx" ,python-sphinx)))
12462 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12463 (synopsis "'Cloud' theme for Sphinx documenter")
12464 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12465related extensions.")
1bd858cc 12466 (license license:bsd-3)))
754bfd70
DM
12467
12468(define-public python2-sphinx-cloud-sptheme
12469 (package-with-python2 python-sphinx-cloud-sptheme))
12470
807a5b32
DM
12471(define-public python-sphinx-alabaster-theme
12472 (package
12473 (name "python-sphinx-alabaster-theme")
12474 (version "0.7.9")
1bd858cc
MB
12475 (source (origin
12476 (method url-fetch)
12477 (uri (pypi-uri "alabaster" version))
12478 (sha256
12479 (base32
12480 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12481 (build-system python-build-system)
12482 (propagated-inputs
12483 `(("python-pygments" ,python-pygments)))
12484 (home-page "https://alabaster.readthedocs.io/")
12485 (synopsis "Configurable sidebar-enabled Sphinx theme")
12486 (description "Alabaster is a visually (c)lean, responsive, configurable
12487theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12488 (license license:bsd-3)))
12489
12490(define-public python2-sphinx-alabaster-theme
12491 (package-with-python2 python-sphinx-alabaster-theme))
12492
66d3f50a
LF
12493(define-public python-betamax
12494 (package
12495 (name "python-betamax")
12496 (version "0.8.0")
12497 (source
12498 (origin
12499 (method url-fetch)
12500 (uri (pypi-uri "betamax" version))
12501 (sha256
12502 (base32
12503 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12504 (build-system python-build-system)
12505 (arguments
12506 '(;; Many tests fail because they require networking.
12507 #:tests? #f))
c415f763 12508 (propagated-inputs
66d3f50a
LF
12509 `(("python-requests" ,python-requests)))
12510 (home-page "https://github.com/sigmavirus24/betamax")
12511 (synopsis "Record HTTP interactions with python-requests")
12512 (description "Betamax will record your test suite's HTTP interactions and
12513replay them during future tests. It is designed to work with python-requests.")
f210e944 12514 (license license:expat)))
66d3f50a
LF
12515
12516(define-public python2-betamax
f210e944 12517 (package-with-python2 python-betamax))
ca0635b4 12518
94cffc63
LF
12519(define-public python-s3transfer
12520 (package
12521 (name "python-s3transfer")
1b5ea092 12522 (version "0.1.10")
94cffc63
LF
12523 (source (origin
12524 (method url-fetch)
12525 (uri (pypi-uri "s3transfer" version))
12526 (sha256
12527 (base32
1b5ea092 12528 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12529 (build-system python-build-system)
fad8bf97
LF
12530 (arguments
12531 `(#:phases
12532 (modify-phases %standard-phases
12533 (replace 'check
12534 (lambda _
12535 ;; 7 of the 'integration' tests require network access or login
12536 ;; credentials.
12537 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12538 (native-inputs
fad8bf97
LF
12539 `(("python-docutils" ,python-docutils)
12540 ("python-mock" ,python-mock)
12541 ("python-nose" ,python-nose)))
f22efa01 12542 (propagated-inputs
94cffc63
LF
12543 `(("python-botocore" ,python-botocore)))
12544 (synopsis "Amazon S3 Transfer Manager")
12545 (description "S3transfer is a Python library for managing Amazon S3
12546transfers.")
12547 (home-page "https://github.com/boto/s3transfer")
12548 (license license:asl2.0)
12549 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12550
12551(define-public python2-s3transfer
12552 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12553 (package
12554 (inherit base)
12555 (native-inputs
12556 `(("python2-futures" ,python2-futures)
94cffc63 12557 ,@(package-native-inputs base))))))
8ab59181
HG
12558
12559(define-public python-setproctitle
12560(package
12561 (name "python-setproctitle")
12562 (version "1.1.10")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "setproctitle" version))
12567 (sha256
12568 (base32
12569 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12570 (build-system python-build-system)
12571 (arguments
12572 '(#:phases
12573 (modify-phases %standard-phases
12574 (add-before 'check 'patch-Makefile
12575 ;; Stricly this is only required for the python2 variant.
12576 ;; But adding a phase in an inherited package seems to be
12577 ;; cumbersum. So we patch even for python3.
12578 (lambda _
12579 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12580 (when nose
12581 (substitute* "Makefile"
12582 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12583 (string-append nose "/bin/nosetests "))))
12584 #t)))
12585 (replace 'check
12586 (lambda _
12587 (setenv "PYTHON" (or (which "python3") (which "python")))
12588 (setenv "PYCONFIG" (or (which "python3-config")
12589 (which "python-config")))
12590 (setenv "CC" "gcc")
12591 ;; No need to extend PYTHONPATH to find the built package, since
12592 ;; the Makefile will build anyway
12593 (zero? (system* "make" "check")))))))
12594 (native-inputs
12595 `(("procps" ,procps))) ; required for tests
12596 (home-page
12597 "https://github.com/dvarrazzo/py-setproctitle")
12598 (synopsis
12599 "Setproctitle implementation for Python to customize the process title")
12600 (description "The library allows a process to change its title (as displayed
12601by system tools such as ps and top).
12602
12603Changing the title is mostly useful in multi-process systems, for
12604example when a master process is forked: changing the children's title
12605allows to identify the task each process is busy with. The technique
12606is used by PostgreSQL and the OpenSSH Server for example.")
12607 (license license:bsd-3)
12608 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12609
12610(define-public python2-setproctitle
12611 (let ((base (package-with-python2
12612 (strip-python2-variant python-setproctitle))))
12613 (package
12614 (inherit base)
12615 (native-inputs `(("python2-nose" ,python2-nose)
12616 ,@(package-native-inputs base))))))
162e42d8
HG
12617
12618(define-public python-validictory
12619 (package
12620 (name "python-validictory")
12621 (version "1.0.1")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "validictory" version))
12626 (sha256
12627 (base32
12628 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12629 (build-system python-build-system)
12630 (arguments
12631 '(#:phases
12632 (modify-phases %standard-phases
12633 (add-after 'unpack 'bootstrap
12634 ;; Move the tests out of the package directory to avoid
12635 ;; packaging them.
12636 (lambda* _
12637 (rename-file "validictory/tests" "tests")
12638 (delete-file "tests/__init__.py")))
12639 (replace 'check
12640 (lambda _
12641 ;; Extend PYTHONPATH so the built package will be found.
12642 (setenv "PYTHONPATH"
12643 (string-append (getcwd) "/build/lib:"
12644 (getenv "PYTHONPATH")))
12645 (zero? (system* "py.test" "-vv" )))))))
12646 (native-inputs
12647 `(("python-pytest" ,python-pytest)))
12648 (home-page
12649 "https://github.com/jamesturk/validictory")
12650 (synopsis "General purpose Python data validator")
12651 (description "It allows validation of arbitrary Python data structures.
12652
12653The schema format is based on the JSON Schema
12654proposal (http://json-schema.org), so combined with json the library is also
12655useful as a validator for JSON data.")
f210e944 12656 (license license:expat)))
162e42d8
HG
12657
12658(define-public python2-validictory
f210e944 12659 (package-with-python2 python-validictory))
0990edfe
DM
12660
12661(define-public python-aniso8601
12662 (package
12663 (name "python-aniso8601")
12664 (version "1.1.0")
12665 (source
12666 (origin
12667 (method url-fetch)
12668 (uri (pypi-uri "aniso8601" version))
12669 (sha256
12670 (base32
12671 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12672 (build-system python-build-system)
12673 (propagated-inputs
22d7360b 12674 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12675 (home-page
12676 "https://bitbucket.org/nielsenb/aniso8601")
12677 (synopsis
12678 "Python library for parsing ISO 8601 strings")
12679 (description
12680 "This package contains a library for parsing ISO 8601 datetime strings.")
12681 (license license:bsd-3)))
999d964d
DM
12682
12683(define-public python-flask-restful
12684 (package
12685 (name "python-flask-restful")
12686 (version "0.3.5")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "Flask-RESTful" version))
12691 (sha256
12692 (base32
12693 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12694 (build-system python-build-system)
12695 (propagated-inputs
12696 `(("python-aniso8601" ,python-aniso8601)
12697 ("python-flask" ,python-flask)
12698 ("python-pycrypto" ,python-pycrypto)
12699 ("python-pytz" ,python-pytz)))
12700 (native-inputs
12701 `(;; Optional dependency of Flask. Tests need it.
12702 ("python-blinker" ,python-blinker)
12703 ("python-mock" ,python-mock) ; For tests
12704 ("python-nose" ,python-nose) ; For tests
12705 ("python-sphinx" ,python-sphinx)))
12706 (home-page
12707 "https://www.github.com/flask-restful/flask-restful/")
12708 (synopsis
12709 "Flask module for creating REST APIs")
12710 (description
12711 "This package contains a Flask module for creating REST APIs.")
12712 (license license:bsd-3)))
31288222
DM
12713
12714(define-public python-flask-basicauth
12715 (package
12716 (name "python-flask-basicauth")
12717 (version "0.2.0")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 (uri (pypi-uri "Flask-BasicAuth" version))
12722 (sha256
12723 (base32
12724 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12725 (build-system python-build-system)
12726 (propagated-inputs
12727 `(("python-flask" ,python-flask)))
12728 (home-page
12729 "https://github.com/jpvanhal/flask-basicauth")
12730 (synopsis
12731 "HTTP basic access authentication for Flask")
12732 (description
12733 "This package provides HTTP basic access authentication for Flask.")
12734 (license license:bsd-3)))
903276d0
DM
12735
12736(define-public python-flask-sqlalchemy
12737 (package
12738 (name "python-flask-sqlalchemy")
12739 (version "2.1")
12740 (source
12741 (origin
12742 (method url-fetch)
12743 (uri (pypi-uri "Flask-SQLAlchemy" version))
12744 (sha256
12745 (base32
12746 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12747 (build-system python-build-system)
12748 (propagated-inputs
12749 `(("python-flask" ,python-flask)
12750 ("python-sqlalchemy" ,python-sqlalchemy)))
12751 (home-page
12752 "http://github.com/mitsuhiko/flask-sqlalchemy")
12753 (synopsis
12754 "Module adding SQLAlchemy support to your Flask application")
12755 (description
12756 "This package adds SQLAlchemy support to your Flask application.")
12757 (license license:bsd-3)))
329b4b3b
LF
12758
12759(define-public python-pyev
12760 (package
12761 (name "python-pyev")
12762 (version "0.9.0")
12763 (source
12764 (origin
12765 (method url-fetch)
12766 (uri (pypi-uri "pyev" version))
12767 (sha256
12768 (base32
12769 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12770 (build-system python-build-system)
12771 (arguments
12772 `(#:tests? #f ; no test suite
12773 #:phases
12774 (modify-phases %standard-phases
12775 (add-after 'unpack 'patch
12776 (lambda* (#:key inputs #:allow-other-keys)
12777 (let ((libev (string-append (assoc-ref inputs "libev")
12778 "/lib/libev.so.4")))
12779 (substitute* "setup.py"
12780 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12781 (string-append "libev_dll_name = \"" libev "\"")))))))))
12782 (inputs
12783 `(("libev" ,libev)))
12784 (home-page "http://pythonhosted.org/pyev/")
12785 (synopsis "Python libev interface")
12786 (description "Pyev provides a Python interface to libev.")
12787 (license license:gpl3)))
12788
12789(define-public python2-pyev
12790 (package-with-python2 python-pyev))
45b4f127
DM
12791
12792(define-public python-imagesize
12793 (package
12794 (name "python-imagesize")
12795 (version "0.7.1")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "imagesize" version))
12800 (sha256
12801 (base32
12802 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12803 (build-system python-build-system)
9422c98a
LF
12804 (arguments
12805 '(;; Test files are not distributed on PyPi:
12806 ;; https://github.com/shibukawa/imagesize_py/issues/7
12807 #:tests? #f))
45b4f127
DM
12808 (home-page "https://github.com/shibukawa/imagesize_py")
12809 (synopsis "Gets image size of files in variaous formats in Python")
12810 (description
12811 "This package allows determination of image size from
12812PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12813 (license license:expat)))
45b4f127
DM
12814
12815(define-public python2-imagesize
f210e944 12816 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12817
12818(define-public python-axolotl-curve25519
12819 (package
12820 (name "python-axolotl-curve25519")
12821 (version "0.1")
12822 (source
12823 (origin
12824 (method git-fetch)
12825 (uri (git-reference
12826 (url "git://github.com/tgalal/python-axolotl-curve25519")
12827 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12828 (file-name (string-append name "-" version "-checkout"))
12829 (sha256
12830 (base32
12831 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12832 (build-system python-build-system)
12833 (arguments
12834 `(;; Prevent creation of the egg. This works around
12835 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12836 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12837 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12838 (synopsis "Python wrapper for curve25519 library")
12839 (description "This is a python wrapper for the curve25519 library
12840with ed25519 signatures. The C code was pulled from
12841libaxolotl-android. At the moment this wrapper is meant for use by
12842python-axolotl.")
12843 (license (list license:gpl3 ; Most files
683cdbf5 12844 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12845
12846(define-public python2-axolotl-curve25519
12847 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12848
12849(define-public python-axolotl
12850 (package
12851 (name "python-axolotl")
12852 (version "0.1.35")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (string-append
12857 "https://github.com/tgalal/python-axolotl/archive/"
12858 version ".tar.gz"))
12859 (file-name (string-append name "-" version ".tar.gz"))
12860 (sha256
12861 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12862 (build-system python-build-system)
12863 (arguments
12864 `(#:phases
12865 (modify-phases %standard-phases
12866 ;; Don't install tests
12867 (add-before 'install 'remove-tests
12868 (lambda _
12869 (for-each delete-file-recursively
12870 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 12871 #t)))))
06ff0837
AI
12872 (propagated-inputs
12873 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12874 ("python-dateutil" ,python-dateutil)
12875 ("python-protobuf" ,python-protobuf)
12876 ("python-pycrypto" ,python-pycrypto)))
12877 (home-page "https://github.com/tgalal/python-axolotl")
12878 (synopsis "Python port of libaxolotl-android")
12879 (description "This is a python port of libaxolotl-android. This
12880is a ratcheting forward secrecy protocol that works in synchronous and
12881asynchronous messaging environments.")
12882 (license license:gpl3)))
12883
12884(define-public python2-axolotl
12885 (package-with-python2 python-axolotl))
e2fca490
DM
12886
12887(define-public python-termstyle
12888 (package
12889 (name "python-termstyle")
12890 (version "0.1.11")
12891 (source
12892 (origin
12893 (method url-fetch)
12894 (uri (pypi-uri "termstyle" version))
12895 (sha256
12896 (base32
12897 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12898 (build-system python-build-system)
7917a135
MB
12899 (arguments
12900 '(#:phases
12901 (modify-phases %standard-phases
12902 (replace 'check
12903 (lambda _
12904 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12905 (home-page "http://github.com/gfxmonk/termstyle")
12906 (synopsis "Console text coloring for Python")
12907 (description "This package provides console text coloring for Python.")
12908 (license license:bsd-3)))
1e6112d8
DM
12909
12910(define-public python-rednose
12911 (package
12912 (name "python-rednose")
12913 (version "1.2.1")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "rednose" version))
12918 (sha256
12919 (base32
12920 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12921 (build-system python-build-system)
12922 (arguments
12923 `(#:phases
12924 (modify-phases %standard-phases
12925 (add-after 'unpack 'fix-deps
12926 (lambda _
12927 ;; See <https://github.com/JBKahn/rednose/issues/12>
12928 (substitute* "setup.py"
12929 (("python-termstyle") "termstyle"))
12930 #t)))))
12931 (propagated-inputs
12932 `(("python-colorama" ,python-colorama)
12933 ("python-termstyle" ,python-termstyle)))
12934 (native-inputs
12935 `(("python-six" ,python-six)
12936 ("python-nose" ,python-nose)))
12937 (home-page "https://github.com/JBKahn/rednose")
12938 (synopsis "Colored output for Python nosetests")
12939 (description "This package provides colored output for the
12940@command{nosetests} command of the Python Nose unit test framework.")
12941 (license license:bsd-3)))
0a7f17f0
DM
12942
12943(define-public python-flask-restplus
12944 (package
12945 (name "python-flask-restplus")
12946 (version "0.9.2")
12947 (source
12948 (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "flask-restplus" version))
12951 (sha256
12952 (base32
12953 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12954 (build-system python-build-system)
59f74825
MB
12955 (arguments
12956 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12957 ;; #:phases
12958 ;; (modify-phases %standard-phases
12959 ;; (replace 'check
12960 ;; (lambda _
12961 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12962 (propagated-inputs
12963 `(("python-aniso8601" ,python-aniso8601)
12964 ("python-flask" ,python-flask)
12965 ("python-jsonschema" ,python-jsonschema)
12966 ("python-pytz" ,python-pytz)
12967 ("python-six" ,python-six)))
12968 (native-inputs
12969 `(("python-tzlocal" ,python-tzlocal)
12970 ("python-blinker" ,python-blinker)
12971 ("python-nose" ,python-nose)
12972 ("python-rednose" ,python-rednose)))
12973 (home-page "https://github.com/noirbizarre/flask-restplus")
12974 (synopsis "Framework for documented API development with Flask")
12975 (description "This package provides a framework for API development with
12976the Flask web framework in Python. It is similar to package
12977@code{python-flask-restful} but supports the @code{python-swagger}
12978documentation builder.")
12979 (license license:expat)))
1ed21519
DM
12980
12981(define-public python-sadisplay
12982 (package
12983 (name "python-sadisplay")
12984 (version "0.4.6")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "sadisplay" version))
12989 (sha256
12990 (base32
12991 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12992 (build-system python-build-system)
12993 (propagated-inputs
12994 `(("python-sqlalchemy" ,python-sqlalchemy)))
12995 (native-inputs
12996 `(("python-nose" ,python-nose)))
12997 (home-page "https://bitbucket.org/estin/sadisplay")
12998 (synopsis "SQLAlchemy schema displayer")
12999 (description "This package provides a program to build Entity
13000Relationship diagrams from a SQLAlchemy model (or directly from the
13001database).")
13002 (license license:bsd-3)))
13003
13004(define-public python2-sadisplay
13005 (package-with-python2 python-sadisplay))
444a79b6
DM
13006
13007(define-public python-flask-restful-swagger
13008 (package
13009 (name "python-flask-restful-swagger")
13010 (version "0.19")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "flask-restful-swagger" version))
13015 (sha256
13016 (base32
13017 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13018 (build-system python-build-system)
13019 (propagated-inputs
13020 `(("python-flask-restful" ,python-flask-restful)))
13021 (home-page "https://github.com/rantav/flask-restful-swagger")
13022 (synopsis "Extract Swagger specs from Flask-Restful projects")
13023 (description "This package lets you extract Swagger API documentation
13024specs from your Flask-Restful projects.")
13025 (license license:expat)))
13026
13027(define-public python2-flask-restful-swagger
13028 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13029
13030(define-public python-argcomplete
13031 (package
13032 (name "python-argcomplete")
13033 (version "1.7.0")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "argcomplete" version))
13038 (sha256
13039 (base32
13040 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13041 (build-system python-build-system)
80ce42bd
MB
13042 (native-inputs
13043 `(("python-pexpect" ,python-pexpect)
13044 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13045 (home-page "https://github.com/kislyuk/argcomplete")
13046 (synopsis "Shell tab completion for Python argparse")
13047 (description "argcomplete provides extensible command line tab completion
13048of arguments and options for Python scripts using @code{argparse}. It's
13049particularly useful for programs with many options or sub-parsers that can
13050dynamically suggest completions; for example, when browsing resources over the
13051network.")
13052 (license license:asl2.0)))
13053
13054(define-public python2-argcomplete
13055 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13056
13057(define-public python-xopen
13058 (package
13059 (name "python-xopen")
13060 (version "0.1.1")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "xopen" version))
13065 (sha256
13066 (base32
13067 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13068 (file-name (string-append name "-" version ".tar.gz"))))
13069 (build-system python-build-system)
13070 (home-page "https://github.com/marcelm/xopen/")
13071 (synopsis "Open compressed files transparently")
13072 (description "This module provides an @code{xopen} function that works like
13073Python's built-in @code{open} function, but can also deal with compressed files.
13074Supported compression formats are gzip, bzip2 and, xz, and are automatically
13075recognized by their file extensions. The focus is on being as efficient as
13076possible on all supported Python versions.")
13077 (license license:expat)))
13078
13079(define-public python2-xopen
13080 (package-with-python2 python-xopen))
8d67610b
DM
13081
13082(define-public python2-cheetah
13083 (package
13084 (name "python2-cheetah")
13085 (version "2.4.4")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "Cheetah" version))
13090 (sha256
13091 (base32
13092 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13093 (build-system python-build-system)
13094 (arguments
13095 `(#:python ,python-2))
13096 (propagated-inputs
13097 `(("python2-markdown" ,python2-markdown)))
13098 (home-page "https://pythonhosted.org/Cheetah/")
13099 (synopsis "Template engine")
13100 (description "Cheetah is a text-based template engine and Python code
13101generator.
13102
13103Cheetah can be used as a standalone templating utility or referenced as
13104a library from other Python applications. It has many potential uses,
13105but web developers looking for a viable alternative to ASP, JSP, PHP and
13106PSP are expected to be its principle user group.
13107
13108Features:
13109@enumerate
13110@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13111 text-based format.
13112@item Cleanly separates content, graphic design, and program code.
13113@item Blends the power and flexibility of Python with a simple template language
13114 that non-programmers can understand.
13115@item Gives template writers full access to any Python data structure, module,
13116 function, object, or method in their templates.
13117@item Makes code reuse easy by providing an object-orientated interface to
13118 templates that is accessible from Python code or other Cheetah templates.
13119 One template can subclass another and selectively reimplement sections of it.
13120@item Provides a simple, yet powerful, caching mechanism that can dramatically
13121 improve the performance of a dynamic website.
13122@item Compiles templates into optimized, yet readable, Python code.
13123@end enumerate")
13124 (license (license:x11-style "file://LICENSE"))))
916aafa4 13125
d83d8722
DM
13126(define-public python-dulwich
13127 (package
13128 (name "python-dulwich")
13129 (version "0.16.3")
13130 (source
13131 (origin
13132 (method url-fetch)
13133 (uri (list (string-append "https://www.dulwich.io/releases/"
13134 "dulwich-" version ".tar.gz")
13135 (pypi-uri "dulwich" version)))
13136 (sha256
13137 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13138 (build-system python-build-system)
13139 (arguments
13140 `(#:phases
13141 (modify-phases %standard-phases
13142 (add-before 'check 'fix-tests
13143 (lambda* (#:key inputs #:allow-other-keys)
13144 ;; The tests use Popen with a custom environment which doesn't
13145 ;; include PATH.
13146 (substitute* "dulwich/tests/compat/utils.py"
13147 (("'git'") (string-append "'"
13148 (which "git")
13149 "'")))
13150 (substitute* '("dulwich/tests/test_repository.py"
13151 "dulwich/tests/test_hooks.py")
13152 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13153 (setenv "TEST_RUNNER" "unittest")
13154 (setenv "PYTHONHASHSEED" "random")
13155 #t)))))
13156 (propagated-inputs
13157 `(("python-fastimport" ,python-fastimport)))
13158 (native-inputs
13159 `(("python-mock" ,python-mock)
13160 ("python-geventhttpclient" ,python-geventhttpclient)
13161 ("git" ,git)))
13162 (home-page "https://www.dulwich.io/")
13163 (synopsis "Git implementation in Python")
13164 (description "Dulwich is an implementation of the Git file formats and
13165protocols written in pure Python.")
13166 ;; Can be used with either license.
13167 (license (list license:asl2.0 license:gpl2+))))
13168
13169(define-public python2-dulwich
13170 (package-with-python2 python-dulwich))
424b1ae7 13171
916aafa4
CZ
13172(define-public python-pbkdf2
13173 (package
13174 (name "python-pbkdf2")
13175 (version "1.3")
13176 (source
13177 (origin
13178 (method url-fetch)
13179 (uri (pypi-uri "pbkdf2" version))
13180 (sha256
13181 (base32
13182 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13183 (build-system python-build-system)
fffcd8b8
MB
13184 (arguments
13185 '(#:phases
13186 (modify-phases %standard-phases
13187 (replace 'check
13188 (lambda _
13189 (setenv "PYTHONPATH"
13190 (string-append (getcwd) "/build/lib:"
13191 (getenv "PYTHONPATH")))
13192 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13193 (propagated-inputs
13194 `(("python-pycrypto" ,python-pycrypto))) ; optional
13195 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13196 (synopsis "Password-based key derivation")
13197 (description "This module implements the password-based key derivation
13198function, PBKDF2, specified in RSA PKCS#5 v2.0.
13199
13200PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13201is part of the RSA Public Key Cryptography Standards series. The provided
13202implementation takes a password or a passphrase and a salt value (and
13203optionally a iteration count, a digest module, and a MAC module) and provides
13204a file-like object from which an arbitrarly-sized key can be read.")
13205 (license license:expat)))
13206
13207(define-public python2-pbkdf2
13208 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13209
13210(define-public python-qrcode
13211 (package
13212 (name "python-qrcode")
13213 (version "5.3")
13214 (source
13215 (origin
13216 (method url-fetch)
13217 (uri (pypi-uri "qrcode" version))
13218 (sha256
13219 (base32
13220 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13221 (build-system python-build-system)
6925cd78
MB
13222 (arguments
13223 ;; FIXME: Tests require packaging 'pymaging'.
13224 '(#:tests? #f))
cba84a38
CZ
13225 (propagated-inputs
13226 `(("python-lxml" ,python-lxml) ; for SVG output
13227 ("python-pillow" ,python-pillow) ; for PNG output
13228 ("python-six" ,python-six)))
13229 (home-page "https://github.com/lincolnloop/python-qrcode")
13230 (synopsis "QR Code image generator")
13231 (description "This package provides a pure Python QR Code generator
13232module. It uses the Python Imaging Library (PIL) to allow for the generation
13233of QR Codes.
13234
13235In addition this package provides a command line tool to generate QR codes and
13236either write these QR codes to a file or do the output as ascii art at the
13237console.")
13238 (license license:bsd-3)))
13239
13240(define-public python2-qrcode
13241 (package-with-python2 python-qrcode))
af7caada
CZ
13242
13243;; SlowAES isn't compatible with Python 3.
13244(define-public python2-slowaes
13245 (package
13246 (name "python2-slowaes")
13247 (version "0.1a1")
13248 (source
13249 (origin
13250 (method url-fetch)
13251 (uri (pypi-uri "slowaes" version))
13252 (sha256
13253 (base32
13254 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13255 (build-system python-build-system)
13256 (arguments `(#:python ,python-2))
13257 (home-page "http://code.google.com/p/slowaes/")
13258 (synopsis "Implementation of AES in Python")
13259 (description "This package contains an implementation of AES in Python.
13260This implementation is slow (hence the project name) but still useful when
13261faster ones are not available.")
13262 (license license:asl2.0)))
1a917fc9
MFM
13263
13264(define-public python-rst2ansi
13265 (package
13266 (name "python-rst2ansi")
13267 (version "0.1.5")
13268 (source
13269 (origin
13270 (method url-fetch)
13271 (uri (pypi-uri "rst2ansi" version))
13272 (sha256
13273 (base32
13274 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13275 (build-system python-build-system)
13276 (propagated-inputs
13277 `(("python-docutils" ,python-docutils)))
13278 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13279 (synopsis "Convert RST to ANSI-decorated console output")
13280 (description
13281 "Python module dedicated to rendering RST (reStructuredText) documents
13282to ansi-escaped strings suitable for display in a terminal.")
13283 (license license:expat)))
2f4623db
MFM
13284
13285(define-public python-ddt
13286 (package
13287 (name "python-ddt")
13288 (version "1.1.1")
13289 (source
13290 (origin
13291 (method url-fetch)
13292 (uri (pypi-uri "ddt" version))
13293 (sha256
13294 (base32
13295 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13296 (build-system python-build-system)
13297 (native-inputs
13298 `(("python-mock" ,python-mock)
13299 ("python-nose" ,python-nose)))
13300 (propagated-inputs
13301 `(("python-six" ,python-six)
13302 ("python-pyyaml" ,python-pyyaml)))
13303 (home-page "https://github.com/txels/ddt")
13304 (synopsis "Data-Driven Tests")
13305 (description
13306 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13307it with different test data, and make it appear as multiple test cases.")
13308 (license license:expat)))
13309
13310(define-public python2-ddt
13311 (package-with-python2 python-ddt))
2299b137
MFM
13312
13313(define-public python-pycosat
13314 (package
13315 (name "python-pycosat")
13316 (version "0.6.1")
13317 (source
13318 (origin
13319 (method url-fetch)
13320 (uri (pypi-uri "pycosat" version))
13321 (sha256
13322 (base32
13323 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13324 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13325 (build-system python-build-system)
13326 (home-page "https://github.com/ContinuumIO/pycosat")
13327 (synopsis "Bindings to picosat (a SAT solver)")
13328 (description
13329 "This package provides efficient Python bindings to @code{picosat} on
13330the C level. When importing pycosat, the @code{picosat} solver becomes part
13331of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13332Problem} (SAT) solver.")
13333 (license license:expat)))
13334
13335(define-public python2-pycosat
13336 (package-with-python2 python-pycosat))
8fd68504
MFM
13337
13338(define-public python2-ruamel.ordereddict
13339 (package
13340 (name "python2-ruamel.ordereddict")
13341 (version "0.4.9")
13342 (source
13343 (origin
13344 (method url-fetch)
13345 (uri (pypi-uri "ruamel.ordereddict" version))
13346 (sha256
13347 (base32
13348 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13349 (build-system python-build-system)
13350 (arguments
13351 `(#:python ,python-2
13352 #:phases
13353 (modify-phases %standard-phases
13354 (delete 'check)
13355 (add-after 'install 'check
13356 (lambda* (#:key inputs outputs #:allow-other-keys)
13357 (add-installed-pythonpath inputs outputs)
13358 (zero? (system* "python" "test/testordereddict.py")))))))
13359 (home-page "https://bitbucket.org/ruamel/ordereddict")
13360 (synopsis "Version of dict that keeps keys in insertion order")
13361 (description
13362 "This is an implementation of an ordered dictionary with @dfn{Key
13363Insertion Order} (KIO: updates of values do not affect the position of the
13364key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13365removed and put at the back). The standard library module @code{OrderedDict},
13366implemented later, implements a subset of @code{ordereddict} functionality.
13367Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13368Order} (KSO, no sorting function can be specified, but a transform can be
13369specified to apply on the key before comparison (e.g. @code{string.lower})).")
13370 (license license:expat)))
d8768e31
EB
13371
13372(define-public python-pypeg2
13373 (package
13374 (name "python-pypeg2")
13375 (version "2.15.2")
13376 (source
13377 (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "pyPEG2" version))
13380 (sha256
13381 (base32
13382 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13383 (build-system python-build-system)
13384 (propagated-inputs `(("python-lxml" ,python-lxml)))
13385 (arguments
13386 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13387 '(#:tests? #f))
13388 (home-page "https://fdik.org/pyPEG/")
13389 (synopsis "Parsering Expression Grammars in Python")
13390 (description "PyPEG is an intrinsic parser interpreter framework for
13391Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13392parse many formal languages.")
13393 (license license:gpl2)))