gnu: python-matplotlib: Fix build.
[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>
a480bc41 6;;; Copyright © 2014 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>
6a44697d 14;;; Copyright © 2015, 2016 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>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 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>
a01b6da7
NK
34;;;
35;;; This file is part of GNU Guix.
36;;;
37;;; GNU Guix is free software; you can redistribute it and/or modify it
38;;; under the terms of the GNU General Public License as published by
39;;; the Free Software Foundation; either version 3 of the License, or (at
40;;; your option) any later version.
41;;;
42;;; GNU Guix is distributed in the hope that it will be useful, but
43;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45;;; GNU General Public License for more details.
46;;;
47;;; You should have received a copy of the GNU General Public License
48;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
1ffa7090 50(define-module (gnu packages python)
3f641af0 51 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 52 #:use-module (gnu packages)
8e451885 53 #:use-module (gnu packages algebra)
d79a343b 54 #:use-module (gnu packages adns)
89b2e0b0 55 #:use-module (gnu packages attr)
d96034ed 56 #:use-module (gnu packages backup)
3969ca54 57 #:use-module (gnu packages bash)
1ffa7090 58 #:use-module (gnu packages compression)
4ed20663 59 #:use-module (gnu packages databases)
ddc63a56 60 #:use-module (gnu packages django)
5e1c9367 61 #:use-module (gnu packages file)
4ed20663 62 #:use-module (gnu packages fontutils)
4ed20663
AE
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
6eb7af2a 65 #:use-module (gnu packages gl)
4ed20663 66 #:use-module (gnu packages glib)
6eb7af2a 67 #:use-module (gnu packages gstreamer)
4ed20663 68 #:use-module (gnu packages gtk)
421a80a2 69 #:use-module (gnu packages icu4c)
c937562e 70 #:use-module (gnu packages image)
4ed20663 71 #:use-module (gnu packages imagemagick)
d79a343b 72 #:use-module (gnu packages libevent)
b10ab723 73 #:use-module (gnu packages libffi)
89b2e0b0 74 #:use-module (gnu packages linux)
0da98533 75 #:use-module (gnu packages maths)
4ed20663 76 #:use-module (gnu packages multiprecision)
45203542 77 #:use-module (gnu packages networking)
be7134bf 78 #:use-module (gnu packages ncurses)
b04a52a6 79 #:use-module (gnu packages openstack)
d488d5d6 80 #:use-module (gnu packages password-utils)
c9b1b4f9 81 #:use-module (gnu packages pcre)
4ed20663 82 #:use-module (gnu packages perl)
b10ab723 83 #:use-module (gnu packages pkg-config)
06ff0837 84 #:use-module (gnu packages protobuf)
4ed20663 85 #:use-module (gnu packages readline)
6eb7af2a 86 #:use-module (gnu packages sdl)
c9b1b4f9 87 #:use-module (gnu packages statistics)
8f9ac901 88 #:use-module (gnu packages tex)
1c65314c 89 #:use-module (gnu packages texinfo)
cc2b77df 90 #:use-module (gnu packages tls)
e25f0174 91 #:use-module (gnu packages version-control)
02f8f804 92 #:use-module (gnu packages video)
8d12be1e 93 #:use-module (gnu packages web)
ce0614dd 94 #:use-module (gnu packages base)
26b307e2 95 #:use-module (gnu packages xml)
6fa14469 96 #:use-module (gnu packages xorg)
0bdc1671 97 #:use-module (gnu packages xdisorg)
4ed20663 98 #:use-module (gnu packages zip)
afa181ff 99 #:use-module (gnu packages tcl)
63bcec71 100 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
101 #:use-module (guix packages)
102 #:use-module (guix download)
ea5456c8 103 #:use-module (guix git-download)
11bb85a1 104 #:use-module (guix utils)
acc26ff1 105 #:use-module (guix build-system gnu)
d8c4998f 106 #:use-module (guix build-system cmake)
898238b9 107 #:use-module (guix build-system python)
1c65314c
FB
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
a01b6da7 110
45848023 111(define-public python-2.7
a01b6da7
NK
112 (package
113 (name "python")
f0499100 114 (version "2.7.12")
a01b6da7
NK
115 (source
116 (origin
117 (method url-fetch)
9b43a0ff 118 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
f0499100 122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
15e57f57 125 "python-2.7-site-prefixes.patch"
c3052d6b 126 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
f0499100 135 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
1bb163b0 140 "Lib/test/test_subprocess.py"))
10a42aa2 141 #t))))
02f0c3b2
LC
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 144 (build-system gnu-build-system)
3fdc99da 145 (arguments
10a42aa2 146 `(;; 356 tests OK.
e7e7a1eb
EF
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
ff6f33cf
ED
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 162 #:test-target "test"
3fdc99da 163 #:configure-flags
6a20289d
LC
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
aaf75c89 166 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
fd982732 169
d2cc9c7c
LC
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
fd982732 172 #:phases
46472ecd
MW
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
dedc8320
LC
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
a665996f 189 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 190 #t))
5b4e2791
LC
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
46472ecd
MW
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
02f0c3b2 224 #t)))
9ffe61b0
LC
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
216c283b
LC
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
02f0c3b2
LC
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
a01b6da7 277 (inputs
3fdc99da
CR
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
b10ab723 280 ("libffi" ,libffi) ; for ctypes
b88e1b0a 281 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 282 ("openssl" ,openssl)
3fdc99da 283 ("readline" ,readline)
afa181ff
LC
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
b10ab723
CR
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
af070955 292 (files '("lib/python2.7/site-packages")))))
f0499100 293 (home-page "https://www.python.org")
afa181ff 294 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297is used in a wide variety of application domains. Some of its key
298distinguishing features include: clear, readable syntax; strong
299introspection capabilities; intuitive object orientation; natural
300expression of procedural code; full modularity, supporting hierarchical
301packages; exception-based error handling; and very high level dynamic
302data types.")
3f641af0 303 (license license:psfl)))
acc26ff1 304
45848023
HG
305;; Current 2.x version.
306(define-public python-2 python-2.7)
307
72df6680 308(define-public python-3.5
b24d1cfc 309 (package (inherit python-2)
72df6680 310 (version "3.5.2")
717003e3
LC
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
fc1adab1
AK
315 (patches (search-patches
316 "python-fix-tests.patch"
72df6680 317 "python-3.5-fix-tests.patch"
fc1adab1
AK
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
717003e3
LC
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
72df6680 323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
1aebc0cb
AE
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
0e05d01e
SB
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
f26a77ff 332
72df6680
LF
333(define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
45848023 350;; Current 3.x version.
72df6680 351(define-public python-3 python-3.5)
45848023
HG
352
353;; Current major version.
354(define-public python python-3)
355
95288fcc
LC
356;; Minimal variants of Python, mostly used to break the cycle between Tk and
357;; Python (Tk -> libxcb -> Python.)
358
359(define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
02f0c3b2 362 (outputs '("out"))
95288fcc
LC
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
367 (inputs '()))) ;none of the optional dependencies
368
369(define-public python-minimal
898238b9 370 (package (inherit python)
95288fcc 371 (name "python-minimal")
02f0c3b2 372 (outputs '("out"))
95288fcc 373
d0b73960 374 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
95288fcc
LC
379 ("zlib" ,zlib)))))
380
64cb064c
LC
381(define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
898238b9 384 (package (inherit python)
95288fcc 385 (name name)
898238b9
AE
386 (source #f)
387 (build-system trivial-build-system)
02f0c3b2 388 (outputs '("out"))
3969ca54 389 (inputs `(("bash" ,bash)))
3c0f2329 390 (propagated-inputs `(("python" ,python)))
898238b9
AE
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
3969ca54
SB
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
0d56e3e1
LC
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420that they can be invoked under their usual name---e.g., @command{python}
421instead of @command{python3}.")))
422
95288fcc
LC
423(define-public python-wrapper (wrap-python3 python))
424(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 425
aaf625b8
RW
426(define-public python-psutil
427 (package
428 (name "python-psutil")
88535a44 429 (version "4.3.0")
aaf625b8
RW
430 (source
431 (origin
432 (method url-fetch)
f56777be 433 (uri (pypi-uri "psutil" version))
aaf625b8
RW
434 (sha256
435 (base32
88535a44 436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 437 (build-system python-build-system)
88535a44 438 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442information on running processes and system utilization (CPU, memory, disks,
443network) in Python. It is useful mainly for system monitoring, profiling and
444limiting process resources and management of running processes. It implements
445many functionalities offered by command line tools such as: ps, top, lsof,
446netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447pidof, tty, taskset, pmap.")
3f641af0 448 (license license:bsd-3)))
aaf625b8
RW
449
450(define-public python2-psutil
451 (package-with-python2 python-psutil))
898238b9 452
f9da1d8a
ED
453(define-public python-passlib
454 (package
455 (name "python-passlib")
690e8c66 456 (version "1.6.5")
f9da1d8a
ED
457 (source
458 (origin
459 (method url-fetch)
690e8c66 460 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
461 (sha256
462 (base32
690e8c66 463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
464 (build-system python-build-system)
465 (native-inputs
f3b98f4f 466 `(("python-nose" ,python-nose)))
f22efa01 467 (propagated-inputs
f9da1d8a
ED
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481cross-platform implementations of over 30 password hashing algorithms, as well
482as a framework for managing existing password hashes. It's designed to be
483useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484to providing full-strength password hashing for multi-user application.")
3f641af0 485 (license license:bsd-3)))
f9da1d8a
ED
486
487(define-public python2-passlib
488 (package-with-python2 python-passlib))
489
feb0d9c3
ED
490(define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
feb0d9c3
ED
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510system hashes passwords using a version of Bruce Schneier's Blowfish block
511cipher with modifications designed to raise the cost of off-line password
512cracking and frustrate fast hardware implementation. The computation cost of
513the algorithm is parametised, so it can be increased as computers get faster.
514The intent is to make a compromise of a password database less likely to
515result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
3f641af0 520 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
521
522(define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
429fdea1
ED
526(define-public python-paramiko
527 (package
528 (name "python-paramiko")
81b9bbbd 529 (version "1.16.0")
429fdea1
ED
530 (source
531 (origin
532 (method url-fetch)
81b9bbbd 533 (uri (pypi-uri "paramiko" version))
429fdea1
ED
534 (sha256
535 (base32
81b9bbbd 536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 537 (build-system python-build-system)
a3fc12da 538 (propagated-inputs
f22efa01
HG
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544providing both client and server functionality. While it leverages a Python C
545extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546Python interface around SSH networking concepts.")
3f641af0 547 (license license:lgpl2.1+)))
429fdea1
ED
548
549(define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
de73dbf6
ED
553(define-public python-httplib2
554 (package
555 (name "python-httplib2")
286f1bac 556 (version "0.9.2")
de73dbf6
ED
557 (source
558 (origin
559 (method url-fetch)
286f1bac 560 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
561 (sha256
562 (base32
286f1bac 563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 564 (build-system python-build-system)
286f1bac 565 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569other HTTP libraries.")
570 (license license:expat)))
571
572(define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
67039875
ED
575(define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
67039875
ED
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598Curve Digital Signature Algorithm), implemented purely in Python. With this
599library, you can quickly create keypairs (signing key and verifying key), sign
600messages, and verify the signatures. The keys and signatures are very short,
601making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604(define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
52323f32
ED
607(define-public python-ccm
608 (package
609 (name "python-ccm")
db5567f7 610 (version "2.1.6")
52323f32
ED
611 (source
612 (origin
613 (method url-fetch)
db5567f7 614 (uri (pypi-uri "ccm" version))
52323f32
ED
615 (sha256
616 (base32
db5567f7 617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 618 (build-system python-build-system)
f22efa01 619 (propagated-inputs
52323f32 620 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
621 ;; Not listed in setup.py, but used in ccmlib/node.py for full
622 ;; functionality
623 ("python-psutil" ,python-psutil)
52323f32
ED
624 ("python-six" ,python-six)))
625 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
626 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
627localhost")
628 (description "Cassandra Cluster Manager is a development tool for testing
629local Cassandra clusters. It creates, launches and removes Cassandra clusters
630on localhost.")
3f641af0 631 (license license:asl2.0)))
52323f32
ED
632
633(define-public python2-ccm
634 (package-with-python2 python-ccm))
635
89114f39 636(define-public python-pytz
acc26ff1 637 (package
89114f39 638 (name "python-pytz")
61c9babb 639 (version "2016.3")
acc26ff1
CR
640 (source
641 (origin
642 (method url-fetch)
61c9babb 643 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
644 (sha256
645 (base32
61c9babb 646 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 647 (build-system python-build-system)
8498b8cf 648 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 649 (home-page "http://pythonhosted.org/pytz")
9e771e3b 650 (synopsis "Python timezone library")
acc26ff1
CR
651 (description
652 "This library allows accurate and cross platform timezone calculations
653using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 654 (license license:expat)))
5ace6e2f 655
89114f39 656(define-public python2-pytz
11bb85a1 657 (package-with-python2 python-pytz))
89114f39 658
fc50e9c6 659
89114f39 660(define-public python-babel
5ace6e2f 661 (package
89114f39 662 (name "python-babel")
3f37db6b 663 (version "2.3.2")
5ace6e2f
CR
664 (source
665 (origin
666 (method url-fetch)
b850a6d8 667 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
668 (sha256
669 (base32
3f37db6b 670 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 671 (build-system python-build-system)
f22efa01 672 (propagated-inputs
f3b98f4f 673 `(("python-pytz" ,python-pytz)))
8498b8cf 674 (arguments `(#:tests? #f)) ; no test target
e1804763 675 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
676 (synopsis
677 "Tools for internationalizing Python applications")
678 (description
679 "Babel is composed of two major parts:
680- tools to build and work with gettext message catalogs
681- a Python interface to the CLDR (Common Locale Data Repository), providing
682access to various locale display names, localized number and date formatting,
683etc. ")
3f641af0 684 (license license:bsd-3)))
89114f39
AE
685
686(define-public python2-babel
11bb85a1 687 (package-with-python2 python-babel))
73adf220 688
ed377cc6
RW
689(define-public python2-backport-ssl-match-hostname
690 (package
691 (name "python2-backport-ssl-match-hostname")
f2d06d46 692 (version "3.5.0.1")
ed377cc6
RW
693 (source
694 (origin
695 (method url-fetch)
696 (uri (string-append
697 "https://pypi.python.org/packages/source/b/"
698 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
699 version ".tar.gz"))
700 (sha256
701 (base32
f2d06d46 702 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 703 (build-system python-build-system)
f2d06d46
EF
704 (arguments
705 `(#:python ,python-2
706 #:tests? #f)) ; no test target
f2d06d46
EF
707 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
708 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
709 (description
710 "This backport brings the ssl.match_hostname() function to users of
711earlier versions of Python. The function checks the hostname in the
712certificate returned by the server to which a connection has been established,
713and verifies that it matches the intended target hostname.")
3f641af0 714 (license license:psfl)))
ed377cc6 715
ef5cbf9b
RW
716(define-public python-h5py
717 (package
718 (name "python-h5py")
fe147c41 719 (version "2.6.0")
ef5cbf9b
RW
720 (source
721 (origin
722 (method url-fetch)
fe147c41 723 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
724 (sha256
725 (base32
fe147c41 726 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 727 (build-system python-build-system)
797e1401
RW
728 (arguments
729 `(#:tests? #f ; no test target
730 #:phases
731 (modify-phases %standard-phases
732 (add-after 'unpack 'fix-hdf5-paths
733 (lambda* (#:key inputs #:allow-other-keys)
734 (let ((prefix (assoc-ref inputs "hdf5")))
735 (substitute* "setup_build.py"
736 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']"))
738 (("'/opt/local/include', '/usr/local/include'")
739 (string-append "'" prefix "/include" "'")))
740 (substitute* "setup_configure.py"
741 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
742 (string-append "['" prefix "/lib" "']")))
743 #t))))))
3c4010b1 744 (propagated-inputs
69866690
HG
745 `(("python-six" ,python-six)
746 ("python-numpy" ,python-numpy)))
ef5cbf9b 747 (inputs
69866690 748 `(("hdf5" ,hdf5)))
ef5cbf9b 749 (native-inputs
fe147c41
EF
750 `(("python-cython" ,python-cython)
751 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
752 (home-page "http://www.h5py.org/")
753 (synopsis "Read and write HDF5 files from Python")
754 (description
755 "The h5py package provides both a high- and low-level interface to the
756HDF5 library from Python. The low-level interface is intended to be a
757complete wrapping of the HDF5 API, while the high-level component supports
758access to HDF5 files, datasets and groups using established Python and NumPy
759concepts.")
9820a028 760 (license license:bsd-3)))
ef5cbf9b
RW
761
762(define-public python2-h5py
9820a028 763 (package-with-python2 python-h5py))
ef5cbf9b 764
c1448c69
EB
765(define-public python-lockfile
766 (package
767 (name "python-lockfile")
692add53 768 (version "0.12.2")
c1448c69
EB
769 (source
770 (origin
771 (method url-fetch)
772 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
773 "lockfile-" version ".tar.gz"))
774 (sha256
775 (base32
692add53 776 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
777 (build-system python-build-system)
778 (arguments '(#:test-target "check"))
692add53
BW
779 (native-inputs
780 `(("python-pbr" ,python-pbr)))
6a8f26a4 781 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
782 (synopsis "Platform-independent file locking module")
783 (description
784 "The lockfile package exports a LockFile class which provides a simple
785API for locking files.")
f210e944 786 (license license:expat)))
c1448c69
EB
787
788(define-public python2-lockfile
f210e944 789 (package-with-python2 python-lockfile))
c1448c69 790
5a1a4bf6
EB
791(define-public python-mock
792 (package
793 (name "python-mock")
794 (version "1.0.1")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
799 "mock-" version ".tar.gz"))
800 (sha256
801 (base32
802 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
803 (build-system python-build-system)
804 (arguments '(#:test-target "check"))
07af3e5e 805 (home-page "http://code.google.com/p/mock/")
9e771e3b 806 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
807 (description
808 "Mock is a library for testing in Python. It allows you to replace parts
809of your system under test with mock objects and make assertions about how they
810have been used.")
bd3fa666 811 (license license:expat)))
5a1a4bf6
EB
812
813(define-public python2-mock
814 (package-with-python2 python-mock))
815
fc50e9c6 816
73adf220
AE
817(define-public python-setuptools
818 (package
819 (name "python-setuptools")
62a9a23b 820 (version "18.3.1")
73adf220
AE
821 (source
822 (origin
823 (method url-fetch)
824 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
825 version ".tar.gz"))
826 (sha256
827 (base32
62a9a23b 828 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 829 (build-system python-build-system)
d3d656c5
AE
830 ;; FIXME: Tests require pytest, which itself relies on setuptools.
831 ;; One could bootstrap with an internal untested setuptools.
73adf220 832 (arguments
824af8ca 833 `(#:tests? #f))
73adf220
AE
834 (home-page "https://pypi.python.org/pypi/setuptools")
835 (synopsis
836 "Library designed to facilitate packaging Python projects")
837 (description
838 "Setuptools is a fully-featured, stable library designed to facilitate
839packaging Python projects, where packaging includes:
840Python package and module definitions,
841distribution package metadata,
842test hooks,
843project installation,
844platform-specific details,
845Python 3 support.")
3f641af0 846 (license license:psfl)))
73adf220
AE
847
848(define-public python2-setuptools
849 (package-with-python2 python-setuptools))
fc50e9c6
AE
850
851
cafc3f5a
EB
852(define-public python-pycrypto
853 (package
854 (name "python-pycrypto")
855 (version "2.6.1")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (string-append "https://pypi.python.org/packages/source/p/"
860 "pycrypto/pycrypto-" version ".tar.gz"))
861 (sha256
862 (base32
863 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
864 (build-system python-build-system)
cafc3f5a
EB
865 (inputs
866 `(("python" ,python)
867 ("gmp" ,gmp)))
868 (arguments
869 `(#:phases
870 (alist-cons-before
871 'build 'set-build-env
872 ;; pycrypto runs an autoconf configure script behind the scenes
873 (lambda _
874 (setenv "CONFIG_SHELL" (which "bash")))
875 %standard-phases)))
876 (home-page "http://www.pycrypto.org/")
877 (synopsis "Cryptographic modules for Python")
878 (description
879 "Pycrypto is a collection of both secure hash functions (such as SHA256
880and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 881etc.). The package is structured to make adding new modules easy.")
3f641af0 882 (license license:public-domain)))
cafc3f5a 883
345f0611 884(define-public python2-pycrypto
1c0059da
EF
885 (let ((pycrypto (package-with-python2 python-pycrypto)))
886 (package (inherit pycrypto)
887 (inputs
888 `(("python" ,python-2)
889 ,@(alist-delete
890 "python"
891 (package-inputs pycrypto)))))))
345f0611 892
cafc3f5a
EB
893(define-public python-keyring
894 (package
895 (name "python-keyring")
13f3ff35 896 (version "8.7")
cafc3f5a
EB
897 (source
898 (origin
899 (method url-fetch)
664e6c3a 900 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
901 (sha256
902 (base32
13f3ff35 903 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
904 (build-system python-build-system)
905 (native-inputs
13f3ff35 906 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 907 (propagated-inputs
cafc3f5a
EB
908 `(("python-pycrypto" ,python-pycrypto)))
909 (arguments
664e6c3a 910 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 911 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
912 (synopsis "Store and access your passwords safely")
913 (description
914 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 915service from python. It can be used in any application that needs safe
cafc3f5a
EB
916password storage.")
917 ;; "MIT" and PSF dual license
f210e944 918 (license license:x11)))
cafc3f5a 919
d7af1069 920(define-public python2-keyring
f210e944 921 (package-with-python2 python-keyring))
d7af1069 922
a480bc41
EB
923(define-public python-six
924 (package
925 (name "python-six")
b6ab89ef 926 (version "1.10.0")
a480bc41
EB
927 (source
928 (origin
929 (method url-fetch)
b6ab89ef 930 (uri (pypi-uri "six" version))
a480bc41
EB
931 (sha256
932 (base32
b6ab89ef 933 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 934 (build-system python-build-system)
a480bc41
EB
935 (home-page "http://pypi.python.org/pypi/six/")
936 (synopsis "Python 2 and 3 compatibility utilities")
937 (description
35b9e423 938 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
939functions for smoothing over the differences between the Python versions with
940the goal of writing Python code that is compatible on both Python versions.
35b9e423 941Six supports every Python version since 2.5. It is contained in only one
a480bc41 942Python file, so it can be easily copied into your project.")
3f641af0 943 (license license:x11)))
a480bc41 944
0c20025c
AE
945(define-public python2-six
946 (package-with-python2 python-six))
947
cafc3f5a
EB
948(define-public python-dateutil-2
949 (package
950 (name "python-dateutil")
394b8060 951 (version "2.5.2")
cafc3f5a
EB
952 (source
953 (origin
954 (method url-fetch)
394b8060 955 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
956 (sha256
957 (base32
394b8060 958 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 959 (build-system python-build-system)
f22efa01 960 (propagated-inputs
394b8060 961 `(("python-six" ,python-six)))
b5a5fb19 962 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
963 (synopsis "Extensions to the standard datetime module")
964 (description
965 "The dateutil module provides powerful extensions to the standard
966datetime module, available in Python 2.3+.")
f210e944 967 (license license:bsd-3)))
cafc3f5a
EB
968
969(define-public python2-dateutil-2
f210e944 970 (package-with-python2 python-dateutil-2))
cafc3f5a 971
fc50e9c6
AE
972(define-public python-dateutil
973 (package
974 (name "python-dateutil")
975 (version "1.5") ; last version for python < 3
976 (source
977 (origin
978 (method url-fetch)
cafc3f5a
EB
979 (uri (string-append "http://labix.org/download/python-dateutil/"
980 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
981 (sha256
982 (base32
983 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
984 (build-system python-build-system)
b5a5fb19 985 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 986 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
987 (description
988 "The dateutil module provides powerful extensions to the standard
989datetime module, available in Python 2.3+.")
3f641af0 990 (license license:psfl)))
fc50e9c6
AE
991
992(define-public python2-dateutil
993 (package-with-python2 python-dateutil))
1d08c01f 994
cafc3f5a
EB
995(define-public python-parsedatetime
996 (package
997 (name "python-parsedatetime")
eebf6f01 998 (version "2.1")
cafc3f5a
EB
999 (source
1000 (origin
1001 (method url-fetch)
eebf6f01 1002 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1003 (sha256
1004 (base32
eebf6f01 1005 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1006 (build-system python-build-system)
1007 (native-inputs
eebf6f01
EF
1008 `(("python-nose" ,python-nose)
1009 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1010 (home-page "http://github.com/bear/parsedatetime/")
1011 (synopsis
1012 "Parse human-readable date/time text")
1013 (description
e881752c 1014 "Parse human-readable date/time text.")
f210e944 1015 (license license:asl2.0)))
cafc3f5a 1016
38b8f9b2 1017(define-public python2-parsedatetime
f210e944 1018 (package-with-python2 python-parsedatetime))
38b8f9b2 1019
d072efcb
RW
1020(define-public python-pandas
1021 (package
1022 (name "python-pandas")
7d0c3c8d 1023 (version "0.18.1")
d072efcb
RW
1024 (source
1025 (origin
1b96f069 1026 (method url-fetch)
7d0c3c8d
EF
1027 (uri (string-append
1028 "https://pypi.python.org/packages/11/09/"
1029 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1030 "pandas-" version ".tar.gz"))
1b96f069 1031 (sha256
7d0c3c8d 1032 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1033 (build-system python-build-system)
d072efcb 1034 (propagated-inputs
f22efa01
HG
1035 `(("python-numpy" ,python-numpy)
1036 ("python-pytz" ,python-pytz)
d072efcb
RW
1037 ("python-dateutil" ,python-dateutil-2)))
1038 (native-inputs
7d0c3c8d 1039 `(("python-nose" ,python-nose)))
d072efcb
RW
1040 (home-page "http://pandas.pydata.org")
1041 (synopsis "Data structures for data analysis, time series, and statistics")
1042 (description
1043 "Pandas is a Python package providing fast, flexible, and expressive data
1044structures designed to make working with structured (tabular,
1045multidimensional, potentially heterogeneous) and time series data both easy
1046and intuitive. It aims to be the fundamental high-level building block for
1047doing practical, real world data analysis in Python.")
f210e944 1048 (license license:bsd-3)))
d072efcb
RW
1049
1050(define-public python2-pandas
f210e944 1051 (package-with-python2 python-pandas))
d072efcb 1052
cafc3f5a
EB
1053(define-public python-tzlocal
1054 (package
1055 (name "python-tzlocal")
ed80839b 1056 (version "1.2.2")
cafc3f5a
EB
1057 (source
1058 (origin
1059 (method url-fetch)
226d3331 1060 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1061 (sha256
1062 (base32
ed80839b 1063 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1064 (build-system python-build-system)
f22efa01
HG
1065 (propagated-inputs
1066 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1067 (home-page "https://github.com/regebro/tzlocal")
1068 (synopsis
35b9e423 1069 "Local timezone information for Python")
cafc3f5a
EB
1070 (description
1071 "Tzlocal returns a tzinfo object with the local timezone information.
1072This module attempts to fix a glaring hole in pytz, that there is no way to
1073get the local timezone information, unless you know the zoneinfo name, and
1074under several distributions that's hard or impossible to figure out.")
3f641af0 1075 (license license:cc0)))
cafc3f5a 1076
1d08c01f
AE
1077(define-public python2-pysqlite
1078 (package
1079 (name "python2-pysqlite")
fe476868 1080 (version "2.8.1")
1d08c01f
AE
1081 (source
1082 (origin
1083 (method url-fetch)
fe476868 1084 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1085 (sha256
1086 (base32
fe476868 1087 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1088 (build-system python-build-system)
1089 (inputs
1090 `(("sqlite" ,sqlite)))
1091 (arguments
1092 `(#:python ,python-2 ; incompatible with Python 3
1093 #:tests? #f)) ; no test target
fe476868 1094 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1095 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1096 (description
1097 "Pysqlite provides SQLite bindings for Python that comply to the
1098Database API 2.0T.")
ed0cdf83 1099 (license license:zlib)))
1d08c01f 1100
2875caf5
AE
1101
1102(define-public python2-mechanize
1103 (package
1104 (name "python2-mechanize")
1105 (version "0.2.5")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1110 version ".tar.gz"))
1111 (sha256
1112 (base32
1113 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1114 (build-system python-build-system)
2875caf5
AE
1115 (arguments
1116 `(#:python ,python-2 ; apparently incompatible with Python 3
1117 #:tests? #f))
1118 ;; test fails with message
1119 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1120 ;; (python-3.3.2) or
1121 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1122 ;; (python-2.7.5).
1123 ;; The source code is from March 2011 and probably not up-to-date
1124 ;; with respect to python unit tests.
1125 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1126 (synopsis
1127 "Stateful programmatic web browsing in Python")
1128 (description
1129 "Mechanize implements stateful programmatic web browsing in Python,
1130after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1131 (license (license:non-copyleft
1132 "file://COPYING"
1133 "See COPYING in the distribution."))))
2875caf5 1134
0352532e
AE
1135
1136(define-public python-simplejson
1137 (package
1138 (name "python-simplejson")
988d1bad 1139 (version "3.8.2")
0352532e
AE
1140 (source
1141 (origin
1142 (method url-fetch)
988d1bad 1143 (uri (pypi-uri "simplejson" version))
0352532e
AE
1144 (sha256
1145 (base32
988d1bad 1146 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1147 (build-system python-build-system)
1148 (home-page "http://simplejson.readthedocs.org/en/latest/")
1149 (synopsis
1150 "Json library for Python")
1151 (description
e881752c
AK
1152 "JSON (JavaScript Object Notation) is a subset of JavaScript
1153syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1154format.
0352532e
AE
1155
1156Simplejson exposes an API familiar to users of the standard library marshal
1157and pickle modules. It is the externally maintained version of the json
1158library contained in Python 2.6, but maintains compatibility with Python 2.5
1159and (currently) has significant performance advantages, even without using
1160the optional C extension for speedups. Simplejson is also supported on
1161Python 3.3+.")
3f641af0 1162 (license license:x11)))
0352532e
AE
1163
1164(define-public python2-simplejson
1165 (package-with-python2 python-simplejson))
421a80a2
AE
1166
1167
ed07b08d 1168(define-public python-pyicu
421a80a2 1169 (package
ed07b08d 1170 (name "python-pyicu")
d3b29319 1171 (version "1.9.2")
421a80a2
AE
1172 (source
1173 (origin
1174 (method url-fetch)
1175 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1176 version ".tar.gz"))
1177 (sha256
1178 (base32
d3b29319 1179 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1180 (build-system python-build-system)
1181 (inputs
1182 `(("icu4c" ,icu4c)))
421a80a2 1183 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1184 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1185 (description
1186 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1187 (license license:x11)))
ed07b08d
LF
1188
1189(define-public python2-pyicu
f210e944 1190 (package-with-python2 python-pyicu))
cc20a22a
LC
1191
1192(define-public python2-dogtail
1193 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1194 ;; spaces in indentation" with Python 3.
1195 (package
1196 (name "python2-dogtail")
1197 (version "0.8.2")
1198 (source (origin
1199 (method url-fetch)
1200 (uri (string-append
1201 "https://fedorahosted.org/released/dogtail/dogtail-"
1202 version ".tar.gz"))
1203 (sha256
1204 (base32
1205 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1206 (build-system python-build-system)
1207 (arguments `(#:python ,python-2
1208 #:tests? #f)) ; invalid command "test"
1209 (home-page "https://fedorahosted.org/dogtail/")
1210 (synopsis "GUI test tool and automation framework written in ​Python")
1211 (description
35b9e423 1212 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1213It uses Accessibility (a11y) technologies to communicate with desktop
1214applications. dogtail scripts are written in Python and executed like any
1215other Python program.")
3f641af0 1216 (license license:gpl2+)))
515e6878 1217
011b18c3
LC
1218(define-public python2-empy
1219 (package
1220 (name "python2-empy")
1221 (version "3.3")
1222 (source (origin
1223 (method url-fetch)
1224 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1229 (build-system python-build-system)
1230 (arguments
1231 `(#:python ,python-2
1232 #:phases (alist-replace
1233 'check
1234 (lambda _
1235 (zero? (system* "./test.sh")))
1236 %standard-phases)))
1237 (home-page "http://www.alcyone.com/software/empy/")
1238 (synopsis "Templating system for Python")
1239 (description
1240 "EmPy is a system for embedding Python expressions and statements in
1241template text; it takes an EmPy source file, processes it, and produces
1242output. This is accomplished via expansions, which are special signals to the
1cd4027c 1243EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1244EmPy can expand arbitrary Python expressions and statements in this way, as
1245well as a variety of special forms. Textual data not explicitly delimited in
1246this way is sent unaffected to the output, allowing Python to be used in
1247effect as a markup language. Also supported are callbacks via hooks,
1248recording and playback via diversions, and dynamic, chainable filters. The
1249system is highly configurable via command line options and embedded
1250commands.")
3f641af0 1251 (license license:lgpl2.1+)))
011b18c3 1252
8deeda0c
LC
1253(define-public python2-element-tree
1254 (package
1255 (name "python2-element-tree")
1256 (version "1.2.6")
1257 (source (origin
1258 (method url-fetch)
1259 (uri (string-append
1260 "http://effbot.org/media/downloads/elementtree-"
1261 version "-20050316.tar.gz"))
1262 (sha256
1263 (base32
1264 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1265 (build-system python-build-system)
1266 (arguments
1267 `(#:python ,python-2 ; seems to be part of Python 3
1268 #:tests? #f)) ; no 'test' sub-command
1269 (synopsis "Toolkit for XML processing in Python")
1270 (description
1271 "ElementTree is a Python library supporting lightweight XML processing.")
1272 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1273 (license (license:x11-style
1274 "http://docs.python.org/2/license.html"
1275 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1276
1277(define-public python2-pybugz
1278 (package
1279 (name "python2-pybugz")
1280 (version "0.6.11")
1281 (source (origin
1282 (method url-fetch)
1283 (uri (string-append
1284 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1285 version ".tar.gz"))
1286 (sha256
1287 (base32
6f194a1e 1288 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1289 (patches (search-patches "pybugz-stty.patch"
1290 "pybugz-encode-error.patch"))))
8deeda0c
LC
1291 (build-system python-build-system)
1292 (arguments
1293 `(#:python ,python-2 ; SyntaxError with Python 3
1294 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1295 (propagated-inputs
1296 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1297 (synopsis "Python and command-line interface to Bugzilla")
1298 (description
1299 "PyBugz is a Python library and command-line tool to query the Bugzilla
1300bug tracking system. It is meant as an aid to speed up interaction with the
1301bug tracker.")
1302 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1303 (license license:gpl2)))
8deeda0c 1304
a480bc41
EB
1305(define-public python-enum34
1306 (package
1307 (name "python-enum34")
d39ae1e5 1308 (version "1.1.0")
a480bc41
EB
1309 (source
1310 (origin
1311 (method url-fetch)
d39ae1e5 1312 (uri (pypi-uri "enum34" version))
a480bc41
EB
1313 (sha256
1314 (base32
d39ae1e5 1315 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1316 (build-system python-build-system)
a480bc41
EB
1317 (arguments
1318 `(#:phases
1319 (alist-replace
1320 'check
1321 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1322 %standard-phases)))
1323 (home-page "https://pypi.python.org/pypi/enum34")
1324 (synopsis "Backported Python 3.4 Enum")
1325 (description
1326 "Enum34 is the new Python stdlib enum module available in Python 3.4
1327backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1328 (license license:bsd-3)))
a480bc41 1329
820acd1b
LF
1330(define-public python2-enum34
1331 (package-with-python2 python-enum34))
1332
a480bc41
EB
1333(define-public python-parse-type
1334 (package
1335 (name "python-parse-type")
1336 (version "0.3.4")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "https://pypi.python.org/packages/source/p/"
1341 "parse_type/parse_type-" version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1345 (build-system python-build-system)
f22efa01 1346 (propagated-inputs
f3b98f4f 1347 `(("python-six" ,python-six)
68f1cdec 1348 ("python-parse" ,python-parse)))
a480bc41
EB
1349 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1350 (home-page "https://github.com/jenisys/parse_type")
1351 (synopsis "Extended parse module")
1352 (description
1353 "Parse_type extends the python parse module.")
3f641af0 1354 (license license:bsd-3)))
a480bc41
EB
1355
1356(define-public python-parse
1357 (package
1358 (name "python-parse")
eb3d3503 1359 (version "1.6.6")
a480bc41
EB
1360 (source
1361 (origin
1362 (method url-fetch)
eb3d3503 1363 (uri (pypi-uri "parse" version))
a480bc41
EB
1364 (sha256
1365 (base32
aa6c09ed
EF
1366 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1367 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:phases
f9a65318
EF
1371 (modify-phases %standard-phases
1372 (replace 'check
1373 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1374 (home-page "https://github.com/r1chardj0n3s/parse")
1375 (synopsis "Parse strings")
1376 (description
1377 "Parse strings using a specification based on the Python format()
1378syntax.")
3f641af0 1379 (license license:x11)))
a480bc41
EB
1380
1381
515e6878
LC
1382(define-public scons
1383 (package
1384 (name "scons")
a3f61425 1385 (version "2.3.4")
515e6878
LC
1386 (source (origin
1387 (method url-fetch)
de67e922
LF
1388 (uri (string-append "mirror://sourceforge/scons/scons/" version
1389 "/scons-" version ".tar.gz"))
515e6878
LC
1390 (sha256
1391 (base32
a3f61425 1392 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1393 (build-system python-build-system)
1394 (arguments
1395 ;; With Python 3.x, fails to build with a syntax error.
1396 `(#:python ,python-2
b3e8b4bd 1397 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1398 #:tests? #f)) ; no 'python setup.py test' command
1399 (home-page "http://scons.org/")
1400 (synopsis "Software construction tool written in Python")
1401 (description
1402 "SCons is a software construction tool. Think of SCons as an improved,
1403cross-platform substitute for the classic Make utility with integrated
1404functionality similar to autoconf/automake and compiler caches such as ccache.
1405In short, SCons is an easier, more reliable and faster way to build
1406software.")
3f641af0 1407 (license license:x11)))
011b18c3 1408
c15a5c0e
DT
1409(define-public python-extras
1410 (package
1411 (name "python-extras")
1412 (version "0.0.3")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri (string-append
1417 "https://pypi.python.org/packages/source/e/extras/extras-"
1418 version ".tar.gz"))
1419 (sha256
1420 (base32
1421 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1422 (build-system python-build-system)
c15a5c0e
DT
1423 (arguments
1424 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1425 '(#:tests? #f))
1426 (home-page "https://github.com/testing-cabal/extras")
1427 (synopsis "Useful extensions to the Python standard library")
1428 (description
1429 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1430 (license license:expat)))
c15a5c0e
DT
1431
1432(define-public python2-extras
1433 (package-with-python2 python-extras))
1434
56ea0efd
DT
1435(define-public python-mimeparse
1436 (package
1437 (name "python-mimeparse")
1438 (version "0.1.4")
1439 (source
1440 (origin
1441 (method url-fetch)
1442 (uri (string-append
1443 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1444 version ".tar.gz"))
1445 (sha256
1446 (base32
1447 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1448 (build-system python-build-system)
56ea0efd
DT
1449 (arguments
1450 '(#:tests? #f)) ; no setup.py test command
1451 (home-page
1452 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1453 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1454 (description
1455 "Mimeparse provides basic functions for parsing MIME type names and
1456matching them against a list of media-ranges.")
bd3fa666 1457 (license license:expat)))
56ea0efd
DT
1458
1459(define-public python2-mimeparse
1460 (package-with-python2 python-mimeparse))
1461
4435427e
DT
1462(define-public python-nose
1463 (package
1464 (name "python-nose")
f7cb9841 1465 (version "1.3.7")
4435427e
DT
1466 (source
1467 (origin
1468 (method url-fetch)
f7cb9841 1469 (uri (pypi-uri "nose" version))
4435427e
DT
1470 (sha256
1471 (base32
f7cb9841 1472 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1473 (build-system python-build-system)
4435427e
DT
1474 (arguments
1475 '(#:tests? #f)) ; FIXME: test suite fails
1476 (home-page "http://readthedocs.org/docs/nose/")
1477 (synopsis "Python testing library")
1478 (description
1479 "Nose extends the unittest library to make testing easier.")
3f641af0 1480 (license license:lgpl2.0+)))
4435427e
DT
1481
1482(define-public python2-nose
1483 (package-with-python2 python-nose))
1484
0aea283a
EF
1485(define-public python-nose2
1486 (package
1487 (name "python-nose2")
1488 (version "0.6.5")
1489 (source
1490 (origin
1491 (method url-fetch)
1492 (uri (pypi-uri "nose2" version))
1493 (sha256
1494 (base32
1495 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1496 (build-system python-build-system)
1497 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1498 (propagated-inputs
0aea283a
EF
1499 `(("python-cov-core" ,python-cov-core)
1500 ("python-pytest-cov" ,python-pytest-cov)
1501 ("python-six" ,python-six)))
1502 (home-page "https://github.com/nose-devs/nose2")
1503 (synopsis "Next generation of nicer testing for Python")
1504 (description
1505 "Nose2 is the next generation of nicer testing for Python, based on the
1506plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1507better plugin api, being easier for users to configure, and simplifying internal
1508interfaces and processes.")
1509 (license license:bsd-2)))
1510
1511(define-public python2-nose2
1512 (package-with-python2 python-nose2))
1513
6cd9c356
DT
1514(define-public python-unittest2
1515 (package
1516 (name "python-unittest2")
1517 (version "0.5.1")
1518 (source
1519 (origin
1520 (method url-fetch)
1521 (uri (string-append
1522 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1523 version ".tar.gz"))
1524 (sha256
1525 (base32
1526 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1527 (build-system python-build-system)
6cd9c356
DT
1528 (home-page "http://pypi.python.org/pypi/unittest2")
1529 (synopsis "Python unit testing library")
1530 (description
1531 "Unittest2 is a replacement for the unittest module in the Python
1532standard library.")
3f641af0 1533 (license license:psfl)))
6cd9c356
DT
1534
1535(define-public python2-unittest2
1536 (package (inherit python-unittest2)
1537 (name "python2-unittest2")
1538 (version "0.5.1")
1539 (source
1540 (origin
1541 (method url-fetch)
1542 (uri (string-append
1543 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1544 version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1548 (arguments
1549 `(#:python ,python-2
1550 #:tests? #f)))) ; no setup.py test command
1551
02f8f804 1552(define-public python-pafy
1553 (package
1554 (name "python-pafy")
1555 (version "0.5.2")
1556 (source
1557 (origin
1558 (method url-fetch)
1559 (uri (pypi-uri "pafy" version))
1560 (sha256
1561 (base32
1562 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1563 (build-system python-build-system)
1564 (propagated-inputs
1565 ;; Youtube-dl is a python package which is imported in the file
1566 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1567 `(("youtube-dl" ,youtube-dl)))
1568 (home-page "https://np1.github.io/pafy/")
1569 (synopsis "Retrieve YouTube content and metadata")
1570 (description
1571 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1572 (license license:lgpl3+)))
1573
542ad60f
DT
1574(define-public python-py
1575 (package
1576 (name "python-py")
71c8a804 1577 (version "1.4.31")
542ad60f
DT
1578 (source
1579 (origin
1580 (method url-fetch)
71c8a804 1581 (uri (pypi-uri "py" version))
542ad60f
DT
1582 (sha256
1583 (base32
71c8a804 1584 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1585 (build-system python-build-system)
542ad60f
DT
1586 (home-page "http://pylib.readthedocs.org/")
1587 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1588 (description
1589 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1590code introspection, and logging.")
bd3fa666 1591 (license license:expat)))
542ad60f
DT
1592
1593(define-public python2-py
1594 (package-with-python2 python-py))
1595
855d4761
DT
1596(define-public python-pytest
1597 (package
1598 (name "python-pytest")
61a4332d 1599 (version "2.7.3")
855d4761
DT
1600 (source
1601 (origin
1602 (method url-fetch)
1603 (uri (string-append
1604 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1605 version ".tar.gz"))
1606 (sha256
1607 (base32
61a4332d 1608 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1609 (modules '((guix build utils)))
1610 (snippet
1611 ;; One of the tests involves the /usr directory, so it fails.
1612 '(substitute* "testing/test_argcomplete.py"
1613 (("def test_remove_dir_prefix\\(self\\):")
1614 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1615 (build-system python-build-system)
482d9591
HG
1616 (propagated-inputs
1617 `(("python-py" ,python-py)))
e7881f3d 1618 (native-inputs
482d9591 1619 `(("python-nose" ,python-nose)
855d4761
DT
1620 ("python-mock" ,python-mock)))
1621 (home-page "http://pytest.org")
1622 (synopsis "Python testing library")
1623 (description
1624 "Pytest is a testing tool that provides auto-discovery of test modules
1625and functions, detailed info on failing assert statements, modular fixtures,
1626and many external plugins.")
bd3fa666 1627 (license license:expat)))
855d4761
DT
1628
1629(define-public python2-pytest
1630 (package-with-python2 python-pytest))
1631
fca4ff35
LF
1632;; This package is used by Borg until we can upgrade all our Python packages to
1633;; use a more recent pytest.
1634(define-public python-pytest-2.9.2
1635 (package
1636 (inherit python-pytest)
1637 (name "python-pytest")
1638 (version "2.9.2")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (pypi-uri "pytest" version))
1642 (sha256
1643 (base32
1644 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1645 (arguments
1646 `(#:phases
1647 (modify-phases %standard-phases
1648 (add-before 'check 'disable-invalid-test
1649 (lambda _
1650 (substitute* "testing/test_argcomplete.py"
1651 (("def test_remove_dir_prefix" line)
1652 (string-append "@pytest.mark.skip"
1653 "(reason=\"Assumes that /usr exists.\")\n "
1654 line)))
1655 #t)))))))
1656
358c3d61
EF
1657(define-public python-pytest-cov
1658 (package
1659 (name "python-pytest-cov")
545f4a1c 1660 (version "2.2.1")
358c3d61
EF
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "pytest-cov" version))
1665 (sha256
545f4a1c
EF
1666 (base32
1667 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1668 (build-system python-build-system)
ce40b383
HG
1669 (arguments
1670 `(#:phases
1671 (modify-phases %standard-phases
1672 (replace 'check
1673 (lambda _
1674 ;; options taken from tox.ini
1675 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1676 ;; with "Duplicate implicit target name"
1677 (zero? (system* "python" "./setup.py" "check"
1678 "--strict" "--metadata")))))))
f22efa01 1679 (propagated-inputs
10468636
EF
1680 `(("python-coverage" ,python-coverage)
1681 ("python-pytest" ,python-pytest)))
10468636
EF
1682 (home-page "https://github.com/pytest-dev/pytest-cov")
1683 (synopsis "Pytest plugin for measuring coverage")
1684 (description
1685 "Pytest-cov produces coverage reports. It supports centralised testing and
1686distributed testing in both @code{load} and @code{each} modes. It also
1687supports coverage of subprocesses.")
f210e944 1688 (license license:expat)))
358c3d61
EF
1689
1690(define-public python2-pytest-cov
f210e944 1691 (package-with-python2 python-pytest-cov))
358c3d61 1692
6784f2e3
RW
1693(define-public python-pytest-runner
1694 (package
1695 (name "python-pytest-runner")
1696 (version "2.6.2")
1697 (source
1698 (origin
1699 (method url-fetch)
54cd239b 1700 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1701 (sha256
1702 (base32
1703 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1704 (build-system python-build-system)
1705 (arguments
1706 `(#:phases
1707 (modify-phases %standard-phases
1708 ;; The fancy way of setting the version with setuptools_scm does not
1709 ;; seem to work here.
1710 (add-after 'unpack 'set-version
1711 (lambda _
1712 (substitute* "docs/conf.py"
1713 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1714 (string-append "version = \"" ,version "\"")))
1715 #t)))))
1716 (native-inputs
1717 `(("python-pytest" ,python-pytest)
1718 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1719 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1720 (synopsis "Invoke py.test as a distutils command")
1721 (description
1722 "This package provides a @command{pytest-runner} command that
1723@file{setup.py} files can use to run tests.")
f210e944 1724 (license license:expat)))
54cd239b
EF
1725
1726(define-public python2-pytest-runner
f210e944 1727 (package-with-python2 python-pytest-runner))
6784f2e3 1728
44547e51
EF
1729(define-public python-pytest-mock
1730 (package
1731 (name "python-pytest-mock")
1732 (version "1.2")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (pypi-uri "pytest-mock" version ".zip"))
1737 (sha256
1738 (base32
1739 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1740 (build-system python-build-system)
1741 (native-inputs
1742 `(("unzip" ,unzip)))
f22efa01 1743 (propagated-inputs
44547e51
EF
1744 `(("python-py" ,python-py)
1745 ("python-pytest" ,python-pytest)))
1746 (home-page "https://github.com/pytest-dev/pytest-mock/")
1747 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1748 (description
1749 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1750around the patching API provided by the @code{mock} package, but with the
1751benefit of not having to worry about undoing patches at the end of a test.
1752The mocker fixture has the same API as @code{mock.patch}, supporting the
1753same arguments.")
1754 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1755 (license license:expat)))
1756
1757(define-public python2-pytest-mock
1758 (let ((base (package-with-python2
1759 (strip-python2-variant python-pytest-mock))))
1760 (package (inherit base)
f22efa01 1761 (propagated-inputs
44547e51 1762 `(("python2-mock" ,python2-mock)
f22efa01 1763 ,@(package-propagated-inputs base))))))
44547e51 1764
8fa58fc9
CAW
1765(define-public python-pytest-xdist
1766 (package
1767 (name "python-pytest-xdist")
1768 (version "1.14")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri (pypi-uri "pytest-xdist" version ".zip"))
1773 (sha256
1774 (base32
de585a7e
HG
1775 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1776 (modules '((guix build utils)))
1777 (snippet
1778 '(begin
1779 ;; Remove pre-compiled .pyc files from source.
1780 (for-each delete-file-recursively
1781 (find-files "." "__pycache__" #:directories? #t))
1782 (for-each delete-file (find-files "." "\\.pyc$"))
1783 #t))))
8fa58fc9
CAW
1784 (build-system python-build-system)
1785 (native-inputs
1786 `(("unzip" ,unzip)
8fa58fc9 1787 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1788 (propagated-inputs
fbe9abcc
EF
1789 `(("python-apipkg" ,python-apipkg)
1790 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1791 ("python-pytest" ,python-pytest)
1792 ("python-py" ,python-py)))
1793 (home-page
1794 "https://github.com/pytest-dev/pytest-xdist")
1795 (synopsis
1796 "Plugin for py.test with distributed testing and loop-on-failing modes")
1797 (description
1798 "The pytest-xdist plugin extends py.test with some unique test execution
1799modes: parallelization, running tests in boxed subprocesses, the ability
1800to run tests repeatedly when failed, and the ability to run tests on multiple
1801Python interpreters or platforms. It uses rsync to copy the existing
1802program code to a remote location, executes there, and then syncs the
1803result back.")
f210e944 1804 (license license:expat)))
8fa58fc9
CAW
1805
1806(define-public python2-pytest-xdist
f210e944 1807 (package-with-python2 python-pytest-xdist))
8fa58fc9 1808
84d24017
DT
1809(define-public python-scripttest
1810 (package
1811 (name "python-scripttest")
1812 (version "1.3")
1813 (source
1814 (origin
1815 (method url-fetch)
1816 (uri (string-append
1817 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1818 version ".tar.gz"))
1819 (sha256
1820 (base32
1821 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1822 (build-system python-build-system)
f22efa01 1823 (propagated-inputs
f3b98f4f 1824 `(("python-pytest" ,python-pytest)))
84d24017
DT
1825 (home-page "http://pythonpaste.org/scripttest/")
1826 (synopsis "Python library to test command-line scripts")
1827 (description "Scripttest is a Python helper library for testing
1828interactive command-line applications. With it you can run a script in a
1829subprocess and see the output as well as any file modifications.")
bd3fa666 1830 (license license:expat)))
84d24017
DT
1831
1832(define-public python2-scripttest
1833 (package-with-python2 python-scripttest))
1834
d8fa80e1
DT
1835(define-public python-testtools
1836 (package
1837 (name "python-testtools")
1838 (version "1.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (string-append
1843 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1844 version ".tar.gz"))
1845 (sha256
1846 (base32
1847 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1848 (build-system python-build-system)
0e88cbf8 1849 (propagated-inputs
f22efa01
HG
1850 `(("python-mimeparse" ,python-mimeparse)
1851 ("python-extras" ,python-extras)))
d8fa80e1
DT
1852 (home-page "https://github.com/testing-cabal/testtools")
1853 (synopsis
1854 "Extensions to the Python standard library unit testing framework")
1855 (description
1856 "Testtools extends the Python standard library unit testing framework to
1857provide matchers, more debugging information, and cross-Python
1858compatibility.")
3f641af0 1859 (license license:psfl)))
d8fa80e1
DT
1860
1861(define-public python2-testtools
1862 (package-with-python2 python-testtools))
1863
5bf3afea
DT
1864(define-public python-testscenarios
1865 (package
1866 (name "python-testscenarios")
1867 (version "0.4")
1868 (source
1869 (origin
1870 (method url-fetch)
1871 (uri (string-append
1872 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1873 version ".tar.gz"))
1874 (sha256
1875 (base32
1876 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1877 (build-system python-build-system)
f22efa01 1878 (propagated-inputs
f3b98f4f 1879 `(("python-testtools" ,python-testtools)
5bf3afea
DT
1880 ("python-mimeparse" ,python-mimeparse)))
1881 (home-page "https://launchpad.net/testscenarios")
1882 (synopsis "Pyunit extension for dependency injection")
1883 (description
1884 "Testscenarios provides clean dependency injection for Python unittest
1885style tests.")
3f641af0 1886 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1887
1888(define-public python2-testscenarios
1889 (package-with-python2 python-testscenarios))
1890
dac79ecc
DT
1891(define-public python-testresources
1892 (package
1893 (name "python-testresources")
1894 (version "0.2.7")
1895 (source
1896 (origin
1897 (method url-fetch)
1898 (uri (string-append
1899 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1900 version ".tar.gz"))
1901 (sha256
1902 (base32
1903 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1904 (build-system python-build-system)
dac79ecc
DT
1905 (home-page "https://launchpad.net/testresources")
1906 (synopsis
1907 "Pyunit extension for managing test resources")
1908 (description
1909 "Testresources is an extension to Python's unittest to allow declarative
1910use of resources by test cases.")
3f641af0 1911 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1912
1913(define-public python2-testresources
1914 (package-with-python2 python-testresources))
1915
070ab058
DT
1916(define-public python-subunit
1917 (package
1918 (name "python-subunit")
1919 (version "0.0.21")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (string-append
1924 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1925 version ".tar.gz"))
1926 (sha256
1927 (base32
1928 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1929 (build-system python-build-system)
f22efa01 1930 (propagated-inputs
f3b98f4f 1931 `(("python-testtools" ,python-testtools)
070ab058
DT
1932 ("python-mimeparse" ,python-mimeparse)
1933 ("python-testscenarios" ,python-testscenarios)))
1934 (home-page "http://launchpad.net/subunit")
1935 (synopsis "Python implementation of the subunit protocol")
1936 (description
1937 "Python-subunit is a Python implementation of the subunit test streaming
1938protocol.")
3f641af0 1939 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1940
1941(define-public python2-subunit
1942 (package-with-python2 python-subunit))
1943
d2a8db92
HG
1944;; Recent versions of python-fixtures and python-testrepository need
1945;; python-pbr for packaging, which itself needs these two packages for
1946;; testing.
1947;; To fix this circular dependency, we use a build of python-pbr, based on the
1948;; same source, just without any test dependencies and with tests disabled.
1949;; python-pbr-minmal is then used to package python-fixtures and
1950;; python-testrepository.
1951;; Strictly speaking we currently could remove the test-requirements from the
1952;; normal python-pbr package (and save this package) since test are disabled
1953;; there anyway. But this may change in future.
1954(define python-pbr-minimal
cd49454b 1955 (package
d2a8db92
HG
1956 (name "python-pbr-minimal")
1957 (version "1.8.1")
7787ef76
CR
1958 (source
1959 (origin
1960 (method url-fetch)
d2a8db92 1961 (uri (pypi-uri "pbr" version))
7787ef76
CR
1962 (sha256
1963 (base32
d2a8db92 1964 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
1965 (build-system python-build-system)
1966 (arguments
d2a8db92
HG
1967 `(#:tests? #f))
1968 (home-page "http://docs.openstack.org/developer/pbr/")
1969 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 1970 (description
d2a8db92 1971 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 1972 (license license:asl2.0)))
7787ef76 1973
d2a8db92
HG
1974(define python2-pbr-minimal
1975 (package-with-python2 python-pbr-minimal))
7787ef76 1976
1ef09c0c 1977(define-public python-pbr
e25f0174 1978 (package
d2a8db92 1979 (inherit python-pbr-minimal)
e25f0174 1980 (name "python-pbr")
e25f0174
BW
1981 (arguments
1982 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1983 (propagated-inputs
d2a8db92
HG
1984 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1985 (native-inputs
e25f0174 1986 `(("python-fixtures" ,python-fixtures)
d2a8db92 1987 ;; discover, coverage, hacking, subunit
e25f0174 1988 ("python-mock" ,python-mock)
d2a8db92 1989 ("python-six" ,python-six)
e25f0174
BW
1990 ("python-sphinx" ,python-sphinx)
1991 ("python-testrepository" ,python-testrepository)
1992 ("python-testresources" ,python-testresources)
1993 ("python-testscenarios" ,python-testscenarios)
1994 ("python-testtools" ,python-testtools)
1995 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 1996 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
1997 (description
1998 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
1999and sensible default behaviors into your setuptools run. It will set
2000versions, process requirements files and generate AUTHORS and ChangeLog file
2001from git information.
2002")))
1ef09c0c
BW
2003
2004(define-public python2-pbr
e25f0174 2005 (package-with-python2 python-pbr))
1ef09c0c 2006
7787ef76
CR
2007(define-public python-fixtures
2008 (package
2009 (name "python-fixtures")
13fcc6df 2010 (version "1.4.0")
7787ef76
CR
2011 (source
2012 (origin
2013 (method url-fetch)
13fcc6df 2014 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2015 (sha256
2016 (base32
13fcc6df 2017 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2018 (build-system python-build-system)
2019 (propagated-inputs
ae92cadd 2020 `(("python-six" ,python-six)))
e7881f3d 2021 (native-inputs
d2a8db92 2022 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2023 ("python-testtools" ,python-testtools)))
7787ef76
CR
2024 (home-page "https://launchpad.net/python-fixtures")
2025 (synopsis "Python test fixture library")
2026 (description
2027 "Fixtures provides a way to create reusable state, useful when writing
2028Python tests.")
3f641af0 2029 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2030
cd49454b
DT
2031(define-public python2-fixtures
2032 (package-with-python2 python-fixtures))
2033
b24a0c00
DT
2034(define-public python-testrepository
2035 (package
2036 (name "python-testrepository")
2037 (version "0.0.20")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (string-append
2042 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2043 version ".tar.gz"))
2044 (sha256
2045 (base32
2046 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2047 (build-system python-build-system)
05de40c5 2048 (propagated-inputs
b2e66edf 2049 `(("python-testtools" ,python-testtools)))
e7881f3d 2050 (native-inputs
b2e66edf 2051 `(("python-fixtures" ,python-fixtures)
d2a8db92 2052 ("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b2e66edf 2053 ("python-subunit" ,python-subunit)
b24a0c00
DT
2054 ("python-mimeparse" ,python-mimeparse)))
2055 (home-page "https://launchpad.net/testrepository")
2056 (synopsis "Database for Python test results")
2057 (description "Testrepository provides a database of test results which can
2058be used as part of a developer's workflow to check things such as what tests
2059have failed since the last commit or what tests are currently failing.")
3f641af0 2060 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2061
2062(define-public python2-testrepository
2063 (package-with-python2 python-testrepository))
2064
243a009a
DT
2065(define-public python-coverage
2066 (package
2067 (name "python-coverage")
4d4cf3dd 2068 (version "4.1")
243a009a
DT
2069 (source
2070 (origin
2071 (method url-fetch)
82a3c582 2072 (uri (pypi-uri "coverage" version))
243a009a
DT
2073 (sha256
2074 (base32
4d4cf3dd 2075 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2076 (build-system python-build-system)
243a009a
DT
2077 (home-page "http://nedbatchelder.com/code/coverage")
2078 (synopsis "Code coverage measurement for Python")
2079 (description
2080 "Coverage measures code coverage, typically during test execution. It
2081uses the code analysis tools and tracing hooks provided in the Python standard
2082library to determine which lines are executable, and which have been
2083executed.")
3f641af0 2084 (license license:bsd-3)))
243a009a
DT
2085
2086(define-public python2-coverage
2087 (package-with-python2 python-coverage))
2088
12f839fd
EF
2089(define-public python-cov-core
2090 (package
2091 (name "python-cov-core")
2092 (version "1.15.0")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (pypi-uri "cov-core" version))
2097 (sha256
2098 (base32
2099 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2100 (build-system python-build-system)
2101 (native-inputs
2102 `(("python-coverage" ,python-coverage)))
2103 (home-page "https://github.com/schlamar/cov-core")
2104 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2105 (description
2106 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2107It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2108 (license license:expat)))
12f839fd
EF
2109
2110(define-public python2-cov-core
f210e944 2111 (package-with-python2 python-cov-core))
12f839fd 2112
041358fb
DT
2113(define-public python-discover
2114 (package
2115 (name "python-discover")
2116 (version "0.4.0")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (string-append
2121 "https://pypi.python.org/packages/source/d/discover/discover-"
2122 version ".tar.gz"))
2123 (sha256
2124 (base32
2125 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2126 (build-system python-build-system)
041358fb
DT
2127 (home-page "http://pypi.python.org/pypi/discover/")
2128 (synopsis
2129 "Python test discovery for unittest")
2130 (description
2131 "Discover provides test discovery for unittest, a feature that has been
e881752c 2132backported from Python 2.7 for Python 2.4+.")
3f641af0 2133 (license license:bsd-3)))
041358fb
DT
2134
2135(define-public python2-discover
2136 (package-with-python2 python-discover))
2137
a480bc41
EB
2138(define-public behave
2139 (package
2140 (name "behave")
287cfd1a 2141 (version "1.2.5")
a480bc41
EB
2142 (source (origin
2143 (method url-fetch)
287cfd1a 2144 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2145 (sha256
2146 (base32
287cfd1a 2147 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2148 (build-system python-build-system)
f22efa01 2149 (propagated-inputs
f3b98f4f 2150 `(("python-six" ,python-six)
a480bc41
EB
2151 ("python-parse" ,python-parse)
2152 ("python-parse-type" ,python-parse-type)))
2153 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2154 ;PyHamcrest>=1.8
2155 (home-page "http://github.com/behave/behave")
2156 (synopsis "Python behavior-driven development")
2157 (description
2158 "Behave is a tool for behavior-driven development in python.
2159Behavior-driven development (or BDD) is an agile software development
2160technique that encourages collaboration between developers, QA and
2161non-technical or business participants in a software project. Behave uses
2162tests written in a natural language style, backed up by Python code.")
3f641af0 2163 (license license:x11)))
c7303d3c
DT
2164
2165(define-public python-exif-read
2166 (package
2167 (name "python-exif-read")
2a2d0981 2168 (version "2.1.2")
c7303d3c
DT
2169 (source (origin
2170 (method url-fetch)
2a2d0981 2171 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2172 (sha256
2173 (base32
2a2d0981 2174 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2175 (build-system python-build-system)
c7303d3c
DT
2176 (arguments `(#:tests? #f)) ; no tests
2177 (home-page "https://github.com/ianare/exif-py")
2178 (synopsis "Python library to extract EXIF data from image files")
2179 (description
2180 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2181files.")
3f641af0 2182 (license license:bsd-3)))
c7303d3c
DT
2183
2184(define-public python2-exif-read
2185 (package-with-python2 python-exif-read))
d5f89b22
DT
2186
2187(define-public python-pyld
2188 (package
2189 (name "python-pyld")
af1ab773 2190 (version "0.6.8")
d5f89b22
DT
2191 (source (origin
2192 (method url-fetch)
af1ab773 2193 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2194 (sha256
2195 (base32
af1ab773 2196 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22 2197 (build-system python-build-system)
d5f89b22
DT
2198 (arguments `(#:tests? #f)) ; no tests
2199 (home-page "http://github.com/digitalbazaar/pyld")
2200 (synopsis "Python implementation of the JSON-LD specification")
2201 (description
2202 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2203 (license license:bsd-3)))
d5f89b22
DT
2204
2205(define-public python2-pyld
2206 (package-with-python2 python-pyld))
3a1f9a68
DT
2207
2208(define-public python-certifi
2209 (package
2210 (name "python-certifi")
b2a2232c 2211 (version "2016.8.31")
3a1f9a68
DT
2212 (source (origin
2213 (method url-fetch)
9a41f443 2214 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2215 (sha256
2216 (base32
b2a2232c 2217 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2218 (build-system python-build-system)
3a1f9a68
DT
2219 (arguments `(#:tests? #f)) ; no tests
2220 (home-page "http://python-requests.org/")
2221 (synopsis "Python CA certificate bundle")
2222 (description
2223 "Certifi is a Python library that contains a CA certificate bundle, which
2224is used by the Requests library to verify HTTPS requests.")
3f641af0 2225 (license license:asl2.0)))
3a1f9a68
DT
2226
2227(define-public python2-certifi
2228 (package-with-python2 python-certifi))
e6cfbd36 2229
12c270dd
RW
2230(define-public python-click
2231 (package
2232 (name "python-click")
43accb58 2233 (version "6.6")
12c270dd
RW
2234 (source
2235 (origin
2236 (method url-fetch)
375f224b 2237 (uri (pypi-uri "click" version))
12c270dd 2238 (sha256
43accb58
LF
2239 (base32
2240 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2241 (build-system python-build-system)
e2ab5a09
BW
2242 (arguments
2243 `(#:phases
2244 (modify-phases %standard-phases
2245 (add-after 'unpack 'fix-paths
2246 (lambda* (#:key inputs #:allow-other-keys)
2247 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2248 "cross-libc" "libc"))))
2249 (substitute* "click/_unicodefun.py"
2250 (("'locale'")
2251 (string-append "'" glibc "/bin/locale'"))))
2252 #t)))))
12c270dd
RW
2253 (home-page "http://click.pocoo.org")
2254 (synopsis "Command line library for Python")
2255 (description
2256 "Click is a Python package for creating command line interfaces in a
2257composable way with as little code as necessary. Its name stands for
2258\"Command Line Interface Creation Kit\". It's highly configurable but comes
2259with sensible defaults out of the box.")
3f641af0 2260 (license license:bsd-3)))
12c270dd
RW
2261
2262(define-public python2-click
2263 (package-with-python2 python-click))
2264
addc808d
EF
2265(define-public python-wheel
2266 (package
2267 (name "python-wheel")
40981b5c 2268 (version "0.29.0")
e1ba0749
EF
2269 (source
2270 (origin
2271 (method url-fetch)
2272 (uri (pypi-uri "wheel" version))
2273 (sha256
2274 (base32
40981b5c 2275 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2276 (build-system python-build-system)
2277 (native-inputs
f3b98f4f 2278 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2279 ("python-pytest-cov" ,python-pytest-cov)))
2280 (home-page "https://bitbucket.org/pypa/wheel/")
2281 (synopsis "Format for built Python packages")
2282 (description
2283 "A wheel is a ZIP-format archive with a specially formatted filename and
2284the @code{.whl} extension. It is designed to contain all the files for a PEP
2285376 compatible install in a way that is very close to the on-disk format. Many
2286packages will be properly installed with only the @code{Unpack} step and the
2287unpacked archive preserves enough information to @code{Spread} (copy data and
2288scripts to their final locations) at any later time. Wheel files can be
2289installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2290 (license license:expat)
2291 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2292
2293(define-public python2-wheel
8ad4ae20
LF
2294 (let ((wheel (package-with-python2
2295 (strip-python2-variant python-wheel))))
264ae686 2296 (package (inherit wheel)
8ad4ae20
LF
2297 (native-inputs `(("python2-functools32" ,python2-functools32)
2298 ,@(package-native-inputs wheel))))))
2299
addc808d 2300
ae641128 2301(define-public python-requests
e6cfbd36 2302 (package
ae641128 2303 (name "python-requests")
74a066f9 2304 (version "2.9.1")
e6cfbd36
DT
2305 (source (origin
2306 (method url-fetch)
5d691657 2307 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2308 (sha256
2309 (base32
74a066f9 2310 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2311 (build-system python-build-system)
5d691657 2312 (native-inputs
f3b98f4f 2313 `(("python-py" ,python-py)
5d691657
EF
2314 ("python-pytest" ,python-pytest)
2315 ("python-pytest-cov" ,python-pytest-cov)
2316 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2317 (home-page "http://python-requests.org/")
2318 (synopsis "Python HTTP library")
2319 (description
2320 "Requests is a Python HTTP client library. It aims to be easier to use
2321than Python’s urllib2 library.")
3f641af0 2322 (license license:asl2.0)))
864b5211 2323
e9005180
DT
2324;; Some software requires an older version of Requests, notably Docker
2325;; Compose.
2326(define-public python-requests-2.7
2327 (package (inherit python-requests)
2328 (version "2.7.0")
2329 (source (origin
2330 (method url-fetch)
2331 (uri (pypi-uri "requests" version))
2332 (sha256
2333 (base32
2334 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2335
ae641128 2336(define-public python2-requests
8ad4ae20 2337 (package-with-python2 python-requests))
ae641128 2338
ea521b42
DT
2339(define-public python-vcversioner
2340 (package
2341 (name "python-vcversioner")
538fe019 2342 (version "2.16.0.0")
ea521b42
DT
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "vcversioner" version))
2347 (sha256
2348 (base32
538fe019 2349 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2350 (build-system python-build-system)
ea521b42
DT
2351 (synopsis "Python library for version number discovery")
2352 (description "Vcversioner is a Python library that inspects tagging
2353information in a variety of version control systems in order to discover
2354version numbers.")
2355 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2356 (license license:isc)))
ea521b42
DT
2357
2358(define-public python2-vcversioner
f210e944 2359 (package-with-python2 python-vcversioner))
ae641128 2360
864b5211
DT
2361(define-public python-jsonschema
2362 (package
2363 (name "python-jsonschema")
b3667afb 2364 (version "2.5.1")
864b5211
DT
2365 (source (origin
2366 (method url-fetch)
2367 (uri
2368 (string-append
2369 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2370 version ".tar.gz"))
2371 (sha256
2372 (base32
b3667afb 2373 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2374 (build-system python-build-system)
8bcd6b91
EF
2375 (arguments
2376 '(#:phases
2377 (modify-phases %standard-phases
2378 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2379 (native-inputs
8bcd6b91
EF
2380 `(("python-nose" ,python-nose)
2381 ("python-vcversioner" ,python-vcversioner)))
2382 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2383 (synopsis "Implementation of JSON Schema for Python")
2384 (description
2385 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2386 (license license:expat)
2387 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2388
2389(define-public python2-jsonschema
a14600ec
LF
2390 (let ((jsonschema (package-with-python2
2391 (strip-python2-variant python-jsonschema))))
264ae686 2392 (package (inherit jsonschema)
eaba9d66 2393 (native-inputs
8bcd6b91 2394 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2395 ,@(package-native-inputs jsonschema)))
2396 (propagated-inputs
2397 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2398
2399(define-public python-unidecode
2400 (package
2401 (name "python-unidecode")
8925d4f3 2402 (version "0.04.18")
850189b8
DT
2403 (source (origin
2404 (method url-fetch)
8925d4f3 2405 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2406 (sha256
2407 (base32
8925d4f3 2408 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2409 (build-system python-build-system)
850189b8
DT
2410 (home-page "https://pypi.python.org/pypi/Unidecode")
2411 (synopsis "ASCII transliterations of Unicode text")
2412 (description
2413 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2414useful when integrating with legacy code that doesn't support Unicode, or for
2415ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2416machine identifiers from human-readable Unicode strings that should still be
2417somewhat intelligeble.")
3f641af0 2418 (license license:gpl2+)))
850189b8
DT
2419
2420(define-public python2-unidecode
2421 (package-with-python2 python-unidecode))
6d45fef4
DT
2422
2423(define-public python-pyjwt
2424 (package
2425 (name "python-pyjwt")
eb31d4b4 2426 (version "1.4.0")
6d45fef4
DT
2427 (source
2428 (origin
2429 (method url-fetch)
eb31d4b4 2430 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2431 (sha256
2432 (base32
eb31d4b4 2433 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2434 (build-system python-build-system)
eb31d4b4 2435 (native-inputs
f3b98f4f 2436 `(("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2437 (arguments
2438 '(#:tests? #f)) ; test suite doesn't work
2439 (home-page "http://github.com/progrium/pyjwt")
2440 (synopsis "JSON Web Token implementation in Python")
2441 (description
2442 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2443 (license license:expat)))
6d45fef4
DT
2444
2445(define-public python2-pyjwt
2446 (package-with-python2 python-pyjwt))
2447
2cec1f6f
DT
2448(define-public python-oauthlib
2449 (package
2450 (name "python-oauthlib")
bde2171d 2451 (version "1.0.3")
2cec1f6f
DT
2452 (source (origin
2453 (method url-fetch)
bde2171d 2454 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2455 (sha256
2456 (base32
bde2171d 2457 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2458 (build-system python-build-system)
bde2171d 2459 (native-inputs
59f151ec 2460 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2461 ("python-nose" ,python-nose)
2462 ("python-mock" ,python-mock)))
f22efa01 2463 (propagated-inputs
bde2171d
EF
2464 `(("python-blinker" ,python-blinker)
2465 ("python-cryptography" ,python-cryptography)
2466 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2467 (home-page "https://github.com/idan/oauthlib")
2468 (synopsis "OAuth implementation for Python")
2469 (description
2470 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2471OAuth request-signing logic.")
3f641af0 2472 (license license:bsd-3)
59f151ec 2473 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2474
2475(define-public python2-oauthlib
59f151ec 2476 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2477 (package
2478 (inherit base)
00e10c6e 2479 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2480 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2481
2482(define-public python-itsdangerous
2483 (package
2484 (name "python-itsdangerous")
2485 (version "0.24")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (string-append
2490 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2491 version ".tar.gz"))
2492 (sha256
2493 (base32
2494 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2495 (build-system python-build-system)
ec5dbb5c
DT
2496 (home-page "http://github.com/mitsuhiko/itsdangerous")
2497 (synopsis "Python library for passing data to/from untrusted environments")
2498 (description
2499 "Itsdangerous provides various helpers to pass trusted data to untrusted
2500environments and back.")
f210e944 2501 (license license:bsd-3)))
ec5dbb5c
DT
2502
2503(define-public python2-itsdangerous
f210e944 2504 (package-with-python2 python-itsdangerous))
5731cae3 2505
8d12be1e
RW
2506(define-public python-pyyaml
2507 (package
2508 (name "python-pyyaml")
2509 (version "3.11")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (string-append
2514 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2515 version ".tar.gz"))
2516 (sha256
2517 (base32
2518 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2519 (build-system python-build-system)
2520 (inputs
2521 `(("libyaml" ,libyaml)))
8d12be1e
RW
2522 (home-page "http://pyyaml.org/wiki/PyYAML")
2523 (synopsis "YAML parser and emitter for Python")
2524 (description
2525 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2526complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2527API, and sensible error messages. PyYAML supports standard YAML tags and
2528provides Python-specific tags that allow to represent an arbitrary Python
2529object.")
2530 (license license:expat)))
2531
2532(define-public python2-pyyaml
2533 (package-with-python2 python-pyyaml))
2534
5731cae3
DT
2535(define-public python-virtualenv
2536 (package
2537 (name "python-virtualenv")
58d04dba 2538 (version "15.0.3")
5731cae3
DT
2539 (source
2540 (origin
2541 (method url-fetch)
17804240 2542 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2543 (sha256
2544 (base32
58d04dba 2545 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2546 (build-system python-build-system)
17804240
EF
2547 (arguments
2548 `(#:phases
2549 (modify-phases %standard-phases
58d04dba
RW
2550 (replace 'check
2551 (lambda _
2552 ;; Disable failing test. See upstream bug report
2553 ;; https://github.com/pypa/virtualenv/issues/957
2554 (substitute* "tests/test_virtualenv.py"
2555 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2556 (zero? (system* "py.test")))))))
e7881f3d 2557 (native-inputs
f3b98f4f 2558 `(("python-mock" ,python-mock)
17804240 2559 ("python-pytest" ,python-pytest)))
5731cae3
DT
2560 (home-page "https://virtualenv.pypa.io/")
2561 (synopsis "Virtual Python environment builder")
2562 (description
2563 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2564 (license license:expat)))
5731cae3
DT
2565
2566(define-public python2-virtualenv
2567 (package-with-python2 python-virtualenv))
8176d4d5
DT
2568
2569(define-public python-markupsafe
2570 (package
2571 (name "python-markupsafe")
2572 (version "0.23")
2573 (source
2574 (origin
2575 (method url-fetch)
2576 (uri (string-append
2577 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2578 version ".tar.gz"))
2579 (sha256
2580 (base32
2581 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2582 (build-system python-build-system)
8176d4d5
DT
2583 (home-page "http://github.com/mitsuhiko/markupsafe")
2584 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2585 (description
2586 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2587for Python.")
3f641af0 2588 (license license:bsd-3)))
8176d4d5
DT
2589
2590(define-public python2-markupsafe
2591 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2592
2593(define-public python-jinja2
2594 (package
2595 (name "python-jinja2")
e98149b3 2596 (version "2.8")
fe34f0d1
DT
2597 (source
2598 (origin
2599 (method url-fetch)
e98149b3 2600 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2601 (sha256
2602 (base32
e98149b3 2603 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2604 (build-system python-build-system)
f22efa01 2605 (propagated-inputs
f3b98f4f 2606 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2607 (home-page "http://jinja.pocoo.org/")
2608 (synopsis "Python template engine")
2609 (description
2610 "Jinja2 is a small but fast and easy to use stand-alone template engine
2611written in pure Python.")
3f641af0 2612 (license license:bsd-3)))
fe34f0d1
DT
2613
2614(define-public python2-jinja2
2615 (package-with-python2 python-jinja2))
3580ab8b 2616
f7d17ac7
EE
2617(define-public python-pystache
2618 (package
2619 (name "python-pystache")
2620 (version "0.5.4")
2621 (source (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "pystache" version))
2624 (sha256
2625 (base32
2626 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2627 (build-system python-build-system)
f7d17ac7
EE
2628 (home-page "http://defunkt.io/pystache/")
2629 (synopsis "Python logic-less template engine")
2630 (description
2631 "Pystache is a Python implementation of the framework agnostic,
2632logic-free templating system Mustache.")
2633 (license license:expat)))
2634
2635(define-public python2-pystache
2636 (package-with-python2 python-pystache))
2637
1285119b
RW
2638(define-public python-joblib
2639 (package
2640 (name "python-joblib")
f34ef331 2641 (version "0.10.3")
1285119b
RW
2642 (source (origin
2643 (method url-fetch)
f34ef331 2644 (uri (pypi-uri "joblib" version))
1285119b
RW
2645 (sha256
2646 (base32
f34ef331 2647 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
1285119b 2648 (build-system python-build-system)
a8dd960a
RW
2649 (arguments
2650 `(#:phases
2651 (modify-phases %standard-phases
2652 (add-before 'check 'disable-failing-tests
2653 (lambda _
2654 ;; This numpydoc tests fails for unknown reasons
2655 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2656 ;; This numpydoc test depends on matplotlib, which is not a
2657 ;; required input.
2658 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2659 ;; These tests fail to execute sys.executable
2660 (substitute* "joblib/test/test_parallel.py"
2661 (("import nose" line)
2662 (string-append "from nose.plugins.skip import SkipTest\n" line))
2663 (("def test_nested_parallel_warnings" line)
2664 (string-append "@SkipTest\n" line))
2665 (("def test_parallel_with_interactively_defined_functions" line)
2666 (string-append "@SkipTest\n" line)))
2667 #t)))))
1285119b 2668 (native-inputs
f3b98f4f 2669 `(("python-nose" ,python-nose)
f34ef331
RW
2670 ("python-sphinx" ,python-sphinx)
2671 ("python-docutils" ,python-docutils)
2672 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2673 (home-page "http://pythonhosted.org/joblib/")
2674 (synopsis "Using Python functions as pipeline jobs")
2675 (description
2676 "Joblib is a set of tools to provide lightweight pipelining in Python.
2677In particular, joblib offers: transparent disk-caching of the output values
2678and lazy re-evaluation (memoize pattern), easy simple parallel computing
2679logging and tracing of the execution.")
3f641af0 2680 (license license:bsd-3)))
1285119b
RW
2681
2682(define-public python2-joblib
2683 (package-with-python2 python-joblib))
2684
3580ab8b
DT
2685(define-public python-docutils
2686 (package
2687 (name "python-docutils")
2688 (version "0.12")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (string-append
2693 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2694 version ".tar.gz"))
2695 (sha256
2696 (base32
2697 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2698 (build-system python-build-system)
3580ab8b
DT
2699 (arguments
2700 '(#:tests? #f)) ; no setup.py test command
2701 (home-page "http://docutils.sourceforge.net/")
2702 (synopsis "Python Documentation Utilities")
2703 (description
2704 "Docutils is a modular system for processing documentation into useful
2705formats, such as HTML, XML, and LaTeX. For input Docutils supports
2706reStructuredText.")
2707 ;; Most of the source code is public domain, but some source files are
2708 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2709 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2710
2711(define-public python2-docutils
2712 (package-with-python2 python-docutils))
fb35b7c0
DT
2713
2714(define-public python-pygments
2715 (package
2716 (name "python-pygments")
9f442285 2717 (version "2.0.2")
fb35b7c0
DT
2718 (source
2719 (origin
2720 (method url-fetch)
9f442285 2721 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2722 (sha256
2723 (base32
9f442285 2724 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2725 (build-system python-build-system)
fb35b7c0
DT
2726 (home-page "http://pygments.org/")
2727 (synopsis "Syntax highlighting")
2728 (description
2729 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2730 (license license:bsd-2)))
fb35b7c0
DT
2731
2732(define-public python2-pygments
2733 (package-with-python2 python-pygments))
9dd6078d
DT
2734
2735(define-public python-sphinx
2736 (package
2737 (name "python-sphinx")
2738 (version "1.2.3")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (string-append
2743 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2744 version ".tar.gz"))
2745 (sha256
2746 (base32
2747 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2748 (build-system python-build-system)
f22efa01 2749 (propagated-inputs
f3b98f4f 2750 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2751 ("python-docutils" ,python-docutils)
2752 ("python-pygments" ,python-pygments)))
2753 (home-page "http://sphinx-doc.org/")
2754 (synopsis "Python documentation generator")
2755 (description "Sphinx is a tool that makes it easy to create documentation
2756for Python projects or other documents consisting of multiple reStructuredText
2757sources.")
3f641af0 2758 (license license:bsd-3)))
9dd6078d
DT
2759
2760(define-public python2-sphinx
2761 (package-with-python2 python-sphinx))
6888830b 2762
ad320b20
RW
2763(define-public python-sphinx-rtd-theme
2764 (package
2765 (name "python-sphinx-rtd-theme")
2766 (version "0.1.6")
2767 (source
2768 (origin
2769 (method url-fetch)
2770 (uri (string-append "https://pypi.python.org/packages/source/s/"
2771 "sphinx_rtd_theme/sphinx_rtd_theme-"
2772 version ".tar.gz"))
2773 (sha256
2774 (base32
2775 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2776 (build-system python-build-system)
ad320b20
RW
2777 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2778 (synopsis "ReadTheDocs.org theme for Sphinx")
2779 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2780 (license license:expat)))
ad320b20
RW
2781
2782(define-public python2-sphinx-rtd-theme
2783 (package-with-python2 python-sphinx-rtd-theme))
2784
f4de5b3b
CAW
2785(define-public python-feedgenerator
2786 (package
2787 (name "python-feedgenerator")
f0412aa2 2788 (version "1.8")
f4de5b3b 2789 (source
f4de5b3b 2790 (origin
f0412aa2
EF
2791 (method url-fetch)
2792 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2793 (sha256
2794 (base32
f0412aa2 2795 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2796 (build-system python-build-system)
dae73d9b 2797 (propagated-inputs
f3b98f4f 2798 `(("python-pytz" ,python-pytz)
f4de5b3b 2799 ("python-six" ,python-six)))
f0412aa2 2800 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2801 (synopsis
2802 "Standalone version of Django's Atom/RSS feed generator")
2803 (description
2804 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2805which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2806 (license license:bsd-3)))
f4de5b3b
CAW
2807
2808(define-public python2-feedgenerator
2809 (package-with-python2 python-feedgenerator))
2810
59ad30e3
CAW
2811(define-public python-blinker
2812 (package
2813 (name "python-blinker")
7fb9ff4d 2814 (version "1.4")
59ad30e3
CAW
2815 (source
2816 (origin
2817 (method url-fetch)
7fb9ff4d 2818 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2819 (sha256
2820 (base32
7fb9ff4d 2821 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2822 (build-system python-build-system)
59ad30e3
CAW
2823 ;; No "test" command supplied to setuptools, so unless there's another way
2824 ;; to run tests, we're skipping them!
2825 (arguments '(#:tests? #f))
2826 (home-page "http://pythonhosted.org/blinker/")
2827 (synopsis "Fast, simple object-to-object and broadcast signaling")
2828 (description
2829 "Blinker provides a fast dispatching system that allows any number of
2830interested parties to subscribe to events, or \"signals\".")
2831 (license license:expat)))
2832
2833(define-public python2-blinker
2834 (package-with-python2 python-blinker))
2835
b8050e71
CAW
2836(define-public pelican
2837 (package
2838 (name "pelican")
11f97c27 2839 (version "3.6.3")
b8050e71
CAW
2840 (source
2841 (origin
2842 (method url-fetch)
11f97c27 2843 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2844 (sha256
2845 (base32
11f97c27 2846 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2847 (build-system python-build-system)
f22efa01 2848 (propagated-inputs
b8050e71
CAW
2849 `(("python-feedgenerator" ,python-feedgenerator)
2850 ("python-jinja2" ,python-jinja2)
2851 ("python-pygments" ,python-pygments)
2852 ("python-docutils" ,python-docutils)
2853 ("python-pytz" ,python-pytz)
2854 ("python-blinker" ,python-blinker)
2855 ("python-unidecode" ,python-unidecode)
2856 ("python-six" ,python-six)
2857 ("python-dateutil-2" ,python-dateutil-2)))
2858 (home-page "http://getpelican.com/")
2859 (arguments
2860 `(;; XXX Requires a lot more packages to do unit tests :P
2861 #:tests? #f
2862 #:phases (modify-phases %standard-phases
2863 (add-before
2864 'install 'adjust-requires
2865 ;; Since feedgenerator is installed from git, it doesn't
2866 ;; conform to the version requirements.
2867 ;;
2868 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2869 ;; version requirement so setuptools doesn't get confused.
2870 (lambda _
2871 (substitute* "setup.py"
2872 (("['\"]feedgenerator.*?['\"]")
2873 "'feedgenerator'")))))))
2874 (synopsis "Python-based static site publishing system")
2875 (description
2876 "Pelican is a tool to generate a static blog from reStructuredText,
2877Markdown input files, and more. Pelican uses Jinja2 for templating
2878and is very extensible.")
3f641af0 2879 (license license:agpl3+)))
b8050e71 2880
240ca4aa
RW
2881(define-public python-scikit-learn
2882 (package
2883 (name "python-scikit-learn")
be0a4c26 2884 (version "0.16.1")
240ca4aa
RW
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (string-append
2889 "https://github.com/scikit-learn/scikit-learn/archive/"
2890 version ".tar.gz"))
7e21b9fb 2891 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2892 (sha256
2893 (base32
be0a4c26 2894 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2895 (build-system python-build-system)
2896 (arguments
2897 `(#:phases
2898 (alist-cons-before
2f6b3d2e
RW
2899 'check 'set-HOME
2900 ;; some tests require access to "$HOME"
2901 (lambda _ (setenv "HOME" "/tmp"))
2902 ;; Tests can only be run after the library has been installed and not
2903 ;; within the source directory.
2904 (alist-cons-after
2905 'install 'check
2906 (lambda _
2907 (with-directory-excursion "/tmp"
2908 ;; With Python 3 one test of 3334 fails
2909 ;; (sklearn.tests.test_common.test_transformers); see
2910 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2911 (system* "nosetests" "-v" "sklearn")))
2912 (alist-delete 'check %standard-phases)))))
240ca4aa 2913 (inputs
328bb95d
HG
2914 `(("openblas" ,openblas)))
2915 (native-inputs
2916 `(("python-nose" ,python-nose)))
240ca4aa
RW
2917 (propagated-inputs
2918 `(("python-numpy" ,python-numpy)
2919 ("python-scipy" ,python-scipy)))
2920 (home-page "http://scikit-learn.org/")
2921 (synopsis "Machine Learning in Python")
2922 (description
2923 "Scikit-learn provides simple and efficient tools for data
2924mining and data analysis.")
25a2f81f
EF
2925 (license license:bsd-3)
2926 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
2927
2928(define-public python2-scikit-learn
25a2f81f 2929 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 2930
12f8f9bb
RW
2931(define-public python-scikit-image
2932 (package
2933 (name "python-scikit-image")
2934 (version "0.11.3")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (string-append
2939 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2940 version ".tar.gz"))
2941 (sha256
2942 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2943 (build-system python-build-system)
2944 (propagated-inputs
2945 `(("python-matplotlib" ,python-matplotlib)
2946 ("python-networkx" ,python-networkx)
2947 ("python-numpy" ,python-numpy)
2948 ("python-scipy" ,python-scipy)
2949 ("python-six" ,python-six)
2950 ("python-pillow" ,python-pillow)))
2951 (native-inputs
f3b98f4f 2952 `(("python-cython" ,python-cython)))
12f8f9bb
RW
2953 (home-page "http://scikit-image.org/")
2954 (synopsis "Image processing in Python")
2955 (description
e881752c 2956 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
2957 (license license:bsd-3)
2958 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
2959
2960(define-public python2-scikit-image
2b031d3f
EF
2961 (let ((scikit-image (package-with-python2
2962 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
2963 (package (inherit scikit-image)
2964 (native-inputs
2965 `(("python2-mock" ,python2-mock)
2966 ,@(package-native-inputs scikit-image)))
2967 (propagated-inputs
2968 `(("python2-pytz" ,python2-pytz)
2b031d3f 2969 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 2970
5394a6a6
RW
2971(define-public python-redis
2972 (package
2973 (name "python-redis")
2974 (version "2.10.3")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (string-append
2979 "https://pypi.python.org/packages/source/r/redis/redis-"
2980 version ".tar.gz"))
2981 (sha256
2982 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2983 (build-system python-build-system)
2984 ;; Tests require a running Redis server
2985 (arguments '(#:tests? #f))
2986 (native-inputs
f3b98f4f 2987 `(("python-pytest" ,python-pytest)))
5394a6a6
RW
2988 (home-page "https://github.com/andymccurdy/redis-py")
2989 (synopsis "Redis Python client")
2990 (description
2991 "This package provides a Python interface to the Redis key-value store.")
2992 (license license:expat)))
2993
2994(define-public python2-redis
2995 (package-with-python2 python-redis))
2996
748cef5b
RW
2997(define-public python-rq
2998 (package
2999 (name "python-rq")
3000 (version "0.5.2")
3001 (source
3002 (origin
3003 (method url-fetch)
3004 (uri (string-append
3005 "https://pypi.python.org/packages/source/r/rq/rq-"
3006 version ".tar.gz"))
3007 (sha256
3008 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3009 (build-system python-build-system)
3010 (propagated-inputs
3011 `(("python-click" ,python-click)
3012 ("python-redis" ,python-redis)))
748cef5b
RW
3013 (home-page "http://python-rq.org/")
3014 (synopsis "Simple job queues for Python")
3015 (description
3016 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3017processing them in the background with workers. It is backed by Redis and it
3018is designed to have a low barrier to entry.")
3f641af0 3019 (license license:bsd-2)))
748cef5b
RW
3020
3021(define-public python2-rq
3022 (package-with-python2 python-rq))
3023
6888830b
FB
3024(define-public python-cython
3025 (package
3026 (name "python-cython")
dd22efef 3027 (version "0.24.1")
6888830b
FB
3028 (source
3029 (origin
3030 (method url-fetch)
56918e26 3031 (uri (pypi-uri "Cython" version))
6888830b
FB
3032 (sha256
3033 (base32
dd22efef 3034 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3035 (build-system python-build-system)
3036 ;; we need the full python package and not just the python-wrapper
3037 ;; because we need libpython3.3m.so
3038 (inputs
3039 `(("python" ,python)))
3040 (arguments
3041 `(#:phases
b92f651b
EF
3042 (modify-phases %standard-phases
3043 (add-before 'check 'set-HOME
3044 ;; some tests require access to "$HOME/.cython"
3045 (lambda _ (setenv "HOME" "/tmp")))
3046 (replace 'check
3047 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3048 (home-page "http://cython.org/")
3049 (synopsis "C extensions for Python")
3050 (description "Cython is an optimising static compiler for both the Python
3051programming language and the extended Cython programming language. It makes
3052writing C extensions for Python as easy as Python itself.")
3f641af0 3053 (license license:asl2.0)
48b311b1 3054 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3055
3056(define-public python2-cython
48b311b1
LC
3057 (package (inherit (package-with-python2
3058 (strip-python2-variant python-cython)))
6888830b
FB
3059 (name "python2-cython")
3060 (inputs
3061 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3062
ee5fb7ee
AV
3063;; The RPython toolchain currently does not support Python 3.
3064(define-public python2-rpython
3065 (package
3066 (name "python2-rpython")
3067 (version "0.1.4")
3068 (source
3069 (origin
3070 (method url-fetch)
3071 (uri (pypi-uri "rpython" version))
3072 (sha256
3073 (base32
3074 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3075 (build-system python-build-system)
3076 (arguments `(#:python ,python-2))
3077 (native-inputs
f3b98f4f 3078 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3079 (home-page "https://rpython.readthedocs.org")
3080 (synopsis "Framework for implementing interpreters and virtual machines")
3081 (description "RPython is a translation and support framework for
3082producing implementations of dynamic languages, emphasizing a clean separation
3083between language specification and implementation aspects.")
3084 (license license:expat)))
3085
0da98533
FB
3086;; This version of numpy is missing the documentation and is only used to
3087;; build matplotlib which is required to build numpy's documentation.
3088(define python-numpy-bootstrap
3089 (package
3090 (name "python-numpy-bootstrap")
ef9b4c04 3091 (version "1.10.4")
0da98533
FB
3092 (source
3093 (origin
3094 (method url-fetch)
de67e922 3095 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3096 "/numpy-" version ".tar.gz"))
3097 (sha256
3098 (base32
ef9b4c04 3099 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3100 (build-system python-build-system)
3101 (inputs
328bb95d 3102 `(("openblas" ,openblas)
cba256f8 3103 ("lapack" ,lapack)))
0da98533 3104 (native-inputs
2efabc55
HG
3105 `(("python-nose" ,python-nose)
3106 ("gfortran" ,gfortran)))
0da98533
FB
3107 (arguments
3108 `(#:phases
2efabc55
HG
3109 (modify-phases %standard-phases
3110 (add-before 'build 'set-environment-variables
3111 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3112 (call-with-output-file "site.cfg"
3113 (lambda (port)
cba256f8
RW
3114 (format port
3115 "[openblas]
dbdfe515
RW
3116libraries = openblas
3117library_dirs = ~a/lib
3118include_dirs = ~a/include
cba256f8 3119
2efabc55
HG
3120# backslash-n to make emacs happy
3121\n[lapack]
cba256f8
RW
3122lapack_libs = lapack
3123library_dirs = ~a/lib
3124include_dirs = ~a/include
3125"
3126 (assoc-ref inputs "openblas")
3127 (assoc-ref inputs "openblas")
3128 (assoc-ref inputs "lapack")
3129 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3130 ;; Use "gcc" executable, not "cc".
3131 (substitute* "numpy/distutils/system_info.py"
3132 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3133 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3134 #t))
6a843168
FB
3135 ;; Tests can only be run after the library has been installed and not
3136 ;; within the source directory.
2efabc55
HG
3137 (delete 'check)
3138 (add-after 'install 'check
3139 (lambda* (#:key outputs inputs #:allow-other-keys)
3140 ;; Make installed package available for running the tests
3141 (add-installed-pythonpath inputs outputs)
6a843168 3142 (with-directory-excursion "/tmp"
89b5c60e 3143 (zero? (system* "python" "-c"
2efabc55 3144 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3145 (home-page "http://www.numpy.org/")
3146 (synopsis "Fundamental package for scientific computing with Python")
3147 (description "NumPy is the fundamental package for scientific computing
e881752c 3148with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3149object, sophisticated (broadcasting) functions, tools for integrating C/C++
3150and Fortran code, useful linear algebra, Fourier transform, and random number
3151capabilities.")
3f641af0 3152 (license license:bsd-3)))
0da98533
FB
3153
3154(define python2-numpy-bootstrap
3155 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3156
3a1bfe18
RW
3157(define-public python2-fastlmm
3158 (package
3159 (name "python2-fastlmm")
b074e7d4 3160 (version "0.2.21")
3a1bfe18
RW
3161 (source
3162 (origin
3163 (method url-fetch)
b074e7d4 3164 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3165 (sha256
3166 (base32
b074e7d4 3167 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3168 (build-system python-build-system)
3169 (arguments
3170 `(#:python ,python-2)) ; only Python 2.7 is supported
3171 (propagated-inputs
3172 `(("python2-numpy" ,python2-numpy)
3173 ("python2-scipy" ,python2-scipy)
3174 ("python2-matplotlib" ,python2-matplotlib)
3175 ("python2-pandas" ,python2-pandas)
3176 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3177 ("python2-pysnptools" ,python2-pysnptools)))
3178 (native-inputs
3179 `(("unzip" ,unzip)
2efabc55 3180 ("python2-cython" ,python2-cython)
f3b98f4f 3181 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3182 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3183 (synopsis "Perform genome-wide association studies on large data sets")
3184 (description
3185 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3186Models, is a program for performing both single-SNP and SNP-set genome-wide
3187association studies (GWAS) on extremely large data sets.")
3f641af0 3188 (license license:asl2.0)))
3a1bfe18 3189
2ee8869a
FB
3190(define-public python-numpy
3191 (package (inherit python-numpy-bootstrap)
3192 (name "python-numpy")
3193 (outputs '("out" "doc"))
89b5c60e 3194 (inputs
2efabc55
HG
3195 `(("which" ,which)))
3196 (propagated-inputs
3197 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3198 ("python-pyparsing" ,python-pyparsing)
2ee8869a
FB
3199 ,@(package-inputs python-numpy-bootstrap)))
3200 (native-inputs
3201 `(("pkg-config" ,pkg-config)
2efabc55
HG
3202 ("python-sphinx" ,python-sphinx)
3203 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3204 ("texlive" ,texlive)
3205 ("texinfo" ,texinfo)
3206 ("perl" ,perl)
3207 ,@(package-native-inputs python-numpy-bootstrap)))
3208 (arguments
89b5c60e 3209 `(,@(substitute-keyword-arguments
2ee8869a
FB
3210 (package-arguments python-numpy-bootstrap)
3211 ((#:phases phases)
3212 `(alist-cons-after
3213 'install 'install-doc
2efabc55
HG
3214 (lambda* (#:key inputs outputs #:allow-other-keys)
3215 ;; Make installed package available for building the
3216 ;; documentation
3217 (add-installed-pythonpath inputs outputs)
2ee8869a 3218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3219 (doc (string-append
3220 data "/doc/" ,name "-"
2ee8869a
FB
3221 ,(package-version python-numpy-bootstrap)))
3222 (info (string-append data "/info"))
3223 (html (string-append doc "/html"))
3224 (pyver ,(string-append "PYVER=")))
3225 (with-directory-excursion "doc"
3226 (mkdir-p html)
3227 (system* "make" "html" pyver)
3228 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3229 (system* "make" "-C" "build/latex"
2ee8869a
FB
3230 "all-pdf" "PAPER=a4" pyver)
3231 ;; FIXME: Generation of the info file fails.
3232 ;; (system* "make" "info" pyver)
3233 ;; (mkdir-p info)
3234 ;; (copy-file "build/texinfo/numpy.info"
3235 ;; (string-append info "/numpy.info"))
3236 (for-each (lambda (file)
3237 (copy-file (string-append "build/latex" file)
3238 (string-append doc file)))
3239 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3240 (with-directory-excursion "build/html"
3241 (for-each (lambda (file)
3242 (let* ((dir (dirname file))
3243 (tgt-dir (string-append html "/" dir)))
3244 (unless (equal? "." dir)
3245 (mkdir-p tgt-dir))
96c46210 3246 (install-file file html)))
2ee8869a
FB
3247 (find-files "." ".*"))))))
3248 ,phases)))))))
3249
764c077b 3250(define-public python2-numpy
57b7b8cd 3251 (package-with-python2 python-numpy))
2ee8869a 3252
15bfe6d6
FB
3253(define-public python-pyparsing
3254 (package
3255 (name "python-pyparsing")
e0669289 3256 (version "2.0.3")
15bfe6d6
FB
3257 (source
3258 (origin
3259 (method url-fetch)
de67e922
LF
3260 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3261 "/pyparsing-" version
15bfe6d6
FB
3262 "/pyparsing-" version ".tar.gz"))
3263 (sha256
3264 (base32
e0669289 3265 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3266 (build-system python-build-system)
3267 (outputs '("out" "doc"))
3268 (arguments
3269 `(#:tests? #f ; no test target
3270 #:modules ((guix build python-build-system)
3271 (guix build utils))
3272 #:phases
3273 (alist-cons-after
3274 'install 'install-doc
3275 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3276 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3277 "/share/doc/" ,name "-" ,version))
3278 (html-doc (string-append doc "/html"))
3279 (examples (string-append doc "/examples")))
3280 (mkdir-p html-doc)
3281 (mkdir-p examples)
89b5c60e 3282 (for-each
15bfe6d6 3283 (lambda (dir tgt)
89b5c60e 3284 (map (lambda (file)
96c46210 3285 (install-file file tgt))
15bfe6d6
FB
3286 (find-files dir ".*")))
3287 (list "docs" "htmldoc" "examples")
3288 (list doc html-doc examples))))
3289 %standard-phases)))
3290 (home-page "http://pyparsing.wikispaces.com")
3291 (synopsis "Python parsing class library")
3292 (description
3293 "The pyparsing module is an alternative approach to creating and
3294executing simple grammars, vs. the traditional lex/yacc approach, or the use
3295of regular expressions. The pyparsing module provides a library of classes
3296that client code uses to construct the grammar directly in Python code.")
bd3fa666 3297 (license license:expat)))
15bfe6d6
FB
3298
3299(define-public python2-pyparsing
3300 (package-with-python2 python-pyparsing))
3301
ec00de35
FB
3302(define-public python-numpydoc
3303 (package
3304 (name "python-numpydoc")
3305 (version "0.5")
3306 (source
3307 (origin
3308 (method url-fetch)
89b5c60e 3309 (uri (string-append
ec00de35
FB
3310 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3311 version ".tar.gz"))
3312 (sha256
3313 (base32
5e4d8f67
AE
3314 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3315 (modules '((guix build utils)))
3316 (snippet
3317 '(begin
3318 ;; Drop a test requiring matplotlib, which we cannot add as an
3319 ;; input since it would create a circular dependency: Extend the
3320 ;; test for Python 3, where it is already dropped, to Python 2.
3321 (substitute* "numpydoc/tests/test_plot_directive.py"
3322 (("3") "2"))))))
ec00de35 3323 (build-system python-build-system)
328bb95d 3324 (native-inputs
f3b98f4f 3325 `(("python-docutils" ,python-docutils)
ec00de35
FB
3326 ("python-sphinx" ,python-sphinx)
3327 ("python-nose" ,python-nose)))
3328 (home-page "https://pypi.python.org/pypi/numpydoc")
3329 (synopsis
3330 "Numpy's Sphinx extensions")
3331 (description
3332 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3333 (license license:bsd-2)))
ec00de35
FB
3334
3335(define-public python2-numpydoc
5e4d8f67 3336 (package-with-python2 python-numpydoc))
1c65314c 3337
1e656049
RW
3338(define-public python-numexpr
3339 (package
3340 (name "python-numexpr")
26112c0a 3341 (version "2.6.0")
1e656049
RW
3342 (source
3343 (origin
3344 (method url-fetch)
26112c0a 3345 (uri (pypi-uri "numexpr" version))
1e656049
RW
3346 (sha256
3347 (base32
26112c0a 3348 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3349 (build-system python-build-system)
3350 (arguments `(#:tests? #f)) ; no tests included
3351 (propagated-inputs
3352 `(("python-numpy" ,python-numpy)))
3353 (home-page "https://github.com/pydata/numexpr")
3354 (synopsis "Fast numerical expression evaluator for NumPy")
3355 (description
3356 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3357expressions that operate on arrays are accelerated and use less memory than
3358doing the same calculation in Python. In addition, its multi-threaded
3359capabilities can make use of all your cores, which may accelerate
3360computations, most specially if they are not memory-bounded (e.g. those using
3361transcendental functions).")
f210e944 3362 (license license:expat)))
1e656049
RW
3363
3364(define-public python2-numexpr
f210e944 3365 (package-with-python2 python-numexpr))
1e656049 3366
1c65314c
FB
3367(define-public python-matplotlib
3368 (package
3369 (name "python-matplotlib")
1bbc659f 3370 (version "1.4.3")
1c65314c
FB
3371 (source
3372 (origin
3373 (method url-fetch)
de67e922
LF
3374 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3375 "/matplotlib-" version
1c65314c
FB
3376 "/matplotlib-" version ".tar.gz"))
3377 (sha256
3378 (base32
1bbc659f 3379 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3380 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3381 (build-system python-build-system)
3382 (outputs '("out" "doc"))
25f9a068
FB
3383 (propagated-inputs ; the following packages are all needed at run time
3384 `(("python-pyparsing" ,python-pyparsing)
3385 ("python-pygobject" ,python-pygobject)
3386 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3387 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3388 ("python-dateutil" ,python-dateutil-2)
3389 ("python-numpy" ,python-numpy-bootstrap)
3390 ("python-pillow" ,python-pillow)
3391 ("python-pytz" ,python-pytz)
3392 ("python-six" ,python-six)
25f9a068
FB
3393 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3394 ;; from 'gtk+') provides the required 'typelib' files used by
3395 ;; 'gobject-introspection'. The location of these files is set with the
3396 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3397 ;; is done automatically by a 'native-search-path' procedure. However,
3398 ;; at run-time the user must set this variable as follows:
3399 ;;
3400 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3401 ("gtk+" ,gtk+)
3402 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3403 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3404 ;; object. For this reason we need to import both libraries.
3405 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3406 ("python-pycairo" ,python-pycairo)
3407 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3408 (inputs
ca33a3ad 3409 `(("libpng" ,libpng)
1c65314c
FB
3410 ("imagemagick" ,imagemagick)
3411 ("freetype" ,freetype)
25f9a068
FB
3412 ("cairo" ,cairo)
3413 ("glib" ,glib)
1c65314c 3414 ;; FIXME: Add backends when available.
1c65314c
FB
3415 ;("python-wxpython" ,python-wxpython)
3416 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3417 ("tcl" ,tcl)
3418 ("tk" ,tk)))
1c65314c
FB
3419 (native-inputs
3420 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3421 ("python-sphinx" ,python-sphinx)
3422 ("python-numpydoc" ,python-numpydoc)
3423 ("python-nose" ,python-nose)
3424 ("python-mock" ,python-mock)
1c65314c
FB
3425 ("texlive" ,texlive)
3426 ("texinfo" ,texinfo)))
3427 (arguments
3428 `(#:phases
25f9a068
FB
3429 (alist-cons-before
3430 'build 'configure-environment
3431 (lambda* (#:key outputs inputs #:allow-other-keys)
3432 (let ((cairo (assoc-ref inputs "cairo"))
3433 (gtk+ (assoc-ref inputs "gtk+")))
3434 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3435 ;; has not effect.
25f9a068
FB
3436 (setenv "LD_LIBRARY_PATH"
3437 (string-append cairo "/lib:" gtk+ "/lib"))
3438 (setenv "HOME" (getcwd))
3439 (call-with-output-file "setup.cfg"
3440 (lambda (port)
1bbc659f
FB
3441 (format port "[directories]~%
3442basedirlist = ~a,~a~%
57b7b8cd 3443 [rc_options]~%
1bbc659f
FB
3444backend = TkAgg~%"
3445 (assoc-ref inputs "tcl")
3446 (assoc-ref inputs "tk"))))))
25f9a068
FB
3447 (alist-cons-after
3448 'install 'install-doc
ca33a3ad 3449 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3450 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3451 (doc (string-append data "/doc/" ,name "-" ,version))
3452 (info (string-append data "/info"))
3453 (html (string-append doc "/html")))
ca33a3ad
HG
3454 ;; Make installed package available for building the
3455 ;; documentation
3456 (add-installed-pythonpath inputs outputs)
25f9a068 3457 (with-directory-excursion "doc"
25f9a068
FB
3458 ;; Produce pdf in 'A4' format.
3459 (substitute* (find-files "." "conf\\.py")
3460 (("latex_paper_size = 'letter'")
3461 "latex_paper_size = 'a4'"))
3462 (mkdir-p html)
3463 (mkdir-p info)
3464 ;; The doc recommends to run the 'html' target twice.
3465 (system* "python" "make.py" "html")
3466 (system* "python" "make.py" "html")
18b31516 3467 (copy-recursively "build/html" html)
25f9a068
FB
3468 (system* "python" "make.py" "latex")
3469 (system* "python" "make.py" "texinfo")
18b31516
FB
3470 (symlink (string-append html "/_images")
3471 (string-append info "/matplotlib-figures"))
3472 (with-directory-excursion "build/texinfo"
3473 (substitute* "matplotlib.texi"
3474 (("@image\\{([^,]*)" all file)
3475 (string-append "@image{matplotlib-figures/" file)))
3476 (symlink (string-append html "/_images")
3477 "./matplotlib-figures")
3478 (system* "makeinfo" "--no-split"
3479 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3480 (copy-file "build/texinfo/matplotlib.info"
3481 (string-append info "/matplotlib.info"))
3482 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3483 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3484 %standard-phases))))
1c65314c
FB
3485 (home-page "http://matplotlib.org")
3486 (synopsis "2D plotting library for Python")
3487 (description
3488 "Matplotlib is a Python 2D plotting library which produces publication
3489quality figures in a variety of hardcopy formats and interactive environments
3490across platforms. Matplotlib can be used in Python scripts, the python and
3491ipython shell, web application servers, and six graphical user interface
3492toolkits.")
3f641af0 3493 (license license:psfl)
57b7b8cd 3494 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3495
764c077b 3496(define-public python2-matplotlib
57b7b8cd
LC
3497 (let ((matplotlib (package-with-python2
3498 (strip-python2-variant python-matplotlib))))
764c077b 3499 (package (inherit matplotlib)
88c26834
AE
3500 ;; Make sure to use special packages for Python 2 instead
3501 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3502 (propagated-inputs
7ca0dbc3 3503 `(("python2-pycairo" ,python2-pycairo)
764c077b 3504 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3505 ("python2-tkinter" ,python-2 "tk")
3506 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3507 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3508
0dde6232
RW
3509(define-public python2-pysnptools
3510 (package
3511 (name "python2-pysnptools")
a800018e 3512 (version "0.3.9")
0dde6232
RW
3513 (source
3514 (origin
3515 (method url-fetch)
3f2e9675 3516 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3517 (sha256
3518 (base32
a800018e 3519 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3520 (build-system python-build-system)
3521 (arguments
3522 `(#:python ,python-2)) ; only Python 2.7 is supported
3523 (propagated-inputs
3524 `(("python2-numpy" ,python2-numpy)
3525 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3526 ("python2-pandas" ,python2-pandas)))
3527 (native-inputs
3528 `(("python2-cython" ,python2-cython)))
0dde6232 3529 (native-inputs
f3b98f4f 3530 `(("unzip" ,unzip)))
0dde6232
RW
3531 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3532 (synopsis "Library for reading and manipulating genetic data")
3533 (description
3534 "PySnpTools is a library for reading and manipulating genetic data. It
3535can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3536those files. It can also efficiently manipulate ranges of integers using set
3537operators such as union, intersection, and difference.")
3f641af0 3538 (license license:asl2.0)))
0dde6232 3539
c9b1b4f9
RW
3540(define-public python-rpy2
3541 (package
3542 (name "python-rpy2")
ec3bcbc7 3543 (version "2.7.6")
c9b1b4f9
RW
3544 (source
3545 (origin
3546 (method url-fetch)
ec3bcbc7 3547 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3548 (sha256
3549 (base32
ec3bcbc7 3550 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3551 (build-system python-build-system)
482d9591
HG
3552 (propagated-inputs
3553 `(("python-six" ,python-six)))
c9b1b4f9 3554 (inputs
482d9591 3555 `(("readline" ,readline)
c9b1b4f9
RW
3556 ("icu4c" ,icu4c)
3557 ("pcre" ,pcre)
3558 ("r" ,r)))
3559 (native-inputs
f3b98f4f 3560 `(("zlib" ,zlib)))
c9b1b4f9
RW
3561 (home-page "http://rpy.sourceforge.net/")
3562 (synopsis "Python interface to the R language")
3563 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3564low-level interface to R from Python, a proposed high-level interface,
3565including wrappers to graphical libraries, as well as R-like structures and
3566functions.")
3f641af0 3567 (license license:gpl3+)))
c9b1b4f9
RW
3568
3569(define-public python2-rpy2
3570 (let ((rpy2 (package-with-python2 python-rpy2)))
3571 (package (inherit rpy2)
3572 (native-inputs
3573 `(("python2-singledispatch" ,python2-singledispatch)
3574 ,@(package-native-inputs rpy2))))))
3575
bb986599
FB
3576(define-public python-scipy
3577 (package
3578 (name "python-scipy")
ba8a0824 3579 (version "0.16.0")
bb986599
FB
3580 (source
3581 (origin
3582 (method url-fetch)
de67e922
LF
3583; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3584 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3585 "/scipy-" version ".tar.xz"))
bb986599
FB
3586 (sha256
3587 (base32
ba8a0824 3588 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3589 (build-system python-build-system)
dd86c0d1 3590 (propagated-inputs
bb986599
FB
3591 `(("python-numpy" ,python-numpy)
3592 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3593 ("python-pyparsing" ,python-pyparsing)))
3594 (inputs
3595 `(("lapack" ,lapack)
719b01c1 3596 ("openblas" ,openblas)))
bb986599 3597 (native-inputs
dd86c0d1
RW
3598 `(("python-nose" ,python-nose)
3599 ("python-sphinx" ,python-sphinx)
5248d49e 3600 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3601 ("gfortran" ,gfortran)
bb986599
FB
3602 ("texlive" ,texlive)
3603 ("perl" ,perl)))
3604 (outputs '("out" "doc"))
3605 (arguments
3606 `(#:phases
3607 (alist-cons-before
719b01c1 3608 'build 'configure-openblas
bb986599 3609 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3610 (call-with-output-file "site.cfg"
3611 (lambda (port)
3612 (format port
3613 "[blas]
3614libraries = openblas
3615library_dirs = ~a/lib
3616include_dirs = ~a/include
3617[atlas]
3618library_dirs = ~a/lib
3619atlas_libs = openblas
3620"
3621 (assoc-ref inputs "openblas")
3622 (assoc-ref inputs "openblas")
3623 (assoc-ref inputs "openblas"))))
3624 #t)
bb986599
FB
3625 (alist-cons-after
3626 'install 'install-doc
3627 (lambda* (#:key outputs #:allow-other-keys)
3628 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3629 (doc (string-append data "/doc/" ,name "-" ,version))
3630 (html (string-append doc "/html"))
3631 (pyver ,(string-append "PYVER=")))
3632 (with-directory-excursion "doc"
bb986599
FB
3633 ;; Fix generation of images for mathematical expressions.
3634 (substitute* (find-files "source" "conf\\.py")
3635 (("pngmath_use_preview = True")
3636 "pngmath_use_preview = False"))
3637 (mkdir-p html)
3638 (system* "make" "html" pyver)
3639 (system* "make" "latex" "PAPER=a4" pyver)
3640 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3641 (copy-file "build/latex/scipy-ref.pdf"
3642 (string-append doc "/scipy-ref.pdf"))
3643 (with-directory-excursion "build/html"
3644 (for-each (lambda (file)
3645 (let* ((dir (dirname file))
3646 (tgt-dir (string-append html "/" dir)))
96c46210 3647 (install-file file html)))
bb986599
FB
3648 (find-files "." ".*"))))))
3649 ;; Tests can only be run after the library has been installed and not
3650 ;; within the source directory.
3651 (alist-cons-after
3652 'install 'check
89b5c60e 3653 (lambda _
bb986599
FB
3654 (with-directory-excursion "/tmp"
3655 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3656 (alist-delete
3657 'check
4f9ff21e
RW
3658 (alist-cons-after
3659 'unpack 'fix-tests
3660 (lambda _
3661 (substitute* "scipy/integrate/tests/test_quadpack.py"
3662 (("libm.so") "libm.so.6"))
3663 #t)
3664 %standard-phases)))))))
bb986599
FB
3665 (home-page "http://www.scipy.org/")
3666 (synopsis "The Scipy library provides efficient numerical routines")
3667 (description "The SciPy library is one of the core packages that make up
3668the SciPy stack. It provides many user-friendly and efficient numerical
3669routines such as routines for numerical integration and optimization.")
3f641af0 3670 (license license:bsd-3)))
bb986599 3671
764c077b 3672(define-public python2-scipy
57b7b8cd 3673 (package-with-python2 python-scipy))
bb986599 3674
73acc193 3675(define-public python-socksipy-branch
3676 (package
3677 (name "python-socksipy-branch")
3678 (version "1.01")
3679 (source
3680 (origin
3681 (method url-fetch)
3682 (uri (pypi-uri "SocksiPy-branch" version))
3683 (sha256
3684 (base32
3685 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3686 (build-system python-build-system)
3687 (arguments
3688 `(#:tests? #f)) ; There are no tests
3689 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3690 (synopsis "Python SOCKS module")
3691 (description
3692 "SocksiPy - A Python SOCKS client module. It provides a
3693socket-like interface that supports connections to any TCP
3694service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3695The original version was developed by Dan Haim, this is a
3696branch created by Mario Vilas to address some open issues,
3697as the original project seems to have been abandoned circa 2007.")
3698 (license license:bsd-3)))
3699
3700(define-public python2-socksipy-branch
3701 (package-with-python2 python-socksipy-branch))
3702
94914805
EB
3703(define-public python-sqlalchemy
3704 (package
3705 (name "python-sqlalchemy")
a4ba286b 3706 (version "1.0.12")
94914805
EB
3707 (source
3708 (origin
3709 (method url-fetch)
3710 (uri (string-append "https://pypi.python.org/packages/source/S/"
3711 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3712 (sha256
3713 (base32
a4ba286b 3714 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3715 (build-system python-build-system)
3716 (native-inputs
3717 `(("python-cython" ,python-cython) ;for c extensions
3718 ("python-pytest" ,python-pytest)
3719 ("python-mock" ,python-mock))) ;for tests
3720 (arguments
3721 `(#:phases (alist-replace
3722 'check
3723 (lambda _ (zero? (system* "py.test")))
3724 %standard-phases)))
3725 (home-page "http://www.sqlalchemy.org")
3726 (synopsis "Database abstraction library")
3727 (description
3728 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3729gives application developers the full power and flexibility of SQL. It
3730provides a full suite of well known enterprise-level persistence patterns,
3731designed for efficient and high-performing database access, adapted into a
3732simple and Pythonic domain language.")
3f641af0 3733 (license license:x11)))
94914805
EB
3734
3735(define-public python2-sqlalchemy
3736 (package-with-python2 python-sqlalchemy))
c937562e 3737
4a093330
DM
3738(define-public python-pycodestyle
3739 (package
3740 (name "python-pycodestyle")
3741 (version "2.0.0")
3742 (source
3743 (origin
3744 (method url-fetch)
3745 (uri (pypi-uri "pycodestyle" version))
3746 (sha256
3747 (base32
3748 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3749 (build-system python-build-system)
3750 (home-page "https://pycodestyle.readthedocs.io/")
3751 (synopsis "Python style guide checker")
3752 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3753Python code against some of the style conventions in
3754@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3755 (license license:expat)))
4a093330
DM
3756
3757(define-public python2-pycodestyle
f210e944 3758 (package-with-python2 python-pycodestyle))
b91912c4
DM
3759
3760(define-public python-orderedmultidict
3761 (package
3762 (name "python-orderedmultidict")
3763 (version "0.7.10")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "orderedmultidict" version))
3768 (sha256
3769 (base32
3770 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3771 (build-system python-build-system)
3772 (arguments
3773 `(#:phases
3774 (modify-phases %standard-phases
3775 (add-after 'unpack 'fix-tests
3776 (lambda _
3777 ;; The package uses nosetest for running the tests.
3778 ;; Adding this initfile allows to run the test suite
3779 ;; without requiring nosetest.
3780 (zero? (system* "touch" "tests/__init__.py")))))))
3781 (propagated-inputs
3782 `(("python-six" ,python-six)))
3783 (native-inputs
3784 `(("python-pycodestyle" ,python-pycodestyle)))
3785 (home-page "https://github.com/gruns/orderedmultidict")
3786 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3787 (description "This package contains a library for ordered multivalue
3788dictionaries. A multivalue dictionary is a dictionary that can store
3789multiple values for the same key. An ordered multivalue dictionary is a
3790multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3791 (license license:unlicense)))
b91912c4
DM
3792
3793(define-public python2-orderedmultidict
f210e944 3794 (package-with-python2 python-orderedmultidict))
9dede065
DM
3795
3796(define-public python-furl
3797 (package
3798 (name "python-furl")
3799 (version "0.5.6")
3800 (source
3801 (origin
3802 (method url-fetch)
3803 (uri (pypi-uri "furl" version))
3804 (sha256
3805 (base32
3806 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3807 (build-system python-build-system)
3808 (propagated-inputs
3809 `(("python-six" ,python-six)
3810 ("python-orderedmultidict" ,python-orderedmultidict)))
3811 (native-inputs
3812 `(("python-pycodestyle" ,python-pycodestyle)))
3813 (home-page "https://github.com/gruns/furl")
3814 (synopsis "URL manipulation in Python")
3815 (description "Furl provides an easy-to-use alternative to the
3816@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3817 (license license:unlicense)))
9dede065
DM
3818
3819(define-public python2-furl
f210e944 3820 (package-with-python2 python-furl))
462bf271
DM
3821
3822(define-public python-flask-babel
3823 (package
3824 (name "python-flask-babel")
3825 (version "0.11.1")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "Flask-Babel" version))
3830 (sha256
3831 (base32
3832 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3833 (build-system python-build-system)
3834 (propagated-inputs
3835 `(("python-flask" ,python-flask)
3836 ("python-babel" ,python-babel)
3837 ("python-jinja2" ,python-jinja2)
3838 ("python-pytz" ,python-pytz)))
3839 (home-page "https://github.com/python-babel/flask-babel")
3840 (synopsis "Add i18n/l10n support to Flask applications")
3841 (description "This package implements internationalization and localization
3842support for Flask. This is based on the Python babel module as well as pytz -
3843both of which are installed automatically if you install this library.")
f210e944 3844 (license license:bsd-3)))
462bf271
DM
3845
3846(define-public python2-flask-babel
f210e944 3847 (package-with-python2 python-flask-babel))
4a093330 3848
de2966cf
EF
3849(define-public python-sqlalchemy-utils
3850 (package
3851 (name "python-sqlalchemy-utils")
3852 (version "0.32.9")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "SQLAlchemy-Utils" version))
3857 (sha256
3858 (base32
3859 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3860 (build-system python-build-system)
c22b4f87 3861 (propagated-inputs
de2966cf
EF
3862 `(("python-six" ,python-six)
3863 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3864 (native-inputs
3865 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3866 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3867 (synopsis "Various utility functions for SQLAlchemy")
3868 (description
3869 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
3870for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3871
3872You might also want to install the following optional dependencies:
3873@enumerate
3874@item @code{python-passlib}
3875@item @code{python-babel}
3876@item @code{python-cryptography}
3877@item @code{python-pytz}
3878@item @code{python-psycopg2}
3879@item @code{python-furl}
3880@item @code{python-flask-babel}
3881@end enumerate
3882")
de2966cf
EF
3883 (license license:bsd-3)))
3884
3885(define-public python2-sqlalchemy-utils
f210e944 3886 (package-with-python2 python-sqlalchemy-utils))
de2966cf 3887
af5a4602
CAW
3888(define-public python-alembic
3889 (package
3890 (name "python-alembic")
bb484529 3891 (version "0.8.7")
af5a4602
CAW
3892 (source
3893 (origin
3894 (method url-fetch)
3895 (uri (pypi-uri "alembic" version))
3896 (sha256
3897 (base32
bb484529 3898 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3899 (build-system python-build-system)
3900 (native-inputs
3901 `(("python-mock" ,python-mock)
3902 ("python-pytest-cov" ,python-pytest-cov)))
3903 (propagated-inputs
3904 `(("python-sqlalchemy" ,python-sqlalchemy)
3905 ("python-mako" ,python-mako)
3906 ("python-editor" ,python-editor)))
3907 (home-page "http://bitbucket.org/zzzeek/alembic")
3908 (synopsis
3909 "Database migration tool for SQLAlchemy")
3910 (description
3911 "Alembic is a lightweight database migration tool for usage with the
3912SQLAlchemy Database Toolkit for Python.")
f210e944 3913 (license license:expat)))
af5a4602
CAW
3914
3915(define-public python2-alembic
f210e944 3916 (package-with-python2 python-alembic))
af5a4602 3917
1671c07c
EB
3918(define-public python-distutils-extra
3919 (package
3920 (name "python-distutils-extra")
3921 (version "2.38")
3922 (source
3923 (origin
3924 (method url-fetch)
3925 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3926 version "/+download/python-distutils-extra-"
3927 version ".tar.gz"))
3928 (sha256
3929 (base32
3930 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3931 (build-system python-build-system)
1671c07c
EB
3932 (home-page "https://launchpad.net/python-distutils-extra/")
3933 (synopsis "Enhancements to Python's distutils")
3934 (description
3935 "The python-distutils-extra module enables you to easily integrate
3936gettext support, themed icons, and scrollkeeper-based documentation into
3937Python's distutils.")
3f641af0 3938 (license license:gpl2)))
1671c07c
EB
3939
3940(define-public python2-distutils-extra
3941 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3942
3943(define-public python2-elib.intl
3944 (package
3945 (name "python2-elib.intl")
3946 (version "0.0.3")
3947 (source
3948 (origin
3949 ;; This project doesn't tag releases or publish tarballs, so we take
3950 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3951 (method git-fetch)
3952 (uri (git-reference
3953 (url "https://github.com/dieterv/elib.intl.git")
3954 (commit "d09997cfef")))
3955 (sha256
3956 (base32
3957 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3958 (build-system python-build-system)
ea5456c8
EB
3959 (arguments
3960 ;; incompatible with Python 3 (exception syntax)
3961 `(#:python ,python-2
b41a05ce 3962 #:tests? #f))
ea5456c8
EB
3963 (home-page "https://github.com/dieterv/elib.intl")
3964 (synopsis "Enhanced internationalization for Python")
3965 (description
3966 "The elib.intl module provides enhanced internationalization (I18N)
3967services for your Python modules and applications.")
3f641af0 3968 (license license:lgpl3+)))
ea5456c8 3969
c937562e
EB
3970(define-public python-pillow
3971 (package
3972 (name "python-pillow")
aba5182c 3973 (version "3.3.3")
c937562e
EB
3974 (source
3975 (origin
3976 (method url-fetch)
f1d9231d 3977 (uri (pypi-uri "Pillow" version))
c937562e
EB
3978 (sha256
3979 (base32
aba5182c 3980 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
3981 (build-system python-build-system)
3982 (native-inputs
f3b98f4f 3983 `(("python-nose" ,python-nose)))
c937562e 3984 (inputs
5ff408d9
SB
3985 `(("freetype" ,freetype)
3986 ("lcms" ,lcms)
c937562e
EB
3987 ("zlib" ,zlib)
3988 ("libjpeg" ,libjpeg)
3989 ("openjpeg" ,openjpeg)
5ff408d9
SB
3990 ("libtiff" ,libtiff)
3991 ("libwebp" ,libwebp)))
f54d6bac 3992 ;; Note: setuptools used at runtime for pkg_resources
c937562e 3993 (arguments
e5358a6b 3994 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
3995 (add-after
3996 'install 'check-installed
6151120a 3997 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
3998 (begin
3999 (setenv "HOME" (getcwd))
6151120a
HG
4000 ;; Make installed package available for running the
4001 ;; tests
4002 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4003 (and (zero? (system* "python" "selftest.py"
4004 "--installed"))
4005 (zero? (system* "python" "test-installed.py"))))))
4006 (delete 'check))))
c937562e
EB
4007 (home-page "https://pypi.python.org/pypi/Pillow")
4008 (synopsis "Fork of the Python Imaging Library")
4009 (description
4010 "The Python Imaging Library adds image processing capabilities to your
4011Python interpreter. This library provides extensive file format support, an
4012efficient internal representation, and fairly powerful image processing
4013capabilities. The core image library is designed for fast access to data
4014stored in a few basic pixel formats. It should provide a solid foundation for
4015a general image processing tool.")
3f641af0 4016 (license (license:x11-style
c937562e
EB
4017 "http://www.pythonware.com/products/pil/license.htm"
4018 "The PIL Software License"))))
4019
4020(define-public python2-pillow
4021 (package-with-python2 python-pillow))
bb986599 4022
a415f036
FB
4023(define-public python-pycparser
4024 (package
4025 (name "python-pycparser")
38eb6919 4026 (version "2.14")
a415f036
FB
4027 (source
4028 (origin
4029 (method url-fetch)
38eb6919 4030 (uri (pypi-uri "pycparser" version))
a415f036
FB
4031 (sha256
4032 (base32
38eb6919 4033 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4034 (outputs '("out" "doc"))
4035 (build-system python-build-system)
4036 (native-inputs
f3b98f4f 4037 `(("pkg-config" ,pkg-config)))
a415f036 4038 (arguments
89b5c60e 4039 `(#:phases
a415f036
FB
4040 (alist-replace
4041 'check
4042 (lambda _
4043 (with-directory-excursion "tests"
4044 (zero? (system* "python" "all_tests.py"))))
4045 (alist-cons-after
4046 'install 'install-doc
4047 (lambda* (#:key outputs #:allow-other-keys)
4048 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4049 (doc (string-append data "/doc/" ,name "-" ,version))
4050 (examples (string-append doc "/examples")))
4051 (mkdir-p examples)
4052 (for-each (lambda (file)
4053 (copy-file (string-append "." file)
4054 (string-append doc file)))
4055 '("/README.rst" "/CHANGES" "/LICENSE"))
4056 (copy-recursively "examples" examples)))
4057 %standard-phases))))
4058 (home-page "https://github.com/eliben/pycparser")
4059 (synopsis "C parser in Python")
4060 (description
4061 "Pycparser is a complete parser of the C language, written in pure Python
4062using the PLY parsing library. It parses C code into an AST and can serve as
4063a front-end for C compilers or analysis tools.")
3f641af0 4064 (license license:bsd-3)))
a415f036
FB
4065
4066(define-public python2-pycparser
4067 (package-with-python2 python-pycparser))
57c3f716
FB
4068
4069(define-public python-cffi
4070 (package
4071 (name "python-cffi")
2d3a437c 4072 (version "1.4.2")
57c3f716
FB
4073 (source
4074 (origin
4075 (method url-fetch)
2d3a437c 4076 (uri (pypi-uri "cffi" version))
89b5c60e 4077 (sha256
2d3a437c 4078 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4079 (build-system python-build-system)
4080 (outputs '("out" "doc"))
4081 (inputs
4082 `(("libffi" ,libffi)))
4083 (propagated-inputs ; required at run-time
4084 `(("python-pycparser" ,python-pycparser)))
4085 (native-inputs
4086 `(("pkg-config" ,pkg-config)
4087 ("python-sphinx" ,python-sphinx)
f3b98f4f 4088 ("python-pytest" ,python-pytest)))
57c3f716 4089 (arguments
4179f952 4090 `(#:phases
57c3f716
FB
4091 (alist-cons-after
4092 'install 'install-doc
4093 (lambda* (#:key outputs #:allow-other-keys)
4094 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4095 (doc (string-append data "/doc/" ,name "-" ,version))
4096 (html (string-append doc "/html")))
4097 (with-directory-excursion "doc"
4098 (system* "make" "html")
4099 (mkdir-p html)
4100 (copy-recursively "build/html" html))
4101 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4102 %standard-phases)))
4103 (home-page "http://cffi.readthedocs.org")
4104 (synopsis "Foreign function interface for Python")
4105 (description
4106 "Foreign Function Interface for Python calling C code.")
bd3fa666 4107 (license license:expat)))
57c3f716
FB
4108
4109(define-public python2-cffi
4110 (package-with-python2 python-cffi))
6fa14469
FB
4111
4112(define-public python-xcffib
4113 (package
4114 (name "python-xcffib")
4115 (version "0.1.9")
4116 (source
4117 (origin
4118 (method url-fetch)
4119 (uri (string-append "https://pypi.python.org/packages/source/x/"
4120 "xcffib/xcffib-" version ".tar.gz"))
4121 (sha256
4122 (base32
4123 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4124 (build-system python-build-system)
4125 (inputs
482d9591 4126 `(("libxcb" ,libxcb)))
6fa14469 4127 (propagated-inputs
482d9591
HG
4128 `(("python-cffi" ,python-cffi) ; used at run time
4129 ("python-six" ,python-six)))
6fa14469 4130 (arguments
89b5c60e 4131 `(#:phases
6fa14469
FB
4132 (alist-cons-after
4133 'install 'install-doc
4134 (lambda* (#:key outputs #:allow-other-keys)
4135 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4136 "/doc/" ,name "-" ,version)))
4137 (mkdir-p doc)
4138 (copy-file "README.md"
4139 (string-append doc "/README.md"))))
4140 %standard-phases)))
4141 (home-page "https://github.com/tych0/xcffib")
4142 (synopsis "XCB Python bindings")
4143 (description
4144 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4145support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4146 (license license:expat)))
6fa14469
FB
4147
4148(define-public python2-xcffib
4149 (package-with-python2 python-xcffib))
4150
9e099723
FB
4151(define-public python-cairocffi
4152 (package
4153 (name "python-cairocffi")
4154 (version "0.6")
4155 (source
4156 (origin
4157 (method url-fetch)
4158 ;; The archive on pypi is missing the 'utils' directory!
4159 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4160 version ".tar.gz"))
f586c877 4161 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4162 (sha256
4163 (base32
4164 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4165 (build-system python-build-system)
4166 (outputs '("out" "doc"))
4167 (inputs
4168 `(("gdk-pixbuf" ,gdk-pixbuf)
4169 ("cairo" ,cairo)))
4170 (native-inputs
4171 `(("pkg-config" ,pkg-config)
4172 ("python-sphinx" ,python-sphinx)
f3b98f4f 4173 ("python-docutils" ,python-docutils)))
9e099723
FB
4174 (propagated-inputs
4175 `(("python-xcffib" ,python-xcffib))) ; used at run time
4176 (arguments
89b5c60e 4177 `(#:phases
9e099723
FB
4178 (alist-cons-after
4179 'install 'install-doc
4180 (lambda* (#:key inputs outputs #:allow-other-keys)
4181 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4182 (doc (string-append data "/doc/" ,name "-" ,version))
4183 (html (string-append doc "/html")))
89b5c60e 4184 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4185 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4186 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4187 (setenv "LANG" "en_US.UTF-8")
4188 (mkdir-p html)
4189 (for-each (lambda (file)
4190 (copy-file (string-append "." file)
4191 (string-append doc file)))
4192 '("/README.rst" "/CHANGES" "/LICENSE"))
4193 (system* "python" "setup.py" "build_sphinx")
4194 (copy-recursively "docs/_build/html" html)))
4195 %standard-phases)))
4196 (home-page "https://github.com/SimonSapin/cairocffi")
4197 (synopsis "Python bindings and object-oriented API for Cairo")
4198 (description
4199 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4200Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4201graphics library with support for multiple backends including image buffers,
4202PNG, PostScript, PDF, and SVG file output.")
3f641af0 4203 (license license:bsd-3)))
9e099723
FB
4204
4205(define-public python2-cairocffi
4206 (package-with-python2 python-cairocffi))
4207
3cff95cb
RW
4208(define-public python-decorator
4209 (package
4210 (name "python-decorator")
eb6e2e81 4211 (version "4.0.9")
3cff95cb
RW
4212 (source
4213 (origin
4214 (method url-fetch)
e21338be 4215 (uri (pypi-uri "decorator" version))
3cff95cb 4216 (sha256
eb6e2e81 4217 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4218 (build-system python-build-system)
4219 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4220 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4221 (synopsis "Python module to simplify usage of decorators")
4222 (description
4223 "The aim of the decorator module is to simplify the usage of decorators
4224for the average programmer, and to popularize decorators usage giving examples
4225of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4226etc. The core of this module is a decorator factory.")
4227 (license license:expat)))
4228
4229(define-public python2-decorator
4230 (package-with-python2 python-decorator))
4231
2c0499ad
RW
4232(define-public python-drmaa
4233 (package
4234 (name "python-drmaa")
4235 (version "0.7.6")
4236 (source
4237 (origin
4238 (method url-fetch)
4239 (uri (string-append
4240 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4241 version ".tar.gz"))
4242 (sha256
4243 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4244 (build-system python-build-system)
4245 ;; The test suite requires libdrmaa which is provided by the cluster
4246 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4247 ;; should be set to the path of the libdrmaa library.
4248 (arguments '(#:tests? #f))
4249 (native-inputs
f3b98f4f 4250 `(("python-nose" ,python-nose)))
2c0499ad
RW
4251 (home-page "https://pypi.python.org/pypi/drmaa")
4252 (synopsis "Python bindings for the DRMAA library")
4253 (description
4254 "A Python package for Distributed Resource Management (DRM) job
4255submission and control. This package is an implementation of the DRMAA 1.0
4256Python language binding specification.")
3f641af0 4257 (license license:bsd-3)))
2c0499ad
RW
4258
4259(define-public python2-drmaa
4260 (package-with-python2 python-drmaa))
4261
d05c6da0
RW
4262(define-public python-gridmap
4263 (package
4264 (name "python-gridmap")
4265 (version "0.13.0")
4266 (source
4267 (origin
4268 (method url-fetch)
4269 (uri (string-append
4270 "https://github.com/pygridtools/gridmap/archive/v"
4271 version ".tar.gz"))
4272 (file-name (string-append name "-" version ".tar.gz"))
4273 (sha256
4274 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4275 (build-system python-build-system)
f22efa01 4276 (propagated-inputs
d05c6da0
RW
4277 `(("python-psutil" ,python-psutil)
4278 ("python-drmaa" ,python-drmaa)
4279 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4280 (home-page "https://github.com/pygridtools/gridmap")
4281 (synopsis "Create jobs on a cluster directly from Python")
4282 (description
4283 "Gridmap is a Python package to allow you to easily create jobs on the
4284cluster directly from Python. You can directly map Python functions onto the
4285cluster without needing to write any wrapper code yourself.")
3f641af0 4286 (license license:gpl3+)))
d05c6da0
RW
4287
4288(define-public python2-gridmap
4289 (package-with-python2 python-gridmap))
4290
cb6d5c54
RW
4291(define-public python-pexpect
4292 (package
4293 (name "python-pexpect")
4294 (version "3.3")
4295 (source
4296 (origin
4297 (method url-fetch)
4298 (uri (string-append "https://pypi.python.org/packages/source/p/"
4299 "pexpect/pexpect-" version ".tar.gz"))
4300 (sha256
4301 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4302 (build-system python-build-system)
4303 (arguments
4304 `(#:phases
4305 (modify-phases %standard-phases
4306 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4307 (native-inputs
4308 `(("python-nose" ,python-nose)))
4309 (home-page "http://pexpect.readthedocs.org/")
4310 (synopsis "Controlling interactive console applications")
4311 (description
4312 "Pexpect is a pure Python module for spawning child applications;
4313controlling them; and responding to expected patterns in their output.
4314Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4315child application and control it as if a human were typing commands.")
3f641af0 4316 (license license:isc)))
cb6d5c54
RW
4317
4318(define-public python2-pexpect
4319 (package-with-python2 python-pexpect))
4320
229ad120
RW
4321(define-public python-setuptools-scm
4322 (package
4323 (name "python-setuptools-scm")
42d6d0d0 4324 (version "1.11.1")
229ad120
RW
4325 (source (origin
4326 (method url-fetch)
383af6b0 4327 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4328 (sha256
4329 (base32
42d6d0d0 4330 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4331 (build-system python-build-system)
4332 (home-page "https://github.com/pypa/setuptools_scm/")
4333 (synopsis "Manage Python package versions in SCM metadata")
4334 (description
383af6b0 4335 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4336@dfn{software configuration management} (SCM) metadata instead of declaring
4337them as the version argument or in a SCM managed file.")
4338 (license license:expat)))
4339
4340(define-public python2-setuptools-scm
4341 (package-with-python2 python-setuptools-scm))
4342
b74270ee
RW
4343(define-public python-pathpy
4344 (package
4345 (name "python-pathpy")
4346 (version "8.1.1")
4347 (source
4348 (origin
4349 (method url-fetch)
4350 (uri (string-append "https://pypi.python.org/packages/source/p/"
4351 "path.py/path.py-" version ".tar.gz"))
4352 (sha256
4353 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4354 (build-system python-build-system)
4355 (propagated-inputs
4356 `(("python-appdirs" ,python-appdirs)))
4357 (native-inputs
f3b98f4f 4358 `(("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4359 ("python-pytest" ,python-pytest)
4360 ("python-pytest-runner" ,python-pytest-runner)))
4361 (home-page "http://github.com/jaraco/path.py")
4362 (synopsis "Python module wrapper for built-in os.path")
4363 (description
4364 "@code{path.py} implements path objects as first-class entities, allowing
4365common operations on files to be invoked on those path objects directly.")
4366 (license license:expat)))
4367
4368(define-public python2-pathpy
4369 (package-with-python2 python-pathpy))
4370
0d34e01b
RW
4371(define-public python-pickleshare
4372 (package
4373 (name "python-pickleshare")
4374 (version "0.5")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (string-append "https://pypi.python.org/packages/source/p/"
4379 "pickleshare/pickleshare-" version ".tar.gz"))
4380 (sha256
4381 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4382 (build-system python-build-system)
4383 (propagated-inputs
4384 `(("python-pathpy" ,python-pathpy)))
4385 (home-page "https://github.com/vivainio/pickleshare")
4386 (synopsis "Tiny key value database with concurrency support")
4387 (description
4388 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4389Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4390shelve, many processes can access the database simultaneously. Changing a
4391value in database is immediately visible to other processes accessing the same
4392database. Concurrency is possible because the values are stored in separate
4393files. Hence the “database” is a directory where all files are governed by
4394PickleShare.")
4395 (license license:expat)))
4396
4397(define-public python2-pickleshare
4398 (package-with-python2 python-pickleshare))
4399
cd6e5189
RW
4400(define-public python-simplegeneric
4401 (package
4402 (name "python-simplegeneric")
4403 (version "0.8.1")
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri (string-append "https://pypi.python.org/packages/source/s/"
4408 "simplegeneric/simplegeneric-" version ".zip"))
4409 (sha256
4410 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4411 (build-system python-build-system)
4412 (native-inputs
f3b98f4f 4413 `(("unzip" ,unzip)))
cd6e5189
RW
4414 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4415 (synopsis "Python module for simple generic functions")
4416 (description
4417 "The simplegeneric module lets you define simple single-dispatch generic
4418functions, akin to Python’s built-in generic functions like @code{len()},
4419@code{iter()} and so on. However, instead of using specially-named methods,
4420these generic functions use simple lookup tables, akin to those used by
4421e.g. @code{pickle.dump()} and other generic functions found in the Python
4422standard library.")
3f641af0 4423 (license license:zpl2.1)))
cd6e5189
RW
4424
4425(define-public python2-simplegeneric
4426 (package-with-python2 python-simplegeneric))
4427
ddc7d8ed
RW
4428(define-public python-ipython-genutils
4429 (package
4430 (name "python-ipython-genutils")
4431 (version "0.1.0")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (string-append "https://pypi.python.org/packages/source/i/"
4436 "ipython_genutils/ipython_genutils-"
4437 version ".tar.gz"))
4438 (sha256
4439 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4440 (build-system python-build-system)
4441 (arguments `(#:tests? #f)) ; no tests
4442 (home-page "http://ipython.org")
4443 (synopsis "Vestigial utilities from IPython")
4444 (description
4445 "This package provides retired utilities from IPython.")
3f641af0 4446 (license license:bsd-3)))
ddc7d8ed
RW
4447
4448(define-public python2-ipython-genutils
4449 (package-with-python2 python-ipython-genutils))
4450
2b10eb48
RW
4451(define-public python-traitlets
4452 (package
4453 (name "python-traitlets")
a5ba1481 4454 (version "4.2.0")
2b10eb48
RW
4455 (source
4456 (origin
4457 (method url-fetch)
cc0c4fde 4458 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4459 (sha256
4460 (base32
a5ba1481 4461 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4462 (build-system python-build-system)
4463 (arguments
4464 `(#:phases
4465 (modify-phases %standard-phases
4466 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4467 (propagated-inputs
4468 `(("python-ipython-genutils" ,python-ipython-genutils)
4469 ("python-decorator" ,python-decorator)))
4470 (native-inputs
cc0c4fde
EF
4471 `(("python-mock" ,python-mock)
4472 ("python-nose" ,python-nose)))
2b10eb48
RW
4473 (home-page "http://ipython.org")
4474 (synopsis "Configuration system for Python applications")
4475 (description
4476 "Traitlets is a framework that lets Python classes have attributes with
4477type checking, dynamically calculated default values, and ‘on change’
4478callbacks. The package also includes a mechanism to use traitlets for
4479configuration, loading values from files or from command line arguments. This
4480is a distinct layer on top of traitlets, so you can use traitlets in your code
4481without using the configuration machinery.")
3f641af0 4482 (license license:bsd-3)))
2b10eb48
RW
4483
4484(define-public python2-traitlets
4485 (package-with-python2 python-traitlets))
4486
4263b06f
RW
4487(define-public python-jupyter-core
4488 (package
4489 (name "python-jupyter-core")
4490 (version "4.2.0")
4491 (source
4492 (origin
4493 (method url-fetch)
4494 (uri (string-append (pypi-uri "jupyter_core" version)))
4495 (sha256
4496 (base32
4497 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4498 (build-system python-build-system)
4499 ;; FIXME: not sure how to run the tests
4500 (arguments `(#:tests? #f))
4501 (propagated-inputs
4502 `(("python-traitlets" ,python-traitlets)))
4503 (home-page "http://jupyter.org/")
4504 (synopsis "Jupyter base package")
4505 (description
4506 "Jupyter core is the base package on which Jupyter projects rely.")
4507 (license license:bsd-3)))
4508
4509(define-public python2-jupyter-core
4510 (package-with-python2 python-jupyter-core))
4511
9ff01f2d
RW
4512(define-public python-jupyter-client
4513 (package
4514 (name "python-jupyter-client")
4515 (version "4.4.0")
4516 (source
4517 (origin
4518 (method url-fetch)
4519 (uri (pypi-uri "jupyter_client" version))
4520 (sha256
4521 (base32
4522 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4523 (build-system python-build-system)
4524 ;; Tests fail because of missing native python kernel which I assume is
4525 ;; provided by the ipython package, which we cannot use because it would
4526 ;; cause a dependency cycle.
4527 (arguments `(#:tests? #f))
4528 (propagated-inputs
4529 `(("python-pyzmq" ,python-pyzmq)
4530 ("python-traitlets" ,python-traitlets)
4531 ("python-jupyter-core" ,python-jupyter-core)))
4532 (home-page "http://jupyter.org/")
4533 (synopsis "Jupyter protocol implementation and client libraries")
4534 (description
4535 "The @code{jupyter_client} package contains the reference implementation
4536of the Jupyter protocol. It also provides client and kernel management APIs
4537for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4538installing @code{kernelspec}s for use with Jupyter frontends.")
4539 (license license:bsd-3)))
4540
4541(define-public python2-jupyter-client
4542 (package-with-python2 python-jupyter-client))
4543
ab526102
RW
4544(define-public python-ipykernel
4545 (package
4546 (name "python-ipykernel")
4547 (version "4.5.0")
4548 (source
4549 (origin
4550 (method url-fetch)
4551 (uri (pypi-uri "ipykernel" version))
4552 (sha256
4553 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4554 (build-system python-build-system)
4555 ;; The tests load a submodule of IPython. However, IPython itself depends
4556 ;; on ipykernel.
4557 (arguments `(#:tests? #f))
4558 (propagated-inputs
4559 ;; imported at runtime during connect
4560 `(("python-jupyter-client" ,python-jupyter-client)))
4561 (home-page "http://ipython.org")
4562 (synopsis "IPython Kernel for Jupyter")
4563 (description
4564 "This package provides the IPython kernel for Jupyter.")
4565 (license license:bsd-3)))
4566
4567(define-public python2-ipykernel
4568 (package-with-python2 python-ipykernel))
4569
5ff6effc
RW
4570(define-public python-testpath
4571 (package
4572 (name "python-testpath")
4573 (version "0.2")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4578 version ".tar.gz"))
4579 (file-name (string-append name "-" version ".tar.gz"))
4580 (sha256
4581 (base32
4582 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4583 (build-system python-build-system)
4584 (arguments
4585 `(#:tests? #f ; this package does not even have a setup.py
4586 #:phases
4587 (modify-phases %standard-phases
4588 (delete 'install)
4589 (replace 'build
4590 (lambda* (#:key inputs outputs #:allow-other-keys)
4591 (let ((dir (string-append
4592 (assoc-ref outputs "out")
4593 "/lib/python"
4594 (string-take (string-take-right
4595 (assoc-ref inputs "python") 5) 3)
4596 "/site-packages/testpath")))
4597 (mkdir-p dir)
4598 (copy-recursively "testpath" dir))
4599 #t)))))
4600 (home-page "https://github.com/takluyver/testpath")
4601 (synopsis "Test utilities for code working with files and commands")
4602 (description
4603 "Testpath is a collection of utilities for Python code working with files
4604and commands. It contains functions to check things on the filesystem, and
4605tools for mocking system commands and recording calls to those.")
4606 (license license:expat)))
4607
4608(define-public python2-testpath
4609 (package-with-python2 python-testpath))
4610
ae1ab9fe
FB
4611(define-public python-ipython
4612 (package
4613 (name "python-ipython")
accd5f99 4614 (version "4.0.0")
ae1ab9fe
FB
4615 (source
4616 (origin
fceac880 4617 (method url-fetch)
accd5f99 4618 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4619 (sha256
accd5f99 4620 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
ae1ab9fe
FB
4621 (build-system python-build-system)
4622 (outputs '("out" "doc"))
3a0b1b9a
FB
4623 (propagated-inputs
4624 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4625 ("python-terminado" ,python-terminado)
ae1ab9fe 4626 ("python-matplotlib" ,python-matplotlib)
5d26e542 4627 ("python-numpy" ,python-numpy)
ae1ab9fe 4628 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4629 ("python-jinja2" ,python-jinja2)
4630 ("python-mistune" ,python-mistune)
accd5f99
RW
4631 ("python-pexpect" ,python-pexpect)
4632 ("python-pickleshare" ,python-pickleshare)
4633 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4634 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4635 ("python-traitlets" ,python-traitlets)
4636 ("python-ipykernel" ,python-ipykernel)
4637 ("python-pygments" ,python-pygments)))
4638 (inputs
4639 `(("readline" ,readline)
4640 ("which" ,which)))
ae1ab9fe
FB
4641 (native-inputs
4642 `(("pkg-config" ,pkg-config)
accd5f99
RW
4643 ("python-requests" ,python-requests) ;; for tests
4644 ("python-testpath" ,python-testpath)
4645 ("python-nose" ,python-nose)
ae1ab9fe
FB
4646 ("python-sphinx" ,python-sphinx)
4647 ("texlive" ,texlive)
f3b98f4f 4648 ("texinfo" ,texinfo)))
ae1ab9fe 4649 (arguments
89b5c60e 4650 `(#:phases
3a0b1b9a
FB
4651 (modify-phases %standard-phases
4652 (add-after
4653 'install 'install-doc
4654 (lambda* (#:key inputs outputs #:allow-other-keys)
4655 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4656 (doc (string-append data "/doc/" ,name "-" ,version))
4657 (html (string-append doc "/html"))
4658 (man1 (string-append data "/man/man1"))
4659 (info (string-append data "/info"))
4660 (examples (string-append doc "/examples")))
afd3d931 4661 (setenv "LANG" "en_US.utf8")
3a0b1b9a 4662 (with-directory-excursion "docs"
accd5f99
RW
4663 ;; FIXME: pdf fails to build
4664 ;;(system* "make" "pdf" "PAPER=a4")
4665 (system* "make" "html")
3a0b1b9a
FB
4666 (system* "make" "info"))
4667 (copy-recursively "docs/man" man1)
4668 (copy-recursively "examples" examples)
accd5f99 4669 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4670 ;; (copy-file "docs/build/latex/ipython.pdf"
4671 ;; (string-append doc "/ipython.pdf"))
4672 (mkdir-p info)
4673 (copy-file "docs/build/texinfo/ipython.info"
4674 (string-append info "/ipython.info"))
4675 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4676 ;; Tests can only be run after the library has been installed and not
4677 ;; within the source directory.
4678 (delete 'check)
4679 (add-after
4680 'install 'check
4681 (lambda* (#:key outputs tests? #:allow-other-keys)
4682 (if tests?
4683 (with-directory-excursion "/tmp"
4684 (setenv "HOME" "/tmp/") ;; required by a test
4685 (zero? (system* (string-append (assoc-ref outputs "out")
4686 "/bin/iptest"))))
4687 #t)))
4688 (add-before
4689 'install 'fix-tests
4690 (lambda* (#:key inputs #:allow-other-keys)
4691 (substitute* "./IPython/utils/_process_posix.py"
4692 (("/usr/bin/env', 'which") (which "which")))
4693 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4694 (("#!/usr/bin/env python")
4695 (string-append "#!" (which "python"))))
4696 ;; Disable 1 failing test
4697 (substitute* "./IPython/core/tests/test_magic.py"
4698 (("def test_dirops\\(\\):" all)
4699 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4700 (home-page "http://ipython.org")
4701 (synopsis "IPython is a tool for interactive computing in Python")
4702 (description
4703 "IPython provides a rich architecture for interactive computing with:
4704Powerful interactive shells, a browser-based notebook, support for interactive
4705data visualization, embeddable interpreters and tools for parallel
4706computing.")
135ba811
EF
4707 (license license:bsd-3)
4708 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4709
4710(define-public python2-ipython
135ba811 4711 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4712 (package
4713 (inherit ipython)
4714 ;; FIXME: some tests are failing
4715 (arguments
4716 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4717 ;; FIXME: add pyreadline once available.
89b5c60e 4718 (inputs
135ba811
EF
4719 `(("python2-mock" ,python2-mock)
4720 ,@(package-inputs ipython))))))
03411993
AE
4721
4722(define-public python-isodate
4723 (package
4724 (name "python-isodate")
b6785c2e 4725 (version "0.5.4")
03411993
AE
4726 (source
4727 (origin
4728 (method url-fetch)
b6785c2e 4729 (uri (pypi-uri "isodate" version))
03411993
AE
4730 (sha256
4731 (base32
b6785c2e 4732 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4733 (build-system python-build-system)
03411993
AE
4734 (home-page
4735 "http://cheeseshop.python.org/pypi/isodate")
4736 (synopsis
4737 "Python date parser and formatter")
4738 (description
4739 "Python-isodate is a python module for parsing and formatting
4740ISO 8601 dates, time and duration.")
3f641af0 4741 (license license:bsd-3)))
03411993
AE
4742
4743(define-public python2-isodate
4744 (package-with-python2 python-isodate))
673ab897
AE
4745
4746(define-public python-html5lib
4747 (package
4748 (name "python-html5lib")
fee04c19 4749 (version "1.0b8")
673ab897
AE
4750 (source
4751 (origin
4752 (method url-fetch)
fee04c19 4753 (uri (pypi-uri "html5lib" version))
673ab897
AE
4754 (sha256
4755 (base32
fee04c19 4756 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4757 (build-system python-build-system)
3dd75476
AE
4758 (propagated-inputs
4759 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4760 (arguments
4761 `(#:test-target "check"))
4762 (home-page
4763 "https://github.com/html5lib/html5lib-python")
4764 (synopsis
4765 "Python HTML parser based on the WHATWG HTML specifcation")
4766 (description
4767 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4768and written in Python.")
bd3fa666 4769 (license license:expat)))
673ab897
AE
4770
4771(define-public python2-html5lib
4772 (package-with-python2 python-html5lib))
e99f4211 4773
8ee62c97
RW
4774;; Needed for python-bleach, a dependency of python-notebook
4775(define-public python-html5lib-0.9
4776 (package
4777 (inherit python-html5lib)
4778 (version "0.999")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (pypi-uri "html5lib" version))
4783 (sha256
4784 (base32
4785 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4786
4787(define-public python2-html5lib-0.9
4788 (package-with-python2 python-html5lib-0.9))
4789
e99f4211
MW
4790(define-public python-urwid
4791 (package
4792 (name "python-urwid")
51ff41f6 4793 (version "1.3.1")
e99f4211
MW
4794 (source
4795 (origin
4796 (method url-fetch)
b97c1bfd 4797 (uri (pypi-uri "urwid" version))
e99f4211
MW
4798 (sha256
4799 (base32
51ff41f6 4800 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4801 (build-system python-build-system)
b97c1bfd
LF
4802 (arguments
4803 `(#:phases
4804 (modify-phases %standard-phases
4805 ;; Disable failing test. Bug filed upstream:
4806 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4807 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4808 (add-after 'unpack 'disable-failing-test
4809 (lambda _
4810 (substitute* "urwid/tests/test_event_loops.py"
4811 (("test_remove_watch_file")
4812 "disable_remove_watch_file")))))))
e99f4211
MW
4813 (home-page "http://urwid.org")
4814 (synopsis "Console user interface library for Python")
4815 (description
4816 "Urwid is a curses-based UI/widget library for Python. It includes many
4817features useful for text console applications.")
3f641af0 4818 (license license:lgpl2.1+)))
e99f4211
MW
4819
4820(define-public python2-urwid
4821 (package-with-python2 python-urwid))
d95a56c6 4822
47d0b292
TS
4823(define-public python-urwidtrees
4824 (package
4825 (name "python-urwidtrees")
37ec4623 4826 (version "1.0.2")
47d0b292
TS
4827 (source
4828 (origin
4829 (method url-fetch)
37ec4623
TS
4830 ;; package author intends on distributing via github rather than pypi:
4831 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4832 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4833 version ".tar.gz"))
4834 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4835 (sha256
4836 (base32
37ec4623 4837 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4838 (build-system python-build-system)
4839 (arguments
4840 '(#:tests? #f)) ; no tests
f22efa01 4841 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
4842 (home-page "https://github.com/pazz/urwidtrees")
4843 (synopsis "Tree widgets for urwid")
4844 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4845toolkit. Use it to build trees of widgets.")
3f641af0 4846 (license license:gpl3+)))
47d0b292
TS
4847
4848(define-public python2-urwidtrees
4849 (package-with-python2 python-urwidtrees))
4850
d95a56c6
PAR
4851(define-public python-dbus
4852 (package
4853 (name "python-dbus")
4854 (version "1.2.0")
4855 (source
4856 (origin
4857 (method url-fetch)
4858 (uri (string-append
5cc3096c 4859 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4860 version ".tar.gz"))
4861 (sha256
4862 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4863 (build-system gnu-build-system)
6717c879
SB
4864 (arguments
4865 '(#:phases
4866 (modify-phases %standard-phases
4867 (add-before
4868 'check 'pre-check
4869 (lambda _
4870 ;; XXX: For the missing '/etc/machine-id'.
4871 (substitute* "test/run-test.sh"
4872 (("DBUS_FATAL_WARNINGS=1")
4873 "DBUS_FATAL_WARNINGS=0"))
4874 #t)))))
d95a56c6
PAR
4875 (native-inputs
4876 `(("pkg-config" ,pkg-config)))
4877 (inputs
4878 `(("python" ,python)
2e88d113 4879 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4880 (synopsis "Python bindings for D-bus")
4881 (description "python-dbus provides bindings for libdbus, the reference
4882implementation of D-Bus.")
4883 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4884 (license license:expat)))
b52af02b
MW
4885
4886(define-public python2-dbus
4887 (package (inherit python-dbus)
4888 (name "python2-dbus")
4889 (inputs `(("python" ,python-2)
4890 ,@(alist-delete "python"
4891 (package-inputs python-dbus)
4892 equal?)))
4893 ;; FIXME: on Python 2, the test_utf8 fails with:
4894 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4895 (arguments `(#:tests? #f))))
a6ac8332
AE
4896
4897(define-public python-apsw
4898 (package
4899 (name "python-apsw")
917708c2 4900 (version "3.9.2-r1")
a6ac8332
AE
4901 (source
4902 (origin
4903 (method url-fetch)
917708c2 4904 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4905 (sha256
4906 (base32
917708c2 4907 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4908 (build-system python-build-system)
4909 (inputs
f3b98f4f 4910 `(("sqlite" ,sqlite)))
a6ac8332
AE
4911 (arguments
4912 `(#:phases
4913 ;; swap check and install phases
4914 (alist-cons-after
4915 'install 'check
4916 (assoc-ref %standard-phases 'check)
4917 (alist-delete
4918 'check
4919 %standard-phases))))
4920 (home-page "https://github.com/rogerbinns/apsw/")
4921 (synopsis "Another Python SQLite Wrapper")
4922 (description "APSW is a Python wrapper for the SQLite
4923embedded relational database engine. In contrast to other wrappers such as
4924pysqlite it focuses on being a minimal layer over SQLite attempting just to
4925translate the complete SQLite API into Python.")
abde5f37 4926 (license license:zlib)))
a6ac8332
AE
4927
4928(define-public python2-apsw
4929 (package-with-python2 python-apsw))
26b307e2
AE
4930
4931(define-public python-lxml
4932 (package
4933 (name "python-lxml")
d58a3203 4934 (version "3.6.0")
26b307e2
AE
4935 (source
4936 (origin
4937 (method url-fetch)
97bbc480 4938 (uri (pypi-uri "lxml" version))
26b307e2 4939 (sha256
d58a3203
EF
4940 (base32
4941 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4942 (build-system python-build-system)
4943 (inputs
4944 `(("libxml2" ,libxml2)
f3b98f4f 4945 ("libxslt" ,libxslt)))
26b307e2
AE
4946 (home-page "http://lxml.de/")
4947 (synopsis
4948 "Python XML processing library")
4949 (description
4950 "The lxml XML toolkit is a Pythonic binding for the C libraries
4951libxml2 and libxslt.")
3f641af0 4952 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4953
4954(define-public python2-lxml
4955 (package-with-python2 python-lxml))
4ed20663 4956
b32a1e47
CAW
4957;; beautifulsoup4 has a totally different namespace than 3.x,
4958;; and pypi seems to put it under its own name, so I guess we should too
4959(define-public python-beautifulsoup4
4960 (package
4961 (name "python-beautifulsoup4")
67fd4a12 4962 (version "4.5.1")
b32a1e47
CAW
4963 (source
4964 (origin
4965 (method url-fetch)
4966 (uri (pypi-uri "beautifulsoup4" version))
4967 (sha256
4968 (base32
67fd4a12 4969 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 4970 (build-system python-build-system)
5f37f0b6
LF
4971 (arguments
4972 `(#:phases
4973 (modify-phases %standard-phases
4974 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4975 ;; must use this conversion script when building with Python 3. The
4976 ;; conversion script also runs the tests.
4977 ;; For more information, see the file 'convert-py3k' in the source
4978 ;; distribution.
4979 (replace 'check
4980 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
4981 (home-page
4982 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4983 (synopsis
4984 "Python screen-scraping library")
4985 (description
4986 "Beautiful Soup is a Python library designed for rapidly setting up
4987screen-scraping projects. It offers Pythonic idioms for navigating,
4988searching, and modifying a parse tree, providing a toolkit for
4989dissecting a document and extracting what you need. It automatically
4990converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 4991 (license license:expat)))
b32a1e47
CAW
4992
4993(define-public python2-beautifulsoup4
4994 (package
4995 (inherit (package-with-python2
4996 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 4997 (arguments `(#:python ,python-2))))
b32a1e47 4998
092e86f5
AE
4999(define-public python2-cssutils
5000 (package
5001 (name "python2-cssutils")
58d1d816 5002 (version "1.0.1")
092e86f5
AE
5003 (source
5004 (origin
5005 (method url-fetch)
58d1d816 5006 (uri (pypi-uri "cssutils" version))
092e86f5 5007 (sha256
58d1d816
EF
5008 (base32
5009 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5010 (build-system python-build-system)
5011 (native-inputs
5012 `(("python2-mock" ,python2-mock) ; for the tests
5013 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5014 (arguments
5015 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5016 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5017 ))
092e86f5
AE
5018 (home-page "http://cthedot.de/cssutils/")
5019 (synopsis
5020 "CSS Cascading Style Sheets library for Python")
5021 (description
5022 "Cssutils is a Python package for parsing and building CSS
5023Cascading Style Sheets. Currently it provides a DOM only and no rendering
5024options.")
3f641af0 5025 (license license:lgpl3+)))
880ff77c
AE
5026
5027(define-public python-cssselect
5028 (package
5029 (name "python-cssselect")
d5ccd9ab 5030 (version "0.9.2")
880ff77c
AE
5031 (source
5032 (origin
5033 (method url-fetch)
d5ccd9ab 5034 (uri (pypi-uri "cssselect" version))
880ff77c 5035 (sha256
d5ccd9ab
EF
5036 (base32
5037 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5038 (build-system python-build-system)
880ff77c
AE
5039 (arguments
5040 ;; tests fail with message
5041 ;; AttributeError: 'module' object has no attribute 'tests'
5042 `(#:tests? #f))
5043 (home-page
5044 "https://pythonhosted.org/cssselect/")
5045 (synopsis
5046 "CSS3 selector parser and translator to XPath 1.0")
5047 (description
5048 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5049them to XPath 1.0 expressions. Such expressions can be used in lxml or
5050another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5051 (license license:bsd-3)))
880ff77c
AE
5052
5053(define-public python2-cssselect
5054 (package-with-python2 python-cssselect))
60357f99
AE
5055
5056(define-public python-netifaces
5057 (package
5058 (name "python-netifaces")
5059 (version "0.10.4")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (string-append
5064 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5065 version
5066 ".tar.gz"))
5067 (sha256
5068 (base32
5069 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5070 (build-system python-build-system)
60357f99
AE
5071 (home-page
5072 "https://bitbucket.org/al45tair/netifaces")
5073 (synopsis
5074 "Python module for portable network interface information")
5075 (description
5076 "Netifaces is a Python module providing information on network
5077interfaces in an easy and portable manner.")
5078 (license license:expat)))
5079
5080(define-public python2-netifaces
5081 (package-with-python2 python-netifaces))
92cb152b 5082
32f77c04
RW
5083(define-public python-networkx
5084 (package
5085 (name "python-networkx")
a4d9609c 5086 (version "1.11")
32f77c04
RW
5087 (source
5088 (origin
5089 (method url-fetch)
a4d9609c 5090 (uri (pypi-uri "networkx" version))
32f77c04 5091 (sha256
a4d9609c 5092 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5093 (build-system python-build-system)
5094 ;; python-decorator is needed at runtime
5095 (propagated-inputs
5096 `(("python-decorator" ,python-decorator)))
5097 (native-inputs
f3b98f4f 5098 `(("python-nose" ,python-nose)))
32f77c04
RW
5099 (home-page "http://networkx.github.io/")
5100 (synopsis "Python module for creating and manipulating graphs and networks")
5101 (description
5102 "NetworkX is a Python package for the creation, manipulation, and study
5103of the structure, dynamics, and functions of complex networks.")
3f641af0 5104 (license license:bsd-3)))
32f77c04
RW
5105
5106(define-public python2-networkx
5107 (package-with-python2 python-networkx))
5108
92cb152b
RW
5109(define-public snakemake
5110 (package
5111 (name "snakemake")
5112 (version "3.2.1")
5113 (source
5114 (origin
5115 (method url-fetch)
5116 (uri (string-append
5117 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5118 version ".tar.gz"))
5119 (sha256
5120 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5121 (build-system python-build-system)
92cb152b
RW
5122 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5123 (synopsis "Python-based execution environment for make-like workflows")
5124 (description
5125 "Snakemake aims to reduce the complexity of creating workflows by
5126providing a clean and modern domain specific specification language (DSL) in
5127Python style, together with a fast and comfortable execution environment.")
5128 (license license:expat)))
a1920bc9 5129
35de1fbd
RW
5130(define-public python-seaborn
5131 (package
5132 (name "python-seaborn")
fc899d4f 5133 (version "0.7.0")
35de1fbd
RW
5134 (source
5135 (origin
5136 (method url-fetch)
fc899d4f 5137 (uri (pypi-uri "seaborn" version))
35de1fbd 5138 (sha256
fc899d4f 5139 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5140 (build-system python-build-system)
5141 (propagated-inputs
5142 `(("python-pandas" ,python-pandas)
5143 ("python-matplotlib" ,python-matplotlib)
5144 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5145 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5146 (synopsis "Statistical data visualization")
5147 (description
5148 "Seaborn is a library for making attractive and informative statistical
5149graphics in Python. It is built on top of matplotlib and tightly integrated
5150with the PyData stack, including support for numpy and pandas data structures
5151and statistical routines from scipy and statsmodels.")
3f641af0 5152 (license license:bsd-3)
fc899d4f 5153 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5154
5155(define-public python2-seaborn
fc899d4f
EF
5156 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5157 (package
5158 (inherit base)
5159 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5160 ,@(package-propagated-inputs base))))))
35de1fbd 5161
90fc547f
RW
5162(define-public python-sympy
5163 (package
5164 (name "python-sympy")
5165 (version "0.7.6")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (string-append
5170 "https://github.com/sympy/sympy/releases/download/sympy-"
5171 version "/sympy-" version ".tar.gz"))
5172 (sha256
5173 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5174 (build-system python-build-system)
90fc547f
RW
5175 (home-page "http://www.sympy.org/")
5176 (synopsis "Python library for symbolic mathematics")
5177 (description
5178 "SymPy is a Python library for symbolic mathematics. It aims to become a
5179full-featured computer algebra system (CAS) while keeping the code as simple
5180as possible in order to be comprehensible and easily extensible.")
3f641af0 5181 (license license:bsd-3)))
90fc547f
RW
5182
5183(define-public python2-sympy
5184 (package-with-python2 python-sympy))
5185
e8c9b010
SR
5186(define-public python-q
5187 (package
5188 (name "python-q")
5189 (version "2.6")
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (pypi-uri "q" version))
5194 (sha256
5195 (base32
5196 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5197 (build-system python-build-system)
5198 (home-page "https://github.com/zestyping/q")
5199 (synopsis "Quick-and-dirty debugging output for tired programmers")
5200 (description
5201 "q is a Python module for \"print\" style of debugging Python code. It
5202provides convenient short API for print out of values, tracebacks, and
5203falling into the Python interpreter.")
f210e944 5204 (license license:asl2.0)))
e8c9b010
SR
5205
5206(define-public python2-q
f210e944 5207 (package-with-python2 python-q))
e8c9b010 5208
a1920bc9
FB
5209(define-public python-testlib
5210 (package
5211 (name "python-testlib")
5212 (version "0.6.5")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (string-append
5217 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5218 version ".zip"))
5219 (sha256
5220 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5221 (build-system python-build-system)
a1920bc9
FB
5222 (native-inputs
5223 `(("unzip" ,unzip)))
5224 (arguments
5225 `(#:phases
5226 (alist-replace
5227 'unpack
5228 (lambda* (#:key inputs outputs #:allow-other-keys)
5229 (let ((unzip (string-append (assoc-ref inputs "unzip")
5230 "/bin/unzip"))
5231 (source (assoc-ref inputs "source")))
5232 (and (zero? (system* unzip source))
5233 (chdir (string-append "testlib-" ,version)))))
5234 %standard-phases)))
5235 (synopsis "Python micro test suite harness")
5236 (description "A micro unittest suite harness for Python.")
5237 (home-page "https://github.com/trentm/testlib")
1cb9c006 5238 (license license:expat)))
a1920bc9
FB
5239
5240(define-public python2-testlib
5241 (package-with-python2 python-testlib))
db62afa5
LC
5242
5243(define-public python2-xlib
5244 (package
5245 (name "python2-xlib")
5246 (version "0.14")
5247 (source (origin
5248 (method url-fetch)
de67e922
LF
5249 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5250 "/" version "/"
db62afa5
LC
5251 "python-xlib-" version ".tar.gz"))
5252 (sha256
5253 (base32
5254 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5255 (build-system python-build-system)
5256 (arguments
5257 `(#:python ,python-2 ;Python 2 only
5258 #:tests? #f)) ;no tests
db62afa5
LC
5259 (home-page "http://python-xlib.sourceforge.net/")
5260 (synopsis "Python X11 client library")
5261 (description
5262 "The Python X Library is intended to be a fully functional X client
5263library for Python programs. It is useful to implement low-level X clients.
5264It is written entirely in Python.")
3f641af0 5265 (license license:gpl2+)))
0234ca06
DT
5266
5267(define-public python-singledispatch
5268 (package
5269 (name "python-singledispatch")
5270 (version "3.4.0.3")
5271 (source
5272 (origin
5273 (method url-fetch)
bdb67d84 5274 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5275 (sha256
5276 (base32
5277 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5278 (build-system python-build-system)
5e1c9d24
HG
5279 (native-inputs
5280 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5281 (home-page
5282 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5283 (synopsis "Backport of singledispatch feature from Python 3.4")
5284 (description
5285 "This library brings functools.singledispatch from Python 3.4 to Python
52862.6-3.3.")
5287 (license license:expat)))
5288
5289(define-public python2-singledispatch
5290 (package-with-python2 python-singledispatch))
feaae484 5291
310d218f
RW
5292(define-public python-tornado
5293 (package
5294 (name "python-tornado")
a724924b 5295 (version "4.3")
310d218f
RW
5296 (source
5297 (origin
5298 (method url-fetch)
a724924b 5299 (uri (pypi-uri "tornado" version))
310d218f 5300 (sha256
a724924b 5301 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5302 (build-system python-build-system)
310d218f 5303 (native-inputs
b455439b 5304 `(("python-certifi" ,python-certifi)))
f22efa01 5305 (propagated-inputs
b455439b 5306 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5307 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5308 (synopsis "Python web framework and asynchronous networking library")
5309 (description
5310 "Tornado is a Python web framework and asynchronous networking library,
5311originally developed at FriendFeed. By using non-blocking network I/O,
5312Tornado can scale to tens of thousands of open connections, making it ideal
5313for long polling, WebSockets, and other applications that require a long-lived
5314connection to each user.")
3f641af0 5315 (license license:asl2.0)
b455439b 5316 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5317
5318(define-public python2-tornado
b455439b 5319 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5320 (package (inherit tornado)
f22efa01 5321 (propagated-inputs
310d218f
RW
5322 `(("python2-backport-ssl-match-hostname"
5323 ,python2-backport-ssl-match-hostname)
b455439b 5324 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5325 ,@(package-propagated-inputs tornado))))))
310d218f 5326
6b59fc10
EF
5327;; the python- version can be removed with python-3.5
5328(define-public python-backports-abc
5329 (package
5330 (name "python-backports-abc")
5331 (version "0.4")
5332 (source
5333 (origin
5334 (method url-fetch)
5335 (uri (pypi-uri "backports_abc" version))
5336 (sha256
5337 (base32
5338 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5339 (build-system python-build-system)
6b59fc10 5340 (home-page "https://github.com/cython/backports_abc")
66e07664 5341 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5342 (description
5343 "Python-backports-abc provides a backport of additions to the
5344'collections.abc' module in Python-3.5.")
3f641af0 5345 (license license:psfl)))
6b59fc10
EF
5346
5347(define-public python2-backports-abc
5348 (package-with-python2 python-backports-abc))
5349
feaae484
SB
5350(define-public python-waf
5351 (package
5352 (name "python-waf")
7dd55dfe 5353 (version "1.9.5")
feaae484
SB
5354 (source (origin
5355 (method url-fetch)
bae67829 5356 (uri (string-append "https://waf.io/"
feaae484
SB
5357 "waf-" version ".tar.bz2"))
5358 (sha256
5359 (base32
7dd55dfe 5360 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5361 (build-system python-build-system)
5362 (arguments
5363 '(#:phases
5364 (modify-phases %standard-phases
5365 (replace 'build
7dd55dfe
EF
5366 (lambda _
5367 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5368 (replace 'check
7dd55dfe
EF
5369 (lambda _
5370 (zero? (system* "python" "waf" "--version"))))
feaae484 5371 (replace 'install
7dd55dfe
EF
5372 (lambda _
5373 (copy-file "waf" %output))))))
5374 (home-page "http://waf.io/")
feaae484
SB
5375 (synopsis "Python-based build system")
5376 (description
5377 "Waf is a Python-based framework for configuring, compiling and installing
5378applications.")
3f641af0 5379 (license license:bsd-3)))
feaae484
SB
5380
5381(define-public python2-waf
5382 (package-with-python2 python-waf))
45203542
RW
5383
5384(define-public python-pyzmq
5385 (package
5386 (name "python-pyzmq")
3655ee76 5387 (version "15.1.0")
45203542
RW
5388 (source
5389 (origin
5390 (method url-fetch)
3655ee76 5391 (uri (pypi-uri "pyzmq" version))
45203542 5392 (sha256
3655ee76 5393 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5394 (build-system python-build-system)
5395 (arguments
5396 `(#:configure-flags
5397 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5398 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5399 ;; --inplace' for 'python setup.py test' to work.
5400 #:tests? #f))
5401 (inputs
5402 `(("zeromq" ,zeromq)))
5403 (native-inputs
5404 `(("pkg-config" ,pkg-config)
f3b98f4f 5405 ("python-nose" ,python-nose)))
45203542
RW
5406 (home-page "http://github.com/zeromq/pyzmq")
5407 (synopsis "Python bindings for 0MQ")
5408 (description
5409 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5410 (license license:bsd-4)))
45203542
RW
5411
5412(define-public python2-pyzmq
5413 (package-with-python2 python-pyzmq))
d889e6c4
CR
5414
5415(define-public python-pep8
5416 (package
5417 (name "python-pep8")
db251311 5418 (version "1.7.0")
d889e6c4
CR
5419 (source
5420 (origin
5421 (method url-fetch)
db251311 5422 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5423 (sha256
5424 (base32
db251311 5425 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5426 (build-system python-build-system)
d889e6c4
CR
5427 (home-page "http://pep8.readthedocs.org/")
5428 (synopsis "Python style guide checker")
5429 (description
5430 "This tools checks Python code against some of the style conventions in
5431PEP 8.")
5432 (license license:expat)))
5433
5434(define-public python2-pep8
5435 (package-with-python2 python-pep8))
e31d7f44
CR
5436
5437(define-public python-pyflakes
5438 (package
5439 (name "python-pyflakes")
2abc3972 5440 (version "1.0.0")
e31d7f44
CR
5441 (source
5442 (origin
5443 (method url-fetch)
2abc3972 5444 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5445 (sha256
5446 (base32
2abc3972 5447 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5448 (build-system python-build-system)
e31d7f44
CR
5449 (home-page
5450 "https://github.com/pyflakes/pyflakes")
5451 (synopsis "Passive checker of Python programs")
5452 (description
5453 "Pyflakes statically checks Python source code for common errors.")
5454 (license license:expat)))
a59e017c 5455
7261d9eb
CR
5456(define-public python2-pyflakes
5457 (package-with-python2 python-pyflakes))
5458
a59e017c
CR
5459(define-public python-mccabe
5460 (package
5461 (name "python-mccabe")
c6ebd40d 5462 (version "0.4.0")
a59e017c
CR
5463 (source
5464 (origin
5465 (method url-fetch)
c6ebd40d 5466 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5467 (sha256
5468 (base32
c6ebd40d 5469 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5470 (build-system python-build-system)
328bb95d 5471 (native-inputs
c6ebd40d 5472 `(("python-pytest" ,python-pytest)
f3b98f4f 5473 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5474 (home-page "https://github.com/flintwork/mccabe")
5475 (synopsis "McCabe checker, plugin for flake8")
5476 (description
5477 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5478complexity of Python source code.")
7362371d 5479 (license license:expat)))
a59e017c
CR
5480
5481(define-public python2-mccabe
5482 (package-with-python2 python-mccabe))
e8df8f47 5483
7477fbb1
CR
5484(define-public python-mccabe-0.2.1
5485 (package (inherit python-mccabe)
5486 (version "0.2.1")
5487 (source
5488 (origin
5489 (method url-fetch)
5490 (uri (pypi-uri "mccabe" version))
5491 (sha256
5492 (base32
f3b98f4f 5493 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5494
5495(define-public python2-mccabe-0.2.1
5496 (package-with-python2 python-mccabe-0.2.1))
5497
e8df8f47
CR
5498;; Flake8 2.4.1 requires an older version of pep8.
5499;; This should be removed ASAP.
5500(define-public python-pep8-1.5.7
5501 (package (inherit python-pep8)
5502 (version "1.5.7")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (string-append
5507 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5508 version
5509 ".tar.gz"))
5510 (sha256
5511 (base32
5512 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5513
5514(define-public python2-pep8-1.5.7
5515 (package-with-python2 python-pep8-1.5.7))
5516
5517;; Flake8 2.4.1 requires an older version of pyflakes.
5518;; This should be removed ASAP.
5519(define-public python-pyflakes-0.8.1
5520 (package (inherit python-pyflakes)
5521 (version "0.8.1")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 (uri (string-append
5526 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5527 version
5528 ".tar.gz"))
5529 (sha256
5530 (base32
5531 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5532
5533(define-public python2-pyflakes-0.8.1
7261d9eb 5534 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5535
5536(define-public python-flake8
5537 (package
5538 (name "python-flake8")
43789136 5539 (version "2.5.4")
e8df8f47
CR
5540 (source
5541 (origin
5542 (method url-fetch)
1b995533 5543 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5544 (sha256
5545 (base32
43789136 5546 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47 5547 (build-system python-build-system)
482d9591 5548 (propagated-inputs
f3b98f4f 5549 `(("python-pep8" ,python-pep8)
43789136 5550 ("python-pyflakes" ,python-pyflakes)
482d9591 5551 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5552 (native-inputs
5553 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5554 ("python-nose" ,python-nose)))
5555 (home-page "https://gitlab.com/pycqa/flake8")
5556 (synopsis
5557 "The modular source code checker: pep8, pyflakes and co")
5558 (description
5559 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5560 (license license:expat)))
5561
5562(define-public python2-flake8
5563 (package-with-python2 python-flake8))
61b9ac53 5564
abf21efc
CR
5565;; This will only be needed by the python-hacking package and will not be
5566;; necessary once python-hacking > 0.10.2 is released.
5567(define-public python-flake8-2.2.4
5568 (package (inherit python-flake8)
482d9591 5569 (propagated-inputs
f3b98f4f 5570 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5571 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5572 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5573 (native-inputs
482d9591 5574 `(("python-mock" ,python-mock)
abf21efc
CR
5575 ("python-nose" ,python-nose)))
5576 (version "2.2.4")
5577 (source
5578 (origin
5579 (method url-fetch)
5580 (uri (pypi-uri "flake8" version))
5581 (sha256
5582 (base32
5583 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5584
5585(define-public python2-flake8-2.2.4
5586 (package-with-python2 python-flake8-2.2.4))
5587
61b9ac53
FB
5588(define-public python-mistune
5589 (package
5590 (name "python-mistune")
5591 (version "0.7")
5592 (source
5593 (origin
5594 (method url-fetch)
5595 (uri (string-append
5596 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5597 version
5598 ".tar.gz"))
5599 (sha256
5600 (base32
5601 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5602 (build-system python-build-system)
328bb95d 5603 (native-inputs
f3b98f4f 5604 `(("python-nose" ,python-nose)
61b9ac53
FB
5605 ("python-cython" ,python-cython)))
5606 (home-page "https://github.com/lepture/mistune")
5607 (synopsis "Markdown parser in pure Python")
5608 (description "This package provides a fast markdown parser in pure
5609Python.")
3f641af0 5610 (license license:bsd-3)))
61b9ac53
FB
5611
5612(define-public python2-mistune
5613 (package-with-python2 python-mistune))
6d992d07 5614
b9893908
EE
5615(define-public python-markdown
5616 (package
5617 (name "python-markdown")
5618 (version "2.6.5")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (pypi-uri "Markdown" version))
5623 (sha256
5624 (base32
5625 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5626 (build-system python-build-system)
5627 (arguments
5628 `(#:phases
5629 (modify-phases %standard-phases
5630 (replace 'check
5631 (lambda _
5632 (zero? (system* "python" "run-tests.py")))))))
5633 (native-inputs
5634 `(("python-nose" ,python-nose)
5635 ("python-pyyaml" ,python-pyyaml)))
5636 (home-page "https://pythonhosted.org/Markdown/")
5637 (synopsis "Python implementation of Markdown")
5638 (description
5639 "This package provides a Python implementation of John Gruber's
5640Markdown. The library features international input, various Markdown
5641extensions, and several HTML output formats. A command line wrapper
5642markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5643 (license license:bsd-3)))
b9893908
EE
5644
5645(define-public python2-markdown
5646 (package-with-python2 python-markdown))
5647
6d992d07
FB
5648(define-public python-ptyprocess
5649 (package
5650 (name "python-ptyprocess")
5651 (version "0.5")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (string-append
5656 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5657 version ".tar.gz"))
5658 (sha256
5659 (base32
5660 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5661 (build-system python-build-system)
328bb95d 5662 (native-inputs
f3b98f4f 5663 `(("python-nose" ,python-nose)))
6d992d07
FB
5664 (arguments
5665 `(#:phases
5666 (modify-phases %standard-phases
5667 (replace 'check
5668 (lambda _
5669 (zero? (system* "nosetests")))))))
5670 (home-page "https://github.com/pexpect/ptyprocess")
5671 (synopsis "Run a subprocess in a pseudo terminal")
5672 (description
5673 "This package provides a Python library used to launch a subprocess in a
5674pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5675 (license license:isc)))
6d992d07
FB
5676
5677(define-public python2-ptyprocess
5678 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5679
5680(define-public python-terminado
5681 (package
5682 (name "python-terminado")
783fb0a3 5683 (version "0.6")
4aadb1df
FB
5684 (source
5685 (origin
5686 (method url-fetch)
783fb0a3 5687 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5688 (sha256
5689 (base32
783fb0a3 5690 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5691 (build-system python-build-system)
5692 (propagated-inputs
5693 `(("python-tornado" ,python-tornado)
5694 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5695 (native-inputs
5696 `(("python-nose" ,python-nose)))
4aadb1df
FB
5697 (arguments
5698 `(#:phases
5699 (modify-phases %standard-phases
5700 (replace 'check
5701 (lambda _
5702 (zero? (system* "nosetests")))))))
5703 (home-page "https://github.com/takluyver/terminado")
5704 (synopsis "Terminals served to term.js using Tornado websockets")
5705 (description "This package provides a Tornado websocket backend for the
5706term.js Javascript terminal emulator library.")
3f641af0 5707 (license license:bsd-2)
783fb0a3 5708 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5709
5710(define-public python2-terminado
783fb0a3 5711 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5712 (package (inherit terminado)
783fb0a3
EF
5713 (propagated-inputs
5714 `(("python2-backport-ssl-match-hostname"
5715 ,python2-backport-ssl-match-hostname)
00e10c6e 5716 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5717
d582eaac
SB
5718(define-public python-fonttools
5719 (package
5720 (name "python-fonttools")
5721 (version "2.5")
5722 (source (origin
5723 (method url-fetch)
5724 (uri (string-append
5725 "https://pypi.python.org/packages/source/F/FontTools/"
5726 "fonttools-" version ".tar.gz"))
5727 (sha256
5728 (base32
5729 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5730 (build-system python-build-system)
9e8c6a37
HG
5731 (arguments
5732 '(#:test-target "check"
5733 #:phases
5734 (modify-phases %standard-phases
5735 (add-after 'unpack 'patch-setuppy
5736 ;; Remove the undocumented "extra_path" argument, which adds an
5737 ;; intervening directories between site-packages and the package
5738 ;; directory.
5739 (lambda _
5740 (substitute* "setup.py"
5741 (("^[ \t]*extra_path *= *'FontTools',") ""))
5742 #t)))))
d582eaac
SB
5743 (home-page "http://github.com/behdad/fonttools")
5744 (synopsis "Tools to manipulate font files")
5745 (description
5746 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5747supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5748of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5749also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5750from an XML-based format.")
3f641af0
DC
5751 (license (license:non-copyleft
5752 "file://LICENSE.txt"
5753 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5754
5755(define-public python2-fonttools
5756 (package-with-python2 python-fonttools))
75710da6 5757
5faa5ce4
RW
5758(define-public python-ly
5759 (package
5760 (name "python-ly")
5135354f 5761 (version "0.9.4")
5faa5ce4
RW
5762 (source
5763 (origin
5764 (method url-fetch)
5135354f
RW
5765 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5766 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5767 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5768 (sha256
5769 (base32
5135354f 5770 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 5771 (build-system python-build-system)
5faa5ce4
RW
5772 (synopsis "Tool and library for manipulating LilyPond files")
5773 (description "This package provides a Python library to parse, manipulate
5774or create documents in LilyPond format. A command line program ly is also
5775provided that can be used to do various manipulations with LilyPond files.")
5776 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5777 (license license:gpl2+)))
7e7b27d9
CR
5778
5779(define-public python-appdirs
5780 (package
5781 (name "python-appdirs")
5782 (version "1.4.0")
5783 (source
5784 (origin
5785 (method url-fetch)
5786 (uri (string-append
5787 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5788 version
5789 ".tar.gz"))
5790 (sha256
5791 (base32
5792 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5793 (build-system python-build-system)
7e7b27d9
CR
5794 (home-page "http://github.com/ActiveState/appdirs")
5795 (synopsis
5796 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5797 (description
5798 "This module provides a portable way of finding out where user data
5799should be stored on various operating systems.")
5800 (license license:expat)))
5801
5802(define-public python2-appdirs
5803 (package-with-python2 python-appdirs))
89b2e0b0
LF
5804
5805(define-public python-llfuse
5806 (package
5807 (name "python-llfuse")
e36ace36 5808 (version "1.1.1")
89b2e0b0
LF
5809 (source (origin
5810 (method url-fetch)
5811 (uri (string-append
5812 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5813 "llfuse-" version ".tar.bz2"))
5814 (sha256
5815 (base32
e36ace36 5816 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5817 (build-system python-build-system)
5818 (inputs
5819 `(("fuse" ,fuse)
5820 ("attr" ,attr)))
5821 (native-inputs
f3b98f4f 5822 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
5823 (synopsis "Python bindings for FUSE")
5824 (description
5825 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5826 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5827 (license license:lgpl2.0+)
cd0569c4 5828 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5829
5830(define-public python2-llfuse
cd0569c4
LF
5831 (package (inherit (package-with-python2
5832 (strip-python2-variant python-llfuse)))
5833 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5834
5835;; For attic-0.16
5836(define-public python-llfuse-0.41
5837 (package (inherit python-llfuse)
229b3661 5838 (version "0.41.1")
cd0569c4
LF
5839 (source (origin
5840 (method url-fetch)
5841 (uri (string-append
5842 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5843 "llfuse-" version ".tar.bz2"))
5844 (sha256
5845 (base32
229b3661 5846 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5847 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5848 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5849 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5850
5851(define-public python-msgpack
5852 (package
5853 (name "python-msgpack")
aed625bd 5854 (version "0.4.8")
641c9871
LF
5855 (source (origin
5856 (method url-fetch)
ae831df4 5857 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5858 (sha256
5859 (base32
aed625bd 5860 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5861 (build-system python-build-system)
641c9871
LF
5862 (synopsis "MessagePack (de)serializer")
5863 (description "MessagePack is a fast, compact binary serialization format,
5864suitable for similar data to JSON. This package provides CPython bindings for
5865reading and writing MessagePack data.")
5866 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 5867 (license license:asl2.0)))
bd74be7b
LF
5868
5869(define-public python2-msgpack
f210e944 5870 (package-with-python2 python-msgpack))
641c9871 5871
6e5e39f4
CR
5872(define-public python-netaddr
5873 (package
5874 (name "python-netaddr")
5875 (version "0.7.18")
5876 (source
5877 (origin
5878 (method url-fetch)
5879 (uri (string-append
5880 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5881 version
5882 ".tar.gz"))
5883 (sha256
5884 (base32
5885 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5886 (build-system python-build-system)
5887 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
5888 (home-page "https://github.com/drkjam/netaddr/")
5889 (synopsis "Pythonic manipulation of network addresses")
5890 (description
5891 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5892and MAC network addresses.")
3f641af0 5893 (license license:bsd-3)))
6e5e39f4
CR
5894
5895(define-public python2-netaddr
5896 (package-with-python2 python-netaddr))
8c692a52
CR
5897
5898(define-public python-wrapt
5899 (package
5900 (name "python-wrapt")
5901 (version "1.10.5")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (string-append
5906 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5907 version
5908 ".tar.gz"))
5909 (sha256
5910 (base32
5911 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5912 (build-system python-build-system)
5913 (arguments
5914 ;; Tests are not included in the tarball, they are only available in the
5915 ;; git repository.
5916 `(#:tests? #f))
8c692a52
CR
5917 (home-page "https://github.com/GrahamDumpleton/wrapt")
5918 (synopsis "Module for decorators, wrappers and monkey patching")
5919 (description
5920 "The aim of the wrapt module is to provide a transparent object proxy for
5921 Python, which can be used as the basis for the construction of function
5922 wrappers and decorator functions.")
3f641af0 5923 (license license:bsd-2)))
8c692a52
CR
5924
5925(define-public python2-wrapt
5926 (package-with-python2 python-wrapt))
b85c85be
CR
5927
5928(define-public python-iso8601
5929 (package
5930 (name "python-iso8601")
fe84bc9a 5931 (version "0.1.11")
b85c85be
CR
5932 (source
5933 (origin
5934 (method url-fetch)
fe84bc9a 5935 (uri (pypi-uri "iso8601" version))
b85c85be 5936 (sha256
fe84bc9a
EF
5937 (base32
5938 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 5939 (build-system python-build-system)
b85c85be
CR
5940 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5941 (synopsis "Module to parse ISO 8601 dates")
5942 (description
5943 "This module parses the most common forms of ISO 8601 date strings (e.g.
5944@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5945 (license license:expat)))
5946
5947(define-public python2-iso8601
5948 (package-with-python2 python-iso8601))
5e412b63
CR
5949
5950(define-public python-monotonic
5951 (package
5952 (name "python-monotonic")
5953 (version "0.3")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (string-append
5958 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5959 version
5960 ".tar.gz"))
5961 (sha256
5962 (base32
5963 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5964 (build-system python-build-system)
5e412b63
CR
5965 (home-page "https://github.com/atdt/monotonic")
5966 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5967 (description
5968 "This module provides a monotonic() function which returns the value (in
5969fractional seconds) of a clock which never goes backwards.")
3f641af0 5970 (license license:asl2.0)))
5e412b63
CR
5971
5972(define-public python2-monotonic
5973 (package-with-python2 python-monotonic))
de34afac
CR
5974
5975(define-public python-webob
5976 (package
5977 (name "python-webob")
b8834c21 5978 (version "1.5.1")
de34afac
CR
5979 (source
5980 (origin
5981 (method url-fetch)
b8834c21 5982 (uri (pypi-uri "WebOb" version))
de34afac
CR
5983 (sha256
5984 (base32
b8834c21 5985 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 5986 (build-system python-build-system)
328bb95d 5987 (native-inputs
f3b98f4f 5988 `(("python-nose" ,python-nose)))
de34afac
CR
5989 (home-page "http://webob.org/")
5990 (synopsis "WSGI request and response object")
5991 (description
5992 "WebOb provides wrappers around the WSGI request environment, and an
5993object to help create WSGI responses.")
5994 (license license:expat)))
5995
5996(define-public python2-webob
5997 (package-with-python2 python-webob))
350ba0a3 5998
02a8a187
BW
5999(define-public python-xlrd
6000 (package
6001 (name "python-xlrd")
c2ad4d70 6002 (version "1.0.0")
02a8a187
BW
6003 (source (origin
6004 (method url-fetch)
e775f48e 6005 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6006 (sha256
6007 (base32
c2ad4d70 6008 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6009 (build-system python-build-system)
6010 (arguments
6011 `(#:phases
6012 (modify-phases %standard-phases
c2ad4d70 6013 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6014 ;; run tests instead for now.
6015 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6016 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6017 (home-page "http://www.python-excel.org/")
6018 (synopsis "Library for extracting data from Excel files")
6019 (description "This packages provides a library to extract data from
c598e35c 6020spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6021@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6022Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6023 (license license:bsd-3)))
02a8a187
BW
6024
6025(define-public python2-xlrd
6026 (package-with-python2 python-xlrd))
6027
350ba0a3
CR
6028(define-public python-prettytable
6029 (package
6030 (name "python-prettytable")
6031 (version "0.7.2")
6032 (source
6033 (origin
6034 (method url-fetch)
6035 (uri (string-append
6036 "https://pypi.python.org/packages/source/P/PrettyTable/"
6037 "prettytable-" version ".tar.bz2"))
6038 (sha256
6039 (base32
6040 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6041 (build-system python-build-system)
350ba0a3
CR
6042 (home-page "http://code.google.com/p/prettytable/")
6043 (synopsis "Display tabular data in an ASCII table format")
6044 (description
6045 "A library designed to represent tabular data in visually appealing ASCII
6046tables. PrettyTable allows for selection of which columns are to be printed,
6047independent alignment of columns (left or right justified or centred) and
6048printing of sub-tables by specifying a row range.")
3f641af0 6049 (license license:bsd-3)))
350ba0a3
CR
6050
6051(define-public python2-prettytable
6052 (package-with-python2 python-prettytable))
7a8ac75a 6053
9f8ee3fe
RW
6054(define-public python-tables
6055 (package
6056 (name "python-tables")
6057 (version "3.2.2")
6058 (source
6059 (origin
6060 (method url-fetch)
6061 (uri (pypi-uri "tables" version))
6062 (sha256
6063 (base32
6064 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6065 (build-system python-build-system)
6066 (arguments
6067 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6068 ;; or "check", so we must override the build and check phases.
6069 #:phases
6070 (modify-phases %standard-phases
6071 (add-after 'unpack 'use-gcc
6072 (lambda _
6073 (substitute* "setup.py"
6074 (("compiler = new_compiler\\(\\)" line)
6075 (string-append line
6076 "\ncompiler.set_executables(compiler='gcc',"
6077 "compiler_so='gcc',"
6078 "linker_exe='gcc',"
6079 "linker_so='gcc -shared')")))
6080 #t))
6081 (replace 'build
6082 (lambda* (#:key inputs #:allow-other-keys)
6083 (zero? (system* "python" "setup.py" "build"
6084 (string-append "--hdf5="
6085 (assoc-ref inputs "hdf5"))))))
6086 (replace 'check
6087 (lambda* (#:key inputs #:allow-other-keys)
6088 (zero? (system* "python" "setup.py" "check"
6089 (string-append "--hdf5="
6090 (assoc-ref inputs "hdf5")))))))))
6091 (propagated-inputs
6092 `(("python-numexpr" ,python-numexpr)
6093 ("python-numpy" ,python-numpy)))
6094 (native-inputs
f3b98f4f 6095 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6096 ("pkg-config" ,pkg-config)))
6097 (inputs
6098 `(("hdf5" ,hdf5)
6099 ("bzip2" ,bzip2)
6100 ("zlib" ,zlib)))
6101 (home-page "http://www.pytables.org/")
6102 (synopsis "Hierarchical datasets for Python")
6103 (description "PyTables is a package for managing hierarchical datasets and
6104designed to efficently cope with extremely large amounts of data.")
3f641af0 6105 (license license:bsd-3)))
9f8ee3fe
RW
6106
6107(define-public python2-tables
6108 (package-with-python2 python-tables))
6109
7a8ac75a
RW
6110(define-public python-pyasn1
6111 (package
6112 (name "python-pyasn1")
caa0edb3 6113 (version "0.1.9")
7a8ac75a
RW
6114 (source
6115 (origin
6116 (method url-fetch)
caa0edb3 6117 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6118 (sha256
6119 (base32
caa0edb3 6120 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6121 (build-system python-build-system)
6122 (home-page "http://pyasn1.sourceforge.net/")
6123 (synopsis "ASN.1 types and codecs")
6124 (description
6125 "This is an implementation of ASN.1 types and codecs in Python. It is
6126suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6127 (license license:bsd-2)))
7a8ac75a
RW
6128
6129(define-public python2-pyasn1
6130 (package-with-python2 python-pyasn1))
9a49a535 6131
5988c299
EF
6132(define-public python-pyasn1-modules
6133 (package
6134 (name "python-pyasn1-modules")
6135 (version "0.0.8")
6136 (source
6137 (origin
6138 (method url-fetch)
6139 (uri (pypi-uri "pyasn1-modules" version))
6140 (sha256
6141 (base32
6142 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6143 (build-system python-build-system)
5988c299
EF
6144 (propagated-inputs
6145 `(("python-pyasn1" ,python-pyasn1)))
6146 (home-page "http://sourceforge.net/projects/pyasn1/")
6147 (synopsis "ASN.1 codec implementations")
6148 (description
6149 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6150implementations of ASN.1-based codecs and protocols.")
3f641af0 6151 (license license:bsd-3)))
5988c299
EF
6152
6153(define-public python2-pyasn1-modules
6154 (package-with-python2 python-pyasn1-modules))
6155
520af157 6156(define-public python-ipaddress
9a49a535 6157 (package
520af157
DC
6158 (name "python-ipaddress")
6159 (version "1.0.16")
6160 (source (origin
6161 (method url-fetch)
6162 (uri (pypi-uri "ipaddress" version))
6163 (sha256
6164 (base32
6165 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6166 (build-system python-build-system)
9a49a535
RW
6167 (home-page "https://github.com/phihag/ipaddress")
6168 (synopsis "IP address manipulation library")
6169 (description
520af157
DC
6170 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6171 in Python. This library is used to create, poke at, and manipulate IPv4 and
6172 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6173 module to older versions of Python.")
f210e944 6174 (license license:psfl)))
520af157
DC
6175
6176(define-public python2-ipaddress
f210e944 6177 (package-with-python2 python-ipaddress))
3f00e078 6178
4a238186
HG
6179(define-public python2-ipaddr
6180 (package
6181 (name "python2-ipaddr")
6182 (version "2.1.11")
6183 (source
6184 (origin
6185 (method url-fetch)
6186 (uri (pypi-uri "ipaddr" version))
6187 (sha256
6188 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6189 (build-system python-build-system)
6190 (arguments
6191 `(#:python ,python-2 ;version 2 only
6192 #:phases
6193 (modify-phases %standard-phases
6194 (replace 'check
6195 (lambda* _
6196 (zero? (system* "python" "ipaddr_test.py")))))))
6197 (home-page "https://github.com/google/ipaddr-py")
6198 (synopsis "IP address manipulation library")
6199 (description
6200 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6201IPv6 addresses and networks.
6202
6203For new implementations you may prefer to use the standard module
6204@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6205versions of Python.")
3f641af0 6206 (license license:asl2.0)))
4a238186 6207
3f00e078
RW
6208(define-public python-idna
6209 (package
6210 (name "python-idna")
6211 (version "2.0")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (string-append "https://pypi.python.org/packages/source/i/"
6216 "idna/idna-" version ".tar.gz"))
6217 (sha256
6218 (base32
6219 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6220 (build-system python-build-system)
3f00e078
RW
6221 (home-page "https://github.com/kjd/idna")
6222 (synopsis "Internationalized domain names in applications")
6223 (description
6224 "This is a library to support the Internationalised Domain Names in
6225Applications (IDNA) protocol as specified in RFC 5891. This version of the
6226protocol is often referred to as “IDNA2008” and can produce different results
6227from the earlier standard from 2003. The library is also intended to act as a
6228suitable drop-in replacement for the “encodings.idna” module that comes with
6229the Python standard library but currently only supports the older 2003
6230specification.")
3f641af0 6231 (license license:bsd-4)))
3f00e078
RW
6232
6233(define-public python2-idna
6234 (package-with-python2 python-idna))
36ebf972
RW
6235
6236(define-public python-pretend
6237 (package
6238 (name "python-pretend")
6239 (version "1.0.8")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (string-append "https://pypi.python.org/packages/source/p/"
6244 "pretend/pretend-" version ".tar.gz"))
6245 (sha256
6246 (base32
6247 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6248 (build-system python-build-system)
36ebf972
RW
6249 (home-page "https://github.com/alex/pretend")
6250 (synopsis "Library for stubbing in Python")
6251 (description
6252 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6253technique for writing tests. You may hear the term mixed up with mocks,
6254fakes, or doubles. Basically, a stub is an object that returns pre-canned
6255responses, rather than doing any computation.")
3f641af0 6256 (license license:bsd-3)))
36ebf972
RW
6257
6258(define-public python2-pretend
6259 (package-with-python2 python-pretend))
aa759a51
RW
6260
6261(define-public python-cryptography-vectors
6262 (package
6263 (name "python-cryptography-vectors")
912dcbad 6264 (version "1.5.3")
aa759a51
RW
6265 (source
6266 (origin
6267 (method url-fetch)
9c509ca9 6268 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6269 (sha256
6270 (base32
912dcbad 6271 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
aa759a51 6272 (build-system python-build-system)
aa759a51 6273 (home-page "https://github.com/pyca/cryptography")
66e07664 6274 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6275 (description
6276 "This package contains test vectors for the cryptography package.")
6277 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6278 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6279
6280(define-public python2-cryptography-vectors
6281 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6282
6283(define-public python-cryptography
6284 (package
6285 (name "python-cryptography")
912dcbad 6286 (version "1.5.3")
88b47cb0
RW
6287 (source
6288 (origin
6289 (method url-fetch)
9c509ca9 6290 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6291 (sha256
6292 (base32
912dcbad 6293 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
88b47cb0 6294 (build-system python-build-system)
470613f9
LF
6295 (arguments
6296 `(#:phases
6297 (modify-phases %standard-phases
6298 (add-before 'check 'disable-failing-test
6299 (lambda _
6300 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6301 ;; versions of python-cryptography:
6302 ;; https://github.com/pyca/cryptography/issues/3196
6303 ;; TODO: Try re-enabling the test when upgrading
6304 ;; python-cryptography.
6305 (substitute* "tests/hazmat/backends/test_openssl.py"
6306 (("def test_numeric_string_x509_name_entry")
6307 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6308 #t)))))
88b47cb0
RW
6309 (inputs
6310 `(("openssl" ,openssl)))
6311 (propagated-inputs
6312 `(("python-cffi" ,python-cffi)
6313 ("python-six" ,python-six)
6314 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6315 ("python-idna" ,python-idna)
6316 ("python-iso8601" ,python-iso8601)))
6317 (native-inputs
6318 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6319 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6320 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6321 ("python-pyasn1" ,python-pyasn1)
6322 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6323 ("python-pytz" ,python-pytz)
6324 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6325 (home-page "https://github.com/pyca/cryptography")
6326 (synopsis "Cryptographic recipes and primitives for Python")
6327 (description
6328 "cryptography is a package which provides cryptographic recipes and
6329primitives to Python developers. It aims to be the “cryptographic standard
6330library” for Python. The package includes both high level recipes, and low
6331level interfaces to common cryptographic algorithms such as symmetric ciphers,
6332message digests and key derivation functions.")
6333 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6334 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6335 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6336
6337(define-public python2-cryptography
519e2f4f
LF
6338 (let ((crypto (package-with-python2
6339 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6340 (package (inherit crypto)
6341 (propagated-inputs
6342 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6343 ("python2-backport-ssl-match-hostname"
6344 ,python2-backport-ssl-match-hostname)
68f1cdec 6345 ("python2-enum34" ,python2-enum34)
88b47cb0 6346 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6347
6348(define-public python-pyopenssl
6349 (package
6350 (name "python-pyopenssl")
eb68d268 6351 (version "16.1.0")
5af999b8
RW
6352 (source
6353 (origin
6354 (method url-fetch)
eb68d268 6355 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6356 (sha256
6357 (base32
eb68d268 6358 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6359 (build-system python-build-system)
5af999b8
RW
6360 (propagated-inputs
6361 `(("python-cryptography" ,python-cryptography)
6362 ("python-six" ,python-six)))
6363 (inputs
6364 `(("openssl" ,openssl)))
5af999b8
RW
6365 (home-page "https://github.com/pyca/pyopenssl")
6366 (synopsis "Python wrapper module around the OpenSSL library")
6367 (description
6368 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6369library.")
3f641af0 6370 (license license:asl2.0)))
5af999b8
RW
6371
6372(define-public python2-pyopenssl
519e2f4f 6373 (package-with-python2 python-pyopenssl))
643725a1
CR
6374
6375(define-public python-pip
6376 (package
6377 (name "python-pip")
6fb54e3b 6378 (version "8.0.2")
643725a1
CR
6379 (source
6380 (origin
6381 (method url-fetch)
6fb54e3b 6382 (uri (pypi-uri "pip" version))
643725a1
CR
6383 (sha256
6384 (base32
6fb54e3b 6385 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6386 (build-system python-build-system)
6387 (inputs
f3b98f4f 6388 `(("python-virtualenv" ,python-virtualenv)
643725a1
CR
6389 ;; Tests
6390 ("python-mock" ,python-mock)
6391 ("python-pytest" ,python-pytest)
6392 ("python-scripttest" ,python-scripttest)))
6393 (home-page "https://pip.pypa.io/")
6394 (synopsis
6395 "Package manager for Python software")
6396 (description
6397 "Pip is a package manager for Python software, that finds packages on the
6398Python Package Index (PyPI).")
6399 (license license:expat)))
6400
6401(define-public python2-pip
6402 (package-with-python2 python-pip))
d8c4998f
LC
6403
6404(define-public python-tlsh
6405 (package
6406 (name "python-tlsh")
99b00dc7 6407 (version "3.4.4")
d8c4998f
LC
6408 (home-page "https://github.com/trendmicro/tlsh")
6409 (source (origin
99b00dc7
EF
6410 (method url-fetch)
6411 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6412 version ".tar.gz"))
d8c4998f
LC
6413 (sha256
6414 (base32
99b00dc7
EF
6415 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6416 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6417 (build-system cmake-build-system)
6418 (arguments
6419 '(#:out-of-source? #f
6420 #:phases (modify-phases %standard-phases
6421 (replace
6422 'install
6423 (lambda* (#:key outputs #:allow-other-keys)
6424 ;; Build and install the Python bindings. The underlying
6425 ;; C++ library is apparently not meant to be installed.
6426 (let ((out (assoc-ref outputs "out")))
6427 (with-directory-excursion "py_ext"
6428 (and (system* "python" "setup.py" "build")
6429 (system* "python" "setup.py" "install"
6430 (string-append "--prefix=" out))))))))))
6431 (inputs `(("python" ,python-wrapper))) ;for the bindings
6432 (synopsis "Fuzzy matching library for Python")
6433 (description
6434 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6435Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6436value which can be used for similarity comparisons. Similar objects have
6437similar hash values, which allows for the detection of similar objects by
6438comparing their hash values. The byte stream should have a sufficient amount
6439of complexity; for example, a byte stream of identical bytes will not generate
6440a hash value.")
3f641af0 6441 (license license:asl2.0)))
d8c4998f
LC
6442
6443(define-public python2-tlsh
6444 (package
6445 (inherit python-tlsh)
6446 (name "python2-tlsh")
6447 (inputs `(("python" ,python-2)))))
d96034ed 6448
67f66812
BW
6449(define-public python-termcolor
6450 (package
6451 (name "python-termcolor")
6452 (version "1.1.0")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "python-termcolor" version))
6457 (sha256
6458 (base32
6459 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6460 (build-system python-build-system)
6461 (arguments
6462 ;; There are no tests.
6463 `(#:tests? #f))
6464 (home-page "http://pypi.python.org/pypi/termcolor")
6465 (synopsis "ANSII Color formatting for terminal output")
6466 (description
6467 "This package provides ANSII Color formatting for output in terminals.")
6468 (license license:expat)))
6469
6470(define-public python2-termcolor
6471 (package-with-python2 python-termcolor))
6472
d96034ed
LC
6473(define-public python-libarchive-c
6474 (package
6475 (name "python-libarchive-c")
03fd001c 6476 (version "2.2")
d96034ed
LC
6477 (source (origin
6478 (method url-fetch)
03fd001c 6479 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6480 (sha256
6481 (base32
03fd001c 6482 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6483 (build-system python-build-system)
6484 (arguments
6485 '(#:phases (modify-phases %standard-phases
6486 (add-before
6487 'build 'reference-libarchive
6488 (lambda* (#:key inputs #:allow-other-keys)
6489 ;; Retain the absolute file name of libarchive.so.
6490 (let ((libarchive (assoc-ref inputs "libarchive")))
6491 (substitute* "libarchive/ffi.py"
6492 (("find_library\\('archive'\\)")
6493 (string-append "'" libarchive
b41a05ce 6494 "/lib/libarchive.so'")))))))))
d96034ed 6495 (inputs
f3b98f4f 6496 `(("libarchive" ,libarchive)))
d96034ed
LC
6497 (home-page "https://github.com/Changaco/python-libarchive-c")
6498 (synopsis "Python interface to libarchive")
6499 (description
6500 "This package provides Python bindings to libarchive, a C library to
6501access possibly compressed archives in many different formats. It uses
6502Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6503 (license license:lgpl2.0+)))
d96034ed
LC
6504
6505(define-public python2-libarchive-c
6506 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6507
6508(define-public python-file
6509 (package
6510 (inherit file)
6511 (name "python-file")
7ffa5d4a
LF
6512 (source (origin
6513 (inherit (package-source file))
6514 ;; This patch should not be applied to python2-file.
6515 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6516 (build-system python-build-system)
6517 (arguments
6518 '(#:tests? #f ;no tests
00bf74be 6519 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6520 #:phases (modify-phases %standard-phases
6521 (add-before 'build 'change-directory
6522 (lambda _
6523 (chdir "python")
6524 #t))
6525 (add-before 'build 'set-library-file-name
6526 (lambda* (#:key inputs #:allow-other-keys)
6527 (let ((file (assoc-ref inputs "file")))
6528 (substitute* "magic.py"
6529 (("find_library\\('magic'\\)")
6530 (string-append "'" file "/lib/libmagic.so'")))
6531 #t))))))
6532 (inputs `(("file" ,file)))
6533 (self-native-input? #f)
daeeea71
CM
6534 (synopsis "Python bindings to the libmagic file type guesser. Note that
6535this module and the python-magic module both provide a \"magic.py\" file;
6536these two modules, which are different and were developed separately, both
f210e944 6537serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6538
6539(define-public python2-file
f210e944 6540 (package-with-python2 python-file))
85d4aeac
LC
6541
6542(define-public python-debian
6543 (package
6544 (name "python-debian")
6545 (version "0.1.23")
6546 (source
6547 (origin
6548 (method url-fetch)
6549 (uri (string-append
6550 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6551 version ".tar.gz"))
6552 (sha256
6553 (base32
6554 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6555 (build-system python-build-system)
f22efa01 6556 (propagated-inputs
85d4aeac 6557 `(("python-six" ,python-six)))
85d4aeac
LC
6558 (home-page "http://packages.debian.org/sid/python-debian")
6559 (synopsis "Debian package related modules")
6560 (description
5c7bdc9a
LC
6561 ;; XXX: Use @enumerate instead of @itemize to work around
6562 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6563 "This package provides Python modules that abstract many formats of
6564Debian-related files, such as:
6565
5c7bdc9a 6566@enumerate
85d4aeac
LC
6567@item Debtags information;
6568@item @file{debian/changelog} files;
6569@item packages files, pdiffs;
6570@item control files of single or multiple RFC822-style paragraphs---e.g.
6571 @file{debian/control}, @file{.changes}, @file{.dsc};
6572@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6573 contained files and meta-information.
5c7bdc9a 6574@end enumerate\n")
85d4aeac
LC
6575
6576 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6577 (license license:gpl3+)))
85d4aeac
LC
6578
6579(define-public python2-debian
6580 (package-with-python2 python-debian))
816a6538 6581
2d321bb2
RW
6582(define-public python-nbformat
6583 (package
6584 (name "python-nbformat")
6585 (version "4.1.0")
6586 (source
6587 (origin
6588 (method url-fetch)
6589 (uri (pypi-uri "nbformat" version))
6590 (sha256
6591 (base32
6592 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6593 (build-system python-build-system)
6594 (arguments `(#:tests? #f)) ; no test target
6595 (propagated-inputs
6596 `(("python-ipython-genutils" ,python-ipython-genutils)
6597 ("python-jsonschema" ,python-jsonschema)
6598 ("python-jupyter-core" ,python-jupyter-core)
6599 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6600 (home-page "http://jupyter.org")
6601 (synopsis "Jupyter Notebook format")
6602 (description "This package provides the reference implementation of the
6603Jupyter Notebook format and Python APIs for working with notebooks.")
6604 (license license:bsd-3)))
6605
6606(define-public python2-nbformat
6607 (package-with-python2 python-nbformat))
6608
55436048
RW
6609(define-public python-bleach
6610 (package
6611 (name "python-bleach")
6612 (version "1.4.3")
6613 (source
6614 (origin
6615 (method url-fetch)
6616 (uri (pypi-uri "bleach" version))
6617 (sha256
6618 (base32
6619 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6620 (build-system python-build-system)
6621 (propagated-inputs
6622 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6623 ("python-six" ,python-six)))
6624 (native-inputs
6625 `(("python-nose" ,python-nose)))
6626 (home-page "http://github.com/jsocol/bleach")
6627 (synopsis "Whitelist-based HTML-sanitizing tool")
6628 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6629 (license license:asl2.0)))
6630
6631(define-public python2-bleach
6632 (package-with-python2 python-bleach))
6633
60590a3a
RW
6634(define-public python-entrypoints
6635 (package
6636 (name "python-entrypoints")
6637 (version "0.2.2")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6642 version ".tar.gz"))
6643 (file-name (string-append name "-" version ".tar.gz"))
6644 (sha256
6645 (base32
6646 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6647 (build-system python-build-system)
6648 ;; The package does not come with a setup.py file, so we have to generate
6649 ;; one ourselves.
6650 (arguments
6651 `(#:tests? #f
6652 #:phases
6653 (modify-phases %standard-phases
6654 (add-after 'unpack 'create-setup.py
6655 (lambda _
6656 (call-with-output-file "setup.py"
6657 (lambda (port)
6658 (format port "\
6659from setuptools import setup
6660setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6661" ,version))))))))
6662 (home-page "https://github.com/takluyver/entrypoints")
6663 (synopsis "Discover and load entry points from installed Python packages")
6664 (description "Entry points are a way for Python packages to advertise
6665objects with some common interface. The most common examples are
6666@code{console_scripts} entry points, which define shell commands by
6667identifying a Python function to run. The @code{entrypoints} module contains
6668functions to find and load entry points.")
6669 (license license:expat)))
6670
6671(define-public python2-entrypoints
6672 (package-with-python2 python-entrypoints))
6673
c60898a8
RW
6674(define-public python-nbconvert
6675 (package
6676 (name "python-nbconvert")
6677 (version "5.0.0b1")
6678 (source
6679 (origin
6680 (method url-fetch)
6681 (uri (pypi-uri "nbconvert" version))
6682 (sha256
6683 (base32
6684 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6685 (build-system python-build-system)
6686 ;; The "bdist_egg" target is disabled by default, causing the installation
6687 ;; to fail.
6688 (arguments `(#:configure-flags (list "bdist_egg")))
6689 (propagated-inputs
6690 `(("python-bleach" ,python-bleach)
6691 ("python-entrypoints" ,python-entrypoints)
6692 ("python-jinja2" ,python-jinja2)
6693 ("python-jupyter-core" ,python-jupyter-core)
6694 ("python-mistune" ,python-mistune)
6695 ("python-nbformat" ,python-nbformat)
6696 ("python-pygments" ,python-pygments)
c60898a8
RW
6697 ("python-traitlets" ,python-traitlets)))
6698 (home-page "http://jupyter.org")
6699 (synopsis "Converting Jupyter Notebooks")
6700 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6701notebooks to various other formats via Jinja templates. It allows you to
6702convert an @code{.ipynb} notebook file into various static formats including:
6703
6704@enumerate
6705@item HTML
6706@item LaTeX
6707@item PDF
6708@item Reveal JS
6709@item Markdown (md)
6710@item ReStructured Text (rst)
6711@item executable script
6712@end enumerate\n")
6713 (license license:bsd-3)))
6714
6715(define-public python2-nbconvert
6716 (package-with-python2 python-nbconvert))
6717
a0d62280
RW
6718(define-public python-notebook
6719 (package
6720 (name "python-notebook")
6721 (version "4.2.3")
6722 (source (origin
6723 (method url-fetch)
6724 (uri (pypi-uri "notebook" version))
6725 (sha256
6726 (base32
6727 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6728 (build-system python-build-system)
6729 (arguments
6730 `(#:phases
6731 (modify-phases %standard-phases
6732 (replace 'check
6733 (lambda _
6734 ;; HOME must be set for tests
6735 (setenv "HOME" "/tmp")
6736 (zero? (system* "nosetests")))))))
6737 (propagated-inputs
6738 `(("python-jupyter-core" ,python-jupyter-core)
6739 ("python-nbformat" ,python-nbformat)
6740 ("python-nbconvert" ,python-nbconvert)
6741 ("python-ipython" ,python-ipython)))
6742 (native-inputs
6743 `(("python-nose" ,python-nose)
6744 ("python-sphinx" ,python-sphinx)
6745 ("python-requests" ,python-requests)))
6746 (home-page "http://jupyter.org/")
6747 (synopsis "Web-based notebook environment for interactive computing")
6748 (description
6749 "The Jupyter HTML notebook is a web-based notebook environment for
6750interactive computing.")
6751 (license license:bsd-3)))
6752
6753(define-public python2-notebook
6754 (package-with-python2 python-notebook))
6755
d55724ed
RW
6756(define-public python-widgetsnbextension
6757 (package
6758 (name "python-widgetsnbextension")
6759 (version "1.2.6")
6760 (source
6761 (origin
6762 (method url-fetch)
6763 (uri (pypi-uri "widgetsnbextension" version))
6764 (sha256
6765 (base32
6766 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6767 (build-system python-build-system)
6768 (propagated-inputs
6769 `(("python-notebook" ,python-notebook)))
6770 (native-inputs
f3b98f4f 6771 `(("python-nose" ,python-nose)))
d55724ed
RW
6772 (home-page "http://ipython.org")
6773 (synopsis "IPython HTML widgets for Jupyter")
6774 (description "This package provides interactive HTML widgets for Jupyter
6775notebooks.")
6776 (license license:bsd-3)))
6777
6778(define-public python2-widgetsnbextension
6779 (package-with-python2 python-widgetsnbextension))
6780
4fe2e344
RW
6781(define-public python-ipywidgets
6782 (package
6783 (name "python-ipywidgets")
6784 (version "5.2.2")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "ipywidgets" version))
6789 (sha256
6790 (base32
6791 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6792 (build-system python-build-system)
6793 ;; FIXME: it's not clear how to run the tests.
6794 (arguments `(#:tests? #f))
6795 (propagated-inputs
6796 `(("python-ipykernel" ,python-ipykernel)
6797 ("python-ipython" ,python-ipython)
4fe2e344
RW
6798 ("python-traitlets" ,python-traitlets)
6799 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6800 (home-page "http://ipython.org")
6801 (synopsis "IPython HTML widgets for Jupyter")
6802 (description "Ipywidgets are interactive HTML widgets for Jupyter
6803notebooks and the IPython kernel. Notebooks come alive when interactive
6804widgets are used. Users gain control of their data and can visualize changes
6805in the data.")
6806 (license license:bsd-3)))
6807
6808(define-public python2-ipywidgets
6809 (package-with-python2 python-ipywidgets))
6810
8ceebf8f
RW
6811(define-public python-jupyter-console
6812 (package
6813 (name "python-jupyter-console")
6814 (version "5.0.0")
6815 (source
6816 (origin
6817 (method url-fetch)
6818 (uri (pypi-uri "jupyter_console" version))
6819 (sha256
6820 (base32
6821 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6822 (build-system python-build-system)
6823 ;; FIXME: it's not clear how to run the tests.
6824 (arguments `(#:tests? #f))
6825 (propagated-inputs
6826 `(("python-ipykernel" ,python-ipykernel)
6827 ("python-ipython" ,python-ipython)
6828 ("python-jupyter-client" ,python-jupyter-client)
6829 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 6830 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
6831 (home-page "https://jupyter.org")
6832 (synopsis "Jupyter terminal console")
6833 (description "This package provides a terminal-based console frontend for
6834Jupyter kernels. It also allows for console-based interaction with non-Python
6835Jupyter kernels such as IJulia and IRKernel.")
6836 (license license:bsd-3)))
6837
6838(define-public python2-jupyter-console
6839 (package-with-python2 python-jupyter-console))
6840
c27ae827
RW
6841(define-public jupyter
6842 (package
6843 (name "jupyter")
6844 (version "1.0.0")
6845 (source
6846 (origin
6847 (method url-fetch)
6848 (uri (pypi-uri "jupyter" version))
6849 (sha256
6850 (base32
6851 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6852 (build-system python-build-system)
6853 ;; FIXME: it's not clear how to run the tests.
6854 (arguments `(#:tests? #f))
6855 (propagated-inputs
6856 `(("python-ipykernel" ,python-ipykernel)
6857 ("python-ipywidgets" ,python-ipywidgets)
6858 ("python-jupyter-console" ,python-jupyter-console)
6859 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 6860 ("python-notebook" ,python-notebook)))
c27ae827
RW
6861 (home-page "http://jupyter.org")
6862 (synopsis "Web application for interactive documents")
6863 (description
6864 "The Jupyter Notebook is a web application that allows you to create and
6865share documents that contain live code, equations, visualizations and
6866explanatory text. Uses include: data cleaning and transformation, numerical
6867simulation, statistical modeling, machine learning and much more.")
6868 (license license:bsd-3)))
6869
816a6538
LC
6870(define-public python-chardet
6871 (package
6872 (name "python-chardet")
6873 (version "2.3.0")
6874 (source
6875 (origin
6876 (method url-fetch)
6877 (uri (string-append
6878 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6879 version
6880 ".tar.gz"))
6881 (sha256
6882 (base32
6883 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6884 (build-system python-build-system)
816a6538
LC
6885 (home-page "https://github.com/chardet/chardet")
6886 (synopsis "Universal encoding detector for Python 2 and 3")
6887 (description
6888 "This package provides @code{chardet}, a Python module that can
6889automatically detect a wide range of file encodings.")
3f641af0 6890 (license license:lgpl2.1+)))
816a6538
LC
6891
6892(define-public python2-chardet
6893 (package-with-python2 python-chardet))
2fc5f186 6894
1872f1bb
KM
6895(define-public python-docopt
6896 (package
6897 (name "python-docopt")
6898 (version "0.6.2")
6899 (source
6900 (origin
6901 (method url-fetch)
6902 ;; The release on PyPI does not include tests.
6903 (uri (string-append
6904 "https://github.com/docopt/docopt/archive/"
6905 version ".tar.gz"))
6906 (file-name (string-append name "-" version ".tar.gz"))
6907 (sha256
6908 (base32
6909 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6910 (build-system python-build-system)
6911 (native-inputs
f3b98f4f 6912 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
6913 (arguments
6914 `(#:phases (alist-replace
6915 'check
6916 (lambda _ (zero? (system* "py.test")))
6917 %standard-phases)))
6918 (home-page "http://docopt.org")
6919 (synopsis "Command-line interface description language for Python")
6920 (description "This library allows the user to define a command-line
6921interface from a program's help message rather than specifying it
6922programatically with command-line parsers like @code{getopt} and
6923@code{argparse}.")
6924 (license license:expat)))
6925
6926(define-public python2-docopt
6927 (package-with-python2 python-docopt))
6928
2fc5f186
LF
6929(define-public python-zope-event
6930 (package
6931 (name "python-zope-event")
6932 (version "4.1.0")
6933 (source
6934 (origin
6935 (method url-fetch)
6936 (uri (string-append "https://pypi.python.org/packages/source/z"
6937 "/zope.event/zope.event-" version ".tar.gz"))
6938 (sha256
6939 (base32
6940 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6941 (build-system python-build-system)
2fc5f186
LF
6942 (home-page "http://pypi.python.org/pypi/zope.event")
6943 (synopsis "Event publishing system for Python")
6944 (description "Zope.event provides an event publishing API, intended for
6945use by applications which are unaware of any subscribers to their events. It
6946is a simple event-dispatching system on which more sophisticated event
6947dispatching systems can be built.")
3f641af0 6948 (license license:zpl2.1)))
2fc5f186
LF
6949
6950(define-public python2-zope-event
6951 (package-with-python2 python-zope-event))
97abe268
LF
6952
6953(define-public python-zope-interface
6954 (package
6955 (name "python-zope-interface")
6956 (version "4.1.3")
6957 (source
6958 (origin
6959 (method url-fetch)
6960 (uri (string-append "https://pypi.python.org/packages/source/z"
6961 "/zope.interface/zope.interface-" version ".tar.gz"))
6962 (sha256
6963 (base32
6964 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6965 (build-system python-build-system)
6966 (propagated-inputs
6967 `(("python-zope-event" ,python-zope-event)))
6968 (home-page "https://github.com/zopefoundation/zope.interface")
6969 (synopsis "Python implementation of the \"design by contract\"
6970methodology")
6971 (description "Zope.interface provides an implementation of \"object
6972interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6973conforming to a given API or contract.")
3f641af0 6974 (license license:zpl2.1)))
97abe268
LF
6975
6976(define-public python2-zope-interface
6977 (package-with-python2 python-zope-interface))
81f2373c
LF
6978
6979(define-public python-zope-exceptions
6980 (package
6981 (name "python-zope-exceptions")
6982 (version "4.0.8")
6983 (source
6984 (origin
6985 (method url-fetch)
6986 (uri (string-append "https://pypi.python.org/packages/source/z"
6987 "/zope.exceptions/zope.exceptions-"
6988 version ".tar.gz"))
6989 (sha256
6990 (base32
6991 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6992 (build-system python-build-system)
6993 (arguments
6994 '(#:tests? #f)) ; circular dependency with zope.testrunner
6995 (propagated-inputs
6996 `(("python-zope-interface" ,python-zope-interface)))
6997 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6998 (synopsis "Zope exceptions")
6999 (description "Zope.exceptions provides general-purpose exception types
7000that have uses outside of the Zope framework.")
3f641af0 7001 (license license:zpl2.1)))
81f2373c
LF
7002
7003(define-public python2-zope-exceptions
7004 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7005
7006(define-public python-zope-testing
7007 (package
7008 (name "python-zope-testing")
7009 (version "4.5.0")
7010 (source
7011 (origin
7012 (method url-fetch)
7013 (uri (string-append "https://pypi.python.org/packages/source/z"
7014 "/zope.testing/zope.testing-" version ".tar.gz"))
7015 (sha256
7016 (base32
b02f7a21
HG
7017 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7018 (modules '((guix build utils)))
7019 (snippet
7020 '(begin
7021 ;; Remove pre-compiled .pyc files backup files from source.
7022 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7023 #t))))
900e3c0e
LF
7024 (build-system python-build-system)
7025 (native-inputs
7026 `(("python-zope-exceptions" ,python-zope-exceptions)))
7027 (propagated-inputs
7028 `(("python-zope-interface" ,python-zope-interface)))
7029 (home-page "http://pypi.python.org/pypi/zope.testing")
7030 (synopsis "Zope testing helpers")
7031 (description "Zope.testing provides a number of testing utilities for HTML
7032forms, HTTP servers, regular expressions, and more.")
3f641af0 7033 (license license:zpl2.1)))
900e3c0e
LF
7034
7035(define-public python2-zope-testing
7036 (package-with-python2 python-zope-testing))
01614c4f
LF
7037
7038(define-public python-zope-testrunner
7039 (package
7040 (name "python-zope-testrunner")
7041 (version "4.4.9")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (string-append "https://pypi.python.org/packages/source/z"
7046 "/zope.testrunner/zope.testrunner-"
7047 version ".zip"))
7048 (sha256
7049 (base32
7050 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7051 (build-system python-build-system)
7052 (native-inputs
7053 `(("python-six" ,python-six)
e408ffc3 7054 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7055 ("python-zope-exceptions" ,python-zope-exceptions)
7056 ("python-zope-testing" ,python-zope-testing)
7057 ("unzip" ,unzip)))
7058 (propagated-inputs
7059 `(("python-zope-interface" ,python-zope-interface)))
7060 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7061 (synopsis "Zope testrunner script")
7062 (description "Zope.testrunner provides a script for running Python
7063tests.")
3f641af0 7064 (license license:zpl2.1)))
01614c4f
LF
7065
7066(define-public python2-zope-testrunner
7067 (let ((base (package-with-python2 python-zope-testrunner)))
7068 (package
7069 (inherit base)
7070 (native-inputs
7071 (append (package-native-inputs base)
7072 `(("python2-subunit" ,python2-subunit)
7073 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7074
7075(define-public python-zope-i18nmessageid
7076 (package
7077 (name "python-zope-i18nmessageid")
7078 (version "4.0.3")
7079 (source
7080 (origin
7081 (method url-fetch)
7082 (uri (string-append
7083 "https://pypi.python.org/packages/source/z"
7084 "/zope.i18nmessageid/zope.i18nmessageid-"
7085 version ".tar.gz"))
7086 (sha256
7087 (base32
7088 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7089 (build-system python-build-system)
6a5c710c
LF
7090 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7091 (synopsis "Message identifiers for internationalization")
7092 (description "Zope.i18nmessageid provides facilities for declaring
7093internationalized messages within program source text.")
3f641af0 7094 (license license:zpl2.1)))
6a5c710c
LF
7095
7096(define-public python2-zope-i18nmessageid
7097 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7098
7099(define-public python-zope-schema
7100 (package
7101 (name "python-zope-schema")
7102 (version "4.4.2")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (string-append "https://pypi.python.org/packages/source/z"
7107 "/zope.schema/zope.schema-" version ".tar.gz"))
7108 (sha256
7109 (base32
7110 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7111 (build-system python-build-system)
7112 (propagated-inputs
7113 `(("python-zope-event" ,python-zope-event)
7114 ("python-zope-interface" ,python-zope-interface)))
7115 (native-inputs
47f77210
HG
7116 `(("python-zope-testing" ,python-zope-testing)
7117 ("python-coverage" ,python-coverage)
7118 ("python-nose" ,python-nose)))
71fb09f3
LF
7119 (home-page "http://pypi.python.org/pypi/zope.schema")
7120 (synopsis "Zope data schemas")
7121 (description "Zope.scheme provides extensions to zope.interface for
7122defining data schemas.")
3f641af0 7123 (license license:zpl2.1)))
71fb09f3
LF
7124
7125(define-public python2-zope-schema
7126 (package-with-python2 python-zope-schema))
fbac9b17
LF
7127
7128(define-public python-zope-configuration
7129 (package
7130 (name "python-zope-configuration")
7131 (version "4.0.3")
7132 (source (origin
7133 (method url-fetch)
7134 (uri (string-append "https://pypi.python.org/packages/source/z"
7135 "/zope.configuration/zope.configuration-"
7136 version ".tar.gz"))
7137 (sha256
7138 (base32
7139 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7140 (build-system python-build-system)
7141 (propagated-inputs
7142 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7143 ("python-zope-schema" ,python-zope-schema)))
7144 (home-page "http://pypi.python.org/pypi/zope.configuration")
7145 (synopsis "Zope Configuration Markup Language")
7146 (description "Zope.configuration implements ZCML, the Zope Configuration
7147Markup Language.")
3f641af0 7148 (license license:zpl2.1)))
fbac9b17
LF
7149
7150(define-public python2-zope-configuration
7151 (package-with-python2 python-zope-configuration))
2ad52086
LF
7152
7153(define-public python-zope-proxy
7154 (package
7155 (name "python-zope-proxy")
7156 (version "4.1.6")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (string-append "https://pypi.python.org/packages/source/z"
7161 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7162 (sha256
7163 (base32
7164 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7165 (build-system python-build-system)
7166 (propagated-inputs
7167 `(("python-zope-interface" ,python-zope-interface)))
7168 (home-page "http://pypi.python.org/pypi/zope.proxy")
7169 (synopsis "Generic, transparent proxies")
7170 (description "Zope.proxy provides generic, transparent proxies for Python.
7171Proxies are special objects which serve as mostly-transparent wrappers around
7172another object, intervening in the apparent behavior of the wrapped object
7173only when necessary to apply the policy (e.g., access checking, location
7174brokering, etc.) for which the proxy is responsible.")
3f641af0 7175 (license license:zpl2.1)))
2ad52086
LF
7176
7177(define-public python2-zope-proxy
7178 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7179
7180(define-public python-zope-location
7181 (package
7182 (name "python-zope-location")
7183 (version "4.0.3")
7184 (source
7185 (origin
7186 (method url-fetch)
7187 (uri (string-append "https://pypi.python.org/packages/source/z"
7188 "/zope.location/zope.location-" version ".tar.gz"))
7189 (sha256
7190 (base32
7191 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7192 (build-system python-build-system)
7193 (native-inputs
7194 `(("python-zope-proxy" ,python-zope-proxy)
7195 ("python-zope-schema" ,python-zope-schema)))
7196 (home-page "http://pypi.python.org/pypi/zope.location/")
7197 (synopsis "Zope location library")
7198 (description "Zope.location implements the concept of \"locations\" in
7199Zope3, which are are special objects that have a structural location.")
3f641af0 7200 (license license:zpl2.1)))
f404b5ea
LF
7201
7202(define-public python2-zope-location
7203 (package-with-python2 python-zope-location))
d4b77f36
LF
7204
7205(define-public python-zope-security
7206 (package
7207 (name "python-zope-security")
7208 (version "4.0.3")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (string-append "https://pypi.python.org/packages/source/z"
7213 "/zope.security/zope.security-" version ".tar.gz"))
7214 (sha256
7215 (base32
7216 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7217 (build-system python-build-system)
7218 (propagated-inputs
7219 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7220 ("python-zope-component" ,python-zope-component)
7221 ("python-zope-location" ,python-zope-location)
7222 ("python-zope-proxy" ,python-zope-proxy)
7223 ("python-zope-schema" ,python-zope-schema)
7224 ("python-zope-testrunner" ,python-zope-testrunner)
7225 ("python-zope-testing" ,python-zope-testing)))
7226 (home-page "http://pypi.python.org/pypi/zope.security")
7227 (synopsis "Zope security framework")
7228 (description "Zope.security provides a generic mechanism to implement
7229security policies on Python objects.")
3f641af0 7230 (license license:zpl2.1)))
d4b77f36
LF
7231
7232(define-public python2-zope-security
04417662
EF
7233 (let ((zope-security (package-with-python2 python-zope-security)))
7234 (package (inherit zope-security)
7235 (propagated-inputs
7236 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7237 ,@(alist-delete
7238 "python-zope-testrunner"
7239 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7240
7241(define-public python-zope-component
7242 (package
7243 (name "python-zope-component")
7244 (version "4.2.2")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (string-append "https://pypi.python.org/packages/source/z"
7249 "/zope.component/zope.component-" version ".tar.gz"))
7250 (sha256
7251 (base32
7252 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7253 (build-system python-build-system)
7254 (arguments
7255 ;; Skip tests due to circular dependency with python-zope-security.
7256 '(#:tests? #f))
7257 (native-inputs
7258 `(("python-zope-testing" ,python-zope-testing)))
7259 (propagated-inputs
7260 `(("python-zope-event" ,python-zope-event)
7261 ("python-zope-interface" ,python-zope-interface)
7262 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7263 ("python-zope-configuration" ,python-zope-configuration)))
7264 (home-page "https://github.com/zopefoundation/zope.component")
7265 (synopsis "Zope Component Architecture")
7266 (description "Zope.component represents the core of the Zope Component
7267Architecture. Together with the zope.interface package, it provides
7268facilities for defining, registering and looking up components.")
3f641af0 7269 (license license:zpl2.1)))
a6b61b27
LF
7270
7271(define-public python2-zope-component
7272 (package-with-python2 python-zope-component))
3859ac12 7273
1ae44b80 7274(define-public python-pythondialog
b5f218be 7275 (package
1ae44b80 7276 (name "python-pythondialog")
42c4b246 7277 (version "3.4.0")
b5f218be
LF
7278 (source
7279 (origin
7280 (method url-fetch)
1ae44b80 7281 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7282 (sha256
7283 (base32
1ae44b80 7284 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7285 (build-system python-build-system)
7286 (arguments
7287 `(#:phases
7288 (modify-phases %standard-phases
7289 (add-after 'unpack 'patch-path
7290 (lambda* (#:key inputs #:allow-other-keys)
7291 (let* ((dialog (assoc-ref inputs "dialog")))
7292 ;; Since this library really wants to grovel the search path, we
7293 ;; must hardcode dialog's store path into it.
7294 (substitute* "dialog.py"
7295 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7296 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7297 #t))))
b5f218be
LF
7298 #:tests? #f)) ; no test suite
7299 (propagated-inputs
7300 `(("dialog" ,dialog)))
7301 (home-page "http://pythondialog.sourceforge.net/")
7302 (synopsis "Python interface to the UNIX dialog utility")
7303 (description "A Python wrapper for the dialog utility. Its purpose is to
7304provide an easy to use, pythonic and comprehensive Python interface to dialog.
7305This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7306 (license license:lgpl2.1)
1ae44b80
LF
7307 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7308
7309(define-public python2-pythondialog
7310 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7311 (package
7312 (inherit base)
7313 (version (package-version python-pythondialog))
7314 (source (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "python2-pythondialog" version))
7317 (sha256
7318 (base32
7319 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7320
3859ac12
LF
7321(define-public python-pyrfc3339
7322 (package
7323 (name "python-pyrfc3339")
d9aa097b 7324 (version "1.0")
3859ac12
LF
7325 (source
7326 (origin
7327 (method url-fetch)
d9aa097b 7328 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7329 (sha256
7330 (base32
d9aa097b 7331 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7332 (build-system python-build-system)
7333 (propagated-inputs
7334 `(("python-pytz" ,python-pytz)))
7335 (native-inputs
f3b98f4f 7336 `(("python-nose" ,python-nose)))
3859ac12
LF
7337 (home-page "https://github.com/kurtraschke/pyRFC3339")
7338 (synopsis "Python timestamp library")
7339 (description "Python library for generating and parsing RFC 3339-compliant
7340timestamps.")
7341 (license license:expat)))
7342
7343(define-public python2-pyrfc3339
7344 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7345
7346(define-public python-werkzeug
7347 (package
7348 (name "python-werkzeug")
0580e383 7349 (version "0.11.11")
5eea2005
LF
7350 (source
7351 (origin
7352 (method url-fetch)
4b47cbfa 7353 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7354 (sha256
7355 (base32
0580e383 7356 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7357 (build-system python-build-system)
7358 (native-inputs
7359 `(("python-pytest" ,python-pytest)))
7360 (home-page "http://werkzeug.pocoo.org/")
7361 (synopsis "Utilities for WSGI applications")
7362 (description "One of the most advanced WSGI utility modules. It includes a
7363powerful debugger, full-featured request and response objects, HTTP utilities to
7364handle entity tags, cache control headers, HTTP dates, cookie handling, file
7365uploads, a powerful URL routing system and a bunch of community-contributed
7366addon modules.")
3f641af0 7367 (license license:x11)))
5eea2005
LF
7368
7369(define-public python2-werkzeug
7370 (package-with-python2 python-werkzeug))
99fffa8a
LF
7371
7372(define-public python-configobj
7373 (package
7374 (name "python-configobj")
7375 (version "5.0.6")
7376 (source (origin
7377 (method url-fetch)
7378 (uri (string-append
7379 "https://pypi.python.org/packages/source/c/configobj/"
7380 "configobj-" version ".tar.gz"))
7381 (sha256
7382 (base32
7383 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7384 ;; Patch setup.py so it looks for python-setuptools, which is
7385 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7386 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7387 (build-system python-build-system)
7388 (native-inputs
f3b98f4f 7389 `(("python-six" ,python-six)))
99fffa8a
LF
7390 (synopsis "Config file reading, writing and validation")
7391 (description "ConfigObj is a simple but powerful config file reader and
7392writer: an ini file round tripper. Its main feature is that it is very easy to
7393use, with a straightforward programmer’s interface and a simple syntax for
7394config files.")
7395 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7396 (license license:bsd-3)))
99fffa8a
LF
7397
7398(define-public python2-configobj
7399 (package-with-python2 python-configobj))
79e8a291
LF
7400
7401(define-public python-configargparse
7402 (package
7403 (name "python-configargparse")
7404 (version "0.10.0")
7405 (source (origin
7406 (method url-fetch)
7407 (uri (string-append
7408 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7409 "ConfigArgParse-" version ".tar.gz"))
7410 (sha256
7411 (base32
7412 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7413 (build-system python-build-system)
7414 (arguments
7415 ;; FIXME: Bug in test suite filed upstream:
7416 ;; https://github.com/bw2/ConfigArgParse/issues/32
7417 '(#:tests? #f))
7418 (synopsis "Replacement for argparse")
7419 (description "A drop-in replacement for argparse that allows options to also
7420be set via config files and/or environment variables.")
7421 (home-page "https://github.com/bw2/ConfigArgParse")
7422 (license license:expat)))
7423
7424(define-public python2-configargparse
7425 (package-with-python2 python-configargparse))
ab41f979
LF
7426
7427(define-public python-ndg-httpsclient
7428 (package
7429 (name "python-ndg-httpsclient")
7430 (version "0.4.0")
7431 (source (origin
7432 (method url-fetch)
7433 (uri (string-append
7434 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7435 "ndg_httpsclient-" version ".tar.gz"))
7436 (sha256
7437 (base32
7438 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7439 (build-system python-build-system)
a39cc016
LF
7440 (arguments
7441 '(;; The tests appear to require networking.
7442 #:tests? #f))
ab41f979
LF
7443 (propagated-inputs
7444 `(("python-pyopenssl" ,python-pyopenssl)))
7445 (synopsis "HTTPS support for Python's httplib and urllib2")
7446 (description "This is a HTTPS client implementation for httplib and urllib2
7447based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7448over the default provided with Python and importantly enables full verification
7449of the SSL peer.")
7450 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7451 (license license:bsd-3)))
ab41f979
LF
7452
7453;; python2-openssl requires special care, so package-with-python2 is
7454;; insufficient.
7455(define-public python2-ndg-httpsclient
7456 (package (inherit python-ndg-httpsclient)
7457 (name "python2-ndg-httpsclient")
7458 (arguments `(#:python ,python-2))
7459 (propagated-inputs
7460 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7461
7462(define-public python-contextlib2
7463 (package
7464 (name "python-contextlib2")
7465 (version "0.4.0")
7466 (source
7467 (origin
7468 (method url-fetch)
7469 (uri (pypi-uri "contextlib2" version))
7470 (sha256
7471 (base32
7472 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7473 (build-system python-build-system)
7474 (arguments
7475 `(#:phases
7476 (modify-phases %standard-phases
7477 (replace 'check
7478 (lambda _ (zero?
7479 (system*
b3546174 7480 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7481 (home-page "http://contextlib2.readthedocs.org/")
7482 (synopsis "Tools for decorators and context managers")
7483 (description "This module is primarily a backport of the Python
74843.2 contextlib to earlier Python versions. Like contextlib, it
7485provides utilities for common tasks involving decorators and context
7486managers. It also contains additional features that are not part of
7487the standard library.")
3f641af0 7488 (license license:psfl)))
03f964a5
CM
7489
7490(define-public python2-contextlib2
7491 (package-with-python2 python-contextlib2))
210bf497
DT
7492
7493(define-public python-texttable
7494 (package
7495 (name "python-texttable")
7496 (version "0.8.4")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "texttable" version))
7501 (sha256
7502 (base32
7503 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7504 (build-system python-build-system)
7505 (arguments '(#:tests? #f)) ; no tests
7506 (home-page "https://github.com/foutaise/texttable/")
7507 (synopsis "Python module for creating simple ASCII tables")
7508 (description "Texttable is a Python module for creating simple ASCII
7509tables.")
3f641af0 7510 (license license:lgpl2.1+)))
210bf497
DT
7511
7512(define-public python2-texttable
7513 (package-with-python2 python-texttable))
67c52bb3
DT
7514
7515(define-public python-websocket-client
7516 (package
7517 (name "python-websocket-client")
6b810897 7518 (version "0.37.0")
67c52bb3
DT
7519 (source
7520 (origin
7521 (method url-fetch)
6b810897 7522 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7523 (sha256
7524 (base32
6b810897 7525 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7526 (build-system python-build-system)
7527 (native-inputs
7528 `(("python-six" ,python-six))) ; for tests
67c52bb3
DT
7529 (home-page "https://github.com/liris/websocket-client")
7530 (synopsis "WebSocket client for Python")
7531 (description "The Websocket-client module provides the low level APIs for
7532WebSocket usage in Python programs.")
3f641af0 7533 (license license:lgpl2.1+)))
67c52bb3
DT
7534
7535(define-public python2-websocket-client
7536 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7537
7538(define-public python-atomicwrites
7539 (package
7540 (name "python-atomicwrites")
4e92d76a 7541 (version "1.1.0")
5c6eea2a
LF
7542 (source (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "atomicwrites" version))
7545 (sha256
7546 (base32
4e92d76a 7547 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7548 (build-system python-build-system)
7549 (synopsis "Atomic file writes in Python")
7550 (description "Library for atomic file writes using platform dependent tools
8f65585b 7551for atomic file system operations.")
5c6eea2a 7552 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7553 (license license:expat)))
9bb6d184
LF
7554
7555(define-public python2-atomicwrites
f210e944 7556 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7557
7558(define-public python-requests-toolbelt
7559 (package
7560 (name "python-requests-toolbelt")
c02af1c8 7561 (version "0.6.2")
561bb3cb
LF
7562 (source (origin
7563 (method url-fetch)
c02af1c8
LF
7564 (uri (string-append
7565 "https://pypi.python.org/packages/"
7566 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7567 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7568 (sha256
7569 (base32
c02af1c8 7570 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7571 (build-system python-build-system)
759aadd4
LF
7572 (native-inputs
7573 `(("python-betamax" ,python-betamax)
7574 ("python-mock" ,python-mock)
7575 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7576 (propagated-inputs
7577 `(("python-requests" ,python-requests)))
7578 (synopsis "Extensions to python-requests")
7579 (description "This is a toolbelt of useful classes and functions to be used
7580with python-requests.")
7581 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7582 (license license:asl2.0)))
d1deb90b
LF
7583
7584(define-public python-click-threading
7585 (package
7586 (name "python-click-threading")
3d2e0dbc 7587 (version "0.2.0")
d1deb90b
LF
7588 (source (origin
7589 (method url-fetch)
3d2e0dbc
LF
7590 (uri (string-append
7591 "https://pypi.python.org/packages/"
7592 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7593 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7594 (sha256
7595 (base32
3d2e0dbc 7596 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7597 (build-system python-build-system)
7598 (propagated-inputs
7599 `(("python-click" ,python-click)))
7600 (synopsis "Utilities for multithreading in Click")
7601 (description "This package provides utilities for multithreading in Click
7602applications.")
7603 (home-page "https://github.com/click-contrib/click-threading")
7604 (license license:expat)))
7b17cab9
LF
7605
7606(define-public python-click-log
7607 (package
7608 (name "python-click-log")
a9da8fec 7609 (version "0.1.3")
7b17cab9
LF
7610 (source (origin
7611 (method url-fetch)
7612 (uri (pypi-uri "click-log" version))
7613 (sha256
7614 (base32
a9da8fec 7615 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7616 (build-system python-build-system)
7617 (propagated-inputs
7618 `(("python-click" ,python-click)))
7619 (synopsis "Logging for click applications")
7620 (description "This package provides a Python library for logging Click
7621applications.")
7622 (home-page "https://github.com/click-contrib/click-log")
7623 (license license:expat)))
7b3a4ee4
LF
7624
7625(define-public python-apipkg
7626 (package
7627 (name "python-apipkg")
7628 (version "1.4")
7629 (source (origin
7630 (method url-fetch)
7631 (uri (pypi-uri "apipkg" version))
7632 (sha256
7633 (base32
7634 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7635 (build-system python-build-system)
328bb95d 7636 (native-inputs
7b3a4ee4
LF
7637 `(("python-pytest" ,python-pytest)))
7638 (synopsis "Namespace control and lazy-import mechanism")
7639 (description "With apipkg you can control the exported namespace of a Python
7640package and greatly reduce the number of imports for your users. It is a small
7641pure Python module that works on virtually all Python versions.")
7642 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7643 (license license:expat)))
e08739c3
CAW
7644
7645(define-public python2-apipkg
f210e944 7646 (package-with-python2 python-apipkg))
848964fe
LF
7647
7648(define-public python-execnet
7649 (package
7650 (name "python-execnet")
7651 (version "1.4.1")
7652 (source (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "execnet" version))
7655 (sha256
7656 (base32
7657 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7658 (build-system python-build-system)
ca0eee9d
LF
7659 (arguments
7660 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7661 ;; The two test failures are caused by the lack of an `ssh` executable.
7662 ;; The test suite can be run with pytest after the 'install' phase.
7663 #:tests? #f))
848964fe 7664 (native-inputs
ca0eee9d
LF
7665 `(("python-pytest" ,python-pytest)
7666 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7667 (propagated-inputs
848964fe
LF
7668 `(("python-apipkg" ,python-apipkg)))
7669 (synopsis "Rapid multi-Python deployment")
7670 (description "Execnet provides a share-nothing model with
7671channel-send/receive communication for distributing execution across many
7672Python interpreters across version, platform and network barriers. It has a
7673minimal and fast API targetting the following uses:
7674@enumerate
7675@item distribute tasks to (many) local or remote CPUs
7676@item write and deploy hybrid multi-process applications
7677@item write scripts to administer multiple environments
7678@end enumerate")
7679 (home-page "http://codespeak.net/execnet/")
f210e944 7680 (license license:expat)))
16c84f90
CAW
7681
7682(define-public python2-execnet
f210e944 7683 (package-with-python2 python-execnet))
6720dbb4
LF
7684
7685;;; The software provided by this package was integrated into pytest 2.8.
7686(define-public python-pytest-cache
7687 (package
7688 (name "python-pytest-cache")
7689 (version "1.0")
7690 (source (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "pytest-cache" version))
7693 (sha256
7694 (base32
7695 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7696 (build-system python-build-system)
f22efa01 7697 (propagated-inputs
630d938f
EF
7698 `(("python-apipkg" ,python-apipkg)
7699 ("python-execnet" ,python-execnet)
7700 ("python-py" ,python-py)
7701 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7702 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7703 (description "The pytest-cache plugin provides tools to rerun failures from
7704the last py.test invocation.")
7705 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7706 (license license:expat)))
0adc21c2
EF
7707
7708(define-public python2-pytest-cache
f210e944 7709 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7710
7711(define-public python-pytest-localserver
7712 (package
7713 (name "python-pytest-localserver")
29f20168 7714 (version "0.3.5")
d7e729fe
LF
7715 (source (origin
7716 (method url-fetch)
29f20168 7717 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7718 (sha256
7719 (base32
29f20168 7720 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7721 (build-system python-build-system)
7722 (arguments
7723 `(#:phases (modify-phases %standard-phases
7724 (replace 'check
7725 (lambda _
7726 (zero? (system* "py.test" "--genscript=runtests.py"))
7727 (zero? (system* "py.test")))))))
7728 (native-inputs
d7e729fe
LF
7729 `(("python-pytest" ,python-pytest)
7730 ("python-requests" ,python-requests)
9ba40f05 7731 ("python-six" ,python-six)))
f22efa01 7732 (propagated-inputs
9ba40f05 7733 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7734 (synopsis "Py.test plugin to test server connections locally")
7735 (description "Pytest-localserver is a plugin for the pytest testing
7736framework which enables you to test server connections locally.")
7737 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7738 (license license:expat)))
28cecbb7
LF
7739
7740(define-public python-wsgi-intercept
7741 (package
7742 (name "python-wsgi-intercept")
909fbd2b 7743 (version "1.2.2")
28cecbb7
LF
7744 (source (origin
7745 (method url-fetch)
909fbd2b
LF
7746 (uri (string-append
7747 "https://pypi.python.org/packages/"
7748 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7749 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7750 (sha256
7751 (base32
909fbd2b 7752 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7753 (build-system python-build-system)
7754 (native-inputs
9d813ec1 7755 `(("python-pytest" ,python-pytest)
8757f050
LF
7756 ("python-six" ,python-six)
7757 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
7758 (propagated-inputs
7759 `(("python-httplib2" ,python-httplib2)
7760 ("python-requests" ,python-requests)))
7761 (synopsis "Puts a WSGI application in place of a real URI for testing")
7762 (description "Wsgi_intercept installs a WSGI application in place of a real
7763URI for testing. Testing a WSGI application normally involves starting a
7764server at a local host and port, then pointing your test code to that address.
7765Instead, this library lets you intercept calls to any specific host/port
7766combination and redirect them into a WSGI application importable by your test
7767program. Thus, you can avoid spawning multiple processes or threads to test
7768your Web app.")
7769 (home-page "https://github.com/cdent/wsgi-intercept")
7770 (license license:expat)))
89b8a551
LF
7771
7772(define-public python-pytest-xprocess
7773 (package
7774 (name "python-pytest-xprocess")
7775 (version "0.9.1")
7776 (source (origin
7777 (method url-fetch)
7778 (uri (pypi-uri "pytest-xprocess" version))
7779 (sha256
7780 (base32
7781 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7782 (build-system python-build-system)
7783 (propagated-inputs
7784 `(("python-pytest" ,python-pytest)
7785 ("python-pytest-cache" ,python-pytest-cache)
7786 ("python-psutil" ,python-psutil)))
7787 (synopsis "Pytest plugin to manage external processes across test runs")
7788 (description "Pytest-xprocess is an experimental py.test plugin for managing
7789processes across test runs.")
7790 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7791 (license license:expat)))
5c299bf0
LF
7792
7793(define-public python-icalendar
7794 (package
7795 (name "python-icalendar")
f2f53353 7796 (version "3.10")
5c299bf0
LF
7797 (source (origin
7798 (method url-fetch)
7799 (uri (pypi-uri "icalendar" version))
7800 (sha256
7801 (base32
f2f53353 7802 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7803 (build-system python-build-system)
7804 (propagated-inputs
7805 `(("python-dateutil-2" ,python-dateutil-2)
7806 ("python-pytz" ,python-pytz)))
7807 (synopsis "Python library for parsing iCalendar files")
7808 (description "The icalendar package is a parser/generator of iCalendar
7809files for use with Python.")
7810 (home-page "https://github.com/collective/icalendar")
3f641af0 7811 (license license:bsd-2)))
6bbbb53e
LF
7812
7813(define-public python-sphinxcontrib-newsfeed
7814 (package
7815 (name "python-sphinxcontrib-newsfeed")
7816 (version "0.1.4")
7817 (source (origin
7818 (method url-fetch)
7819 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7820 (sha256
7821 (base32
7822 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7823 (build-system python-build-system)
7824 (propagated-inputs
7825 `(("python-docutils" ,python-docutils)
7826 ("python-sphinx" ,python-sphinx)))
7827 (synopsis "News Feed extension for Sphinx")
7828 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7829Blog, News or Announcements section to a Sphinx website.")
7830 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7831 (license license:bsd-2)))
2216e15c
SB
7832
7833(define-public python-args
7834 (package
7835 (name "python-args")
7836 (version "0.1.0")
7837 (source (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "args" version))
7840 (sha256
7841 (base32
7842 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7843 (build-system python-build-system)
2216e15c
SB
7844 (home-page "https://github.com/kennethreitz/args")
7845 (synopsis "Command-line argument parser")
7846 (description
7847 "This library provides a Python module to parse command-line arguments.")
3f641af0 7848 (license license:bsd-3)))
2216e15c
SB
7849
7850(define-public python2-args
7851 (package-with-python2 python-args))
c06a3de9
SB
7852
7853(define-public python-clint
7854 (package
7855 (name "python-clint")
7856 (version "0.5.1")
7857 (source (origin
7858 (method url-fetch)
7859 (uri (pypi-uri "clint" version))
7860 (sha256
7861 (base32
7862 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7863 (build-system python-build-system)
f22efa01 7864 (propagated-inputs
f3b98f4f 7865 `(("python-args" ,python-args)))
c06a3de9
SB
7866 (home-page "https://github.com/kennethreitz/clint")
7867 (synopsis "Command-line interface tools")
7868 (description
7869 "Clint is a Python module filled with a set of tools for developing
7870command-line applications, including tools for colored and indented
7871output, progress bar display, and pipes.")
3f641af0 7872 (license license:isc)))
c06a3de9
SB
7873
7874(define-public python2-clint
7875 (package-with-python2 python-clint))
4ecdeef8
SB
7876
7877(define-public python-astor
7878 (package
7879 (name "python-astor")
7880 (version "0.5")
7881 (source (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "astor" version))
7884 (sha256
7885 (base32
7886 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7887 (build-system python-build-system)
4ecdeef8
SB
7888 (home-page "https://github.com/berkerpeksag/astor")
7889 (synopsis "Read and write Python ASTs")
7890 (description
7891 "Astor is designed to allow easy manipulation of Python source via the
7892Abstract Syntax Tree.")
3f641af0 7893 (license license:bsd-3)))
4ecdeef8
SB
7894
7895(define-public python2-astor
7896 (package-with-python2 python-astor))
e224b7d0
SB
7897
7898(define-public python-rply
7899 (package
7900 (name "python-rply")
7901 (version "0.7.4")
7902 (source (origin
7903 (method url-fetch)
7904 (uri (pypi-uri "rply" version))
7905 (sha256
7906 (base32
7907 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7908 (build-system python-build-system)
f22efa01 7909 (propagated-inputs
f3b98f4f 7910 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
7911 (home-page "https://github.com/alex/rply")
7912 (synopsis "Parser generator for Python")
7913 (description
7914 "This package provides a pure Python based parser generator, that also
7915works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7916with a new public API, and RPython support.")
3f641af0 7917 (license license:bsd-3)))
e224b7d0
SB
7918
7919(define-public python2-rply
7920 (package-with-python2 python-rply))
c3e919d7
SB
7921
7922(define-public python-hy
7923 (package
7924 (name "python-hy")
7925 (version "0.11.1")
7926 (source (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "hy" version))
7929 (sha256
7930 (base32
7931 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7932 (build-system python-build-system)
f22efa01 7933 (propagated-inputs
c3e919d7
SB
7934 `(("python-astor" ,python-astor)
7935 ("python-clint" ,python-clint)
f3b98f4f 7936 ("python-rply" ,python-rply)))
c3e919d7
SB
7937 (home-page "http://hylang.org/")
7938 (synopsis "Lisp frontend to Python")
7939 (description
7940 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7941its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7942Python at your fingertips, in Lisp form.")
7943 (license license:expat)))
7944
7945(define-public python2-hy
7946 (package-with-python2 python-hy))
7a5b944e 7947
81f7f297
EF
7948(define-public python-rauth
7949 (package
7950 (name "python-rauth")
7951 (version "0.7.2")
7952 (source
7953 (origin
7954 (method url-fetch)
7955 (uri (pypi-uri "rauth" version))
7956 (sha256
7957 (base32
7958 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7959 (build-system python-build-system)
7960 (arguments
7961 `(#:test-target "check"))
f22efa01 7962 (propagated-inputs
81f7f297
EF
7963 `(("python-requests" ,python-requests)))
7964 (home-page "https://github.com/litl/rauth")
7965 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7966 (description
7967 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7968provides service wrappers for convenient connection initialization and
7969authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7970 (license license:expat)
7971 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7972
7973(define-public python2-rauth
0848d8d3
EF
7974 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7975 (package
7976 (inherit base)
00e10c6e 7977 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 7978 ,@(package-native-inputs base))))))
81f7f297 7979
1abe448d
EF
7980(define-public python2-functools32
7981 (package
7982 (name "python2-functools32")
7983 (version "3.2.3-2")
7984 (source
7985 (origin
7986 (method url-fetch)
7987 (uri (pypi-uri "functools32" version))
7988 (sha256
7989 (base32
7990 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7991 (build-system python-build-system)
7992 (arguments
7993 `(#:python ,python-2
7994 #:tests? #f)) ; no test target
1abe448d
EF
7995 (home-page "https://github.com/MiCHiLU/python-functools32")
7996 (synopsis
7997 "Backport of the functools module from Python 3.2.3")
7998 (description
7999 "This package is a backport of the @code{functools} module from Python
80003.2.3 for use with older versions of Python and PyPy.")
8001 (license license:expat)))
8002
877889f3 8003(define-public python2-futures
7a5b944e 8004 (package
877889f3 8005 (name "python2-futures")
7a5b944e
EF
8006 (version "3.0.3")
8007 (source
8008 (origin
8009 (method url-fetch)
8010 (uri (pypi-uri "futures" version))
8011 (sha256
8012 (base32
8013 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8014 (build-system python-build-system)
877889f3 8015 (arguments `(#:python ,python-2))
7a5b944e
EF
8016 (home-page "https://github.com/agronholm/pythonfutures")
8017 (synopsis
8018 "Backport of the concurrent.futures package from Python 3.2")
8019 (description
8020 "The concurrent.futures module provides a high-level interface for
8021asynchronously executing callables. This package backports the
8022concurrent.futures package from Python 3.2")
3f641af0 8023 (license license:bsd-3)))
7a5b944e 8024
5cb2fe44
EF
8025(define-public python-promise
8026 (package
8027 (name "python-promise")
8028 (version "0.4.2")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "promise" version))
8033 (sha256
8034 (base32
8035 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8036 (build-system python-build-system)
8037 ;; Tests wants python-futures, which is a python2 only program, and
8038 ;; can't be found by python-promise at test time.
8039 (arguments `(#:tests? #f))
8040 (home-page "https://github.com/syrusakbary/promise")
8041 (synopsis "Promises/A+ implementation for Python")
8042 (description
8043 "Promises/A+ implementation for Python")
8044 (properties `((python2-variant . ,(delay python2-promise))))
8045 (license license:expat)))
8046
8047(define-public python2-promise
8048 (let ((promise (package-with-python2
8049 (strip-python2-variant python-promise))))
8050 (package (inherit promise)
8051 (arguments (substitute-keyword-arguments (package-arguments promise)
8052 ((#:tests? _) #t)))
8053 (native-inputs
8054 `(("python2-futures" ,python2-futures)
8055 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8056 ,@(package-native-inputs promise))))))
8057
c18f6368
EF
8058(define-public python-urllib3
8059 (package
8060 (name "python-urllib3")
6178274d 8061 (version "1.18.1")
c18f6368
EF
8062 (source
8063 (origin
8064 (method url-fetch)
8065 (uri (pypi-uri "urllib3" version))
8066 (sha256
8067 (base32
6178274d 8068 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8069 (build-system python-build-system)
8070 (arguments `(#:tests? #f))
8071 (native-inputs
f3b98f4f 8072 `(;; some packages for tests
c18f6368
EF
8073 ("python-nose" ,python-nose)
8074 ("python-mock" ,python-mock)
8075 ("python-tornado" ,python-tornado)))
8076 (propagated-inputs
8077 `(;; packages for https security
8078 ("python-certifi" ,python-certifi)
8079 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8080 ("python-pyasn1" ,python-pyasn1)
8081 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8082 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8083 (synopsis "HTTP library with thread-safe connection pooling")
8084 (description
8085 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8086can reuse the same socket connection for multiple requests, it can POST files,
8087supports url redirection and retries, and also gzip and deflate decoding.")
8088 (license license:expat)))
8089
8090(define-public python2-urllib3
8091 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8092
8093(define-public python-colorama
8094 (package
8095 (name "python-colorama")
8096 (version "0.3.3")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "colorama" version))
8101 (sha256
8102 (base32
8103 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8104 (build-system python-build-system)
2b2f2fc1
DT
8105 (synopsis "colored terminal text rendering for Python")
8106 (description "Colorama is a Python library for rendering colored terminal
8107text.")
8108 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8109 (license license:bsd-3)))
2b2f2fc1
DT
8110
8111(define-public python2-colorama
8112 (package-with-python2 python-colorama))
f5bcec6e
DT
8113
8114(define-public python-rsa
8115 (package
8116 (name "python-rsa")
ecd68c53 8117 (version "3.4.2")
f5bcec6e
DT
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "rsa" version))
8122 (sha256
8123 (base32
ecd68c53 8124 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8125 (build-system python-build-system)
f22efa01 8126 (propagated-inputs
f3b98f4f 8127 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8128 (synopsis "Pure-Python RSA implementation")
8129 (description "Python-RSA is a pure-Python RSA implementation. It supports
8130encryption and decryption, signing and verifying signatures, and key
8131generation according to PKCS#1 version 1.5. It can be used as a Python
8132library as well as on the command line.")
8133 (home-page "http://stuvel.eu/rsa")
3f641af0 8134 (license license:asl2.0)))
f5bcec6e
DT
8135
8136(define-public python2-rsa
8137 (package-with-python2 python-rsa))
c0aacfa5
DT
8138
8139(define-public python-pluggy
8140 (package
8141 (name "python-pluggy")
8142 (version "0.3.1")
8143 (source
8144 (origin
8145 (method url-fetch)
8146 (uri (pypi-uri "pluggy" version))
8147 (sha256
8148 (base32
8149 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8150 (build-system python-build-system)
c0aacfa5
DT
8151 (synopsis "Plugin and hook calling mechanism for Python")
8152 (description "Pluggy is an extraction of the plugin manager as used by
8153Pytest but stripped of Pytest specific details.")
8154 (home-page "https://pypi.python.org/pypi/pluggy")
8155 (license license:expat)))
8156
8157(define-public python2-pluggy
8158 (package-with-python2 python-pluggy))
a4af21ca
DT
8159
8160(define-public python-tox
8161 (package
8162 (name "python-tox")
8163 (version "2.3.1")
8164 (source
8165 (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "tox" version))
8168 (sha256
8169 (base32
8170 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8171 (build-system python-build-system)
8172 (arguments
8173 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8174 ;; pytest breaks other packages.
8175 '(#:tests? #f))
482d9591
HG
8176 (propagated-inputs
8177 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8178 ("python-py" ,python-py)
482d9591 8179 ("python-virtualenv" ,python-virtualenv)))
328bb95d
HG
8180 (native-inputs
8181 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8182 (home-page "http://tox.testrun.org/")
8183 (synopsis "Virtualenv-based automation of test activities")
8184 (description "Tox is a generic virtualenv management and test command line
8185tool. It can be used to check that a package installs correctly with
8186different Python versions and interpreters, or run tests in each type of
8187supported environment, or act as a frontend to continuous integration
8188servers.")
8189 (license license:expat)))
8190
8191(define-public python2-tox
8192 (package-with-python2 python-tox))
ba9da248
DT
8193
8194(define-public python-jmespath
8195 (package
8196 (name "python-jmespath")
8197 (version "0.9.0")
8198 (source
8199 (origin
8200 (method url-fetch)
8201 (uri (pypi-uri "jmespath" version))
8202 (sha256
8203 (base32
8204 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8205 (build-system python-build-system)
ba9da248
DT
8206 (synopsis "JSON Matching Expressions")
8207 (description "JMESPath (pronounced “james path”) is a Python library that
8208allows one to declaratively specify how to extract elements from a JSON
8209document.")
8210 (home-page "https://github.com/jmespath/jmespath.py")
8211 (license license:expat)))
8212
8213(define-public python2-jmespath
8214 (package-with-python2 python-jmespath))
935fcd5c
DT
8215
8216(define-public python-botocore
8217 (package
8218 (name "python-botocore")
e09f952d 8219 (version "1.4.62")
935fcd5c
DT
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "botocore" version))
8224 (sha256
8225 (base32
e09f952d 8226 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8227 (build-system python-build-system)
482d9591 8228 (propagated-inputs
935fcd5c
DT
8229 `(("python-dateutil" ,python-dateutil-2)
8230 ("python-docutils" ,python-docutils)
482d9591
HG
8231 ("python-jmespath" ,python-jmespath)))
8232 (inputs
8233 `(("python-mock" ,python-mock)
935fcd5c 8234 ("python-nose" ,python-nose)
482d9591 8235 ("behave" ,behave)
935fcd5c 8236 ("python-tox" ,python-tox)
482d9591 8237 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8238 (home-page "https://github.com/boto/botocore")
8239 (synopsis "Low-level interface to AWS")
8240 (description "Botocore is a Python library that provides a low-level
8241interface to the Amazon Web Services (AWS) API.")
3f641af0 8242 (license license:asl2.0)))
935fcd5c
DT
8243
8244(define-public python2-botocore
8245 (package-with-python2 python-botocore))
f861b8b8
DT
8246
8247(define-public awscli
8248 (package
8249 (name "awscli")
d5ccf71e 8250 (version "1.11.5")
f861b8b8
DT
8251 (source
8252 (origin
8253 (method url-fetch)
d5ccf71e 8254 (uri (pypi-uri name version))
f861b8b8
DT
8255 (sha256
8256 (base32
d5ccf71e 8257 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8258 (build-system python-build-system)
482d9591 8259 (propagated-inputs
f861b8b8 8260 `(("python-colorama" ,python-colorama)
482d9591
HG
8261 ("python-botocore" ,python-botocore)
8262 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8263 ("python-docutils" ,python-docutils)
482d9591
HG
8264 ("python-rsa" ,python-rsa)))
8265 (inputs
8266 `(("python-mock" ,python-mock)
f861b8b8 8267 ("python-nose" ,python-nose)
f861b8b8
DT
8268 ("python-sphinx" ,python-sphinx)
8269 ("python-tox" ,python-tox)
482d9591 8270 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8271 (home-page "http://aws.amazon.com/cli/")
8272 (synopsis "Command line client for AWS")
8273 (description "AWS CLI provides a unified command line interface to the
8274Amazon Web Services (AWS) API.")
3f641af0 8275 (license license:asl2.0)))
6a44697d
LF
8276
8277(define-public python-hypothesis
8278 (package
8279 (name "python-hypothesis")
bea6d94d 8280 (version "3.1.0")
6a44697d
LF
8281 (source (origin
8282 (method url-fetch)
8283 (uri (pypi-uri "hypothesis" version))
8284 (sha256
8285 (base32
bea6d94d 8286 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8287 (build-system python-build-system)
6a44697d
LF
8288 (propagated-inputs
8289 `(("python-flake8" ,python-flake8)
8290 ("python-pytest" ,python-pytest)))
8291 (synopsis "Library for property based testing")
8292 (description "Hypothesis is a library for testing your Python code against a
8293much larger range of examples than you would ever want to write by hand. It’s
8294based on the Haskell library, Quickcheck, and is designed to integrate
8295seamlessly into your existing Python unit testing work flow.")
8296 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8297 (license license:mpl2.0)
6f068e08 8298 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8299
8300(define-public python2-hypothesis
6f068e08
EF
8301 (let ((hypothesis (package-with-python2
8302 (strip-python2-variant python-hypothesis))))
8303 (package (inherit hypothesis)
8304 (native-inputs
f3b98f4f 8305 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8306
8307(define-public python-pytest-subtesthack
8308 (package
8309 (name "python-pytest-subtesthack")
8310 (version "0.1.1")
8311 (source (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "pytest-subtesthack" version))
8314 (sha256
8315 (base32
8316 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8317 (build-system python-build-system)
7517e73c
LF
8318 (propagated-inputs
8319 `(("python-pytest" ,python-pytest)))
8320 (synopsis "Set-up and tear-down fixtures for unit tests")
8321 (description "This plugin allows you to set up and tear down fixtures within
8322unit test functions that use @code{py.test}. This is useful for using
8323@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8324function multiple times, without setting up or tearing down fixture state as is
8325normally the case.")
8326 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8327 (license license:unlicense)))
7517e73c
LF
8328
8329(define-public python2-pytest-subtesthack
8330 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8331
8332(define-public python2-xdo
8333 (package
8334 (name "python2-xdo")
8335 (version "0.2")
8336 (source (origin
8337 (method url-fetch)
8338 (uri (string-append
8339 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8340 "python-xdo_" version ".orig.tar.gz"))
8341 (sha256
8342 (base32
8343 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8344 (build-system python-build-system)
8345 (arguments
8346 `(#:python ,python-2
8347 #:tests? #f)) ; no tests provided
8348 (inputs
8349 `(("xdotool" ,xdotool)
8350 ("libX11" ,libx11)))
8351 (home-page "https://tracker.debian.org/pkg/python-xdo")
8352 (synopsis "Python library for simulating X11 keyboard/mouse input")
8353 (description "Provides bindings to libxdo for manipulating X11 via simulated
8354input. (Note that this is mostly a legacy library; you may wish to look at
8355python-xdo for newer bindings.)")
3f641af0 8356 (license license:bsd-3)))
0bdc1671 8357
cb34dc6c
CAW
8358(define-public python-wtforms
8359 (package
8360 (name "python-wtforms")
8361 (version "2.1")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "WTForms" version ".zip"))
8366 (sha256
8367 (base32
8368 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8369 (build-system python-build-system)
13c4d874
EF
8370 (arguments
8371 '(#:phases
8372 (modify-phases %standard-phases
8373 (add-after 'unpack 'remove-django-test
8374 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8375 (lambda _
8376 (substitute*
8377 "tests/runtests.py"
8378 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8379 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8380 #t)))))
cb34dc6c
CAW
8381 (native-inputs
8382 `(("unzip" ,unzip)))
8383 (home-page "http://wtforms.simplecodes.com/")
8384 (synopsis
8385 "Form validation and rendering library for Python web development")
8386 (description
8387 "WTForms is a flexible forms validation and rendering library
8388for Python web development. It is very similar to the web form API
8389available in Django, but is a standalone package.")
f210e944 8390 (license license:bsd-3)))
cb34dc6c
CAW
8391
8392(define-public python2-wtforms
f210e944 8393 (package-with-python2 python-wtforms))
50aaec25
DT
8394
8395(define-public python-mako
8396 (package
8397 (name "python-mako")
8398 (version "1.0.3")
8399 (source
8400 (origin
8401 (method url-fetch)
8402 (uri (pypi-uri "Mako" version))
8403 (sha256
8404 (base32
8405 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8406 (build-system python-build-system)
482d9591
HG
8407 (propagated-inputs
8408 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8409 (native-inputs
482d9591 8410 `(("python-mock" ,python-mock)
50aaec25
DT
8411 ("python-nose" ,python-nose)))
8412 (home-page "http://www.makotemplates.org/")
8413 (synopsis "Templating language for Python")
8414 (description "Mako is a templating language for Python that compiles
8415templates into Python modules.")
f210e944 8416 (license license:expat)))
50aaec25
DT
8417
8418(define-public python2-mako
f210e944 8419 (package-with-python2 python-mako))
ae00a41f
CAW
8420
8421(define-public python-waitress
8422 (package
8423 (name "python-waitress")
8424 (version "0.8.10")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "waitress" version))
8429 (sha256
8430 (base32
8431 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8432 (build-system python-build-system)
8433 (home-page "https://github.com/Pylons/waitress")
8434 (synopsis "Waitress WSGI server")
8435 (description "Waitress is meant to be a production-quality pure-Python WSGI
8436server with very acceptable performance.")
f210e944 8437 (license license:zpl2.1)))
ae00a41f
CAW
8438
8439(define-public python2-waitress
f210e944 8440 (package-with-python2 python-waitress))
778a284b
CAW
8441
8442(define-public python-wsgiproxy2
8443 (package
8444 (name "python-wsgiproxy2")
8445 (version "0.4.2")
8446 (source
8447 (origin
8448 (method url-fetch)
8449 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8450 (sha256
8451 (base32
8452 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8453 (build-system python-build-system)
e359b31a
LF
8454 (arguments
8455 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8456 ;; support Python 3:
8457 ;; https://github.com/benoitc/restkit/issues/140
8458 #:tests? #f))
778a284b
CAW
8459 (native-inputs
8460 `(("unzip" ,unzip)
8461 ("python-nose" ,python-nose)
8462 ("python-coverage" ,python-coverage)))
8463 (propagated-inputs
8464 `(("python-six" ,python-six)
8465 ("python-webob" ,python-webob)))
8466 (home-page
8467 "https://github.com/gawel/WSGIProxy2/")
8468 (synopsis "WSGI Proxy with various http client backends")
8469 (description "WSGI turns HTTP requests into WSGI function calls.
8470WSGIProxy turns WSGI function calls into HTTP requests.
8471It also includes code to sign requests and pass private data,
8472and to spawn subprocesses to handle requests.")
f210e944 8473 (license license:expat)))
778a284b
CAW
8474
8475(define-public python2-wsgiproxy2
f210e944 8476 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8477
8478(define-public python-pastedeploy
8479 (package
8480 (name "python-pastedeploy")
8481 (version "1.5.2")
8482 (source
8483 (origin
8484 (method url-fetch)
8485 (uri (pypi-uri "PasteDeploy" version))
8486 (sha256
8487 (base32
8488 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8489 (build-system python-build-system)
8490 (native-inputs
8491 `(("python-nose" ,python-nose)))
f54d6bac 8492 ;; Note: setuptools used at runtime for pkg_resources
bb7518b1
CAW
8493 (home-page "http://pythonpaste.org/deploy/")
8494 (synopsis
8495 "Load, configure, and compose WSGI applications and servers")
8496 (description
8497 "This tool provides code to load WSGI applications and servers from URIs;
8498these URIs can refer to Python Eggs for INI-style configuration files. Paste
8499Script provides commands to serve applications based on this configuration
8500file.")
8501 (license license:expat)))
8502
8503(define-public python2-pastedeploy
8504 (package-with-python2 python-pastedeploy))
1cf53652 8505
c4a7904c
CAW
8506(define-public python-paste
8507 (package
8508 (name "python-paste")
8509 (version "2.0.2")
8510 (source
8511 (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "Paste" version))
8514 (sha256
8515 (base32
8516 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8517 (patches (search-patches "python-paste-remove-website-test.patch"
8518 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8519 (build-system python-build-system)
8520 (native-inputs
8521 `(("python-nose" ,python-nose)))
f3b98f4f 8522 ;; Note: setuptools used at runtime for pkg_resources
c4a7904c 8523 (propagated-inputs
f3b98f4f 8524 `(("python-six" ,python-six)))
c4a7904c
CAW
8525 (arguments
8526 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8527 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8528 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8529 ;; still... things should be better by the next Paste release.)
8530 #:tests? #f))
8531 (home-page "http://pythonpaste.org")
8532 (synopsis
8533 "Python web development tools, focusing on WSGI")
8534 (description
8535 "Paste provides a variety of web development tools and middleware which
8536can be nested together to build web applications. Paste's design closely
8537follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8538 (license license:expat)
8539 (properties `((python2-variant . ,(delay python2-paste))))))
8540
8541(define-public python2-paste
8542 (let ((paste (package-with-python2
8543 (strip-python2-variant python-paste))))
8544 (package
8545 (inherit paste)
8546 (arguments
8547 ;; Tests are back for Python 2!
8548 `(#:tests? #t
8549 ,@(package-arguments paste))))))
8550
a8f20f63
CAW
8551(define-public python-pastescript
8552 (package
8553 (name "python-pastescript")
8554 (version "2.0.2")
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "PasteScript" version))
8559 (sha256
8560 (base32
8561 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8562 (build-system python-build-system)
8563 (native-inputs
8564 `(("python-nose" ,python-nose)))
f3b98f4f 8565 ;; Note: setuptools used at runtime for pkg_resources
a8f20f63 8566 (propagated-inputs
f3b98f4f 8567 `(("python-paste" ,python-paste)
a8f20f63
CAW
8568 ("python-pastedeploy" ,python-pastedeploy)))
8569 (home-page "http://pythonpaste.org/script/")
8570 (arguments
8571 '(;; Unfortunately, this requires the latest unittest2,
8572 ;; but that requires traceback2 which requires linecache2 which requires
8573 ;; unittest2. So we're skipping tests for now.
8574 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8575 ;; so in theory we could get around this situation somehow.)
8576 #:tests? #f))
8577 (synopsis
8578 "Pluggable command line tool for serving web applications and more")
8579 (description
8580 "PasteScript is a plugin-friendly command line tool which provides a
8581variety of features, from launching web applications to bootstrapping project
8582layouts.")
8583 (license license:expat)))
8584
8585(define-public python2-pastescript
8586 (package-with-python2 python-pastescript))
8587
1cf53652
CAW
8588(define-public python-pyquery
8589 (package
8590 (name "python-pyquery")
aab76e80 8591 (version "1.2.13")
1cf53652
CAW
8592 (source
8593 (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "pyquery" version))
8596 (sha256
8597 (base32
aab76e80 8598 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8599 (build-system python-build-system)
2ddbfa8c
LF
8600 (native-inputs
8601 `(("python-webob" ,python-webob)
8602 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8603 (propagated-inputs
8604 `(("python-lxml" ,python-lxml)
8605 ("python-cssselect" ,python-cssselect)))
8606 (home-page "https://github.com/gawel/pyquery")
8607 (synopsis "Make jQuery-like queries on xml documents")
8608 (description "pyquery allows you to make jQuery queries on xml documents.
8609The API is as much as possible the similar to jQuery. pyquery uses lxml for
8610fast xml and html manipulation.")
f210e944 8611 (license license:bsd-3)))
1cf53652
CAW
8612
8613(define-public python2-pyquery
f210e944 8614 (package-with-python2 python-pyquery))
aa6313d6
CAW
8615
8616(define-public python-webtest
8617 (package
8618 (name "python-webtest")
8619 (version "2.0.20")
8620 (source
8621 (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "WebTest" version))
8624 (sha256
8625 (base32
8626 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8627 (build-system python-build-system)
8628 (arguments
8629 `(;; Unfortunately we have to disable tests!
8630 ;; This release of WebTest is pinned to python-nose < 1.3,
8631 ;; but older versions of python-nose are plagued with the following
8632 ;; bug(s), which rears its ugly head during test execution:
8633 ;; https://github.com/nose-devs/nose/issues/759
8634 ;; https://github.com/nose-devs/nose/pull/811
8635 #:tests? #f))
8636 ;; Commented out code is no good, but in this case, once tests
8637 ;; are ready to be enabled again, we should put the following
8638 ;; in place:
8639 ;; (native-inputs
8640 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8641 ;; ; but see above comment
8642 ;; ("python-coverage" ,python-coverage)
8643 ;; ("python-mock" ,python-mock)
8644 ;; ("python-pastedeploy" ,python-pastedeploy)
8645 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8646 ;; ("python-pyquery" ,python-pyquery)))
8647 (propagated-inputs
8648 `(("python-waitress" ,python-waitress)
8649 ("python-webob" ,python-webob)
8650 ("python-six" ,python-six)
8651 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8652 (home-page "http://webtest.pythonpaste.org/")
8653 (synopsis "Helper to test WSGI applications")
8654 (description "Webtest allows you to test your Python web applications
8655without starting an HTTP server. It supports anything that supports the
8656minimum of WSGI.")
f210e944 8657 (license license:expat)))
aa6313d6
CAW
8658
8659(define-public python2-webtest
f210e944 8660 (package-with-python2 python-webtest))
4cb122cd
CAW
8661
8662(define-public python-anyjson
8663 (package
8664 (name "python-anyjson")
8665 (version "0.3.3")
8666 (source
8667 (origin
8668 (method url-fetch)
8669 (uri (pypi-uri "anyjson" version))
8670 (sha256
8671 (base32
8672 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8673 (build-system python-build-system)
8674 (arguments
8675 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8676 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8677 ;; whatever) so this transformation needs to be done before the tests
8678 ;; can be run. Maybe we could add a build step to transform beforehand
8679 ;; but it could be annoying/difficult.
8680 ;; We can enable tests for the Python 2 version, though, and do below.
8681 #:tests? #f))
8682 (home-page "http://bitbucket.org/runeh/anyjson/")
8683 (synopsis
8684 "Wraps best available JSON implementation in a common interface")
8685 (description
8686 "Anyjson loads whichever is the fastest JSON module installed
8687and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8688 (license license:bsd-3)
4cb122cd
CAW
8689 (properties `((python2-variant . ,(delay python2-anyjson))))))
8690
8691(define-public python2-anyjson
8692 (let ((anyjson (package-with-python2
8693 (strip-python2-variant python-anyjson))))
8694 (package
8695 (inherit anyjson)
8696 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8697 #:tests? #t
8698 ,@(package-arguments anyjson)))
00e10c6e 8699 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8700
8701(define-public python-amqp
8702 (package
8703 (name "python-amqp")
8704 (version "1.4.9")
8705 (source
8706 (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "amqp" version))
8709 (sha256
8710 (base32
8711 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8712 (build-system python-build-system)
8713 (native-inputs
8714 `(("python-nose" ,python-nose)
8715 ("python-mock" ,python-mock)))
8716 (home-page "http://github.com/celery/py-amqp")
8717 (synopsis
8718 "Low-level AMQP client for Python (fork of amqplib)")
8719 (description
8720 "This is a fork of amqplib which was originally written by Barry Pederson.
8721It is maintained by the Celery project, and used by kombu as a pure python
8722alternative when librabbitmq is not available.")
3f641af0 8723 (license license:lgpl2.1+)
8dfceab7
CAW
8724 (properties `((python2-variant . ,(delay python2-amqp))))))
8725
8726(define-public python2-amqp
8727 (let ((amqp (package-with-python2
8728 (strip-python2-variant python-amqp))))
8729 (package
8730 (inherit amqp)
8731 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8732 ;; unmaintained. Weirdly, does not do this on the python 3
8733 ;; version?
8734 #:tests? #f
00e10c6e 8735 ,@(package-arguments amqp))))))
7d387305
CAW
8736
8737(define-public python-kombu
8738 (package
8739 (name "python-kombu")
0cb59822 8740 (version "3.0.37")
7d387305
CAW
8741 (source
8742 (origin
8743 (method url-fetch)
8744 (uri (pypi-uri "kombu" version))
8745 (sha256
8746 (base32
0cb59822 8747 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8748 (build-system python-build-system)
8749 (native-inputs
8750 `(("python-mock" ,python-mock)
8751 ("python-nose" ,python-nose)))
8752 (propagated-inputs
8753 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8754 ("python-amqp" ,python-amqp)
8755 ("python-redis" ,python-redis)))
7d387305
CAW
8756 (home-page "http://kombu.readthedocs.org")
8757 (synopsis "Message passing library for Python")
8758 (description "The aim of Kombu is to make messaging in Python as easy as
8759possible by providing an idiomatic high-level interface for the AMQ protocol,
8760and also provide proven and tested solutions to common messaging problems.
8761AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8762message orientation, queuing, routing, reliability and security, for which the
8763RabbitMQ messaging server is the most popular implementation.")
3f641af0 8764 (license license:bsd-3)
7d387305
CAW
8765 (properties `((python2-variant . ,(delay python2-kombu))))))
8766
8767(define-public python2-kombu
8768 (let ((kombu (package-with-python2
8769 (strip-python2-variant python-kombu))))
8770 (package
8771 (inherit kombu)
328bb95d
HG
8772 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8773 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
8774
8775(define-public python-billiard
8776 (package
8777 (name "python-billiard")
a6bb9e44 8778 (version "3.3.0.23")
b6f0b9fb
CAW
8779 (source
8780 (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "billiard" version))
8783 (sha256
8784 (base32
a6bb9e44 8785 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
8786 (build-system python-build-system)
8787 (native-inputs
8788 `(("python-nose" ,python-nose)))
8789 (home-page "http://github.com/celery/billiard")
8790 (synopsis
8791 "Python multiprocessing fork with improvements and bugfixes")
8792 (description
8793 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8794multiprocessing package itself is a renamed and updated version of R Oudkerk's
8795pyprocessing package. This standalone variant is intended to be compatible with
8796Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8797 (license license:bsd-3)
b6f0b9fb
CAW
8798 (properties `((python2-variant . ,(delay python2-billiard))))))
8799
8800(define-public python2-billiard
8801 (let ((billiard (package-with-python2
8802 (strip-python2-variant python-billiard))))
8803 (package
8804 (inherit billiard)
00e10c6e 8805 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
8806 ("python2-mock" ,python2-mock)
8807 ,@(package-native-inputs billiard))))))
22df6419
CAW
8808
8809(define-public python-celery
8810 (package
8811 (name "python-celery")
9ebe87fe 8812 (version "3.1.24")
22df6419
CAW
8813 (source
8814 (origin
8815 (method url-fetch)
8816 (uri (pypi-uri "celery" version))
8817 (sha256
8818 (base32
9ebe87fe 8819 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 8820 (build-system python-build-system)
9ebe87fe
LF
8821 (arguments
8822 `(#:phases
8823 (modify-phases %standard-phases
8824 ;; These tests break with Python 3.5:
8825 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8826 (replace 'check
8827 (lambda _
8828 (zero?
8829 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
8830 (native-inputs
8831 `(("python-nose" ,python-nose)))
f22efa01 8832 (propagated-inputs
22df6419 8833 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8834 ("python-amqp" ,python-amqp)
8835 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8836 ("python-billiard" ,python-billiard)
8837 ("python-kombu" ,python-kombu)))
8838 (home-page "http://celeryproject.org")
8839 (synopsis "Distributed Task Queue")
8840 (description "Celery is an asynchronous task queue/job queue based on
8841distributed message passing. It is focused on real-time operation, but
8842supports scheduling as well. The execution units, called tasks, are executed
8843concurrently on a single or more worker servers using multiprocessing,
8844Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8845synchronously (wait until ready).")
3f641af0 8846 (license license:bsd-3)
22df6419
CAW
8847 (properties `((python2-variant . ,(delay python2-celery))))))
8848
8849(define-public python2-celery
8850 (let ((celery (package-with-python2
8851 (strip-python2-variant python-celery))))
8852 (package
8853 (inherit celery)
00e10c6e 8854 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
8855 ("python2-mock" ,python2-mock)
8856 ,@(package-native-inputs celery))))))
97e32948
CAW
8857
8858(define-public python-translitcodec
8859 (package
8860 (name "python-translitcodec")
8861 (version "0.4.0")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "translitcodec" version))
8866 (sha256
8867 (base32
8868 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8869 (build-system python-build-system)
8870 (arguments
8871 `(#:tests? #f)) ; no tests provided
8872 (home-page
8873 "https://github.com/claudep/translitcodec")
8874 (synopsis
8875 "Unicode to 8-bit charset transliteration codec")
8876 (description
8877 "This package contains codecs for transliterating ISO 10646 texts into
8878best-effort representations using smaller coded character sets (ASCII,
8879ISO 8859, etc.).")
f210e944 8880 (license license:expat)))
97e32948
CAW
8881
8882(define-public python2-translitcodec
f210e944 8883 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
8884
8885(define-public python-editor
8886 (package
8887 (name "python-editor")
8888 (version "0.5")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "python-editor" version))
8893 (sha256
8894 (base32
8895 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8896 (build-system python-build-system)
8897 (home-page
8898 "https://github.com/fmoo/python-editor")
8899 (synopsis
8900 "Programmatically open an editor, capture the result")
8901 (description
8902 "python-editor is a library that provides the editor module for
8903programmatically interfacing with your system's $EDITOR.")
f210e944 8904 (license license:asl2.0)))
0c3b90d4
CAW
8905
8906(define-public python2-editor
f210e944 8907 (package-with-python2 python-editor))
3276517c
LF
8908
8909(define-public python-sphinxcontrib-programoutput
8910 (package
8911 (name "python-sphinxcontrib-programoutput")
8912 (version "0.8")
8913 (source (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8916 (sha256
8917 (base32
8918 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8919 (build-system python-build-system)
8920 (propagated-inputs
8921 `(("python-docutils" ,python-docutils)
8922 ("python-sphinx" ,python-sphinx)))
8923 (synopsis "Sphinx extension to include program output")
8924 (description "A Sphinx extension to literally insert the output of arbitrary
8925commands into documents, helping you to keep your command examples up to date.")
8926 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 8927 (license license:bsd-2)))
3276517c
LF
8928
8929(define-public python2-sphinxcontrib-programoutput
f210e944 8930 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
8931
8932(define-public python-sphinx-repoze-autointerface
8933 (package
8934 (name "python-sphinx-repoze-autointerface")
328ae341 8935 (version "0.8")
548d7165
LF
8936 (source (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8939 (sha256
8940 (base32
328ae341 8941 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8942 (build-system python-build-system)
8943 (propagated-inputs
8944 `(("python-docutils" ,python-docutils)
8945 ("python-sphinx" ,python-sphinx)
8946 ("python-zope-interface" ,python-zope-interface)))
8947 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8948 (description "This package defines an extension for the Sphinx documentation
8949system. The extension allows generation of API documentation by
8950introspection of @code{zope.interface} instances in code.")
8951 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8952 (license license:repoze)))
548d7165
LF
8953
8954(define-public python2-sphinx-repoze-autointerface
8955 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8956
8957(define-public python-psycopg2
8958 (package
8959 (name "python-psycopg2")
8960 (version "2.6.1")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "psycopg2" version))
8965 (sha256
8966 (base32
8967 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8968 (build-system python-build-system)
8969 (arguments
8970 ;; Tests would require a postgresql database "psycopg2_test"
8971 ;; and a running postgresql database management service.
8972 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8973 (inputs
8974 `(("postgresql" ,postgresql))) ; libpq
8975 (home-page "http://initd.org/psycopg/")
8976 (synopsis "Python PostgreSQL adapter")
8977 (description
8978 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 8979 (license license:lgpl3+)))
b31fbea5
DM
8980
8981(define-public python2-psycopg2
f210e944 8982 (package-with-python2 python-psycopg2))
eed1a61f
LF
8983
8984(define-public python-vobject
8985 (package
8986 (name "python-vobject")
9bed9b15 8987 (version "0.9.2")
eed1a61f
LF
8988 (source (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "vobject" version))
8991 (sha256
8992 (base32
9bed9b15 8993 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 8994 (build-system python-build-system)
a9871b7b
LF
8995 (arguments
8996 '(;; The test suite relies on some non-portable Windows interfaces.
8997 #:tests? #f))
f22efa01 8998 (propagated-inputs
eed1a61f
LF
8999 `(("python-dateutil-2" ,python-dateutil-2)
9000 ("python-pyicu" ,python-pyicu)))
9001 (synopsis "Parse and generate vCard and vCalendar files")
9002 (description "Vobject is intended to be a full featured Python package for
9003parsing and generating vCard and vCalendar files. Currently, iCalendar files
9004are supported and well tested. vCard 3.0 files are supported, and all data
9005should be imported, but only a few components are understood in a sophisticated
9006way.")
9007 (home-page "http://eventable.github.io/vobject/")
f210e944 9008 (license license:asl2.0)))
eed1a61f
LF
9009
9010(define-public python2-vobject
f210e944 9011 (package-with-python2 python-vobject))
cedac813
LF
9012
9013(define-public python-munkres
9014 (package
9015 (name "python-munkres")
9016 (version "1.0.7")
9017 (source (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "munkres" version))
9020 (sha256
9021 (base32
9022 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9023 (build-system python-build-system)
9024 (arguments
9025 '(#:tests? #f)) ; no test suite
9026 (home-page "http://software.clapper.org/munkres/")
9027 (synopsis "Implementation of the Munkres algorithm")
9028 (description "The Munkres module provides an implementation of the Munkres
9029algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9030useful for solving the Assignment Problem.")
3f641af0 9031 (license license:bsd-3)))
cedac813
LF
9032
9033(define-public python2-munkres
9034 (package-with-python2 python-munkres))
f3b3d78f
LF
9035
9036(define-public python-flask
9037 (package
9038 (name "python-flask")
9039 (version "0.10.1")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "Flask" version))
9043 (sha256
9044 (base32
9045 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9046 (build-system python-build-system)
9047 (propagated-inputs
9048 `(("python-itsdangerous" ,python-itsdangerous)
9049 ("python-jinja2" ,python-jinja2)
9050 ("python-werkzeug" ,python-werkzeug)))
9051 (home-page "https://github.com/mitsuhiko/flask/")
9052 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9053 (description "Flask is a micro web framework based on the Werkzeug toolkit
9054and Jinja2 template engine. It is called a micro framework because it does not
9055presume or force a developer to use a particular tool or library.")
f210e944 9056 (license license:bsd-3)))
f3b3d78f
LF
9057
9058(define-public python2-flask
f210e944 9059 (package-with-python2 python-flask))
603d665b
LF
9060
9061(define-public python-cookies
9062 (package
9063 (name "python-cookies")
9064 (version "2.2.1")
9065 (source (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "cookies" version))
9068 (sha256
9069 (base32
9070 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9071 (build-system python-build-system)
9072 (arguments
9073 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9074 #:tests? #f))
9075 (native-inputs
9076 `(("python-pytest" ,python2-pytest)))
9077 (synopsis "HTTP cookie parser and renderer")
9078 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9079Python.")
9080 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9081 (license license:expat)))
603d665b
LF
9082
9083(define-public python2-cookies
f210e944 9084 (package-with-python2 python-cookies))
0efde7d6
LF
9085
9086(define-public python-responses
9087 (package
9088 (name "python-responses")
9089 (version "0.5.1")
9090 (source (origin
9091 (method url-fetch)
9092 (uri (pypi-uri "responses" version))
9093 (sha256
9094 (base32
9095 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9096 (build-system python-build-system)
9097 (arguments
9098 `(;; Test suite is not distributed:
9099 ;; https://github.com/getsentry/responses/issues/38
9100 #:tests? #f))
9101 (native-inputs
9102 `(("python-cookies" ,python-cookies)
9103 ("python-mock" ,python-mock)))
9104 (propagated-inputs
9105 `(("python-requests" ,python-requests)
9106 ("python-six" ,python-six)))
9107 (home-page "https://github.com/getsentry/responses")
9108 (synopsis "Utility for mocking out the `requests` Python library")
9109 (description "A utility library for mocking out the `requests` Python
9110library.")
f210e944 9111 (license license:asl2.0)))
0efde7d6
LF
9112
9113(define-public python2-responses
f210e944 9114 (package-with-python2 python-responses))
76b94885 9115
b7afd018
RW
9116(define-public python-whoosh
9117 (package
9118 (name "python-whoosh")
9119 (version "2.7.4")
9120 (source
9121 (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "Whoosh" version))
9124 (sha256
9125 (base32
9126 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9127 (build-system python-build-system)
9128 (native-inputs
f3b98f4f 9129 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9130 (home-page "http://bitbucket.org/mchaput/whoosh")
9131 (synopsis "Full text indexing, search, and spell checking library")
9132 (description
9133 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9134checking library.")
9135 (license license:bsd-2)))
9136
9137(define-public python2-whoosh
9138 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9139 (package (inherit whoosh)
9140 (propagated-inputs
9141 `(("python2-backport-ssl-match-hostname"
9142 ,python2-backport-ssl-match-hostname)
9143 ,@(package-propagated-inputs whoosh))))))
9144
76b94885
LF
9145(define-public python-pathlib
9146 (package
9147 (name "python-pathlib")
9148 (version "1.0.1")
9149 (source (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "pathlib" version))
9152 (sha256
9153 (base32
9154 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9155 (build-system python-build-system)
92a312dc
RW
9156 ;; The tests depend on the internal "test" module, which does not provide
9157 ;; a stable interface.
9158 (arguments `(#:tests? #f))
76b94885 9159 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9160 (synopsis "Object-oriented file system paths")
9161 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9162It offers the following advantages over using string objects:
9163
9164@enumerate
9165@item No more cumbersome use of os and os.path functions. Everything can
9166be done easily through operators, attribute accesses, and method calls.
9167@item Embodies the semantics of different path types. For example,
9168comparing Windows paths ignores casing.
9169@item Well-defined semantics, eliminating any inconsistencies or
9170ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9171@end enumerate
9172
9173Note: In Python 3.4, pathlib is now part of the standard library. For other
9174Python versions please consider python-pathlib2 instead, which tracks the
9175standard library module. This module (python-pathlib) isn't maintained
9176anymore.")
76b94885
LF
9177 (license license:expat)))
9178
9179(define-public python2-pathlib
9180 (package-with-python2 python-pathlib))
25a7db0a 9181
b7703c81
HG
9182(define-public python2-pathlib2
9183 (package
9184 (name "python2-pathlib2")
9185 (version "2.1.0")
9186 (source (origin
9187 (method url-fetch)
9188 (uri (pypi-uri "pathlib2" version))
9189 (sha256
9190 (base32
9191 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9192 (build-system python-build-system)
49a531f5
HG
9193 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9194 ;; version is 3.4 which already includes this package as part of the
9195 ;; standard library.
b7703c81
HG
9196 (arguments
9197 `(#:python ,python-2))
9198 (native-inputs
f3b98f4f 9199 `(("python2-six" ,python2-six)))
b7703c81
HG
9200 (home-page "http://pypi.python.org/pypi/pathlib2/")
9201 (synopsis "Object-oriented file system paths - backport of standard
9202pathlib module")
9203 (description "The goal of pathlib2 is to provide a backport of standard
9204pathlib module which tracks the standard library module, so all the newest
9205features of the standard pathlib can be used also on older Python versions.
9206
9207Pathlib offers a set of classes to handle file system paths. It offers the
9208following advantages over using string objects:
9209
9210@enumerate
9211@item No more cumbersome use of os and os.path functions. Everything can
9212be done easily through operators, attribute accesses, and method calls.
9213@item Embodies the semantics of different path types. For example,
9214comparing Windows paths ignores casing.
9215@item Well-defined semantics, eliminating any inconsistencies or
9216ambiguities (forward vs. backward slashes, etc.).
9217@end enumerate")
9218 (license license:expat)))
9219
25a7db0a
LF
9220(define-public python-jellyfish
9221 (package
9222 (name "python-jellyfish")
9223 (version "0.5.3")
9224 (source (origin
9225 (method url-fetch)
9226 (uri (pypi-uri "jellyfish" version))
9227 (sha256
9228 (base32
9229 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9230 (build-system python-build-system)
9231 (native-inputs
9232 `(("python-pytest" ,python-pytest)))
9233 (home-page "https://github.com/jamesturk/jellyfish")
9234 (synopsis "Approximate and phonetic matching of strings")
9235 (description "Jellyfish uses a variety of string comparison and phonetic
9236encoding algorithms to do fuzzy string matching.")
3f641af0 9237 (license license:bsd-2)
25a7db0a
LF
9238 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9239
9240(define-public python2-jellyfish
9241 (let ((jellyfish (package-with-python2
9242 (strip-python2-variant python-jellyfish))))
9243 (package (inherit jellyfish)
00e10c6e 9244 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9245 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9246
9247(define-public python2-unicodecsv
9248 (package
9249 (name "python2-unicodecsv")
9250 (version "0.14.1")
9251 (source (origin
9252 (method url-fetch)
9253 ;; The test suite is not included in the PyPi release.
9254 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9255 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9256 "archive/" version ".tar.gz"))
9257 (file-name (string-append name "-" version ".tar.gz"))
9258 (sha256
9259 (base32
9260 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9261 (build-system python-build-system)
9262 (arguments
9263 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9264 #:python ,python-2))
9265 (native-inputs
f3b98f4f 9266 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9267 (home-page "https://github.com/jdunck/python-unicodecsv")
9268 (synopsis "Unicode CSV module for Python 2")
9269 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9270module, adding support for Unicode strings.")
3f641af0 9271 (license license:bsd-2)))
064503aa
LF
9272
9273(define-public python-rarfile
9274 (package
9275 (name "python-rarfile")
9276 (version "2.7")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "rarfile" version))
9280 (sha256
9281 (base32
9282 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9283 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9284 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9285 (build-system python-build-system)
9286 (arguments
9287 '(#:phases
9288 (modify-phases %standard-phases
9289 (replace 'check
9290 ;; Many tests fail, but the installation proceeds.
9291 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9292 (native-inputs
9293 `(("which" ,which))) ; required for tests
9294 (propagated-inputs
9295 `(("libarchive" ,libarchive)))
9296 (home-page "https://github.com/markokr/rarfile")
9297 (synopsis "RAR archive reader for Python")
9298 (description "This is Python module for RAR archive reading. The interface
9299is made as zipfile like as possible.")
3f641af0 9300 (license license:isc)))
064503aa
LF
9301
9302(define-public python2-rarfile
9303 (package-with-python2 python-rarfile))
daeeea71
CM
9304
9305(define-public python-magic
9306 (package
9307 (name "python-magic")
9308 (version "0.4.3")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9313 version ".tar.gz"))
9314 (sha256
9315 (base32
9316 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9317 (file-name (string-append name "-" version "-checkout"))))
9318 (build-system python-build-system)
9319 (arguments
9320 ;; The tests are unreliable, so don't run them. The tests fail
9321 ;; under Python3 because they were written for Python2 and
9322 ;; contain import statements that do not work in Python3. One of
9323 ;; the tests fails under Python2 because its assertions are
9324 ;; overly stringent; it relies on comparing output strings which
9325 ;; are brittle and can change depending on the version of
9326 ;; libmagic being used and the system on which the test is
9327 ;; running. In my case, under GuixSD 0.10.0, only one test
9328 ;; failed, and it seems to have failed only because the version
9329 ;; of libmagic that is packaged in Guix outputs a slightly
9330 ;; different (but not wrong) string than the one that the test
9331 ;; expected.
9332 '(#:tests? #f
9333 #:phases (modify-phases %standard-phases
9334 ;; Replace a specific method call with a hard-coded
9335 ;; path to the necessary libmagic.so file in the
9336 ;; store. If we don't do this, then the method call
9337 ;; will fail to find the libmagic.so file, which in
9338 ;; turn will cause any application using
9339 ;; python-magic to fail.
9340 (add-before 'build 'hard-code-path-to-libmagic
9341 (lambda* (#:key inputs #:allow-other-keys)
9342 (let ((file (assoc-ref inputs "file")))
9343 (substitute* "magic.py"
9344 (("ctypes.util.find_library\\('magic'\\)")
9345 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9346 #t)))
9347 (add-before 'install 'disable-egg-compression
9348 (lambda _
9349 (let ((port (open-file "setup.cfg" "a")))
9350 (display "\n[easy_install]\nzip_ok = 0\n"
9351 port)
9352 (close-port port)
9353 #t))))))
daeeea71
CM
9354 (inputs
9355 ;; python-magic needs to be able to find libmagic.so.
9356 `(("file" ,file)))
9357 (home-page "https://github.com/ahupp/python-magic")
9358 (synopsis "File type identification using libmagic")
9359 (description
9360 "This module uses ctypes to access the libmagic file type
9361identification library. It makes use of the local magic database and
9362supports both textual and MIME-type output. Note that this module and
9363the python-file module both provide a \"magic.py\" file; these two
9364modules, which are different and were developed separately, both serve
9365the same purpose: to provide Python bindings for libmagic.")
9366 (license license:expat)))
9367
9368(define-public python2-magic
9369 (package-with-python2 python-magic))
12af303f
CM
9370
9371(define-public python2-s3cmd
9372 (package
9373 (name "python2-s3cmd")
9374 (version "1.6.1")
9375 (source
9376 (origin
9377 (method url-fetch)
de67e922 9378 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9379 "s3cmd-" version ".tar.gz"))
9380 (sha256
9381 (base32
9382 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9383 (build-system python-build-system)
9384 (arguments
9385 ;; s3cmd is written for python2 only and contains no tests.
9386 `(#:python ,python-2
9387 #:tests? #f))
f22efa01 9388 (propagated-inputs
12af303f
CM
9389 `(("python2-dateutil" ,python2-dateutil)
9390 ;; The python-file package also provides a magic.py module.
9391 ;; This is an unfortunate state of affairs; however, s3cmd
9392 ;; fails to install if it cannot find specifically the
9393 ;; python-magic package. Thus we include it, instead of using
9394 ;; python-file. Ironically, s3cmd sometimes works better
9395 ;; without libmagic bindings at all:
9396 ;; https://github.com/s3tools/s3cmd/issues/198
9397 ("python2-magic" ,python2-magic)))
9398 (home-page "http://s3tools.org/s3cmd")
9399 (synopsis "Command line tool for S3-compatible storage services")
9400 (description
9401 "S3cmd is a command line tool for uploading, retrieving and managing data
9402in storage services that are compatible with the Amazon Simple Storage
9403Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9404GnuPG encryption, and more. It also supports management of Amazon's
9405CloudFront content delivery network.")
3f641af0 9406 (license license:gpl2+)))
4323a5f0
AE
9407
9408(define-public python-pkgconfig
9409 (package
9410 (name "python-pkgconfig")
9411 (version "1.1.0")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "pkgconfig" version))
9416 (sha256
9417 (base32
9418 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9419 (build-system python-build-system)
9420 (native-inputs
f3b98f4f 9421 `(("python-nose" ,python-nose)))
4323a5f0
AE
9422 (inputs
9423 `(("pkg-config" ,pkg-config)))
9424 (arguments
9425 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9426 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9427 #:tests? #f
4323a5f0
AE
9428 ;; Hard-code the path to pkg-config.
9429 #:phases
9430 (modify-phases %standard-phases
9431 (add-before
9432 'build 'patch
9433 (lambda _
9434 (substitute* "pkgconfig/pkgconfig.py"
9435 (("cmd = 'pkg-config")
9436 (string-append "cmd = '" (which "pkg-config"))))
9437 #t)))))
9438 (home-page "http://github.com/matze/pkgconfig")
9439 (synopsis "Python interface for pkg-config")
9440 (description "This module provides a Python interface to pkg-config. It
9441can be used to find all pkg-config packages, check if a package exists,
9442check if a package meets certain version requirements, query CFLAGS and
9443LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9444 (license license:expat)))
4323a5f0
AE
9445
9446(define-public python2-pkgconfig
9447 (package-with-python2 python-pkgconfig))
9448
2e697322
BW
9449(define-public python-bz2file
9450 (package
9451 (name "python-bz2file")
9452 (version "0.98")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "bz2file" version))
9457 (sha256
9458 (base32
9459 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9460 (build-system python-build-system)
9461 (arguments
124df723 9462 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9463 (home-page "https://github.com/nvawda/bz2file")
9464 (synopsis "Read and write bzip2-compressed files")
9465 (description
9466 "Bz2file is a Python library for reading and writing bzip2-compressed
9467files. It contains a drop-in replacement for the I/O interface in the
9468standard library's @code{bz2} module, including features from the latest
9469development version of CPython that are not available in older releases.")
3f641af0 9470 (license license:asl2.0)
2e697322
BW
9471 (properties `((python2-variant . ,(delay python2-bz2file))))))
9472
9473(define-public python2-bz2file
9474 (let ((base (package-with-python2
9475 (strip-python2-variant python-bz2file))))
9476 (package
9477 (inherit base)
124df723 9478 (arguments
752bb447
BW
9479 `(#:python ,python-2
9480 #:phases
124df723
BW
9481 (modify-phases %standard-phases
9482 ;; 'python setup.py test' does not work as of 0.98.
9483 ;; There is only the one test file, so we run it directly.
9484 (replace 'check
9485 (lambda _ (zero? (system* "python"
9486 "test_bz2file.py"))))))))))
2e697322 9487
da4ac1aa
BW
9488(define-public python-future
9489 (package
9490 (name "python-future")
9491 (version "0.15.2")
9492 (source
9493 (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "future" version))
9496 (sha256
9497 (base32
9498 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9499 (build-system python-build-system)
9500 ;; Many tests connect to the network or are otherwise flawed.
9501 ;; https://github.com/PythonCharmers/python-future/issues/210
9502 (arguments
9503 `(#:tests? #f))
9504 (home-page "http://python-future.org")
9505 (synopsis "Single-source support for Python 3 and 2")
9506 (description
9507 "@code{python-future} is the missing compatibility layer between Python 2 and
9508Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9509to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9510 (license license:expat)))
da4ac1aa
BW
9511
9512(define-public python2-future
f210e944 9513 (package-with-python2 python-future))
da4ac1aa 9514
8e451885
AE
9515(define-public python-cysignals
9516 (package
9517 (name "python-cysignals")
9518 (version "1.1.0")
9519 (source
9520 (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9523 (sha256
9524 (base32
9525 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9526 (build-system python-build-system)
9527 (native-inputs
9528 `(("python-cython" ,python-cython)
8e451885
AE
9529 ("python-sphinx" ,python-sphinx)))
9530 (inputs
9531 `(("pari-gp" ,pari-gp)))
9532 (arguments
9533 `(#:modules ((guix build python-build-system)
9534 ((guix build gnu-build-system) #:prefix gnu:)
9535 (guix build utils))
9536 ;; FIXME: Tests are executed after installation and currently fail
9537 ;; when not installing into standard locations; the author is working
9538 ;; on a fix.
9539 #:tests? #f
9540 #:phases
9541 (modify-phases %standard-phases
9542 (add-before
9543 'build 'configure
9544 (assoc-ref gnu:%standard-phases 'configure)))))
9545 (home-page
9546 "https://github.com/sagemath/cysignals")
9547 (synopsis
9548 "Handling of interrupts and signals for Cython")
9549 (description
9550 "The cysignals package provides mechanisms to handle interrupts (and
9551other signals and errors) in Cython code, using two related approaches,
9552for mixed Cython/Python code or external C libraries and pure Cython code,
9553respectively.")
3f641af0 9554 (license license:lgpl3+)))
8e451885
AE
9555
9556(define-public python2-cysignals
9557 (package-with-python2 python-cysignals))
9558
63bcec71
DM
9559(define-public python2-shedskin
9560 (package
9561 (name "python2-shedskin")
9562 (version "0.9.4")
9563 (source
9564 (origin
9565 (method url-fetch)
9566 (uri (string-append "https://github.com/shedskin/shedskin/"
9567 "releases/download/v" version
9568 "/shedskin-" version ".tgz"))
9569 (sha256
9570 (base32
9571 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9572 (build-system python-build-system)
9573 (arguments
9574 `(#:python ,python-2
9575 #:phases (modify-phases %standard-phases
9576 (add-after 'unpack 'fix-resulting-include-libs
9577 (lambda* (#:key inputs #:allow-other-keys)
9578 (let ((libgc (assoc-ref inputs "libgc"))
9579 (pcre (assoc-ref inputs "pcre")))
9580 (substitute* "shedskin/makefile.py"
9581 (("variable == 'CCFLAGS':[ ]*")
9582 (string-append "variable == 'CCFLAGS':\n"
9583 " line += ' -I " pcre "/include"
9584 " -I " libgc "/include'"))
9585 (("variable == 'LFLAGS':[ ]*")
9586 (string-append "variable == 'LFLAGS':\n"
9587 " line += ' -L" pcre "/lib"
9588 " -L " libgc "/lib'")))
9589 #t))))))
63bcec71
DM
9590 (inputs `(("pcre" ,pcre)
9591 ("libgc" ,libgc)))
9592 (home-page "https://shedskin.github.io/")
9593 (synopsis "Experimental Python-2 to C++ Compiler")
9594 (description (string-append "This is an experimental compiler for a subset of
9595Python. It generates C++ code and a Makefile."))
3f641af0 9596 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9597
9598(define-public python2-rope
9599 (package
9600 (name "python2-rope")
9601 (version "0.10.3")
9602 (source
9603 (origin
9604 (method url-fetch)
9605 (uri (pypi-uri "rope" version))
9606 (sha256
9607 (base32
9608 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9609 (arguments
9610 ;; Rope is currently python-2 only.
9611 ;; https://github.com/python-rope/rope/issues/57
9612 `(#:python ,python-2))
9613 (build-system python-build-system)
9614 (native-inputs
f3b98f4f 9615 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9616 (home-page "https://github.com/python-rope/rope")
9617 (synopsis "Refactoring library for Python")
9618 (description "Rope is a refactoring library for Python. It facilitates
9619the renaming, moving and extracting of attributes, functions, modules, fields
9620and parameters in Python 2 source code. These refactorings can also be applied
9621to occurences in strings and comments.")
3f641af0 9622 (license license:gpl2)))
6ba8ca17
9623
9624(define-public python-py3status
9625 (package
9626 (name "python-py3status")
d2262d70 9627 (version "3.1")
6ba8ca17
9628 (source
9629 (origin
9630 (method url-fetch)
9631 (uri (pypi-uri "py3status" version))
9632 (sha256
9633 (base32
d2262d70 9634 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9635 (build-system python-build-system)
6ba8ca17
9636 (home-page "https://github.com/ultrabug/py3status")
9637 (synopsis "Extensible i3status wrapper written in Python")
9638 (description "py3status is an i3status wrapper which extends i3status
9639functionality in a modular way, allowing you to extend your panel with your
9640own code, responding to click events and updating clock every second.")
3f641af0 9641 (license license:bsd-3)))
b8fdbca3
HG
9642
9643(define-public python-tblib
9644 (package
9645 (name "python-tblib")
9646 (version "1.3.0")
9647 (source (origin
9648 (method url-fetch)
9649 (uri (pypi-uri "tblib" version))
9650 (sha256 (base32
9651 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9652 (build-system python-build-system)
9653 (arguments
9654 `(#:phases
9655 (modify-phases %standard-phases
9656 (replace 'check
9657 (lambda _
9658 ;; Upstream runs tests after installation and the package itself
9659 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9660 ;; found.
9661 (setenv "PYTHONPATH"
9662 (string-append (getcwd) "/build/lib:"
9663 (getenv "PYTHONPATH")))
9664 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9665 (native-inputs
9666 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9667 ("python-six" ,python-six)))
9668 (home-page "https://github.com/ionelmc/python-tblib")
9669 (synopsis "Traceback serialization library")
9670 (description
9671 "Traceback serialization allows you to:
9672
9673@enumerate
9674@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9675different processes. This allows better error handling when running code over
9676multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9677
9678@item Parse traceback strings and raise with the parsed tracebacks.
9679@end itemize")
3f641af0 9680 (license license:bsd-3)))
b8fdbca3
HG
9681
9682(define-public python2-tblib
9683 (package-with-python2 python-tblib))
1a024de4
HG
9684
9685(define-public python-sqlparse
9686 (package
9687 (name "python-sqlparse")
9688 (version "0.1.19")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (pypi-uri "sqlparse" version))
9692 (sha256
9693 (base32
9694 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9695 (build-system python-build-system)
9696 (arguments
9697 `(#:phases
9698 (modify-phases %standard-phases
9699 (replace 'check
9700 (lambda* _
9701 ;; setup.py-integrated 2to3 only affects the build files, but
9702 ;; py.test is using the source files. So we need to convert them
9703 ;; manually.
9704 (when (zero? (system* "python3"))
9705 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9706 (zero? (system* "py.test")))))))
9707 (native-inputs
f3b98f4f 9708 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9709 (home-page "https://github.com/andialbrecht/sqlparse")
9710 (synopsis "Non-validating SQL parser")
9711 (description "Sqlparse is a non-validating SQL parser for Python. It
9712provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9713 (license license:bsd-3)))
1a024de4
HG
9714
9715(define-public python2-sqlparse
9716 (package-with-python2 python-sqlparse))
68b9d242
SB
9717
9718(define-public python-greenlet
9719 (package
9720 (name "python-greenlet")
9721 (version "0.4.9")
9722 (source (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "greenlet" version))
9725 (sha256
9726 (base32
9727 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9728 (build-system python-build-system)
68b9d242
SB
9729 (home-page "https://greenlet.readthedocs.io/")
9730 (synopsis "Lightweight in-process concurrent programming")
9731 (description
9732 "Greenlet package is a spin-off of Stackless, a version of CPython
9733that supports micro-threads called \"tasklets\". Tasklets run
9734pseudo-concurrently (typically in a single or a few OS-level threads) and
9735are synchronized with data exchanges on \"channels\".")
3f641af0 9736 (license (list license:psfl license:expat))))
68b9d242
SB
9737
9738(define-public python2-greenlet
9739 (package-with-python2 python-greenlet))
d79a343b
SB
9740
9741(define-public python-gevent
9742 (package
9743 (name "python-gevent")
9744 (version "1.1.1")
9745 (source (origin
9746 (method url-fetch)
9747 (uri (pypi-uri "gevent" version))
9748 (sha256
9749 (base32
9750 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9751 (modules '((guix build utils)))
9752 (snippet
9753 '(begin
9754 ;; unbunding libev and c-ares
9755 (for-each delete-file-recursively '("libev" "c-ares"))
9756 ;; fixing testsuite
9757 (call-with-output-file "greentest/__init__.py" noop)
9758 (substitute* "greentest/testrunner.py"
9759 (("import util") "from . import util")
9760 (("from util import log") "from .util import log"))))))
9761 (build-system python-build-system)
9762 (propagated-inputs
9763 `(("python-greenlet" ,python-greenlet)))
9764 (native-inputs
f3b98f4f 9765 `(("python-six" ,python-six)))
d79a343b
SB
9766 (inputs
9767 `(("c-ares" ,c-ares)
9768 ("libev" ,libev)))
9769 (home-page "http://www.gevent.org/")
9770 (synopsis "Coroutine-based network library")
9771 (description
9772 "gevent is a coroutine-based Python networking library that uses greenlet
9773to provide a high-level synchronous API on top of the libev event loop.")
9774 (license license:expat)))
9775
9776(define-public python2-gevent
9777 (package-with-python2 python-gevent))
da3aeeb6
SB
9778
9779(define-public python-twisted
9780 (package
9781 (name "python-twisted")
9782 (version "16.2.0")
9783 (source (origin
9784 (method url-fetch)
8ea8e8d3 9785 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9786 (sha256
9787 (base32
9788 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9789 (build-system python-build-system)
45912170
SB
9790 (propagated-inputs
9791 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9792 (home-page "https://twistedmatrix.com/")
9793 (synopsis "Asynchronous networking framework written in Python")
9794 (description
9795 "Twisted is an extensible framework for Python programming, with special
9796focus on event-based network programming and multiprotocol integration.")
9797 (license license:expat)))
9798
9799(define-public python2-twisted
9800 (package-with-python2 python-twisted))
d0b6fed6 9801
4d3fa5a4
EF
9802(define-public python-pika
9803 (package
9804 (name "python-pika")
9805 (version "0.10.0")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "pika" version))
9810 (sha256
9811 (base32
9812 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9813 (build-system python-build-system)
9814 (native-inputs
269d9172
LF
9815 `(("python-pyev" ,python-pyev)
9816 ("python-tornado" ,python-tornado)
9817 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
9818 (home-page "https://pika.readthedocs.org")
9819 (synopsis "Pure Python AMQP Client Library")
9820 (description
9821 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9822Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9823network support library.")
9824 (license license:bsd-3)))
9825
9826(define-public python2-pika
9827 (package-with-python2 python-pika))
9828
d0b6fed6
DM
9829(define-public python-ply
9830 (package
9831 (name "python-ply")
9832 (version "3.8")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (string-append
9837 "https://pypi.python.org/packages/"
9838 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9839 "/ply-" version ".tar.gz"))
9840 (sha256
9841 (base32
9842 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9843 (build-system python-build-system)
9844 (home-page "http://www.dabeaz.com/ply/")
9845 (synopsis "Python Lex & Yacc")
9846 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9847It uses LR parsing and does extensive error checking.")
f210e944 9848 (license license:bsd-3)))
d0b6fed6
DM
9849
9850(define-public python2-ply
f210e944 9851 (package-with-python2 python-ply))
d951bd54
SB
9852
9853(define-public python-tabulate
9854 (package
9855 (name "python-tabulate")
9856 (version "0.7.5")
9857 (source (origin
9858 (method url-fetch)
9859 (uri (pypi-uri "tabulate" version))
9860 (sha256
9861 (base32
9862 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9863 ;; Fix tests
9864 (modules '((guix build utils)))
9865 (snippet '(substitute* '("test/test_cli.py"
9866 "test/test_input.py"
9867 "test/test_output.py"
9868 "test/test_regression.py")
9869 (("from common") "from nose.tools")))))
9870 (build-system python-build-system)
9871 (native-inputs
f3b98f4f 9872 `(;; For testing
d951bd54
SB
9873 ("python-nose" ,python-nose)))
9874 (home-page "https://bitbucket.org/astanin/python-tabulate")
9875 (synopsis "Pretty-print tabular data")
9876 (description
9877 "Tabulate is a library and command-line utility to pretty-print tabular
9878data in Python.")
9879 (license license:expat)))
9880
9881(define-public python2-tabulate
9882 (package-with-python2 python-tabulate))
1c4c8a33
SB
9883
9884(define-public python-kazoo
9885 (package
9886 (name "python-kazoo")
9887 (version "2.2.1")
9888 (source
9889 (origin
9890 (method url-fetch)
9891 (uri (pypi-uri "kazoo" version))
9892 (sha256
9893 (base32
9894 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9895 (build-system python-build-system)
9896 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
9897 (propagated-inputs
9898 `(("python-six" ,python-six)))
1c4c8a33
SB
9899 (home-page "https://kazoo.readthedocs.org")
9900 (synopsis "High-level Zookeeper client library")
9901 (description
9902 "Kazoo is a Python client library for the Apache Zookeeper distributed
9903application service. It is designed to be easy to use and to avoid common
9904programming errors.")
3f641af0 9905 (license license:asl2.0)))
1c4c8a33
SB
9906
9907(define-public python2-kazoo
9908 (package-with-python2 python-kazoo))
45dda35e
SB
9909
9910(define-public python-pykafka
9911 (package
9912 (name "python-pykafka")
9913 (version "2.4.0")
9914 (source (origin
9915 (method url-fetch)
c6bccf71
EF
9916 (uri (string-append
9917 "https://pypi.python.org/packages/8b/3e/"
9918 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9919 "pykafka-" version ".tar.gz"))
45dda35e
SB
9920 (sha256
9921 (base32
9922 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9923 (build-system python-build-system)
9924 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 9925 (propagated-inputs
45dda35e
SB
9926 `(("python-gevent" ,python-gevent)
9927 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9928 ("python-tabulate" ,python-tabulate)))
9929 (inputs
9930 `(("librdkafka" ,librdkafka)))
9931 (home-page "https://pykafka.readthedocs.io/")
9932 (synopsis "Apache Kafka client for Python")
9933 (description
9934 "PyKafka is a client for the Apache Kafka distributed messaging system.
9935It includes Python implementations of Kafka producers and consumers, which
9936are optionally backed by a C extension built on librdkafka.")
3f641af0 9937 (license license:asl2.0)))
45dda35e
SB
9938
9939(define-public python2-pykafka
9940 (package-with-python2 python-pykafka))
a44fd439
DM
9941
9942(define-public python-wcwidth
9943 (package
9944 (name "python-wcwidth")
9945 (version "0.1.6")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (string-append
9950 "https://pypi.python.org/packages/"
9951 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9952 "wcwidth-" version ".tar.gz"))
9953 (sha256
9954 (base32
9955 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9956 (build-system python-build-system)
9957 (home-page "https://github.com/jquast/wcwidth")
66e07664 9958 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9959 (description "Wcwidth measures the number of terminal column cells of
9960wide-character codes. It is useful for those implementing a terminal emulator,
9961or programs that carefully produce output to be interpreted by one. It is a
9962Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9963specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 9964 (license license:expat)))
a44fd439
DM
9965
9966(define-public python2-wcwidth
f210e944 9967 (package-with-python2 python-wcwidth))
0de78c95
DP
9968
9969(define-public python2-jsonrpclib
9970 (package
9971 (name "python2-jsonrpclib")
9972 (version "0.1.7")
9973 (source (origin
9974 (method url-fetch)
9975 (uri (string-append
9976 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9977 "jsonrpclib-" version ".tar.gz"))
9978 (sha256
9979 (base32
9980 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9981 (build-system python-build-system)
0de78c95
DP
9982 (arguments
9983 `(#:tests? #f
9984 #:python ,python-2))
9985 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9986 (synopsis "Implementation of JSON-RPC specification for Python")
9987 (description
9988 "This library is an implementation of the JSON-RPC specification.
9989It supports both the original 1.0 specification, as well as the
9990new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9991etc.")
3f641af0 9992 (license license:asl2.0)))
9250b0f3
SB
9993
9994(define-public python-chai
9995 (package
9996 (name "python-chai")
9997 (version "1.1.1")
9998 (source (origin
9999 (method url-fetch)
10000 (uri (pypi-uri "chai" version))
10001 (sha256
10002 (base32
10003 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10004 (build-system python-build-system)
9250b0f3
SB
10005 (home-page "https://github.com/agoragames/chai")
10006 (synopsis "Mocking framework for Python")
10007 (description
10008 "Chai provides an api for mocking, stubbing and spying your python
10009objects, patterned after the Mocha library for Ruby.")
3f641af0 10010 (license license:bsd-3)))
9250b0f3
SB
10011
10012(define-public python2-chai
10013 (package-with-python2 python-chai))
10014
ae43baa8
SB
10015(define-public python-arrow
10016 (package
10017 (name "python-arrow")
10018 (version "0.8.0")
10019 (source (origin
10020 (method url-fetch)
10021 (uri (pypi-uri "arrow" version))
10022 (sha256
10023 (base32
10024 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10025 (build-system python-build-system)
10026 (native-inputs
f3b98f4f 10027 `(;; For testing
ae43baa8
SB
10028 ("python-chai" ,python-chai)
10029 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10030 (propagated-inputs
10031 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10032 (home-page "https://github.com/crsmithdev/arrow/")
10033 (synopsis "Dates and times for Python")
10034 (description
10035 "Arrow is a Python library to creating, manipulating, formatting and
10036converting dates, times, and timestamps. It implements and updates the
10037datetime type.")
3f641af0 10038 (license license:asl2.0)))
ae43baa8
SB
10039
10040(define-public python2-arrow
10041 (package-with-python2 python-arrow))
10042
1f2b62a4
SB
10043(define-public python-inflection
10044 (package
10045 (name "python-inflection")
10046 (version "0.3.1")
10047 (source
10048 (origin (method url-fetch)
10049 (uri (pypi-uri "inflection" version))
10050 (sha256
10051 (base32
10052 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10053 (build-system python-build-system)
1f2b62a4
SB
10054 (home-page "http://github.com/jpvanhal/inflection")
10055 (synopsis "Python string transformation library")
10056 (description
10057 "Inflection is a string transformation library. It singularizes
10058and pluralizes English words, and transforms strings from CamelCase to
10059underscored string.")
10060 (license license:expat)))
10061
10062(define-public python2-inflection
10063 (package-with-python2 python-inflection))
10064
18995566
SB
10065(define-public python-pylev
10066 (package
10067 (name "python-pylev")
10068 (version "1.3.0")
10069 (source (origin
10070 (method url-fetch)
10071 (uri (pypi-uri "pylev" version))
10072 (sha256
10073 (base32
10074 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10075 (build-system python-build-system)
18995566
SB
10076 (home-page "http://github.com/toastdriven/pylev")
10077 (synopsis "Levenshtein distance implementation in Python")
10078 (description "Pure Python Levenshtein implementation, based off the
10079Wikipedia code samples at
10080@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10081 (license license:bsd-3)))
18995566
SB
10082
10083(define-public python2-pylev
10084 (package-with-python2 python-pylev))
10085
f5deff7a
SB
10086(define-public python-cleo
10087 (package
10088 (name "python-cleo")
10089 (version "0.4.1")
10090 (source (origin
10091 (method url-fetch)
10092 (uri (pypi-uri "cleo" version))
10093 (sha256
10094 (base32
10095 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10096 (build-system python-build-system)
10097 (native-inputs
f3b98f4f 10098 `(;; For testing
f5deff7a
SB
10099 ("python-mock" ,python-mock)
10100 ("python-pytest" ,python-pytest)))
9403150a
SB
10101 (propagated-inputs
10102 `(("python-psutil" ,python-psutil)
10103 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10104 (home-page "https://github.com/sdispater/cleo")
10105 (synopsis "Command-line arguments library for Python")
10106 (description
10107 "Cleo allows you to create command-line commands with signature in
10108docstring and colored output.")
10109 (license license:expat)))
10110
10111(define-public python2-cleo
10112 (package-with-python2 python-cleo))
10113
77cadb43
SB
10114(define-public python-lazy-object-proxy
10115 (package
10116 (name "python-lazy-object-proxy")
10117 (version "1.2.2")
10118 (source (origin
10119 (method url-fetch)
10120 (uri (pypi-uri "lazy-object-proxy" version))
10121 (sha256
10122 (base32
10123 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10124 (build-system python-build-system)
77cadb43
SB
10125 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10126 (synopsis "Lazy object proxy for python")
10127 (description
10128 "Lazy object proxy is an object that wraps a callable but defers the call
10129until the object is actually required, and caches the result of said call.")
3f641af0 10130 (license license:bsd-2)))
77cadb43
SB
10131
10132(define-public python2-lazy-object-proxy
10133 (package-with-python2 python-lazy-object-proxy))
10134
5477e05f
SB
10135(define-public python-dnspython
10136 (package
10137 (name "python-dnspython")
6c514128 10138 (version "1.15.0")
5477e05f
SB
10139 (source (origin
10140 (method url-fetch)
10141 (uri (string-append "http://www.dnspython.org/kits/"
10142 version "/dnspython-" version ".tar.gz"))
10143 (sha256
10144 (base32
6c514128 10145 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10146 (build-system python-build-system)
10147 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10148 (home-page "http://www.dnspython.org")
10149 (synopsis "DNS toolkit for Python")
10150 (description
10151 "dnspython is a DNS toolkit for Python. It supports almost all record
10152types. It can be used for queries, zone transfers, and dynamic updates.
10153It supports TSIG authenticated messages and EDNS0.")
10154 (license license:expat)))
10155
10156(define-public python2-dnspython
10157 (package-with-python2 python-dnspython))
10158
22711e25
SB
10159(define-public python-email-validator
10160 (package
10161 (name "python-email-validator")
10162 (version "1.0.1")
10163 (source
10164 (origin (method url-fetch)
10165 (uri (pypi-uri "email_validator" version))
10166 (sha256
10167 (base32
10168 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10169 (build-system python-build-system)
10170 (arguments
10171 '(#:phases
10172 (modify-phases %standard-phases
10173 (add-before 'build 'use-dnspython
10174 (lambda _
10175 (substitute* "setup.py"
10176 (("dnspython3") "dnspython"))
10177 #t)))))
d42560bd 10178 (propagated-inputs
22711e25 10179 `(("python-dnspython" ,python-dnspython)
d42560bd 10180 ("python-idna" ,python-idna)))
22711e25
SB
10181 (home-page "https://github.com/JoshData/python-email-validator")
10182 (synopsis "Email address validation library for Python")
10183 (description
10184 "This library validates email address syntax and deliverability.")
3f641af0 10185 (license license:cc0)))
22711e25
SB
10186
10187(define-public python2-email-validator
10188 (package-with-python2 python-email-validator))
10189
8987d91e
SB
10190(define-public python-ukpostcodeparser
10191 (package
10192 (name "python-ukpostcodeparser")
10193 (version "1.0.3")
10194 (source (origin
10195 (method url-fetch)
10196 (uri (pypi-uri "UkPostcodeParser" version))
10197 (sha256
10198 (base32
10199 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10200 (build-system python-build-system)
8987d91e
SB
10201 (home-page "https://github.com/hamstah/ukpostcodeparser")
10202 (synopsis "UK Postcode parser for Python")
10203 (description
10204 "This library provides the @code{parse_uk_postcode} function for
10205parsing UK postcodes.")
10206 (license license:expat)))
10207
10208(define-public python2-ukpostcodeparser
10209 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10210
10211(define-public python-fake-factory
10212 (package
10213 (name "python-fake-factory")
7adc698f 10214 (version "0.7.2")
ea92ae01
SB
10215 (source (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "fake-factory" version))
10218 (sha256
10219 (base32
7adc698f 10220 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10221 (build-system python-build-system)
ea92ae01 10222 (native-inputs
f3b98f4f 10223 `(;; For testing
ea92ae01
SB
10224 ("python-email-validator" ,python-email-validator)
10225 ("python-mock" ,python-mock)
10226 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10227 (propagated-inputs
10228 `(("python-dateutil" ,python-dateutil-2)
10229 ("python-six" ,python-six)))
7adc698f 10230 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10231 (synopsis "Python package that generates fake data")
10232 (description
10233 "Faker is a Python package that generates fake data such as names,
10234addresses, and phone numbers.")
10235 (license license:expat)
10236 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10237
10238(define-public python2-fake-factory
10239 (let ((base (package-with-python2 (strip-python2-variant
10240 python-fake-factory))))
10241 (package
10242 (inherit base)
24c9aa18 10243 (propagated-inputs
ea92ae01 10244 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10245 ,@(package-propagated-inputs base))))))
ea92ae01 10246
b49504fd
SB
10247(define-public python-pyaml
10248 (package
10249 (name "python-pyaml")
10250 (version "15.8.2")
10251 (source (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "pyaml" version))
10254 (sha256
10255 (base32
10256 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10257 (build-system python-build-system)
b49504fd
SB
10258 (propagated-inputs
10259 `(("python-pyyaml" ,python-pyyaml)))
10260 (home-page "https://github.com/mk-fg/pretty-yaml")
10261 (synopsis "YAML pretty-print library for Python")
10262 (description
10263 "pyaml is a PyYAML based python module to produce pretty and readable
10264YAML-serialized data.")
3f641af0 10265 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10266
10267(define-public python2-pyaml
10268 (package-with-python2 python-pyaml))
10269
347175a2
SB
10270(define-public python-flexmock
10271 (package
10272 (name "python-flexmock")
10273 (version "0.10.2")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "flexmock" version))
10277 (sha256
10278 (base32
10279 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10280 (build-system python-build-system)
347175a2
SB
10281 (home-page "https://flexmock.readthedocs.org")
10282 (synopsis "Testing library for Python")
10283 (description
10284 "flexmock is a testing library for Python that makes it easy to create
10285mocks, stubs and fakes.")
3f641af0 10286 (license license:bsd-3)))
347175a2
SB
10287
10288(define-public python2-flexmock
10289 (package-with-python2 python-flexmock))
10290
5a744191
SB
10291(define-public python-orator
10292 (package
10293 (name "python-orator")
10294 (version "0.8.2")
10295 (source (origin
10296 (method url-fetch)
10297 (uri (pypi-uri "orator" version))
10298 (sha256
10299 (base32
10300 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10301 (build-system python-build-system)
10302 (arguments '(#:tests? #f)) ; no tests
b2676030 10303 (propagated-inputs
5a744191
SB
10304 `(("python-arrow" ,python-arrow)
10305 ("python-blinker" ,python-blinker)
10306 ("python-cleo" ,python-cleo)
10307 ("python-fake-factory" ,python-fake-factory)
10308 ("python-inflection" ,python-inflection)
10309 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10310 ("python-pyaml" ,python-pyaml)
5a744191
SB
10311 ("python-simplejson" ,python-simplejson)
10312 ("python-wrapt" ,python-wrapt)))
10313 (home-page "https://orator-orm.com/")
10314 (synopsis "ActiveRecord ORM for Python")
10315 (description
10316 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10317implementation for Python.")
10318 (license license:expat)
10319 (properties `((python2-variant . ,(delay python2-orator))))))
10320
10321(define-public python2-orator
10322 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10323 (package
10324 (inherit base)
06961617 10325 (propagated-inputs
5a744191 10326 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10327 ,@(package-propagated-inputs base))))))
f4155188
DM
10328
10329(define-public python-prompt-toolkit
10330 (package
10331 (name "python-prompt-toolkit")
d15e2ef0 10332 (version "1.0.7")
f4155188
DM
10333 (source
10334 (origin
10335 (method url-fetch)
d15e2ef0 10336 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10337 (sha256
10338 (base32
d15e2ef0 10339 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10340 (build-system python-build-system)
bae18710
LF
10341 (arguments
10342 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10343 (propagated-inputs
10344 `(("python-wcwidth" ,python-wcwidth)
10345 ("python-pygments" ,python-pygments)))
f4155188
DM
10346 (native-inputs `(("python-six" ,python-six)))
10347 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10348 (synopsis "Library for building command line interfaces in Python")
10349 (description
10350 "Prompt-Toolkit is a library for building interactive command line
10351interfaces in Python. It's like GNU Readline but it also features syntax
10352highlighting while typing, out-of-the-box multi-line input editing, advanced
10353code completion, incremental search, support for Chinese double-width
10354characters, mouse support, and auto suggestions.")
f210e944 10355 (license license:bsd-3)))
f4155188
DM
10356
10357(define-public python2-prompt-toolkit
f210e944 10358 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10359
10360(define-public python-jedi
10361 (package
10362 (name "python-jedi")
10363 (version "0.9.0")
10364 (source
10365 (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "jedi" version))
10368 (sha256
10369 (base32
10370 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10371 (build-system python-build-system)
10372 (home-page "https://github.com/davidhalter/jedi")
10373 (synopsis
10374 "Autocompletion for Python that can be used for text editors")
10375 (description
10376 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10377 (license license:expat)))
a502dfbf
DM
10378
10379(define-public python2-jedi
f210e944 10380 (package-with-python2 python-jedi))
c2f0dc6e
DM
10381
10382(define-public ptpython
10383 (package
10384 (name "ptpython")
10385 (version "0.34")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "ptpython" version))
10389 (sha256
10390 (base32
10391 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10392 (build-system python-build-system)
f22efa01 10393 (propagated-inputs
c2f0dc6e
DM
10394 `(("python-docopt" ,python-docopt)
10395 ("python-jedi" ,python-jedi)
10396 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10397 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10398 (home-page "https://github.com/jonathanslenders/ptpython")
10399 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10400 (description
10401 "ptpython is a Python read-eval-print loop with IDE-like features.
10402It supports syntax highlighting, multiline editing, autocompletion, mouse,
10403color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10404etc.")
3f641af0 10405 (license license:bsd-3)
c2f0dc6e
DM
10406 (properties `((python2-variant . ,(delay ptpython-2))))))
10407
10408(define-public ptpython-2
10409 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10410 (package
10411 (inherit base)
10412 (name "ptpython2"))))
b227f0be 10413
b04a52a6
DJ
10414(define-public python-requests-oauthlib
10415 (package
10416 (name "python-requests-oauthlib")
10417 (version "0.6.2")
10418 (source
10419 (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "requests-oauthlib" version))
10422 (sha256
10423 (base32
10424 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10425 (build-system python-build-system)
10426 (arguments
10427 `(#:phases
10428 (modify-phases %standard-phases
10429 ;; removes tests that require network access
10430 (add-before 'check 'pre-check
10431 (lambda _
10432 (delete-file "tests/test_core.py")
10433 #t)))))
10434 (native-inputs
10435 `(("python-requests-mock" ,python-requests-mock)
10436 ("python-mock" ,python-mock)))
f22efa01 10437 (propagated-inputs
b04a52a6
DJ
10438 `(("python-oauthlib" ,python-oauthlib)
10439 ("python-requests" ,python-requests)))
10440 (home-page
10441 "https://github.com/requests/requests-oauthlib")
10442 (synopsis
10443 "OAuthlib authentication support for Requests")
10444 (description
10445 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10446provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10447 (license license:isc)))
b04a52a6
DJ
10448
10449(define-public python2-requests-oauthlib
f210e944 10450 (package-with-python2 python-requests-oauthlib))
b04a52a6 10451
b227f0be 10452(define-public python-stem
10453 (package
10454 (name "python-stem")
10455 (version "1.4.1b")
10456 (source
10457 (origin
10458 (method url-fetch)
10459 (uri (pypi-uri "stem" version ".tar.bz2"))
10460 (sha256
10461 (base32
10462 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10463 (build-system python-build-system)
10464 (arguments
10465 `(#:phases
10466 (modify-phases %standard-phases
10467 (replace 'check
10468 (lambda _
10469 (zero? (system* "./run_tests.py" "--unit")))))))
10470 (native-inputs
10471 `(("python-mock" ,python-mock)
10472 ("python-pep8" ,python-pep8)
10473 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10474 (propagated-inputs
b227f0be 10475 `(("python-pycrypto" ,python-pycrypto)))
10476 (home-page "https://stem.torproject.org/")
10477 (synopsis
10478 "Python controller library that allows applications to interact with Tor")
10479 (description
10480 "Stem is a Python controller library for Tor. With it you can use Tor's
10481control protocol to script against the Tor process and read descriptor data
10482relays publish about themselves.")
3f641af0 10483 (license license:lgpl3)))
b227f0be 10484
10485(define-public python2-stem
10486 (package-with-python2 python-stem))
517a6c0c
DM
10487
10488(define-public python-pyserial
10489 (package
10490 (name "python-pyserial")
10491 (version "3.1.1")
10492 (source
10493 (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "pyserial" version))
10496 (sha256
10497 (base32
10498 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10499 (build-system python-build-system)
10500 (home-page
10501 "https://github.com/pyserial/pyserial")
10502 (synopsis "Python Serial Port Bindings")
10503 (description "@code{pyserial} provide serial port bindings for Python. It
10504supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10505and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10506 (license license:bsd-3)))
517a6c0c
DM
10507
10508(define-public python2-pyserial
f210e944 10509 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10510
10511(define-public python-kivy
10512 (package
10513 (name "python-kivy")
10514 (version "1.9.1")
10515 (source
10516 (origin
10517 (method url-fetch)
10518 (uri (pypi-uri "kivy" version))
10519 (file-name (string-append name "-" version ".tar.gz"))
10520 (sha256
10521 (base32
10522 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10523 (build-system python-build-system)
10524 (arguments
10525 `(#:tests? #f ; Tests require many optional packages
10526 #:phases
10527 (modify-phases %standard-phases
10528 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10529 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10530 (lambda* (#:key inputs #:allow-other-keys)
10531 (setenv "KIVY_SDL2_PATH"
10532 (string-append (assoc-ref inputs "sdl-union")
10533 "/include/SDL2"))
10534 #t)))))
10535 (native-inputs
f2516de2
HG
10536 `(("pkg-config" ,pkg-config)
10537 ("python-cython" ,python-cython)))
6eb7af2a 10538 (inputs
f2516de2 10539 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10540 ("mesa" ,mesa)
10541 ("sdl-union"
10542 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10543 (home-page "http://kivy.org")
10544 (synopsis
10545 "Multitouch application framework")
10546 (description
10547 "A software library for rapid development of
10548hardware-accelerated multitouch applications.")
10549 (license license:expat)))
10550
10551(define-public python2-kivy
10552 (package-with-python2 python-kivy))
10553
10554(define-public python-kivy-next
10555 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10556 (revision "1"))
10557 (package (inherit python-kivy)
10558 (name "python-kivy-next")
d80a71eb 10559 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10560 (string-take commit 7)))
10561 (source
10562 (origin
10563 (method git-fetch)
10564 (uri (git-reference
10565 (url "https://github.com/kivy/kivy")
10566 (commit commit)))
10567 (file-name (string-append name "-" version "-checkout"))
10568 (sha256
10569 (base32
10570 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10571
10572(define-public python2-kivy-next
10573 (package-with-python2 python-kivy-next))
8794bd8b
DC
10574
10575(define-public python-binaryornot
10576 (package
10577 (name "python-binaryornot")
10578 (version "0.4.0")
10579 (source (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "binaryornot" version))
10582 (sha256
10583 (base32
10584 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10585 (build-system python-build-system)
f22efa01 10586 (propagated-inputs
8794bd8b
DC
10587 `(("python-chardet" ,python-chardet)
10588 ("python-hypothesis" ,python-hypothesis)))
10589 (home-page "https://github.com/audreyr/binaryornot")
10590 (synopsis "Package to check if a file is binary or text")
10591 (description "Ultra-lightweight pure Python package to check if a file is
10592binary or text.")
10593 (license license:bsd-3)
10594 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10595
10596(define-public python2-binaryornot
10597 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10598 (package (inherit base)
f22efa01 10599 (propagated-inputs
8794bd8b 10600 `(("python2-enum34" ,python2-enum34)
f22efa01 10601 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10602
10603(define-public python-nltk
10604 (package
10605 (name "python-nltk")
10606 (version "3.2.1")
10607 (source (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "nltk" version))
10610 (sha256
10611 (base32
10612 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10613 (build-system python-build-system)
59f12985
LF
10614 (arguments
10615 '(;; The tests require some extra resources to be downloaded.
10616 ;; TODO Try packaging these resources.
10617 #:tests? #f))
a9ac982a
DC
10618 (home-page "http://nltk.org/")
10619 (synopsis "Natural Language Toolkit")
10620 (description "It provides interfaces to over 50 corpora and lexical
10621resources such as WordNet, along with a suite of text processing libraries
10622for classification, tokenization, stemming, tagging, parsing, and semantic
10623reasoning, wrappers for natural language processing libraries.")
f210e944 10624 (license license:asl2.0)))
a9ac982a
DC
10625
10626(define-public python2-nltk
f210e944 10627 (package-with-python2 python-nltk))
691cd90d
DC
10628
10629(define-public python-pymongo
10630 (package
10631 (name "python-pymongo")
10632 (version "3.3.0")
10633 (source (origin
10634 (method url-fetch)
10635 (uri (pypi-uri "pymongo" version))
10636 (sha256
10637 (base32
10638 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10639 (build-system python-build-system)
f22efa01 10640 (propagated-inputs
691cd90d
DC
10641 `(("python-certifi" ,python-certifi)))
10642 (home-page "http://github.com/mongodb/mongo-python-driver")
10643 (synopsis "Python driver for MongoDB")
10644 (description "Python driver for MongoDB.")
f210e944 10645 (license license:asl2.0)))
691cd90d
DC
10646
10647(define-public python2-pymongo
f210e944 10648 (package-with-python2 python-pymongo))
6a6c9d43
DC
10649
10650(define-public python-sh
10651 (package
10652 (name "python-sh")
10653 (version "1.11")
10654 (source (origin
10655 (method url-fetch)
10656 (uri (pypi-uri "sh" version))
10657 (sha256
10658 (base32
10659 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10660 (build-system python-build-system)
10661 (arguments
10662 `(#:tests? #f)) ; no tests
10663 (home-page "https://github.com/amoffat/sh")
10664 (synopsis "Python subprocess interface")
10665 (description "Abstracts process invocation by providing a function
10666interface for programs.")
f210e944 10667 (license license:expat)))
6a6c9d43
DC
10668
10669(define-public python2-sh
f210e944 10670 (package-with-python2 python-sh))
05b59190 10671
25702397
EF
10672(define-public python-consul
10673 (package
10674 (name "python-consul")
10675 (version "0.6.1")
10676 (source
10677 (origin
10678 (method url-fetch)
10679 (uri (pypi-uri "python-consul" version))
10680 (sha256
10681 (base32
10682 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10683 (build-system python-build-system)
10684 (native-inputs
10685 `(("python-pytest" ,python-pytest)
10686 ("python-requests" ,python-requests)
10687 ("python-six" ,python-six)))
10688 (home-page "https://github.com/cablehead/python-consul")
10689 (synopsis "Python client for Consul")
10690 (description
10691 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10692discovery, monitoring and configuration.")
10693 (license license:expat)))
10694
10695(define-public python2-consul
f210e944 10696 (package-with-python2 python-consul))
25702397 10697
05b59190
DC
10698(define-public python-schematics
10699 (package
10700 (name "python-schematics")
10701 (version "1.1.1")
10702 (source
10703 (origin
10704 (method url-fetch)
10705 (uri (string-append
10706 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10707 (file-name (string-append name "-" version ".tar.gz"))
10708 (sha256
10709 (base32
10710 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10711 (build-system python-build-system)
f22efa01 10712 (propagated-inputs
05b59190
DC
10713 `(("python-six" ,python-six)))
10714 (arguments
10715 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10716 ; version requirements (eg python-coveralls)
10717 (home-page "https://github.com/schematics/schematics")
10718 (synopsis "Python Data Structures for Humans")
10719 (description "Python Data Structures for Humans.")
f210e944 10720 (license license:bsd-3)))
05b59190
DC
10721
10722(define-public python2-schematics
f210e944 10723 (package-with-python2 python-schematics))
d6907ff7
DC
10724
10725(define-public python-publicsuffix
10726 (package
10727 (name "python-publicsuffix")
10728 (version "1.1.0")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "publicsuffix" version))
10732 (sha256
10733 (base32
10734 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10735 (build-system python-build-system)
10736 (arguments
10737 `(#:tests? #f)) ; tests use the internet
10738 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10739 (synopsis "Get suffix for a domain name")
10740 (description "Get a public suffix for a domain name using the Public Suffix
10741List.")
f210e944 10742 (license license:expat)))
d6907ff7
DC
10743
10744(define-public python2-publicsuffix
f210e944 10745 (package-with-python2 python-publicsuffix))
b2319996
DC
10746
10747(define-public python-publicsuffix2
10748 (package
10749 (name "python-publicsuffix2")
10750 (version "2.20160621")
10751 (source
10752 (origin
10753 (method url-fetch)
10754 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10755 (sha256
10756 (base32
10757 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10758 (build-system python-build-system)
10797a0a
LF
10759 (arguments
10760 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10761 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10762 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10763 (description "Get a public suffix for a domain name using the Public Suffix
10764List. Forked from and using the same API as the publicsuffix package.")
f210e944 10765 (license (list license:expat license:mpl2.0))))
b2319996
DC
10766
10767(define-public python2-publicsuffix2
f210e944 10768 (package-with-python2 python-publicsuffix2))
81f1515d
DC
10769
10770(define-public python-url
10771 (package
10772 (name "python-url")
10773 (version "0.2.0")
10774 (source (origin
10775 (method url-fetch)
10776 (uri (pypi-uri "url" version))
10777 (sha256
10778 (base32
10779 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10780 (build-system python-build-system)
f22efa01 10781 (propagated-inputs
81f1515d
DC
10782 `(("python-publicsuffix" ,python-publicsuffix)))
10783 (native-inputs
10784 `(("python-coverage" ,python-coverage)
10785 ("python-nose" ,python-nose)))
10786 (arguments
10787 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10788 (home-page "http://github.com/seomoz/url-py")
10789 (synopsis "URL Parsing")
10790 (description "Library for parsing urls.")
10791 (license license:expat)
10792 (properties `((python2-variant . ,(delay python2-url))))))
10793
10794(define-public python2-url
10795 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10796 (package (inherit base)
f22efa01 10797 (propagated-inputs
f210e944 10798 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
10799
10800(define-public python-freezegun
10801 (package
10802 (name "python-freezegun")
10803 (version "0.3.7")
10804 (source
10805 (origin
10806 (method url-fetch)
10807 (uri (pypi-uri "freezegun" version))
10808 (sha256
10809 (base32
10810 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10811 (build-system python-build-system)
10812 (native-inputs
10813 `(("python-mock" ,python-mock)
10814 ("python-nose" ,python-nose)
10815 ("python-coverage" ,python-coverage)
10816 ("python-dateutil-2" ,python-dateutil-2)))
f22efa01 10817 (propagated-inputs
974ee2c1
TS
10818 `(("python-six" ,python-six)))
10819 (arguments
10820 `(#:phases (modify-phases %standard-phases
10821 ;; The tests are normally executed via `make test`, but the PyPi
10822 ;; package does not include the Makefile.
10823 (replace 'check
10824 (lambda _
10825 (zero? (system* "nosetests" "./tests/")))))))
10826 (home-page "https://github.com/spulec/freezegun")
10827 (synopsis "Test utility for mocking the datetime module")
10828 (description
10829 "FreezeGun is a library that allows your python tests to travel through
10830time by mocking the datetime module.")
10831 (license license:asl2.0)))
10832
10833(define-public python2-freezegun
f210e944
HG
10834 (package-with-python2 python-freezegun))
10835
dddcb25c
MB
10836
10837(define-public python-odfpy
10838 (package
10839 (name "python-odfpy")
10840 (version "1.3.3")
10841 (source (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "odfpy" version))
10844 (sha256
10845 (base32
10846 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10847 (arguments
10848 `(#:modules ((srfi srfi-1)
10849 (guix build python-build-system)
10850 (guix build utils))
10851 #:phases
10852 (modify-phases %standard-phases
10853 (replace 'check
10854 ;; The test runner invokes python2 and python3 for test*.py.
10855 ;; To avoid having both in inputs, we replicate it here.
10856 (lambda _
10857 (every (lambda (test-file)
10858 (zero? (system* "python" test-file)))
10859 (find-files "tests" "^test.*\\.py$")))))))
10860 (build-system python-build-system)
10861 (home-page "https://github.com/eea/odfpy")
10862 (synopsis "Python API and tools to manipulate OpenDocument files")
10863 (description "Collection of libraries and utility programs written in
10864Python to manipulate OpenDocument 1.2 files.")
10865 (license
10866 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10867 ;; number of files with other licenses.
10868 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10869
10870(define-public python2-odfpy
10871 (package-with-python2 python-odfpy))
b30565bd
MB
10872
10873(define-public python-cachecontrol
10874 (package
10875 (name "python-cachecontrol")
10876 (version "0.11.6")
10877 (source
10878 (origin
10879 (method url-fetch)
10880 ;; Pypi does not have tests.
10881 (uri (string-append
10882 "https://github.com/ionrock/cachecontrol/archive/v"
10883 version ".tar.gz"))
10884 (file-name (string-append name "-" version ".tar.gz"))
10885 (sha256
10886 (base32
10887 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10888 (build-system python-build-system)
10889 (arguments
10890 `(#:phases
10891 (modify-phases %standard-phases
10892 (replace 'check
10893 (lambda _
10894 ;; Drop test that requires internet access.
10895 (delete-file "tests/test_regressions.py")
10896 (setenv "PYTHONPATH"
10897 (string-append (getcwd) "/build/lib:"
10898 (getenv "PYTHONPATH")))
10899 (zero? (system* "py.test" "-vv")))))))
10900 (native-inputs
10901 `(("python-pytest" ,python-pytest)
10902 ("python-redis" ,python-redis)
10903 ("python-webtest" ,python-webtest)
10904 ("python-mock" ,python-mock)))
10905 (propagated-inputs
10906 `(("python-requests" ,python-requests)
10907 ("python-lockfile" ,python-lockfile)))
10908 (home-page "https://github.com/ionrock/cachecontrol")
10909 (synopsis "The httplib2 caching algorithms for use with requests")
10910 (description "CacheControl is a port of the caching algorithms in
10911@code{httplib2} for use with @code{requests} session objects.")
f210e944 10912 (license license:asl2.0)))
b30565bd
MB
10913
10914(define-public python2-cachecontrol
f210e944 10915 (package-with-python2 python-cachecontrol))
243db824
DM
10916
10917(define-public python-lit
10918 (package
10919 (name "python-lit")
10920 (version "0.5.0")
10921 (source
10922 (origin
10923 (method url-fetch)
10924 (uri (pypi-uri "lit" version))
10925 (sha256
10926 (base32
10927 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10928 (build-system python-build-system)
10929 (home-page "http://llvm.org/")
10930 (synopsis "LLVM Software Testing Tool")
10931 (description "@code{lit} is a portable tool for executing LLVM and Clang
10932style test suites, summarizing their results, and providing indication of
10933failures.")
f210e944 10934 (license license:ncsa)))
243db824
DM
10935
10936(define-public python2-lit
f210e944 10937 (package-with-python2 python-lit))
66f95b20
MB
10938
10939(define-public python-pytest-pep8
10940 (package
10941 (name "python-pytest-pep8")
10942 (version "1.0.6")
10943 (source (origin
10944 (method url-fetch)
10945 (uri (pypi-uri "pytest-pep8" version))
10946 (sha256
10947 (base32
10948 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10949 (build-system python-build-system)
10950 (arguments
b41a05ce 10951 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
10952 (native-inputs
10953 `(("python-pytest" ,python-pytest)))
10954 (propagated-inputs
10955 `(("python-pep8" ,python-pep8)))
10956 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10957 (synopsis "Py.test plugin to check PEP8 requirements")
10958 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 10959 (license license:expat)))
66f95b20
MB
10960
10961(define-public python2-pytest-pep8
f210e944 10962 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
10963
10964(define-public python-pytest-flakes
10965 (package
10966 (name "python-pytest-flakes")
10967 (version "1.0.1")
10968 (source (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "pytest-flakes" version))
10971 (sha256
10972 (base32
10973 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10974 (build-system python-build-system)
10975 (arguments
b41a05ce 10976 `(#:phases
df94a6b5
MB
10977 (modify-phases %standard-phases
10978 (delete 'check)
10979 (add-after 'install 'check
05c2fd36
HG
10980 (lambda* (#:key outputs inputs #:allow-other-keys)
10981 ;; It's easier to run tests after install.
10982 ;; Make installed package available for running the tests
10983 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
10984 (zero? (system* "py.test" "-vv")))))))
10985 (native-inputs
10986 `(("python-coverage" ,python-coverage)
10987 ("python-pytest" ,python-pytest)
10988 ("python-pytest-cache" ,python-pytest-cache)
10989 ("python-pytest-pep8" ,python-pytest-pep8)))
10990 (propagated-inputs
10991 `(("python-pyflakes" ,python-pyflakes)))
10992 (home-page "https://github.com/fschulze/pytest-flakes")
10993 (synopsis "Py.test plugin to check source code with pyflakes")
10994 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 10995 (license license:expat)))
df94a6b5
MB
10996
10997(define-public python2-pytest-flakes
f210e944 10998 (package-with-python2 python-pytest-flakes))
5467ea62
MB
10999
11000(define-public python-natsort
11001 (package
11002 (name "python-natsort")
11003 (version "5.0.1")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "natsort" version))
11007 (sha256
11008 (base32
11009 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11010 (build-system python-build-system)
11011 (arguments
11012 `(#:phases
11013 (modify-phases %standard-phases
11014 (add-before 'check 'set-cachedir
11015 ;; Tests require write access to $HOME by default
11016 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11017 (native-inputs
11018 `(("python-hypothesis" ,python-hypothesis)
11019 ("python-pytest-cache" ,python-pytest-cache)
11020 ("python-pytest-cov" ,python-pytest-cov)
11021 ("python-pytest-flakes" ,python-pytest-flakes)
11022 ("python-pytest-pep8" ,python-pytest-pep8)))
11023 (propagated-inputs ; TODO: Add python-fastnumbers.
11024 `(("python-pyicu" ,python-pyicu)))
11025 (home-page "https://github.com/SethMMorton/natsort")
11026 (synopsis "Natural sorting for python and shell")
11027 (description
11028 "Natsort lets you apply natural sorting on lists instead of
11029lexicographical. If you use the built-in @code{sorted} method in python
11030on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11031returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11032function @code{natsorted} that identifies numbers and sorts them separately
11033from strings. It can also sort version numbers, real numbers, mixed types
11034and more, and comes with a shell command @command{natsort} that exposes this
11035functionality in the command line.")
11036 (license license:expat)
11037 (properties `((python2-variant . ,(delay python2-natsort))))))
11038
11039(define-public python2-natsort
11040 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11041 (package (inherit base)
11042 (native-inputs
00e10c6e 11043 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11044 ("python2-mock" ,python2-mock)
11045 ("python2-enum34" ,python2-enum34)
11046 ,@(package-native-inputs base))))))
4efb9c54
SR
11047
11048(define-public python-glances
11049 (package
11050 (name "python-glances")
11051 (version "2.7.1")
11052 (source
11053 (origin
11054 (method url-fetch)
11055 (uri (pypi-uri "Glances" version))
11056 (sha256
11057 (base32
11058 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11059 (build-system python-build-system)
f22efa01 11060 (propagated-inputs
4efb9c54
SR
11061 `(("python-psutil" ,python-psutil)))
11062 (home-page
11063 "https://github.com/nicolargo/glances")
11064 (synopsis
11065 "A cross-platform curses-based monitoring tool")
11066 (description
11067 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11068Glances uses the PsUtil library to get information from your system. It monitors
11069CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11070 (license license:lgpl3+)))
4efb9c54
SR
11071
11072(define-public python2-glances
f210e944 11073 (package-with-python2 python-glances))
05b7a593
EF
11074
11075(define-public python-graphql-core
11076 (package
11077 (name "python-graphql-core")
11078 (version "0.5.3")
11079 (source
11080 (origin
11081 (method url-fetch)
11082 (uri (pypi-uri "graphql-core" version))
11083 (sha256
11084 (base32
11085 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11086 (build-system python-build-system)
11087 (arguments
326f8285
LF
11088 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11089 #:phases
05b7a593
EF
11090 (modify-phases %standard-phases
11091 (add-after 'unpack 'patch-hardcoded-version
11092 (lambda _ (substitute*
11093 "setup.py"
11094 (("'gevent==1.1rc1'") "'gevent'"))
11095 #t)))))
11096 (native-inputs
11097 `(("python-gevent" ,python-gevent)
11098 ("python-mock" ,python-mock)
11099 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11100 (propagated-inputs
05b7a593
EF
11101 `(("python-promise" ,python-promise)
11102 ("python-six" ,python-six)))
11103 (home-page "https://github.com/graphql-python/graphql-core")
11104 (synopsis "GraphQL implementation for Python")
11105 (description
11106 "GraphQL implementation for Python. GraphQL is a data query language and
11107runtime designed and used to request and deliver data to mobile and web apps.
11108This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11109to Python.")
05b7a593
EF
11110 (license license:expat)))
11111
11112(define-public python2-graphql-core
f210e944 11113 (package-with-python2 python-graphql-core))
7ee51575
EF
11114
11115(define-public python-graphql-relay
11116 (package
11117 (name "python-graphql-relay")
11118 (version "0.4.4")
11119 (source
11120 (origin
11121 (method url-fetch)
11122 (uri (pypi-uri "graphql-relay" version))
11123 (sha256
11124 (base32
11125 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11126 (build-system python-build-system)
11127 (native-inputs
11128 `(("python-pytest" ,python-pytest)))
f22efa01 11129 (propagated-inputs
7ee51575
EF
11130 `(("python-graphql-core" ,python-graphql-core)
11131 ("python-promise" ,python-promise)
11132 ("python-six" ,python-six)))
11133 (home-page "https://github.com/graphql-python/graphql-relay-py")
11134 (synopsis "Relay implementation for Python")
11135 (description
11136 "This is a library to allow the easy creation of Relay-compliant servers
11137using the GraphQL Python reference implementation of a GraphQL server. It
11138should be noted that the code is a exact port of the original
11139@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11140from Facebook.")
7ee51575
EF
11141 (license license:expat)))
11142
11143(define-public python2-graphql-relay
f210e944 11144 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11145
11146(define-public python-graphene
11147 (package
11148 (name "python-graphene")
11149 (version "0.10.2")
11150 (source
11151 (origin
11152 (method url-fetch)
11153 (uri (pypi-uri "graphene" version))
11154 (sha256
11155 (base32
11156 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11157 (build-system python-build-system)
11158 (native-inputs
11159 `(("python-django-filter" ,python-django-filter)
11160 ("python-mock" ,python-mock)
11161 ("python-psycopg2" ,python-psycopg2)
11162 ("python-pytest-django" ,python-pytest-django)
11163 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11164 (propagated-inputs
ddc63a56
EF
11165 `(("python-graphql-core" ,python-graphql-core)
11166 ("python-graphql-relay" ,python-graphql-relay)
11167 ("python-iso8601" ,python-iso8601)
11168 ("python-promise" ,python-promise)
11169 ("python-six" ,python-six)))
11170 (home-page "http://graphene-python.org/")
11171 (synopsis "GraphQL Framework for Python")
11172 (description
11173 "Graphene is a Python library for building GraphQL schemas/types.
11174A GraphQL schema describes your data model, and provides a GraphQL server
11175with an associated set of resolve methods that know how to fetch data.")
11176 (properties `((python2-variant . ,(delay python2-graphene))))
11177 (license license:expat)))
11178
11179(define-public python2-graphene
11180 (let ((base (package-with-python2
11181 (strip-python2-variant python-graphene))))
11182 (package (inherit base)
11183 (native-inputs
00e10c6e 11184 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11185 ,@(package-native-inputs base))))))
d488d5d6
EF
11186
11187(define-public python-nautilus
11188 (package
11189 (name "python-nautilus")
11190 (version "0.4.9")
11191 (source
11192 (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "nautilus" version))
11195 (sha256
11196 (base32
11197 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11198 (build-system python-build-system)
11199 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11200 (propagated-inputs
d488d5d6
EF
11201 `(("python-bcrypt" ,python-bcrypt)
11202 ("python-click" ,python-click)
11203 ("python-consul" ,python-consul)
11204 ("python-graphql-core" ,python-graphql-core)
11205 ("python-graphql-relay" ,python-graphql-relay)
11206 ("python-graphene" ,python-graphene)
11207 ("python-jinja2" ,python-jinja2)
11208 ("python-nose2" ,python-nose2)
11209 ("python-peewee" ,python-peewee)
11210 ("python-pika" ,python-pika)
11211 ("python-pycparser" ,python-pycparser)
11212 ("python-requests" ,python-requests)
11213 ("python-tornado" ,python-tornado)
11214 ("python-wtforms" ,python-wtforms)))
11215 (home-page "https://github.com/AlecAivazis/nautilus")
11216 (synopsis "Library for creating microservice applications")
11217 (description
11218 "Nautilus is a framework for flux based microservices that looks to
11219provide extendible implementations of common aspects of a cloud so that you can
11220focus on building massively scalable web applications.")
11221 (license license:expat)))
94cffc63 11222
66d3f50a
LF
11223(define-public python-betamax
11224 (package
11225 (name "python-betamax")
11226 (version "0.8.0")
11227 (source
11228 (origin
11229 (method url-fetch)
11230 (uri (pypi-uri "betamax" version))
11231 (sha256
11232 (base32
11233 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11234 (build-system python-build-system)
11235 (arguments
11236 '(;; Many tests fail because they require networking.
11237 #:tests? #f))
11238 (inputs
11239 `(("python-requests" ,python-requests)))
11240 (home-page "https://github.com/sigmavirus24/betamax")
11241 (synopsis "Record HTTP interactions with python-requests")
11242 (description "Betamax will record your test suite's HTTP interactions and
11243replay them during future tests. It is designed to work with python-requests.")
f210e944 11244 (license license:expat)))
66d3f50a
LF
11245
11246(define-public python2-betamax
f210e944 11247 (package-with-python2 python-betamax))
ca0635b4 11248
94cffc63
LF
11249(define-public python-s3transfer
11250 (package
11251 (name "python-s3transfer")
11252 (version "0.1.8")
11253 (source (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "s3transfer" version))
11256 (sha256
11257 (base32
11258 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11259 (build-system python-build-system)
fad8bf97
LF
11260 (arguments
11261 `(#:phases
11262 (modify-phases %standard-phases
11263 (replace 'check
11264 (lambda _
11265 ;; 7 of the 'integration' tests require network access or login
11266 ;; credentials.
11267 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11268 (native-inputs
fad8bf97
LF
11269 `(("python-docutils" ,python-docutils)
11270 ("python-mock" ,python-mock)
11271 ("python-nose" ,python-nose)))
f22efa01 11272 (propagated-inputs
94cffc63
LF
11273 `(("python-botocore" ,python-botocore)))
11274 (synopsis "Amazon S3 Transfer Manager")
11275 (description "S3transfer is a Python library for managing Amazon S3
11276transfers.")
11277 (home-page "https://github.com/boto/s3transfer")
11278 (license license:asl2.0)
11279 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11280
11281(define-public python2-s3transfer
11282 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11283 (package
11284 (inherit base)
11285 (native-inputs
11286 `(("python2-futures" ,python2-futures)
94cffc63 11287 ,@(package-native-inputs base))))))
8ab59181
HG
11288
11289(define-public python-setproctitle
11290(package
11291 (name "python-setproctitle")
11292 (version "1.1.10")
11293 (source
11294 (origin
11295 (method url-fetch)
11296 (uri (pypi-uri "setproctitle" version))
11297 (sha256
11298 (base32
11299 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11300 (build-system python-build-system)
11301 (arguments
11302 '(#:phases
11303 (modify-phases %standard-phases
11304 (add-before 'check 'patch-Makefile
11305 ;; Stricly this is only required for the python2 variant.
11306 ;; But adding a phase in an inherited package seems to be
11307 ;; cumbersum. So we patch even for python3.
11308 (lambda _
11309 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11310 (when nose
11311 (substitute* "Makefile"
11312 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11313 (string-append nose "/bin/nosetests "))))
11314 #t)))
11315 (replace 'check
11316 (lambda _
11317 (setenv "PYTHON" (or (which "python3") (which "python")))
11318 (setenv "PYCONFIG" (or (which "python3-config")
11319 (which "python-config")))
11320 (setenv "CC" "gcc")
11321 ;; No need to extend PYTHONPATH to find the built package, since
11322 ;; the Makefile will build anyway
11323 (zero? (system* "make" "check")))))))
11324 (native-inputs
11325 `(("procps" ,procps))) ; required for tests
11326 (home-page
11327 "https://github.com/dvarrazzo/py-setproctitle")
11328 (synopsis
11329 "Setproctitle implementation for Python to customize the process title")
11330 (description "The library allows a process to change its title (as displayed
11331by system tools such as ps and top).
11332
11333Changing the title is mostly useful in multi-process systems, for
11334example when a master process is forked: changing the children's title
11335allows to identify the task each process is busy with. The technique
11336is used by PostgreSQL and the OpenSSH Server for example.")
11337 (license license:bsd-3)
11338 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11339
11340(define-public python2-setproctitle
11341 (let ((base (package-with-python2
11342 (strip-python2-variant python-setproctitle))))
11343 (package
11344 (inherit base)
11345 (native-inputs `(("python2-nose" ,python2-nose)
11346 ,@(package-native-inputs base))))))
162e42d8
HG
11347
11348(define-public python-validictory
11349 (package
11350 (name "python-validictory")
11351 (version "1.0.1")
11352 (source
11353 (origin
11354 (method url-fetch)
11355 (uri (pypi-uri "validictory" version))
11356 (sha256
11357 (base32
11358 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11359 (build-system python-build-system)
11360 (arguments
11361 '(#:phases
11362 (modify-phases %standard-phases
11363 (add-after 'unpack 'bootstrap
11364 ;; Move the tests out of the package directory to avoid
11365 ;; packaging them.
11366 (lambda* _
11367 (rename-file "validictory/tests" "tests")
11368 (delete-file "tests/__init__.py")))
11369 (replace 'check
11370 (lambda _
11371 ;; Extend PYTHONPATH so the built package will be found.
11372 (setenv "PYTHONPATH"
11373 (string-append (getcwd) "/build/lib:"
11374 (getenv "PYTHONPATH")))
11375 (zero? (system* "py.test" "-vv" )))))))
11376 (native-inputs
11377 `(("python-pytest" ,python-pytest)))
11378 (home-page
11379 "https://github.com/jamesturk/validictory")
11380 (synopsis "General purpose Python data validator")
11381 (description "It allows validation of arbitrary Python data structures.
11382
11383The schema format is based on the JSON Schema
11384proposal (http://json-schema.org), so combined with json the library is also
11385useful as a validator for JSON data.")
f210e944 11386 (license license:expat)))
162e42d8
HG
11387
11388(define-public python2-validictory
f210e944 11389 (package-with-python2 python-validictory))
0990edfe
DM
11390
11391(define-public python-aniso8601
11392 (package
11393 (name "python-aniso8601")
11394 (version "1.1.0")
11395 (source
11396 (origin
11397 (method url-fetch)
11398 (uri (pypi-uri "aniso8601" version))
11399 (sha256
11400 (base32
11401 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11402 (build-system python-build-system)
11403 (propagated-inputs
11404 `(("python-dateutil-2" ,python-dateutil-2)))
11405 (home-page
11406 "https://bitbucket.org/nielsenb/aniso8601")
11407 (synopsis
11408 "Python library for parsing ISO 8601 strings")
11409 (description
11410 "This package contains a library for parsing ISO 8601 datetime strings.")
11411 (license license:bsd-3)))
999d964d
DM
11412
11413(define-public python-flask-restful
11414 (package
11415 (name "python-flask-restful")
11416 (version "0.3.5")
11417 (source
11418 (origin
11419 (method url-fetch)
11420 (uri (pypi-uri "Flask-RESTful" version))
11421 (sha256
11422 (base32
11423 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11424 (build-system python-build-system)
11425 (propagated-inputs
11426 `(("python-aniso8601" ,python-aniso8601)
11427 ("python-flask" ,python-flask)
11428 ("python-pycrypto" ,python-pycrypto)
11429 ("python-pytz" ,python-pytz)))
11430 (native-inputs
11431 `(;; Optional dependency of Flask. Tests need it.
11432 ("python-blinker" ,python-blinker)
11433 ("python-mock" ,python-mock) ; For tests
11434 ("python-nose" ,python-nose) ; For tests
11435 ("python-sphinx" ,python-sphinx)))
11436 (home-page
11437 "https://www.github.com/flask-restful/flask-restful/")
11438 (synopsis
11439 "Flask module for creating REST APIs")
11440 (description
11441 "This package contains a Flask module for creating REST APIs.")
11442 (license license:bsd-3)))
31288222
DM
11443
11444(define-public python-flask-basicauth
11445 (package
11446 (name "python-flask-basicauth")
11447 (version "0.2.0")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "Flask-BasicAuth" version))
11452 (sha256
11453 (base32
11454 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11455 (build-system python-build-system)
11456 (propagated-inputs
11457 `(("python-flask" ,python-flask)))
11458 (home-page
11459 "https://github.com/jpvanhal/flask-basicauth")
11460 (synopsis
11461 "HTTP basic access authentication for Flask")
11462 (description
11463 "This package provides HTTP basic access authentication for Flask.")
11464 (license license:bsd-3)))
903276d0
DM
11465
11466(define-public python-flask-sqlalchemy
11467 (package
11468 (name "python-flask-sqlalchemy")
11469 (version "2.1")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (pypi-uri "Flask-SQLAlchemy" version))
11474 (sha256
11475 (base32
11476 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11477 (build-system python-build-system)
11478 (propagated-inputs
11479 `(("python-flask" ,python-flask)
11480 ("python-sqlalchemy" ,python-sqlalchemy)))
11481 (home-page
11482 "http://github.com/mitsuhiko/flask-sqlalchemy")
11483 (synopsis
11484 "Module adding SQLAlchemy support to your Flask application")
11485 (description
11486 "This package adds SQLAlchemy support to your Flask application.")
11487 (license license:bsd-3)))
329b4b3b
LF
11488
11489(define-public python-pyev
11490 (package
11491 (name "python-pyev")
11492 (version "0.9.0")
11493 (source
11494 (origin
11495 (method url-fetch)
11496 (uri (pypi-uri "pyev" version))
11497 (sha256
11498 (base32
11499 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11500 (build-system python-build-system)
11501 (arguments
11502 `(#:tests? #f ; no test suite
11503 #:phases
11504 (modify-phases %standard-phases
11505 (add-after 'unpack 'patch
11506 (lambda* (#:key inputs #:allow-other-keys)
11507 (let ((libev (string-append (assoc-ref inputs "libev")
11508 "/lib/libev.so.4")))
11509 (substitute* "setup.py"
11510 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11511 (string-append "libev_dll_name = \"" libev "\"")))))))))
11512 (inputs
11513 `(("libev" ,libev)))
11514 (home-page "http://pythonhosted.org/pyev/")
11515 (synopsis "Python libev interface")
11516 (description "Pyev provides a Python interface to libev.")
11517 (license license:gpl3)))
11518
11519(define-public python2-pyev
11520 (package-with-python2 python-pyev))
45b4f127
DM
11521
11522(define-public python-imagesize
11523 (package
11524 (name "python-imagesize")
11525 (version "0.7.1")
11526 (source
11527 (origin
11528 (method url-fetch)
11529 (uri (pypi-uri "imagesize" version))
11530 (sha256
11531 (base32
11532 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11533 (build-system python-build-system)
9422c98a
LF
11534 (arguments
11535 '(;; Test files are not distributed on PyPi:
11536 ;; https://github.com/shibukawa/imagesize_py/issues/7
11537 #:tests? #f))
45b4f127
DM
11538 (home-page "https://github.com/shibukawa/imagesize_py")
11539 (synopsis "Gets image size of files in variaous formats in Python")
11540 (description
11541 "This package allows determination of image size from
11542PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11543 (license license:expat)))
45b4f127
DM
11544
11545(define-public python2-imagesize
f210e944 11546 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11547
11548(define-public python-axolotl-curve25519
11549 (package
11550 (name "python-axolotl-curve25519")
11551 (version "0.1")
11552 (source
11553 (origin
11554 (method git-fetch)
11555 (uri (git-reference
11556 (url "git://github.com/tgalal/python-axolotl-curve25519")
11557 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11558 (file-name (string-append name "-" version "-checkout"))
11559 (sha256
11560 (base32
11561 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11562 (build-system python-build-system)
11563 (arguments
11564 `(;; Prevent creation of the egg. This works around
11565 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11566 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11567 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11568 (synopsis "Python wrapper for curve25519 library")
11569 (description "This is a python wrapper for the curve25519 library
11570with ed25519 signatures. The C code was pulled from
11571libaxolotl-android. At the moment this wrapper is meant for use by
11572python-axolotl.")
11573 (license (list license:gpl3 ; Most files
683cdbf5 11574 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11575
11576(define-public python2-axolotl-curve25519
11577 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11578
11579(define-public python-axolotl
11580 (package
11581 (name "python-axolotl")
11582 (version "0.1.35")
11583 (source
11584 (origin
11585 (method url-fetch)
11586 (uri (string-append
11587 "https://github.com/tgalal/python-axolotl/archive/"
11588 version ".tar.gz"))
11589 (file-name (string-append name "-" version ".tar.gz"))
11590 (sha256
11591 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11592 (build-system python-build-system)
11593 (arguments
11594 `(#:phases
11595 (modify-phases %standard-phases
11596 ;; Don't install tests
11597 (add-before 'install 'remove-tests
11598 (lambda _
11599 (for-each delete-file-recursively
11600 '("axolotl/tests" "build/lib/axolotl/tests"))
11601 #t)))
11602 ;; Prevent creation of the egg. This works around
11603 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11604 #:configure-flags '("--root=/")))
06ff0837
AI
11605 (propagated-inputs
11606 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11607 ("python-dateutil" ,python-dateutil)
11608 ("python-protobuf" ,python-protobuf)
11609 ("python-pycrypto" ,python-pycrypto)))
11610 (home-page "https://github.com/tgalal/python-axolotl")
11611 (synopsis "Python port of libaxolotl-android")
11612 (description "This is a python port of libaxolotl-android. This
11613is a ratcheting forward secrecy protocol that works in synchronous and
11614asynchronous messaging environments.")
11615 (license license:gpl3)))
11616
11617(define-public python2-axolotl
11618 (package-with-python2 python-axolotl))
e2fca490
DM
11619
11620(define-public python-termstyle
11621 (package
11622 (name "python-termstyle")
11623 (version "0.1.11")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "termstyle" version))
11628 (sha256
11629 (base32
11630 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11631 (build-system python-build-system)
11632 (home-page "http://github.com/gfxmonk/termstyle")
11633 (synopsis "Console text coloring for Python")
11634 (description "This package provides console text coloring for Python.")
11635 (license license:bsd-3)))
1e6112d8
DM
11636
11637(define-public python-rednose
11638 (package
11639 (name "python-rednose")
11640 (version "1.2.1")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "rednose" version))
11645 (sha256
11646 (base32
11647 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11648 (build-system python-build-system)
11649 (arguments
11650 `(#:phases
11651 (modify-phases %standard-phases
11652 (add-after 'unpack 'fix-deps
11653 (lambda _
11654 ;; See <https://github.com/JBKahn/rednose/issues/12>
11655 (substitute* "setup.py"
11656 (("python-termstyle") "termstyle"))
11657 #t)))))
11658 (propagated-inputs
11659 `(("python-colorama" ,python-colorama)
11660 ("python-termstyle" ,python-termstyle)))
11661 (native-inputs
11662 `(("python-six" ,python-six)
11663 ("python-nose" ,python-nose)))
11664 (home-page "https://github.com/JBKahn/rednose")
11665 (synopsis "Colored output for Python nosetests")
11666 (description "This package provides colored output for the
11667@command{nosetests} command of the Python Nose unit test framework.")
11668 (license license:bsd-3)))
0a7f17f0
DM
11669
11670(define-public python-flask-restplus
11671 (package
11672 (name "python-flask-restplus")
11673 (version "0.9.2")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "flask-restplus" version))
11678 (sha256
11679 (base32
11680 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11681 (build-system python-build-system)
11682 (propagated-inputs
11683 `(("python-aniso8601" ,python-aniso8601)
11684 ("python-flask" ,python-flask)
11685 ("python-jsonschema" ,python-jsonschema)
11686 ("python-pytz" ,python-pytz)
11687 ("python-six" ,python-six)))
11688 (native-inputs
11689 `(("python-tzlocal" ,python-tzlocal)
11690 ("python-blinker" ,python-blinker)
11691 ("python-nose" ,python-nose)
11692 ("python-rednose" ,python-rednose)))
11693 (home-page "https://github.com/noirbizarre/flask-restplus")
11694 (synopsis "Framework for documented API development with Flask")
11695 (description "This package provides a framework for API development with
11696the Flask web framework in Python. It is similar to package
11697@code{python-flask-restful} but supports the @code{python-swagger}
11698documentation builder.")
11699 (license license:expat)))