Merge branch 'master' into python-tests
[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>
7637de23 14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
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>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
819939cb 35;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d205f895 36;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
a01b6da7
NK
37;;;
38;;; This file is part of GNU Guix.
39;;;
40;;; GNU Guix is free software; you can redistribute it and/or modify it
41;;; under the terms of the GNU General Public License as published by
42;;; the Free Software Foundation; either version 3 of the License, or (at
43;;; your option) any later version.
44;;;
45;;; GNU Guix is distributed in the hope that it will be useful, but
46;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48;;; GNU General Public License for more details.
49;;;
50;;; You should have received a copy of the GNU General Public License
51;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
1ffa7090 53(define-module (gnu packages python)
3f641af0 54 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 55 #:use-module (gnu packages)
8e451885 56 #:use-module (gnu packages algebra)
d79a343b 57 #:use-module (gnu packages adns)
89b2e0b0 58 #:use-module (gnu packages attr)
d96034ed 59 #:use-module (gnu packages backup)
3969ca54 60 #:use-module (gnu packages bash)
1ffa7090 61 #:use-module (gnu packages compression)
4ed20663 62 #:use-module (gnu packages databases)
ddc63a56 63 #:use-module (gnu packages django)
5e1c9367 64 #:use-module (gnu packages file)
4ed20663 65 #:use-module (gnu packages fontutils)
4ed20663
AE
66 #:use-module (gnu packages gcc)
67 #:use-module (gnu packages ghostscript)
6eb7af2a 68 #:use-module (gnu packages gl)
4ed20663 69 #:use-module (gnu packages glib)
6eb7af2a 70 #:use-module (gnu packages gstreamer)
4ed20663 71 #:use-module (gnu packages gtk)
421a80a2 72 #:use-module (gnu packages icu4c)
c937562e 73 #:use-module (gnu packages image)
4ed20663 74 #:use-module (gnu packages imagemagick)
d79a343b 75 #:use-module (gnu packages libevent)
b10ab723 76 #:use-module (gnu packages libffi)
89b2e0b0 77 #:use-module (gnu packages linux)
ed118043 78 #:use-module (gnu packages man)
0da98533 79 #:use-module (gnu packages maths)
4ed20663 80 #:use-module (gnu packages multiprecision)
45203542 81 #:use-module (gnu packages networking)
be7134bf 82 #:use-module (gnu packages ncurses)
b04a52a6 83 #:use-module (gnu packages openstack)
d488d5d6 84 #:use-module (gnu packages password-utils)
c9b1b4f9 85 #:use-module (gnu packages pcre)
4ed20663 86 #:use-module (gnu packages perl)
b10ab723 87 #:use-module (gnu packages pkg-config)
06ff0837 88 #:use-module (gnu packages protobuf)
4ed20663 89 #:use-module (gnu packages readline)
6eb7af2a 90 #:use-module (gnu packages sdl)
80ce42bd 91 #:use-module (gnu packages shells)
c9b1b4f9 92 #:use-module (gnu packages statistics)
8f9ac901 93 #:use-module (gnu packages tex)
1c65314c 94 #:use-module (gnu packages texinfo)
cc2b77df 95 #:use-module (gnu packages tls)
e25f0174 96 #:use-module (gnu packages version-control)
02f8f804 97 #:use-module (gnu packages video)
8d12be1e 98 #:use-module (gnu packages web)
ce0614dd 99 #:use-module (gnu packages base)
26b307e2 100 #:use-module (gnu packages xml)
6fa14469 101 #:use-module (gnu packages xorg)
0bdc1671 102 #:use-module (gnu packages xdisorg)
4ed20663 103 #:use-module (gnu packages zip)
afa181ff 104 #:use-module (gnu packages tcl)
63bcec71 105 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
106 #:use-module (guix packages)
107 #:use-module (guix download)
ea5456c8 108 #:use-module (guix git-download)
11bb85a1 109 #:use-module (guix utils)
acc26ff1 110 #:use-module (guix build-system gnu)
d8c4998f 111 #:use-module (guix build-system cmake)
898238b9 112 #:use-module (guix build-system python)
1c65314c
FB
113 #:use-module (guix build-system trivial)
114 #:use-module (srfi srfi-1))
a01b6da7 115
45848023 116(define-public python-2.7
a01b6da7
NK
117 (package
118 (name "python")
f0499100 119 (version "2.7.12")
a01b6da7
NK
120 (source
121 (origin
122 (method url-fetch)
9b43a0ff 123 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
124 version "/Python-" version ".tar.xz"))
125 (sha256
126 (base32
f0499100 127 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
128 (patches (search-patches "python-2.7-search-paths.patch"
129 "python-2-deterministic-build-info.patch"
15e57f57 130 "python-2.7-site-prefixes.patch"
c3052d6b 131 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
132 (modules '((guix build utils)))
133 ;; suboptimal to delete failing tests here, but if we delete them in the
134 ;; arguments then we need to make sure to strip out that phase when it
135 ;; gets inherited by python and python-minimal.
136 (snippet
137 '(begin
138 (for-each delete-file
139 '("Lib/test/test_compileall.py"
f0499100 140 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
141 "Lib/test/test_distutils.py"
142 "Lib/test/test_import.py"
143 "Lib/test/test_shutil.py"
144 "Lib/test/test_socket.py"
1bb163b0 145 "Lib/test/test_subprocess.py"))
10a42aa2 146 #t))))
02f0c3b2
LC
147 (outputs '("out"
148 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 149 (build-system gnu-build-system)
3fdc99da 150 (arguments
10a42aa2 151 `(;; 356 tests OK.
e7e7a1eb
EF
152 ;; 6 tests failed:
153 ;; test_compileall test_distutils test_import test_shutil test_socket
154 ;; test_subprocess
155 ;; 39 tests skipped:
ff6f33cf
ED
156 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
157 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
158 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
159 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
160 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
161 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
162 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
163 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
164 ;; test_winreg test_winsound test_zipfile64
165 ;; 4 skips unexpected on linux2:
166 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 167 #:test-target "test"
3fdc99da 168 #:configure-flags
6a20289d
LC
169 (list "--enable-shared" ;allow embedding
170 "--with-system-ffi" ;build ctypes
aaf75c89 171 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
172 (string-append "LDFLAGS=-Wl,-rpath="
173 (assoc-ref %outputs "out") "/lib"))
fd982732 174
d2cc9c7c
LC
175 #:modules ((ice-9 ftw) (ice-9 match)
176 (guix build utils) (guix build gnu-build-system))
fd982732 177 #:phases
46472ecd
MW
178 (modify-phases %standard-phases
179 (add-before
180 'configure 'patch-lib-shells
181 (lambda _
182 ;; Filter for existing files, since some may not exist in all
183 ;; versions of python that are built with this recipe.
184 (substitute* (filter file-exists?
185 '("Lib/subprocess.py"
186 "Lib/popen2.py"
187 "Lib/distutils/tests/test_spawn.py"
188 "Lib/test/test_subprocess.py"))
189 (("/bin/sh") (which "sh")))
dedc8320
LC
190
191 ;; Use zero as the timestamp in .pyc files so that builds are
192 ;; deterministic. TODO: Remove it when this variable is set in
193 ;; gnu-build-system.scm.
a665996f 194 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 195 #t))
5b4e2791
LC
196 (add-before 'configure 'do-not-record-configure-flags
197 (lambda* (#:key configure-flags #:allow-other-keys)
198 ;; Remove configure flags from the installed '_sysconfigdata.py'
199 ;; and 'Makefile' so we don't end up keeping references to the
200 ;; build tools.
201 ;;
202 ;; Preserve at least '--with-system-ffi' since otherwise the
203 ;; thing tries to build libffi, fails, and we end up with a
204 ;; Python that lacks ctypes.
205 (substitute* "configure"
206 (("^CONFIG_ARGS=.*$")
207 (format #f "CONFIG_ARGS='~a'\n"
208 (if (member "--with-system-ffi" configure-flags)
209 "--with-system-ffi"
210 ""))))
211 #t))
46472ecd
MW
212 (add-before
213 'check 'pre-check
214 (lambda _
215 ;; 'Lib/test/test_site.py' needs a valid $HOME
216 (setenv "HOME" (getcwd))
217 #t))
218 (add-after
219 'unpack 'set-source-file-times-to-1980
220 ;; XXX One of the tests uses a ZIP library to pack up some of the
221 ;; source tree, and fails with "ZIP does not support timestamps
222 ;; before 1980". Work around this by setting the file times in the
223 ;; source tree to sometime in early 1980.
224 (lambda _
225 (let ((circa-1980 (* 10 366 24 60 60)))
226 (ftw "." (lambda (file stat flag)
227 (utime file circa-1980 circa-1980)
228 #t))
02f0c3b2 229 #t)))
9ffe61b0
LC
230 (add-after 'install 'remove-tests
231 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
232 ;; because these files are used by some libraries out there.
233 (lambda* (#:key outputs #:allow-other-keys)
234 (let ((out (assoc-ref outputs "out")))
235 (match (scandir (string-append out "/lib")
236 (lambda (name)
237 (string-prefix? "python" name)))
238 ((pythonX.Y)
239 (let ((testdir (string-append out "/lib/" pythonX.Y
240 "/test")))
241 (with-directory-excursion testdir
242 (for-each delete-file-recursively
243 (scandir testdir
244 (match-lambda
245 ((or "." "..") #f)
246 (file
247 (not
248 (string-prefix? "test_support."
249 file))))))
250 (call-with-output-file "__init__.py" (const #t))
251 #t)))))))
216c283b
LC
252 (add-before 'strip 'make-libraries-writable
253 (lambda* (#:key outputs #:allow-other-keys)
254 ;; Make .so files writable so they can be stripped.
255 (let ((out (assoc-ref outputs "out")))
256 (for-each (lambda (file)
257 (chmod file #o755))
258 (find-files (string-append out "/lib")
259 "\\.so"))
260 #t)))
02f0c3b2
LC
261 (add-after 'install 'move-tk-inter
262 (lambda* (#:key outputs #:allow-other-keys)
263 ;; When Tkinter support is built move it to a separate output so
264 ;; that the main output doesn't contain a reference to Tcl/Tk.
265 (let ((out (assoc-ref outputs "out"))
266 (tk (assoc-ref outputs "tk")))
267 (when tk
268 (match (find-files out "tkinter.*\\.so")
269 ((tkinter.so)
270 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
271 ;; want it under TK/lib/pythonX.Y/site-packages.
272 (let* ((len (string-length out))
273 (target (string-append
274 tk "/"
275 (string-drop
276 (dirname (dirname tkinter.so))
277 len)
278 "/site-packages")))
279 (install-file tkinter.so target)
280 (delete-file tkinter.so)))))
281 #t))))))
a01b6da7 282 (inputs
3fdc99da
CR
283 `(("bzip2" ,bzip2)
284 ("gdbm" ,gdbm)
b10ab723 285 ("libffi" ,libffi) ; for ctypes
b88e1b0a 286 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 287 ("openssl" ,openssl)
3fdc99da 288 ("readline" ,readline)
afa181ff
LC
289 ("zlib" ,zlib)
290 ("tcl" ,tcl)
291 ("tk" ,tk))) ; for tkinter
b10ab723
CR
292 (native-inputs
293 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
294 (native-search-paths
295 (list (search-path-specification
296 (variable "PYTHONPATH")
af070955 297 (files '("lib/python2.7/site-packages")))))
f0499100 298 (home-page "https://www.python.org")
afa181ff 299 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
300 (description
301 "Python is a remarkably powerful dynamic programming language that
302is used in a wide variety of application domains. Some of its key
303distinguishing features include: clear, readable syntax; strong
304introspection capabilities; intuitive object orientation; natural
305expression of procedural code; full modularity, supporting hierarchical
306packages; exception-based error handling; and very high level dynamic
307data types.")
3f641af0 308 (license license:psfl)))
acc26ff1 309
45848023
HG
310;; Current 2.x version.
311(define-public python-2 python-2.7)
312
72df6680 313(define-public python-3.5
b24d1cfc 314 (package (inherit python-2)
72df6680 315 (version "3.5.2")
717003e3
LC
316 (source (origin
317 (method url-fetch)
318 (uri (string-append "https://www.python.org/ftp/python/"
319 version "/Python-" version ".tar.xz"))
fc1adab1
AK
320 (patches (search-patches
321 "python-fix-tests.patch"
72df6680 322 "python-3.5-fix-tests.patch"
fc1adab1
AK
323 "python-3-deterministic-build-info.patch"
324 "python-3-search-paths.patch"))
717003e3
LC
325 (patch-flags '("-p0"))
326 (sha256
327 (base32
72df6680 328 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
329 (arguments (substitute-keyword-arguments (package-arguments python-2)
330 ((#:tests? _) #t)))
1aebc0cb
AE
331 (native-search-paths
332 (list (search-path-specification
333 (variable "PYTHONPATH")
0e05d01e
SB
334 (files (list (string-append "lib/python"
335 (version-major+minor version)
336 "/site-packages"))))))))
f26a77ff 337
72df6680
LF
338(define-public python-3.4
339 (package (inherit python-3.5)
340 (version "3.4.5")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "https://www.python.org/ftp/python/"
344 version "/Python-" version ".tar.xz"))
345 (patches (search-patches
346 "python-fix-tests.patch"
347 "python-3.4-fix-tests.patch"
348 "python-3-deterministic-build-info.patch"
349 "python-3-search-paths.patch"))
350 (patch-flags '("-p0"))
351 (sha256
352 (base32
353 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
354
45848023 355;; Current 3.x version.
72df6680 356(define-public python-3 python-3.5)
45848023
HG
357
358;; Current major version.
359(define-public python python-3)
360
95288fcc
LC
361;; Minimal variants of Python, mostly used to break the cycle between Tk and
362;; Python (Tk -> libxcb -> Python.)
363
364(define-public python2-minimal
365 (package (inherit python-2)
366 (name "python-minimal")
02f0c3b2 367 (outputs '("out"))
95288fcc
LC
368 (arguments
369 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
370 ((#:configure-flags cf)
371 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
372 (inputs '()))) ;none of the optional dependencies
373
374(define-public python-minimal
898238b9 375 (package (inherit python)
95288fcc 376 (name "python-minimal")
02f0c3b2 377 (outputs '("out"))
95288fcc 378
d0b73960 379 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
95288fcc
LC
384 ("zlib" ,zlib)))))
385
64cb064c
LC
386(define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
898238b9 389 (package (inherit python)
95288fcc 390 (name name)
898238b9
AE
391 (source #f)
392 (build-system trivial-build-system)
02f0c3b2 393 (outputs '("out"))
3969ca54 394 (inputs `(("bash" ,bash)))
3c0f2329 395 (propagated-inputs `(("python" ,python)))
898238b9
AE
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
3969ca54
SB
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
0d56e3e1
LC
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425that they can be invoked under their usual name---e.g., @command{python}
426instead of @command{python3}.")))
427
95288fcc
LC
428(define-public python-wrapper (wrap-python3 python))
429(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 430
aaf625b8
RW
431(define-public python-psutil
432 (package
433 (name "python-psutil")
88535a44 434 (version "4.3.0")
aaf625b8
RW
435 (source
436 (origin
437 (method url-fetch)
f56777be 438 (uri (pypi-uri "psutil" version))
aaf625b8
RW
439 (sha256
440 (base32
88535a44 441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 442 (build-system python-build-system)
fb08c4fe
MB
443 (arguments
444 ;; FIXME: some tests does not return and times out.
445 '(#:tests? #f))
88535a44 446 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
447 (synopsis "Library for retrieving information on running processes")
448 (description
449 "psutil (Python system and process utilities) is a library for retrieving
450information on running processes and system utilization (CPU, memory, disks,
451network) in Python. It is useful mainly for system monitoring, profiling and
452limiting process resources and management of running processes. It implements
453many functionalities offered by command line tools such as: ps, top, lsof,
454netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
455pidof, tty, taskset, pmap.")
3f641af0 456 (license license:bsd-3)))
aaf625b8
RW
457
458(define-public python2-psutil
459 (package-with-python2 python-psutil))
898238b9 460
f9da1d8a
ED
461(define-public python-passlib
462 (package
463 (name "python-passlib")
1c9f78ec 464 (version "1.7.0")
f9da1d8a
ED
465 (source
466 (origin
467 (method url-fetch)
690e8c66 468 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
469 (sha256
470 (base32
1c9f78ec 471 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
472 (build-system python-build-system)
473 (native-inputs
f3b98f4f 474 `(("python-nose" ,python-nose)))
f22efa01 475 (propagated-inputs
f9da1d8a
ED
476 `(("python-py-bcrypt" ,python-py-bcrypt)))
477 (arguments
478 `(#:phases
479 (alist-cons-before
480 'check 'set-PYTHON_EGG_CACHE
481 ;; some tests require access to "$HOME/.cython"
482 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
483 %standard-phases)))
484 (home-page "https://bitbucket.org/ecollins/passlib")
485 (synopsis
486 "Comprehensive password hashing framework")
487 (description
488 "Passlib is a password hashing library for Python 2 & 3, which provides
489cross-platform implementations of over 30 password hashing algorithms, as well
490as a framework for managing existing password hashes. It's designed to be
491useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
492to providing full-strength password hashing for multi-user application.")
3f641af0 493 (license license:bsd-3)))
f9da1d8a
ED
494
495(define-public python2-passlib
496 (package-with-python2 python-passlib))
497
feb0d9c3
ED
498(define-public python-py-bcrypt
499 (package
500 (name "python-py-bcrypt")
501 (version "0.4")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append
506 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
507 version
508 ".tar.gz"))
509 (sha256
510 (base32
511 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
512 (build-system python-build-system)
feb0d9c3
ED
513 (home-page "https://code.google.com/p/py-bcrypt")
514 (synopsis
515 "Bcrypt password hashing and key derivation")
516 (description
517 "A python wrapper of OpenBSD's Blowfish password hashing code. This
518system hashes passwords using a version of Bruce Schneier's Blowfish block
519cipher with modifications designed to raise the cost of off-line password
520cracking and frustrate fast hardware implementation. The computation cost of
521the algorithm is parametised, so it can be increased as computers get faster.
522The intent is to make a compromise of a password database less likely to
523result in an attacker gaining knowledge of the plaintext passwords (e.g. using
524John the Ripper).")
525 ;; "sha2.c" is under BSD-3;
526 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
527 ;; the rest is under ISC.
3f641af0 528 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
529
530(define-public python2-py-bcrypt
531 (package-with-python2 python-py-bcrypt))
532
533
429fdea1
ED
534(define-public python-paramiko
535 (package
536 (name "python-paramiko")
81b9bbbd 537 (version "1.16.0")
429fdea1
ED
538 (source
539 (origin
540 (method url-fetch)
81b9bbbd 541 (uri (pypi-uri "paramiko" version))
429fdea1
ED
542 (sha256
543 (base32
81b9bbbd 544 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 545 (build-system python-build-system)
49910e6a
MB
546 (arguments
547 '(;; FIXME: One test fails with "EOFError not raised by connect".
548 #:tests? #f))
549 ;; #:phases
550 ;; (modify-phases %standard-phases
551 ;; (replace 'check
552 ;; (lambda _
553 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 554 (propagated-inputs
f22efa01
HG
555 `(("python-pycrypto" ,python-pycrypto)
556 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
557 (home-page "http://www.paramiko.org/")
558 (synopsis "SSHv2 protocol library")
559 (description "Paramiko is a python implementation of the SSHv2 protocol,
560providing both client and server functionality. While it leverages a Python C
561extension for low level cryptography (PyCrypto), Paramiko itself is a pure
562Python interface around SSH networking concepts.")
3f641af0 563 (license license:lgpl2.1+)))
429fdea1
ED
564
565(define-public python2-paramiko
566 (package-with-python2 python-paramiko))
567
568
de73dbf6
ED
569(define-public python-httplib2
570 (package
571 (name "python-httplib2")
286f1bac 572 (version "0.9.2")
de73dbf6
ED
573 (source
574 (origin
575 (method url-fetch)
286f1bac 576 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
577 (sha256
578 (base32
286f1bac 579 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 580 (build-system python-build-system)
286f1bac 581 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
582 (synopsis "Comprehensive HTTP client library")
583 (description
584 "A comprehensive HTTP client library supporting many features left out of
585other HTTP libraries.")
586 (license license:expat)))
587
588(define-public python2-httplib2
589 (package-with-python2 python-httplib2))
590
67039875
ED
591(define-public python-ecdsa
592 (package
593 (name "python-ecdsa")
594 (version "0.13")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
600 version
601 ".tar.gz"))
602 (sha256
603 (base32
604 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
605 (build-system python-build-system)
67039875
ED
606 (inputs
607 `(("openssl" ,openssl)))
608 (home-page
609 "http://github.com/warner/python-ecdsa")
610 (synopsis
611 "ECDSA cryptographic signature library (pure python)")
612 (description
613 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
614Curve Digital Signature Algorithm), implemented purely in Python. With this
615library, you can quickly create keypairs (signing key and verifying key), sign
616messages, and verify the signatures. The keys and signatures are very short,
617making them easy to handle and incorporate into other protocols.")
618 (license license:expat)))
619
620(define-public python2-ecdsa
621 (package-with-python2 python-ecdsa))
622
52323f32
ED
623(define-public python-ccm
624 (package
625 (name "python-ccm")
db5567f7 626 (version "2.1.6")
52323f32
ED
627 (source
628 (origin
629 (method url-fetch)
db5567f7 630 (uri (pypi-uri "ccm" version))
52323f32
ED
631 (sha256
632 (base32
db5567f7 633 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 634 (build-system python-build-system)
f22efa01 635 (propagated-inputs
52323f32 636 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
637 ;; Not listed in setup.py, but used in ccmlib/node.py for full
638 ;; functionality
639 ("python-psutil" ,python-psutil)
52323f32
ED
640 ("python-six" ,python-six)))
641 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
642 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
643localhost")
644 (description "Cassandra Cluster Manager is a development tool for testing
645local Cassandra clusters. It creates, launches and removes Cassandra clusters
646on localhost.")
3f641af0 647 (license license:asl2.0)))
52323f32
ED
648
649(define-public python2-ccm
650 (package-with-python2 python-ccm))
651
89114f39 652(define-public python-pytz
acc26ff1 653 (package
89114f39 654 (name "python-pytz")
a5f92ca0 655 (version "2016.10")
acc26ff1
CR
656 (source
657 (origin
658 (method url-fetch)
61c9babb 659 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
660 (sha256
661 (base32
a5f92ca0 662 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 663 (build-system python-build-system)
8498b8cf 664 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 665 (home-page "http://pythonhosted.org/pytz")
9e771e3b 666 (synopsis "Python timezone library")
acc26ff1
CR
667 (description
668 "This library allows accurate and cross platform timezone calculations
669using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 670 (license license:expat)))
5ace6e2f 671
89114f39 672(define-public python2-pytz
11bb85a1 673 (package-with-python2 python-pytz))
89114f39 674
fc50e9c6 675
89114f39 676(define-public python-babel
5ace6e2f 677 (package
89114f39 678 (name "python-babel")
ffb1e98d 679 (version "2.3.4")
5ace6e2f
CR
680 (source
681 (origin
682 (method url-fetch)
b850a6d8 683 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
684 (sha256
685 (base32
ffb1e98d 686 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 687 (build-system python-build-system)
f22efa01 688 (propagated-inputs
f3b98f4f 689 `(("python-pytz" ,python-pytz)))
8498b8cf 690 (arguments `(#:tests? #f)) ; no test target
e1804763 691 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
692 (synopsis
693 "Tools for internationalizing Python applications")
694 (description
695 "Babel is composed of two major parts:
696- tools to build and work with gettext message catalogs
697- a Python interface to the CLDR (Common Locale Data Repository), providing
698access to various locale display names, localized number and date formatting,
699etc. ")
3f641af0 700 (license license:bsd-3)))
89114f39
AE
701
702(define-public python2-babel
11bb85a1 703 (package-with-python2 python-babel))
73adf220 704
ed377cc6
RW
705(define-public python2-backport-ssl-match-hostname
706 (package
707 (name "python2-backport-ssl-match-hostname")
f2d06d46 708 (version "3.5.0.1")
ed377cc6
RW
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://pypi.python.org/packages/source/b/"
714 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
715 version ".tar.gz"))
716 (sha256
717 (base32
f2d06d46 718 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 719 (build-system python-build-system)
f2d06d46
EF
720 (arguments
721 `(#:python ,python-2
722 #:tests? #f)) ; no test target
f2d06d46
EF
723 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
724 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
725 (description
726 "This backport brings the ssl.match_hostname() function to users of
727earlier versions of Python. The function checks the hostname in the
728certificate returned by the server to which a connection has been established,
729and verifies that it matches the intended target hostname.")
3f641af0 730 (license license:psfl)))
ed377cc6 731
d205f895
TD
732(define-public python-hdf4
733 (package
734 (name "python-hdf4")
735 (version "0.9")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (pypi-uri name version))
740 (sha256
741 (base32
742 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
743 (build-system python-build-system)
744 (native-inputs `(("nose" ,python-nose)))
745 (propagated-inputs `(("numpy" ,python-numpy)))
746 (inputs
747 `(("hdf4" ,hdf4)
748 ("libjpeg" ,libjpeg)
749 ("zlib" ,zlib)))
750 (arguments
751 `(#:phases
752 (modify-phases %standard-phases
753 (replace 'check
754 (lambda _
755 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
756 ;; on to import numpy. Somehow this works on their CI system.
757 ;; Let's just manage PYTHONPATH here instead.
758 (substitute* "runexamples.sh"
759 (("export PYTHONPATH=.*") ""))
760 (setenv "PYTHONPATH"
761 (string-append (getcwd) ":"
762 (getenv "PYTHONPATH")))
763 (and (zero? (system* "./runexamples.sh"))
764 (zero? (system* "nosetests" "-v"))))))))
765 (home-page "https://github.com/fhs/python-hdf4")
766 (synopsis "Python interface to the NCSA HDF4 library")
767 (description
768 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
769which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
770NetCDF files can also be read and modified. Python-HDF4 is a fork of
771@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
772 (license license:expat)))
773
774(define-public python2-hdf4
775 (package-with-python2 python-hdf4))
776
ef5cbf9b
RW
777(define-public python-h5py
778 (package
779 (name "python-h5py")
fe147c41 780 (version "2.6.0")
ef5cbf9b
RW
781 (source
782 (origin
783 (method url-fetch)
fe147c41 784 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
785 (sha256
786 (base32
fe147c41 787 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 788 (build-system python-build-system)
797e1401
RW
789 (arguments
790 `(#:tests? #f ; no test target
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'unpack 'fix-hdf5-paths
794 (lambda* (#:key inputs #:allow-other-keys)
795 (let ((prefix (assoc-ref inputs "hdf5")))
796 (substitute* "setup_build.py"
797 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']"))
799 (("'/opt/local/include', '/usr/local/include'")
800 (string-append "'" prefix "/include" "'")))
801 (substitute* "setup_configure.py"
802 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']")))
804 #t))))))
3c4010b1 805 (propagated-inputs
69866690
HG
806 `(("python-six" ,python-six)
807 ("python-numpy" ,python-numpy)))
ef5cbf9b 808 (inputs
69866690 809 `(("hdf5" ,hdf5)))
ef5cbf9b 810 (native-inputs
fe147c41
EF
811 `(("python-cython" ,python-cython)
812 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
813 (home-page "http://www.h5py.org/")
814 (synopsis "Read and write HDF5 files from Python")
815 (description
816 "The h5py package provides both a high- and low-level interface to the
817HDF5 library from Python. The low-level interface is intended to be a
818complete wrapping of the HDF5 API, while the high-level component supports
819access to HDF5 files, datasets and groups using established Python and NumPy
820concepts.")
9820a028 821 (license license:bsd-3)))
ef5cbf9b
RW
822
823(define-public python2-h5py
9820a028 824 (package-with-python2 python-h5py))
ef5cbf9b 825
ea8450c8
TD
826(define-public python-netcdf4
827 (package
828 (name "python-netcdf4")
829 (version "1.2.6")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "netCDF4" version))
834 (sha256
835 (base32
836 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
837 (build-system python-build-system)
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (inputs
843 `(("netcdf" ,netcdf)
844 ("hdf4" ,hdf4)
845 ("hdf5" ,hdf5)))
846 (arguments
847 '(#:phases
848 (modify-phases %standard-phases
849 (replace 'check
850 (lambda _
851 (setenv "NO_NET" "1") ; disable opendap tests
852 (with-directory-excursion "test"
853 (setenv "PYTHONPATH" ; find and add the library we just built
854 (string-append
855 (car (find-files "../build" "lib.*"
856 #:directories? #:t
857 #:fail-on-error? #:t))
858 ":" (getenv "PYTHONPATH")))
859 (zero? (system* "python" "run_all.py"))))))))
860 (home-page
861 "https://github.com/Unidata/netcdf4-python")
862 (synopsis "Python/numpy interface to the netCDF library")
863 (description "Netcdf4-python is a Python interface to the netCDF C
864library. netCDF version 4 has many features not found in earlier
865versions of the library and is implemented on top of HDF5. This module
866can read and write files in both the new netCDF 4 and the old netCDF 3
867format, and can create files that are readable by HDF5 clients. The
868API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
869to users of that module.")
870 ;; The software is mainly ISC, but includes some files covered
871 ;; by the Expat license.
872 (license (list license:isc license:expat))))
873
874(define-public python2-netcdf4
875 (package-with-python2 python-netcdf4))
876
c1448c69
EB
877(define-public python-lockfile
878 (package
879 (name "python-lockfile")
692add53 880 (version "0.12.2")
c1448c69
EB
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
885 "lockfile-" version ".tar.gz"))
886 (sha256
887 (base32
692add53 888 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
889 (build-system python-build-system)
890 (arguments '(#:test-target "check"))
692add53
BW
891 (native-inputs
892 `(("python-pbr" ,python-pbr)))
6a8f26a4 893 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
894 (synopsis "Platform-independent file locking module")
895 (description
896 "The lockfile package exports a LockFile class which provides a simple
897API for locking files.")
f210e944 898 (license license:expat)))
c1448c69
EB
899
900(define-public python2-lockfile
f210e944 901 (package-with-python2 python-lockfile))
c1448c69 902
5a1a4bf6
EB
903(define-public python-mock
904 (package
905 (name "python-mock")
906 (version "1.0.1")
907 (source
908 (origin
909 (method url-fetch)
6b7877e1 910 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
911 (sha256
912 (base32
913 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
914 (build-system python-build-system)
915 (arguments '(#:test-target "check"))
6b7877e1 916 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 917 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
918 (description
919 "Mock is a library for testing in Python. It allows you to replace parts
920of your system under test with mock objects and make assertions about how they
921have been used.")
bd3fa666 922 (license license:expat)))
5a1a4bf6
EB
923
924(define-public python2-mock
925 (package-with-python2 python-mock))
926
fc50e9c6 927
73adf220
AE
928(define-public python-setuptools
929 (package
930 (name "python-setuptools")
d660f7be 931 (version "31.0.0")
73adf220
AE
932 (source
933 (origin
934 (method url-fetch)
d660f7be 935 (uri (pypi-uri "setuptools" version))
73adf220
AE
936 (sha256
937 (base32
d660f7be 938 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
939 (modules '((guix build utils)))
940 (snippet
941 '(begin
942 ;; Remove included binaries which are used to build self-extracting
943 ;; installers for Windows.
944 ;; TODO: Find some way to build them ourself so we can include them.
945 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
946 #t))))
73adf220 947 (build-system python-build-system)
d3d656c5
AE
948 ;; FIXME: Tests require pytest, which itself relies on setuptools.
949 ;; One could bootstrap with an internal untested setuptools.
73adf220 950 (arguments
824af8ca 951 `(#:tests? #f))
73adf220
AE
952 (home-page "https://pypi.python.org/pypi/setuptools")
953 (synopsis
954 "Library designed to facilitate packaging Python projects")
955 (description
956 "Setuptools is a fully-featured, stable library designed to facilitate
957packaging Python projects, where packaging includes:
958Python package and module definitions,
959distribution package metadata,
960test hooks,
961project installation,
962platform-specific details,
963Python 3 support.")
d660f7be
MB
964 ;; TODO: setuptools now bundles the following libraries:
965 ;; packaging, pyparsing, six and appdirs. How to unbundle?
966 (license (list license:psfl ; setuptools itself
967 license:expat ; six, appdirs, pyparsing
968 license:asl2.0 ; packaging is dual ASL2/BSD-2
969 license:bsd-2))))
73adf220
AE
970
971(define-public python2-setuptools
972 (package-with-python2 python-setuptools))
fc50e9c6 973
aa21c764 974;;; Pycrypto is abandoned upstream:
1194575b 975;;;
aa21c764 976;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 977;;;
aa21c764 978;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
979(define-public python-pycrypto
980 (package
981 (name "python-pycrypto")
982 (version "2.6.1")
983 (source
984 (origin
985 (method url-fetch)
aa21c764
LF
986 (uri (pypi-uri "pycrypto" version))
987 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
988 (sha256
989 (base32
990 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
991 (build-system python-build-system)
cafc3f5a
EB
992 (inputs
993 `(("python" ,python)
994 ("gmp" ,gmp)))
995 (arguments
996 `(#:phases
997 (alist-cons-before
998 'build 'set-build-env
999 ;; pycrypto runs an autoconf configure script behind the scenes
1000 (lambda _
1001 (setenv "CONFIG_SHELL" (which "bash")))
1002 %standard-phases)))
1003 (home-page "http://www.pycrypto.org/")
1004 (synopsis "Cryptographic modules for Python")
1005 (description
1006 "Pycrypto is a collection of both secure hash functions (such as SHA256
1007and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1008etc.). The package is structured to make adding new modules easy.")
3f641af0 1009 (license license:public-domain)))
cafc3f5a 1010
345f0611 1011(define-public python2-pycrypto
1c0059da
EF
1012 (let ((pycrypto (package-with-python2 python-pycrypto)))
1013 (package (inherit pycrypto)
1014 (inputs
1015 `(("python" ,python-2)
1016 ,@(alist-delete
1017 "python"
1018 (package-inputs pycrypto)))))))
345f0611 1019
cafc3f5a
EB
1020(define-public python-keyring
1021 (package
1022 (name "python-keyring")
13f3ff35 1023 (version "8.7")
cafc3f5a
EB
1024 (source
1025 (origin
1026 (method url-fetch)
664e6c3a 1027 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1028 (sha256
1029 (base32
13f3ff35 1030 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1031 (build-system python-build-system)
1032 (native-inputs
13f3ff35 1033 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1034 (propagated-inputs
cafc3f5a
EB
1035 `(("python-pycrypto" ,python-pycrypto)))
1036 (arguments
664e6c3a 1037 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1038 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1039 (synopsis "Store and access your passwords safely")
1040 (description
1041 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1042service from python. It can be used in any application that needs safe
cafc3f5a
EB
1043password storage.")
1044 ;; "MIT" and PSF dual license
f210e944 1045 (license license:x11)))
cafc3f5a 1046
d7af1069 1047(define-public python2-keyring
f210e944 1048 (package-with-python2 python-keyring))
d7af1069 1049
a480bc41
EB
1050(define-public python-six
1051 (package
1052 (name "python-six")
b6ab89ef 1053 (version "1.10.0")
a480bc41
EB
1054 (source
1055 (origin
1056 (method url-fetch)
b6ab89ef 1057 (uri (pypi-uri "six" version))
a480bc41
EB
1058 (sha256
1059 (base32
b6ab89ef 1060 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1061 (build-system python-build-system)
4fd129ee
MB
1062 (native-inputs
1063 `(("python-py" ,python-py)
1064 ("python-pytest" ,python-pytest)))
a480bc41
EB
1065 (home-page "http://pypi.python.org/pypi/six/")
1066 (synopsis "Python 2 and 3 compatibility utilities")
1067 (description
35b9e423 1068 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1069functions for smoothing over the differences between the Python versions with
1070the goal of writing Python code that is compatible on both Python versions.
35b9e423 1071Six supports every Python version since 2.5. It is contained in only one
a480bc41 1072Python file, so it can be easily copied into your project.")
3f641af0 1073 (license license:x11)))
a480bc41 1074
0c20025c
AE
1075(define-public python2-six
1076 (package-with-python2 python-six))
1077
22d7360b 1078(define-public python-dateutil
cafc3f5a
EB
1079 (package
1080 (name "python-dateutil")
394b8060 1081 (version "2.5.2")
cafc3f5a
EB
1082 (source
1083 (origin
1084 (method url-fetch)
394b8060 1085 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1086 (sha256
1087 (base32
394b8060 1088 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 1089 (build-system python-build-system)
f22efa01 1090 (propagated-inputs
394b8060 1091 `(("python-six" ,python-six)))
b5a5fb19 1092 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1093 (synopsis "Extensions to the standard datetime module")
1094 (description
1095 "The dateutil module provides powerful extensions to the standard
1096datetime module, available in Python 2.3+.")
f210e944 1097 (license license:bsd-3)))
cafc3f5a 1098
fc50e9c6
AE
1099(define-public python2-dateutil
1100 (package-with-python2 python-dateutil))
1d08c01f 1101
cafc3f5a
EB
1102(define-public python-parsedatetime
1103 (package
1104 (name "python-parsedatetime")
eebf6f01 1105 (version "2.1")
cafc3f5a
EB
1106 (source
1107 (origin
1108 (method url-fetch)
eebf6f01 1109 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1110 (sha256
1111 (base32
eebf6f01 1112 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1113 (build-system python-build-system)
1114 (native-inputs
eebf6f01
EF
1115 `(("python-nose" ,python-nose)
1116 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1117 (home-page "http://github.com/bear/parsedatetime/")
1118 (synopsis
1119 "Parse human-readable date/time text")
1120 (description
e881752c 1121 "Parse human-readable date/time text.")
f210e944 1122 (license license:asl2.0)))
cafc3f5a 1123
38b8f9b2 1124(define-public python2-parsedatetime
f210e944 1125 (package-with-python2 python-parsedatetime))
38b8f9b2 1126
d072efcb
RW
1127(define-public python-pandas
1128 (package
1129 (name "python-pandas")
7d0c3c8d 1130 (version "0.18.1")
d072efcb
RW
1131 (source
1132 (origin
1b96f069 1133 (method url-fetch)
7d0c3c8d
EF
1134 (uri (string-append
1135 "https://pypi.python.org/packages/11/09/"
1136 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1137 "pandas-" version ".tar.gz"))
1b96f069 1138 (sha256
7d0c3c8d 1139 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1140 (build-system python-build-system)
d072efcb 1141 (propagated-inputs
f22efa01
HG
1142 `(("python-numpy" ,python-numpy)
1143 ("python-pytz" ,python-pytz)
22d7360b 1144 ("python-dateutil" ,python-dateutil)))
d072efcb 1145 (native-inputs
abcc7a0e
HG
1146 `(("python-nose" ,python-nose)
1147 ("python-cython" ,python-cython)))
d072efcb
RW
1148 (home-page "http://pandas.pydata.org")
1149 (synopsis "Data structures for data analysis, time series, and statistics")
1150 (description
1151 "Pandas is a Python package providing fast, flexible, and expressive data
1152structures designed to make working with structured (tabular,
1153multidimensional, potentially heterogeneous) and time series data both easy
1154and intuitive. It aims to be the fundamental high-level building block for
1155doing practical, real world data analysis in Python.")
f210e944 1156 (license license:bsd-3)))
d072efcb
RW
1157
1158(define-public python2-pandas
f210e944 1159 (package-with-python2 python-pandas))
d072efcb 1160
cafc3f5a
EB
1161(define-public python-tzlocal
1162 (package
1163 (name "python-tzlocal")
ed80839b 1164 (version "1.2.2")
cafc3f5a
EB
1165 (source
1166 (origin
1167 (method url-fetch)
226d3331 1168 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1169 (sha256
1170 (base32
ed80839b 1171 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1172 (build-system python-build-system)
f22efa01
HG
1173 (propagated-inputs
1174 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1175 (home-page "https://github.com/regebro/tzlocal")
1176 (synopsis
35b9e423 1177 "Local timezone information for Python")
cafc3f5a
EB
1178 (description
1179 "Tzlocal returns a tzinfo object with the local timezone information.
1180This module attempts to fix a glaring hole in pytz, that there is no way to
1181get the local timezone information, unless you know the zoneinfo name, and
1182under several distributions that's hard or impossible to figure out.")
3f641af0 1183 (license license:cc0)))
cafc3f5a 1184
1d08c01f
AE
1185(define-public python2-pysqlite
1186 (package
1187 (name "python2-pysqlite")
fe476868 1188 (version "2.8.1")
1d08c01f
AE
1189 (source
1190 (origin
1191 (method url-fetch)
fe476868 1192 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1193 (sha256
1194 (base32
fe476868 1195 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1196 (build-system python-build-system)
1197 (inputs
1198 `(("sqlite" ,sqlite)))
1199 (arguments
1200 `(#:python ,python-2 ; incompatible with Python 3
1201 #:tests? #f)) ; no test target
fe476868 1202 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1203 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1204 (description
1205 "Pysqlite provides SQLite bindings for Python that comply to the
1206Database API 2.0T.")
ed0cdf83 1207 (license license:zlib)))
1d08c01f 1208
2875caf5
AE
1209
1210(define-public python2-mechanize
1211 (package
1212 (name "python2-mechanize")
1213 (version "0.2.5")
1214 (source
1215 (origin
1216 (method url-fetch)
1217 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1218 version ".tar.gz"))
1219 (sha256
1220 (base32
1221 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1222 (build-system python-build-system)
2875caf5
AE
1223 (arguments
1224 `(#:python ,python-2 ; apparently incompatible with Python 3
1225 #:tests? #f))
1226 ;; test fails with message
1227 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1228 ;; (python-3.3.2) or
1229 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1230 ;; (python-2.7.5).
1231 ;; The source code is from March 2011 and probably not up-to-date
1232 ;; with respect to python unit tests.
1233 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1234 (synopsis
1235 "Stateful programmatic web browsing in Python")
1236 (description
1237 "Mechanize implements stateful programmatic web browsing in Python,
1238after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1239 (license (license:non-copyleft
1240 "file://COPYING"
1241 "See COPYING in the distribution."))))
2875caf5 1242
0352532e
AE
1243
1244(define-public python-simplejson
1245 (package
1246 (name "python-simplejson")
b2e6e150 1247 (version "3.10.0")
0352532e
AE
1248 (source
1249 (origin
1250 (method url-fetch)
988d1bad 1251 (uri (pypi-uri "simplejson" version))
0352532e
AE
1252 (sha256
1253 (base32
b2e6e150 1254 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1255 (build-system python-build-system)
1256 (home-page "http://simplejson.readthedocs.org/en/latest/")
1257 (synopsis
1258 "Json library for Python")
1259 (description
e881752c
AK
1260 "JSON (JavaScript Object Notation) is a subset of JavaScript
1261syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1262format.
0352532e
AE
1263
1264Simplejson exposes an API familiar to users of the standard library marshal
1265and pickle modules. It is the externally maintained version of the json
1266library contained in Python 2.6, but maintains compatibility with Python 2.5
1267and (currently) has significant performance advantages, even without using
1268the optional C extension for speedups. Simplejson is also supported on
1269Python 3.3+.")
3f641af0 1270 (license license:x11)))
0352532e
AE
1271
1272(define-public python2-simplejson
1273 (package-with-python2 python-simplejson))
421a80a2
AE
1274
1275
ed07b08d 1276(define-public python-pyicu
421a80a2 1277 (package
ed07b08d 1278 (name "python-pyicu")
2e161eaf 1279 (version "1.9.5")
421a80a2
AE
1280 (source
1281 (origin
1282 (method url-fetch)
2e161eaf 1283 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1284 (sha256
1285 (base32
2e161eaf 1286 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2
AE
1287 (build-system python-build-system)
1288 (inputs
1289 `(("icu4c" ,icu4c)))
421a80a2 1290 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1291 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1292 (description
1293 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1294 (license license:x11)))
ed07b08d
LF
1295
1296(define-public python2-pyicu
f210e944 1297 (package-with-python2 python-pyicu))
cc20a22a
LC
1298
1299(define-public python2-dogtail
1300 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1301 ;; spaces in indentation" with Python 3.
1302 (package
1303 (name "python2-dogtail")
1304 (version "0.8.2")
1305 (source (origin
1306 (method url-fetch)
1307 (uri (string-append
1308 "https://fedorahosted.org/released/dogtail/dogtail-"
1309 version ".tar.gz"))
1310 (sha256
1311 (base32
1312 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1313 (build-system python-build-system)
1314 (arguments `(#:python ,python-2
1315 #:tests? #f)) ; invalid command "test"
1316 (home-page "https://fedorahosted.org/dogtail/")
1317 (synopsis "GUI test tool and automation framework written in ​Python")
1318 (description
35b9e423 1319 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1320It uses Accessibility (a11y) technologies to communicate with desktop
1321applications. dogtail scripts are written in Python and executed like any
1322other Python program.")
3f641af0 1323 (license license:gpl2+)))
515e6878 1324
011b18c3
LC
1325(define-public python2-empy
1326 (package
1327 (name "python2-empy")
1328 (version "3.3")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1332 version ".tar.gz"))
1333 (sha256
1334 (base32
1335 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1336 (build-system python-build-system)
1337 (arguments
1338 `(#:python ,python-2
1339 #:phases (alist-replace
1340 'check
1341 (lambda _
1342 (zero? (system* "./test.sh")))
1343 %standard-phases)))
1344 (home-page "http://www.alcyone.com/software/empy/")
1345 (synopsis "Templating system for Python")
1346 (description
1347 "EmPy is a system for embedding Python expressions and statements in
1348template text; it takes an EmPy source file, processes it, and produces
1349output. This is accomplished via expansions, which are special signals to the
1cd4027c 1350EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1351EmPy can expand arbitrary Python expressions and statements in this way, as
1352well as a variety of special forms. Textual data not explicitly delimited in
1353this way is sent unaffected to the output, allowing Python to be used in
1354effect as a markup language. Also supported are callbacks via hooks,
1355recording and playback via diversions, and dynamic, chainable filters. The
1356system is highly configurable via command line options and embedded
1357commands.")
3f641af0 1358 (license license:lgpl2.1+)))
011b18c3 1359
8deeda0c
LC
1360(define-public python2-element-tree
1361 (package
1362 (name "python2-element-tree")
1363 (version "1.2.6")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (string-append
1367 "http://effbot.org/media/downloads/elementtree-"
1368 version "-20050316.tar.gz"))
1369 (sha256
1370 (base32
1371 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1372 (build-system python-build-system)
1373 (arguments
1374 `(#:python ,python-2 ; seems to be part of Python 3
1375 #:tests? #f)) ; no 'test' sub-command
1376 (synopsis "Toolkit for XML processing in Python")
1377 (description
1378 "ElementTree is a Python library supporting lightweight XML processing.")
1379 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1380 (license (license:x11-style
1381 "http://docs.python.org/2/license.html"
1382 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1383
1384(define-public python2-pybugz
1385 (package
1386 (name "python2-pybugz")
1387 (version "0.6.11")
1388 (source (origin
1389 (method url-fetch)
1390 (uri (string-append
1391 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1392 version ".tar.gz"))
1393 (sha256
1394 (base32
6f194a1e 1395 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1396 (patches (search-patches "pybugz-stty.patch"
1397 "pybugz-encode-error.patch"))))
8deeda0c
LC
1398 (build-system python-build-system)
1399 (arguments
1400 `(#:python ,python-2 ; SyntaxError with Python 3
1401 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1402 (propagated-inputs
1403 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1404 (synopsis "Python and command-line interface to Bugzilla")
1405 (description
1406 "PyBugz is a Python library and command-line tool to query the Bugzilla
1407bug tracking system. It is meant as an aid to speed up interaction with the
1408bug tracker.")
1409 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1410 (license license:gpl2)))
8deeda0c 1411
a480bc41
EB
1412(define-public python-enum34
1413 (package
1414 (name "python-enum34")
d39ae1e5 1415 (version "1.1.0")
a480bc41
EB
1416 (source
1417 (origin
1418 (method url-fetch)
d39ae1e5 1419 (uri (pypi-uri "enum34" version))
a480bc41
EB
1420 (sha256
1421 (base32
d39ae1e5 1422 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1423 (build-system python-build-system)
a480bc41
EB
1424 (arguments
1425 `(#:phases
1426 (alist-replace
1427 'check
1428 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1429 %standard-phases)))
1430 (home-page "https://pypi.python.org/pypi/enum34")
1431 (synopsis "Backported Python 3.4 Enum")
1432 (description
1433 "Enum34 is the new Python stdlib enum module available in Python 3.4
1434backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1435 (license license:bsd-3)))
a480bc41 1436
820acd1b
LF
1437(define-public python2-enum34
1438 (package-with-python2 python-enum34))
1439
a480bc41
EB
1440(define-public python-parse-type
1441 (package
1442 (name "python-parse-type")
1443 (version "0.3.4")
1444 (source
1445 (origin
1446 (method url-fetch)
1447 (uri (string-append "https://pypi.python.org/packages/source/p/"
1448 "parse_type/parse_type-" version ".tar.gz"))
1449 (sha256
1450 (base32
1451 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1452 (build-system python-build-system)
f22efa01 1453 (propagated-inputs
f3b98f4f 1454 `(("python-six" ,python-six)
68f1cdec 1455 ("python-parse" ,python-parse)))
a480bc41
EB
1456 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1457 (home-page "https://github.com/jenisys/parse_type")
1458 (synopsis "Extended parse module")
1459 (description
1460 "Parse_type extends the python parse module.")
3f641af0 1461 (license license:bsd-3)))
a480bc41
EB
1462
1463(define-public python-parse
1464 (package
1465 (name "python-parse")
eb3d3503 1466 (version "1.6.6")
a480bc41
EB
1467 (source
1468 (origin
1469 (method url-fetch)
eb3d3503 1470 (uri (pypi-uri "parse" version))
a480bc41
EB
1471 (sha256
1472 (base32
aa6c09ed
EF
1473 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1474 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:phases
f9a65318
EF
1478 (modify-phases %standard-phases
1479 (replace 'check
1480 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1481 (home-page "https://github.com/r1chardj0n3s/parse")
1482 (synopsis "Parse strings")
1483 (description
1484 "Parse strings using a specification based on the Python format()
1485syntax.")
3f641af0 1486 (license license:x11)))
a480bc41 1487
d3eff97a
JL
1488(define-public python-polib
1489 (package
1490 (name "python-polib")
1491 (version "1.0.8")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "polib" version))
1495 (sha256
1496 (base32
1497 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1498 (build-system python-build-system)
1499 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1500 (synopsis "Manipulate, create and modify gettext files")
1501 (description "Polib can manipulate any gettext format (po, pot and mo)
1502files. It can be used to create po files from scratch or to modify
1503existing ones.")
1504 (license license:expat)))
1505
1506(define-public python2-polib
1507 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1508 (package
1509 (inherit base)
1510 (arguments `(,@(package-arguments base)
1511 ;; Tests don't work with python2.
1512 #:tests? #f)))))
a480bc41 1513
515e6878
LC
1514(define-public scons
1515 (package
1516 (name "scons")
a3f61425 1517 (version "2.3.4")
515e6878
LC
1518 (source (origin
1519 (method url-fetch)
de67e922
LF
1520 (uri (string-append "mirror://sourceforge/scons/scons/" version
1521 "/scons-" version ".tar.gz"))
515e6878
LC
1522 (sha256
1523 (base32
a3f61425 1524 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1525 (build-system python-build-system)
1526 (arguments
1527 ;; With Python 3.x, fails to build with a syntax error.
1528 `(#:python ,python-2
b3e8b4bd 1529 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1530 #:tests? #f)) ; no 'python setup.py test' command
1531 (home-page "http://scons.org/")
1532 (synopsis "Software construction tool written in Python")
1533 (description
1534 "SCons is a software construction tool. Think of SCons as an improved,
1535cross-platform substitute for the classic Make utility with integrated
1536functionality similar to autoconf/automake and compiler caches such as ccache.
1537In short, SCons is an easier, more reliable and faster way to build
1538software.")
3f641af0 1539 (license license:x11)))
011b18c3 1540
c15a5c0e
DT
1541(define-public python-extras
1542 (package
1543 (name "python-extras")
1544 (version "0.0.3")
1545 (source
1546 (origin
1547 (method url-fetch)
1548 (uri (string-append
1549 "https://pypi.python.org/packages/source/e/extras/extras-"
1550 version ".tar.gz"))
1551 (sha256
1552 (base32
1553 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1554 (build-system python-build-system)
c15a5c0e
DT
1555 (arguments
1556 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1557 '(#:tests? #f))
1558 (home-page "https://github.com/testing-cabal/extras")
1559 (synopsis "Useful extensions to the Python standard library")
1560 (description
1561 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1562 (license license:expat)))
c15a5c0e
DT
1563
1564(define-public python2-extras
1565 (package-with-python2 python-extras))
1566
56ea0efd
DT
1567(define-public python-mimeparse
1568 (package
1569 (name "python-mimeparse")
1570 (version "0.1.4")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1580 (build-system python-build-system)
56ea0efd
DT
1581 (arguments
1582 '(#:tests? #f)) ; no setup.py test command
1583 (home-page
1584 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1585 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1586 (description
1587 "Mimeparse provides basic functions for parsing MIME type names and
1588matching them against a list of media-ranges.")
bd3fa666 1589 (license license:expat)))
56ea0efd
DT
1590
1591(define-public python2-mimeparse
1592 (package-with-python2 python-mimeparse))
1593
4435427e
DT
1594(define-public python-nose
1595 (package
1596 (name "python-nose")
f7cb9841 1597 (version "1.3.7")
4435427e
DT
1598 (source
1599 (origin
1600 (method url-fetch)
f7cb9841 1601 (uri (pypi-uri "nose" version))
4435427e
DT
1602 (sha256
1603 (base32
f7cb9841 1604 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1605 (build-system python-build-system)
4435427e
DT
1606 (arguments
1607 '(#:tests? #f)) ; FIXME: test suite fails
1608 (home-page "http://readthedocs.org/docs/nose/")
1609 (synopsis "Python testing library")
1610 (description
1611 "Nose extends the unittest library to make testing easier.")
3f641af0 1612 (license license:lgpl2.0+)))
4435427e
DT
1613
1614(define-public python2-nose
1615 (package-with-python2 python-nose))
1616
0aea283a
EF
1617(define-public python-nose2
1618 (package
1619 (name "python-nose2")
1620 (version "0.6.5")
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "nose2" version))
1625 (sha256
1626 (base32
1627 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1628 (build-system python-build-system)
1629 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1630 (propagated-inputs
0aea283a
EF
1631 `(("python-cov-core" ,python-cov-core)
1632 ("python-pytest-cov" ,python-pytest-cov)
1633 ("python-six" ,python-six)))
1634 (home-page "https://github.com/nose-devs/nose2")
1635 (synopsis "Next generation of nicer testing for Python")
1636 (description
1637 "Nose2 is the next generation of nicer testing for Python, based on the
1638plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1639better plugin api, being easier for users to configure, and simplifying internal
1640interfaces and processes.")
1641 (license license:bsd-2)))
1642
1643(define-public python2-nose2
1644 (package-with-python2 python-nose2))
1645
6cd9c356
DT
1646(define-public python-unittest2
1647 (package
1648 (name "python-unittest2")
1649 (version "0.5.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (string-append
1654 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1655 version ".tar.gz"))
1656 (sha256
1657 (base32
1658 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1659 (build-system python-build-system)
6cd9c356
DT
1660 (home-page "http://pypi.python.org/pypi/unittest2")
1661 (synopsis "Python unit testing library")
1662 (description
1663 "Unittest2 is a replacement for the unittest module in the Python
1664standard library.")
3f641af0 1665 (license license:psfl)))
6cd9c356
DT
1666
1667(define-public python2-unittest2
1668 (package (inherit python-unittest2)
1669 (name "python2-unittest2")
1670 (version "0.5.1")
1671 (source
1672 (origin
1673 (method url-fetch)
1674 (uri (string-append
1675 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1676 version ".tar.gz"))
1677 (sha256
1678 (base32
1679 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1680 (arguments
1681 `(#:python ,python-2
1682 #:tests? #f)))) ; no setup.py test command
1683
02f8f804 1684(define-public python-pafy
1685 (package
1686 (name "python-pafy")
1687 (version "0.5.2")
1688 (source
1689 (origin
1690 (method url-fetch)
1691 (uri (pypi-uri "pafy" version))
1692 (sha256
1693 (base32
1694 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1695 (build-system python-build-system)
ed3fee5f 1696 (arguments
1697 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1698 (propagated-inputs
1699 ;; Youtube-dl is a python package which is imported in the file
1700 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1701 `(("youtube-dl" ,youtube-dl)))
1702 (home-page "https://np1.github.io/pafy/")
1703 (synopsis "Retrieve YouTube content and metadata")
1704 (description
1705 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1706 (license license:lgpl3+)))
1707
542ad60f
DT
1708(define-public python-py
1709 (package
1710 (name "python-py")
71c8a804 1711 (version "1.4.31")
542ad60f
DT
1712 (source
1713 (origin
1714 (method url-fetch)
71c8a804 1715 (uri (pypi-uri "py" version))
542ad60f
DT
1716 (sha256
1717 (base32
71c8a804 1718 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1719 (build-system python-build-system)
dcb0da7b
MB
1720 (arguments
1721 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1722 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1723 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1724 ;; Is this module globally installed?"
1725 '(#:tests? #f))
542ad60f
DT
1726 (home-page "http://pylib.readthedocs.org/")
1727 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1728 (description
1729 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1730code introspection, and logging.")
bd3fa666 1731 (license license:expat)))
542ad60f
DT
1732
1733(define-public python2-py
1734 (package-with-python2 python-py))
1735
855d4761
DT
1736(define-public python-pytest
1737 (package
1738 (name "python-pytest")
61a4332d 1739 (version "2.7.3")
855d4761
DT
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (string-append
1744 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1745 version ".tar.gz"))
1746 (sha256
1747 (base32
61a4332d 1748 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1749 (modules '((guix build utils)))
1750 (snippet
1751 ;; One of the tests involves the /usr directory, so it fails.
1752 '(substitute* "testing/test_argcomplete.py"
1753 (("def test_remove_dir_prefix\\(self\\):")
1754 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1755 (build-system python-build-system)
482d9591
HG
1756 (propagated-inputs
1757 `(("python-py" ,python-py)))
e7881f3d 1758 (native-inputs
482d9591 1759 `(("python-nose" ,python-nose)
855d4761
DT
1760 ("python-mock" ,python-mock)))
1761 (home-page "http://pytest.org")
1762 (synopsis "Python testing library")
1763 (description
1764 "Pytest is a testing tool that provides auto-discovery of test modules
1765and functions, detailed info on failing assert statements, modular fixtures,
1766and many external plugins.")
bd3fa666 1767 (license license:expat)))
855d4761
DT
1768
1769(define-public python2-pytest
1770 (package-with-python2 python-pytest))
1771
fca4ff35
LF
1772;; This package is used by Borg until we can upgrade all our Python packages to
1773;; use a more recent pytest.
1774(define-public python-pytest-2.9.2
1775 (package
1776 (inherit python-pytest)
1777 (name "python-pytest")
1778 (version "2.9.2")
1779 (source (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "pytest" version))
1782 (sha256
1783 (base32
1784 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1785 (arguments
1786 `(#:phases
1787 (modify-phases %standard-phases
1788 (add-before 'check 'disable-invalid-test
1789 (lambda _
1790 (substitute* "testing/test_argcomplete.py"
1791 (("def test_remove_dir_prefix" line)
1792 (string-append "@pytest.mark.skip"
1793 "(reason=\"Assumes that /usr exists.\")\n "
1794 line)))
1795 #t)))))))
1796
358c3d61
EF
1797(define-public python-pytest-cov
1798 (package
1799 (name "python-pytest-cov")
545f4a1c 1800 (version "2.2.1")
358c3d61
EF
1801 (source
1802 (origin
1803 (method url-fetch)
1804 (uri (pypi-uri "pytest-cov" version))
1805 (sha256
545f4a1c
EF
1806 (base32
1807 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1808 (build-system python-build-system)
ce40b383
HG
1809 (arguments
1810 `(#:phases
1811 (modify-phases %standard-phases
1812 (replace 'check
1813 (lambda _
1814 ;; options taken from tox.ini
1815 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1816 ;; with "Duplicate implicit target name"
1817 (zero? (system* "python" "./setup.py" "check"
1818 "--strict" "--metadata")))))))
f22efa01 1819 (propagated-inputs
10468636
EF
1820 `(("python-coverage" ,python-coverage)
1821 ("python-pytest" ,python-pytest)))
10468636
EF
1822 (home-page "https://github.com/pytest-dev/pytest-cov")
1823 (synopsis "Pytest plugin for measuring coverage")
1824 (description
1825 "Pytest-cov produces coverage reports. It supports centralised testing and
1826distributed testing in both @code{load} and @code{each} modes. It also
1827supports coverage of subprocesses.")
f210e944 1828 (license license:expat)))
358c3d61
EF
1829
1830(define-public python2-pytest-cov
f210e944 1831 (package-with-python2 python-pytest-cov))
358c3d61 1832
6784f2e3
RW
1833(define-public python-pytest-runner
1834 (package
1835 (name "python-pytest-runner")
1836 (version "2.6.2")
1837 (source
1838 (origin
1839 (method url-fetch)
54cd239b 1840 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1841 (sha256
1842 (base32
1843 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1844 (build-system python-build-system)
1845 (arguments
1846 `(#:phases
1847 (modify-phases %standard-phases
1848 ;; The fancy way of setting the version with setuptools_scm does not
1849 ;; seem to work here.
1850 (add-after 'unpack 'set-version
1851 (lambda _
1852 (substitute* "docs/conf.py"
1853 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1854 (string-append "version = \"" ,version "\"")))
1855 #t)))))
1856 (native-inputs
1857 `(("python-pytest" ,python-pytest)
1858 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1859 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1860 (synopsis "Invoke py.test as a distutils command")
1861 (description
1862 "This package provides a @command{pytest-runner} command that
1863@file{setup.py} files can use to run tests.")
f210e944 1864 (license license:expat)))
54cd239b
EF
1865
1866(define-public python2-pytest-runner
f210e944 1867 (package-with-python2 python-pytest-runner))
6784f2e3 1868
44547e51
EF
1869(define-public python-pytest-mock
1870 (package
1871 (name "python-pytest-mock")
1872 (version "1.2")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "pytest-mock" version ".zip"))
1877 (sha256
1878 (base32
1879 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1880 (build-system python-build-system)
1881 (native-inputs
1882 `(("unzip" ,unzip)))
f22efa01 1883 (propagated-inputs
d5e41cf2 1884 `(("python-pytest" ,python-pytest)))
44547e51
EF
1885 (home-page "https://github.com/pytest-dev/pytest-mock/")
1886 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1887 (description
1888 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1889around the patching API provided by the @code{mock} package, but with the
1890benefit of not having to worry about undoing patches at the end of a test.
1891The mocker fixture has the same API as @code{mock.patch}, supporting the
1892same arguments.")
1893 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1894 (license license:expat)))
1895
1896(define-public python2-pytest-mock
1897 (let ((base (package-with-python2
1898 (strip-python2-variant python-pytest-mock))))
1899 (package (inherit base)
f22efa01 1900 (propagated-inputs
44547e51 1901 `(("python2-mock" ,python2-mock)
f22efa01 1902 ,@(package-propagated-inputs base))))))
44547e51 1903
8fa58fc9
CAW
1904(define-public python-pytest-xdist
1905 (package
1906 (name "python-pytest-xdist")
1907 (version "1.14")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "pytest-xdist" version ".zip"))
1912 (sha256
1913 (base32
de585a7e
HG
1914 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1915 (modules '((guix build utils)))
1916 (snippet
1917 '(begin
1918 ;; Remove pre-compiled .pyc files from source.
1919 (for-each delete-file-recursively
1920 (find-files "." "__pycache__" #:directories? #t))
1921 (for-each delete-file (find-files "." "\\.pyc$"))
1922 #t))))
8fa58fc9 1923 (build-system python-build-system)
4eb385fb
MB
1924 (arguments
1925 '(#:tests? #f)) ;FIXME: Some tests are failing.
1926 ;; #:phases
1927 ;; (modify-phases %standard-phases
1928 ;; (delete 'check)
1929 ;; (add-after 'install 'check
1930 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1931 ;; (add-installed-pythonpath inputs outputs)
1932 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1933 (native-inputs
1934 `(("unzip" ,unzip)
8fa58fc9 1935 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1936 (propagated-inputs
c4516ad2 1937 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1938 ("python-pytest" ,python-pytest)
1939 ("python-py" ,python-py)))
1940 (home-page
1941 "https://github.com/pytest-dev/pytest-xdist")
1942 (synopsis
1943 "Plugin for py.test with distributed testing and loop-on-failing modes")
1944 (description
1945 "The pytest-xdist plugin extends py.test with some unique test execution
1946modes: parallelization, running tests in boxed subprocesses, the ability
1947to run tests repeatedly when failed, and the ability to run tests on multiple
1948Python interpreters or platforms. It uses rsync to copy the existing
1949program code to a remote location, executes there, and then syncs the
1950result back.")
f210e944 1951 (license license:expat)))
8fa58fc9
CAW
1952
1953(define-public python2-pytest-xdist
f210e944 1954 (package-with-python2 python-pytest-xdist))
8fa58fc9 1955
84d24017
DT
1956(define-public python-scripttest
1957 (package
1958 (name "python-scripttest")
1959 (version "1.3")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (string-append
1964 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1965 version ".tar.gz"))
1966 (sha256
1967 (base32
1968 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1969 (build-system python-build-system)
521b7772 1970 (native-inputs
f3b98f4f 1971 `(("python-pytest" ,python-pytest)))
84d24017
DT
1972 (home-page "http://pythonpaste.org/scripttest/")
1973 (synopsis "Python library to test command-line scripts")
1974 (description "Scripttest is a Python helper library for testing
1975interactive command-line applications. With it you can run a script in a
1976subprocess and see the output as well as any file modifications.")
bd3fa666 1977 (license license:expat)))
84d24017
DT
1978
1979(define-public python2-scripttest
1980 (package-with-python2 python-scripttest))
1981
d8fa80e1
DT
1982(define-public python-testtools
1983 (package
1984 (name "python-testtools")
1985 (version "1.0.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (string-append
1990 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1991 version ".tar.gz"))
1992 (sha256
1993 (base32
1994 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1995 (build-system python-build-system)
0e88cbf8 1996 (propagated-inputs
f22efa01
HG
1997 `(("python-mimeparse" ,python-mimeparse)
1998 ("python-extras" ,python-extras)))
d8fa80e1
DT
1999 (home-page "https://github.com/testing-cabal/testtools")
2000 (synopsis
2001 "Extensions to the Python standard library unit testing framework")
2002 (description
2003 "Testtools extends the Python standard library unit testing framework to
2004provide matchers, more debugging information, and cross-Python
2005compatibility.")
3f641af0 2006 (license license:psfl)))
d8fa80e1
DT
2007
2008(define-public python2-testtools
2009 (package-with-python2 python-testtools))
2010
5bf3afea
DT
2011(define-public python-testscenarios
2012 (package
2013 (name "python-testscenarios")
2014 (version "0.4")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (string-append
2019 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2020 version ".tar.gz"))
2021 (sha256
2022 (base32
2023 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2024 (build-system python-build-system)
f22efa01 2025 (propagated-inputs
8e73d3ba 2026 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2027 (home-page "https://launchpad.net/testscenarios")
2028 (synopsis "Pyunit extension for dependency injection")
2029 (description
2030 "Testscenarios provides clean dependency injection for Python unittest
2031style tests.")
3f641af0 2032 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2033
2034(define-public python2-testscenarios
2035 (package-with-python2 python-testscenarios))
2036
dac79ecc
DT
2037(define-public python-testresources
2038 (package
2039 (name "python-testresources")
2040 (version "0.2.7")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (string-append
2045 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2046 version ".tar.gz"))
2047 (sha256
2048 (base32
2049 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2050 (build-system python-build-system)
dac79ecc
DT
2051 (home-page "https://launchpad.net/testresources")
2052 (synopsis
2053 "Pyunit extension for managing test resources")
2054 (description
2055 "Testresources is an extension to Python's unittest to allow declarative
2056use of resources by test cases.")
3f641af0 2057 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2058
2059(define-public python2-testresources
2060 (package-with-python2 python-testresources))
2061
070ab058
DT
2062(define-public python-subunit
2063 (package
2064 (name "python-subunit")
2065 (version "0.0.21")
2066 (source
2067 (origin
2068 (method url-fetch)
2069 (uri (string-append
2070 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2071 version ".tar.gz"))
2072 (sha256
2073 (base32
2074 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2075 (build-system python-build-system)
f22efa01 2076 (propagated-inputs
b52ad371
HG
2077 `(("python-extras" ,python-extras)
2078 ("python-mimeparse" ,python-mimeparse)))
2079 (native-inputs
2080 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2081 (home-page "http://launchpad.net/subunit")
2082 (synopsis "Python implementation of the subunit protocol")
2083 (description
2084 "Python-subunit is a Python implementation of the subunit test streaming
2085protocol.")
3f641af0 2086 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2087
2088(define-public python2-subunit
2089 (package-with-python2 python-subunit))
2090
d2a8db92
HG
2091;; Recent versions of python-fixtures and python-testrepository need
2092;; python-pbr for packaging, which itself needs these two packages for
2093;; testing.
2094;; To fix this circular dependency, we use a build of python-pbr, based on the
2095;; same source, just without any test dependencies and with tests disabled.
2096;; python-pbr-minmal is then used to package python-fixtures and
2097;; python-testrepository.
2098;; Strictly speaking we currently could remove the test-requirements from the
2099;; normal python-pbr package (and save this package) since test are disabled
2100;; there anyway. But this may change in future.
2101(define python-pbr-minimal
cd49454b 2102 (package
d2a8db92
HG
2103 (name "python-pbr-minimal")
2104 (version "1.8.1")
7787ef76
CR
2105 (source
2106 (origin
2107 (method url-fetch)
d2a8db92 2108 (uri (pypi-uri "pbr" version))
7787ef76
CR
2109 (sha256
2110 (base32
d2a8db92 2111 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2112 (build-system python-build-system)
2113 (arguments
d2a8db92
HG
2114 `(#:tests? #f))
2115 (home-page "http://docs.openstack.org/developer/pbr/")
2116 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2117 (description
d2a8db92 2118 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2119 (license license:asl2.0)))
7787ef76 2120
d2a8db92
HG
2121(define python2-pbr-minimal
2122 (package-with-python2 python-pbr-minimal))
7787ef76 2123
1ef09c0c 2124(define-public python-pbr
e25f0174 2125 (package
d2a8db92 2126 (inherit python-pbr-minimal)
e25f0174 2127 (name "python-pbr")
e25f0174
BW
2128 (arguments
2129 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2130 (propagated-inputs
d2a8db92
HG
2131 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2132 (native-inputs
e25f0174 2133 `(("python-fixtures" ,python-fixtures)
d2a8db92 2134 ;; discover, coverage, hacking, subunit
e25f0174 2135 ("python-mock" ,python-mock)
d2a8db92 2136 ("python-six" ,python-six)
e25f0174
BW
2137 ("python-sphinx" ,python-sphinx)
2138 ("python-testrepository" ,python-testrepository)
2139 ("python-testresources" ,python-testresources)
2140 ("python-testscenarios" ,python-testscenarios)
2141 ("python-testtools" ,python-testtools)
2142 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2143 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2144 (description
2145 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2146and sensible default behaviors into your setuptools run. It will set
2147versions, process requirements files and generate AUTHORS and ChangeLog file
2148from git information.
2149")))
1ef09c0c
BW
2150
2151(define-public python2-pbr
e25f0174 2152 (package-with-python2 python-pbr))
1ef09c0c 2153
7787ef76
CR
2154(define-public python-fixtures
2155 (package
2156 (name "python-fixtures")
13fcc6df 2157 (version "1.4.0")
7787ef76
CR
2158 (source
2159 (origin
2160 (method url-fetch)
13fcc6df 2161 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2162 (sha256
2163 (base32
13fcc6df 2164 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2165 (build-system python-build-system)
f6c1ef18
MB
2166 (arguments
2167 '(#:phases
2168 (modify-phases %standard-phases
2169 (replace 'check
2170 (lambda _
2171 (zero? (system* "python" "-m" "testtools.run"
2172 "fixtures.test_suite")))))))
7787ef76 2173 (propagated-inputs
ae92cadd 2174 `(("python-six" ,python-six)))
e7881f3d 2175 (native-inputs
f6c1ef18
MB
2176 `(("python-mock" ,python-mock)
2177 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2178 ("python-testtools" ,python-testtools)))
7787ef76
CR
2179 (home-page "https://launchpad.net/python-fixtures")
2180 (synopsis "Python test fixture library")
2181 (description
2182 "Fixtures provides a way to create reusable state, useful when writing
2183Python tests.")
3f641af0 2184 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2185
cd49454b
DT
2186(define-public python2-fixtures
2187 (package-with-python2 python-fixtures))
2188
b24a0c00
DT
2189(define-public python-testrepository
2190 (package
2191 (name "python-testrepository")
2192 (version "0.0.20")
2193 (source
2194 (origin
2195 (method url-fetch)
2196 (uri (string-append
2197 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2198 version ".tar.gz"))
2199 (sha256
2200 (base32
2201 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2202 (build-system python-build-system)
90110ef9
MB
2203 (arguments
2204 ;; FIXME: Many tests are failing.
2205 '(#:tests? #f))
05de40c5 2206 (propagated-inputs
b2e66edf
HG
2207 `(("python-fixtures" ,python-fixtures)
2208 ("python-subunit" ,python-subunit)
b52ad371
HG
2209 ("python-testtools" ,python-testtools)))
2210 (native-inputs
2211 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2212 ("python-mimeparse" ,python-mimeparse)))
2213 (home-page "https://launchpad.net/testrepository")
2214 (synopsis "Database for Python test results")
2215 (description "Testrepository provides a database of test results which can
2216be used as part of a developer's workflow to check things such as what tests
2217have failed since the last commit or what tests are currently failing.")
3f641af0 2218 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2219
2220(define-public python2-testrepository
2221 (package-with-python2 python-testrepository))
2222
243a009a
DT
2223(define-public python-coverage
2224 (package
2225 (name "python-coverage")
4d4cf3dd 2226 (version "4.1")
243a009a
DT
2227 (source
2228 (origin
2229 (method url-fetch)
82a3c582 2230 (uri (pypi-uri "coverage" version))
243a009a
DT
2231 (sha256
2232 (base32
4d4cf3dd 2233 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2234 (build-system python-build-system)
bd10e677
MB
2235 (arguments
2236 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2237 '(#:tests? #f))
243a009a
DT
2238 (home-page "http://nedbatchelder.com/code/coverage")
2239 (synopsis "Code coverage measurement for Python")
2240 (description
2241 "Coverage measures code coverage, typically during test execution. It
2242uses the code analysis tools and tracing hooks provided in the Python standard
2243library to determine which lines are executable, and which have been
2244executed.")
3f641af0 2245 (license license:bsd-3)))
243a009a
DT
2246
2247(define-public python2-coverage
2248 (package-with-python2 python-coverage))
2249
12f839fd
EF
2250(define-public python-cov-core
2251 (package
2252 (name "python-cov-core")
2253 (version "1.15.0")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "cov-core" version))
2258 (sha256
2259 (base32
2260 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2261 (build-system python-build-system)
f78e1c27 2262 (propagated-inputs
12f839fd
EF
2263 `(("python-coverage" ,python-coverage)))
2264 (home-page "https://github.com/schlamar/cov-core")
2265 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2266 (description
2267 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2268It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2269 (license license:expat)))
12f839fd
EF
2270
2271(define-public python2-cov-core
f210e944 2272 (package-with-python2 python-cov-core))
12f839fd 2273
041358fb
DT
2274(define-public python-discover
2275 (package
2276 (name "python-discover")
2277 (version "0.4.0")
2278 (source
2279 (origin
2280 (method url-fetch)
2281 (uri (string-append
2282 "https://pypi.python.org/packages/source/d/discover/discover-"
2283 version ".tar.gz"))
2284 (sha256
2285 (base32
2286 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2287 (build-system python-build-system)
041358fb
DT
2288 (home-page "http://pypi.python.org/pypi/discover/")
2289 (synopsis
2290 "Python test discovery for unittest")
2291 (description
2292 "Discover provides test discovery for unittest, a feature that has been
e881752c 2293backported from Python 2.7 for Python 2.4+.")
3f641af0 2294 (license license:bsd-3)))
041358fb
DT
2295
2296(define-public python2-discover
2297 (package-with-python2 python-discover))
2298
a480bc41
EB
2299(define-public behave
2300 (package
2301 (name "behave")
287cfd1a 2302 (version "1.2.5")
a480bc41
EB
2303 (source (origin
2304 (method url-fetch)
287cfd1a 2305 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2306 (sha256
2307 (base32
287cfd1a 2308 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2309 (build-system python-build-system)
f22efa01 2310 (propagated-inputs
f3b98f4f 2311 `(("python-six" ,python-six)
a480bc41
EB
2312 ("python-parse" ,python-parse)
2313 ("python-parse-type" ,python-parse-type)))
2314 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2315 ;PyHamcrest>=1.8
2316 (home-page "http://github.com/behave/behave")
2317 (synopsis "Python behavior-driven development")
2318 (description
2319 "Behave is a tool for behavior-driven development in python.
2320Behavior-driven development (or BDD) is an agile software development
2321technique that encourages collaboration between developers, QA and
2322non-technical or business participants in a software project. Behave uses
2323tests written in a natural language style, backed up by Python code.")
3f641af0 2324 (license license:x11)))
c7303d3c
DT
2325
2326(define-public python-exif-read
2327 (package
2328 (name "python-exif-read")
2a2d0981 2329 (version "2.1.2")
c7303d3c
DT
2330 (source (origin
2331 (method url-fetch)
2a2d0981 2332 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2333 (sha256
2334 (base32
2a2d0981 2335 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2336 (build-system python-build-system)
c7303d3c
DT
2337 (arguments `(#:tests? #f)) ; no tests
2338 (home-page "https://github.com/ianare/exif-py")
2339 (synopsis "Python library to extract EXIF data from image files")
2340 (description
2341 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2342files.")
3f641af0 2343 (license license:bsd-3)))
c7303d3c
DT
2344
2345(define-public python2-exif-read
2346 (package-with-python2 python-exif-read))
d5f89b22
DT
2347
2348(define-public python-pyld
2349 (package
2350 (name "python-pyld")
8957af32 2351 (version "0.7.1")
d5f89b22
DT
2352 (source (origin
2353 (method url-fetch)
af1ab773 2354 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2355 (sha256
2356 (base32
8957af32 2357 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2358 (build-system python-build-system)
d5f89b22
DT
2359 (arguments `(#:tests? #f)) ; no tests
2360 (home-page "http://github.com/digitalbazaar/pyld")
2361 (synopsis "Python implementation of the JSON-LD specification")
2362 (description
2363 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2364 (license license:bsd-3)))
d5f89b22
DT
2365
2366(define-public python2-pyld
2367 (package-with-python2 python-pyld))
3a1f9a68
DT
2368
2369(define-public python-certifi
2370 (package
2371 (name "python-certifi")
b2a2232c 2372 (version "2016.8.31")
3a1f9a68
DT
2373 (source (origin
2374 (method url-fetch)
9a41f443 2375 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2376 (sha256
2377 (base32
b2a2232c 2378 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2379 (build-system python-build-system)
3a1f9a68
DT
2380 (arguments `(#:tests? #f)) ; no tests
2381 (home-page "http://python-requests.org/")
2382 (synopsis "Python CA certificate bundle")
2383 (description
2384 "Certifi is a Python library that contains a CA certificate bundle, which
2385is used by the Requests library to verify HTTPS requests.")
3f641af0 2386 (license license:asl2.0)))
3a1f9a68
DT
2387
2388(define-public python2-certifi
2389 (package-with-python2 python-certifi))
e6cfbd36 2390
12c270dd
RW
2391(define-public python-click
2392 (package
2393 (name "python-click")
d4acb6db 2394 (version "6.7")
12c270dd
RW
2395 (source
2396 (origin
2397 (method url-fetch)
375f224b 2398 (uri (pypi-uri "click" version))
12c270dd 2399 (sha256
43accb58 2400 (base32
d4acb6db 2401 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2402 (build-system python-build-system)
e2ab5a09
BW
2403 (arguments
2404 `(#:phases
2405 (modify-phases %standard-phases
2406 (add-after 'unpack 'fix-paths
2407 (lambda* (#:key inputs #:allow-other-keys)
2408 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2409 "cross-libc" "libc"))))
2410 (substitute* "click/_unicodefun.py"
2411 (("'locale'")
2412 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2413 #t))
2414 (replace 'check
2415 (lambda _
2416 (zero? (system* "make" "test")))))))
2417 (native-inputs
2418 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2419 (home-page "http://click.pocoo.org")
2420 (synopsis "Command line library for Python")
2421 (description
2422 "Click is a Python package for creating command line interfaces in a
2423composable way with as little code as necessary. Its name stands for
2424\"Command Line Interface Creation Kit\". It's highly configurable but comes
2425with sensible defaults out of the box.")
3f641af0 2426 (license license:bsd-3)))
12c270dd
RW
2427
2428(define-public python2-click
2429 (package-with-python2 python-click))
2430
addc808d
EF
2431(define-public python-wheel
2432 (package
2433 (name "python-wheel")
40981b5c 2434 (version "0.29.0")
e1ba0749
EF
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "wheel" version))
2439 (sha256
2440 (base32
40981b5c 2441 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2442 (build-system python-build-system)
2443 (native-inputs
f3b98f4f 2444 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2445 ("python-pytest-cov" ,python-pytest-cov)))
2446 (home-page "https://bitbucket.org/pypa/wheel/")
2447 (synopsis "Format for built Python packages")
2448 (description
2449 "A wheel is a ZIP-format archive with a specially formatted filename and
2450the @code{.whl} extension. It is designed to contain all the files for a PEP
2451376 compatible install in a way that is very close to the on-disk format. Many
2452packages will be properly installed with only the @code{Unpack} step and the
2453unpacked archive preserves enough information to @code{Spread} (copy data and
2454scripts to their final locations) at any later time. Wheel files can be
2455installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2456 (license license:expat)
2457 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2458
2459(define-public python2-wheel
8ad4ae20
LF
2460 (let ((wheel (package-with-python2
2461 (strip-python2-variant python-wheel))))
264ae686 2462 (package (inherit wheel)
8ad4ae20
LF
2463 (native-inputs `(("python2-functools32" ,python2-functools32)
2464 ,@(package-native-inputs wheel))))))
2465
addc808d 2466
ae641128 2467(define-public python-requests
e6cfbd36 2468 (package
ae641128 2469 (name "python-requests")
74a066f9 2470 (version "2.9.1")
e6cfbd36
DT
2471 (source (origin
2472 (method url-fetch)
5d691657 2473 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2474 (sha256
2475 (base32
74a066f9 2476 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2477 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2478 (build-system python-build-system)
cff0ccf9
MB
2479 (arguments
2480 ;; FIXME: Some tests require network access.
2481 '(#:tests? #f))
e6cfbd36
DT
2482 (home-page "http://python-requests.org/")
2483 (synopsis "Python HTTP library")
2484 (description
2485 "Requests is a Python HTTP client library. It aims to be easier to use
2486than Python’s urllib2 library.")
3f641af0 2487 (license license:asl2.0)))
864b5211 2488
e9005180
DT
2489;; Some software requires an older version of Requests, notably Docker
2490;; Compose.
2491(define-public python-requests-2.7
2492 (package (inherit python-requests)
2493 (version "2.7.0")
2494 (source (origin
2495 (method url-fetch)
2496 (uri (pypi-uri "requests" version))
2497 (sha256
2498 (base32
2499 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2500
ae641128 2501(define-public python2-requests
8ad4ae20 2502 (package-with-python2 python-requests))
ae641128 2503
ea521b42
DT
2504(define-public python-vcversioner
2505 (package
2506 (name "python-vcversioner")
538fe019 2507 (version "2.16.0.0")
ea521b42
DT
2508 (source
2509 (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "vcversioner" version))
2512 (sha256
2513 (base32
538fe019 2514 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2515 (build-system python-build-system)
ea521b42
DT
2516 (synopsis "Python library for version number discovery")
2517 (description "Vcversioner is a Python library that inspects tagging
2518information in a variety of version control systems in order to discover
2519version numbers.")
2520 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2521 (license license:isc)))
ea521b42
DT
2522
2523(define-public python2-vcversioner
f210e944 2524 (package-with-python2 python-vcversioner))
ae641128 2525
864b5211
DT
2526(define-public python-jsonschema
2527 (package
2528 (name "python-jsonschema")
b3667afb 2529 (version "2.5.1")
864b5211
DT
2530 (source (origin
2531 (method url-fetch)
2532 (uri
2533 (string-append
2534 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2535 version ".tar.gz"))
2536 (sha256
2537 (base32
b3667afb 2538 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2539 (build-system python-build-system)
8bcd6b91
EF
2540 (arguments
2541 '(#:phases
2542 (modify-phases %standard-phases
2543 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2544 (native-inputs
8bcd6b91
EF
2545 `(("python-nose" ,python-nose)
2546 ("python-vcversioner" ,python-vcversioner)))
2547 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2548 (synopsis "Implementation of JSON Schema for Python")
2549 (description
2550 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2551 (license license:expat)
2552 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2553
2554(define-public python2-jsonschema
a14600ec
LF
2555 (let ((jsonschema (package-with-python2
2556 (strip-python2-variant python-jsonschema))))
264ae686 2557 (package (inherit jsonschema)
eaba9d66 2558 (native-inputs
8bcd6b91 2559 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2560 ,@(package-native-inputs jsonschema)))
2561 (propagated-inputs
2562 `(("python2-functools32" ,python2-functools32))))))
850189b8 2563
9f21414d 2564(define-public python-kitchen
2565 (package
2566 (name "python-kitchen")
2567 (version "1.2.4")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "kitchen" version))
2572 (sha256
2573 (base32
2574 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2575 (build-system python-build-system)
2576 (propagated-inputs
2577 `(("python-chardet" ,python-chardet)))
2578 (home-page "https://fedorahosted.org/kitchen")
2579 (synopsis "Python API for snippets")
2580 (description "@code{kitchen} module provides a python API for all sorts of
2581little useful snippets of code that everybody ends up writing for their projects
2582but never seem big enough to build an independent release. Use kitchen and stop
2583cutting and pasting that code over and over.")
2584 (license (list license:lgpl2.1+
2585 ;; subprocess.py, test_subprocess.py,
2586 ;; kitchen/pycompat25/defaultdict.py:
2587 license:psfl))))
2588
2589(define-public python2-kitchen
2590 (package-with-python2 python-kitchen))
2591
850189b8
DT
2592(define-public python-unidecode
2593 (package
2594 (name "python-unidecode")
8925d4f3 2595 (version "0.04.18")
850189b8
DT
2596 (source (origin
2597 (method url-fetch)
8925d4f3 2598 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2599 (sha256
2600 (base32
8925d4f3 2601 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2602 (build-system python-build-system)
850189b8
DT
2603 (home-page "https://pypi.python.org/pypi/Unidecode")
2604 (synopsis "ASCII transliterations of Unicode text")
2605 (description
2606 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2607useful when integrating with legacy code that doesn't support Unicode, or for
2608ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2609machine identifiers from human-readable Unicode strings that should still be
2610somewhat intelligeble.")
3f641af0 2611 (license license:gpl2+)))
850189b8
DT
2612
2613(define-public python2-unidecode
2614 (package-with-python2 python-unidecode))
6d45fef4
DT
2615
2616(define-public python-pyjwt
2617 (package
2618 (name "python-pyjwt")
eb31d4b4 2619 (version "1.4.0")
6d45fef4
DT
2620 (source
2621 (origin
2622 (method url-fetch)
eb31d4b4 2623 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2624 (sha256
2625 (base32
eb31d4b4 2626 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2627 (build-system python-build-system)
eb31d4b4 2628 (native-inputs
130fe994
HG
2629 `(("python-pytest" ,python-pytest)
2630 ("python-pytest-cov" ,python-pytest-cov)
2631 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2632 (home-page "http://github.com/progrium/pyjwt")
2633 (synopsis "JSON Web Token implementation in Python")
2634 (description
2635 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2636 (license license:expat)))
6d45fef4
DT
2637
2638(define-public python2-pyjwt
2639 (package-with-python2 python-pyjwt))
2640
2cec1f6f
DT
2641(define-public python-oauthlib
2642 (package
2643 (name "python-oauthlib")
bde2171d 2644 (version "1.0.3")
2cec1f6f
DT
2645 (source (origin
2646 (method url-fetch)
bde2171d 2647 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2648 (sha256
2649 (base32
bde2171d 2650 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2651 (build-system python-build-system)
bde2171d 2652 (native-inputs
bb06aa34 2653 `(("python-nose" ,python-nose)
c616b5d3 2654 ("python-mock" ,python-mock)
bde2171d 2655 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2656 ("python-pyjwt" ,python-pyjwt)
2657 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2658 (home-page "https://github.com/idan/oauthlib")
2659 (synopsis "OAuth implementation for Python")
2660 (description
2661 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2662OAuth request-signing logic.")
3f641af0 2663 (license license:bsd-3)
59f151ec 2664 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2665
2666(define-public python2-oauthlib
59f151ec 2667 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2668 (package
2669 (inherit base)
00e10c6e 2670 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2671 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2672
2673(define-public python-itsdangerous
2674 (package
2675 (name "python-itsdangerous")
2676 (version "0.24")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (string-append
2681 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2682 version ".tar.gz"))
2683 (sha256
2684 (base32
2685 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2686 (build-system python-build-system)
ec5dbb5c
DT
2687 (home-page "http://github.com/mitsuhiko/itsdangerous")
2688 (synopsis "Python library for passing data to/from untrusted environments")
2689 (description
2690 "Itsdangerous provides various helpers to pass trusted data to untrusted
2691environments and back.")
f210e944 2692 (license license:bsd-3)))
ec5dbb5c
DT
2693
2694(define-public python2-itsdangerous
f210e944 2695 (package-with-python2 python-itsdangerous))
5731cae3 2696
8d12be1e
RW
2697(define-public python-pyyaml
2698 (package
2699 (name "python-pyyaml")
bf5e4bc4 2700 (version "3.12")
8d12be1e
RW
2701 (source
2702 (origin
2703 (method url-fetch)
bf5e4bc4 2704 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2705 (sha256
2706 (base32
bf5e4bc4 2707 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2708 (build-system python-build-system)
2709 (inputs
2710 `(("libyaml" ,libyaml)))
8d12be1e
RW
2711 (home-page "http://pyyaml.org/wiki/PyYAML")
2712 (synopsis "YAML parser and emitter for Python")
2713 (description
2714 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2715complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2716API, and sensible error messages. PyYAML supports standard YAML tags and
2717provides Python-specific tags that allow to represent an arbitrary Python
2718object.")
2719 (license license:expat)))
2720
2721(define-public python2-pyyaml
2722 (package-with-python2 python-pyyaml))
2723
5731cae3
DT
2724(define-public python-virtualenv
2725 (package
2726 (name "python-virtualenv")
58d04dba 2727 (version "15.0.3")
5731cae3
DT
2728 (source
2729 (origin
2730 (method url-fetch)
17804240 2731 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2732 (sha256
2733 (base32
58d04dba 2734 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2735 (build-system python-build-system)
17804240
EF
2736 (arguments
2737 `(#:phases
2738 (modify-phases %standard-phases
58d04dba
RW
2739 (replace 'check
2740 (lambda _
2741 ;; Disable failing test. See upstream bug report
2742 ;; https://github.com/pypa/virtualenv/issues/957
2743 (substitute* "tests/test_virtualenv.py"
2744 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2745 (zero? (system* "py.test")))))))
e7881f3d 2746 (native-inputs
f3b98f4f 2747 `(("python-mock" ,python-mock)
17804240 2748 ("python-pytest" ,python-pytest)))
5731cae3
DT
2749 (home-page "https://virtualenv.pypa.io/")
2750 (synopsis "Virtual Python environment builder")
2751 (description
2752 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2753 (license license:expat)))
5731cae3
DT
2754
2755(define-public python2-virtualenv
2756 (package-with-python2 python-virtualenv))
8176d4d5
DT
2757
2758(define-public python-markupsafe
2759 (package
2760 (name "python-markupsafe")
2761 (version "0.23")
2762 (source
2763 (origin
2764 (method url-fetch)
2765 (uri (string-append
2766 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2767 version ".tar.gz"))
2768 (sha256
2769 (base32
2770 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2771 (build-system python-build-system)
8176d4d5
DT
2772 (home-page "http://github.com/mitsuhiko/markupsafe")
2773 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2774 (description
2775 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2776for Python.")
3f641af0 2777 (license license:bsd-3)))
8176d4d5
DT
2778
2779(define-public python2-markupsafe
2780 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2781
2782(define-public python-jinja2
2783 (package
2784 (name "python-jinja2")
e98149b3 2785 (version "2.8")
fe34f0d1
DT
2786 (source
2787 (origin
2788 (method url-fetch)
e98149b3 2789 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2790 (sha256
2791 (base32
e98149b3 2792 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2793 (build-system python-build-system)
f22efa01 2794 (propagated-inputs
f3b98f4f 2795 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2796 (home-page "http://jinja.pocoo.org/")
2797 (synopsis "Python template engine")
2798 (description
2799 "Jinja2 is a small but fast and easy to use stand-alone template engine
2800written in pure Python.")
3f641af0 2801 (license license:bsd-3)))
fe34f0d1
DT
2802
2803(define-public python2-jinja2
2804 (package-with-python2 python-jinja2))
3580ab8b 2805
f7d17ac7
EE
2806(define-public python-pystache
2807 (package
2808 (name "python-pystache")
2809 (version "0.5.4")
2810 (source (origin
2811 (method url-fetch)
2812 (uri (pypi-uri "pystache" version))
2813 (sha256
2814 (base32
2815 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2816 (build-system python-build-system)
8bd5164b
MB
2817 (arguments
2818 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2819 (home-page "http://defunkt.io/pystache/")
2820 (synopsis "Python logic-less template engine")
2821 (description
2822 "Pystache is a Python implementation of the framework agnostic,
2823logic-free templating system Mustache.")
8bd5164b
MB
2824 (license license:expat)
2825 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2826
2827(define-public python2-pystache
8bd5164b
MB
2828 (package (inherit (package-with-python2
2829 (strip-python2-variant python-pystache)))
2830 (arguments
2831 `(#:python ,python-2
2832 #:phases
2833 (modify-phases %standard-phases
2834 (replace 'check
2835 (lambda _
2836 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2837
1285119b
RW
2838(define-public python-joblib
2839 (package
2840 (name "python-joblib")
f34ef331 2841 (version "0.10.3")
1285119b
RW
2842 (source (origin
2843 (method url-fetch)
f34ef331 2844 (uri (pypi-uri "joblib" version))
1285119b
RW
2845 (sha256
2846 (base32
6aa5f1ca
HG
2847 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2848 (modules '((guix build utils)))
2849 (snippet
2850 '(begin
2851 ;; Remove pre-compiled .pyc files from source.
2852 (for-each delete-file-recursively
2853 (find-files "." "__pycache__" #:directories? #t))
2854 (for-each delete-file (find-files "." "\\.pyc$"))
2855 #t))))
1285119b 2856 (build-system python-build-system)
a8dd960a
RW
2857 (arguments
2858 `(#:phases
2859 (modify-phases %standard-phases
2860 (add-before 'check 'disable-failing-tests
2861 (lambda _
2862 ;; This numpydoc tests fails for unknown reasons
2863 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2864 ;; This numpydoc test depends on matplotlib, which is not a
2865 ;; required input.
2866 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2867 ;; These tests fail to execute sys.executable
2868 (substitute* "joblib/test/test_parallel.py"
2869 (("import nose" line)
2870 (string-append "from nose.plugins.skip import SkipTest\n" line))
2871 (("def test_nested_parallel_warnings" line)
2872 (string-append "@SkipTest\n" line))
2873 (("def test_parallel_with_interactively_defined_functions" line)
2874 (string-append "@SkipTest\n" line)))
2875 #t)))))
f052ec9a 2876 ;; Provide nose to enable tests command
1285119b 2877 (native-inputs
f3b98f4f 2878 `(("python-nose" ,python-nose)
f34ef331
RW
2879 ("python-sphinx" ,python-sphinx)
2880 ("python-docutils" ,python-docutils)
2881 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2882 (home-page "http://pythonhosted.org/joblib/")
2883 (synopsis "Using Python functions as pipeline jobs")
2884 (description
2885 "Joblib is a set of tools to provide lightweight pipelining in Python.
2886In particular, joblib offers: transparent disk-caching of the output values
2887and lazy re-evaluation (memoize pattern), easy simple parallel computing
2888logging and tracing of the execution.")
3f641af0 2889 (license license:bsd-3)))
1285119b
RW
2890
2891(define-public python2-joblib
2892 (package-with-python2 python-joblib))
2893
3580ab8b
DT
2894(define-public python-docutils
2895 (package
2896 (name "python-docutils")
00e0ca7c 2897 (version "0.13.1")
3580ab8b
DT
2898 (source
2899 (origin
2900 (method url-fetch)
00e0ca7c 2901 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2902 (sha256
2903 (base32
00e0ca7c 2904 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 2905 (build-system python-build-system)
3580ab8b
DT
2906 (arguments
2907 '(#:tests? #f)) ; no setup.py test command
2908 (home-page "http://docutils.sourceforge.net/")
2909 (synopsis "Python Documentation Utilities")
2910 (description
2911 "Docutils is a modular system for processing documentation into useful
2912formats, such as HTML, XML, and LaTeX. For input Docutils supports
2913reStructuredText.")
2914 ;; Most of the source code is public domain, but some source files are
2915 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2916 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2917
2918(define-public python2-docutils
2919 (package-with-python2 python-docutils))
fb35b7c0
DT
2920
2921(define-public python-pygments
2922 (package
2923 (name "python-pygments")
7d2e758d 2924 (version "2.1.3")
fb35b7c0
DT
2925 (source
2926 (origin
2927 (method url-fetch)
9f442285 2928 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2929 (sha256
2930 (base32
7d2e758d 2931 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 2932 (build-system python-build-system)
995cb99e
MB
2933 (arguments
2934 ;; FIXME: Tests require sphinx, which depends on this.
2935 '(#:tests? #f))
fb35b7c0
DT
2936 (home-page "http://pygments.org/")
2937 (synopsis "Syntax highlighting")
2938 (description
2939 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2940 (license license:bsd-2)))
fb35b7c0
DT
2941
2942(define-public python2-pygments
2943 (package-with-python2 python-pygments))
9dd6078d
DT
2944
2945(define-public python-sphinx
2946 (package
2947 (name "python-sphinx")
2948 (version "1.2.3")
2949 (source
2950 (origin
2951 (method url-fetch)
2952 (uri (string-append
2953 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2954 version ".tar.gz"))
2955 (sha256
2956 (base32
2957 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2958 (build-system python-build-system)
03cb5f9e
MB
2959 (arguments
2960 ;; FIXME: Missing dependencies.
2961 '(#:tests? #f))
f22efa01 2962 (propagated-inputs
f3b98f4f 2963 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2964 ("python-docutils" ,python-docutils)
2965 ("python-pygments" ,python-pygments)))
2966 (home-page "http://sphinx-doc.org/")
2967 (synopsis "Python documentation generator")
2968 (description "Sphinx is a tool that makes it easy to create documentation
2969for Python projects or other documents consisting of multiple reStructuredText
2970sources.")
3f641af0 2971 (license license:bsd-3)))
9dd6078d
DT
2972
2973(define-public python2-sphinx
2974 (package-with-python2 python-sphinx))
6888830b 2975
ad320b20
RW
2976(define-public python-sphinx-rtd-theme
2977 (package
2978 (name "python-sphinx-rtd-theme")
2979 (version "0.1.6")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (string-append "https://pypi.python.org/packages/source/s/"
2984 "sphinx_rtd_theme/sphinx_rtd_theme-"
2985 version ".tar.gz"))
2986 (sha256
2987 (base32
2988 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2989 (build-system python-build-system)
9d3a15b4
LF
2990 (propagated-inputs
2991 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2992 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2993 (synopsis "ReadTheDocs.org theme for Sphinx")
2994 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2995 (license license:expat)))
ad320b20
RW
2996
2997(define-public python2-sphinx-rtd-theme
2998 (package-with-python2 python-sphinx-rtd-theme))
2999
fe94cf0c
HG
3000(define-public python-rst.linker
3001 (package
3002 (name "python-rst.linker")
3003 (version "1.7")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "rst.linker" version))
3008 (sha256
3009 (base32
3010 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3011 (build-system python-build-system)
3012 (propagated-inputs
22d7360b 3013 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3014 ("python-six" ,python-six)))
3015 (native-inputs
3016 `(("python-setuptools-scm" ,python-setuptools-scm)))
3017 ;; Test would require path.py, which would introduce a cyclic dependence.
3018 (arguments `(#:tests? #f))
3019 ;; Note: As of version 1.7 the documentation is not worth building.
3020 (home-page "https://github.com/jaraco/rst.linker")
3021 (synopsis "Sphinx plugin to add links and timestamps")
3022 (description "rst.linker allows to automatically replace text by a
3023reStructuredText external reference or timestamps. It's primary purpose is to
3024augment the changelog, but it can be used for other documents, too.")
3025 (license license:expat)))
3026
3027(define-public python2-rst.linker
3028 (package-with-python2 python-rst.linker))
3029
f4de5b3b
CAW
3030(define-public python-feedgenerator
3031 (package
3032 (name "python-feedgenerator")
f0412aa2 3033 (version "1.8")
f4de5b3b 3034 (source
f4de5b3b 3035 (origin
f0412aa2
EF
3036 (method url-fetch)
3037 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3038 (sha256
3039 (base32
7c88bcf4
HG
3040 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3041 (modules '((guix build utils)))
3042 (snippet
3043 '(begin
3044 ;; Remove pre-compiled .pyc files from source.
3045 (for-each delete-file-recursively
3046 (find-files "." "__pycache__" #:directories? #t))
3047 (for-each delete-file (find-files "." "\\.pyc$"))
3048 #t))))
f4de5b3b 3049 (build-system python-build-system)
dae73d9b 3050 (propagated-inputs
f3b98f4f 3051 `(("python-pytz" ,python-pytz)
f4de5b3b 3052 ("python-six" ,python-six)))
f0412aa2 3053 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3054 (synopsis
3055 "Standalone version of Django's Atom/RSS feed generator")
3056 (description
3057 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3058which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3059 (license license:bsd-3)))
f4de5b3b
CAW
3060
3061(define-public python2-feedgenerator
3062 (package-with-python2 python-feedgenerator))
3063
59ad30e3
CAW
3064(define-public python-blinker
3065 (package
3066 (name "python-blinker")
7fb9ff4d 3067 (version "1.4")
59ad30e3
CAW
3068 (source
3069 (origin
3070 (method url-fetch)
7fb9ff4d 3071 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3072 (sha256
3073 (base32
7fb9ff4d 3074 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3075 (build-system python-build-system)
59ad30e3
CAW
3076 (home-page "http://pythonhosted.org/blinker/")
3077 (synopsis "Fast, simple object-to-object and broadcast signaling")
3078 (description
3079 "Blinker provides a fast dispatching system that allows any number of
3080interested parties to subscribe to events, or \"signals\".")
3081 (license license:expat)))
3082
3083(define-public python2-blinker
3084 (package-with-python2 python-blinker))
3085
b8050e71
CAW
3086(define-public pelican
3087 (package
3088 (name "pelican")
11f97c27 3089 (version "3.6.3")
b8050e71
CAW
3090 (source
3091 (origin
3092 (method url-fetch)
11f97c27 3093 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3094 (sha256
3095 (base32
11f97c27 3096 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3097 (build-system python-build-system)
f22efa01 3098 (propagated-inputs
b8050e71
CAW
3099 `(("python-feedgenerator" ,python-feedgenerator)
3100 ("python-jinja2" ,python-jinja2)
3101 ("python-pygments" ,python-pygments)
3102 ("python-docutils" ,python-docutils)
3103 ("python-pytz" ,python-pytz)
3104 ("python-blinker" ,python-blinker)
3105 ("python-unidecode" ,python-unidecode)
3106 ("python-six" ,python-six)
22d7360b 3107 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3108 (home-page "http://getpelican.com/")
3109 (arguments
3110 `(;; XXX Requires a lot more packages to do unit tests :P
3111 #:tests? #f
3112 #:phases (modify-phases %standard-phases
3113 (add-before
3114 'install 'adjust-requires
3115 ;; Since feedgenerator is installed from git, it doesn't
3116 ;; conform to the version requirements.
3117 ;;
3118 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3119 ;; version requirement so setuptools doesn't get confused.
3120 (lambda _
3121 (substitute* "setup.py"
3122 (("['\"]feedgenerator.*?['\"]")
3123 "'feedgenerator'")))))))
3124 (synopsis "Python-based static site publishing system")
3125 (description
3126 "Pelican is a tool to generate a static blog from reStructuredText,
3127Markdown input files, and more. Pelican uses Jinja2 for templating
3128and is very extensible.")
3f641af0 3129 (license license:agpl3+)))
b8050e71 3130
240ca4aa
RW
3131(define-public python-scikit-learn
3132 (package
3133 (name "python-scikit-learn")
8e401ab6 3134 (version "0.18.1")
240ca4aa
RW
3135 (source
3136 (origin
3137 (method url-fetch)
3138 (uri (string-append
3139 "https://github.com/scikit-learn/scikit-learn/archive/"
3140 version ".tar.gz"))
7e21b9fb 3141 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3142 (sha256
3143 (base32
8e401ab6 3144 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3145 (build-system python-build-system)
3146 (arguments
3147 `(#:phases
3148 (alist-cons-before
2f6b3d2e
RW
3149 'check 'set-HOME
3150 ;; some tests require access to "$HOME"
3151 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3152 %standard-phases)))
240ca4aa 3153 (inputs
328bb95d
HG
3154 `(("openblas" ,openblas)))
3155 (native-inputs
8e401ab6
RW
3156 `(("python-nose" ,python-nose)
3157 ("python-cython" ,python-cython)))
240ca4aa
RW
3158 (propagated-inputs
3159 `(("python-numpy" ,python-numpy)
3160 ("python-scipy" ,python-scipy)))
3161 (home-page "http://scikit-learn.org/")
3162 (synopsis "Machine Learning in Python")
3163 (description
3164 "Scikit-learn provides simple and efficient tools for data
3165mining and data analysis.")
1b5241c5 3166 (license license:bsd-3)))
240ca4aa
RW
3167
3168(define-public python2-scikit-learn
1b5241c5 3169 (package-with-python2 python-scikit-learn))
240ca4aa 3170
12f8f9bb
RW
3171(define-public python-scikit-image
3172 (package
3173 (name "python-scikit-image")
3174 (version "0.11.3")
3175 (source
3176 (origin
3177 (method url-fetch)
3178 (uri (string-append
3179 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3180 version ".tar.gz"))
3181 (sha256
3182 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3183 (build-system python-build-system)
9026e689
MB
3184 (arguments
3185 ;; TODO: Some tests require running X11 server. Disable them?
3186 '(#:tests? #f))
b83e2333 3187 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3188 (propagated-inputs
3189 `(("python-matplotlib" ,python-matplotlib)
3190 ("python-networkx" ,python-networkx)
12f8f9bb 3191 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3192 ("python-pillow" ,python-pillow)))
3193 (native-inputs
b83e2333
HG
3194 `(("python-numpy" ,python-numpy)
3195 ("python-cython" ,python-cython)
3196 ("python-six" ,python-six)))
12f8f9bb
RW
3197 (home-page "http://scikit-image.org/")
3198 (synopsis "Image processing in Python")
3199 (description
e881752c 3200 "Scikit-image is a collection of algorithms for image processing.")
12733594 3201 (license license:bsd-3)))
12f8f9bb
RW
3202
3203(define-public python2-scikit-image
12733594 3204 (package-with-python2 python-scikit-image))
12f8f9bb 3205
5394a6a6
RW
3206(define-public python-redis
3207 (package
3208 (name "python-redis")
3209 (version "2.10.3")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (string-append
3214 "https://pypi.python.org/packages/source/r/redis/redis-"
3215 version ".tar.gz"))
3216 (sha256
3217 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3218 (build-system python-build-system)
3219 ;; Tests require a running Redis server
3220 (arguments '(#:tests? #f))
cf8124b0
HG
3221 ;; As long as we are not running test, we do not need this input :-)
3222 ;;(native-inputs
3223 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3224 (home-page "https://github.com/andymccurdy/redis-py")
3225 (synopsis "Redis Python client")
3226 (description
3227 "This package provides a Python interface to the Redis key-value store.")
3228 (license license:expat)))
3229
3230(define-public python2-redis
3231 (package-with-python2 python-redis))
3232
748cef5b
RW
3233(define-public python-rq
3234 (package
3235 (name "python-rq")
3236 (version "0.5.2")
3237 (source
3238 (origin
3239 (method url-fetch)
3240 (uri (string-append
3241 "https://pypi.python.org/packages/source/r/rq/rq-"
3242 version ".tar.gz"))
3243 (sha256
3244 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3245 (build-system python-build-system)
3246 (propagated-inputs
3247 `(("python-click" ,python-click)
3248 ("python-redis" ,python-redis)))
748cef5b
RW
3249 (home-page "http://python-rq.org/")
3250 (synopsis "Simple job queues for Python")
3251 (description
3252 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3253processing them in the background with workers. It is backed by Redis and it
3254is designed to have a low barrier to entry.")
3f641af0 3255 (license license:bsd-2)))
748cef5b
RW
3256
3257(define-public python2-rq
3258 (package-with-python2 python-rq))
3259
6888830b
FB
3260(define-public python-cython
3261 (package
3262 (name "python-cython")
dd22efef 3263 (version "0.24.1")
6888830b
FB
3264 (source
3265 (origin
3266 (method url-fetch)
56918e26 3267 (uri (pypi-uri "Cython" version))
6888830b
FB
3268 (sha256
3269 (base32
dd22efef 3270 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3271 (build-system python-build-system)
3272 ;; we need the full python package and not just the python-wrapper
3273 ;; because we need libpython3.3m.so
3274 (inputs
3275 `(("python" ,python)))
3276 (arguments
3277 `(#:phases
b92f651b
EF
3278 (modify-phases %standard-phases
3279 (add-before 'check 'set-HOME
3280 ;; some tests require access to "$HOME/.cython"
3281 (lambda _ (setenv "HOME" "/tmp")))
3282 (replace 'check
3283 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3284 (home-page "http://cython.org/")
3285 (synopsis "C extensions for Python")
3286 (description "Cython is an optimising static compiler for both the Python
3287programming language and the extended Cython programming language. It makes
3288writing C extensions for Python as easy as Python itself.")
3f641af0 3289 (license license:asl2.0)
48b311b1 3290 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3291
3292(define-public python2-cython
48b311b1
LC
3293 (package (inherit (package-with-python2
3294 (strip-python2-variant python-cython)))
6888830b
FB
3295 (name "python2-cython")
3296 (inputs
3297 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3298
ee5fb7ee
AV
3299;; The RPython toolchain currently does not support Python 3.
3300(define-public python2-rpython
3301 (package
3302 (name "python2-rpython")
3303 (version "0.1.4")
3304 (source
3305 (origin
3306 (method url-fetch)
3307 (uri (pypi-uri "rpython" version))
3308 (sha256
3309 (base32
3310 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3311 (build-system python-build-system)
3312 (arguments `(#:python ,python-2))
3313 (native-inputs
f3b98f4f 3314 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3315 (home-page "https://rpython.readthedocs.org")
3316 (synopsis "Framework for implementing interpreters and virtual machines")
3317 (description "RPython is a translation and support framework for
3318producing implementations of dynamic languages, emphasizing a clean separation
3319between language specification and implementation aspects.")
3320 (license license:expat)))
3321
0da98533
FB
3322;; This version of numpy is missing the documentation and is only used to
3323;; build matplotlib which is required to build numpy's documentation.
3324(define python-numpy-bootstrap
3325 (package
3326 (name "python-numpy-bootstrap")
ef9b4c04 3327 (version "1.10.4")
0da98533
FB
3328 (source
3329 (origin
3330 (method url-fetch)
de67e922 3331 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3332 "/numpy-" version ".tar.gz"))
3333 (sha256
3334 (base32
ef9b4c04 3335 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3336 (build-system python-build-system)
3337 (inputs
328bb95d 3338 `(("openblas" ,openblas)
cba256f8 3339 ("lapack" ,lapack)))
0da98533 3340 (native-inputs
2efabc55
HG
3341 `(("python-nose" ,python-nose)
3342 ("gfortran" ,gfortran)))
0da98533
FB
3343 (arguments
3344 `(#:phases
2efabc55
HG
3345 (modify-phases %standard-phases
3346 (add-before 'build 'set-environment-variables
3347 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3348 (call-with-output-file "site.cfg"
3349 (lambda (port)
cba256f8
RW
3350 (format port
3351 "[openblas]
dbdfe515
RW
3352libraries = openblas
3353library_dirs = ~a/lib
3354include_dirs = ~a/include
cba256f8 3355
2efabc55
HG
3356# backslash-n to make emacs happy
3357\n[lapack]
cba256f8
RW
3358lapack_libs = lapack
3359library_dirs = ~a/lib
3360include_dirs = ~a/include
3361"
3362 (assoc-ref inputs "openblas")
3363 (assoc-ref inputs "openblas")
3364 (assoc-ref inputs "lapack")
3365 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3366 ;; Use "gcc" executable, not "cc".
3367 (substitute* "numpy/distutils/system_info.py"
3368 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3369 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3370 #t))
6a843168
FB
3371 ;; Tests can only be run after the library has been installed and not
3372 ;; within the source directory.
2efabc55
HG
3373 (delete 'check)
3374 (add-after 'install 'check
3375 (lambda* (#:key outputs inputs #:allow-other-keys)
3376 ;; Make installed package available for running the tests
3377 (add-installed-pythonpath inputs outputs)
6a843168 3378 (with-directory-excursion "/tmp"
89b5c60e 3379 (zero? (system* "python" "-c"
2efabc55 3380 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3381 (home-page "http://www.numpy.org/")
3382 (synopsis "Fundamental package for scientific computing with Python")
3383 (description "NumPy is the fundamental package for scientific computing
e881752c 3384with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3385object, sophisticated (broadcasting) functions, tools for integrating C/C++
3386and Fortran code, useful linear algebra, Fourier transform, and random number
3387capabilities.")
3f641af0 3388 (license license:bsd-3)))
0da98533
FB
3389
3390(define python2-numpy-bootstrap
3391 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3392
460fccd4 3393(define-public python-munch
3394 (package
3395 (name "python-munch")
3396 (version "2.0.4")
3397 (source
3398 (origin
3399 (method url-fetch)
3400 (uri (pypi-uri "munch" version))
3401 (sha256
3402 (base32
3403 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3404 (build-system python-build-system)
3405 (home-page "https://github.com/Infinidat/munch")
3406 (synopsis "Dot-accessible dictionary")
3407 (description "Munch is a dot-accessible dictionary similar to JavaScript
3408objects.")
3409 (license license:expat)))
3410
3411(define-public python2-munch
3412 (package-with-python2 python-munch))
3413
3a1bfe18
RW
3414(define-public python2-fastlmm
3415 (package
3416 (name "python2-fastlmm")
594358f5 3417 (version "0.2.26")
3a1bfe18
RW
3418 (source
3419 (origin
3420 (method url-fetch)
b074e7d4 3421 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3422 (sha256
3423 (base32
594358f5 3424 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3a1bfe18
RW
3425 (build-system python-build-system)
3426 (arguments
3427 `(#:python ,python-2)) ; only Python 2.7 is supported
3428 (propagated-inputs
3429 `(("python2-numpy" ,python2-numpy)
3430 ("python2-scipy" ,python2-scipy)
3431 ("python2-matplotlib" ,python2-matplotlib)
3432 ("python2-pandas" ,python2-pandas)
3433 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3434 ("python2-pysnptools" ,python2-pysnptools)))
3435 (native-inputs
3436 `(("unzip" ,unzip)
2efabc55 3437 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3438 ("python2-mock" ,python2-mock)
3439 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3440 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3441 (synopsis "Perform genome-wide association studies on large data sets")
3442 (description
3443 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3444Models, is a program for performing both single-SNP and SNP-set genome-wide
3445association studies (GWAS) on extremely large data sets.")
3f641af0 3446 (license license:asl2.0)))
3a1bfe18 3447
2ee8869a
FB
3448(define-public python-numpy
3449 (package (inherit python-numpy-bootstrap)
3450 (name "python-numpy")
3451 (outputs '("out" "doc"))
89b5c60e 3452 (inputs
b0aa6ede
HG
3453 `(("which" ,which)
3454 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3455 (propagated-inputs
3456 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3457 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3458 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3459 (native-inputs
3460 `(("pkg-config" ,pkg-config)
2efabc55
HG
3461 ("python-sphinx" ,python-sphinx)
3462 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3463 ("texlive" ,texlive)
3464 ("texinfo" ,texinfo)
3465 ("perl" ,perl)
3466 ,@(package-native-inputs python-numpy-bootstrap)))
3467 (arguments
89b5c60e 3468 `(,@(substitute-keyword-arguments
2ee8869a
FB
3469 (package-arguments python-numpy-bootstrap)
3470 ((#:phases phases)
3471 `(alist-cons-after
3472 'install 'install-doc
2efabc55
HG
3473 (lambda* (#:key inputs outputs #:allow-other-keys)
3474 ;; Make installed package available for building the
3475 ;; documentation
3476 (add-installed-pythonpath inputs outputs)
2ee8869a 3477 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3478 (doc (string-append
3479 data "/doc/" ,name "-"
2ee8869a
FB
3480 ,(package-version python-numpy-bootstrap)))
3481 (info (string-append data "/info"))
3482 (html (string-append doc "/html"))
3483 (pyver ,(string-append "PYVER=")))
3484 (with-directory-excursion "doc"
3485 (mkdir-p html)
3486 (system* "make" "html" pyver)
3487 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3488 (system* "make" "-C" "build/latex"
2ee8869a
FB
3489 "all-pdf" "PAPER=a4" pyver)
3490 ;; FIXME: Generation of the info file fails.
3491 ;; (system* "make" "info" pyver)
3492 ;; (mkdir-p info)
3493 ;; (copy-file "build/texinfo/numpy.info"
3494 ;; (string-append info "/numpy.info"))
3495 (for-each (lambda (file)
3496 (copy-file (string-append "build/latex" file)
3497 (string-append doc file)))
3498 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3499 (with-directory-excursion "build/html"
3500 (for-each (lambda (file)
3501 (let* ((dir (dirname file))
3502 (tgt-dir (string-append html "/" dir)))
3503 (unless (equal? "." dir)
3504 (mkdir-p tgt-dir))
96c46210 3505 (install-file file html)))
2ee8869a
FB
3506 (find-files "." ".*"))))))
3507 ,phases)))))))
3508
764c077b 3509(define-public python2-numpy
57b7b8cd 3510 (package-with-python2 python-numpy))
2ee8869a 3511
0151a8df 3512(define-public python-pygit2
3513 (package
3514 (name "python-pygit2")
022c9772 3515 (version "0.25.0")
0151a8df 3516 (source
3517 (origin
3518 (method url-fetch)
3519 (uri (pypi-uri "pygit2" version))
3520 (sha256
3521 (base32
022c9772 3522 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))))
0151a8df 3523 (build-system python-build-system)
3524 (propagated-inputs
3525 `(("python-six" ,python-six)
3526 ("python-cffi" ,python-cffi)
3527 ("libgit2" ,libgit2)
3528 ("python-tox" ,python-tox)))
3529 (home-page "https://github.com/libgit2/pygit2")
3530 (synopsis "Python bindings for libgit2")
3531 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3532library, libgit2 implements Git plumbing.")
3533 ;; GPL2.0 only, with linking exception.
3534 (license license:gpl2)))
3535
3536(define-public python2-pygit2
3537 (package-with-python2 python-pygit2))
3538
15bfe6d6
FB
3539(define-public python-pyparsing
3540 (package
3541 (name "python-pyparsing")
e0669289 3542 (version "2.0.3")
15bfe6d6
FB
3543 (source
3544 (origin
3545 (method url-fetch)
de67e922
LF
3546 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3547 "/pyparsing-" version
15bfe6d6
FB
3548 "/pyparsing-" version ".tar.gz"))
3549 (sha256
3550 (base32
e0669289 3551 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3552 (build-system python-build-system)
3553 (outputs '("out" "doc"))
3554 (arguments
3555 `(#:tests? #f ; no test target
3556 #:modules ((guix build python-build-system)
3557 (guix build utils))
3558 #:phases
3559 (alist-cons-after
3560 'install 'install-doc
3561 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3562 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3563 "/share/doc/" ,name "-" ,version))
3564 (html-doc (string-append doc "/html"))
3565 (examples (string-append doc "/examples")))
3566 (mkdir-p html-doc)
3567 (mkdir-p examples)
89b5c60e 3568 (for-each
15bfe6d6 3569 (lambda (dir tgt)
89b5c60e 3570 (map (lambda (file)
96c46210 3571 (install-file file tgt))
15bfe6d6
FB
3572 (find-files dir ".*")))
3573 (list "docs" "htmldoc" "examples")
3574 (list doc html-doc examples))))
3575 %standard-phases)))
3576 (home-page "http://pyparsing.wikispaces.com")
3577 (synopsis "Python parsing class library")
3578 (description
3579 "The pyparsing module is an alternative approach to creating and
3580executing simple grammars, vs. the traditional lex/yacc approach, or the use
3581of regular expressions. The pyparsing module provides a library of classes
3582that client code uses to construct the grammar directly in Python code.")
bd3fa666 3583 (license license:expat)))
15bfe6d6
FB
3584
3585(define-public python2-pyparsing
3586 (package-with-python2 python-pyparsing))
3587
ec00de35
FB
3588(define-public python-numpydoc
3589 (package
3590 (name "python-numpydoc")
3591 (version "0.5")
3592 (source
3593 (origin
3594 (method url-fetch)
89b5c60e 3595 (uri (string-append
ec00de35
FB
3596 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3597 version ".tar.gz"))
3598 (sha256
3599 (base32
5e4d8f67
AE
3600 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3601 (modules '((guix build utils)))
3602 (snippet
3603 '(begin
3604 ;; Drop a test requiring matplotlib, which we cannot add as an
3605 ;; input since it would create a circular dependency: Extend the
3606 ;; test for Python 3, where it is already dropped, to Python 2.
3607 (substitute* "numpydoc/tests/test_plot_directive.py"
3608 (("3") "2"))))))
ec00de35 3609 (build-system python-build-system)
fe4a8da4 3610 (propagated-inputs
213d1745
HG
3611 `(("python-sphinx" ,python-sphinx)))
3612 (native-inputs
3613 `(("python-nose" ,python-nose)))
ec00de35
FB
3614 (home-page "https://pypi.python.org/pypi/numpydoc")
3615 (synopsis
3616 "Numpy's Sphinx extensions")
3617 (description
3618 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3619 (license license:bsd-2)))
ec00de35
FB
3620
3621(define-public python2-numpydoc
5e4d8f67 3622 (package-with-python2 python-numpydoc))
1c65314c 3623
1e656049
RW
3624(define-public python-numexpr
3625 (package
3626 (name "python-numexpr")
2ee57340 3627 (version "2.6.1")
1e656049
RW
3628 (source
3629 (origin
3630 (method url-fetch)
26112c0a 3631 (uri (pypi-uri "numexpr" version))
1e656049
RW
3632 (sha256
3633 (base32
2ee57340 3634 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3635 (build-system python-build-system)
3636 (arguments `(#:tests? #f)) ; no tests included
3637 (propagated-inputs
3638 `(("python-numpy" ,python-numpy)))
3639 (home-page "https://github.com/pydata/numexpr")
3640 (synopsis "Fast numerical expression evaluator for NumPy")
3641 (description
3642 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3643expressions that operate on arrays are accelerated and use less memory than
3644doing the same calculation in Python. In addition, its multi-threaded
3645capabilities can make use of all your cores, which may accelerate
3646computations, most specially if they are not memory-bounded (e.g. those using
3647transcendental functions).")
f210e944 3648 (license license:expat)))
1e656049
RW
3649
3650(define-public python2-numexpr
f210e944 3651 (package-with-python2 python-numexpr))
1e656049 3652
1c65314c
FB
3653(define-public python-matplotlib
3654 (package
3655 (name "python-matplotlib")
1bbc659f 3656 (version "1.4.3")
1c65314c
FB
3657 (source
3658 (origin
3659 (method url-fetch)
de67e922
LF
3660 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3661 "/matplotlib-" version
1c65314c
FB
3662 "/matplotlib-" version ".tar.gz"))
3663 (sha256
3664 (base32
1bbc659f 3665 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3666 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3667 (build-system python-build-system)
3668 (outputs '("out" "doc"))
25f9a068
FB
3669 (propagated-inputs ; the following packages are all needed at run time
3670 `(("python-pyparsing" ,python-pyparsing)
3671 ("python-pygobject" ,python-pygobject)
3672 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3673 ("python-tkinter" ,python "tk")
22d7360b 3674 ("python-dateutil" ,python-dateutil)
ca33a3ad
HG
3675 ("python-numpy" ,python-numpy-bootstrap)
3676 ("python-pillow" ,python-pillow)
3677 ("python-pytz" ,python-pytz)
3678 ("python-six" ,python-six)
25f9a068
FB
3679 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3680 ;; from 'gtk+') provides the required 'typelib' files used by
3681 ;; 'gobject-introspection'. The location of these files is set with the
3682 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3683 ;; is done automatically by a 'native-search-path' procedure. However,
3684 ;; at run-time the user must set this variable as follows:
3685 ;;
3686 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3687 ("gtk+" ,gtk+)
3688 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3689 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3690 ;; object. For this reason we need to import both libraries.
3691 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3692 ("python-pycairo" ,python-pycairo)
3693 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3694 (inputs
ca33a3ad 3695 `(("libpng" ,libpng)
1c65314c
FB
3696 ("imagemagick" ,imagemagick)
3697 ("freetype" ,freetype)
25f9a068
FB
3698 ("cairo" ,cairo)
3699 ("glib" ,glib)
1c65314c 3700 ;; FIXME: Add backends when available.
1c65314c
FB
3701 ;("python-wxpython" ,python-wxpython)
3702 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3703 ("tcl" ,tcl)
3704 ("tk" ,tk)))
1c65314c
FB
3705 (native-inputs
3706 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3707 ("python-sphinx" ,python-sphinx)
3708 ("python-numpydoc" ,python-numpydoc)
3709 ("python-nose" ,python-nose)
3710 ("python-mock" ,python-mock)
1c65314c
FB
3711 ("texlive" ,texlive)
3712 ("texinfo" ,texinfo)))
3713 (arguments
3714 `(#:phases
25f9a068
FB
3715 (alist-cons-before
3716 'build 'configure-environment
3717 (lambda* (#:key outputs inputs #:allow-other-keys)
3718 (let ((cairo (assoc-ref inputs "cairo"))
3719 (gtk+ (assoc-ref inputs "gtk+")))
3720 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3721 ;; has not effect.
25f9a068
FB
3722 (setenv "LD_LIBRARY_PATH"
3723 (string-append cairo "/lib:" gtk+ "/lib"))
3724 (setenv "HOME" (getcwd))
3725 (call-with-output-file "setup.cfg"
3726 (lambda (port)
1bbc659f
FB
3727 (format port "[directories]~%
3728basedirlist = ~a,~a~%
57b7b8cd 3729 [rc_options]~%
1bbc659f
FB
3730backend = TkAgg~%"
3731 (assoc-ref inputs "tcl")
3732 (assoc-ref inputs "tk"))))))
25f9a068
FB
3733 (alist-cons-after
3734 'install 'install-doc
ca33a3ad 3735 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3736 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3737 (doc (string-append data "/doc/" ,name "-" ,version))
3738 (info (string-append data "/info"))
3739 (html (string-append doc "/html")))
ca33a3ad
HG
3740 ;; Make installed package available for building the
3741 ;; documentation
3742 (add-installed-pythonpath inputs outputs)
25f9a068 3743 (with-directory-excursion "doc"
25f9a068
FB
3744 ;; Produce pdf in 'A4' format.
3745 (substitute* (find-files "." "conf\\.py")
3746 (("latex_paper_size = 'letter'")
3747 "latex_paper_size = 'a4'"))
3748 (mkdir-p html)
3749 (mkdir-p info)
3750 ;; The doc recommends to run the 'html' target twice.
3751 (system* "python" "make.py" "html")
3752 (system* "python" "make.py" "html")
18b31516 3753 (copy-recursively "build/html" html)
25f9a068
FB
3754 (system* "python" "make.py" "latex")
3755 (system* "python" "make.py" "texinfo")
18b31516
FB
3756 (symlink (string-append html "/_images")
3757 (string-append info "/matplotlib-figures"))
3758 (with-directory-excursion "build/texinfo"
3759 (substitute* "matplotlib.texi"
3760 (("@image\\{([^,]*)" all file)
3761 (string-append "@image{matplotlib-figures/" file)))
3762 (symlink (string-append html "/_images")
3763 "./matplotlib-figures")
3764 (system* "makeinfo" "--no-split"
3765 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3766 (copy-file "build/texinfo/matplotlib.info"
3767 (string-append info "/matplotlib.info"))
3768 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3769 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3770 %standard-phases))))
1c65314c
FB
3771 (home-page "http://matplotlib.org")
3772 (synopsis "2D plotting library for Python")
3773 (description
3774 "Matplotlib is a Python 2D plotting library which produces publication
3775quality figures in a variety of hardcopy formats and interactive environments
3776across platforms. Matplotlib can be used in Python scripts, the python and
3777ipython shell, web application servers, and six graphical user interface
3778toolkits.")
3f641af0 3779 (license license:psfl)
57b7b8cd 3780 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3781
764c077b 3782(define-public python2-matplotlib
57b7b8cd
LC
3783 (let ((matplotlib (package-with-python2
3784 (strip-python2-variant python-matplotlib))))
764c077b 3785 (package (inherit matplotlib)
88c26834
AE
3786 ;; Make sure to use special packages for Python 2 instead
3787 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3788 (propagated-inputs
7ca0dbc3 3789 `(("python2-pycairo" ,python2-pycairo)
764c077b 3790 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3791 ("python2-tkinter" ,python-2 "tk")
3792 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3793 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3794
0dde6232
RW
3795(define-public python2-pysnptools
3796 (package
3797 (name "python2-pysnptools")
a800018e 3798 (version "0.3.9")
0dde6232
RW
3799 (source
3800 (origin
3801 (method url-fetch)
3f2e9675 3802 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3803 (sha256
3804 (base32
a800018e 3805 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3806 (build-system python-build-system)
3807 (arguments
3808 `(#:python ,python-2)) ; only Python 2.7 is supported
3809 (propagated-inputs
3810 `(("python2-numpy" ,python2-numpy)
3811 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3812 ("python2-pandas" ,python2-pandas)))
3813 (native-inputs
3814 `(("python2-cython" ,python2-cython)))
0dde6232 3815 (native-inputs
f3b98f4f 3816 `(("unzip" ,unzip)))
0dde6232
RW
3817 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3818 (synopsis "Library for reading and manipulating genetic data")
3819 (description
3820 "PySnpTools is a library for reading and manipulating genetic data. It
3821can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3822those files. It can also efficiently manipulate ranges of integers using set
3823operators such as union, intersection, and difference.")
3f641af0 3824 (license license:asl2.0)))
0dde6232 3825
c9b1b4f9
RW
3826(define-public python-rpy2
3827 (package
3828 (name "python-rpy2")
ec3bcbc7 3829 (version "2.7.6")
c9b1b4f9
RW
3830 (source
3831 (origin
3832 (method url-fetch)
ec3bcbc7 3833 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3834 (sha256
3835 (base32
ec3bcbc7 3836 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3837 (build-system python-build-system)
444464ec
MB
3838 (arguments
3839 '(#:phases
3840 (modify-phases %standard-phases
3841 (delete 'check)
3842 (add-after 'install 'check
3843 (lambda* (#:key outputs inputs #:allow-other-keys)
3844 ;; It's easier to run tests after install.
3845 ;; Make installed package available for running the tests
3846 (add-installed-pythonpath inputs outputs)
3847 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3848 (propagated-inputs
3849 `(("python-six" ,python-six)))
c9b1b4f9 3850 (inputs
482d9591 3851 `(("readline" ,readline)
c9b1b4f9
RW
3852 ("icu4c" ,icu4c)
3853 ("pcre" ,pcre)
3854 ("r" ,r)))
3855 (native-inputs
f3b98f4f 3856 `(("zlib" ,zlib)))
c9b1b4f9
RW
3857 (home-page "http://rpy.sourceforge.net/")
3858 (synopsis "Python interface to the R language")
3859 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3860low-level interface to R from Python, a proposed high-level interface,
3861including wrappers to graphical libraries, as well as R-like structures and
3862functions.")
3f641af0 3863 (license license:gpl3+)))
c9b1b4f9
RW
3864
3865(define-public python2-rpy2
3866 (let ((rpy2 (package-with-python2 python-rpy2)))
3867 (package (inherit rpy2)
3868 (native-inputs
3869 `(("python2-singledispatch" ,python2-singledispatch)
3870 ,@(package-native-inputs rpy2))))))
3871
bb986599
FB
3872(define-public python-scipy
3873 (package
3874 (name "python-scipy")
ba8a0824 3875 (version "0.16.0")
bb986599
FB
3876 (source
3877 (origin
3878 (method url-fetch)
de67e922
LF
3879; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3880 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3881 "/scipy-" version ".tar.xz"))
bb986599
FB
3882 (sha256
3883 (base32
ba8a0824 3884 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3885 (build-system python-build-system)
dd86c0d1 3886 (propagated-inputs
bb986599
FB
3887 `(("python-numpy" ,python-numpy)
3888 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3889 ("python-pyparsing" ,python-pyparsing)))
3890 (inputs
3891 `(("lapack" ,lapack)
719b01c1 3892 ("openblas" ,openblas)))
bb986599 3893 (native-inputs
dd86c0d1
RW
3894 `(("python-nose" ,python-nose)
3895 ("python-sphinx" ,python-sphinx)
5248d49e 3896 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3897 ("gfortran" ,gfortran)
bb986599
FB
3898 ("texlive" ,texlive)
3899 ("perl" ,perl)))
3900 (outputs '("out" "doc"))
3901 (arguments
3902 `(#:phases
3903 (alist-cons-before
719b01c1 3904 'build 'configure-openblas
bb986599 3905 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3906 (call-with-output-file "site.cfg"
3907 (lambda (port)
3908 (format port
3909 "[blas]
3910libraries = openblas
3911library_dirs = ~a/lib
3912include_dirs = ~a/include
d548e6aa
HG
3913
3914# backslash-n to make emacs happy
3915\n[atlas]
719b01c1
RW
3916library_dirs = ~a/lib
3917atlas_libs = openblas
3918"
3919 (assoc-ref inputs "openblas")
3920 (assoc-ref inputs "openblas")
3921 (assoc-ref inputs "openblas"))))
3922 #t)
bb986599
FB
3923 (alist-cons-after
3924 'install 'install-doc
d548e6aa 3925 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3926 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3927 (doc (string-append data "/doc/" ,name "-" ,version))
3928 (html (string-append doc "/html"))
3929 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3930 ;; Make installed package available for building the
3931 ;; documentation
3932 (add-installed-pythonpath inputs outputs)
bb986599 3933 (with-directory-excursion "doc"
bb986599
FB
3934 ;; Fix generation of images for mathematical expressions.
3935 (substitute* (find-files "source" "conf\\.py")
3936 (("pngmath_use_preview = True")
3937 "pngmath_use_preview = False"))
3938 (mkdir-p html)
3939 (system* "make" "html" pyver)
3940 (system* "make" "latex" "PAPER=a4" pyver)
3941 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3942 (copy-file "build/latex/scipy-ref.pdf"
3943 (string-append doc "/scipy-ref.pdf"))
3944 (with-directory-excursion "build/html"
3945 (for-each (lambda (file)
3946 (let* ((dir (dirname file))
3947 (tgt-dir (string-append html "/" dir)))
96c46210 3948 (install-file file html)))
bb986599
FB
3949 (find-files "." ".*"))))))
3950 ;; Tests can only be run after the library has been installed and not
3951 ;; within the source directory.
3952 (alist-cons-after
3953 'install 'check
89b5c60e 3954 (lambda _
bb986599
FB
3955 (with-directory-excursion "/tmp"
3956 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3957 (alist-delete
3958 'check
4f9ff21e
RW
3959 (alist-cons-after
3960 'unpack 'fix-tests
3961 (lambda _
3962 (substitute* "scipy/integrate/tests/test_quadpack.py"
3963 (("libm.so") "libm.so.6"))
3964 #t)
3965 %standard-phases)))))))
bb986599
FB
3966 (home-page "http://www.scipy.org/")
3967 (synopsis "The Scipy library provides efficient numerical routines")
3968 (description "The SciPy library is one of the core packages that make up
3969the SciPy stack. It provides many user-friendly and efficient numerical
3970routines such as routines for numerical integration and optimization.")
3f641af0 3971 (license license:bsd-3)))
bb986599 3972
764c077b 3973(define-public python2-scipy
57b7b8cd 3974 (package-with-python2 python-scipy))
bb986599 3975
73acc193 3976(define-public python-socksipy-branch
3977 (package
3978 (name "python-socksipy-branch")
3979 (version "1.01")
3980 (source
3981 (origin
3982 (method url-fetch)
3983 (uri (pypi-uri "SocksiPy-branch" version))
3984 (sha256
3985 (base32
3986 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3987 (build-system python-build-system)
3988 (arguments
3989 `(#:tests? #f)) ; There are no tests
3990 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3991 (synopsis "Python SOCKS module")
3992 (description
3993 "SocksiPy - A Python SOCKS client module. It provides a
3994socket-like interface that supports connections to any TCP
3995service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3996The original version was developed by Dan Haim, this is a
3997branch created by Mario Vilas to address some open issues,
3998as the original project seems to have been abandoned circa 2007.")
3999 (license license:bsd-3)))
4000
4001(define-public python2-socksipy-branch
4002 (package-with-python2 python-socksipy-branch))
4003
94914805
EB
4004(define-public python-sqlalchemy
4005 (package
4006 (name "python-sqlalchemy")
a4ba286b 4007 (version "1.0.12")
94914805
EB
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (string-append "https://pypi.python.org/packages/source/S/"
4012 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4013 (sha256
4014 (base32
a4ba286b 4015 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4016 (build-system python-build-system)
4017 (native-inputs
4018 `(("python-cython" ,python-cython) ;for c extensions
4019 ("python-pytest" ,python-pytest)
4020 ("python-mock" ,python-mock))) ;for tests
4021 (arguments
4022 `(#:phases (alist-replace
4023 'check
4024 (lambda _ (zero? (system* "py.test")))
4025 %standard-phases)))
4026 (home-page "http://www.sqlalchemy.org")
4027 (synopsis "Database abstraction library")
4028 (description
4029 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4030gives application developers the full power and flexibility of SQL. It
4031provides a full suite of well known enterprise-level persistence patterns,
4032designed for efficient and high-performing database access, adapted into a
4033simple and Pythonic domain language.")
3f641af0 4034 (license license:x11)))
94914805
EB
4035
4036(define-public python2-sqlalchemy
4037 (package-with-python2 python-sqlalchemy))
c937562e 4038
4a093330
DM
4039(define-public python-pycodestyle
4040 (package
4041 (name "python-pycodestyle")
4042 (version "2.0.0")
4043 (source
4044 (origin
4045 (method url-fetch)
4046 (uri (pypi-uri "pycodestyle" version))
4047 (sha256
4048 (base32
4049 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4050 (build-system python-build-system)
4051 (home-page "https://pycodestyle.readthedocs.io/")
4052 (synopsis "Python style guide checker")
4053 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4054Python code against some of the style conventions in
4055@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4056 (license license:expat)))
4a093330
DM
4057
4058(define-public python2-pycodestyle
f210e944 4059 (package-with-python2 python-pycodestyle))
b91912c4
DM
4060
4061(define-public python-orderedmultidict
4062 (package
4063 (name "python-orderedmultidict")
4064 (version "0.7.10")
4065 (source
4066 (origin
4067 (method url-fetch)
4068 (uri (pypi-uri "orderedmultidict" version))
4069 (sha256
4070 (base32
4071 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
4072 (build-system python-build-system)
4073 (arguments
4074 `(#:phases
4075 (modify-phases %standard-phases
4076 (add-after 'unpack 'fix-tests
4077 (lambda _
4078 ;; The package uses nosetest for running the tests.
4079 ;; Adding this initfile allows to run the test suite
4080 ;; without requiring nosetest.
4081 (zero? (system* "touch" "tests/__init__.py")))))))
4082 (propagated-inputs
4083 `(("python-six" ,python-six)))
4084 (native-inputs
4085 `(("python-pycodestyle" ,python-pycodestyle)))
4086 (home-page "https://github.com/gruns/orderedmultidict")
4087 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4088 (description "This package contains a library for ordered multivalue
4089dictionaries. A multivalue dictionary is a dictionary that can store
4090multiple values for the same key. An ordered multivalue dictionary is a
4091multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4092 (license license:unlicense)))
b91912c4
DM
4093
4094(define-public python2-orderedmultidict
f210e944 4095 (package-with-python2 python-orderedmultidict))
9dede065
DM
4096
4097(define-public python-furl
4098 (package
4099 (name "python-furl")
4100 (version "0.5.6")
4101 (source
4102 (origin
4103 (method url-fetch)
4104 (uri (pypi-uri "furl" version))
4105 (sha256
4106 (base32
4107 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4108 (build-system python-build-system)
4109 (propagated-inputs
4110 `(("python-six" ,python-six)
4111 ("python-orderedmultidict" ,python-orderedmultidict)))
4112 (native-inputs
4113 `(("python-pycodestyle" ,python-pycodestyle)))
4114 (home-page "https://github.com/gruns/furl")
4115 (synopsis "URL manipulation in Python")
4116 (description "Furl provides an easy-to-use alternative to the
4117@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4118 (license license:unlicense)))
9dede065
DM
4119
4120(define-public python2-furl
f210e944 4121 (package-with-python2 python-furl))
462bf271
DM
4122
4123(define-public python-flask-babel
4124 (package
4125 (name "python-flask-babel")
4126 (version "0.11.1")
4127 (source
4128 (origin
4129 (method url-fetch)
4130 (uri (pypi-uri "Flask-Babel" version))
4131 (sha256
4132 (base32
4133 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4134 (build-system python-build-system)
4135 (propagated-inputs
4136 `(("python-flask" ,python-flask)
4137 ("python-babel" ,python-babel)
4138 ("python-jinja2" ,python-jinja2)
4139 ("python-pytz" ,python-pytz)))
4140 (home-page "https://github.com/python-babel/flask-babel")
4141 (synopsis "Add i18n/l10n support to Flask applications")
4142 (description "This package implements internationalization and localization
4143support for Flask. This is based on the Python babel module as well as pytz -
4144both of which are installed automatically if you install this library.")
f210e944 4145 (license license:bsd-3)))
462bf271
DM
4146
4147(define-public python2-flask-babel
f210e944 4148 (package-with-python2 python-flask-babel))
4a093330 4149
de2966cf
EF
4150(define-public python-sqlalchemy-utils
4151 (package
4152 (name "python-sqlalchemy-utils")
bb4b1706 4153 (version "0.32.11")
de2966cf
EF
4154 (source
4155 (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "SQLAlchemy-Utils" version))
4158 (sha256
4159 (base32
bb4b1706 4160 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4161 (build-system python-build-system)
35d56b7b
MB
4162 (arguments
4163 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4164 ;; #:phases
4165 ;; (modify-phases %standard-phases
4166 ;; (replace 'check
4167 ;; (lambda _
4168 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4169 (propagated-inputs
de2966cf
EF
4170 `(("python-six" ,python-six)
4171 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4172 (native-inputs
22d7360b 4173 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4174 ("python-flexmock" ,python-flexmock)
4175 ("python-psycopg2" ,python-psycopg2)
4176 ("python-pytest" ,python-pytest)
4177 ("python-pytz" ,python-pytz)))
de2966cf
EF
4178 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4179 (synopsis "Various utility functions for SQLAlchemy")
4180 (description
4181 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4182for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4183
4184You might also want to install the following optional dependencies:
4185@enumerate
4186@item @code{python-passlib}
4187@item @code{python-babel}
4188@item @code{python-cryptography}
4189@item @code{python-pytz}
4190@item @code{python-psycopg2}
4191@item @code{python-furl}
4192@item @code{python-flask-babel}
4193@end enumerate
4194")
de2966cf
EF
4195 (license license:bsd-3)))
4196
4197(define-public python2-sqlalchemy-utils
f210e944 4198 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4199
af5a4602
CAW
4200(define-public python-alembic
4201 (package
4202 (name "python-alembic")
bb484529 4203 (version "0.8.7")
af5a4602
CAW
4204 (source
4205 (origin
4206 (method url-fetch)
4207 (uri (pypi-uri "alembic" version))
4208 (sha256
4209 (base32
bb484529 4210 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4211 (build-system python-build-system)
4212 (native-inputs
4213 `(("python-mock" ,python-mock)
4214 ("python-pytest-cov" ,python-pytest-cov)))
4215 (propagated-inputs
4216 `(("python-sqlalchemy" ,python-sqlalchemy)
4217 ("python-mako" ,python-mako)
4218 ("python-editor" ,python-editor)))
4219 (home-page "http://bitbucket.org/zzzeek/alembic")
4220 (synopsis
4221 "Database migration tool for SQLAlchemy")
4222 (description
4223 "Alembic is a lightweight database migration tool for usage with the
4224SQLAlchemy Database Toolkit for Python.")
f210e944 4225 (license license:expat)))
af5a4602
CAW
4226
4227(define-public python2-alembic
f210e944 4228 (package-with-python2 python-alembic))
af5a4602 4229
1671c07c
EB
4230(define-public python-distutils-extra
4231 (package
4232 (name "python-distutils-extra")
4233 (version "2.38")
4234 (source
4235 (origin
4236 (method url-fetch)
4237 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4238 version "/+download/python-distutils-extra-"
4239 version ".tar.gz"))
4240 (sha256
4241 (base32
4242 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4243 (build-system python-build-system)
1671c07c
EB
4244 (home-page "https://launchpad.net/python-distutils-extra/")
4245 (synopsis "Enhancements to Python's distutils")
4246 (description
4247 "The python-distutils-extra module enables you to easily integrate
4248gettext support, themed icons, and scrollkeeper-based documentation into
4249Python's distutils.")
3f641af0 4250 (license license:gpl2)))
1671c07c
EB
4251
4252(define-public python2-distutils-extra
4253 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4254
4255(define-public python2-elib.intl
4256 (package
4257 (name "python2-elib.intl")
4258 (version "0.0.3")
4259 (source
4260 (origin
4261 ;; This project doesn't tag releases or publish tarballs, so we take
4262 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4263 (method git-fetch)
4264 (uri (git-reference
4265 (url "https://github.com/dieterv/elib.intl.git")
4266 (commit "d09997cfef")))
4267 (sha256
4268 (base32
4269 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4270 (build-system python-build-system)
ea5456c8
EB
4271 (arguments
4272 ;; incompatible with Python 3 (exception syntax)
4273 `(#:python ,python-2
b41a05ce 4274 #:tests? #f))
ea5456c8
EB
4275 (home-page "https://github.com/dieterv/elib.intl")
4276 (synopsis "Enhanced internationalization for Python")
4277 (description
4278 "The elib.intl module provides enhanced internationalization (I18N)
4279services for your Python modules and applications.")
3f641af0 4280 (license license:lgpl3+)))
ea5456c8 4281
c937562e
EB
4282(define-public python-pillow
4283 (package
4284 (name "python-pillow")
aba5182c 4285 (version "3.3.3")
c937562e
EB
4286 (source
4287 (origin
4288 (method url-fetch)
f1d9231d 4289 (uri (pypi-uri "Pillow" version))
c937562e
EB
4290 (sha256
4291 (base32
aba5182c 4292 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4293 (build-system python-build-system)
4294 (native-inputs
f3b98f4f 4295 `(("python-nose" ,python-nose)))
c937562e 4296 (inputs
5ff408d9
SB
4297 `(("freetype" ,freetype)
4298 ("lcms" ,lcms)
c937562e
EB
4299 ("zlib" ,zlib)
4300 ("libjpeg" ,libjpeg)
4301 ("openjpeg" ,openjpeg)
5ff408d9
SB
4302 ("libtiff" ,libtiff)
4303 ("libwebp" ,libwebp)))
c937562e 4304 (arguments
e5358a6b 4305 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4306 (add-after
4307 'install 'check-installed
6151120a 4308 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4309 (begin
4310 (setenv "HOME" (getcwd))
6151120a
HG
4311 ;; Make installed package available for running the
4312 ;; tests
4313 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4314 (and (zero? (system* "python" "selftest.py"
4315 "--installed"))
4316 (zero? (system* "python" "test-installed.py"))))))
4317 (delete 'check))))
c937562e
EB
4318 (home-page "https://pypi.python.org/pypi/Pillow")
4319 (synopsis "Fork of the Python Imaging Library")
4320 (description
4321 "The Python Imaging Library adds image processing capabilities to your
4322Python interpreter. This library provides extensive file format support, an
4323efficient internal representation, and fairly powerful image processing
4324capabilities. The core image library is designed for fast access to data
4325stored in a few basic pixel formats. It should provide a solid foundation for
4326a general image processing tool.")
3f641af0 4327 (license (license:x11-style
c937562e
EB
4328 "http://www.pythonware.com/products/pil/license.htm"
4329 "The PIL Software License"))))
4330
4331(define-public python2-pillow
4332 (package-with-python2 python-pillow))
bb986599 4333
a415f036
FB
4334(define-public python-pycparser
4335 (package
4336 (name "python-pycparser")
5043b20d 4337 (version "2.17")
a415f036
FB
4338 (source
4339 (origin
4340 (method url-fetch)
38eb6919 4341 (uri (pypi-uri "pycparser" version))
a415f036
FB
4342 (sha256
4343 (base32
5043b20d 4344 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4345 (outputs '("out" "doc"))
4346 (build-system python-build-system)
4347 (native-inputs
f3b98f4f 4348 `(("pkg-config" ,pkg-config)))
a415f036 4349 (arguments
89b5c60e 4350 `(#:phases
819939cb
TGR
4351 (modify-phases %standard-phases
4352 (replace 'check
4353 (lambda _
4354 (with-directory-excursion "tests"
4355 (zero? (system* "python" "all_tests.py")))))
4356 (add-after 'install 'install-doc
4357 (lambda* (#:key outputs #:allow-other-keys)
4358 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4359 (doc (string-append data "/doc/" ,name "-" ,version))
4360 (examples (string-append doc "/examples")))
4361 (mkdir-p examples)
4362 (for-each (lambda (file)
4363 (copy-file (string-append "." file)
4364 (string-append doc file)))
4365 '("/README.rst" "/CHANGES" "/LICENSE"))
4366 (copy-recursively "examples" examples)))))))
a415f036
FB
4367 (home-page "https://github.com/eliben/pycparser")
4368 (synopsis "C parser in Python")
4369 (description
4370 "Pycparser is a complete parser of the C language, written in pure Python
4371using the PLY parsing library. It parses C code into an AST and can serve as
4372a front-end for C compilers or analysis tools.")
3f641af0 4373 (license license:bsd-3)))
a415f036
FB
4374
4375(define-public python2-pycparser
4376 (package-with-python2 python-pycparser))
57c3f716
FB
4377
4378(define-public python-cffi
4379 (package
4380 (name "python-cffi")
2d3a437c 4381 (version "1.4.2")
57c3f716
FB
4382 (source
4383 (origin
4384 (method url-fetch)
2d3a437c 4385 (uri (pypi-uri "cffi" version))
89b5c60e 4386 (sha256
2d3a437c 4387 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4388 (build-system python-build-system)
4389 (outputs '("out" "doc"))
4390 (inputs
4391 `(("libffi" ,libffi)))
4392 (propagated-inputs ; required at run-time
4393 `(("python-pycparser" ,python-pycparser)))
4394 (native-inputs
4395 `(("pkg-config" ,pkg-config)
4396 ("python-sphinx" ,python-sphinx)
f3b98f4f 4397 ("python-pytest" ,python-pytest)))
57c3f716 4398 (arguments
4179f952 4399 `(#:phases
57c3f716
FB
4400 (alist-cons-after
4401 'install 'install-doc
4402 (lambda* (#:key outputs #:allow-other-keys)
4403 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4404 (doc (string-append data "/doc/" ,name "-" ,version))
4405 (html (string-append doc "/html")))
4406 (with-directory-excursion "doc"
4407 (system* "make" "html")
4408 (mkdir-p html)
4409 (copy-recursively "build/html" html))
4410 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4411 %standard-phases)))
4412 (home-page "http://cffi.readthedocs.org")
4413 (synopsis "Foreign function interface for Python")
4414 (description
4415 "Foreign Function Interface for Python calling C code.")
bd3fa666 4416 (license license:expat)))
57c3f716
FB
4417
4418(define-public python2-cffi
4419 (package-with-python2 python-cffi))
6fa14469
FB
4420
4421(define-public python-xcffib
4422 (package
4423 (name "python-xcffib")
4424 (version "0.1.9")
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (string-append "https://pypi.python.org/packages/source/x/"
4429 "xcffib/xcffib-" version ".tar.gz"))
4430 (sha256
4431 (base32
4432 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4433 (build-system python-build-system)
4434 (inputs
482d9591 4435 `(("libxcb" ,libxcb)))
6fa14469 4436 (propagated-inputs
482d9591
HG
4437 `(("python-cffi" ,python-cffi) ; used at run time
4438 ("python-six" ,python-six)))
6fa14469 4439 (arguments
e2816ac7
MB
4440 `(;; FIXME: Tests cannot load libxcb.so.1
4441 #:tests? #f
4442 #:phases
c8cd850c
MB
4443 (modify-phases %standard-phases
4444 (add-after 'install 'install-doc
4445 (lambda* (#:key outputs #:allow-other-keys)
4446 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4447 "/doc/" ,name "-" ,version)))
4448 (mkdir-p doc)
4449 (copy-file "README.md"
4450 (string-append doc "/README.md"))
4451 #t))))))
6fa14469
FB
4452 (home-page "https://github.com/tych0/xcffib")
4453 (synopsis "XCB Python bindings")
4454 (description
4455 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4456support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4457 (license license:expat)))
6fa14469
FB
4458
4459(define-public python2-xcffib
4460 (package-with-python2 python-xcffib))
4461
9e099723
FB
4462(define-public python-cairocffi
4463 (package
4464 (name "python-cairocffi")
4465 (version "0.6")
4466 (source
4467 (origin
4468 (method url-fetch)
4469 ;; The archive on pypi is missing the 'utils' directory!
4470 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4471 version ".tar.gz"))
f586c877 4472 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4473 (sha256
4474 (base32
4475 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4476 (build-system python-build-system)
4477 (outputs '("out" "doc"))
4478 (inputs
4479 `(("gdk-pixbuf" ,gdk-pixbuf)
4480 ("cairo" ,cairo)))
4481 (native-inputs
4482 `(("pkg-config" ,pkg-config)
4483 ("python-sphinx" ,python-sphinx)
f3b98f4f 4484 ("python-docutils" ,python-docutils)))
9e099723
FB
4485 (propagated-inputs
4486 `(("python-xcffib" ,python-xcffib))) ; used at run time
4487 (arguments
a792e1aa
MB
4488 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4489 #:tests? #f
4490 #:phases
6734c7ba
MB
4491 (modify-phases %standard-phases
4492 (add-after 'install 'install-doc
4493 (lambda* (#:key inputs outputs #:allow-other-keys)
4494 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4495 (doc (string-append data "/doc/" ,name "-" ,version))
4496 (html (string-append doc "/html")))
4497 (setenv "LD_LIBRARY_PATH"
4498 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4499 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4500 (setenv "LANG" "en_US.UTF-8")
4501 (mkdir-p html)
4502 (for-each (lambda (file)
4503 (copy-file (string-append "." file)
4504 (string-append doc file)))
4505 '("/README.rst" "/CHANGES" "/LICENSE"))
4506 (system* "python" "setup.py" "build_sphinx")
4507 (copy-recursively "docs/_build/html" html)
4508 #t))))))
9e099723
FB
4509 (home-page "https://github.com/SimonSapin/cairocffi")
4510 (synopsis "Python bindings and object-oriented API for Cairo")
4511 (description
4512 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4513Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4514graphics library with support for multiple backends including image buffers,
4515PNG, PostScript, PDF, and SVG file output.")
3f641af0 4516 (license license:bsd-3)))
9e099723
FB
4517
4518(define-public python2-cairocffi
4519 (package-with-python2 python-cairocffi))
4520
3cff95cb
RW
4521(define-public python-decorator
4522 (package
4523 (name "python-decorator")
d79fa7da 4524 (version "4.0.10")
3cff95cb
RW
4525 (source
4526 (origin
4527 (method url-fetch)
e21338be 4528 (uri (pypi-uri "decorator" version))
3cff95cb 4529 (sha256
d79fa7da 4530 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4531 (build-system python-build-system)
4532 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4533 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4534 (synopsis "Python module to simplify usage of decorators")
4535 (description
4536 "The aim of the decorator module is to simplify the usage of decorators
4537for the average programmer, and to popularize decorators usage giving examples
4538of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4539etc. The core of this module is a decorator factory.")
4540 (license license:expat)))
4541
4542(define-public python2-decorator
4543 (package-with-python2 python-decorator))
4544
2c0499ad
RW
4545(define-public python-drmaa
4546 (package
4547 (name "python-drmaa")
4548 (version "0.7.6")
4549 (source
4550 (origin
4551 (method url-fetch)
4552 (uri (string-append
4553 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4554 version ".tar.gz"))
4555 (sha256
4556 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4557 (build-system python-build-system)
4558 ;; The test suite requires libdrmaa which is provided by the cluster
4559 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4560 ;; should be set to the path of the libdrmaa library.
4561 (arguments '(#:tests? #f))
4562 (native-inputs
f3b98f4f 4563 `(("python-nose" ,python-nose)))
2c0499ad
RW
4564 (home-page "https://pypi.python.org/pypi/drmaa")
4565 (synopsis "Python bindings for the DRMAA library")
4566 (description
4567 "A Python package for Distributed Resource Management (DRM) job
4568submission and control. This package is an implementation of the DRMAA 1.0
4569Python language binding specification.")
3f641af0 4570 (license license:bsd-3)))
2c0499ad
RW
4571
4572(define-public python2-drmaa
4573 (package-with-python2 python-drmaa))
4574
d05c6da0
RW
4575(define-public python-gridmap
4576 (package
4577 (name "python-gridmap")
4578 (version "0.13.0")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (string-append
4583 "https://github.com/pygridtools/gridmap/archive/v"
4584 version ".tar.gz"))
4585 (file-name (string-append name "-" version ".tar.gz"))
4586 (sha256
4587 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4588 (build-system python-build-system)
ad348f9f
MB
4589 (arguments
4590 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4591 (propagated-inputs
d05c6da0
RW
4592 `(("python-psutil" ,python-psutil)
4593 ("python-drmaa" ,python-drmaa)
4594 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4595 (home-page "https://github.com/pygridtools/gridmap")
4596 (synopsis "Create jobs on a cluster directly from Python")
4597 (description
4598 "Gridmap is a Python package to allow you to easily create jobs on the
4599cluster directly from Python. You can directly map Python functions onto the
4600cluster without needing to write any wrapper code yourself.")
3f641af0 4601 (license license:gpl3+)))
d05c6da0
RW
4602
4603(define-public python2-gridmap
4604 (package-with-python2 python-gridmap))
4605
cb6d5c54
RW
4606(define-public python-pexpect
4607 (package
4608 (name "python-pexpect")
ed118043 4609 (version "4.2.1")
cb6d5c54
RW
4610 (source
4611 (origin
4612 (method url-fetch)
ed118043 4613 (uri (pypi-uri "pexpect" version))
cb6d5c54 4614 (sha256
ed118043 4615 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4616 (build-system python-build-system)
4617 (arguments
4618 `(#:phases
4619 (modify-phases %standard-phases
ed118043
MB
4620 (add-before 'check 'prepare-tests
4621 (lambda _
4622 (substitute* (find-files "tests")
4623 (("/bin/ls") (which "ls"))
4624 (("/bin/echo") (which "echo"))
4625 (("/bin/which") (which "which"))
4626 ;; Many tests try to use the /bin directory which
4627 ;; is not present in the build environment.
4628 ;; Use one that's non-empty and unlikely to change.
4629 (("/bin'") "/dev'"))
4630 ;; XXX: Socket connection test gets "Connection reset by peer".
4631 ;; Why does it not work? Delete for now.
4632 (delete-file "tests/test_socket.py")
4633 #t))
cb6d5c54
RW
4634 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4635 (native-inputs
ed118043
MB
4636 `(("python-nose" ,python-nose)
4637 ("python-pytest" ,python-pytest)
4638 ("man-db" ,man-db)
4639 ("which" ,which)))
4640 (propagated-inputs
4641 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4642 (home-page "http://pexpect.readthedocs.org/")
4643 (synopsis "Controlling interactive console applications")
4644 (description
4645 "Pexpect is a pure Python module for spawning child applications;
4646controlling them; and responding to expected patterns in their output.
4647Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4648child application and control it as if a human were typing commands.")
3f641af0 4649 (license license:isc)))
cb6d5c54
RW
4650
4651(define-public python2-pexpect
4652 (package-with-python2 python-pexpect))
4653
229ad120
RW
4654(define-public python-setuptools-scm
4655 (package
4656 (name "python-setuptools-scm")
42d6d0d0 4657 (version "1.11.1")
229ad120
RW
4658 (source (origin
4659 (method url-fetch)
383af6b0 4660 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4661 (sha256
4662 (base32
42d6d0d0 4663 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4664 (build-system python-build-system)
4665 (home-page "https://github.com/pypa/setuptools_scm/")
4666 (synopsis "Manage Python package versions in SCM metadata")
4667 (description
383af6b0 4668 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4669@dfn{software configuration management} (SCM) metadata instead of declaring
4670them as the version argument or in a SCM managed file.")
4671 (license license:expat)))
4672
4673(define-public python2-setuptools-scm
4674 (package-with-python2 python-setuptools-scm))
4675
b74270ee
RW
4676(define-public python-pathpy
4677 (package
4678 (name "python-pathpy")
4679 (version "8.1.1")
4680 (source
4681 (origin
4682 (method url-fetch)
4683 (uri (string-append "https://pypi.python.org/packages/source/p/"
4684 "path.py/path.py-" version ".tar.gz"))
4685 (sha256
4686 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4687 (outputs '("out" "doc"))
b74270ee
RW
4688 (build-system python-build-system)
4689 (propagated-inputs
4690 `(("python-appdirs" ,python-appdirs)))
4691 (native-inputs
f3b98f4f 4692 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4693 ("python-sphinx" ,python-sphinx)
4694 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4695 ("python-pytest" ,python-pytest)
4696 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4697 (arguments
4698 `(#:phases
4699 (modify-phases %standard-phases
4700 (add-after 'build 'build-doc
4701 (lambda _
4702 (setenv "LANG" "en_US.UTF-8")
4703 (zero? (system* "python" "setup.py" "build_sphinx"))))
4704 (add-after 'install 'install-doc
4705 (lambda* (#:key outputs #:allow-other-keys)
4706 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4707 (doc (string-append data "/doc/" ,name "-" ,version))
4708 (html (string-append doc "/html")))
4709 (mkdir-p html)
4710 (for-each (lambda (file)
4711 (copy-file file (string-append doc "/" file)))
4712 '("README.rst" "CHANGES.rst"))
4713 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4714 (home-page "http://github.com/jaraco/path.py")
4715 (synopsis "Python module wrapper for built-in os.path")
4716 (description
4717 "@code{path.py} implements path objects as first-class entities, allowing
4718common operations on files to be invoked on those path objects directly.")
4719 (license license:expat)))
4720
4721(define-public python2-pathpy
4722 (package-with-python2 python-pathpy))
4723
0d34e01b
RW
4724(define-public python-pickleshare
4725 (package
4726 (name "python-pickleshare")
4727 (version "0.5")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 (uri (string-append "https://pypi.python.org/packages/source/p/"
4732 "pickleshare/pickleshare-" version ".tar.gz"))
4733 (sha256
4734 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4735 (build-system python-build-system)
4736 (propagated-inputs
4737 `(("python-pathpy" ,python-pathpy)))
4738 (home-page "https://github.com/vivainio/pickleshare")
4739 (synopsis "Tiny key value database with concurrency support")
4740 (description
4741 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4742Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4743shelve, many processes can access the database simultaneously. Changing a
4744value in database is immediately visible to other processes accessing the same
4745database. Concurrency is possible because the values are stored in separate
4746files. Hence the “database” is a directory where all files are governed by
4747PickleShare.")
4748 (license license:expat)))
4749
4750(define-public python2-pickleshare
4751 (package-with-python2 python-pickleshare))
4752
cd6e5189
RW
4753(define-public python-simplegeneric
4754 (package
4755 (name "python-simplegeneric")
4756 (version "0.8.1")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri (string-append "https://pypi.python.org/packages/source/s/"
4761 "simplegeneric/simplegeneric-" version ".zip"))
4762 (sha256
4763 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4764 (build-system python-build-system)
4765 (native-inputs
f3b98f4f 4766 `(("unzip" ,unzip)))
cd6e5189
RW
4767 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4768 (synopsis "Python module for simple generic functions")
4769 (description
4770 "The simplegeneric module lets you define simple single-dispatch generic
4771functions, akin to Python’s built-in generic functions like @code{len()},
4772@code{iter()} and so on. However, instead of using specially-named methods,
4773these generic functions use simple lookup tables, akin to those used by
4774e.g. @code{pickle.dump()} and other generic functions found in the Python
4775standard library.")
3f641af0 4776 (license license:zpl2.1)))
cd6e5189
RW
4777
4778(define-public python2-simplegeneric
4779 (package-with-python2 python-simplegeneric))
4780
ddc7d8ed 4781(define-public python-ipython-genutils
c4abbac3 4782 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4783 (package
4784 (name "python-ipython-genutils")
4785 (version "0.1.0")
4786 (source
4787 (origin
4788 (method url-fetch)
4789 (uri (string-append "https://pypi.python.org/packages/source/i/"
4790 "ipython_genutils/ipython_genutils-"
4791 version ".tar.gz"))
4792 (sha256
4793 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4794 (build-system python-build-system)
4795 (arguments `(#:tests? #f)) ; no tests
4796 (home-page "http://ipython.org")
4797 (synopsis "Vestigial utilities from IPython")
4798 (description
c4abbac3
HG
4799 "This package provides retired utilities from IPython. No packages
4800outside IPython/Jupyter should depend on it.
4801
4802This package shouldn't exist. It contains some common utilities shared by
4803Jupyter and IPython projects during The Big Split. As soon as possible, those
4804packages will remove their dependency on this, and this package will go
4805away.")
3f641af0 4806 (license license:bsd-3)))
ddc7d8ed
RW
4807
4808(define-public python2-ipython-genutils
4809 (package-with-python2 python-ipython-genutils))
4810
2b10eb48
RW
4811(define-public python-traitlets
4812 (package
4813 (name "python-traitlets")
a5ba1481 4814 (version "4.2.0")
2b10eb48
RW
4815 (source
4816 (origin
4817 (method url-fetch)
cc0c4fde 4818 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4819 (sha256
4820 (base32
a5ba1481 4821 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4822 (build-system python-build-system)
4823 (arguments
4824 `(#:phases
4825 (modify-phases %standard-phases
4826 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4827 (propagated-inputs
4828 `(("python-ipython-genutils" ,python-ipython-genutils)
4829 ("python-decorator" ,python-decorator)))
4830 (native-inputs
cc0c4fde
EF
4831 `(("python-mock" ,python-mock)
4832 ("python-nose" ,python-nose)))
2b10eb48
RW
4833 (home-page "http://ipython.org")
4834 (synopsis "Configuration system for Python applications")
4835 (description
4836 "Traitlets is a framework that lets Python classes have attributes with
4837type checking, dynamically calculated default values, and ‘on change’
4838callbacks. The package also includes a mechanism to use traitlets for
4839configuration, loading values from files or from command line arguments. This
4840is a distinct layer on top of traitlets, so you can use traitlets in your code
4841without using the configuration machinery.")
3f641af0 4842 (license license:bsd-3)))
2b10eb48
RW
4843
4844(define-public python2-traitlets
4845 (package-with-python2 python-traitlets))
4846
4263b06f
RW
4847(define-public python-jupyter-core
4848 (package
4849 (name "python-jupyter-core")
45cc957c 4850 (version "4.2.1")
4263b06f
RW
4851 (source
4852 (origin
4853 (method url-fetch)
4854 (uri (string-append (pypi-uri "jupyter_core" version)))
4855 (sha256
4856 (base32
45cc957c 4857 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
4858 (build-system python-build-system)
4859 ;; FIXME: not sure how to run the tests
4860 (arguments `(#:tests? #f))
4861 (propagated-inputs
4862 `(("python-traitlets" ,python-traitlets)))
4863 (home-page "http://jupyter.org/")
4864 (synopsis "Jupyter base package")
4865 (description
4866 "Jupyter core is the base package on which Jupyter projects rely.")
4867 (license license:bsd-3)))
4868
4869(define-public python2-jupyter-core
4870 (package-with-python2 python-jupyter-core))
4871
9ff01f2d
RW
4872(define-public python-jupyter-client
4873 (package
4874 (name "python-jupyter-client")
4875 (version "4.4.0")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "jupyter_client" version))
4880 (sha256
4881 (base32
4882 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4883 (build-system python-build-system)
4884 ;; Tests fail because of missing native python kernel which I assume is
4885 ;; provided by the ipython package, which we cannot use because it would
4886 ;; cause a dependency cycle.
4887 (arguments `(#:tests? #f))
4888 (propagated-inputs
4889 `(("python-pyzmq" ,python-pyzmq)
4890 ("python-traitlets" ,python-traitlets)
4891 ("python-jupyter-core" ,python-jupyter-core)))
4892 (home-page "http://jupyter.org/")
4893 (synopsis "Jupyter protocol implementation and client libraries")
4894 (description
4895 "The @code{jupyter_client} package contains the reference implementation
4896of the Jupyter protocol. It also provides client and kernel management APIs
4897for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4898installing @code{kernelspec}s for use with Jupyter frontends.")
4899 (license license:bsd-3)))
4900
4901(define-public python2-jupyter-client
4902 (package-with-python2 python-jupyter-client))
4903
ab526102
RW
4904(define-public python-ipykernel
4905 (package
4906 (name "python-ipykernel")
f165648e 4907 (version "4.5.2")
ab526102
RW
4908 (source
4909 (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "ipykernel" version))
4912 (sha256
f165648e 4913 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
4914 (build-system python-build-system)
4915 ;; The tests load a submodule of IPython. However, IPython itself depends
4916 ;; on ipykernel.
4917 (arguments `(#:tests? #f))
4918 (propagated-inputs
4919 ;; imported at runtime during connect
4920 `(("python-jupyter-client" ,python-jupyter-client)))
4921 (home-page "http://ipython.org")
4922 (synopsis "IPython Kernel for Jupyter")
4923 (description
4924 "This package provides the IPython kernel for Jupyter.")
4925 (license license:bsd-3)))
4926
4927(define-public python2-ipykernel
4928 (package-with-python2 python-ipykernel))
4929
5ff6effc
RW
4930(define-public python-testpath
4931 (package
4932 (name "python-testpath")
4933 (version "0.2")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4938 version ".tar.gz"))
4939 (file-name (string-append name "-" version ".tar.gz"))
4940 (sha256
4941 (base32
4942 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4943 (build-system python-build-system)
4944 (arguments
4945 `(#:tests? #f ; this package does not even have a setup.py
4946 #:phases
4947 (modify-phases %standard-phases
4948 (delete 'install)
4949 (replace 'build
4950 (lambda* (#:key inputs outputs #:allow-other-keys)
4951 (let ((dir (string-append
4952 (assoc-ref outputs "out")
4953 "/lib/python"
4954 (string-take (string-take-right
4955 (assoc-ref inputs "python") 5) 3)
4956 "/site-packages/testpath")))
4957 (mkdir-p dir)
4958 (copy-recursively "testpath" dir))
4959 #t)))))
4960 (home-page "https://github.com/takluyver/testpath")
4961 (synopsis "Test utilities for code working with files and commands")
4962 (description
4963 "Testpath is a collection of utilities for Python code working with files
4964and commands. It contains functions to check things on the filesystem, and
4965tools for mocking system commands and recording calls to those.")
4966 (license license:expat)))
4967
4968(define-public python2-testpath
4969 (package-with-python2 python-testpath))
4970
ae1ab9fe
FB
4971(define-public python-ipython
4972 (package
4973 (name "python-ipython")
4dbc8ec4 4974 (version "4.0.3")
ae1ab9fe
FB
4975 (source
4976 (origin
fceac880 4977 (method url-fetch)
accd5f99 4978 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4979 (sha256
4dbc8ec4 4980 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4981 (build-system python-build-system)
4982 (outputs '("out" "doc"))
3a0b1b9a
FB
4983 (propagated-inputs
4984 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4985 ("python-terminado" ,python-terminado)
ae1ab9fe 4986 ("python-matplotlib" ,python-matplotlib)
5d26e542 4987 ("python-numpy" ,python-numpy)
ae1ab9fe 4988 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4989 ("python-jinja2" ,python-jinja2)
4990 ("python-mistune" ,python-mistune)
accd5f99
RW
4991 ("python-pexpect" ,python-pexpect)
4992 ("python-pickleshare" ,python-pickleshare)
4993 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4994 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4995 ("python-traitlets" ,python-traitlets)
4996 ("python-ipykernel" ,python-ipykernel)
4997 ("python-pygments" ,python-pygments)))
4998 (inputs
4999 `(("readline" ,readline)
5000 ("which" ,which)))
ae1ab9fe
FB
5001 (native-inputs
5002 `(("pkg-config" ,pkg-config)
accd5f99
RW
5003 ("python-requests" ,python-requests) ;; for tests
5004 ("python-testpath" ,python-testpath)
5005 ("python-nose" ,python-nose)
ae1ab9fe
FB
5006 ("python-sphinx" ,python-sphinx)
5007 ("texlive" ,texlive)
f3b98f4f 5008 ("texinfo" ,texinfo)))
ae1ab9fe 5009 (arguments
89b5c60e 5010 `(#:phases
3a0b1b9a
FB
5011 (modify-phases %standard-phases
5012 (add-after
5013 'install 'install-doc
5014 (lambda* (#:key inputs outputs #:allow-other-keys)
5015 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5016 (doc (string-append data "/doc/" ,name "-" ,version))
5017 (html (string-append doc "/html"))
5018 (man1 (string-append data "/man/man1"))
5019 (info (string-append data "/info"))
5020 (examples (string-append doc "/examples")))
afd3d931 5021 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5022 ;; Make installed package available for running the tests
5023 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5024 (with-directory-excursion "docs"
accd5f99
RW
5025 ;; FIXME: pdf fails to build
5026 ;;(system* "make" "pdf" "PAPER=a4")
5027 (system* "make" "html")
3a0b1b9a
FB
5028 (system* "make" "info"))
5029 (copy-recursively "docs/man" man1)
5030 (copy-recursively "examples" examples)
accd5f99 5031 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5032 ;; (copy-file "docs/build/latex/ipython.pdf"
5033 ;; (string-append doc "/ipython.pdf"))
5034 (mkdir-p info)
5035 (copy-file "docs/build/texinfo/ipython.info"
5036 (string-append info "/ipython.info"))
5037 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5038 ;; Tests can only be run after the library has been installed and not
5039 ;; within the source directory.
5040 (delete 'check)
5041 (add-after
5042 'install 'check
eee5cd04 5043 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5044 (if tests?
5045 (with-directory-excursion "/tmp"
eee5cd04
HG
5046 ;; Make installed package available for running the tests
5047 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5048 (setenv "HOME" "/tmp/") ;; required by a test
5049 (zero? (system* (string-append (assoc-ref outputs "out")
5050 "/bin/iptest"))))
5051 #t)))
5052 (add-before
5053 'install 'fix-tests
5054 (lambda* (#:key inputs #:allow-other-keys)
5055 (substitute* "./IPython/utils/_process_posix.py"
5056 (("/usr/bin/env', 'which") (which "which")))
5057 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5058 (("#!/usr/bin/env python")
5059 (string-append "#!" (which "python"))))
5060 ;; Disable 1 failing test
5061 (substitute* "./IPython/core/tests/test_magic.py"
5062 (("def test_dirops\\(\\):" all)
5063 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5064 (home-page "http://ipython.org")
5065 (synopsis "IPython is a tool for interactive computing in Python")
5066 (description
5067 "IPython provides a rich architecture for interactive computing with:
5068Powerful interactive shells, a browser-based notebook, support for interactive
5069data visualization, embeddable interpreters and tools for parallel
5070computing.")
135ba811
EF
5071 (license license:bsd-3)
5072 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5073
5074(define-public python2-ipython
135ba811 5075 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5076 (package
5077 (inherit ipython)
5078 ;; FIXME: some tests are failing
5079 (arguments
5080 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 5081 ;; FIXME: add pyreadline once available.
e62600fe 5082 (native-inputs
135ba811 5083 `(("python2-mock" ,python2-mock)
77a6932a 5084 ,@(package-native-inputs ipython))))))
03411993
AE
5085
5086(define-public python-isodate
5087 (package
5088 (name "python-isodate")
b6785c2e 5089 (version "0.5.4")
03411993
AE
5090 (source
5091 (origin
5092 (method url-fetch)
b6785c2e 5093 (uri (pypi-uri "isodate" version))
03411993
AE
5094 (sha256
5095 (base32
b6785c2e 5096 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5097 (build-system python-build-system)
03411993
AE
5098 (home-page
5099 "http://cheeseshop.python.org/pypi/isodate")
5100 (synopsis
5101 "Python date parser and formatter")
5102 (description
5103 "Python-isodate is a python module for parsing and formatting
5104ISO 8601 dates, time and duration.")
3f641af0 5105 (license license:bsd-3)))
03411993
AE
5106
5107(define-public python2-isodate
5108 (package-with-python2 python-isodate))
673ab897
AE
5109
5110(define-public python-html5lib
5111 (package
5112 (name "python-html5lib")
a14061aa 5113 (version "1.0b10")
673ab897
AE
5114 (source
5115 (origin
5116 (method url-fetch)
fee04c19 5117 (uri (pypi-uri "html5lib" version))
673ab897
AE
5118 (sha256
5119 (base32
a14061aa 5120 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5121 (build-system python-build-system)
3dd75476 5122 (propagated-inputs
4eb6ed28
MB
5123 `(("python-six" ,python-six)
5124 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5125 (arguments
5126 `(#:test-target "check"))
5127 (home-page
5128 "https://github.com/html5lib/html5lib-python")
5129 (synopsis
5130 "Python HTML parser based on the WHATWG HTML specifcation")
5131 (description
5132 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5133and written in Python.")
bd3fa666 5134 (license license:expat)))
673ab897
AE
5135
5136(define-public python2-html5lib
5137 (package-with-python2 python-html5lib))
e99f4211 5138
8ee62c97
RW
5139;; Needed for python-bleach, a dependency of python-notebook
5140(define-public python-html5lib-0.9
5141 (package
5142 (inherit python-html5lib)
5143 (version "0.999")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (pypi-uri "html5lib" version))
5148 (sha256
5149 (base32
5150 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5151
5152(define-public python2-html5lib-0.9
5153 (package-with-python2 python-html5lib-0.9))
5154
adbca19e
MB
5155(define-public python-webencodings
5156 (package
5157 (name "python-webencodings")
5158 (version "0.5")
5159 (source (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "webencodings" version))
5162 (sha256
5163 (base32
5164 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5165 (build-system python-build-system)
5166 (arguments
5167 '(#:phases
5168 (modify-phases %standard-phases
5169 (replace 'check
5170 (lambda _
5171 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5172 (native-inputs
5173 `(("python-pytest" ,python-pytest)))
5174 (home-page "https://github.com/SimonSapin/python-webencodings")
5175 (synopsis "Character encoding aliases for legacy web content")
5176 (description
5177 "In order to be compatible with legacy web content when interpreting
5178something like @code{Content-Type: text/html; charset=latin1}, tools need
5179to use a particular set of aliases for encoding labels as well as some
5180overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5181the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5182or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5183The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5184defines all such details so that implementations do not have to
5185reverse-engineer each other.
5186
5187This module implements the Encoding standard and has encoding labels and
5188BOM detection, but the actual implementation for encoders and decoders
5189is Python’s.")
5190 (license license:bsd-3)))
5191
5192(define-public python2-webencodings
5193 (package-with-python2 python-webencodings))
5194
e99f4211
MW
5195(define-public python-urwid
5196 (package
5197 (name "python-urwid")
51ff41f6 5198 (version "1.3.1")
e99f4211
MW
5199 (source
5200 (origin
5201 (method url-fetch)
b97c1bfd 5202 (uri (pypi-uri "urwid" version))
e99f4211
MW
5203 (sha256
5204 (base32
51ff41f6 5205 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5206 (build-system python-build-system)
b97c1bfd
LF
5207 (arguments
5208 `(#:phases
5209 (modify-phases %standard-phases
5210 ;; Disable failing test. Bug filed upstream:
5211 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5212 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5213 (add-after 'unpack 'disable-failing-test
5214 (lambda _
5215 (substitute* "urwid/tests/test_event_loops.py"
5216 (("test_remove_watch_file")
5217 "disable_remove_watch_file")))))))
e99f4211
MW
5218 (home-page "http://urwid.org")
5219 (synopsis "Console user interface library for Python")
5220 (description
5221 "Urwid is a curses-based UI/widget library for Python. It includes many
5222features useful for text console applications.")
3f641af0 5223 (license license:lgpl2.1+)))
e99f4211
MW
5224
5225(define-public python2-urwid
5226 (package-with-python2 python-urwid))
d95a56c6 5227
3ef00f56 5228(define-public python2-openid
5229 (package
5230 (name "python2-openid")
5231 (version "2.2.5")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "python-openid" version))
5236 (sha256
5237 (base32
5238 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5239 (build-system python-build-system)
5240 (arguments
5241 ;; Python 3 support is in `python3-openid`, a separate package.
5242 `(#:python ,python-2))
5243 (home-page "https://github.com/openid/python-openid")
5244 (synopsis "OpenID support for servers and consumers")
5245 (description "This library provides OpenID authentication for Python, both
5246for clients and servers.")
5247 (license license:asl2.0)))
5248
47d0b292
TS
5249(define-public python-urwidtrees
5250 (package
5251 (name "python-urwidtrees")
37ec4623 5252 (version "1.0.2")
47d0b292
TS
5253 (source
5254 (origin
5255 (method url-fetch)
37ec4623
TS
5256 ;; package author intends on distributing via github rather than pypi:
5257 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5258 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5259 version ".tar.gz"))
5260 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5261 (sha256
5262 (base32
37ec4623 5263 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5264 (build-system python-build-system)
5265 (arguments
5266 '(#:tests? #f)) ; no tests
f22efa01 5267 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5268 (home-page "https://github.com/pazz/urwidtrees")
5269 (synopsis "Tree widgets for urwid")
5270 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5271toolkit. Use it to build trees of widgets.")
3f641af0 5272 (license license:gpl3+)))
47d0b292
TS
5273
5274(define-public python2-urwidtrees
5275 (package-with-python2 python-urwidtrees))
5276
d95a56c6
PAR
5277(define-public python-dbus
5278 (package
5279 (name "python-dbus")
5280 (version "1.2.0")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (string-append
5cc3096c 5285 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5286 version ".tar.gz"))
5287 (sha256
5288 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5289 (build-system gnu-build-system)
6717c879
SB
5290 (arguments
5291 '(#:phases
5292 (modify-phases %standard-phases
5293 (add-before
5294 'check 'pre-check
5295 (lambda _
5296 ;; XXX: For the missing '/etc/machine-id'.
5297 (substitute* "test/run-test.sh"
5298 (("DBUS_FATAL_WARNINGS=1")
5299 "DBUS_FATAL_WARNINGS=0"))
5300 #t)))))
d95a56c6
PAR
5301 (native-inputs
5302 `(("pkg-config" ,pkg-config)))
5303 (inputs
5304 `(("python" ,python)
2e88d113 5305 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5306 (synopsis "Python bindings for D-bus")
5307 (description "python-dbus provides bindings for libdbus, the reference
5308implementation of D-Bus.")
5309 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5310 (license license:expat)))
b52af02b
MW
5311
5312(define-public python2-dbus
5313 (package (inherit python-dbus)
5314 (name "python2-dbus")
5315 (inputs `(("python" ,python-2)
5316 ,@(alist-delete "python"
5317 (package-inputs python-dbus)
5318 equal?)))
5319 ;; FIXME: on Python 2, the test_utf8 fails with:
5320 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5321 (arguments `(#:tests? #f))))
a6ac8332
AE
5322
5323(define-public python-apsw
5324 (package
5325 (name "python-apsw")
917708c2 5326 (version "3.9.2-r1")
a6ac8332
AE
5327 (source
5328 (origin
5329 (method url-fetch)
917708c2 5330 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5331 (sha256
5332 (base32
917708c2 5333 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5334 (build-system python-build-system)
5335 (inputs
f3b98f4f 5336 `(("sqlite" ,sqlite)))
a6ac8332
AE
5337 (arguments
5338 `(#:phases
154d207c
MB
5339 (modify-phases %standard-phases
5340 (delete 'check)
5341 (add-after 'install 'check
5342 (lambda* (#:key inputs outputs #:allow-other-keys)
5343 (add-installed-pythonpath inputs outputs)
5344 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5345 (home-page "https://github.com/rogerbinns/apsw/")
5346 (synopsis "Another Python SQLite Wrapper")
5347 (description "APSW is a Python wrapper for the SQLite
5348embedded relational database engine. In contrast to other wrappers such as
5349pysqlite it focuses on being a minimal layer over SQLite attempting just to
5350translate the complete SQLite API into Python.")
abde5f37 5351 (license license:zlib)))
a6ac8332
AE
5352
5353(define-public python2-apsw
5354 (package-with-python2 python-apsw))
26b307e2
AE
5355
5356(define-public python-lxml
5357 (package
5358 (name "python-lxml")
d58a3203 5359 (version "3.6.0")
26b307e2
AE
5360 (source
5361 (origin
5362 (method url-fetch)
97bbc480 5363 (uri (pypi-uri "lxml" version))
26b307e2 5364 (sha256
d58a3203
EF
5365 (base32
5366 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5367 (build-system python-build-system)
5368 (inputs
5369 `(("libxml2" ,libxml2)
f3b98f4f 5370 ("libxslt" ,libxslt)))
26b307e2
AE
5371 (home-page "http://lxml.de/")
5372 (synopsis
5373 "Python XML processing library")
5374 (description
5375 "The lxml XML toolkit is a Pythonic binding for the C libraries
5376libxml2 and libxslt.")
3f641af0 5377 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5378
5379(define-public python2-lxml
5380 (package-with-python2 python-lxml))
4ed20663 5381
b32a1e47
CAW
5382;; beautifulsoup4 has a totally different namespace than 3.x,
5383;; and pypi seems to put it under its own name, so I guess we should too
5384(define-public python-beautifulsoup4
5385 (package
5386 (name "python-beautifulsoup4")
67fd4a12 5387 (version "4.5.1")
b32a1e47
CAW
5388 (source
5389 (origin
5390 (method url-fetch)
5391 (uri (pypi-uri "beautifulsoup4" version))
5392 (sha256
5393 (base32
67fd4a12 5394 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5395 (build-system python-build-system)
5f37f0b6
LF
5396 (arguments
5397 `(#:phases
5398 (modify-phases %standard-phases
5399 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5400 ;; must use this conversion script when building with Python 3. The
5401 ;; conversion script also runs the tests.
5402 ;; For more information, see the file 'convert-py3k' in the source
5403 ;; distribution.
5404 (replace 'check
5405 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5406 (home-page
5407 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5408 (synopsis
5409 "Python screen-scraping library")
5410 (description
5411 "Beautiful Soup is a Python library designed for rapidly setting up
5412screen-scraping projects. It offers Pythonic idioms for navigating,
5413searching, and modifying a parse tree, providing a toolkit for
5414dissecting a document and extracting what you need. It automatically
5415converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5416 (license license:expat)
5417 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5418
5419(define-public python2-beautifulsoup4
5420 (package
5421 (inherit (package-with-python2
5422 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5423 (arguments `(#:python ,python-2))))
b32a1e47 5424
092e86f5
AE
5425(define-public python2-cssutils
5426 (package
5427 (name "python2-cssutils")
58d1d816 5428 (version "1.0.1")
092e86f5
AE
5429 (source
5430 (origin
5431 (method url-fetch)
58d1d816 5432 (uri (pypi-uri "cssutils" version))
092e86f5 5433 (sha256
58d1d816
EF
5434 (base32
5435 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5436 (build-system python-build-system)
5437 (native-inputs
5438 `(("python2-mock" ,python2-mock) ; for the tests
5439 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5440 (arguments
5441 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5442 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5443 ))
092e86f5
AE
5444 (home-page "http://cthedot.de/cssutils/")
5445 (synopsis
5446 "CSS Cascading Style Sheets library for Python")
5447 (description
5448 "Cssutils is a Python package for parsing and building CSS
5449Cascading Style Sheets. Currently it provides a DOM only and no rendering
5450options.")
3f641af0 5451 (license license:lgpl3+)))
880ff77c
AE
5452
5453(define-public python-cssselect
5454 (package
5455 (name "python-cssselect")
d5ccd9ab 5456 (version "0.9.2")
880ff77c
AE
5457 (source
5458 (origin
5459 (method url-fetch)
d5ccd9ab 5460 (uri (pypi-uri "cssselect" version))
880ff77c 5461 (sha256
d5ccd9ab
EF
5462 (base32
5463 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5464 (build-system python-build-system)
880ff77c
AE
5465 (arguments
5466 ;; tests fail with message
5467 ;; AttributeError: 'module' object has no attribute 'tests'
5468 `(#:tests? #f))
5469 (home-page
5470 "https://pythonhosted.org/cssselect/")
5471 (synopsis
5472 "CSS3 selector parser and translator to XPath 1.0")
5473 (description
5474 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5475them to XPath 1.0 expressions. Such expressions can be used in lxml or
5476another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5477 (license license:bsd-3)))
880ff77c
AE
5478
5479(define-public python2-cssselect
5480 (package-with-python2 python-cssselect))
60357f99 5481
03702173 5482(define-public python-openid-cla
5483 (package
5484 (name "python-openid-cla")
5485 (version "1.2")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (pypi-uri "python-openid-cla" version))
5490 (sha256
5491 (base32
5492 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5493 (build-system python-build-system)
5494 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5495 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5496 (description "@code{openid-cla} is an implementation of the OpenID
5497contributor license agreement extension for python-openid.")
5498 (license license:bsd-3)))
5499
5500(define-public python2-openid-cla
5501 (package-with-python2 python-openid-cla))
5502
a0e41de4 5503(define-public python-openid-teams
5504 (package
5505 (name "python-openid-teams")
5506 (version "1.1")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "python-openid-teams" version))
5511 (sha256
5512 (base32
5513 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5514 (build-system python-build-system)
5515 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5516 (synopsis "Implementation of the OpenID teams extension for python-openid")
5517 (description
5518 "@code{openid-teams} is an implementation of the OpenID
5519teams extension for python-openid.")
5520 (license license:bsd-3)))
5521
5522(define-public python2-openid-teams
5523 (package-with-python2 python-openid-teams))
5524
60357f99
AE
5525(define-public python-netifaces
5526 (package
5527 (name "python-netifaces")
5528 (version "0.10.4")
5529 (source
5530 (origin
5531 (method url-fetch)
5532 (uri (string-append
5533 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5534 version
5535 ".tar.gz"))
5536 (sha256
5537 (base32
5538 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5539 (build-system python-build-system)
60357f99
AE
5540 (home-page
5541 "https://bitbucket.org/al45tair/netifaces")
5542 (synopsis
5543 "Python module for portable network interface information")
5544 (description
5545 "Netifaces is a Python module providing information on network
5546interfaces in an easy and portable manner.")
5547 (license license:expat)))
5548
5549(define-public python2-netifaces
5550 (package-with-python2 python-netifaces))
92cb152b 5551
32f77c04
RW
5552(define-public python-networkx
5553 (package
5554 (name "python-networkx")
a4d9609c 5555 (version "1.11")
32f77c04
RW
5556 (source
5557 (origin
5558 (method url-fetch)
a4d9609c 5559 (uri (pypi-uri "networkx" version))
32f77c04 5560 (sha256
a4d9609c 5561 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5562 (build-system python-build-system)
5563 ;; python-decorator is needed at runtime
5564 (propagated-inputs
5565 `(("python-decorator" ,python-decorator)))
5566 (native-inputs
f3b98f4f 5567 `(("python-nose" ,python-nose)))
32f77c04
RW
5568 (home-page "http://networkx.github.io/")
5569 (synopsis "Python module for creating and manipulating graphs and networks")
5570 (description
5571 "NetworkX is a Python package for the creation, manipulation, and study
5572of the structure, dynamics, and functions of complex networks.")
3f641af0 5573 (license license:bsd-3)))
32f77c04
RW
5574
5575(define-public python2-networkx
5576 (package-with-python2 python-networkx))
5577
92cb152b
RW
5578(define-public snakemake
5579 (package
5580 (name "snakemake")
7b93d866 5581 (version "3.9.0")
92cb152b
RW
5582 (source
5583 (origin
5584 (method url-fetch)
7b93d866 5585 (uri (pypi-uri "snakemake" version))
92cb152b 5586 (sha256
7b93d866 5587 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5588 (build-system python-build-system)
7b93d866
MB
5589 (arguments
5590 ;; TODO: Package missing test dependencies.
5591 '(#:tests? #f))
5592 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5593 (synopsis "Python-based execution environment for make-like workflows")
5594 (description
5595 "Snakemake aims to reduce the complexity of creating workflows by
5596providing a clean and modern domain specific specification language (DSL) in
5597Python style, together with a fast and comfortable execution environment.")
5598 (license license:expat)))
a1920bc9 5599
35de1fbd
RW
5600(define-public python-seaborn
5601 (package
5602 (name "python-seaborn")
fc899d4f 5603 (version "0.7.0")
35de1fbd
RW
5604 (source
5605 (origin
5606 (method url-fetch)
fc899d4f 5607 (uri (pypi-uri "seaborn" version))
35de1fbd 5608 (sha256
fc899d4f 5609 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd 5610 (build-system python-build-system)
6f976df6
MB
5611 (arguments
5612 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5613 (propagated-inputs
5614 `(("python-pandas" ,python-pandas)
5615 ("python-matplotlib" ,python-matplotlib)
5616 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5617 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5618 (synopsis "Statistical data visualization")
5619 (description
5620 "Seaborn is a library for making attractive and informative statistical
5621graphics in Python. It is built on top of matplotlib and tightly integrated
5622with the PyData stack, including support for numpy and pandas data structures
5623and statistical routines from scipy and statsmodels.")
3f641af0 5624 (license license:bsd-3)
fc899d4f 5625 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5626
5627(define-public python2-seaborn
fc899d4f
EF
5628 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5629 (package
5630 (inherit base)
5631 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5632 ,@(package-propagated-inputs base))))))
35de1fbd 5633
58a35665
MB
5634(define-public python-mpmath
5635 (package
5636 (name "python-mpmath")
5637 (version "0.19")
5638 (source (origin
5639 (method url-fetch)
5640 (uri (string-append "http://mpmath.org/files/mpmath-"
5641 version ".tar.gz"))
5642 (sha256
5643 (base32
5644 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5645 (build-system python-build-system)
5646 (arguments
5647 '(#:phases
5648 (modify-phases %standard-phases
5649 (replace 'check
5650 (lambda _
5651 (zero?
5652 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5653 (home-page "http://mpmath.org")
5654 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5655 (description
5656 "@code{mpmath} can be used as an arbitrary-precision substitute for
5657Python's float/complex types and math/cmath modules, but also does much
5658more advanced mathematics.")
5659 (license license:bsd-3)))
5660
5661(define-public python2-mpmath
5662 (package-with-python2 python-mpmath))
5663
90fc547f
RW
5664(define-public python-sympy
5665 (package
5666 (name "python-sympy")
52f622ef 5667 (version "1.0")
90fc547f
RW
5668 (source
5669 (origin
5670 (method url-fetch)
5671 (uri (string-append
5672 "https://github.com/sympy/sympy/releases/download/sympy-"
5673 version "/sympy-" version ".tar.gz"))
5674 (sha256
52f622ef 5675 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5676 (build-system python-build-system)
52f622ef
MB
5677 (propagated-inputs
5678 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5679 (home-page "http://www.sympy.org/")
5680 (synopsis "Python library for symbolic mathematics")
5681 (description
5682 "SymPy is a Python library for symbolic mathematics. It aims to become a
5683full-featured computer algebra system (CAS) while keeping the code as simple
5684as possible in order to be comprehensible and easily extensible.")
3f641af0 5685 (license license:bsd-3)))
90fc547f
RW
5686
5687(define-public python2-sympy
5688 (package-with-python2 python-sympy))
5689
e8c9b010
SR
5690(define-public python-q
5691 (package
5692 (name "python-q")
5693 (version "2.6")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "q" version))
5698 (sha256
5699 (base32
5700 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5701 (build-system python-build-system)
5702 (home-page "https://github.com/zestyping/q")
5703 (synopsis "Quick-and-dirty debugging output for tired programmers")
5704 (description
5705 "q is a Python module for \"print\" style of debugging Python code. It
5706provides convenient short API for print out of values, tracebacks, and
5707falling into the Python interpreter.")
f210e944 5708 (license license:asl2.0)))
e8c9b010
SR
5709
5710(define-public python2-q
f210e944 5711 (package-with-python2 python-q))
e8c9b010 5712
a1920bc9
FB
5713(define-public python-testlib
5714 (package
5715 (name "python-testlib")
5716 (version "0.6.5")
5717 (source
5718 (origin
5719 (method url-fetch)
5720 (uri (string-append
5721 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5722 version ".zip"))
5723 (sha256
5724 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5725 (build-system python-build-system)
a1920bc9 5726 (native-inputs
632735f2 5727 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5728 (synopsis "Python micro test suite harness")
5729 (description "A micro unittest suite harness for Python.")
5730 (home-page "https://github.com/trentm/testlib")
1cb9c006 5731 (license license:expat)))
a1920bc9
FB
5732
5733(define-public python2-testlib
5734 (package-with-python2 python-testlib))
db62afa5
LC
5735
5736(define-public python2-xlib
5737 (package
5738 (name "python2-xlib")
5739 (version "0.14")
5740 (source (origin
5741 (method url-fetch)
de67e922
LF
5742 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5743 "/" version "/"
db62afa5
LC
5744 "python-xlib-" version ".tar.gz"))
5745 (sha256
5746 (base32
5747 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5748 (build-system python-build-system)
5749 (arguments
5750 `(#:python ,python-2 ;Python 2 only
5751 #:tests? #f)) ;no tests
db62afa5
LC
5752 (home-page "http://python-xlib.sourceforge.net/")
5753 (synopsis "Python X11 client library")
5754 (description
5755 "The Python X Library is intended to be a fully functional X client
5756library for Python programs. It is useful to implement low-level X clients.
5757It is written entirely in Python.")
3f641af0 5758 (license license:gpl2+)))
0234ca06
DT
5759
5760(define-public python-singledispatch
5761 (package
5762 (name "python-singledispatch")
5763 (version "3.4.0.3")
5764 (source
5765 (origin
5766 (method url-fetch)
bdb67d84 5767 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5768 (sha256
5769 (base32
5770 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5771 (build-system python-build-system)
5e1c9d24
HG
5772 (native-inputs
5773 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5774 (home-page
5775 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5776 (synopsis "Backport of singledispatch feature from Python 3.4")
5777 (description
5778 "This library brings functools.singledispatch from Python 3.4 to Python
57792.6-3.3.")
5780 (license license:expat)))
5781
5782(define-public python2-singledispatch
5783 (package-with-python2 python-singledispatch))
feaae484 5784
310d218f
RW
5785(define-public python-tornado
5786 (package
5787 (name "python-tornado")
a724924b 5788 (version "4.3")
310d218f
RW
5789 (source
5790 (origin
5791 (method url-fetch)
a724924b 5792 (uri (pypi-uri "tornado" version))
310d218f 5793 (sha256
a724924b 5794 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5795 (build-system python-build-system)
3fe2c209
MB
5796 (arguments
5797 '(;; FIXME: Two tests error out with:
5798 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5799 ;; #:phases
5800 ;; (modify-phases %standard-phases
5801 ;; (replace 'check
5802 ;; (lambda _
5803 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5804 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5805 ;; (zero? (system* "python" "-m" "tornado.test")))))
5806 #:tests? #f))
310d218f 5807 (native-inputs
b455439b 5808 `(("python-certifi" ,python-certifi)))
f22efa01 5809 (propagated-inputs
b455439b 5810 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5811 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5812 (synopsis "Python web framework and asynchronous networking library")
5813 (description
5814 "Tornado is a Python web framework and asynchronous networking library,
5815originally developed at FriendFeed. By using non-blocking network I/O,
5816Tornado can scale to tens of thousands of open connections, making it ideal
5817for long polling, WebSockets, and other applications that require a long-lived
5818connection to each user.")
3f641af0 5819 (license license:asl2.0)
b455439b 5820 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5821
5822(define-public python2-tornado
b455439b 5823 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5824 (package (inherit tornado)
f22efa01 5825 (propagated-inputs
310d218f
RW
5826 `(("python2-backport-ssl-match-hostname"
5827 ,python2-backport-ssl-match-hostname)
b455439b 5828 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5829 ,@(package-propagated-inputs tornado))))))
310d218f 5830
6b59fc10
EF
5831;; the python- version can be removed with python-3.5
5832(define-public python-backports-abc
5833 (package
5834 (name "python-backports-abc")
27f9148e 5835 (version "0.5")
6b59fc10
EF
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (pypi-uri "backports_abc" version))
5840 (sha256
5841 (base32
27f9148e 5842 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 5843 (build-system python-build-system)
6b59fc10 5844 (home-page "https://github.com/cython/backports_abc")
66e07664 5845 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5846 (description
5847 "Python-backports-abc provides a backport of additions to the
5848'collections.abc' module in Python-3.5.")
3f641af0 5849 (license license:psfl)))
6b59fc10
EF
5850
5851(define-public python2-backports-abc
5852 (package-with-python2 python-backports-abc))
5853
feaae484
SB
5854(define-public python-waf
5855 (package
5856 (name "python-waf")
7dd55dfe 5857 (version "1.9.5")
feaae484
SB
5858 (source (origin
5859 (method url-fetch)
bae67829 5860 (uri (string-append "https://waf.io/"
feaae484
SB
5861 "waf-" version ".tar.bz2"))
5862 (sha256
5863 (base32
7dd55dfe 5864 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5865 (build-system python-build-system)
5866 (arguments
5867 '(#:phases
5868 (modify-phases %standard-phases
5869 (replace 'build
7dd55dfe
EF
5870 (lambda _
5871 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5872 (replace 'check
7dd55dfe
EF
5873 (lambda _
5874 (zero? (system* "python" "waf" "--version"))))
feaae484 5875 (replace 'install
7dd55dfe
EF
5876 (lambda _
5877 (copy-file "waf" %output))))))
5878 (home-page "http://waf.io/")
feaae484
SB
5879 (synopsis "Python-based build system")
5880 (description
5881 "Waf is a Python-based framework for configuring, compiling and installing
5882applications.")
3f641af0 5883 (license license:bsd-3)))
feaae484
SB
5884
5885(define-public python2-waf
5886 (package-with-python2 python-waf))
45203542
RW
5887
5888(define-public python-pyzmq
5889 (package
5890 (name "python-pyzmq")
3655ee76 5891 (version "15.1.0")
45203542
RW
5892 (source
5893 (origin
5894 (method url-fetch)
3655ee76 5895 (uri (pypi-uri "pyzmq" version))
45203542 5896 (sha256
3655ee76 5897 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5898 (build-system python-build-system)
5899 (arguments
5900 `(#:configure-flags
5901 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5902 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5903 ;; --inplace' for 'python setup.py test' to work.
5904 #:tests? #f))
5905 (inputs
5906 `(("zeromq" ,zeromq)))
5907 (native-inputs
5908 `(("pkg-config" ,pkg-config)
f3b98f4f 5909 ("python-nose" ,python-nose)))
45203542
RW
5910 (home-page "http://github.com/zeromq/pyzmq")
5911 (synopsis "Python bindings for 0MQ")
5912 (description
5913 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5914 (license license:bsd-4)))
45203542
RW
5915
5916(define-public python2-pyzmq
5917 (package-with-python2 python-pyzmq))
d889e6c4
CR
5918
5919(define-public python-pep8
5920 (package
5921 (name "python-pep8")
db251311 5922 (version "1.7.0")
d889e6c4
CR
5923 (source
5924 (origin
5925 (method url-fetch)
db251311 5926 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5927 (sha256
5928 (base32
db251311 5929 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5930 (build-system python-build-system)
d889e6c4
CR
5931 (home-page "http://pep8.readthedocs.org/")
5932 (synopsis "Python style guide checker")
5933 (description
5934 "This tools checks Python code against some of the style conventions in
5935PEP 8.")
5936 (license license:expat)))
5937
5938(define-public python2-pep8
5939 (package-with-python2 python-pep8))
e31d7f44
CR
5940
5941(define-public python-pyflakes
5942 (package
5943 (name "python-pyflakes")
2abc3972 5944 (version "1.0.0")
e31d7f44
CR
5945 (source
5946 (origin
5947 (method url-fetch)
2abc3972 5948 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5949 (sha256
5950 (base32
2abc3972 5951 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5952 (build-system python-build-system)
e31d7f44
CR
5953 (home-page
5954 "https://github.com/pyflakes/pyflakes")
5955 (synopsis "Passive checker of Python programs")
5956 (description
5957 "Pyflakes statically checks Python source code for common errors.")
5958 (license license:expat)))
a59e017c 5959
7261d9eb
CR
5960(define-public python2-pyflakes
5961 (package-with-python2 python-pyflakes))
5962
a59e017c
CR
5963(define-public python-mccabe
5964 (package
5965 (name "python-mccabe")
c6ebd40d 5966 (version "0.4.0")
a59e017c
CR
5967 (source
5968 (origin
5969 (method url-fetch)
c6ebd40d 5970 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5971 (sha256
5972 (base32
c6ebd40d 5973 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5974 (build-system python-build-system)
328bb95d 5975 (native-inputs
c6ebd40d 5976 `(("python-pytest" ,python-pytest)
f3b98f4f 5977 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5978 (home-page "https://github.com/flintwork/mccabe")
5979 (synopsis "McCabe checker, plugin for flake8")
5980 (description
5981 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5982complexity of Python source code.")
7362371d 5983 (license license:expat)))
a59e017c
CR
5984
5985(define-public python2-mccabe
5986 (package-with-python2 python-mccabe))
e8df8f47 5987
7477fbb1
CR
5988(define-public python-mccabe-0.2.1
5989 (package (inherit python-mccabe)
5990 (version "0.2.1")
5991 (source
5992 (origin
5993 (method url-fetch)
5994 (uri (pypi-uri "mccabe" version))
5995 (sha256
5996 (base32
f3b98f4f 5997 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5998
5999(define-public python2-mccabe-0.2.1
6000 (package-with-python2 python-mccabe-0.2.1))
6001
e8df8f47
CR
6002;; Flake8 2.4.1 requires an older version of pep8.
6003;; This should be removed ASAP.
6004(define-public python-pep8-1.5.7
6005 (package (inherit python-pep8)
6006 (version "1.5.7")
6007 (source
6008 (origin
6009 (method url-fetch)
6010 (uri (string-append
6011 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6012 version
6013 ".tar.gz"))
6014 (sha256
6015 (base32
73e3060d
MB
6016 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6017 (arguments
6018 ;; XXX Tests not compatible with Python 3.5.
6019 '(#:tests? #f))))
e8df8f47
CR
6020
6021(define-public python2-pep8-1.5.7
6022 (package-with-python2 python-pep8-1.5.7))
6023
6024;; Flake8 2.4.1 requires an older version of pyflakes.
6025;; This should be removed ASAP.
6026(define-public python-pyflakes-0.8.1
6027 (package (inherit python-pyflakes)
6028 (version "0.8.1")
6029 (source
6030 (origin
6031 (method url-fetch)
6032 (uri (string-append
6033 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6034 version
6035 ".tar.gz"))
6036 (sha256
6037 (base32
0d84e1ef
MB
6038 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6039 (arguments
6040 ;; XXX Tests not compatible with Python 3.5.
6041 '(#:tests? #f))))
e8df8f47
CR
6042
6043(define-public python2-pyflakes-0.8.1
7261d9eb 6044 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6045
6046(define-public python-flake8
6047 (package
6048 (name "python-flake8")
43789136 6049 (version "2.5.4")
e8df8f47
CR
6050 (source
6051 (origin
6052 (method url-fetch)
1b995533 6053 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6054 (sha256
6055 (base32
011271c7
HG
6056 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6057 (modules '((guix build utils)))
6058 (snippet
6059 '(begin
6060 ;; Remove pre-compiled .pyc files from source.
6061 (for-each delete-file-recursively
6062 (find-files "." "__pycache__" #:directories? #t))
6063 (for-each delete-file (find-files "." "\\.pyc$"))
6064 #t))))
e8df8f47 6065 (build-system python-build-system)
482d9591 6066 (propagated-inputs
f3b98f4f 6067 `(("python-pep8" ,python-pep8)
43789136 6068 ("python-pyflakes" ,python-pyflakes)
482d9591 6069 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6070 (native-inputs
6071 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6072 ("python-nose" ,python-nose)))
6073 (home-page "https://gitlab.com/pycqa/flake8")
6074 (synopsis
6075 "The modular source code checker: pep8, pyflakes and co")
6076 (description
6077 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6078 (license license:expat)))
6079
6080(define-public python2-flake8
6081 (package-with-python2 python-flake8))
61b9ac53 6082
abf21efc
CR
6083;; This will only be needed by the python-hacking package and will not be
6084;; necessary once python-hacking > 0.10.2 is released.
6085(define-public python-flake8-2.2.4
6086 (package (inherit python-flake8)
482d9591 6087 (propagated-inputs
f3b98f4f 6088 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6089 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6090 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6091 (native-inputs
482d9591 6092 `(("python-mock" ,python-mock)
abf21efc
CR
6093 ("python-nose" ,python-nose)))
6094 (version "2.2.4")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "flake8" version))
6099 (sha256
6100 (base32
b9c8ccce
HG
6101 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6102 (modules '((guix build utils)))
6103 (snippet
6104 '(begin
6105 ;; Remove pre-compiled .pyc files from source.
6106 (for-each delete-file-recursively
6107 (find-files "." "__pycache__" #:directories? #t))
6108 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6109 #t))))
6110 (arguments
6111 ;; XXX Fails with Python 3.5.
6112 '(#:tests? #f))))
abf21efc
CR
6113
6114(define-public python2-flake8-2.2.4
6115 (package-with-python2 python-flake8-2.2.4))
6116
61b9ac53
FB
6117(define-public python-mistune
6118 (package
6119 (name "python-mistune")
6120 (version "0.7")
6121 (source
6122 (origin
6123 (method url-fetch)
6124 (uri (string-append
6125 "https://pypi.python.org/packages/source/m/mistune/mistune-"
6126 version
6127 ".tar.gz"))
6128 (sha256
6129 (base32
6130 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
6131 (build-system python-build-system)
328bb95d 6132 (native-inputs
f3b98f4f 6133 `(("python-nose" ,python-nose)
61b9ac53
FB
6134 ("python-cython" ,python-cython)))
6135 (home-page "https://github.com/lepture/mistune")
6136 (synopsis "Markdown parser in pure Python")
6137 (description "This package provides a fast markdown parser in pure
6138Python.")
3f641af0 6139 (license license:bsd-3)))
61b9ac53
FB
6140
6141(define-public python2-mistune
6142 (package-with-python2 python-mistune))
6d992d07 6143
b9893908
EE
6144(define-public python-markdown
6145 (package
6146 (name "python-markdown")
791ac6a6 6147 (version "2.6.7")
b9893908
EE
6148 (source
6149 (origin
6150 (method url-fetch)
6151 (uri (pypi-uri "Markdown" version))
6152 (sha256
6153 (base32
791ac6a6 6154 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6155 (build-system python-build-system)
6156 (arguments
6157 `(#:phases
6158 (modify-phases %standard-phases
6159 (replace 'check
6160 (lambda _
6161 (zero? (system* "python" "run-tests.py")))))))
6162 (native-inputs
6163 `(("python-nose" ,python-nose)
6164 ("python-pyyaml" ,python-pyyaml)))
6165 (home-page "https://pythonhosted.org/Markdown/")
6166 (synopsis "Python implementation of Markdown")
6167 (description
6168 "This package provides a Python implementation of John Gruber's
6169Markdown. The library features international input, various Markdown
6170extensions, and several HTML output formats. A command line wrapper
6171markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6172 (license license:bsd-3)))
b9893908
EE
6173
6174(define-public python2-markdown
6175 (package-with-python2 python-markdown))
6176
6d992d07
FB
6177(define-public python-ptyprocess
6178 (package
6179 (name "python-ptyprocess")
6180 (version "0.5")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (string-append
6185 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6186 version ".tar.gz"))
6187 (sha256
6188 (base32
6189 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6190 (build-system python-build-system)
328bb95d 6191 (native-inputs
f3b98f4f 6192 `(("python-nose" ,python-nose)))
6d992d07
FB
6193 (arguments
6194 `(#:phases
6195 (modify-phases %standard-phases
6196 (replace 'check
6197 (lambda _
6198 (zero? (system* "nosetests")))))))
6199 (home-page "https://github.com/pexpect/ptyprocess")
6200 (synopsis "Run a subprocess in a pseudo terminal")
6201 (description
6202 "This package provides a Python library used to launch a subprocess in a
6203pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6204 (license license:isc)))
6d992d07
FB
6205
6206(define-public python2-ptyprocess
6207 (package-with-python2 python-ptyprocess))
4aadb1df
FB
6208
6209(define-public python-terminado
6210 (package
6211 (name "python-terminado")
783fb0a3 6212 (version "0.6")
4aadb1df
FB
6213 (source
6214 (origin
6215 (method url-fetch)
783fb0a3 6216 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6217 (sha256
6218 (base32
783fb0a3 6219 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6220 (build-system python-build-system)
6221 (propagated-inputs
6222 `(("python-tornado" ,python-tornado)
6223 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6224 (native-inputs
6225 `(("python-nose" ,python-nose)))
4aadb1df
FB
6226 (arguments
6227 `(#:phases
6228 (modify-phases %standard-phases
6229 (replace 'check
6230 (lambda _
6231 (zero? (system* "nosetests")))))))
6232 (home-page "https://github.com/takluyver/terminado")
6233 (synopsis "Terminals served to term.js using Tornado websockets")
6234 (description "This package provides a Tornado websocket backend for the
6235term.js Javascript terminal emulator library.")
3f641af0 6236 (license license:bsd-2)
783fb0a3 6237 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6238
6239(define-public python2-terminado
783fb0a3 6240 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6241 (package (inherit terminado)
783fb0a3
EF
6242 (propagated-inputs
6243 `(("python2-backport-ssl-match-hostname"
6244 ,python2-backport-ssl-match-hostname)
00e10c6e 6245 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6246
789de5e2 6247(define-public python-straight-plugin
6248 (package
6249 (name "python-straight-plugin")
6250 (version "1.4.1")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "straight.plugin" version))
6255 (sha256
6256 (base32
6257 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6258 (build-system python-build-system)
6259 (home-page "https://github.com/ironfroggy/straight.plugin")
6260 (synopsis "Simple namespaced plugin facility")
6261 (description "Straight Plugin provides a type of plugin you can create from
6262almost any existing Python modules, and an easy way for outside developers to
6263add functionality and customization to your projects with their own plugins.")
6264 (license license:expat)))
6265
6266(define-public python2-straight-plugin
6267 (package-with-python2 python-straight-plugin))
6268
d582eaac
SB
6269(define-public python-fonttools
6270 (package
6271 (name "python-fonttools")
6272 (version "2.5")
6273 (source (origin
6274 (method url-fetch)
6275 (uri (string-append
6276 "https://pypi.python.org/packages/source/F/FontTools/"
6277 "fonttools-" version ".tar.gz"))
6278 (sha256
6279 (base32
6280 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6281 (build-system python-build-system)
9e8c6a37
HG
6282 (arguments
6283 '(#:test-target "check"
6284 #:phases
6285 (modify-phases %standard-phases
6286 (add-after 'unpack 'patch-setuppy
6287 ;; Remove the undocumented "extra_path" argument, which adds an
6288 ;; intervening directories between site-packages and the package
6289 ;; directory.
6290 (lambda _
6291 (substitute* "setup.py"
6292 (("^[ \t]*extra_path *= *'FontTools',") ""))
6293 #t)))))
d582eaac
SB
6294 (home-page "http://github.com/behdad/fonttools")
6295 (synopsis "Tools to manipulate font files")
6296 (description
6297 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6298supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6299of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6300also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6301from an XML-based format.")
3f641af0
DC
6302 (license (license:non-copyleft
6303 "file://LICENSE.txt"
6304 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6305
6306(define-public python2-fonttools
6307 (package-with-python2 python-fonttools))
75710da6 6308
5faa5ce4
RW
6309(define-public python-ly
6310 (package
6311 (name "python-ly")
5135354f 6312 (version "0.9.4")
5faa5ce4
RW
6313 (source
6314 (origin
6315 (method url-fetch)
5135354f
RW
6316 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6317 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6318 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6319 (sha256
6320 (base32
5135354f 6321 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6322 (build-system python-build-system)
972cf9be
MB
6323 (arguments
6324 ;; FIXME: Some tests need network access.
6325 '(#:tests? #f))
5faa5ce4
RW
6326 (synopsis "Tool and library for manipulating LilyPond files")
6327 (description "This package provides a Python library to parse, manipulate
6328or create documents in LilyPond format. A command line program ly is also
6329provided that can be used to do various manipulations with LilyPond files.")
6330 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6331 (license license:gpl2+)))
7e7b27d9
CR
6332
6333(define-public python-appdirs
6334 (package
6335 (name "python-appdirs")
6336 (version "1.4.0")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (string-append
6341 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6342 version
6343 ".tar.gz"))
6344 (sha256
6345 (base32
6346 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6347 (build-system python-build-system)
7e7b27d9
CR
6348 (home-page "http://github.com/ActiveState/appdirs")
6349 (synopsis
6350 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6351 (description
6352 "This module provides a portable way of finding out where user data
6353should be stored on various operating systems.")
6354 (license license:expat)))
6355
6356(define-public python2-appdirs
6357 (package-with-python2 python-appdirs))
89b2e0b0
LF
6358
6359(define-public python-llfuse
6360 (package
6361 (name "python-llfuse")
e36ace36 6362 (version "1.1.1")
89b2e0b0
LF
6363 (source (origin
6364 (method url-fetch)
6365 (uri (string-append
6366 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6367 "llfuse-" version ".tar.bz2"))
6368 (sha256
6369 (base32
e36ace36 6370 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6371 (build-system python-build-system)
6372 (inputs
6373 `(("fuse" ,fuse)
6374 ("attr" ,attr)))
6375 (native-inputs
f3b98f4f 6376 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6377 (synopsis "Python bindings for FUSE")
6378 (description
6379 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6380 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6381 (license license:lgpl2.0+)
cd0569c4 6382 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6383
6384(define-public python2-llfuse
cd0569c4
LF
6385 (package (inherit (package-with-python2
6386 (strip-python2-variant python-llfuse)))
6387 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6388
6389;; For attic-0.16
6390(define-public python-llfuse-0.41
6391 (package (inherit python-llfuse)
229b3661 6392 (version "0.41.1")
cd0569c4
LF
6393 (source (origin
6394 (method url-fetch)
6395 (uri (string-append
6396 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6397 "llfuse-" version ".tar.bz2"))
6398 (sha256
6399 (base32
229b3661 6400 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6401 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6402 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6403 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6404
6405(define-public python-msgpack
6406 (package
6407 (name "python-msgpack")
aed625bd 6408 (version "0.4.8")
641c9871
LF
6409 (source (origin
6410 (method url-fetch)
ae831df4 6411 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6412 (sha256
6413 (base32
aed625bd 6414 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6415 (build-system python-build-system)
641c9871
LF
6416 (synopsis "MessagePack (de)serializer")
6417 (description "MessagePack is a fast, compact binary serialization format,
6418suitable for similar data to JSON. This package provides CPython bindings for
6419reading and writing MessagePack data.")
6420 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6421 (license license:asl2.0)))
bd74be7b
LF
6422
6423(define-public python2-msgpack
f210e944 6424 (package-with-python2 python-msgpack))
641c9871 6425
6e5e39f4
CR
6426(define-public python-netaddr
6427 (package
6428 (name "python-netaddr")
6429 (version "0.7.18")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (string-append
6434 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6435 version
6436 ".tar.gz"))
6437 (sha256
6438 (base32
6439 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6440 (build-system python-build-system)
6441 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6442 (home-page "https://github.com/drkjam/netaddr/")
6443 (synopsis "Pythonic manipulation of network addresses")
6444 (description
6445 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6446and MAC network addresses.")
3f641af0 6447 (license license:bsd-3)))
6e5e39f4
CR
6448
6449(define-public python2-netaddr
6450 (package-with-python2 python-netaddr))
8c692a52
CR
6451
6452(define-public python-wrapt
6453 (package
6454 (name "python-wrapt")
6455 (version "1.10.5")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (string-append
6460 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6461 version
6462 ".tar.gz"))
6463 (sha256
6464 (base32
6465 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6466 (build-system python-build-system)
6467 (arguments
6468 ;; Tests are not included in the tarball, they are only available in the
6469 ;; git repository.
6470 `(#:tests? #f))
8c692a52
CR
6471 (home-page "https://github.com/GrahamDumpleton/wrapt")
6472 (synopsis "Module for decorators, wrappers and monkey patching")
6473 (description
6474 "The aim of the wrapt module is to provide a transparent object proxy for
6475 Python, which can be used as the basis for the construction of function
6476 wrappers and decorator functions.")
3f641af0 6477 (license license:bsd-2)))
8c692a52
CR
6478
6479(define-public python2-wrapt
6480 (package-with-python2 python-wrapt))
b85c85be
CR
6481
6482(define-public python-iso8601
6483 (package
6484 (name "python-iso8601")
fe84bc9a 6485 (version "0.1.11")
b85c85be
CR
6486 (source
6487 (origin
6488 (method url-fetch)
fe84bc9a 6489 (uri (pypi-uri "iso8601" version))
b85c85be 6490 (sha256
fe84bc9a
EF
6491 (base32
6492 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6493 (build-system python-build-system)
63b02364
MB
6494 (native-inputs
6495 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6496 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6497 (synopsis "Module to parse ISO 8601 dates")
6498 (description
6499 "This module parses the most common forms of ISO 8601 date strings (e.g.
6500@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6501 (license license:expat)))
6502
6503(define-public python2-iso8601
6504 (package-with-python2 python-iso8601))
5e412b63
CR
6505
6506(define-public python-monotonic
6507 (package
6508 (name "python-monotonic")
6509 (version "0.3")
6510 (source
6511 (origin
6512 (method url-fetch)
6513 (uri (string-append
6514 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6515 version
6516 ".tar.gz"))
6517 (sha256
6518 (base32
6519 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6520 (build-system python-build-system)
5e412b63
CR
6521 (home-page "https://github.com/atdt/monotonic")
6522 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6523 (description
6524 "This module provides a monotonic() function which returns the value (in
6525fractional seconds) of a clock which never goes backwards.")
3f641af0 6526 (license license:asl2.0)))
5e412b63
CR
6527
6528(define-public python2-monotonic
6529 (package-with-python2 python-monotonic))
de34afac
CR
6530
6531(define-public python-webob
6532 (package
6533 (name "python-webob")
b8834c21 6534 (version "1.5.1")
de34afac
CR
6535 (source
6536 (origin
6537 (method url-fetch)
b8834c21 6538 (uri (pypi-uri "WebOb" version))
de34afac
CR
6539 (sha256
6540 (base32
b8834c21 6541 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6542 (build-system python-build-system)
328bb95d 6543 (native-inputs
f3b98f4f 6544 `(("python-nose" ,python-nose)))
de34afac
CR
6545 (home-page "http://webob.org/")
6546 (synopsis "WSGI request and response object")
6547 (description
6548 "WebOb provides wrappers around the WSGI request environment, and an
6549object to help create WSGI responses.")
6550 (license license:expat)))
6551
6552(define-public python2-webob
6553 (package-with-python2 python-webob))
350ba0a3 6554
02a8a187
BW
6555(define-public python-xlrd
6556 (package
6557 (name "python-xlrd")
c2ad4d70 6558 (version "1.0.0")
02a8a187
BW
6559 (source (origin
6560 (method url-fetch)
e775f48e 6561 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6562 (sha256
6563 (base32
c2ad4d70 6564 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6565 (build-system python-build-system)
6566 (arguments
6567 `(#:phases
6568 (modify-phases %standard-phases
c2ad4d70 6569 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6570 ;; run tests instead for now.
6571 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6572 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6573 (home-page "http://www.python-excel.org/")
6574 (synopsis "Library for extracting data from Excel files")
6575 (description "This packages provides a library to extract data from
c598e35c 6576spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6577@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6578Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6579 (license license:bsd-3)))
02a8a187
BW
6580
6581(define-public python2-xlrd
6582 (package-with-python2 python-xlrd))
6583
350ba0a3
CR
6584(define-public python-prettytable
6585 (package
6586 (name "python-prettytable")
6587 (version "0.7.2")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (string-append
6592 "https://pypi.python.org/packages/source/P/PrettyTable/"
6593 "prettytable-" version ".tar.bz2"))
6594 (sha256
6595 (base32
6596 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6597 (build-system python-build-system)
350ba0a3
CR
6598 (home-page "http://code.google.com/p/prettytable/")
6599 (synopsis "Display tabular data in an ASCII table format")
6600 (description
6601 "A library designed to represent tabular data in visually appealing ASCII
6602tables. PrettyTable allows for selection of which columns are to be printed,
6603independent alignment of columns (left or right justified or centred) and
6604printing of sub-tables by specifying a row range.")
3f641af0 6605 (license license:bsd-3)))
350ba0a3
CR
6606
6607(define-public python2-prettytable
6608 (package-with-python2 python-prettytable))
7a8ac75a 6609
9f8ee3fe
RW
6610(define-public python-tables
6611 (package
6612 (name "python-tables")
6613 (version "3.2.2")
6614 (source
6615 (origin
6616 (method url-fetch)
6617 (uri (pypi-uri "tables" version))
6618 (sha256
6619 (base32
bac23672
HG
6620 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6621 (modules '((guix build utils)))
6622 (snippet
6623 '(begin
6624 ;; Remove pre-compiled .pyc files from source.
6625 (for-each delete-file-recursively
6626 (find-files "." "__pycache__" #:directories? #t))
6627 (for-each delete-file (find-files "." "\\.pyc$"))
6628 #t))))
9f8ee3fe
RW
6629 (build-system python-build-system)
6630 (arguments
6631 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6632 ;; or "check", so we must override the build and check phases.
6633 #:phases
6634 (modify-phases %standard-phases
6635 (add-after 'unpack 'use-gcc
6636 (lambda _
6637 (substitute* "setup.py"
6638 (("compiler = new_compiler\\(\\)" line)
6639 (string-append line
6640 "\ncompiler.set_executables(compiler='gcc',"
6641 "compiler_so='gcc',"
6642 "linker_exe='gcc',"
6643 "linker_so='gcc -shared')")))
6644 #t))
6645 (replace 'build
6646 (lambda* (#:key inputs #:allow-other-keys)
6647 (zero? (system* "python" "setup.py" "build"
6648 (string-append "--hdf5="
6649 (assoc-ref inputs "hdf5"))))))
6650 (replace 'check
6651 (lambda* (#:key inputs #:allow-other-keys)
6652 (zero? (system* "python" "setup.py" "check"
6653 (string-append "--hdf5="
6654 (assoc-ref inputs "hdf5")))))))))
6655 (propagated-inputs
6656 `(("python-numexpr" ,python-numexpr)
6657 ("python-numpy" ,python-numpy)))
6658 (native-inputs
f3b98f4f 6659 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6660 ("pkg-config" ,pkg-config)))
6661 (inputs
6662 `(("hdf5" ,hdf5)
6663 ("bzip2" ,bzip2)
6664 ("zlib" ,zlib)))
6665 (home-page "http://www.pytables.org/")
6666 (synopsis "Hierarchical datasets for Python")
6667 (description "PyTables is a package for managing hierarchical datasets and
6668designed to efficently cope with extremely large amounts of data.")
3f641af0 6669 (license license:bsd-3)))
9f8ee3fe
RW
6670
6671(define-public python2-tables
6672 (package-with-python2 python-tables))
6673
7a8ac75a
RW
6674(define-public python-pyasn1
6675 (package
6676 (name "python-pyasn1")
caa0edb3 6677 (version "0.1.9")
7a8ac75a
RW
6678 (source
6679 (origin
6680 (method url-fetch)
caa0edb3 6681 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6682 (sha256
6683 (base32
caa0edb3 6684 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6685 (build-system python-build-system)
6686 (home-page "http://pyasn1.sourceforge.net/")
6687 (synopsis "ASN.1 types and codecs")
6688 (description
6689 "This is an implementation of ASN.1 types and codecs in Python. It is
6690suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6691 (license license:bsd-2)))
7a8ac75a
RW
6692
6693(define-public python2-pyasn1
6694 (package-with-python2 python-pyasn1))
9a49a535 6695
5988c299
EF
6696(define-public python-pyasn1-modules
6697 (package
6698 (name "python-pyasn1-modules")
6699 (version "0.0.8")
6700 (source
6701 (origin
6702 (method url-fetch)
6703 (uri (pypi-uri "pyasn1-modules" version))
6704 (sha256
6705 (base32
6706 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6707 (build-system python-build-system)
5988c299
EF
6708 (propagated-inputs
6709 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 6710 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
6711 (synopsis "ASN.1 codec implementations")
6712 (description
6713 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6714implementations of ASN.1-based codecs and protocols.")
3f641af0 6715 (license license:bsd-3)))
5988c299
EF
6716
6717(define-public python2-pyasn1-modules
6718 (package-with-python2 python-pyasn1-modules))
6719
520af157 6720(define-public python-ipaddress
9a49a535 6721 (package
520af157
DC
6722 (name "python-ipaddress")
6723 (version "1.0.16")
6724 (source (origin
6725 (method url-fetch)
6726 (uri (pypi-uri "ipaddress" version))
6727 (sha256
6728 (base32
6729 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6730 (build-system python-build-system)
9a49a535
RW
6731 (home-page "https://github.com/phihag/ipaddress")
6732 (synopsis "IP address manipulation library")
6733 (description
520af157
DC
6734 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6735 in Python. This library is used to create, poke at, and manipulate IPv4 and
6736 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6737 module to older versions of Python.")
f210e944 6738 (license license:psfl)))
520af157
DC
6739
6740(define-public python2-ipaddress
f210e944 6741 (package-with-python2 python-ipaddress))
3f00e078 6742
4a238186
HG
6743(define-public python2-ipaddr
6744 (package
6745 (name "python2-ipaddr")
6746 (version "2.1.11")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (pypi-uri "ipaddr" version))
6751 (sha256
6752 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6753 (build-system python-build-system)
6754 (arguments
6755 `(#:python ,python-2 ;version 2 only
6756 #:phases
6757 (modify-phases %standard-phases
6758 (replace 'check
6759 (lambda* _
6760 (zero? (system* "python" "ipaddr_test.py")))))))
6761 (home-page "https://github.com/google/ipaddr-py")
6762 (synopsis "IP address manipulation library")
6763 (description
6764 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6765IPv6 addresses and networks.
6766
6767For new implementations you may prefer to use the standard module
6768@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6769versions of Python.")
3f641af0 6770 (license license:asl2.0)))
4a238186 6771
3f00e078
RW
6772(define-public python-idna
6773 (package
6774 (name "python-idna")
6775 (version "2.0")
6776 (source
6777 (origin
6778 (method url-fetch)
6779 (uri (string-append "https://pypi.python.org/packages/source/i/"
6780 "idna/idna-" version ".tar.gz"))
6781 (sha256
6782 (base32
6783 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6784 (build-system python-build-system)
3f00e078
RW
6785 (home-page "https://github.com/kjd/idna")
6786 (synopsis "Internationalized domain names in applications")
6787 (description
6788 "This is a library to support the Internationalised Domain Names in
6789Applications (IDNA) protocol as specified in RFC 5891. This version of the
6790protocol is often referred to as “IDNA2008” and can produce different results
6791from the earlier standard from 2003. The library is also intended to act as a
6792suitable drop-in replacement for the “encodings.idna” module that comes with
6793the Python standard library but currently only supports the older 2003
6794specification.")
3f641af0 6795 (license license:bsd-4)))
3f00e078
RW
6796
6797(define-public python2-idna
6798 (package-with-python2 python-idna))
36ebf972
RW
6799
6800(define-public python-pretend
6801 (package
6802 (name "python-pretend")
6803 (version "1.0.8")
6804 (source
6805 (origin
6806 (method url-fetch)
6807 (uri (string-append "https://pypi.python.org/packages/source/p/"
6808 "pretend/pretend-" version ".tar.gz"))
6809 (sha256
6810 (base32
6811 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6812 (build-system python-build-system)
36ebf972
RW
6813 (home-page "https://github.com/alex/pretend")
6814 (synopsis "Library for stubbing in Python")
6815 (description
6816 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6817technique for writing tests. You may hear the term mixed up with mocks,
6818fakes, or doubles. Basically, a stub is an object that returns pre-canned
6819responses, rather than doing any computation.")
3f641af0 6820 (license license:bsd-3)))
36ebf972
RW
6821
6822(define-public python2-pretend
6823 (package-with-python2 python-pretend))
aa759a51
RW
6824
6825(define-public python-cryptography-vectors
6826 (package
6827 (name "python-cryptography-vectors")
27fab2bf 6828 (version "1.7.1")
aa759a51
RW
6829 (source
6830 (origin
6831 (method url-fetch)
9c509ca9 6832 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6833 (sha256
6834 (base32
27fab2bf 6835 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 6836 (build-system python-build-system)
aa759a51 6837 (home-page "https://github.com/pyca/cryptography")
66e07664 6838 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6839 (description
6840 "This package contains test vectors for the cryptography package.")
6841 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6842 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6843
6844(define-public python2-cryptography-vectors
6845 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6846
6847(define-public python-cryptography
6848 (package
6849 (name "python-cryptography")
27fab2bf 6850 (version "1.7.1")
88b47cb0
RW
6851 (source
6852 (origin
6853 (method url-fetch)
9c509ca9 6854 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6855 (sha256
6856 (base32
27fab2bf 6857 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
6858 (build-system python-build-system)
6859 (inputs
6860 `(("openssl" ,openssl)))
6861 (propagated-inputs
6862 `(("python-cffi" ,python-cffi)
6863 ("python-six" ,python-six)
6864 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6865 ("python-idna" ,python-idna)
6866 ("python-iso8601" ,python-iso8601)))
6867 (native-inputs
6868 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6869 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6870 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6871 ("python-pyasn1" ,python-pyasn1)
6872 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6873 ("python-pytz" ,python-pytz)
6874 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6875 (home-page "https://github.com/pyca/cryptography")
6876 (synopsis "Cryptographic recipes and primitives for Python")
6877 (description
6878 "cryptography is a package which provides cryptographic recipes and
6879primitives to Python developers. It aims to be the “cryptographic standard
6880library” for Python. The package includes both high level recipes, and low
6881level interfaces to common cryptographic algorithms such as symmetric ciphers,
6882message digests and key derivation functions.")
6883 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6884 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6885 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6886
6887(define-public python2-cryptography
519e2f4f
LF
6888 (let ((crypto (package-with-python2
6889 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6890 (package (inherit crypto)
6891 (propagated-inputs
6892 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6893 ("python2-backport-ssl-match-hostname"
6894 ,python2-backport-ssl-match-hostname)
68f1cdec 6895 ("python2-enum34" ,python2-enum34)
88b47cb0 6896 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6897
6898(define-public python-pyopenssl
6899 (package
6900 (name "python-pyopenssl")
61684de2 6901 (version "16.2.0")
5af999b8
RW
6902 (source
6903 (origin
6904 (method url-fetch)
eb68d268 6905 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6906 (sha256
6907 (base32
7c6bf660
MB
6908 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
6909 (patches
6910 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 6911 (build-system python-build-system)
30e0229a 6912 (arguments
7c6bf660
MB
6913 '(#:phases
6914 (modify-phases %standard-phases
6915 (delete 'check)
6916 (add-after 'install 'check
6917 (lambda* (#:key inputs outputs #:allow-other-keys)
6918 (add-installed-pythonpath inputs outputs)
6919 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
6920 (propagated-inputs
6921 `(("python-cryptography" ,python-cryptography)
6922 ("python-six" ,python-six)))
6923 (inputs
6924 `(("openssl" ,openssl)))
30e0229a
MB
6925 (native-inputs
6926 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6927 (home-page "https://github.com/pyca/pyopenssl")
6928 (synopsis "Python wrapper module around the OpenSSL library")
6929 (description
6930 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6931library.")
3f641af0 6932 (license license:asl2.0)))
5af999b8
RW
6933
6934(define-public python2-pyopenssl
519e2f4f 6935 (package-with-python2 python-pyopenssl))
643725a1
CR
6936
6937(define-public python-pip
6938 (package
6939 (name "python-pip")
392c26b0 6940 (version "9.0.1")
643725a1
CR
6941 (source
6942 (origin
6943 (method url-fetch)
6fb54e3b 6944 (uri (pypi-uri "pip" version))
643725a1
CR
6945 (sha256
6946 (base32
392c26b0 6947 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 6948 (build-system python-build-system)
392c26b0
MC
6949 (arguments
6950 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 6951 (home-page "https://pip.pypa.io/")
392c26b0 6952 (synopsis "Package manager for Python software")
643725a1 6953 (description
392c26b0 6954 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
6955Python Package Index (PyPI).")
6956 (license license:expat)))
6957
6958(define-public python2-pip
6959 (package-with-python2 python-pip))
d8c4998f
LC
6960
6961(define-public python-tlsh
6962 (package
6963 (name "python-tlsh")
99b00dc7 6964 (version "3.4.4")
d8c4998f
LC
6965 (home-page "https://github.com/trendmicro/tlsh")
6966 (source (origin
99b00dc7
EF
6967 (method url-fetch)
6968 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6969 version ".tar.gz"))
d8c4998f
LC
6970 (sha256
6971 (base32
99b00dc7
EF
6972 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6973 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6974 (build-system cmake-build-system)
6975 (arguments
6976 '(#:out-of-source? #f
6977 #:phases (modify-phases %standard-phases
6978 (replace
6979 'install
6980 (lambda* (#:key outputs #:allow-other-keys)
6981 ;; Build and install the Python bindings. The underlying
6982 ;; C++ library is apparently not meant to be installed.
6983 (let ((out (assoc-ref outputs "out")))
6984 (with-directory-excursion "py_ext"
6985 (and (system* "python" "setup.py" "build")
6986 (system* "python" "setup.py" "install"
6987 (string-append "--prefix=" out))))))))))
6988 (inputs `(("python" ,python-wrapper))) ;for the bindings
6989 (synopsis "Fuzzy matching library for Python")
6990 (description
6991 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6992Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6993value which can be used for similarity comparisons. Similar objects have
6994similar hash values, which allows for the detection of similar objects by
6995comparing their hash values. The byte stream should have a sufficient amount
6996of complexity; for example, a byte stream of identical bytes will not generate
6997a hash value.")
3f641af0 6998 (license license:asl2.0)))
d8c4998f
LC
6999
7000(define-public python2-tlsh
7001 (package
7002 (inherit python-tlsh)
7003 (name "python2-tlsh")
7004 (inputs `(("python" ,python-2)))))
d96034ed 7005
67f66812
BW
7006(define-public python-termcolor
7007 (package
7008 (name "python-termcolor")
7009 (version "1.1.0")
7010 (source
7011 (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "python-termcolor" version))
7014 (sha256
7015 (base32
7016 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7017 (build-system python-build-system)
7018 (arguments
7019 ;; There are no tests.
7020 `(#:tests? #f))
7021 (home-page "http://pypi.python.org/pypi/termcolor")
7022 (synopsis "ANSII Color formatting for terminal output")
7023 (description
7024 "This package provides ANSII Color formatting for output in terminals.")
7025 (license license:expat)))
7026
7027(define-public python2-termcolor
7028 (package-with-python2 python-termcolor))
7029
d96034ed
LC
7030(define-public python-libarchive-c
7031 (package
7032 (name "python-libarchive-c")
03fd001c 7033 (version "2.2")
d96034ed
LC
7034 (source (origin
7035 (method url-fetch)
03fd001c 7036 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7037 (sha256
7038 (base32
03fd001c 7039 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7040 (build-system python-build-system)
7041 (arguments
7042 '(#:phases (modify-phases %standard-phases
7043 (add-before
7044 'build 'reference-libarchive
7045 (lambda* (#:key inputs #:allow-other-keys)
7046 ;; Retain the absolute file name of libarchive.so.
7047 (let ((libarchive (assoc-ref inputs "libarchive")))
7048 (substitute* "libarchive/ffi.py"
7049 (("find_library\\('archive'\\)")
7050 (string-append "'" libarchive
b41a05ce 7051 "/lib/libarchive.so'")))))))))
d96034ed 7052 (inputs
f3b98f4f 7053 `(("libarchive" ,libarchive)))
d96034ed
LC
7054 (home-page "https://github.com/Changaco/python-libarchive-c")
7055 (synopsis "Python interface to libarchive")
7056 (description
7057 "This package provides Python bindings to libarchive, a C library to
7058access possibly compressed archives in many different formats. It uses
7059Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7060 (license license:lgpl2.0+)))
d96034ed
LC
7061
7062(define-public python2-libarchive-c
7063 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7064
7065(define-public python-file
7066 (package
7067 (inherit file)
7068 (name "python-file")
7ffa5d4a
LF
7069 (source (origin
7070 (inherit (package-source file))
7071 ;; This patch should not be applied to python2-file.
7072 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7073 (build-system python-build-system)
7074 (arguments
7075 '(#:tests? #f ;no tests
00bf74be 7076 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7077 #:phases (modify-phases %standard-phases
7078 (add-before 'build 'change-directory
7079 (lambda _
7080 (chdir "python")
7081 #t))
7082 (add-before 'build 'set-library-file-name
7083 (lambda* (#:key inputs #:allow-other-keys)
7084 (let ((file (assoc-ref inputs "file")))
7085 (substitute* "magic.py"
7086 (("find_library\\('magic'\\)")
7087 (string-append "'" file "/lib/libmagic.so'")))
7088 #t))))))
7089 (inputs `(("file" ,file)))
7090 (self-native-input? #f)
daeeea71
CM
7091 (synopsis "Python bindings to the libmagic file type guesser. Note that
7092this module and the python-magic module both provide a \"magic.py\" file;
7093these two modules, which are different and were developed separately, both
f210e944 7094serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7095
7096(define-public python2-file
f210e944 7097 (package-with-python2 python-file))
85d4aeac
LC
7098
7099(define-public python-debian
7100 (package
7101 (name "python-debian")
7102 (version "0.1.23")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (string-append
7107 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
7108 version ".tar.gz"))
7109 (sha256
7110 (base32
7111 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
7112 (build-system python-build-system)
f22efa01 7113 (propagated-inputs
85d4aeac 7114 `(("python-six" ,python-six)))
85d4aeac
LC
7115 (home-page "http://packages.debian.org/sid/python-debian")
7116 (synopsis "Debian package related modules")
7117 (description
5c7bdc9a
LC
7118 ;; XXX: Use @enumerate instead of @itemize to work around
7119 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7120 "This package provides Python modules that abstract many formats of
7121Debian-related files, such as:
7122
5c7bdc9a 7123@enumerate
85d4aeac
LC
7124@item Debtags information;
7125@item @file{debian/changelog} files;
7126@item packages files, pdiffs;
7127@item control files of single or multiple RFC822-style paragraphs---e.g.
7128 @file{debian/control}, @file{.changes}, @file{.dsc};
7129@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7130 contained files and meta-information.
5c7bdc9a 7131@end enumerate\n")
85d4aeac
LC
7132
7133 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7134 (license license:gpl3+)))
85d4aeac
LC
7135
7136(define-public python2-debian
7137 (package-with-python2 python-debian))
816a6538 7138
2d321bb2
RW
7139(define-public python-nbformat
7140 (package
7141 (name "python-nbformat")
7142 (version "4.1.0")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "nbformat" version))
7147 (sha256
7148 (base32
7149 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7150 (build-system python-build-system)
7151 (arguments `(#:tests? #f)) ; no test target
7152 (propagated-inputs
7153 `(("python-ipython-genutils" ,python-ipython-genutils)
7154 ("python-jsonschema" ,python-jsonschema)
7155 ("python-jupyter-core" ,python-jupyter-core)
7156 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7157 (home-page "http://jupyter.org")
7158 (synopsis "Jupyter Notebook format")
7159 (description "This package provides the reference implementation of the
7160Jupyter Notebook format and Python APIs for working with notebooks.")
7161 (license license:bsd-3)))
7162
7163(define-public python2-nbformat
7164 (package-with-python2 python-nbformat))
7165
55436048
RW
7166(define-public python-bleach
7167 (package
7168 (name "python-bleach")
7169 (version "1.4.3")
7170 (source
7171 (origin
7172 (method url-fetch)
7173 (uri (pypi-uri "bleach" version))
7174 (sha256
7175 (base32
7176 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7177 (build-system python-build-system)
7178 (propagated-inputs
7179 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7180 ("python-six" ,python-six)))
7181 (native-inputs
7182 `(("python-nose" ,python-nose)))
7183 (home-page "http://github.com/jsocol/bleach")
7184 (synopsis "Whitelist-based HTML-sanitizing tool")
7185 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7186 (license license:asl2.0)))
7187
7188(define-public python2-bleach
7189 (package-with-python2 python-bleach))
7190
60590a3a
RW
7191(define-public python-entrypoints
7192 (package
7193 (name "python-entrypoints")
7194 (version "0.2.2")
7195 (source
7196 (origin
7197 (method url-fetch)
7198 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7199 version ".tar.gz"))
7200 (file-name (string-append name "-" version ".tar.gz"))
7201 (sha256
7202 (base32
7203 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7204 (build-system python-build-system)
7205 ;; The package does not come with a setup.py file, so we have to generate
7206 ;; one ourselves.
7207 (arguments
7208 `(#:tests? #f
7209 #:phases
7210 (modify-phases %standard-phases
7211 (add-after 'unpack 'create-setup.py
7212 (lambda _
7213 (call-with-output-file "setup.py"
7214 (lambda (port)
7215 (format port "\
7216from setuptools import setup
7217setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7218" ,version))))))))
7219 (home-page "https://github.com/takluyver/entrypoints")
7220 (synopsis "Discover and load entry points from installed Python packages")
7221 (description "Entry points are a way for Python packages to advertise
7222objects with some common interface. The most common examples are
7223@code{console_scripts} entry points, which define shell commands by
7224identifying a Python function to run. The @code{entrypoints} module contains
7225functions to find and load entry points.")
7226 (license license:expat)))
7227
7228(define-public python2-entrypoints
7229 (package-with-python2 python-entrypoints))
7230
c60898a8
RW
7231(define-public python-nbconvert
7232 (package
7233 (name "python-nbconvert")
7234 (version "5.0.0b1")
7235 (source
7236 (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "nbconvert" version))
7239 (sha256
7240 (base32
7241 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7242 (build-system python-build-system)
497355dc
MB
7243 (arguments
7244 `(;; The "bdist_egg" target is disabled by default, causing the installation
7245 ;; to fail.
7246 #:configure-flags (list "bdist_egg")
7247 ;; FIXME: 5 failures, 40 errors.
7248 #:tests? #f))
7249 ;; #:phases
7250 ;; (modify-phases %standard-phases
7251 ;; (replace 'check
7252 ;; (lambda _
7253 ;; (zero? (system* "py.test" "-v")))))
7254 (native-inputs
7255 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7256 (propagated-inputs
7257 `(("python-bleach" ,python-bleach)
7258 ("python-entrypoints" ,python-entrypoints)
7259 ("python-jinja2" ,python-jinja2)
7260 ("python-jupyter-core" ,python-jupyter-core)
7261 ("python-mistune" ,python-mistune)
7262 ("python-nbformat" ,python-nbformat)
7263 ("python-pygments" ,python-pygments)
c60898a8
RW
7264 ("python-traitlets" ,python-traitlets)))
7265 (home-page "http://jupyter.org")
7266 (synopsis "Converting Jupyter Notebooks")
7267 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7268notebooks to various other formats via Jinja templates. It allows you to
7269convert an @code{.ipynb} notebook file into various static formats including:
7270
7271@enumerate
7272@item HTML
7273@item LaTeX
7274@item PDF
7275@item Reveal JS
7276@item Markdown (md)
7277@item ReStructured Text (rst)
7278@item executable script
7279@end enumerate\n")
7280 (license license:bsd-3)))
7281
7282(define-public python2-nbconvert
7283 (package-with-python2 python-nbconvert))
7284
a0d62280
RW
7285(define-public python-notebook
7286 (package
7287 (name "python-notebook")
7288 (version "4.2.3")
7289 (source (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "notebook" version))
7292 (sha256
7293 (base32
7294 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:phases
7298 (modify-phases %standard-phases
7299 (replace 'check
7300 (lambda _
7301 ;; HOME must be set for tests
7302 (setenv "HOME" "/tmp")
7303 (zero? (system* "nosetests")))))))
7304 (propagated-inputs
7305 `(("python-jupyter-core" ,python-jupyter-core)
7306 ("python-nbformat" ,python-nbformat)
7307 ("python-nbconvert" ,python-nbconvert)
7308 ("python-ipython" ,python-ipython)))
7309 (native-inputs
7310 `(("python-nose" ,python-nose)
7311 ("python-sphinx" ,python-sphinx)
7312 ("python-requests" ,python-requests)))
7313 (home-page "http://jupyter.org/")
7314 (synopsis "Web-based notebook environment for interactive computing")
7315 (description
7316 "The Jupyter HTML notebook is a web-based notebook environment for
7317interactive computing.")
3a735ecf 7318 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7319 (license license:bsd-3)))
7320
7321(define-public python2-notebook
3a735ecf
HG
7322 (let ((base (package-with-python2
7323 (strip-python2-variant python-notebook))))
7324 (package (inherit base)
7325 (native-inputs
7326 `(("python2-mock" ,python2-mock)
7327 ,@(package-native-inputs base)))
7328 (arguments
7329 (substitute-keyword-arguments (package-arguments base)
7330 ((#:phases phases)
7331 `(modify-phases ,phases
7332 (add-before 'check 'disable-test-case
7333 ;; The test requires network access to localhost. Curiously it
7334 ;; fails with Python 2 only. Simply make the test-case return
7335 ;; immediately.
7336 (lambda _
7337 (substitute*
7338 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7339 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7340
d55724ed
RW
7341(define-public python-widgetsnbextension
7342 (package
7343 (name "python-widgetsnbextension")
7344 (version "1.2.6")
7345 (source
7346 (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "widgetsnbextension" version))
7349 (sha256
7350 (base32
7351 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7352 (build-system python-build-system)
7353 (propagated-inputs
7354 `(("python-notebook" ,python-notebook)))
7355 (native-inputs
58f5fae7
MB
7356 `(("python-certifi" ,python-certifi)
7357 ("python-nose" ,python-nose)))
d55724ed
RW
7358 (home-page "http://ipython.org")
7359 (synopsis "IPython HTML widgets for Jupyter")
7360 (description "This package provides interactive HTML widgets for Jupyter
7361notebooks.")
7362 (license license:bsd-3)))
7363
7364(define-public python2-widgetsnbextension
7365 (package-with-python2 python-widgetsnbextension))
7366
4fe2e344
RW
7367(define-public python-ipywidgets
7368 (package
7369 (name "python-ipywidgets")
7370 (version "5.2.2")
7371 (source
7372 (origin
7373 (method url-fetch)
7374 (uri (pypi-uri "ipywidgets" version))
7375 (sha256
7376 (base32
7377 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7378 (build-system python-build-system)
7379 ;; FIXME: it's not clear how to run the tests.
7380 (arguments `(#:tests? #f))
7381 (propagated-inputs
7382 `(("python-ipykernel" ,python-ipykernel)
7383 ("python-ipython" ,python-ipython)
4fe2e344
RW
7384 ("python-traitlets" ,python-traitlets)
7385 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7386 (home-page "http://ipython.org")
7387 (synopsis "IPython HTML widgets for Jupyter")
7388 (description "Ipywidgets are interactive HTML widgets for Jupyter
7389notebooks and the IPython kernel. Notebooks come alive when interactive
7390widgets are used. Users gain control of their data and can visualize changes
7391in the data.")
7392 (license license:bsd-3)))
7393
7394(define-public python2-ipywidgets
7395 (package-with-python2 python-ipywidgets))
7396
8ceebf8f
RW
7397(define-public python-jupyter-console
7398 (package
7399 (name "python-jupyter-console")
7400 (version "5.0.0")
7401 (source
7402 (origin
7403 (method url-fetch)
7404 (uri (pypi-uri "jupyter_console" version))
7405 (sha256
7406 (base32
7407 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7408 (build-system python-build-system)
7409 ;; FIXME: it's not clear how to run the tests.
7410 (arguments `(#:tests? #f))
7411 (propagated-inputs
7412 `(("python-ipykernel" ,python-ipykernel)
7413 ("python-ipython" ,python-ipython)
7414 ("python-jupyter-client" ,python-jupyter-client)
7415 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7416 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7417 (home-page "https://jupyter.org")
7418 (synopsis "Jupyter terminal console")
7419 (description "This package provides a terminal-based console frontend for
7420Jupyter kernels. It also allows for console-based interaction with non-Python
7421Jupyter kernels such as IJulia and IRKernel.")
7422 (license license:bsd-3)))
7423
7424(define-public python2-jupyter-console
7425 (package-with-python2 python-jupyter-console))
7426
c27ae827
RW
7427(define-public jupyter
7428 (package
7429 (name "jupyter")
7430 (version "1.0.0")
7431 (source
7432 (origin
7433 (method url-fetch)
7434 (uri (pypi-uri "jupyter" version))
7435 (sha256
7436 (base32
7437 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7438 (build-system python-build-system)
7439 ;; FIXME: it's not clear how to run the tests.
7440 (arguments `(#:tests? #f))
7441 (propagated-inputs
7442 `(("python-ipykernel" ,python-ipykernel)
7443 ("python-ipywidgets" ,python-ipywidgets)
7444 ("python-jupyter-console" ,python-jupyter-console)
7445 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7446 ("python-notebook" ,python-notebook)))
c27ae827
RW
7447 (home-page "http://jupyter.org")
7448 (synopsis "Web application for interactive documents")
7449 (description
7450 "The Jupyter Notebook is a web application that allows you to create and
7451share documents that contain live code, equations, visualizations and
7452explanatory text. Uses include: data cleaning and transformation, numerical
7453simulation, statistical modeling, machine learning and much more.")
7454 (license license:bsd-3)))
7455
816a6538
LC
7456(define-public python-chardet
7457 (package
7458 (name "python-chardet")
7459 (version "2.3.0")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (string-append
7464 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7465 version
7466 ".tar.gz"))
7467 (sha256
7468 (base32
7469 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7470 (build-system python-build-system)
816a6538
LC
7471 (home-page "https://github.com/chardet/chardet")
7472 (synopsis "Universal encoding detector for Python 2 and 3")
7473 (description
7474 "This package provides @code{chardet}, a Python module that can
7475automatically detect a wide range of file encodings.")
3f641af0 7476 (license license:lgpl2.1+)))
816a6538
LC
7477
7478(define-public python2-chardet
7479 (package-with-python2 python-chardet))
2fc5f186 7480
1872f1bb
KM
7481(define-public python-docopt
7482 (package
7483 (name "python-docopt")
7484 (version "0.6.2")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 ;; The release on PyPI does not include tests.
7489 (uri (string-append
7490 "https://github.com/docopt/docopt/archive/"
7491 version ".tar.gz"))
7492 (file-name (string-append name "-" version ".tar.gz"))
7493 (sha256
7494 (base32
7495 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7496 (build-system python-build-system)
7497 (native-inputs
f3b98f4f 7498 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7499 (arguments
7500 `(#:phases (alist-replace
7501 'check
7502 (lambda _ (zero? (system* "py.test")))
7503 %standard-phases)))
7504 (home-page "http://docopt.org")
7505 (synopsis "Command-line interface description language for Python")
7506 (description "This library allows the user to define a command-line
7507interface from a program's help message rather than specifying it
7508programatically with command-line parsers like @code{getopt} and
7509@code{argparse}.")
7510 (license license:expat)))
7511
7512(define-public python2-docopt
7513 (package-with-python2 python-docopt))
7514
2fc5f186
LF
7515(define-public python-zope-event
7516 (package
7517 (name "python-zope-event")
7518 (version "4.1.0")
7519 (source
7520 (origin
7521 (method url-fetch)
7522 (uri (string-append "https://pypi.python.org/packages/source/z"
7523 "/zope.event/zope.event-" version ".tar.gz"))
7524 (sha256
7525 (base32
7526 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7527 (build-system python-build-system)
2fc5f186
LF
7528 (home-page "http://pypi.python.org/pypi/zope.event")
7529 (synopsis "Event publishing system for Python")
7530 (description "Zope.event provides an event publishing API, intended for
7531use by applications which are unaware of any subscribers to their events. It
7532is a simple event-dispatching system on which more sophisticated event
7533dispatching systems can be built.")
3f641af0 7534 (license license:zpl2.1)))
2fc5f186
LF
7535
7536(define-public python2-zope-event
7537 (package-with-python2 python-zope-event))
97abe268
LF
7538
7539(define-public python-zope-interface
7540 (package
7541 (name "python-zope-interface")
7542 (version "4.1.3")
7543 (source
7544 (origin
7545 (method url-fetch)
7546 (uri (string-append "https://pypi.python.org/packages/source/z"
7547 "/zope.interface/zope.interface-" version ".tar.gz"))
7548 (sha256
7549 (base32
7550 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7551 (build-system python-build-system)
38d480a8 7552 (native-inputs
97abe268
LF
7553 `(("python-zope-event" ,python-zope-event)))
7554 (home-page "https://github.com/zopefoundation/zope.interface")
7555 (synopsis "Python implementation of the \"design by contract\"
7556methodology")
7557 (description "Zope.interface provides an implementation of \"object
7558interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7559conforming to a given API or contract.")
3f641af0 7560 (license license:zpl2.1)))
97abe268
LF
7561
7562(define-public python2-zope-interface
7563 (package-with-python2 python-zope-interface))
81f2373c
LF
7564
7565(define-public python-zope-exceptions
7566 (package
7567 (name "python-zope-exceptions")
7568 (version "4.0.8")
7569 (source
7570 (origin
7571 (method url-fetch)
7572 (uri (string-append "https://pypi.python.org/packages/source/z"
7573 "/zope.exceptions/zope.exceptions-"
7574 version ".tar.gz"))
7575 (sha256
7576 (base32
7577 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7578 (build-system python-build-system)
7579 (arguments
7580 '(#:tests? #f)) ; circular dependency with zope.testrunner
7581 (propagated-inputs
7582 `(("python-zope-interface" ,python-zope-interface)))
7583 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7584 (synopsis "Zope exceptions")
7585 (description "Zope.exceptions provides general-purpose exception types
7586that have uses outside of the Zope framework.")
3f641af0 7587 (license license:zpl2.1)))
81f2373c
LF
7588
7589(define-public python2-zope-exceptions
7590 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7591
7592(define-public python-zope-testing
7593 (package
7594 (name "python-zope-testing")
7595 (version "4.5.0")
7596 (source
7597 (origin
7598 (method url-fetch)
7599 (uri (string-append "https://pypi.python.org/packages/source/z"
7600 "/zope.testing/zope.testing-" version ".tar.gz"))
7601 (sha256
7602 (base32
b02f7a21
HG
7603 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7604 (modules '((guix build utils)))
7605 (snippet
7606 '(begin
7607 ;; Remove pre-compiled .pyc files backup files from source.
7608 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7609 #t))))
900e3c0e
LF
7610 (build-system python-build-system)
7611 (native-inputs
7612 `(("python-zope-exceptions" ,python-zope-exceptions)))
7613 (propagated-inputs
7614 `(("python-zope-interface" ,python-zope-interface)))
7615 (home-page "http://pypi.python.org/pypi/zope.testing")
7616 (synopsis "Zope testing helpers")
7617 (description "Zope.testing provides a number of testing utilities for HTML
7618forms, HTTP servers, regular expressions, and more.")
3f641af0 7619 (license license:zpl2.1)))
900e3c0e
LF
7620
7621(define-public python2-zope-testing
7622 (package-with-python2 python-zope-testing))
01614c4f
LF
7623
7624(define-public python-zope-testrunner
7625 (package
7626 (name "python-zope-testrunner")
7627 (version "4.4.9")
7628 (source
7629 (origin
7630 (method url-fetch)
7631 (uri (string-append "https://pypi.python.org/packages/source/z"
7632 "/zope.testrunner/zope.testrunner-"
7633 version ".zip"))
7634 (sha256
7635 (base32
7636 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7637 (build-system python-build-system)
385871e5
MB
7638 (arguments
7639 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7640 (native-inputs
7641 `(("python-six" ,python-six)
e408ffc3 7642 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7643 ("python-zope-exceptions" ,python-zope-exceptions)
7644 ("python-zope-testing" ,python-zope-testing)
7645 ("unzip" ,unzip)))
7646 (propagated-inputs
7647 `(("python-zope-interface" ,python-zope-interface)))
7648 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7649 (synopsis "Zope testrunner script")
7650 (description "Zope.testrunner provides a script for running Python
7651tests.")
3f641af0 7652 (license license:zpl2.1)))
01614c4f
LF
7653
7654(define-public python2-zope-testrunner
7655 (let ((base (package-with-python2 python-zope-testrunner)))
7656 (package
7657 (inherit base)
7658 (native-inputs
7659 (append (package-native-inputs base)
7660 `(("python2-subunit" ,python2-subunit)
7661 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7662
7663(define-public python-zope-i18nmessageid
7664 (package
7665 (name "python-zope-i18nmessageid")
7666 (version "4.0.3")
7667 (source
7668 (origin
7669 (method url-fetch)
7670 (uri (string-append
7671 "https://pypi.python.org/packages/source/z"
7672 "/zope.i18nmessageid/zope.i18nmessageid-"
7673 version ".tar.gz"))
7674 (sha256
7675 (base32
7676 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7677 (build-system python-build-system)
6a5c710c
LF
7678 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7679 (synopsis "Message identifiers for internationalization")
7680 (description "Zope.i18nmessageid provides facilities for declaring
7681internationalized messages within program source text.")
3f641af0 7682 (license license:zpl2.1)))
6a5c710c
LF
7683
7684(define-public python2-zope-i18nmessageid
7685 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7686
7687(define-public python-zope-schema
7688 (package
7689 (name "python-zope-schema")
7690 (version "4.4.2")
7691 (source
7692 (origin
7693 (method url-fetch)
7694 (uri (string-append "https://pypi.python.org/packages/source/z"
7695 "/zope.schema/zope.schema-" version ".tar.gz"))
7696 (sha256
7697 (base32
7698 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7699 (build-system python-build-system)
22dba2ef
MB
7700 (arguments
7701 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7702 (propagated-inputs
7703 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7704 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7705 ("python-zope-interface" ,python-zope-interface)))
7706 (native-inputs
47f77210
HG
7707 `(("python-zope-testing" ,python-zope-testing)
7708 ("python-coverage" ,python-coverage)
7709 ("python-nose" ,python-nose)))
71fb09f3
LF
7710 (home-page "http://pypi.python.org/pypi/zope.schema")
7711 (synopsis "Zope data schemas")
7712 (description "Zope.scheme provides extensions to zope.interface for
7713defining data schemas.")
3f641af0 7714 (license license:zpl2.1)))
71fb09f3
LF
7715
7716(define-public python2-zope-schema
7717 (package-with-python2 python-zope-schema))
fbac9b17
LF
7718
7719(define-public python-zope-configuration
7720 (package
7721 (name "python-zope-configuration")
7722 (version "4.0.3")
7723 (source (origin
7724 (method url-fetch)
7725 (uri (string-append "https://pypi.python.org/packages/source/z"
7726 "/zope.configuration/zope.configuration-"
7727 version ".tar.gz"))
7728 (sha256
7729 (base32
7730 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7731 (build-system python-build-system)
7e8b1bfa
MB
7732 (arguments
7733 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7734 (propagated-inputs
7735 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7736 ("python-zope-schema" ,python-zope-schema)))
7737 (home-page "http://pypi.python.org/pypi/zope.configuration")
7738 (synopsis "Zope Configuration Markup Language")
7739 (description "Zope.configuration implements ZCML, the Zope Configuration
7740Markup Language.")
3f641af0 7741 (license license:zpl2.1)))
fbac9b17
LF
7742
7743(define-public python2-zope-configuration
7744 (package-with-python2 python-zope-configuration))
2ad52086
LF
7745
7746(define-public python-zope-proxy
7747 (package
7748 (name "python-zope-proxy")
7749 (version "4.1.6")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (string-append "https://pypi.python.org/packages/source/z"
7754 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7755 (sha256
7756 (base32
7757 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7758 (build-system python-build-system)
66b3aadb
MB
7759 (arguments
7760 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7761 (propagated-inputs
7762 `(("python-zope-interface" ,python-zope-interface)))
7763 (home-page "http://pypi.python.org/pypi/zope.proxy")
7764 (synopsis "Generic, transparent proxies")
7765 (description "Zope.proxy provides generic, transparent proxies for Python.
7766Proxies are special objects which serve as mostly-transparent wrappers around
7767another object, intervening in the apparent behavior of the wrapped object
7768only when necessary to apply the policy (e.g., access checking, location
7769brokering, etc.) for which the proxy is responsible.")
3f641af0 7770 (license license:zpl2.1)))
2ad52086
LF
7771
7772(define-public python2-zope-proxy
7773 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7774
7775(define-public python-zope-location
7776 (package
7777 (name "python-zope-location")
7778 (version "4.0.3")
7779 (source
7780 (origin
7781 (method url-fetch)
7782 (uri (string-append "https://pypi.python.org/packages/source/z"
7783 "/zope.location/zope.location-" version ".tar.gz"))
7784 (sha256
7785 (base32
7786 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7787 (build-system python-build-system)
40bb8e07
MB
7788 (arguments
7789 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7790 (propagated-inputs
f404b5ea
LF
7791 `(("python-zope-proxy" ,python-zope-proxy)
7792 ("python-zope-schema" ,python-zope-schema)))
7793 (home-page "http://pypi.python.org/pypi/zope.location/")
7794 (synopsis "Zope location library")
7795 (description "Zope.location implements the concept of \"locations\" in
7796Zope3, which are are special objects that have a structural location.")
3f641af0 7797 (license license:zpl2.1)))
f404b5ea
LF
7798
7799(define-public python2-zope-location
7800 (package-with-python2 python-zope-location))
d4b77f36
LF
7801
7802(define-public python-zope-security
7803 (package
7804 (name "python-zope-security")
7805 (version "4.0.3")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (string-append "https://pypi.python.org/packages/source/z"
7810 "/zope.security/zope.security-" version ".tar.gz"))
7811 (sha256
7812 (base32
7813 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7814 (build-system python-build-system)
a74f9b12
MB
7815 (arguments
7816 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
7817 (propagated-inputs
7818 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7819 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 7820 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
7821 (native-inputs
7822 `(("python-six" ,python-six)
7823 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
7824 ("python-zope-configuration" ,python-zope-configuration)
7825 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7826 ("python-zope-testrunner" ,python-zope-testrunner)
7827 ("python-zope-testing" ,python-zope-testing)))
7828 (home-page "http://pypi.python.org/pypi/zope.security")
7829 (synopsis "Zope security framework")
7830 (description "Zope.security provides a generic mechanism to implement
7831security policies on Python objects.")
3f641af0 7832 (license license:zpl2.1)))
d4b77f36
LF
7833
7834(define-public python2-zope-security
04417662
EF
7835 (let ((zope-security (package-with-python2 python-zope-security)))
7836 (package (inherit zope-security)
7837 (propagated-inputs
7838 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7839 ,@(alist-delete
7840 "python-zope-testrunner"
7841 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7842
7843(define-public python-zope-component
7844 (package
7845 (name "python-zope-component")
7846 (version "4.2.2")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (string-append "https://pypi.python.org/packages/source/z"
7851 "/zope.component/zope.component-" version ".tar.gz"))
7852 (sha256
7853 (base32
7854 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7855 (build-system python-build-system)
7856 (arguments
7857 ;; Skip tests due to circular dependency with python-zope-security.
7858 '(#:tests? #f))
7859 (native-inputs
7860 `(("python-zope-testing" ,python-zope-testing)))
7861 (propagated-inputs
7862 `(("python-zope-event" ,python-zope-event)
7863 ("python-zope-interface" ,python-zope-interface)
7864 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7865 ("python-zope-configuration" ,python-zope-configuration)))
7866 (home-page "https://github.com/zopefoundation/zope.component")
7867 (synopsis "Zope Component Architecture")
7868 (description "Zope.component represents the core of the Zope Component
7869Architecture. Together with the zope.interface package, it provides
7870facilities for defining, registering and looking up components.")
3f641af0 7871 (license license:zpl2.1)))
a6b61b27
LF
7872
7873(define-public python2-zope-component
7874 (package-with-python2 python-zope-component))
3859ac12 7875
1ae44b80 7876(define-public python-pythondialog
b5f218be 7877 (package
1ae44b80 7878 (name "python-pythondialog")
42c4b246 7879 (version "3.4.0")
b5f218be
LF
7880 (source
7881 (origin
7882 (method url-fetch)
1ae44b80 7883 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7884 (sha256
7885 (base32
1ae44b80 7886 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7887 (build-system python-build-system)
7888 (arguments
7889 `(#:phases
7890 (modify-phases %standard-phases
7891 (add-after 'unpack 'patch-path
7892 (lambda* (#:key inputs #:allow-other-keys)
7893 (let* ((dialog (assoc-ref inputs "dialog")))
7894 ;; Since this library really wants to grovel the search path, we
7895 ;; must hardcode dialog's store path into it.
7896 (substitute* "dialog.py"
7897 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7898 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7899 #t))))
b5f218be
LF
7900 #:tests? #f)) ; no test suite
7901 (propagated-inputs
7902 `(("dialog" ,dialog)))
7903 (home-page "http://pythondialog.sourceforge.net/")
7904 (synopsis "Python interface to the UNIX dialog utility")
7905 (description "A Python wrapper for the dialog utility. Its purpose is to
7906provide an easy to use, pythonic and comprehensive Python interface to dialog.
7907This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7908 (license license:lgpl2.1)
1ae44b80
LF
7909 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7910
7911(define-public python2-pythondialog
7912 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7913 (package
7914 (inherit base)
7915 (version (package-version python-pythondialog))
7916 (source (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "python2-pythondialog" version))
7919 (sha256
7920 (base32
7921 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7922
3859ac12
LF
7923(define-public python-pyrfc3339
7924 (package
7925 (name "python-pyrfc3339")
d9aa097b 7926 (version "1.0")
3859ac12
LF
7927 (source
7928 (origin
7929 (method url-fetch)
d9aa097b 7930 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7931 (sha256
7932 (base32
d9aa097b 7933 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7934 (build-system python-build-system)
7935 (propagated-inputs
7936 `(("python-pytz" ,python-pytz)))
7937 (native-inputs
f3b98f4f 7938 `(("python-nose" ,python-nose)))
3859ac12
LF
7939 (home-page "https://github.com/kurtraschke/pyRFC3339")
7940 (synopsis "Python timestamp library")
7941 (description "Python library for generating and parsing RFC 3339-compliant
7942timestamps.")
7943 (license license:expat)))
7944
7945(define-public python2-pyrfc3339
7946 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7947
7948(define-public python-werkzeug
7949 (package
7950 (name "python-werkzeug")
bbb99d6b 7951 (version "0.11.15")
5eea2005
LF
7952 (source
7953 (origin
7954 (method url-fetch)
4b47cbfa 7955 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7956 (sha256
7957 (base32
bbb99d6b 7958 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
7959 (build-system python-build-system)
7960 (native-inputs
7961 `(("python-pytest" ,python-pytest)))
7962 (home-page "http://werkzeug.pocoo.org/")
7963 (synopsis "Utilities for WSGI applications")
7964 (description "One of the most advanced WSGI utility modules. It includes a
7965powerful debugger, full-featured request and response objects, HTTP utilities to
7966handle entity tags, cache control headers, HTTP dates, cookie handling, file
7967uploads, a powerful URL routing system and a bunch of community-contributed
7968addon modules.")
3f641af0 7969 (license license:x11)))
5eea2005
LF
7970
7971(define-public python2-werkzeug
7972 (package-with-python2 python-werkzeug))
99fffa8a
LF
7973
7974(define-public python-configobj
7975 (package
7976 (name "python-configobj")
7977 (version "5.0.6")
7978 (source (origin
7979 (method url-fetch)
7980 (uri (string-append
7981 "https://pypi.python.org/packages/source/c/configobj/"
7982 "configobj-" version ".tar.gz"))
7983 (sha256
7984 (base32
7985 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7986 ;; Patch setup.py so it looks for python-setuptools, which is
7987 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7988 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7989 (build-system python-build-system)
861f70c9 7990 (propagated-inputs
f3b98f4f 7991 `(("python-six" ,python-six)))
99fffa8a
LF
7992 (synopsis "Config file reading, writing and validation")
7993 (description "ConfigObj is a simple but powerful config file reader and
7994writer: an ini file round tripper. Its main feature is that it is very easy to
7995use, with a straightforward programmer’s interface and a simple syntax for
7996config files.")
7997 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7998 (license license:bsd-3)))
99fffa8a
LF
7999
8000(define-public python2-configobj
8001 (package-with-python2 python-configobj))
79e8a291
LF
8002
8003(define-public python-configargparse
8004 (package
8005 (name "python-configargparse")
8006 (version "0.10.0")
8007 (source (origin
8008 (method url-fetch)
8009 (uri (string-append
8010 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8011 "ConfigArgParse-" version ".tar.gz"))
8012 (sha256
8013 (base32
8014 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8015 (build-system python-build-system)
8016 (arguments
8017 ;; FIXME: Bug in test suite filed upstream:
8018 ;; https://github.com/bw2/ConfigArgParse/issues/32
8019 '(#:tests? #f))
8020 (synopsis "Replacement for argparse")
8021 (description "A drop-in replacement for argparse that allows options to also
8022be set via config files and/or environment variables.")
8023 (home-page "https://github.com/bw2/ConfigArgParse")
8024 (license license:expat)))
8025
8026(define-public python2-configargparse
8027 (package-with-python2 python-configargparse))
ab41f979
LF
8028
8029(define-public python-ndg-httpsclient
8030 (package
8031 (name "python-ndg-httpsclient")
ae476d01 8032 (version "0.4.2")
ab41f979
LF
8033 (source (origin
8034 (method url-fetch)
7be13d00 8035 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8036 (sha256
8037 (base32
ae476d01 8038 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8039 (build-system python-build-system)
a39cc016
LF
8040 (arguments
8041 '(;; The tests appear to require networking.
8042 #:tests? #f))
ab41f979
LF
8043 (propagated-inputs
8044 `(("python-pyopenssl" ,python-pyopenssl)))
8045 (synopsis "HTTPS support for Python's httplib and urllib2")
8046 (description "This is a HTTPS client implementation for httplib and urllib2
8047based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8048over the default provided with Python and importantly enables full verification
8049of the SSL peer.")
8050 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8051 (license license:bsd-3)))
ab41f979
LF
8052
8053;; python2-openssl requires special care, so package-with-python2 is
8054;; insufficient.
8055(define-public python2-ndg-httpsclient
8056 (package (inherit python-ndg-httpsclient)
8057 (name "python2-ndg-httpsclient")
8058 (arguments `(#:python ,python-2))
8059 (propagated-inputs
8060 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8061
8062(define-public python-contextlib2
8063 (package
8064 (name "python-contextlib2")
8065 (version "0.4.0")
8066 (source
8067 (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "contextlib2" version))
8070 (sha256
8071 (base32
8072 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8073 (build-system python-build-system)
8074 (arguments
8075 `(#:phases
8076 (modify-phases %standard-phases
8077 (replace 'check
8078 (lambda _ (zero?
8079 (system*
b3546174 8080 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8081 (home-page "http://contextlib2.readthedocs.org/")
8082 (synopsis "Tools for decorators and context managers")
8083 (description "This module is primarily a backport of the Python
80843.2 contextlib to earlier Python versions. Like contextlib, it
8085provides utilities for common tasks involving decorators and context
8086managers. It also contains additional features that are not part of
8087the standard library.")
3f641af0 8088 (license license:psfl)))
03f964a5
CM
8089
8090(define-public python2-contextlib2
8091 (package-with-python2 python-contextlib2))
210bf497
DT
8092
8093(define-public python-texttable
8094 (package
8095 (name "python-texttable")
8096 (version "0.8.4")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "texttable" version))
8101 (sha256
8102 (base32
8103 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8104 (build-system python-build-system)
8105 (arguments '(#:tests? #f)) ; no tests
8106 (home-page "https://github.com/foutaise/texttable/")
8107 (synopsis "Python module for creating simple ASCII tables")
8108 (description "Texttable is a Python module for creating simple ASCII
8109tables.")
3f641af0 8110 (license license:lgpl2.1+)))
210bf497
DT
8111
8112(define-public python2-texttable
8113 (package-with-python2 python-texttable))
67c52bb3
DT
8114
8115(define-public python-websocket-client
8116 (package
8117 (name "python-websocket-client")
6b810897 8118 (version "0.37.0")
67c52bb3
DT
8119 (source
8120 (origin
8121 (method url-fetch)
6b810897 8122 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8123 (sha256
8124 (base32
6b810897 8125 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8126 (build-system python-build-system)
a5333f7c
HG
8127 (propagated-inputs
8128 `(("python-six" ,python-six)))
67c52bb3
DT
8129 (home-page "https://github.com/liris/websocket-client")
8130 (synopsis "WebSocket client for Python")
8131 (description "The Websocket-client module provides the low level APIs for
8132WebSocket usage in Python programs.")
3f641af0 8133 (license license:lgpl2.1+)))
67c52bb3
DT
8134
8135(define-public python2-websocket-client
8136 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8137
8138(define-public python-atomicwrites
8139 (package
8140 (name "python-atomicwrites")
4e92d76a 8141 (version "1.1.0")
5c6eea2a
LF
8142 (source (origin
8143 (method url-fetch)
8144 (uri (pypi-uri "atomicwrites" version))
8145 (sha256
8146 (base32
4e92d76a 8147 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
8148 (build-system python-build-system)
8149 (synopsis "Atomic file writes in Python")
8150 (description "Library for atomic file writes using platform dependent tools
8f65585b 8151for atomic file system operations.")
5c6eea2a 8152 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8153 (license license:expat)))
9bb6d184
LF
8154
8155(define-public python2-atomicwrites
f210e944 8156 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8157
8158(define-public python-requests-toolbelt
8159 (package
8160 (name "python-requests-toolbelt")
c02af1c8 8161 (version "0.6.2")
561bb3cb
LF
8162 (source (origin
8163 (method url-fetch)
c02af1c8
LF
8164 (uri (string-append
8165 "https://pypi.python.org/packages/"
8166 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8167 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8168 (sha256
8169 (base32
c02af1c8 8170 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8171 (build-system python-build-system)
759aadd4
LF
8172 (native-inputs
8173 `(("python-betamax" ,python-betamax)
8174 ("python-mock" ,python-mock)
8175 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8176 (propagated-inputs
8177 `(("python-requests" ,python-requests)))
8178 (synopsis "Extensions to python-requests")
8179 (description "This is a toolbelt of useful classes and functions to be used
8180with python-requests.")
8181 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8182 (license license:asl2.0)))
d1deb90b
LF
8183
8184(define-public python-click-threading
8185 (package
8186 (name "python-click-threading")
3d2e0dbc 8187 (version "0.2.0")
d1deb90b
LF
8188 (source (origin
8189 (method url-fetch)
3d2e0dbc
LF
8190 (uri (string-append
8191 "https://pypi.python.org/packages/"
8192 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8193 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8194 (sha256
8195 (base32
3d2e0dbc 8196 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8197 (build-system python-build-system)
8198 (propagated-inputs
8199 `(("python-click" ,python-click)))
8200 (synopsis "Utilities for multithreading in Click")
8201 (description "This package provides utilities for multithreading in Click
8202applications.")
8203 (home-page "https://github.com/click-contrib/click-threading")
8204 (license license:expat)))
7b17cab9
LF
8205
8206(define-public python-click-log
8207 (package
8208 (name "python-click-log")
42734b9a 8209 (version "0.1.8")
7b17cab9
LF
8210 (source (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "click-log" version))
8213 (sha256
8214 (base32
42734b9a 8215 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8216 (build-system python-build-system)
8217 (propagated-inputs
8218 `(("python-click" ,python-click)))
8219 (synopsis "Logging for click applications")
8220 (description "This package provides a Python library for logging Click
8221applications.")
8222 (home-page "https://github.com/click-contrib/click-log")
8223 (license license:expat)))
7b3a4ee4
LF
8224
8225(define-public python-apipkg
8226 (package
8227 (name "python-apipkg")
8228 (version "1.4")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "apipkg" version))
8232 (sha256
8233 (base32
8234 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8235 (build-system python-build-system)
328bb95d 8236 (native-inputs
7b3a4ee4
LF
8237 `(("python-pytest" ,python-pytest)))
8238 (synopsis "Namespace control and lazy-import mechanism")
8239 (description "With apipkg you can control the exported namespace of a Python
8240package and greatly reduce the number of imports for your users. It is a small
8241pure Python module that works on virtually all Python versions.")
8242 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8243 (license license:expat)))
e08739c3
CAW
8244
8245(define-public python2-apipkg
f210e944 8246 (package-with-python2 python-apipkg))
848964fe
LF
8247
8248(define-public python-execnet
8249 (package
8250 (name "python-execnet")
8251 (version "1.4.1")
8252 (source (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "execnet" version))
8255 (sha256
8256 (base32
8257 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8258 (build-system python-build-system)
ca0eee9d
LF
8259 (arguments
8260 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8261 ;; The two test failures are caused by the lack of an `ssh` executable.
8262 ;; The test suite can be run with pytest after the 'install' phase.
8263 #:tests? #f))
848964fe 8264 (native-inputs
ca0eee9d
LF
8265 `(("python-pytest" ,python-pytest)
8266 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8267 (propagated-inputs
848964fe
LF
8268 `(("python-apipkg" ,python-apipkg)))
8269 (synopsis "Rapid multi-Python deployment")
8270 (description "Execnet provides a share-nothing model with
8271channel-send/receive communication for distributing execution across many
8272Python interpreters across version, platform and network barriers. It has a
8273minimal and fast API targetting the following uses:
8274@enumerate
8275@item distribute tasks to (many) local or remote CPUs
8276@item write and deploy hybrid multi-process applications
8277@item write scripts to administer multiple environments
8278@end enumerate")
8279 (home-page "http://codespeak.net/execnet/")
f210e944 8280 (license license:expat)))
16c84f90
CAW
8281
8282(define-public python2-execnet
f210e944 8283 (package-with-python2 python-execnet))
6720dbb4 8284
d5bbf806 8285(define-public python-trollius-redis
8286 (package
8287 (name "python-trollius-redis")
8288 (version "0.1.4")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "trollius_redis" version))
8293 (sha256
8294 (base32
8295 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8296 (build-system python-build-system)
8297 (home-page "https://github.com/benjolitz/trollius-redis")
8298 (synopsis "Port of asyncio-redis to trollius")
8299 (description "@code{trollius-redis} is a Redis client for Python
8300 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8301 Redis protocol.")
8302 (license license:bsd-2)))
8303
8304(define-public python2-trollius-redis
8305 (package-with-python2 python-trollius-redis))
8306
6720dbb4
LF
8307;;; The software provided by this package was integrated into pytest 2.8.
8308(define-public python-pytest-cache
8309 (package
8310 (name "python-pytest-cache")
8311 (version "1.0")
8312 (source (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "pytest-cache" version))
8315 (sha256
8316 (base32
8317 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8318 (build-system python-build-system)
f22efa01 8319 (propagated-inputs
630d938f
EF
8320 `(("python-apipkg" ,python-apipkg)
8321 ("python-execnet" ,python-execnet)
8322 ("python-py" ,python-py)
8323 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8324 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8325 (description "The pytest-cache plugin provides tools to rerun failures from
8326the last py.test invocation.")
8327 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8328 (license license:expat)))
0adc21c2
EF
8329
8330(define-public python2-pytest-cache
f210e944 8331 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8332
8333(define-public python-pytest-localserver
8334 (package
8335 (name "python-pytest-localserver")
29f20168 8336 (version "0.3.5")
d7e729fe
LF
8337 (source (origin
8338 (method url-fetch)
29f20168 8339 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8340 (sha256
8341 (base32
29f20168 8342 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8343 (build-system python-build-system)
8344 (arguments
8345 `(#:phases (modify-phases %standard-phases
8346 (replace 'check
8347 (lambda _
8348 (zero? (system* "py.test" "--genscript=runtests.py"))
8349 (zero? (system* "py.test")))))))
8350 (native-inputs
d7e729fe
LF
8351 `(("python-pytest" ,python-pytest)
8352 ("python-requests" ,python-requests)
9ba40f05 8353 ("python-six" ,python-six)))
f22efa01 8354 (propagated-inputs
9ba40f05 8355 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8356 (synopsis "Py.test plugin to test server connections locally")
8357 (description "Pytest-localserver is a plugin for the pytest testing
8358framework which enables you to test server connections locally.")
8359 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8360 (license license:expat)))
28cecbb7
LF
8361
8362(define-public python-wsgi-intercept
8363 (package
8364 (name "python-wsgi-intercept")
909fbd2b 8365 (version "1.2.2")
28cecbb7
LF
8366 (source (origin
8367 (method url-fetch)
909fbd2b
LF
8368 (uri (string-append
8369 "https://pypi.python.org/packages/"
8370 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8371 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8372 (sha256
8373 (base32
909fbd2b 8374 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8375 (build-system python-build-system)
b9fc496f
HG
8376 (propagated-inputs
8377 `(("python-six" ,python-six)))
28cecbb7 8378 (native-inputs
9d813ec1 8379 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8380 ("python-httplib2" ,python-httplib2)
8381 ("python-requests" ,python-requests)
8757f050 8382 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8383 (synopsis "Puts a WSGI application in place of a real URI for testing")
8384 (description "Wsgi_intercept installs a WSGI application in place of a real
8385URI for testing. Testing a WSGI application normally involves starting a
8386server at a local host and port, then pointing your test code to that address.
8387Instead, this library lets you intercept calls to any specific host/port
8388combination and redirect them into a WSGI application importable by your test
8389program. Thus, you can avoid spawning multiple processes or threads to test
8390your Web app.")
8391 (home-page "https://github.com/cdent/wsgi-intercept")
8392 (license license:expat)))
89b8a551
LF
8393
8394(define-public python-pytest-xprocess
8395 (package
8396 (name "python-pytest-xprocess")
8397 (version "0.9.1")
8398 (source (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "pytest-xprocess" version))
8401 (sha256
8402 (base32
8403 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8404 (build-system python-build-system)
8405 (propagated-inputs
8406 `(("python-pytest" ,python-pytest)
8407 ("python-pytest-cache" ,python-pytest-cache)
8408 ("python-psutil" ,python-psutil)))
8409 (synopsis "Pytest plugin to manage external processes across test runs")
8410 (description "Pytest-xprocess is an experimental py.test plugin for managing
8411processes across test runs.")
8412 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8413 (license license:expat)))
5c299bf0
LF
8414
8415(define-public python-icalendar
8416 (package
8417 (name "python-icalendar")
491b78a8 8418 (version "3.11.1")
5c299bf0
LF
8419 (source (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "icalendar" version))
8422 (sha256
8423 (base32
491b78a8 8424 "1bvi7rzh7scl4nmgj2n2cy7k0v3p29y15cqy2hcdnfq9mnhdr63y"))))
5c299bf0
LF
8425 (build-system python-build-system)
8426 (propagated-inputs
22d7360b 8427 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8428 ("python-pytz" ,python-pytz)))
8429 (synopsis "Python library for parsing iCalendar files")
8430 (description "The icalendar package is a parser/generator of iCalendar
8431files for use with Python.")
8432 (home-page "https://github.com/collective/icalendar")
3f641af0 8433 (license license:bsd-2)))
6bbbb53e
LF
8434
8435(define-public python-sphinxcontrib-newsfeed
8436 (package
8437 (name "python-sphinxcontrib-newsfeed")
8438 (version "0.1.4")
8439 (source (origin
8440 (method url-fetch)
8441 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8442 (sha256
8443 (base32
8444 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8445 (build-system python-build-system)
8446 (propagated-inputs
251ed7f2 8447 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8448 (synopsis "News Feed extension for Sphinx")
8449 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8450Blog, News or Announcements section to a Sphinx website.")
8451 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8452 (license license:bsd-2)))
2216e15c
SB
8453
8454(define-public python-args
8455 (package
8456 (name "python-args")
8457 (version "0.1.0")
8458 (source (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "args" version))
8461 (sha256
8462 (base32
8463 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8464 (build-system python-build-system)
2216e15c
SB
8465 (home-page "https://github.com/kennethreitz/args")
8466 (synopsis "Command-line argument parser")
8467 (description
8468 "This library provides a Python module to parse command-line arguments.")
3f641af0 8469 (license license:bsd-3)))
2216e15c
SB
8470
8471(define-public python2-args
8472 (package-with-python2 python-args))
c06a3de9
SB
8473
8474(define-public python-clint
8475 (package
8476 (name "python-clint")
8477 (version "0.5.1")
8478 (source (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "clint" version))
8481 (sha256
8482 (base32
8483 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8484 (build-system python-build-system)
6145b604
MB
8485 (arguments
8486 '(#:phases
8487 (modify-phases %standard-phases
8488 (replace 'check
8489 (lambda _
8490 (zero? (system* "py.test" "-v")))))))
8491 (native-inputs
8492 `(("python-pytest" ,python-pytest)))
f22efa01 8493 (propagated-inputs
f3b98f4f 8494 `(("python-args" ,python-args)))
c06a3de9
SB
8495 (home-page "https://github.com/kennethreitz/clint")
8496 (synopsis "Command-line interface tools")
8497 (description
8498 "Clint is a Python module filled with a set of tools for developing
8499command-line applications, including tools for colored and indented
8500output, progress bar display, and pipes.")
3f641af0 8501 (license license:isc)))
c06a3de9
SB
8502
8503(define-public python2-clint
8504 (package-with-python2 python-clint))
4ecdeef8
SB
8505
8506(define-public python-astor
8507 (package
8508 (name "python-astor")
8509 (version "0.5")
8510 (source (origin
8511 (method url-fetch)
8512 (uri (pypi-uri "astor" version))
8513 (sha256
8514 (base32
8515 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8516 (build-system python-build-system)
4ecdeef8
SB
8517 (home-page "https://github.com/berkerpeksag/astor")
8518 (synopsis "Read and write Python ASTs")
8519 (description
8520 "Astor is designed to allow easy manipulation of Python source via the
8521Abstract Syntax Tree.")
3f641af0 8522 (license license:bsd-3)))
4ecdeef8
SB
8523
8524(define-public python2-astor
8525 (package-with-python2 python-astor))
e224b7d0
SB
8526
8527(define-public python-rply
8528 (package
8529 (name "python-rply")
8530 (version "0.7.4")
8531 (source (origin
8532 (method url-fetch)
8533 (uri (pypi-uri "rply" version))
8534 (sha256
8535 (base32
8536 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8537 (build-system python-build-system)
f22efa01 8538 (propagated-inputs
f3b98f4f 8539 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8540 (home-page "https://github.com/alex/rply")
8541 (synopsis "Parser generator for Python")
8542 (description
8543 "This package provides a pure Python based parser generator, that also
8544works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8545with a new public API, and RPython support.")
3f641af0 8546 (license license:bsd-3)))
e224b7d0
SB
8547
8548(define-public python2-rply
8549 (package-with-python2 python-rply))
c3e919d7
SB
8550
8551(define-public python-hy
8552 (package
8553 (name "python-hy")
8554 (version "0.11.1")
8555 (source (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "hy" version))
8558 (sha256
8559 (base32
8560 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8561 (build-system python-build-system)
15c37077
MB
8562 (arguments
8563 '(#:phases
8564 (modify-phases %standard-phases
8565 (replace 'check
8566 (lambda _
8567 ;; Tests require write access to HOME.
8568 (setenv "HOME" "/tmp")
8569 (zero? (system* "nosetests")))))))
8570 (native-inputs
8571 `(("python-coverage" ,python-coverage)
8572 ("python-nose" ,python-nose)))
f22efa01 8573 (propagated-inputs
c3e919d7
SB
8574 `(("python-astor" ,python-astor)
8575 ("python-clint" ,python-clint)
f3b98f4f 8576 ("python-rply" ,python-rply)))
c3e919d7
SB
8577 (home-page "http://hylang.org/")
8578 (synopsis "Lisp frontend to Python")
8579 (description
8580 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8581its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8582Python at your fingertips, in Lisp form.")
8583 (license license:expat)))
8584
8585(define-public python2-hy
8586 (package-with-python2 python-hy))
7a5b944e 8587
81f7f297
EF
8588(define-public python-rauth
8589 (package
8590 (name "python-rauth")
8591 (version "0.7.2")
8592 (source
8593 (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "rauth" version))
8596 (sha256
8597 (base32
8598 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8599 (build-system python-build-system)
8600 (arguments
8601 `(#:test-target "check"))
f22efa01 8602 (propagated-inputs
81f7f297
EF
8603 `(("python-requests" ,python-requests)))
8604 (home-page "https://github.com/litl/rauth")
8605 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8606 (description
8607 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8608provides service wrappers for convenient connection initialization and
8609authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8610 (license license:expat)
8611 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8612
8613(define-public python2-rauth
0848d8d3
EF
8614 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8615 (package
8616 (inherit base)
00e10c6e 8617 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8618 ,@(package-native-inputs base))))))
81f7f297 8619
1abe448d
EF
8620(define-public python2-functools32
8621 (package
8622 (name "python2-functools32")
8623 (version "3.2.3-2")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "functools32" version))
8628 (sha256
8629 (base32
8630 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8631 (build-system python-build-system)
8632 (arguments
8633 `(#:python ,python-2
8634 #:tests? #f)) ; no test target
1abe448d
EF
8635 (home-page "https://github.com/MiCHiLU/python-functools32")
8636 (synopsis
8637 "Backport of the functools module from Python 3.2.3")
8638 (description
8639 "This package is a backport of the @code{functools} module from Python
86403.2.3 for use with older versions of Python and PyPy.")
8641 (license license:expat)))
8642
877889f3 8643(define-public python2-futures
7a5b944e 8644 (package
877889f3 8645 (name "python2-futures")
7a5b944e
EF
8646 (version "3.0.3")
8647 (source
8648 (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "futures" version))
8651 (sha256
8652 (base32
8653 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8654 (build-system python-build-system)
877889f3 8655 (arguments `(#:python ,python-2))
7a5b944e
EF
8656 (home-page "https://github.com/agronholm/pythonfutures")
8657 (synopsis
8658 "Backport of the concurrent.futures package from Python 3.2")
8659 (description
8660 "The concurrent.futures module provides a high-level interface for
8661asynchronously executing callables. This package backports the
8662concurrent.futures package from Python 3.2")
3f641af0 8663 (license license:bsd-3)))
7a5b944e 8664
5cb2fe44
EF
8665(define-public python-promise
8666 (package
8667 (name "python-promise")
8668 (version "0.4.2")
8669 (source
8670 (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "promise" version))
8673 (sha256
8674 (base32
8675 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8676 (build-system python-build-system)
8677 ;; Tests wants python-futures, which is a python2 only program, and
8678 ;; can't be found by python-promise at test time.
8679 (arguments `(#:tests? #f))
8680 (home-page "https://github.com/syrusakbary/promise")
8681 (synopsis "Promises/A+ implementation for Python")
8682 (description
8683 "Promises/A+ implementation for Python")
8684 (properties `((python2-variant . ,(delay python2-promise))))
8685 (license license:expat)))
8686
8687(define-public python2-promise
8688 (let ((promise (package-with-python2
8689 (strip-python2-variant python-promise))))
8690 (package (inherit promise)
8691 (arguments (substitute-keyword-arguments (package-arguments promise)
8692 ((#:tests? _) #t)))
8693 (native-inputs
8694 `(("python2-futures" ,python2-futures)
8695 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8696 ,@(package-native-inputs promise))))))
8697
c18f6368
EF
8698(define-public python-urllib3
8699 (package
8700 (name "python-urllib3")
6178274d 8701 (version "1.18.1")
c18f6368
EF
8702 (source
8703 (origin
8704 (method url-fetch)
8705 (uri (pypi-uri "urllib3" version))
8706 (sha256
8707 (base32
6178274d 8708 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8709 (build-system python-build-system)
8710 (arguments `(#:tests? #f))
8711 (native-inputs
f3b98f4f 8712 `(;; some packages for tests
c18f6368
EF
8713 ("python-nose" ,python-nose)
8714 ("python-mock" ,python-mock)
8715 ("python-tornado" ,python-tornado)))
8716 (propagated-inputs
8322749a 8717 `(;; extra packages for https security
c18f6368
EF
8718 ("python-certifi" ,python-certifi)
8719 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8720 ("python-pyasn1" ,python-pyasn1)
8721 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8722 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8723 (synopsis "HTTP library with thread-safe connection pooling")
8724 (description
8725 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8726can reuse the same socket connection for multiple requests, it can POST files,
8727supports url redirection and retries, and also gzip and deflate decoding.")
8728 (license license:expat)))
8729
8730(define-public python2-urllib3
8731 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8732
8733(define-public python-colorama
8734 (package
8735 (name "python-colorama")
8736 (version "0.3.3")
8737 (source
8738 (origin
8739 (method url-fetch)
8740 (uri (pypi-uri "colorama" version))
8741 (sha256
8742 (base32
8743 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8744 (build-system python-build-system)
2b2f2fc1
DT
8745 (synopsis "colored terminal text rendering for Python")
8746 (description "Colorama is a Python library for rendering colored terminal
8747text.")
8748 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8749 (license license:bsd-3)))
2b2f2fc1
DT
8750
8751(define-public python2-colorama
8752 (package-with-python2 python-colorama))
f5bcec6e
DT
8753
8754(define-public python-rsa
8755 (package
8756 (name "python-rsa")
ecd68c53 8757 (version "3.4.2")
f5bcec6e
DT
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "rsa" version))
8762 (sha256
8763 (base32
ecd68c53 8764 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8765 (build-system python-build-system)
f22efa01 8766 (propagated-inputs
f3b98f4f 8767 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8768 (synopsis "Pure-Python RSA implementation")
8769 (description "Python-RSA is a pure-Python RSA implementation. It supports
8770encryption and decryption, signing and verifying signatures, and key
8771generation according to PKCS#1 version 1.5. It can be used as a Python
8772library as well as on the command line.")
8773 (home-page "http://stuvel.eu/rsa")
3f641af0 8774 (license license:asl2.0)))
f5bcec6e
DT
8775
8776(define-public python2-rsa
8777 (package-with-python2 python-rsa))
c0aacfa5
DT
8778
8779(define-public python-pluggy
8780 (package
8781 (name "python-pluggy")
8782 (version "0.3.1")
8783 (source
8784 (origin
8785 (method url-fetch)
8786 (uri (pypi-uri "pluggy" version))
8787 (sha256
8788 (base32
8789 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8790 (build-system python-build-system)
c0aacfa5
DT
8791 (synopsis "Plugin and hook calling mechanism for Python")
8792 (description "Pluggy is an extraction of the plugin manager as used by
8793Pytest but stripped of Pytest specific details.")
8794 (home-page "https://pypi.python.org/pypi/pluggy")
8795 (license license:expat)))
8796
8797(define-public python2-pluggy
8798 (package-with-python2 python-pluggy))
a4af21ca
DT
8799
8800(define-public python-tox
8801 (package
8802 (name "python-tox")
8803 (version "2.3.1")
8804 (source
8805 (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "tox" version))
8808 (sha256
8809 (base32
8810 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8811 (build-system python-build-system)
8812 (arguments
7ba07edf
HG
8813 ;; FIXME: Tests require pytest-timeout, which itself requires
8814 ;; pytest>=2.8.0 for installation.
a4af21ca 8815 '(#:tests? #f))
482d9591
HG
8816 (propagated-inputs
8817 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8818 ("python-py" ,python-py)
482d9591 8819 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8820 (native-inputs
7ba07edf
HG
8821 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8822 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8823 (home-page "http://tox.testrun.org/")
8824 (synopsis "Virtualenv-based automation of test activities")
8825 (description "Tox is a generic virtualenv management and test command line
8826tool. It can be used to check that a package installs correctly with
8827different Python versions and interpreters, or run tests in each type of
8828supported environment, or act as a frontend to continuous integration
8829servers.")
8830 (license license:expat)))
8831
8832(define-public python2-tox
8833 (package-with-python2 python-tox))
ba9da248
DT
8834
8835(define-public python-jmespath
8836 (package
8837 (name "python-jmespath")
8838 (version "0.9.0")
8839 (source
8840 (origin
8841 (method url-fetch)
8842 (uri (pypi-uri "jmespath" version))
8843 (sha256
8844 (base32
8845 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8846 (build-system python-build-system)
52a75a83
MB
8847 (native-inputs
8848 `(("python-nose" ,python-nose)))
ba9da248
DT
8849 (synopsis "JSON Matching Expressions")
8850 (description "JMESPath (pronounced “james path”) is a Python library that
8851allows one to declaratively specify how to extract elements from a JSON
8852document.")
8853 (home-page "https://github.com/jmespath/jmespath.py")
8854 (license license:expat)))
8855
8856(define-public python2-jmespath
8857 (package-with-python2 python-jmespath))
935fcd5c
DT
8858
8859(define-public python-botocore
8860 (package
8861 (name "python-botocore")
e09f952d 8862 (version "1.4.62")
935fcd5c
DT
8863 (source
8864 (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "botocore" version))
8867 (sha256
8868 (base32
e09f952d 8869 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8870 (build-system python-build-system)
877fdac9
MB
8871 (arguments
8872 ;; FIXME: Many tests are failing.
8873 '(#:tests? #f))
482d9591 8874 (propagated-inputs
22d7360b 8875 `(("python-dateutil" ,python-dateutil)
935fcd5c 8876 ("python-docutils" ,python-docutils)
482d9591 8877 ("python-jmespath" ,python-jmespath)))
8fa6890b 8878 (native-inputs
482d9591 8879 `(("python-mock" ,python-mock)
935fcd5c 8880 ("python-nose" ,python-nose)
482d9591 8881 ("behave" ,behave)
935fcd5c 8882 ("python-tox" ,python-tox)
482d9591 8883 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8884 (home-page "https://github.com/boto/botocore")
8885 (synopsis "Low-level interface to AWS")
8886 (description "Botocore is a Python library that provides a low-level
8887interface to the Amazon Web Services (AWS) API.")
3f641af0 8888 (license license:asl2.0)))
935fcd5c
DT
8889
8890(define-public python2-botocore
8891 (package-with-python2 python-botocore))
f861b8b8
DT
8892
8893(define-public awscli
8894 (package
8895 (name "awscli")
af27e845 8896 (version "1.11.35")
f861b8b8
DT
8897 (source
8898 (origin
8899 (method url-fetch)
d5ccf71e 8900 (uri (pypi-uri name version))
f861b8b8
DT
8901 (sha256
8902 (base32
af27e845 8903 "0k6y8cg311bqak5x9pilg80w6f76dcbzm6xcdrw6rjnk6v4xwy70"))))
f861b8b8 8904 (build-system python-build-system)
482d9591 8905 (propagated-inputs
f861b8b8 8906 `(("python-colorama" ,python-colorama)
482d9591
HG
8907 ("python-botocore" ,python-botocore)
8908 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8909 ("python-docutils" ,python-docutils)
482d9591 8910 ("python-rsa" ,python-rsa)))
d4649177 8911 (native-inputs
482d9591 8912 `(("python-mock" ,python-mock)
f861b8b8 8913 ("python-nose" ,python-nose)
f861b8b8
DT
8914 ("python-sphinx" ,python-sphinx)
8915 ("python-tox" ,python-tox)
482d9591 8916 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8917 (home-page "http://aws.amazon.com/cli/")
8918 (synopsis "Command line client for AWS")
8919 (description "AWS CLI provides a unified command line interface to the
8920Amazon Web Services (AWS) API.")
3f641af0 8921 (license license:asl2.0)))
6a44697d
LF
8922
8923(define-public python-hypothesis
8924 (package
8925 (name "python-hypothesis")
bea6d94d 8926 (version "3.1.0")
6a44697d
LF
8927 (source (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "hypothesis" version))
8930 (sha256
8931 (base32
bea6d94d 8932 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8933 (build-system python-build-system)
bd100c71 8934 (native-inputs
6a44697d
LF
8935 `(("python-flake8" ,python-flake8)
8936 ("python-pytest" ,python-pytest)))
8937 (synopsis "Library for property based testing")
8938 (description "Hypothesis is a library for testing your Python code against a
8939much larger range of examples than you would ever want to write by hand. It’s
8940based on the Haskell library, Quickcheck, and is designed to integrate
8941seamlessly into your existing Python unit testing work flow.")
8942 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8943 (license license:mpl2.0)
6f068e08 8944 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8945
8946(define-public python2-hypothesis
6f068e08
EF
8947 (let ((hypothesis (package-with-python2
8948 (strip-python2-variant python-hypothesis))))
8949 (package (inherit hypothesis)
8950 (native-inputs
bd100c71
MB
8951 `(("python2-enum34" ,python2-enum34)
8952 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8953
8954(define-public python-pytest-subtesthack
8955 (package
8956 (name "python-pytest-subtesthack")
8957 (version "0.1.1")
8958 (source (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "pytest-subtesthack" version))
8961 (sha256
8962 (base32
8963 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8964 (build-system python-build-system)
7517e73c
LF
8965 (propagated-inputs
8966 `(("python-pytest" ,python-pytest)))
8967 (synopsis "Set-up and tear-down fixtures for unit tests")
8968 (description "This plugin allows you to set up and tear down fixtures within
8969unit test functions that use @code{py.test}. This is useful for using
8970@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8971function multiple times, without setting up or tearing down fixture state as is
8972normally the case.")
8973 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8974 (license license:unlicense)))
7517e73c
LF
8975
8976(define-public python2-pytest-subtesthack
8977 (package-with-python2 python-pytest-subtesthack))
0bdc1671 8978
7637de23 8979(define-public python-xdo
0bdc1671 8980 (package
7637de23 8981 (name "python-xdo")
e871c332 8982 (version "0.3")
0bdc1671
CAW
8983 (source (origin
8984 (method url-fetch)
8985 (uri (string-append
8986 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8987 "python-xdo_" version ".orig.tar.gz"))
8988 (sha256
8989 (base32
e871c332 8990 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
8991 (build-system python-build-system)
8992 (arguments
7637de23 8993 `(#:tests? #f)) ; no tests provided
0bdc1671
CAW
8994 (inputs
8995 `(("xdotool" ,xdotool)
8996 ("libX11" ,libx11)))
8997 (home-page "https://tracker.debian.org/pkg/python-xdo")
8998 (synopsis "Python library for simulating X11 keyboard/mouse input")
8999 (description "Provides bindings to libxdo for manipulating X11 via simulated
9000input. (Note that this is mostly a legacy library; you may wish to look at
9001python-xdo for newer bindings.)")
3f641af0 9002 (license license:bsd-3)))
0bdc1671 9003
7637de23
LF
9004(define-public python2-xdo
9005 (package-with-python2 python-xdo))
9006
cb34dc6c
CAW
9007(define-public python-wtforms
9008 (package
9009 (name "python-wtforms")
9010 (version "2.1")
9011 (source
9012 (origin
9013 (method url-fetch)
9014 (uri (pypi-uri "WTForms" version ".zip"))
9015 (sha256
9016 (base32
9017 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9018 (build-system python-build-system)
13c4d874
EF
9019 (arguments
9020 '(#:phases
9021 (modify-phases %standard-phases
9022 (add-after 'unpack 'remove-django-test
9023 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9024 (lambda _
9025 (substitute*
9026 "tests/runtests.py"
9027 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9028 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9029 #t)))))
cb34dc6c
CAW
9030 (native-inputs
9031 `(("unzip" ,unzip)))
9032 (home-page "http://wtforms.simplecodes.com/")
9033 (synopsis
9034 "Form validation and rendering library for Python web development")
9035 (description
9036 "WTForms is a flexible forms validation and rendering library
9037for Python web development. It is very similar to the web form API
9038available in Django, but is a standalone package.")
f210e944 9039 (license license:bsd-3)))
cb34dc6c
CAW
9040
9041(define-public python2-wtforms
f210e944 9042 (package-with-python2 python-wtforms))
50aaec25
DT
9043
9044(define-public python-mako
9045 (package
9046 (name "python-mako")
3753f2e6 9047 (version "1.0.6")
50aaec25
DT
9048 (source
9049 (origin
9050 (method url-fetch)
9051 (uri (pypi-uri "Mako" version))
9052 (sha256
9053 (base32
3753f2e6 9054 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9055 (build-system python-build-system)
482d9591
HG
9056 (propagated-inputs
9057 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9058 (native-inputs
482d9591 9059 `(("python-mock" ,python-mock)
50aaec25
DT
9060 ("python-nose" ,python-nose)))
9061 (home-page "http://www.makotemplates.org/")
9062 (synopsis "Templating language for Python")
9063 (description "Mako is a templating language for Python that compiles
9064templates into Python modules.")
f210e944 9065 (license license:expat)))
50aaec25
DT
9066
9067(define-public python2-mako
f210e944 9068 (package-with-python2 python-mako))
ae00a41f
CAW
9069
9070(define-public python-waitress
9071 (package
9072 (name "python-waitress")
9073 (version "0.8.10")
9074 (source
9075 (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "waitress" version))
9078 (sha256
9079 (base32
9080 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9081 (build-system python-build-system)
9082 (home-page "https://github.com/Pylons/waitress")
9083 (synopsis "Waitress WSGI server")
9084 (description "Waitress is meant to be a production-quality pure-Python WSGI
9085server with very acceptable performance.")
f210e944 9086 (license license:zpl2.1)))
ae00a41f
CAW
9087
9088(define-public python2-waitress
f210e944 9089 (package-with-python2 python-waitress))
778a284b
CAW
9090
9091(define-public python-wsgiproxy2
9092 (package
9093 (name "python-wsgiproxy2")
9094 (version "0.4.2")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9099 (sha256
9100 (base32
9101 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9102 (build-system python-build-system)
e359b31a
LF
9103 (arguments
9104 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9105 ;; support Python 3:
9106 ;; https://github.com/benoitc/restkit/issues/140
9107 #:tests? #f))
778a284b
CAW
9108 (native-inputs
9109 `(("unzip" ,unzip)
9110 ("python-nose" ,python-nose)
9111 ("python-coverage" ,python-coverage)))
9112 (propagated-inputs
9113 `(("python-six" ,python-six)
9114 ("python-webob" ,python-webob)))
9115 (home-page
9116 "https://github.com/gawel/WSGIProxy2/")
9117 (synopsis "WSGI Proxy with various http client backends")
9118 (description "WSGI turns HTTP requests into WSGI function calls.
9119WSGIProxy turns WSGI function calls into HTTP requests.
9120It also includes code to sign requests and pass private data,
9121and to spawn subprocesses to handle requests.")
f210e944 9122 (license license:expat)))
778a284b
CAW
9123
9124(define-public python2-wsgiproxy2
f210e944 9125 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9126
9127(define-public python-pastedeploy
9128 (package
9129 (name "python-pastedeploy")
9130 (version "1.5.2")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "PasteDeploy" version))
9135 (sha256
9136 (base32
9137 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9138 (build-system python-build-system)
9139 (native-inputs
9140 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9141 (home-page "http://pythonpaste.org/deploy/")
9142 (synopsis
9143 "Load, configure, and compose WSGI applications and servers")
9144 (description
9145 "This tool provides code to load WSGI applications and servers from URIs;
9146these URIs can refer to Python Eggs for INI-style configuration files. Paste
9147Script provides commands to serve applications based on this configuration
9148file.")
9149 (license license:expat)))
9150
9151(define-public python2-pastedeploy
9152 (package-with-python2 python-pastedeploy))
1cf53652 9153
c4a7904c
CAW
9154(define-public python-paste
9155 (package
9156 (name "python-paste")
9157 (version "2.0.2")
9158 (source
9159 (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "Paste" version))
9162 (sha256
9163 (base32
9164 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
9165 (patches (search-patches "python-paste-remove-website-test.patch"
9166 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9167 (build-system python-build-system)
9168 (native-inputs
9169 `(("python-nose" ,python-nose)))
9170 (propagated-inputs
f3b98f4f 9171 `(("python-six" ,python-six)))
c4a7904c
CAW
9172 (arguments
9173 '(;; Tests don't pass on Python 3, but work fine on Python 2.
9174 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
9175 ;; but is usable enough for the minimal amount it's used in MediaGoblin
9176 ;; still... things should be better by the next Paste release.)
9177 #:tests? #f))
9178 (home-page "http://pythonpaste.org")
9179 (synopsis
9180 "Python web development tools, focusing on WSGI")
9181 (description
9182 "Paste provides a variety of web development tools and middleware which
9183can be nested together to build web applications. Paste's design closely
9184follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9185 (license license:expat)
9186 (properties `((python2-variant . ,(delay python2-paste))))))
9187
9188(define-public python2-paste
9189 (let ((paste (package-with-python2
9190 (strip-python2-variant python-paste))))
9191 (package
9192 (inherit paste)
9193 (arguments
9194 ;; Tests are back for Python 2!
9195 `(#:tests? #t
9196 ,@(package-arguments paste))))))
9197
a8f20f63
CAW
9198(define-public python-pastescript
9199 (package
9200 (name "python-pastescript")
9201 (version "2.0.2")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "PasteScript" version))
9206 (sha256
9207 (base32
9208 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9209 (build-system python-build-system)
9210 (native-inputs
9211 `(("python-nose" ,python-nose)))
9212 (propagated-inputs
f3b98f4f 9213 `(("python-paste" ,python-paste)
a8f20f63
CAW
9214 ("python-pastedeploy" ,python-pastedeploy)))
9215 (home-page "http://pythonpaste.org/script/")
9216 (arguments
9217 '(;; Unfortunately, this requires the latest unittest2,
9218 ;; but that requires traceback2 which requires linecache2 which requires
9219 ;; unittest2. So we're skipping tests for now.
9220 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9221 ;; so in theory we could get around this situation somehow.)
9222 #:tests? #f))
9223 (synopsis
9224 "Pluggable command line tool for serving web applications and more")
9225 (description
9226 "PasteScript is a plugin-friendly command line tool which provides a
9227variety of features, from launching web applications to bootstrapping project
9228layouts.")
9229 (license license:expat)))
9230
9231(define-public python2-pastescript
9232 (package-with-python2 python-pastescript))
9233
1cf53652
CAW
9234(define-public python-pyquery
9235 (package
9236 (name "python-pyquery")
ab0c3429 9237 (version "1.2.17")
1cf53652
CAW
9238 (source
9239 (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "pyquery" version))
9242 (sha256
9243 (base32
ab0c3429 9244 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9245 (build-system python-build-system)
2ddbfa8c
LF
9246 (native-inputs
9247 `(("python-webob" ,python-webob)
9248 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9249 (propagated-inputs
9250 `(("python-lxml" ,python-lxml)
9251 ("python-cssselect" ,python-cssselect)))
9252 (home-page "https://github.com/gawel/pyquery")
9253 (synopsis "Make jQuery-like queries on xml documents")
9254 (description "pyquery allows you to make jQuery queries on xml documents.
9255The API is as much as possible the similar to jQuery. pyquery uses lxml for
9256fast xml and html manipulation.")
f210e944 9257 (license license:bsd-3)))
1cf53652
CAW
9258
9259(define-public python2-pyquery
f210e944 9260 (package-with-python2 python-pyquery))
aa6313d6
CAW
9261
9262(define-public python-webtest
9263 (package
9264 (name "python-webtest")
9265 (version "2.0.20")
9266 (source
9267 (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "WebTest" version))
9270 (sha256
9271 (base32
9272 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9273 (build-system python-build-system)
9274 (arguments
9275 `(;; Unfortunately we have to disable tests!
9276 ;; This release of WebTest is pinned to python-nose < 1.3,
9277 ;; but older versions of python-nose are plagued with the following
9278 ;; bug(s), which rears its ugly head during test execution:
9279 ;; https://github.com/nose-devs/nose/issues/759
9280 ;; https://github.com/nose-devs/nose/pull/811
9281 #:tests? #f))
9282 ;; Commented out code is no good, but in this case, once tests
9283 ;; are ready to be enabled again, we should put the following
9284 ;; in place:
9285 ;; (native-inputs
9286 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9287 ;; ; but see above comment
9288 ;; ("python-coverage" ,python-coverage)
9289 ;; ("python-mock" ,python-mock)
9290 ;; ("python-pastedeploy" ,python-pastedeploy)
9291 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9292 ;; ("python-pyquery" ,python-pyquery)))
9293 (propagated-inputs
9294 `(("python-waitress" ,python-waitress)
9295 ("python-webob" ,python-webob)
9296 ("python-six" ,python-six)
9297 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9298 (home-page "http://webtest.pythonpaste.org/")
9299 (synopsis "Helper to test WSGI applications")
9300 (description "Webtest allows you to test your Python web applications
9301without starting an HTTP server. It supports anything that supports the
9302minimum of WSGI.")
f210e944 9303 (license license:expat)))
aa6313d6
CAW
9304
9305(define-public python2-webtest
f210e944 9306 (package-with-python2 python-webtest))
4cb122cd
CAW
9307
9308(define-public python-anyjson
9309 (package
9310 (name "python-anyjson")
9311 (version "0.3.3")
9312 (source
9313 (origin
9314 (method url-fetch)
9315 (uri (pypi-uri "anyjson" version))
9316 (sha256
9317 (base32
9318 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9319 (build-system python-build-system)
9320 (arguments
9321 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9322 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9323 ;; whatever) so this transformation needs to be done before the tests
9324 ;; can be run. Maybe we could add a build step to transform beforehand
9325 ;; but it could be annoying/difficult.
9326 ;; We can enable tests for the Python 2 version, though, and do below.
9327 #:tests? #f))
9328 (home-page "http://bitbucket.org/runeh/anyjson/")
9329 (synopsis
9330 "Wraps best available JSON implementation in a common interface")
9331 (description
9332 "Anyjson loads whichever is the fastest JSON module installed
9333and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9334 (license license:bsd-3)
4cb122cd
CAW
9335 (properties `((python2-variant . ,(delay python2-anyjson))))))
9336
9337(define-public python2-anyjson
9338 (let ((anyjson (package-with-python2
9339 (strip-python2-variant python-anyjson))))
9340 (package
9341 (inherit anyjson)
9342 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9343 #:tests? #t
9344 ,@(package-arguments anyjson)))
00e10c6e 9345 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9346
9347(define-public python-amqp
9348 (package
9349 (name "python-amqp")
9350 (version "1.4.9")
9351 (source
9352 (origin
9353 (method url-fetch)
9354 (uri (pypi-uri "amqp" version))
9355 (sha256
9356 (base32
9357 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9358 (build-system python-build-system)
9359 (native-inputs
9360 `(("python-nose" ,python-nose)
9361 ("python-mock" ,python-mock)))
9362 (home-page "http://github.com/celery/py-amqp")
9363 (synopsis
9364 "Low-level AMQP client for Python (fork of amqplib)")
9365 (description
9366 "This is a fork of amqplib which was originally written by Barry Pederson.
9367It is maintained by the Celery project, and used by kombu as a pure python
9368alternative when librabbitmq is not available.")
3f641af0 9369 (license license:lgpl2.1+)
8dfceab7
CAW
9370 (properties `((python2-variant . ,(delay python2-amqp))))))
9371
9372(define-public python2-amqp
9373 (let ((amqp (package-with-python2
9374 (strip-python2-variant python-amqp))))
9375 (package
9376 (inherit amqp)
9377 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9378 ;; unmaintained. Weirdly, does not do this on the python 3
9379 ;; version?
9380 #:tests? #f
00e10c6e 9381 ,@(package-arguments amqp))))))
7d387305
CAW
9382
9383(define-public python-kombu
9384 (package
9385 (name "python-kombu")
0cb59822 9386 (version "3.0.37")
7d387305
CAW
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "kombu" version))
9391 (sha256
9392 (base32
0cb59822 9393 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9394 (build-system python-build-system)
9395 (native-inputs
9396 `(("python-mock" ,python-mock)
9397 ("python-nose" ,python-nose)))
9398 (propagated-inputs
9399 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9400 ("python-amqp" ,python-amqp)
9401 ("python-redis" ,python-redis)))
7d387305
CAW
9402 (home-page "http://kombu.readthedocs.org")
9403 (synopsis "Message passing library for Python")
9404 (description "The aim of Kombu is to make messaging in Python as easy as
9405possible by providing an idiomatic high-level interface for the AMQ protocol,
9406and also provide proven and tested solutions to common messaging problems.
9407AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9408message orientation, queuing, routing, reliability and security, for which the
9409RabbitMQ messaging server is the most popular implementation.")
3f641af0 9410 (license license:bsd-3)
7d387305
CAW
9411 (properties `((python2-variant . ,(delay python2-kombu))))))
9412
9413(define-public python2-kombu
9414 (let ((kombu (package-with-python2
9415 (strip-python2-variant python-kombu))))
9416 (package
9417 (inherit kombu)
752eb9e0
MB
9418 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9419 ;; It works fine on the python3 variant.
9420 #:tests? #f
9421 ,@(package-arguments kombu)))
328bb95d
HG
9422 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9423 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9424
9425(define-public python-billiard
9426 (package
9427 (name "python-billiard")
a6bb9e44 9428 (version "3.3.0.23")
b6f0b9fb
CAW
9429 (source
9430 (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "billiard" version))
9433 (sha256
9434 (base32
a6bb9e44 9435 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9436 (build-system python-build-system)
9437 (native-inputs
9438 `(("python-nose" ,python-nose)))
9439 (home-page "http://github.com/celery/billiard")
9440 (synopsis
9441 "Python multiprocessing fork with improvements and bugfixes")
9442 (description
9443 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9444multiprocessing package itself is a renamed and updated version of R Oudkerk's
9445pyprocessing package. This standalone variant is intended to be compatible with
9446Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9447 (license license:bsd-3)
b6f0b9fb
CAW
9448 (properties `((python2-variant . ,(delay python2-billiard))))))
9449
9450(define-public python2-billiard
9451 (let ((billiard (package-with-python2
9452 (strip-python2-variant python-billiard))))
9453 (package
9454 (inherit billiard)
00e10c6e 9455 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9456 ("python2-mock" ,python2-mock)
9457 ,@(package-native-inputs billiard))))))
22df6419
CAW
9458
9459(define-public python-celery
9460 (package
9461 (name "python-celery")
9ebe87fe 9462 (version "3.1.24")
22df6419
CAW
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "celery" version))
9467 (sha256
9468 (base32
9ebe87fe 9469 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9470 (build-system python-build-system)
9ebe87fe
LF
9471 (arguments
9472 `(#:phases
9473 (modify-phases %standard-phases
9474 ;; These tests break with Python 3.5:
9475 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9476 (replace 'check
9477 (lambda _
9478 (zero?
9479 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9480 (native-inputs
9481 `(("python-nose" ,python-nose)))
f22efa01 9482 (propagated-inputs
22df6419
CAW
9483 `(("python-pytz" ,python-pytz)
9484 ("python-billiard" ,python-billiard)
9485 ("python-kombu" ,python-kombu)))
9486 (home-page "http://celeryproject.org")
9487 (synopsis "Distributed Task Queue")
9488 (description "Celery is an asynchronous task queue/job queue based on
9489distributed message passing. It is focused on real-time operation, but
9490supports scheduling as well. The execution units, called tasks, are executed
9491concurrently on a single or more worker servers using multiprocessing,
9492Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9493synchronously (wait until ready).")
3f641af0 9494 (license license:bsd-3)
22df6419
CAW
9495 (properties `((python2-variant . ,(delay python2-celery))))))
9496
9497(define-public python2-celery
9498 (let ((celery (package-with-python2
9499 (strip-python2-variant python-celery))))
9500 (package
9501 (inherit celery)
00e10c6e 9502 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9503 ("python2-mock" ,python2-mock)
9504 ,@(package-native-inputs celery))))))
97e32948
CAW
9505
9506(define-public python-translitcodec
9507 (package
9508 (name "python-translitcodec")
9509 (version "0.4.0")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "translitcodec" version))
9514 (sha256
9515 (base32
9516 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9517 (build-system python-build-system)
9518 (arguments
9519 `(#:tests? #f)) ; no tests provided
9520 (home-page
9521 "https://github.com/claudep/translitcodec")
9522 (synopsis
9523 "Unicode to 8-bit charset transliteration codec")
9524 (description
9525 "This package contains codecs for transliterating ISO 10646 texts into
9526best-effort representations using smaller coded character sets (ASCII,
9527ISO 8859, etc.).")
f210e944 9528 (license license:expat)))
97e32948
CAW
9529
9530(define-public python2-translitcodec
f210e944 9531 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9532
9533(define-public python-editor
9534 (package
9535 (name "python-editor")
9536 (version "0.5")
9537 (source
9538 (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "python-editor" version))
9541 (sha256
9542 (base32
9543 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9544 (build-system python-build-system)
9545 (home-page
9546 "https://github.com/fmoo/python-editor")
9547 (synopsis
9548 "Programmatically open an editor, capture the result")
9549 (description
9550 "python-editor is a library that provides the editor module for
9551programmatically interfacing with your system's $EDITOR.")
f210e944 9552 (license license:asl2.0)))
0c3b90d4
CAW
9553
9554(define-public python2-editor
f210e944 9555 (package-with-python2 python-editor))
3276517c
LF
9556
9557(define-public python-sphinxcontrib-programoutput
9558 (package
9559 (name "python-sphinxcontrib-programoutput")
9560 (version "0.8")
9561 (source (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9564 (sha256
9565 (base32
9566 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9567 (build-system python-build-system)
9568 (propagated-inputs
a0a09859 9569 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9570 (synopsis "Sphinx extension to include program output")
9571 (description "A Sphinx extension to literally insert the output of arbitrary
9572commands into documents, helping you to keep your command examples up to date.")
9573 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9574 (license license:bsd-2)))
3276517c
LF
9575
9576(define-public python2-sphinxcontrib-programoutput
f210e944 9577 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9578
9579(define-public python-sphinx-repoze-autointerface
9580 (package
9581 (name "python-sphinx-repoze-autointerface")
328ae341 9582 (version "0.8")
548d7165
LF
9583 (source (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9586 (sha256
9587 (base32
328ae341 9588 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9589 (build-system python-build-system)
9590 (propagated-inputs
47c7dc4a 9591 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9592 ("python-zope-interface" ,python-zope-interface)))
9593 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9594 (description "This package defines an extension for the Sphinx documentation
9595system. The extension allows generation of API documentation by
9596introspection of @code{zope.interface} instances in code.")
9597 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9598 (license license:repoze)))
548d7165
LF
9599
9600(define-public python2-sphinx-repoze-autointerface
9601 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9602
9603(define-public python-psycopg2
9604 (package
9605 (name "python-psycopg2")
9606 (version "2.6.1")
9607 (source
9608 (origin
9609 (method url-fetch)
9610 (uri (pypi-uri "psycopg2" version))
9611 (sha256
9612 (base32
9613 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9614 (build-system python-build-system)
9615 (arguments
9616 ;; Tests would require a postgresql database "psycopg2_test"
9617 ;; and a running postgresql database management service.
9618 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9619 (inputs
9620 `(("postgresql" ,postgresql))) ; libpq
9621 (home-page "http://initd.org/psycopg/")
9622 (synopsis "Python PostgreSQL adapter")
9623 (description
9624 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9625 (license license:lgpl3+)))
b31fbea5
DM
9626
9627(define-public python2-psycopg2
f210e944 9628 (package-with-python2 python-psycopg2))
eed1a61f
LF
9629
9630(define-public python-vobject
9631 (package
9632 (name "python-vobject")
9bed9b15 9633 (version "0.9.2")
eed1a61f
LF
9634 (source (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "vobject" version))
9637 (sha256
9638 (base32
9bed9b15 9639 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9640 (build-system python-build-system)
a9871b7b
LF
9641 (arguments
9642 '(;; The test suite relies on some non-portable Windows interfaces.
9643 #:tests? #f))
f22efa01 9644 (propagated-inputs
22d7360b 9645 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
9646 ("python-pyicu" ,python-pyicu)))
9647 (synopsis "Parse and generate vCard and vCalendar files")
9648 (description "Vobject is intended to be a full featured Python package for
9649parsing and generating vCard and vCalendar files. Currently, iCalendar files
9650are supported and well tested. vCard 3.0 files are supported, and all data
9651should be imported, but only a few components are understood in a sophisticated
9652way.")
9653 (home-page "http://eventable.github.io/vobject/")
f210e944 9654 (license license:asl2.0)))
eed1a61f
LF
9655
9656(define-public python2-vobject
f210e944 9657 (package-with-python2 python-vobject))
cedac813
LF
9658
9659(define-public python-munkres
9660 (package
9661 (name "python-munkres")
38e81a2c 9662 (version "1.0.8")
cedac813
LF
9663 (source (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "munkres" version))
9666 (sha256
9667 (base32
38e81a2c 9668 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9669 (build-system python-build-system)
9670 (arguments
9671 '(#:tests? #f)) ; no test suite
9672 (home-page "http://software.clapper.org/munkres/")
9673 (synopsis "Implementation of the Munkres algorithm")
9674 (description "The Munkres module provides an implementation of the Munkres
9675algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9676useful for solving the Assignment Problem.")
3f641af0 9677 (license license:bsd-3)))
cedac813
LF
9678
9679(define-public python2-munkres
9680 (package-with-python2 python-munkres))
f3b3d78f
LF
9681
9682(define-public python-flask
9683 (package
9684 (name "python-flask")
c6c80104 9685 (version "0.11.1")
f3b3d78f
LF
9686 (source (origin
9687 (method url-fetch)
9688 (uri (pypi-uri "Flask" version))
9689 (sha256
9690 (base32
c6c80104 9691 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9692 (build-system python-build-system)
9693 (propagated-inputs
9694 `(("python-itsdangerous" ,python-itsdangerous)
9695 ("python-jinja2" ,python-jinja2)
8f35c030 9696 ("python-click" ,python-click)
f3b3d78f
LF
9697 ("python-werkzeug" ,python-werkzeug)))
9698 (home-page "https://github.com/mitsuhiko/flask/")
9699 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9700 (description "Flask is a micro web framework based on the Werkzeug toolkit
9701and Jinja2 template engine. It is called a micro framework because it does not
9702presume or force a developer to use a particular tool or library.")
f210e944 9703 (license license:bsd-3)))
f3b3d78f
LF
9704
9705(define-public python2-flask
f210e944 9706 (package-with-python2 python-flask))
603d665b 9707
a7ad802b 9708(define-public python-flask-wtf
9709 (package
9710 (name "python-flask-wtf")
9711 (version "0.13.1")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (pypi-uri "Flask-WTF" version))
9716 (sha256
9717 (base32
9718 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9719 (build-system python-build-system)
9720 (propagated-inputs
9721 `(("python-flask-babel" ,python-flask-babel)
9722 ("python-babel" ,python-babel)
9723 ("python-wtforms" ,python-wtforms)))
9724 (native-inputs
9725 `(("python-nose" ,python-nose)))
9726 (home-page "https://github.com/lepture/flask-wtf")
9727 (synopsis "Simple integration of Flask and WTForms")
9728 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9729upload, and reCAPTCHA.")
9730 (license license:bsd-3)))
9731
9732(define-public python2-flask-wtf
9733 (package-with-python2 python-flask-wtf))
9734
a2c7d88e 9735(define-public python-flask-multistatic
9736 (package
9737 (name "python-flask-multistatic")
9738 (version "1.0")
9739 (source
9740 (origin
9741 (method url-fetch)
9742 (uri (pypi-uri "flask-multistatic" version))
9743 (sha256
9744 (base32
9745 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9746 (build-system python-build-system)
9747 (propagated-inputs
9748 `(("python-flask" ,python-flask)))
9749 (home-page "https://pagure.io/flask-multistatic")
9750 (synopsis "Flask plugin to allow overriding static files")
9751 (description "@code{flask-multistatic} is a flask plugin that adds support
9752for overriding static files.")
9753 (license license:gpl3+)))
9754
9755(define-public python2-flask-multistatic
9756 (package-with-python2 python-flask-multistatic))
9757
603d665b
LF
9758(define-public python-cookies
9759 (package
9760 (name "python-cookies")
9761 (version "2.2.1")
9762 (source (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "cookies" version))
9765 (sha256
9766 (base32
9767 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9768 (build-system python-build-system)
9769 (arguments
9770 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9771 #:tests? #f))
9772 (native-inputs
9773 `(("python-pytest" ,python2-pytest)))
9774 (synopsis "HTTP cookie parser and renderer")
9775 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9776Python.")
9777 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9778 (license license:expat)))
603d665b
LF
9779
9780(define-public python2-cookies
f210e944 9781 (package-with-python2 python-cookies))
0efde7d6
LF
9782
9783(define-public python-responses
9784 (package
9785 (name "python-responses")
9786 (version "0.5.1")
9787 (source (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "responses" version))
9790 (sha256
9791 (base32
9792 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9793 (build-system python-build-system)
9794 (arguments
9795 `(;; Test suite is not distributed:
9796 ;; https://github.com/getsentry/responses/issues/38
9797 #:tests? #f))
9798 (native-inputs
d8ea5f2f 9799 `(("python-mock" ,python-mock)))
0efde7d6
LF
9800 (propagated-inputs
9801 `(("python-requests" ,python-requests)
d8ea5f2f 9802 ("python-cookies" ,python-cookies)
0efde7d6
LF
9803 ("python-six" ,python-six)))
9804 (home-page "https://github.com/getsentry/responses")
9805 (synopsis "Utility for mocking out the `requests` Python library")
9806 (description "A utility library for mocking out the `requests` Python
9807library.")
f210e944 9808 (license license:asl2.0)))
0efde7d6
LF
9809
9810(define-public python2-responses
f210e944 9811 (package-with-python2 python-responses))
76b94885 9812
b7afd018
RW
9813(define-public python-whoosh
9814 (package
9815 (name "python-whoosh")
9816 (version "2.7.4")
9817 (source
9818 (origin
9819 (method url-fetch)
9820 (uri (pypi-uri "Whoosh" version))
9821 (sha256
9822 (base32
9823 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9824 (build-system python-build-system)
9825 (native-inputs
f3b98f4f 9826 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9827 (home-page "http://bitbucket.org/mchaput/whoosh")
9828 (synopsis "Full text indexing, search, and spell checking library")
9829 (description
9830 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9831checking library.")
9832 (license license:bsd-2)))
9833
9834(define-public python2-whoosh
9835 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9836 (package (inherit whoosh)
9837 (propagated-inputs
9838 `(("python2-backport-ssl-match-hostname"
9839 ,python2-backport-ssl-match-hostname)
9840 ,@(package-propagated-inputs whoosh))))))
9841
76b94885
LF
9842(define-public python-pathlib
9843 (package
9844 (name "python-pathlib")
9845 (version "1.0.1")
9846 (source (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "pathlib" version))
9849 (sha256
9850 (base32
9851 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9852 (build-system python-build-system)
92a312dc
RW
9853 ;; The tests depend on the internal "test" module, which does not provide
9854 ;; a stable interface.
9855 (arguments `(#:tests? #f))
76b94885 9856 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9857 (synopsis "Object-oriented file system paths")
9858 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9859It offers the following advantages over using string objects:
9860
9861@enumerate
9862@item No more cumbersome use of os and os.path functions. Everything can
9863be done easily through operators, attribute accesses, and method calls.
9864@item Embodies the semantics of different path types. For example,
9865comparing Windows paths ignores casing.
9866@item Well-defined semantics, eliminating any inconsistencies or
9867ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9868@end enumerate
9869
9870Note: In Python 3.4, pathlib is now part of the standard library. For other
9871Python versions please consider python-pathlib2 instead, which tracks the
9872standard library module. This module (python-pathlib) isn't maintained
9873anymore.")
76b94885
LF
9874 (license license:expat)))
9875
9876(define-public python2-pathlib
9877 (package-with-python2 python-pathlib))
25a7db0a 9878
b7703c81
HG
9879(define-public python2-pathlib2
9880 (package
9881 (name "python2-pathlib2")
9882 (version "2.1.0")
9883 (source (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "pathlib2" version))
9886 (sha256
9887 (base32
9888 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9889 (build-system python-build-system)
49a531f5
HG
9890 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9891 ;; version is 3.4 which already includes this package as part of the
9892 ;; standard library.
b7703c81
HG
9893 (arguments
9894 `(#:python ,python-2))
9895 (native-inputs
f3b98f4f 9896 `(("python2-six" ,python2-six)))
b7703c81
HG
9897 (home-page "http://pypi.python.org/pypi/pathlib2/")
9898 (synopsis "Object-oriented file system paths - backport of standard
9899pathlib module")
9900 (description "The goal of pathlib2 is to provide a backport of standard
9901pathlib module which tracks the standard library module, so all the newest
9902features of the standard pathlib can be used also on older Python versions.
9903
9904Pathlib offers a set of classes to handle file system paths. It offers the
9905following advantages over using string objects:
9906
9907@enumerate
9908@item No more cumbersome use of os and os.path functions. Everything can
9909be done easily through operators, attribute accesses, and method calls.
9910@item Embodies the semantics of different path types. For example,
9911comparing Windows paths ignores casing.
9912@item Well-defined semantics, eliminating any inconsistencies or
9913ambiguities (forward vs. backward slashes, etc.).
9914@end enumerate")
9915 (license license:expat)))
9916
25a7db0a
LF
9917(define-public python-jellyfish
9918 (package
9919 (name "python-jellyfish")
8c4964dd 9920 (version "0.5.6")
25a7db0a
LF
9921 (source (origin
9922 (method url-fetch)
9923 (uri (pypi-uri "jellyfish" version))
9924 (sha256
9925 (base32
8c4964dd 9926 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9927 (build-system python-build-system)
9928 (native-inputs
9929 `(("python-pytest" ,python-pytest)))
9930 (home-page "https://github.com/jamesturk/jellyfish")
9931 (synopsis "Approximate and phonetic matching of strings")
9932 (description "Jellyfish uses a variety of string comparison and phonetic
9933encoding algorithms to do fuzzy string matching.")
3f641af0 9934 (license license:bsd-2)
25a7db0a
LF
9935 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9936
9937(define-public python2-jellyfish
9938 (let ((jellyfish (package-with-python2
9939 (strip-python2-variant python-jellyfish))))
9940 (package (inherit jellyfish)
00e10c6e 9941 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9942 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9943
9944(define-public python2-unicodecsv
9945 (package
9946 (name "python2-unicodecsv")
9947 (version "0.14.1")
9948 (source (origin
9949 (method url-fetch)
9950 ;; The test suite is not included in the PyPi release.
9951 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9952 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9953 "archive/" version ".tar.gz"))
9954 (file-name (string-append name "-" version ".tar.gz"))
9955 (sha256
9956 (base32
9957 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9958 (build-system python-build-system)
9959 (arguments
9960 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9961 #:python ,python-2))
9962 (native-inputs
f3b98f4f 9963 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9964 (home-page "https://github.com/jdunck/python-unicodecsv")
9965 (synopsis "Unicode CSV module for Python 2")
9966 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9967module, adding support for Unicode strings.")
3f641af0 9968 (license license:bsd-2)))
064503aa
LF
9969
9970(define-public python-rarfile
9971 (package
9972 (name "python-rarfile")
67824447 9973 (version "2.8")
064503aa
LF
9974 (source (origin
9975 (method url-fetch)
9976 (uri (pypi-uri "rarfile" version))
9977 (sha256
9978 (base32
67824447 9979 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9980 (build-system python-build-system)
9981 (arguments
9982 '(#:phases
9983 (modify-phases %standard-phases
9984 (replace 'check
9985 ;; Many tests fail, but the installation proceeds.
9986 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9987 (native-inputs
9988 `(("which" ,which))) ; required for tests
9989 (propagated-inputs
9990 `(("libarchive" ,libarchive)))
9991 (home-page "https://github.com/markokr/rarfile")
9992 (synopsis "RAR archive reader for Python")
9993 (description "This is Python module for RAR archive reading. The interface
9994is made as zipfile like as possible.")
3f641af0 9995 (license license:isc)))
064503aa
LF
9996
9997(define-public python2-rarfile
9998 (package-with-python2 python-rarfile))
daeeea71
CM
9999
10000(define-public python-magic
10001 (package
10002 (name "python-magic")
10003 (version "0.4.3")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10008 version ".tar.gz"))
10009 (sha256
10010 (base32
10011 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10012 (file-name (string-append name "-" version "-checkout"))))
10013 (build-system python-build-system)
10014 (arguments
10015 ;; The tests are unreliable, so don't run them. The tests fail
10016 ;; under Python3 because they were written for Python2 and
10017 ;; contain import statements that do not work in Python3. One of
10018 ;; the tests fails under Python2 because its assertions are
10019 ;; overly stringent; it relies on comparing output strings which
10020 ;; are brittle and can change depending on the version of
10021 ;; libmagic being used and the system on which the test is
10022 ;; running. In my case, under GuixSD 0.10.0, only one test
10023 ;; failed, and it seems to have failed only because the version
10024 ;; of libmagic that is packaged in Guix outputs a slightly
10025 ;; different (but not wrong) string than the one that the test
10026 ;; expected.
10027 '(#:tests? #f
10028 #:phases (modify-phases %standard-phases
10029 ;; Replace a specific method call with a hard-coded
10030 ;; path to the necessary libmagic.so file in the
10031 ;; store. If we don't do this, then the method call
10032 ;; will fail to find the libmagic.so file, which in
10033 ;; turn will cause any application using
10034 ;; python-magic to fail.
10035 (add-before 'build 'hard-code-path-to-libmagic
10036 (lambda* (#:key inputs #:allow-other-keys)
10037 (let ((file (assoc-ref inputs "file")))
10038 (substitute* "magic.py"
10039 (("ctypes.util.find_library\\('magic'\\)")
10040 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10041 #t)))
10042 (add-before 'install 'disable-egg-compression
10043 (lambda _
10044 (let ((port (open-file "setup.cfg" "a")))
10045 (display "\n[easy_install]\nzip_ok = 0\n"
10046 port)
10047 (close-port port)
10048 #t))))))
daeeea71
CM
10049 (inputs
10050 ;; python-magic needs to be able to find libmagic.so.
10051 `(("file" ,file)))
10052 (home-page "https://github.com/ahupp/python-magic")
10053 (synopsis "File type identification using libmagic")
10054 (description
10055 "This module uses ctypes to access the libmagic file type
10056identification library. It makes use of the local magic database and
10057supports both textual and MIME-type output. Note that this module and
10058the python-file module both provide a \"magic.py\" file; these two
10059modules, which are different and were developed separately, both serve
10060the same purpose: to provide Python bindings for libmagic.")
10061 (license license:expat)))
10062
10063(define-public python2-magic
10064 (package-with-python2 python-magic))
12af303f
CM
10065
10066(define-public python2-s3cmd
10067 (package
10068 (name "python2-s3cmd")
10069 (version "1.6.1")
10070 (source
10071 (origin
10072 (method url-fetch)
de67e922 10073 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10074 "s3cmd-" version ".tar.gz"))
10075 (sha256
10076 (base32
10077 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10078 (build-system python-build-system)
10079 (arguments
10080 ;; s3cmd is written for python2 only and contains no tests.
10081 `(#:python ,python-2
10082 #:tests? #f))
f22efa01 10083 (propagated-inputs
12af303f
CM
10084 `(("python2-dateutil" ,python2-dateutil)
10085 ;; The python-file package also provides a magic.py module.
10086 ;; This is an unfortunate state of affairs; however, s3cmd
10087 ;; fails to install if it cannot find specifically the
10088 ;; python-magic package. Thus we include it, instead of using
10089 ;; python-file. Ironically, s3cmd sometimes works better
10090 ;; without libmagic bindings at all:
10091 ;; https://github.com/s3tools/s3cmd/issues/198
10092 ("python2-magic" ,python2-magic)))
10093 (home-page "http://s3tools.org/s3cmd")
10094 (synopsis "Command line tool for S3-compatible storage services")
10095 (description
10096 "S3cmd is a command line tool for uploading, retrieving and managing data
10097in storage services that are compatible with the Amazon Simple Storage
10098Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10099GnuPG encryption, and more. It also supports management of Amazon's
10100CloudFront content delivery network.")
3f641af0 10101 (license license:gpl2+)))
4323a5f0
AE
10102
10103(define-public python-pkgconfig
10104 (package
10105 (name "python-pkgconfig")
10106 (version "1.1.0")
10107 (source
10108 (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "pkgconfig" version))
10111 (sha256
10112 (base32
10113 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10114 (build-system python-build-system)
10115 (native-inputs
f3b98f4f 10116 `(("python-nose" ,python-nose)))
4323a5f0
AE
10117 (inputs
10118 `(("pkg-config" ,pkg-config)))
10119 (arguments
10120 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10121 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10122 #:tests? #f
4323a5f0
AE
10123 ;; Hard-code the path to pkg-config.
10124 #:phases
10125 (modify-phases %standard-phases
10126 (add-before
10127 'build 'patch
10128 (lambda _
10129 (substitute* "pkgconfig/pkgconfig.py"
10130 (("cmd = 'pkg-config")
10131 (string-append "cmd = '" (which "pkg-config"))))
10132 #t)))))
10133 (home-page "http://github.com/matze/pkgconfig")
10134 (synopsis "Python interface for pkg-config")
10135 (description "This module provides a Python interface to pkg-config. It
10136can be used to find all pkg-config packages, check if a package exists,
10137check if a package meets certain version requirements, query CFLAGS and
10138LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10139 (license license:expat)))
4323a5f0
AE
10140
10141(define-public python2-pkgconfig
10142 (package-with-python2 python-pkgconfig))
10143
2e697322
BW
10144(define-public python-bz2file
10145 (package
10146 (name "python-bz2file")
10147 (version "0.98")
10148 (source
10149 (origin
10150 (method url-fetch)
10151 (uri (pypi-uri "bz2file" version))
10152 (sha256
10153 (base32
10154 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10155 (build-system python-build-system)
10156 (arguments
124df723 10157 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10158 (home-page "https://github.com/nvawda/bz2file")
10159 (synopsis "Read and write bzip2-compressed files")
10160 (description
10161 "Bz2file is a Python library for reading and writing bzip2-compressed
10162files. It contains a drop-in replacement for the I/O interface in the
10163standard library's @code{bz2} module, including features from the latest
10164development version of CPython that are not available in older releases.")
3f641af0 10165 (license license:asl2.0)
2e697322
BW
10166 (properties `((python2-variant . ,(delay python2-bz2file))))))
10167
10168(define-public python2-bz2file
10169 (let ((base (package-with-python2
10170 (strip-python2-variant python-bz2file))))
10171 (package
10172 (inherit base)
124df723 10173 (arguments
752bb447
BW
10174 `(#:python ,python-2
10175 #:phases
124df723
BW
10176 (modify-phases %standard-phases
10177 ;; 'python setup.py test' does not work as of 0.98.
10178 ;; There is only the one test file, so we run it directly.
10179 (replace 'check
10180 (lambda _ (zero? (system* "python"
10181 "test_bz2file.py"))))))))))
2e697322 10182
da4ac1aa
BW
10183(define-public python-future
10184 (package
10185 (name "python-future")
10186 (version "0.15.2")
10187 (source
10188 (origin
10189 (method url-fetch)
10190 (uri (pypi-uri "future" version))
10191 (sha256
10192 (base32
10193 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10194 (build-system python-build-system)
10195 ;; Many tests connect to the network or are otherwise flawed.
10196 ;; https://github.com/PythonCharmers/python-future/issues/210
10197 (arguments
10198 `(#:tests? #f))
10199 (home-page "http://python-future.org")
10200 (synopsis "Single-source support for Python 3 and 2")
10201 (description
10202 "@code{python-future} is the missing compatibility layer between Python 2 and
10203Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10204to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10205 (license license:expat)))
da4ac1aa
BW
10206
10207(define-public python2-future
f210e944 10208 (package-with-python2 python-future))
da4ac1aa 10209
8e451885
AE
10210(define-public python-cysignals
10211 (package
10212 (name "python-cysignals")
10213 (version "1.1.0")
10214 (source
10215 (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10218 (sha256
10219 (base32
10220 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10221 (build-system python-build-system)
10222 (native-inputs
10223 `(("python-cython" ,python-cython)
8e451885
AE
10224 ("python-sphinx" ,python-sphinx)))
10225 (inputs
10226 `(("pari-gp" ,pari-gp)))
10227 (arguments
10228 `(#:modules ((guix build python-build-system)
10229 ((guix build gnu-build-system) #:prefix gnu:)
10230 (guix build utils))
10231 ;; FIXME: Tests are executed after installation and currently fail
10232 ;; when not installing into standard locations; the author is working
10233 ;; on a fix.
10234 #:tests? #f
10235 #:phases
10236 (modify-phases %standard-phases
10237 (add-before
10238 'build 'configure
10239 (assoc-ref gnu:%standard-phases 'configure)))))
10240 (home-page
10241 "https://github.com/sagemath/cysignals")
10242 (synopsis
10243 "Handling of interrupts and signals for Cython")
10244 (description
10245 "The cysignals package provides mechanisms to handle interrupts (and
10246other signals and errors) in Cython code, using two related approaches,
10247for mixed Cython/Python code or external C libraries and pure Cython code,
10248respectively.")
3f641af0 10249 (license license:lgpl3+)))
8e451885
AE
10250
10251(define-public python2-cysignals
10252 (package-with-python2 python-cysignals))
10253
63bcec71
DM
10254(define-public python2-shedskin
10255 (package
10256 (name "python2-shedskin")
10257 (version "0.9.4")
10258 (source
10259 (origin
10260 (method url-fetch)
10261 (uri (string-append "https://github.com/shedskin/shedskin/"
10262 "releases/download/v" version
10263 "/shedskin-" version ".tgz"))
10264 (sha256
10265 (base32
10266 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10267 (build-system python-build-system)
10268 (arguments
10269 `(#:python ,python-2
10270 #:phases (modify-phases %standard-phases
10271 (add-after 'unpack 'fix-resulting-include-libs
10272 (lambda* (#:key inputs #:allow-other-keys)
10273 (let ((libgc (assoc-ref inputs "libgc"))
10274 (pcre (assoc-ref inputs "pcre")))
10275 (substitute* "shedskin/makefile.py"
10276 (("variable == 'CCFLAGS':[ ]*")
10277 (string-append "variable == 'CCFLAGS':\n"
10278 " line += ' -I " pcre "/include"
10279 " -I " libgc "/include'"))
10280 (("variable == 'LFLAGS':[ ]*")
10281 (string-append "variable == 'LFLAGS':\n"
10282 " line += ' -L" pcre "/lib"
10283 " -L " libgc "/lib'")))
10284 #t))))))
63bcec71
DM
10285 (inputs `(("pcre" ,pcre)
10286 ("libgc" ,libgc)))
10287 (home-page "https://shedskin.github.io/")
10288 (synopsis "Experimental Python-2 to C++ Compiler")
10289 (description (string-append "This is an experimental compiler for a subset of
10290Python. It generates C++ code and a Makefile."))
3f641af0 10291 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10292
10293(define-public python2-rope
10294 (package
10295 (name "python2-rope")
10296 (version "0.10.3")
10297 (source
10298 (origin
10299 (method url-fetch)
10300 (uri (pypi-uri "rope" version))
10301 (sha256
10302 (base32
10303 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10304 (arguments
10305 ;; Rope is currently python-2 only.
10306 ;; https://github.com/python-rope/rope/issues/57
10307 `(#:python ,python-2))
10308 (build-system python-build-system)
10309 (native-inputs
f3b98f4f 10310 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10311 (home-page "https://github.com/python-rope/rope")
10312 (synopsis "Refactoring library for Python")
10313 (description "Rope is a refactoring library for Python. It facilitates
10314the renaming, moving and extracting of attributes, functions, modules, fields
10315and parameters in Python 2 source code. These refactorings can also be applied
10316to occurences in strings and comments.")
3f641af0 10317 (license license:gpl2)))
6ba8ca17
10318
10319(define-public python-py3status
10320 (package
10321 (name "python-py3status")
d2262d70 10322 (version "3.1")
6ba8ca17
10323 (source
10324 (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "py3status" version))
10327 (sha256
10328 (base32
d2262d70 10329 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10330 (build-system python-build-system)
8653c1d5
MB
10331 (arguments
10332 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10333 (home-page "https://github.com/ultrabug/py3status")
10334 (synopsis "Extensible i3status wrapper written in Python")
10335 (description "py3status is an i3status wrapper which extends i3status
10336functionality in a modular way, allowing you to extend your panel with your
10337own code, responding to click events and updating clock every second.")
3f641af0 10338 (license license:bsd-3)))
b8fdbca3
HG
10339
10340(define-public python-tblib
10341 (package
10342 (name "python-tblib")
10343 (version "1.3.0")
10344 (source (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "tblib" version))
10347 (sha256 (base32
10348 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10349 (build-system python-build-system)
10350 (arguments
10351 `(#:phases
10352 (modify-phases %standard-phases
10353 (replace 'check
10354 (lambda _
10355 ;; Upstream runs tests after installation and the package itself
10356 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10357 ;; found.
10358 (setenv "PYTHONPATH"
10359 (string-append (getcwd) "/build/lib:"
10360 (getenv "PYTHONPATH")))
10361 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10362 (native-inputs
10363 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10364 ("python-six" ,python-six)))
10365 (home-page "https://github.com/ionelmc/python-tblib")
10366 (synopsis "Traceback serialization library")
10367 (description
10368 "Traceback serialization allows you to:
10369
10370@enumerate
10371@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10372different processes. This allows better error handling when running code over
10373multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10374
10375@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10376@end enumerate\n")
3f641af0 10377 (license license:bsd-3)))
b8fdbca3
HG
10378
10379(define-public python2-tblib
10380 (package-with-python2 python-tblib))
1a024de4
HG
10381
10382(define-public python-sqlparse
10383 (package
10384 (name "python-sqlparse")
10385 (version "0.1.19")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "sqlparse" version))
10389 (sha256
10390 (base32
10391 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10392 (build-system python-build-system)
10393 (arguments
10394 `(#:phases
10395 (modify-phases %standard-phases
10396 (replace 'check
10397 (lambda* _
10398 ;; setup.py-integrated 2to3 only affects the build files, but
10399 ;; py.test is using the source files. So we need to convert them
10400 ;; manually.
10401 (when (zero? (system* "python3"))
10402 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10403 (zero? (system* "py.test")))))))
10404 (native-inputs
f3b98f4f 10405 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10406 (home-page "https://github.com/andialbrecht/sqlparse")
10407 (synopsis "Non-validating SQL parser")
10408 (description "Sqlparse is a non-validating SQL parser for Python. It
10409provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10410 (license license:bsd-3)))
1a024de4
HG
10411
10412(define-public python2-sqlparse
10413 (package-with-python2 python-sqlparse))
68b9d242
SB
10414
10415(define-public python-greenlet
10416 (package
10417 (name "python-greenlet")
1f89fb16 10418 (version "0.4.11")
68b9d242
SB
10419 (source (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "greenlet" version))
10422 (sha256
10423 (base32
1f89fb16 10424 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10425 (build-system python-build-system)
68b9d242
SB
10426 (home-page "https://greenlet.readthedocs.io/")
10427 (synopsis "Lightweight in-process concurrent programming")
10428 (description
10429 "Greenlet package is a spin-off of Stackless, a version of CPython
10430that supports micro-threads called \"tasklets\". Tasklets run
10431pseudo-concurrently (typically in a single or a few OS-level threads) and
10432are synchronized with data exchanges on \"channels\".")
3f641af0 10433 (license (list license:psfl license:expat))))
68b9d242
SB
10434
10435(define-public python2-greenlet
10436 (package-with-python2 python-greenlet))
d79a343b
SB
10437
10438(define-public python-gevent
10439 (package
10440 (name "python-gevent")
10441 (version "1.1.1")
10442 (source (origin
10443 (method url-fetch)
10444 (uri (pypi-uri "gevent" version))
10445 (sha256
10446 (base32
10447 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10448 (modules '((guix build utils)))
10449 (snippet
10450 '(begin
10451 ;; unbunding libev and c-ares
10452 (for-each delete-file-recursively '("libev" "c-ares"))
10453 ;; fixing testsuite
10454 (call-with-output-file "greentest/__init__.py" noop)
10455 (substitute* "greentest/testrunner.py"
10456 (("import util") "from . import util")
10457 (("from util import log") "from .util import log"))))))
10458 (build-system python-build-system)
10459 (propagated-inputs
10460 `(("python-greenlet" ,python-greenlet)))
10461 (native-inputs
f3b98f4f 10462 `(("python-six" ,python-six)))
d79a343b
SB
10463 (inputs
10464 `(("c-ares" ,c-ares)
10465 ("libev" ,libev)))
10466 (home-page "http://www.gevent.org/")
10467 (synopsis "Coroutine-based network library")
10468 (description
10469 "gevent is a coroutine-based Python networking library that uses greenlet
10470to provide a high-level synchronous API on top of the libev event loop.")
10471 (license license:expat)))
10472
10473(define-public python2-gevent
10474 (package-with-python2 python-gevent))
da3aeeb6
SB
10475
10476(define-public python-twisted
10477 (package
10478 (name "python-twisted")
10479 (version "16.2.0")
10480 (source (origin
10481 (method url-fetch)
8ea8e8d3 10482 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10483 (sha256
10484 (base32
10485 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10486 (build-system python-build-system)
a960e73f
MB
10487 (arguments
10488 '(#:tests? #f)) ; FIXME: Some tests are failing.
10489 ;; #:phases
10490 ;; (modify-phases %standard-phases
10491 ;; (replace 'check
10492 ;; (lambda _
10493 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10494 (propagated-inputs
10495 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10496 (home-page "https://twistedmatrix.com/")
10497 (synopsis "Asynchronous networking framework written in Python")
10498 (description
10499 "Twisted is an extensible framework for Python programming, with special
10500focus on event-based network programming and multiprotocol integration.")
10501 (license license:expat)))
10502
10503(define-public python2-twisted
10504 (package-with-python2 python-twisted))
d0b6fed6 10505
4d3fa5a4
EF
10506(define-public python-pika
10507 (package
10508 (name "python-pika")
10509 (version "0.10.0")
10510 (source
10511 (origin
10512 (method url-fetch)
10513 (uri (pypi-uri "pika" version))
10514 (sha256
10515 (base32
10516 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10517 (build-system python-build-system)
10518 (native-inputs
269d9172
LF
10519 `(("python-pyev" ,python-pyev)
10520 ("python-tornado" ,python-tornado)
10521 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10522 (home-page "https://pika.readthedocs.org")
10523 (synopsis "Pure Python AMQP Client Library")
10524 (description
10525 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10526Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10527network support library.")
10528 (license license:bsd-3)))
10529
10530(define-public python2-pika
10531 (package-with-python2 python-pika))
10532
d0b6fed6
DM
10533(define-public python-ply
10534 (package
10535 (name "python-ply")
234ade2d 10536 (version "3.9")
d0b6fed6
DM
10537 (source
10538 (origin
10539 (method url-fetch)
234ade2d 10540 (uri (pypi-uri "ply" version))
d0b6fed6
DM
10541 (sha256
10542 (base32
234ade2d 10543 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
10544 (build-system python-build-system)
10545 (home-page "http://www.dabeaz.com/ply/")
10546 (synopsis "Python Lex & Yacc")
10547 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10548It uses LR parsing and does extensive error checking.")
f210e944 10549 (license license:bsd-3)))
d0b6fed6
DM
10550
10551(define-public python2-ply
f210e944 10552 (package-with-python2 python-ply))
d951bd54
SB
10553
10554(define-public python-tabulate
10555 (package
10556 (name "python-tabulate")
10557 (version "0.7.5")
10558 (source (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "tabulate" version))
10561 (sha256
10562 (base32
10563 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10564 ;; Fix tests
10565 (modules '((guix build utils)))
10566 (snippet '(substitute* '("test/test_cli.py"
10567 "test/test_input.py"
10568 "test/test_output.py"
10569 "test/test_regression.py")
10570 (("from common") "from nose.tools")))))
10571 (build-system python-build-system)
10572 (native-inputs
f3b98f4f 10573 `(;; For testing
d951bd54
SB
10574 ("python-nose" ,python-nose)))
10575 (home-page "https://bitbucket.org/astanin/python-tabulate")
10576 (synopsis "Pretty-print tabular data")
10577 (description
10578 "Tabulate is a library and command-line utility to pretty-print tabular
10579data in Python.")
10580 (license license:expat)))
10581
10582(define-public python2-tabulate
10583 (package-with-python2 python-tabulate))
1c4c8a33
SB
10584
10585(define-public python-kazoo
10586 (package
10587 (name "python-kazoo")
10588 (version "2.2.1")
10589 (source
10590 (origin
10591 (method url-fetch)
10592 (uri (pypi-uri "kazoo" version))
10593 (sha256
10594 (base32
10595 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10596 (build-system python-build-system)
10597 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10598 (propagated-inputs
10599 `(("python-six" ,python-six)))
1c4c8a33
SB
10600 (home-page "https://kazoo.readthedocs.org")
10601 (synopsis "High-level Zookeeper client library")
10602 (description
10603 "Kazoo is a Python client library for the Apache Zookeeper distributed
10604application service. It is designed to be easy to use and to avoid common
10605programming errors.")
3f641af0 10606 (license license:asl2.0)))
1c4c8a33
SB
10607
10608(define-public python2-kazoo
10609 (package-with-python2 python-kazoo))
45dda35e
SB
10610
10611(define-public python-pykafka
10612 (package
10613 (name "python-pykafka")
10614 (version "2.4.0")
10615 (source (origin
10616 (method url-fetch)
c6bccf71
EF
10617 (uri (string-append
10618 "https://pypi.python.org/packages/8b/3e/"
10619 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10620 "pykafka-" version ".tar.gz"))
45dda35e
SB
10621 (sha256
10622 (base32
10623 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10624 (build-system python-build-system)
10625 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10626 (propagated-inputs
45dda35e
SB
10627 `(("python-gevent" ,python-gevent)
10628 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10629 ("python-tabulate" ,python-tabulate)))
10630 (inputs
10631 `(("librdkafka" ,librdkafka)))
10632 (home-page "https://pykafka.readthedocs.io/")
10633 (synopsis "Apache Kafka client for Python")
10634 (description
10635 "PyKafka is a client for the Apache Kafka distributed messaging system.
10636It includes Python implementations of Kafka producers and consumers, which
10637are optionally backed by a C extension built on librdkafka.")
3f641af0 10638 (license license:asl2.0)))
45dda35e
SB
10639
10640(define-public python2-pykafka
10641 (package-with-python2 python-pykafka))
a44fd439
DM
10642
10643(define-public python-wcwidth
10644 (package
10645 (name "python-wcwidth")
10646 (version "0.1.6")
10647 (source
10648 (origin
10649 (method url-fetch)
10650 (uri (string-append
10651 "https://pypi.python.org/packages/"
10652 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10653 "wcwidth-" version ".tar.gz"))
10654 (sha256
10655 (base32
10656 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10657 (build-system python-build-system)
10658 (home-page "https://github.com/jquast/wcwidth")
66e07664 10659 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10660 (description "Wcwidth measures the number of terminal column cells of
10661wide-character codes. It is useful for those implementing a terminal emulator,
10662or programs that carefully produce output to be interpreted by one. It is a
10663Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10664specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10665 (license license:expat)))
a44fd439
DM
10666
10667(define-public python2-wcwidth
f210e944 10668 (package-with-python2 python-wcwidth))
0de78c95
DP
10669
10670(define-public python2-jsonrpclib
10671 (package
10672 (name "python2-jsonrpclib")
10673 (version "0.1.7")
10674 (source (origin
10675 (method url-fetch)
10676 (uri (string-append
10677 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10678 "jsonrpclib-" version ".tar.gz"))
10679 (sha256
10680 (base32
10681 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10682 (build-system python-build-system)
0de78c95
DP
10683 (arguments
10684 `(#:tests? #f
10685 #:python ,python-2))
10686 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10687 (synopsis "Implementation of JSON-RPC specification for Python")
10688 (description
10689 "This library is an implementation of the JSON-RPC specification.
10690It supports both the original 1.0 specification, as well as the
10691new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10692etc.")
3f641af0 10693 (license license:asl2.0)))
9250b0f3
SB
10694
10695(define-public python-chai
10696 (package
10697 (name "python-chai")
10698 (version "1.1.1")
10699 (source (origin
10700 (method url-fetch)
10701 (uri (pypi-uri "chai" version))
10702 (sha256
10703 (base32
10704 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10705 (build-system python-build-system)
9250b0f3
SB
10706 (home-page "https://github.com/agoragames/chai")
10707 (synopsis "Mocking framework for Python")
10708 (description
10709 "Chai provides an api for mocking, stubbing and spying your python
10710objects, patterned after the Mocha library for Ruby.")
3f641af0 10711 (license license:bsd-3)))
9250b0f3
SB
10712
10713(define-public python2-chai
10714 (package-with-python2 python-chai))
10715
ae43baa8
SB
10716(define-public python-arrow
10717 (package
10718 (name "python-arrow")
10719 (version "0.8.0")
10720 (source (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "arrow" version))
10723 (sha256
10724 (base32
10725 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10726 (build-system python-build-system)
10727 (native-inputs
f3b98f4f 10728 `(;; For testing
ae43baa8
SB
10729 ("python-chai" ,python-chai)
10730 ("python-simplejson" ,python-simplejson)))
36aed736 10731 (propagated-inputs
22d7360b 10732 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
10733 (home-page "https://github.com/crsmithdev/arrow/")
10734 (synopsis "Dates and times for Python")
10735 (description
10736 "Arrow is a Python library to creating, manipulating, formatting and
10737converting dates, times, and timestamps. It implements and updates the
10738datetime type.")
3f641af0 10739 (license license:asl2.0)))
ae43baa8
SB
10740
10741(define-public python2-arrow
10742 (package-with-python2 python-arrow))
10743
1f2b62a4
SB
10744(define-public python-inflection
10745 (package
10746 (name "python-inflection")
10747 (version "0.3.1")
10748 (source
10749 (origin (method url-fetch)
10750 (uri (pypi-uri "inflection" version))
10751 (sha256
10752 (base32
10753 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10754 (build-system python-build-system)
e9127525
MB
10755 (native-inputs
10756 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10757 (home-page "http://github.com/jpvanhal/inflection")
10758 (synopsis "Python string transformation library")
10759 (description
10760 "Inflection is a string transformation library. It singularizes
10761and pluralizes English words, and transforms strings from CamelCase to
10762underscored string.")
10763 (license license:expat)))
10764
10765(define-public python2-inflection
10766 (package-with-python2 python-inflection))
10767
18995566
SB
10768(define-public python-pylev
10769 (package
10770 (name "python-pylev")
10771 (version "1.3.0")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "pylev" version))
10775 (sha256
10776 (base32
10777 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10778 (build-system python-build-system)
18995566
SB
10779 (home-page "http://github.com/toastdriven/pylev")
10780 (synopsis "Levenshtein distance implementation in Python")
10781 (description "Pure Python Levenshtein implementation, based off the
10782Wikipedia code samples at
10783@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10784 (license license:bsd-3)))
18995566
SB
10785
10786(define-public python2-pylev
10787 (package-with-python2 python-pylev))
10788
f5deff7a
SB
10789(define-public python-cleo
10790 (package
10791 (name "python-cleo")
10792 (version "0.4.1")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "cleo" version))
10796 (sha256
10797 (base32
10798 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10799 (build-system python-build-system)
10800 (native-inputs
f3b98f4f 10801 `(;; For testing
f5deff7a
SB
10802 ("python-mock" ,python-mock)
10803 ("python-pytest" ,python-pytest)))
9403150a
SB
10804 (propagated-inputs
10805 `(("python-psutil" ,python-psutil)
10806 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10807 (home-page "https://github.com/sdispater/cleo")
10808 (synopsis "Command-line arguments library for Python")
10809 (description
10810 "Cleo allows you to create command-line commands with signature in
10811docstring and colored output.")
10812 (license license:expat)))
10813
10814(define-public python2-cleo
10815 (package-with-python2 python-cleo))
10816
77cadb43
SB
10817(define-public python-lazy-object-proxy
10818 (package
10819 (name "python-lazy-object-proxy")
10820 (version "1.2.2")
10821 (source (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "lazy-object-proxy" version))
10824 (sha256
10825 (base32
10826 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10827 (build-system python-build-system)
77cadb43
SB
10828 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10829 (synopsis "Lazy object proxy for python")
10830 (description
10831 "Lazy object proxy is an object that wraps a callable but defers the call
10832until the object is actually required, and caches the result of said call.")
3f641af0 10833 (license license:bsd-2)))
77cadb43
SB
10834
10835(define-public python2-lazy-object-proxy
10836 (package-with-python2 python-lazy-object-proxy))
10837
5477e05f
SB
10838(define-public python-dnspython
10839 (package
10840 (name "python-dnspython")
6c514128 10841 (version "1.15.0")
5477e05f
SB
10842 (source (origin
10843 (method url-fetch)
10844 (uri (string-append "http://www.dnspython.org/kits/"
10845 version "/dnspython-" version ".tar.gz"))
10846 (sha256
10847 (base32
6c514128 10848 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10849 (build-system python-build-system)
10850 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10851 (home-page "http://www.dnspython.org")
10852 (synopsis "DNS toolkit for Python")
10853 (description
10854 "dnspython is a DNS toolkit for Python. It supports almost all record
10855types. It can be used for queries, zone transfers, and dynamic updates.
10856It supports TSIG authenticated messages and EDNS0.")
10857 (license license:expat)))
10858
10859(define-public python2-dnspython
10860 (package-with-python2 python-dnspython))
10861
22711e25
SB
10862(define-public python-email-validator
10863 (package
10864 (name "python-email-validator")
10865 (version "1.0.1")
10866 (source
10867 (origin (method url-fetch)
10868 (uri (pypi-uri "email_validator" version))
10869 (sha256
10870 (base32
10871 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10872 (build-system python-build-system)
10873 (arguments
10874 '(#:phases
10875 (modify-phases %standard-phases
10876 (add-before 'build 'use-dnspython
10877 (lambda _
10878 (substitute* "setup.py"
10879 (("dnspython3") "dnspython"))
10880 #t)))))
d42560bd 10881 (propagated-inputs
22711e25 10882 `(("python-dnspython" ,python-dnspython)
d42560bd 10883 ("python-idna" ,python-idna)))
22711e25
SB
10884 (home-page "https://github.com/JoshData/python-email-validator")
10885 (synopsis "Email address validation library for Python")
10886 (description
10887 "This library validates email address syntax and deliverability.")
3f641af0 10888 (license license:cc0)))
22711e25
SB
10889
10890(define-public python2-email-validator
10891 (package-with-python2 python-email-validator))
10892
8987d91e
SB
10893(define-public python-ukpostcodeparser
10894 (package
10895 (name "python-ukpostcodeparser")
10896 (version "1.0.3")
10897 (source (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "UkPostcodeParser" version))
10900 (sha256
10901 (base32
10902 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10903 (build-system python-build-system)
8987d91e
SB
10904 (home-page "https://github.com/hamstah/ukpostcodeparser")
10905 (synopsis "UK Postcode parser for Python")
10906 (description
10907 "This library provides the @code{parse_uk_postcode} function for
10908parsing UK postcodes.")
10909 (license license:expat)))
10910
10911(define-public python2-ukpostcodeparser
10912 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10913
10914(define-public python-fake-factory
10915 (package
10916 (name "python-fake-factory")
7adc698f 10917 (version "0.7.2")
ea92ae01
SB
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "fake-factory" version))
10921 (sha256
10922 (base32
7adc698f 10923 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10924 (build-system python-build-system)
b7f3ea95
MB
10925 (arguments
10926 '(#:phases
10927 (modify-phases %standard-phases
10928 (replace 'check
10929 (lambda _
10930 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10931 (native-inputs
f3b98f4f 10932 `(;; For testing
ea92ae01
SB
10933 ("python-email-validator" ,python-email-validator)
10934 ("python-mock" ,python-mock)
10935 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 10936 (propagated-inputs
22d7360b 10937 `(("python-dateutil" ,python-dateutil)
bbcd7297 10938 ("python-six" ,python-six)))
7adc698f 10939 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10940 (synopsis "Python package that generates fake data")
10941 (description
10942 "Faker is a Python package that generates fake data such as names,
10943addresses, and phone numbers.")
10944 (license license:expat)
10945 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10946
10947(define-public python2-fake-factory
10948 (let ((base (package-with-python2 (strip-python2-variant
10949 python-fake-factory))))
10950 (package
10951 (inherit base)
24c9aa18 10952 (propagated-inputs
ea92ae01 10953 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10954 ,@(package-propagated-inputs base))))))
ea92ae01 10955
b49504fd
SB
10956(define-public python-pyaml
10957 (package
10958 (name "python-pyaml")
10959 (version "15.8.2")
10960 (source (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "pyaml" version))
10963 (sha256
10964 (base32
10965 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10966 (build-system python-build-system)
f620311a
MB
10967 (native-inputs
10968 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10969 (propagated-inputs
10970 `(("python-pyyaml" ,python-pyyaml)))
10971 (home-page "https://github.com/mk-fg/pretty-yaml")
10972 (synopsis "YAML pretty-print library for Python")
10973 (description
10974 "pyaml is a PyYAML based python module to produce pretty and readable
10975YAML-serialized data.")
3f641af0 10976 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10977
10978(define-public python2-pyaml
10979 (package-with-python2 python-pyaml))
10980
347175a2
SB
10981(define-public python-flexmock
10982 (package
10983 (name "python-flexmock")
10984 (version "0.10.2")
10985 (source (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "flexmock" version))
10988 (sha256
10989 (base32
10990 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10991 (build-system python-build-system)
347175a2
SB
10992 (home-page "https://flexmock.readthedocs.org")
10993 (synopsis "Testing library for Python")
10994 (description
10995 "flexmock is a testing library for Python that makes it easy to create
10996mocks, stubs and fakes.")
3f641af0 10997 (license license:bsd-3)))
347175a2
SB
10998
10999(define-public python2-flexmock
11000 (package-with-python2 python-flexmock))
11001
5a744191
SB
11002(define-public python-orator
11003 (package
11004 (name "python-orator")
11005 (version "0.8.2")
11006 (source (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "orator" version))
11009 (sha256
11010 (base32
11011 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11012 (build-system python-build-system)
11013 (arguments '(#:tests? #f)) ; no tests
b2676030 11014 (propagated-inputs
5a744191
SB
11015 `(("python-arrow" ,python-arrow)
11016 ("python-blinker" ,python-blinker)
11017 ("python-cleo" ,python-cleo)
11018 ("python-fake-factory" ,python-fake-factory)
11019 ("python-inflection" ,python-inflection)
11020 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11021 ("python-pyaml" ,python-pyaml)
5a744191
SB
11022 ("python-simplejson" ,python-simplejson)
11023 ("python-wrapt" ,python-wrapt)))
11024 (home-page "https://orator-orm.com/")
11025 (synopsis "ActiveRecord ORM for Python")
11026 (description
11027 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11028implementation for Python.")
11029 (license license:expat)
11030 (properties `((python2-variant . ,(delay python2-orator))))))
11031
11032(define-public python2-orator
11033 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11034 (package
11035 (inherit base)
06961617 11036 (propagated-inputs
5a744191 11037 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11038 ,@(package-propagated-inputs base))))))
f4155188
DM
11039
11040(define-public python-prompt-toolkit
11041 (package
11042 (name "python-prompt-toolkit")
6a34f4cc 11043 (version "1.0.9")
f4155188
DM
11044 (source
11045 (origin
11046 (method url-fetch)
d15e2ef0 11047 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11048 (sha256
11049 (base32
6a34f4cc 11050 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11051 (build-system python-build-system)
bae18710
LF
11052 (arguments
11053 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11054 (propagated-inputs
11055 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11056 ("python-six" ,python-six)
f22efa01 11057 ("python-pygments" ,python-pygments)))
f4155188
DM
11058 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11059 (synopsis "Library for building command line interfaces in Python")
11060 (description
11061 "Prompt-Toolkit is a library for building interactive command line
11062interfaces in Python. It's like GNU Readline but it also features syntax
11063highlighting while typing, out-of-the-box multi-line input editing, advanced
11064code completion, incremental search, support for Chinese double-width
11065characters, mouse support, and auto suggestions.")
f210e944 11066 (license license:bsd-3)))
f4155188
DM
11067
11068(define-public python2-prompt-toolkit
f210e944 11069 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11070
11071(define-public python-jedi
11072 (package
11073 (name "python-jedi")
11074 (version "0.9.0")
11075 (source
11076 (origin
11077 (method url-fetch)
11078 (uri (pypi-uri "jedi" version))
11079 (sha256
11080 (base32
11081 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11082 (build-system python-build-system)
bfce8a34
MB
11083 (arguments
11084 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11085 '(#:tests? #f))
11086 (native-inputs
11087 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11088 (home-page "https://github.com/davidhalter/jedi")
11089 (synopsis
11090 "Autocompletion for Python that can be used for text editors")
11091 (description
11092 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11093 (license license:expat)))
a502dfbf
DM
11094
11095(define-public python2-jedi
f210e944 11096 (package-with-python2 python-jedi))
c2f0dc6e
DM
11097
11098(define-public ptpython
11099 (package
11100 (name "ptpython")
11101 (version "0.34")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "ptpython" version))
11105 (sha256
11106 (base32
11107 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11108 (build-system python-build-system)
32955348
MB
11109 (arguments
11110 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11111 (propagated-inputs
c2f0dc6e
DM
11112 `(("python-docopt" ,python-docopt)
11113 ("python-jedi" ,python-jedi)
11114 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11115 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11116 (home-page "https://github.com/jonathanslenders/ptpython")
11117 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11118 (description
11119 "ptpython is a Python read-eval-print loop with IDE-like features.
11120It supports syntax highlighting, multiline editing, autocompletion, mouse,
11121color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11122etc.")
3f641af0 11123 (license license:bsd-3)
c2f0dc6e
DM
11124 (properties `((python2-variant . ,(delay ptpython-2))))))
11125
11126(define-public ptpython-2
11127 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11128 (package
11129 (inherit base)
11130 (name "ptpython2"))))
b227f0be 11131
b04a52a6
DJ
11132(define-public python-requests-oauthlib
11133 (package
11134 (name "python-requests-oauthlib")
11135 (version "0.6.2")
11136 (source
11137 (origin
11138 (method url-fetch)
11139 (uri (pypi-uri "requests-oauthlib" version))
11140 (sha256
11141 (base32
11142 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11143 (build-system python-build-system)
11144 (arguments
11145 `(#:phases
11146 (modify-phases %standard-phases
11147 ;; removes tests that require network access
11148 (add-before 'check 'pre-check
11149 (lambda _
11150 (delete-file "tests/test_core.py")
11151 #t)))))
11152 (native-inputs
11153 `(("python-requests-mock" ,python-requests-mock)
11154 ("python-mock" ,python-mock)))
f22efa01 11155 (propagated-inputs
b04a52a6
DJ
11156 `(("python-oauthlib" ,python-oauthlib)
11157 ("python-requests" ,python-requests)))
11158 (home-page
11159 "https://github.com/requests/requests-oauthlib")
11160 (synopsis
11161 "OAuthlib authentication support for Requests")
11162 (description
11163 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11164provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11165 (license license:isc)))
b04a52a6
DJ
11166
11167(define-public python2-requests-oauthlib
f210e944 11168 (package-with-python2 python-requests-oauthlib))
b04a52a6 11169
b227f0be 11170(define-public python-stem
11171 (package
11172 (name "python-stem")
c976b319 11173 (version "1.5.3")
b227f0be 11174 (source
11175 (origin
11176 (method url-fetch)
c976b319 11177 (uri (pypi-uri "stem" version))
b227f0be 11178 (sha256
11179 (base32
c976b319 11180 "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
b227f0be 11181 (build-system python-build-system)
11182 (arguments
11183 `(#:phases
11184 (modify-phases %standard-phases
11185 (replace 'check
11186 (lambda _
11187 (zero? (system* "./run_tests.py" "--unit")))))))
11188 (native-inputs
11189 `(("python-mock" ,python-mock)
11190 ("python-pep8" ,python-pep8)
11191 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11192 (home-page "https://stem.torproject.org/")
11193 (synopsis
11194 "Python controller library that allows applications to interact with Tor")
11195 (description
11196 "Stem is a Python controller library for Tor. With it you can use Tor's
11197control protocol to script against the Tor process and read descriptor data
11198relays publish about themselves.")
3f641af0 11199 (license license:lgpl3)))
b227f0be 11200
11201(define-public python2-stem
11202 (package-with-python2 python-stem))
517a6c0c
DM
11203
11204(define-public python-pyserial
11205 (package
11206 (name "python-pyserial")
11207 (version "3.1.1")
11208 (source
11209 (origin
11210 (method url-fetch)
11211 (uri (pypi-uri "pyserial" version))
11212 (sha256
11213 (base32
11214 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11215 (build-system python-build-system)
0a702009
MB
11216 (arguments
11217 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11218 ;; #:phases
11219 ;; (modify-phases %standard-phases
11220 ;; (replace 'check
11221 ;; (lambda _
11222 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11223 (home-page
11224 "https://github.com/pyserial/pyserial")
11225 (synopsis "Python Serial Port Bindings")
11226 (description "@code{pyserial} provide serial port bindings for Python. It
11227supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11228and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11229 (license license:bsd-3)))
517a6c0c
DM
11230
11231(define-public python2-pyserial
f210e944 11232 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11233
11234(define-public python-kivy
11235 (package
11236 (name "python-kivy")
11237 (version "1.9.1")
11238 (source
11239 (origin
11240 (method url-fetch)
11241 (uri (pypi-uri "kivy" version))
11242 (file-name (string-append name "-" version ".tar.gz"))
11243 (sha256
11244 (base32
11245 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11246 (build-system python-build-system)
11247 (arguments
11248 `(#:tests? #f ; Tests require many optional packages
11249 #:phases
11250 (modify-phases %standard-phases
11251 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11252 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11253 (lambda* (#:key inputs #:allow-other-keys)
11254 (setenv "KIVY_SDL2_PATH"
11255 (string-append (assoc-ref inputs "sdl-union")
11256 "/include/SDL2"))
11257 #t)))))
11258 (native-inputs
f2516de2
HG
11259 `(("pkg-config" ,pkg-config)
11260 ("python-cython" ,python-cython)))
6eb7af2a 11261 (inputs
f2516de2 11262 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11263 ("mesa" ,mesa)
11264 ("sdl-union"
11265 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11266 (home-page "http://kivy.org")
11267 (synopsis
11268 "Multitouch application framework")
11269 (description
11270 "A software library for rapid development of
11271hardware-accelerated multitouch applications.")
11272 (license license:expat)))
11273
11274(define-public python2-kivy
11275 (package-with-python2 python-kivy))
11276
11277(define-public python-kivy-next
11278 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11279 (revision "1"))
11280 (package (inherit python-kivy)
11281 (name "python-kivy-next")
d80a71eb 11282 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11283 (string-take commit 7)))
11284 (source
11285 (origin
11286 (method git-fetch)
11287 (uri (git-reference
11288 (url "https://github.com/kivy/kivy")
11289 (commit commit)))
11290 (file-name (string-append name "-" version "-checkout"))
11291 (sha256
11292 (base32
11293 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11294
11295(define-public python2-kivy-next
11296 (package-with-python2 python-kivy-next))
8794bd8b
DC
11297
11298(define-public python-binaryornot
11299 (package
11300 (name "python-binaryornot")
11301 (version "0.4.0")
11302 (source (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "binaryornot" version))
11305 (sha256
11306 (base32
11307 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11308 (build-system python-build-system)
f22efa01 11309 (propagated-inputs
8794bd8b
DC
11310 `(("python-chardet" ,python-chardet)
11311 ("python-hypothesis" ,python-hypothesis)))
11312 (home-page "https://github.com/audreyr/binaryornot")
11313 (synopsis "Package to check if a file is binary or text")
11314 (description "Ultra-lightweight pure Python package to check if a file is
11315binary or text.")
11316 (license license:bsd-3)
11317 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11318
11319(define-public python2-binaryornot
11320 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11321 (package (inherit base)
f22efa01 11322 (propagated-inputs
8794bd8b 11323 `(("python2-enum34" ,python2-enum34)
f22efa01 11324 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11325
11326(define-public python-nltk
11327 (package
11328 (name "python-nltk")
11329 (version "3.2.1")
11330 (source (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "nltk" version))
11333 (sha256
11334 (base32
11335 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11336 (build-system python-build-system)
59f12985
LF
11337 (arguments
11338 '(;; The tests require some extra resources to be downloaded.
11339 ;; TODO Try packaging these resources.
11340 #:tests? #f))
a9ac982a
DC
11341 (home-page "http://nltk.org/")
11342 (synopsis "Natural Language Toolkit")
11343 (description "It provides interfaces to over 50 corpora and lexical
11344resources such as WordNet, along with a suite of text processing libraries
11345for classification, tokenization, stemming, tagging, parsing, and semantic
11346reasoning, wrappers for natural language processing libraries.")
f210e944 11347 (license license:asl2.0)))
a9ac982a
DC
11348
11349(define-public python2-nltk
f210e944 11350 (package-with-python2 python-nltk))
691cd90d
DC
11351
11352(define-public python-pymongo
11353 (package
11354 (name "python-pymongo")
11355 (version "3.3.0")
11356 (source (origin
11357 (method url-fetch)
11358 (uri (pypi-uri "pymongo" version))
11359 (sha256
11360 (base32
11361 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11362 (build-system python-build-system)
f22efa01 11363 (propagated-inputs
691cd90d
DC
11364 `(("python-certifi" ,python-certifi)))
11365 (home-page "http://github.com/mongodb/mongo-python-driver")
11366 (synopsis "Python driver for MongoDB")
11367 (description "Python driver for MongoDB.")
f210e944 11368 (license license:asl2.0)))
691cd90d
DC
11369
11370(define-public python2-pymongo
f210e944 11371 (package-with-python2 python-pymongo))
6a6c9d43
DC
11372
11373(define-public python-sh
11374 (package
11375 (name "python-sh")
11376 (version "1.11")
11377 (source (origin
11378 (method url-fetch)
11379 (uri (pypi-uri "sh" version))
11380 (sha256
11381 (base32
11382 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11383 (build-system python-build-system)
11384 (arguments
11385 `(#:tests? #f)) ; no tests
11386 (home-page "https://github.com/amoffat/sh")
11387 (synopsis "Python subprocess interface")
11388 (description "Abstracts process invocation by providing a function
11389interface for programs.")
f210e944 11390 (license license:expat)))
6a6c9d43
DC
11391
11392(define-public python2-sh
f210e944 11393 (package-with-python2 python-sh))
05b59190 11394
25702397
EF
11395(define-public python-consul
11396 (package
11397 (name "python-consul")
11398 (version "0.6.1")
11399 (source
11400 (origin
11401 (method url-fetch)
11402 (uri (pypi-uri "python-consul" version))
11403 (sha256
11404 (base32
11405 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11406 (build-system python-build-system)
11407 (native-inputs
fd1d6de7
HG
11408 `(("python-pytest" ,python-pytest)))
11409 (propagated-inputs
11410 `(("python-requests" ,python-requests)
25702397
EF
11411 ("python-six" ,python-six)))
11412 (home-page "https://github.com/cablehead/python-consul")
11413 (synopsis "Python client for Consul")
11414 (description
11415 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11416discovery, monitoring and configuration.")
11417 (license license:expat)))
11418
11419(define-public python2-consul
f210e944 11420 (package-with-python2 python-consul))
25702397 11421
05b59190
DC
11422(define-public python-schematics
11423 (package
11424 (name "python-schematics")
11425 (version "1.1.1")
11426 (source
11427 (origin
11428 (method url-fetch)
11429 (uri (string-append
11430 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11431 (file-name (string-append name "-" version ".tar.gz"))
11432 (sha256
11433 (base32
11434 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11435 (build-system python-build-system)
f22efa01 11436 (propagated-inputs
05b59190
DC
11437 `(("python-six" ,python-six)))
11438 (arguments
11439 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11440 ; version requirements (eg python-coveralls)
11441 (home-page "https://github.com/schematics/schematics")
11442 (synopsis "Python Data Structures for Humans")
11443 (description "Python Data Structures for Humans.")
f210e944 11444 (license license:bsd-3)))
05b59190
DC
11445
11446(define-public python2-schematics
f210e944 11447 (package-with-python2 python-schematics))
d6907ff7
DC
11448
11449(define-public python-publicsuffix
11450 (package
11451 (name "python-publicsuffix")
11452 (version "1.1.0")
11453 (source (origin
11454 (method url-fetch)
11455 (uri (pypi-uri "publicsuffix" version))
11456 (sha256
11457 (base32
11458 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11459 (build-system python-build-system)
11460 (arguments
11461 `(#:tests? #f)) ; tests use the internet
11462 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11463 (synopsis "Get suffix for a domain name")
11464 (description "Get a public suffix for a domain name using the Public Suffix
11465List.")
f210e944 11466 (license license:expat)))
d6907ff7
DC
11467
11468(define-public python2-publicsuffix
f210e944 11469 (package-with-python2 python-publicsuffix))
b2319996
DC
11470
11471(define-public python-publicsuffix2
11472 (package
11473 (name "python-publicsuffix2")
11474 (version "2.20160621")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11479 (sha256
11480 (base32
11481 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11482 (build-system python-build-system)
10797a0a
LF
11483 (arguments
11484 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11485 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11486 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11487 (description "Get a public suffix for a domain name using the Public Suffix
11488List. Forked from and using the same API as the publicsuffix package.")
f210e944 11489 (license (list license:expat license:mpl2.0))))
b2319996
DC
11490
11491(define-public python2-publicsuffix2
f210e944 11492 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11493
11494(define-public python-url
11495 (package
11496 (name "python-url")
11497 (version "0.2.0")
11498 (source (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "url" version))
11501 (sha256
11502 (base32
11503 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11504 (build-system python-build-system)
f22efa01 11505 (propagated-inputs
81f1515d
DC
11506 `(("python-publicsuffix" ,python-publicsuffix)))
11507 (native-inputs
11508 `(("python-coverage" ,python-coverage)
11509 ("python-nose" ,python-nose)))
11510 (arguments
11511 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11512 (home-page "http://github.com/seomoz/url-py")
11513 (synopsis "URL Parsing")
11514 (description "Library for parsing urls.")
11515 (license license:expat)
11516 (properties `((python2-variant . ,(delay python2-url))))))
11517
11518(define-public python2-url
11519 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11520 (package (inherit base)
f22efa01 11521 (propagated-inputs
f210e944 11522 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11523
11524(define-public python-freezegun
11525 (package
11526 (name "python-freezegun")
0c315fb3 11527 (version "0.3.8")
974ee2c1
TS
11528 (source
11529 (origin
11530 (method url-fetch)
11531 (uri (pypi-uri "freezegun" version))
11532 (sha256
11533 (base32
0c315fb3 11534 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
11535 (build-system python-build-system)
11536 (native-inputs
11537 `(("python-mock" ,python-mock)
11538 ("python-nose" ,python-nose)
4e096968 11539 ("python-coverage" ,python-coverage)))
f22efa01 11540 (propagated-inputs
4e096968 11541 `(("python-six" ,python-six)
22d7360b 11542 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
11543 (arguments
11544 `(#:phases (modify-phases %standard-phases
11545 ;; The tests are normally executed via `make test`, but the PyPi
11546 ;; package does not include the Makefile.
11547 (replace 'check
11548 (lambda _
11549 (zero? (system* "nosetests" "./tests/")))))))
11550 (home-page "https://github.com/spulec/freezegun")
11551 (synopsis "Test utility for mocking the datetime module")
11552 (description
11553 "FreezeGun is a library that allows your python tests to travel through
11554time by mocking the datetime module.")
11555 (license license:asl2.0)))
11556
11557(define-public python2-freezegun
f210e944
HG
11558 (package-with-python2 python-freezegun))
11559
dddcb25c
MB
11560
11561(define-public python-odfpy
11562 (package
11563 (name "python-odfpy")
11564 (version "1.3.3")
11565 (source (origin
11566 (method url-fetch)
11567 (uri (pypi-uri "odfpy" version))
11568 (sha256
11569 (base32
11570 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11571 (arguments
11572 `(#:modules ((srfi srfi-1)
11573 (guix build python-build-system)
11574 (guix build utils))
11575 #:phases
11576 (modify-phases %standard-phases
11577 (replace 'check
11578 ;; The test runner invokes python2 and python3 for test*.py.
11579 ;; To avoid having both in inputs, we replicate it here.
11580 (lambda _
11581 (every (lambda (test-file)
11582 (zero? (system* "python" test-file)))
11583 (find-files "tests" "^test.*\\.py$")))))))
11584 (build-system python-build-system)
11585 (home-page "https://github.com/eea/odfpy")
11586 (synopsis "Python API and tools to manipulate OpenDocument files")
11587 (description "Collection of libraries and utility programs written in
11588Python to manipulate OpenDocument 1.2 files.")
11589 (license
11590 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11591 ;; number of files with other licenses.
11592 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11593
11594(define-public python2-odfpy
11595 (package-with-python2 python-odfpy))
b30565bd
MB
11596
11597(define-public python-cachecontrol
11598 (package
11599 (name "python-cachecontrol")
11600 (version "0.11.6")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 ;; Pypi does not have tests.
11605 (uri (string-append
11606 "https://github.com/ionrock/cachecontrol/archive/v"
11607 version ".tar.gz"))
11608 (file-name (string-append name "-" version ".tar.gz"))
11609 (sha256
11610 (base32
11611 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11612 (build-system python-build-system)
11613 (arguments
11614 `(#:phases
11615 (modify-phases %standard-phases
11616 (replace 'check
11617 (lambda _
11618 ;; Drop test that requires internet access.
11619 (delete-file "tests/test_regressions.py")
11620 (setenv "PYTHONPATH"
11621 (string-append (getcwd) "/build/lib:"
11622 (getenv "PYTHONPATH")))
11623 (zero? (system* "py.test" "-vv")))))))
11624 (native-inputs
11625 `(("python-pytest" ,python-pytest)
11626 ("python-redis" ,python-redis)
11627 ("python-webtest" ,python-webtest)
11628 ("python-mock" ,python-mock)))
11629 (propagated-inputs
11630 `(("python-requests" ,python-requests)
11631 ("python-lockfile" ,python-lockfile)))
11632 (home-page "https://github.com/ionrock/cachecontrol")
11633 (synopsis "The httplib2 caching algorithms for use with requests")
11634 (description "CacheControl is a port of the caching algorithms in
11635@code{httplib2} for use with @code{requests} session objects.")
f210e944 11636 (license license:asl2.0)))
b30565bd
MB
11637
11638(define-public python2-cachecontrol
f210e944 11639 (package-with-python2 python-cachecontrol))
243db824
DM
11640
11641(define-public python-lit
11642 (package
11643 (name "python-lit")
11644 (version "0.5.0")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "lit" version))
11649 (sha256
11650 (base32
11651 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11652 (build-system python-build-system)
11653 (home-page "http://llvm.org/")
11654 (synopsis "LLVM Software Testing Tool")
11655 (description "@code{lit} is a portable tool for executing LLVM and Clang
11656style test suites, summarizing their results, and providing indication of
11657failures.")
f210e944 11658 (license license:ncsa)))
243db824
DM
11659
11660(define-public python2-lit
f210e944 11661 (package-with-python2 python-lit))
66f95b20
MB
11662
11663(define-public python-pytest-pep8
11664 (package
11665 (name "python-pytest-pep8")
11666 (version "1.0.6")
11667 (source (origin
11668 (method url-fetch)
11669 (uri (pypi-uri "pytest-pep8" version))
11670 (sha256
11671 (base32
11672 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11673 (build-system python-build-system)
11674 (arguments
b41a05ce 11675 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11676 (native-inputs
11677 `(("python-pytest" ,python-pytest)))
11678 (propagated-inputs
11679 `(("python-pep8" ,python-pep8)))
11680 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11681 (synopsis "Py.test plugin to check PEP8 requirements")
11682 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11683 (license license:expat)))
66f95b20
MB
11684
11685(define-public python2-pytest-pep8
f210e944 11686 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11687
11688(define-public python-pytest-flakes
11689 (package
11690 (name "python-pytest-flakes")
11691 (version "1.0.1")
11692 (source (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "pytest-flakes" version))
11695 (sha256
11696 (base32
11697 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11698 (build-system python-build-system)
11699 (arguments
b41a05ce 11700 `(#:phases
df94a6b5
MB
11701 (modify-phases %standard-phases
11702 (delete 'check)
11703 (add-after 'install 'check
05c2fd36
HG
11704 (lambda* (#:key outputs inputs #:allow-other-keys)
11705 ;; It's easier to run tests after install.
11706 ;; Make installed package available for running the tests
11707 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11708 (zero? (system* "py.test" "-vv")))))))
11709 (native-inputs
11710 `(("python-coverage" ,python-coverage)
11711 ("python-pytest" ,python-pytest)
11712 ("python-pytest-cache" ,python-pytest-cache)
11713 ("python-pytest-pep8" ,python-pytest-pep8)))
11714 (propagated-inputs
11715 `(("python-pyflakes" ,python-pyflakes)))
11716 (home-page "https://github.com/fschulze/pytest-flakes")
11717 (synopsis "Py.test plugin to check source code with pyflakes")
11718 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11719 (license license:expat)))
df94a6b5
MB
11720
11721(define-public python2-pytest-flakes
f210e944 11722 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11723
11724(define-public python-natsort
11725 (package
11726 (name "python-natsort")
11727 (version "5.0.1")
11728 (source (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "natsort" version))
11731 (sha256
11732 (base32
11733 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11734 (build-system python-build-system)
11735 (arguments
11736 `(#:phases
11737 (modify-phases %standard-phases
11738 (add-before 'check 'set-cachedir
11739 ;; Tests require write access to $HOME by default
11740 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11741 (native-inputs
11742 `(("python-hypothesis" ,python-hypothesis)
11743 ("python-pytest-cache" ,python-pytest-cache)
11744 ("python-pytest-cov" ,python-pytest-cov)
11745 ("python-pytest-flakes" ,python-pytest-flakes)
11746 ("python-pytest-pep8" ,python-pytest-pep8)))
11747 (propagated-inputs ; TODO: Add python-fastnumbers.
11748 `(("python-pyicu" ,python-pyicu)))
11749 (home-page "https://github.com/SethMMorton/natsort")
11750 (synopsis "Natural sorting for python and shell")
11751 (description
11752 "Natsort lets you apply natural sorting on lists instead of
11753lexicographical. If you use the built-in @code{sorted} method in python
11754on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11755returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11756function @code{natsorted} that identifies numbers and sorts them separately
11757from strings. It can also sort version numbers, real numbers, mixed types
11758and more, and comes with a shell command @command{natsort} that exposes this
11759functionality in the command line.")
11760 (license license:expat)
11761 (properties `((python2-variant . ,(delay python2-natsort))))))
11762
11763(define-public python2-natsort
11764 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11765 (package (inherit base)
11766 (native-inputs
00e10c6e 11767 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11768 ("python2-mock" ,python2-mock)
11769 ("python2-enum34" ,python2-enum34)
11770 ,@(package-native-inputs base))))))
4efb9c54
SR
11771
11772(define-public python-glances
11773 (package
11774 (name "python-glances")
11775 (version "2.7.1")
11776 (source
11777 (origin
11778 (method url-fetch)
11779 (uri (pypi-uri "Glances" version))
11780 (sha256
11781 (base32
11782 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11783 (build-system python-build-system)
f22efa01 11784 (propagated-inputs
4efb9c54
SR
11785 `(("python-psutil" ,python-psutil)))
11786 (home-page
11787 "https://github.com/nicolargo/glances")
11788 (synopsis
11789 "A cross-platform curses-based monitoring tool")
11790 (description
11791 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11792Glances uses the PsUtil library to get information from your system. It monitors
11793CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11794 (license license:lgpl3+)))
4efb9c54
SR
11795
11796(define-public python2-glances
f210e944 11797 (package-with-python2 python-glances))
05b7a593
EF
11798
11799(define-public python-graphql-core
11800 (package
11801 (name "python-graphql-core")
11802 (version "0.5.3")
11803 (source
11804 (origin
11805 (method url-fetch)
11806 (uri (pypi-uri "graphql-core" version))
11807 (sha256
11808 (base32
11809 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11810 (build-system python-build-system)
11811 (arguments
326f8285
LF
11812 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11813 #:phases
05b7a593
EF
11814 (modify-phases %standard-phases
11815 (add-after 'unpack 'patch-hardcoded-version
11816 (lambda _ (substitute*
11817 "setup.py"
11818 (("'gevent==1.1rc1'") "'gevent'"))
11819 #t)))))
11820 (native-inputs
11821 `(("python-gevent" ,python-gevent)
11822 ("python-mock" ,python-mock)
11823 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11824 (propagated-inputs
05b7a593
EF
11825 `(("python-promise" ,python-promise)
11826 ("python-six" ,python-six)))
11827 (home-page "https://github.com/graphql-python/graphql-core")
11828 (synopsis "GraphQL implementation for Python")
11829 (description
11830 "GraphQL implementation for Python. GraphQL is a data query language and
11831runtime designed and used to request and deliver data to mobile and web apps.
11832This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11833to Python.")
05b7a593
EF
11834 (license license:expat)))
11835
11836(define-public python2-graphql-core
f210e944 11837 (package-with-python2 python-graphql-core))
7ee51575
EF
11838
11839(define-public python-graphql-relay
11840 (package
11841 (name "python-graphql-relay")
b13a5b4d 11842 (version "0.4.5")
7ee51575
EF
11843 (source
11844 (origin
11845 (method url-fetch)
11846 (uri (pypi-uri "graphql-relay" version))
11847 (sha256
11848 (base32
b13a5b4d 11849 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
11850 (build-system python-build-system)
11851 (native-inputs
11852 `(("python-pytest" ,python-pytest)))
f22efa01 11853 (propagated-inputs
7ee51575
EF
11854 `(("python-graphql-core" ,python-graphql-core)
11855 ("python-promise" ,python-promise)
11856 ("python-six" ,python-six)))
11857 (home-page "https://github.com/graphql-python/graphql-relay-py")
11858 (synopsis "Relay implementation for Python")
11859 (description
11860 "This is a library to allow the easy creation of Relay-compliant servers
11861using the GraphQL Python reference implementation of a GraphQL server. It
11862should be noted that the code is a exact port of the original
11863@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11864from Facebook.")
7ee51575
EF
11865 (license license:expat)))
11866
11867(define-public python2-graphql-relay
f210e944 11868 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11869
11870(define-public python-graphene
11871 (package
11872 (name "python-graphene")
11873 (version "0.10.2")
11874 (source
11875 (origin
11876 (method url-fetch)
11877 (uri (pypi-uri "graphene" version))
11878 (sha256
11879 (base32
11880 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11881 (build-system python-build-system)
11882 (native-inputs
11883 `(("python-django-filter" ,python-django-filter)
11884 ("python-mock" ,python-mock)
11885 ("python-psycopg2" ,python-psycopg2)
11886 ("python-pytest-django" ,python-pytest-django)
11887 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11888 (propagated-inputs
ddc63a56
EF
11889 `(("python-graphql-core" ,python-graphql-core)
11890 ("python-graphql-relay" ,python-graphql-relay)
11891 ("python-iso8601" ,python-iso8601)
11892 ("python-promise" ,python-promise)
11893 ("python-six" ,python-six)))
11894 (home-page "http://graphene-python.org/")
11895 (synopsis "GraphQL Framework for Python")
11896 (description
11897 "Graphene is a Python library for building GraphQL schemas/types.
11898A GraphQL schema describes your data model, and provides a GraphQL server
11899with an associated set of resolve methods that know how to fetch data.")
11900 (properties `((python2-variant . ,(delay python2-graphene))))
11901 (license license:expat)))
11902
11903(define-public python2-graphene
11904 (let ((base (package-with-python2
11905 (strip-python2-variant python-graphene))))
11906 (package (inherit base)
11907 (native-inputs
00e10c6e 11908 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11909 ,@(package-native-inputs base))))))
d488d5d6
EF
11910
11911(define-public python-nautilus
11912 (package
11913 (name "python-nautilus")
11914 (version "0.4.9")
11915 (source
11916 (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "nautilus" version))
11919 (sha256
11920 (base32
11921 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11922 (build-system python-build-system)
11923 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11924 (propagated-inputs
d488d5d6
EF
11925 `(("python-bcrypt" ,python-bcrypt)
11926 ("python-click" ,python-click)
11927 ("python-consul" ,python-consul)
d488d5d6
EF
11928 ("python-graphene" ,python-graphene)
11929 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11930 ("python-peewee" ,python-peewee)
11931 ("python-pika" ,python-pika)
d488d5d6
EF
11932 ("python-tornado" ,python-tornado)
11933 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11934 (native-inputs
11935 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11936 (home-page "https://github.com/AlecAivazis/nautilus")
11937 (synopsis "Library for creating microservice applications")
11938 (description
11939 "Nautilus is a framework for flux based microservices that looks to
11940provide extendible implementations of common aspects of a cloud so that you can
11941focus on building massively scalable web applications.")
11942 (license license:expat)))
94cffc63 11943
89cd988b
DM
11944(define-public python-snowballstemmer
11945 (package
11946 (name "python-snowballstemmer")
11947 (version "1.2.1")
11948 (source (origin
1bd858cc
MB
11949 (method url-fetch)
11950 (uri (pypi-uri "snowballstemmer" version))
11951 (sha256
11952 (base32
11953 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
11954 (build-system python-build-system)
11955 (arguments
11956 `(;; No tests exist
11957 #:tests? #f))
11958 (home-page "https://github.com/shibukawa/snowball_py")
11959 (synopsis "Snowball stemming library collection for Python")
11960 (description "This package provides 16 word stemmer algorithms generated
11961from Snowball algorithms. It includes the 15 original ones plus the Poerter
11962English stemmer.")
11963 (license license:bsd-3)))
11964
11965(define-public python2-snowballstemmer
11966 (package-with-python2 python-snowballstemmer))
11967
754bfd70
DM
11968(define-public python-sphinx-cloud-sptheme
11969 (package
11970 (name "python-sphinx-cloud-sptheme")
11971 (version "1.7.1")
11972 (source (origin
1bd858cc
MB
11973 (method url-fetch)
11974 (uri (pypi-uri "cloud_sptheme" version))
11975 (sha256
11976 (base32
11977 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
11978 (build-system python-build-system)
11979 (native-inputs
11980 `(("python-sphinx" ,python-sphinx)))
11981 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
11982 (synopsis "'Cloud' theme for Sphinx documenter")
11983 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 11984related extensions.")
1bd858cc 11985 (license license:bsd-3)))
754bfd70
DM
11986
11987(define-public python2-sphinx-cloud-sptheme
11988 (package-with-python2 python-sphinx-cloud-sptheme))
11989
807a5b32
DM
11990(define-public python-sphinx-alabaster-theme
11991 (package
11992 (name "python-sphinx-alabaster-theme")
11993 (version "0.7.9")
1bd858cc
MB
11994 (source (origin
11995 (method url-fetch)
11996 (uri (pypi-uri "alabaster" version))
11997 (sha256
11998 (base32
11999 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12000 (build-system python-build-system)
12001 (propagated-inputs
12002 `(("python-pygments" ,python-pygments)))
12003 (home-page "https://alabaster.readthedocs.io/")
12004 (synopsis "Configurable sidebar-enabled Sphinx theme")
12005 (description "Alabaster is a visually (c)lean, responsive, configurable
12006theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12007 (license license:bsd-3)))
12008
12009(define-public python2-sphinx-alabaster-theme
12010 (package-with-python2 python-sphinx-alabaster-theme))
12011
66d3f50a
LF
12012(define-public python-betamax
12013 (package
12014 (name "python-betamax")
12015 (version "0.8.0")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "betamax" version))
12020 (sha256
12021 (base32
12022 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12023 (build-system python-build-system)
12024 (arguments
12025 '(;; Many tests fail because they require networking.
12026 #:tests? #f))
c415f763 12027 (propagated-inputs
66d3f50a
LF
12028 `(("python-requests" ,python-requests)))
12029 (home-page "https://github.com/sigmavirus24/betamax")
12030 (synopsis "Record HTTP interactions with python-requests")
12031 (description "Betamax will record your test suite's HTTP interactions and
12032replay them during future tests. It is designed to work with python-requests.")
f210e944 12033 (license license:expat)))
66d3f50a
LF
12034
12035(define-public python2-betamax
f210e944 12036 (package-with-python2 python-betamax))
ca0635b4 12037
94cffc63
LF
12038(define-public python-s3transfer
12039 (package
12040 (name "python-s3transfer")
1b5ea092 12041 (version "0.1.10")
94cffc63
LF
12042 (source (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "s3transfer" version))
12045 (sha256
12046 (base32
1b5ea092 12047 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12048 (build-system python-build-system)
fad8bf97
LF
12049 (arguments
12050 `(#:phases
12051 (modify-phases %standard-phases
12052 (replace 'check
12053 (lambda _
12054 ;; 7 of the 'integration' tests require network access or login
12055 ;; credentials.
12056 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12057 (native-inputs
fad8bf97
LF
12058 `(("python-docutils" ,python-docutils)
12059 ("python-mock" ,python-mock)
12060 ("python-nose" ,python-nose)))
f22efa01 12061 (propagated-inputs
94cffc63
LF
12062 `(("python-botocore" ,python-botocore)))
12063 (synopsis "Amazon S3 Transfer Manager")
12064 (description "S3transfer is a Python library for managing Amazon S3
12065transfers.")
12066 (home-page "https://github.com/boto/s3transfer")
12067 (license license:asl2.0)
12068 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12069
12070(define-public python2-s3transfer
12071 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12072 (package
12073 (inherit base)
12074 (native-inputs
12075 `(("python2-futures" ,python2-futures)
94cffc63 12076 ,@(package-native-inputs base))))))
8ab59181
HG
12077
12078(define-public python-setproctitle
12079(package
12080 (name "python-setproctitle")
12081 (version "1.1.10")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 (uri (pypi-uri "setproctitle" version))
12086 (sha256
12087 (base32
12088 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12089 (build-system python-build-system)
12090 (arguments
12091 '(#:phases
12092 (modify-phases %standard-phases
12093 (add-before 'check 'patch-Makefile
12094 ;; Stricly this is only required for the python2 variant.
12095 ;; But adding a phase in an inherited package seems to be
12096 ;; cumbersum. So we patch even for python3.
12097 (lambda _
12098 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12099 (when nose
12100 (substitute* "Makefile"
12101 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12102 (string-append nose "/bin/nosetests "))))
12103 #t)))
12104 (replace 'check
12105 (lambda _
12106 (setenv "PYTHON" (or (which "python3") (which "python")))
12107 (setenv "PYCONFIG" (or (which "python3-config")
12108 (which "python-config")))
12109 (setenv "CC" "gcc")
12110 ;; No need to extend PYTHONPATH to find the built package, since
12111 ;; the Makefile will build anyway
12112 (zero? (system* "make" "check")))))))
12113 (native-inputs
12114 `(("procps" ,procps))) ; required for tests
12115 (home-page
12116 "https://github.com/dvarrazzo/py-setproctitle")
12117 (synopsis
12118 "Setproctitle implementation for Python to customize the process title")
12119 (description "The library allows a process to change its title (as displayed
12120by system tools such as ps and top).
12121
12122Changing the title is mostly useful in multi-process systems, for
12123example when a master process is forked: changing the children's title
12124allows to identify the task each process is busy with. The technique
12125is used by PostgreSQL and the OpenSSH Server for example.")
12126 (license license:bsd-3)
12127 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12128
12129(define-public python2-setproctitle
12130 (let ((base (package-with-python2
12131 (strip-python2-variant python-setproctitle))))
12132 (package
12133 (inherit base)
12134 (native-inputs `(("python2-nose" ,python2-nose)
12135 ,@(package-native-inputs base))))))
162e42d8
HG
12136
12137(define-public python-validictory
12138 (package
12139 (name "python-validictory")
12140 (version "1.0.1")
12141 (source
12142 (origin
12143 (method url-fetch)
12144 (uri (pypi-uri "validictory" version))
12145 (sha256
12146 (base32
12147 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12148 (build-system python-build-system)
12149 (arguments
12150 '(#:phases
12151 (modify-phases %standard-phases
12152 (add-after 'unpack 'bootstrap
12153 ;; Move the tests out of the package directory to avoid
12154 ;; packaging them.
12155 (lambda* _
12156 (rename-file "validictory/tests" "tests")
12157 (delete-file "tests/__init__.py")))
12158 (replace 'check
12159 (lambda _
12160 ;; Extend PYTHONPATH so the built package will be found.
12161 (setenv "PYTHONPATH"
12162 (string-append (getcwd) "/build/lib:"
12163 (getenv "PYTHONPATH")))
12164 (zero? (system* "py.test" "-vv" )))))))
12165 (native-inputs
12166 `(("python-pytest" ,python-pytest)))
12167 (home-page
12168 "https://github.com/jamesturk/validictory")
12169 (synopsis "General purpose Python data validator")
12170 (description "It allows validation of arbitrary Python data structures.
12171
12172The schema format is based on the JSON Schema
12173proposal (http://json-schema.org), so combined with json the library is also
12174useful as a validator for JSON data.")
f210e944 12175 (license license:expat)))
162e42d8
HG
12176
12177(define-public python2-validictory
f210e944 12178 (package-with-python2 python-validictory))
0990edfe
DM
12179
12180(define-public python-aniso8601
12181 (package
12182 (name "python-aniso8601")
12183 (version "1.1.0")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "aniso8601" version))
12188 (sha256
12189 (base32
12190 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12191 (build-system python-build-system)
12192 (propagated-inputs
22d7360b 12193 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12194 (home-page
12195 "https://bitbucket.org/nielsenb/aniso8601")
12196 (synopsis
12197 "Python library for parsing ISO 8601 strings")
12198 (description
12199 "This package contains a library for parsing ISO 8601 datetime strings.")
12200 (license license:bsd-3)))
999d964d
DM
12201
12202(define-public python-flask-restful
12203 (package
12204 (name "python-flask-restful")
12205 (version "0.3.5")
12206 (source
12207 (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "Flask-RESTful" version))
12210 (sha256
12211 (base32
12212 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12213 (build-system python-build-system)
12214 (propagated-inputs
12215 `(("python-aniso8601" ,python-aniso8601)
12216 ("python-flask" ,python-flask)
12217 ("python-pycrypto" ,python-pycrypto)
12218 ("python-pytz" ,python-pytz)))
12219 (native-inputs
12220 `(;; Optional dependency of Flask. Tests need it.
12221 ("python-blinker" ,python-blinker)
12222 ("python-mock" ,python-mock) ; For tests
12223 ("python-nose" ,python-nose) ; For tests
12224 ("python-sphinx" ,python-sphinx)))
12225 (home-page
12226 "https://www.github.com/flask-restful/flask-restful/")
12227 (synopsis
12228 "Flask module for creating REST APIs")
12229 (description
12230 "This package contains a Flask module for creating REST APIs.")
12231 (license license:bsd-3)))
31288222
DM
12232
12233(define-public python-flask-basicauth
12234 (package
12235 (name "python-flask-basicauth")
12236 (version "0.2.0")
12237 (source
12238 (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "Flask-BasicAuth" version))
12241 (sha256
12242 (base32
12243 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12244 (build-system python-build-system)
12245 (propagated-inputs
12246 `(("python-flask" ,python-flask)))
12247 (home-page
12248 "https://github.com/jpvanhal/flask-basicauth")
12249 (synopsis
12250 "HTTP basic access authentication for Flask")
12251 (description
12252 "This package provides HTTP basic access authentication for Flask.")
12253 (license license:bsd-3)))
903276d0
DM
12254
12255(define-public python-flask-sqlalchemy
12256 (package
12257 (name "python-flask-sqlalchemy")
12258 (version "2.1")
12259 (source
12260 (origin
12261 (method url-fetch)
12262 (uri (pypi-uri "Flask-SQLAlchemy" version))
12263 (sha256
12264 (base32
12265 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12266 (build-system python-build-system)
12267 (propagated-inputs
12268 `(("python-flask" ,python-flask)
12269 ("python-sqlalchemy" ,python-sqlalchemy)))
12270 (home-page
12271 "http://github.com/mitsuhiko/flask-sqlalchemy")
12272 (synopsis
12273 "Module adding SQLAlchemy support to your Flask application")
12274 (description
12275 "This package adds SQLAlchemy support to your Flask application.")
12276 (license license:bsd-3)))
329b4b3b
LF
12277
12278(define-public python-pyev
12279 (package
12280 (name "python-pyev")
12281 (version "0.9.0")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "pyev" version))
12286 (sha256
12287 (base32
12288 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12289 (build-system python-build-system)
12290 (arguments
12291 `(#:tests? #f ; no test suite
12292 #:phases
12293 (modify-phases %standard-phases
12294 (add-after 'unpack 'patch
12295 (lambda* (#:key inputs #:allow-other-keys)
12296 (let ((libev (string-append (assoc-ref inputs "libev")
12297 "/lib/libev.so.4")))
12298 (substitute* "setup.py"
12299 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12300 (string-append "libev_dll_name = \"" libev "\"")))))))))
12301 (inputs
12302 `(("libev" ,libev)))
12303 (home-page "http://pythonhosted.org/pyev/")
12304 (synopsis "Python libev interface")
12305 (description "Pyev provides a Python interface to libev.")
12306 (license license:gpl3)))
12307
12308(define-public python2-pyev
12309 (package-with-python2 python-pyev))
45b4f127
DM
12310
12311(define-public python-imagesize
12312 (package
12313 (name "python-imagesize")
12314 (version "0.7.1")
12315 (source
12316 (origin
12317 (method url-fetch)
12318 (uri (pypi-uri "imagesize" version))
12319 (sha256
12320 (base32
12321 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12322 (build-system python-build-system)
9422c98a
LF
12323 (arguments
12324 '(;; Test files are not distributed on PyPi:
12325 ;; https://github.com/shibukawa/imagesize_py/issues/7
12326 #:tests? #f))
45b4f127
DM
12327 (home-page "https://github.com/shibukawa/imagesize_py")
12328 (synopsis "Gets image size of files in variaous formats in Python")
12329 (description
12330 "This package allows determination of image size from
12331PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12332 (license license:expat)))
45b4f127
DM
12333
12334(define-public python2-imagesize
f210e944 12335 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12336
12337(define-public python-axolotl-curve25519
12338 (package
12339 (name "python-axolotl-curve25519")
12340 (version "0.1")
12341 (source
12342 (origin
12343 (method git-fetch)
12344 (uri (git-reference
12345 (url "git://github.com/tgalal/python-axolotl-curve25519")
12346 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12347 (file-name (string-append name "-" version "-checkout"))
12348 (sha256
12349 (base32
12350 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12351 (build-system python-build-system)
12352 (arguments
12353 `(;; Prevent creation of the egg. This works around
12354 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12355 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12356 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12357 (synopsis "Python wrapper for curve25519 library")
12358 (description "This is a python wrapper for the curve25519 library
12359with ed25519 signatures. The C code was pulled from
12360libaxolotl-android. At the moment this wrapper is meant for use by
12361python-axolotl.")
12362 (license (list license:gpl3 ; Most files
683cdbf5 12363 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12364
12365(define-public python2-axolotl-curve25519
12366 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12367
12368(define-public python-axolotl
12369 (package
12370 (name "python-axolotl")
12371 (version "0.1.35")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (string-append
12376 "https://github.com/tgalal/python-axolotl/archive/"
12377 version ".tar.gz"))
12378 (file-name (string-append name "-" version ".tar.gz"))
12379 (sha256
12380 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12381 (build-system python-build-system)
12382 (arguments
12383 `(#:phases
12384 (modify-phases %standard-phases
12385 ;; Don't install tests
12386 (add-before 'install 'remove-tests
12387 (lambda _
12388 (for-each delete-file-recursively
12389 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 12390 #t)))))
06ff0837
AI
12391 (propagated-inputs
12392 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12393 ("python-dateutil" ,python-dateutil)
12394 ("python-protobuf" ,python-protobuf)
12395 ("python-pycrypto" ,python-pycrypto)))
12396 (home-page "https://github.com/tgalal/python-axolotl")
12397 (synopsis "Python port of libaxolotl-android")
12398 (description "This is a python port of libaxolotl-android. This
12399is a ratcheting forward secrecy protocol that works in synchronous and
12400asynchronous messaging environments.")
12401 (license license:gpl3)))
12402
12403(define-public python2-axolotl
12404 (package-with-python2 python-axolotl))
e2fca490
DM
12405
12406(define-public python-termstyle
12407 (package
12408 (name "python-termstyle")
12409 (version "0.1.11")
12410 (source
12411 (origin
12412 (method url-fetch)
12413 (uri (pypi-uri "termstyle" version))
12414 (sha256
12415 (base32
12416 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12417 (build-system python-build-system)
7917a135
MB
12418 (arguments
12419 '(#:phases
12420 (modify-phases %standard-phases
12421 (replace 'check
12422 (lambda _
12423 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12424 (home-page "http://github.com/gfxmonk/termstyle")
12425 (synopsis "Console text coloring for Python")
12426 (description "This package provides console text coloring for Python.")
12427 (license license:bsd-3)))
1e6112d8
DM
12428
12429(define-public python-rednose
12430 (package
12431 (name "python-rednose")
12432 (version "1.2.1")
12433 (source
12434 (origin
12435 (method url-fetch)
12436 (uri (pypi-uri "rednose" version))
12437 (sha256
12438 (base32
12439 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12440 (build-system python-build-system)
12441 (arguments
12442 `(#:phases
12443 (modify-phases %standard-phases
12444 (add-after 'unpack 'fix-deps
12445 (lambda _
12446 ;; See <https://github.com/JBKahn/rednose/issues/12>
12447 (substitute* "setup.py"
12448 (("python-termstyle") "termstyle"))
12449 #t)))))
12450 (propagated-inputs
12451 `(("python-colorama" ,python-colorama)
12452 ("python-termstyle" ,python-termstyle)))
12453 (native-inputs
12454 `(("python-six" ,python-six)
12455 ("python-nose" ,python-nose)))
12456 (home-page "https://github.com/JBKahn/rednose")
12457 (synopsis "Colored output for Python nosetests")
12458 (description "This package provides colored output for the
12459@command{nosetests} command of the Python Nose unit test framework.")
12460 (license license:bsd-3)))
0a7f17f0
DM
12461
12462(define-public python-flask-restplus
12463 (package
12464 (name "python-flask-restplus")
12465 (version "0.9.2")
12466 (source
12467 (origin
12468 (method url-fetch)
12469 (uri (pypi-uri "flask-restplus" version))
12470 (sha256
12471 (base32
12472 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12473 (build-system python-build-system)
59f74825
MB
12474 (arguments
12475 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12476 ;; #:phases
12477 ;; (modify-phases %standard-phases
12478 ;; (replace 'check
12479 ;; (lambda _
12480 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12481 (propagated-inputs
12482 `(("python-aniso8601" ,python-aniso8601)
12483 ("python-flask" ,python-flask)
12484 ("python-jsonschema" ,python-jsonschema)
12485 ("python-pytz" ,python-pytz)
12486 ("python-six" ,python-six)))
12487 (native-inputs
12488 `(("python-tzlocal" ,python-tzlocal)
12489 ("python-blinker" ,python-blinker)
12490 ("python-nose" ,python-nose)
12491 ("python-rednose" ,python-rednose)))
12492 (home-page "https://github.com/noirbizarre/flask-restplus")
12493 (synopsis "Framework for documented API development with Flask")
12494 (description "This package provides a framework for API development with
12495the Flask web framework in Python. It is similar to package
12496@code{python-flask-restful} but supports the @code{python-swagger}
12497documentation builder.")
12498 (license license:expat)))
1ed21519
DM
12499
12500(define-public python-sadisplay
12501 (package
12502 (name "python-sadisplay")
12503 (version "0.4.6")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "sadisplay" version))
12508 (sha256
12509 (base32
12510 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12511 (build-system python-build-system)
12512 (propagated-inputs
12513 `(("python-sqlalchemy" ,python-sqlalchemy)))
12514 (native-inputs
12515 `(("python-nose" ,python-nose)))
12516 (home-page "https://bitbucket.org/estin/sadisplay")
12517 (synopsis "SQLAlchemy schema displayer")
12518 (description "This package provides a program to build Entity
12519Relationship diagrams from a SQLAlchemy model (or directly from the
12520database).")
12521 (license license:bsd-3)))
12522
12523(define-public python2-sadisplay
12524 (package-with-python2 python-sadisplay))
444a79b6
DM
12525
12526(define-public python-flask-restful-swagger
12527 (package
12528 (name "python-flask-restful-swagger")
12529 (version "0.19")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "flask-restful-swagger" version))
12534 (sha256
12535 (base32
12536 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12537 (build-system python-build-system)
12538 (propagated-inputs
12539 `(("python-flask-restful" ,python-flask-restful)))
12540 (home-page "https://github.com/rantav/flask-restful-swagger")
12541 (synopsis "Extract Swagger specs from Flask-Restful projects")
12542 (description "This package lets you extract Swagger API documentation
12543specs from your Flask-Restful projects.")
12544 (license license:expat)))
12545
12546(define-public python2-flask-restful-swagger
12547 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12548
12549(define-public python-argcomplete
12550 (package
12551 (name "python-argcomplete")
12552 (version "1.7.0")
12553 (source
12554 (origin
12555 (method url-fetch)
12556 (uri (pypi-uri "argcomplete" version))
12557 (sha256
12558 (base32
12559 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12560 (build-system python-build-system)
80ce42bd
MB
12561 (native-inputs
12562 `(("python-pexpect" ,python-pexpect)
12563 ("tcsh" ,tcsh)))
6c2e82bc
TGR
12564 (home-page "https://github.com/kislyuk/argcomplete")
12565 (synopsis "Shell tab completion for Python argparse")
12566 (description "argcomplete provides extensible command line tab completion
12567of arguments and options for Python scripts using @code{argparse}. It's
12568particularly useful for programs with many options or sub-parsers that can
12569dynamically suggest completions; for example, when browsing resources over the
12570network.")
12571 (license license:asl2.0)))
12572
12573(define-public python2-argcomplete
12574 (package-with-python2 python-argcomplete))
361a2fcf
TGR
12575
12576(define-public python-xopen
12577 (package
12578 (name "python-xopen")
12579 (version "0.1.1")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "xopen" version))
12584 (sha256
12585 (base32
12586 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12587 (file-name (string-append name "-" version ".tar.gz"))))
12588 (build-system python-build-system)
12589 (home-page "https://github.com/marcelm/xopen/")
12590 (synopsis "Open compressed files transparently")
12591 (description "This module provides an @code{xopen} function that works like
12592Python's built-in @code{open} function, but can also deal with compressed files.
12593Supported compression formats are gzip, bzip2 and, xz, and are automatically
12594recognized by their file extensions. The focus is on being as efficient as
12595possible on all supported Python versions.")
12596 (license license:expat)))
12597
12598(define-public python2-xopen
12599 (package-with-python2 python-xopen))
8d67610b
DM
12600
12601(define-public python2-cheetah
12602 (package
12603 (name "python2-cheetah")
12604 (version "2.4.4")
12605 (source
12606 (origin
12607 (method url-fetch)
12608 (uri (pypi-uri "Cheetah" version))
12609 (sha256
12610 (base32
12611 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
12612 (build-system python-build-system)
12613 (arguments
12614 `(#:python ,python-2))
12615 (propagated-inputs
12616 `(("python2-markdown" ,python2-markdown)))
12617 (home-page "https://pythonhosted.org/Cheetah/")
12618 (synopsis "Template engine")
12619 (description "Cheetah is a text-based template engine and Python code
12620generator.
12621
12622Cheetah can be used as a standalone templating utility or referenced as
12623a library from other Python applications. It has many potential uses,
12624but web developers looking for a viable alternative to ASP, JSP, PHP and
12625PSP are expected to be its principle user group.
12626
12627Features:
12628@enumerate
12629@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12630 text-based format.
12631@item Cleanly separates content, graphic design, and program code.
12632@item Blends the power and flexibility of Python with a simple template language
12633 that non-programmers can understand.
12634@item Gives template writers full access to any Python data structure, module,
12635 function, object, or method in their templates.
12636@item Makes code reuse easy by providing an object-orientated interface to
12637 templates that is accessible from Python code or other Cheetah templates.
12638 One template can subclass another and selectively reimplement sections of it.
12639@item Provides a simple, yet powerful, caching mechanism that can dramatically
12640 improve the performance of a dynamic website.
12641@item Compiles templates into optimized, yet readable, Python code.
12642@end enumerate")
12643 (license (license:x11-style "file://LICENSE"))))