gnu: python-ply: Update to 3.9.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
6c2e82bc 35;;; Copyright © 2016 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)
0da98533 78 #:use-module (gnu packages maths)
4ed20663 79 #:use-module (gnu packages multiprecision)
45203542 80 #:use-module (gnu packages networking)
be7134bf 81 #:use-module (gnu packages ncurses)
b04a52a6 82 #:use-module (gnu packages openstack)
d488d5d6 83 #:use-module (gnu packages password-utils)
c9b1b4f9 84 #:use-module (gnu packages pcre)
4ed20663 85 #:use-module (gnu packages perl)
b10ab723 86 #:use-module (gnu packages pkg-config)
06ff0837 87 #:use-module (gnu packages protobuf)
4ed20663 88 #:use-module (gnu packages readline)
6eb7af2a 89 #:use-module (gnu packages sdl)
c9b1b4f9 90 #:use-module (gnu packages statistics)
8f9ac901 91 #:use-module (gnu packages tex)
1c65314c 92 #:use-module (gnu packages texinfo)
cc2b77df 93 #:use-module (gnu packages tls)
e25f0174 94 #:use-module (gnu packages version-control)
02f8f804 95 #:use-module (gnu packages video)
8d12be1e 96 #:use-module (gnu packages web)
ce0614dd 97 #:use-module (gnu packages base)
26b307e2 98 #:use-module (gnu packages xml)
6fa14469 99 #:use-module (gnu packages xorg)
0bdc1671 100 #:use-module (gnu packages xdisorg)
4ed20663 101 #:use-module (gnu packages zip)
afa181ff 102 #:use-module (gnu packages tcl)
63bcec71 103 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
104 #:use-module (guix packages)
105 #:use-module (guix download)
ea5456c8 106 #:use-module (guix git-download)
11bb85a1 107 #:use-module (guix utils)
acc26ff1 108 #:use-module (guix build-system gnu)
d8c4998f 109 #:use-module (guix build-system cmake)
898238b9 110 #:use-module (guix build-system python)
1c65314c
FB
111 #:use-module (guix build-system trivial)
112 #:use-module (srfi srfi-1))
a01b6da7 113
45848023 114(define-public python-2.7
a01b6da7
NK
115 (package
116 (name "python")
f0499100 117 (version "2.7.12")
a01b6da7
NK
118 (source
119 (origin
120 (method url-fetch)
9b43a0ff 121 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
122 version "/Python-" version ".tar.xz"))
123 (sha256
124 (base32
f0499100 125 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
126 (patches (search-patches "python-2.7-search-paths.patch"
127 "python-2-deterministic-build-info.patch"
15e57f57 128 "python-2.7-site-prefixes.patch"
c3052d6b 129 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
130 (modules '((guix build utils)))
131 ;; suboptimal to delete failing tests here, but if we delete them in the
132 ;; arguments then we need to make sure to strip out that phase when it
133 ;; gets inherited by python and python-minimal.
134 (snippet
135 '(begin
136 (for-each delete-file
137 '("Lib/test/test_compileall.py"
f0499100 138 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
139 "Lib/test/test_distutils.py"
140 "Lib/test/test_import.py"
141 "Lib/test/test_shutil.py"
142 "Lib/test/test_socket.py"
1bb163b0 143 "Lib/test/test_subprocess.py"))
10a42aa2 144 #t))))
02f0c3b2
LC
145 (outputs '("out"
146 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 147 (build-system gnu-build-system)
3fdc99da 148 (arguments
10a42aa2 149 `(;; 356 tests OK.
e7e7a1eb
EF
150 ;; 6 tests failed:
151 ;; test_compileall test_distutils test_import test_shutil test_socket
152 ;; test_subprocess
153 ;; 39 tests skipped:
ff6f33cf
ED
154 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
155 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
156 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
157 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
158 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
159 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
160 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
161 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
162 ;; test_winreg test_winsound test_zipfile64
163 ;; 4 skips unexpected on linux2:
164 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 165 #:test-target "test"
3fdc99da 166 #:configure-flags
6a20289d
LC
167 (list "--enable-shared" ;allow embedding
168 "--with-system-ffi" ;build ctypes
aaf75c89 169 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
170 (string-append "LDFLAGS=-Wl,-rpath="
171 (assoc-ref %outputs "out") "/lib"))
fd982732 172
d2cc9c7c
LC
173 #:modules ((ice-9 ftw) (ice-9 match)
174 (guix build utils) (guix build gnu-build-system))
fd982732 175 #:phases
46472ecd
MW
176 (modify-phases %standard-phases
177 (add-before
178 'configure 'patch-lib-shells
179 (lambda _
180 ;; Filter for existing files, since some may not exist in all
181 ;; versions of python that are built with this recipe.
182 (substitute* (filter file-exists?
183 '("Lib/subprocess.py"
184 "Lib/popen2.py"
185 "Lib/distutils/tests/test_spawn.py"
186 "Lib/test/test_subprocess.py"))
187 (("/bin/sh") (which "sh")))
dedc8320
LC
188
189 ;; Use zero as the timestamp in .pyc files so that builds are
190 ;; deterministic. TODO: Remove it when this variable is set in
191 ;; gnu-build-system.scm.
a665996f 192 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 193 #t))
5b4e2791
LC
194 (add-before 'configure 'do-not-record-configure-flags
195 (lambda* (#:key configure-flags #:allow-other-keys)
196 ;; Remove configure flags from the installed '_sysconfigdata.py'
197 ;; and 'Makefile' so we don't end up keeping references to the
198 ;; build tools.
199 ;;
200 ;; Preserve at least '--with-system-ffi' since otherwise the
201 ;; thing tries to build libffi, fails, and we end up with a
202 ;; Python that lacks ctypes.
203 (substitute* "configure"
204 (("^CONFIG_ARGS=.*$")
205 (format #f "CONFIG_ARGS='~a'\n"
206 (if (member "--with-system-ffi" configure-flags)
207 "--with-system-ffi"
208 ""))))
209 #t))
46472ecd
MW
210 (add-before
211 'check 'pre-check
212 (lambda _
213 ;; 'Lib/test/test_site.py' needs a valid $HOME
214 (setenv "HOME" (getcwd))
215 #t))
216 (add-after
217 'unpack 'set-source-file-times-to-1980
218 ;; XXX One of the tests uses a ZIP library to pack up some of the
219 ;; source tree, and fails with "ZIP does not support timestamps
220 ;; before 1980". Work around this by setting the file times in the
221 ;; source tree to sometime in early 1980.
222 (lambda _
223 (let ((circa-1980 (* 10 366 24 60 60)))
224 (ftw "." (lambda (file stat flag)
225 (utime file circa-1980 circa-1980)
226 #t))
02f0c3b2 227 #t)))
9ffe61b0
LC
228 (add-after 'install 'remove-tests
229 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
230 ;; because these files are used by some libraries out there.
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (match (scandir (string-append out "/lib")
234 (lambda (name)
235 (string-prefix? "python" name)))
236 ((pythonX.Y)
237 (let ((testdir (string-append out "/lib/" pythonX.Y
238 "/test")))
239 (with-directory-excursion testdir
240 (for-each delete-file-recursively
241 (scandir testdir
242 (match-lambda
243 ((or "." "..") #f)
244 (file
245 (not
246 (string-prefix? "test_support."
247 file))))))
248 (call-with-output-file "__init__.py" (const #t))
249 #t)))))))
216c283b
LC
250 (add-before 'strip 'make-libraries-writable
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; Make .so files writable so they can be stripped.
253 (let ((out (assoc-ref outputs "out")))
254 (for-each (lambda (file)
255 (chmod file #o755))
256 (find-files (string-append out "/lib")
257 "\\.so"))
258 #t)))
02f0c3b2
LC
259 (add-after 'install 'move-tk-inter
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; When Tkinter support is built move it to a separate output so
262 ;; that the main output doesn't contain a reference to Tcl/Tk.
263 (let ((out (assoc-ref outputs "out"))
264 (tk (assoc-ref outputs "tk")))
265 (when tk
266 (match (find-files out "tkinter.*\\.so")
267 ((tkinter.so)
268 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
269 ;; want it under TK/lib/pythonX.Y/site-packages.
270 (let* ((len (string-length out))
271 (target (string-append
272 tk "/"
273 (string-drop
274 (dirname (dirname tkinter.so))
275 len)
276 "/site-packages")))
277 (install-file tkinter.so target)
278 (delete-file tkinter.so)))))
279 #t))))))
a01b6da7 280 (inputs
3fdc99da
CR
281 `(("bzip2" ,bzip2)
282 ("gdbm" ,gdbm)
b10ab723 283 ("libffi" ,libffi) ; for ctypes
b88e1b0a 284 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 285 ("openssl" ,openssl)
3fdc99da 286 ("readline" ,readline)
afa181ff
LC
287 ("zlib" ,zlib)
288 ("tcl" ,tcl)
289 ("tk" ,tk))) ; for tkinter
b10ab723
CR
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
292 (native-search-paths
293 (list (search-path-specification
294 (variable "PYTHONPATH")
af070955 295 (files '("lib/python2.7/site-packages")))))
f0499100 296 (home-page "https://www.python.org")
afa181ff 297 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
298 (description
299 "Python is a remarkably powerful dynamic programming language that
300is used in a wide variety of application domains. Some of its key
301distinguishing features include: clear, readable syntax; strong
302introspection capabilities; intuitive object orientation; natural
303expression of procedural code; full modularity, supporting hierarchical
304packages; exception-based error handling; and very high level dynamic
305data types.")
3f641af0 306 (license license:psfl)))
acc26ff1 307
45848023
HG
308;; Current 2.x version.
309(define-public python-2 python-2.7)
310
72df6680 311(define-public python-3.5
b24d1cfc 312 (package (inherit python-2)
72df6680 313 (version "3.5.2")
717003e3
LC
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "https://www.python.org/ftp/python/"
317 version "/Python-" version ".tar.xz"))
fc1adab1
AK
318 (patches (search-patches
319 "python-fix-tests.patch"
72df6680 320 "python-3.5-fix-tests.patch"
fc1adab1
AK
321 "python-3-deterministic-build-info.patch"
322 "python-3-search-paths.patch"))
717003e3
LC
323 (patch-flags '("-p0"))
324 (sha256
325 (base32
72df6680 326 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
327 (arguments (substitute-keyword-arguments (package-arguments python-2)
328 ((#:tests? _) #t)))
1aebc0cb
AE
329 (native-search-paths
330 (list (search-path-specification
331 (variable "PYTHONPATH")
0e05d01e
SB
332 (files (list (string-append "lib/python"
333 (version-major+minor version)
334 "/site-packages"))))))))
f26a77ff 335
72df6680
LF
336(define-public python-3.4
337 (package (inherit python-3.5)
338 (version "3.4.5")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "https://www.python.org/ftp/python/"
342 version "/Python-" version ".tar.xz"))
343 (patches (search-patches
344 "python-fix-tests.patch"
345 "python-3.4-fix-tests.patch"
346 "python-3-deterministic-build-info.patch"
347 "python-3-search-paths.patch"))
348 (patch-flags '("-p0"))
349 (sha256
350 (base32
351 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
352
45848023 353;; Current 3.x version.
72df6680 354(define-public python-3 python-3.5)
45848023
HG
355
356;; Current major version.
357(define-public python python-3)
358
95288fcc
LC
359;; Minimal variants of Python, mostly used to break the cycle between Tk and
360;; Python (Tk -> libxcb -> Python.)
361
362(define-public python2-minimal
363 (package (inherit python-2)
364 (name "python-minimal")
02f0c3b2 365 (outputs '("out"))
95288fcc
LC
366 (arguments
367 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
368 ((#:configure-flags cf)
369 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
370 (inputs '()))) ;none of the optional dependencies
371
372(define-public python-minimal
898238b9 373 (package (inherit python)
95288fcc 374 (name "python-minimal")
02f0c3b2 375 (outputs '("out"))
95288fcc 376
d0b73960 377 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
378 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
379 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
380 (inputs `(("libffi" ,libffi)
381 ("openssl" ,openssl)
95288fcc
LC
382 ("zlib" ,zlib)))))
383
64cb064c
LC
384(define* (wrap-python3 python
385 #:optional
386 (name (string-append (package-name python) "-wrapper")))
898238b9 387 (package (inherit python)
95288fcc 388 (name name)
898238b9
AE
389 (source #f)
390 (build-system trivial-build-system)
02f0c3b2 391 (outputs '("out"))
3969ca54 392 (inputs `(("bash" ,bash)))
3c0f2329 393 (propagated-inputs `(("python" ,python)))
898238b9
AE
394 (arguments
395 `(#:modules ((guix build utils))
396 #:builder
397 (begin
398 (use-modules (guix build utils))
399 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
400 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (mkdir-p bin)
402 (for-each
403 (lambda (old new)
404 (symlink (string-append python old)
405 (string-append bin "/" new)))
3969ca54
SB
406 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
407 `("python" ,"pydoc" ,"idle" ,"pip"))
408 ;; python-config outputs search paths based upon its location,
409 ;; use a bash wrapper to avoid changing its outputs.
410 (let ((bash (string-append (assoc-ref %build-inputs "bash")
411 "/bin/bash"))
412 (old (string-append python "python3-config"))
413 (new (string-append bin "/python-config")))
414 (with-output-to-file new
415 (lambda ()
416 (format #t "#!~a~%" bash)
417 (format #t "exec \"~a\" \"$@\"~%" old)
418 (chmod new #o755)
419 #t)))))))
0d56e3e1
LC
420 (synopsis "Wrapper for the Python 3 commands")
421 (description
422 "This package provides wrappers for the commands of Python@tie{}3.x such
423that they can be invoked under their usual name---e.g., @command{python}
424instead of @command{python3}.")))
425
95288fcc
LC
426(define-public python-wrapper (wrap-python3 python))
427(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 428
aaf625b8
RW
429(define-public python-psutil
430 (package
431 (name "python-psutil")
88535a44 432 (version "4.3.0")
aaf625b8
RW
433 (source
434 (origin
435 (method url-fetch)
f56777be 436 (uri (pypi-uri "psutil" version))
aaf625b8
RW
437 (sha256
438 (base32
88535a44 439 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 440 (build-system python-build-system)
88535a44 441 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
442 (synopsis "Library for retrieving information on running processes")
443 (description
444 "psutil (Python system and process utilities) is a library for retrieving
445information on running processes and system utilization (CPU, memory, disks,
446network) in Python. It is useful mainly for system monitoring, profiling and
447limiting process resources and management of running processes. It implements
448many functionalities offered by command line tools such as: ps, top, lsof,
449netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
450pidof, tty, taskset, pmap.")
3f641af0 451 (license license:bsd-3)))
aaf625b8
RW
452
453(define-public python2-psutil
454 (package-with-python2 python-psutil))
898238b9 455
f9da1d8a
ED
456(define-public python-passlib
457 (package
458 (name "python-passlib")
1c9f78ec 459 (version "1.7.0")
f9da1d8a
ED
460 (source
461 (origin
462 (method url-fetch)
690e8c66 463 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
464 (sha256
465 (base32
1c9f78ec 466 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
467 (build-system python-build-system)
468 (native-inputs
f3b98f4f 469 `(("python-nose" ,python-nose)))
f22efa01 470 (propagated-inputs
f9da1d8a
ED
471 `(("python-py-bcrypt" ,python-py-bcrypt)))
472 (arguments
473 `(#:phases
474 (alist-cons-before
475 'check 'set-PYTHON_EGG_CACHE
476 ;; some tests require access to "$HOME/.cython"
477 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
478 %standard-phases)))
479 (home-page "https://bitbucket.org/ecollins/passlib")
480 (synopsis
481 "Comprehensive password hashing framework")
482 (description
483 "Passlib is a password hashing library for Python 2 & 3, which provides
484cross-platform implementations of over 30 password hashing algorithms, as well
485as a framework for managing existing password hashes. It's designed to be
486useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
487to providing full-strength password hashing for multi-user application.")
3f641af0 488 (license license:bsd-3)))
f9da1d8a
ED
489
490(define-public python2-passlib
491 (package-with-python2 python-passlib))
492
feb0d9c3
ED
493(define-public python-py-bcrypt
494 (package
495 (name "python-py-bcrypt")
496 (version "0.4")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append
501 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
502 version
503 ".tar.gz"))
504 (sha256
505 (base32
506 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
507 (build-system python-build-system)
feb0d9c3
ED
508 (home-page "https://code.google.com/p/py-bcrypt")
509 (synopsis
510 "Bcrypt password hashing and key derivation")
511 (description
512 "A python wrapper of OpenBSD's Blowfish password hashing code. This
513system hashes passwords using a version of Bruce Schneier's Blowfish block
514cipher with modifications designed to raise the cost of off-line password
515cracking and frustrate fast hardware implementation. The computation cost of
516the algorithm is parametised, so it can be increased as computers get faster.
517The intent is to make a compromise of a password database less likely to
518result in an attacker gaining knowledge of the plaintext passwords (e.g. using
519John the Ripper).")
520 ;; "sha2.c" is under BSD-3;
521 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
522 ;; the rest is under ISC.
3f641af0 523 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
524
525(define-public python2-py-bcrypt
526 (package-with-python2 python-py-bcrypt))
527
528
429fdea1
ED
529(define-public python-paramiko
530 (package
531 (name "python-paramiko")
81b9bbbd 532 (version "1.16.0")
429fdea1
ED
533 (source
534 (origin
535 (method url-fetch)
81b9bbbd 536 (uri (pypi-uri "paramiko" version))
429fdea1
ED
537 (sha256
538 (base32
81b9bbbd 539 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 540 (build-system python-build-system)
a3fc12da 541 (propagated-inputs
f22efa01
HG
542 `(("python-pycrypto" ,python-pycrypto)
543 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
544 (home-page "http://www.paramiko.org/")
545 (synopsis "SSHv2 protocol library")
546 (description "Paramiko is a python implementation of the SSHv2 protocol,
547providing both client and server functionality. While it leverages a Python C
548extension for low level cryptography (PyCrypto), Paramiko itself is a pure
549Python interface around SSH networking concepts.")
3f641af0 550 (license license:lgpl2.1+)))
429fdea1
ED
551
552(define-public python2-paramiko
553 (package-with-python2 python-paramiko))
554
555
de73dbf6
ED
556(define-public python-httplib2
557 (package
558 (name "python-httplib2")
286f1bac 559 (version "0.9.2")
de73dbf6
ED
560 (source
561 (origin
562 (method url-fetch)
286f1bac 563 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
564 (sha256
565 (base32
286f1bac 566 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 567 (build-system python-build-system)
286f1bac 568 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
569 (synopsis "Comprehensive HTTP client library")
570 (description
571 "A comprehensive HTTP client library supporting many features left out of
572other HTTP libraries.")
573 (license license:expat)))
574
575(define-public python2-httplib2
576 (package-with-python2 python-httplib2))
577
67039875
ED
578(define-public python-ecdsa
579 (package
580 (name "python-ecdsa")
581 (version "0.13")
582 (source
583 (origin
584 (method url-fetch)
585 (uri (string-append
586 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
587 version
588 ".tar.gz"))
589 (sha256
590 (base32
591 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
592 (build-system python-build-system)
67039875
ED
593 (inputs
594 `(("openssl" ,openssl)))
595 (home-page
596 "http://github.com/warner/python-ecdsa")
597 (synopsis
598 "ECDSA cryptographic signature library (pure python)")
599 (description
600 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
601Curve Digital Signature Algorithm), implemented purely in Python. With this
602library, you can quickly create keypairs (signing key and verifying key), sign
603messages, and verify the signatures. The keys and signatures are very short,
604making them easy to handle and incorporate into other protocols.")
605 (license license:expat)))
606
607(define-public python2-ecdsa
608 (package-with-python2 python-ecdsa))
609
52323f32
ED
610(define-public python-ccm
611 (package
612 (name "python-ccm")
db5567f7 613 (version "2.1.6")
52323f32
ED
614 (source
615 (origin
616 (method url-fetch)
db5567f7 617 (uri (pypi-uri "ccm" version))
52323f32
ED
618 (sha256
619 (base32
db5567f7 620 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 621 (build-system python-build-system)
f22efa01 622 (propagated-inputs
52323f32 623 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
624 ;; Not listed in setup.py, but used in ccmlib/node.py for full
625 ;; functionality
626 ("python-psutil" ,python-psutil)
52323f32
ED
627 ("python-six" ,python-six)))
628 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
629 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
630localhost")
631 (description "Cassandra Cluster Manager is a development tool for testing
632local Cassandra clusters. It creates, launches and removes Cassandra clusters
633on localhost.")
3f641af0 634 (license license:asl2.0)))
52323f32
ED
635
636(define-public python2-ccm
637 (package-with-python2 python-ccm))
638
89114f39 639(define-public python-pytz
acc26ff1 640 (package
89114f39 641 (name "python-pytz")
a5f92ca0 642 (version "2016.10")
acc26ff1
CR
643 (source
644 (origin
645 (method url-fetch)
61c9babb 646 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
647 (sha256
648 (base32
a5f92ca0 649 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 650 (build-system python-build-system)
8498b8cf 651 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 652 (home-page "http://pythonhosted.org/pytz")
9e771e3b 653 (synopsis "Python timezone library")
acc26ff1
CR
654 (description
655 "This library allows accurate and cross platform timezone calculations
656using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 657 (license license:expat)))
5ace6e2f 658
89114f39 659(define-public python2-pytz
11bb85a1 660 (package-with-python2 python-pytz))
89114f39 661
fc50e9c6 662
89114f39 663(define-public python-babel
5ace6e2f 664 (package
89114f39 665 (name "python-babel")
ffb1e98d 666 (version "2.3.4")
5ace6e2f
CR
667 (source
668 (origin
669 (method url-fetch)
b850a6d8 670 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
671 (sha256
672 (base32
ffb1e98d 673 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 674 (build-system python-build-system)
f22efa01 675 (propagated-inputs
f3b98f4f 676 `(("python-pytz" ,python-pytz)))
8498b8cf 677 (arguments `(#:tests? #f)) ; no test target
e1804763 678 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
679 (synopsis
680 "Tools for internationalizing Python applications")
681 (description
682 "Babel is composed of two major parts:
683- tools to build and work with gettext message catalogs
684- a Python interface to the CLDR (Common Locale Data Repository), providing
685access to various locale display names, localized number and date formatting,
686etc. ")
3f641af0 687 (license license:bsd-3)))
89114f39
AE
688
689(define-public python2-babel
11bb85a1 690 (package-with-python2 python-babel))
73adf220 691
ed377cc6
RW
692(define-public python2-backport-ssl-match-hostname
693 (package
694 (name "python2-backport-ssl-match-hostname")
f2d06d46 695 (version "3.5.0.1")
ed377cc6
RW
696 (source
697 (origin
698 (method url-fetch)
699 (uri (string-append
700 "https://pypi.python.org/packages/source/b/"
701 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
702 version ".tar.gz"))
703 (sha256
704 (base32
f2d06d46 705 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 706 (build-system python-build-system)
f2d06d46
EF
707 (arguments
708 `(#:python ,python-2
709 #:tests? #f)) ; no test target
f2d06d46
EF
710 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
711 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
712 (description
713 "This backport brings the ssl.match_hostname() function to users of
714earlier versions of Python. The function checks the hostname in the
715certificate returned by the server to which a connection has been established,
716and verifies that it matches the intended target hostname.")
3f641af0 717 (license license:psfl)))
ed377cc6 718
d205f895
TD
719(define-public python-hdf4
720 (package
721 (name "python-hdf4")
722 (version "0.9")
723 (source
724 (origin
725 (method url-fetch)
726 (uri (pypi-uri name version))
727 (sha256
728 (base32
729 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
730 (build-system python-build-system)
731 (native-inputs `(("nose" ,python-nose)))
732 (propagated-inputs `(("numpy" ,python-numpy)))
733 (inputs
734 `(("hdf4" ,hdf4)
735 ("libjpeg" ,libjpeg)
736 ("zlib" ,zlib)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
743 ;; on to import numpy. Somehow this works on their CI system.
744 ;; Let's just manage PYTHONPATH here instead.
745 (substitute* "runexamples.sh"
746 (("export PYTHONPATH=.*") ""))
747 (setenv "PYTHONPATH"
748 (string-append (getcwd) ":"
749 (getenv "PYTHONPATH")))
750 (and (zero? (system* "./runexamples.sh"))
751 (zero? (system* "nosetests" "-v"))))))))
752 (home-page "https://github.com/fhs/python-hdf4")
753 (synopsis "Python interface to the NCSA HDF4 library")
754 (description
755 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
756which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
757NetCDF files can also be read and modified. Python-HDF4 is a fork of
758@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
759 (license license:expat)))
760
761(define-public python2-hdf4
762 (package-with-python2 python-hdf4))
763
ef5cbf9b
RW
764(define-public python-h5py
765 (package
766 (name "python-h5py")
fe147c41 767 (version "2.6.0")
ef5cbf9b
RW
768 (source
769 (origin
770 (method url-fetch)
fe147c41 771 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
772 (sha256
773 (base32
fe147c41 774 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 775 (build-system python-build-system)
797e1401
RW
776 (arguments
777 `(#:tests? #f ; no test target
778 #:phases
779 (modify-phases %standard-phases
780 (add-after 'unpack 'fix-hdf5-paths
781 (lambda* (#:key inputs #:allow-other-keys)
782 (let ((prefix (assoc-ref inputs "hdf5")))
783 (substitute* "setup_build.py"
784 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
785 (string-append "['" prefix "/lib" "']"))
786 (("'/opt/local/include', '/usr/local/include'")
787 (string-append "'" prefix "/include" "'")))
788 (substitute* "setup_configure.py"
789 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
790 (string-append "['" prefix "/lib" "']")))
791 #t))))))
3c4010b1 792 (propagated-inputs
69866690
HG
793 `(("python-six" ,python-six)
794 ("python-numpy" ,python-numpy)))
ef5cbf9b 795 (inputs
69866690 796 `(("hdf5" ,hdf5)))
ef5cbf9b 797 (native-inputs
fe147c41
EF
798 `(("python-cython" ,python-cython)
799 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
800 (home-page "http://www.h5py.org/")
801 (synopsis "Read and write HDF5 files from Python")
802 (description
803 "The h5py package provides both a high- and low-level interface to the
804HDF5 library from Python. The low-level interface is intended to be a
805complete wrapping of the HDF5 API, while the high-level component supports
806access to HDF5 files, datasets and groups using established Python and NumPy
807concepts.")
9820a028 808 (license license:bsd-3)))
ef5cbf9b
RW
809
810(define-public python2-h5py
9820a028 811 (package-with-python2 python-h5py))
ef5cbf9b 812
ea8450c8
TD
813(define-public python-netcdf4
814 (package
815 (name "python-netcdf4")
816 (version "1.2.6")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "netCDF4" version))
821 (sha256
822 (base32
823 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
824 (build-system python-build-system)
825 (native-inputs
826 `(("python-cython" ,python-cython)))
827 (propagated-inputs
828 `(("python-numpy" ,python-numpy)))
829 (inputs
830 `(("netcdf" ,netcdf)
831 ("hdf4" ,hdf4)
832 ("hdf5" ,hdf5)))
833 (arguments
834 '(#:phases
835 (modify-phases %standard-phases
836 (replace 'check
837 (lambda _
838 (setenv "NO_NET" "1") ; disable opendap tests
839 (with-directory-excursion "test"
840 (setenv "PYTHONPATH" ; find and add the library we just built
841 (string-append
842 (car (find-files "../build" "lib.*"
843 #:directories? #:t
844 #:fail-on-error? #:t))
845 ":" (getenv "PYTHONPATH")))
846 (zero? (system* "python" "run_all.py"))))))))
847 (home-page
848 "https://github.com/Unidata/netcdf4-python")
849 (synopsis "Python/numpy interface to the netCDF library")
850 (description "Netcdf4-python is a Python interface to the netCDF C
851library. netCDF version 4 has many features not found in earlier
852versions of the library and is implemented on top of HDF5. This module
853can read and write files in both the new netCDF 4 and the old netCDF 3
854format, and can create files that are readable by HDF5 clients. The
855API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
856to users of that module.")
857 ;; The software is mainly ISC, but includes some files covered
858 ;; by the Expat license.
859 (license (list license:isc license:expat))))
860
861(define-public python2-netcdf4
862 (package-with-python2 python-netcdf4))
863
c1448c69
EB
864(define-public python-lockfile
865 (package
866 (name "python-lockfile")
692add53 867 (version "0.12.2")
c1448c69
EB
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
872 "lockfile-" version ".tar.gz"))
873 (sha256
874 (base32
692add53 875 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
876 (build-system python-build-system)
877 (arguments '(#:test-target "check"))
692add53
BW
878 (native-inputs
879 `(("python-pbr" ,python-pbr)))
6a8f26a4 880 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
881 (synopsis "Platform-independent file locking module")
882 (description
883 "The lockfile package exports a LockFile class which provides a simple
884API for locking files.")
f210e944 885 (license license:expat)))
c1448c69
EB
886
887(define-public python2-lockfile
f210e944 888 (package-with-python2 python-lockfile))
c1448c69 889
5a1a4bf6
EB
890(define-public python-mock
891 (package
892 (name "python-mock")
893 (version "1.0.1")
894 (source
895 (origin
896 (method url-fetch)
6b7877e1 897 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
898 (sha256
899 (base32
900 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
901 (build-system python-build-system)
902 (arguments '(#:test-target "check"))
6b7877e1 903 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 904 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
905 (description
906 "Mock is a library for testing in Python. It allows you to replace parts
907of your system under test with mock objects and make assertions about how they
908have been used.")
bd3fa666 909 (license license:expat)))
5a1a4bf6
EB
910
911(define-public python2-mock
912 (package-with-python2 python-mock))
913
fc50e9c6 914
73adf220
AE
915(define-public python-setuptools
916 (package
917 (name "python-setuptools")
d660f7be 918 (version "31.0.0")
73adf220
AE
919 (source
920 (origin
921 (method url-fetch)
d660f7be 922 (uri (pypi-uri "setuptools" version))
73adf220
AE
923 (sha256
924 (base32
d660f7be 925 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
926 (modules '((guix build utils)))
927 (snippet
928 '(begin
929 ;; Remove included binaries which are used to build self-extracting
930 ;; installers for Windows.
931 ;; TODO: Find some way to build them ourself so we can include them.
932 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
933 #t))))
73adf220 934 (build-system python-build-system)
d3d656c5
AE
935 ;; FIXME: Tests require pytest, which itself relies on setuptools.
936 ;; One could bootstrap with an internal untested setuptools.
73adf220 937 (arguments
824af8ca 938 `(#:tests? #f))
73adf220
AE
939 (home-page "https://pypi.python.org/pypi/setuptools")
940 (synopsis
941 "Library designed to facilitate packaging Python projects")
942 (description
943 "Setuptools is a fully-featured, stable library designed to facilitate
944packaging Python projects, where packaging includes:
945Python package and module definitions,
946distribution package metadata,
947test hooks,
948project installation,
949platform-specific details,
950Python 3 support.")
d660f7be
MB
951 ;; TODO: setuptools now bundles the following libraries:
952 ;; packaging, pyparsing, six and appdirs. How to unbundle?
953 (license (list license:psfl ; setuptools itself
954 license:expat ; six, appdirs, pyparsing
955 license:asl2.0 ; packaging is dual ASL2/BSD-2
956 license:bsd-2))))
73adf220
AE
957
958(define-public python2-setuptools
959 (package-with-python2 python-setuptools))
fc50e9c6 960
1194575b
LF
961;;; Pycrypto is abandoned upstream [0] and contains at least one bug that can be
962;;; exploited to achieve arbitrary code execution [1].
963;;;
964;;; TODO Remove this package from GNU Guix.
965;;;
966;;; [0] https://github.com/dlitz/pycrypto/issues/173
967;;; [1] https://github.com/dlitz/pycrypto/issues/176
cafc3f5a
EB
968(define-public python-pycrypto
969 (package
970 (name "python-pycrypto")
971 (version "2.6.1")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "https://pypi.python.org/packages/source/p/"
976 "pycrypto/pycrypto-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
980 (build-system python-build-system)
cafc3f5a
EB
981 (inputs
982 `(("python" ,python)
983 ("gmp" ,gmp)))
984 (arguments
985 `(#:phases
986 (alist-cons-before
987 'build 'set-build-env
988 ;; pycrypto runs an autoconf configure script behind the scenes
989 (lambda _
990 (setenv "CONFIG_SHELL" (which "bash")))
991 %standard-phases)))
992 (home-page "http://www.pycrypto.org/")
993 (synopsis "Cryptographic modules for Python")
994 (description
995 "Pycrypto is a collection of both secure hash functions (such as SHA256
996and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 997etc.). The package is structured to make adding new modules easy.")
3f641af0 998 (license license:public-domain)))
cafc3f5a 999
345f0611 1000(define-public python2-pycrypto
1c0059da
EF
1001 (let ((pycrypto (package-with-python2 python-pycrypto)))
1002 (package (inherit pycrypto)
1003 (inputs
1004 `(("python" ,python-2)
1005 ,@(alist-delete
1006 "python"
1007 (package-inputs pycrypto)))))))
345f0611 1008
cafc3f5a
EB
1009(define-public python-keyring
1010 (package
1011 (name "python-keyring")
13f3ff35 1012 (version "8.7")
cafc3f5a
EB
1013 (source
1014 (origin
1015 (method url-fetch)
664e6c3a 1016 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1017 (sha256
1018 (base32
13f3ff35 1019 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1020 (build-system python-build-system)
1021 (native-inputs
13f3ff35 1022 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1023 (propagated-inputs
cafc3f5a
EB
1024 `(("python-pycrypto" ,python-pycrypto)))
1025 (arguments
664e6c3a 1026 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1027 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1028 (synopsis "Store and access your passwords safely")
1029 (description
1030 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1031service from python. It can be used in any application that needs safe
cafc3f5a
EB
1032password storage.")
1033 ;; "MIT" and PSF dual license
f210e944 1034 (license license:x11)))
cafc3f5a 1035
d7af1069 1036(define-public python2-keyring
f210e944 1037 (package-with-python2 python-keyring))
d7af1069 1038
a480bc41
EB
1039(define-public python-six
1040 (package
1041 (name "python-six")
b6ab89ef 1042 (version "1.10.0")
a480bc41
EB
1043 (source
1044 (origin
1045 (method url-fetch)
b6ab89ef 1046 (uri (pypi-uri "six" version))
a480bc41
EB
1047 (sha256
1048 (base32
b6ab89ef 1049 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1050 (build-system python-build-system)
a480bc41
EB
1051 (home-page "http://pypi.python.org/pypi/six/")
1052 (synopsis "Python 2 and 3 compatibility utilities")
1053 (description
35b9e423 1054 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1055functions for smoothing over the differences between the Python versions with
1056the goal of writing Python code that is compatible on both Python versions.
35b9e423 1057Six supports every Python version since 2.5. It is contained in only one
a480bc41 1058Python file, so it can be easily copied into your project.")
3f641af0 1059 (license license:x11)))
a480bc41 1060
0c20025c
AE
1061(define-public python2-six
1062 (package-with-python2 python-six))
1063
cafc3f5a
EB
1064(define-public python-dateutil-2
1065 (package
1066 (name "python-dateutil")
394b8060 1067 (version "2.5.2")
cafc3f5a
EB
1068 (source
1069 (origin
1070 (method url-fetch)
394b8060 1071 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1072 (sha256
1073 (base32
394b8060 1074 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 1075 (build-system python-build-system)
f22efa01 1076 (propagated-inputs
394b8060 1077 `(("python-six" ,python-six)))
b5a5fb19 1078 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1079 (synopsis "Extensions to the standard datetime module")
1080 (description
1081 "The dateutil module provides powerful extensions to the standard
1082datetime module, available in Python 2.3+.")
f210e944 1083 (license license:bsd-3)))
cafc3f5a
EB
1084
1085(define-public python2-dateutil-2
f210e944 1086 (package-with-python2 python-dateutil-2))
cafc3f5a 1087
fc50e9c6
AE
1088(define-public python-dateutil
1089 (package
1090 (name "python-dateutil")
1091 (version "1.5") ; last version for python < 3
1092 (source
1093 (origin
1094 (method url-fetch)
cafc3f5a
EB
1095 (uri (string-append "http://labix.org/download/python-dateutil/"
1096 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1097 (sha256
1098 (base32
1099 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1100 (build-system python-build-system)
b5a5fb19 1101 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1102 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1103 (description
1104 "The dateutil module provides powerful extensions to the standard
1105datetime module, available in Python 2.3+.")
3f641af0 1106 (license license:psfl)))
fc50e9c6
AE
1107
1108(define-public python2-dateutil
1109 (package-with-python2 python-dateutil))
1d08c01f 1110
cafc3f5a
EB
1111(define-public python-parsedatetime
1112 (package
1113 (name "python-parsedatetime")
eebf6f01 1114 (version "2.1")
cafc3f5a
EB
1115 (source
1116 (origin
1117 (method url-fetch)
eebf6f01 1118 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1119 (sha256
1120 (base32
eebf6f01 1121 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1122 (build-system python-build-system)
1123 (native-inputs
eebf6f01
EF
1124 `(("python-nose" ,python-nose)
1125 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1126 (home-page "http://github.com/bear/parsedatetime/")
1127 (synopsis
1128 "Parse human-readable date/time text")
1129 (description
e881752c 1130 "Parse human-readable date/time text.")
f210e944 1131 (license license:asl2.0)))
cafc3f5a 1132
38b8f9b2 1133(define-public python2-parsedatetime
f210e944 1134 (package-with-python2 python-parsedatetime))
38b8f9b2 1135
d072efcb
RW
1136(define-public python-pandas
1137 (package
1138 (name "python-pandas")
7d0c3c8d 1139 (version "0.18.1")
d072efcb
RW
1140 (source
1141 (origin
1b96f069 1142 (method url-fetch)
7d0c3c8d
EF
1143 (uri (string-append
1144 "https://pypi.python.org/packages/11/09/"
1145 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1146 "pandas-" version ".tar.gz"))
1b96f069 1147 (sha256
7d0c3c8d 1148 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1149 (build-system python-build-system)
d072efcb 1150 (propagated-inputs
f22efa01
HG
1151 `(("python-numpy" ,python-numpy)
1152 ("python-pytz" ,python-pytz)
d072efcb
RW
1153 ("python-dateutil" ,python-dateutil-2)))
1154 (native-inputs
abcc7a0e
HG
1155 `(("python-nose" ,python-nose)
1156 ("python-cython" ,python-cython)))
d072efcb
RW
1157 (home-page "http://pandas.pydata.org")
1158 (synopsis "Data structures for data analysis, time series, and statistics")
1159 (description
1160 "Pandas is a Python package providing fast, flexible, and expressive data
1161structures designed to make working with structured (tabular,
1162multidimensional, potentially heterogeneous) and time series data both easy
1163and intuitive. It aims to be the fundamental high-level building block for
1164doing practical, real world data analysis in Python.")
f210e944 1165 (license license:bsd-3)))
d072efcb
RW
1166
1167(define-public python2-pandas
f210e944 1168 (package-with-python2 python-pandas))
d072efcb 1169
cafc3f5a
EB
1170(define-public python-tzlocal
1171 (package
1172 (name "python-tzlocal")
ed80839b 1173 (version "1.2.2")
cafc3f5a
EB
1174 (source
1175 (origin
1176 (method url-fetch)
226d3331 1177 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1178 (sha256
1179 (base32
ed80839b 1180 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1181 (build-system python-build-system)
f22efa01
HG
1182 (propagated-inputs
1183 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1184 (home-page "https://github.com/regebro/tzlocal")
1185 (synopsis
35b9e423 1186 "Local timezone information for Python")
cafc3f5a
EB
1187 (description
1188 "Tzlocal returns a tzinfo object with the local timezone information.
1189This module attempts to fix a glaring hole in pytz, that there is no way to
1190get the local timezone information, unless you know the zoneinfo name, and
1191under several distributions that's hard or impossible to figure out.")
3f641af0 1192 (license license:cc0)))
cafc3f5a 1193
1d08c01f
AE
1194(define-public python2-pysqlite
1195 (package
1196 (name "python2-pysqlite")
fe476868 1197 (version "2.8.1")
1d08c01f
AE
1198 (source
1199 (origin
1200 (method url-fetch)
fe476868 1201 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1202 (sha256
1203 (base32
fe476868 1204 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1205 (build-system python-build-system)
1206 (inputs
1207 `(("sqlite" ,sqlite)))
1208 (arguments
1209 `(#:python ,python-2 ; incompatible with Python 3
1210 #:tests? #f)) ; no test target
fe476868 1211 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1212 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1213 (description
1214 "Pysqlite provides SQLite bindings for Python that comply to the
1215Database API 2.0T.")
ed0cdf83 1216 (license license:zlib)))
1d08c01f 1217
2875caf5
AE
1218
1219(define-public python2-mechanize
1220 (package
1221 (name "python2-mechanize")
1222 (version "0.2.5")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1227 version ".tar.gz"))
1228 (sha256
1229 (base32
1230 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1231 (build-system python-build-system)
2875caf5
AE
1232 (arguments
1233 `(#:python ,python-2 ; apparently incompatible with Python 3
1234 #:tests? #f))
1235 ;; test fails with message
1236 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1237 ;; (python-3.3.2) or
1238 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1239 ;; (python-2.7.5).
1240 ;; The source code is from March 2011 and probably not up-to-date
1241 ;; with respect to python unit tests.
1242 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1243 (synopsis
1244 "Stateful programmatic web browsing in Python")
1245 (description
1246 "Mechanize implements stateful programmatic web browsing in Python,
1247after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1248 (license (license:non-copyleft
1249 "file://COPYING"
1250 "See COPYING in the distribution."))))
2875caf5 1251
0352532e
AE
1252
1253(define-public python-simplejson
1254 (package
1255 (name "python-simplejson")
b2e6e150 1256 (version "3.10.0")
0352532e
AE
1257 (source
1258 (origin
1259 (method url-fetch)
988d1bad 1260 (uri (pypi-uri "simplejson" version))
0352532e
AE
1261 (sha256
1262 (base32
b2e6e150 1263 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1264 (build-system python-build-system)
1265 (home-page "http://simplejson.readthedocs.org/en/latest/")
1266 (synopsis
1267 "Json library for Python")
1268 (description
e881752c
AK
1269 "JSON (JavaScript Object Notation) is a subset of JavaScript
1270syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1271format.
0352532e
AE
1272
1273Simplejson exposes an API familiar to users of the standard library marshal
1274and pickle modules. It is the externally maintained version of the json
1275library contained in Python 2.6, but maintains compatibility with Python 2.5
1276and (currently) has significant performance advantages, even without using
1277the optional C extension for speedups. Simplejson is also supported on
1278Python 3.3+.")
3f641af0 1279 (license license:x11)))
0352532e
AE
1280
1281(define-public python2-simplejson
1282 (package-with-python2 python-simplejson))
421a80a2
AE
1283
1284
ed07b08d 1285(define-public python-pyicu
421a80a2 1286 (package
ed07b08d 1287 (name "python-pyicu")
d3b29319 1288 (version "1.9.2")
421a80a2
AE
1289 (source
1290 (origin
1291 (method url-fetch)
1292 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1293 version ".tar.gz"))
1294 (sha256
1295 (base32
d3b29319 1296 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1297 (build-system python-build-system)
1298 (inputs
1299 `(("icu4c" ,icu4c)))
421a80a2 1300 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1301 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1302 (description
1303 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1304 (license license:x11)))
ed07b08d
LF
1305
1306(define-public python2-pyicu
f210e944 1307 (package-with-python2 python-pyicu))
cc20a22a
LC
1308
1309(define-public python2-dogtail
1310 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1311 ;; spaces in indentation" with Python 3.
1312 (package
1313 (name "python2-dogtail")
1314 (version "0.8.2")
1315 (source (origin
1316 (method url-fetch)
1317 (uri (string-append
1318 "https://fedorahosted.org/released/dogtail/dogtail-"
1319 version ".tar.gz"))
1320 (sha256
1321 (base32
1322 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1323 (build-system python-build-system)
1324 (arguments `(#:python ,python-2
1325 #:tests? #f)) ; invalid command "test"
1326 (home-page "https://fedorahosted.org/dogtail/")
1327 (synopsis "GUI test tool and automation framework written in ​Python")
1328 (description
35b9e423 1329 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1330It uses Accessibility (a11y) technologies to communicate with desktop
1331applications. dogtail scripts are written in Python and executed like any
1332other Python program.")
3f641af0 1333 (license license:gpl2+)))
515e6878 1334
011b18c3
LC
1335(define-public python2-empy
1336 (package
1337 (name "python2-empy")
1338 (version "3.3")
1339 (source (origin
1340 (method url-fetch)
1341 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1342 version ".tar.gz"))
1343 (sha256
1344 (base32
1345 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2
1349 #:phases (alist-replace
1350 'check
1351 (lambda _
1352 (zero? (system* "./test.sh")))
1353 %standard-phases)))
1354 (home-page "http://www.alcyone.com/software/empy/")
1355 (synopsis "Templating system for Python")
1356 (description
1357 "EmPy is a system for embedding Python expressions and statements in
1358template text; it takes an EmPy source file, processes it, and produces
1359output. This is accomplished via expansions, which are special signals to the
1cd4027c 1360EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1361EmPy can expand arbitrary Python expressions and statements in this way, as
1362well as a variety of special forms. Textual data not explicitly delimited in
1363this way is sent unaffected to the output, allowing Python to be used in
1364effect as a markup language. Also supported are callbacks via hooks,
1365recording and playback via diversions, and dynamic, chainable filters. The
1366system is highly configurable via command line options and embedded
1367commands.")
3f641af0 1368 (license license:lgpl2.1+)))
011b18c3 1369
8deeda0c
LC
1370(define-public python2-element-tree
1371 (package
1372 (name "python2-element-tree")
1373 (version "1.2.6")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append
1377 "http://effbot.org/media/downloads/elementtree-"
1378 version "-20050316.tar.gz"))
1379 (sha256
1380 (base32
1381 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:python ,python-2 ; seems to be part of Python 3
1385 #:tests? #f)) ; no 'test' sub-command
1386 (synopsis "Toolkit for XML processing in Python")
1387 (description
1388 "ElementTree is a Python library supporting lightweight XML processing.")
1389 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1390 (license (license:x11-style
1391 "http://docs.python.org/2/license.html"
1392 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1393
1394(define-public python2-pybugz
1395 (package
1396 (name "python2-pybugz")
1397 (version "0.6.11")
1398 (source (origin
1399 (method url-fetch)
1400 (uri (string-append
1401 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1402 version ".tar.gz"))
1403 (sha256
1404 (base32
6f194a1e 1405 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1406 (patches (search-patches "pybugz-stty.patch"
1407 "pybugz-encode-error.patch"))))
8deeda0c
LC
1408 (build-system python-build-system)
1409 (arguments
1410 `(#:python ,python-2 ; SyntaxError with Python 3
1411 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1412 (propagated-inputs
1413 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1414 (synopsis "Python and command-line interface to Bugzilla")
1415 (description
1416 "PyBugz is a Python library and command-line tool to query the Bugzilla
1417bug tracking system. It is meant as an aid to speed up interaction with the
1418bug tracker.")
1419 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1420 (license license:gpl2)))
8deeda0c 1421
a480bc41
EB
1422(define-public python-enum34
1423 (package
1424 (name "python-enum34")
d39ae1e5 1425 (version "1.1.0")
a480bc41
EB
1426 (source
1427 (origin
1428 (method url-fetch)
d39ae1e5 1429 (uri (pypi-uri "enum34" version))
a480bc41
EB
1430 (sha256
1431 (base32
d39ae1e5 1432 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1433 (build-system python-build-system)
a480bc41
EB
1434 (arguments
1435 `(#:phases
1436 (alist-replace
1437 'check
1438 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1439 %standard-phases)))
1440 (home-page "https://pypi.python.org/pypi/enum34")
1441 (synopsis "Backported Python 3.4 Enum")
1442 (description
1443 "Enum34 is the new Python stdlib enum module available in Python 3.4
1444backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1445 (license license:bsd-3)))
a480bc41 1446
820acd1b
LF
1447(define-public python2-enum34
1448 (package-with-python2 python-enum34))
1449
a480bc41
EB
1450(define-public python-parse-type
1451 (package
1452 (name "python-parse-type")
1453 (version "0.3.4")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (string-append "https://pypi.python.org/packages/source/p/"
1458 "parse_type/parse_type-" version ".tar.gz"))
1459 (sha256
1460 (base32
1461 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1462 (build-system python-build-system)
f22efa01 1463 (propagated-inputs
f3b98f4f 1464 `(("python-six" ,python-six)
68f1cdec 1465 ("python-parse" ,python-parse)))
a480bc41
EB
1466 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1467 (home-page "https://github.com/jenisys/parse_type")
1468 (synopsis "Extended parse module")
1469 (description
1470 "Parse_type extends the python parse module.")
3f641af0 1471 (license license:bsd-3)))
a480bc41
EB
1472
1473(define-public python-parse
1474 (package
1475 (name "python-parse")
eb3d3503 1476 (version "1.6.6")
a480bc41
EB
1477 (source
1478 (origin
1479 (method url-fetch)
eb3d3503 1480 (uri (pypi-uri "parse" version))
a480bc41
EB
1481 (sha256
1482 (base32
aa6c09ed
EF
1483 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1484 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1485 (build-system python-build-system)
1486 (arguments
1487 `(#:phases
f9a65318
EF
1488 (modify-phases %standard-phases
1489 (replace 'check
1490 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1491 (home-page "https://github.com/r1chardj0n3s/parse")
1492 (synopsis "Parse strings")
1493 (description
1494 "Parse strings using a specification based on the Python format()
1495syntax.")
3f641af0 1496 (license license:x11)))
a480bc41 1497
d3eff97a
JL
1498(define-public python-polib
1499 (package
1500 (name "python-polib")
1501 (version "1.0.8")
1502 (source (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "polib" version))
1505 (sha256
1506 (base32
1507 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1508 (build-system python-build-system)
1509 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1510 (synopsis "Manipulate, create and modify gettext files")
1511 (description "Polib can manipulate any gettext format (po, pot and mo)
1512files. It can be used to create po files from scratch or to modify
1513existing ones.")
1514 (license license:expat)))
1515
1516(define-public python2-polib
1517 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1518 (package
1519 (inherit base)
1520 (arguments `(,@(package-arguments base)
1521 ;; Tests don't work with python2.
1522 #:tests? #f)))))
a480bc41 1523
515e6878
LC
1524(define-public scons
1525 (package
1526 (name "scons")
a3f61425 1527 (version "2.3.4")
515e6878
LC
1528 (source (origin
1529 (method url-fetch)
de67e922
LF
1530 (uri (string-append "mirror://sourceforge/scons/scons/" version
1531 "/scons-" version ".tar.gz"))
515e6878
LC
1532 (sha256
1533 (base32
a3f61425 1534 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1535 (build-system python-build-system)
1536 (arguments
1537 ;; With Python 3.x, fails to build with a syntax error.
1538 `(#:python ,python-2
b3e8b4bd 1539 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1540 #:tests? #f)) ; no 'python setup.py test' command
1541 (home-page "http://scons.org/")
1542 (synopsis "Software construction tool written in Python")
1543 (description
1544 "SCons is a software construction tool. Think of SCons as an improved,
1545cross-platform substitute for the classic Make utility with integrated
1546functionality similar to autoconf/automake and compiler caches such as ccache.
1547In short, SCons is an easier, more reliable and faster way to build
1548software.")
3f641af0 1549 (license license:x11)))
011b18c3 1550
c15a5c0e
DT
1551(define-public python-extras
1552 (package
1553 (name "python-extras")
1554 (version "0.0.3")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (string-append
1559 "https://pypi.python.org/packages/source/e/extras/extras-"
1560 version ".tar.gz"))
1561 (sha256
1562 (base32
1563 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1564 (build-system python-build-system)
c15a5c0e
DT
1565 (arguments
1566 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1567 '(#:tests? #f))
1568 (home-page "https://github.com/testing-cabal/extras")
1569 (synopsis "Useful extensions to the Python standard library")
1570 (description
1571 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1572 (license license:expat)))
c15a5c0e
DT
1573
1574(define-public python2-extras
1575 (package-with-python2 python-extras))
1576
56ea0efd
DT
1577(define-public python-mimeparse
1578 (package
1579 (name "python-mimeparse")
1580 (version "0.1.4")
1581 (source
1582 (origin
1583 (method url-fetch)
1584 (uri (string-append
1585 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1586 version ".tar.gz"))
1587 (sha256
1588 (base32
1589 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1590 (build-system python-build-system)
56ea0efd
DT
1591 (arguments
1592 '(#:tests? #f)) ; no setup.py test command
1593 (home-page
1594 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1595 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1596 (description
1597 "Mimeparse provides basic functions for parsing MIME type names and
1598matching them against a list of media-ranges.")
bd3fa666 1599 (license license:expat)))
56ea0efd
DT
1600
1601(define-public python2-mimeparse
1602 (package-with-python2 python-mimeparse))
1603
4435427e
DT
1604(define-public python-nose
1605 (package
1606 (name "python-nose")
f7cb9841 1607 (version "1.3.7")
4435427e
DT
1608 (source
1609 (origin
1610 (method url-fetch)
f7cb9841 1611 (uri (pypi-uri "nose" version))
4435427e
DT
1612 (sha256
1613 (base32
f7cb9841 1614 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1615 (build-system python-build-system)
4435427e
DT
1616 (arguments
1617 '(#:tests? #f)) ; FIXME: test suite fails
1618 (home-page "http://readthedocs.org/docs/nose/")
1619 (synopsis "Python testing library")
1620 (description
1621 "Nose extends the unittest library to make testing easier.")
3f641af0 1622 (license license:lgpl2.0+)))
4435427e
DT
1623
1624(define-public python2-nose
1625 (package-with-python2 python-nose))
1626
0aea283a
EF
1627(define-public python-nose2
1628 (package
1629 (name "python-nose2")
1630 (version "0.6.5")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "nose2" version))
1635 (sha256
1636 (base32
1637 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1638 (build-system python-build-system)
1639 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1640 (propagated-inputs
0aea283a
EF
1641 `(("python-cov-core" ,python-cov-core)
1642 ("python-pytest-cov" ,python-pytest-cov)
1643 ("python-six" ,python-six)))
1644 (home-page "https://github.com/nose-devs/nose2")
1645 (synopsis "Next generation of nicer testing for Python")
1646 (description
1647 "Nose2 is the next generation of nicer testing for Python, based on the
1648plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1649better plugin api, being easier for users to configure, and simplifying internal
1650interfaces and processes.")
1651 (license license:bsd-2)))
1652
1653(define-public python2-nose2
1654 (package-with-python2 python-nose2))
1655
6cd9c356
DT
1656(define-public python-unittest2
1657 (package
1658 (name "python-unittest2")
1659 (version "0.5.1")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (string-append
1664 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1665 version ".tar.gz"))
1666 (sha256
1667 (base32
1668 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1669 (build-system python-build-system)
6cd9c356
DT
1670 (home-page "http://pypi.python.org/pypi/unittest2")
1671 (synopsis "Python unit testing library")
1672 (description
1673 "Unittest2 is a replacement for the unittest module in the Python
1674standard library.")
3f641af0 1675 (license license:psfl)))
6cd9c356
DT
1676
1677(define-public python2-unittest2
1678 (package (inherit python-unittest2)
1679 (name "python2-unittest2")
1680 (version "0.5.1")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append
1685 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1686 version ".tar.gz"))
1687 (sha256
1688 (base32
1689 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1690 (arguments
1691 `(#:python ,python-2
1692 #:tests? #f)))) ; no setup.py test command
1693
02f8f804 1694(define-public python-pafy
1695 (package
1696 (name "python-pafy")
1697 (version "0.5.2")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "pafy" version))
1702 (sha256
1703 (base32
1704 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1705 (build-system python-build-system)
ed3fee5f 1706 (arguments
1707 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1708 (propagated-inputs
1709 ;; Youtube-dl is a python package which is imported in the file
1710 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1711 `(("youtube-dl" ,youtube-dl)))
1712 (home-page "https://np1.github.io/pafy/")
1713 (synopsis "Retrieve YouTube content and metadata")
1714 (description
1715 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1716 (license license:lgpl3+)))
1717
542ad60f
DT
1718(define-public python-py
1719 (package
1720 (name "python-py")
71c8a804 1721 (version "1.4.31")
542ad60f
DT
1722 (source
1723 (origin
1724 (method url-fetch)
71c8a804 1725 (uri (pypi-uri "py" version))
542ad60f
DT
1726 (sha256
1727 (base32
71c8a804 1728 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1729 (build-system python-build-system)
542ad60f
DT
1730 (home-page "http://pylib.readthedocs.org/")
1731 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1732 (description
1733 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1734code introspection, and logging.")
bd3fa666 1735 (license license:expat)))
542ad60f
DT
1736
1737(define-public python2-py
1738 (package-with-python2 python-py))
1739
855d4761
DT
1740(define-public python-pytest
1741 (package
1742 (name "python-pytest")
61a4332d 1743 (version "2.7.3")
855d4761
DT
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (string-append
1748 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1749 version ".tar.gz"))
1750 (sha256
1751 (base32
61a4332d 1752 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1753 (modules '((guix build utils)))
1754 (snippet
1755 ;; One of the tests involves the /usr directory, so it fails.
1756 '(substitute* "testing/test_argcomplete.py"
1757 (("def test_remove_dir_prefix\\(self\\):")
1758 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1759 (build-system python-build-system)
482d9591
HG
1760 (propagated-inputs
1761 `(("python-py" ,python-py)))
e7881f3d 1762 (native-inputs
482d9591 1763 `(("python-nose" ,python-nose)
855d4761
DT
1764 ("python-mock" ,python-mock)))
1765 (home-page "http://pytest.org")
1766 (synopsis "Python testing library")
1767 (description
1768 "Pytest is a testing tool that provides auto-discovery of test modules
1769and functions, detailed info on failing assert statements, modular fixtures,
1770and many external plugins.")
bd3fa666 1771 (license license:expat)))
855d4761
DT
1772
1773(define-public python2-pytest
1774 (package-with-python2 python-pytest))
1775
fca4ff35
LF
1776;; This package is used by Borg until we can upgrade all our Python packages to
1777;; use a more recent pytest.
1778(define-public python-pytest-2.9.2
1779 (package
1780 (inherit python-pytest)
1781 (name "python-pytest")
1782 (version "2.9.2")
1783 (source (origin
1784 (method url-fetch)
1785 (uri (pypi-uri "pytest" version))
1786 (sha256
1787 (base32
1788 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1789 (arguments
1790 `(#:phases
1791 (modify-phases %standard-phases
1792 (add-before 'check 'disable-invalid-test
1793 (lambda _
1794 (substitute* "testing/test_argcomplete.py"
1795 (("def test_remove_dir_prefix" line)
1796 (string-append "@pytest.mark.skip"
1797 "(reason=\"Assumes that /usr exists.\")\n "
1798 line)))
1799 #t)))))))
1800
358c3d61
EF
1801(define-public python-pytest-cov
1802 (package
1803 (name "python-pytest-cov")
545f4a1c 1804 (version "2.2.1")
358c3d61
EF
1805 (source
1806 (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "pytest-cov" version))
1809 (sha256
545f4a1c
EF
1810 (base32
1811 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1812 (build-system python-build-system)
ce40b383
HG
1813 (arguments
1814 `(#:phases
1815 (modify-phases %standard-phases
1816 (replace 'check
1817 (lambda _
1818 ;; options taken from tox.ini
1819 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1820 ;; with "Duplicate implicit target name"
1821 (zero? (system* "python" "./setup.py" "check"
1822 "--strict" "--metadata")))))))
f22efa01 1823 (propagated-inputs
10468636
EF
1824 `(("python-coverage" ,python-coverage)
1825 ("python-pytest" ,python-pytest)))
10468636
EF
1826 (home-page "https://github.com/pytest-dev/pytest-cov")
1827 (synopsis "Pytest plugin for measuring coverage")
1828 (description
1829 "Pytest-cov produces coverage reports. It supports centralised testing and
1830distributed testing in both @code{load} and @code{each} modes. It also
1831supports coverage of subprocesses.")
f210e944 1832 (license license:expat)))
358c3d61
EF
1833
1834(define-public python2-pytest-cov
f210e944 1835 (package-with-python2 python-pytest-cov))
358c3d61 1836
6784f2e3
RW
1837(define-public python-pytest-runner
1838 (package
1839 (name "python-pytest-runner")
1840 (version "2.6.2")
1841 (source
1842 (origin
1843 (method url-fetch)
54cd239b 1844 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1845 (sha256
1846 (base32
1847 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1848 (build-system python-build-system)
1849 (arguments
1850 `(#:phases
1851 (modify-phases %standard-phases
1852 ;; The fancy way of setting the version with setuptools_scm does not
1853 ;; seem to work here.
1854 (add-after 'unpack 'set-version
1855 (lambda _
1856 (substitute* "docs/conf.py"
1857 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1858 (string-append "version = \"" ,version "\"")))
1859 #t)))))
1860 (native-inputs
1861 `(("python-pytest" ,python-pytest)
1862 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1863 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1864 (synopsis "Invoke py.test as a distutils command")
1865 (description
1866 "This package provides a @command{pytest-runner} command that
1867@file{setup.py} files can use to run tests.")
f210e944 1868 (license license:expat)))
54cd239b
EF
1869
1870(define-public python2-pytest-runner
f210e944 1871 (package-with-python2 python-pytest-runner))
6784f2e3 1872
44547e51
EF
1873(define-public python-pytest-mock
1874 (package
1875 (name "python-pytest-mock")
1876 (version "1.2")
1877 (source
1878 (origin
1879 (method url-fetch)
1880 (uri (pypi-uri "pytest-mock" version ".zip"))
1881 (sha256
1882 (base32
1883 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1884 (build-system python-build-system)
1885 (native-inputs
1886 `(("unzip" ,unzip)))
f22efa01 1887 (propagated-inputs
d5e41cf2 1888 `(("python-pytest" ,python-pytest)))
44547e51
EF
1889 (home-page "https://github.com/pytest-dev/pytest-mock/")
1890 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1891 (description
1892 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1893around the patching API provided by the @code{mock} package, but with the
1894benefit of not having to worry about undoing patches at the end of a test.
1895The mocker fixture has the same API as @code{mock.patch}, supporting the
1896same arguments.")
1897 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1898 (license license:expat)))
1899
1900(define-public python2-pytest-mock
1901 (let ((base (package-with-python2
1902 (strip-python2-variant python-pytest-mock))))
1903 (package (inherit base)
f22efa01 1904 (propagated-inputs
44547e51 1905 `(("python2-mock" ,python2-mock)
f22efa01 1906 ,@(package-propagated-inputs base))))))
44547e51 1907
8fa58fc9
CAW
1908(define-public python-pytest-xdist
1909 (package
1910 (name "python-pytest-xdist")
1911 (version "1.14")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "pytest-xdist" version ".zip"))
1916 (sha256
1917 (base32
de585a7e
HG
1918 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1919 (modules '((guix build utils)))
1920 (snippet
1921 '(begin
1922 ;; Remove pre-compiled .pyc files from source.
1923 (for-each delete-file-recursively
1924 (find-files "." "__pycache__" #:directories? #t))
1925 (for-each delete-file (find-files "." "\\.pyc$"))
1926 #t))))
8fa58fc9
CAW
1927 (build-system python-build-system)
1928 (native-inputs
1929 `(("unzip" ,unzip)
8fa58fc9 1930 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1931 (propagated-inputs
c4516ad2 1932 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1933 ("python-pytest" ,python-pytest)
1934 ("python-py" ,python-py)))
1935 (home-page
1936 "https://github.com/pytest-dev/pytest-xdist")
1937 (synopsis
1938 "Plugin for py.test with distributed testing and loop-on-failing modes")
1939 (description
1940 "The pytest-xdist plugin extends py.test with some unique test execution
1941modes: parallelization, running tests in boxed subprocesses, the ability
1942to run tests repeatedly when failed, and the ability to run tests on multiple
1943Python interpreters or platforms. It uses rsync to copy the existing
1944program code to a remote location, executes there, and then syncs the
1945result back.")
f210e944 1946 (license license:expat)))
8fa58fc9
CAW
1947
1948(define-public python2-pytest-xdist
f210e944 1949 (package-with-python2 python-pytest-xdist))
8fa58fc9 1950
84d24017
DT
1951(define-public python-scripttest
1952 (package
1953 (name "python-scripttest")
1954 (version "1.3")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1960 version ".tar.gz"))
1961 (sha256
1962 (base32
1963 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1964 (build-system python-build-system)
521b7772 1965 (native-inputs
f3b98f4f 1966 `(("python-pytest" ,python-pytest)))
84d24017
DT
1967 (home-page "http://pythonpaste.org/scripttest/")
1968 (synopsis "Python library to test command-line scripts")
1969 (description "Scripttest is a Python helper library for testing
1970interactive command-line applications. With it you can run a script in a
1971subprocess and see the output as well as any file modifications.")
bd3fa666 1972 (license license:expat)))
84d24017
DT
1973
1974(define-public python2-scripttest
1975 (package-with-python2 python-scripttest))
1976
d8fa80e1
DT
1977(define-public python-testtools
1978 (package
1979 (name "python-testtools")
1980 (version "1.0.0")
1981 (source
1982 (origin
1983 (method url-fetch)
1984 (uri (string-append
1985 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1986 version ".tar.gz"))
1987 (sha256
1988 (base32
1989 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1990 (build-system python-build-system)
0e88cbf8 1991 (propagated-inputs
f22efa01
HG
1992 `(("python-mimeparse" ,python-mimeparse)
1993 ("python-extras" ,python-extras)))
d8fa80e1
DT
1994 (home-page "https://github.com/testing-cabal/testtools")
1995 (synopsis
1996 "Extensions to the Python standard library unit testing framework")
1997 (description
1998 "Testtools extends the Python standard library unit testing framework to
1999provide matchers, more debugging information, and cross-Python
2000compatibility.")
3f641af0 2001 (license license:psfl)))
d8fa80e1
DT
2002
2003(define-public python2-testtools
2004 (package-with-python2 python-testtools))
2005
5bf3afea
DT
2006(define-public python-testscenarios
2007 (package
2008 (name "python-testscenarios")
2009 (version "0.4")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append
2014 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2015 version ".tar.gz"))
2016 (sha256
2017 (base32
2018 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2019 (build-system python-build-system)
f22efa01 2020 (propagated-inputs
8e73d3ba 2021 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2022 (home-page "https://launchpad.net/testscenarios")
2023 (synopsis "Pyunit extension for dependency injection")
2024 (description
2025 "Testscenarios provides clean dependency injection for Python unittest
2026style tests.")
3f641af0 2027 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2028
2029(define-public python2-testscenarios
2030 (package-with-python2 python-testscenarios))
2031
dac79ecc
DT
2032(define-public python-testresources
2033 (package
2034 (name "python-testresources")
2035 (version "0.2.7")
2036 (source
2037 (origin
2038 (method url-fetch)
2039 (uri (string-append
2040 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2041 version ".tar.gz"))
2042 (sha256
2043 (base32
2044 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2045 (build-system python-build-system)
dac79ecc
DT
2046 (home-page "https://launchpad.net/testresources")
2047 (synopsis
2048 "Pyunit extension for managing test resources")
2049 (description
2050 "Testresources is an extension to Python's unittest to allow declarative
2051use of resources by test cases.")
3f641af0 2052 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2053
2054(define-public python2-testresources
2055 (package-with-python2 python-testresources))
2056
070ab058
DT
2057(define-public python-subunit
2058 (package
2059 (name "python-subunit")
2060 (version "0.0.21")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2066 version ".tar.gz"))
2067 (sha256
2068 (base32
2069 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2070 (build-system python-build-system)
f22efa01 2071 (propagated-inputs
b52ad371
HG
2072 `(("python-extras" ,python-extras)
2073 ("python-mimeparse" ,python-mimeparse)))
2074 (native-inputs
2075 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2076 (home-page "http://launchpad.net/subunit")
2077 (synopsis "Python implementation of the subunit protocol")
2078 (description
2079 "Python-subunit is a Python implementation of the subunit test streaming
2080protocol.")
3f641af0 2081 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2082
2083(define-public python2-subunit
2084 (package-with-python2 python-subunit))
2085
d2a8db92
HG
2086;; Recent versions of python-fixtures and python-testrepository need
2087;; python-pbr for packaging, which itself needs these two packages for
2088;; testing.
2089;; To fix this circular dependency, we use a build of python-pbr, based on the
2090;; same source, just without any test dependencies and with tests disabled.
2091;; python-pbr-minmal is then used to package python-fixtures and
2092;; python-testrepository.
2093;; Strictly speaking we currently could remove the test-requirements from the
2094;; normal python-pbr package (and save this package) since test are disabled
2095;; there anyway. But this may change in future.
2096(define python-pbr-minimal
cd49454b 2097 (package
d2a8db92
HG
2098 (name "python-pbr-minimal")
2099 (version "1.8.1")
7787ef76
CR
2100 (source
2101 (origin
2102 (method url-fetch)
d2a8db92 2103 (uri (pypi-uri "pbr" version))
7787ef76
CR
2104 (sha256
2105 (base32
d2a8db92 2106 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2107 (build-system python-build-system)
2108 (arguments
d2a8db92
HG
2109 `(#:tests? #f))
2110 (home-page "http://docs.openstack.org/developer/pbr/")
2111 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2112 (description
d2a8db92 2113 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2114 (license license:asl2.0)))
7787ef76 2115
d2a8db92
HG
2116(define python2-pbr-minimal
2117 (package-with-python2 python-pbr-minimal))
7787ef76 2118
1ef09c0c 2119(define-public python-pbr
e25f0174 2120 (package
d2a8db92 2121 (inherit python-pbr-minimal)
e25f0174 2122 (name "python-pbr")
e25f0174
BW
2123 (arguments
2124 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2125 (propagated-inputs
d2a8db92
HG
2126 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2127 (native-inputs
e25f0174 2128 `(("python-fixtures" ,python-fixtures)
d2a8db92 2129 ;; discover, coverage, hacking, subunit
e25f0174 2130 ("python-mock" ,python-mock)
d2a8db92 2131 ("python-six" ,python-six)
e25f0174
BW
2132 ("python-sphinx" ,python-sphinx)
2133 ("python-testrepository" ,python-testrepository)
2134 ("python-testresources" ,python-testresources)
2135 ("python-testscenarios" ,python-testscenarios)
2136 ("python-testtools" ,python-testtools)
2137 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2138 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2139 (description
2140 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2141and sensible default behaviors into your setuptools run. It will set
2142versions, process requirements files and generate AUTHORS and ChangeLog file
2143from git information.
2144")))
1ef09c0c
BW
2145
2146(define-public python2-pbr
e25f0174 2147 (package-with-python2 python-pbr))
1ef09c0c 2148
7787ef76
CR
2149(define-public python-fixtures
2150 (package
2151 (name "python-fixtures")
13fcc6df 2152 (version "1.4.0")
7787ef76
CR
2153 (source
2154 (origin
2155 (method url-fetch)
13fcc6df 2156 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2157 (sha256
2158 (base32
13fcc6df 2159 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2160 (build-system python-build-system)
2161 (propagated-inputs
ae92cadd 2162 `(("python-six" ,python-six)))
e7881f3d 2163 (native-inputs
d2a8db92 2164 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2165 ("python-testtools" ,python-testtools)))
7787ef76
CR
2166 (home-page "https://launchpad.net/python-fixtures")
2167 (synopsis "Python test fixture library")
2168 (description
2169 "Fixtures provides a way to create reusable state, useful when writing
2170Python tests.")
3f641af0 2171 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2172
cd49454b
DT
2173(define-public python2-fixtures
2174 (package-with-python2 python-fixtures))
2175
b24a0c00
DT
2176(define-public python-testrepository
2177 (package
2178 (name "python-testrepository")
2179 (version "0.0.20")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (string-append
2184 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2185 version ".tar.gz"))
2186 (sha256
2187 (base32
2188 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2189 (build-system python-build-system)
05de40c5 2190 (propagated-inputs
b2e66edf
HG
2191 `(("python-fixtures" ,python-fixtures)
2192 ("python-subunit" ,python-subunit)
b52ad371
HG
2193 ("python-testtools" ,python-testtools)))
2194 (native-inputs
2195 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2196 ("python-mimeparse" ,python-mimeparse)))
2197 (home-page "https://launchpad.net/testrepository")
2198 (synopsis "Database for Python test results")
2199 (description "Testrepository provides a database of test results which can
2200be used as part of a developer's workflow to check things such as what tests
2201have failed since the last commit or what tests are currently failing.")
3f641af0 2202 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2203
2204(define-public python2-testrepository
2205 (package-with-python2 python-testrepository))
2206
243a009a
DT
2207(define-public python-coverage
2208 (package
2209 (name "python-coverage")
4d4cf3dd 2210 (version "4.1")
243a009a
DT
2211 (source
2212 (origin
2213 (method url-fetch)
82a3c582 2214 (uri (pypi-uri "coverage" version))
243a009a
DT
2215 (sha256
2216 (base32
4d4cf3dd 2217 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2218 (build-system python-build-system)
243a009a
DT
2219 (home-page "http://nedbatchelder.com/code/coverage")
2220 (synopsis "Code coverage measurement for Python")
2221 (description
2222 "Coverage measures code coverage, typically during test execution. It
2223uses the code analysis tools and tracing hooks provided in the Python standard
2224library to determine which lines are executable, and which have been
2225executed.")
3f641af0 2226 (license license:bsd-3)))
243a009a
DT
2227
2228(define-public python2-coverage
2229 (package-with-python2 python-coverage))
2230
12f839fd
EF
2231(define-public python-cov-core
2232 (package
2233 (name "python-cov-core")
2234 (version "1.15.0")
2235 (source
2236 (origin
2237 (method url-fetch)
2238 (uri (pypi-uri "cov-core" version))
2239 (sha256
2240 (base32
2241 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2242 (build-system python-build-system)
f78e1c27 2243 (propagated-inputs
12f839fd
EF
2244 `(("python-coverage" ,python-coverage)))
2245 (home-page "https://github.com/schlamar/cov-core")
2246 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2247 (description
2248 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2249It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2250 (license license:expat)))
12f839fd
EF
2251
2252(define-public python2-cov-core
f210e944 2253 (package-with-python2 python-cov-core))
12f839fd 2254
041358fb
DT
2255(define-public python-discover
2256 (package
2257 (name "python-discover")
2258 (version "0.4.0")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (string-append
2263 "https://pypi.python.org/packages/source/d/discover/discover-"
2264 version ".tar.gz"))
2265 (sha256
2266 (base32
2267 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2268 (build-system python-build-system)
041358fb
DT
2269 (home-page "http://pypi.python.org/pypi/discover/")
2270 (synopsis
2271 "Python test discovery for unittest")
2272 (description
2273 "Discover provides test discovery for unittest, a feature that has been
e881752c 2274backported from Python 2.7 for Python 2.4+.")
3f641af0 2275 (license license:bsd-3)))
041358fb
DT
2276
2277(define-public python2-discover
2278 (package-with-python2 python-discover))
2279
a480bc41
EB
2280(define-public behave
2281 (package
2282 (name "behave")
287cfd1a 2283 (version "1.2.5")
a480bc41
EB
2284 (source (origin
2285 (method url-fetch)
287cfd1a 2286 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2287 (sha256
2288 (base32
287cfd1a 2289 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2290 (build-system python-build-system)
f22efa01 2291 (propagated-inputs
f3b98f4f 2292 `(("python-six" ,python-six)
a480bc41
EB
2293 ("python-parse" ,python-parse)
2294 ("python-parse-type" ,python-parse-type)))
2295 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2296 ;PyHamcrest>=1.8
2297 (home-page "http://github.com/behave/behave")
2298 (synopsis "Python behavior-driven development")
2299 (description
2300 "Behave is a tool for behavior-driven development in python.
2301Behavior-driven development (or BDD) is an agile software development
2302technique that encourages collaboration between developers, QA and
2303non-technical or business participants in a software project. Behave uses
2304tests written in a natural language style, backed up by Python code.")
3f641af0 2305 (license license:x11)))
c7303d3c
DT
2306
2307(define-public python-exif-read
2308 (package
2309 (name "python-exif-read")
2a2d0981 2310 (version "2.1.2")
c7303d3c
DT
2311 (source (origin
2312 (method url-fetch)
2a2d0981 2313 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2314 (sha256
2315 (base32
2a2d0981 2316 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2317 (build-system python-build-system)
c7303d3c
DT
2318 (arguments `(#:tests? #f)) ; no tests
2319 (home-page "https://github.com/ianare/exif-py")
2320 (synopsis "Python library to extract EXIF data from image files")
2321 (description
2322 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2323files.")
3f641af0 2324 (license license:bsd-3)))
c7303d3c
DT
2325
2326(define-public python2-exif-read
2327 (package-with-python2 python-exif-read))
d5f89b22
DT
2328
2329(define-public python-pyld
2330 (package
2331 (name "python-pyld")
8957af32 2332 (version "0.7.1")
d5f89b22
DT
2333 (source (origin
2334 (method url-fetch)
af1ab773 2335 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2336 (sha256
2337 (base32
8957af32 2338 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2339 (build-system python-build-system)
d5f89b22
DT
2340 (arguments `(#:tests? #f)) ; no tests
2341 (home-page "http://github.com/digitalbazaar/pyld")
2342 (synopsis "Python implementation of the JSON-LD specification")
2343 (description
2344 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2345 (license license:bsd-3)))
d5f89b22
DT
2346
2347(define-public python2-pyld
2348 (package-with-python2 python-pyld))
3a1f9a68
DT
2349
2350(define-public python-certifi
2351 (package
2352 (name "python-certifi")
b2a2232c 2353 (version "2016.8.31")
3a1f9a68
DT
2354 (source (origin
2355 (method url-fetch)
9a41f443 2356 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2357 (sha256
2358 (base32
b2a2232c 2359 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2360 (build-system python-build-system)
3a1f9a68
DT
2361 (arguments `(#:tests? #f)) ; no tests
2362 (home-page "http://python-requests.org/")
2363 (synopsis "Python CA certificate bundle")
2364 (description
2365 "Certifi is a Python library that contains a CA certificate bundle, which
2366is used by the Requests library to verify HTTPS requests.")
3f641af0 2367 (license license:asl2.0)))
3a1f9a68
DT
2368
2369(define-public python2-certifi
2370 (package-with-python2 python-certifi))
e6cfbd36 2371
12c270dd
RW
2372(define-public python-click
2373 (package
2374 (name "python-click")
43accb58 2375 (version "6.6")
12c270dd
RW
2376 (source
2377 (origin
2378 (method url-fetch)
375f224b 2379 (uri (pypi-uri "click" version))
12c270dd 2380 (sha256
43accb58
LF
2381 (base32
2382 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2383 (build-system python-build-system)
e2ab5a09
BW
2384 (arguments
2385 `(#:phases
2386 (modify-phases %standard-phases
2387 (add-after 'unpack 'fix-paths
2388 (lambda* (#:key inputs #:allow-other-keys)
2389 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2390 "cross-libc" "libc"))))
2391 (substitute* "click/_unicodefun.py"
2392 (("'locale'")
2393 (string-append "'" glibc "/bin/locale'"))))
2394 #t)))))
12c270dd
RW
2395 (home-page "http://click.pocoo.org")
2396 (synopsis "Command line library for Python")
2397 (description
2398 "Click is a Python package for creating command line interfaces in a
2399composable way with as little code as necessary. Its name stands for
2400\"Command Line Interface Creation Kit\". It's highly configurable but comes
2401with sensible defaults out of the box.")
3f641af0 2402 (license license:bsd-3)))
12c270dd
RW
2403
2404(define-public python2-click
2405 (package-with-python2 python-click))
2406
addc808d
EF
2407(define-public python-wheel
2408 (package
2409 (name "python-wheel")
40981b5c 2410 (version "0.29.0")
e1ba0749
EF
2411 (source
2412 (origin
2413 (method url-fetch)
2414 (uri (pypi-uri "wheel" version))
2415 (sha256
2416 (base32
40981b5c 2417 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2418 (build-system python-build-system)
2419 (native-inputs
f3b98f4f 2420 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2421 ("python-pytest-cov" ,python-pytest-cov)))
2422 (home-page "https://bitbucket.org/pypa/wheel/")
2423 (synopsis "Format for built Python packages")
2424 (description
2425 "A wheel is a ZIP-format archive with a specially formatted filename and
2426the @code{.whl} extension. It is designed to contain all the files for a PEP
2427376 compatible install in a way that is very close to the on-disk format. Many
2428packages will be properly installed with only the @code{Unpack} step and the
2429unpacked archive preserves enough information to @code{Spread} (copy data and
2430scripts to their final locations) at any later time. Wheel files can be
2431installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2432 (license license:expat)
2433 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2434
2435(define-public python2-wheel
8ad4ae20
LF
2436 (let ((wheel (package-with-python2
2437 (strip-python2-variant python-wheel))))
264ae686 2438 (package (inherit wheel)
8ad4ae20
LF
2439 (native-inputs `(("python2-functools32" ,python2-functools32)
2440 ,@(package-native-inputs wheel))))))
2441
addc808d 2442
ae641128 2443(define-public python-requests
e6cfbd36 2444 (package
ae641128 2445 (name "python-requests")
74a066f9 2446 (version "2.9.1")
e6cfbd36
DT
2447 (source (origin
2448 (method url-fetch)
5d691657 2449 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2450 (sha256
2451 (base32
74a066f9 2452 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2453 (build-system python-build-system)
5d691657 2454 (native-inputs
f3b98f4f 2455 `(("python-py" ,python-py)
5d691657
EF
2456 ("python-pytest" ,python-pytest)
2457 ("python-pytest-cov" ,python-pytest-cov)
2458 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2459 (home-page "http://python-requests.org/")
2460 (synopsis "Python HTTP library")
2461 (description
2462 "Requests is a Python HTTP client library. It aims to be easier to use
2463than Python’s urllib2 library.")
3f641af0 2464 (license license:asl2.0)))
864b5211 2465
e9005180
DT
2466;; Some software requires an older version of Requests, notably Docker
2467;; Compose.
2468(define-public python-requests-2.7
2469 (package (inherit python-requests)
2470 (version "2.7.0")
2471 (source (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "requests" version))
2474 (sha256
2475 (base32
2476 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2477
ae641128 2478(define-public python2-requests
8ad4ae20 2479 (package-with-python2 python-requests))
ae641128 2480
ea521b42
DT
2481(define-public python-vcversioner
2482 (package
2483 (name "python-vcversioner")
538fe019 2484 (version "2.16.0.0")
ea521b42
DT
2485 (source
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "vcversioner" version))
2489 (sha256
2490 (base32
538fe019 2491 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2492 (build-system python-build-system)
ea521b42
DT
2493 (synopsis "Python library for version number discovery")
2494 (description "Vcversioner is a Python library that inspects tagging
2495information in a variety of version control systems in order to discover
2496version numbers.")
2497 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2498 (license license:isc)))
ea521b42
DT
2499
2500(define-public python2-vcversioner
f210e944 2501 (package-with-python2 python-vcversioner))
ae641128 2502
864b5211
DT
2503(define-public python-jsonschema
2504 (package
2505 (name "python-jsonschema")
b3667afb 2506 (version "2.5.1")
864b5211
DT
2507 (source (origin
2508 (method url-fetch)
2509 (uri
2510 (string-append
2511 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2512 version ".tar.gz"))
2513 (sha256
2514 (base32
b3667afb 2515 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2516 (build-system python-build-system)
8bcd6b91
EF
2517 (arguments
2518 '(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2521 (native-inputs
8bcd6b91
EF
2522 `(("python-nose" ,python-nose)
2523 ("python-vcversioner" ,python-vcversioner)))
2524 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2525 (synopsis "Implementation of JSON Schema for Python")
2526 (description
2527 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2528 (license license:expat)
2529 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2530
2531(define-public python2-jsonschema
a14600ec
LF
2532 (let ((jsonschema (package-with-python2
2533 (strip-python2-variant python-jsonschema))))
264ae686 2534 (package (inherit jsonschema)
eaba9d66 2535 (native-inputs
8bcd6b91 2536 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2537 ,@(package-native-inputs jsonschema)))
2538 (propagated-inputs
2539 `(("python2-functools32" ,python2-functools32))))))
850189b8 2540
9f21414d 2541(define-public python-kitchen
2542 (package
2543 (name "python-kitchen")
2544 (version "1.2.4")
2545 (source
2546 (origin
2547 (method url-fetch)
2548 (uri (pypi-uri "kitchen" version))
2549 (sha256
2550 (base32
2551 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2552 (build-system python-build-system)
2553 (propagated-inputs
2554 `(("python-chardet" ,python-chardet)))
2555 (home-page "https://fedorahosted.org/kitchen")
2556 (synopsis "Python API for snippets")
2557 (description "@code{kitchen} module provides a python API for all sorts of
2558little useful snippets of code that everybody ends up writing for their projects
2559but never seem big enough to build an independent release. Use kitchen and stop
2560cutting and pasting that code over and over.")
2561 (license (list license:lgpl2.1+
2562 ;; subprocess.py, test_subprocess.py,
2563 ;; kitchen/pycompat25/defaultdict.py:
2564 license:psfl))))
2565
2566(define-public python2-kitchen
2567 (package-with-python2 python-kitchen))
2568
850189b8
DT
2569(define-public python-unidecode
2570 (package
2571 (name "python-unidecode")
8925d4f3 2572 (version "0.04.18")
850189b8
DT
2573 (source (origin
2574 (method url-fetch)
8925d4f3 2575 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2576 (sha256
2577 (base32
8925d4f3 2578 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2579 (build-system python-build-system)
850189b8
DT
2580 (home-page "https://pypi.python.org/pypi/Unidecode")
2581 (synopsis "ASCII transliterations of Unicode text")
2582 (description
2583 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2584useful when integrating with legacy code that doesn't support Unicode, or for
2585ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2586machine identifiers from human-readable Unicode strings that should still be
2587somewhat intelligeble.")
3f641af0 2588 (license license:gpl2+)))
850189b8
DT
2589
2590(define-public python2-unidecode
2591 (package-with-python2 python-unidecode))
6d45fef4
DT
2592
2593(define-public python-pyjwt
2594 (package
2595 (name "python-pyjwt")
eb31d4b4 2596 (version "1.4.0")
6d45fef4
DT
2597 (source
2598 (origin
2599 (method url-fetch)
eb31d4b4 2600 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2601 (sha256
2602 (base32
eb31d4b4 2603 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2604 (build-system python-build-system)
eb31d4b4 2605 (native-inputs
130fe994
HG
2606 `(("python-pytest" ,python-pytest)
2607 ("python-pytest-cov" ,python-pytest-cov)
2608 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2609 (home-page "http://github.com/progrium/pyjwt")
2610 (synopsis "JSON Web Token implementation in Python")
2611 (description
2612 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2613 (license license:expat)))
6d45fef4
DT
2614
2615(define-public python2-pyjwt
2616 (package-with-python2 python-pyjwt))
2617
2cec1f6f
DT
2618(define-public python-oauthlib
2619 (package
2620 (name "python-oauthlib")
bde2171d 2621 (version "1.0.3")
2cec1f6f
DT
2622 (source (origin
2623 (method url-fetch)
bde2171d 2624 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2625 (sha256
2626 (base32
bde2171d 2627 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2628 (build-system python-build-system)
bde2171d 2629 (native-inputs
bb06aa34 2630 `(("python-nose" ,python-nose)
bde2171d 2631 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2632 ("python-pyjwt" ,python-pyjwt)
2633 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2634 (home-page "https://github.com/idan/oauthlib")
2635 (synopsis "OAuth implementation for Python")
2636 (description
2637 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2638OAuth request-signing logic.")
3f641af0 2639 (license license:bsd-3)
59f151ec 2640 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2641
2642(define-public python2-oauthlib
59f151ec 2643 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2644 (package
2645 (inherit base)
00e10c6e 2646 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2647 ("python2-mock" ,python2-mock)
59f151ec 2648 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2649
2650(define-public python-itsdangerous
2651 (package
2652 (name "python-itsdangerous")
2653 (version "0.24")
2654 (source
2655 (origin
2656 (method url-fetch)
2657 (uri (string-append
2658 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2659 version ".tar.gz"))
2660 (sha256
2661 (base32
2662 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2663 (build-system python-build-system)
ec5dbb5c
DT
2664 (home-page "http://github.com/mitsuhiko/itsdangerous")
2665 (synopsis "Python library for passing data to/from untrusted environments")
2666 (description
2667 "Itsdangerous provides various helpers to pass trusted data to untrusted
2668environments and back.")
f210e944 2669 (license license:bsd-3)))
ec5dbb5c
DT
2670
2671(define-public python2-itsdangerous
f210e944 2672 (package-with-python2 python-itsdangerous))
5731cae3 2673
8d12be1e
RW
2674(define-public python-pyyaml
2675 (package
2676 (name "python-pyyaml")
bf5e4bc4 2677 (version "3.12")
8d12be1e
RW
2678 (source
2679 (origin
2680 (method url-fetch)
bf5e4bc4 2681 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2682 (sha256
2683 (base32
bf5e4bc4 2684 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2685 (build-system python-build-system)
2686 (inputs
2687 `(("libyaml" ,libyaml)))
8d12be1e
RW
2688 (home-page "http://pyyaml.org/wiki/PyYAML")
2689 (synopsis "YAML parser and emitter for Python")
2690 (description
2691 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2692complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2693API, and sensible error messages. PyYAML supports standard YAML tags and
2694provides Python-specific tags that allow to represent an arbitrary Python
2695object.")
2696 (license license:expat)))
2697
2698(define-public python2-pyyaml
2699 (package-with-python2 python-pyyaml))
2700
5731cae3
DT
2701(define-public python-virtualenv
2702 (package
2703 (name "python-virtualenv")
58d04dba 2704 (version "15.0.3")
5731cae3
DT
2705 (source
2706 (origin
2707 (method url-fetch)
17804240 2708 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2709 (sha256
2710 (base32
58d04dba 2711 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2712 (build-system python-build-system)
17804240
EF
2713 (arguments
2714 `(#:phases
2715 (modify-phases %standard-phases
58d04dba
RW
2716 (replace 'check
2717 (lambda _
2718 ;; Disable failing test. See upstream bug report
2719 ;; https://github.com/pypa/virtualenv/issues/957
2720 (substitute* "tests/test_virtualenv.py"
2721 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2722 (zero? (system* "py.test")))))))
e7881f3d 2723 (native-inputs
f3b98f4f 2724 `(("python-mock" ,python-mock)
17804240 2725 ("python-pytest" ,python-pytest)))
5731cae3
DT
2726 (home-page "https://virtualenv.pypa.io/")
2727 (synopsis "Virtual Python environment builder")
2728 (description
2729 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2730 (license license:expat)))
5731cae3
DT
2731
2732(define-public python2-virtualenv
2733 (package-with-python2 python-virtualenv))
8176d4d5
DT
2734
2735(define-public python-markupsafe
2736 (package
2737 (name "python-markupsafe")
2738 (version "0.23")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (string-append
2743 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2744 version ".tar.gz"))
2745 (sha256
2746 (base32
2747 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2748 (build-system python-build-system)
8176d4d5
DT
2749 (home-page "http://github.com/mitsuhiko/markupsafe")
2750 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2751 (description
2752 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2753for Python.")
3f641af0 2754 (license license:bsd-3)))
8176d4d5
DT
2755
2756(define-public python2-markupsafe
2757 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2758
2759(define-public python-jinja2
2760 (package
2761 (name "python-jinja2")
e98149b3 2762 (version "2.8")
fe34f0d1
DT
2763 (source
2764 (origin
2765 (method url-fetch)
e98149b3 2766 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2767 (sha256
2768 (base32
e98149b3 2769 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2770 (build-system python-build-system)
f22efa01 2771 (propagated-inputs
f3b98f4f 2772 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2773 (home-page "http://jinja.pocoo.org/")
2774 (synopsis "Python template engine")
2775 (description
2776 "Jinja2 is a small but fast and easy to use stand-alone template engine
2777written in pure Python.")
3f641af0 2778 (license license:bsd-3)))
fe34f0d1
DT
2779
2780(define-public python2-jinja2
2781 (package-with-python2 python-jinja2))
3580ab8b 2782
f7d17ac7
EE
2783(define-public python-pystache
2784 (package
2785 (name "python-pystache")
2786 (version "0.5.4")
2787 (source (origin
2788 (method url-fetch)
2789 (uri (pypi-uri "pystache" version))
2790 (sha256
2791 (base32
2792 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2793 (build-system python-build-system)
f7d17ac7
EE
2794 (home-page "http://defunkt.io/pystache/")
2795 (synopsis "Python logic-less template engine")
2796 (description
2797 "Pystache is a Python implementation of the framework agnostic,
2798logic-free templating system Mustache.")
2799 (license license:expat)))
2800
2801(define-public python2-pystache
2802 (package-with-python2 python-pystache))
2803
1285119b
RW
2804(define-public python-joblib
2805 (package
2806 (name "python-joblib")
f34ef331 2807 (version "0.10.3")
1285119b
RW
2808 (source (origin
2809 (method url-fetch)
f34ef331 2810 (uri (pypi-uri "joblib" version))
1285119b
RW
2811 (sha256
2812 (base32
6aa5f1ca
HG
2813 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2814 (modules '((guix build utils)))
2815 (snippet
2816 '(begin
2817 ;; Remove pre-compiled .pyc files from source.
2818 (for-each delete-file-recursively
2819 (find-files "." "__pycache__" #:directories? #t))
2820 (for-each delete-file (find-files "." "\\.pyc$"))
2821 #t))))
1285119b 2822 (build-system python-build-system)
a8dd960a
RW
2823 (arguments
2824 `(#:phases
2825 (modify-phases %standard-phases
2826 (add-before 'check 'disable-failing-tests
2827 (lambda _
2828 ;; This numpydoc tests fails for unknown reasons
2829 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2830 ;; This numpydoc test depends on matplotlib, which is not a
2831 ;; required input.
2832 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2833 ;; These tests fail to execute sys.executable
2834 (substitute* "joblib/test/test_parallel.py"
2835 (("import nose" line)
2836 (string-append "from nose.plugins.skip import SkipTest\n" line))
2837 (("def test_nested_parallel_warnings" line)
2838 (string-append "@SkipTest\n" line))
2839 (("def test_parallel_with_interactively_defined_functions" line)
2840 (string-append "@SkipTest\n" line)))
2841 #t)))))
f052ec9a 2842 ;; Provide nose to enable tests command
1285119b 2843 (native-inputs
f3b98f4f 2844 `(("python-nose" ,python-nose)
f34ef331
RW
2845 ("python-sphinx" ,python-sphinx)
2846 ("python-docutils" ,python-docutils)
2847 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2848 (home-page "http://pythonhosted.org/joblib/")
2849 (synopsis "Using Python functions as pipeline jobs")
2850 (description
2851 "Joblib is a set of tools to provide lightweight pipelining in Python.
2852In particular, joblib offers: transparent disk-caching of the output values
2853and lazy re-evaluation (memoize pattern), easy simple parallel computing
2854logging and tracing of the execution.")
3f641af0 2855 (license license:bsd-3)))
1285119b
RW
2856
2857(define-public python2-joblib
2858 (package-with-python2 python-joblib))
2859
3580ab8b
DT
2860(define-public python-docutils
2861 (package
2862 (name "python-docutils")
00e0ca7c 2863 (version "0.13.1")
3580ab8b
DT
2864 (source
2865 (origin
2866 (method url-fetch)
00e0ca7c 2867 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2868 (sha256
2869 (base32
00e0ca7c 2870 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 2871 (build-system python-build-system)
3580ab8b
DT
2872 (arguments
2873 '(#:tests? #f)) ; no setup.py test command
2874 (home-page "http://docutils.sourceforge.net/")
2875 (synopsis "Python Documentation Utilities")
2876 (description
2877 "Docutils is a modular system for processing documentation into useful
2878formats, such as HTML, XML, and LaTeX. For input Docutils supports
2879reStructuredText.")
2880 ;; Most of the source code is public domain, but some source files are
2881 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2882 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2883
2884(define-public python2-docutils
2885 (package-with-python2 python-docutils))
fb35b7c0
DT
2886
2887(define-public python-pygments
2888 (package
2889 (name "python-pygments")
7d2e758d 2890 (version "2.1.3")
fb35b7c0
DT
2891 (source
2892 (origin
2893 (method url-fetch)
9f442285 2894 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2895 (sha256
2896 (base32
7d2e758d 2897 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 2898 (build-system python-build-system)
fb35b7c0
DT
2899 (home-page "http://pygments.org/")
2900 (synopsis "Syntax highlighting")
2901 (description
2902 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2903 (license license:bsd-2)))
fb35b7c0
DT
2904
2905(define-public python2-pygments
2906 (package-with-python2 python-pygments))
9dd6078d
DT
2907
2908(define-public python-sphinx
2909 (package
2910 (name "python-sphinx")
2911 (version "1.2.3")
2912 (source
2913 (origin
2914 (method url-fetch)
2915 (uri (string-append
2916 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2917 version ".tar.gz"))
2918 (sha256
2919 (base32
2920 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2921 (build-system python-build-system)
f22efa01 2922 (propagated-inputs
f3b98f4f 2923 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2924 ("python-docutils" ,python-docutils)
2925 ("python-pygments" ,python-pygments)))
2926 (home-page "http://sphinx-doc.org/")
2927 (synopsis "Python documentation generator")
2928 (description "Sphinx is a tool that makes it easy to create documentation
2929for Python projects or other documents consisting of multiple reStructuredText
2930sources.")
3f641af0 2931 (license license:bsd-3)))
9dd6078d
DT
2932
2933(define-public python2-sphinx
2934 (package-with-python2 python-sphinx))
6888830b 2935
ad320b20
RW
2936(define-public python-sphinx-rtd-theme
2937 (package
2938 (name "python-sphinx-rtd-theme")
2939 (version "0.1.6")
2940 (source
2941 (origin
2942 (method url-fetch)
2943 (uri (string-append "https://pypi.python.org/packages/source/s/"
2944 "sphinx_rtd_theme/sphinx_rtd_theme-"
2945 version ".tar.gz"))
2946 (sha256
2947 (base32
2948 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2949 (build-system python-build-system)
ad320b20
RW
2950 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2951 (synopsis "ReadTheDocs.org theme for Sphinx")
2952 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2953 (license license:expat)))
ad320b20
RW
2954
2955(define-public python2-sphinx-rtd-theme
2956 (package-with-python2 python-sphinx-rtd-theme))
2957
fe94cf0c
HG
2958(define-public python-rst.linker
2959 (package
2960 (name "python-rst.linker")
2961 (version "1.7")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (pypi-uri "rst.linker" version))
2966 (sha256
2967 (base32
2968 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2969 (build-system python-build-system)
2970 (propagated-inputs
2971 `(("python-dateutil" ,python-dateutil-2)
2972 ("python-six" ,python-six)))
2973 (native-inputs
2974 `(("python-setuptools-scm" ,python-setuptools-scm)))
2975 ;; Test would require path.py, which would introduce a cyclic dependence.
2976 (arguments `(#:tests? #f))
2977 ;; Note: As of version 1.7 the documentation is not worth building.
2978 (home-page "https://github.com/jaraco/rst.linker")
2979 (synopsis "Sphinx plugin to add links and timestamps")
2980 (description "rst.linker allows to automatically replace text by a
2981reStructuredText external reference or timestamps. It's primary purpose is to
2982augment the changelog, but it can be used for other documents, too.")
2983 (license license:expat)))
2984
2985(define-public python2-rst.linker
2986 (package-with-python2 python-rst.linker))
2987
f4de5b3b
CAW
2988(define-public python-feedgenerator
2989 (package
2990 (name "python-feedgenerator")
f0412aa2 2991 (version "1.8")
f4de5b3b 2992 (source
f4de5b3b 2993 (origin
f0412aa2
EF
2994 (method url-fetch)
2995 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2996 (sha256
2997 (base32
7c88bcf4
HG
2998 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2999 (modules '((guix build utils)))
3000 (snippet
3001 '(begin
3002 ;; Remove pre-compiled .pyc files from source.
3003 (for-each delete-file-recursively
3004 (find-files "." "__pycache__" #:directories? #t))
3005 (for-each delete-file (find-files "." "\\.pyc$"))
3006 #t))))
f4de5b3b 3007 (build-system python-build-system)
dae73d9b 3008 (propagated-inputs
f3b98f4f 3009 `(("python-pytz" ,python-pytz)
f4de5b3b 3010 ("python-six" ,python-six)))
f0412aa2 3011 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3012 (synopsis
3013 "Standalone version of Django's Atom/RSS feed generator")
3014 (description
3015 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3016which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3017 (license license:bsd-3)))
f4de5b3b
CAW
3018
3019(define-public python2-feedgenerator
3020 (package-with-python2 python-feedgenerator))
3021
59ad30e3
CAW
3022(define-public python-blinker
3023 (package
3024 (name "python-blinker")
7fb9ff4d 3025 (version "1.4")
59ad30e3
CAW
3026 (source
3027 (origin
3028 (method url-fetch)
7fb9ff4d 3029 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3030 (sha256
3031 (base32
7fb9ff4d 3032 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3033 (build-system python-build-system)
59ad30e3
CAW
3034 (home-page "http://pythonhosted.org/blinker/")
3035 (synopsis "Fast, simple object-to-object and broadcast signaling")
3036 (description
3037 "Blinker provides a fast dispatching system that allows any number of
3038interested parties to subscribe to events, or \"signals\".")
3039 (license license:expat)))
3040
3041(define-public python2-blinker
3042 (package-with-python2 python-blinker))
3043
b8050e71
CAW
3044(define-public pelican
3045 (package
3046 (name "pelican")
11f97c27 3047 (version "3.6.3")
b8050e71
CAW
3048 (source
3049 (origin
3050 (method url-fetch)
11f97c27 3051 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3052 (sha256
3053 (base32
11f97c27 3054 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3055 (build-system python-build-system)
f22efa01 3056 (propagated-inputs
b8050e71
CAW
3057 `(("python-feedgenerator" ,python-feedgenerator)
3058 ("python-jinja2" ,python-jinja2)
3059 ("python-pygments" ,python-pygments)
3060 ("python-docutils" ,python-docutils)
3061 ("python-pytz" ,python-pytz)
3062 ("python-blinker" ,python-blinker)
3063 ("python-unidecode" ,python-unidecode)
3064 ("python-six" ,python-six)
3065 ("python-dateutil-2" ,python-dateutil-2)))
3066 (home-page "http://getpelican.com/")
3067 (arguments
3068 `(;; XXX Requires a lot more packages to do unit tests :P
3069 #:tests? #f
3070 #:phases (modify-phases %standard-phases
3071 (add-before
3072 'install 'adjust-requires
3073 ;; Since feedgenerator is installed from git, it doesn't
3074 ;; conform to the version requirements.
3075 ;;
3076 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3077 ;; version requirement so setuptools doesn't get confused.
3078 (lambda _
3079 (substitute* "setup.py"
3080 (("['\"]feedgenerator.*?['\"]")
3081 "'feedgenerator'")))))))
3082 (synopsis "Python-based static site publishing system")
3083 (description
3084 "Pelican is a tool to generate a static blog from reStructuredText,
3085Markdown input files, and more. Pelican uses Jinja2 for templating
3086and is very extensible.")
3f641af0 3087 (license license:agpl3+)))
b8050e71 3088
240ca4aa
RW
3089(define-public python-scikit-learn
3090 (package
3091 (name "python-scikit-learn")
8e401ab6 3092 (version "0.18.1")
240ca4aa
RW
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (string-append
3097 "https://github.com/scikit-learn/scikit-learn/archive/"
3098 version ".tar.gz"))
7e21b9fb 3099 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3100 (sha256
3101 (base32
8e401ab6 3102 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3103 (build-system python-build-system)
3104 (arguments
3105 `(#:phases
3106 (alist-cons-before
2f6b3d2e
RW
3107 'check 'set-HOME
3108 ;; some tests require access to "$HOME"
3109 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3110 %standard-phases)))
240ca4aa 3111 (inputs
328bb95d
HG
3112 `(("openblas" ,openblas)))
3113 (native-inputs
8e401ab6
RW
3114 `(("python-nose" ,python-nose)
3115 ("python-cython" ,python-cython)))
240ca4aa
RW
3116 (propagated-inputs
3117 `(("python-numpy" ,python-numpy)
3118 ("python-scipy" ,python-scipy)))
3119 (home-page "http://scikit-learn.org/")
3120 (synopsis "Machine Learning in Python")
3121 (description
3122 "Scikit-learn provides simple and efficient tools for data
3123mining and data analysis.")
1b5241c5 3124 (license license:bsd-3)))
240ca4aa
RW
3125
3126(define-public python2-scikit-learn
1b5241c5 3127 (package-with-python2 python-scikit-learn))
240ca4aa 3128
12f8f9bb
RW
3129(define-public python-scikit-image
3130 (package
3131 (name "python-scikit-image")
3132 (version "0.11.3")
3133 (source
3134 (origin
3135 (method url-fetch)
3136 (uri (string-append
3137 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3138 version ".tar.gz"))
3139 (sha256
3140 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3141 (build-system python-build-system)
b83e2333 3142 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3143 (propagated-inputs
3144 `(("python-matplotlib" ,python-matplotlib)
3145 ("python-networkx" ,python-networkx)
12f8f9bb 3146 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3147 ("python-pillow" ,python-pillow)))
3148 (native-inputs
b83e2333
HG
3149 `(("python-numpy" ,python-numpy)
3150 ("python-cython" ,python-cython)
3151 ("python-six" ,python-six)))
12f8f9bb
RW
3152 (home-page "http://scikit-image.org/")
3153 (synopsis "Image processing in Python")
3154 (description
e881752c 3155 "Scikit-image is a collection of algorithms for image processing.")
12733594 3156 (license license:bsd-3)))
12f8f9bb
RW
3157
3158(define-public python2-scikit-image
12733594 3159 (package-with-python2 python-scikit-image))
12f8f9bb 3160
5394a6a6
RW
3161(define-public python-redis
3162 (package
3163 (name "python-redis")
3164 (version "2.10.3")
3165 (source
3166 (origin
3167 (method url-fetch)
3168 (uri (string-append
3169 "https://pypi.python.org/packages/source/r/redis/redis-"
3170 version ".tar.gz"))
3171 (sha256
3172 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3173 (build-system python-build-system)
3174 ;; Tests require a running Redis server
3175 (arguments '(#:tests? #f))
cf8124b0
HG
3176 ;; As long as we are not running test, we do not need this input :-)
3177 ;;(native-inputs
3178 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3179 (home-page "https://github.com/andymccurdy/redis-py")
3180 (synopsis "Redis Python client")
3181 (description
3182 "This package provides a Python interface to the Redis key-value store.")
3183 (license license:expat)))
3184
3185(define-public python2-redis
3186 (package-with-python2 python-redis))
3187
748cef5b
RW
3188(define-public python-rq
3189 (package
3190 (name "python-rq")
3191 (version "0.5.2")
3192 (source
3193 (origin
3194 (method url-fetch)
3195 (uri (string-append
3196 "https://pypi.python.org/packages/source/r/rq/rq-"
3197 version ".tar.gz"))
3198 (sha256
3199 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3200 (build-system python-build-system)
3201 (propagated-inputs
3202 `(("python-click" ,python-click)
3203 ("python-redis" ,python-redis)))
748cef5b
RW
3204 (home-page "http://python-rq.org/")
3205 (synopsis "Simple job queues for Python")
3206 (description
3207 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3208processing them in the background with workers. It is backed by Redis and it
3209is designed to have a low barrier to entry.")
3f641af0 3210 (license license:bsd-2)))
748cef5b
RW
3211
3212(define-public python2-rq
3213 (package-with-python2 python-rq))
3214
6888830b
FB
3215(define-public python-cython
3216 (package
3217 (name "python-cython")
dd22efef 3218 (version "0.24.1")
6888830b
FB
3219 (source
3220 (origin
3221 (method url-fetch)
56918e26 3222 (uri (pypi-uri "Cython" version))
6888830b
FB
3223 (sha256
3224 (base32
dd22efef 3225 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3226 (build-system python-build-system)
3227 ;; we need the full python package and not just the python-wrapper
3228 ;; because we need libpython3.3m.so
3229 (inputs
3230 `(("python" ,python)))
3231 (arguments
3232 `(#:phases
b92f651b
EF
3233 (modify-phases %standard-phases
3234 (add-before 'check 'set-HOME
3235 ;; some tests require access to "$HOME/.cython"
3236 (lambda _ (setenv "HOME" "/tmp")))
3237 (replace 'check
3238 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3239 (home-page "http://cython.org/")
3240 (synopsis "C extensions for Python")
3241 (description "Cython is an optimising static compiler for both the Python
3242programming language and the extended Cython programming language. It makes
3243writing C extensions for Python as easy as Python itself.")
3f641af0 3244 (license license:asl2.0)
48b311b1 3245 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3246
3247(define-public python2-cython
48b311b1
LC
3248 (package (inherit (package-with-python2
3249 (strip-python2-variant python-cython)))
6888830b
FB
3250 (name "python2-cython")
3251 (inputs
3252 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3253
ee5fb7ee
AV
3254;; The RPython toolchain currently does not support Python 3.
3255(define-public python2-rpython
3256 (package
3257 (name "python2-rpython")
3258 (version "0.1.4")
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "rpython" version))
3263 (sha256
3264 (base32
3265 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3266 (build-system python-build-system)
3267 (arguments `(#:python ,python-2))
3268 (native-inputs
f3b98f4f 3269 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3270 (home-page "https://rpython.readthedocs.org")
3271 (synopsis "Framework for implementing interpreters and virtual machines")
3272 (description "RPython is a translation and support framework for
3273producing implementations of dynamic languages, emphasizing a clean separation
3274between language specification and implementation aspects.")
3275 (license license:expat)))
3276
0da98533
FB
3277;; This version of numpy is missing the documentation and is only used to
3278;; build matplotlib which is required to build numpy's documentation.
3279(define python-numpy-bootstrap
3280 (package
3281 (name "python-numpy-bootstrap")
ef9b4c04 3282 (version "1.10.4")
0da98533
FB
3283 (source
3284 (origin
3285 (method url-fetch)
de67e922 3286 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3287 "/numpy-" version ".tar.gz"))
3288 (sha256
3289 (base32
ef9b4c04 3290 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3291 (build-system python-build-system)
3292 (inputs
328bb95d 3293 `(("openblas" ,openblas)
cba256f8 3294 ("lapack" ,lapack)))
0da98533 3295 (native-inputs
2efabc55
HG
3296 `(("python-nose" ,python-nose)
3297 ("gfortran" ,gfortran)))
0da98533
FB
3298 (arguments
3299 `(#:phases
2efabc55
HG
3300 (modify-phases %standard-phases
3301 (add-before 'build 'set-environment-variables
3302 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3303 (call-with-output-file "site.cfg"
3304 (lambda (port)
cba256f8
RW
3305 (format port
3306 "[openblas]
dbdfe515
RW
3307libraries = openblas
3308library_dirs = ~a/lib
3309include_dirs = ~a/include
cba256f8 3310
2efabc55
HG
3311# backslash-n to make emacs happy
3312\n[lapack]
cba256f8
RW
3313lapack_libs = lapack
3314library_dirs = ~a/lib
3315include_dirs = ~a/include
3316"
3317 (assoc-ref inputs "openblas")
3318 (assoc-ref inputs "openblas")
3319 (assoc-ref inputs "lapack")
3320 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3321 ;; Use "gcc" executable, not "cc".
3322 (substitute* "numpy/distutils/system_info.py"
3323 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3324 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3325 #t))
6a843168
FB
3326 ;; Tests can only be run after the library has been installed and not
3327 ;; within the source directory.
2efabc55
HG
3328 (delete 'check)
3329 (add-after 'install 'check
3330 (lambda* (#:key outputs inputs #:allow-other-keys)
3331 ;; Make installed package available for running the tests
3332 (add-installed-pythonpath inputs outputs)
6a843168 3333 (with-directory-excursion "/tmp"
89b5c60e 3334 (zero? (system* "python" "-c"
2efabc55 3335 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3336 (home-page "http://www.numpy.org/")
3337 (synopsis "Fundamental package for scientific computing with Python")
3338 (description "NumPy is the fundamental package for scientific computing
e881752c 3339with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3340object, sophisticated (broadcasting) functions, tools for integrating C/C++
3341and Fortran code, useful linear algebra, Fourier transform, and random number
3342capabilities.")
3f641af0 3343 (license license:bsd-3)))
0da98533
FB
3344
3345(define python2-numpy-bootstrap
3346 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3347
460fccd4 3348(define-public python-munch
3349 (package
3350 (name "python-munch")
3351 (version "2.0.4")
3352 (source
3353 (origin
3354 (method url-fetch)
3355 (uri (pypi-uri "munch" version))
3356 (sha256
3357 (base32
3358 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3359 (build-system python-build-system)
3360 (home-page "https://github.com/Infinidat/munch")
3361 (synopsis "Dot-accessible dictionary")
3362 (description "Munch is a dot-accessible dictionary similar to JavaScript
3363objects.")
3364 (license license:expat)))
3365
3366(define-public python2-munch
3367 (package-with-python2 python-munch))
3368
3a1bfe18
RW
3369(define-public python2-fastlmm
3370 (package
3371 (name "python2-fastlmm")
594358f5 3372 (version "0.2.26")
3a1bfe18
RW
3373 (source
3374 (origin
3375 (method url-fetch)
b074e7d4 3376 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3377 (sha256
3378 (base32
594358f5 3379 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3a1bfe18
RW
3380 (build-system python-build-system)
3381 (arguments
3382 `(#:python ,python-2)) ; only Python 2.7 is supported
3383 (propagated-inputs
3384 `(("python2-numpy" ,python2-numpy)
3385 ("python2-scipy" ,python2-scipy)
3386 ("python2-matplotlib" ,python2-matplotlib)
3387 ("python2-pandas" ,python2-pandas)
3388 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3389 ("python2-pysnptools" ,python2-pysnptools)))
3390 (native-inputs
3391 `(("unzip" ,unzip)
2efabc55 3392 ("python2-cython" ,python2-cython)
f3b98f4f 3393 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3394 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3395 (synopsis "Perform genome-wide association studies on large data sets")
3396 (description
3397 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3398Models, is a program for performing both single-SNP and SNP-set genome-wide
3399association studies (GWAS) on extremely large data sets.")
3f641af0 3400 (license license:asl2.0)))
3a1bfe18 3401
2ee8869a
FB
3402(define-public python-numpy
3403 (package (inherit python-numpy-bootstrap)
3404 (name "python-numpy")
3405 (outputs '("out" "doc"))
89b5c60e 3406 (inputs
b0aa6ede
HG
3407 `(("which" ,which)
3408 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3409 (propagated-inputs
3410 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3411 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3412 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3413 (native-inputs
3414 `(("pkg-config" ,pkg-config)
2efabc55
HG
3415 ("python-sphinx" ,python-sphinx)
3416 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3417 ("texlive" ,texlive)
3418 ("texinfo" ,texinfo)
3419 ("perl" ,perl)
3420 ,@(package-native-inputs python-numpy-bootstrap)))
3421 (arguments
89b5c60e 3422 `(,@(substitute-keyword-arguments
2ee8869a
FB
3423 (package-arguments python-numpy-bootstrap)
3424 ((#:phases phases)
3425 `(alist-cons-after
3426 'install 'install-doc
2efabc55
HG
3427 (lambda* (#:key inputs outputs #:allow-other-keys)
3428 ;; Make installed package available for building the
3429 ;; documentation
3430 (add-installed-pythonpath inputs outputs)
2ee8869a 3431 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3432 (doc (string-append
3433 data "/doc/" ,name "-"
2ee8869a
FB
3434 ,(package-version python-numpy-bootstrap)))
3435 (info (string-append data "/info"))
3436 (html (string-append doc "/html"))
3437 (pyver ,(string-append "PYVER=")))
3438 (with-directory-excursion "doc"
3439 (mkdir-p html)
3440 (system* "make" "html" pyver)
3441 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3442 (system* "make" "-C" "build/latex"
2ee8869a
FB
3443 "all-pdf" "PAPER=a4" pyver)
3444 ;; FIXME: Generation of the info file fails.
3445 ;; (system* "make" "info" pyver)
3446 ;; (mkdir-p info)
3447 ;; (copy-file "build/texinfo/numpy.info"
3448 ;; (string-append info "/numpy.info"))
3449 (for-each (lambda (file)
3450 (copy-file (string-append "build/latex" file)
3451 (string-append doc file)))
3452 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3453 (with-directory-excursion "build/html"
3454 (for-each (lambda (file)
3455 (let* ((dir (dirname file))
3456 (tgt-dir (string-append html "/" dir)))
3457 (unless (equal? "." dir)
3458 (mkdir-p tgt-dir))
96c46210 3459 (install-file file html)))
2ee8869a
FB
3460 (find-files "." ".*"))))))
3461 ,phases)))))))
3462
764c077b 3463(define-public python2-numpy
57b7b8cd 3464 (package-with-python2 python-numpy))
2ee8869a 3465
0151a8df 3466(define-public python-pygit2
3467 (package
3468 (name "python-pygit2")
3469 (version "0.24.2")
3470 (source
3471 (origin
3472 (method url-fetch)
3473 (uri (pypi-uri "pygit2" version))
3474 (sha256
3475 (base32
3476 "0shnafv9zc483wmcr4fzgvirg1qzz42xpdqd4a3ad39sdj1qbbia"))))
3477 (build-system python-build-system)
3478 (propagated-inputs
3479 `(("python-six" ,python-six)
3480 ("python-cffi" ,python-cffi)
3481 ("libgit2" ,libgit2)
3482 ("python-tox" ,python-tox)))
3483 (home-page "https://github.com/libgit2/pygit2")
3484 (synopsis "Python bindings for libgit2")
3485 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3486library, libgit2 implements Git plumbing.")
3487 ;; GPL2.0 only, with linking exception.
3488 (license license:gpl2)))
3489
3490(define-public python2-pygit2
3491 (package-with-python2 python-pygit2))
3492
15bfe6d6
FB
3493(define-public python-pyparsing
3494 (package
3495 (name "python-pyparsing")
e0669289 3496 (version "2.0.3")
15bfe6d6
FB
3497 (source
3498 (origin
3499 (method url-fetch)
de67e922
LF
3500 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3501 "/pyparsing-" version
15bfe6d6
FB
3502 "/pyparsing-" version ".tar.gz"))
3503 (sha256
3504 (base32
e0669289 3505 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3506 (build-system python-build-system)
3507 (outputs '("out" "doc"))
3508 (arguments
3509 `(#:tests? #f ; no test target
3510 #:modules ((guix build python-build-system)
3511 (guix build utils))
3512 #:phases
3513 (alist-cons-after
3514 'install 'install-doc
3515 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3516 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3517 "/share/doc/" ,name "-" ,version))
3518 (html-doc (string-append doc "/html"))
3519 (examples (string-append doc "/examples")))
3520 (mkdir-p html-doc)
3521 (mkdir-p examples)
89b5c60e 3522 (for-each
15bfe6d6 3523 (lambda (dir tgt)
89b5c60e 3524 (map (lambda (file)
96c46210 3525 (install-file file tgt))
15bfe6d6
FB
3526 (find-files dir ".*")))
3527 (list "docs" "htmldoc" "examples")
3528 (list doc html-doc examples))))
3529 %standard-phases)))
3530 (home-page "http://pyparsing.wikispaces.com")
3531 (synopsis "Python parsing class library")
3532 (description
3533 "The pyparsing module is an alternative approach to creating and
3534executing simple grammars, vs. the traditional lex/yacc approach, or the use
3535of regular expressions. The pyparsing module provides a library of classes
3536that client code uses to construct the grammar directly in Python code.")
bd3fa666 3537 (license license:expat)))
15bfe6d6
FB
3538
3539(define-public python2-pyparsing
3540 (package-with-python2 python-pyparsing))
3541
ec00de35
FB
3542(define-public python-numpydoc
3543 (package
3544 (name "python-numpydoc")
3545 (version "0.5")
3546 (source
3547 (origin
3548 (method url-fetch)
89b5c60e 3549 (uri (string-append
ec00de35
FB
3550 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3551 version ".tar.gz"))
3552 (sha256
3553 (base32
5e4d8f67
AE
3554 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3555 (modules '((guix build utils)))
3556 (snippet
3557 '(begin
3558 ;; Drop a test requiring matplotlib, which we cannot add as an
3559 ;; input since it would create a circular dependency: Extend the
3560 ;; test for Python 3, where it is already dropped, to Python 2.
3561 (substitute* "numpydoc/tests/test_plot_directive.py"
3562 (("3") "2"))))))
ec00de35 3563 (build-system python-build-system)
fe4a8da4 3564 (propagated-inputs
213d1745
HG
3565 `(("python-sphinx" ,python-sphinx)))
3566 (native-inputs
3567 `(("python-nose" ,python-nose)))
ec00de35
FB
3568 (home-page "https://pypi.python.org/pypi/numpydoc")
3569 (synopsis
3570 "Numpy's Sphinx extensions")
3571 (description
3572 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3573 (license license:bsd-2)))
ec00de35
FB
3574
3575(define-public python2-numpydoc
5e4d8f67 3576 (package-with-python2 python-numpydoc))
1c65314c 3577
1e656049
RW
3578(define-public python-numexpr
3579 (package
3580 (name "python-numexpr")
2ee57340 3581 (version "2.6.1")
1e656049
RW
3582 (source
3583 (origin
3584 (method url-fetch)
26112c0a 3585 (uri (pypi-uri "numexpr" version))
1e656049
RW
3586 (sha256
3587 (base32
2ee57340 3588 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3589 (build-system python-build-system)
3590 (arguments `(#:tests? #f)) ; no tests included
3591 (propagated-inputs
3592 `(("python-numpy" ,python-numpy)))
3593 (home-page "https://github.com/pydata/numexpr")
3594 (synopsis "Fast numerical expression evaluator for NumPy")
3595 (description
3596 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3597expressions that operate on arrays are accelerated and use less memory than
3598doing the same calculation in Python. In addition, its multi-threaded
3599capabilities can make use of all your cores, which may accelerate
3600computations, most specially if they are not memory-bounded (e.g. those using
3601transcendental functions).")
f210e944 3602 (license license:expat)))
1e656049
RW
3603
3604(define-public python2-numexpr
f210e944 3605 (package-with-python2 python-numexpr))
1e656049 3606
1c65314c
FB
3607(define-public python-matplotlib
3608 (package
3609 (name "python-matplotlib")
1bbc659f 3610 (version "1.4.3")
1c65314c
FB
3611 (source
3612 (origin
3613 (method url-fetch)
de67e922
LF
3614 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3615 "/matplotlib-" version
1c65314c
FB
3616 "/matplotlib-" version ".tar.gz"))
3617 (sha256
3618 (base32
1bbc659f 3619 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3620 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3621 (build-system python-build-system)
3622 (outputs '("out" "doc"))
25f9a068
FB
3623 (propagated-inputs ; the following packages are all needed at run time
3624 `(("python-pyparsing" ,python-pyparsing)
3625 ("python-pygobject" ,python-pygobject)
3626 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3627 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3628 ("python-dateutil" ,python-dateutil-2)
3629 ("python-numpy" ,python-numpy-bootstrap)
3630 ("python-pillow" ,python-pillow)
3631 ("python-pytz" ,python-pytz)
3632 ("python-six" ,python-six)
25f9a068
FB
3633 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3634 ;; from 'gtk+') provides the required 'typelib' files used by
3635 ;; 'gobject-introspection'. The location of these files is set with the
3636 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3637 ;; is done automatically by a 'native-search-path' procedure. However,
3638 ;; at run-time the user must set this variable as follows:
3639 ;;
3640 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3641 ("gtk+" ,gtk+)
3642 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3643 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3644 ;; object. For this reason we need to import both libraries.
3645 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3646 ("python-pycairo" ,python-pycairo)
3647 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3648 (inputs
ca33a3ad 3649 `(("libpng" ,libpng)
1c65314c
FB
3650 ("imagemagick" ,imagemagick)
3651 ("freetype" ,freetype)
25f9a068
FB
3652 ("cairo" ,cairo)
3653 ("glib" ,glib)
1c65314c 3654 ;; FIXME: Add backends when available.
1c65314c
FB
3655 ;("python-wxpython" ,python-wxpython)
3656 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3657 ("tcl" ,tcl)
3658 ("tk" ,tk)))
1c65314c
FB
3659 (native-inputs
3660 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3661 ("python-sphinx" ,python-sphinx)
3662 ("python-numpydoc" ,python-numpydoc)
3663 ("python-nose" ,python-nose)
3664 ("python-mock" ,python-mock)
1c65314c
FB
3665 ("texlive" ,texlive)
3666 ("texinfo" ,texinfo)))
3667 (arguments
3668 `(#:phases
25f9a068
FB
3669 (alist-cons-before
3670 'build 'configure-environment
3671 (lambda* (#:key outputs inputs #:allow-other-keys)
3672 (let ((cairo (assoc-ref inputs "cairo"))
3673 (gtk+ (assoc-ref inputs "gtk+")))
3674 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3675 ;; has not effect.
25f9a068
FB
3676 (setenv "LD_LIBRARY_PATH"
3677 (string-append cairo "/lib:" gtk+ "/lib"))
3678 (setenv "HOME" (getcwd))
3679 (call-with-output-file "setup.cfg"
3680 (lambda (port)
1bbc659f
FB
3681 (format port "[directories]~%
3682basedirlist = ~a,~a~%
57b7b8cd 3683 [rc_options]~%
1bbc659f
FB
3684backend = TkAgg~%"
3685 (assoc-ref inputs "tcl")
3686 (assoc-ref inputs "tk"))))))
25f9a068
FB
3687 (alist-cons-after
3688 'install 'install-doc
ca33a3ad 3689 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3690 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3691 (doc (string-append data "/doc/" ,name "-" ,version))
3692 (info (string-append data "/info"))
3693 (html (string-append doc "/html")))
ca33a3ad
HG
3694 ;; Make installed package available for building the
3695 ;; documentation
3696 (add-installed-pythonpath inputs outputs)
25f9a068 3697 (with-directory-excursion "doc"
25f9a068
FB
3698 ;; Produce pdf in 'A4' format.
3699 (substitute* (find-files "." "conf\\.py")
3700 (("latex_paper_size = 'letter'")
3701 "latex_paper_size = 'a4'"))
3702 (mkdir-p html)
3703 (mkdir-p info)
3704 ;; The doc recommends to run the 'html' target twice.
3705 (system* "python" "make.py" "html")
3706 (system* "python" "make.py" "html")
18b31516 3707 (copy-recursively "build/html" html)
25f9a068
FB
3708 (system* "python" "make.py" "latex")
3709 (system* "python" "make.py" "texinfo")
18b31516
FB
3710 (symlink (string-append html "/_images")
3711 (string-append info "/matplotlib-figures"))
3712 (with-directory-excursion "build/texinfo"
3713 (substitute* "matplotlib.texi"
3714 (("@image\\{([^,]*)" all file)
3715 (string-append "@image{matplotlib-figures/" file)))
3716 (symlink (string-append html "/_images")
3717 "./matplotlib-figures")
3718 (system* "makeinfo" "--no-split"
3719 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3720 (copy-file "build/texinfo/matplotlib.info"
3721 (string-append info "/matplotlib.info"))
3722 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3723 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3724 %standard-phases))))
1c65314c
FB
3725 (home-page "http://matplotlib.org")
3726 (synopsis "2D plotting library for Python")
3727 (description
3728 "Matplotlib is a Python 2D plotting library which produces publication
3729quality figures in a variety of hardcopy formats and interactive environments
3730across platforms. Matplotlib can be used in Python scripts, the python and
3731ipython shell, web application servers, and six graphical user interface
3732toolkits.")
3f641af0 3733 (license license:psfl)
57b7b8cd 3734 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3735
764c077b 3736(define-public python2-matplotlib
57b7b8cd
LC
3737 (let ((matplotlib (package-with-python2
3738 (strip-python2-variant python-matplotlib))))
764c077b 3739 (package (inherit matplotlib)
88c26834
AE
3740 ;; Make sure to use special packages for Python 2 instead
3741 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3742 (propagated-inputs
7ca0dbc3 3743 `(("python2-pycairo" ,python2-pycairo)
764c077b 3744 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3745 ("python2-tkinter" ,python-2 "tk")
3746 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3747 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3748
0dde6232
RW
3749(define-public python2-pysnptools
3750 (package
3751 (name "python2-pysnptools")
a800018e 3752 (version "0.3.9")
0dde6232
RW
3753 (source
3754 (origin
3755 (method url-fetch)
3f2e9675 3756 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3757 (sha256
3758 (base32
a800018e 3759 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3760 (build-system python-build-system)
3761 (arguments
3762 `(#:python ,python-2)) ; only Python 2.7 is supported
3763 (propagated-inputs
3764 `(("python2-numpy" ,python2-numpy)
3765 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3766 ("python2-pandas" ,python2-pandas)))
3767 (native-inputs
3768 `(("python2-cython" ,python2-cython)))
0dde6232 3769 (native-inputs
f3b98f4f 3770 `(("unzip" ,unzip)))
0dde6232
RW
3771 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3772 (synopsis "Library for reading and manipulating genetic data")
3773 (description
3774 "PySnpTools is a library for reading and manipulating genetic data. It
3775can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3776those files. It can also efficiently manipulate ranges of integers using set
3777operators such as union, intersection, and difference.")
3f641af0 3778 (license license:asl2.0)))
0dde6232 3779
c9b1b4f9
RW
3780(define-public python-rpy2
3781 (package
3782 (name "python-rpy2")
ec3bcbc7 3783 (version "2.7.6")
c9b1b4f9
RW
3784 (source
3785 (origin
3786 (method url-fetch)
ec3bcbc7 3787 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3788 (sha256
3789 (base32
ec3bcbc7 3790 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3791 (build-system python-build-system)
482d9591
HG
3792 (propagated-inputs
3793 `(("python-six" ,python-six)))
c9b1b4f9 3794 (inputs
482d9591 3795 `(("readline" ,readline)
c9b1b4f9
RW
3796 ("icu4c" ,icu4c)
3797 ("pcre" ,pcre)
3798 ("r" ,r)))
3799 (native-inputs
f3b98f4f 3800 `(("zlib" ,zlib)))
c9b1b4f9
RW
3801 (home-page "http://rpy.sourceforge.net/")
3802 (synopsis "Python interface to the R language")
3803 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3804low-level interface to R from Python, a proposed high-level interface,
3805including wrappers to graphical libraries, as well as R-like structures and
3806functions.")
3f641af0 3807 (license license:gpl3+)))
c9b1b4f9
RW
3808
3809(define-public python2-rpy2
3810 (let ((rpy2 (package-with-python2 python-rpy2)))
3811 (package (inherit rpy2)
3812 (native-inputs
3813 `(("python2-singledispatch" ,python2-singledispatch)
3814 ,@(package-native-inputs rpy2))))))
3815
bb986599
FB
3816(define-public python-scipy
3817 (package
3818 (name "python-scipy")
ba8a0824 3819 (version "0.16.0")
bb986599
FB
3820 (source
3821 (origin
3822 (method url-fetch)
de67e922
LF
3823; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3824 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3825 "/scipy-" version ".tar.xz"))
bb986599
FB
3826 (sha256
3827 (base32
ba8a0824 3828 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3829 (build-system python-build-system)
dd86c0d1 3830 (propagated-inputs
bb986599
FB
3831 `(("python-numpy" ,python-numpy)
3832 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3833 ("python-pyparsing" ,python-pyparsing)))
3834 (inputs
3835 `(("lapack" ,lapack)
719b01c1 3836 ("openblas" ,openblas)))
bb986599 3837 (native-inputs
dd86c0d1
RW
3838 `(("python-nose" ,python-nose)
3839 ("python-sphinx" ,python-sphinx)
5248d49e 3840 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3841 ("gfortran" ,gfortran)
bb986599
FB
3842 ("texlive" ,texlive)
3843 ("perl" ,perl)))
3844 (outputs '("out" "doc"))
3845 (arguments
3846 `(#:phases
3847 (alist-cons-before
719b01c1 3848 'build 'configure-openblas
bb986599 3849 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3850 (call-with-output-file "site.cfg"
3851 (lambda (port)
3852 (format port
3853 "[blas]
3854libraries = openblas
3855library_dirs = ~a/lib
3856include_dirs = ~a/include
d548e6aa
HG
3857
3858# backslash-n to make emacs happy
3859\n[atlas]
719b01c1
RW
3860library_dirs = ~a/lib
3861atlas_libs = openblas
3862"
3863 (assoc-ref inputs "openblas")
3864 (assoc-ref inputs "openblas")
3865 (assoc-ref inputs "openblas"))))
3866 #t)
bb986599
FB
3867 (alist-cons-after
3868 'install 'install-doc
d548e6aa 3869 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3870 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3871 (doc (string-append data "/doc/" ,name "-" ,version))
3872 (html (string-append doc "/html"))
3873 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3874 ;; Make installed package available for building the
3875 ;; documentation
3876 (add-installed-pythonpath inputs outputs)
bb986599 3877 (with-directory-excursion "doc"
bb986599
FB
3878 ;; Fix generation of images for mathematical expressions.
3879 (substitute* (find-files "source" "conf\\.py")
3880 (("pngmath_use_preview = True")
3881 "pngmath_use_preview = False"))
3882 (mkdir-p html)
3883 (system* "make" "html" pyver)
3884 (system* "make" "latex" "PAPER=a4" pyver)
3885 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3886 (copy-file "build/latex/scipy-ref.pdf"
3887 (string-append doc "/scipy-ref.pdf"))
3888 (with-directory-excursion "build/html"
3889 (for-each (lambda (file)
3890 (let* ((dir (dirname file))
3891 (tgt-dir (string-append html "/" dir)))
96c46210 3892 (install-file file html)))
bb986599
FB
3893 (find-files "." ".*"))))))
3894 ;; Tests can only be run after the library has been installed and not
3895 ;; within the source directory.
3896 (alist-cons-after
3897 'install 'check
89b5c60e 3898 (lambda _
bb986599
FB
3899 (with-directory-excursion "/tmp"
3900 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3901 (alist-delete
3902 'check
4f9ff21e
RW
3903 (alist-cons-after
3904 'unpack 'fix-tests
3905 (lambda _
3906 (substitute* "scipy/integrate/tests/test_quadpack.py"
3907 (("libm.so") "libm.so.6"))
3908 #t)
3909 %standard-phases)))))))
bb986599
FB
3910 (home-page "http://www.scipy.org/")
3911 (synopsis "The Scipy library provides efficient numerical routines")
3912 (description "The SciPy library is one of the core packages that make up
3913the SciPy stack. It provides many user-friendly and efficient numerical
3914routines such as routines for numerical integration and optimization.")
3f641af0 3915 (license license:bsd-3)))
bb986599 3916
764c077b 3917(define-public python2-scipy
57b7b8cd 3918 (package-with-python2 python-scipy))
bb986599 3919
73acc193 3920(define-public python-socksipy-branch
3921 (package
3922 (name "python-socksipy-branch")
3923 (version "1.01")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "SocksiPy-branch" version))
3928 (sha256
3929 (base32
3930 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3931 (build-system python-build-system)
3932 (arguments
3933 `(#:tests? #f)) ; There are no tests
3934 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3935 (synopsis "Python SOCKS module")
3936 (description
3937 "SocksiPy - A Python SOCKS client module. It provides a
3938socket-like interface that supports connections to any TCP
3939service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3940The original version was developed by Dan Haim, this is a
3941branch created by Mario Vilas to address some open issues,
3942as the original project seems to have been abandoned circa 2007.")
3943 (license license:bsd-3)))
3944
3945(define-public python2-socksipy-branch
3946 (package-with-python2 python-socksipy-branch))
3947
94914805
EB
3948(define-public python-sqlalchemy
3949 (package
3950 (name "python-sqlalchemy")
a4ba286b 3951 (version "1.0.12")
94914805
EB
3952 (source
3953 (origin
3954 (method url-fetch)
3955 (uri (string-append "https://pypi.python.org/packages/source/S/"
3956 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3957 (sha256
3958 (base32
a4ba286b 3959 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3960 (build-system python-build-system)
3961 (native-inputs
3962 `(("python-cython" ,python-cython) ;for c extensions
3963 ("python-pytest" ,python-pytest)
3964 ("python-mock" ,python-mock))) ;for tests
3965 (arguments
3966 `(#:phases (alist-replace
3967 'check
3968 (lambda _ (zero? (system* "py.test")))
3969 %standard-phases)))
3970 (home-page "http://www.sqlalchemy.org")
3971 (synopsis "Database abstraction library")
3972 (description
3973 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3974gives application developers the full power and flexibility of SQL. It
3975provides a full suite of well known enterprise-level persistence patterns,
3976designed for efficient and high-performing database access, adapted into a
3977simple and Pythonic domain language.")
3f641af0 3978 (license license:x11)))
94914805
EB
3979
3980(define-public python2-sqlalchemy
3981 (package-with-python2 python-sqlalchemy))
c937562e 3982
4a093330
DM
3983(define-public python-pycodestyle
3984 (package
3985 (name "python-pycodestyle")
3986 (version "2.0.0")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "pycodestyle" version))
3991 (sha256
3992 (base32
3993 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3994 (build-system python-build-system)
3995 (home-page "https://pycodestyle.readthedocs.io/")
3996 (synopsis "Python style guide checker")
3997 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3998Python code against some of the style conventions in
3999@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4000 (license license:expat)))
4a093330
DM
4001
4002(define-public python2-pycodestyle
f210e944 4003 (package-with-python2 python-pycodestyle))
b91912c4
DM
4004
4005(define-public python-orderedmultidict
4006 (package
4007 (name "python-orderedmultidict")
4008 (version "0.7.10")
4009 (source
4010 (origin
4011 (method url-fetch)
4012 (uri (pypi-uri "orderedmultidict" version))
4013 (sha256
4014 (base32
4015 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
4016 (build-system python-build-system)
4017 (arguments
4018 `(#:phases
4019 (modify-phases %standard-phases
4020 (add-after 'unpack 'fix-tests
4021 (lambda _
4022 ;; The package uses nosetest for running the tests.
4023 ;; Adding this initfile allows to run the test suite
4024 ;; without requiring nosetest.
4025 (zero? (system* "touch" "tests/__init__.py")))))))
4026 (propagated-inputs
4027 `(("python-six" ,python-six)))
4028 (native-inputs
4029 `(("python-pycodestyle" ,python-pycodestyle)))
4030 (home-page "https://github.com/gruns/orderedmultidict")
4031 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4032 (description "This package contains a library for ordered multivalue
4033dictionaries. A multivalue dictionary is a dictionary that can store
4034multiple values for the same key. An ordered multivalue dictionary is a
4035multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4036 (license license:unlicense)))
b91912c4
DM
4037
4038(define-public python2-orderedmultidict
f210e944 4039 (package-with-python2 python-orderedmultidict))
9dede065
DM
4040
4041(define-public python-furl
4042 (package
4043 (name "python-furl")
4044 (version "0.5.6")
4045 (source
4046 (origin
4047 (method url-fetch)
4048 (uri (pypi-uri "furl" version))
4049 (sha256
4050 (base32
4051 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4052 (build-system python-build-system)
4053 (propagated-inputs
4054 `(("python-six" ,python-six)
4055 ("python-orderedmultidict" ,python-orderedmultidict)))
4056 (native-inputs
4057 `(("python-pycodestyle" ,python-pycodestyle)))
4058 (home-page "https://github.com/gruns/furl")
4059 (synopsis "URL manipulation in Python")
4060 (description "Furl provides an easy-to-use alternative to the
4061@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4062 (license license:unlicense)))
9dede065
DM
4063
4064(define-public python2-furl
f210e944 4065 (package-with-python2 python-furl))
462bf271
DM
4066
4067(define-public python-flask-babel
4068 (package
4069 (name "python-flask-babel")
4070 (version "0.11.1")
4071 (source
4072 (origin
4073 (method url-fetch)
4074 (uri (pypi-uri "Flask-Babel" version))
4075 (sha256
4076 (base32
4077 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4078 (build-system python-build-system)
4079 (propagated-inputs
4080 `(("python-flask" ,python-flask)
4081 ("python-babel" ,python-babel)
4082 ("python-jinja2" ,python-jinja2)
4083 ("python-pytz" ,python-pytz)))
4084 (home-page "https://github.com/python-babel/flask-babel")
4085 (synopsis "Add i18n/l10n support to Flask applications")
4086 (description "This package implements internationalization and localization
4087support for Flask. This is based on the Python babel module as well as pytz -
4088both of which are installed automatically if you install this library.")
f210e944 4089 (license license:bsd-3)))
462bf271
DM
4090
4091(define-public python2-flask-babel
f210e944 4092 (package-with-python2 python-flask-babel))
4a093330 4093
de2966cf
EF
4094(define-public python-sqlalchemy-utils
4095 (package
4096 (name "python-sqlalchemy-utils")
bb4b1706 4097 (version "0.32.11")
de2966cf
EF
4098 (source
4099 (origin
4100 (method url-fetch)
4101 (uri (pypi-uri "SQLAlchemy-Utils" version))
4102 (sha256
4103 (base32
bb4b1706 4104 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4105 (build-system python-build-system)
c22b4f87 4106 (propagated-inputs
de2966cf
EF
4107 `(("python-six" ,python-six)
4108 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
4109 (native-inputs
4110 `(("python-pytest" ,python-pytest)))
de2966cf
EF
4111 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4112 (synopsis "Various utility functions for SQLAlchemy")
4113 (description
4114 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4115for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4116
4117You might also want to install the following optional dependencies:
4118@enumerate
4119@item @code{python-passlib}
4120@item @code{python-babel}
4121@item @code{python-cryptography}
4122@item @code{python-pytz}
4123@item @code{python-psycopg2}
4124@item @code{python-furl}
4125@item @code{python-flask-babel}
4126@end enumerate
4127")
de2966cf
EF
4128 (license license:bsd-3)))
4129
4130(define-public python2-sqlalchemy-utils
f210e944 4131 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4132
af5a4602
CAW
4133(define-public python-alembic
4134 (package
4135 (name "python-alembic")
bb484529 4136 (version "0.8.7")
af5a4602
CAW
4137 (source
4138 (origin
4139 (method url-fetch)
4140 (uri (pypi-uri "alembic" version))
4141 (sha256
4142 (base32
bb484529 4143 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4144 (build-system python-build-system)
4145 (native-inputs
4146 `(("python-mock" ,python-mock)
4147 ("python-pytest-cov" ,python-pytest-cov)))
4148 (propagated-inputs
4149 `(("python-sqlalchemy" ,python-sqlalchemy)
4150 ("python-mako" ,python-mako)
4151 ("python-editor" ,python-editor)))
4152 (home-page "http://bitbucket.org/zzzeek/alembic")
4153 (synopsis
4154 "Database migration tool for SQLAlchemy")
4155 (description
4156 "Alembic is a lightweight database migration tool for usage with the
4157SQLAlchemy Database Toolkit for Python.")
f210e944 4158 (license license:expat)))
af5a4602
CAW
4159
4160(define-public python2-alembic
f210e944 4161 (package-with-python2 python-alembic))
af5a4602 4162
1671c07c
EB
4163(define-public python-distutils-extra
4164 (package
4165 (name "python-distutils-extra")
4166 (version "2.38")
4167 (source
4168 (origin
4169 (method url-fetch)
4170 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4171 version "/+download/python-distutils-extra-"
4172 version ".tar.gz"))
4173 (sha256
4174 (base32
4175 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4176 (build-system python-build-system)
1671c07c
EB
4177 (home-page "https://launchpad.net/python-distutils-extra/")
4178 (synopsis "Enhancements to Python's distutils")
4179 (description
4180 "The python-distutils-extra module enables you to easily integrate
4181gettext support, themed icons, and scrollkeeper-based documentation into
4182Python's distutils.")
3f641af0 4183 (license license:gpl2)))
1671c07c
EB
4184
4185(define-public python2-distutils-extra
4186 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4187
4188(define-public python2-elib.intl
4189 (package
4190 (name "python2-elib.intl")
4191 (version "0.0.3")
4192 (source
4193 (origin
4194 ;; This project doesn't tag releases or publish tarballs, so we take
4195 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4196 (method git-fetch)
4197 (uri (git-reference
4198 (url "https://github.com/dieterv/elib.intl.git")
4199 (commit "d09997cfef")))
4200 (sha256
4201 (base32
4202 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4203 (build-system python-build-system)
ea5456c8
EB
4204 (arguments
4205 ;; incompatible with Python 3 (exception syntax)
4206 `(#:python ,python-2
b41a05ce 4207 #:tests? #f))
ea5456c8
EB
4208 (home-page "https://github.com/dieterv/elib.intl")
4209 (synopsis "Enhanced internationalization for Python")
4210 (description
4211 "The elib.intl module provides enhanced internationalization (I18N)
4212services for your Python modules and applications.")
3f641af0 4213 (license license:lgpl3+)))
ea5456c8 4214
c937562e
EB
4215(define-public python-pillow
4216 (package
4217 (name "python-pillow")
aba5182c 4218 (version "3.3.3")
c937562e
EB
4219 (source
4220 (origin
4221 (method url-fetch)
f1d9231d 4222 (uri (pypi-uri "Pillow" version))
c937562e
EB
4223 (sha256
4224 (base32
aba5182c 4225 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4226 (build-system python-build-system)
4227 (native-inputs
f3b98f4f 4228 `(("python-nose" ,python-nose)))
c937562e 4229 (inputs
5ff408d9
SB
4230 `(("freetype" ,freetype)
4231 ("lcms" ,lcms)
c937562e
EB
4232 ("zlib" ,zlib)
4233 ("libjpeg" ,libjpeg)
4234 ("openjpeg" ,openjpeg)
5ff408d9
SB
4235 ("libtiff" ,libtiff)
4236 ("libwebp" ,libwebp)))
c937562e 4237 (arguments
e5358a6b 4238 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4239 (add-after
4240 'install 'check-installed
6151120a 4241 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4242 (begin
4243 (setenv "HOME" (getcwd))
6151120a
HG
4244 ;; Make installed package available for running the
4245 ;; tests
4246 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4247 (and (zero? (system* "python" "selftest.py"
4248 "--installed"))
4249 (zero? (system* "python" "test-installed.py"))))))
4250 (delete 'check))))
c937562e
EB
4251 (home-page "https://pypi.python.org/pypi/Pillow")
4252 (synopsis "Fork of the Python Imaging Library")
4253 (description
4254 "The Python Imaging Library adds image processing capabilities to your
4255Python interpreter. This library provides extensive file format support, an
4256efficient internal representation, and fairly powerful image processing
4257capabilities. The core image library is designed for fast access to data
4258stored in a few basic pixel formats. It should provide a solid foundation for
4259a general image processing tool.")
3f641af0 4260 (license (license:x11-style
c937562e
EB
4261 "http://www.pythonware.com/products/pil/license.htm"
4262 "The PIL Software License"))))
4263
4264(define-public python2-pillow
4265 (package-with-python2 python-pillow))
bb986599 4266
a415f036
FB
4267(define-public python-pycparser
4268 (package
4269 (name "python-pycparser")
38eb6919 4270 (version "2.14")
a415f036
FB
4271 (source
4272 (origin
4273 (method url-fetch)
38eb6919 4274 (uri (pypi-uri "pycparser" version))
a415f036
FB
4275 (sha256
4276 (base32
38eb6919 4277 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4278 (outputs '("out" "doc"))
4279 (build-system python-build-system)
4280 (native-inputs
f3b98f4f 4281 `(("pkg-config" ,pkg-config)))
a415f036 4282 (arguments
89b5c60e 4283 `(#:phases
a415f036
FB
4284 (alist-replace
4285 'check
4286 (lambda _
4287 (with-directory-excursion "tests"
4288 (zero? (system* "python" "all_tests.py"))))
4289 (alist-cons-after
4290 'install 'install-doc
4291 (lambda* (#:key outputs #:allow-other-keys)
4292 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4293 (doc (string-append data "/doc/" ,name "-" ,version))
4294 (examples (string-append doc "/examples")))
4295 (mkdir-p examples)
4296 (for-each (lambda (file)
4297 (copy-file (string-append "." file)
4298 (string-append doc file)))
4299 '("/README.rst" "/CHANGES" "/LICENSE"))
4300 (copy-recursively "examples" examples)))
4301 %standard-phases))))
4302 (home-page "https://github.com/eliben/pycparser")
4303 (synopsis "C parser in Python")
4304 (description
4305 "Pycparser is a complete parser of the C language, written in pure Python
4306using the PLY parsing library. It parses C code into an AST and can serve as
4307a front-end for C compilers or analysis tools.")
3f641af0 4308 (license license:bsd-3)))
a415f036
FB
4309
4310(define-public python2-pycparser
4311 (package-with-python2 python-pycparser))
57c3f716
FB
4312
4313(define-public python-cffi
4314 (package
4315 (name "python-cffi")
2d3a437c 4316 (version "1.4.2")
57c3f716
FB
4317 (source
4318 (origin
4319 (method url-fetch)
2d3a437c 4320 (uri (pypi-uri "cffi" version))
89b5c60e 4321 (sha256
2d3a437c 4322 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4323 (build-system python-build-system)
4324 (outputs '("out" "doc"))
4325 (inputs
4326 `(("libffi" ,libffi)))
4327 (propagated-inputs ; required at run-time
4328 `(("python-pycparser" ,python-pycparser)))
4329 (native-inputs
4330 `(("pkg-config" ,pkg-config)
4331 ("python-sphinx" ,python-sphinx)
f3b98f4f 4332 ("python-pytest" ,python-pytest)))
57c3f716 4333 (arguments
4179f952 4334 `(#:phases
57c3f716
FB
4335 (alist-cons-after
4336 'install 'install-doc
4337 (lambda* (#:key outputs #:allow-other-keys)
4338 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4339 (doc (string-append data "/doc/" ,name "-" ,version))
4340 (html (string-append doc "/html")))
4341 (with-directory-excursion "doc"
4342 (system* "make" "html")
4343 (mkdir-p html)
4344 (copy-recursively "build/html" html))
4345 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4346 %standard-phases)))
4347 (home-page "http://cffi.readthedocs.org")
4348 (synopsis "Foreign function interface for Python")
4349 (description
4350 "Foreign Function Interface for Python calling C code.")
bd3fa666 4351 (license license:expat)))
57c3f716
FB
4352
4353(define-public python2-cffi
4354 (package-with-python2 python-cffi))
6fa14469
FB
4355
4356(define-public python-xcffib
4357 (package
4358 (name "python-xcffib")
4359 (version "0.1.9")
4360 (source
4361 (origin
4362 (method url-fetch)
4363 (uri (string-append "https://pypi.python.org/packages/source/x/"
4364 "xcffib/xcffib-" version ".tar.gz"))
4365 (sha256
4366 (base32
4367 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4368 (build-system python-build-system)
4369 (inputs
482d9591 4370 `(("libxcb" ,libxcb)))
6fa14469 4371 (propagated-inputs
482d9591
HG
4372 `(("python-cffi" ,python-cffi) ; used at run time
4373 ("python-six" ,python-six)))
6fa14469 4374 (arguments
89b5c60e 4375 `(#:phases
6fa14469
FB
4376 (alist-cons-after
4377 'install 'install-doc
4378 (lambda* (#:key outputs #:allow-other-keys)
4379 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4380 "/doc/" ,name "-" ,version)))
4381 (mkdir-p doc)
4382 (copy-file "README.md"
4383 (string-append doc "/README.md"))))
4384 %standard-phases)))
4385 (home-page "https://github.com/tych0/xcffib")
4386 (synopsis "XCB Python bindings")
4387 (description
4388 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4389support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4390 (license license:expat)))
6fa14469
FB
4391
4392(define-public python2-xcffib
4393 (package-with-python2 python-xcffib))
4394
9e099723
FB
4395(define-public python-cairocffi
4396 (package
4397 (name "python-cairocffi")
4398 (version "0.6")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 ;; The archive on pypi is missing the 'utils' directory!
4403 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4404 version ".tar.gz"))
f586c877 4405 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4406 (sha256
4407 (base32
4408 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4409 (build-system python-build-system)
4410 (outputs '("out" "doc"))
4411 (inputs
4412 `(("gdk-pixbuf" ,gdk-pixbuf)
4413 ("cairo" ,cairo)))
4414 (native-inputs
4415 `(("pkg-config" ,pkg-config)
4416 ("python-sphinx" ,python-sphinx)
f3b98f4f 4417 ("python-docutils" ,python-docutils)))
9e099723
FB
4418 (propagated-inputs
4419 `(("python-xcffib" ,python-xcffib))) ; used at run time
4420 (arguments
89b5c60e 4421 `(#:phases
9e099723
FB
4422 (alist-cons-after
4423 'install 'install-doc
4424 (lambda* (#:key inputs outputs #:allow-other-keys)
4425 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4426 (doc (string-append data "/doc/" ,name "-" ,version))
4427 (html (string-append doc "/html")))
89b5c60e 4428 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4429 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4430 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4431 (setenv "LANG" "en_US.UTF-8")
4432 (mkdir-p html)
4433 (for-each (lambda (file)
4434 (copy-file (string-append "." file)
4435 (string-append doc file)))
4436 '("/README.rst" "/CHANGES" "/LICENSE"))
4437 (system* "python" "setup.py" "build_sphinx")
4438 (copy-recursively "docs/_build/html" html)))
4439 %standard-phases)))
4440 (home-page "https://github.com/SimonSapin/cairocffi")
4441 (synopsis "Python bindings and object-oriented API for Cairo")
4442 (description
4443 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4444Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4445graphics library with support for multiple backends including image buffers,
4446PNG, PostScript, PDF, and SVG file output.")
3f641af0 4447 (license license:bsd-3)))
9e099723
FB
4448
4449(define-public python2-cairocffi
4450 (package-with-python2 python-cairocffi))
4451
3cff95cb
RW
4452(define-public python-decorator
4453 (package
4454 (name "python-decorator")
eb6e2e81 4455 (version "4.0.9")
3cff95cb
RW
4456 (source
4457 (origin
4458 (method url-fetch)
e21338be 4459 (uri (pypi-uri "decorator" version))
3cff95cb 4460 (sha256
eb6e2e81 4461 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4462 (build-system python-build-system)
4463 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4464 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4465 (synopsis "Python module to simplify usage of decorators")
4466 (description
4467 "The aim of the decorator module is to simplify the usage of decorators
4468for the average programmer, and to popularize decorators usage giving examples
4469of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4470etc. The core of this module is a decorator factory.")
4471 (license license:expat)))
4472
4473(define-public python2-decorator
4474 (package-with-python2 python-decorator))
4475
2c0499ad
RW
4476(define-public python-drmaa
4477 (package
4478 (name "python-drmaa")
4479 (version "0.7.6")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 (uri (string-append
4484 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4485 version ".tar.gz"))
4486 (sha256
4487 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4488 (build-system python-build-system)
4489 ;; The test suite requires libdrmaa which is provided by the cluster
4490 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4491 ;; should be set to the path of the libdrmaa library.
4492 (arguments '(#:tests? #f))
4493 (native-inputs
f3b98f4f 4494 `(("python-nose" ,python-nose)))
2c0499ad
RW
4495 (home-page "https://pypi.python.org/pypi/drmaa")
4496 (synopsis "Python bindings for the DRMAA library")
4497 (description
4498 "A Python package for Distributed Resource Management (DRM) job
4499submission and control. This package is an implementation of the DRMAA 1.0
4500Python language binding specification.")
3f641af0 4501 (license license:bsd-3)))
2c0499ad
RW
4502
4503(define-public python2-drmaa
4504 (package-with-python2 python-drmaa))
4505
d05c6da0
RW
4506(define-public python-gridmap
4507 (package
4508 (name "python-gridmap")
4509 (version "0.13.0")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (string-append
4514 "https://github.com/pygridtools/gridmap/archive/v"
4515 version ".tar.gz"))
4516 (file-name (string-append name "-" version ".tar.gz"))
4517 (sha256
4518 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4519 (build-system python-build-system)
f22efa01 4520 (propagated-inputs
d05c6da0
RW
4521 `(("python-psutil" ,python-psutil)
4522 ("python-drmaa" ,python-drmaa)
4523 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4524 (home-page "https://github.com/pygridtools/gridmap")
4525 (synopsis "Create jobs on a cluster directly from Python")
4526 (description
4527 "Gridmap is a Python package to allow you to easily create jobs on the
4528cluster directly from Python. You can directly map Python functions onto the
4529cluster without needing to write any wrapper code yourself.")
3f641af0 4530 (license license:gpl3+)))
d05c6da0
RW
4531
4532(define-public python2-gridmap
4533 (package-with-python2 python-gridmap))
4534
cb6d5c54
RW
4535(define-public python-pexpect
4536 (package
4537 (name "python-pexpect")
4538 (version "3.3")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (string-append "https://pypi.python.org/packages/source/p/"
4543 "pexpect/pexpect-" version ".tar.gz"))
4544 (sha256
4545 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4546 (build-system python-build-system)
4547 (arguments
4548 `(#:phases
4549 (modify-phases %standard-phases
4550 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4551 (native-inputs
4552 `(("python-nose" ,python-nose)))
4553 (home-page "http://pexpect.readthedocs.org/")
4554 (synopsis "Controlling interactive console applications")
4555 (description
4556 "Pexpect is a pure Python module for spawning child applications;
4557controlling them; and responding to expected patterns in their output.
4558Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4559child application and control it as if a human were typing commands.")
3f641af0 4560 (license license:isc)))
cb6d5c54
RW
4561
4562(define-public python2-pexpect
4563 (package-with-python2 python-pexpect))
4564
229ad120
RW
4565(define-public python-setuptools-scm
4566 (package
4567 (name "python-setuptools-scm")
42d6d0d0 4568 (version "1.11.1")
229ad120
RW
4569 (source (origin
4570 (method url-fetch)
383af6b0 4571 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4572 (sha256
4573 (base32
42d6d0d0 4574 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4575 (build-system python-build-system)
4576 (home-page "https://github.com/pypa/setuptools_scm/")
4577 (synopsis "Manage Python package versions in SCM metadata")
4578 (description
383af6b0 4579 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4580@dfn{software configuration management} (SCM) metadata instead of declaring
4581them as the version argument or in a SCM managed file.")
4582 (license license:expat)))
4583
4584(define-public python2-setuptools-scm
4585 (package-with-python2 python-setuptools-scm))
4586
b74270ee
RW
4587(define-public python-pathpy
4588 (package
4589 (name "python-pathpy")
4590 (version "8.1.1")
4591 (source
4592 (origin
4593 (method url-fetch)
4594 (uri (string-append "https://pypi.python.org/packages/source/p/"
4595 "path.py/path.py-" version ".tar.gz"))
4596 (sha256
4597 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4598 (outputs '("out" "doc"))
b74270ee
RW
4599 (build-system python-build-system)
4600 (propagated-inputs
4601 `(("python-appdirs" ,python-appdirs)))
4602 (native-inputs
f3b98f4f 4603 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4604 ("python-sphinx" ,python-sphinx)
4605 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4606 ("python-pytest" ,python-pytest)
4607 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4608 (arguments
4609 `(#:phases
4610 (modify-phases %standard-phases
4611 (add-after 'build 'build-doc
4612 (lambda _
4613 (setenv "LANG" "en_US.UTF-8")
4614 (zero? (system* "python" "setup.py" "build_sphinx"))))
4615 (add-after 'install 'install-doc
4616 (lambda* (#:key outputs #:allow-other-keys)
4617 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4618 (doc (string-append data "/doc/" ,name "-" ,version))
4619 (html (string-append doc "/html")))
4620 (mkdir-p html)
4621 (for-each (lambda (file)
4622 (copy-file file (string-append doc "/" file)))
4623 '("README.rst" "CHANGES.rst"))
4624 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4625 (home-page "http://github.com/jaraco/path.py")
4626 (synopsis "Python module wrapper for built-in os.path")
4627 (description
4628 "@code{path.py} implements path objects as first-class entities, allowing
4629common operations on files to be invoked on those path objects directly.")
4630 (license license:expat)))
4631
4632(define-public python2-pathpy
4633 (package-with-python2 python-pathpy))
4634
0d34e01b
RW
4635(define-public python-pickleshare
4636 (package
4637 (name "python-pickleshare")
4638 (version "0.5")
4639 (source
4640 (origin
4641 (method url-fetch)
4642 (uri (string-append "https://pypi.python.org/packages/source/p/"
4643 "pickleshare/pickleshare-" version ".tar.gz"))
4644 (sha256
4645 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4646 (build-system python-build-system)
4647 (propagated-inputs
4648 `(("python-pathpy" ,python-pathpy)))
4649 (home-page "https://github.com/vivainio/pickleshare")
4650 (synopsis "Tiny key value database with concurrency support")
4651 (description
4652 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4653Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4654shelve, many processes can access the database simultaneously. Changing a
4655value in database is immediately visible to other processes accessing the same
4656database. Concurrency is possible because the values are stored in separate
4657files. Hence the “database” is a directory where all files are governed by
4658PickleShare.")
4659 (license license:expat)))
4660
4661(define-public python2-pickleshare
4662 (package-with-python2 python-pickleshare))
4663
cd6e5189
RW
4664(define-public python-simplegeneric
4665 (package
4666 (name "python-simplegeneric")
4667 (version "0.8.1")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (string-append "https://pypi.python.org/packages/source/s/"
4672 "simplegeneric/simplegeneric-" version ".zip"))
4673 (sha256
4674 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4675 (build-system python-build-system)
4676 (native-inputs
f3b98f4f 4677 `(("unzip" ,unzip)))
cd6e5189
RW
4678 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4679 (synopsis "Python module for simple generic functions")
4680 (description
4681 "The simplegeneric module lets you define simple single-dispatch generic
4682functions, akin to Python’s built-in generic functions like @code{len()},
4683@code{iter()} and so on. However, instead of using specially-named methods,
4684these generic functions use simple lookup tables, akin to those used by
4685e.g. @code{pickle.dump()} and other generic functions found in the Python
4686standard library.")
3f641af0 4687 (license license:zpl2.1)))
cd6e5189
RW
4688
4689(define-public python2-simplegeneric
4690 (package-with-python2 python-simplegeneric))
4691
ddc7d8ed 4692(define-public python-ipython-genutils
c4abbac3 4693 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4694 (package
4695 (name "python-ipython-genutils")
4696 (version "0.1.0")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (string-append "https://pypi.python.org/packages/source/i/"
4701 "ipython_genutils/ipython_genutils-"
4702 version ".tar.gz"))
4703 (sha256
4704 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4705 (build-system python-build-system)
4706 (arguments `(#:tests? #f)) ; no tests
4707 (home-page "http://ipython.org")
4708 (synopsis "Vestigial utilities from IPython")
4709 (description
c4abbac3
HG
4710 "This package provides retired utilities from IPython. No packages
4711outside IPython/Jupyter should depend on it.
4712
4713This package shouldn't exist. It contains some common utilities shared by
4714Jupyter and IPython projects during The Big Split. As soon as possible, those
4715packages will remove their dependency on this, and this package will go
4716away.")
3f641af0 4717 (license license:bsd-3)))
ddc7d8ed
RW
4718
4719(define-public python2-ipython-genutils
4720 (package-with-python2 python-ipython-genutils))
4721
2b10eb48
RW
4722(define-public python-traitlets
4723 (package
4724 (name "python-traitlets")
a5ba1481 4725 (version "4.2.0")
2b10eb48
RW
4726 (source
4727 (origin
4728 (method url-fetch)
cc0c4fde 4729 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4730 (sha256
4731 (base32
a5ba1481 4732 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4733 (build-system python-build-system)
4734 (arguments
4735 `(#:phases
4736 (modify-phases %standard-phases
4737 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4738 (propagated-inputs
4739 `(("python-ipython-genutils" ,python-ipython-genutils)
4740 ("python-decorator" ,python-decorator)))
4741 (native-inputs
cc0c4fde
EF
4742 `(("python-mock" ,python-mock)
4743 ("python-nose" ,python-nose)))
2b10eb48
RW
4744 (home-page "http://ipython.org")
4745 (synopsis "Configuration system for Python applications")
4746 (description
4747 "Traitlets is a framework that lets Python classes have attributes with
4748type checking, dynamically calculated default values, and ‘on change’
4749callbacks. The package also includes a mechanism to use traitlets for
4750configuration, loading values from files or from command line arguments. This
4751is a distinct layer on top of traitlets, so you can use traitlets in your code
4752without using the configuration machinery.")
3f641af0 4753 (license license:bsd-3)))
2b10eb48
RW
4754
4755(define-public python2-traitlets
4756 (package-with-python2 python-traitlets))
4757
4263b06f
RW
4758(define-public python-jupyter-core
4759 (package
4760 (name "python-jupyter-core")
45cc957c 4761 (version "4.2.1")
4263b06f
RW
4762 (source
4763 (origin
4764 (method url-fetch)
4765 (uri (string-append (pypi-uri "jupyter_core" version)))
4766 (sha256
4767 (base32
45cc957c 4768 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
4769 (build-system python-build-system)
4770 ;; FIXME: not sure how to run the tests
4771 (arguments `(#:tests? #f))
4772 (propagated-inputs
4773 `(("python-traitlets" ,python-traitlets)))
4774 (home-page "http://jupyter.org/")
4775 (synopsis "Jupyter base package")
4776 (description
4777 "Jupyter core is the base package on which Jupyter projects rely.")
4778 (license license:bsd-3)))
4779
4780(define-public python2-jupyter-core
4781 (package-with-python2 python-jupyter-core))
4782
9ff01f2d
RW
4783(define-public python-jupyter-client
4784 (package
4785 (name "python-jupyter-client")
4786 (version "4.4.0")
4787 (source
4788 (origin
4789 (method url-fetch)
4790 (uri (pypi-uri "jupyter_client" version))
4791 (sha256
4792 (base32
4793 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4794 (build-system python-build-system)
4795 ;; Tests fail because of missing native python kernel which I assume is
4796 ;; provided by the ipython package, which we cannot use because it would
4797 ;; cause a dependency cycle.
4798 (arguments `(#:tests? #f))
4799 (propagated-inputs
4800 `(("python-pyzmq" ,python-pyzmq)
4801 ("python-traitlets" ,python-traitlets)
4802 ("python-jupyter-core" ,python-jupyter-core)))
4803 (home-page "http://jupyter.org/")
4804 (synopsis "Jupyter protocol implementation and client libraries")
4805 (description
4806 "The @code{jupyter_client} package contains the reference implementation
4807of the Jupyter protocol. It also provides client and kernel management APIs
4808for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4809installing @code{kernelspec}s for use with Jupyter frontends.")
4810 (license license:bsd-3)))
4811
4812(define-public python2-jupyter-client
4813 (package-with-python2 python-jupyter-client))
4814
ab526102
RW
4815(define-public python-ipykernel
4816 (package
4817 (name "python-ipykernel")
f165648e 4818 (version "4.5.2")
ab526102
RW
4819 (source
4820 (origin
4821 (method url-fetch)
4822 (uri (pypi-uri "ipykernel" version))
4823 (sha256
f165648e 4824 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
4825 (build-system python-build-system)
4826 ;; The tests load a submodule of IPython. However, IPython itself depends
4827 ;; on ipykernel.
4828 (arguments `(#:tests? #f))
4829 (propagated-inputs
4830 ;; imported at runtime during connect
4831 `(("python-jupyter-client" ,python-jupyter-client)))
4832 (home-page "http://ipython.org")
4833 (synopsis "IPython Kernel for Jupyter")
4834 (description
4835 "This package provides the IPython kernel for Jupyter.")
4836 (license license:bsd-3)))
4837
4838(define-public python2-ipykernel
4839 (package-with-python2 python-ipykernel))
4840
5ff6effc
RW
4841(define-public python-testpath
4842 (package
4843 (name "python-testpath")
4844 (version "0.2")
4845 (source
4846 (origin
4847 (method url-fetch)
4848 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4849 version ".tar.gz"))
4850 (file-name (string-append name "-" version ".tar.gz"))
4851 (sha256
4852 (base32
4853 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4854 (build-system python-build-system)
4855 (arguments
4856 `(#:tests? #f ; this package does not even have a setup.py
4857 #:phases
4858 (modify-phases %standard-phases
4859 (delete 'install)
4860 (replace 'build
4861 (lambda* (#:key inputs outputs #:allow-other-keys)
4862 (let ((dir (string-append
4863 (assoc-ref outputs "out")
4864 "/lib/python"
4865 (string-take (string-take-right
4866 (assoc-ref inputs "python") 5) 3)
4867 "/site-packages/testpath")))
4868 (mkdir-p dir)
4869 (copy-recursively "testpath" dir))
4870 #t)))))
4871 (home-page "https://github.com/takluyver/testpath")
4872 (synopsis "Test utilities for code working with files and commands")
4873 (description
4874 "Testpath is a collection of utilities for Python code working with files
4875and commands. It contains functions to check things on the filesystem, and
4876tools for mocking system commands and recording calls to those.")
4877 (license license:expat)))
4878
4879(define-public python2-testpath
4880 (package-with-python2 python-testpath))
4881
ae1ab9fe
FB
4882(define-public python-ipython
4883 (package
4884 (name "python-ipython")
4dbc8ec4 4885 (version "4.0.3")
ae1ab9fe
FB
4886 (source
4887 (origin
fceac880 4888 (method url-fetch)
accd5f99 4889 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4890 (sha256
4dbc8ec4 4891 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4892 (build-system python-build-system)
4893 (outputs '("out" "doc"))
3a0b1b9a
FB
4894 (propagated-inputs
4895 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4896 ("python-terminado" ,python-terminado)
ae1ab9fe 4897 ("python-matplotlib" ,python-matplotlib)
5d26e542 4898 ("python-numpy" ,python-numpy)
ae1ab9fe 4899 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4900 ("python-jinja2" ,python-jinja2)
4901 ("python-mistune" ,python-mistune)
accd5f99
RW
4902 ("python-pexpect" ,python-pexpect)
4903 ("python-pickleshare" ,python-pickleshare)
4904 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4905 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4906 ("python-traitlets" ,python-traitlets)
4907 ("python-ipykernel" ,python-ipykernel)
4908 ("python-pygments" ,python-pygments)))
4909 (inputs
4910 `(("readline" ,readline)
4911 ("which" ,which)))
ae1ab9fe
FB
4912 (native-inputs
4913 `(("pkg-config" ,pkg-config)
accd5f99
RW
4914 ("python-requests" ,python-requests) ;; for tests
4915 ("python-testpath" ,python-testpath)
4916 ("python-nose" ,python-nose)
ae1ab9fe
FB
4917 ("python-sphinx" ,python-sphinx)
4918 ("texlive" ,texlive)
f3b98f4f 4919 ("texinfo" ,texinfo)))
ae1ab9fe 4920 (arguments
89b5c60e 4921 `(#:phases
3a0b1b9a
FB
4922 (modify-phases %standard-phases
4923 (add-after
4924 'install 'install-doc
4925 (lambda* (#:key inputs outputs #:allow-other-keys)
4926 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4927 (doc (string-append data "/doc/" ,name "-" ,version))
4928 (html (string-append doc "/html"))
4929 (man1 (string-append data "/man/man1"))
4930 (info (string-append data "/info"))
4931 (examples (string-append doc "/examples")))
afd3d931 4932 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4933 ;; Make installed package available for running the tests
4934 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4935 (with-directory-excursion "docs"
accd5f99
RW
4936 ;; FIXME: pdf fails to build
4937 ;;(system* "make" "pdf" "PAPER=a4")
4938 (system* "make" "html")
3a0b1b9a
FB
4939 (system* "make" "info"))
4940 (copy-recursively "docs/man" man1)
4941 (copy-recursively "examples" examples)
accd5f99 4942 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4943 ;; (copy-file "docs/build/latex/ipython.pdf"
4944 ;; (string-append doc "/ipython.pdf"))
4945 (mkdir-p info)
4946 (copy-file "docs/build/texinfo/ipython.info"
4947 (string-append info "/ipython.info"))
4948 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4949 ;; Tests can only be run after the library has been installed and not
4950 ;; within the source directory.
4951 (delete 'check)
4952 (add-after
4953 'install 'check
eee5cd04 4954 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4955 (if tests?
4956 (with-directory-excursion "/tmp"
eee5cd04
HG
4957 ;; Make installed package available for running the tests
4958 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4959 (setenv "HOME" "/tmp/") ;; required by a test
4960 (zero? (system* (string-append (assoc-ref outputs "out")
4961 "/bin/iptest"))))
4962 #t)))
4963 (add-before
4964 'install 'fix-tests
4965 (lambda* (#:key inputs #:allow-other-keys)
4966 (substitute* "./IPython/utils/_process_posix.py"
4967 (("/usr/bin/env', 'which") (which "which")))
4968 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4969 (("#!/usr/bin/env python")
4970 (string-append "#!" (which "python"))))
4971 ;; Disable 1 failing test
4972 (substitute* "./IPython/core/tests/test_magic.py"
4973 (("def test_dirops\\(\\):" all)
4974 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4975 (home-page "http://ipython.org")
4976 (synopsis "IPython is a tool for interactive computing in Python")
4977 (description
4978 "IPython provides a rich architecture for interactive computing with:
4979Powerful interactive shells, a browser-based notebook, support for interactive
4980data visualization, embeddable interpreters and tools for parallel
4981computing.")
135ba811
EF
4982 (license license:bsd-3)
4983 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4984
4985(define-public python2-ipython
135ba811 4986 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4987 (package
4988 (inherit ipython)
4989 ;; FIXME: some tests are failing
4990 (arguments
4991 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4992 ;; FIXME: add pyreadline once available.
e62600fe 4993 (native-inputs
135ba811 4994 `(("python2-mock" ,python2-mock)
77a6932a 4995 ,@(package-native-inputs ipython))))))
03411993
AE
4996
4997(define-public python-isodate
4998 (package
4999 (name "python-isodate")
b6785c2e 5000 (version "0.5.4")
03411993
AE
5001 (source
5002 (origin
5003 (method url-fetch)
b6785c2e 5004 (uri (pypi-uri "isodate" version))
03411993
AE
5005 (sha256
5006 (base32
b6785c2e 5007 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5008 (build-system python-build-system)
03411993
AE
5009 (home-page
5010 "http://cheeseshop.python.org/pypi/isodate")
5011 (synopsis
5012 "Python date parser and formatter")
5013 (description
5014 "Python-isodate is a python module for parsing and formatting
5015ISO 8601 dates, time and duration.")
3f641af0 5016 (license license:bsd-3)))
03411993
AE
5017
5018(define-public python2-isodate
5019 (package-with-python2 python-isodate))
673ab897
AE
5020
5021(define-public python-html5lib
5022 (package
5023 (name "python-html5lib")
a14061aa 5024 (version "1.0b10")
673ab897
AE
5025 (source
5026 (origin
5027 (method url-fetch)
fee04c19 5028 (uri (pypi-uri "html5lib" version))
673ab897
AE
5029 (sha256
5030 (base32
a14061aa 5031 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5032 (build-system python-build-system)
3dd75476 5033 (propagated-inputs
4eb6ed28
MB
5034 `(("python-six" ,python-six)
5035 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5036 (arguments
5037 `(#:test-target "check"))
5038 (home-page
5039 "https://github.com/html5lib/html5lib-python")
5040 (synopsis
5041 "Python HTML parser based on the WHATWG HTML specifcation")
5042 (description
5043 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5044and written in Python.")
bd3fa666 5045 (license license:expat)))
673ab897
AE
5046
5047(define-public python2-html5lib
5048 (package-with-python2 python-html5lib))
e99f4211 5049
8ee62c97
RW
5050;; Needed for python-bleach, a dependency of python-notebook
5051(define-public python-html5lib-0.9
5052 (package
5053 (inherit python-html5lib)
5054 (version "0.999")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "html5lib" version))
5059 (sha256
5060 (base32
5061 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5062
5063(define-public python2-html5lib-0.9
5064 (package-with-python2 python-html5lib-0.9))
5065
adbca19e
MB
5066(define-public python-webencodings
5067 (package
5068 (name "python-webencodings")
5069 (version "0.5")
5070 (source (origin
5071 (method url-fetch)
5072 (uri (pypi-uri "webencodings" version))
5073 (sha256
5074 (base32
5075 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5076 (build-system python-build-system)
5077 (arguments
5078 '(#:phases
5079 (modify-phases %standard-phases
5080 (replace 'check
5081 (lambda _
5082 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5083 (native-inputs
5084 `(("python-pytest" ,python-pytest)))
5085 (home-page "https://github.com/SimonSapin/python-webencodings")
5086 (synopsis "Character encoding aliases for legacy web content")
5087 (description
5088 "In order to be compatible with legacy web content when interpreting
5089something like @code{Content-Type: text/html; charset=latin1}, tools need
5090to use a particular set of aliases for encoding labels as well as some
5091overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5092the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5093or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5094The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5095defines all such details so that implementations do not have to
5096reverse-engineer each other.
5097
5098This module implements the Encoding standard and has encoding labels and
5099BOM detection, but the actual implementation for encoders and decoders
5100is Python’s.")
5101 (license license:bsd-3)))
5102
5103(define-public python2-webencodings
5104 (package-with-python2 python-webencodings))
5105
e99f4211
MW
5106(define-public python-urwid
5107 (package
5108 (name "python-urwid")
51ff41f6 5109 (version "1.3.1")
e99f4211
MW
5110 (source
5111 (origin
5112 (method url-fetch)
b97c1bfd 5113 (uri (pypi-uri "urwid" version))
e99f4211
MW
5114 (sha256
5115 (base32
51ff41f6 5116 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5117 (build-system python-build-system)
b97c1bfd
LF
5118 (arguments
5119 `(#:phases
5120 (modify-phases %standard-phases
5121 ;; Disable failing test. Bug filed upstream:
5122 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5123 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5124 (add-after 'unpack 'disable-failing-test
5125 (lambda _
5126 (substitute* "urwid/tests/test_event_loops.py"
5127 (("test_remove_watch_file")
5128 "disable_remove_watch_file")))))))
e99f4211
MW
5129 (home-page "http://urwid.org")
5130 (synopsis "Console user interface library for Python")
5131 (description
5132 "Urwid is a curses-based UI/widget library for Python. It includes many
5133features useful for text console applications.")
3f641af0 5134 (license license:lgpl2.1+)))
e99f4211
MW
5135
5136(define-public python2-urwid
5137 (package-with-python2 python-urwid))
d95a56c6 5138
3ef00f56 5139(define-public python2-openid
5140 (package
5141 (name "python2-openid")
5142 (version "2.2.5")
5143 (source
5144 (origin
5145 (method url-fetch)
5146 (uri (pypi-uri "python-openid" version))
5147 (sha256
5148 (base32
5149 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5150 (build-system python-build-system)
5151 (arguments
5152 ;; Python 3 support is in `python3-openid`, a separate package.
5153 `(#:python ,python-2))
5154 (home-page "https://github.com/openid/python-openid")
5155 (synopsis "OpenID support for servers and consumers")
5156 (description "This library provides OpenID authentication for Python, both
5157for clients and servers.")
5158 (license license:asl2.0)))
5159
47d0b292
TS
5160(define-public python-urwidtrees
5161 (package
5162 (name "python-urwidtrees")
37ec4623 5163 (version "1.0.2")
47d0b292
TS
5164 (source
5165 (origin
5166 (method url-fetch)
37ec4623
TS
5167 ;; package author intends on distributing via github rather than pypi:
5168 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5169 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5170 version ".tar.gz"))
5171 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5172 (sha256
5173 (base32
37ec4623 5174 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5175 (build-system python-build-system)
5176 (arguments
5177 '(#:tests? #f)) ; no tests
f22efa01 5178 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5179 (home-page "https://github.com/pazz/urwidtrees")
5180 (synopsis "Tree widgets for urwid")
5181 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5182toolkit. Use it to build trees of widgets.")
3f641af0 5183 (license license:gpl3+)))
47d0b292
TS
5184
5185(define-public python2-urwidtrees
5186 (package-with-python2 python-urwidtrees))
5187
d95a56c6
PAR
5188(define-public python-dbus
5189 (package
5190 (name "python-dbus")
5191 (version "1.2.0")
5192 (source
5193 (origin
5194 (method url-fetch)
5195 (uri (string-append
5cc3096c 5196 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5197 version ".tar.gz"))
5198 (sha256
5199 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5200 (build-system gnu-build-system)
6717c879
SB
5201 (arguments
5202 '(#:phases
5203 (modify-phases %standard-phases
5204 (add-before
5205 'check 'pre-check
5206 (lambda _
5207 ;; XXX: For the missing '/etc/machine-id'.
5208 (substitute* "test/run-test.sh"
5209 (("DBUS_FATAL_WARNINGS=1")
5210 "DBUS_FATAL_WARNINGS=0"))
5211 #t)))))
d95a56c6
PAR
5212 (native-inputs
5213 `(("pkg-config" ,pkg-config)))
5214 (inputs
5215 `(("python" ,python)
2e88d113 5216 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5217 (synopsis "Python bindings for D-bus")
5218 (description "python-dbus provides bindings for libdbus, the reference
5219implementation of D-Bus.")
5220 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5221 (license license:expat)))
b52af02b
MW
5222
5223(define-public python2-dbus
5224 (package (inherit python-dbus)
5225 (name "python2-dbus")
5226 (inputs `(("python" ,python-2)
5227 ,@(alist-delete "python"
5228 (package-inputs python-dbus)
5229 equal?)))
5230 ;; FIXME: on Python 2, the test_utf8 fails with:
5231 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5232 (arguments `(#:tests? #f))))
a6ac8332
AE
5233
5234(define-public python-apsw
5235 (package
5236 (name "python-apsw")
917708c2 5237 (version "3.9.2-r1")
a6ac8332
AE
5238 (source
5239 (origin
5240 (method url-fetch)
917708c2 5241 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5242 (sha256
5243 (base32
917708c2 5244 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5245 (build-system python-build-system)
5246 (inputs
f3b98f4f 5247 `(("sqlite" ,sqlite)))
a6ac8332
AE
5248 (arguments
5249 `(#:phases
5250 ;; swap check and install phases
5251 (alist-cons-after
5252 'install 'check
5253 (assoc-ref %standard-phases 'check)
5254 (alist-delete
5255 'check
5256 %standard-phases))))
5257 (home-page "https://github.com/rogerbinns/apsw/")
5258 (synopsis "Another Python SQLite Wrapper")
5259 (description "APSW is a Python wrapper for the SQLite
5260embedded relational database engine. In contrast to other wrappers such as
5261pysqlite it focuses on being a minimal layer over SQLite attempting just to
5262translate the complete SQLite API into Python.")
abde5f37 5263 (license license:zlib)))
a6ac8332
AE
5264
5265(define-public python2-apsw
5266 (package-with-python2 python-apsw))
26b307e2
AE
5267
5268(define-public python-lxml
5269 (package
5270 (name "python-lxml")
d58a3203 5271 (version "3.6.0")
26b307e2
AE
5272 (source
5273 (origin
5274 (method url-fetch)
97bbc480 5275 (uri (pypi-uri "lxml" version))
26b307e2 5276 (sha256
d58a3203
EF
5277 (base32
5278 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5279 (build-system python-build-system)
5280 (inputs
5281 `(("libxml2" ,libxml2)
f3b98f4f 5282 ("libxslt" ,libxslt)))
26b307e2
AE
5283 (home-page "http://lxml.de/")
5284 (synopsis
5285 "Python XML processing library")
5286 (description
5287 "The lxml XML toolkit is a Pythonic binding for the C libraries
5288libxml2 and libxslt.")
3f641af0 5289 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5290
5291(define-public python2-lxml
5292 (package-with-python2 python-lxml))
4ed20663 5293
b32a1e47
CAW
5294;; beautifulsoup4 has a totally different namespace than 3.x,
5295;; and pypi seems to put it under its own name, so I guess we should too
5296(define-public python-beautifulsoup4
5297 (package
5298 (name "python-beautifulsoup4")
67fd4a12 5299 (version "4.5.1")
b32a1e47
CAW
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "beautifulsoup4" version))
5304 (sha256
5305 (base32
67fd4a12 5306 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5307 (build-system python-build-system)
5f37f0b6
LF
5308 (arguments
5309 `(#:phases
5310 (modify-phases %standard-phases
5311 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5312 ;; must use this conversion script when building with Python 3. The
5313 ;; conversion script also runs the tests.
5314 ;; For more information, see the file 'convert-py3k' in the source
5315 ;; distribution.
5316 (replace 'check
5317 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5318 (home-page
5319 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5320 (synopsis
5321 "Python screen-scraping library")
5322 (description
5323 "Beautiful Soup is a Python library designed for rapidly setting up
5324screen-scraping projects. It offers Pythonic idioms for navigating,
5325searching, and modifying a parse tree, providing a toolkit for
5326dissecting a document and extracting what you need. It automatically
5327converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5328 (license license:expat)))
b32a1e47
CAW
5329
5330(define-public python2-beautifulsoup4
5331 (package
5332 (inherit (package-with-python2
5333 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5334 (arguments `(#:python ,python-2))))
b32a1e47 5335
092e86f5
AE
5336(define-public python2-cssutils
5337 (package
5338 (name "python2-cssutils")
58d1d816 5339 (version "1.0.1")
092e86f5
AE
5340 (source
5341 (origin
5342 (method url-fetch)
58d1d816 5343 (uri (pypi-uri "cssutils" version))
092e86f5 5344 (sha256
58d1d816
EF
5345 (base32
5346 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5347 (build-system python-build-system)
5348 (native-inputs
5349 `(("python2-mock" ,python2-mock) ; for the tests
5350 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5351 (arguments
5352 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5353 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5354 ))
092e86f5
AE
5355 (home-page "http://cthedot.de/cssutils/")
5356 (synopsis
5357 "CSS Cascading Style Sheets library for Python")
5358 (description
5359 "Cssutils is a Python package for parsing and building CSS
5360Cascading Style Sheets. Currently it provides a DOM only and no rendering
5361options.")
3f641af0 5362 (license license:lgpl3+)))
880ff77c
AE
5363
5364(define-public python-cssselect
5365 (package
5366 (name "python-cssselect")
d5ccd9ab 5367 (version "0.9.2")
880ff77c
AE
5368 (source
5369 (origin
5370 (method url-fetch)
d5ccd9ab 5371 (uri (pypi-uri "cssselect" version))
880ff77c 5372 (sha256
d5ccd9ab
EF
5373 (base32
5374 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5375 (build-system python-build-system)
880ff77c
AE
5376 (arguments
5377 ;; tests fail with message
5378 ;; AttributeError: 'module' object has no attribute 'tests'
5379 `(#:tests? #f))
5380 (home-page
5381 "https://pythonhosted.org/cssselect/")
5382 (synopsis
5383 "CSS3 selector parser and translator to XPath 1.0")
5384 (description
5385 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5386them to XPath 1.0 expressions. Such expressions can be used in lxml or
5387another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5388 (license license:bsd-3)))
880ff77c
AE
5389
5390(define-public python2-cssselect
5391 (package-with-python2 python-cssselect))
60357f99 5392
03702173 5393(define-public python-openid-cla
5394 (package
5395 (name "python-openid-cla")
5396 (version "1.2")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "python-openid-cla" version))
5401 (sha256
5402 (base32
5403 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5404 (build-system python-build-system)
5405 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5406 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5407 (description "@code{openid-cla} is an implementation of the OpenID
5408contributor license agreement extension for python-openid.")
5409 (license license:bsd-3)))
5410
5411(define-public python2-openid-cla
5412 (package-with-python2 python-openid-cla))
5413
a0e41de4 5414(define-public python-openid-teams
5415 (package
5416 (name "python-openid-teams")
5417 (version "1.1")
5418 (source
5419 (origin
5420 (method url-fetch)
5421 (uri (pypi-uri "python-openid-teams" version))
5422 (sha256
5423 (base32
5424 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5425 (build-system python-build-system)
5426 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5427 (synopsis "Implementation of the OpenID teams extension for python-openid")
5428 (description
5429 "@code{openid-teams} is an implementation of the OpenID
5430teams extension for python-openid.")
5431 (license license:bsd-3)))
5432
5433(define-public python2-openid-teams
5434 (package-with-python2 python-openid-teams))
5435
60357f99
AE
5436(define-public python-netifaces
5437 (package
5438 (name "python-netifaces")
5439 (version "0.10.4")
5440 (source
5441 (origin
5442 (method url-fetch)
5443 (uri (string-append
5444 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5445 version
5446 ".tar.gz"))
5447 (sha256
5448 (base32
5449 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5450 (build-system python-build-system)
60357f99
AE
5451 (home-page
5452 "https://bitbucket.org/al45tair/netifaces")
5453 (synopsis
5454 "Python module for portable network interface information")
5455 (description
5456 "Netifaces is a Python module providing information on network
5457interfaces in an easy and portable manner.")
5458 (license license:expat)))
5459
5460(define-public python2-netifaces
5461 (package-with-python2 python-netifaces))
92cb152b 5462
32f77c04
RW
5463(define-public python-networkx
5464 (package
5465 (name "python-networkx")
a4d9609c 5466 (version "1.11")
32f77c04
RW
5467 (source
5468 (origin
5469 (method url-fetch)
a4d9609c 5470 (uri (pypi-uri "networkx" version))
32f77c04 5471 (sha256
a4d9609c 5472 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5473 (build-system python-build-system)
5474 ;; python-decorator is needed at runtime
5475 (propagated-inputs
5476 `(("python-decorator" ,python-decorator)))
5477 (native-inputs
f3b98f4f 5478 `(("python-nose" ,python-nose)))
32f77c04
RW
5479 (home-page "http://networkx.github.io/")
5480 (synopsis "Python module for creating and manipulating graphs and networks")
5481 (description
5482 "NetworkX is a Python package for the creation, manipulation, and study
5483of the structure, dynamics, and functions of complex networks.")
3f641af0 5484 (license license:bsd-3)))
32f77c04
RW
5485
5486(define-public python2-networkx
5487 (package-with-python2 python-networkx))
5488
92cb152b
RW
5489(define-public snakemake
5490 (package
5491 (name "snakemake")
5492 (version "3.2.1")
5493 (source
5494 (origin
5495 (method url-fetch)
5496 (uri (string-append
5497 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5498 version ".tar.gz"))
5499 (sha256
5500 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5501 (build-system python-build-system)
92cb152b
RW
5502 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5503 (synopsis "Python-based execution environment for make-like workflows")
5504 (description
5505 "Snakemake aims to reduce the complexity of creating workflows by
5506providing a clean and modern domain specific specification language (DSL) in
5507Python style, together with a fast and comfortable execution environment.")
5508 (license license:expat)))
a1920bc9 5509
35de1fbd
RW
5510(define-public python-seaborn
5511 (package
5512 (name "python-seaborn")
fc899d4f 5513 (version "0.7.0")
35de1fbd
RW
5514 (source
5515 (origin
5516 (method url-fetch)
fc899d4f 5517 (uri (pypi-uri "seaborn" version))
35de1fbd 5518 (sha256
fc899d4f 5519 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5520 (build-system python-build-system)
5521 (propagated-inputs
5522 `(("python-pandas" ,python-pandas)
5523 ("python-matplotlib" ,python-matplotlib)
5524 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5525 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5526 (synopsis "Statistical data visualization")
5527 (description
5528 "Seaborn is a library for making attractive and informative statistical
5529graphics in Python. It is built on top of matplotlib and tightly integrated
5530with the PyData stack, including support for numpy and pandas data structures
5531and statistical routines from scipy and statsmodels.")
3f641af0 5532 (license license:bsd-3)
fc899d4f 5533 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5534
5535(define-public python2-seaborn
fc899d4f
EF
5536 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5537 (package
5538 (inherit base)
5539 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5540 ,@(package-propagated-inputs base))))))
35de1fbd 5541
90fc547f
RW
5542(define-public python-sympy
5543 (package
5544 (name "python-sympy")
5545 (version "0.7.6")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (string-append
5550 "https://github.com/sympy/sympy/releases/download/sympy-"
5551 version "/sympy-" version ".tar.gz"))
5552 (sha256
5553 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5554 (build-system python-build-system)
90fc547f
RW
5555 (home-page "http://www.sympy.org/")
5556 (synopsis "Python library for symbolic mathematics")
5557 (description
5558 "SymPy is a Python library for symbolic mathematics. It aims to become a
5559full-featured computer algebra system (CAS) while keeping the code as simple
5560as possible in order to be comprehensible and easily extensible.")
3f641af0 5561 (license license:bsd-3)))
90fc547f
RW
5562
5563(define-public python2-sympy
5564 (package-with-python2 python-sympy))
5565
e8c9b010
SR
5566(define-public python-q
5567 (package
5568 (name "python-q")
5569 (version "2.6")
5570 (source
5571 (origin
5572 (method url-fetch)
5573 (uri (pypi-uri "q" version))
5574 (sha256
5575 (base32
5576 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5577 (build-system python-build-system)
5578 (home-page "https://github.com/zestyping/q")
5579 (synopsis "Quick-and-dirty debugging output for tired programmers")
5580 (description
5581 "q is a Python module for \"print\" style of debugging Python code. It
5582provides convenient short API for print out of values, tracebacks, and
5583falling into the Python interpreter.")
f210e944 5584 (license license:asl2.0)))
e8c9b010
SR
5585
5586(define-public python2-q
f210e944 5587 (package-with-python2 python-q))
e8c9b010 5588
a1920bc9
FB
5589(define-public python-testlib
5590 (package
5591 (name "python-testlib")
5592 (version "0.6.5")
5593 (source
5594 (origin
5595 (method url-fetch)
5596 (uri (string-append
5597 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5598 version ".zip"))
5599 (sha256
5600 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5601 (build-system python-build-system)
a1920bc9 5602 (native-inputs
632735f2 5603 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5604 (synopsis "Python micro test suite harness")
5605 (description "A micro unittest suite harness for Python.")
5606 (home-page "https://github.com/trentm/testlib")
1cb9c006 5607 (license license:expat)))
a1920bc9
FB
5608
5609(define-public python2-testlib
5610 (package-with-python2 python-testlib))
db62afa5
LC
5611
5612(define-public python2-xlib
5613 (package
5614 (name "python2-xlib")
5615 (version "0.14")
5616 (source (origin
5617 (method url-fetch)
de67e922
LF
5618 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5619 "/" version "/"
db62afa5
LC
5620 "python-xlib-" version ".tar.gz"))
5621 (sha256
5622 (base32
5623 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5624 (build-system python-build-system)
5625 (arguments
5626 `(#:python ,python-2 ;Python 2 only
5627 #:tests? #f)) ;no tests
db62afa5
LC
5628 (home-page "http://python-xlib.sourceforge.net/")
5629 (synopsis "Python X11 client library")
5630 (description
5631 "The Python X Library is intended to be a fully functional X client
5632library for Python programs. It is useful to implement low-level X clients.
5633It is written entirely in Python.")
3f641af0 5634 (license license:gpl2+)))
0234ca06
DT
5635
5636(define-public python-singledispatch
5637 (package
5638 (name "python-singledispatch")
5639 (version "3.4.0.3")
5640 (source
5641 (origin
5642 (method url-fetch)
bdb67d84 5643 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5644 (sha256
5645 (base32
5646 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5647 (build-system python-build-system)
5e1c9d24
HG
5648 (native-inputs
5649 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5650 (home-page
5651 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5652 (synopsis "Backport of singledispatch feature from Python 3.4")
5653 (description
5654 "This library brings functools.singledispatch from Python 3.4 to Python
56552.6-3.3.")
5656 (license license:expat)))
5657
5658(define-public python2-singledispatch
5659 (package-with-python2 python-singledispatch))
feaae484 5660
310d218f
RW
5661(define-public python-tornado
5662 (package
5663 (name "python-tornado")
a724924b 5664 (version "4.3")
310d218f
RW
5665 (source
5666 (origin
5667 (method url-fetch)
a724924b 5668 (uri (pypi-uri "tornado" version))
310d218f 5669 (sha256
a724924b 5670 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5671 (build-system python-build-system)
310d218f 5672 (native-inputs
b455439b 5673 `(("python-certifi" ,python-certifi)))
f22efa01 5674 (propagated-inputs
b455439b 5675 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5676 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5677 (synopsis "Python web framework and asynchronous networking library")
5678 (description
5679 "Tornado is a Python web framework and asynchronous networking library,
5680originally developed at FriendFeed. By using non-blocking network I/O,
5681Tornado can scale to tens of thousands of open connections, making it ideal
5682for long polling, WebSockets, and other applications that require a long-lived
5683connection to each user.")
3f641af0 5684 (license license:asl2.0)
b455439b 5685 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5686
5687(define-public python2-tornado
b455439b 5688 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5689 (package (inherit tornado)
f22efa01 5690 (propagated-inputs
310d218f
RW
5691 `(("python2-backport-ssl-match-hostname"
5692 ,python2-backport-ssl-match-hostname)
b455439b 5693 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5694 ,@(package-propagated-inputs tornado))))))
310d218f 5695
6b59fc10
EF
5696;; the python- version can be removed with python-3.5
5697(define-public python-backports-abc
5698 (package
5699 (name "python-backports-abc")
5700 (version "0.4")
5701 (source
5702 (origin
5703 (method url-fetch)
5704 (uri (pypi-uri "backports_abc" version))
5705 (sha256
5706 (base32
5707 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5708 (build-system python-build-system)
6b59fc10 5709 (home-page "https://github.com/cython/backports_abc")
66e07664 5710 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5711 (description
5712 "Python-backports-abc provides a backport of additions to the
5713'collections.abc' module in Python-3.5.")
3f641af0 5714 (license license:psfl)))
6b59fc10
EF
5715
5716(define-public python2-backports-abc
5717 (package-with-python2 python-backports-abc))
5718
feaae484
SB
5719(define-public python-waf
5720 (package
5721 (name "python-waf")
7dd55dfe 5722 (version "1.9.5")
feaae484
SB
5723 (source (origin
5724 (method url-fetch)
bae67829 5725 (uri (string-append "https://waf.io/"
feaae484
SB
5726 "waf-" version ".tar.bz2"))
5727 (sha256
5728 (base32
7dd55dfe 5729 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5730 (build-system python-build-system)
5731 (arguments
5732 '(#:phases
5733 (modify-phases %standard-phases
5734 (replace 'build
7dd55dfe
EF
5735 (lambda _
5736 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5737 (replace 'check
7dd55dfe
EF
5738 (lambda _
5739 (zero? (system* "python" "waf" "--version"))))
feaae484 5740 (replace 'install
7dd55dfe
EF
5741 (lambda _
5742 (copy-file "waf" %output))))))
5743 (home-page "http://waf.io/")
feaae484
SB
5744 (synopsis "Python-based build system")
5745 (description
5746 "Waf is a Python-based framework for configuring, compiling and installing
5747applications.")
3f641af0 5748 (license license:bsd-3)))
feaae484
SB
5749
5750(define-public python2-waf
5751 (package-with-python2 python-waf))
45203542
RW
5752
5753(define-public python-pyzmq
5754 (package
5755 (name "python-pyzmq")
3655ee76 5756 (version "15.1.0")
45203542
RW
5757 (source
5758 (origin
5759 (method url-fetch)
3655ee76 5760 (uri (pypi-uri "pyzmq" version))
45203542 5761 (sha256
3655ee76 5762 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5763 (build-system python-build-system)
5764 (arguments
5765 `(#:configure-flags
5766 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5767 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5768 ;; --inplace' for 'python setup.py test' to work.
5769 #:tests? #f))
5770 (inputs
5771 `(("zeromq" ,zeromq)))
5772 (native-inputs
5773 `(("pkg-config" ,pkg-config)
f3b98f4f 5774 ("python-nose" ,python-nose)))
45203542
RW
5775 (home-page "http://github.com/zeromq/pyzmq")
5776 (synopsis "Python bindings for 0MQ")
5777 (description
5778 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5779 (license license:bsd-4)))
45203542
RW
5780
5781(define-public python2-pyzmq
5782 (package-with-python2 python-pyzmq))
d889e6c4
CR
5783
5784(define-public python-pep8
5785 (package
5786 (name "python-pep8")
db251311 5787 (version "1.7.0")
d889e6c4
CR
5788 (source
5789 (origin
5790 (method url-fetch)
db251311 5791 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5792 (sha256
5793 (base32
db251311 5794 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5795 (build-system python-build-system)
d889e6c4
CR
5796 (home-page "http://pep8.readthedocs.org/")
5797 (synopsis "Python style guide checker")
5798 (description
5799 "This tools checks Python code against some of the style conventions in
5800PEP 8.")
5801 (license license:expat)))
5802
5803(define-public python2-pep8
5804 (package-with-python2 python-pep8))
e31d7f44
CR
5805
5806(define-public python-pyflakes
5807 (package
5808 (name "python-pyflakes")
2abc3972 5809 (version "1.0.0")
e31d7f44
CR
5810 (source
5811 (origin
5812 (method url-fetch)
2abc3972 5813 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5814 (sha256
5815 (base32
2abc3972 5816 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5817 (build-system python-build-system)
e31d7f44
CR
5818 (home-page
5819 "https://github.com/pyflakes/pyflakes")
5820 (synopsis "Passive checker of Python programs")
5821 (description
5822 "Pyflakes statically checks Python source code for common errors.")
5823 (license license:expat)))
a59e017c 5824
7261d9eb
CR
5825(define-public python2-pyflakes
5826 (package-with-python2 python-pyflakes))
5827
a59e017c
CR
5828(define-public python-mccabe
5829 (package
5830 (name "python-mccabe")
c6ebd40d 5831 (version "0.4.0")
a59e017c
CR
5832 (source
5833 (origin
5834 (method url-fetch)
c6ebd40d 5835 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5836 (sha256
5837 (base32
c6ebd40d 5838 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5839 (build-system python-build-system)
328bb95d 5840 (native-inputs
c6ebd40d 5841 `(("python-pytest" ,python-pytest)
f3b98f4f 5842 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5843 (home-page "https://github.com/flintwork/mccabe")
5844 (synopsis "McCabe checker, plugin for flake8")
5845 (description
5846 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5847complexity of Python source code.")
7362371d 5848 (license license:expat)))
a59e017c
CR
5849
5850(define-public python2-mccabe
5851 (package-with-python2 python-mccabe))
e8df8f47 5852
7477fbb1
CR
5853(define-public python-mccabe-0.2.1
5854 (package (inherit python-mccabe)
5855 (version "0.2.1")
5856 (source
5857 (origin
5858 (method url-fetch)
5859 (uri (pypi-uri "mccabe" version))
5860 (sha256
5861 (base32
f3b98f4f 5862 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5863
5864(define-public python2-mccabe-0.2.1
5865 (package-with-python2 python-mccabe-0.2.1))
5866
e8df8f47
CR
5867;; Flake8 2.4.1 requires an older version of pep8.
5868;; This should be removed ASAP.
5869(define-public python-pep8-1.5.7
5870 (package (inherit python-pep8)
5871 (version "1.5.7")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (string-append
5876 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5877 version
5878 ".tar.gz"))
5879 (sha256
5880 (base32
5881 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5882
5883(define-public python2-pep8-1.5.7
5884 (package-with-python2 python-pep8-1.5.7))
5885
5886;; Flake8 2.4.1 requires an older version of pyflakes.
5887;; This should be removed ASAP.
5888(define-public python-pyflakes-0.8.1
5889 (package (inherit python-pyflakes)
5890 (version "0.8.1")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (string-append
5895 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5896 version
5897 ".tar.gz"))
5898 (sha256
5899 (base32
5900 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5901
5902(define-public python2-pyflakes-0.8.1
7261d9eb 5903 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5904
5905(define-public python-flake8
5906 (package
5907 (name "python-flake8")
43789136 5908 (version "2.5.4")
e8df8f47
CR
5909 (source
5910 (origin
5911 (method url-fetch)
1b995533 5912 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5913 (sha256
5914 (base32
011271c7
HG
5915 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5916 (modules '((guix build utils)))
5917 (snippet
5918 '(begin
5919 ;; Remove pre-compiled .pyc files from source.
5920 (for-each delete-file-recursively
5921 (find-files "." "__pycache__" #:directories? #t))
5922 (for-each delete-file (find-files "." "\\.pyc$"))
5923 #t))))
e8df8f47 5924 (build-system python-build-system)
482d9591 5925 (propagated-inputs
f3b98f4f 5926 `(("python-pep8" ,python-pep8)
43789136 5927 ("python-pyflakes" ,python-pyflakes)
482d9591 5928 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5929 (native-inputs
5930 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5931 ("python-nose" ,python-nose)))
5932 (home-page "https://gitlab.com/pycqa/flake8")
5933 (synopsis
5934 "The modular source code checker: pep8, pyflakes and co")
5935 (description
5936 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5937 (license license:expat)))
5938
5939(define-public python2-flake8
5940 (package-with-python2 python-flake8))
61b9ac53 5941
abf21efc
CR
5942;; This will only be needed by the python-hacking package and will not be
5943;; necessary once python-hacking > 0.10.2 is released.
5944(define-public python-flake8-2.2.4
5945 (package (inherit python-flake8)
482d9591 5946 (propagated-inputs
f3b98f4f 5947 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5948 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5949 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5950 (native-inputs
482d9591 5951 `(("python-mock" ,python-mock)
abf21efc
CR
5952 ("python-nose" ,python-nose)))
5953 (version "2.2.4")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (pypi-uri "flake8" version))
5958 (sha256
5959 (base32
b9c8ccce
HG
5960 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5961 (modules '((guix build utils)))
5962 (snippet
5963 '(begin
5964 ;; Remove pre-compiled .pyc files from source.
5965 (for-each delete-file-recursively
5966 (find-files "." "__pycache__" #:directories? #t))
5967 (for-each delete-file (find-files "." "\\.pyc$"))
5968 #t))))))
abf21efc
CR
5969
5970(define-public python2-flake8-2.2.4
5971 (package-with-python2 python-flake8-2.2.4))
5972
61b9ac53
FB
5973(define-public python-mistune
5974 (package
5975 (name "python-mistune")
5976 (version "0.7")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (string-append
5981 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5982 version
5983 ".tar.gz"))
5984 (sha256
5985 (base32
5986 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5987 (build-system python-build-system)
328bb95d 5988 (native-inputs
f3b98f4f 5989 `(("python-nose" ,python-nose)
61b9ac53
FB
5990 ("python-cython" ,python-cython)))
5991 (home-page "https://github.com/lepture/mistune")
5992 (synopsis "Markdown parser in pure Python")
5993 (description "This package provides a fast markdown parser in pure
5994Python.")
3f641af0 5995 (license license:bsd-3)))
61b9ac53
FB
5996
5997(define-public python2-mistune
5998 (package-with-python2 python-mistune))
6d992d07 5999
b9893908
EE
6000(define-public python-markdown
6001 (package
6002 (name "python-markdown")
791ac6a6 6003 (version "2.6.7")
b9893908
EE
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (pypi-uri "Markdown" version))
6008 (sha256
6009 (base32
791ac6a6 6010 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6011 (build-system python-build-system)
6012 (arguments
6013 `(#:phases
6014 (modify-phases %standard-phases
6015 (replace 'check
6016 (lambda _
6017 (zero? (system* "python" "run-tests.py")))))))
6018 (native-inputs
6019 `(("python-nose" ,python-nose)
6020 ("python-pyyaml" ,python-pyyaml)))
6021 (home-page "https://pythonhosted.org/Markdown/")
6022 (synopsis "Python implementation of Markdown")
6023 (description
6024 "This package provides a Python implementation of John Gruber's
6025Markdown. The library features international input, various Markdown
6026extensions, and several HTML output formats. A command line wrapper
6027markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6028 (license license:bsd-3)))
b9893908
EE
6029
6030(define-public python2-markdown
6031 (package-with-python2 python-markdown))
6032
6d992d07
FB
6033(define-public python-ptyprocess
6034 (package
6035 (name "python-ptyprocess")
6036 (version "0.5")
6037 (source
6038 (origin
6039 (method url-fetch)
6040 (uri (string-append
6041 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6042 version ".tar.gz"))
6043 (sha256
6044 (base32
6045 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6046 (build-system python-build-system)
328bb95d 6047 (native-inputs
f3b98f4f 6048 `(("python-nose" ,python-nose)))
6d992d07
FB
6049 (arguments
6050 `(#:phases
6051 (modify-phases %standard-phases
6052 (replace 'check
6053 (lambda _
6054 (zero? (system* "nosetests")))))))
6055 (home-page "https://github.com/pexpect/ptyprocess")
6056 (synopsis "Run a subprocess in a pseudo terminal")
6057 (description
6058 "This package provides a Python library used to launch a subprocess in a
6059pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6060 (license license:isc)))
6d992d07
FB
6061
6062(define-public python2-ptyprocess
6063 (package-with-python2 python-ptyprocess))
4aadb1df
FB
6064
6065(define-public python-terminado
6066 (package
6067 (name "python-terminado")
783fb0a3 6068 (version "0.6")
4aadb1df
FB
6069 (source
6070 (origin
6071 (method url-fetch)
783fb0a3 6072 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6073 (sha256
6074 (base32
783fb0a3 6075 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6076 (build-system python-build-system)
6077 (propagated-inputs
6078 `(("python-tornado" ,python-tornado)
6079 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6080 (native-inputs
6081 `(("python-nose" ,python-nose)))
4aadb1df
FB
6082 (arguments
6083 `(#:phases
6084 (modify-phases %standard-phases
6085 (replace 'check
6086 (lambda _
6087 (zero? (system* "nosetests")))))))
6088 (home-page "https://github.com/takluyver/terminado")
6089 (synopsis "Terminals served to term.js using Tornado websockets")
6090 (description "This package provides a Tornado websocket backend for the
6091term.js Javascript terminal emulator library.")
3f641af0 6092 (license license:bsd-2)
783fb0a3 6093 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6094
6095(define-public python2-terminado
783fb0a3 6096 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6097 (package (inherit terminado)
783fb0a3
EF
6098 (propagated-inputs
6099 `(("python2-backport-ssl-match-hostname"
6100 ,python2-backport-ssl-match-hostname)
00e10c6e 6101 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6102
789de5e2 6103(define-public python-straight-plugin
6104 (package
6105 (name "python-straight-plugin")
6106 (version "1.4.1")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "straight.plugin" version))
6111 (sha256
6112 (base32
6113 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6114 (build-system python-build-system)
6115 (home-page "https://github.com/ironfroggy/straight.plugin")
6116 (synopsis "Simple namespaced plugin facility")
6117 (description "Straight Plugin provides a type of plugin you can create from
6118almost any existing Python modules, and an easy way for outside developers to
6119add functionality and customization to your projects with their own plugins.")
6120 (license license:expat)))
6121
6122(define-public python2-straight-plugin
6123 (package-with-python2 python-straight-plugin))
6124
d582eaac
SB
6125(define-public python-fonttools
6126 (package
6127 (name "python-fonttools")
6128 (version "2.5")
6129 (source (origin
6130 (method url-fetch)
6131 (uri (string-append
6132 "https://pypi.python.org/packages/source/F/FontTools/"
6133 "fonttools-" version ".tar.gz"))
6134 (sha256
6135 (base32
6136 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6137 (build-system python-build-system)
9e8c6a37
HG
6138 (arguments
6139 '(#:test-target "check"
6140 #:phases
6141 (modify-phases %standard-phases
6142 (add-after 'unpack 'patch-setuppy
6143 ;; Remove the undocumented "extra_path" argument, which adds an
6144 ;; intervening directories between site-packages and the package
6145 ;; directory.
6146 (lambda _
6147 (substitute* "setup.py"
6148 (("^[ \t]*extra_path *= *'FontTools',") ""))
6149 #t)))))
d582eaac
SB
6150 (home-page "http://github.com/behdad/fonttools")
6151 (synopsis "Tools to manipulate font files")
6152 (description
6153 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6154supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6155of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6156also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6157from an XML-based format.")
3f641af0
DC
6158 (license (license:non-copyleft
6159 "file://LICENSE.txt"
6160 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6161
6162(define-public python2-fonttools
6163 (package-with-python2 python-fonttools))
75710da6 6164
5faa5ce4
RW
6165(define-public python-ly
6166 (package
6167 (name "python-ly")
5135354f 6168 (version "0.9.4")
5faa5ce4
RW
6169 (source
6170 (origin
6171 (method url-fetch)
5135354f
RW
6172 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6173 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6174 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6175 (sha256
6176 (base32
5135354f 6177 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6178 (build-system python-build-system)
5faa5ce4
RW
6179 (synopsis "Tool and library for manipulating LilyPond files")
6180 (description "This package provides a Python library to parse, manipulate
6181or create documents in LilyPond format. A command line program ly is also
6182provided that can be used to do various manipulations with LilyPond files.")
6183 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6184 (license license:gpl2+)))
7e7b27d9
CR
6185
6186(define-public python-appdirs
6187 (package
6188 (name "python-appdirs")
6189 (version "1.4.0")
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (string-append
6194 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6195 version
6196 ".tar.gz"))
6197 (sha256
6198 (base32
6199 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6200 (build-system python-build-system)
7e7b27d9
CR
6201 (home-page "http://github.com/ActiveState/appdirs")
6202 (synopsis
6203 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6204 (description
6205 "This module provides a portable way of finding out where user data
6206should be stored on various operating systems.")
6207 (license license:expat)))
6208
6209(define-public python2-appdirs
6210 (package-with-python2 python-appdirs))
89b2e0b0
LF
6211
6212(define-public python-llfuse
6213 (package
6214 (name "python-llfuse")
e36ace36 6215 (version "1.1.1")
89b2e0b0
LF
6216 (source (origin
6217 (method url-fetch)
6218 (uri (string-append
6219 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6220 "llfuse-" version ".tar.bz2"))
6221 (sha256
6222 (base32
e36ace36 6223 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6224 (build-system python-build-system)
6225 (inputs
6226 `(("fuse" ,fuse)
6227 ("attr" ,attr)))
6228 (native-inputs
f3b98f4f 6229 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6230 (synopsis "Python bindings for FUSE")
6231 (description
6232 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6233 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6234 (license license:lgpl2.0+)
cd0569c4 6235 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6236
6237(define-public python2-llfuse
cd0569c4
LF
6238 (package (inherit (package-with-python2
6239 (strip-python2-variant python-llfuse)))
6240 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6241
6242;; For attic-0.16
6243(define-public python-llfuse-0.41
6244 (package (inherit python-llfuse)
229b3661 6245 (version "0.41.1")
cd0569c4
LF
6246 (source (origin
6247 (method url-fetch)
6248 (uri (string-append
6249 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6250 "llfuse-" version ".tar.bz2"))
6251 (sha256
6252 (base32
229b3661 6253 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6254 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6255 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6256 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6257
6258(define-public python-msgpack
6259 (package
6260 (name "python-msgpack")
aed625bd 6261 (version "0.4.8")
641c9871
LF
6262 (source (origin
6263 (method url-fetch)
ae831df4 6264 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6265 (sha256
6266 (base32
aed625bd 6267 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6268 (build-system python-build-system)
641c9871
LF
6269 (synopsis "MessagePack (de)serializer")
6270 (description "MessagePack is a fast, compact binary serialization format,
6271suitable for similar data to JSON. This package provides CPython bindings for
6272reading and writing MessagePack data.")
6273 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6274 (license license:asl2.0)))
bd74be7b
LF
6275
6276(define-public python2-msgpack
f210e944 6277 (package-with-python2 python-msgpack))
641c9871 6278
6e5e39f4
CR
6279(define-public python-netaddr
6280 (package
6281 (name "python-netaddr")
6282 (version "0.7.18")
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (string-append
6287 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6288 version
6289 ".tar.gz"))
6290 (sha256
6291 (base32
6292 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6293 (build-system python-build-system)
6294 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6295 (home-page "https://github.com/drkjam/netaddr/")
6296 (synopsis "Pythonic manipulation of network addresses")
6297 (description
6298 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6299and MAC network addresses.")
3f641af0 6300 (license license:bsd-3)))
6e5e39f4
CR
6301
6302(define-public python2-netaddr
6303 (package-with-python2 python-netaddr))
8c692a52
CR
6304
6305(define-public python-wrapt
6306 (package
6307 (name "python-wrapt")
6308 (version "1.10.5")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (string-append
6313 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6314 version
6315 ".tar.gz"))
6316 (sha256
6317 (base32
6318 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6319 (build-system python-build-system)
6320 (arguments
6321 ;; Tests are not included in the tarball, they are only available in the
6322 ;; git repository.
6323 `(#:tests? #f))
8c692a52
CR
6324 (home-page "https://github.com/GrahamDumpleton/wrapt")
6325 (synopsis "Module for decorators, wrappers and monkey patching")
6326 (description
6327 "The aim of the wrapt module is to provide a transparent object proxy for
6328 Python, which can be used as the basis for the construction of function
6329 wrappers and decorator functions.")
3f641af0 6330 (license license:bsd-2)))
8c692a52
CR
6331
6332(define-public python2-wrapt
6333 (package-with-python2 python-wrapt))
b85c85be
CR
6334
6335(define-public python-iso8601
6336 (package
6337 (name "python-iso8601")
fe84bc9a 6338 (version "0.1.11")
b85c85be
CR
6339 (source
6340 (origin
6341 (method url-fetch)
fe84bc9a 6342 (uri (pypi-uri "iso8601" version))
b85c85be 6343 (sha256
fe84bc9a
EF
6344 (base32
6345 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6346 (build-system python-build-system)
b85c85be
CR
6347 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6348 (synopsis "Module to parse ISO 8601 dates")
6349 (description
6350 "This module parses the most common forms of ISO 8601 date strings (e.g.
6351@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6352 (license license:expat)))
6353
6354(define-public python2-iso8601
6355 (package-with-python2 python-iso8601))
5e412b63
CR
6356
6357(define-public python-monotonic
6358 (package
6359 (name "python-monotonic")
6360 (version "0.3")
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (string-append
6365 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6366 version
6367 ".tar.gz"))
6368 (sha256
6369 (base32
6370 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6371 (build-system python-build-system)
5e412b63
CR
6372 (home-page "https://github.com/atdt/monotonic")
6373 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6374 (description
6375 "This module provides a monotonic() function which returns the value (in
6376fractional seconds) of a clock which never goes backwards.")
3f641af0 6377 (license license:asl2.0)))
5e412b63
CR
6378
6379(define-public python2-monotonic
6380 (package-with-python2 python-monotonic))
de34afac
CR
6381
6382(define-public python-webob
6383 (package
6384 (name "python-webob")
b8834c21 6385 (version "1.5.1")
de34afac
CR
6386 (source
6387 (origin
6388 (method url-fetch)
b8834c21 6389 (uri (pypi-uri "WebOb" version))
de34afac
CR
6390 (sha256
6391 (base32
b8834c21 6392 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6393 (build-system python-build-system)
328bb95d 6394 (native-inputs
f3b98f4f 6395 `(("python-nose" ,python-nose)))
de34afac
CR
6396 (home-page "http://webob.org/")
6397 (synopsis "WSGI request and response object")
6398 (description
6399 "WebOb provides wrappers around the WSGI request environment, and an
6400object to help create WSGI responses.")
6401 (license license:expat)))
6402
6403(define-public python2-webob
6404 (package-with-python2 python-webob))
350ba0a3 6405
02a8a187
BW
6406(define-public python-xlrd
6407 (package
6408 (name "python-xlrd")
c2ad4d70 6409 (version "1.0.0")
02a8a187
BW
6410 (source (origin
6411 (method url-fetch)
e775f48e 6412 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6413 (sha256
6414 (base32
c2ad4d70 6415 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6416 (build-system python-build-system)
6417 (arguments
6418 `(#:phases
6419 (modify-phases %standard-phases
c2ad4d70 6420 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6421 ;; run tests instead for now.
6422 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6423 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6424 (home-page "http://www.python-excel.org/")
6425 (synopsis "Library for extracting data from Excel files")
6426 (description "This packages provides a library to extract data from
c598e35c 6427spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6428@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6429Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6430 (license license:bsd-3)))
02a8a187
BW
6431
6432(define-public python2-xlrd
6433 (package-with-python2 python-xlrd))
6434
350ba0a3
CR
6435(define-public python-prettytable
6436 (package
6437 (name "python-prettytable")
6438 (version "0.7.2")
6439 (source
6440 (origin
6441 (method url-fetch)
6442 (uri (string-append
6443 "https://pypi.python.org/packages/source/P/PrettyTable/"
6444 "prettytable-" version ".tar.bz2"))
6445 (sha256
6446 (base32
6447 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6448 (build-system python-build-system)
350ba0a3
CR
6449 (home-page "http://code.google.com/p/prettytable/")
6450 (synopsis "Display tabular data in an ASCII table format")
6451 (description
6452 "A library designed to represent tabular data in visually appealing ASCII
6453tables. PrettyTable allows for selection of which columns are to be printed,
6454independent alignment of columns (left or right justified or centred) and
6455printing of sub-tables by specifying a row range.")
3f641af0 6456 (license license:bsd-3)))
350ba0a3
CR
6457
6458(define-public python2-prettytable
6459 (package-with-python2 python-prettytable))
7a8ac75a 6460
9f8ee3fe
RW
6461(define-public python-tables
6462 (package
6463 (name "python-tables")
6464 (version "3.2.2")
6465 (source
6466 (origin
6467 (method url-fetch)
6468 (uri (pypi-uri "tables" version))
6469 (sha256
6470 (base32
bac23672
HG
6471 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6472 (modules '((guix build utils)))
6473 (snippet
6474 '(begin
6475 ;; Remove pre-compiled .pyc files from source.
6476 (for-each delete-file-recursively
6477 (find-files "." "__pycache__" #:directories? #t))
6478 (for-each delete-file (find-files "." "\\.pyc$"))
6479 #t))))
9f8ee3fe
RW
6480 (build-system python-build-system)
6481 (arguments
6482 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6483 ;; or "check", so we must override the build and check phases.
6484 #:phases
6485 (modify-phases %standard-phases
6486 (add-after 'unpack 'use-gcc
6487 (lambda _
6488 (substitute* "setup.py"
6489 (("compiler = new_compiler\\(\\)" line)
6490 (string-append line
6491 "\ncompiler.set_executables(compiler='gcc',"
6492 "compiler_so='gcc',"
6493 "linker_exe='gcc',"
6494 "linker_so='gcc -shared')")))
6495 #t))
6496 (replace 'build
6497 (lambda* (#:key inputs #:allow-other-keys)
6498 (zero? (system* "python" "setup.py" "build"
6499 (string-append "--hdf5="
6500 (assoc-ref inputs "hdf5"))))))
6501 (replace 'check
6502 (lambda* (#:key inputs #:allow-other-keys)
6503 (zero? (system* "python" "setup.py" "check"
6504 (string-append "--hdf5="
6505 (assoc-ref inputs "hdf5")))))))))
6506 (propagated-inputs
6507 `(("python-numexpr" ,python-numexpr)
6508 ("python-numpy" ,python-numpy)))
6509 (native-inputs
f3b98f4f 6510 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6511 ("pkg-config" ,pkg-config)))
6512 (inputs
6513 `(("hdf5" ,hdf5)
6514 ("bzip2" ,bzip2)
6515 ("zlib" ,zlib)))
6516 (home-page "http://www.pytables.org/")
6517 (synopsis "Hierarchical datasets for Python")
6518 (description "PyTables is a package for managing hierarchical datasets and
6519designed to efficently cope with extremely large amounts of data.")
3f641af0 6520 (license license:bsd-3)))
9f8ee3fe
RW
6521
6522(define-public python2-tables
6523 (package-with-python2 python-tables))
6524
7a8ac75a
RW
6525(define-public python-pyasn1
6526 (package
6527 (name "python-pyasn1")
caa0edb3 6528 (version "0.1.9")
7a8ac75a
RW
6529 (source
6530 (origin
6531 (method url-fetch)
caa0edb3 6532 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6533 (sha256
6534 (base32
caa0edb3 6535 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6536 (build-system python-build-system)
6537 (home-page "http://pyasn1.sourceforge.net/")
6538 (synopsis "ASN.1 types and codecs")
6539 (description
6540 "This is an implementation of ASN.1 types and codecs in Python. It is
6541suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6542 (license license:bsd-2)))
7a8ac75a
RW
6543
6544(define-public python2-pyasn1
6545 (package-with-python2 python-pyasn1))
9a49a535 6546
5988c299
EF
6547(define-public python-pyasn1-modules
6548 (package
6549 (name "python-pyasn1-modules")
6550 (version "0.0.8")
6551 (source
6552 (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "pyasn1-modules" version))
6555 (sha256
6556 (base32
6557 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6558 (build-system python-build-system)
5988c299
EF
6559 (propagated-inputs
6560 `(("python-pyasn1" ,python-pyasn1)))
6561 (home-page "http://sourceforge.net/projects/pyasn1/")
6562 (synopsis "ASN.1 codec implementations")
6563 (description
6564 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6565implementations of ASN.1-based codecs and protocols.")
3f641af0 6566 (license license:bsd-3)))
5988c299
EF
6567
6568(define-public python2-pyasn1-modules
6569 (package-with-python2 python-pyasn1-modules))
6570
520af157 6571(define-public python-ipaddress
9a49a535 6572 (package
520af157
DC
6573 (name "python-ipaddress")
6574 (version "1.0.16")
6575 (source (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "ipaddress" version))
6578 (sha256
6579 (base32
6580 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6581 (build-system python-build-system)
9a49a535
RW
6582 (home-page "https://github.com/phihag/ipaddress")
6583 (synopsis "IP address manipulation library")
6584 (description
520af157
DC
6585 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6586 in Python. This library is used to create, poke at, and manipulate IPv4 and
6587 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6588 module to older versions of Python.")
f210e944 6589 (license license:psfl)))
520af157
DC
6590
6591(define-public python2-ipaddress
f210e944 6592 (package-with-python2 python-ipaddress))
3f00e078 6593
4a238186
HG
6594(define-public python2-ipaddr
6595 (package
6596 (name "python2-ipaddr")
6597 (version "2.1.11")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "ipaddr" version))
6602 (sha256
6603 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6604 (build-system python-build-system)
6605 (arguments
6606 `(#:python ,python-2 ;version 2 only
6607 #:phases
6608 (modify-phases %standard-phases
6609 (replace 'check
6610 (lambda* _
6611 (zero? (system* "python" "ipaddr_test.py")))))))
6612 (home-page "https://github.com/google/ipaddr-py")
6613 (synopsis "IP address manipulation library")
6614 (description
6615 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6616IPv6 addresses and networks.
6617
6618For new implementations you may prefer to use the standard module
6619@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6620versions of Python.")
3f641af0 6621 (license license:asl2.0)))
4a238186 6622
3f00e078
RW
6623(define-public python-idna
6624 (package
6625 (name "python-idna")
6626 (version "2.0")
6627 (source
6628 (origin
6629 (method url-fetch)
6630 (uri (string-append "https://pypi.python.org/packages/source/i/"
6631 "idna/idna-" version ".tar.gz"))
6632 (sha256
6633 (base32
6634 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6635 (build-system python-build-system)
3f00e078
RW
6636 (home-page "https://github.com/kjd/idna")
6637 (synopsis "Internationalized domain names in applications")
6638 (description
6639 "This is a library to support the Internationalised Domain Names in
6640Applications (IDNA) protocol as specified in RFC 5891. This version of the
6641protocol is often referred to as “IDNA2008” and can produce different results
6642from the earlier standard from 2003. The library is also intended to act as a
6643suitable drop-in replacement for the “encodings.idna” module that comes with
6644the Python standard library but currently only supports the older 2003
6645specification.")
3f641af0 6646 (license license:bsd-4)))
3f00e078
RW
6647
6648(define-public python2-idna
6649 (package-with-python2 python-idna))
36ebf972
RW
6650
6651(define-public python-pretend
6652 (package
6653 (name "python-pretend")
6654 (version "1.0.8")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (string-append "https://pypi.python.org/packages/source/p/"
6659 "pretend/pretend-" version ".tar.gz"))
6660 (sha256
6661 (base32
6662 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6663 (build-system python-build-system)
36ebf972
RW
6664 (home-page "https://github.com/alex/pretend")
6665 (synopsis "Library for stubbing in Python")
6666 (description
6667 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6668technique for writing tests. You may hear the term mixed up with mocks,
6669fakes, or doubles. Basically, a stub is an object that returns pre-canned
6670responses, rather than doing any computation.")
3f641af0 6671 (license license:bsd-3)))
36ebf972
RW
6672
6673(define-public python2-pretend
6674 (package-with-python2 python-pretend))
aa759a51
RW
6675
6676(define-public python-cryptography-vectors
6677 (package
6678 (name "python-cryptography-vectors")
27fab2bf 6679 (version "1.7.1")
aa759a51
RW
6680 (source
6681 (origin
6682 (method url-fetch)
9c509ca9 6683 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6684 (sha256
6685 (base32
27fab2bf 6686 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 6687 (build-system python-build-system)
aa759a51 6688 (home-page "https://github.com/pyca/cryptography")
66e07664 6689 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6690 (description
6691 "This package contains test vectors for the cryptography package.")
6692 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6693 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6694
6695(define-public python2-cryptography-vectors
6696 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6697
6698(define-public python-cryptography
6699 (package
6700 (name "python-cryptography")
27fab2bf 6701 (version "1.7.1")
88b47cb0
RW
6702 (source
6703 (origin
6704 (method url-fetch)
9c509ca9 6705 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6706 (sha256
6707 (base32
27fab2bf 6708 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
6709 (build-system python-build-system)
6710 (inputs
6711 `(("openssl" ,openssl)))
6712 (propagated-inputs
6713 `(("python-cffi" ,python-cffi)
6714 ("python-six" ,python-six)
6715 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6716 ("python-idna" ,python-idna)
6717 ("python-iso8601" ,python-iso8601)))
6718 (native-inputs
6719 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6720 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6721 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6722 ("python-pyasn1" ,python-pyasn1)
6723 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6724 ("python-pytz" ,python-pytz)
6725 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6726 (home-page "https://github.com/pyca/cryptography")
6727 (synopsis "Cryptographic recipes and primitives for Python")
6728 (description
6729 "cryptography is a package which provides cryptographic recipes and
6730primitives to Python developers. It aims to be the “cryptographic standard
6731library” for Python. The package includes both high level recipes, and low
6732level interfaces to common cryptographic algorithms such as symmetric ciphers,
6733message digests and key derivation functions.")
6734 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6735 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6736 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6737
6738(define-public python2-cryptography
519e2f4f
LF
6739 (let ((crypto (package-with-python2
6740 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6741 (package (inherit crypto)
6742 (propagated-inputs
6743 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6744 ("python2-backport-ssl-match-hostname"
6745 ,python2-backport-ssl-match-hostname)
68f1cdec 6746 ("python2-enum34" ,python2-enum34)
88b47cb0 6747 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6748
6749(define-public python-pyopenssl
6750 (package
6751 (name "python-pyopenssl")
61684de2 6752 (version "16.2.0")
5af999b8
RW
6753 (source
6754 (origin
6755 (method url-fetch)
eb68d268 6756 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6757 (sha256
6758 (base32
61684de2 6759 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6760 (build-system python-build-system)
5af999b8
RW
6761 (propagated-inputs
6762 `(("python-cryptography" ,python-cryptography)
6763 ("python-six" ,python-six)))
6764 (inputs
6765 `(("openssl" ,openssl)))
5af999b8
RW
6766 (home-page "https://github.com/pyca/pyopenssl")
6767 (synopsis "Python wrapper module around the OpenSSL library")
6768 (description
6769 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6770library.")
3f641af0 6771 (license license:asl2.0)))
5af999b8
RW
6772
6773(define-public python2-pyopenssl
519e2f4f 6774 (package-with-python2 python-pyopenssl))
643725a1
CR
6775
6776(define-public python-pip
6777 (package
6778 (name "python-pip")
6fb54e3b 6779 (version "8.0.2")
643725a1
CR
6780 (source
6781 (origin
6782 (method url-fetch)
6fb54e3b 6783 (uri (pypi-uri "pip" version))
643725a1
CR
6784 (sha256
6785 (base32
6fb54e3b 6786 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6787 (build-system python-build-system)
05e2e4cf
HG
6788 (native-inputs
6789 `(;; Tests
6790 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6791 ("python-mock" ,python-mock)
6792 ("python-pytest" ,python-pytest)
6793 ("python-scripttest" ,python-scripttest)))
6794 (home-page "https://pip.pypa.io/")
6795 (synopsis
6796 "Package manager for Python software")
6797 (description
6798 "Pip is a package manager for Python software, that finds packages on the
6799Python Package Index (PyPI).")
6800 (license license:expat)))
6801
6802(define-public python2-pip
6803 (package-with-python2 python-pip))
d8c4998f
LC
6804
6805(define-public python-tlsh
6806 (package
6807 (name "python-tlsh")
99b00dc7 6808 (version "3.4.4")
d8c4998f
LC
6809 (home-page "https://github.com/trendmicro/tlsh")
6810 (source (origin
99b00dc7
EF
6811 (method url-fetch)
6812 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6813 version ".tar.gz"))
d8c4998f
LC
6814 (sha256
6815 (base32
99b00dc7
EF
6816 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6817 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6818 (build-system cmake-build-system)
6819 (arguments
6820 '(#:out-of-source? #f
6821 #:phases (modify-phases %standard-phases
6822 (replace
6823 'install
6824 (lambda* (#:key outputs #:allow-other-keys)
6825 ;; Build and install the Python bindings. The underlying
6826 ;; C++ library is apparently not meant to be installed.
6827 (let ((out (assoc-ref outputs "out")))
6828 (with-directory-excursion "py_ext"
6829 (and (system* "python" "setup.py" "build")
6830 (system* "python" "setup.py" "install"
6831 (string-append "--prefix=" out))))))))))
6832 (inputs `(("python" ,python-wrapper))) ;for the bindings
6833 (synopsis "Fuzzy matching library for Python")
6834 (description
6835 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6836Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6837value which can be used for similarity comparisons. Similar objects have
6838similar hash values, which allows for the detection of similar objects by
6839comparing their hash values. The byte stream should have a sufficient amount
6840of complexity; for example, a byte stream of identical bytes will not generate
6841a hash value.")
3f641af0 6842 (license license:asl2.0)))
d8c4998f
LC
6843
6844(define-public python2-tlsh
6845 (package
6846 (inherit python-tlsh)
6847 (name "python2-tlsh")
6848 (inputs `(("python" ,python-2)))))
d96034ed 6849
67f66812
BW
6850(define-public python-termcolor
6851 (package
6852 (name "python-termcolor")
6853 (version "1.1.0")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "python-termcolor" version))
6858 (sha256
6859 (base32
6860 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6861 (build-system python-build-system)
6862 (arguments
6863 ;; There are no tests.
6864 `(#:tests? #f))
6865 (home-page "http://pypi.python.org/pypi/termcolor")
6866 (synopsis "ANSII Color formatting for terminal output")
6867 (description
6868 "This package provides ANSII Color formatting for output in terminals.")
6869 (license license:expat)))
6870
6871(define-public python2-termcolor
6872 (package-with-python2 python-termcolor))
6873
d96034ed
LC
6874(define-public python-libarchive-c
6875 (package
6876 (name "python-libarchive-c")
03fd001c 6877 (version "2.2")
d96034ed
LC
6878 (source (origin
6879 (method url-fetch)
03fd001c 6880 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6881 (sha256
6882 (base32
03fd001c 6883 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6884 (build-system python-build-system)
6885 (arguments
6886 '(#:phases (modify-phases %standard-phases
6887 (add-before
6888 'build 'reference-libarchive
6889 (lambda* (#:key inputs #:allow-other-keys)
6890 ;; Retain the absolute file name of libarchive.so.
6891 (let ((libarchive (assoc-ref inputs "libarchive")))
6892 (substitute* "libarchive/ffi.py"
6893 (("find_library\\('archive'\\)")
6894 (string-append "'" libarchive
b41a05ce 6895 "/lib/libarchive.so'")))))))))
d96034ed 6896 (inputs
f3b98f4f 6897 `(("libarchive" ,libarchive)))
d96034ed
LC
6898 (home-page "https://github.com/Changaco/python-libarchive-c")
6899 (synopsis "Python interface to libarchive")
6900 (description
6901 "This package provides Python bindings to libarchive, a C library to
6902access possibly compressed archives in many different formats. It uses
6903Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6904 (license license:lgpl2.0+)))
d96034ed
LC
6905
6906(define-public python2-libarchive-c
6907 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6908
6909(define-public python-file
6910 (package
6911 (inherit file)
6912 (name "python-file")
7ffa5d4a
LF
6913 (source (origin
6914 (inherit (package-source file))
6915 ;; This patch should not be applied to python2-file.
6916 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6917 (build-system python-build-system)
6918 (arguments
6919 '(#:tests? #f ;no tests
00bf74be 6920 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6921 #:phases (modify-phases %standard-phases
6922 (add-before 'build 'change-directory
6923 (lambda _
6924 (chdir "python")
6925 #t))
6926 (add-before 'build 'set-library-file-name
6927 (lambda* (#:key inputs #:allow-other-keys)
6928 (let ((file (assoc-ref inputs "file")))
6929 (substitute* "magic.py"
6930 (("find_library\\('magic'\\)")
6931 (string-append "'" file "/lib/libmagic.so'")))
6932 #t))))))
6933 (inputs `(("file" ,file)))
6934 (self-native-input? #f)
daeeea71
CM
6935 (synopsis "Python bindings to the libmagic file type guesser. Note that
6936this module and the python-magic module both provide a \"magic.py\" file;
6937these two modules, which are different and were developed separately, both
f210e944 6938serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6939
6940(define-public python2-file
f210e944 6941 (package-with-python2 python-file))
85d4aeac
LC
6942
6943(define-public python-debian
6944 (package
6945 (name "python-debian")
6946 (version "0.1.23")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (string-append
6951 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6952 version ".tar.gz"))
6953 (sha256
6954 (base32
6955 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6956 (build-system python-build-system)
f22efa01 6957 (propagated-inputs
85d4aeac 6958 `(("python-six" ,python-six)))
85d4aeac
LC
6959 (home-page "http://packages.debian.org/sid/python-debian")
6960 (synopsis "Debian package related modules")
6961 (description
5c7bdc9a
LC
6962 ;; XXX: Use @enumerate instead of @itemize to work around
6963 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6964 "This package provides Python modules that abstract many formats of
6965Debian-related files, such as:
6966
5c7bdc9a 6967@enumerate
85d4aeac
LC
6968@item Debtags information;
6969@item @file{debian/changelog} files;
6970@item packages files, pdiffs;
6971@item control files of single or multiple RFC822-style paragraphs---e.g.
6972 @file{debian/control}, @file{.changes}, @file{.dsc};
6973@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6974 contained files and meta-information.
5c7bdc9a 6975@end enumerate\n")
85d4aeac
LC
6976
6977 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6978 (license license:gpl3+)))
85d4aeac
LC
6979
6980(define-public python2-debian
6981 (package-with-python2 python-debian))
816a6538 6982
2d321bb2
RW
6983(define-public python-nbformat
6984 (package
6985 (name "python-nbformat")
6986 (version "4.1.0")
6987 (source
6988 (origin
6989 (method url-fetch)
6990 (uri (pypi-uri "nbformat" version))
6991 (sha256
6992 (base32
6993 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6994 (build-system python-build-system)
6995 (arguments `(#:tests? #f)) ; no test target
6996 (propagated-inputs
6997 `(("python-ipython-genutils" ,python-ipython-genutils)
6998 ("python-jsonschema" ,python-jsonschema)
6999 ("python-jupyter-core" ,python-jupyter-core)
7000 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7001 (home-page "http://jupyter.org")
7002 (synopsis "Jupyter Notebook format")
7003 (description "This package provides the reference implementation of the
7004Jupyter Notebook format and Python APIs for working with notebooks.")
7005 (license license:bsd-3)))
7006
7007(define-public python2-nbformat
7008 (package-with-python2 python-nbformat))
7009
55436048
RW
7010(define-public python-bleach
7011 (package
7012 (name "python-bleach")
7013 (version "1.4.3")
7014 (source
7015 (origin
7016 (method url-fetch)
7017 (uri (pypi-uri "bleach" version))
7018 (sha256
7019 (base32
7020 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7021 (build-system python-build-system)
7022 (propagated-inputs
7023 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7024 ("python-six" ,python-six)))
7025 (native-inputs
7026 `(("python-nose" ,python-nose)))
7027 (home-page "http://github.com/jsocol/bleach")
7028 (synopsis "Whitelist-based HTML-sanitizing tool")
7029 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7030 (license license:asl2.0)))
7031
7032(define-public python2-bleach
7033 (package-with-python2 python-bleach))
7034
60590a3a
RW
7035(define-public python-entrypoints
7036 (package
7037 (name "python-entrypoints")
7038 (version "0.2.2")
7039 (source
7040 (origin
7041 (method url-fetch)
7042 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7043 version ".tar.gz"))
7044 (file-name (string-append name "-" version ".tar.gz"))
7045 (sha256
7046 (base32
7047 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7048 (build-system python-build-system)
7049 ;; The package does not come with a setup.py file, so we have to generate
7050 ;; one ourselves.
7051 (arguments
7052 `(#:tests? #f
7053 #:phases
7054 (modify-phases %standard-phases
7055 (add-after 'unpack 'create-setup.py
7056 (lambda _
7057 (call-with-output-file "setup.py"
7058 (lambda (port)
7059 (format port "\
7060from setuptools import setup
7061setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7062" ,version))))))))
7063 (home-page "https://github.com/takluyver/entrypoints")
7064 (synopsis "Discover and load entry points from installed Python packages")
7065 (description "Entry points are a way for Python packages to advertise
7066objects with some common interface. The most common examples are
7067@code{console_scripts} entry points, which define shell commands by
7068identifying a Python function to run. The @code{entrypoints} module contains
7069functions to find and load entry points.")
7070 (license license:expat)))
7071
7072(define-public python2-entrypoints
7073 (package-with-python2 python-entrypoints))
7074
c60898a8
RW
7075(define-public python-nbconvert
7076 (package
7077 (name "python-nbconvert")
7078 (version "5.0.0b1")
7079 (source
7080 (origin
7081 (method url-fetch)
7082 (uri (pypi-uri "nbconvert" version))
7083 (sha256
7084 (base32
7085 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7086 (build-system python-build-system)
7087 ;; The "bdist_egg" target is disabled by default, causing the installation
7088 ;; to fail.
7089 (arguments `(#:configure-flags (list "bdist_egg")))
7090 (propagated-inputs
7091 `(("python-bleach" ,python-bleach)
7092 ("python-entrypoints" ,python-entrypoints)
7093 ("python-jinja2" ,python-jinja2)
7094 ("python-jupyter-core" ,python-jupyter-core)
7095 ("python-mistune" ,python-mistune)
7096 ("python-nbformat" ,python-nbformat)
7097 ("python-pygments" ,python-pygments)
c60898a8
RW
7098 ("python-traitlets" ,python-traitlets)))
7099 (home-page "http://jupyter.org")
7100 (synopsis "Converting Jupyter Notebooks")
7101 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7102notebooks to various other formats via Jinja templates. It allows you to
7103convert an @code{.ipynb} notebook file into various static formats including:
7104
7105@enumerate
7106@item HTML
7107@item LaTeX
7108@item PDF
7109@item Reveal JS
7110@item Markdown (md)
7111@item ReStructured Text (rst)
7112@item executable script
7113@end enumerate\n")
7114 (license license:bsd-3)))
7115
7116(define-public python2-nbconvert
7117 (package-with-python2 python-nbconvert))
7118
a0d62280
RW
7119(define-public python-notebook
7120 (package
7121 (name "python-notebook")
7122 (version "4.2.3")
7123 (source (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "notebook" version))
7126 (sha256
7127 (base32
7128 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7129 (build-system python-build-system)
7130 (arguments
7131 `(#:phases
7132 (modify-phases %standard-phases
7133 (replace 'check
7134 (lambda _
7135 ;; HOME must be set for tests
7136 (setenv "HOME" "/tmp")
7137 (zero? (system* "nosetests")))))))
7138 (propagated-inputs
7139 `(("python-jupyter-core" ,python-jupyter-core)
7140 ("python-nbformat" ,python-nbformat)
7141 ("python-nbconvert" ,python-nbconvert)
7142 ("python-ipython" ,python-ipython)))
7143 (native-inputs
7144 `(("python-nose" ,python-nose)
7145 ("python-sphinx" ,python-sphinx)
7146 ("python-requests" ,python-requests)))
7147 (home-page "http://jupyter.org/")
7148 (synopsis "Web-based notebook environment for interactive computing")
7149 (description
7150 "The Jupyter HTML notebook is a web-based notebook environment for
7151interactive computing.")
3a735ecf 7152 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7153 (license license:bsd-3)))
7154
7155(define-public python2-notebook
3a735ecf
HG
7156 (let ((base (package-with-python2
7157 (strip-python2-variant python-notebook))))
7158 (package (inherit base)
7159 (native-inputs
7160 `(("python2-mock" ,python2-mock)
7161 ,@(package-native-inputs base)))
7162 (arguments
7163 (substitute-keyword-arguments (package-arguments base)
7164 ((#:phases phases)
7165 `(modify-phases ,phases
7166 (add-before 'check 'disable-test-case
7167 ;; The test requires network access to localhost. Curiously it
7168 ;; fails with Python 2 only. Simply make the test-case return
7169 ;; immediately.
7170 (lambda _
7171 (substitute*
7172 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7173 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7174
d55724ed
RW
7175(define-public python-widgetsnbextension
7176 (package
7177 (name "python-widgetsnbextension")
7178 (version "1.2.6")
7179 (source
7180 (origin
7181 (method url-fetch)
7182 (uri (pypi-uri "widgetsnbextension" version))
7183 (sha256
7184 (base32
7185 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7186 (build-system python-build-system)
7187 (propagated-inputs
7188 `(("python-notebook" ,python-notebook)))
7189 (native-inputs
f3b98f4f 7190 `(("python-nose" ,python-nose)))
d55724ed
RW
7191 (home-page "http://ipython.org")
7192 (synopsis "IPython HTML widgets for Jupyter")
7193 (description "This package provides interactive HTML widgets for Jupyter
7194notebooks.")
7195 (license license:bsd-3)))
7196
7197(define-public python2-widgetsnbextension
7198 (package-with-python2 python-widgetsnbextension))
7199
4fe2e344
RW
7200(define-public python-ipywidgets
7201 (package
7202 (name "python-ipywidgets")
7203 (version "5.2.2")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "ipywidgets" version))
7208 (sha256
7209 (base32
7210 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7211 (build-system python-build-system)
7212 ;; FIXME: it's not clear how to run the tests.
7213 (arguments `(#:tests? #f))
7214 (propagated-inputs
7215 `(("python-ipykernel" ,python-ipykernel)
7216 ("python-ipython" ,python-ipython)
4fe2e344
RW
7217 ("python-traitlets" ,python-traitlets)
7218 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7219 (home-page "http://ipython.org")
7220 (synopsis "IPython HTML widgets for Jupyter")
7221 (description "Ipywidgets are interactive HTML widgets for Jupyter
7222notebooks and the IPython kernel. Notebooks come alive when interactive
7223widgets are used. Users gain control of their data and can visualize changes
7224in the data.")
7225 (license license:bsd-3)))
7226
7227(define-public python2-ipywidgets
7228 (package-with-python2 python-ipywidgets))
7229
8ceebf8f
RW
7230(define-public python-jupyter-console
7231 (package
7232 (name "python-jupyter-console")
7233 (version "5.0.0")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "jupyter_console" version))
7238 (sha256
7239 (base32
7240 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7241 (build-system python-build-system)
7242 ;; FIXME: it's not clear how to run the tests.
7243 (arguments `(#:tests? #f))
7244 (propagated-inputs
7245 `(("python-ipykernel" ,python-ipykernel)
7246 ("python-ipython" ,python-ipython)
7247 ("python-jupyter-client" ,python-jupyter-client)
7248 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7249 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7250 (home-page "https://jupyter.org")
7251 (synopsis "Jupyter terminal console")
7252 (description "This package provides a terminal-based console frontend for
7253Jupyter kernels. It also allows for console-based interaction with non-Python
7254Jupyter kernels such as IJulia and IRKernel.")
7255 (license license:bsd-3)))
7256
7257(define-public python2-jupyter-console
7258 (package-with-python2 python-jupyter-console))
7259
c27ae827
RW
7260(define-public jupyter
7261 (package
7262 (name "jupyter")
7263 (version "1.0.0")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "jupyter" version))
7268 (sha256
7269 (base32
7270 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7271 (build-system python-build-system)
7272 ;; FIXME: it's not clear how to run the tests.
7273 (arguments `(#:tests? #f))
7274 (propagated-inputs
7275 `(("python-ipykernel" ,python-ipykernel)
7276 ("python-ipywidgets" ,python-ipywidgets)
7277 ("python-jupyter-console" ,python-jupyter-console)
7278 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7279 ("python-notebook" ,python-notebook)))
c27ae827
RW
7280 (home-page "http://jupyter.org")
7281 (synopsis "Web application for interactive documents")
7282 (description
7283 "The Jupyter Notebook is a web application that allows you to create and
7284share documents that contain live code, equations, visualizations and
7285explanatory text. Uses include: data cleaning and transformation, numerical
7286simulation, statistical modeling, machine learning and much more.")
7287 (license license:bsd-3)))
7288
816a6538
LC
7289(define-public python-chardet
7290 (package
7291 (name "python-chardet")
7292 (version "2.3.0")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (string-append
7297 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7298 version
7299 ".tar.gz"))
7300 (sha256
7301 (base32
7302 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7303 (build-system python-build-system)
816a6538
LC
7304 (home-page "https://github.com/chardet/chardet")
7305 (synopsis "Universal encoding detector for Python 2 and 3")
7306 (description
7307 "This package provides @code{chardet}, a Python module that can
7308automatically detect a wide range of file encodings.")
3f641af0 7309 (license license:lgpl2.1+)))
816a6538
LC
7310
7311(define-public python2-chardet
7312 (package-with-python2 python-chardet))
2fc5f186 7313
1872f1bb
KM
7314(define-public python-docopt
7315 (package
7316 (name "python-docopt")
7317 (version "0.6.2")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 ;; The release on PyPI does not include tests.
7322 (uri (string-append
7323 "https://github.com/docopt/docopt/archive/"
7324 version ".tar.gz"))
7325 (file-name (string-append name "-" version ".tar.gz"))
7326 (sha256
7327 (base32
7328 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7329 (build-system python-build-system)
7330 (native-inputs
f3b98f4f 7331 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7332 (arguments
7333 `(#:phases (alist-replace
7334 'check
7335 (lambda _ (zero? (system* "py.test")))
7336 %standard-phases)))
7337 (home-page "http://docopt.org")
7338 (synopsis "Command-line interface description language for Python")
7339 (description "This library allows the user to define a command-line
7340interface from a program's help message rather than specifying it
7341programatically with command-line parsers like @code{getopt} and
7342@code{argparse}.")
7343 (license license:expat)))
7344
7345(define-public python2-docopt
7346 (package-with-python2 python-docopt))
7347
2fc5f186
LF
7348(define-public python-zope-event
7349 (package
7350 (name "python-zope-event")
7351 (version "4.1.0")
7352 (source
7353 (origin
7354 (method url-fetch)
7355 (uri (string-append "https://pypi.python.org/packages/source/z"
7356 "/zope.event/zope.event-" version ".tar.gz"))
7357 (sha256
7358 (base32
7359 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7360 (build-system python-build-system)
2fc5f186
LF
7361 (home-page "http://pypi.python.org/pypi/zope.event")
7362 (synopsis "Event publishing system for Python")
7363 (description "Zope.event provides an event publishing API, intended for
7364use by applications which are unaware of any subscribers to their events. It
7365is a simple event-dispatching system on which more sophisticated event
7366dispatching systems can be built.")
3f641af0 7367 (license license:zpl2.1)))
2fc5f186
LF
7368
7369(define-public python2-zope-event
7370 (package-with-python2 python-zope-event))
97abe268
LF
7371
7372(define-public python-zope-interface
7373 (package
7374 (name "python-zope-interface")
7375 (version "4.1.3")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (string-append "https://pypi.python.org/packages/source/z"
7380 "/zope.interface/zope.interface-" version ".tar.gz"))
7381 (sha256
7382 (base32
7383 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7384 (build-system python-build-system)
38d480a8 7385 (native-inputs
97abe268
LF
7386 `(("python-zope-event" ,python-zope-event)))
7387 (home-page "https://github.com/zopefoundation/zope.interface")
7388 (synopsis "Python implementation of the \"design by contract\"
7389methodology")
7390 (description "Zope.interface provides an implementation of \"object
7391interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7392conforming to a given API or contract.")
3f641af0 7393 (license license:zpl2.1)))
97abe268
LF
7394
7395(define-public python2-zope-interface
7396 (package-with-python2 python-zope-interface))
81f2373c
LF
7397
7398(define-public python-zope-exceptions
7399 (package
7400 (name "python-zope-exceptions")
7401 (version "4.0.8")
7402 (source
7403 (origin
7404 (method url-fetch)
7405 (uri (string-append "https://pypi.python.org/packages/source/z"
7406 "/zope.exceptions/zope.exceptions-"
7407 version ".tar.gz"))
7408 (sha256
7409 (base32
7410 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7411 (build-system python-build-system)
7412 (arguments
7413 '(#:tests? #f)) ; circular dependency with zope.testrunner
7414 (propagated-inputs
7415 `(("python-zope-interface" ,python-zope-interface)))
7416 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7417 (synopsis "Zope exceptions")
7418 (description "Zope.exceptions provides general-purpose exception types
7419that have uses outside of the Zope framework.")
3f641af0 7420 (license license:zpl2.1)))
81f2373c
LF
7421
7422(define-public python2-zope-exceptions
7423 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7424
7425(define-public python-zope-testing
7426 (package
7427 (name "python-zope-testing")
7428 (version "4.5.0")
7429 (source
7430 (origin
7431 (method url-fetch)
7432 (uri (string-append "https://pypi.python.org/packages/source/z"
7433 "/zope.testing/zope.testing-" version ".tar.gz"))
7434 (sha256
7435 (base32
b02f7a21
HG
7436 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7437 (modules '((guix build utils)))
7438 (snippet
7439 '(begin
7440 ;; Remove pre-compiled .pyc files backup files from source.
7441 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7442 #t))))
900e3c0e
LF
7443 (build-system python-build-system)
7444 (native-inputs
7445 `(("python-zope-exceptions" ,python-zope-exceptions)))
7446 (propagated-inputs
7447 `(("python-zope-interface" ,python-zope-interface)))
7448 (home-page "http://pypi.python.org/pypi/zope.testing")
7449 (synopsis "Zope testing helpers")
7450 (description "Zope.testing provides a number of testing utilities for HTML
7451forms, HTTP servers, regular expressions, and more.")
3f641af0 7452 (license license:zpl2.1)))
900e3c0e
LF
7453
7454(define-public python2-zope-testing
7455 (package-with-python2 python-zope-testing))
01614c4f
LF
7456
7457(define-public python-zope-testrunner
7458 (package
7459 (name "python-zope-testrunner")
7460 (version "4.4.9")
7461 (source
7462 (origin
7463 (method url-fetch)
7464 (uri (string-append "https://pypi.python.org/packages/source/z"
7465 "/zope.testrunner/zope.testrunner-"
7466 version ".zip"))
7467 (sha256
7468 (base32
7469 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7470 (build-system python-build-system)
7471 (native-inputs
7472 `(("python-six" ,python-six)
e408ffc3 7473 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7474 ("python-zope-exceptions" ,python-zope-exceptions)
7475 ("python-zope-testing" ,python-zope-testing)
7476 ("unzip" ,unzip)))
7477 (propagated-inputs
7478 `(("python-zope-interface" ,python-zope-interface)))
7479 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7480 (synopsis "Zope testrunner script")
7481 (description "Zope.testrunner provides a script for running Python
7482tests.")
3f641af0 7483 (license license:zpl2.1)))
01614c4f
LF
7484
7485(define-public python2-zope-testrunner
7486 (let ((base (package-with-python2 python-zope-testrunner)))
7487 (package
7488 (inherit base)
7489 (native-inputs
7490 (append (package-native-inputs base)
7491 `(("python2-subunit" ,python2-subunit)
7492 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7493
7494(define-public python-zope-i18nmessageid
7495 (package
7496 (name "python-zope-i18nmessageid")
7497 (version "4.0.3")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (string-append
7502 "https://pypi.python.org/packages/source/z"
7503 "/zope.i18nmessageid/zope.i18nmessageid-"
7504 version ".tar.gz"))
7505 (sha256
7506 (base32
7507 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7508 (build-system python-build-system)
6a5c710c
LF
7509 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7510 (synopsis "Message identifiers for internationalization")
7511 (description "Zope.i18nmessageid provides facilities for declaring
7512internationalized messages within program source text.")
3f641af0 7513 (license license:zpl2.1)))
6a5c710c
LF
7514
7515(define-public python2-zope-i18nmessageid
7516 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7517
7518(define-public python-zope-schema
7519 (package
7520 (name "python-zope-schema")
7521 (version "4.4.2")
7522 (source
7523 (origin
7524 (method url-fetch)
7525 (uri (string-append "https://pypi.python.org/packages/source/z"
7526 "/zope.schema/zope.schema-" version ".tar.gz"))
7527 (sha256
7528 (base32
7529 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7530 (build-system python-build-system)
7531 (propagated-inputs
7532 `(("python-zope-event" ,python-zope-event)
7533 ("python-zope-interface" ,python-zope-interface)))
7534 (native-inputs
47f77210
HG
7535 `(("python-zope-testing" ,python-zope-testing)
7536 ("python-coverage" ,python-coverage)
7537 ("python-nose" ,python-nose)))
71fb09f3
LF
7538 (home-page "http://pypi.python.org/pypi/zope.schema")
7539 (synopsis "Zope data schemas")
7540 (description "Zope.scheme provides extensions to zope.interface for
7541defining data schemas.")
3f641af0 7542 (license license:zpl2.1)))
71fb09f3
LF
7543
7544(define-public python2-zope-schema
7545 (package-with-python2 python-zope-schema))
fbac9b17
LF
7546
7547(define-public python-zope-configuration
7548 (package
7549 (name "python-zope-configuration")
7550 (version "4.0.3")
7551 (source (origin
7552 (method url-fetch)
7553 (uri (string-append "https://pypi.python.org/packages/source/z"
7554 "/zope.configuration/zope.configuration-"
7555 version ".tar.gz"))
7556 (sha256
7557 (base32
7558 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7559 (build-system python-build-system)
7560 (propagated-inputs
7561 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7562 ("python-zope-schema" ,python-zope-schema)))
7563 (home-page "http://pypi.python.org/pypi/zope.configuration")
7564 (synopsis "Zope Configuration Markup Language")
7565 (description "Zope.configuration implements ZCML, the Zope Configuration
7566Markup Language.")
3f641af0 7567 (license license:zpl2.1)))
fbac9b17
LF
7568
7569(define-public python2-zope-configuration
7570 (package-with-python2 python-zope-configuration))
2ad52086
LF
7571
7572(define-public python-zope-proxy
7573 (package
7574 (name "python-zope-proxy")
7575 (version "4.1.6")
7576 (source
7577 (origin
7578 (method url-fetch)
7579 (uri (string-append "https://pypi.python.org/packages/source/z"
7580 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7581 (sha256
7582 (base32
7583 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7584 (build-system python-build-system)
7585 (propagated-inputs
7586 `(("python-zope-interface" ,python-zope-interface)))
7587 (home-page "http://pypi.python.org/pypi/zope.proxy")
7588 (synopsis "Generic, transparent proxies")
7589 (description "Zope.proxy provides generic, transparent proxies for Python.
7590Proxies are special objects which serve as mostly-transparent wrappers around
7591another object, intervening in the apparent behavior of the wrapped object
7592only when necessary to apply the policy (e.g., access checking, location
7593brokering, etc.) for which the proxy is responsible.")
3f641af0 7594 (license license:zpl2.1)))
2ad52086
LF
7595
7596(define-public python2-zope-proxy
7597 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7598
7599(define-public python-zope-location
7600 (package
7601 (name "python-zope-location")
7602 (version "4.0.3")
7603 (source
7604 (origin
7605 (method url-fetch)
7606 (uri (string-append "https://pypi.python.org/packages/source/z"
7607 "/zope.location/zope.location-" version ".tar.gz"))
7608 (sha256
7609 (base32
7610 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7611 (build-system python-build-system)
d27f176a 7612 (propagated-inputs
f404b5ea
LF
7613 `(("python-zope-proxy" ,python-zope-proxy)
7614 ("python-zope-schema" ,python-zope-schema)))
7615 (home-page "http://pypi.python.org/pypi/zope.location/")
7616 (synopsis "Zope location library")
7617 (description "Zope.location implements the concept of \"locations\" in
7618Zope3, which are are special objects that have a structural location.")
3f641af0 7619 (license license:zpl2.1)))
f404b5ea
LF
7620
7621(define-public python2-zope-location
7622 (package-with-python2 python-zope-location))
d4b77f36
LF
7623
7624(define-public python-zope-security
7625 (package
7626 (name "python-zope-security")
7627 (version "4.0.3")
7628 (source
7629 (origin
7630 (method url-fetch)
7631 (uri (string-append "https://pypi.python.org/packages/source/z"
7632 "/zope.security/zope.security-" version ".tar.gz"))
7633 (sha256
7634 (base32
7635 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7636 (build-system python-build-system)
7637 (propagated-inputs
7638 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7639 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7640 ("python-zope-schema" ,python-zope-schema)))
7641 (native-inputs
7642 `(("python-zope-component" ,python-zope-component)
7643 ("python-zope-configuration" ,python-zope-configuration)
7644 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7645 ("python-zope-testrunner" ,python-zope-testrunner)
7646 ("python-zope-testing" ,python-zope-testing)))
7647 (home-page "http://pypi.python.org/pypi/zope.security")
7648 (synopsis "Zope security framework")
7649 (description "Zope.security provides a generic mechanism to implement
7650security policies on Python objects.")
3f641af0 7651 (license license:zpl2.1)))
d4b77f36
LF
7652
7653(define-public python2-zope-security
04417662
EF
7654 (let ((zope-security (package-with-python2 python-zope-security)))
7655 (package (inherit zope-security)
7656 (propagated-inputs
7657 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7658 ,@(alist-delete
7659 "python-zope-testrunner"
7660 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7661
7662(define-public python-zope-component
7663 (package
7664 (name "python-zope-component")
7665 (version "4.2.2")
7666 (source
7667 (origin
7668 (method url-fetch)
7669 (uri (string-append "https://pypi.python.org/packages/source/z"
7670 "/zope.component/zope.component-" version ".tar.gz"))
7671 (sha256
7672 (base32
7673 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7674 (build-system python-build-system)
7675 (arguments
7676 ;; Skip tests due to circular dependency with python-zope-security.
7677 '(#:tests? #f))
7678 (native-inputs
7679 `(("python-zope-testing" ,python-zope-testing)))
7680 (propagated-inputs
7681 `(("python-zope-event" ,python-zope-event)
7682 ("python-zope-interface" ,python-zope-interface)
7683 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7684 ("python-zope-configuration" ,python-zope-configuration)))
7685 (home-page "https://github.com/zopefoundation/zope.component")
7686 (synopsis "Zope Component Architecture")
7687 (description "Zope.component represents the core of the Zope Component
7688Architecture. Together with the zope.interface package, it provides
7689facilities for defining, registering and looking up components.")
3f641af0 7690 (license license:zpl2.1)))
a6b61b27
LF
7691
7692(define-public python2-zope-component
7693 (package-with-python2 python-zope-component))
3859ac12 7694
1ae44b80 7695(define-public python-pythondialog
b5f218be 7696 (package
1ae44b80 7697 (name "python-pythondialog")
42c4b246 7698 (version "3.4.0")
b5f218be
LF
7699 (source
7700 (origin
7701 (method url-fetch)
1ae44b80 7702 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7703 (sha256
7704 (base32
1ae44b80 7705 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7706 (build-system python-build-system)
7707 (arguments
7708 `(#:phases
7709 (modify-phases %standard-phases
7710 (add-after 'unpack 'patch-path
7711 (lambda* (#:key inputs #:allow-other-keys)
7712 (let* ((dialog (assoc-ref inputs "dialog")))
7713 ;; Since this library really wants to grovel the search path, we
7714 ;; must hardcode dialog's store path into it.
7715 (substitute* "dialog.py"
7716 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7717 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7718 #t))))
b5f218be
LF
7719 #:tests? #f)) ; no test suite
7720 (propagated-inputs
7721 `(("dialog" ,dialog)))
7722 (home-page "http://pythondialog.sourceforge.net/")
7723 (synopsis "Python interface to the UNIX dialog utility")
7724 (description "A Python wrapper for the dialog utility. Its purpose is to
7725provide an easy to use, pythonic and comprehensive Python interface to dialog.
7726This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7727 (license license:lgpl2.1)
1ae44b80
LF
7728 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7729
7730(define-public python2-pythondialog
7731 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7732 (package
7733 (inherit base)
7734 (version (package-version python-pythondialog))
7735 (source (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "python2-pythondialog" version))
7738 (sha256
7739 (base32
7740 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7741
3859ac12
LF
7742(define-public python-pyrfc3339
7743 (package
7744 (name "python-pyrfc3339")
d9aa097b 7745 (version "1.0")
3859ac12
LF
7746 (source
7747 (origin
7748 (method url-fetch)
d9aa097b 7749 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7750 (sha256
7751 (base32
d9aa097b 7752 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-pytz" ,python-pytz)))
7756 (native-inputs
f3b98f4f 7757 `(("python-nose" ,python-nose)))
3859ac12
LF
7758 (home-page "https://github.com/kurtraschke/pyRFC3339")
7759 (synopsis "Python timestamp library")
7760 (description "Python library for generating and parsing RFC 3339-compliant
7761timestamps.")
7762 (license license:expat)))
7763
7764(define-public python2-pyrfc3339
7765 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7766
7767(define-public python-werkzeug
7768 (package
7769 (name "python-werkzeug")
0580e383 7770 (version "0.11.11")
5eea2005
LF
7771 (source
7772 (origin
7773 (method url-fetch)
4b47cbfa 7774 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7775 (sha256
7776 (base32
0580e383 7777 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7778 (build-system python-build-system)
7779 (native-inputs
7780 `(("python-pytest" ,python-pytest)))
7781 (home-page "http://werkzeug.pocoo.org/")
7782 (synopsis "Utilities for WSGI applications")
7783 (description "One of the most advanced WSGI utility modules. It includes a
7784powerful debugger, full-featured request and response objects, HTTP utilities to
7785handle entity tags, cache control headers, HTTP dates, cookie handling, file
7786uploads, a powerful URL routing system and a bunch of community-contributed
7787addon modules.")
3f641af0 7788 (license license:x11)))
5eea2005
LF
7789
7790(define-public python2-werkzeug
7791 (package-with-python2 python-werkzeug))
99fffa8a
LF
7792
7793(define-public python-configobj
7794 (package
7795 (name "python-configobj")
7796 (version "5.0.6")
7797 (source (origin
7798 (method url-fetch)
7799 (uri (string-append
7800 "https://pypi.python.org/packages/source/c/configobj/"
7801 "configobj-" version ".tar.gz"))
7802 (sha256
7803 (base32
7804 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7805 ;; Patch setup.py so it looks for python-setuptools, which is
7806 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7807 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7808 (build-system python-build-system)
861f70c9 7809 (propagated-inputs
f3b98f4f 7810 `(("python-six" ,python-six)))
99fffa8a
LF
7811 (synopsis "Config file reading, writing and validation")
7812 (description "ConfigObj is a simple but powerful config file reader and
7813writer: an ini file round tripper. Its main feature is that it is very easy to
7814use, with a straightforward programmer’s interface and a simple syntax for
7815config files.")
7816 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7817 (license license:bsd-3)))
99fffa8a
LF
7818
7819(define-public python2-configobj
7820 (package-with-python2 python-configobj))
79e8a291
LF
7821
7822(define-public python-configargparse
7823 (package
7824 (name "python-configargparse")
7825 (version "0.10.0")
7826 (source (origin
7827 (method url-fetch)
7828 (uri (string-append
7829 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7830 "ConfigArgParse-" version ".tar.gz"))
7831 (sha256
7832 (base32
7833 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7834 (build-system python-build-system)
7835 (arguments
7836 ;; FIXME: Bug in test suite filed upstream:
7837 ;; https://github.com/bw2/ConfigArgParse/issues/32
7838 '(#:tests? #f))
7839 (synopsis "Replacement for argparse")
7840 (description "A drop-in replacement for argparse that allows options to also
7841be set via config files and/or environment variables.")
7842 (home-page "https://github.com/bw2/ConfigArgParse")
7843 (license license:expat)))
7844
7845(define-public python2-configargparse
7846 (package-with-python2 python-configargparse))
ab41f979
LF
7847
7848(define-public python-ndg-httpsclient
7849 (package
7850 (name "python-ndg-httpsclient")
ae476d01 7851 (version "0.4.2")
ab41f979
LF
7852 (source (origin
7853 (method url-fetch)
7854 (uri (string-append
7855 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7856 "ndg_httpsclient-" version ".tar.gz"))
7857 (sha256
7858 (base32
ae476d01 7859 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 7860 (build-system python-build-system)
a39cc016
LF
7861 (arguments
7862 '(;; The tests appear to require networking.
7863 #:tests? #f))
ab41f979
LF
7864 (propagated-inputs
7865 `(("python-pyopenssl" ,python-pyopenssl)))
7866 (synopsis "HTTPS support for Python's httplib and urllib2")
7867 (description "This is a HTTPS client implementation for httplib and urllib2
7868based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7869over the default provided with Python and importantly enables full verification
7870of the SSL peer.")
7871 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7872 (license license:bsd-3)))
ab41f979
LF
7873
7874;; python2-openssl requires special care, so package-with-python2 is
7875;; insufficient.
7876(define-public python2-ndg-httpsclient
7877 (package (inherit python-ndg-httpsclient)
7878 (name "python2-ndg-httpsclient")
7879 (arguments `(#:python ,python-2))
7880 (propagated-inputs
7881 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7882
7883(define-public python-contextlib2
7884 (package
7885 (name "python-contextlib2")
7886 (version "0.4.0")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "contextlib2" version))
7891 (sha256
7892 (base32
7893 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7894 (build-system python-build-system)
7895 (arguments
7896 `(#:phases
7897 (modify-phases %standard-phases
7898 (replace 'check
7899 (lambda _ (zero?
7900 (system*
b3546174 7901 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7902 (home-page "http://contextlib2.readthedocs.org/")
7903 (synopsis "Tools for decorators and context managers")
7904 (description "This module is primarily a backport of the Python
79053.2 contextlib to earlier Python versions. Like contextlib, it
7906provides utilities for common tasks involving decorators and context
7907managers. It also contains additional features that are not part of
7908the standard library.")
3f641af0 7909 (license license:psfl)))
03f964a5
CM
7910
7911(define-public python2-contextlib2
7912 (package-with-python2 python-contextlib2))
210bf497
DT
7913
7914(define-public python-texttable
7915 (package
7916 (name "python-texttable")
7917 (version "0.8.4")
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "texttable" version))
7922 (sha256
7923 (base32
7924 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7925 (build-system python-build-system)
7926 (arguments '(#:tests? #f)) ; no tests
7927 (home-page "https://github.com/foutaise/texttable/")
7928 (synopsis "Python module for creating simple ASCII tables")
7929 (description "Texttable is a Python module for creating simple ASCII
7930tables.")
3f641af0 7931 (license license:lgpl2.1+)))
210bf497
DT
7932
7933(define-public python2-texttable
7934 (package-with-python2 python-texttable))
67c52bb3
DT
7935
7936(define-public python-websocket-client
7937 (package
7938 (name "python-websocket-client")
6b810897 7939 (version "0.37.0")
67c52bb3
DT
7940 (source
7941 (origin
7942 (method url-fetch)
6b810897 7943 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7944 (sha256
7945 (base32
6b810897 7946 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7947 (build-system python-build-system)
a5333f7c
HG
7948 (propagated-inputs
7949 `(("python-six" ,python-six)))
67c52bb3
DT
7950 (home-page "https://github.com/liris/websocket-client")
7951 (synopsis "WebSocket client for Python")
7952 (description "The Websocket-client module provides the low level APIs for
7953WebSocket usage in Python programs.")
3f641af0 7954 (license license:lgpl2.1+)))
67c52bb3
DT
7955
7956(define-public python2-websocket-client
7957 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7958
7959(define-public python-atomicwrites
7960 (package
7961 (name "python-atomicwrites")
4e92d76a 7962 (version "1.1.0")
5c6eea2a
LF
7963 (source (origin
7964 (method url-fetch)
7965 (uri (pypi-uri "atomicwrites" version))
7966 (sha256
7967 (base32
4e92d76a 7968 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7969 (build-system python-build-system)
7970 (synopsis "Atomic file writes in Python")
7971 (description "Library for atomic file writes using platform dependent tools
8f65585b 7972for atomic file system operations.")
5c6eea2a 7973 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7974 (license license:expat)))
9bb6d184
LF
7975
7976(define-public python2-atomicwrites
f210e944 7977 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7978
7979(define-public python-requests-toolbelt
7980 (package
7981 (name "python-requests-toolbelt")
c02af1c8 7982 (version "0.6.2")
561bb3cb
LF
7983 (source (origin
7984 (method url-fetch)
c02af1c8
LF
7985 (uri (string-append
7986 "https://pypi.python.org/packages/"
7987 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7988 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7989 (sha256
7990 (base32
c02af1c8 7991 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7992 (build-system python-build-system)
759aadd4
LF
7993 (native-inputs
7994 `(("python-betamax" ,python-betamax)
7995 ("python-mock" ,python-mock)
7996 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7997 (propagated-inputs
7998 `(("python-requests" ,python-requests)))
7999 (synopsis "Extensions to python-requests")
8000 (description "This is a toolbelt of useful classes and functions to be used
8001with python-requests.")
8002 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8003 (license license:asl2.0)))
d1deb90b
LF
8004
8005(define-public python-click-threading
8006 (package
8007 (name "python-click-threading")
3d2e0dbc 8008 (version "0.2.0")
d1deb90b
LF
8009 (source (origin
8010 (method url-fetch)
3d2e0dbc
LF
8011 (uri (string-append
8012 "https://pypi.python.org/packages/"
8013 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8014 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8015 (sha256
8016 (base32
3d2e0dbc 8017 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8018 (build-system python-build-system)
8019 (propagated-inputs
8020 `(("python-click" ,python-click)))
8021 (synopsis "Utilities for multithreading in Click")
8022 (description "This package provides utilities for multithreading in Click
8023applications.")
8024 (home-page "https://github.com/click-contrib/click-threading")
8025 (license license:expat)))
7b17cab9
LF
8026
8027(define-public python-click-log
8028 (package
8029 (name "python-click-log")
42734b9a 8030 (version "0.1.8")
7b17cab9
LF
8031 (source (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "click-log" version))
8034 (sha256
8035 (base32
42734b9a 8036 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8037 (build-system python-build-system)
8038 (propagated-inputs
8039 `(("python-click" ,python-click)))
8040 (synopsis "Logging for click applications")
8041 (description "This package provides a Python library for logging Click
8042applications.")
8043 (home-page "https://github.com/click-contrib/click-log")
8044 (license license:expat)))
7b3a4ee4
LF
8045
8046(define-public python-apipkg
8047 (package
8048 (name "python-apipkg")
8049 (version "1.4")
8050 (source (origin
8051 (method url-fetch)
8052 (uri (pypi-uri "apipkg" version))
8053 (sha256
8054 (base32
8055 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8056 (build-system python-build-system)
328bb95d 8057 (native-inputs
7b3a4ee4
LF
8058 `(("python-pytest" ,python-pytest)))
8059 (synopsis "Namespace control and lazy-import mechanism")
8060 (description "With apipkg you can control the exported namespace of a Python
8061package and greatly reduce the number of imports for your users. It is a small
8062pure Python module that works on virtually all Python versions.")
8063 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8064 (license license:expat)))
e08739c3
CAW
8065
8066(define-public python2-apipkg
f210e944 8067 (package-with-python2 python-apipkg))
848964fe
LF
8068
8069(define-public python-execnet
8070 (package
8071 (name "python-execnet")
8072 (version "1.4.1")
8073 (source (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "execnet" version))
8076 (sha256
8077 (base32
8078 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8079 (build-system python-build-system)
ca0eee9d
LF
8080 (arguments
8081 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8082 ;; The two test failures are caused by the lack of an `ssh` executable.
8083 ;; The test suite can be run with pytest after the 'install' phase.
8084 #:tests? #f))
848964fe 8085 (native-inputs
ca0eee9d
LF
8086 `(("python-pytest" ,python-pytest)
8087 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8088 (propagated-inputs
848964fe
LF
8089 `(("python-apipkg" ,python-apipkg)))
8090 (synopsis "Rapid multi-Python deployment")
8091 (description "Execnet provides a share-nothing model with
8092channel-send/receive communication for distributing execution across many
8093Python interpreters across version, platform and network barriers. It has a
8094minimal and fast API targetting the following uses:
8095@enumerate
8096@item distribute tasks to (many) local or remote CPUs
8097@item write and deploy hybrid multi-process applications
8098@item write scripts to administer multiple environments
8099@end enumerate")
8100 (home-page "http://codespeak.net/execnet/")
f210e944 8101 (license license:expat)))
16c84f90
CAW
8102
8103(define-public python2-execnet
f210e944 8104 (package-with-python2 python-execnet))
6720dbb4 8105
d5bbf806 8106(define-public python-trollius-redis
8107 (package
8108 (name "python-trollius-redis")
8109 (version "0.1.4")
8110 (source
8111 (origin
8112 (method url-fetch)
8113 (uri (pypi-uri "trollius_redis" version))
8114 (sha256
8115 (base32
8116 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8117 (build-system python-build-system)
8118 (home-page "https://github.com/benjolitz/trollius-redis")
8119 (synopsis "Port of asyncio-redis to trollius")
8120 (description "@code{trollius-redis} is a Redis client for Python
8121 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8122 Redis protocol.")
8123 (license license:bsd-2)))
8124
8125(define-public python2-trollius-redis
8126 (package-with-python2 python-trollius-redis))
8127
6720dbb4
LF
8128;;; The software provided by this package was integrated into pytest 2.8.
8129(define-public python-pytest-cache
8130 (package
8131 (name "python-pytest-cache")
8132 (version "1.0")
8133 (source (origin
8134 (method url-fetch)
8135 (uri (pypi-uri "pytest-cache" version))
8136 (sha256
8137 (base32
8138 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8139 (build-system python-build-system)
f22efa01 8140 (propagated-inputs
630d938f
EF
8141 `(("python-apipkg" ,python-apipkg)
8142 ("python-execnet" ,python-execnet)
8143 ("python-py" ,python-py)
8144 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8145 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8146 (description "The pytest-cache plugin provides tools to rerun failures from
8147the last py.test invocation.")
8148 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8149 (license license:expat)))
0adc21c2
EF
8150
8151(define-public python2-pytest-cache
f210e944 8152 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8153
8154(define-public python-pytest-localserver
8155 (package
8156 (name "python-pytest-localserver")
29f20168 8157 (version "0.3.5")
d7e729fe
LF
8158 (source (origin
8159 (method url-fetch)
29f20168 8160 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8161 (sha256
8162 (base32
29f20168 8163 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8164 (build-system python-build-system)
8165 (arguments
8166 `(#:phases (modify-phases %standard-phases
8167 (replace 'check
8168 (lambda _
8169 (zero? (system* "py.test" "--genscript=runtests.py"))
8170 (zero? (system* "py.test")))))))
8171 (native-inputs
d7e729fe
LF
8172 `(("python-pytest" ,python-pytest)
8173 ("python-requests" ,python-requests)
9ba40f05 8174 ("python-six" ,python-six)))
f22efa01 8175 (propagated-inputs
9ba40f05 8176 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8177 (synopsis "Py.test plugin to test server connections locally")
8178 (description "Pytest-localserver is a plugin for the pytest testing
8179framework which enables you to test server connections locally.")
8180 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8181 (license license:expat)))
28cecbb7
LF
8182
8183(define-public python-wsgi-intercept
8184 (package
8185 (name "python-wsgi-intercept")
909fbd2b 8186 (version "1.2.2")
28cecbb7
LF
8187 (source (origin
8188 (method url-fetch)
909fbd2b
LF
8189 (uri (string-append
8190 "https://pypi.python.org/packages/"
8191 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8192 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8193 (sha256
8194 (base32
909fbd2b 8195 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8196 (build-system python-build-system)
b9fc496f
HG
8197 (propagated-inputs
8198 `(("python-six" ,python-six)))
28cecbb7 8199 (native-inputs
9d813ec1 8200 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8201 ("python-httplib2" ,python-httplib2)
8202 ("python-requests" ,python-requests)
8757f050 8203 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8204 (synopsis "Puts a WSGI application in place of a real URI for testing")
8205 (description "Wsgi_intercept installs a WSGI application in place of a real
8206URI for testing. Testing a WSGI application normally involves starting a
8207server at a local host and port, then pointing your test code to that address.
8208Instead, this library lets you intercept calls to any specific host/port
8209combination and redirect them into a WSGI application importable by your test
8210program. Thus, you can avoid spawning multiple processes or threads to test
8211your Web app.")
8212 (home-page "https://github.com/cdent/wsgi-intercept")
8213 (license license:expat)))
89b8a551
LF
8214
8215(define-public python-pytest-xprocess
8216 (package
8217 (name "python-pytest-xprocess")
8218 (version "0.9.1")
8219 (source (origin
8220 (method url-fetch)
8221 (uri (pypi-uri "pytest-xprocess" version))
8222 (sha256
8223 (base32
8224 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8225 (build-system python-build-system)
8226 (propagated-inputs
8227 `(("python-pytest" ,python-pytest)
8228 ("python-pytest-cache" ,python-pytest-cache)
8229 ("python-psutil" ,python-psutil)))
8230 (synopsis "Pytest plugin to manage external processes across test runs")
8231 (description "Pytest-xprocess is an experimental py.test plugin for managing
8232processes across test runs.")
8233 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8234 (license license:expat)))
5c299bf0
LF
8235
8236(define-public python-icalendar
8237 (package
8238 (name "python-icalendar")
25291aca 8239 (version "3.11")
5c299bf0
LF
8240 (source (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "icalendar" version))
8243 (sha256
8244 (base32
25291aca 8245 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8246 (build-system python-build-system)
8247 (propagated-inputs
8248 `(("python-dateutil-2" ,python-dateutil-2)
8249 ("python-pytz" ,python-pytz)))
8250 (synopsis "Python library for parsing iCalendar files")
8251 (description "The icalendar package is a parser/generator of iCalendar
8252files for use with Python.")
8253 (home-page "https://github.com/collective/icalendar")
3f641af0 8254 (license license:bsd-2)))
6bbbb53e
LF
8255
8256(define-public python-sphinxcontrib-newsfeed
8257 (package
8258 (name "python-sphinxcontrib-newsfeed")
8259 (version "0.1.4")
8260 (source (origin
8261 (method url-fetch)
8262 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8263 (sha256
8264 (base32
8265 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8266 (build-system python-build-system)
8267 (propagated-inputs
251ed7f2 8268 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8269 (synopsis "News Feed extension for Sphinx")
8270 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8271Blog, News or Announcements section to a Sphinx website.")
8272 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8273 (license license:bsd-2)))
2216e15c
SB
8274
8275(define-public python-args
8276 (package
8277 (name "python-args")
8278 (version "0.1.0")
8279 (source (origin
8280 (method url-fetch)
8281 (uri (pypi-uri "args" version))
8282 (sha256
8283 (base32
8284 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8285 (build-system python-build-system)
2216e15c
SB
8286 (home-page "https://github.com/kennethreitz/args")
8287 (synopsis "Command-line argument parser")
8288 (description
8289 "This library provides a Python module to parse command-line arguments.")
3f641af0 8290 (license license:bsd-3)))
2216e15c
SB
8291
8292(define-public python2-args
8293 (package-with-python2 python-args))
c06a3de9
SB
8294
8295(define-public python-clint
8296 (package
8297 (name "python-clint")
8298 (version "0.5.1")
8299 (source (origin
8300 (method url-fetch)
8301 (uri (pypi-uri "clint" version))
8302 (sha256
8303 (base32
8304 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8305 (build-system python-build-system)
f22efa01 8306 (propagated-inputs
f3b98f4f 8307 `(("python-args" ,python-args)))
c06a3de9
SB
8308 (home-page "https://github.com/kennethreitz/clint")
8309 (synopsis "Command-line interface tools")
8310 (description
8311 "Clint is a Python module filled with a set of tools for developing
8312command-line applications, including tools for colored and indented
8313output, progress bar display, and pipes.")
3f641af0 8314 (license license:isc)))
c06a3de9
SB
8315
8316(define-public python2-clint
8317 (package-with-python2 python-clint))
4ecdeef8
SB
8318
8319(define-public python-astor
8320 (package
8321 (name "python-astor")
8322 (version "0.5")
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "astor" version))
8326 (sha256
8327 (base32
8328 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8329 (build-system python-build-system)
4ecdeef8
SB
8330 (home-page "https://github.com/berkerpeksag/astor")
8331 (synopsis "Read and write Python ASTs")
8332 (description
8333 "Astor is designed to allow easy manipulation of Python source via the
8334Abstract Syntax Tree.")
3f641af0 8335 (license license:bsd-3)))
4ecdeef8
SB
8336
8337(define-public python2-astor
8338 (package-with-python2 python-astor))
e224b7d0
SB
8339
8340(define-public python-rply
8341 (package
8342 (name "python-rply")
8343 (version "0.7.4")
8344 (source (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "rply" version))
8347 (sha256
8348 (base32
8349 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8350 (build-system python-build-system)
f22efa01 8351 (propagated-inputs
f3b98f4f 8352 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8353 (home-page "https://github.com/alex/rply")
8354 (synopsis "Parser generator for Python")
8355 (description
8356 "This package provides a pure Python based parser generator, that also
8357works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8358with a new public API, and RPython support.")
3f641af0 8359 (license license:bsd-3)))
e224b7d0
SB
8360
8361(define-public python2-rply
8362 (package-with-python2 python-rply))
c3e919d7
SB
8363
8364(define-public python-hy
8365 (package
8366 (name "python-hy")
8367 (version "0.11.1")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (pypi-uri "hy" version))
8371 (sha256
8372 (base32
8373 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8374 (build-system python-build-system)
f22efa01 8375 (propagated-inputs
c3e919d7
SB
8376 `(("python-astor" ,python-astor)
8377 ("python-clint" ,python-clint)
f3b98f4f 8378 ("python-rply" ,python-rply)))
c3e919d7
SB
8379 (home-page "http://hylang.org/")
8380 (synopsis "Lisp frontend to Python")
8381 (description
8382 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8383its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8384Python at your fingertips, in Lisp form.")
8385 (license license:expat)))
8386
8387(define-public python2-hy
8388 (package-with-python2 python-hy))
7a5b944e 8389
81f7f297
EF
8390(define-public python-rauth
8391 (package
8392 (name "python-rauth")
8393 (version "0.7.2")
8394 (source
8395 (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "rauth" version))
8398 (sha256
8399 (base32
8400 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8401 (build-system python-build-system)
8402 (arguments
8403 `(#:test-target "check"))
f22efa01 8404 (propagated-inputs
81f7f297
EF
8405 `(("python-requests" ,python-requests)))
8406 (home-page "https://github.com/litl/rauth")
8407 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8408 (description
8409 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8410provides service wrappers for convenient connection initialization and
8411authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8412 (license license:expat)
8413 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8414
8415(define-public python2-rauth
0848d8d3
EF
8416 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8417 (package
8418 (inherit base)
00e10c6e 8419 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8420 ,@(package-native-inputs base))))))
81f7f297 8421
1abe448d
EF
8422(define-public python2-functools32
8423 (package
8424 (name "python2-functools32")
8425 (version "3.2.3-2")
8426 (source
8427 (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "functools32" version))
8430 (sha256
8431 (base32
8432 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8433 (build-system python-build-system)
8434 (arguments
8435 `(#:python ,python-2
8436 #:tests? #f)) ; no test target
1abe448d
EF
8437 (home-page "https://github.com/MiCHiLU/python-functools32")
8438 (synopsis
8439 "Backport of the functools module from Python 3.2.3")
8440 (description
8441 "This package is a backport of the @code{functools} module from Python
84423.2.3 for use with older versions of Python and PyPy.")
8443 (license license:expat)))
8444
877889f3 8445(define-public python2-futures
7a5b944e 8446 (package
877889f3 8447 (name "python2-futures")
7a5b944e
EF
8448 (version "3.0.3")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "futures" version))
8453 (sha256
8454 (base32
8455 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8456 (build-system python-build-system)
877889f3 8457 (arguments `(#:python ,python-2))
7a5b944e
EF
8458 (home-page "https://github.com/agronholm/pythonfutures")
8459 (synopsis
8460 "Backport of the concurrent.futures package from Python 3.2")
8461 (description
8462 "The concurrent.futures module provides a high-level interface for
8463asynchronously executing callables. This package backports the
8464concurrent.futures package from Python 3.2")
3f641af0 8465 (license license:bsd-3)))
7a5b944e 8466
5cb2fe44
EF
8467(define-public python-promise
8468 (package
8469 (name "python-promise")
8470 (version "0.4.2")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "promise" version))
8475 (sha256
8476 (base32
8477 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8478 (build-system python-build-system)
8479 ;; Tests wants python-futures, which is a python2 only program, and
8480 ;; can't be found by python-promise at test time.
8481 (arguments `(#:tests? #f))
8482 (home-page "https://github.com/syrusakbary/promise")
8483 (synopsis "Promises/A+ implementation for Python")
8484 (description
8485 "Promises/A+ implementation for Python")
8486 (properties `((python2-variant . ,(delay python2-promise))))
8487 (license license:expat)))
8488
8489(define-public python2-promise
8490 (let ((promise (package-with-python2
8491 (strip-python2-variant python-promise))))
8492 (package (inherit promise)
8493 (arguments (substitute-keyword-arguments (package-arguments promise)
8494 ((#:tests? _) #t)))
8495 (native-inputs
8496 `(("python2-futures" ,python2-futures)
8497 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8498 ,@(package-native-inputs promise))))))
8499
c18f6368
EF
8500(define-public python-urllib3
8501 (package
8502 (name "python-urllib3")
6178274d 8503 (version "1.18.1")
c18f6368
EF
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "urllib3" version))
8508 (sha256
8509 (base32
6178274d 8510 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8511 (build-system python-build-system)
8512 (arguments `(#:tests? #f))
8513 (native-inputs
f3b98f4f 8514 `(;; some packages for tests
c18f6368
EF
8515 ("python-nose" ,python-nose)
8516 ("python-mock" ,python-mock)
8517 ("python-tornado" ,python-tornado)))
8518 (propagated-inputs
8322749a 8519 `(;; extra packages for https security
c18f6368
EF
8520 ("python-certifi" ,python-certifi)
8521 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8522 ("python-pyasn1" ,python-pyasn1)
8523 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8524 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8525 (synopsis "HTTP library with thread-safe connection pooling")
8526 (description
8527 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8528can reuse the same socket connection for multiple requests, it can POST files,
8529supports url redirection and retries, and also gzip and deflate decoding.")
8530 (license license:expat)))
8531
8532(define-public python2-urllib3
8533 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8534
8535(define-public python-colorama
8536 (package
8537 (name "python-colorama")
8538 (version "0.3.3")
8539 (source
8540 (origin
8541 (method url-fetch)
8542 (uri (pypi-uri "colorama" version))
8543 (sha256
8544 (base32
8545 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8546 (build-system python-build-system)
2b2f2fc1
DT
8547 (synopsis "colored terminal text rendering for Python")
8548 (description "Colorama is a Python library for rendering colored terminal
8549text.")
8550 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8551 (license license:bsd-3)))
2b2f2fc1
DT
8552
8553(define-public python2-colorama
8554 (package-with-python2 python-colorama))
f5bcec6e
DT
8555
8556(define-public python-rsa
8557 (package
8558 (name "python-rsa")
ecd68c53 8559 (version "3.4.2")
f5bcec6e
DT
8560 (source
8561 (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "rsa" version))
8564 (sha256
8565 (base32
ecd68c53 8566 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8567 (build-system python-build-system)
f22efa01 8568 (propagated-inputs
f3b98f4f 8569 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8570 (synopsis "Pure-Python RSA implementation")
8571 (description "Python-RSA is a pure-Python RSA implementation. It supports
8572encryption and decryption, signing and verifying signatures, and key
8573generation according to PKCS#1 version 1.5. It can be used as a Python
8574library as well as on the command line.")
8575 (home-page "http://stuvel.eu/rsa")
3f641af0 8576 (license license:asl2.0)))
f5bcec6e
DT
8577
8578(define-public python2-rsa
8579 (package-with-python2 python-rsa))
c0aacfa5
DT
8580
8581(define-public python-pluggy
8582 (package
8583 (name "python-pluggy")
8584 (version "0.3.1")
8585 (source
8586 (origin
8587 (method url-fetch)
8588 (uri (pypi-uri "pluggy" version))
8589 (sha256
8590 (base32
8591 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8592 (build-system python-build-system)
c0aacfa5
DT
8593 (synopsis "Plugin and hook calling mechanism for Python")
8594 (description "Pluggy is an extraction of the plugin manager as used by
8595Pytest but stripped of Pytest specific details.")
8596 (home-page "https://pypi.python.org/pypi/pluggy")
8597 (license license:expat)))
8598
8599(define-public python2-pluggy
8600 (package-with-python2 python-pluggy))
a4af21ca
DT
8601
8602(define-public python-tox
8603 (package
8604 (name "python-tox")
8605 (version "2.3.1")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "tox" version))
8610 (sha256
8611 (base32
8612 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8613 (build-system python-build-system)
8614 (arguments
7ba07edf
HG
8615 ;; FIXME: Tests require pytest-timeout, which itself requires
8616 ;; pytest>=2.8.0 for installation.
a4af21ca 8617 '(#:tests? #f))
482d9591
HG
8618 (propagated-inputs
8619 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8620 ("python-py" ,python-py)
482d9591 8621 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8622 (native-inputs
7ba07edf
HG
8623 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8624 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8625 (home-page "http://tox.testrun.org/")
8626 (synopsis "Virtualenv-based automation of test activities")
8627 (description "Tox is a generic virtualenv management and test command line
8628tool. It can be used to check that a package installs correctly with
8629different Python versions and interpreters, or run tests in each type of
8630supported environment, or act as a frontend to continuous integration
8631servers.")
8632 (license license:expat)))
8633
8634(define-public python2-tox
8635 (package-with-python2 python-tox))
ba9da248
DT
8636
8637(define-public python-jmespath
8638 (package
8639 (name "python-jmespath")
8640 (version "0.9.0")
8641 (source
8642 (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "jmespath" version))
8645 (sha256
8646 (base32
8647 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8648 (build-system python-build-system)
ba9da248
DT
8649 (synopsis "JSON Matching Expressions")
8650 (description "JMESPath (pronounced “james path”) is a Python library that
8651allows one to declaratively specify how to extract elements from a JSON
8652document.")
8653 (home-page "https://github.com/jmespath/jmespath.py")
8654 (license license:expat)))
8655
8656(define-public python2-jmespath
8657 (package-with-python2 python-jmespath))
935fcd5c
DT
8658
8659(define-public python-botocore
8660 (package
8661 (name "python-botocore")
e09f952d 8662 (version "1.4.62")
935fcd5c
DT
8663 (source
8664 (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "botocore" version))
8667 (sha256
8668 (base32
e09f952d 8669 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8670 (build-system python-build-system)
482d9591 8671 (propagated-inputs
935fcd5c
DT
8672 `(("python-dateutil" ,python-dateutil-2)
8673 ("python-docutils" ,python-docutils)
482d9591 8674 ("python-jmespath" ,python-jmespath)))
8fa6890b 8675 (native-inputs
482d9591 8676 `(("python-mock" ,python-mock)
935fcd5c 8677 ("python-nose" ,python-nose)
482d9591 8678 ("behave" ,behave)
935fcd5c 8679 ("python-tox" ,python-tox)
482d9591 8680 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8681 (home-page "https://github.com/boto/botocore")
8682 (synopsis "Low-level interface to AWS")
8683 (description "Botocore is a Python library that provides a low-level
8684interface to the Amazon Web Services (AWS) API.")
3f641af0 8685 (license license:asl2.0)))
935fcd5c
DT
8686
8687(define-public python2-botocore
8688 (package-with-python2 python-botocore))
f861b8b8
DT
8689
8690(define-public awscli
8691 (package
8692 (name "awscli")
d5ccf71e 8693 (version "1.11.5")
f861b8b8
DT
8694 (source
8695 (origin
8696 (method url-fetch)
d5ccf71e 8697 (uri (pypi-uri name version))
f861b8b8
DT
8698 (sha256
8699 (base32
d5ccf71e 8700 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8701 (build-system python-build-system)
482d9591 8702 (propagated-inputs
f861b8b8 8703 `(("python-colorama" ,python-colorama)
482d9591
HG
8704 ("python-botocore" ,python-botocore)
8705 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8706 ("python-docutils" ,python-docutils)
482d9591 8707 ("python-rsa" ,python-rsa)))
d4649177 8708 (native-inputs
482d9591 8709 `(("python-mock" ,python-mock)
f861b8b8 8710 ("python-nose" ,python-nose)
f861b8b8
DT
8711 ("python-sphinx" ,python-sphinx)
8712 ("python-tox" ,python-tox)
482d9591 8713 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8714 (home-page "http://aws.amazon.com/cli/")
8715 (synopsis "Command line client for AWS")
8716 (description "AWS CLI provides a unified command line interface to the
8717Amazon Web Services (AWS) API.")
3f641af0 8718 (license license:asl2.0)))
6a44697d
LF
8719
8720(define-public python-hypothesis
8721 (package
8722 (name "python-hypothesis")
bea6d94d 8723 (version "3.1.0")
6a44697d
LF
8724 (source (origin
8725 (method url-fetch)
8726 (uri (pypi-uri "hypothesis" version))
8727 (sha256
8728 (base32
bea6d94d 8729 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8730 (build-system python-build-system)
6a44697d
LF
8731 (propagated-inputs
8732 `(("python-flake8" ,python-flake8)
8733 ("python-pytest" ,python-pytest)))
8734 (synopsis "Library for property based testing")
8735 (description "Hypothesis is a library for testing your Python code against a
8736much larger range of examples than you would ever want to write by hand. It’s
8737based on the Haskell library, Quickcheck, and is designed to integrate
8738seamlessly into your existing Python unit testing work flow.")
8739 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8740 (license license:mpl2.0)
6f068e08 8741 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8742
8743(define-public python2-hypothesis
6f068e08
EF
8744 (let ((hypothesis (package-with-python2
8745 (strip-python2-variant python-hypothesis))))
8746 (package (inherit hypothesis)
8747 (native-inputs
f3b98f4f 8748 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8749
8750(define-public python-pytest-subtesthack
8751 (package
8752 (name "python-pytest-subtesthack")
8753 (version "0.1.1")
8754 (source (origin
8755 (method url-fetch)
8756 (uri (pypi-uri "pytest-subtesthack" version))
8757 (sha256
8758 (base32
8759 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8760 (build-system python-build-system)
7517e73c
LF
8761 (propagated-inputs
8762 `(("python-pytest" ,python-pytest)))
8763 (synopsis "Set-up and tear-down fixtures for unit tests")
8764 (description "This plugin allows you to set up and tear down fixtures within
8765unit test functions that use @code{py.test}. This is useful for using
8766@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8767function multiple times, without setting up or tearing down fixture state as is
8768normally the case.")
8769 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8770 (license license:unlicense)))
7517e73c
LF
8771
8772(define-public python2-pytest-subtesthack
8773 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8774
8775(define-public python2-xdo
8776 (package
8777 (name "python2-xdo")
8778 (version "0.2")
8779 (source (origin
8780 (method url-fetch)
8781 (uri (string-append
8782 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8783 "python-xdo_" version ".orig.tar.gz"))
8784 (sha256
8785 (base32
8786 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8787 (build-system python-build-system)
8788 (arguments
8789 `(#:python ,python-2
8790 #:tests? #f)) ; no tests provided
8791 (inputs
8792 `(("xdotool" ,xdotool)
8793 ("libX11" ,libx11)))
8794 (home-page "https://tracker.debian.org/pkg/python-xdo")
8795 (synopsis "Python library for simulating X11 keyboard/mouse input")
8796 (description "Provides bindings to libxdo for manipulating X11 via simulated
8797input. (Note that this is mostly a legacy library; you may wish to look at
8798python-xdo for newer bindings.)")
3f641af0 8799 (license license:bsd-3)))
0bdc1671 8800
cb34dc6c
CAW
8801(define-public python-wtforms
8802 (package
8803 (name "python-wtforms")
8804 (version "2.1")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "WTForms" version ".zip"))
8809 (sha256
8810 (base32
8811 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8812 (build-system python-build-system)
13c4d874
EF
8813 (arguments
8814 '(#:phases
8815 (modify-phases %standard-phases
8816 (add-after 'unpack 'remove-django-test
8817 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8818 (lambda _
8819 (substitute*
8820 "tests/runtests.py"
8821 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8822 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8823 #t)))))
cb34dc6c
CAW
8824 (native-inputs
8825 `(("unzip" ,unzip)))
8826 (home-page "http://wtforms.simplecodes.com/")
8827 (synopsis
8828 "Form validation and rendering library for Python web development")
8829 (description
8830 "WTForms is a flexible forms validation and rendering library
8831for Python web development. It is very similar to the web form API
8832available in Django, but is a standalone package.")
f210e944 8833 (license license:bsd-3)))
cb34dc6c
CAW
8834
8835(define-public python2-wtforms
f210e944 8836 (package-with-python2 python-wtforms))
50aaec25
DT
8837
8838(define-public python-mako
8839 (package
8840 (name "python-mako")
8841 (version "1.0.3")
8842 (source
8843 (origin
8844 (method url-fetch)
8845 (uri (pypi-uri "Mako" version))
8846 (sha256
8847 (base32
8848 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8849 (build-system python-build-system)
482d9591
HG
8850 (propagated-inputs
8851 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8852 (native-inputs
482d9591 8853 `(("python-mock" ,python-mock)
50aaec25
DT
8854 ("python-nose" ,python-nose)))
8855 (home-page "http://www.makotemplates.org/")
8856 (synopsis "Templating language for Python")
8857 (description "Mako is a templating language for Python that compiles
8858templates into Python modules.")
f210e944 8859 (license license:expat)))
50aaec25
DT
8860
8861(define-public python2-mako
f210e944 8862 (package-with-python2 python-mako))
ae00a41f
CAW
8863
8864(define-public python-waitress
8865 (package
8866 (name "python-waitress")
8867 (version "0.8.10")
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (pypi-uri "waitress" version))
8872 (sha256
8873 (base32
8874 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8875 (build-system python-build-system)
8876 (home-page "https://github.com/Pylons/waitress")
8877 (synopsis "Waitress WSGI server")
8878 (description "Waitress is meant to be a production-quality pure-Python WSGI
8879server with very acceptable performance.")
f210e944 8880 (license license:zpl2.1)))
ae00a41f
CAW
8881
8882(define-public python2-waitress
f210e944 8883 (package-with-python2 python-waitress))
778a284b
CAW
8884
8885(define-public python-wsgiproxy2
8886 (package
8887 (name "python-wsgiproxy2")
8888 (version "0.4.2")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8893 (sha256
8894 (base32
8895 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8896 (build-system python-build-system)
e359b31a
LF
8897 (arguments
8898 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8899 ;; support Python 3:
8900 ;; https://github.com/benoitc/restkit/issues/140
8901 #:tests? #f))
778a284b
CAW
8902 (native-inputs
8903 `(("unzip" ,unzip)
8904 ("python-nose" ,python-nose)
8905 ("python-coverage" ,python-coverage)))
8906 (propagated-inputs
8907 `(("python-six" ,python-six)
8908 ("python-webob" ,python-webob)))
8909 (home-page
8910 "https://github.com/gawel/WSGIProxy2/")
8911 (synopsis "WSGI Proxy with various http client backends")
8912 (description "WSGI turns HTTP requests into WSGI function calls.
8913WSGIProxy turns WSGI function calls into HTTP requests.
8914It also includes code to sign requests and pass private data,
8915and to spawn subprocesses to handle requests.")
f210e944 8916 (license license:expat)))
778a284b
CAW
8917
8918(define-public python2-wsgiproxy2
f210e944 8919 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8920
8921(define-public python-pastedeploy
8922 (package
8923 (name "python-pastedeploy")
8924 (version "1.5.2")
8925 (source
8926 (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "PasteDeploy" version))
8929 (sha256
8930 (base32
8931 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8932 (build-system python-build-system)
8933 (native-inputs
8934 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8935 (home-page "http://pythonpaste.org/deploy/")
8936 (synopsis
8937 "Load, configure, and compose WSGI applications and servers")
8938 (description
8939 "This tool provides code to load WSGI applications and servers from URIs;
8940these URIs can refer to Python Eggs for INI-style configuration files. Paste
8941Script provides commands to serve applications based on this configuration
8942file.")
8943 (license license:expat)))
8944
8945(define-public python2-pastedeploy
8946 (package-with-python2 python-pastedeploy))
1cf53652 8947
c4a7904c
CAW
8948(define-public python-paste
8949 (package
8950 (name "python-paste")
8951 (version "2.0.2")
8952 (source
8953 (origin
8954 (method url-fetch)
8955 (uri (pypi-uri "Paste" version))
8956 (sha256
8957 (base32
8958 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8959 (patches (search-patches "python-paste-remove-website-test.patch"
8960 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8961 (build-system python-build-system)
8962 (native-inputs
8963 `(("python-nose" ,python-nose)))
8964 (propagated-inputs
f3b98f4f 8965 `(("python-six" ,python-six)))
c4a7904c
CAW
8966 (arguments
8967 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8968 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8969 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8970 ;; still... things should be better by the next Paste release.)
8971 #:tests? #f))
8972 (home-page "http://pythonpaste.org")
8973 (synopsis
8974 "Python web development tools, focusing on WSGI")
8975 (description
8976 "Paste provides a variety of web development tools and middleware which
8977can be nested together to build web applications. Paste's design closely
8978follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8979 (license license:expat)
8980 (properties `((python2-variant . ,(delay python2-paste))))))
8981
8982(define-public python2-paste
8983 (let ((paste (package-with-python2
8984 (strip-python2-variant python-paste))))
8985 (package
8986 (inherit paste)
8987 (arguments
8988 ;; Tests are back for Python 2!
8989 `(#:tests? #t
8990 ,@(package-arguments paste))))))
8991
a8f20f63
CAW
8992(define-public python-pastescript
8993 (package
8994 (name "python-pastescript")
8995 (version "2.0.2")
8996 (source
8997 (origin
8998 (method url-fetch)
8999 (uri (pypi-uri "PasteScript" version))
9000 (sha256
9001 (base32
9002 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9003 (build-system python-build-system)
9004 (native-inputs
9005 `(("python-nose" ,python-nose)))
9006 (propagated-inputs
f3b98f4f 9007 `(("python-paste" ,python-paste)
a8f20f63
CAW
9008 ("python-pastedeploy" ,python-pastedeploy)))
9009 (home-page "http://pythonpaste.org/script/")
9010 (arguments
9011 '(;; Unfortunately, this requires the latest unittest2,
9012 ;; but that requires traceback2 which requires linecache2 which requires
9013 ;; unittest2. So we're skipping tests for now.
9014 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9015 ;; so in theory we could get around this situation somehow.)
9016 #:tests? #f))
9017 (synopsis
9018 "Pluggable command line tool for serving web applications and more")
9019 (description
9020 "PasteScript is a plugin-friendly command line tool which provides a
9021variety of features, from launching web applications to bootstrapping project
9022layouts.")
9023 (license license:expat)))
9024
9025(define-public python2-pastescript
9026 (package-with-python2 python-pastescript))
9027
1cf53652
CAW
9028(define-public python-pyquery
9029 (package
9030 (name "python-pyquery")
ab0c3429 9031 (version "1.2.17")
1cf53652
CAW
9032 (source
9033 (origin
9034 (method url-fetch)
9035 (uri (pypi-uri "pyquery" version))
9036 (sha256
9037 (base32
ab0c3429 9038 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9039 (build-system python-build-system)
2ddbfa8c
LF
9040 (native-inputs
9041 `(("python-webob" ,python-webob)
9042 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9043 (propagated-inputs
9044 `(("python-lxml" ,python-lxml)
9045 ("python-cssselect" ,python-cssselect)))
9046 (home-page "https://github.com/gawel/pyquery")
9047 (synopsis "Make jQuery-like queries on xml documents")
9048 (description "pyquery allows you to make jQuery queries on xml documents.
9049The API is as much as possible the similar to jQuery. pyquery uses lxml for
9050fast xml and html manipulation.")
f210e944 9051 (license license:bsd-3)))
1cf53652
CAW
9052
9053(define-public python2-pyquery
f210e944 9054 (package-with-python2 python-pyquery))
aa6313d6
CAW
9055
9056(define-public python-webtest
9057 (package
9058 (name "python-webtest")
9059 (version "2.0.20")
9060 (source
9061 (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "WebTest" version))
9064 (sha256
9065 (base32
9066 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9067 (build-system python-build-system)
9068 (arguments
9069 `(;; Unfortunately we have to disable tests!
9070 ;; This release of WebTest is pinned to python-nose < 1.3,
9071 ;; but older versions of python-nose are plagued with the following
9072 ;; bug(s), which rears its ugly head during test execution:
9073 ;; https://github.com/nose-devs/nose/issues/759
9074 ;; https://github.com/nose-devs/nose/pull/811
9075 #:tests? #f))
9076 ;; Commented out code is no good, but in this case, once tests
9077 ;; are ready to be enabled again, we should put the following
9078 ;; in place:
9079 ;; (native-inputs
9080 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9081 ;; ; but see above comment
9082 ;; ("python-coverage" ,python-coverage)
9083 ;; ("python-mock" ,python-mock)
9084 ;; ("python-pastedeploy" ,python-pastedeploy)
9085 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9086 ;; ("python-pyquery" ,python-pyquery)))
9087 (propagated-inputs
9088 `(("python-waitress" ,python-waitress)
9089 ("python-webob" ,python-webob)
9090 ("python-six" ,python-six)
9091 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9092 (home-page "http://webtest.pythonpaste.org/")
9093 (synopsis "Helper to test WSGI applications")
9094 (description "Webtest allows you to test your Python web applications
9095without starting an HTTP server. It supports anything that supports the
9096minimum of WSGI.")
f210e944 9097 (license license:expat)))
aa6313d6
CAW
9098
9099(define-public python2-webtest
f210e944 9100 (package-with-python2 python-webtest))
4cb122cd
CAW
9101
9102(define-public python-anyjson
9103 (package
9104 (name "python-anyjson")
9105 (version "0.3.3")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "anyjson" version))
9110 (sha256
9111 (base32
9112 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9113 (build-system python-build-system)
9114 (arguments
9115 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9116 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9117 ;; whatever) so this transformation needs to be done before the tests
9118 ;; can be run. Maybe we could add a build step to transform beforehand
9119 ;; but it could be annoying/difficult.
9120 ;; We can enable tests for the Python 2 version, though, and do below.
9121 #:tests? #f))
9122 (home-page "http://bitbucket.org/runeh/anyjson/")
9123 (synopsis
9124 "Wraps best available JSON implementation in a common interface")
9125 (description
9126 "Anyjson loads whichever is the fastest JSON module installed
9127and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9128 (license license:bsd-3)
4cb122cd
CAW
9129 (properties `((python2-variant . ,(delay python2-anyjson))))))
9130
9131(define-public python2-anyjson
9132 (let ((anyjson (package-with-python2
9133 (strip-python2-variant python-anyjson))))
9134 (package
9135 (inherit anyjson)
9136 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9137 #:tests? #t
9138 ,@(package-arguments anyjson)))
00e10c6e 9139 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9140
9141(define-public python-amqp
9142 (package
9143 (name "python-amqp")
9144 (version "1.4.9")
9145 (source
9146 (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "amqp" version))
9149 (sha256
9150 (base32
9151 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9152 (build-system python-build-system)
9153 (native-inputs
9154 `(("python-nose" ,python-nose)
9155 ("python-mock" ,python-mock)))
9156 (home-page "http://github.com/celery/py-amqp")
9157 (synopsis
9158 "Low-level AMQP client for Python (fork of amqplib)")
9159 (description
9160 "This is a fork of amqplib which was originally written by Barry Pederson.
9161It is maintained by the Celery project, and used by kombu as a pure python
9162alternative when librabbitmq is not available.")
3f641af0 9163 (license license:lgpl2.1+)
8dfceab7
CAW
9164 (properties `((python2-variant . ,(delay python2-amqp))))))
9165
9166(define-public python2-amqp
9167 (let ((amqp (package-with-python2
9168 (strip-python2-variant python-amqp))))
9169 (package
9170 (inherit amqp)
9171 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9172 ;; unmaintained. Weirdly, does not do this on the python 3
9173 ;; version?
9174 #:tests? #f
00e10c6e 9175 ,@(package-arguments amqp))))))
7d387305
CAW
9176
9177(define-public python-kombu
9178 (package
9179 (name "python-kombu")
0cb59822 9180 (version "3.0.37")
7d387305
CAW
9181 (source
9182 (origin
9183 (method url-fetch)
9184 (uri (pypi-uri "kombu" version))
9185 (sha256
9186 (base32
0cb59822 9187 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9188 (build-system python-build-system)
9189 (native-inputs
9190 `(("python-mock" ,python-mock)
9191 ("python-nose" ,python-nose)))
9192 (propagated-inputs
9193 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9194 ("python-amqp" ,python-amqp)
9195 ("python-redis" ,python-redis)))
7d387305
CAW
9196 (home-page "http://kombu.readthedocs.org")
9197 (synopsis "Message passing library for Python")
9198 (description "The aim of Kombu is to make messaging in Python as easy as
9199possible by providing an idiomatic high-level interface for the AMQ protocol,
9200and also provide proven and tested solutions to common messaging problems.
9201AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9202message orientation, queuing, routing, reliability and security, for which the
9203RabbitMQ messaging server is the most popular implementation.")
3f641af0 9204 (license license:bsd-3)
7d387305
CAW
9205 (properties `((python2-variant . ,(delay python2-kombu))))))
9206
9207(define-public python2-kombu
9208 (let ((kombu (package-with-python2
9209 (strip-python2-variant python-kombu))))
9210 (package
9211 (inherit kombu)
328bb95d
HG
9212 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9213 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9214
9215(define-public python-billiard
9216 (package
9217 (name "python-billiard")
a6bb9e44 9218 (version "3.3.0.23")
b6f0b9fb
CAW
9219 (source
9220 (origin
9221 (method url-fetch)
9222 (uri (pypi-uri "billiard" version))
9223 (sha256
9224 (base32
a6bb9e44 9225 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9226 (build-system python-build-system)
9227 (native-inputs
9228 `(("python-nose" ,python-nose)))
9229 (home-page "http://github.com/celery/billiard")
9230 (synopsis
9231 "Python multiprocessing fork with improvements and bugfixes")
9232 (description
9233 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9234multiprocessing package itself is a renamed and updated version of R Oudkerk's
9235pyprocessing package. This standalone variant is intended to be compatible with
9236Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9237 (license license:bsd-3)
b6f0b9fb
CAW
9238 (properties `((python2-variant . ,(delay python2-billiard))))))
9239
9240(define-public python2-billiard
9241 (let ((billiard (package-with-python2
9242 (strip-python2-variant python-billiard))))
9243 (package
9244 (inherit billiard)
00e10c6e 9245 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9246 ("python2-mock" ,python2-mock)
9247 ,@(package-native-inputs billiard))))))
22df6419
CAW
9248
9249(define-public python-celery
9250 (package
9251 (name "python-celery")
9ebe87fe 9252 (version "3.1.24")
22df6419
CAW
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "celery" version))
9257 (sha256
9258 (base32
9ebe87fe 9259 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9260 (build-system python-build-system)
9ebe87fe
LF
9261 (arguments
9262 `(#:phases
9263 (modify-phases %standard-phases
9264 ;; These tests break with Python 3.5:
9265 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9266 (replace 'check
9267 (lambda _
9268 (zero?
9269 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9270 (native-inputs
9271 `(("python-nose" ,python-nose)))
f22efa01 9272 (propagated-inputs
22df6419
CAW
9273 `(("python-pytz" ,python-pytz)
9274 ("python-billiard" ,python-billiard)
9275 ("python-kombu" ,python-kombu)))
9276 (home-page "http://celeryproject.org")
9277 (synopsis "Distributed Task Queue")
9278 (description "Celery is an asynchronous task queue/job queue based on
9279distributed message passing. It is focused on real-time operation, but
9280supports scheduling as well. The execution units, called tasks, are executed
9281concurrently on a single or more worker servers using multiprocessing,
9282Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9283synchronously (wait until ready).")
3f641af0 9284 (license license:bsd-3)
22df6419
CAW
9285 (properties `((python2-variant . ,(delay python2-celery))))))
9286
9287(define-public python2-celery
9288 (let ((celery (package-with-python2
9289 (strip-python2-variant python-celery))))
9290 (package
9291 (inherit celery)
00e10c6e 9292 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9293 ("python2-mock" ,python2-mock)
9294 ,@(package-native-inputs celery))))))
97e32948
CAW
9295
9296(define-public python-translitcodec
9297 (package
9298 (name "python-translitcodec")
9299 (version "0.4.0")
9300 (source
9301 (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "translitcodec" version))
9304 (sha256
9305 (base32
9306 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9307 (build-system python-build-system)
9308 (arguments
9309 `(#:tests? #f)) ; no tests provided
9310 (home-page
9311 "https://github.com/claudep/translitcodec")
9312 (synopsis
9313 "Unicode to 8-bit charset transliteration codec")
9314 (description
9315 "This package contains codecs for transliterating ISO 10646 texts into
9316best-effort representations using smaller coded character sets (ASCII,
9317ISO 8859, etc.).")
f210e944 9318 (license license:expat)))
97e32948
CAW
9319
9320(define-public python2-translitcodec
f210e944 9321 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9322
9323(define-public python-editor
9324 (package
9325 (name "python-editor")
9326 (version "0.5")
9327 (source
9328 (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "python-editor" version))
9331 (sha256
9332 (base32
9333 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9334 (build-system python-build-system)
9335 (home-page
9336 "https://github.com/fmoo/python-editor")
9337 (synopsis
9338 "Programmatically open an editor, capture the result")
9339 (description
9340 "python-editor is a library that provides the editor module for
9341programmatically interfacing with your system's $EDITOR.")
f210e944 9342 (license license:asl2.0)))
0c3b90d4
CAW
9343
9344(define-public python2-editor
f210e944 9345 (package-with-python2 python-editor))
3276517c
LF
9346
9347(define-public python-sphinxcontrib-programoutput
9348 (package
9349 (name "python-sphinxcontrib-programoutput")
9350 (version "0.8")
9351 (source (origin
9352 (method url-fetch)
9353 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9354 (sha256
9355 (base32
9356 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9357 (build-system python-build-system)
9358 (propagated-inputs
a0a09859 9359 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9360 (synopsis "Sphinx extension to include program output")
9361 (description "A Sphinx extension to literally insert the output of arbitrary
9362commands into documents, helping you to keep your command examples up to date.")
9363 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9364 (license license:bsd-2)))
3276517c
LF
9365
9366(define-public python2-sphinxcontrib-programoutput
f210e944 9367 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9368
9369(define-public python-sphinx-repoze-autointerface
9370 (package
9371 (name "python-sphinx-repoze-autointerface")
328ae341 9372 (version "0.8")
548d7165
LF
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9376 (sha256
9377 (base32
328ae341 9378 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9379 (build-system python-build-system)
9380 (propagated-inputs
47c7dc4a 9381 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9382 ("python-zope-interface" ,python-zope-interface)))
9383 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9384 (description "This package defines an extension for the Sphinx documentation
9385system. The extension allows generation of API documentation by
9386introspection of @code{zope.interface} instances in code.")
9387 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9388 (license license:repoze)))
548d7165
LF
9389
9390(define-public python2-sphinx-repoze-autointerface
9391 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9392
9393(define-public python-psycopg2
9394 (package
9395 (name "python-psycopg2")
9396 (version "2.6.1")
9397 (source
9398 (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "psycopg2" version))
9401 (sha256
9402 (base32
9403 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9404 (build-system python-build-system)
9405 (arguments
9406 ;; Tests would require a postgresql database "psycopg2_test"
9407 ;; and a running postgresql database management service.
9408 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9409 (inputs
9410 `(("postgresql" ,postgresql))) ; libpq
9411 (home-page "http://initd.org/psycopg/")
9412 (synopsis "Python PostgreSQL adapter")
9413 (description
9414 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9415 (license license:lgpl3+)))
b31fbea5
DM
9416
9417(define-public python2-psycopg2
f210e944 9418 (package-with-python2 python-psycopg2))
eed1a61f
LF
9419
9420(define-public python-vobject
9421 (package
9422 (name "python-vobject")
9bed9b15 9423 (version "0.9.2")
eed1a61f
LF
9424 (source (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "vobject" version))
9427 (sha256
9428 (base32
9bed9b15 9429 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9430 (build-system python-build-system)
a9871b7b
LF
9431 (arguments
9432 '(;; The test suite relies on some non-portable Windows interfaces.
9433 #:tests? #f))
f22efa01 9434 (propagated-inputs
eed1a61f
LF
9435 `(("python-dateutil-2" ,python-dateutil-2)
9436 ("python-pyicu" ,python-pyicu)))
9437 (synopsis "Parse and generate vCard and vCalendar files")
9438 (description "Vobject is intended to be a full featured Python package for
9439parsing and generating vCard and vCalendar files. Currently, iCalendar files
9440are supported and well tested. vCard 3.0 files are supported, and all data
9441should be imported, but only a few components are understood in a sophisticated
9442way.")
9443 (home-page "http://eventable.github.io/vobject/")
f210e944 9444 (license license:asl2.0)))
eed1a61f
LF
9445
9446(define-public python2-vobject
f210e944 9447 (package-with-python2 python-vobject))
cedac813
LF
9448
9449(define-public python-munkres
9450 (package
9451 (name "python-munkres")
38e81a2c 9452 (version "1.0.8")
cedac813
LF
9453 (source (origin
9454 (method url-fetch)
9455 (uri (pypi-uri "munkres" version))
9456 (sha256
9457 (base32
38e81a2c 9458 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9459 (build-system python-build-system)
9460 (arguments
9461 '(#:tests? #f)) ; no test suite
9462 (home-page "http://software.clapper.org/munkres/")
9463 (synopsis "Implementation of the Munkres algorithm")
9464 (description "The Munkres module provides an implementation of the Munkres
9465algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9466useful for solving the Assignment Problem.")
3f641af0 9467 (license license:bsd-3)))
cedac813
LF
9468
9469(define-public python2-munkres
9470 (package-with-python2 python-munkres))
f3b3d78f
LF
9471
9472(define-public python-flask
9473 (package
9474 (name "python-flask")
c6c80104 9475 (version "0.11.1")
f3b3d78f
LF
9476 (source (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "Flask" version))
9479 (sha256
9480 (base32
c6c80104 9481 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9482 (build-system python-build-system)
9483 (propagated-inputs
9484 `(("python-itsdangerous" ,python-itsdangerous)
9485 ("python-jinja2" ,python-jinja2)
8f35c030 9486 ("python-click" ,python-click)
f3b3d78f
LF
9487 ("python-werkzeug" ,python-werkzeug)))
9488 (home-page "https://github.com/mitsuhiko/flask/")
9489 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9490 (description "Flask is a micro web framework based on the Werkzeug toolkit
9491and Jinja2 template engine. It is called a micro framework because it does not
9492presume or force a developer to use a particular tool or library.")
f210e944 9493 (license license:bsd-3)))
f3b3d78f
LF
9494
9495(define-public python2-flask
f210e944 9496 (package-with-python2 python-flask))
603d665b 9497
a7ad802b 9498(define-public python-flask-wtf
9499 (package
9500 (name "python-flask-wtf")
9501 (version "0.13.1")
9502 (source
9503 (origin
9504 (method url-fetch)
9505 (uri (pypi-uri "Flask-WTF" version))
9506 (sha256
9507 (base32
9508 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9509 (build-system python-build-system)
9510 (propagated-inputs
9511 `(("python-flask-babel" ,python-flask-babel)
9512 ("python-babel" ,python-babel)
9513 ("python-wtforms" ,python-wtforms)))
9514 (native-inputs
9515 `(("python-nose" ,python-nose)))
9516 (home-page "https://github.com/lepture/flask-wtf")
9517 (synopsis "Simple integration of Flask and WTForms")
9518 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9519upload, and reCAPTCHA.")
9520 (license license:bsd-3)))
9521
9522(define-public python2-flask-wtf
9523 (package-with-python2 python-flask-wtf))
9524
a2c7d88e 9525(define-public python-flask-multistatic
9526 (package
9527 (name "python-flask-multistatic")
9528 (version "1.0")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "flask-multistatic" version))
9533 (sha256
9534 (base32
9535 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9536 (build-system python-build-system)
9537 (propagated-inputs
9538 `(("python-flask" ,python-flask)))
9539 (home-page "https://pagure.io/flask-multistatic")
9540 (synopsis "Flask plugin to allow overriding static files")
9541 (description "@code{flask-multistatic} is a flask plugin that adds support
9542for overriding static files.")
9543 (license license:gpl3+)))
9544
9545(define-public python2-flask-multistatic
9546 (package-with-python2 python-flask-multistatic))
9547
603d665b
LF
9548(define-public python-cookies
9549 (package
9550 (name "python-cookies")
9551 (version "2.2.1")
9552 (source (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "cookies" version))
9555 (sha256
9556 (base32
9557 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9558 (build-system python-build-system)
9559 (arguments
9560 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9561 #:tests? #f))
9562 (native-inputs
9563 `(("python-pytest" ,python2-pytest)))
9564 (synopsis "HTTP cookie parser and renderer")
9565 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9566Python.")
9567 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9568 (license license:expat)))
603d665b
LF
9569
9570(define-public python2-cookies
f210e944 9571 (package-with-python2 python-cookies))
0efde7d6
LF
9572
9573(define-public python-responses
9574 (package
9575 (name "python-responses")
9576 (version "0.5.1")
9577 (source (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "responses" version))
9580 (sha256
9581 (base32
9582 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9583 (build-system python-build-system)
9584 (arguments
9585 `(;; Test suite is not distributed:
9586 ;; https://github.com/getsentry/responses/issues/38
9587 #:tests? #f))
9588 (native-inputs
d8ea5f2f 9589 `(("python-mock" ,python-mock)))
0efde7d6
LF
9590 (propagated-inputs
9591 `(("python-requests" ,python-requests)
d8ea5f2f 9592 ("python-cookies" ,python-cookies)
0efde7d6
LF
9593 ("python-six" ,python-six)))
9594 (home-page "https://github.com/getsentry/responses")
9595 (synopsis "Utility for mocking out the `requests` Python library")
9596 (description "A utility library for mocking out the `requests` Python
9597library.")
f210e944 9598 (license license:asl2.0)))
0efde7d6
LF
9599
9600(define-public python2-responses
f210e944 9601 (package-with-python2 python-responses))
76b94885 9602
b7afd018
RW
9603(define-public python-whoosh
9604 (package
9605 (name "python-whoosh")
9606 (version "2.7.4")
9607 (source
9608 (origin
9609 (method url-fetch)
9610 (uri (pypi-uri "Whoosh" version))
9611 (sha256
9612 (base32
9613 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9614 (build-system python-build-system)
9615 (native-inputs
f3b98f4f 9616 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9617 (home-page "http://bitbucket.org/mchaput/whoosh")
9618 (synopsis "Full text indexing, search, and spell checking library")
9619 (description
9620 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9621checking library.")
9622 (license license:bsd-2)))
9623
9624(define-public python2-whoosh
9625 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9626 (package (inherit whoosh)
9627 (propagated-inputs
9628 `(("python2-backport-ssl-match-hostname"
9629 ,python2-backport-ssl-match-hostname)
9630 ,@(package-propagated-inputs whoosh))))))
9631
76b94885
LF
9632(define-public python-pathlib
9633 (package
9634 (name "python-pathlib")
9635 (version "1.0.1")
9636 (source (origin
9637 (method url-fetch)
9638 (uri (pypi-uri "pathlib" version))
9639 (sha256
9640 (base32
9641 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9642 (build-system python-build-system)
92a312dc
RW
9643 ;; The tests depend on the internal "test" module, which does not provide
9644 ;; a stable interface.
9645 (arguments `(#:tests? #f))
76b94885 9646 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9647 (synopsis "Object-oriented file system paths")
9648 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9649It offers the following advantages over using string objects:
9650
9651@enumerate
9652@item No more cumbersome use of os and os.path functions. Everything can
9653be done easily through operators, attribute accesses, and method calls.
9654@item Embodies the semantics of different path types. For example,
9655comparing Windows paths ignores casing.
9656@item Well-defined semantics, eliminating any inconsistencies or
9657ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9658@end enumerate
9659
9660Note: In Python 3.4, pathlib is now part of the standard library. For other
9661Python versions please consider python-pathlib2 instead, which tracks the
9662standard library module. This module (python-pathlib) isn't maintained
9663anymore.")
76b94885
LF
9664 (license license:expat)))
9665
9666(define-public python2-pathlib
9667 (package-with-python2 python-pathlib))
25a7db0a 9668
b7703c81
HG
9669(define-public python2-pathlib2
9670 (package
9671 (name "python2-pathlib2")
9672 (version "2.1.0")
9673 (source (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "pathlib2" version))
9676 (sha256
9677 (base32
9678 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9679 (build-system python-build-system)
49a531f5
HG
9680 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9681 ;; version is 3.4 which already includes this package as part of the
9682 ;; standard library.
b7703c81
HG
9683 (arguments
9684 `(#:python ,python-2))
9685 (native-inputs
f3b98f4f 9686 `(("python2-six" ,python2-six)))
b7703c81
HG
9687 (home-page "http://pypi.python.org/pypi/pathlib2/")
9688 (synopsis "Object-oriented file system paths - backport of standard
9689pathlib module")
9690 (description "The goal of pathlib2 is to provide a backport of standard
9691pathlib module which tracks the standard library module, so all the newest
9692features of the standard pathlib can be used also on older Python versions.
9693
9694Pathlib offers a set of classes to handle file system paths. It offers the
9695following advantages over using string objects:
9696
9697@enumerate
9698@item No more cumbersome use of os and os.path functions. Everything can
9699be done easily through operators, attribute accesses, and method calls.
9700@item Embodies the semantics of different path types. For example,
9701comparing Windows paths ignores casing.
9702@item Well-defined semantics, eliminating any inconsistencies or
9703ambiguities (forward vs. backward slashes, etc.).
9704@end enumerate")
9705 (license license:expat)))
9706
25a7db0a
LF
9707(define-public python-jellyfish
9708 (package
9709 (name "python-jellyfish")
8c4964dd 9710 (version "0.5.6")
25a7db0a
LF
9711 (source (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "jellyfish" version))
9714 (sha256
9715 (base32
8c4964dd 9716 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9717 (build-system python-build-system)
9718 (native-inputs
9719 `(("python-pytest" ,python-pytest)))
9720 (home-page "https://github.com/jamesturk/jellyfish")
9721 (synopsis "Approximate and phonetic matching of strings")
9722 (description "Jellyfish uses a variety of string comparison and phonetic
9723encoding algorithms to do fuzzy string matching.")
3f641af0 9724 (license license:bsd-2)
25a7db0a
LF
9725 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9726
9727(define-public python2-jellyfish
9728 (let ((jellyfish (package-with-python2
9729 (strip-python2-variant python-jellyfish))))
9730 (package (inherit jellyfish)
00e10c6e 9731 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9732 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9733
9734(define-public python2-unicodecsv
9735 (package
9736 (name "python2-unicodecsv")
9737 (version "0.14.1")
9738 (source (origin
9739 (method url-fetch)
9740 ;; The test suite is not included in the PyPi release.
9741 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9742 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9743 "archive/" version ".tar.gz"))
9744 (file-name (string-append name "-" version ".tar.gz"))
9745 (sha256
9746 (base32
9747 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9748 (build-system python-build-system)
9749 (arguments
9750 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9751 #:python ,python-2))
9752 (native-inputs
f3b98f4f 9753 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9754 (home-page "https://github.com/jdunck/python-unicodecsv")
9755 (synopsis "Unicode CSV module for Python 2")
9756 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9757module, adding support for Unicode strings.")
3f641af0 9758 (license license:bsd-2)))
064503aa
LF
9759
9760(define-public python-rarfile
9761 (package
9762 (name "python-rarfile")
67824447 9763 (version "2.8")
064503aa
LF
9764 (source (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "rarfile" version))
9767 (sha256
9768 (base32
67824447 9769 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9770 (build-system python-build-system)
9771 (arguments
9772 '(#:phases
9773 (modify-phases %standard-phases
9774 (replace 'check
9775 ;; Many tests fail, but the installation proceeds.
9776 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9777 (native-inputs
9778 `(("which" ,which))) ; required for tests
9779 (propagated-inputs
9780 `(("libarchive" ,libarchive)))
9781 (home-page "https://github.com/markokr/rarfile")
9782 (synopsis "RAR archive reader for Python")
9783 (description "This is Python module for RAR archive reading. The interface
9784is made as zipfile like as possible.")
3f641af0 9785 (license license:isc)))
064503aa
LF
9786
9787(define-public python2-rarfile
9788 (package-with-python2 python-rarfile))
daeeea71
CM
9789
9790(define-public python-magic
9791 (package
9792 (name "python-magic")
9793 (version "0.4.3")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9798 version ".tar.gz"))
9799 (sha256
9800 (base32
9801 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9802 (file-name (string-append name "-" version "-checkout"))))
9803 (build-system python-build-system)
9804 (arguments
9805 ;; The tests are unreliable, so don't run them. The tests fail
9806 ;; under Python3 because they were written for Python2 and
9807 ;; contain import statements that do not work in Python3. One of
9808 ;; the tests fails under Python2 because its assertions are
9809 ;; overly stringent; it relies on comparing output strings which
9810 ;; are brittle and can change depending on the version of
9811 ;; libmagic being used and the system on which the test is
9812 ;; running. In my case, under GuixSD 0.10.0, only one test
9813 ;; failed, and it seems to have failed only because the version
9814 ;; of libmagic that is packaged in Guix outputs a slightly
9815 ;; different (but not wrong) string than the one that the test
9816 ;; expected.
9817 '(#:tests? #f
9818 #:phases (modify-phases %standard-phases
9819 ;; Replace a specific method call with a hard-coded
9820 ;; path to the necessary libmagic.so file in the
9821 ;; store. If we don't do this, then the method call
9822 ;; will fail to find the libmagic.so file, which in
9823 ;; turn will cause any application using
9824 ;; python-magic to fail.
9825 (add-before 'build 'hard-code-path-to-libmagic
9826 (lambda* (#:key inputs #:allow-other-keys)
9827 (let ((file (assoc-ref inputs "file")))
9828 (substitute* "magic.py"
9829 (("ctypes.util.find_library\\('magic'\\)")
9830 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9831 #t)))
9832 (add-before 'install 'disable-egg-compression
9833 (lambda _
9834 (let ((port (open-file "setup.cfg" "a")))
9835 (display "\n[easy_install]\nzip_ok = 0\n"
9836 port)
9837 (close-port port)
9838 #t))))))
daeeea71
CM
9839 (inputs
9840 ;; python-magic needs to be able to find libmagic.so.
9841 `(("file" ,file)))
9842 (home-page "https://github.com/ahupp/python-magic")
9843 (synopsis "File type identification using libmagic")
9844 (description
9845 "This module uses ctypes to access the libmagic file type
9846identification library. It makes use of the local magic database and
9847supports both textual and MIME-type output. Note that this module and
9848the python-file module both provide a \"magic.py\" file; these two
9849modules, which are different and were developed separately, both serve
9850the same purpose: to provide Python bindings for libmagic.")
9851 (license license:expat)))
9852
9853(define-public python2-magic
9854 (package-with-python2 python-magic))
12af303f
CM
9855
9856(define-public python2-s3cmd
9857 (package
9858 (name "python2-s3cmd")
9859 (version "1.6.1")
9860 (source
9861 (origin
9862 (method url-fetch)
de67e922 9863 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9864 "s3cmd-" version ".tar.gz"))
9865 (sha256
9866 (base32
9867 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9868 (build-system python-build-system)
9869 (arguments
9870 ;; s3cmd is written for python2 only and contains no tests.
9871 `(#:python ,python-2
9872 #:tests? #f))
f22efa01 9873 (propagated-inputs
12af303f
CM
9874 `(("python2-dateutil" ,python2-dateutil)
9875 ;; The python-file package also provides a magic.py module.
9876 ;; This is an unfortunate state of affairs; however, s3cmd
9877 ;; fails to install if it cannot find specifically the
9878 ;; python-magic package. Thus we include it, instead of using
9879 ;; python-file. Ironically, s3cmd sometimes works better
9880 ;; without libmagic bindings at all:
9881 ;; https://github.com/s3tools/s3cmd/issues/198
9882 ("python2-magic" ,python2-magic)))
9883 (home-page "http://s3tools.org/s3cmd")
9884 (synopsis "Command line tool for S3-compatible storage services")
9885 (description
9886 "S3cmd is a command line tool for uploading, retrieving and managing data
9887in storage services that are compatible with the Amazon Simple Storage
9888Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9889GnuPG encryption, and more. It also supports management of Amazon's
9890CloudFront content delivery network.")
3f641af0 9891 (license license:gpl2+)))
4323a5f0
AE
9892
9893(define-public python-pkgconfig
9894 (package
9895 (name "python-pkgconfig")
9896 (version "1.1.0")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "pkgconfig" version))
9901 (sha256
9902 (base32
9903 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9904 (build-system python-build-system)
9905 (native-inputs
f3b98f4f 9906 `(("python-nose" ,python-nose)))
4323a5f0
AE
9907 (inputs
9908 `(("pkg-config" ,pkg-config)))
9909 (arguments
9910 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9911 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9912 #:tests? #f
4323a5f0
AE
9913 ;; Hard-code the path to pkg-config.
9914 #:phases
9915 (modify-phases %standard-phases
9916 (add-before
9917 'build 'patch
9918 (lambda _
9919 (substitute* "pkgconfig/pkgconfig.py"
9920 (("cmd = 'pkg-config")
9921 (string-append "cmd = '" (which "pkg-config"))))
9922 #t)))))
9923 (home-page "http://github.com/matze/pkgconfig")
9924 (synopsis "Python interface for pkg-config")
9925 (description "This module provides a Python interface to pkg-config. It
9926can be used to find all pkg-config packages, check if a package exists,
9927check if a package meets certain version requirements, query CFLAGS and
9928LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9929 (license license:expat)))
4323a5f0
AE
9930
9931(define-public python2-pkgconfig
9932 (package-with-python2 python-pkgconfig))
9933
2e697322
BW
9934(define-public python-bz2file
9935 (package
9936 (name "python-bz2file")
9937 (version "0.98")
9938 (source
9939 (origin
9940 (method url-fetch)
9941 (uri (pypi-uri "bz2file" version))
9942 (sha256
9943 (base32
9944 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9945 (build-system python-build-system)
9946 (arguments
124df723 9947 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9948 (home-page "https://github.com/nvawda/bz2file")
9949 (synopsis "Read and write bzip2-compressed files")
9950 (description
9951 "Bz2file is a Python library for reading and writing bzip2-compressed
9952files. It contains a drop-in replacement for the I/O interface in the
9953standard library's @code{bz2} module, including features from the latest
9954development version of CPython that are not available in older releases.")
3f641af0 9955 (license license:asl2.0)
2e697322
BW
9956 (properties `((python2-variant . ,(delay python2-bz2file))))))
9957
9958(define-public python2-bz2file
9959 (let ((base (package-with-python2
9960 (strip-python2-variant python-bz2file))))
9961 (package
9962 (inherit base)
124df723 9963 (arguments
752bb447
BW
9964 `(#:python ,python-2
9965 #:phases
124df723
BW
9966 (modify-phases %standard-phases
9967 ;; 'python setup.py test' does not work as of 0.98.
9968 ;; There is only the one test file, so we run it directly.
9969 (replace 'check
9970 (lambda _ (zero? (system* "python"
9971 "test_bz2file.py"))))))))))
2e697322 9972
da4ac1aa
BW
9973(define-public python-future
9974 (package
9975 (name "python-future")
9976 (version "0.15.2")
9977 (source
9978 (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "future" version))
9981 (sha256
9982 (base32
9983 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9984 (build-system python-build-system)
9985 ;; Many tests connect to the network or are otherwise flawed.
9986 ;; https://github.com/PythonCharmers/python-future/issues/210
9987 (arguments
9988 `(#:tests? #f))
9989 (home-page "http://python-future.org")
9990 (synopsis "Single-source support for Python 3 and 2")
9991 (description
9992 "@code{python-future} is the missing compatibility layer between Python 2 and
9993Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9994to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9995 (license license:expat)))
da4ac1aa
BW
9996
9997(define-public python2-future
f210e944 9998 (package-with-python2 python-future))
da4ac1aa 9999
8e451885
AE
10000(define-public python-cysignals
10001 (package
10002 (name "python-cysignals")
10003 (version "1.1.0")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10008 (sha256
10009 (base32
10010 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10011 (build-system python-build-system)
10012 (native-inputs
10013 `(("python-cython" ,python-cython)
8e451885
AE
10014 ("python-sphinx" ,python-sphinx)))
10015 (inputs
10016 `(("pari-gp" ,pari-gp)))
10017 (arguments
10018 `(#:modules ((guix build python-build-system)
10019 ((guix build gnu-build-system) #:prefix gnu:)
10020 (guix build utils))
10021 ;; FIXME: Tests are executed after installation and currently fail
10022 ;; when not installing into standard locations; the author is working
10023 ;; on a fix.
10024 #:tests? #f
10025 #:phases
10026 (modify-phases %standard-phases
10027 (add-before
10028 'build 'configure
10029 (assoc-ref gnu:%standard-phases 'configure)))))
10030 (home-page
10031 "https://github.com/sagemath/cysignals")
10032 (synopsis
10033 "Handling of interrupts and signals for Cython")
10034 (description
10035 "The cysignals package provides mechanisms to handle interrupts (and
10036other signals and errors) in Cython code, using two related approaches,
10037for mixed Cython/Python code or external C libraries and pure Cython code,
10038respectively.")
3f641af0 10039 (license license:lgpl3+)))
8e451885
AE
10040
10041(define-public python2-cysignals
10042 (package-with-python2 python-cysignals))
10043
63bcec71
DM
10044(define-public python2-shedskin
10045 (package
10046 (name "python2-shedskin")
10047 (version "0.9.4")
10048 (source
10049 (origin
10050 (method url-fetch)
10051 (uri (string-append "https://github.com/shedskin/shedskin/"
10052 "releases/download/v" version
10053 "/shedskin-" version ".tgz"))
10054 (sha256
10055 (base32
10056 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10057 (build-system python-build-system)
10058 (arguments
10059 `(#:python ,python-2
10060 #:phases (modify-phases %standard-phases
10061 (add-after 'unpack 'fix-resulting-include-libs
10062 (lambda* (#:key inputs #:allow-other-keys)
10063 (let ((libgc (assoc-ref inputs "libgc"))
10064 (pcre (assoc-ref inputs "pcre")))
10065 (substitute* "shedskin/makefile.py"
10066 (("variable == 'CCFLAGS':[ ]*")
10067 (string-append "variable == 'CCFLAGS':\n"
10068 " line += ' -I " pcre "/include"
10069 " -I " libgc "/include'"))
10070 (("variable == 'LFLAGS':[ ]*")
10071 (string-append "variable == 'LFLAGS':\n"
10072 " line += ' -L" pcre "/lib"
10073 " -L " libgc "/lib'")))
10074 #t))))))
63bcec71
DM
10075 (inputs `(("pcre" ,pcre)
10076 ("libgc" ,libgc)))
10077 (home-page "https://shedskin.github.io/")
10078 (synopsis "Experimental Python-2 to C++ Compiler")
10079 (description (string-append "This is an experimental compiler for a subset of
10080Python. It generates C++ code and a Makefile."))
3f641af0 10081 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10082
10083(define-public python2-rope
10084 (package
10085 (name "python2-rope")
10086 (version "0.10.3")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "rope" version))
10091 (sha256
10092 (base32
10093 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10094 (arguments
10095 ;; Rope is currently python-2 only.
10096 ;; https://github.com/python-rope/rope/issues/57
10097 `(#:python ,python-2))
10098 (build-system python-build-system)
10099 (native-inputs
f3b98f4f 10100 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10101 (home-page "https://github.com/python-rope/rope")
10102 (synopsis "Refactoring library for Python")
10103 (description "Rope is a refactoring library for Python. It facilitates
10104the renaming, moving and extracting of attributes, functions, modules, fields
10105and parameters in Python 2 source code. These refactorings can also be applied
10106to occurences in strings and comments.")
3f641af0 10107 (license license:gpl2)))
6ba8ca17
10108
10109(define-public python-py3status
10110 (package
10111 (name "python-py3status")
d2262d70 10112 (version "3.1")
6ba8ca17
10113 (source
10114 (origin
10115 (method url-fetch)
10116 (uri (pypi-uri "py3status" version))
10117 (sha256
10118 (base32
d2262d70 10119 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10120 (build-system python-build-system)
6ba8ca17
10121 (home-page "https://github.com/ultrabug/py3status")
10122 (synopsis "Extensible i3status wrapper written in Python")
10123 (description "py3status is an i3status wrapper which extends i3status
10124functionality in a modular way, allowing you to extend your panel with your
10125own code, responding to click events and updating clock every second.")
3f641af0 10126 (license license:bsd-3)))
b8fdbca3
HG
10127
10128(define-public python-tblib
10129 (package
10130 (name "python-tblib")
10131 (version "1.3.0")
10132 (source (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "tblib" version))
10135 (sha256 (base32
10136 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10137 (build-system python-build-system)
10138 (arguments
10139 `(#:phases
10140 (modify-phases %standard-phases
10141 (replace 'check
10142 (lambda _
10143 ;; Upstream runs tests after installation and the package itself
10144 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10145 ;; found.
10146 (setenv "PYTHONPATH"
10147 (string-append (getcwd) "/build/lib:"
10148 (getenv "PYTHONPATH")))
10149 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10150 (native-inputs
10151 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10152 ("python-six" ,python-six)))
10153 (home-page "https://github.com/ionelmc/python-tblib")
10154 (synopsis "Traceback serialization library")
10155 (description
10156 "Traceback serialization allows you to:
10157
10158@enumerate
10159@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10160different processes. This allows better error handling when running code over
10161multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10162
10163@item Parse traceback strings and raise with the parsed tracebacks.
10164@end itemize")
3f641af0 10165 (license license:bsd-3)))
b8fdbca3
HG
10166
10167(define-public python2-tblib
10168 (package-with-python2 python-tblib))
1a024de4
HG
10169
10170(define-public python-sqlparse
10171 (package
10172 (name "python-sqlparse")
10173 (version "0.1.19")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "sqlparse" version))
10177 (sha256
10178 (base32
10179 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10180 (build-system python-build-system)
10181 (arguments
10182 `(#:phases
10183 (modify-phases %standard-phases
10184 (replace 'check
10185 (lambda* _
10186 ;; setup.py-integrated 2to3 only affects the build files, but
10187 ;; py.test is using the source files. So we need to convert them
10188 ;; manually.
10189 (when (zero? (system* "python3"))
10190 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10191 (zero? (system* "py.test")))))))
10192 (native-inputs
f3b98f4f 10193 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10194 (home-page "https://github.com/andialbrecht/sqlparse")
10195 (synopsis "Non-validating SQL parser")
10196 (description "Sqlparse is a non-validating SQL parser for Python. It
10197provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10198 (license license:bsd-3)))
1a024de4
HG
10199
10200(define-public python2-sqlparse
10201 (package-with-python2 python-sqlparse))
68b9d242
SB
10202
10203(define-public python-greenlet
10204 (package
10205 (name "python-greenlet")
10206 (version "0.4.9")
10207 (source (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "greenlet" version))
10210 (sha256
10211 (base32
10212 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10213 (build-system python-build-system)
68b9d242
SB
10214 (home-page "https://greenlet.readthedocs.io/")
10215 (synopsis "Lightweight in-process concurrent programming")
10216 (description
10217 "Greenlet package is a spin-off of Stackless, a version of CPython
10218that supports micro-threads called \"tasklets\". Tasklets run
10219pseudo-concurrently (typically in a single or a few OS-level threads) and
10220are synchronized with data exchanges on \"channels\".")
3f641af0 10221 (license (list license:psfl license:expat))))
68b9d242
SB
10222
10223(define-public python2-greenlet
10224 (package-with-python2 python-greenlet))
d79a343b
SB
10225
10226(define-public python-gevent
10227 (package
10228 (name "python-gevent")
10229 (version "1.1.1")
10230 (source (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "gevent" version))
10233 (sha256
10234 (base32
10235 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10236 (modules '((guix build utils)))
10237 (snippet
10238 '(begin
10239 ;; unbunding libev and c-ares
10240 (for-each delete-file-recursively '("libev" "c-ares"))
10241 ;; fixing testsuite
10242 (call-with-output-file "greentest/__init__.py" noop)
10243 (substitute* "greentest/testrunner.py"
10244 (("import util") "from . import util")
10245 (("from util import log") "from .util import log"))))))
10246 (build-system python-build-system)
10247 (propagated-inputs
10248 `(("python-greenlet" ,python-greenlet)))
10249 (native-inputs
f3b98f4f 10250 `(("python-six" ,python-six)))
d79a343b
SB
10251 (inputs
10252 `(("c-ares" ,c-ares)
10253 ("libev" ,libev)))
10254 (home-page "http://www.gevent.org/")
10255 (synopsis "Coroutine-based network library")
10256 (description
10257 "gevent is a coroutine-based Python networking library that uses greenlet
10258to provide a high-level synchronous API on top of the libev event loop.")
10259 (license license:expat)))
10260
10261(define-public python2-gevent
10262 (package-with-python2 python-gevent))
da3aeeb6
SB
10263
10264(define-public python-twisted
10265 (package
10266 (name "python-twisted")
10267 (version "16.2.0")
10268 (source (origin
10269 (method url-fetch)
8ea8e8d3 10270 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10271 (sha256
10272 (base32
10273 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10274 (build-system python-build-system)
45912170
SB
10275 (propagated-inputs
10276 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10277 (home-page "https://twistedmatrix.com/")
10278 (synopsis "Asynchronous networking framework written in Python")
10279 (description
10280 "Twisted is an extensible framework for Python programming, with special
10281focus on event-based network programming and multiprotocol integration.")
10282 (license license:expat)))
10283
10284(define-public python2-twisted
10285 (package-with-python2 python-twisted))
d0b6fed6 10286
4d3fa5a4
EF
10287(define-public python-pika
10288 (package
10289 (name "python-pika")
10290 (version "0.10.0")
10291 (source
10292 (origin
10293 (method url-fetch)
10294 (uri (pypi-uri "pika" version))
10295 (sha256
10296 (base32
10297 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10298 (build-system python-build-system)
10299 (native-inputs
269d9172
LF
10300 `(("python-pyev" ,python-pyev)
10301 ("python-tornado" ,python-tornado)
10302 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10303 (home-page "https://pika.readthedocs.org")
10304 (synopsis "Pure Python AMQP Client Library")
10305 (description
10306 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10307Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10308network support library.")
10309 (license license:bsd-3)))
10310
10311(define-public python2-pika
10312 (package-with-python2 python-pika))
10313
d0b6fed6
DM
10314(define-public python-ply
10315 (package
10316 (name "python-ply")
234ade2d 10317 (version "3.9")
d0b6fed6
DM
10318 (source
10319 (origin
10320 (method url-fetch)
234ade2d 10321 (uri (pypi-uri "ply" version))
d0b6fed6
DM
10322 (sha256
10323 (base32
234ade2d 10324 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
10325 (build-system python-build-system)
10326 (home-page "http://www.dabeaz.com/ply/")
10327 (synopsis "Python Lex & Yacc")
10328 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10329It uses LR parsing and does extensive error checking.")
f210e944 10330 (license license:bsd-3)))
d0b6fed6
DM
10331
10332(define-public python2-ply
f210e944 10333 (package-with-python2 python-ply))
d951bd54
SB
10334
10335(define-public python-tabulate
10336 (package
10337 (name "python-tabulate")
10338 (version "0.7.5")
10339 (source (origin
10340 (method url-fetch)
10341 (uri (pypi-uri "tabulate" version))
10342 (sha256
10343 (base32
10344 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10345 ;; Fix tests
10346 (modules '((guix build utils)))
10347 (snippet '(substitute* '("test/test_cli.py"
10348 "test/test_input.py"
10349 "test/test_output.py"
10350 "test/test_regression.py")
10351 (("from common") "from nose.tools")))))
10352 (build-system python-build-system)
10353 (native-inputs
f3b98f4f 10354 `(;; For testing
d951bd54
SB
10355 ("python-nose" ,python-nose)))
10356 (home-page "https://bitbucket.org/astanin/python-tabulate")
10357 (synopsis "Pretty-print tabular data")
10358 (description
10359 "Tabulate is a library and command-line utility to pretty-print tabular
10360data in Python.")
10361 (license license:expat)))
10362
10363(define-public python2-tabulate
10364 (package-with-python2 python-tabulate))
1c4c8a33
SB
10365
10366(define-public python-kazoo
10367 (package
10368 (name "python-kazoo")
10369 (version "2.2.1")
10370 (source
10371 (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "kazoo" version))
10374 (sha256
10375 (base32
10376 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10377 (build-system python-build-system)
10378 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10379 (propagated-inputs
10380 `(("python-six" ,python-six)))
1c4c8a33
SB
10381 (home-page "https://kazoo.readthedocs.org")
10382 (synopsis "High-level Zookeeper client library")
10383 (description
10384 "Kazoo is a Python client library for the Apache Zookeeper distributed
10385application service. It is designed to be easy to use and to avoid common
10386programming errors.")
3f641af0 10387 (license license:asl2.0)))
1c4c8a33
SB
10388
10389(define-public python2-kazoo
10390 (package-with-python2 python-kazoo))
45dda35e
SB
10391
10392(define-public python-pykafka
10393 (package
10394 (name "python-pykafka")
10395 (version "2.4.0")
10396 (source (origin
10397 (method url-fetch)
c6bccf71
EF
10398 (uri (string-append
10399 "https://pypi.python.org/packages/8b/3e/"
10400 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10401 "pykafka-" version ".tar.gz"))
45dda35e
SB
10402 (sha256
10403 (base32
10404 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10405 (build-system python-build-system)
10406 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10407 (propagated-inputs
45dda35e
SB
10408 `(("python-gevent" ,python-gevent)
10409 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10410 ("python-tabulate" ,python-tabulate)))
10411 (inputs
10412 `(("librdkafka" ,librdkafka)))
10413 (home-page "https://pykafka.readthedocs.io/")
10414 (synopsis "Apache Kafka client for Python")
10415 (description
10416 "PyKafka is a client for the Apache Kafka distributed messaging system.
10417It includes Python implementations of Kafka producers and consumers, which
10418are optionally backed by a C extension built on librdkafka.")
3f641af0 10419 (license license:asl2.0)))
45dda35e
SB
10420
10421(define-public python2-pykafka
10422 (package-with-python2 python-pykafka))
a44fd439
DM
10423
10424(define-public python-wcwidth
10425 (package
10426 (name "python-wcwidth")
10427 (version "0.1.6")
10428 (source
10429 (origin
10430 (method url-fetch)
10431 (uri (string-append
10432 "https://pypi.python.org/packages/"
10433 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10434 "wcwidth-" version ".tar.gz"))
10435 (sha256
10436 (base32
10437 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10438 (build-system python-build-system)
10439 (home-page "https://github.com/jquast/wcwidth")
66e07664 10440 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10441 (description "Wcwidth measures the number of terminal column cells of
10442wide-character codes. It is useful for those implementing a terminal emulator,
10443or programs that carefully produce output to be interpreted by one. It is a
10444Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10445specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10446 (license license:expat)))
a44fd439
DM
10447
10448(define-public python2-wcwidth
f210e944 10449 (package-with-python2 python-wcwidth))
0de78c95
DP
10450
10451(define-public python2-jsonrpclib
10452 (package
10453 (name "python2-jsonrpclib")
10454 (version "0.1.7")
10455 (source (origin
10456 (method url-fetch)
10457 (uri (string-append
10458 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10459 "jsonrpclib-" version ".tar.gz"))
10460 (sha256
10461 (base32
10462 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10463 (build-system python-build-system)
0de78c95
DP
10464 (arguments
10465 `(#:tests? #f
10466 #:python ,python-2))
10467 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10468 (synopsis "Implementation of JSON-RPC specification for Python")
10469 (description
10470 "This library is an implementation of the JSON-RPC specification.
10471It supports both the original 1.0 specification, as well as the
10472new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10473etc.")
3f641af0 10474 (license license:asl2.0)))
9250b0f3
SB
10475
10476(define-public python-chai
10477 (package
10478 (name "python-chai")
10479 (version "1.1.1")
10480 (source (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "chai" version))
10483 (sha256
10484 (base32
10485 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10486 (build-system python-build-system)
9250b0f3
SB
10487 (home-page "https://github.com/agoragames/chai")
10488 (synopsis "Mocking framework for Python")
10489 (description
10490 "Chai provides an api for mocking, stubbing and spying your python
10491objects, patterned after the Mocha library for Ruby.")
3f641af0 10492 (license license:bsd-3)))
9250b0f3
SB
10493
10494(define-public python2-chai
10495 (package-with-python2 python-chai))
10496
ae43baa8
SB
10497(define-public python-arrow
10498 (package
10499 (name "python-arrow")
10500 (version "0.8.0")
10501 (source (origin
10502 (method url-fetch)
10503 (uri (pypi-uri "arrow" version))
10504 (sha256
10505 (base32
10506 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10507 (build-system python-build-system)
10508 (native-inputs
f3b98f4f 10509 `(;; For testing
ae43baa8
SB
10510 ("python-chai" ,python-chai)
10511 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10512 (propagated-inputs
10513 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10514 (home-page "https://github.com/crsmithdev/arrow/")
10515 (synopsis "Dates and times for Python")
10516 (description
10517 "Arrow is a Python library to creating, manipulating, formatting and
10518converting dates, times, and timestamps. It implements and updates the
10519datetime type.")
3f641af0 10520 (license license:asl2.0)))
ae43baa8
SB
10521
10522(define-public python2-arrow
10523 (package-with-python2 python-arrow))
10524
1f2b62a4
SB
10525(define-public python-inflection
10526 (package
10527 (name "python-inflection")
10528 (version "0.3.1")
10529 (source
10530 (origin (method url-fetch)
10531 (uri (pypi-uri "inflection" version))
10532 (sha256
10533 (base32
10534 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10535 (build-system python-build-system)
1f2b62a4
SB
10536 (home-page "http://github.com/jpvanhal/inflection")
10537 (synopsis "Python string transformation library")
10538 (description
10539 "Inflection is a string transformation library. It singularizes
10540and pluralizes English words, and transforms strings from CamelCase to
10541underscored string.")
10542 (license license:expat)))
10543
10544(define-public python2-inflection
10545 (package-with-python2 python-inflection))
10546
18995566
SB
10547(define-public python-pylev
10548 (package
10549 (name "python-pylev")
10550 (version "1.3.0")
10551 (source (origin
10552 (method url-fetch)
10553 (uri (pypi-uri "pylev" version))
10554 (sha256
10555 (base32
10556 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10557 (build-system python-build-system)
18995566
SB
10558 (home-page "http://github.com/toastdriven/pylev")
10559 (synopsis "Levenshtein distance implementation in Python")
10560 (description "Pure Python Levenshtein implementation, based off the
10561Wikipedia code samples at
10562@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10563 (license license:bsd-3)))
18995566
SB
10564
10565(define-public python2-pylev
10566 (package-with-python2 python-pylev))
10567
f5deff7a
SB
10568(define-public python-cleo
10569 (package
10570 (name "python-cleo")
10571 (version "0.4.1")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "cleo" version))
10575 (sha256
10576 (base32
10577 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10578 (build-system python-build-system)
10579 (native-inputs
f3b98f4f 10580 `(;; For testing
f5deff7a
SB
10581 ("python-mock" ,python-mock)
10582 ("python-pytest" ,python-pytest)))
9403150a
SB
10583 (propagated-inputs
10584 `(("python-psutil" ,python-psutil)
10585 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10586 (home-page "https://github.com/sdispater/cleo")
10587 (synopsis "Command-line arguments library for Python")
10588 (description
10589 "Cleo allows you to create command-line commands with signature in
10590docstring and colored output.")
10591 (license license:expat)))
10592
10593(define-public python2-cleo
10594 (package-with-python2 python-cleo))
10595
77cadb43
SB
10596(define-public python-lazy-object-proxy
10597 (package
10598 (name "python-lazy-object-proxy")
10599 (version "1.2.2")
10600 (source (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "lazy-object-proxy" version))
10603 (sha256
10604 (base32
10605 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10606 (build-system python-build-system)
77cadb43
SB
10607 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10608 (synopsis "Lazy object proxy for python")
10609 (description
10610 "Lazy object proxy is an object that wraps a callable but defers the call
10611until the object is actually required, and caches the result of said call.")
3f641af0 10612 (license license:bsd-2)))
77cadb43
SB
10613
10614(define-public python2-lazy-object-proxy
10615 (package-with-python2 python-lazy-object-proxy))
10616
5477e05f
SB
10617(define-public python-dnspython
10618 (package
10619 (name "python-dnspython")
6c514128 10620 (version "1.15.0")
5477e05f
SB
10621 (source (origin
10622 (method url-fetch)
10623 (uri (string-append "http://www.dnspython.org/kits/"
10624 version "/dnspython-" version ".tar.gz"))
10625 (sha256
10626 (base32
6c514128 10627 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10628 (build-system python-build-system)
10629 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10630 (home-page "http://www.dnspython.org")
10631 (synopsis "DNS toolkit for Python")
10632 (description
10633 "dnspython is a DNS toolkit for Python. It supports almost all record
10634types. It can be used for queries, zone transfers, and dynamic updates.
10635It supports TSIG authenticated messages and EDNS0.")
10636 (license license:expat)))
10637
10638(define-public python2-dnspython
10639 (package-with-python2 python-dnspython))
10640
22711e25
SB
10641(define-public python-email-validator
10642 (package
10643 (name "python-email-validator")
10644 (version "1.0.1")
10645 (source
10646 (origin (method url-fetch)
10647 (uri (pypi-uri "email_validator" version))
10648 (sha256
10649 (base32
10650 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10651 (build-system python-build-system)
10652 (arguments
10653 '(#:phases
10654 (modify-phases %standard-phases
10655 (add-before 'build 'use-dnspython
10656 (lambda _
10657 (substitute* "setup.py"
10658 (("dnspython3") "dnspython"))
10659 #t)))))
d42560bd 10660 (propagated-inputs
22711e25 10661 `(("python-dnspython" ,python-dnspython)
d42560bd 10662 ("python-idna" ,python-idna)))
22711e25
SB
10663 (home-page "https://github.com/JoshData/python-email-validator")
10664 (synopsis "Email address validation library for Python")
10665 (description
10666 "This library validates email address syntax and deliverability.")
3f641af0 10667 (license license:cc0)))
22711e25
SB
10668
10669(define-public python2-email-validator
10670 (package-with-python2 python-email-validator))
10671
8987d91e
SB
10672(define-public python-ukpostcodeparser
10673 (package
10674 (name "python-ukpostcodeparser")
10675 (version "1.0.3")
10676 (source (origin
10677 (method url-fetch)
10678 (uri (pypi-uri "UkPostcodeParser" version))
10679 (sha256
10680 (base32
10681 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10682 (build-system python-build-system)
8987d91e
SB
10683 (home-page "https://github.com/hamstah/ukpostcodeparser")
10684 (synopsis "UK Postcode parser for Python")
10685 (description
10686 "This library provides the @code{parse_uk_postcode} function for
10687parsing UK postcodes.")
10688 (license license:expat)))
10689
10690(define-public python2-ukpostcodeparser
10691 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10692
10693(define-public python-fake-factory
10694 (package
10695 (name "python-fake-factory")
7adc698f 10696 (version "0.7.2")
ea92ae01
SB
10697 (source (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "fake-factory" version))
10700 (sha256
10701 (base32
7adc698f 10702 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10703 (build-system python-build-system)
ea92ae01 10704 (native-inputs
f3b98f4f 10705 `(;; For testing
ea92ae01
SB
10706 ("python-email-validator" ,python-email-validator)
10707 ("python-mock" ,python-mock)
10708 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10709 (propagated-inputs
10710 `(("python-dateutil" ,python-dateutil-2)
10711 ("python-six" ,python-six)))
7adc698f 10712 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10713 (synopsis "Python package that generates fake data")
10714 (description
10715 "Faker is a Python package that generates fake data such as names,
10716addresses, and phone numbers.")
10717 (license license:expat)
10718 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10719
10720(define-public python2-fake-factory
10721 (let ((base (package-with-python2 (strip-python2-variant
10722 python-fake-factory))))
10723 (package
10724 (inherit base)
24c9aa18 10725 (propagated-inputs
ea92ae01 10726 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10727 ,@(package-propagated-inputs base))))))
ea92ae01 10728
b49504fd
SB
10729(define-public python-pyaml
10730 (package
10731 (name "python-pyaml")
10732 (version "15.8.2")
10733 (source (origin
10734 (method url-fetch)
10735 (uri (pypi-uri "pyaml" version))
10736 (sha256
10737 (base32
10738 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10739 (build-system python-build-system)
b49504fd
SB
10740 (propagated-inputs
10741 `(("python-pyyaml" ,python-pyyaml)))
10742 (home-page "https://github.com/mk-fg/pretty-yaml")
10743 (synopsis "YAML pretty-print library for Python")
10744 (description
10745 "pyaml is a PyYAML based python module to produce pretty and readable
10746YAML-serialized data.")
3f641af0 10747 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10748
10749(define-public python2-pyaml
10750 (package-with-python2 python-pyaml))
10751
347175a2
SB
10752(define-public python-flexmock
10753 (package
10754 (name "python-flexmock")
10755 (version "0.10.2")
10756 (source (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "flexmock" version))
10759 (sha256
10760 (base32
10761 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10762 (build-system python-build-system)
347175a2
SB
10763 (home-page "https://flexmock.readthedocs.org")
10764 (synopsis "Testing library for Python")
10765 (description
10766 "flexmock is a testing library for Python that makes it easy to create
10767mocks, stubs and fakes.")
3f641af0 10768 (license license:bsd-3)))
347175a2
SB
10769
10770(define-public python2-flexmock
10771 (package-with-python2 python-flexmock))
10772
5a744191
SB
10773(define-public python-orator
10774 (package
10775 (name "python-orator")
10776 (version "0.8.2")
10777 (source (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "orator" version))
10780 (sha256
10781 (base32
10782 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10783 (build-system python-build-system)
10784 (arguments '(#:tests? #f)) ; no tests
b2676030 10785 (propagated-inputs
5a744191
SB
10786 `(("python-arrow" ,python-arrow)
10787 ("python-blinker" ,python-blinker)
10788 ("python-cleo" ,python-cleo)
10789 ("python-fake-factory" ,python-fake-factory)
10790 ("python-inflection" ,python-inflection)
10791 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10792 ("python-pyaml" ,python-pyaml)
5a744191
SB
10793 ("python-simplejson" ,python-simplejson)
10794 ("python-wrapt" ,python-wrapt)))
10795 (home-page "https://orator-orm.com/")
10796 (synopsis "ActiveRecord ORM for Python")
10797 (description
10798 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10799implementation for Python.")
10800 (license license:expat)
10801 (properties `((python2-variant . ,(delay python2-orator))))))
10802
10803(define-public python2-orator
10804 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10805 (package
10806 (inherit base)
06961617 10807 (propagated-inputs
5a744191 10808 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10809 ,@(package-propagated-inputs base))))))
f4155188
DM
10810
10811(define-public python-prompt-toolkit
10812 (package
10813 (name "python-prompt-toolkit")
6a34f4cc 10814 (version "1.0.9")
f4155188
DM
10815 (source
10816 (origin
10817 (method url-fetch)
d15e2ef0 10818 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10819 (sha256
10820 (base32
6a34f4cc 10821 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 10822 (build-system python-build-system)
bae18710
LF
10823 (arguments
10824 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10825 (propagated-inputs
10826 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10827 ("python-six" ,python-six)
f22efa01 10828 ("python-pygments" ,python-pygments)))
f4155188
DM
10829 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10830 (synopsis "Library for building command line interfaces in Python")
10831 (description
10832 "Prompt-Toolkit is a library for building interactive command line
10833interfaces in Python. It's like GNU Readline but it also features syntax
10834highlighting while typing, out-of-the-box multi-line input editing, advanced
10835code completion, incremental search, support for Chinese double-width
10836characters, mouse support, and auto suggestions.")
f210e944 10837 (license license:bsd-3)))
f4155188
DM
10838
10839(define-public python2-prompt-toolkit
f210e944 10840 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10841
10842(define-public python-jedi
10843 (package
10844 (name "python-jedi")
10845 (version "0.9.0")
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "jedi" version))
10850 (sha256
10851 (base32
10852 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10853 (build-system python-build-system)
10854 (home-page "https://github.com/davidhalter/jedi")
10855 (synopsis
10856 "Autocompletion for Python that can be used for text editors")
10857 (description
10858 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10859 (license license:expat)))
a502dfbf
DM
10860
10861(define-public python2-jedi
f210e944 10862 (package-with-python2 python-jedi))
c2f0dc6e
DM
10863
10864(define-public ptpython
10865 (package
10866 (name "ptpython")
10867 (version "0.34")
10868 (source (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "ptpython" version))
10871 (sha256
10872 (base32
10873 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10874 (build-system python-build-system)
f22efa01 10875 (propagated-inputs
c2f0dc6e
DM
10876 `(("python-docopt" ,python-docopt)
10877 ("python-jedi" ,python-jedi)
10878 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10879 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10880 (home-page "https://github.com/jonathanslenders/ptpython")
10881 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10882 (description
10883 "ptpython is a Python read-eval-print loop with IDE-like features.
10884It supports syntax highlighting, multiline editing, autocompletion, mouse,
10885color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10886etc.")
3f641af0 10887 (license license:bsd-3)
c2f0dc6e
DM
10888 (properties `((python2-variant . ,(delay ptpython-2))))))
10889
10890(define-public ptpython-2
10891 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10892 (package
10893 (inherit base)
10894 (name "ptpython2"))))
b227f0be 10895
b04a52a6
DJ
10896(define-public python-requests-oauthlib
10897 (package
10898 (name "python-requests-oauthlib")
10899 (version "0.6.2")
10900 (source
10901 (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "requests-oauthlib" version))
10904 (sha256
10905 (base32
10906 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10907 (build-system python-build-system)
10908 (arguments
10909 `(#:phases
10910 (modify-phases %standard-phases
10911 ;; removes tests that require network access
10912 (add-before 'check 'pre-check
10913 (lambda _
10914 (delete-file "tests/test_core.py")
10915 #t)))))
10916 (native-inputs
10917 `(("python-requests-mock" ,python-requests-mock)
10918 ("python-mock" ,python-mock)))
f22efa01 10919 (propagated-inputs
b04a52a6
DJ
10920 `(("python-oauthlib" ,python-oauthlib)
10921 ("python-requests" ,python-requests)))
10922 (home-page
10923 "https://github.com/requests/requests-oauthlib")
10924 (synopsis
10925 "OAuthlib authentication support for Requests")
10926 (description
10927 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10928provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10929 (license license:isc)))
b04a52a6
DJ
10930
10931(define-public python2-requests-oauthlib
f210e944 10932 (package-with-python2 python-requests-oauthlib))
b04a52a6 10933
b227f0be 10934(define-public python-stem
10935 (package
10936 (name "python-stem")
c976b319 10937 (version "1.5.3")
b227f0be 10938 (source
10939 (origin
10940 (method url-fetch)
c976b319 10941 (uri (pypi-uri "stem" version))
b227f0be 10942 (sha256
10943 (base32
c976b319 10944 "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
b227f0be 10945 (build-system python-build-system)
10946 (arguments
10947 `(#:phases
10948 (modify-phases %standard-phases
10949 (replace 'check
10950 (lambda _
10951 (zero? (system* "./run_tests.py" "--unit")))))))
10952 (native-inputs
10953 `(("python-mock" ,python-mock)
10954 ("python-pep8" ,python-pep8)
10955 ("python-pyflakes" ,python-pyflakes)))
b227f0be 10956 (home-page "https://stem.torproject.org/")
10957 (synopsis
10958 "Python controller library that allows applications to interact with Tor")
10959 (description
10960 "Stem is a Python controller library for Tor. With it you can use Tor's
10961control protocol to script against the Tor process and read descriptor data
10962relays publish about themselves.")
3f641af0 10963 (license license:lgpl3)))
b227f0be 10964
10965(define-public python2-stem
10966 (package-with-python2 python-stem))
517a6c0c
DM
10967
10968(define-public python-pyserial
10969 (package
10970 (name "python-pyserial")
10971 (version "3.1.1")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "pyserial" version))
10976 (sha256
10977 (base32
10978 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10979 (build-system python-build-system)
10980 (home-page
10981 "https://github.com/pyserial/pyserial")
10982 (synopsis "Python Serial Port Bindings")
10983 (description "@code{pyserial} provide serial port bindings for Python. It
10984supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10985and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10986 (license license:bsd-3)))
517a6c0c
DM
10987
10988(define-public python2-pyserial
f210e944 10989 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10990
10991(define-public python-kivy
10992 (package
10993 (name "python-kivy")
10994 (version "1.9.1")
10995 (source
10996 (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "kivy" version))
10999 (file-name (string-append name "-" version ".tar.gz"))
11000 (sha256
11001 (base32
11002 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11003 (build-system python-build-system)
11004 (arguments
11005 `(#:tests? #f ; Tests require many optional packages
11006 #:phases
11007 (modify-phases %standard-phases
11008 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11009 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11010 (lambda* (#:key inputs #:allow-other-keys)
11011 (setenv "KIVY_SDL2_PATH"
11012 (string-append (assoc-ref inputs "sdl-union")
11013 "/include/SDL2"))
11014 #t)))))
11015 (native-inputs
f2516de2
HG
11016 `(("pkg-config" ,pkg-config)
11017 ("python-cython" ,python-cython)))
6eb7af2a 11018 (inputs
f2516de2 11019 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11020 ("mesa" ,mesa)
11021 ("sdl-union"
11022 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11023 (home-page "http://kivy.org")
11024 (synopsis
11025 "Multitouch application framework")
11026 (description
11027 "A software library for rapid development of
11028hardware-accelerated multitouch applications.")
11029 (license license:expat)))
11030
11031(define-public python2-kivy
11032 (package-with-python2 python-kivy))
11033
11034(define-public python-kivy-next
11035 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11036 (revision "1"))
11037 (package (inherit python-kivy)
11038 (name "python-kivy-next")
d80a71eb 11039 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11040 (string-take commit 7)))
11041 (source
11042 (origin
11043 (method git-fetch)
11044 (uri (git-reference
11045 (url "https://github.com/kivy/kivy")
11046 (commit commit)))
11047 (file-name (string-append name "-" version "-checkout"))
11048 (sha256
11049 (base32
11050 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11051
11052(define-public python2-kivy-next
11053 (package-with-python2 python-kivy-next))
8794bd8b
DC
11054
11055(define-public python-binaryornot
11056 (package
11057 (name "python-binaryornot")
11058 (version "0.4.0")
11059 (source (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "binaryornot" version))
11062 (sha256
11063 (base32
11064 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11065 (build-system python-build-system)
f22efa01 11066 (propagated-inputs
8794bd8b
DC
11067 `(("python-chardet" ,python-chardet)
11068 ("python-hypothesis" ,python-hypothesis)))
11069 (home-page "https://github.com/audreyr/binaryornot")
11070 (synopsis "Package to check if a file is binary or text")
11071 (description "Ultra-lightweight pure Python package to check if a file is
11072binary or text.")
11073 (license license:bsd-3)
11074 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11075
11076(define-public python2-binaryornot
11077 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11078 (package (inherit base)
f22efa01 11079 (propagated-inputs
8794bd8b 11080 `(("python2-enum34" ,python2-enum34)
f22efa01 11081 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11082
11083(define-public python-nltk
11084 (package
11085 (name "python-nltk")
11086 (version "3.2.1")
11087 (source (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "nltk" version))
11090 (sha256
11091 (base32
11092 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11093 (build-system python-build-system)
59f12985
LF
11094 (arguments
11095 '(;; The tests require some extra resources to be downloaded.
11096 ;; TODO Try packaging these resources.
11097 #:tests? #f))
a9ac982a
DC
11098 (home-page "http://nltk.org/")
11099 (synopsis "Natural Language Toolkit")
11100 (description "It provides interfaces to over 50 corpora and lexical
11101resources such as WordNet, along with a suite of text processing libraries
11102for classification, tokenization, stemming, tagging, parsing, and semantic
11103reasoning, wrappers for natural language processing libraries.")
f210e944 11104 (license license:asl2.0)))
a9ac982a
DC
11105
11106(define-public python2-nltk
f210e944 11107 (package-with-python2 python-nltk))
691cd90d
DC
11108
11109(define-public python-pymongo
11110 (package
11111 (name "python-pymongo")
11112 (version "3.3.0")
11113 (source (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "pymongo" version))
11116 (sha256
11117 (base32
11118 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11119 (build-system python-build-system)
f22efa01 11120 (propagated-inputs
691cd90d
DC
11121 `(("python-certifi" ,python-certifi)))
11122 (home-page "http://github.com/mongodb/mongo-python-driver")
11123 (synopsis "Python driver for MongoDB")
11124 (description "Python driver for MongoDB.")
f210e944 11125 (license license:asl2.0)))
691cd90d
DC
11126
11127(define-public python2-pymongo
f210e944 11128 (package-with-python2 python-pymongo))
6a6c9d43
DC
11129
11130(define-public python-sh
11131 (package
11132 (name "python-sh")
11133 (version "1.11")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "sh" version))
11137 (sha256
11138 (base32
11139 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11140 (build-system python-build-system)
11141 (arguments
11142 `(#:tests? #f)) ; no tests
11143 (home-page "https://github.com/amoffat/sh")
11144 (synopsis "Python subprocess interface")
11145 (description "Abstracts process invocation by providing a function
11146interface for programs.")
f210e944 11147 (license license:expat)))
6a6c9d43
DC
11148
11149(define-public python2-sh
f210e944 11150 (package-with-python2 python-sh))
05b59190 11151
25702397
EF
11152(define-public python-consul
11153 (package
11154 (name "python-consul")
11155 (version "0.6.1")
11156 (source
11157 (origin
11158 (method url-fetch)
11159 (uri (pypi-uri "python-consul" version))
11160 (sha256
11161 (base32
11162 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11163 (build-system python-build-system)
11164 (native-inputs
fd1d6de7
HG
11165 `(("python-pytest" ,python-pytest)))
11166 (propagated-inputs
11167 `(("python-requests" ,python-requests)
25702397
EF
11168 ("python-six" ,python-six)))
11169 (home-page "https://github.com/cablehead/python-consul")
11170 (synopsis "Python client for Consul")
11171 (description
11172 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11173discovery, monitoring and configuration.")
11174 (license license:expat)))
11175
11176(define-public python2-consul
f210e944 11177 (package-with-python2 python-consul))
25702397 11178
05b59190
DC
11179(define-public python-schematics
11180 (package
11181 (name "python-schematics")
11182 (version "1.1.1")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (string-append
11187 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11188 (file-name (string-append name "-" version ".tar.gz"))
11189 (sha256
11190 (base32
11191 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11192 (build-system python-build-system)
f22efa01 11193 (propagated-inputs
05b59190
DC
11194 `(("python-six" ,python-six)))
11195 (arguments
11196 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11197 ; version requirements (eg python-coveralls)
11198 (home-page "https://github.com/schematics/schematics")
11199 (synopsis "Python Data Structures for Humans")
11200 (description "Python Data Structures for Humans.")
f210e944 11201 (license license:bsd-3)))
05b59190
DC
11202
11203(define-public python2-schematics
f210e944 11204 (package-with-python2 python-schematics))
d6907ff7
DC
11205
11206(define-public python-publicsuffix
11207 (package
11208 (name "python-publicsuffix")
11209 (version "1.1.0")
11210 (source (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "publicsuffix" version))
11213 (sha256
11214 (base32
11215 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11216 (build-system python-build-system)
11217 (arguments
11218 `(#:tests? #f)) ; tests use the internet
11219 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11220 (synopsis "Get suffix for a domain name")
11221 (description "Get a public suffix for a domain name using the Public Suffix
11222List.")
f210e944 11223 (license license:expat)))
d6907ff7
DC
11224
11225(define-public python2-publicsuffix
f210e944 11226 (package-with-python2 python-publicsuffix))
b2319996
DC
11227
11228(define-public python-publicsuffix2
11229 (package
11230 (name "python-publicsuffix2")
11231 (version "2.20160621")
11232 (source
11233 (origin
11234 (method url-fetch)
11235 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11236 (sha256
11237 (base32
11238 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11239 (build-system python-build-system)
10797a0a
LF
11240 (arguments
11241 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11242 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11243 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11244 (description "Get a public suffix for a domain name using the Public Suffix
11245List. Forked from and using the same API as the publicsuffix package.")
f210e944 11246 (license (list license:expat license:mpl2.0))))
b2319996
DC
11247
11248(define-public python2-publicsuffix2
f210e944 11249 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11250
11251(define-public python-url
11252 (package
11253 (name "python-url")
11254 (version "0.2.0")
11255 (source (origin
11256 (method url-fetch)
11257 (uri (pypi-uri "url" version))
11258 (sha256
11259 (base32
11260 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11261 (build-system python-build-system)
f22efa01 11262 (propagated-inputs
81f1515d
DC
11263 `(("python-publicsuffix" ,python-publicsuffix)))
11264 (native-inputs
11265 `(("python-coverage" ,python-coverage)
11266 ("python-nose" ,python-nose)))
11267 (arguments
11268 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11269 (home-page "http://github.com/seomoz/url-py")
11270 (synopsis "URL Parsing")
11271 (description "Library for parsing urls.")
11272 (license license:expat)
11273 (properties `((python2-variant . ,(delay python2-url))))))
11274
11275(define-public python2-url
11276 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11277 (package (inherit base)
f22efa01 11278 (propagated-inputs
f210e944 11279 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11280
11281(define-public python-freezegun
11282 (package
11283 (name "python-freezegun")
11284 (version "0.3.7")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "freezegun" version))
11289 (sha256
11290 (base32
11291 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11292 (build-system python-build-system)
11293 (native-inputs
11294 `(("python-mock" ,python-mock)
11295 ("python-nose" ,python-nose)
4e096968 11296 ("python-coverage" ,python-coverage)))
f22efa01 11297 (propagated-inputs
4e096968
HG
11298 `(("python-six" ,python-six)
11299 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11300 (arguments
11301 `(#:phases (modify-phases %standard-phases
11302 ;; The tests are normally executed via `make test`, but the PyPi
11303 ;; package does not include the Makefile.
11304 (replace 'check
11305 (lambda _
11306 (zero? (system* "nosetests" "./tests/")))))))
11307 (home-page "https://github.com/spulec/freezegun")
11308 (synopsis "Test utility for mocking the datetime module")
11309 (description
11310 "FreezeGun is a library that allows your python tests to travel through
11311time by mocking the datetime module.")
11312 (license license:asl2.0)))
11313
11314(define-public python2-freezegun
f210e944
HG
11315 (package-with-python2 python-freezegun))
11316
dddcb25c
MB
11317
11318(define-public python-odfpy
11319 (package
11320 (name "python-odfpy")
11321 (version "1.3.3")
11322 (source (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "odfpy" version))
11325 (sha256
11326 (base32
11327 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11328 (arguments
11329 `(#:modules ((srfi srfi-1)
11330 (guix build python-build-system)
11331 (guix build utils))
11332 #:phases
11333 (modify-phases %standard-phases
11334 (replace 'check
11335 ;; The test runner invokes python2 and python3 for test*.py.
11336 ;; To avoid having both in inputs, we replicate it here.
11337 (lambda _
11338 (every (lambda (test-file)
11339 (zero? (system* "python" test-file)))
11340 (find-files "tests" "^test.*\\.py$")))))))
11341 (build-system python-build-system)
11342 (home-page "https://github.com/eea/odfpy")
11343 (synopsis "Python API and tools to manipulate OpenDocument files")
11344 (description "Collection of libraries and utility programs written in
11345Python to manipulate OpenDocument 1.2 files.")
11346 (license
11347 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11348 ;; number of files with other licenses.
11349 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11350
11351(define-public python2-odfpy
11352 (package-with-python2 python-odfpy))
b30565bd
MB
11353
11354(define-public python-cachecontrol
11355 (package
11356 (name "python-cachecontrol")
11357 (version "0.11.6")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 ;; Pypi does not have tests.
11362 (uri (string-append
11363 "https://github.com/ionrock/cachecontrol/archive/v"
11364 version ".tar.gz"))
11365 (file-name (string-append name "-" version ".tar.gz"))
11366 (sha256
11367 (base32
11368 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11369 (build-system python-build-system)
11370 (arguments
11371 `(#:phases
11372 (modify-phases %standard-phases
11373 (replace 'check
11374 (lambda _
11375 ;; Drop test that requires internet access.
11376 (delete-file "tests/test_regressions.py")
11377 (setenv "PYTHONPATH"
11378 (string-append (getcwd) "/build/lib:"
11379 (getenv "PYTHONPATH")))
11380 (zero? (system* "py.test" "-vv")))))))
11381 (native-inputs
11382 `(("python-pytest" ,python-pytest)
11383 ("python-redis" ,python-redis)
11384 ("python-webtest" ,python-webtest)
11385 ("python-mock" ,python-mock)))
11386 (propagated-inputs
11387 `(("python-requests" ,python-requests)
11388 ("python-lockfile" ,python-lockfile)))
11389 (home-page "https://github.com/ionrock/cachecontrol")
11390 (synopsis "The httplib2 caching algorithms for use with requests")
11391 (description "CacheControl is a port of the caching algorithms in
11392@code{httplib2} for use with @code{requests} session objects.")
f210e944 11393 (license license:asl2.0)))
b30565bd
MB
11394
11395(define-public python2-cachecontrol
f210e944 11396 (package-with-python2 python-cachecontrol))
243db824
DM
11397
11398(define-public python-lit
11399 (package
11400 (name "python-lit")
11401 (version "0.5.0")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 (uri (pypi-uri "lit" version))
11406 (sha256
11407 (base32
11408 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11409 (build-system python-build-system)
11410 (home-page "http://llvm.org/")
11411 (synopsis "LLVM Software Testing Tool")
11412 (description "@code{lit} is a portable tool for executing LLVM and Clang
11413style test suites, summarizing their results, and providing indication of
11414failures.")
f210e944 11415 (license license:ncsa)))
243db824
DM
11416
11417(define-public python2-lit
f210e944 11418 (package-with-python2 python-lit))
66f95b20
MB
11419
11420(define-public python-pytest-pep8
11421 (package
11422 (name "python-pytest-pep8")
11423 (version "1.0.6")
11424 (source (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "pytest-pep8" version))
11427 (sha256
11428 (base32
11429 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11430 (build-system python-build-system)
11431 (arguments
b41a05ce 11432 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11433 (native-inputs
11434 `(("python-pytest" ,python-pytest)))
11435 (propagated-inputs
11436 `(("python-pep8" ,python-pep8)))
11437 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11438 (synopsis "Py.test plugin to check PEP8 requirements")
11439 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11440 (license license:expat)))
66f95b20
MB
11441
11442(define-public python2-pytest-pep8
f210e944 11443 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11444
11445(define-public python-pytest-flakes
11446 (package
11447 (name "python-pytest-flakes")
11448 (version "1.0.1")
11449 (source (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "pytest-flakes" version))
11452 (sha256
11453 (base32
11454 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11455 (build-system python-build-system)
11456 (arguments
b41a05ce 11457 `(#:phases
df94a6b5
MB
11458 (modify-phases %standard-phases
11459 (delete 'check)
11460 (add-after 'install 'check
05c2fd36
HG
11461 (lambda* (#:key outputs inputs #:allow-other-keys)
11462 ;; It's easier to run tests after install.
11463 ;; Make installed package available for running the tests
11464 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11465 (zero? (system* "py.test" "-vv")))))))
11466 (native-inputs
11467 `(("python-coverage" ,python-coverage)
11468 ("python-pytest" ,python-pytest)
11469 ("python-pytest-cache" ,python-pytest-cache)
11470 ("python-pytest-pep8" ,python-pytest-pep8)))
11471 (propagated-inputs
11472 `(("python-pyflakes" ,python-pyflakes)))
11473 (home-page "https://github.com/fschulze/pytest-flakes")
11474 (synopsis "Py.test plugin to check source code with pyflakes")
11475 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11476 (license license:expat)))
df94a6b5
MB
11477
11478(define-public python2-pytest-flakes
f210e944 11479 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11480
11481(define-public python-natsort
11482 (package
11483 (name "python-natsort")
11484 (version "5.0.1")
11485 (source (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "natsort" version))
11488 (sha256
11489 (base32
11490 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11491 (build-system python-build-system)
11492 (arguments
11493 `(#:phases
11494 (modify-phases %standard-phases
11495 (add-before 'check 'set-cachedir
11496 ;; Tests require write access to $HOME by default
11497 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11498 (native-inputs
11499 `(("python-hypothesis" ,python-hypothesis)
11500 ("python-pytest-cache" ,python-pytest-cache)
11501 ("python-pytest-cov" ,python-pytest-cov)
11502 ("python-pytest-flakes" ,python-pytest-flakes)
11503 ("python-pytest-pep8" ,python-pytest-pep8)))
11504 (propagated-inputs ; TODO: Add python-fastnumbers.
11505 `(("python-pyicu" ,python-pyicu)))
11506 (home-page "https://github.com/SethMMorton/natsort")
11507 (synopsis "Natural sorting for python and shell")
11508 (description
11509 "Natsort lets you apply natural sorting on lists instead of
11510lexicographical. If you use the built-in @code{sorted} method in python
11511on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11512returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11513function @code{natsorted} that identifies numbers and sorts them separately
11514from strings. It can also sort version numbers, real numbers, mixed types
11515and more, and comes with a shell command @command{natsort} that exposes this
11516functionality in the command line.")
11517 (license license:expat)
11518 (properties `((python2-variant . ,(delay python2-natsort))))))
11519
11520(define-public python2-natsort
11521 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11522 (package (inherit base)
11523 (native-inputs
00e10c6e 11524 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11525 ("python2-mock" ,python2-mock)
11526 ("python2-enum34" ,python2-enum34)
11527 ,@(package-native-inputs base))))))
4efb9c54
SR
11528
11529(define-public python-glances
11530 (package
11531 (name "python-glances")
11532 (version "2.7.1")
11533 (source
11534 (origin
11535 (method url-fetch)
11536 (uri (pypi-uri "Glances" version))
11537 (sha256
11538 (base32
11539 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11540 (build-system python-build-system)
f22efa01 11541 (propagated-inputs
4efb9c54
SR
11542 `(("python-psutil" ,python-psutil)))
11543 (home-page
11544 "https://github.com/nicolargo/glances")
11545 (synopsis
11546 "A cross-platform curses-based monitoring tool")
11547 (description
11548 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11549Glances uses the PsUtil library to get information from your system. It monitors
11550CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11551 (license license:lgpl3+)))
4efb9c54
SR
11552
11553(define-public python2-glances
f210e944 11554 (package-with-python2 python-glances))
05b7a593
EF
11555
11556(define-public python-graphql-core
11557 (package
11558 (name "python-graphql-core")
11559 (version "0.5.3")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "graphql-core" version))
11564 (sha256
11565 (base32
11566 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11567 (build-system python-build-system)
11568 (arguments
326f8285
LF
11569 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11570 #:phases
05b7a593
EF
11571 (modify-phases %standard-phases
11572 (add-after 'unpack 'patch-hardcoded-version
11573 (lambda _ (substitute*
11574 "setup.py"
11575 (("'gevent==1.1rc1'") "'gevent'"))
11576 #t)))))
11577 (native-inputs
11578 `(("python-gevent" ,python-gevent)
11579 ("python-mock" ,python-mock)
11580 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11581 (propagated-inputs
05b7a593
EF
11582 `(("python-promise" ,python-promise)
11583 ("python-six" ,python-six)))
11584 (home-page "https://github.com/graphql-python/graphql-core")
11585 (synopsis "GraphQL implementation for Python")
11586 (description
11587 "GraphQL implementation for Python. GraphQL is a data query language and
11588runtime designed and used to request and deliver data to mobile and web apps.
11589This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11590to Python.")
05b7a593
EF
11591 (license license:expat)))
11592
11593(define-public python2-graphql-core
f210e944 11594 (package-with-python2 python-graphql-core))
7ee51575
EF
11595
11596(define-public python-graphql-relay
11597 (package
11598 (name "python-graphql-relay")
11599 (version "0.4.4")
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "graphql-relay" version))
11604 (sha256
11605 (base32
11606 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11607 (build-system python-build-system)
11608 (native-inputs
11609 `(("python-pytest" ,python-pytest)))
f22efa01 11610 (propagated-inputs
7ee51575
EF
11611 `(("python-graphql-core" ,python-graphql-core)
11612 ("python-promise" ,python-promise)
11613 ("python-six" ,python-six)))
11614 (home-page "https://github.com/graphql-python/graphql-relay-py")
11615 (synopsis "Relay implementation for Python")
11616 (description
11617 "This is a library to allow the easy creation of Relay-compliant servers
11618using the GraphQL Python reference implementation of a GraphQL server. It
11619should be noted that the code is a exact port of the original
11620@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11621from Facebook.")
7ee51575
EF
11622 (license license:expat)))
11623
11624(define-public python2-graphql-relay
f210e944 11625 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11626
11627(define-public python-graphene
11628 (package
11629 (name "python-graphene")
11630 (version "0.10.2")
11631 (source
11632 (origin
11633 (method url-fetch)
11634 (uri (pypi-uri "graphene" version))
11635 (sha256
11636 (base32
11637 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11638 (build-system python-build-system)
11639 (native-inputs
11640 `(("python-django-filter" ,python-django-filter)
11641 ("python-mock" ,python-mock)
11642 ("python-psycopg2" ,python-psycopg2)
11643 ("python-pytest-django" ,python-pytest-django)
11644 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11645 (propagated-inputs
ddc63a56
EF
11646 `(("python-graphql-core" ,python-graphql-core)
11647 ("python-graphql-relay" ,python-graphql-relay)
11648 ("python-iso8601" ,python-iso8601)
11649 ("python-promise" ,python-promise)
11650 ("python-six" ,python-six)))
11651 (home-page "http://graphene-python.org/")
11652 (synopsis "GraphQL Framework for Python")
11653 (description
11654 "Graphene is a Python library for building GraphQL schemas/types.
11655A GraphQL schema describes your data model, and provides a GraphQL server
11656with an associated set of resolve methods that know how to fetch data.")
11657 (properties `((python2-variant . ,(delay python2-graphene))))
11658 (license license:expat)))
11659
11660(define-public python2-graphene
11661 (let ((base (package-with-python2
11662 (strip-python2-variant python-graphene))))
11663 (package (inherit base)
11664 (native-inputs
00e10c6e 11665 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11666 ,@(package-native-inputs base))))))
d488d5d6
EF
11667
11668(define-public python-nautilus
11669 (package
11670 (name "python-nautilus")
11671 (version "0.4.9")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "nautilus" version))
11676 (sha256
11677 (base32
11678 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11679 (build-system python-build-system)
11680 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11681 (propagated-inputs
d488d5d6
EF
11682 `(("python-bcrypt" ,python-bcrypt)
11683 ("python-click" ,python-click)
11684 ("python-consul" ,python-consul)
d488d5d6
EF
11685 ("python-graphene" ,python-graphene)
11686 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11687 ("python-peewee" ,python-peewee)
11688 ("python-pika" ,python-pika)
d488d5d6
EF
11689 ("python-tornado" ,python-tornado)
11690 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11691 (native-inputs
11692 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11693 (home-page "https://github.com/AlecAivazis/nautilus")
11694 (synopsis "Library for creating microservice applications")
11695 (description
11696 "Nautilus is a framework for flux based microservices that looks to
11697provide extendible implementations of common aspects of a cloud so that you can
11698focus on building massively scalable web applications.")
11699 (license license:expat)))
94cffc63 11700
66d3f50a
LF
11701(define-public python-betamax
11702 (package
11703 (name "python-betamax")
11704 (version "0.8.0")
11705 (source
11706 (origin
11707 (method url-fetch)
11708 (uri (pypi-uri "betamax" version))
11709 (sha256
11710 (base32
11711 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11712 (build-system python-build-system)
11713 (arguments
11714 '(;; Many tests fail because they require networking.
11715 #:tests? #f))
c415f763 11716 (propagated-inputs
66d3f50a
LF
11717 `(("python-requests" ,python-requests)))
11718 (home-page "https://github.com/sigmavirus24/betamax")
11719 (synopsis "Record HTTP interactions with python-requests")
11720 (description "Betamax will record your test suite's HTTP interactions and
11721replay them during future tests. It is designed to work with python-requests.")
f210e944 11722 (license license:expat)))
66d3f50a
LF
11723
11724(define-public python2-betamax
f210e944 11725 (package-with-python2 python-betamax))
ca0635b4 11726
94cffc63
LF
11727(define-public python-s3transfer
11728 (package
11729 (name "python-s3transfer")
11730 (version "0.1.8")
11731 (source (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "s3transfer" version))
11734 (sha256
11735 (base32
11736 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11737 (build-system python-build-system)
fad8bf97
LF
11738 (arguments
11739 `(#:phases
11740 (modify-phases %standard-phases
11741 (replace 'check
11742 (lambda _
11743 ;; 7 of the 'integration' tests require network access or login
11744 ;; credentials.
11745 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11746 (native-inputs
fad8bf97
LF
11747 `(("python-docutils" ,python-docutils)
11748 ("python-mock" ,python-mock)
11749 ("python-nose" ,python-nose)))
f22efa01 11750 (propagated-inputs
94cffc63
LF
11751 `(("python-botocore" ,python-botocore)))
11752 (synopsis "Amazon S3 Transfer Manager")
11753 (description "S3transfer is a Python library for managing Amazon S3
11754transfers.")
11755 (home-page "https://github.com/boto/s3transfer")
11756 (license license:asl2.0)
11757 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11758
11759(define-public python2-s3transfer
11760 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11761 (package
11762 (inherit base)
11763 (native-inputs
11764 `(("python2-futures" ,python2-futures)
94cffc63 11765 ,@(package-native-inputs base))))))
8ab59181
HG
11766
11767(define-public python-setproctitle
11768(package
11769 (name "python-setproctitle")
11770 (version "1.1.10")
11771 (source
11772 (origin
11773 (method url-fetch)
11774 (uri (pypi-uri "setproctitle" version))
11775 (sha256
11776 (base32
11777 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11778 (build-system python-build-system)
11779 (arguments
11780 '(#:phases
11781 (modify-phases %standard-phases
11782 (add-before 'check 'patch-Makefile
11783 ;; Stricly this is only required for the python2 variant.
11784 ;; But adding a phase in an inherited package seems to be
11785 ;; cumbersum. So we patch even for python3.
11786 (lambda _
11787 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11788 (when nose
11789 (substitute* "Makefile"
11790 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11791 (string-append nose "/bin/nosetests "))))
11792 #t)))
11793 (replace 'check
11794 (lambda _
11795 (setenv "PYTHON" (or (which "python3") (which "python")))
11796 (setenv "PYCONFIG" (or (which "python3-config")
11797 (which "python-config")))
11798 (setenv "CC" "gcc")
11799 ;; No need to extend PYTHONPATH to find the built package, since
11800 ;; the Makefile will build anyway
11801 (zero? (system* "make" "check")))))))
11802 (native-inputs
11803 `(("procps" ,procps))) ; required for tests
11804 (home-page
11805 "https://github.com/dvarrazzo/py-setproctitle")
11806 (synopsis
11807 "Setproctitle implementation for Python to customize the process title")
11808 (description "The library allows a process to change its title (as displayed
11809by system tools such as ps and top).
11810
11811Changing the title is mostly useful in multi-process systems, for
11812example when a master process is forked: changing the children's title
11813allows to identify the task each process is busy with. The technique
11814is used by PostgreSQL and the OpenSSH Server for example.")
11815 (license license:bsd-3)
11816 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11817
11818(define-public python2-setproctitle
11819 (let ((base (package-with-python2
11820 (strip-python2-variant python-setproctitle))))
11821 (package
11822 (inherit base)
11823 (native-inputs `(("python2-nose" ,python2-nose)
11824 ,@(package-native-inputs base))))))
162e42d8
HG
11825
11826(define-public python-validictory
11827 (package
11828 (name "python-validictory")
11829 (version "1.0.1")
11830 (source
11831 (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "validictory" version))
11834 (sha256
11835 (base32
11836 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11837 (build-system python-build-system)
11838 (arguments
11839 '(#:phases
11840 (modify-phases %standard-phases
11841 (add-after 'unpack 'bootstrap
11842 ;; Move the tests out of the package directory to avoid
11843 ;; packaging them.
11844 (lambda* _
11845 (rename-file "validictory/tests" "tests")
11846 (delete-file "tests/__init__.py")))
11847 (replace 'check
11848 (lambda _
11849 ;; Extend PYTHONPATH so the built package will be found.
11850 (setenv "PYTHONPATH"
11851 (string-append (getcwd) "/build/lib:"
11852 (getenv "PYTHONPATH")))
11853 (zero? (system* "py.test" "-vv" )))))))
11854 (native-inputs
11855 `(("python-pytest" ,python-pytest)))
11856 (home-page
11857 "https://github.com/jamesturk/validictory")
11858 (synopsis "General purpose Python data validator")
11859 (description "It allows validation of arbitrary Python data structures.
11860
11861The schema format is based on the JSON Schema
11862proposal (http://json-schema.org), so combined with json the library is also
11863useful as a validator for JSON data.")
f210e944 11864 (license license:expat)))
162e42d8
HG
11865
11866(define-public python2-validictory
f210e944 11867 (package-with-python2 python-validictory))
0990edfe
DM
11868
11869(define-public python-aniso8601
11870 (package
11871 (name "python-aniso8601")
11872 (version "1.1.0")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "aniso8601" version))
11877 (sha256
11878 (base32
11879 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11880 (build-system python-build-system)
11881 (propagated-inputs
11882 `(("python-dateutil-2" ,python-dateutil-2)))
11883 (home-page
11884 "https://bitbucket.org/nielsenb/aniso8601")
11885 (synopsis
11886 "Python library for parsing ISO 8601 strings")
11887 (description
11888 "This package contains a library for parsing ISO 8601 datetime strings.")
11889 (license license:bsd-3)))
999d964d
DM
11890
11891(define-public python-flask-restful
11892 (package
11893 (name "python-flask-restful")
11894 (version "0.3.5")
11895 (source
11896 (origin
11897 (method url-fetch)
11898 (uri (pypi-uri "Flask-RESTful" version))
11899 (sha256
11900 (base32
11901 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11902 (build-system python-build-system)
11903 (propagated-inputs
11904 `(("python-aniso8601" ,python-aniso8601)
11905 ("python-flask" ,python-flask)
11906 ("python-pycrypto" ,python-pycrypto)
11907 ("python-pytz" ,python-pytz)))
11908 (native-inputs
11909 `(;; Optional dependency of Flask. Tests need it.
11910 ("python-blinker" ,python-blinker)
11911 ("python-mock" ,python-mock) ; For tests
11912 ("python-nose" ,python-nose) ; For tests
11913 ("python-sphinx" ,python-sphinx)))
11914 (home-page
11915 "https://www.github.com/flask-restful/flask-restful/")
11916 (synopsis
11917 "Flask module for creating REST APIs")
11918 (description
11919 "This package contains a Flask module for creating REST APIs.")
11920 (license license:bsd-3)))
31288222
DM
11921
11922(define-public python-flask-basicauth
11923 (package
11924 (name "python-flask-basicauth")
11925 (version "0.2.0")
11926 (source
11927 (origin
11928 (method url-fetch)
11929 (uri (pypi-uri "Flask-BasicAuth" version))
11930 (sha256
11931 (base32
11932 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11933 (build-system python-build-system)
11934 (propagated-inputs
11935 `(("python-flask" ,python-flask)))
11936 (home-page
11937 "https://github.com/jpvanhal/flask-basicauth")
11938 (synopsis
11939 "HTTP basic access authentication for Flask")
11940 (description
11941 "This package provides HTTP basic access authentication for Flask.")
11942 (license license:bsd-3)))
903276d0
DM
11943
11944(define-public python-flask-sqlalchemy
11945 (package
11946 (name "python-flask-sqlalchemy")
11947 (version "2.1")
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (pypi-uri "Flask-SQLAlchemy" version))
11952 (sha256
11953 (base32
11954 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11955 (build-system python-build-system)
11956 (propagated-inputs
11957 `(("python-flask" ,python-flask)
11958 ("python-sqlalchemy" ,python-sqlalchemy)))
11959 (home-page
11960 "http://github.com/mitsuhiko/flask-sqlalchemy")
11961 (synopsis
11962 "Module adding SQLAlchemy support to your Flask application")
11963 (description
11964 "This package adds SQLAlchemy support to your Flask application.")
11965 (license license:bsd-3)))
329b4b3b
LF
11966
11967(define-public python-pyev
11968 (package
11969 (name "python-pyev")
11970 (version "0.9.0")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 (uri (pypi-uri "pyev" version))
11975 (sha256
11976 (base32
11977 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11978 (build-system python-build-system)
11979 (arguments
11980 `(#:tests? #f ; no test suite
11981 #:phases
11982 (modify-phases %standard-phases
11983 (add-after 'unpack 'patch
11984 (lambda* (#:key inputs #:allow-other-keys)
11985 (let ((libev (string-append (assoc-ref inputs "libev")
11986 "/lib/libev.so.4")))
11987 (substitute* "setup.py"
11988 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11989 (string-append "libev_dll_name = \"" libev "\"")))))))))
11990 (inputs
11991 `(("libev" ,libev)))
11992 (home-page "http://pythonhosted.org/pyev/")
11993 (synopsis "Python libev interface")
11994 (description "Pyev provides a Python interface to libev.")
11995 (license license:gpl3)))
11996
11997(define-public python2-pyev
11998 (package-with-python2 python-pyev))
45b4f127
DM
11999
12000(define-public python-imagesize
12001 (package
12002 (name "python-imagesize")
12003 (version "0.7.1")
12004 (source
12005 (origin
12006 (method url-fetch)
12007 (uri (pypi-uri "imagesize" version))
12008 (sha256
12009 (base32
12010 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12011 (build-system python-build-system)
9422c98a
LF
12012 (arguments
12013 '(;; Test files are not distributed on PyPi:
12014 ;; https://github.com/shibukawa/imagesize_py/issues/7
12015 #:tests? #f))
45b4f127
DM
12016 (home-page "https://github.com/shibukawa/imagesize_py")
12017 (synopsis "Gets image size of files in variaous formats in Python")
12018 (description
12019 "This package allows determination of image size from
12020PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12021 (license license:expat)))
45b4f127
DM
12022
12023(define-public python2-imagesize
f210e944 12024 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12025
12026(define-public python-axolotl-curve25519
12027 (package
12028 (name "python-axolotl-curve25519")
12029 (version "0.1")
12030 (source
12031 (origin
12032 (method git-fetch)
12033 (uri (git-reference
12034 (url "git://github.com/tgalal/python-axolotl-curve25519")
12035 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12036 (file-name (string-append name "-" version "-checkout"))
12037 (sha256
12038 (base32
12039 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12040 (build-system python-build-system)
12041 (arguments
12042 `(;; Prevent creation of the egg. This works around
12043 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12044 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12045 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12046 (synopsis "Python wrapper for curve25519 library")
12047 (description "This is a python wrapper for the curve25519 library
12048with ed25519 signatures. The C code was pulled from
12049libaxolotl-android. At the moment this wrapper is meant for use by
12050python-axolotl.")
12051 (license (list license:gpl3 ; Most files
683cdbf5 12052 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12053
12054(define-public python2-axolotl-curve25519
12055 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12056
12057(define-public python-axolotl
12058 (package
12059 (name "python-axolotl")
12060 (version "0.1.35")
12061 (source
12062 (origin
12063 (method url-fetch)
12064 (uri (string-append
12065 "https://github.com/tgalal/python-axolotl/archive/"
12066 version ".tar.gz"))
12067 (file-name (string-append name "-" version ".tar.gz"))
12068 (sha256
12069 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12070 (build-system python-build-system)
12071 (arguments
12072 `(#:phases
12073 (modify-phases %standard-phases
12074 ;; Don't install tests
12075 (add-before 'install 'remove-tests
12076 (lambda _
12077 (for-each delete-file-recursively
12078 '("axolotl/tests" "build/lib/axolotl/tests"))
12079 #t)))
12080 ;; Prevent creation of the egg. This works around
12081 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12082 #:configure-flags '("--root=/")))
06ff0837
AI
12083 (propagated-inputs
12084 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12085 ("python-dateutil" ,python-dateutil)
12086 ("python-protobuf" ,python-protobuf)
12087 ("python-pycrypto" ,python-pycrypto)))
12088 (home-page "https://github.com/tgalal/python-axolotl")
12089 (synopsis "Python port of libaxolotl-android")
12090 (description "This is a python port of libaxolotl-android. This
12091is a ratcheting forward secrecy protocol that works in synchronous and
12092asynchronous messaging environments.")
12093 (license license:gpl3)))
12094
12095(define-public python2-axolotl
12096 (package-with-python2 python-axolotl))
e2fca490
DM
12097
12098(define-public python-termstyle
12099 (package
12100 (name "python-termstyle")
12101 (version "0.1.11")
12102 (source
12103 (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "termstyle" version))
12106 (sha256
12107 (base32
12108 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12109 (build-system python-build-system)
12110 (home-page "http://github.com/gfxmonk/termstyle")
12111 (synopsis "Console text coloring for Python")
12112 (description "This package provides console text coloring for Python.")
12113 (license license:bsd-3)))
1e6112d8
DM
12114
12115(define-public python-rednose
12116 (package
12117 (name "python-rednose")
12118 (version "1.2.1")
12119 (source
12120 (origin
12121 (method url-fetch)
12122 (uri (pypi-uri "rednose" version))
12123 (sha256
12124 (base32
12125 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12126 (build-system python-build-system)
12127 (arguments
12128 `(#:phases
12129 (modify-phases %standard-phases
12130 (add-after 'unpack 'fix-deps
12131 (lambda _
12132 ;; See <https://github.com/JBKahn/rednose/issues/12>
12133 (substitute* "setup.py"
12134 (("python-termstyle") "termstyle"))
12135 #t)))))
12136 (propagated-inputs
12137 `(("python-colorama" ,python-colorama)
12138 ("python-termstyle" ,python-termstyle)))
12139 (native-inputs
12140 `(("python-six" ,python-six)
12141 ("python-nose" ,python-nose)))
12142 (home-page "https://github.com/JBKahn/rednose")
12143 (synopsis "Colored output for Python nosetests")
12144 (description "This package provides colored output for the
12145@command{nosetests} command of the Python Nose unit test framework.")
12146 (license license:bsd-3)))
0a7f17f0
DM
12147
12148(define-public python-flask-restplus
12149 (package
12150 (name "python-flask-restplus")
12151 (version "0.9.2")
12152 (source
12153 (origin
12154 (method url-fetch)
12155 (uri (pypi-uri "flask-restplus" version))
12156 (sha256
12157 (base32
12158 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12159 (build-system python-build-system)
12160 (propagated-inputs
12161 `(("python-aniso8601" ,python-aniso8601)
12162 ("python-flask" ,python-flask)
12163 ("python-jsonschema" ,python-jsonschema)
12164 ("python-pytz" ,python-pytz)
12165 ("python-six" ,python-six)))
12166 (native-inputs
12167 `(("python-tzlocal" ,python-tzlocal)
12168 ("python-blinker" ,python-blinker)
12169 ("python-nose" ,python-nose)
12170 ("python-rednose" ,python-rednose)))
12171 (home-page "https://github.com/noirbizarre/flask-restplus")
12172 (synopsis "Framework for documented API development with Flask")
12173 (description "This package provides a framework for API development with
12174the Flask web framework in Python. It is similar to package
12175@code{python-flask-restful} but supports the @code{python-swagger}
12176documentation builder.")
12177 (license license:expat)))
1ed21519
DM
12178
12179(define-public python-sadisplay
12180 (package
12181 (name "python-sadisplay")
12182 (version "0.4.6")
12183 (source
12184 (origin
12185 (method url-fetch)
12186 (uri (pypi-uri "sadisplay" version))
12187 (sha256
12188 (base32
12189 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12190 (build-system python-build-system)
12191 (propagated-inputs
12192 `(("python-sqlalchemy" ,python-sqlalchemy)))
12193 (native-inputs
12194 `(("python-nose" ,python-nose)))
12195 (home-page "https://bitbucket.org/estin/sadisplay")
12196 (synopsis "SQLAlchemy schema displayer")
12197 (description "This package provides a program to build Entity
12198Relationship diagrams from a SQLAlchemy model (or directly from the
12199database).")
12200 (license license:bsd-3)))
12201
12202(define-public python2-sadisplay
12203 (package-with-python2 python-sadisplay))
444a79b6
DM
12204
12205(define-public python-flask-restful-swagger
12206 (package
12207 (name "python-flask-restful-swagger")
12208 (version "0.19")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "flask-restful-swagger" version))
12213 (sha256
12214 (base32
12215 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12216 (build-system python-build-system)
12217 (propagated-inputs
12218 `(("python-flask-restful" ,python-flask-restful)))
12219 (home-page "https://github.com/rantav/flask-restful-swagger")
12220 (synopsis "Extract Swagger specs from Flask-Restful projects")
12221 (description "This package lets you extract Swagger API documentation
12222specs from your Flask-Restful projects.")
12223 (license license:expat)))
12224
12225(define-public python2-flask-restful-swagger
12226 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12227
12228(define-public python-argcomplete
12229 (package
12230 (name "python-argcomplete")
12231 (version "1.7.0")
12232 (source
12233 (origin
12234 (method url-fetch)
12235 (uri (pypi-uri "argcomplete" version))
12236 (sha256
12237 (base32
12238 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12239 (build-system python-build-system)
12240 (home-page "https://github.com/kislyuk/argcomplete")
12241 (synopsis "Shell tab completion for Python argparse")
12242 (description "argcomplete provides extensible command line tab completion
12243of arguments and options for Python scripts using @code{argparse}. It's
12244particularly useful for programs with many options or sub-parsers that can
12245dynamically suggest completions; for example, when browsing resources over the
12246network.")
12247 (license license:asl2.0)))
12248
12249(define-public python2-argcomplete
12250 (package-with-python2 python-argcomplete))
361a2fcf
TGR
12251
12252(define-public python-xopen
12253 (package
12254 (name "python-xopen")
12255 (version "0.1.1")
12256 (source
12257 (origin
12258 (method url-fetch)
12259 (uri (pypi-uri "xopen" version))
12260 (sha256
12261 (base32
12262 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12263 (file-name (string-append name "-" version ".tar.gz"))))
12264 (build-system python-build-system)
12265 (home-page "https://github.com/marcelm/xopen/")
12266 (synopsis "Open compressed files transparently")
12267 (description "This module provides an @code{xopen} function that works like
12268Python's built-in @code{open} function, but can also deal with compressed files.
12269Supported compression formats are gzip, bzip2 and, xz, and are automatically
12270recognized by their file extensions. The focus is on being as efficient as
12271possible on all supported Python versions.")
12272 (license license:expat)))
12273
12274(define-public python2-xopen
12275 (package-with-python2 python-xopen))