gnu: Add python-cssutils.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4dcb135e 6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
7637de23 14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
6bd9ad69 26;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
df893a38 29;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
5220022a 34;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
819939cb 35;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d205f895 36;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
916aafa4 37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
1a917fc9 38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
a01b6da7
NK
39;;;
40;;; This file is part of GNU Guix.
41;;;
42;;; GNU Guix is free software; you can redistribute it and/or modify it
43;;; under the terms of the GNU General Public License as published by
44;;; the Free Software Foundation; either version 3 of the License, or (at
45;;; your option) any later version.
46;;;
47;;; GNU Guix is distributed in the hope that it will be useful, but
48;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50;;; GNU General Public License for more details.
51;;;
52;;; You should have received a copy of the GNU General Public License
53;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
1ffa7090 55(define-module (gnu packages python)
3f641af0 56 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 57 #:use-module (gnu packages)
8e451885 58 #:use-module (gnu packages algebra)
d79a343b 59 #:use-module (gnu packages adns)
89b2e0b0 60 #:use-module (gnu packages attr)
d96034ed 61 #:use-module (gnu packages backup)
3969ca54 62 #:use-module (gnu packages bash)
1ffa7090 63 #:use-module (gnu packages compression)
4ed20663 64 #:use-module (gnu packages databases)
ddc63a56 65 #:use-module (gnu packages django)
5e1c9367 66 #:use-module (gnu packages file)
4ed20663 67 #:use-module (gnu packages fontutils)
4ed20663
AE
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
6eb7af2a 70 #:use-module (gnu packages gl)
4ed20663 71 #:use-module (gnu packages glib)
6eb7af2a 72 #:use-module (gnu packages gstreamer)
4ed20663 73 #:use-module (gnu packages gtk)
421a80a2 74 #:use-module (gnu packages icu4c)
c937562e 75 #:use-module (gnu packages image)
4ed20663 76 #:use-module (gnu packages imagemagick)
d79a343b 77 #:use-module (gnu packages libevent)
b10ab723 78 #:use-module (gnu packages libffi)
89b2e0b0 79 #:use-module (gnu packages linux)
0da98533 80 #:use-module (gnu packages maths)
4ed20663 81 #:use-module (gnu packages multiprecision)
45203542 82 #:use-module (gnu packages networking)
be7134bf 83 #:use-module (gnu packages ncurses)
b04a52a6 84 #:use-module (gnu packages openstack)
d488d5d6 85 #:use-module (gnu packages password-utils)
c9b1b4f9 86 #:use-module (gnu packages pcre)
4ed20663 87 #:use-module (gnu packages perl)
b10ab723 88 #:use-module (gnu packages pkg-config)
06ff0837 89 #:use-module (gnu packages protobuf)
4ed20663 90 #:use-module (gnu packages readline)
6eb7af2a 91 #:use-module (gnu packages sdl)
c9b1b4f9 92 #:use-module (gnu packages statistics)
8f9ac901 93 #:use-module (gnu packages tex)
1c65314c 94 #:use-module (gnu packages texinfo)
cc2b77df 95 #:use-module (gnu packages tls)
e25f0174 96 #:use-module (gnu packages version-control)
02f8f804 97 #:use-module (gnu packages video)
8d12be1e 98 #:use-module (gnu packages web)
ce0614dd 99 #:use-module (gnu packages base)
26b307e2 100 #:use-module (gnu packages xml)
6fa14469 101 #:use-module (gnu packages xorg)
0bdc1671 102 #:use-module (gnu packages xdisorg)
4ed20663 103 #:use-module (gnu packages zip)
afa181ff 104 #:use-module (gnu packages tcl)
63bcec71 105 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
106 #:use-module (guix packages)
107 #:use-module (guix download)
ea5456c8 108 #:use-module (guix git-download)
11bb85a1 109 #:use-module (guix utils)
acc26ff1 110 #:use-module (guix build-system gnu)
d8c4998f 111 #:use-module (guix build-system cmake)
898238b9 112 #:use-module (guix build-system python)
1c65314c
FB
113 #:use-module (guix build-system trivial)
114 #:use-module (srfi srfi-1))
a01b6da7 115
45848023 116(define-public python-2.7
a01b6da7
NK
117 (package
118 (name "python")
f0499100 119 (version "2.7.12")
a01b6da7
NK
120 (source
121 (origin
122 (method url-fetch)
9b43a0ff 123 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
124 version "/Python-" version ".tar.xz"))
125 (sha256
126 (base32
f0499100 127 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
128 (patches (search-patches "python-2.7-search-paths.patch"
129 "python-2-deterministic-build-info.patch"
15e57f57 130 "python-2.7-site-prefixes.patch"
c3052d6b 131 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
132 (modules '((guix build utils)))
133 ;; suboptimal to delete failing tests here, but if we delete them in the
134 ;; arguments then we need to make sure to strip out that phase when it
135 ;; gets inherited by python and python-minimal.
136 (snippet
137 '(begin
138 (for-each delete-file
139 '("Lib/test/test_compileall.py"
f0499100 140 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
141 "Lib/test/test_distutils.py"
142 "Lib/test/test_import.py"
143 "Lib/test/test_shutil.py"
144 "Lib/test/test_socket.py"
1bb163b0 145 "Lib/test/test_subprocess.py"))
10a42aa2 146 #t))))
02f0c3b2
LC
147 (outputs '("out"
148 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 149 (build-system gnu-build-system)
3fdc99da 150 (arguments
10a42aa2 151 `(;; 356 tests OK.
e7e7a1eb
EF
152 ;; 6 tests failed:
153 ;; test_compileall test_distutils test_import test_shutil test_socket
154 ;; test_subprocess
155 ;; 39 tests skipped:
ff6f33cf
ED
156 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
157 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
158 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
159 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
160 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
161 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
162 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
163 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
164 ;; test_winreg test_winsound test_zipfile64
165 ;; 4 skips unexpected on linux2:
166 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 167 #:test-target "test"
3fdc99da 168 #:configure-flags
6a20289d
LC
169 (list "--enable-shared" ;allow embedding
170 "--with-system-ffi" ;build ctypes
aaf75c89 171 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
172 (string-append "LDFLAGS=-Wl,-rpath="
173 (assoc-ref %outputs "out") "/lib"))
fd982732 174
d2cc9c7c
LC
175 #:modules ((ice-9 ftw) (ice-9 match)
176 (guix build utils) (guix build gnu-build-system))
fd982732 177 #:phases
46472ecd
MW
178 (modify-phases %standard-phases
179 (add-before
180 'configure 'patch-lib-shells
181 (lambda _
182 ;; Filter for existing files, since some may not exist in all
183 ;; versions of python that are built with this recipe.
184 (substitute* (filter file-exists?
185 '("Lib/subprocess.py"
186 "Lib/popen2.py"
187 "Lib/distutils/tests/test_spawn.py"
188 "Lib/test/test_subprocess.py"))
189 (("/bin/sh") (which "sh")))
dedc8320
LC
190
191 ;; Use zero as the timestamp in .pyc files so that builds are
192 ;; deterministic. TODO: Remove it when this variable is set in
193 ;; gnu-build-system.scm.
a665996f 194 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 195 #t))
5b4e2791
LC
196 (add-before 'configure 'do-not-record-configure-flags
197 (lambda* (#:key configure-flags #:allow-other-keys)
198 ;; Remove configure flags from the installed '_sysconfigdata.py'
199 ;; and 'Makefile' so we don't end up keeping references to the
200 ;; build tools.
201 ;;
202 ;; Preserve at least '--with-system-ffi' since otherwise the
203 ;; thing tries to build libffi, fails, and we end up with a
204 ;; Python that lacks ctypes.
205 (substitute* "configure"
206 (("^CONFIG_ARGS=.*$")
207 (format #f "CONFIG_ARGS='~a'\n"
208 (if (member "--with-system-ffi" configure-flags)
209 "--with-system-ffi"
210 ""))))
211 #t))
46472ecd
MW
212 (add-before
213 'check 'pre-check
214 (lambda _
215 ;; 'Lib/test/test_site.py' needs a valid $HOME
216 (setenv "HOME" (getcwd))
217 #t))
218 (add-after
219 'unpack 'set-source-file-times-to-1980
220 ;; XXX One of the tests uses a ZIP library to pack up some of the
221 ;; source tree, and fails with "ZIP does not support timestamps
222 ;; before 1980". Work around this by setting the file times in the
223 ;; source tree to sometime in early 1980.
224 (lambda _
225 (let ((circa-1980 (* 10 366 24 60 60)))
226 (ftw "." (lambda (file stat flag)
227 (utime file circa-1980 circa-1980)
228 #t))
02f0c3b2 229 #t)))
9ffe61b0
LC
230 (add-after 'install 'remove-tests
231 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
232 ;; because these files are used by some libraries out there.
233 (lambda* (#:key outputs #:allow-other-keys)
234 (let ((out (assoc-ref outputs "out")))
235 (match (scandir (string-append out "/lib")
236 (lambda (name)
237 (string-prefix? "python" name)))
238 ((pythonX.Y)
239 (let ((testdir (string-append out "/lib/" pythonX.Y
240 "/test")))
241 (with-directory-excursion testdir
242 (for-each delete-file-recursively
243 (scandir testdir
244 (match-lambda
245 ((or "." "..") #f)
246 (file
247 (not
248 (string-prefix? "test_support."
249 file))))))
250 (call-with-output-file "__init__.py" (const #t))
251 #t)))))))
216c283b
LC
252 (add-before 'strip 'make-libraries-writable
253 (lambda* (#:key outputs #:allow-other-keys)
254 ;; Make .so files writable so they can be stripped.
255 (let ((out (assoc-ref outputs "out")))
256 (for-each (lambda (file)
257 (chmod file #o755))
258 (find-files (string-append out "/lib")
259 "\\.so"))
260 #t)))
02f0c3b2
LC
261 (add-after 'install 'move-tk-inter
262 (lambda* (#:key outputs #:allow-other-keys)
263 ;; When Tkinter support is built move it to a separate output so
264 ;; that the main output doesn't contain a reference to Tcl/Tk.
265 (let ((out (assoc-ref outputs "out"))
266 (tk (assoc-ref outputs "tk")))
267 (when tk
268 (match (find-files out "tkinter.*\\.so")
269 ((tkinter.so)
270 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
271 ;; want it under TK/lib/pythonX.Y/site-packages.
272 (let* ((len (string-length out))
273 (target (string-append
274 tk "/"
275 (string-drop
276 (dirname (dirname tkinter.so))
277 len)
278 "/site-packages")))
279 (install-file tkinter.so target)
280 (delete-file tkinter.so)))))
281 #t))))))
a01b6da7 282 (inputs
3fdc99da
CR
283 `(("bzip2" ,bzip2)
284 ("gdbm" ,gdbm)
b10ab723 285 ("libffi" ,libffi) ; for ctypes
b88e1b0a 286 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 287 ("openssl" ,openssl)
3fdc99da 288 ("readline" ,readline)
afa181ff
LC
289 ("zlib" ,zlib)
290 ("tcl" ,tcl)
291 ("tk" ,tk))) ; for tkinter
b10ab723
CR
292 (native-inputs
293 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
294 (native-search-paths
295 (list (search-path-specification
296 (variable "PYTHONPATH")
af070955 297 (files '("lib/python2.7/site-packages")))))
f0499100 298 (home-page "https://www.python.org")
afa181ff 299 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
300 (description
301 "Python is a remarkably powerful dynamic programming language that
302is used in a wide variety of application domains. Some of its key
303distinguishing features include: clear, readable syntax; strong
304introspection capabilities; intuitive object orientation; natural
305expression of procedural code; full modularity, supporting hierarchical
306packages; exception-based error handling; and very high level dynamic
307data types.")
3f641af0 308 (license license:psfl)))
acc26ff1 309
45848023
HG
310;; Current 2.x version.
311(define-public python-2 python-2.7)
312
72df6680 313(define-public python-3.5
b24d1cfc 314 (package (inherit python-2)
72df6680 315 (version "3.5.2")
717003e3
LC
316 (source (origin
317 (method url-fetch)
318 (uri (string-append "https://www.python.org/ftp/python/"
319 version "/Python-" version ".tar.xz"))
fc1adab1
AK
320 (patches (search-patches
321 "python-fix-tests.patch"
72df6680 322 "python-3.5-fix-tests.patch"
fc1adab1
AK
323 "python-3-deterministic-build-info.patch"
324 "python-3-search-paths.patch"))
717003e3
LC
325 (patch-flags '("-p0"))
326 (sha256
327 (base32
72df6680 328 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
329 (arguments (substitute-keyword-arguments (package-arguments python-2)
330 ((#:tests? _) #t)))
1aebc0cb
AE
331 (native-search-paths
332 (list (search-path-specification
333 (variable "PYTHONPATH")
0e05d01e
SB
334 (files (list (string-append "lib/python"
335 (version-major+minor version)
336 "/site-packages"))))))))
f26a77ff 337
72df6680
LF
338(define-public python-3.4
339 (package (inherit python-3.5)
340 (version "3.4.5")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "https://www.python.org/ftp/python/"
344 version "/Python-" version ".tar.xz"))
345 (patches (search-patches
346 "python-fix-tests.patch"
347 "python-3.4-fix-tests.patch"
348 "python-3-deterministic-build-info.patch"
349 "python-3-search-paths.patch"))
350 (patch-flags '("-p0"))
351 (sha256
352 (base32
353 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
354
45848023 355;; Current 3.x version.
72df6680 356(define-public python-3 python-3.5)
45848023
HG
357
358;; Current major version.
359(define-public python python-3)
360
95288fcc
LC
361;; Minimal variants of Python, mostly used to break the cycle between Tk and
362;; Python (Tk -> libxcb -> Python.)
363
364(define-public python2-minimal
365 (package (inherit python-2)
366 (name "python-minimal")
02f0c3b2 367 (outputs '("out"))
95288fcc
LC
368 (arguments
369 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
370 ((#:configure-flags cf)
371 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
372 (inputs '()))) ;none of the optional dependencies
373
374(define-public python-minimal
898238b9 375 (package (inherit python)
95288fcc 376 (name "python-minimal")
02f0c3b2 377 (outputs '("out"))
95288fcc 378
d0b73960 379 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
95288fcc
LC
384 ("zlib" ,zlib)))))
385
64cb064c
LC
386(define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
898238b9 389 (package (inherit python)
95288fcc 390 (name name)
898238b9
AE
391 (source #f)
392 (build-system trivial-build-system)
02f0c3b2 393 (outputs '("out"))
3969ca54 394 (inputs `(("bash" ,bash)))
3c0f2329 395 (propagated-inputs `(("python" ,python)))
898238b9
AE
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
3969ca54
SB
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
0d56e3e1
LC
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425that they can be invoked under their usual name---e.g., @command{python}
426instead of @command{python3}.")))
427
95288fcc
LC
428(define-public python-wrapper (wrap-python3 python))
429(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 430
aaf625b8
RW
431(define-public python-psutil
432 (package
433 (name "python-psutil")
88535a44 434 (version "4.3.0")
aaf625b8
RW
435 (source
436 (origin
437 (method url-fetch)
f56777be 438 (uri (pypi-uri "psutil" version))
aaf625b8
RW
439 (sha256
440 (base32
88535a44 441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 442 (build-system python-build-system)
88535a44 443 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
444 (synopsis "Library for retrieving information on running processes")
445 (description
446 "psutil (Python system and process utilities) is a library for retrieving
447information on running processes and system utilization (CPU, memory, disks,
448network) in Python. It is useful mainly for system monitoring, profiling and
449limiting process resources and management of running processes. It implements
450many functionalities offered by command line tools such as: ps, top, lsof,
451netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
452pidof, tty, taskset, pmap.")
3f641af0 453 (license license:bsd-3)))
aaf625b8
RW
454
455(define-public python2-psutil
456 (package-with-python2 python-psutil))
898238b9 457
f9da1d8a
ED
458(define-public python-passlib
459 (package
460 (name "python-passlib")
1c9f78ec 461 (version "1.7.0")
f9da1d8a
ED
462 (source
463 (origin
464 (method url-fetch)
690e8c66 465 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
466 (sha256
467 (base32
1c9f78ec 468 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
469 (build-system python-build-system)
470 (native-inputs
f3b98f4f 471 `(("python-nose" ,python-nose)))
f22efa01 472 (propagated-inputs
f9da1d8a
ED
473 `(("python-py-bcrypt" ,python-py-bcrypt)))
474 (arguments
475 `(#:phases
476 (alist-cons-before
477 'check 'set-PYTHON_EGG_CACHE
478 ;; some tests require access to "$HOME/.cython"
479 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
480 %standard-phases)))
481 (home-page "https://bitbucket.org/ecollins/passlib")
482 (synopsis
483 "Comprehensive password hashing framework")
484 (description
485 "Passlib is a password hashing library for Python 2 & 3, which provides
486cross-platform implementations of over 30 password hashing algorithms, as well
487as a framework for managing existing password hashes. It's designed to be
488useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
489to providing full-strength password hashing for multi-user application.")
3f641af0 490 (license license:bsd-3)))
f9da1d8a
ED
491
492(define-public python2-passlib
493 (package-with-python2 python-passlib))
494
feb0d9c3
ED
495(define-public python-py-bcrypt
496 (package
497 (name "python-py-bcrypt")
498 (version "0.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
504 version
505 ".tar.gz"))
506 (sha256
507 (base32
508 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
509 (build-system python-build-system)
feb0d9c3
ED
510 (home-page "https://code.google.com/p/py-bcrypt")
511 (synopsis
512 "Bcrypt password hashing and key derivation")
513 (description
514 "A python wrapper of OpenBSD's Blowfish password hashing code. This
515system hashes passwords using a version of Bruce Schneier's Blowfish block
516cipher with modifications designed to raise the cost of off-line password
517cracking and frustrate fast hardware implementation. The computation cost of
518the algorithm is parametised, so it can be increased as computers get faster.
519The intent is to make a compromise of a password database less likely to
520result in an attacker gaining knowledge of the plaintext passwords (e.g. using
521John the Ripper).")
522 ;; "sha2.c" is under BSD-3;
523 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
524 ;; the rest is under ISC.
3f641af0 525 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
526
527(define-public python2-py-bcrypt
528 (package-with-python2 python-py-bcrypt))
529
530
429fdea1
ED
531(define-public python-paramiko
532 (package
533 (name "python-paramiko")
81b9bbbd 534 (version "1.16.0")
429fdea1
ED
535 (source
536 (origin
537 (method url-fetch)
81b9bbbd 538 (uri (pypi-uri "paramiko" version))
429fdea1
ED
539 (sha256
540 (base32
81b9bbbd 541 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 542 (build-system python-build-system)
a3fc12da 543 (propagated-inputs
f22efa01
HG
544 `(("python-pycrypto" ,python-pycrypto)
545 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
546 (home-page "http://www.paramiko.org/")
547 (synopsis "SSHv2 protocol library")
548 (description "Paramiko is a python implementation of the SSHv2 protocol,
549providing both client and server functionality. While it leverages a Python C
550extension for low level cryptography (PyCrypto), Paramiko itself is a pure
551Python interface around SSH networking concepts.")
3f641af0 552 (license license:lgpl2.1+)))
429fdea1
ED
553
554(define-public python2-paramiko
555 (package-with-python2 python-paramiko))
556
557
de73dbf6
ED
558(define-public python-httplib2
559 (package
560 (name "python-httplib2")
286f1bac 561 (version "0.9.2")
de73dbf6
ED
562 (source
563 (origin
564 (method url-fetch)
286f1bac 565 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
566 (sha256
567 (base32
286f1bac 568 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 569 (build-system python-build-system)
286f1bac 570 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
571 (synopsis "Comprehensive HTTP client library")
572 (description
573 "A comprehensive HTTP client library supporting many features left out of
574other HTTP libraries.")
575 (license license:expat)))
576
577(define-public python2-httplib2
578 (package-with-python2 python-httplib2))
579
67039875
ED
580(define-public python-ecdsa
581 (package
582 (name "python-ecdsa")
583 (version "0.13")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (string-append
588 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
589 version
590 ".tar.gz"))
591 (sha256
592 (base32
593 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
594 (build-system python-build-system)
67039875
ED
595 (inputs
596 `(("openssl" ,openssl)))
597 (home-page
598 "http://github.com/warner/python-ecdsa")
599 (synopsis
600 "ECDSA cryptographic signature library (pure python)")
601 (description
602 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
603Curve Digital Signature Algorithm), implemented purely in Python. With this
604library, you can quickly create keypairs (signing key and verifying key), sign
605messages, and verify the signatures. The keys and signatures are very short,
606making them easy to handle and incorporate into other protocols.")
607 (license license:expat)))
608
609(define-public python2-ecdsa
610 (package-with-python2 python-ecdsa))
611
52323f32
ED
612(define-public python-ccm
613 (package
614 (name "python-ccm")
db5567f7 615 (version "2.1.6")
52323f32
ED
616 (source
617 (origin
618 (method url-fetch)
db5567f7 619 (uri (pypi-uri "ccm" version))
52323f32
ED
620 (sha256
621 (base32
db5567f7 622 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 623 (build-system python-build-system)
f22efa01 624 (propagated-inputs
52323f32 625 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
626 ;; Not listed in setup.py, but used in ccmlib/node.py for full
627 ;; functionality
628 ("python-psutil" ,python-psutil)
52323f32
ED
629 ("python-six" ,python-six)))
630 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
631 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
632localhost")
633 (description "Cassandra Cluster Manager is a development tool for testing
634local Cassandra clusters. It creates, launches and removes Cassandra clusters
635on localhost.")
3f641af0 636 (license license:asl2.0)))
52323f32
ED
637
638(define-public python2-ccm
639 (package-with-python2 python-ccm))
640
89114f39 641(define-public python-pytz
acc26ff1 642 (package
89114f39 643 (name "python-pytz")
a5f92ca0 644 (version "2016.10")
acc26ff1
CR
645 (source
646 (origin
647 (method url-fetch)
61c9babb 648 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
649 (sha256
650 (base32
a5f92ca0 651 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 652 (build-system python-build-system)
8498b8cf 653 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 654 (home-page "http://pythonhosted.org/pytz")
9e771e3b 655 (synopsis "Python timezone library")
acc26ff1
CR
656 (description
657 "This library allows accurate and cross platform timezone calculations
658using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 659 (license license:expat)))
5ace6e2f 660
89114f39 661(define-public python2-pytz
11bb85a1 662 (package-with-python2 python-pytz))
89114f39 663
fc50e9c6 664
89114f39 665(define-public python-babel
5ace6e2f 666 (package
89114f39 667 (name "python-babel")
ffb1e98d 668 (version "2.3.4")
5ace6e2f
CR
669 (source
670 (origin
671 (method url-fetch)
b850a6d8 672 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
673 (sha256
674 (base32
ffb1e98d 675 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 676 (build-system python-build-system)
f22efa01 677 (propagated-inputs
f3b98f4f 678 `(("python-pytz" ,python-pytz)))
8498b8cf 679 (arguments `(#:tests? #f)) ; no test target
e1804763 680 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
681 (synopsis
682 "Tools for internationalizing Python applications")
683 (description
684 "Babel is composed of two major parts:
685- tools to build and work with gettext message catalogs
686- a Python interface to the CLDR (Common Locale Data Repository), providing
687access to various locale display names, localized number and date formatting,
688etc. ")
3f641af0 689 (license license:bsd-3)))
89114f39
AE
690
691(define-public python2-babel
11bb85a1 692 (package-with-python2 python-babel))
73adf220 693
ed377cc6
RW
694(define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
f2d06d46 697 (version "3.5.0.1")
ed377cc6
RW
698 (source
699 (origin
700 (method url-fetch)
701 (uri (string-append
702 "https://pypi.python.org/packages/source/b/"
703 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
704 version ".tar.gz"))
705 (sha256
706 (base32
f2d06d46 707 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 708 (build-system python-build-system)
f2d06d46
EF
709 (arguments
710 `(#:python ,python-2
711 #:tests? #f)) ; no test target
f2d06d46
EF
712 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
713 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
714 (description
715 "This backport brings the ssl.match_hostname() function to users of
716earlier versions of Python. The function checks the hostname in the
717certificate returned by the server to which a connection has been established,
718and verifies that it matches the intended target hostname.")
3f641af0 719 (license license:psfl)))
ed377cc6 720
d205f895
TD
721(define-public python-hdf4
722 (package
723 (name "python-hdf4")
724 (version "0.9")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri name version))
729 (sha256
730 (base32
731 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
732 (build-system python-build-system)
733 (native-inputs `(("nose" ,python-nose)))
734 (propagated-inputs `(("numpy" ,python-numpy)))
735 (inputs
736 `(("hdf4" ,hdf4)
737 ("libjpeg" ,libjpeg)
738 ("zlib" ,zlib)))
739 (arguments
740 `(#:phases
741 (modify-phases %standard-phases
742 (replace 'check
743 (lambda _
744 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
745 ;; on to import numpy. Somehow this works on their CI system.
746 ;; Let's just manage PYTHONPATH here instead.
747 (substitute* "runexamples.sh"
748 (("export PYTHONPATH=.*") ""))
749 (setenv "PYTHONPATH"
750 (string-append (getcwd) ":"
751 (getenv "PYTHONPATH")))
752 (and (zero? (system* "./runexamples.sh"))
753 (zero? (system* "nosetests" "-v"))))))))
754 (home-page "https://github.com/fhs/python-hdf4")
755 (synopsis "Python interface to the NCSA HDF4 library")
756 (description
757 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
758which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
759NetCDF files can also be read and modified. Python-HDF4 is a fork of
760@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
761 (license license:expat)))
762
763(define-public python2-hdf4
764 (package-with-python2 python-hdf4))
765
ef5cbf9b
RW
766(define-public python-h5py
767 (package
768 (name "python-h5py")
fe147c41 769 (version "2.6.0")
ef5cbf9b
RW
770 (source
771 (origin
772 (method url-fetch)
fe147c41 773 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
774 (sha256
775 (base32
fe147c41 776 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 777 (build-system python-build-system)
797e1401
RW
778 (arguments
779 `(#:tests? #f ; no test target
780 #:phases
781 (modify-phases %standard-phases
782 (add-after 'unpack 'fix-hdf5-paths
783 (lambda* (#:key inputs #:allow-other-keys)
784 (let ((prefix (assoc-ref inputs "hdf5")))
785 (substitute* "setup_build.py"
786 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
787 (string-append "['" prefix "/lib" "']"))
788 (("'/opt/local/include', '/usr/local/include'")
789 (string-append "'" prefix "/include" "'")))
790 (substitute* "setup_configure.py"
791 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
792 (string-append "['" prefix "/lib" "']")))
793 #t))))))
3c4010b1 794 (propagated-inputs
69866690
HG
795 `(("python-six" ,python-six)
796 ("python-numpy" ,python-numpy)))
ef5cbf9b 797 (inputs
69866690 798 `(("hdf5" ,hdf5)))
ef5cbf9b 799 (native-inputs
fe147c41
EF
800 `(("python-cython" ,python-cython)
801 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
802 (home-page "http://www.h5py.org/")
803 (synopsis "Read and write HDF5 files from Python")
804 (description
805 "The h5py package provides both a high- and low-level interface to the
806HDF5 library from Python. The low-level interface is intended to be a
807complete wrapping of the HDF5 API, while the high-level component supports
808access to HDF5 files, datasets and groups using established Python and NumPy
809concepts.")
9820a028 810 (license license:bsd-3)))
ef5cbf9b
RW
811
812(define-public python2-h5py
9820a028 813 (package-with-python2 python-h5py))
ef5cbf9b 814
ea8450c8
TD
815(define-public python-netcdf4
816 (package
817 (name "python-netcdf4")
818 (version "1.2.6")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "netCDF4" version))
823 (sha256
824 (base32
825 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
826 (build-system python-build-system)
827 (native-inputs
828 `(("python-cython" ,python-cython)))
829 (propagated-inputs
830 `(("python-numpy" ,python-numpy)))
831 (inputs
832 `(("netcdf" ,netcdf)
833 ("hdf4" ,hdf4)
834 ("hdf5" ,hdf5)))
835 (arguments
836 '(#:phases
837 (modify-phases %standard-phases
838 (replace 'check
839 (lambda _
840 (setenv "NO_NET" "1") ; disable opendap tests
841 (with-directory-excursion "test"
842 (setenv "PYTHONPATH" ; find and add the library we just built
843 (string-append
844 (car (find-files "../build" "lib.*"
845 #:directories? #:t
846 #:fail-on-error? #:t))
847 ":" (getenv "PYTHONPATH")))
848 (zero? (system* "python" "run_all.py"))))))))
849 (home-page
850 "https://github.com/Unidata/netcdf4-python")
851 (synopsis "Python/numpy interface to the netCDF library")
852 (description "Netcdf4-python is a Python interface to the netCDF C
853library. netCDF version 4 has many features not found in earlier
854versions of the library and is implemented on top of HDF5. This module
855can read and write files in both the new netCDF 4 and the old netCDF 3
856format, and can create files that are readable by HDF5 clients. The
857API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
858to users of that module.")
859 ;; The software is mainly ISC, but includes some files covered
860 ;; by the Expat license.
861 (license (list license:isc license:expat))))
862
863(define-public python2-netcdf4
864 (package-with-python2 python-netcdf4))
865
c1448c69
EB
866(define-public python-lockfile
867 (package
868 (name "python-lockfile")
692add53 869 (version "0.12.2")
c1448c69
EB
870 (source
871 (origin
872 (method url-fetch)
873 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
874 "lockfile-" version ".tar.gz"))
875 (sha256
876 (base32
692add53 877 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
878 (build-system python-build-system)
879 (arguments '(#:test-target "check"))
692add53
BW
880 (native-inputs
881 `(("python-pbr" ,python-pbr)))
6a8f26a4 882 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
883 (synopsis "Platform-independent file locking module")
884 (description
885 "The lockfile package exports a LockFile class which provides a simple
886API for locking files.")
f210e944 887 (license license:expat)))
c1448c69
EB
888
889(define-public python2-lockfile
f210e944 890 (package-with-python2 python-lockfile))
c1448c69 891
5a1a4bf6
EB
892(define-public python-mock
893 (package
894 (name "python-mock")
895 (version "1.0.1")
896 (source
897 (origin
898 (method url-fetch)
6b7877e1 899 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
900 (sha256
901 (base32
902 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
903 (build-system python-build-system)
904 (arguments '(#:test-target "check"))
6b7877e1 905 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 906 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
907 (description
908 "Mock is a library for testing in Python. It allows you to replace parts
909of your system under test with mock objects and make assertions about how they
910have been used.")
bd3fa666 911 (license license:expat)))
5a1a4bf6
EB
912
913(define-public python2-mock
914 (package-with-python2 python-mock))
915
fc50e9c6 916
73adf220
AE
917(define-public python-setuptools
918 (package
919 (name "python-setuptools")
d660f7be 920 (version "31.0.0")
73adf220
AE
921 (source
922 (origin
923 (method url-fetch)
d660f7be 924 (uri (pypi-uri "setuptools" version))
73adf220
AE
925 (sha256
926 (base32
d660f7be 927 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
928 (modules '((guix build utils)))
929 (snippet
930 '(begin
931 ;; Remove included binaries which are used to build self-extracting
932 ;; installers for Windows.
933 ;; TODO: Find some way to build them ourself so we can include them.
934 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
935 #t))))
73adf220 936 (build-system python-build-system)
d3d656c5
AE
937 ;; FIXME: Tests require pytest, which itself relies on setuptools.
938 ;; One could bootstrap with an internal untested setuptools.
73adf220 939 (arguments
824af8ca 940 `(#:tests? #f))
73adf220
AE
941 (home-page "https://pypi.python.org/pypi/setuptools")
942 (synopsis
943 "Library designed to facilitate packaging Python projects")
944 (description
945 "Setuptools is a fully-featured, stable library designed to facilitate
946packaging Python projects, where packaging includes:
947Python package and module definitions,
948distribution package metadata,
949test hooks,
950project installation,
951platform-specific details,
952Python 3 support.")
d660f7be
MB
953 ;; TODO: setuptools now bundles the following libraries:
954 ;; packaging, pyparsing, six and appdirs. How to unbundle?
955 (license (list license:psfl ; setuptools itself
956 license:expat ; six, appdirs, pyparsing
957 license:asl2.0 ; packaging is dual ASL2/BSD-2
958 license:bsd-2))))
73adf220
AE
959
960(define-public python2-setuptools
961 (package-with-python2 python-setuptools))
fc50e9c6 962
aa21c764 963;;; Pycrypto is abandoned upstream:
1194575b 964;;;
aa21c764 965;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 966;;;
aa21c764 967;;; TODO Remove this package from GNU Guix.
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)
aa21c764
LF
975 (uri (pypi-uri "pycrypto" version))
976 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
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")
6bd9ad69 1067 (version "2.5.3")
cafc3f5a
EB
1068 (source
1069 (origin
1070 (method url-fetch)
394b8060 1071 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1072 (sha256
1073 (base32
6bd9ad69 1074 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
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")
e80aaeb4 1197 (version "2.8.3")
1d08c01f
AE
1198 (source
1199 (origin
1200 (method url-fetch)
fe476868 1201 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1202 (sha256
1203 (base32
e80aaeb4 1204 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
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")
2e161eaf 1288 (version "1.9.5")
421a80a2
AE
1289 (source
1290 (origin
1291 (method url-fetch)
2e161eaf 1292 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1293 (sha256
1294 (base32
2e161eaf 1295 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2
AE
1296 (build-system python-build-system)
1297 (inputs
1298 `(("icu4c" ,icu4c)))
421a80a2 1299 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1300 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1301 (description
1302 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1303 (license license:x11)))
ed07b08d
LF
1304
1305(define-public python2-pyicu
f210e944 1306 (package-with-python2 python-pyicu))
cc20a22a
LC
1307
1308(define-public python2-dogtail
1309 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1310 ;; spaces in indentation" with Python 3.
1311 (package
1312 (name "python2-dogtail")
1313 (version "0.8.2")
1314 (source (origin
1315 (method url-fetch)
1316 (uri (string-append
1317 "https://fedorahosted.org/released/dogtail/dogtail-"
1318 version ".tar.gz"))
1319 (sha256
1320 (base32
1321 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1322 (build-system python-build-system)
1323 (arguments `(#:python ,python-2
1324 #:tests? #f)) ; invalid command "test"
1325 (home-page "https://fedorahosted.org/dogtail/")
1003fbcf 1326 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1327 (description
35b9e423 1328 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1329It uses Accessibility (a11y) technologies to communicate with desktop
1330applications. dogtail scripts are written in Python and executed like any
1331other Python program.")
3f641af0 1332 (license license:gpl2+)))
515e6878 1333
011b18c3
LC
1334(define-public python2-empy
1335 (package
1336 (name "python2-empy")
1337 (version "3.3")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1345 (build-system python-build-system)
1346 (arguments
1347 `(#:python ,python-2
1348 #:phases (alist-replace
1349 'check
1350 (lambda _
1351 (zero? (system* "./test.sh")))
1352 %standard-phases)))
1353 (home-page "http://www.alcyone.com/software/empy/")
1354 (synopsis "Templating system for Python")
1355 (description
1356 "EmPy is a system for embedding Python expressions and statements in
1357template text; it takes an EmPy source file, processes it, and produces
1358output. This is accomplished via expansions, which are special signals to the
1cd4027c 1359EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1360EmPy can expand arbitrary Python expressions and statements in this way, as
1361well as a variety of special forms. Textual data not explicitly delimited in
1362this way is sent unaffected to the output, allowing Python to be used in
1363effect as a markup language. Also supported are callbacks via hooks,
1364recording and playback via diversions, and dynamic, chainable filters. The
1365system is highly configurable via command line options and embedded
1366commands.")
3f641af0 1367 (license license:lgpl2.1+)))
011b18c3 1368
8deeda0c
LC
1369(define-public python2-element-tree
1370 (package
1371 (name "python2-element-tree")
1372 (version "1.2.6")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (string-append
1376 "http://effbot.org/media/downloads/elementtree-"
1377 version "-20050316.tar.gz"))
1378 (sha256
1379 (base32
1380 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1381 (build-system python-build-system)
1382 (arguments
1383 `(#:python ,python-2 ; seems to be part of Python 3
1384 #:tests? #f)) ; no 'test' sub-command
1385 (synopsis "Toolkit for XML processing in Python")
1386 (description
1387 "ElementTree is a Python library supporting lightweight XML processing.")
1388 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1389 (license (license:x11-style
1390 "http://docs.python.org/2/license.html"
1391 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1392
1393(define-public python2-pybugz
1394 (package
1395 (name "python2-pybugz")
1396 (version "0.6.11")
1397 (source (origin
1398 (method url-fetch)
1399 (uri (string-append
1400 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1401 version ".tar.gz"))
1402 (sha256
1403 (base32
6f194a1e 1404 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1405 (patches (search-patches "pybugz-stty.patch"
1406 "pybugz-encode-error.patch"))))
8deeda0c
LC
1407 (build-system python-build-system)
1408 (arguments
1409 `(#:python ,python-2 ; SyntaxError with Python 3
1410 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1411 (propagated-inputs
1412 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1413 (synopsis "Python and command-line interface to Bugzilla")
1414 (description
1415 "PyBugz is a Python library and command-line tool to query the Bugzilla
1416bug tracking system. It is meant as an aid to speed up interaction with the
1417bug tracker.")
1418 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1419 (license license:gpl2)))
8deeda0c 1420
a480bc41
EB
1421(define-public python-enum34
1422 (package
1423 (name "python-enum34")
d39ae1e5 1424 (version "1.1.0")
a480bc41
EB
1425 (source
1426 (origin
1427 (method url-fetch)
d39ae1e5 1428 (uri (pypi-uri "enum34" version))
a480bc41
EB
1429 (sha256
1430 (base32
d39ae1e5 1431 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1432 (build-system python-build-system)
a480bc41
EB
1433 (arguments
1434 `(#:phases
1435 (alist-replace
1436 'check
1437 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1438 %standard-phases)))
1439 (home-page "https://pypi.python.org/pypi/enum34")
1440 (synopsis "Backported Python 3.4 Enum")
1441 (description
1442 "Enum34 is the new Python stdlib enum module available in Python 3.4
1443backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1444 (license license:bsd-3)))
a480bc41 1445
820acd1b
LF
1446(define-public python2-enum34
1447 (package-with-python2 python-enum34))
1448
a480bc41
EB
1449(define-public python-parse-type
1450 (package
1451 (name "python-parse-type")
1452 (version "0.3.4")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (string-append "https://pypi.python.org/packages/source/p/"
1457 "parse_type/parse_type-" version ".tar.gz"))
1458 (sha256
1459 (base32
1460 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1461 (build-system python-build-system)
f22efa01 1462 (propagated-inputs
f3b98f4f 1463 `(("python-six" ,python-six)
68f1cdec 1464 ("python-parse" ,python-parse)))
a480bc41
EB
1465 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1466 (home-page "https://github.com/jenisys/parse_type")
1467 (synopsis "Extended parse module")
1468 (description
1469 "Parse_type extends the python parse module.")
3f641af0 1470 (license license:bsd-3)))
a480bc41
EB
1471
1472(define-public python-parse
1473 (package
1474 (name "python-parse")
eb3d3503 1475 (version "1.6.6")
a480bc41
EB
1476 (source
1477 (origin
1478 (method url-fetch)
eb3d3503 1479 (uri (pypi-uri "parse" version))
a480bc41
EB
1480 (sha256
1481 (base32
aa6c09ed
EF
1482 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1483 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1484 (build-system python-build-system)
1485 (arguments
1486 `(#:phases
f9a65318
EF
1487 (modify-phases %standard-phases
1488 (replace 'check
1489 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1490 (home-page "https://github.com/r1chardj0n3s/parse")
1491 (synopsis "Parse strings")
1492 (description
1493 "Parse strings using a specification based on the Python format()
1494syntax.")
3f641af0 1495 (license license:x11)))
a480bc41 1496
d3eff97a
JL
1497(define-public python-polib
1498 (package
1499 (name "python-polib")
1500 (version "1.0.8")
1501 (source (origin
1502 (method url-fetch)
1503 (uri (pypi-uri "polib" version))
1504 (sha256
1505 (base32
1506 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1507 (build-system python-build-system)
1508 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1509 (synopsis "Manipulate, create and modify gettext files")
1510 (description "Polib can manipulate any gettext format (po, pot and mo)
1511files. It can be used to create po files from scratch or to modify
1512existing ones.")
1513 (license license:expat)))
1514
1515(define-public python2-polib
1516 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1517 (package
1518 (inherit base)
1519 (arguments `(,@(package-arguments base)
1520 ;; Tests don't work with python2.
1521 #:tests? #f)))))
a480bc41 1522
515e6878
LC
1523(define-public scons
1524 (package
1525 (name "scons")
a3f61425 1526 (version "2.3.4")
515e6878
LC
1527 (source (origin
1528 (method url-fetch)
de67e922
LF
1529 (uri (string-append "mirror://sourceforge/scons/scons/" version
1530 "/scons-" version ".tar.gz"))
515e6878
LC
1531 (sha256
1532 (base32
a3f61425 1533 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1534 (build-system python-build-system)
1535 (arguments
1536 ;; With Python 3.x, fails to build with a syntax error.
1537 `(#:python ,python-2
b3e8b4bd 1538 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1539 #:tests? #f)) ; no 'python setup.py test' command
1540 (home-page "http://scons.org/")
1541 (synopsis "Software construction tool written in Python")
1542 (description
1543 "SCons is a software construction tool. Think of SCons as an improved,
1544cross-platform substitute for the classic Make utility with integrated
1545functionality similar to autoconf/automake and compiler caches such as ccache.
1546In short, SCons is an easier, more reliable and faster way to build
1547software.")
3f641af0 1548 (license license:x11)))
011b18c3 1549
c15a5c0e
DT
1550(define-public python-extras
1551 (package
1552 (name "python-extras")
1553 (version "0.0.3")
1554 (source
1555 (origin
1556 (method url-fetch)
1557 (uri (string-append
1558 "https://pypi.python.org/packages/source/e/extras/extras-"
1559 version ".tar.gz"))
1560 (sha256
1561 (base32
1562 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1563 (build-system python-build-system)
c15a5c0e
DT
1564 (arguments
1565 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1566 '(#:tests? #f))
1567 (home-page "https://github.com/testing-cabal/extras")
1568 (synopsis "Useful extensions to the Python standard library")
1569 (description
1570 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1571 (license license:expat)))
c15a5c0e
DT
1572
1573(define-public python2-extras
1574 (package-with-python2 python-extras))
1575
56ea0efd
DT
1576(define-public python-mimeparse
1577 (package
1578 (name "python-mimeparse")
1579 (version "0.1.4")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (string-append
1584 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1585 version ".tar.gz"))
1586 (sha256
1587 (base32
1588 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1589 (build-system python-build-system)
56ea0efd
DT
1590 (arguments
1591 '(#:tests? #f)) ; no setup.py test command
1592 (home-page
1593 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1594 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1595 (description
1596 "Mimeparse provides basic functions for parsing MIME type names and
1597matching them against a list of media-ranges.")
bd3fa666 1598 (license license:expat)))
56ea0efd
DT
1599
1600(define-public python2-mimeparse
1601 (package-with-python2 python-mimeparse))
1602
4435427e
DT
1603(define-public python-nose
1604 (package
1605 (name "python-nose")
f7cb9841 1606 (version "1.3.7")
4435427e
DT
1607 (source
1608 (origin
1609 (method url-fetch)
f7cb9841 1610 (uri (pypi-uri "nose" version))
4435427e
DT
1611 (sha256
1612 (base32
f7cb9841 1613 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1614 (build-system python-build-system)
4435427e
DT
1615 (arguments
1616 '(#:tests? #f)) ; FIXME: test suite fails
1617 (home-page "http://readthedocs.org/docs/nose/")
1618 (synopsis "Python testing library")
1619 (description
1620 "Nose extends the unittest library to make testing easier.")
3f641af0 1621 (license license:lgpl2.0+)))
4435427e
DT
1622
1623(define-public python2-nose
1624 (package-with-python2 python-nose))
1625
0aea283a
EF
1626(define-public python-nose2
1627 (package
1628 (name "python-nose2")
1629 (version "0.6.5")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "nose2" version))
1634 (sha256
1635 (base32
1636 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1637 (build-system python-build-system)
1638 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1639 (propagated-inputs
0aea283a
EF
1640 `(("python-cov-core" ,python-cov-core)
1641 ("python-pytest-cov" ,python-pytest-cov)
1642 ("python-six" ,python-six)))
1643 (home-page "https://github.com/nose-devs/nose2")
1644 (synopsis "Next generation of nicer testing for Python")
1645 (description
1646 "Nose2 is the next generation of nicer testing for Python, based on the
1647plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1648better plugin api, being easier for users to configure, and simplifying internal
1649interfaces and processes.")
1650 (license license:bsd-2)))
1651
1652(define-public python2-nose2
1653 (package-with-python2 python-nose2))
1654
6cd9c356
DT
1655(define-public python-unittest2
1656 (package
1657 (name "python-unittest2")
1658 (version "0.5.1")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (string-append
1663 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1664 version ".tar.gz"))
1665 (sha256
1666 (base32
1667 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1668 (build-system python-build-system)
6cd9c356
DT
1669 (home-page "http://pypi.python.org/pypi/unittest2")
1670 (synopsis "Python unit testing library")
1671 (description
1672 "Unittest2 is a replacement for the unittest module in the Python
1673standard library.")
3f641af0 1674 (license license:psfl)))
6cd9c356
DT
1675
1676(define-public python2-unittest2
1677 (package (inherit python-unittest2)
1678 (name "python2-unittest2")
1679 (version "0.5.1")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (string-append
1684 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1685 version ".tar.gz"))
1686 (sha256
1687 (base32
1688 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1689 (arguments
1690 `(#:python ,python-2
1691 #:tests? #f)))) ; no setup.py test command
1692
02f8f804 1693(define-public python-pafy
1694 (package
1695 (name "python-pafy")
1696 (version "0.5.2")
1697 (source
1698 (origin
1699 (method url-fetch)
1700 (uri (pypi-uri "pafy" version))
1701 (sha256
1702 (base32
1703 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1704 (build-system python-build-system)
ed3fee5f 1705 (arguments
1706 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1707 (propagated-inputs
1708 ;; Youtube-dl is a python package which is imported in the file
1709 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1710 `(("youtube-dl" ,youtube-dl)))
1711 (home-page "https://np1.github.io/pafy/")
1712 (synopsis "Retrieve YouTube content and metadata")
1713 (description
1714 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1715 (license license:lgpl3+)))
1716
542ad60f
DT
1717(define-public python-py
1718 (package
1719 (name "python-py")
71c8a804 1720 (version "1.4.31")
542ad60f
DT
1721 (source
1722 (origin
1723 (method url-fetch)
71c8a804 1724 (uri (pypi-uri "py" version))
542ad60f
DT
1725 (sha256
1726 (base32
71c8a804 1727 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1728 (build-system python-build-system)
542ad60f
DT
1729 (home-page "http://pylib.readthedocs.org/")
1730 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1731 (description
1732 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1733code introspection, and logging.")
bd3fa666 1734 (license license:expat)))
542ad60f
DT
1735
1736(define-public python2-py
1737 (package-with-python2 python-py))
1738
855d4761
DT
1739(define-public python-pytest
1740 (package
1741 (name "python-pytest")
61a4332d 1742 (version "2.7.3")
855d4761
DT
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (string-append
1747 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1748 version ".tar.gz"))
1749 (sha256
1750 (base32
61a4332d 1751 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1752 (modules '((guix build utils)))
1753 (snippet
1754 ;; One of the tests involves the /usr directory, so it fails.
1755 '(substitute* "testing/test_argcomplete.py"
1756 (("def test_remove_dir_prefix\\(self\\):")
1757 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1758 (build-system python-build-system)
482d9591
HG
1759 (propagated-inputs
1760 `(("python-py" ,python-py)))
e7881f3d 1761 (native-inputs
482d9591 1762 `(("python-nose" ,python-nose)
855d4761
DT
1763 ("python-mock" ,python-mock)))
1764 (home-page "http://pytest.org")
1765 (synopsis "Python testing library")
1766 (description
1767 "Pytest is a testing tool that provides auto-discovery of test modules
1768and functions, detailed info on failing assert statements, modular fixtures,
1769and many external plugins.")
bd3fa666 1770 (license license:expat)))
855d4761
DT
1771
1772(define-public python2-pytest
1773 (package-with-python2 python-pytest))
1774
fca4ff35
LF
1775;; This package is used by Borg until we can upgrade all our Python packages to
1776;; use a more recent pytest.
1777(define-public python-pytest-2.9.2
1778 (package
1779 (inherit python-pytest)
1780 (name "python-pytest")
1781 (version "2.9.2")
1782 (source (origin
1783 (method url-fetch)
1784 (uri (pypi-uri "pytest" version))
1785 (sha256
1786 (base32
1787 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1788 (arguments
1789 `(#:phases
1790 (modify-phases %standard-phases
1791 (add-before 'check 'disable-invalid-test
1792 (lambda _
1793 (substitute* "testing/test_argcomplete.py"
1794 (("def test_remove_dir_prefix" line)
1795 (string-append "@pytest.mark.skip"
1796 "(reason=\"Assumes that /usr exists.\")\n "
1797 line)))
1798 #t)))))))
1799
358c3d61
EF
1800(define-public python-pytest-cov
1801 (package
1802 (name "python-pytest-cov")
545f4a1c 1803 (version "2.2.1")
358c3d61
EF
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "pytest-cov" version))
1808 (sha256
545f4a1c
EF
1809 (base32
1810 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1811 (build-system python-build-system)
ce40b383
HG
1812 (arguments
1813 `(#:phases
1814 (modify-phases %standard-phases
1815 (replace 'check
1816 (lambda _
1817 ;; options taken from tox.ini
1818 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1819 ;; with "Duplicate implicit target name"
1820 (zero? (system* "python" "./setup.py" "check"
1821 "--strict" "--metadata")))))))
f22efa01 1822 (propagated-inputs
10468636
EF
1823 `(("python-coverage" ,python-coverage)
1824 ("python-pytest" ,python-pytest)))
10468636
EF
1825 (home-page "https://github.com/pytest-dev/pytest-cov")
1826 (synopsis "Pytest plugin for measuring coverage")
1827 (description
1828 "Pytest-cov produces coverage reports. It supports centralised testing and
1829distributed testing in both @code{load} and @code{each} modes. It also
1830supports coverage of subprocesses.")
f210e944 1831 (license license:expat)))
358c3d61
EF
1832
1833(define-public python2-pytest-cov
f210e944 1834 (package-with-python2 python-pytest-cov))
358c3d61 1835
6784f2e3
RW
1836(define-public python-pytest-runner
1837 (package
1838 (name "python-pytest-runner")
1839 (version "2.6.2")
1840 (source
1841 (origin
1842 (method url-fetch)
54cd239b 1843 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1844 (sha256
1845 (base32
1846 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1847 (build-system python-build-system)
1848 (arguments
1849 `(#:phases
1850 (modify-phases %standard-phases
1851 ;; The fancy way of setting the version with setuptools_scm does not
1852 ;; seem to work here.
1853 (add-after 'unpack 'set-version
1854 (lambda _
1855 (substitute* "docs/conf.py"
1856 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1857 (string-append "version = \"" ,version "\"")))
1858 #t)))))
1859 (native-inputs
1860 `(("python-pytest" ,python-pytest)
1861 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1862 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1863 (synopsis "Invoke py.test as a distutils command")
1864 (description
1865 "This package provides a @command{pytest-runner} command that
1866@file{setup.py} files can use to run tests.")
f210e944 1867 (license license:expat)))
54cd239b
EF
1868
1869(define-public python2-pytest-runner
f210e944 1870 (package-with-python2 python-pytest-runner))
6784f2e3 1871
44547e51
EF
1872(define-public python-pytest-mock
1873 (package
1874 (name "python-pytest-mock")
1875 (version "1.2")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "pytest-mock" version ".zip"))
1880 (sha256
1881 (base32
1882 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1883 (build-system python-build-system)
1884 (native-inputs
1885 `(("unzip" ,unzip)))
f22efa01 1886 (propagated-inputs
d5e41cf2 1887 `(("python-pytest" ,python-pytest)))
44547e51
EF
1888 (home-page "https://github.com/pytest-dev/pytest-mock/")
1889 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1890 (description
1891 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1892around the patching API provided by the @code{mock} package, but with the
1893benefit of not having to worry about undoing patches at the end of a test.
1894The mocker fixture has the same API as @code{mock.patch}, supporting the
1895same arguments.")
1896 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1897 (license license:expat)))
1898
1899(define-public python2-pytest-mock
1900 (let ((base (package-with-python2
1901 (strip-python2-variant python-pytest-mock))))
1902 (package (inherit base)
f22efa01 1903 (propagated-inputs
44547e51 1904 `(("python2-mock" ,python2-mock)
f22efa01 1905 ,@(package-propagated-inputs base))))))
44547e51 1906
8fa58fc9
CAW
1907(define-public python-pytest-xdist
1908 (package
1909 (name "python-pytest-xdist")
1910 (version "1.14")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "pytest-xdist" version ".zip"))
1915 (sha256
1916 (base32
de585a7e
HG
1917 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1918 (modules '((guix build utils)))
1919 (snippet
1920 '(begin
1921 ;; Remove pre-compiled .pyc files from source.
1922 (for-each delete-file-recursively
1923 (find-files "." "__pycache__" #:directories? #t))
1924 (for-each delete-file (find-files "." "\\.pyc$"))
1925 #t))))
8fa58fc9
CAW
1926 (build-system python-build-system)
1927 (native-inputs
1928 `(("unzip" ,unzip)
8fa58fc9 1929 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1930 (propagated-inputs
c4516ad2 1931 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1932 ("python-pytest" ,python-pytest)
1933 ("python-py" ,python-py)))
1934 (home-page
1935 "https://github.com/pytest-dev/pytest-xdist")
1936 (synopsis
1937 "Plugin for py.test with distributed testing and loop-on-failing modes")
1938 (description
1939 "The pytest-xdist plugin extends py.test with some unique test execution
1940modes: parallelization, running tests in boxed subprocesses, the ability
1941to run tests repeatedly when failed, and the ability to run tests on multiple
1942Python interpreters or platforms. It uses rsync to copy the existing
1943program code to a remote location, executes there, and then syncs the
1944result back.")
f210e944 1945 (license license:expat)))
8fa58fc9
CAW
1946
1947(define-public python2-pytest-xdist
f210e944 1948 (package-with-python2 python-pytest-xdist))
8fa58fc9 1949
84d24017
DT
1950(define-public python-scripttest
1951 (package
1952 (name "python-scripttest")
1953 (version "1.3")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (string-append
1958 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1959 version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1963 (build-system python-build-system)
521b7772 1964 (native-inputs
f3b98f4f 1965 `(("python-pytest" ,python-pytest)))
84d24017
DT
1966 (home-page "http://pythonpaste.org/scripttest/")
1967 (synopsis "Python library to test command-line scripts")
1968 (description "Scripttest is a Python helper library for testing
1969interactive command-line applications. With it you can run a script in a
1970subprocess and see the output as well as any file modifications.")
bd3fa666 1971 (license license:expat)))
84d24017
DT
1972
1973(define-public python2-scripttest
1974 (package-with-python2 python-scripttest))
1975
d8fa80e1
DT
1976(define-public python-testtools
1977 (package
1978 (name "python-testtools")
1979 (version "1.0.0")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (string-append
1984 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1985 version ".tar.gz"))
1986 (sha256
1987 (base32
1988 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1989 (build-system python-build-system)
0e88cbf8 1990 (propagated-inputs
f22efa01
HG
1991 `(("python-mimeparse" ,python-mimeparse)
1992 ("python-extras" ,python-extras)))
d8fa80e1
DT
1993 (home-page "https://github.com/testing-cabal/testtools")
1994 (synopsis
1995 "Extensions to the Python standard library unit testing framework")
1996 (description
1997 "Testtools extends the Python standard library unit testing framework to
1998provide matchers, more debugging information, and cross-Python
1999compatibility.")
3f641af0 2000 (license license:psfl)))
d8fa80e1
DT
2001
2002(define-public python2-testtools
2003 (package-with-python2 python-testtools))
2004
5bf3afea
DT
2005(define-public python-testscenarios
2006 (package
2007 (name "python-testscenarios")
2008 (version "0.4")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (string-append
2013 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2014 version ".tar.gz"))
2015 (sha256
2016 (base32
2017 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2018 (build-system python-build-system)
f22efa01 2019 (propagated-inputs
8e73d3ba 2020 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2021 (home-page "https://launchpad.net/testscenarios")
2022 (synopsis "Pyunit extension for dependency injection")
2023 (description
2024 "Testscenarios provides clean dependency injection for Python unittest
2025style tests.")
3f641af0 2026 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2027
2028(define-public python2-testscenarios
2029 (package-with-python2 python-testscenarios))
2030
dac79ecc
DT
2031(define-public python-testresources
2032 (package
2033 (name "python-testresources")
2034 (version "0.2.7")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (string-append
2039 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2040 version ".tar.gz"))
2041 (sha256
2042 (base32
2043 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2044 (build-system python-build-system)
dac79ecc
DT
2045 (home-page "https://launchpad.net/testresources")
2046 (synopsis
2047 "Pyunit extension for managing test resources")
2048 (description
2049 "Testresources is an extension to Python's unittest to allow declarative
2050use of resources by test cases.")
3f641af0 2051 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2052
2053(define-public python2-testresources
2054 (package-with-python2 python-testresources))
2055
070ab058
DT
2056(define-public python-subunit
2057 (package
2058 (name "python-subunit")
2059 (version "0.0.21")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (string-append
2064 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2065 version ".tar.gz"))
2066 (sha256
2067 (base32
2068 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2069 (build-system python-build-system)
f22efa01 2070 (propagated-inputs
b52ad371
HG
2071 `(("python-extras" ,python-extras)
2072 ("python-mimeparse" ,python-mimeparse)))
2073 (native-inputs
2074 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2075 (home-page "http://launchpad.net/subunit")
2076 (synopsis "Python implementation of the subunit protocol")
2077 (description
2078 "Python-subunit is a Python implementation of the subunit test streaming
2079protocol.")
3f641af0 2080 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2081
2082(define-public python2-subunit
2083 (package-with-python2 python-subunit))
2084
d2a8db92
HG
2085;; Recent versions of python-fixtures and python-testrepository need
2086;; python-pbr for packaging, which itself needs these two packages for
2087;; testing.
2088;; To fix this circular dependency, we use a build of python-pbr, based on the
2089;; same source, just without any test dependencies and with tests disabled.
2090;; python-pbr-minmal is then used to package python-fixtures and
2091;; python-testrepository.
2092;; Strictly speaking we currently could remove the test-requirements from the
2093;; normal python-pbr package (and save this package) since test are disabled
2094;; there anyway. But this may change in future.
2095(define python-pbr-minimal
cd49454b 2096 (package
d2a8db92 2097 (name "python-pbr-minimal")
5bbb2249 2098 (version "1.10.0")
7787ef76
CR
2099 (source
2100 (origin
2101 (method url-fetch)
d2a8db92 2102 (uri (pypi-uri "pbr" version))
7787ef76
CR
2103 (sha256
2104 (base32
5bbb2249 2105 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))))
7787ef76
CR
2106 (build-system python-build-system)
2107 (arguments
d2a8db92
HG
2108 `(#:tests? #f))
2109 (home-page "http://docs.openstack.org/developer/pbr/")
2110 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2111 (description
d2a8db92 2112 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2113 (license license:asl2.0)))
7787ef76 2114
d2a8db92
HG
2115(define python2-pbr-minimal
2116 (package-with-python2 python-pbr-minimal))
7787ef76 2117
1ef09c0c 2118(define-public python-pbr
e25f0174 2119 (package
d2a8db92 2120 (inherit python-pbr-minimal)
e25f0174 2121 (name "python-pbr")
e25f0174
BW
2122 (arguments
2123 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2124 (propagated-inputs
d2a8db92
HG
2125 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2126 (native-inputs
e25f0174 2127 `(("python-fixtures" ,python-fixtures)
d2a8db92 2128 ;; discover, coverage, hacking, subunit
e25f0174 2129 ("python-mock" ,python-mock)
d2a8db92 2130 ("python-six" ,python-six)
e25f0174
BW
2131 ("python-sphinx" ,python-sphinx)
2132 ("python-testrepository" ,python-testrepository)
2133 ("python-testresources" ,python-testresources)
2134 ("python-testscenarios" ,python-testscenarios)
2135 ("python-testtools" ,python-testtools)
2136 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2137 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2138 (description
2139 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2140and sensible default behaviors into your setuptools run. It will set
2141versions, process requirements files and generate AUTHORS and ChangeLog file
2142from git information.
2143")))
1ef09c0c
BW
2144
2145(define-public python2-pbr
e25f0174 2146 (package-with-python2 python-pbr))
1ef09c0c 2147
7787ef76
CR
2148(define-public python-fixtures
2149 (package
2150 (name "python-fixtures")
13fcc6df 2151 (version "1.4.0")
7787ef76
CR
2152 (source
2153 (origin
2154 (method url-fetch)
13fcc6df 2155 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2156 (sha256
2157 (base32
13fcc6df 2158 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2159 (build-system python-build-system)
2160 (propagated-inputs
ae92cadd 2161 `(("python-six" ,python-six)))
e7881f3d 2162 (native-inputs
d2a8db92 2163 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2164 ("python-testtools" ,python-testtools)))
7787ef76
CR
2165 (home-page "https://launchpad.net/python-fixtures")
2166 (synopsis "Python test fixture library")
2167 (description
2168 "Fixtures provides a way to create reusable state, useful when writing
2169Python tests.")
3f641af0 2170 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2171
cd49454b
DT
2172(define-public python2-fixtures
2173 (package-with-python2 python-fixtures))
2174
b24a0c00
DT
2175(define-public python-testrepository
2176 (package
2177 (name "python-testrepository")
2178 (version "0.0.20")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2188 (build-system python-build-system)
05de40c5 2189 (propagated-inputs
b2e66edf
HG
2190 `(("python-fixtures" ,python-fixtures)
2191 ("python-subunit" ,python-subunit)
b52ad371
HG
2192 ("python-testtools" ,python-testtools)))
2193 (native-inputs
2194 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2195 ("python-mimeparse" ,python-mimeparse)))
2196 (home-page "https://launchpad.net/testrepository")
2197 (synopsis "Database for Python test results")
2198 (description "Testrepository provides a database of test results which can
2199be used as part of a developer's workflow to check things such as what tests
2200have failed since the last commit or what tests are currently failing.")
3f641af0 2201 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2202
2203(define-public python2-testrepository
2204 (package-with-python2 python-testrepository))
2205
243a009a
DT
2206(define-public python-coverage
2207 (package
2208 (name "python-coverage")
4d4cf3dd 2209 (version "4.1")
243a009a
DT
2210 (source
2211 (origin
2212 (method url-fetch)
82a3c582 2213 (uri (pypi-uri "coverage" version))
243a009a
DT
2214 (sha256
2215 (base32
4d4cf3dd 2216 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2217 (build-system python-build-system)
243a009a
DT
2218 (home-page "http://nedbatchelder.com/code/coverage")
2219 (synopsis "Code coverage measurement for Python")
2220 (description
2221 "Coverage measures code coverage, typically during test execution. It
2222uses the code analysis tools and tracing hooks provided in the Python standard
2223library to determine which lines are executable, and which have been
2224executed.")
3f641af0 2225 (license license:bsd-3)))
243a009a
DT
2226
2227(define-public python2-coverage
2228 (package-with-python2 python-coverage))
2229
12f839fd
EF
2230(define-public python-cov-core
2231 (package
2232 (name "python-cov-core")
2233 (version "1.15.0")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "cov-core" version))
2238 (sha256
2239 (base32
2240 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2241 (build-system python-build-system)
f78e1c27 2242 (propagated-inputs
12f839fd
EF
2243 `(("python-coverage" ,python-coverage)))
2244 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2245 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2246 (description
49d5e338
TGR
2247 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2248and @code{nose2-cov}. It is useful for developing coverage plugins for these
2249testing 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")
28576403 2353 (version "2017.1.23")
3a1f9a68
DT
2354 (source (origin
2355 (method url-fetch)
9a41f443 2356 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2357 (sha256
2358 (base32
28576403 2359 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2360 (build-system python-build-system)
28576403 2361 (home-page "https://certifi.io/")
3a1f9a68
DT
2362 (synopsis "Python CA certificate bundle")
2363 (description
2364 "Certifi is a Python library that contains a CA certificate bundle, which
2365is used by the Requests library to verify HTTPS requests.")
3f641af0 2366 (license license:asl2.0)))
3a1f9a68
DT
2367
2368(define-public python2-certifi
2369 (package-with-python2 python-certifi))
e6cfbd36 2370
12c270dd
RW
2371(define-public python-click
2372 (package
2373 (name "python-click")
d4acb6db 2374 (version "6.7")
12c270dd
RW
2375 (source
2376 (origin
2377 (method url-fetch)
375f224b 2378 (uri (pypi-uri "click" version))
12c270dd 2379 (sha256
43accb58 2380 (base32
d4acb6db 2381 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2382 (build-system python-build-system)
e2ab5a09
BW
2383 (arguments
2384 `(#:phases
2385 (modify-phases %standard-phases
2386 (add-after 'unpack 'fix-paths
2387 (lambda* (#:key inputs #:allow-other-keys)
2388 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2389 "cross-libc" "libc"))))
2390 (substitute* "click/_unicodefun.py"
2391 (("'locale'")
2392 (string-append "'" glibc "/bin/locale'"))))
2393 #t)))))
12c270dd
RW
2394 (home-page "http://click.pocoo.org")
2395 (synopsis "Command line library for Python")
2396 (description
2397 "Click is a Python package for creating command line interfaces in a
2398composable way with as little code as necessary. Its name stands for
2399\"Command Line Interface Creation Kit\". It's highly configurable but comes
2400with sensible defaults out of the box.")
3f641af0 2401 (license license:bsd-3)))
12c270dd
RW
2402
2403(define-public python2-click
2404 (package-with-python2 python-click))
2405
addc808d
EF
2406(define-public python-wheel
2407 (package
2408 (name "python-wheel")
0e6df70b 2409 (version "0.30.0a0")
e1ba0749
EF
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "wheel" version))
2414 (sha256
2415 (base32
0e6df70b 2416 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2417 (build-system python-build-system)
2418 (native-inputs
f3b98f4f 2419 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2420 ("python-pytest-cov" ,python-pytest-cov)))
2421 (home-page "https://bitbucket.org/pypa/wheel/")
2422 (synopsis "Format for built Python packages")
2423 (description
2424 "A wheel is a ZIP-format archive with a specially formatted filename and
2425the @code{.whl} extension. It is designed to contain all the files for a PEP
2426376 compatible install in a way that is very close to the on-disk format. Many
2427packages will be properly installed with only the @code{Unpack} step and the
2428unpacked archive preserves enough information to @code{Spread} (copy data and
2429scripts to their final locations) at any later time. Wheel files can be
2430installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2431 (license license:expat)
2432 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2433
2434(define-public python2-wheel
8ad4ae20
LF
2435 (let ((wheel (package-with-python2
2436 (strip-python2-variant python-wheel))))
264ae686 2437 (package (inherit wheel)
8ad4ae20
LF
2438 (native-inputs `(("python2-functools32" ,python2-functools32)
2439 ,@(package-native-inputs wheel))))))
2440
addc808d 2441
ae641128 2442(define-public python-requests
e6cfbd36 2443 (package
ae641128 2444 (name "python-requests")
74a066f9 2445 (version "2.9.1")
e6cfbd36
DT
2446 (source (origin
2447 (method url-fetch)
5d691657 2448 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2449 (sha256
2450 (base32
74a066f9 2451 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2452 (build-system python-build-system)
5d691657 2453 (native-inputs
f3b98f4f 2454 `(("python-py" ,python-py)
5d691657
EF
2455 ("python-pytest" ,python-pytest)
2456 ("python-pytest-cov" ,python-pytest-cov)
2457 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2458 (home-page "http://python-requests.org/")
2459 (synopsis "Python HTTP library")
2460 (description
2461 "Requests is a Python HTTP client library. It aims to be easier to use
2462than Python’s urllib2 library.")
3f641af0 2463 (license license:asl2.0)))
864b5211 2464
e9005180
DT
2465;; Some software requires an older version of Requests, notably Docker
2466;; Compose.
2467(define-public python-requests-2.7
2468 (package (inherit python-requests)
2469 (version "2.7.0")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "requests" version))
2473 (sha256
2474 (base32
2475 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2476
ae641128 2477(define-public python2-requests
8ad4ae20 2478 (package-with-python2 python-requests))
ae641128 2479
ea521b42
DT
2480(define-public python-vcversioner
2481 (package
2482 (name "python-vcversioner")
538fe019 2483 (version "2.16.0.0")
ea521b42
DT
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "vcversioner" version))
2488 (sha256
2489 (base32
538fe019 2490 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2491 (build-system python-build-system)
ea521b42
DT
2492 (synopsis "Python library for version number discovery")
2493 (description "Vcversioner is a Python library that inspects tagging
2494information in a variety of version control systems in order to discover
2495version numbers.")
2496 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2497 (license license:isc)))
ea521b42
DT
2498
2499(define-public python2-vcversioner
f210e944 2500 (package-with-python2 python-vcversioner))
ae641128 2501
864b5211
DT
2502(define-public python-jsonschema
2503 (package
2504 (name "python-jsonschema")
b3667afb 2505 (version "2.5.1")
864b5211
DT
2506 (source (origin
2507 (method url-fetch)
2508 (uri
2509 (string-append
2510 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2511 version ".tar.gz"))
2512 (sha256
2513 (base32
b3667afb 2514 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2515 (build-system python-build-system)
8bcd6b91
EF
2516 (arguments
2517 '(#:phases
2518 (modify-phases %standard-phases
2519 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2520 (native-inputs
8bcd6b91
EF
2521 `(("python-nose" ,python-nose)
2522 ("python-vcversioner" ,python-vcversioner)))
2523 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2524 (synopsis "Implementation of JSON Schema for Python")
2525 (description
2526 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2527 (license license:expat)
2528 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2529
2530(define-public python2-jsonschema
a14600ec
LF
2531 (let ((jsonschema (package-with-python2
2532 (strip-python2-variant python-jsonschema))))
264ae686 2533 (package (inherit jsonschema)
eaba9d66 2534 (native-inputs
8bcd6b91 2535 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2536 ,@(package-native-inputs jsonschema)))
2537 (propagated-inputs
2538 `(("python2-functools32" ,python2-functools32))))))
850189b8 2539
9f21414d 2540(define-public python-kitchen
2541 (package
2542 (name "python-kitchen")
2543 (version "1.2.4")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "kitchen" version))
2548 (sha256
2549 (base32
2550 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2551 (build-system python-build-system)
2552 (propagated-inputs
2553 `(("python-chardet" ,python-chardet)))
2554 (home-page "https://fedorahosted.org/kitchen")
2555 (synopsis "Python API for snippets")
2556 (description "@code{kitchen} module provides a python API for all sorts of
2557little useful snippets of code that everybody ends up writing for their projects
2558but never seem big enough to build an independent release. Use kitchen and stop
2559cutting and pasting that code over and over.")
2560 (license (list license:lgpl2.1+
2561 ;; subprocess.py, test_subprocess.py,
2562 ;; kitchen/pycompat25/defaultdict.py:
2563 license:psfl))))
2564
2565(define-public python2-kitchen
2566 (package-with-python2 python-kitchen))
2567
850189b8
DT
2568(define-public python-unidecode
2569 (package
2570 (name "python-unidecode")
5754fe95 2571 (version "0.04.20")
850189b8
DT
2572 (source (origin
2573 (method url-fetch)
8925d4f3 2574 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2575 (sha256
2576 (base32
5754fe95 2577 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2578 (build-system python-build-system)
850189b8
DT
2579 (home-page "https://pypi.python.org/pypi/Unidecode")
2580 (synopsis "ASCII transliterations of Unicode text")
2581 (description
2582 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2583useful when integrating with legacy code that doesn't support Unicode, or for
2584ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2585machine identifiers from human-readable Unicode strings that should still be
2586somewhat intelligeble.")
3f641af0 2587 (license license:gpl2+)))
850189b8
DT
2588
2589(define-public python2-unidecode
2590 (package-with-python2 python-unidecode))
6d45fef4
DT
2591
2592(define-public python-pyjwt
2593 (package
2594 (name "python-pyjwt")
eb31d4b4 2595 (version "1.4.0")
6d45fef4
DT
2596 (source
2597 (origin
2598 (method url-fetch)
eb31d4b4 2599 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2600 (sha256
2601 (base32
eb31d4b4 2602 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2603 (build-system python-build-system)
eb31d4b4 2604 (native-inputs
130fe994
HG
2605 `(("python-pytest" ,python-pytest)
2606 ("python-pytest-cov" ,python-pytest-cov)
2607 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2608 (home-page "http://github.com/progrium/pyjwt")
2609 (synopsis "JSON Web Token implementation in Python")
2610 (description
2611 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2612 (license license:expat)))
6d45fef4
DT
2613
2614(define-public python2-pyjwt
2615 (package-with-python2 python-pyjwt))
2616
2cec1f6f
DT
2617(define-public python-oauthlib
2618 (package
2619 (name "python-oauthlib")
bde2171d 2620 (version "1.0.3")
2cec1f6f
DT
2621 (source (origin
2622 (method url-fetch)
bde2171d 2623 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2624 (sha256
2625 (base32
bde2171d 2626 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2627 (build-system python-build-system)
bde2171d 2628 (native-inputs
bb06aa34 2629 `(("python-nose" ,python-nose)
bde2171d 2630 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2631 ("python-pyjwt" ,python-pyjwt)
2632 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2633 (home-page "https://github.com/idan/oauthlib")
2634 (synopsis "OAuth implementation for Python")
2635 (description
2636 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2637OAuth request-signing logic.")
3f641af0 2638 (license license:bsd-3)
59f151ec 2639 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2640
2641(define-public python2-oauthlib
59f151ec 2642 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2643 (package
2644 (inherit base)
00e10c6e 2645 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2646 ("python2-mock" ,python2-mock)
59f151ec 2647 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2648
2649(define-public python-itsdangerous
2650 (package
2651 (name "python-itsdangerous")
2652 (version "0.24")
2653 (source
2654 (origin
2655 (method url-fetch)
2656 (uri (string-append
2657 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2658 version ".tar.gz"))
2659 (sha256
2660 (base32
2661 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2662 (build-system python-build-system)
ec5dbb5c
DT
2663 (home-page "http://github.com/mitsuhiko/itsdangerous")
2664 (synopsis "Python library for passing data to/from untrusted environments")
2665 (description
2666 "Itsdangerous provides various helpers to pass trusted data to untrusted
2667environments and back.")
f210e944 2668 (license license:bsd-3)))
ec5dbb5c
DT
2669
2670(define-public python2-itsdangerous
f210e944 2671 (package-with-python2 python-itsdangerous))
5731cae3 2672
8d12be1e
RW
2673(define-public python-pyyaml
2674 (package
2675 (name "python-pyyaml")
bf5e4bc4 2676 (version "3.12")
8d12be1e
RW
2677 (source
2678 (origin
2679 (method url-fetch)
bf5e4bc4 2680 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2681 (sha256
2682 (base32
bf5e4bc4 2683 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2684 (build-system python-build-system)
2685 (inputs
2686 `(("libyaml" ,libyaml)))
8d12be1e
RW
2687 (home-page "http://pyyaml.org/wiki/PyYAML")
2688 (synopsis "YAML parser and emitter for Python")
2689 (description
2690 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2691complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2692API, and sensible error messages. PyYAML supports standard YAML tags and
2693provides Python-specific tags that allow to represent an arbitrary Python
2694object.")
2695 (license license:expat)))
2696
2697(define-public python2-pyyaml
2698 (package-with-python2 python-pyyaml))
2699
5731cae3
DT
2700(define-public python-virtualenv
2701 (package
2702 (name "python-virtualenv")
58d04dba 2703 (version "15.0.3")
5731cae3
DT
2704 (source
2705 (origin
2706 (method url-fetch)
17804240 2707 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2708 (sha256
2709 (base32
58d04dba 2710 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2711 (build-system python-build-system)
17804240
EF
2712 (arguments
2713 `(#:phases
2714 (modify-phases %standard-phases
58d04dba
RW
2715 (replace 'check
2716 (lambda _
2717 ;; Disable failing test. See upstream bug report
2718 ;; https://github.com/pypa/virtualenv/issues/957
2719 (substitute* "tests/test_virtualenv.py"
2720 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2721 (zero? (system* "py.test")))))))
e7881f3d 2722 (native-inputs
f3b98f4f 2723 `(("python-mock" ,python-mock)
17804240 2724 ("python-pytest" ,python-pytest)))
5731cae3
DT
2725 (home-page "https://virtualenv.pypa.io/")
2726 (synopsis "Virtual Python environment builder")
2727 (description
2728 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2729 (license license:expat)))
5731cae3
DT
2730
2731(define-public python2-virtualenv
2732 (package-with-python2 python-virtualenv))
8176d4d5
DT
2733
2734(define-public python-markupsafe
2735 (package
2736 (name "python-markupsafe")
2737 (version "0.23")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (string-append
2742 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2743 version ".tar.gz"))
2744 (sha256
2745 (base32
2746 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2747 (build-system python-build-system)
8176d4d5
DT
2748 (home-page "http://github.com/mitsuhiko/markupsafe")
2749 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2750 (description
2751 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2752for Python.")
3f641af0 2753 (license license:bsd-3)))
8176d4d5
DT
2754
2755(define-public python2-markupsafe
2756 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2757
2758(define-public python-jinja2
2759 (package
2760 (name "python-jinja2")
e98149b3 2761 (version "2.8")
fe34f0d1
DT
2762 (source
2763 (origin
2764 (method url-fetch)
e98149b3 2765 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2766 (sha256
2767 (base32
e98149b3 2768 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2769 (build-system python-build-system)
f22efa01 2770 (propagated-inputs
f3b98f4f 2771 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2772 (home-page "http://jinja.pocoo.org/")
2773 (synopsis "Python template engine")
2774 (description
2775 "Jinja2 is a small but fast and easy to use stand-alone template engine
2776written in pure Python.")
3f641af0 2777 (license license:bsd-3)))
fe34f0d1
DT
2778
2779(define-public python2-jinja2
2780 (package-with-python2 python-jinja2))
3580ab8b 2781
f7d17ac7
EE
2782(define-public python-pystache
2783 (package
2784 (name "python-pystache")
2785 (version "0.5.4")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "pystache" version))
2789 (sha256
2790 (base32
2791 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2792 (build-system python-build-system)
f7d17ac7
EE
2793 (home-page "http://defunkt.io/pystache/")
2794 (synopsis "Python logic-less template engine")
2795 (description
2796 "Pystache is a Python implementation of the framework agnostic,
2797logic-free templating system Mustache.")
2798 (license license:expat)))
2799
2800(define-public python2-pystache
2801 (package-with-python2 python-pystache))
2802
1285119b
RW
2803(define-public python-joblib
2804 (package
2805 (name "python-joblib")
f34ef331 2806 (version "0.10.3")
1285119b
RW
2807 (source (origin
2808 (method url-fetch)
f34ef331 2809 (uri (pypi-uri "joblib" version))
1285119b
RW
2810 (sha256
2811 (base32
6aa5f1ca
HG
2812 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2813 (modules '((guix build utils)))
2814 (snippet
2815 '(begin
2816 ;; Remove pre-compiled .pyc files from source.
2817 (for-each delete-file-recursively
2818 (find-files "." "__pycache__" #:directories? #t))
2819 (for-each delete-file (find-files "." "\\.pyc$"))
2820 #t))))
1285119b 2821 (build-system python-build-system)
a8dd960a
RW
2822 (arguments
2823 `(#:phases
2824 (modify-phases %standard-phases
2825 (add-before 'check 'disable-failing-tests
2826 (lambda _
2827 ;; This numpydoc tests fails for unknown reasons
2828 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2829 ;; This numpydoc test depends on matplotlib, which is not a
2830 ;; required input.
2831 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2832 ;; These tests fail to execute sys.executable
2833 (substitute* "joblib/test/test_parallel.py"
2834 (("import nose" line)
2835 (string-append "from nose.plugins.skip import SkipTest\n" line))
2836 (("def test_nested_parallel_warnings" line)
2837 (string-append "@SkipTest\n" line))
2838 (("def test_parallel_with_interactively_defined_functions" line)
2839 (string-append "@SkipTest\n" line)))
2840 #t)))))
f052ec9a 2841 ;; Provide nose to enable tests command
1285119b 2842 (native-inputs
f3b98f4f 2843 `(("python-nose" ,python-nose)
f34ef331
RW
2844 ("python-sphinx" ,python-sphinx)
2845 ("python-docutils" ,python-docutils)
2846 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2847 (home-page "http://pythonhosted.org/joblib/")
2848 (synopsis "Using Python functions as pipeline jobs")
2849 (description
2850 "Joblib is a set of tools to provide lightweight pipelining in Python.
2851In particular, joblib offers: transparent disk-caching of the output values
2852and lazy re-evaluation (memoize pattern), easy simple parallel computing
2853logging and tracing of the execution.")
3f641af0 2854 (license license:bsd-3)))
1285119b
RW
2855
2856(define-public python2-joblib
2857 (package-with-python2 python-joblib))
2858
3580ab8b
DT
2859(define-public python-docutils
2860 (package
2861 (name "python-docutils")
00e0ca7c 2862 (version "0.13.1")
3580ab8b
DT
2863 (source
2864 (origin
2865 (method url-fetch)
00e0ca7c 2866 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2867 (sha256
2868 (base32
00e0ca7c 2869 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 2870 (build-system python-build-system)
3580ab8b
DT
2871 (arguments
2872 '(#:tests? #f)) ; no setup.py test command
2873 (home-page "http://docutils.sourceforge.net/")
2874 (synopsis "Python Documentation Utilities")
2875 (description
2876 "Docutils is a modular system for processing documentation into useful
2877formats, such as HTML, XML, and LaTeX. For input Docutils supports
2878reStructuredText.")
2879 ;; Most of the source code is public domain, but some source files are
2880 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2881 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2882
2883(define-public python2-docutils
2884 (package-with-python2 python-docutils))
fb35b7c0
DT
2885
2886(define-public python-pygments
2887 (package
2888 (name "python-pygments")
7d2e758d 2889 (version "2.1.3")
fb35b7c0
DT
2890 (source
2891 (origin
2892 (method url-fetch)
9f442285 2893 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2894 (sha256
2895 (base32
7d2e758d 2896 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 2897 (build-system python-build-system)
fb35b7c0
DT
2898 (home-page "http://pygments.org/")
2899 (synopsis "Syntax highlighting")
2900 (description
2901 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2902 (license license:bsd-2)))
fb35b7c0
DT
2903
2904(define-public python2-pygments
2905 (package-with-python2 python-pygments))
9dd6078d
DT
2906
2907(define-public python-sphinx
2908 (package
2909 (name "python-sphinx")
2910 (version "1.2.3")
2911 (source
2912 (origin
2913 (method url-fetch)
2914 (uri (string-append
2915 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2916 version ".tar.gz"))
2917 (sha256
2918 (base32
2919 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2920 (build-system python-build-system)
f22efa01 2921 (propagated-inputs
f3b98f4f 2922 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2923 ("python-docutils" ,python-docutils)
2924 ("python-pygments" ,python-pygments)))
2925 (home-page "http://sphinx-doc.org/")
2926 (synopsis "Python documentation generator")
2927 (description "Sphinx is a tool that makes it easy to create documentation
2928for Python projects or other documents consisting of multiple reStructuredText
2929sources.")
3f641af0 2930 (license license:bsd-3)))
9dd6078d
DT
2931
2932(define-public python2-sphinx
2933 (package-with-python2 python-sphinx))
6888830b 2934
ad320b20
RW
2935(define-public python-sphinx-rtd-theme
2936 (package
2937 (name "python-sphinx-rtd-theme")
2938 (version "0.1.6")
2939 (source
2940 (origin
2941 (method url-fetch)
2942 (uri (string-append "https://pypi.python.org/packages/source/s/"
2943 "sphinx_rtd_theme/sphinx_rtd_theme-"
2944 version ".tar.gz"))
2945 (sha256
2946 (base32
2947 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2948 (build-system python-build-system)
ad320b20
RW
2949 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2950 (synopsis "ReadTheDocs.org theme for Sphinx")
2951 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2952 (license license:expat)))
ad320b20
RW
2953
2954(define-public python2-sphinx-rtd-theme
2955 (package-with-python2 python-sphinx-rtd-theme))
2956
fe94cf0c
HG
2957(define-public python-rst.linker
2958 (package
2959 (name "python-rst.linker")
2960 (version "1.7")
2961 (source
2962 (origin
2963 (method url-fetch)
2964 (uri (pypi-uri "rst.linker" version))
2965 (sha256
2966 (base32
2967 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2968 (build-system python-build-system)
2969 (propagated-inputs
2970 `(("python-dateutil" ,python-dateutil-2)
2971 ("python-six" ,python-six)))
2972 (native-inputs
2973 `(("python-setuptools-scm" ,python-setuptools-scm)))
2974 ;; Test would require path.py, which would introduce a cyclic dependence.
2975 (arguments `(#:tests? #f))
2976 ;; Note: As of version 1.7 the documentation is not worth building.
2977 (home-page "https://github.com/jaraco/rst.linker")
2978 (synopsis "Sphinx plugin to add links and timestamps")
2979 (description "rst.linker allows to automatically replace text by a
2980reStructuredText external reference or timestamps. It's primary purpose is to
2981augment the changelog, but it can be used for other documents, too.")
2982 (license license:expat)))
2983
2984(define-public python2-rst.linker
2985 (package-with-python2 python-rst.linker))
2986
f4de5b3b
CAW
2987(define-public python-feedgenerator
2988 (package
2989 (name "python-feedgenerator")
f0412aa2 2990 (version "1.8")
f4de5b3b 2991 (source
f4de5b3b 2992 (origin
f0412aa2
EF
2993 (method url-fetch)
2994 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2995 (sha256
2996 (base32
7c88bcf4
HG
2997 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2998 (modules '((guix build utils)))
2999 (snippet
3000 '(begin
3001 ;; Remove pre-compiled .pyc files from source.
3002 (for-each delete-file-recursively
3003 (find-files "." "__pycache__" #:directories? #t))
3004 (for-each delete-file (find-files "." "\\.pyc$"))
3005 #t))))
f4de5b3b 3006 (build-system python-build-system)
dae73d9b 3007 (propagated-inputs
f3b98f4f 3008 `(("python-pytz" ,python-pytz)
f4de5b3b 3009 ("python-six" ,python-six)))
f0412aa2 3010 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3011 (synopsis
3012 "Standalone version of Django's Atom/RSS feed generator")
3013 (description
3014 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3015which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3016 (license license:bsd-3)))
f4de5b3b
CAW
3017
3018(define-public python2-feedgenerator
3019 (package-with-python2 python-feedgenerator))
3020
59ad30e3
CAW
3021(define-public python-blinker
3022 (package
3023 (name "python-blinker")
7fb9ff4d 3024 (version "1.4")
59ad30e3
CAW
3025 (source
3026 (origin
3027 (method url-fetch)
7fb9ff4d 3028 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3029 (sha256
3030 (base32
7fb9ff4d 3031 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3032 (build-system python-build-system)
59ad30e3
CAW
3033 (home-page "http://pythonhosted.org/blinker/")
3034 (synopsis "Fast, simple object-to-object and broadcast signaling")
3035 (description
3036 "Blinker provides a fast dispatching system that allows any number of
3037interested parties to subscribe to events, or \"signals\".")
3038 (license license:expat)))
3039
3040(define-public python2-blinker
3041 (package-with-python2 python-blinker))
3042
b8050e71
CAW
3043(define-public pelican
3044 (package
3045 (name "pelican")
11f97c27 3046 (version "3.6.3")
b8050e71
CAW
3047 (source
3048 (origin
3049 (method url-fetch)
11f97c27 3050 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3051 (sha256
3052 (base32
11f97c27 3053 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3054 (build-system python-build-system)
f22efa01 3055 (propagated-inputs
b8050e71
CAW
3056 `(("python-feedgenerator" ,python-feedgenerator)
3057 ("python-jinja2" ,python-jinja2)
3058 ("python-pygments" ,python-pygments)
3059 ("python-docutils" ,python-docutils)
3060 ("python-pytz" ,python-pytz)
3061 ("python-blinker" ,python-blinker)
3062 ("python-unidecode" ,python-unidecode)
3063 ("python-six" ,python-six)
3064 ("python-dateutil-2" ,python-dateutil-2)))
3065 (home-page "http://getpelican.com/")
3066 (arguments
3067 `(;; XXX Requires a lot more packages to do unit tests :P
3068 #:tests? #f
3069 #:phases (modify-phases %standard-phases
3070 (add-before
3071 'install 'adjust-requires
3072 ;; Since feedgenerator is installed from git, it doesn't
3073 ;; conform to the version requirements.
3074 ;;
3075 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3076 ;; version requirement so setuptools doesn't get confused.
3077 (lambda _
3078 (substitute* "setup.py"
3079 (("['\"]feedgenerator.*?['\"]")
3080 "'feedgenerator'")))))))
3081 (synopsis "Python-based static site publishing system")
3082 (description
3083 "Pelican is a tool to generate a static blog from reStructuredText,
3084Markdown input files, and more. Pelican uses Jinja2 for templating
3085and is very extensible.")
3f641af0 3086 (license license:agpl3+)))
b8050e71 3087
240ca4aa
RW
3088(define-public python-scikit-learn
3089 (package
3090 (name "python-scikit-learn")
8e401ab6 3091 (version "0.18.1")
240ca4aa
RW
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (string-append
3096 "https://github.com/scikit-learn/scikit-learn/archive/"
3097 version ".tar.gz"))
7e21b9fb 3098 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3099 (sha256
3100 (base32
8e401ab6 3101 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3102 (build-system python-build-system)
3103 (arguments
3104 `(#:phases
3105 (alist-cons-before
2f6b3d2e
RW
3106 'check 'set-HOME
3107 ;; some tests require access to "$HOME"
3108 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3109 %standard-phases)))
240ca4aa 3110 (inputs
328bb95d
HG
3111 `(("openblas" ,openblas)))
3112 (native-inputs
8e401ab6
RW
3113 `(("python-nose" ,python-nose)
3114 ("python-cython" ,python-cython)))
240ca4aa
RW
3115 (propagated-inputs
3116 `(("python-numpy" ,python-numpy)
3117 ("python-scipy" ,python-scipy)))
3118 (home-page "http://scikit-learn.org/")
3119 (synopsis "Machine Learning in Python")
3120 (description
3121 "Scikit-learn provides simple and efficient tools for data
3122mining and data analysis.")
1b5241c5 3123 (license license:bsd-3)))
240ca4aa
RW
3124
3125(define-public python2-scikit-learn
1b5241c5 3126 (package-with-python2 python-scikit-learn))
240ca4aa 3127
12f8f9bb
RW
3128(define-public python-scikit-image
3129 (package
3130 (name "python-scikit-image")
3131 (version "0.11.3")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (string-append
3136 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3137 version ".tar.gz"))
3138 (sha256
3139 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3140 (build-system python-build-system)
b83e2333 3141 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3142 (propagated-inputs
3143 `(("python-matplotlib" ,python-matplotlib)
3144 ("python-networkx" ,python-networkx)
12f8f9bb 3145 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3146 ("python-pillow" ,python-pillow)))
3147 (native-inputs
b83e2333
HG
3148 `(("python-numpy" ,python-numpy)
3149 ("python-cython" ,python-cython)
3150 ("python-six" ,python-six)))
12f8f9bb
RW
3151 (home-page "http://scikit-image.org/")
3152 (synopsis "Image processing in Python")
3153 (description
e881752c 3154 "Scikit-image is a collection of algorithms for image processing.")
12733594 3155 (license license:bsd-3)))
12f8f9bb
RW
3156
3157(define-public python2-scikit-image
12733594 3158 (package-with-python2 python-scikit-image))
12f8f9bb 3159
5394a6a6
RW
3160(define-public python-redis
3161 (package
3162 (name "python-redis")
911a8faf 3163 (version "2.10.5")
5394a6a6
RW
3164 (source
3165 (origin
3166 (method url-fetch)
911a8faf 3167 (uri (pypi-uri "redis" version))
5394a6a6 3168 (sha256
911a8faf 3169 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3170 (build-system python-build-system)
3171 ;; Tests require a running Redis server
3172 (arguments '(#:tests? #f))
cf8124b0
HG
3173 ;; As long as we are not running test, we do not need this input :-)
3174 ;;(native-inputs
3175 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3176 (home-page "https://github.com/andymccurdy/redis-py")
3177 (synopsis "Redis Python client")
3178 (description
3179 "This package provides a Python interface to the Redis key-value store.")
3180 (license license:expat)))
3181
3182(define-public python2-redis
3183 (package-with-python2 python-redis))
3184
748cef5b
RW
3185(define-public python-rq
3186 (package
3187 (name "python-rq")
3188 (version "0.5.2")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (string-append
3193 "https://pypi.python.org/packages/source/r/rq/rq-"
3194 version ".tar.gz"))
3195 (sha256
3196 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3197 (build-system python-build-system)
3198 (propagated-inputs
3199 `(("python-click" ,python-click)
3200 ("python-redis" ,python-redis)))
748cef5b
RW
3201 (home-page "http://python-rq.org/")
3202 (synopsis "Simple job queues for Python")
3203 (description
3204 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3205processing them in the background with workers. It is backed by Redis and it
3206is designed to have a low barrier to entry.")
3f641af0 3207 (license license:bsd-2)))
748cef5b
RW
3208
3209(define-public python2-rq
3210 (package-with-python2 python-rq))
3211
6888830b
FB
3212(define-public python-cython
3213 (package
3214 (name "python-cython")
dd22efef 3215 (version "0.24.1")
6888830b
FB
3216 (source
3217 (origin
3218 (method url-fetch)
56918e26 3219 (uri (pypi-uri "Cython" version))
6888830b
FB
3220 (sha256
3221 (base32
dd22efef 3222 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3223 (build-system python-build-system)
3224 ;; we need the full python package and not just the python-wrapper
3225 ;; because we need libpython3.3m.so
3226 (inputs
3227 `(("python" ,python)))
3228 (arguments
3229 `(#:phases
b92f651b
EF
3230 (modify-phases %standard-phases
3231 (add-before 'check 'set-HOME
3232 ;; some tests require access to "$HOME/.cython"
3233 (lambda _ (setenv "HOME" "/tmp")))
3234 (replace 'check
3235 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3236 (home-page "http://cython.org/")
3237 (synopsis "C extensions for Python")
3238 (description "Cython is an optimising static compiler for both the Python
3239programming language and the extended Cython programming language. It makes
3240writing C extensions for Python as easy as Python itself.")
3f641af0 3241 (license license:asl2.0)
48b311b1 3242 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3243
3244(define-public python2-cython
48b311b1
LC
3245 (package (inherit (package-with-python2
3246 (strip-python2-variant python-cython)))
6888830b
FB
3247 (name "python2-cython")
3248 (inputs
3249 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3250
ee5fb7ee
AV
3251;; The RPython toolchain currently does not support Python 3.
3252(define-public python2-rpython
3253 (package
3254 (name "python2-rpython")
3255 (version "0.1.4")
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (pypi-uri "rpython" version))
3260 (sha256
3261 (base32
3262 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3263 (build-system python-build-system)
3264 (arguments `(#:python ,python-2))
3265 (native-inputs
f3b98f4f 3266 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3267 (home-page "https://rpython.readthedocs.org")
3268 (synopsis "Framework for implementing interpreters and virtual machines")
3269 (description "RPython is a translation and support framework for
3270producing implementations of dynamic languages, emphasizing a clean separation
3271between language specification and implementation aspects.")
3272 (license license:expat)))
3273
0da98533
FB
3274;; This version of numpy is missing the documentation and is only used to
3275;; build matplotlib which is required to build numpy's documentation.
3276(define python-numpy-bootstrap
3277 (package
3278 (name "python-numpy-bootstrap")
ef9b4c04 3279 (version "1.10.4")
0da98533
FB
3280 (source
3281 (origin
3282 (method url-fetch)
de67e922 3283 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3284 "/numpy-" version ".tar.gz"))
3285 (sha256
3286 (base32
ef9b4c04 3287 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3288 (build-system python-build-system)
3289 (inputs
328bb95d 3290 `(("openblas" ,openblas)
cba256f8 3291 ("lapack" ,lapack)))
0da98533 3292 (native-inputs
2efabc55
HG
3293 `(("python-nose" ,python-nose)
3294 ("gfortran" ,gfortran)))
0da98533
FB
3295 (arguments
3296 `(#:phases
2efabc55
HG
3297 (modify-phases %standard-phases
3298 (add-before 'build 'set-environment-variables
3299 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3300 (call-with-output-file "site.cfg"
3301 (lambda (port)
cba256f8
RW
3302 (format port
3303 "[openblas]
dbdfe515
RW
3304libraries = openblas
3305library_dirs = ~a/lib
3306include_dirs = ~a/include
cba256f8 3307
2efabc55
HG
3308# backslash-n to make emacs happy
3309\n[lapack]
cba256f8
RW
3310lapack_libs = lapack
3311library_dirs = ~a/lib
3312include_dirs = ~a/include
3313"
3314 (assoc-ref inputs "openblas")
3315 (assoc-ref inputs "openblas")
3316 (assoc-ref inputs "lapack")
3317 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3318 ;; Use "gcc" executable, not "cc".
3319 (substitute* "numpy/distutils/system_info.py"
3320 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3321 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3322 #t))
6a843168
FB
3323 ;; Tests can only be run after the library has been installed and not
3324 ;; within the source directory.
2efabc55
HG
3325 (delete 'check)
3326 (add-after 'install 'check
3327 (lambda* (#:key outputs inputs #:allow-other-keys)
3328 ;; Make installed package available for running the tests
3329 (add-installed-pythonpath inputs outputs)
6a843168 3330 (with-directory-excursion "/tmp"
89b5c60e 3331 (zero? (system* "python" "-c"
2efabc55 3332 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3333 (home-page "http://www.numpy.org/")
3334 (synopsis "Fundamental package for scientific computing with Python")
3335 (description "NumPy is the fundamental package for scientific computing
e881752c 3336with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3337object, sophisticated (broadcasting) functions, tools for integrating C/C++
3338and Fortran code, useful linear algebra, Fourier transform, and random number
3339capabilities.")
3f641af0 3340 (license license:bsd-3)))
0da98533
FB
3341
3342(define python2-numpy-bootstrap
3343 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3344
460fccd4 3345(define-public python-munch
3346 (package
3347 (name "python-munch")
3348 (version "2.0.4")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "munch" version))
3353 (sha256
3354 (base32
3355 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3356 (build-system python-build-system)
3357 (home-page "https://github.com/Infinidat/munch")
3358 (synopsis "Dot-accessible dictionary")
3359 (description "Munch is a dot-accessible dictionary similar to JavaScript
3360objects.")
3361 (license license:expat)))
3362
3363(define-public python2-munch
3364 (package-with-python2 python-munch))
3365
3a1bfe18
RW
3366(define-public python2-fastlmm
3367 (package
3368 (name "python2-fastlmm")
594358f5 3369 (version "0.2.26")
3a1bfe18
RW
3370 (source
3371 (origin
3372 (method url-fetch)
b074e7d4 3373 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3374 (sha256
3375 (base32
594358f5 3376 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3a1bfe18
RW
3377 (build-system python-build-system)
3378 (arguments
3379 `(#:python ,python-2)) ; only Python 2.7 is supported
3380 (propagated-inputs
3381 `(("python2-numpy" ,python2-numpy)
3382 ("python2-scipy" ,python2-scipy)
3383 ("python2-matplotlib" ,python2-matplotlib)
3384 ("python2-pandas" ,python2-pandas)
3385 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3386 ("python2-pysnptools" ,python2-pysnptools)))
3387 (native-inputs
3388 `(("unzip" ,unzip)
2efabc55 3389 ("python2-cython" ,python2-cython)
f3b98f4f 3390 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3391 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3392 (synopsis "Perform genome-wide association studies on large data sets")
3393 (description
3394 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3395Models, is a program for performing both single-SNP and SNP-set genome-wide
3396association studies (GWAS) on extremely large data sets.")
3f641af0 3397 (license license:asl2.0)))
3a1bfe18 3398
2ee8869a
FB
3399(define-public python-numpy
3400 (package (inherit python-numpy-bootstrap)
3401 (name "python-numpy")
3402 (outputs '("out" "doc"))
89b5c60e 3403 (inputs
b0aa6ede
HG
3404 `(("which" ,which)
3405 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3406 (propagated-inputs
3407 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3408 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3409 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3410 (native-inputs
3411 `(("pkg-config" ,pkg-config)
2efabc55
HG
3412 ("python-sphinx" ,python-sphinx)
3413 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3414 ("texlive" ,texlive)
3415 ("texinfo" ,texinfo)
3416 ("perl" ,perl)
3417 ,@(package-native-inputs python-numpy-bootstrap)))
3418 (arguments
89b5c60e 3419 `(,@(substitute-keyword-arguments
2ee8869a
FB
3420 (package-arguments python-numpy-bootstrap)
3421 ((#:phases phases)
3422 `(alist-cons-after
3423 'install 'install-doc
2efabc55
HG
3424 (lambda* (#:key inputs outputs #:allow-other-keys)
3425 ;; Make installed package available for building the
3426 ;; documentation
3427 (add-installed-pythonpath inputs outputs)
2ee8869a 3428 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3429 (doc (string-append
3430 data "/doc/" ,name "-"
2ee8869a
FB
3431 ,(package-version python-numpy-bootstrap)))
3432 (info (string-append data "/info"))
3433 (html (string-append doc "/html"))
3434 (pyver ,(string-append "PYVER=")))
3435 (with-directory-excursion "doc"
3436 (mkdir-p html)
3437 (system* "make" "html" pyver)
3438 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3439 (system* "make" "-C" "build/latex"
2ee8869a
FB
3440 "all-pdf" "PAPER=a4" pyver)
3441 ;; FIXME: Generation of the info file fails.
3442 ;; (system* "make" "info" pyver)
3443 ;; (mkdir-p info)
3444 ;; (copy-file "build/texinfo/numpy.info"
3445 ;; (string-append info "/numpy.info"))
3446 (for-each (lambda (file)
3447 (copy-file (string-append "build/latex" file)
3448 (string-append doc file)))
3449 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3450 (with-directory-excursion "build/html"
3451 (for-each (lambda (file)
3452 (let* ((dir (dirname file))
3453 (tgt-dir (string-append html "/" dir)))
3454 (unless (equal? "." dir)
3455 (mkdir-p tgt-dir))
96c46210 3456 (install-file file html)))
2ee8869a
FB
3457 (find-files "." ".*"))))))
3458 ,phases)))))))
3459
764c077b 3460(define-public python2-numpy
57b7b8cd 3461 (package-with-python2 python-numpy))
2ee8869a 3462
0151a8df 3463(define-public python-pygit2
3464 (package
3465 (name "python-pygit2")
022c9772 3466 (version "0.25.0")
0151a8df 3467 (source
3468 (origin
3469 (method url-fetch)
3470 (uri (pypi-uri "pygit2" version))
3471 (sha256
3472 (base32
022c9772 3473 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))))
0151a8df 3474 (build-system python-build-system)
3475 (propagated-inputs
3476 `(("python-six" ,python-six)
3477 ("python-cffi" ,python-cffi)
3478 ("libgit2" ,libgit2)
3479 ("python-tox" ,python-tox)))
3480 (home-page "https://github.com/libgit2/pygit2")
3481 (synopsis "Python bindings for libgit2")
3482 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3483library, libgit2 implements Git plumbing.")
3484 ;; GPL2.0 only, with linking exception.
3485 (license license:gpl2)))
3486
3487(define-public python2-pygit2
3488 (package-with-python2 python-pygit2))
3489
15bfe6d6
FB
3490(define-public python-pyparsing
3491 (package
3492 (name "python-pyparsing")
e0669289 3493 (version "2.0.3")
15bfe6d6
FB
3494 (source
3495 (origin
3496 (method url-fetch)
de67e922
LF
3497 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3498 "/pyparsing-" version
15bfe6d6
FB
3499 "/pyparsing-" version ".tar.gz"))
3500 (sha256
3501 (base32
e0669289 3502 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3503 (build-system python-build-system)
3504 (outputs '("out" "doc"))
3505 (arguments
3506 `(#:tests? #f ; no test target
3507 #:modules ((guix build python-build-system)
3508 (guix build utils))
3509 #:phases
3510 (alist-cons-after
3511 'install 'install-doc
3512 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3513 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3514 "/share/doc/" ,name "-" ,version))
3515 (html-doc (string-append doc "/html"))
3516 (examples (string-append doc "/examples")))
3517 (mkdir-p html-doc)
3518 (mkdir-p examples)
89b5c60e 3519 (for-each
15bfe6d6 3520 (lambda (dir tgt)
89b5c60e 3521 (map (lambda (file)
96c46210 3522 (install-file file tgt))
15bfe6d6
FB
3523 (find-files dir ".*")))
3524 (list "docs" "htmldoc" "examples")
3525 (list doc html-doc examples))))
3526 %standard-phases)))
3527 (home-page "http://pyparsing.wikispaces.com")
3528 (synopsis "Python parsing class library")
3529 (description
3530 "The pyparsing module is an alternative approach to creating and
3531executing simple grammars, vs. the traditional lex/yacc approach, or the use
3532of regular expressions. The pyparsing module provides a library of classes
3533that client code uses to construct the grammar directly in Python code.")
bd3fa666 3534 (license license:expat)))
15bfe6d6
FB
3535
3536(define-public python2-pyparsing
3537 (package-with-python2 python-pyparsing))
3538
ec00de35
FB
3539(define-public python-numpydoc
3540 (package
3541 (name "python-numpydoc")
3542 (version "0.5")
3543 (source
3544 (origin
3545 (method url-fetch)
89b5c60e 3546 (uri (string-append
ec00de35
FB
3547 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3548 version ".tar.gz"))
3549 (sha256
3550 (base32
5e4d8f67
AE
3551 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3552 (modules '((guix build utils)))
3553 (snippet
3554 '(begin
3555 ;; Drop a test requiring matplotlib, which we cannot add as an
3556 ;; input since it would create a circular dependency: Extend the
3557 ;; test for Python 3, where it is already dropped, to Python 2.
3558 (substitute* "numpydoc/tests/test_plot_directive.py"
3559 (("3") "2"))))))
ec00de35 3560 (build-system python-build-system)
fe4a8da4 3561 (propagated-inputs
213d1745
HG
3562 `(("python-sphinx" ,python-sphinx)))
3563 (native-inputs
3564 `(("python-nose" ,python-nose)))
ec00de35
FB
3565 (home-page "https://pypi.python.org/pypi/numpydoc")
3566 (synopsis
3567 "Numpy's Sphinx extensions")
3568 (description
3569 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3570 (license license:bsd-2)))
ec00de35
FB
3571
3572(define-public python2-numpydoc
5e4d8f67 3573 (package-with-python2 python-numpydoc))
1c65314c 3574
1e656049
RW
3575(define-public python-numexpr
3576 (package
3577 (name "python-numexpr")
2ee57340 3578 (version "2.6.1")
1e656049
RW
3579 (source
3580 (origin
3581 (method url-fetch)
26112c0a 3582 (uri (pypi-uri "numexpr" version))
1e656049
RW
3583 (sha256
3584 (base32
2ee57340 3585 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3586 (build-system python-build-system)
3587 (arguments `(#:tests? #f)) ; no tests included
3588 (propagated-inputs
3589 `(("python-numpy" ,python-numpy)))
3590 (home-page "https://github.com/pydata/numexpr")
3591 (synopsis "Fast numerical expression evaluator for NumPy")
3592 (description
3593 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3594expressions that operate on arrays are accelerated and use less memory than
3595doing the same calculation in Python. In addition, its multi-threaded
3596capabilities can make use of all your cores, which may accelerate
3597computations, most specially if they are not memory-bounded (e.g. those using
3598transcendental functions).")
f210e944 3599 (license license:expat)))
1e656049
RW
3600
3601(define-public python2-numexpr
f210e944 3602 (package-with-python2 python-numexpr))
1e656049 3603
1c65314c
FB
3604(define-public python-matplotlib
3605 (package
3606 (name "python-matplotlib")
1bbc659f 3607 (version "1.4.3")
1c65314c
FB
3608 (source
3609 (origin
3610 (method url-fetch)
de67e922
LF
3611 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3612 "/matplotlib-" version
1c65314c
FB
3613 "/matplotlib-" version ".tar.gz"))
3614 (sha256
3615 (base32
1bbc659f 3616 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3617 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3618 (build-system python-build-system)
3619 (outputs '("out" "doc"))
25f9a068
FB
3620 (propagated-inputs ; the following packages are all needed at run time
3621 `(("python-pyparsing" ,python-pyparsing)
3622 ("python-pygobject" ,python-pygobject)
3623 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3624 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3625 ("python-dateutil" ,python-dateutil-2)
3626 ("python-numpy" ,python-numpy-bootstrap)
3627 ("python-pillow" ,python-pillow)
3628 ("python-pytz" ,python-pytz)
3629 ("python-six" ,python-six)
25f9a068
FB
3630 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3631 ;; from 'gtk+') provides the required 'typelib' files used by
3632 ;; 'gobject-introspection'. The location of these files is set with the
3633 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3634 ;; is done automatically by a 'native-search-path' procedure. However,
3635 ;; at run-time the user must set this variable as follows:
3636 ;;
3637 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3638 ("gtk+" ,gtk+)
3639 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3640 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3641 ;; object. For this reason we need to import both libraries.
3642 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3643 ("python-pycairo" ,python-pycairo)
3644 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3645 (inputs
ca33a3ad 3646 `(("libpng" ,libpng)
1c65314c
FB
3647 ("imagemagick" ,imagemagick)
3648 ("freetype" ,freetype)
25f9a068
FB
3649 ("cairo" ,cairo)
3650 ("glib" ,glib)
1c65314c 3651 ;; FIXME: Add backends when available.
1c65314c
FB
3652 ;("python-wxpython" ,python-wxpython)
3653 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3654 ("tcl" ,tcl)
3655 ("tk" ,tk)))
1c65314c
FB
3656 (native-inputs
3657 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3658 ("python-sphinx" ,python-sphinx)
3659 ("python-numpydoc" ,python-numpydoc)
3660 ("python-nose" ,python-nose)
3661 ("python-mock" ,python-mock)
1c65314c
FB
3662 ("texlive" ,texlive)
3663 ("texinfo" ,texinfo)))
3664 (arguments
3665 `(#:phases
25f9a068
FB
3666 (alist-cons-before
3667 'build 'configure-environment
3668 (lambda* (#:key outputs inputs #:allow-other-keys)
3669 (let ((cairo (assoc-ref inputs "cairo"))
3670 (gtk+ (assoc-ref inputs "gtk+")))
3671 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3672 ;; has not effect.
25f9a068
FB
3673 (setenv "LD_LIBRARY_PATH"
3674 (string-append cairo "/lib:" gtk+ "/lib"))
3675 (setenv "HOME" (getcwd))
3676 (call-with-output-file "setup.cfg"
3677 (lambda (port)
1bbc659f
FB
3678 (format port "[directories]~%
3679basedirlist = ~a,~a~%
57b7b8cd 3680 [rc_options]~%
1bbc659f
FB
3681backend = TkAgg~%"
3682 (assoc-ref inputs "tcl")
3683 (assoc-ref inputs "tk"))))))
25f9a068
FB
3684 (alist-cons-after
3685 'install 'install-doc
ca33a3ad 3686 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3688 (doc (string-append data "/doc/" ,name "-" ,version))
3689 (info (string-append data "/info"))
3690 (html (string-append doc "/html")))
ca33a3ad
HG
3691 ;; Make installed package available for building the
3692 ;; documentation
3693 (add-installed-pythonpath inputs outputs)
25f9a068 3694 (with-directory-excursion "doc"
25f9a068
FB
3695 ;; Produce pdf in 'A4' format.
3696 (substitute* (find-files "." "conf\\.py")
3697 (("latex_paper_size = 'letter'")
3698 "latex_paper_size = 'a4'"))
3699 (mkdir-p html)
3700 (mkdir-p info)
3701 ;; The doc recommends to run the 'html' target twice.
3702 (system* "python" "make.py" "html")
3703 (system* "python" "make.py" "html")
18b31516 3704 (copy-recursively "build/html" html)
25f9a068
FB
3705 (system* "python" "make.py" "latex")
3706 (system* "python" "make.py" "texinfo")
18b31516
FB
3707 (symlink (string-append html "/_images")
3708 (string-append info "/matplotlib-figures"))
3709 (with-directory-excursion "build/texinfo"
3710 (substitute* "matplotlib.texi"
3711 (("@image\\{([^,]*)" all file)
3712 (string-append "@image{matplotlib-figures/" file)))
3713 (symlink (string-append html "/_images")
3714 "./matplotlib-figures")
3715 (system* "makeinfo" "--no-split"
3716 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3717 (copy-file "build/texinfo/matplotlib.info"
3718 (string-append info "/matplotlib.info"))
3719 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3720 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3721 %standard-phases))))
1c65314c
FB
3722 (home-page "http://matplotlib.org")
3723 (synopsis "2D plotting library for Python")
3724 (description
3725 "Matplotlib is a Python 2D plotting library which produces publication
3726quality figures in a variety of hardcopy formats and interactive environments
3727across platforms. Matplotlib can be used in Python scripts, the python and
3728ipython shell, web application servers, and six graphical user interface
3729toolkits.")
3f641af0 3730 (license license:psfl)
57b7b8cd 3731 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3732
764c077b 3733(define-public python2-matplotlib
57b7b8cd
LC
3734 (let ((matplotlib (package-with-python2
3735 (strip-python2-variant python-matplotlib))))
764c077b 3736 (package (inherit matplotlib)
88c26834
AE
3737 ;; Make sure to use special packages for Python 2 instead
3738 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3739 (propagated-inputs
7ca0dbc3 3740 `(("python2-pycairo" ,python2-pycairo)
764c077b 3741 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3742 ("python2-tkinter" ,python-2 "tk")
3743 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3744 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3745
0dde6232
RW
3746(define-public python2-pysnptools
3747 (package
3748 (name "python2-pysnptools")
a800018e 3749 (version "0.3.9")
0dde6232
RW
3750 (source
3751 (origin
3752 (method url-fetch)
3f2e9675 3753 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3754 (sha256
3755 (base32
a800018e 3756 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3757 (build-system python-build-system)
3758 (arguments
3759 `(#:python ,python-2)) ; only Python 2.7 is supported
3760 (propagated-inputs
3761 `(("python2-numpy" ,python2-numpy)
3762 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3763 ("python2-pandas" ,python2-pandas)))
3764 (native-inputs
3765 `(("python2-cython" ,python2-cython)))
0dde6232 3766 (native-inputs
f3b98f4f 3767 `(("unzip" ,unzip)))
0dde6232
RW
3768 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3769 (synopsis "Library for reading and manipulating genetic data")
3770 (description
3771 "PySnpTools is a library for reading and manipulating genetic data. It
3772can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3773those files. It can also efficiently manipulate ranges of integers using set
3774operators such as union, intersection, and difference.")
3f641af0 3775 (license license:asl2.0)))
0dde6232 3776
c9b1b4f9
RW
3777(define-public python-rpy2
3778 (package
3779 (name "python-rpy2")
ec3bcbc7 3780 (version "2.7.6")
c9b1b4f9
RW
3781 (source
3782 (origin
3783 (method url-fetch)
ec3bcbc7 3784 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3785 (sha256
3786 (base32
ec3bcbc7 3787 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3788 (build-system python-build-system)
482d9591
HG
3789 (propagated-inputs
3790 `(("python-six" ,python-six)))
c9b1b4f9 3791 (inputs
482d9591 3792 `(("readline" ,readline)
c9b1b4f9
RW
3793 ("icu4c" ,icu4c)
3794 ("pcre" ,pcre)
3795 ("r" ,r)))
3796 (native-inputs
f3b98f4f 3797 `(("zlib" ,zlib)))
c9b1b4f9
RW
3798 (home-page "http://rpy.sourceforge.net/")
3799 (synopsis "Python interface to the R language")
3800 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3801low-level interface to R from Python, a proposed high-level interface,
3802including wrappers to graphical libraries, as well as R-like structures and
3803functions.")
3f641af0 3804 (license license:gpl3+)))
c9b1b4f9
RW
3805
3806(define-public python2-rpy2
3807 (let ((rpy2 (package-with-python2 python-rpy2)))
3808 (package (inherit rpy2)
3809 (native-inputs
3810 `(("python2-singledispatch" ,python2-singledispatch)
3811 ,@(package-native-inputs rpy2))))))
3812
bb986599
FB
3813(define-public python-scipy
3814 (package
3815 (name "python-scipy")
ba8a0824 3816 (version "0.16.0")
bb986599
FB
3817 (source
3818 (origin
3819 (method url-fetch)
de67e922
LF
3820; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3821 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3822 "/scipy-" version ".tar.xz"))
bb986599
FB
3823 (sha256
3824 (base32
ba8a0824 3825 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3826 (build-system python-build-system)
dd86c0d1 3827 (propagated-inputs
bb986599
FB
3828 `(("python-numpy" ,python-numpy)
3829 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3830 ("python-pyparsing" ,python-pyparsing)))
3831 (inputs
3832 `(("lapack" ,lapack)
719b01c1 3833 ("openblas" ,openblas)))
bb986599 3834 (native-inputs
dd86c0d1
RW
3835 `(("python-nose" ,python-nose)
3836 ("python-sphinx" ,python-sphinx)
5248d49e 3837 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3838 ("gfortran" ,gfortran)
bb986599
FB
3839 ("texlive" ,texlive)
3840 ("perl" ,perl)))
3841 (outputs '("out" "doc"))
3842 (arguments
3843 `(#:phases
3844 (alist-cons-before
719b01c1 3845 'build 'configure-openblas
bb986599 3846 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3847 (call-with-output-file "site.cfg"
3848 (lambda (port)
3849 (format port
3850 "[blas]
3851libraries = openblas
3852library_dirs = ~a/lib
3853include_dirs = ~a/include
d548e6aa
HG
3854
3855# backslash-n to make emacs happy
3856\n[atlas]
719b01c1
RW
3857library_dirs = ~a/lib
3858atlas_libs = openblas
3859"
3860 (assoc-ref inputs "openblas")
3861 (assoc-ref inputs "openblas")
3862 (assoc-ref inputs "openblas"))))
3863 #t)
bb986599
FB
3864 (alist-cons-after
3865 'install 'install-doc
d548e6aa 3866 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3867 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3868 (doc (string-append data "/doc/" ,name "-" ,version))
3869 (html (string-append doc "/html"))
3870 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3871 ;; Make installed package available for building the
3872 ;; documentation
3873 (add-installed-pythonpath inputs outputs)
bb986599 3874 (with-directory-excursion "doc"
bb986599
FB
3875 ;; Fix generation of images for mathematical expressions.
3876 (substitute* (find-files "source" "conf\\.py")
3877 (("pngmath_use_preview = True")
3878 "pngmath_use_preview = False"))
3879 (mkdir-p html)
3880 (system* "make" "html" pyver)
3881 (system* "make" "latex" "PAPER=a4" pyver)
3882 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3883 (copy-file "build/latex/scipy-ref.pdf"
3884 (string-append doc "/scipy-ref.pdf"))
3885 (with-directory-excursion "build/html"
3886 (for-each (lambda (file)
3887 (let* ((dir (dirname file))
3888 (tgt-dir (string-append html "/" dir)))
96c46210 3889 (install-file file html)))
bb986599
FB
3890 (find-files "." ".*"))))))
3891 ;; Tests can only be run after the library has been installed and not
3892 ;; within the source directory.
3893 (alist-cons-after
3894 'install 'check
89b5c60e 3895 (lambda _
bb986599
FB
3896 (with-directory-excursion "/tmp"
3897 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3898 (alist-delete
3899 'check
4f9ff21e
RW
3900 (alist-cons-after
3901 'unpack 'fix-tests
3902 (lambda _
3903 (substitute* "scipy/integrate/tests/test_quadpack.py"
3904 (("libm.so") "libm.so.6"))
3905 #t)
3906 %standard-phases)))))))
bb986599
FB
3907 (home-page "http://www.scipy.org/")
3908 (synopsis "The Scipy library provides efficient numerical routines")
3909 (description "The SciPy library is one of the core packages that make up
3910the SciPy stack. It provides many user-friendly and efficient numerical
3911routines such as routines for numerical integration and optimization.")
3f641af0 3912 (license license:bsd-3)))
bb986599 3913
764c077b 3914(define-public python2-scipy
57b7b8cd 3915 (package-with-python2 python-scipy))
bb986599 3916
73acc193 3917(define-public python-socksipy-branch
3918 (package
3919 (name "python-socksipy-branch")
3920 (version "1.01")
3921 (source
3922 (origin
3923 (method url-fetch)
3924 (uri (pypi-uri "SocksiPy-branch" version))
3925 (sha256
3926 (base32
3927 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3928 (build-system python-build-system)
3929 (arguments
3930 `(#:tests? #f)) ; There are no tests
3931 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3932 (synopsis "Python SOCKS module")
3933 (description
3934 "SocksiPy - A Python SOCKS client module. It provides a
3935socket-like interface that supports connections to any TCP
3936service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3937The original version was developed by Dan Haim, this is a
3938branch created by Mario Vilas to address some open issues,
3939as the original project seems to have been abandoned circa 2007.")
3940 (license license:bsd-3)))
3941
3942(define-public python2-socksipy-branch
3943 (package-with-python2 python-socksipy-branch))
3944
94914805
EB
3945(define-public python-sqlalchemy
3946 (package
3947 (name "python-sqlalchemy")
a4ba286b 3948 (version "1.0.12")
94914805
EB
3949 (source
3950 (origin
3951 (method url-fetch)
3952 (uri (string-append "https://pypi.python.org/packages/source/S/"
3953 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3954 (sha256
3955 (base32
a4ba286b 3956 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3957 (build-system python-build-system)
3958 (native-inputs
3959 `(("python-cython" ,python-cython) ;for c extensions
3960 ("python-pytest" ,python-pytest)
3961 ("python-mock" ,python-mock))) ;for tests
3962 (arguments
3963 `(#:phases (alist-replace
3964 'check
3965 (lambda _ (zero? (system* "py.test")))
3966 %standard-phases)))
3967 (home-page "http://www.sqlalchemy.org")
3968 (synopsis "Database abstraction library")
3969 (description
3970 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3971gives application developers the full power and flexibility of SQL. It
3972provides a full suite of well known enterprise-level persistence patterns,
3973designed for efficient and high-performing database access, adapted into a
3974simple and Pythonic domain language.")
3f641af0 3975 (license license:x11)))
94914805
EB
3976
3977(define-public python2-sqlalchemy
3978 (package-with-python2 python-sqlalchemy))
c937562e 3979
4a093330
DM
3980(define-public python-pycodestyle
3981 (package
3982 (name "python-pycodestyle")
3983 (version "2.0.0")
3984 (source
3985 (origin
3986 (method url-fetch)
3987 (uri (pypi-uri "pycodestyle" version))
3988 (sha256
3989 (base32
3990 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3991 (build-system python-build-system)
3992 (home-page "https://pycodestyle.readthedocs.io/")
3993 (synopsis "Python style guide checker")
3994 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3995Python code against some of the style conventions in
3996@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3997 (license license:expat)))
4a093330
DM
3998
3999(define-public python2-pycodestyle
f210e944 4000 (package-with-python2 python-pycodestyle))
b91912c4
DM
4001
4002(define-public python-orderedmultidict
4003 (package
4004 (name "python-orderedmultidict")
9e2802cb 4005 (version "0.7.11")
b91912c4
DM
4006 (source
4007 (origin
4008 (method url-fetch)
4009 (uri (pypi-uri "orderedmultidict" version))
4010 (sha256
4011 (base32
9e2802cb 4012 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4013 (build-system python-build-system)
4014 (arguments
4015 `(#:phases
4016 (modify-phases %standard-phases
4017 (add-after 'unpack 'fix-tests
4018 (lambda _
4019 ;; The package uses nosetest for running the tests.
4020 ;; Adding this initfile allows to run the test suite
4021 ;; without requiring nosetest.
4022 (zero? (system* "touch" "tests/__init__.py")))))))
4023 (propagated-inputs
4024 `(("python-six" ,python-six)))
4025 (native-inputs
4026 `(("python-pycodestyle" ,python-pycodestyle)))
4027 (home-page "https://github.com/gruns/orderedmultidict")
4028 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4029 (description "This package contains a library for ordered multivalue
4030dictionaries. A multivalue dictionary is a dictionary that can store
4031multiple values for the same key. An ordered multivalue dictionary is a
4032multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4033 (license license:unlicense)))
b91912c4
DM
4034
4035(define-public python2-orderedmultidict
f210e944 4036 (package-with-python2 python-orderedmultidict))
9dede065
DM
4037
4038(define-public python-furl
4039 (package
4040 (name "python-furl")
4041 (version "0.5.6")
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (pypi-uri "furl" version))
4046 (sha256
4047 (base32
4048 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4049 (build-system python-build-system)
4050 (propagated-inputs
4051 `(("python-six" ,python-six)
4052 ("python-orderedmultidict" ,python-orderedmultidict)))
4053 (native-inputs
4054 `(("python-pycodestyle" ,python-pycodestyle)))
4055 (home-page "https://github.com/gruns/furl")
4056 (synopsis "URL manipulation in Python")
4057 (description "Furl provides an easy-to-use alternative to the
4058@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4059 (license license:unlicense)))
9dede065
DM
4060
4061(define-public python2-furl
f210e944 4062 (package-with-python2 python-furl))
462bf271
DM
4063
4064(define-public python-flask-babel
4065 (package
4066 (name "python-flask-babel")
4067 (version "0.11.1")
4068 (source
4069 (origin
4070 (method url-fetch)
4071 (uri (pypi-uri "Flask-Babel" version))
4072 (sha256
4073 (base32
4074 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4075 (build-system python-build-system)
4076 (propagated-inputs
4077 `(("python-flask" ,python-flask)
4078 ("python-babel" ,python-babel)
4079 ("python-jinja2" ,python-jinja2)
4080 ("python-pytz" ,python-pytz)))
4081 (home-page "https://github.com/python-babel/flask-babel")
4082 (synopsis "Add i18n/l10n support to Flask applications")
4083 (description "This package implements internationalization and localization
4084support for Flask. This is based on the Python babel module as well as pytz -
4085both of which are installed automatically if you install this library.")
f210e944 4086 (license license:bsd-3)))
462bf271
DM
4087
4088(define-public python2-flask-babel
f210e944 4089 (package-with-python2 python-flask-babel))
4a093330 4090
de2966cf
EF
4091(define-public python-sqlalchemy-utils
4092 (package
4093 (name "python-sqlalchemy-utils")
bb4b1706 4094 (version "0.32.11")
de2966cf
EF
4095 (source
4096 (origin
4097 (method url-fetch)
4098 (uri (pypi-uri "SQLAlchemy-Utils" version))
4099 (sha256
4100 (base32
bb4b1706 4101 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4102 (build-system python-build-system)
c22b4f87 4103 (propagated-inputs
de2966cf
EF
4104 `(("python-six" ,python-six)
4105 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
4106 (native-inputs
4107 `(("python-pytest" ,python-pytest)))
de2966cf
EF
4108 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4109 (synopsis "Various utility functions for SQLAlchemy")
4110 (description
4111 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4112for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4113
4114You might also want to install the following optional dependencies:
4115@enumerate
4116@item @code{python-passlib}
4117@item @code{python-babel}
4118@item @code{python-cryptography}
4119@item @code{python-pytz}
4120@item @code{python-psycopg2}
4121@item @code{python-furl}
4122@item @code{python-flask-babel}
4123@end enumerate
4124")
de2966cf
EF
4125 (license license:bsd-3)))
4126
4127(define-public python2-sqlalchemy-utils
f210e944 4128 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4129
af5a4602
CAW
4130(define-public python-alembic
4131 (package
4132 (name "python-alembic")
4418990d 4133 (version "0.8.10")
af5a4602
CAW
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (pypi-uri "alembic" version))
4138 (sha256
4139 (base32
4418990d 4140 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4141 (build-system python-build-system)
4142 (native-inputs
4143 `(("python-mock" ,python-mock)
4144 ("python-pytest-cov" ,python-pytest-cov)))
4145 (propagated-inputs
4146 `(("python-sqlalchemy" ,python-sqlalchemy)
4147 ("python-mako" ,python-mako)
4148 ("python-editor" ,python-editor)))
4149 (home-page "http://bitbucket.org/zzzeek/alembic")
4150 (synopsis
4151 "Database migration tool for SQLAlchemy")
4152 (description
4153 "Alembic is a lightweight database migration tool for usage with the
4154SQLAlchemy Database Toolkit for Python.")
f210e944 4155 (license license:expat)))
af5a4602
CAW
4156
4157(define-public python2-alembic
f210e944 4158 (package-with-python2 python-alembic))
af5a4602 4159
138adbbe
TD
4160(define-public python-autopep8
4161 (package
4162 (name "python-autopep8")
4163 (version "1.2.4")
4164 (source
4165 (origin
4166 (method url-fetch)
4167 (uri (pypi-uri "autopep8" version))
4168 (sha256
4169 (base32
4170 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4171 (build-system python-build-system)
4172 (propagated-inputs
4173 `(("python-pep8" ,python-pep8)))
4174 (home-page "https://github.com/hhatto/autopep8")
4175 (synopsis "Format Python code according to the PEP 8 style guide")
4176 (description
4177 "@code{autopep8} automatically formats Python code to conform to
4178the PEP 8 style guide. It uses the pycodestyle utility to determine
4179what parts of the code needs to be formatted. @code{autopep8} is
4180capable of fixing most of the formatting issues that can be reported
4181by pycodestyle.")
4182 (license (license:non-copyleft
4183 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4184
4185(define-public python2-autopep8
4186 (package-with-python2 python-autopep8))
4187
1671c07c
EB
4188(define-public python-distutils-extra
4189 (package
4190 (name "python-distutils-extra")
4191 (version "2.38")
4192 (source
4193 (origin
4194 (method url-fetch)
4195 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4196 version "/+download/python-distutils-extra-"
4197 version ".tar.gz"))
4198 (sha256
4199 (base32
4200 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4201 (build-system python-build-system)
1671c07c
EB
4202 (home-page "https://launchpad.net/python-distutils-extra/")
4203 (synopsis "Enhancements to Python's distutils")
4204 (description
4205 "The python-distutils-extra module enables you to easily integrate
4206gettext support, themed icons, and scrollkeeper-based documentation into
4207Python's distutils.")
3f641af0 4208 (license license:gpl2)))
1671c07c
EB
4209
4210(define-public python2-distutils-extra
4211 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4212
4213(define-public python2-elib.intl
4214 (package
4215 (name "python2-elib.intl")
4216 (version "0.0.3")
4217 (source
4218 (origin
4219 ;; This project doesn't tag releases or publish tarballs, so we take
4220 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4221 (method git-fetch)
4222 (uri (git-reference
4223 (url "https://github.com/dieterv/elib.intl.git")
4224 (commit "d09997cfef")))
4225 (sha256
4226 (base32
4227 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4228 (build-system python-build-system)
ea5456c8
EB
4229 (arguments
4230 ;; incompatible with Python 3 (exception syntax)
4231 `(#:python ,python-2
b41a05ce 4232 #:tests? #f))
ea5456c8
EB
4233 (home-page "https://github.com/dieterv/elib.intl")
4234 (synopsis "Enhanced internationalization for Python")
4235 (description
4236 "The elib.intl module provides enhanced internationalization (I18N)
4237services for your Python modules and applications.")
3f641af0 4238 (license license:lgpl3+)))
ea5456c8 4239
c937562e
EB
4240(define-public python-pillow
4241 (package
4242 (name "python-pillow")
aba5182c 4243 (version "3.3.3")
c937562e
EB
4244 (source
4245 (origin
4246 (method url-fetch)
f1d9231d 4247 (uri (pypi-uri "Pillow" version))
c937562e
EB
4248 (sha256
4249 (base32
aba5182c 4250 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4251 (build-system python-build-system)
4252 (native-inputs
f3b98f4f 4253 `(("python-nose" ,python-nose)))
c937562e 4254 (inputs
5ff408d9
SB
4255 `(("freetype" ,freetype)
4256 ("lcms" ,lcms)
c937562e
EB
4257 ("zlib" ,zlib)
4258 ("libjpeg" ,libjpeg)
4259 ("openjpeg" ,openjpeg)
5ff408d9
SB
4260 ("libtiff" ,libtiff)
4261 ("libwebp" ,libwebp)))
c937562e 4262 (arguments
e5358a6b 4263 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4264 (add-after
4265 'install 'check-installed
6151120a 4266 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4267 (begin
4268 (setenv "HOME" (getcwd))
6151120a
HG
4269 ;; Make installed package available for running the
4270 ;; tests
4271 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4272 (and (zero? (system* "python" "selftest.py"
4273 "--installed"))
4274 (zero? (system* "python" "test-installed.py"))))))
4275 (delete 'check))))
c937562e
EB
4276 (home-page "https://pypi.python.org/pypi/Pillow")
4277 (synopsis "Fork of the Python Imaging Library")
4278 (description
4279 "The Python Imaging Library adds image processing capabilities to your
4280Python interpreter. This library provides extensive file format support, an
4281efficient internal representation, and fairly powerful image processing
4282capabilities. The core image library is designed for fast access to data
4283stored in a few basic pixel formats. It should provide a solid foundation for
4284a general image processing tool.")
3f641af0 4285 (license (license:x11-style
c937562e
EB
4286 "http://www.pythonware.com/products/pil/license.htm"
4287 "The PIL Software License"))))
4288
4289(define-public python2-pillow
4290 (package-with-python2 python-pillow))
bb986599 4291
a415f036
FB
4292(define-public python-pycparser
4293 (package
4294 (name "python-pycparser")
5043b20d 4295 (version "2.17")
a415f036
FB
4296 (source
4297 (origin
4298 (method url-fetch)
38eb6919 4299 (uri (pypi-uri "pycparser" version))
a415f036
FB
4300 (sha256
4301 (base32
5043b20d 4302 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4303 (outputs '("out" "doc"))
4304 (build-system python-build-system)
4305 (native-inputs
f3b98f4f 4306 `(("pkg-config" ,pkg-config)))
a415f036 4307 (arguments
89b5c60e 4308 `(#:phases
819939cb
TGR
4309 (modify-phases %standard-phases
4310 (replace 'check
4311 (lambda _
4312 (with-directory-excursion "tests"
4313 (zero? (system* "python" "all_tests.py")))))
4314 (add-after 'install 'install-doc
4315 (lambda* (#:key outputs #:allow-other-keys)
4316 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4317 (doc (string-append data "/doc/" ,name "-" ,version))
4318 (examples (string-append doc "/examples")))
4319 (mkdir-p examples)
4320 (for-each (lambda (file)
4321 (copy-file (string-append "." file)
4322 (string-append doc file)))
4323 '("/README.rst" "/CHANGES" "/LICENSE"))
4324 (copy-recursively "examples" examples)))))))
a415f036
FB
4325 (home-page "https://github.com/eliben/pycparser")
4326 (synopsis "C parser in Python")
4327 (description
4328 "Pycparser is a complete parser of the C language, written in pure Python
4329using the PLY parsing library. It parses C code into an AST and can serve as
4330a front-end for C compilers or analysis tools.")
3f641af0 4331 (license license:bsd-3)))
a415f036
FB
4332
4333(define-public python2-pycparser
4334 (package-with-python2 python-pycparser))
57c3f716
FB
4335
4336(define-public python-cffi
4337 (package
4338 (name "python-cffi")
2d3a437c 4339 (version "1.4.2")
57c3f716
FB
4340 (source
4341 (origin
4342 (method url-fetch)
2d3a437c 4343 (uri (pypi-uri "cffi" version))
89b5c60e 4344 (sha256
2d3a437c 4345 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4346 (build-system python-build-system)
4347 (outputs '("out" "doc"))
4348 (inputs
4349 `(("libffi" ,libffi)))
4350 (propagated-inputs ; required at run-time
4351 `(("python-pycparser" ,python-pycparser)))
4352 (native-inputs
4353 `(("pkg-config" ,pkg-config)
4354 ("python-sphinx" ,python-sphinx)
f3b98f4f 4355 ("python-pytest" ,python-pytest)))
57c3f716 4356 (arguments
4179f952 4357 `(#:phases
57c3f716
FB
4358 (alist-cons-after
4359 'install 'install-doc
4360 (lambda* (#:key outputs #:allow-other-keys)
4361 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4362 (doc (string-append data "/doc/" ,name "-" ,version))
4363 (html (string-append doc "/html")))
4364 (with-directory-excursion "doc"
4365 (system* "make" "html")
4366 (mkdir-p html)
4367 (copy-recursively "build/html" html))
4368 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4369 %standard-phases)))
4370 (home-page "http://cffi.readthedocs.org")
4371 (synopsis "Foreign function interface for Python")
4372 (description
4373 "Foreign Function Interface for Python calling C code.")
bd3fa666 4374 (license license:expat)))
57c3f716
FB
4375
4376(define-public python2-cffi
4377 (package-with-python2 python-cffi))
6fa14469
FB
4378
4379(define-public python-xcffib
4380 (package
4381 (name "python-xcffib")
4382 (version "0.1.9")
4383 (source
4384 (origin
4385 (method url-fetch)
4386 (uri (string-append "https://pypi.python.org/packages/source/x/"
4387 "xcffib/xcffib-" version ".tar.gz"))
4388 (sha256
4389 (base32
4390 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4391 (build-system python-build-system)
4392 (inputs
482d9591 4393 `(("libxcb" ,libxcb)))
6fa14469 4394 (propagated-inputs
482d9591
HG
4395 `(("python-cffi" ,python-cffi) ; used at run time
4396 ("python-six" ,python-six)))
6fa14469 4397 (arguments
89b5c60e 4398 `(#:phases
6fa14469
FB
4399 (alist-cons-after
4400 'install 'install-doc
4401 (lambda* (#:key outputs #:allow-other-keys)
4402 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4403 "/doc/" ,name "-" ,version)))
4404 (mkdir-p doc)
4405 (copy-file "README.md"
4406 (string-append doc "/README.md"))))
4407 %standard-phases)))
4408 (home-page "https://github.com/tych0/xcffib")
4409 (synopsis "XCB Python bindings")
4410 (description
4411 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4412support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4413 (license license:expat)))
6fa14469
FB
4414
4415(define-public python2-xcffib
4416 (package-with-python2 python-xcffib))
4417
9e099723
FB
4418(define-public python-cairocffi
4419 (package
4420 (name "python-cairocffi")
4421 (version "0.6")
4422 (source
4423 (origin
4424 (method url-fetch)
4425 ;; The archive on pypi is missing the 'utils' directory!
4426 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4427 version ".tar.gz"))
f586c877 4428 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4429 (sha256
4430 (base32
4431 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4432 (build-system python-build-system)
4433 (outputs '("out" "doc"))
4434 (inputs
4435 `(("gdk-pixbuf" ,gdk-pixbuf)
4436 ("cairo" ,cairo)))
4437 (native-inputs
4438 `(("pkg-config" ,pkg-config)
4439 ("python-sphinx" ,python-sphinx)
f3b98f4f 4440 ("python-docutils" ,python-docutils)))
9e099723
FB
4441 (propagated-inputs
4442 `(("python-xcffib" ,python-xcffib))) ; used at run time
4443 (arguments
89b5c60e 4444 `(#:phases
9e099723
FB
4445 (alist-cons-after
4446 'install 'install-doc
4447 (lambda* (#:key inputs outputs #:allow-other-keys)
4448 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4449 (doc (string-append data "/doc/" ,name "-" ,version))
4450 (html (string-append doc "/html")))
89b5c60e 4451 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4452 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4453 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4454 (setenv "LANG" "en_US.UTF-8")
4455 (mkdir-p html)
4456 (for-each (lambda (file)
4457 (copy-file (string-append "." file)
4458 (string-append doc file)))
4459 '("/README.rst" "/CHANGES" "/LICENSE"))
4460 (system* "python" "setup.py" "build_sphinx")
4461 (copy-recursively "docs/_build/html" html)))
4462 %standard-phases)))
4463 (home-page "https://github.com/SimonSapin/cairocffi")
4464 (synopsis "Python bindings and object-oriented API for Cairo")
4465 (description
4466 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4467Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4468graphics library with support for multiple backends including image buffers,
4469PNG, PostScript, PDF, and SVG file output.")
3f641af0 4470 (license license:bsd-3)))
9e099723
FB
4471
4472(define-public python2-cairocffi
4473 (package-with-python2 python-cairocffi))
4474
3cff95cb
RW
4475(define-public python-decorator
4476 (package
4477 (name "python-decorator")
d79fa7da 4478 (version "4.0.10")
3cff95cb
RW
4479 (source
4480 (origin
4481 (method url-fetch)
e21338be 4482 (uri (pypi-uri "decorator" version))
3cff95cb 4483 (sha256
d79fa7da 4484 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4485 (build-system python-build-system)
4486 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4487 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4488 (synopsis "Python module to simplify usage of decorators")
4489 (description
4490 "The aim of the decorator module is to simplify the usage of decorators
4491for the average programmer, and to popularize decorators usage giving examples
4492of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4493etc. The core of this module is a decorator factory.")
4494 (license license:expat)))
4495
4496(define-public python2-decorator
4497 (package-with-python2 python-decorator))
4498
2c0499ad
RW
4499(define-public python-drmaa
4500 (package
4501 (name "python-drmaa")
4502 (version "0.7.6")
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (string-append
4507 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4508 version ".tar.gz"))
4509 (sha256
4510 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4511 (build-system python-build-system)
4512 ;; The test suite requires libdrmaa which is provided by the cluster
4513 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4514 ;; should be set to the path of the libdrmaa library.
4515 (arguments '(#:tests? #f))
4516 (native-inputs
f3b98f4f 4517 `(("python-nose" ,python-nose)))
2c0499ad
RW
4518 (home-page "https://pypi.python.org/pypi/drmaa")
4519 (synopsis "Python bindings for the DRMAA library")
4520 (description
4521 "A Python package for Distributed Resource Management (DRM) job
4522submission and control. This package is an implementation of the DRMAA 1.0
4523Python language binding specification.")
3f641af0 4524 (license license:bsd-3)))
2c0499ad
RW
4525
4526(define-public python2-drmaa
4527 (package-with-python2 python-drmaa))
4528
d05c6da0
RW
4529(define-public python-gridmap
4530 (package
4531 (name "python-gridmap")
4532 (version "0.13.0")
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (string-append
4537 "https://github.com/pygridtools/gridmap/archive/v"
4538 version ".tar.gz"))
4539 (file-name (string-append name "-" version ".tar.gz"))
4540 (sha256
4541 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4542 (build-system python-build-system)
f22efa01 4543 (propagated-inputs
d05c6da0
RW
4544 `(("python-psutil" ,python-psutil)
4545 ("python-drmaa" ,python-drmaa)
4546 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4547 (home-page "https://github.com/pygridtools/gridmap")
4548 (synopsis "Create jobs on a cluster directly from Python")
4549 (description
4550 "Gridmap is a Python package to allow you to easily create jobs on the
4551cluster directly from Python. You can directly map Python functions onto the
4552cluster without needing to write any wrapper code yourself.")
3f641af0 4553 (license license:gpl3+)))
d05c6da0
RW
4554
4555(define-public python2-gridmap
4556 (package-with-python2 python-gridmap))
4557
cb6d5c54
RW
4558(define-public python-pexpect
4559 (package
4560 (name "python-pexpect")
4561 (version "3.3")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (string-append "https://pypi.python.org/packages/source/p/"
4566 "pexpect/pexpect-" version ".tar.gz"))
4567 (sha256
4568 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4569 (build-system python-build-system)
4570 (arguments
4571 `(#:phases
4572 (modify-phases %standard-phases
4573 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4574 (native-inputs
4575 `(("python-nose" ,python-nose)))
4576 (home-page "http://pexpect.readthedocs.org/")
4577 (synopsis "Controlling interactive console applications")
4578 (description
4579 "Pexpect is a pure Python module for spawning child applications;
4580controlling them; and responding to expected patterns in their output.
4581Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4582child application and control it as if a human were typing commands.")
3f641af0 4583 (license license:isc)))
cb6d5c54
RW
4584
4585(define-public python2-pexpect
4586 (package-with-python2 python-pexpect))
4587
229ad120
RW
4588(define-public python-setuptools-scm
4589 (package
4590 (name "python-setuptools-scm")
42d6d0d0 4591 (version "1.11.1")
229ad120
RW
4592 (source (origin
4593 (method url-fetch)
383af6b0 4594 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4595 (sha256
4596 (base32
42d6d0d0 4597 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4598 (build-system python-build-system)
4599 (home-page "https://github.com/pypa/setuptools_scm/")
4600 (synopsis "Manage Python package versions in SCM metadata")
4601 (description
383af6b0 4602 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4603@dfn{software configuration management} (SCM) metadata instead of declaring
4604them as the version argument or in a SCM managed file.")
4605 (license license:expat)))
4606
4607(define-public python2-setuptools-scm
4608 (package-with-python2 python-setuptools-scm))
4609
b74270ee
RW
4610(define-public python-pathpy
4611 (package
4612 (name "python-pathpy")
4613 (version "8.1.1")
4614 (source
4615 (origin
4616 (method url-fetch)
4617 (uri (string-append "https://pypi.python.org/packages/source/p/"
4618 "path.py/path.py-" version ".tar.gz"))
4619 (sha256
4620 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4621 (outputs '("out" "doc"))
b74270ee
RW
4622 (build-system python-build-system)
4623 (propagated-inputs
4624 `(("python-appdirs" ,python-appdirs)))
4625 (native-inputs
f3b98f4f 4626 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4627 ("python-sphinx" ,python-sphinx)
4628 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4629 ("python-pytest" ,python-pytest)
4630 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4631 (arguments
4632 `(#:phases
4633 (modify-phases %standard-phases
4634 (add-after 'build 'build-doc
4635 (lambda _
4636 (setenv "LANG" "en_US.UTF-8")
4637 (zero? (system* "python" "setup.py" "build_sphinx"))))
4638 (add-after 'install 'install-doc
4639 (lambda* (#:key outputs #:allow-other-keys)
4640 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4641 (doc (string-append data "/doc/" ,name "-" ,version))
4642 (html (string-append doc "/html")))
4643 (mkdir-p html)
4644 (for-each (lambda (file)
4645 (copy-file file (string-append doc "/" file)))
4646 '("README.rst" "CHANGES.rst"))
4647 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4648 (home-page "http://github.com/jaraco/path.py")
4649 (synopsis "Python module wrapper for built-in os.path")
4650 (description
4651 "@code{path.py} implements path objects as first-class entities, allowing
4652common operations on files to be invoked on those path objects directly.")
4653 (license license:expat)))
4654
4655(define-public python2-pathpy
4656 (package-with-python2 python-pathpy))
4657
0d34e01b
RW
4658(define-public python-pickleshare
4659 (package
4660 (name "python-pickleshare")
4661 (version "0.5")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (string-append "https://pypi.python.org/packages/source/p/"
4666 "pickleshare/pickleshare-" version ".tar.gz"))
4667 (sha256
4668 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4669 (build-system python-build-system)
4670 (propagated-inputs
4671 `(("python-pathpy" ,python-pathpy)))
4672 (home-page "https://github.com/vivainio/pickleshare")
4673 (synopsis "Tiny key value database with concurrency support")
4674 (description
4675 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4676Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4677shelve, many processes can access the database simultaneously. Changing a
4678value in database is immediately visible to other processes accessing the same
4679database. Concurrency is possible because the values are stored in separate
4680files. Hence the “database” is a directory where all files are governed by
4681PickleShare.")
4682 (license license:expat)))
4683
4684(define-public python2-pickleshare
4685 (package-with-python2 python-pickleshare))
4686
cd6e5189
RW
4687(define-public python-simplegeneric
4688 (package
4689 (name "python-simplegeneric")
4690 (version "0.8.1")
4691 (source
4692 (origin
4693 (method url-fetch)
4694 (uri (string-append "https://pypi.python.org/packages/source/s/"
4695 "simplegeneric/simplegeneric-" version ".zip"))
4696 (sha256
4697 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4698 (build-system python-build-system)
4699 (native-inputs
f3b98f4f 4700 `(("unzip" ,unzip)))
cd6e5189
RW
4701 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4702 (synopsis "Python module for simple generic functions")
4703 (description
4704 "The simplegeneric module lets you define simple single-dispatch generic
4705functions, akin to Python’s built-in generic functions like @code{len()},
4706@code{iter()} and so on. However, instead of using specially-named methods,
4707these generic functions use simple lookup tables, akin to those used by
4708e.g. @code{pickle.dump()} and other generic functions found in the Python
4709standard library.")
3f641af0 4710 (license license:zpl2.1)))
cd6e5189
RW
4711
4712(define-public python2-simplegeneric
4713 (package-with-python2 python-simplegeneric))
4714
ddc7d8ed 4715(define-public python-ipython-genutils
c4abbac3 4716 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4717 (package
4718 (name "python-ipython-genutils")
4719 (version "0.1.0")
4720 (source
4721 (origin
4722 (method url-fetch)
4723 (uri (string-append "https://pypi.python.org/packages/source/i/"
4724 "ipython_genutils/ipython_genutils-"
4725 version ".tar.gz"))
4726 (sha256
4727 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4728 (build-system python-build-system)
4729 (arguments `(#:tests? #f)) ; no tests
4730 (home-page "http://ipython.org")
4731 (synopsis "Vestigial utilities from IPython")
4732 (description
c4abbac3
HG
4733 "This package provides retired utilities from IPython. No packages
4734outside IPython/Jupyter should depend on it.
4735
4736This package shouldn't exist. It contains some common utilities shared by
4737Jupyter and IPython projects during The Big Split. As soon as possible, those
4738packages will remove their dependency on this, and this package will go
4739away.")
3f641af0 4740 (license license:bsd-3)))
ddc7d8ed
RW
4741
4742(define-public python2-ipython-genutils
4743 (package-with-python2 python-ipython-genutils))
4744
2b10eb48
RW
4745(define-public python-traitlets
4746 (package
4747 (name "python-traitlets")
a5ba1481 4748 (version "4.2.0")
2b10eb48
RW
4749 (source
4750 (origin
4751 (method url-fetch)
cc0c4fde 4752 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4753 (sha256
4754 (base32
a5ba1481 4755 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4756 (build-system python-build-system)
4757 (arguments
4758 `(#:phases
4759 (modify-phases %standard-phases
4760 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4761 (propagated-inputs
4762 `(("python-ipython-genutils" ,python-ipython-genutils)
4763 ("python-decorator" ,python-decorator)))
4764 (native-inputs
cc0c4fde
EF
4765 `(("python-mock" ,python-mock)
4766 ("python-nose" ,python-nose)))
2b10eb48
RW
4767 (home-page "http://ipython.org")
4768 (synopsis "Configuration system for Python applications")
4769 (description
4770 "Traitlets is a framework that lets Python classes have attributes with
4771type checking, dynamically calculated default values, and ‘on change’
4772callbacks. The package also includes a mechanism to use traitlets for
4773configuration, loading values from files or from command line arguments. This
4774is a distinct layer on top of traitlets, so you can use traitlets in your code
4775without using the configuration machinery.")
3f641af0 4776 (license license:bsd-3)))
2b10eb48
RW
4777
4778(define-public python2-traitlets
4779 (package-with-python2 python-traitlets))
4780
4263b06f
RW
4781(define-public python-jupyter-core
4782 (package
4783 (name "python-jupyter-core")
45cc957c 4784 (version "4.2.1")
4263b06f
RW
4785 (source
4786 (origin
4787 (method url-fetch)
4788 (uri (string-append (pypi-uri "jupyter_core" version)))
4789 (sha256
4790 (base32
45cc957c 4791 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
4792 (build-system python-build-system)
4793 ;; FIXME: not sure how to run the tests
4794 (arguments `(#:tests? #f))
4795 (propagated-inputs
4796 `(("python-traitlets" ,python-traitlets)))
4797 (home-page "http://jupyter.org/")
4798 (synopsis "Jupyter base package")
4799 (description
4800 "Jupyter core is the base package on which Jupyter projects rely.")
4801 (license license:bsd-3)))
4802
4803(define-public python2-jupyter-core
4804 (package-with-python2 python-jupyter-core))
4805
9ff01f2d
RW
4806(define-public python-jupyter-client
4807 (package
4808 (name "python-jupyter-client")
4809 (version "4.4.0")
4810 (source
4811 (origin
4812 (method url-fetch)
4813 (uri (pypi-uri "jupyter_client" version))
4814 (sha256
4815 (base32
4816 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4817 (build-system python-build-system)
4818 ;; Tests fail because of missing native python kernel which I assume is
4819 ;; provided by the ipython package, which we cannot use because it would
4820 ;; cause a dependency cycle.
4821 (arguments `(#:tests? #f))
4822 (propagated-inputs
4823 `(("python-pyzmq" ,python-pyzmq)
4824 ("python-traitlets" ,python-traitlets)
4825 ("python-jupyter-core" ,python-jupyter-core)))
4826 (home-page "http://jupyter.org/")
4827 (synopsis "Jupyter protocol implementation and client libraries")
4828 (description
4829 "The @code{jupyter_client} package contains the reference implementation
4830of the Jupyter protocol. It also provides client and kernel management APIs
4831for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4832installing @code{kernelspec}s for use with Jupyter frontends.")
4833 (license license:bsd-3)))
4834
4835(define-public python2-jupyter-client
4836 (package-with-python2 python-jupyter-client))
4837
ab526102
RW
4838(define-public python-ipykernel
4839 (package
4840 (name "python-ipykernel")
f165648e 4841 (version "4.5.2")
ab526102
RW
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "ipykernel" version))
4846 (sha256
f165648e 4847 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
4848 (build-system python-build-system)
4849 ;; The tests load a submodule of IPython. However, IPython itself depends
4850 ;; on ipykernel.
4851 (arguments `(#:tests? #f))
4852 (propagated-inputs
4853 ;; imported at runtime during connect
4854 `(("python-jupyter-client" ,python-jupyter-client)))
4855 (home-page "http://ipython.org")
4856 (synopsis "IPython Kernel for Jupyter")
4857 (description
4858 "This package provides the IPython kernel for Jupyter.")
4859 (license license:bsd-3)))
4860
4861(define-public python2-ipykernel
4862 (package-with-python2 python-ipykernel))
4863
5ff6effc
RW
4864(define-public python-testpath
4865 (package
4866 (name "python-testpath")
4867 (version "0.2")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4872 version ".tar.gz"))
4873 (file-name (string-append name "-" version ".tar.gz"))
4874 (sha256
4875 (base32
4876 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4877 (build-system python-build-system)
4878 (arguments
4879 `(#:tests? #f ; this package does not even have a setup.py
4880 #:phases
4881 (modify-phases %standard-phases
4882 (delete 'install)
4883 (replace 'build
4884 (lambda* (#:key inputs outputs #:allow-other-keys)
4885 (let ((dir (string-append
4886 (assoc-ref outputs "out")
4887 "/lib/python"
4888 (string-take (string-take-right
4889 (assoc-ref inputs "python") 5) 3)
4890 "/site-packages/testpath")))
4891 (mkdir-p dir)
4892 (copy-recursively "testpath" dir))
4893 #t)))))
4894 (home-page "https://github.com/takluyver/testpath")
4895 (synopsis "Test utilities for code working with files and commands")
4896 (description
4897 "Testpath is a collection of utilities for Python code working with files
4898and commands. It contains functions to check things on the filesystem, and
4899tools for mocking system commands and recording calls to those.")
4900 (license license:expat)))
4901
4902(define-public python2-testpath
4903 (package-with-python2 python-testpath))
4904
ae1ab9fe
FB
4905(define-public python-ipython
4906 (package
4907 (name "python-ipython")
4dbc8ec4 4908 (version "4.0.3")
ae1ab9fe
FB
4909 (source
4910 (origin
fceac880 4911 (method url-fetch)
accd5f99 4912 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4913 (sha256
4dbc8ec4 4914 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4915 (build-system python-build-system)
4916 (outputs '("out" "doc"))
3a0b1b9a
FB
4917 (propagated-inputs
4918 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4919 ("python-terminado" ,python-terminado)
ae1ab9fe 4920 ("python-matplotlib" ,python-matplotlib)
5d26e542 4921 ("python-numpy" ,python-numpy)
ae1ab9fe 4922 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4923 ("python-jinja2" ,python-jinja2)
4924 ("python-mistune" ,python-mistune)
accd5f99
RW
4925 ("python-pexpect" ,python-pexpect)
4926 ("python-pickleshare" ,python-pickleshare)
4927 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4928 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4929 ("python-traitlets" ,python-traitlets)
4930 ("python-ipykernel" ,python-ipykernel)
4931 ("python-pygments" ,python-pygments)))
4932 (inputs
4933 `(("readline" ,readline)
4934 ("which" ,which)))
ae1ab9fe
FB
4935 (native-inputs
4936 `(("pkg-config" ,pkg-config)
accd5f99
RW
4937 ("python-requests" ,python-requests) ;; for tests
4938 ("python-testpath" ,python-testpath)
4939 ("python-nose" ,python-nose)
ae1ab9fe
FB
4940 ("python-sphinx" ,python-sphinx)
4941 ("texlive" ,texlive)
f3b98f4f 4942 ("texinfo" ,texinfo)))
ae1ab9fe 4943 (arguments
89b5c60e 4944 `(#:phases
3a0b1b9a
FB
4945 (modify-phases %standard-phases
4946 (add-after
4947 'install 'install-doc
4948 (lambda* (#:key inputs outputs #:allow-other-keys)
4949 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4950 (doc (string-append data "/doc/" ,name "-" ,version))
4951 (html (string-append doc "/html"))
4952 (man1 (string-append data "/man/man1"))
4953 (info (string-append data "/info"))
4954 (examples (string-append doc "/examples")))
afd3d931 4955 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4956 ;; Make installed package available for running the tests
4957 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4958 (with-directory-excursion "docs"
accd5f99
RW
4959 ;; FIXME: pdf fails to build
4960 ;;(system* "make" "pdf" "PAPER=a4")
4961 (system* "make" "html")
3a0b1b9a
FB
4962 (system* "make" "info"))
4963 (copy-recursively "docs/man" man1)
4964 (copy-recursively "examples" examples)
accd5f99 4965 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4966 ;; (copy-file "docs/build/latex/ipython.pdf"
4967 ;; (string-append doc "/ipython.pdf"))
4968 (mkdir-p info)
4969 (copy-file "docs/build/texinfo/ipython.info"
4970 (string-append info "/ipython.info"))
4971 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4972 ;; Tests can only be run after the library has been installed and not
4973 ;; within the source directory.
4974 (delete 'check)
4975 (add-after
4976 'install 'check
eee5cd04 4977 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4978 (if tests?
4979 (with-directory-excursion "/tmp"
eee5cd04
HG
4980 ;; Make installed package available for running the tests
4981 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4982 (setenv "HOME" "/tmp/") ;; required by a test
4983 (zero? (system* (string-append (assoc-ref outputs "out")
4984 "/bin/iptest"))))
4985 #t)))
4986 (add-before
4987 'install 'fix-tests
4988 (lambda* (#:key inputs #:allow-other-keys)
4989 (substitute* "./IPython/utils/_process_posix.py"
4990 (("/usr/bin/env', 'which") (which "which")))
4991 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4992 (("#!/usr/bin/env python")
4993 (string-append "#!" (which "python"))))
4994 ;; Disable 1 failing test
4995 (substitute* "./IPython/core/tests/test_magic.py"
4996 (("def test_dirops\\(\\):" all)
4997 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4998 (home-page "http://ipython.org")
4999 (synopsis "IPython is a tool for interactive computing in Python")
5000 (description
5001 "IPython provides a rich architecture for interactive computing with:
5002Powerful interactive shells, a browser-based notebook, support for interactive
5003data visualization, embeddable interpreters and tools for parallel
5004computing.")
135ba811
EF
5005 (license license:bsd-3)
5006 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5007
5008(define-public python2-ipython
135ba811 5009 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5010 (package
5011 (inherit ipython)
5012 ;; FIXME: some tests are failing
5013 (arguments
5014 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 5015 ;; FIXME: add pyreadline once available.
e62600fe 5016 (native-inputs
135ba811 5017 `(("python2-mock" ,python2-mock)
77a6932a 5018 ,@(package-native-inputs ipython))))))
03411993
AE
5019
5020(define-public python-isodate
5021 (package
5022 (name "python-isodate")
b6785c2e 5023 (version "0.5.4")
03411993
AE
5024 (source
5025 (origin
5026 (method url-fetch)
b6785c2e 5027 (uri (pypi-uri "isodate" version))
03411993
AE
5028 (sha256
5029 (base32
b6785c2e 5030 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5031 (build-system python-build-system)
03411993
AE
5032 (home-page
5033 "http://cheeseshop.python.org/pypi/isodate")
5034 (synopsis
5035 "Python date parser and formatter")
5036 (description
5037 "Python-isodate is a python module for parsing and formatting
5038ISO 8601 dates, time and duration.")
3f641af0 5039 (license license:bsd-3)))
03411993
AE
5040
5041(define-public python2-isodate
5042 (package-with-python2 python-isodate))
673ab897
AE
5043
5044(define-public python-html5lib
5045 (package
5046 (name "python-html5lib")
a14061aa 5047 (version "1.0b10")
673ab897
AE
5048 (source
5049 (origin
5050 (method url-fetch)
fee04c19 5051 (uri (pypi-uri "html5lib" version))
673ab897
AE
5052 (sha256
5053 (base32
a14061aa 5054 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5055 (build-system python-build-system)
3dd75476 5056 (propagated-inputs
4eb6ed28
MB
5057 `(("python-six" ,python-six)
5058 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5059 (arguments
5060 `(#:test-target "check"))
5061 (home-page
5062 "https://github.com/html5lib/html5lib-python")
5063 (synopsis
5064 "Python HTML parser based on the WHATWG HTML specifcation")
5065 (description
5066 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5067and written in Python.")
bd3fa666 5068 (license license:expat)))
673ab897
AE
5069
5070(define-public python2-html5lib
5071 (package-with-python2 python-html5lib))
e99f4211 5072
8ee62c97
RW
5073;; Needed for python-bleach, a dependency of python-notebook
5074(define-public python-html5lib-0.9
5075 (package
5076 (inherit python-html5lib)
5077 (version "0.999")
5078 (source
5079 (origin
5080 (method url-fetch)
5081 (uri (pypi-uri "html5lib" version))
5082 (sha256
5083 (base32
5084 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5085
5086(define-public python2-html5lib-0.9
5087 (package-with-python2 python-html5lib-0.9))
5088
adbca19e
MB
5089(define-public python-webencodings
5090 (package
5091 (name "python-webencodings")
5092 (version "0.5")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (pypi-uri "webencodings" version))
5096 (sha256
5097 (base32
5098 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5099 (build-system python-build-system)
5100 (arguments
5101 '(#:phases
5102 (modify-phases %standard-phases
5103 (replace 'check
5104 (lambda _
5105 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5106 (native-inputs
5107 `(("python-pytest" ,python-pytest)))
5108 (home-page "https://github.com/SimonSapin/python-webencodings")
5109 (synopsis "Character encoding aliases for legacy web content")
5110 (description
5111 "In order to be compatible with legacy web content when interpreting
5112something like @code{Content-Type: text/html; charset=latin1}, tools need
5113to use a particular set of aliases for encoding labels as well as some
5114overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5115the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5116or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5117The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5118defines all such details so that implementations do not have to
5119reverse-engineer each other.
5120
5121This module implements the Encoding standard and has encoding labels and
5122BOM detection, but the actual implementation for encoders and decoders
5123is Python’s.")
5124 (license license:bsd-3)))
5125
5126(define-public python2-webencodings
5127 (package-with-python2 python-webencodings))
5128
e99f4211
MW
5129(define-public python-urwid
5130 (package
5131 (name "python-urwid")
51ff41f6 5132 (version "1.3.1")
e99f4211
MW
5133 (source
5134 (origin
5135 (method url-fetch)
b97c1bfd 5136 (uri (pypi-uri "urwid" version))
e99f4211
MW
5137 (sha256
5138 (base32
51ff41f6 5139 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5140 (build-system python-build-system)
b97c1bfd
LF
5141 (arguments
5142 `(#:phases
5143 (modify-phases %standard-phases
5144 ;; Disable failing test. Bug filed upstream:
5145 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5146 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5147 (add-after 'unpack 'disable-failing-test
5148 (lambda _
5149 (substitute* "urwid/tests/test_event_loops.py"
5150 (("test_remove_watch_file")
5151 "disable_remove_watch_file")))))))
e99f4211
MW
5152 (home-page "http://urwid.org")
5153 (synopsis "Console user interface library for Python")
5154 (description
5155 "Urwid is a curses-based UI/widget library for Python. It includes many
5156features useful for text console applications.")
3f641af0 5157 (license license:lgpl2.1+)))
e99f4211
MW
5158
5159(define-public python2-urwid
5160 (package-with-python2 python-urwid))
d95a56c6 5161
5220022a
JL
5162(define-public python-openid
5163 (package
5164 (name "python-openid")
5165 (version "3.0.10")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "python3-openid" version))
5170 (sha256
5171 (base32
5172 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5173 (build-system python-build-system)
5174 (home-page "https://github.com/necaris/python3-openid")
5175 (synopsis "OpenID support for servers and consumers")
5176 (description "This library provides OpenID authentication for Python, both
5177for clients and servers.")
5178 (license license:asl2.0)))
5179
3ef00f56 5180(define-public python2-openid
5181 (package
5182 (name "python2-openid")
5183 (version "2.2.5")
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (pypi-uri "python-openid" version))
5188 (sha256
5189 (base32
5190 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5191 (build-system python-build-system)
5192 (arguments
5193 ;; Python 3 support is in `python3-openid`, a separate package.
5194 `(#:python ,python-2))
5195 (home-page "https://github.com/openid/python-openid")
5196 (synopsis "OpenID support for servers and consumers")
5197 (description "This library provides OpenID authentication for Python, both
5198for clients and servers.")
5199 (license license:asl2.0)))
5200
47d0b292
TS
5201(define-public python-urwidtrees
5202 (package
5203 (name "python-urwidtrees")
37ec4623 5204 (version "1.0.2")
47d0b292
TS
5205 (source
5206 (origin
5207 (method url-fetch)
37ec4623
TS
5208 ;; package author intends on distributing via github rather than pypi:
5209 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5210 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5211 version ".tar.gz"))
5212 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5213 (sha256
5214 (base32
37ec4623 5215 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5216 (build-system python-build-system)
5217 (arguments
5218 '(#:tests? #f)) ; no tests
f22efa01 5219 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5220 (home-page "https://github.com/pazz/urwidtrees")
5221 (synopsis "Tree widgets for urwid")
5222 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5223toolkit. Use it to build trees of widgets.")
3f641af0 5224 (license license:gpl3+)))
47d0b292
TS
5225
5226(define-public python2-urwidtrees
5227 (package-with-python2 python-urwidtrees))
5228
d95a56c6
PAR
5229(define-public python-dbus
5230 (package
5231 (name "python-dbus")
5232 (version "1.2.0")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri (string-append
5cc3096c 5237 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5238 version ".tar.gz"))
5239 (sha256
5240 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5241 (build-system gnu-build-system)
6717c879
SB
5242 (arguments
5243 '(#:phases
5244 (modify-phases %standard-phases
5245 (add-before
5246 'check 'pre-check
5247 (lambda _
5248 ;; XXX: For the missing '/etc/machine-id'.
5249 (substitute* "test/run-test.sh"
5250 (("DBUS_FATAL_WARNINGS=1")
5251 "DBUS_FATAL_WARNINGS=0"))
5252 #t)))))
d95a56c6
PAR
5253 (native-inputs
5254 `(("pkg-config" ,pkg-config)))
5255 (inputs
5256 `(("python" ,python)
2e88d113 5257 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5258 (synopsis "Python bindings for D-bus")
5259 (description "python-dbus provides bindings for libdbus, the reference
5260implementation of D-Bus.")
5261 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5262 (license license:expat)))
b52af02b
MW
5263
5264(define-public python2-dbus
5265 (package (inherit python-dbus)
5266 (name "python2-dbus")
5267 (inputs `(("python" ,python-2)
5268 ,@(alist-delete "python"
5269 (package-inputs python-dbus)
5270 equal?)))
5271 ;; FIXME: on Python 2, the test_utf8 fails with:
5272 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5273 (arguments `(#:tests? #f))))
a6ac8332
AE
5274
5275(define-public python-apsw
5276 (package
5277 (name "python-apsw")
917708c2 5278 (version "3.9.2-r1")
a6ac8332
AE
5279 (source
5280 (origin
5281 (method url-fetch)
917708c2 5282 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5283 (sha256
5284 (base32
917708c2 5285 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5286 (build-system python-build-system)
5287 (inputs
f3b98f4f 5288 `(("sqlite" ,sqlite)))
a6ac8332
AE
5289 (arguments
5290 `(#:phases
5291 ;; swap check and install phases
5292 (alist-cons-after
5293 'install 'check
5294 (assoc-ref %standard-phases 'check)
5295 (alist-delete
5296 'check
5297 %standard-phases))))
5298 (home-page "https://github.com/rogerbinns/apsw/")
5299 (synopsis "Another Python SQLite Wrapper")
5300 (description "APSW is a Python wrapper for the SQLite
5301embedded relational database engine. In contrast to other wrappers such as
5302pysqlite it focuses on being a minimal layer over SQLite attempting just to
5303translate the complete SQLite API into Python.")
abde5f37 5304 (license license:zlib)))
a6ac8332
AE
5305
5306(define-public python2-apsw
5307 (package-with-python2 python-apsw))
26b307e2
AE
5308
5309(define-public python-lxml
5310 (package
5311 (name "python-lxml")
d58a3203 5312 (version "3.6.0")
26b307e2
AE
5313 (source
5314 (origin
5315 (method url-fetch)
97bbc480 5316 (uri (pypi-uri "lxml" version))
26b307e2 5317 (sha256
d58a3203
EF
5318 (base32
5319 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5320 (build-system python-build-system)
5321 (inputs
5322 `(("libxml2" ,libxml2)
f3b98f4f 5323 ("libxslt" ,libxslt)))
26b307e2
AE
5324 (home-page "http://lxml.de/")
5325 (synopsis
5326 "Python XML processing library")
5327 (description
5328 "The lxml XML toolkit is a Pythonic binding for the C libraries
5329libxml2 and libxslt.")
3f641af0 5330 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5331
5332(define-public python2-lxml
5333 (package-with-python2 python-lxml))
4ed20663 5334
b32a1e47
CAW
5335;; beautifulsoup4 has a totally different namespace than 3.x,
5336;; and pypi seems to put it under its own name, so I guess we should too
5337(define-public python-beautifulsoup4
5338 (package
5339 (name "python-beautifulsoup4")
67fd4a12 5340 (version "4.5.1")
b32a1e47
CAW
5341 (source
5342 (origin
5343 (method url-fetch)
5344 (uri (pypi-uri "beautifulsoup4" version))
5345 (sha256
5346 (base32
67fd4a12 5347 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5348 (build-system python-build-system)
5f37f0b6
LF
5349 (arguments
5350 `(#:phases
5351 (modify-phases %standard-phases
5352 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5353 ;; must use this conversion script when building with Python 3. The
5354 ;; conversion script also runs the tests.
5355 ;; For more information, see the file 'convert-py3k' in the source
5356 ;; distribution.
5357 (replace 'check
5358 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5359 (home-page
5360 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5361 (synopsis
5362 "Python screen-scraping library")
5363 (description
5364 "Beautiful Soup is a Python library designed for rapidly setting up
5365screen-scraping projects. It offers Pythonic idioms for navigating,
5366searching, and modifying a parse tree, providing a toolkit for
5367dissecting a document and extracting what you need. It automatically
5368converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5369 (license license:expat)))
b32a1e47
CAW
5370
5371(define-public python2-beautifulsoup4
5372 (package
5373 (inherit (package-with-python2
5374 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5375 (arguments `(#:python ,python-2))))
b32a1e47 5376
4dcb135e 5377(define-public python-cssutils
092e86f5 5378 (package
4dcb135e 5379 (name "python-cssutils")
58d1d816 5380 (version "1.0.1")
092e86f5
AE
5381 (source
5382 (origin
5383 (method url-fetch)
58d1d816 5384 (uri (pypi-uri "cssutils" version))
092e86f5 5385 (sha256
58d1d816
EF
5386 (base32
5387 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5388 (build-system python-build-system)
5389 (native-inputs
4dcb135e 5390 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5391 (arguments
4dcb135e 5392 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5393 (home-page "http://cthedot.de/cssutils/")
5394 (synopsis
5395 "CSS Cascading Style Sheets library for Python")
5396 (description
5397 "Cssutils is a Python package for parsing and building CSS
5398Cascading Style Sheets. Currently it provides a DOM only and no rendering
5399options.")
3f641af0 5400 (license license:lgpl3+)))
880ff77c 5401
4dcb135e
EB
5402(define-public python2-cssutils
5403 (package-with-python2 python-cssutils))
5404
880ff77c
AE
5405(define-public python-cssselect
5406 (package
5407 (name "python-cssselect")
d5ccd9ab 5408 (version "0.9.2")
880ff77c
AE
5409 (source
5410 (origin
5411 (method url-fetch)
d5ccd9ab 5412 (uri (pypi-uri "cssselect" version))
880ff77c 5413 (sha256
d5ccd9ab
EF
5414 (base32
5415 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5416 (build-system python-build-system)
880ff77c
AE
5417 (arguments
5418 ;; tests fail with message
5419 ;; AttributeError: 'module' object has no attribute 'tests'
5420 `(#:tests? #f))
5421 (home-page
5422 "https://pythonhosted.org/cssselect/")
5423 (synopsis
5424 "CSS3 selector parser and translator to XPath 1.0")
5425 (description
5426 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5427them to XPath 1.0 expressions. Such expressions can be used in lxml or
5428another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5429 (license license:bsd-3)))
880ff77c
AE
5430
5431(define-public python2-cssselect
5432 (package-with-python2 python-cssselect))
60357f99 5433
03702173 5434(define-public python-openid-cla
5435 (package
5436 (name "python-openid-cla")
5437 (version "1.2")
5438 (source
5439 (origin
5440 (method url-fetch)
5441 (uri (pypi-uri "python-openid-cla" version))
5442 (sha256
5443 (base32
5444 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5445 (build-system python-build-system)
5446 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5447 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5448 (description "@code{openid-cla} is an implementation of the OpenID
5449contributor license agreement extension for python-openid.")
5450 (license license:bsd-3)))
5451
5452(define-public python2-openid-cla
5453 (package-with-python2 python-openid-cla))
5454
a0e41de4 5455(define-public python-openid-teams
5456 (package
5457 (name "python-openid-teams")
5458 (version "1.1")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "python-openid-teams" version))
5463 (sha256
5464 (base32
5465 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5466 (build-system python-build-system)
5467 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5468 (synopsis "Implementation of the OpenID teams extension for python-openid")
5469 (description
5470 "@code{openid-teams} is an implementation of the OpenID
5471teams extension for python-openid.")
5472 (license license:bsd-3)))
5473
5474(define-public python2-openid-teams
5475 (package-with-python2 python-openid-teams))
5476
60357f99
AE
5477(define-public python-netifaces
5478 (package
5479 (name "python-netifaces")
5480 (version "0.10.4")
5481 (source
5482 (origin
5483 (method url-fetch)
5484 (uri (string-append
5485 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5486 version
5487 ".tar.gz"))
5488 (sha256
5489 (base32
5490 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5491 (build-system python-build-system)
60357f99
AE
5492 (home-page
5493 "https://bitbucket.org/al45tair/netifaces")
5494 (synopsis
5495 "Python module for portable network interface information")
5496 (description
5497 "Netifaces is a Python module providing information on network
5498interfaces in an easy and portable manner.")
5499 (license license:expat)))
5500
5501(define-public python2-netifaces
5502 (package-with-python2 python-netifaces))
92cb152b 5503
32f77c04
RW
5504(define-public python-networkx
5505 (package
5506 (name "python-networkx")
a4d9609c 5507 (version "1.11")
32f77c04
RW
5508 (source
5509 (origin
5510 (method url-fetch)
a4d9609c 5511 (uri (pypi-uri "networkx" version))
32f77c04 5512 (sha256
a4d9609c 5513 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5514 (build-system python-build-system)
5515 ;; python-decorator is needed at runtime
5516 (propagated-inputs
5517 `(("python-decorator" ,python-decorator)))
5518 (native-inputs
f3b98f4f 5519 `(("python-nose" ,python-nose)))
32f77c04
RW
5520 (home-page "http://networkx.github.io/")
5521 (synopsis "Python module for creating and manipulating graphs and networks")
5522 (description
5523 "NetworkX is a Python package for the creation, manipulation, and study
5524of the structure, dynamics, and functions of complex networks.")
3f641af0 5525 (license license:bsd-3)))
32f77c04
RW
5526
5527(define-public python2-networkx
5528 (package-with-python2 python-networkx))
5529
92cb152b
RW
5530(define-public snakemake
5531 (package
5532 (name "snakemake")
5533 (version "3.2.1")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (string-append
5538 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5539 version ".tar.gz"))
5540 (sha256
5541 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5542 (build-system python-build-system)
92cb152b
RW
5543 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5544 (synopsis "Python-based execution environment for make-like workflows")
5545 (description
5546 "Snakemake aims to reduce the complexity of creating workflows by
5547providing a clean and modern domain specific specification language (DSL) in
5548Python style, together with a fast and comfortable execution environment.")
5549 (license license:expat)))
a1920bc9 5550
35de1fbd
RW
5551(define-public python-seaborn
5552 (package
5553 (name "python-seaborn")
ccc18762 5554 (version "0.7.1")
35de1fbd
RW
5555 (source
5556 (origin
5557 (method url-fetch)
fc899d4f 5558 (uri (pypi-uri "seaborn" version))
35de1fbd 5559 (sha256
ccc18762 5560 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd
RW
5561 (build-system python-build-system)
5562 (propagated-inputs
5563 `(("python-pandas" ,python-pandas)
5564 ("python-matplotlib" ,python-matplotlib)
5565 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5566 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5567 (synopsis "Statistical data visualization")
5568 (description
5569 "Seaborn is a library for making attractive and informative statistical
5570graphics in Python. It is built on top of matplotlib and tightly integrated
5571with the PyData stack, including support for numpy and pandas data structures
5572and statistical routines from scipy and statsmodels.")
3f641af0 5573 (license license:bsd-3)
fc899d4f 5574 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5575
5576(define-public python2-seaborn
fc899d4f
EF
5577 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5578 (package
5579 (inherit base)
5580 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5581 ,@(package-propagated-inputs base))))))
35de1fbd 5582
90fc547f
RW
5583(define-public python-sympy
5584 (package
5585 (name "python-sympy")
5586 (version "0.7.6")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (string-append
5591 "https://github.com/sympy/sympy/releases/download/sympy-"
5592 version "/sympy-" version ".tar.gz"))
5593 (sha256
5594 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5595 (build-system python-build-system)
90fc547f
RW
5596 (home-page "http://www.sympy.org/")
5597 (synopsis "Python library for symbolic mathematics")
5598 (description
5599 "SymPy is a Python library for symbolic mathematics. It aims to become a
5600full-featured computer algebra system (CAS) while keeping the code as simple
5601as possible in order to be comprehensible and easily extensible.")
3f641af0 5602 (license license:bsd-3)))
90fc547f
RW
5603
5604(define-public python2-sympy
5605 (package-with-python2 python-sympy))
5606
e8c9b010
SR
5607(define-public python-q
5608 (package
5609 (name "python-q")
5610 (version "2.6")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "q" version))
5615 (sha256
5616 (base32
5617 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5618 (build-system python-build-system)
5619 (home-page "https://github.com/zestyping/q")
5620 (synopsis "Quick-and-dirty debugging output for tired programmers")
5621 (description
5622 "q is a Python module for \"print\" style of debugging Python code. It
5623provides convenient short API for print out of values, tracebacks, and
5624falling into the Python interpreter.")
f210e944 5625 (license license:asl2.0)))
e8c9b010
SR
5626
5627(define-public python2-q
f210e944 5628 (package-with-python2 python-q))
e8c9b010 5629
a1920bc9
FB
5630(define-public python-testlib
5631 (package
5632 (name "python-testlib")
5633 (version "0.6.5")
5634 (source
5635 (origin
5636 (method url-fetch)
5637 (uri (string-append
5638 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5639 version ".zip"))
5640 (sha256
5641 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5642 (build-system python-build-system)
a1920bc9 5643 (native-inputs
632735f2 5644 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5645 (synopsis "Python micro test suite harness")
5646 (description "A micro unittest suite harness for Python.")
5647 (home-page "https://github.com/trentm/testlib")
1cb9c006 5648 (license license:expat)))
a1920bc9
FB
5649
5650(define-public python2-testlib
5651 (package-with-python2 python-testlib))
db62afa5
LC
5652
5653(define-public python2-xlib
5654 (package
5655 (name "python2-xlib")
5656 (version "0.14")
5657 (source (origin
5658 (method url-fetch)
de67e922
LF
5659 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5660 "/" version "/"
db62afa5
LC
5661 "python-xlib-" version ".tar.gz"))
5662 (sha256
5663 (base32
5664 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5665 (build-system python-build-system)
5666 (arguments
5667 `(#:python ,python-2 ;Python 2 only
5668 #:tests? #f)) ;no tests
db62afa5
LC
5669 (home-page "http://python-xlib.sourceforge.net/")
5670 (synopsis "Python X11 client library")
5671 (description
5672 "The Python X Library is intended to be a fully functional X client
5673library for Python programs. It is useful to implement low-level X clients.
5674It is written entirely in Python.")
3f641af0 5675 (license license:gpl2+)))
0234ca06
DT
5676
5677(define-public python-singledispatch
5678 (package
5679 (name "python-singledispatch")
5680 (version "3.4.0.3")
5681 (source
5682 (origin
5683 (method url-fetch)
bdb67d84 5684 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5685 (sha256
5686 (base32
5687 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5688 (build-system python-build-system)
5e1c9d24
HG
5689 (native-inputs
5690 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5691 (home-page
5692 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5693 (synopsis "Backport of singledispatch feature from Python 3.4")
5694 (description
5695 "This library brings functools.singledispatch from Python 3.4 to Python
56962.6-3.3.")
5697 (license license:expat)))
5698
5699(define-public python2-singledispatch
5700 (package-with-python2 python-singledispatch))
feaae484 5701
310d218f
RW
5702(define-public python-tornado
5703 (package
5704 (name "python-tornado")
a724924b 5705 (version "4.3")
310d218f
RW
5706 (source
5707 (origin
5708 (method url-fetch)
a724924b 5709 (uri (pypi-uri "tornado" version))
310d218f 5710 (sha256
a724924b 5711 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5712 (build-system python-build-system)
310d218f 5713 (native-inputs
b455439b 5714 `(("python-certifi" ,python-certifi)))
f22efa01 5715 (propagated-inputs
b455439b 5716 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5717 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5718 (synopsis "Python web framework and asynchronous networking library")
5719 (description
5720 "Tornado is a Python web framework and asynchronous networking library,
5721originally developed at FriendFeed. By using non-blocking network I/O,
5722Tornado can scale to tens of thousands of open connections, making it ideal
5723for long polling, WebSockets, and other applications that require a long-lived
5724connection to each user.")
3f641af0 5725 (license license:asl2.0)
b455439b 5726 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5727
5728(define-public python2-tornado
b455439b 5729 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5730 (package (inherit tornado)
f22efa01 5731 (propagated-inputs
310d218f
RW
5732 `(("python2-backport-ssl-match-hostname"
5733 ,python2-backport-ssl-match-hostname)
b455439b 5734 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5735 ,@(package-propagated-inputs tornado))))))
310d218f 5736
6b59fc10
EF
5737;; the python- version can be removed with python-3.5
5738(define-public python-backports-abc
5739 (package
5740 (name "python-backports-abc")
27f9148e 5741 (version "0.5")
6b59fc10
EF
5742 (source
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "backports_abc" version))
5746 (sha256
5747 (base32
27f9148e 5748 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 5749 (build-system python-build-system)
6b59fc10 5750 (home-page "https://github.com/cython/backports_abc")
66e07664 5751 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5752 (description
5753 "Python-backports-abc provides a backport of additions to the
5754'collections.abc' module in Python-3.5.")
3f641af0 5755 (license license:psfl)))
6b59fc10
EF
5756
5757(define-public python2-backports-abc
5758 (package-with-python2 python-backports-abc))
5759
feaae484
SB
5760(define-public python-waf
5761 (package
5762 (name "python-waf")
7dd55dfe 5763 (version "1.9.5")
feaae484
SB
5764 (source (origin
5765 (method url-fetch)
bae67829 5766 (uri (string-append "https://waf.io/"
feaae484
SB
5767 "waf-" version ".tar.bz2"))
5768 (sha256
5769 (base32
7dd55dfe 5770 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5771 (build-system python-build-system)
5772 (arguments
5773 '(#:phases
5774 (modify-phases %standard-phases
5775 (replace 'build
7dd55dfe
EF
5776 (lambda _
5777 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5778 (replace 'check
7dd55dfe
EF
5779 (lambda _
5780 (zero? (system* "python" "waf" "--version"))))
feaae484 5781 (replace 'install
7dd55dfe
EF
5782 (lambda _
5783 (copy-file "waf" %output))))))
5784 (home-page "http://waf.io/")
feaae484
SB
5785 (synopsis "Python-based build system")
5786 (description
5787 "Waf is a Python-based framework for configuring, compiling and installing
5788applications.")
3f641af0 5789 (license license:bsd-3)))
feaae484
SB
5790
5791(define-public python2-waf
5792 (package-with-python2 python-waf))
45203542
RW
5793
5794(define-public python-pyzmq
5795 (package
5796 (name "python-pyzmq")
3655ee76 5797 (version "15.1.0")
45203542
RW
5798 (source
5799 (origin
5800 (method url-fetch)
3655ee76 5801 (uri (pypi-uri "pyzmq" version))
45203542 5802 (sha256
3655ee76 5803 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5804 (build-system python-build-system)
5805 (arguments
5806 `(#:configure-flags
5807 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5808 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5809 ;; --inplace' for 'python setup.py test' to work.
5810 #:tests? #f))
5811 (inputs
5812 `(("zeromq" ,zeromq)))
5813 (native-inputs
5814 `(("pkg-config" ,pkg-config)
f3b98f4f 5815 ("python-nose" ,python-nose)))
45203542
RW
5816 (home-page "http://github.com/zeromq/pyzmq")
5817 (synopsis "Python bindings for 0MQ")
5818 (description
5819 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5820 (license license:bsd-4)))
45203542
RW
5821
5822(define-public python2-pyzmq
5823 (package-with-python2 python-pyzmq))
d889e6c4
CR
5824
5825(define-public python-pep8
5826 (package
5827 (name "python-pep8")
db251311 5828 (version "1.7.0")
d889e6c4
CR
5829 (source
5830 (origin
5831 (method url-fetch)
db251311 5832 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5833 (sha256
5834 (base32
db251311 5835 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5836 (build-system python-build-system)
d889e6c4
CR
5837 (home-page "http://pep8.readthedocs.org/")
5838 (synopsis "Python style guide checker")
5839 (description
5840 "This tools checks Python code against some of the style conventions in
5841PEP 8.")
5842 (license license:expat)))
5843
5844(define-public python2-pep8
5845 (package-with-python2 python-pep8))
e31d7f44
CR
5846
5847(define-public python-pyflakes
5848 (package
5849 (name "python-pyflakes")
2abc3972 5850 (version "1.0.0")
e31d7f44
CR
5851 (source
5852 (origin
5853 (method url-fetch)
2abc3972 5854 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5855 (sha256
5856 (base32
2abc3972 5857 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5858 (build-system python-build-system)
e31d7f44
CR
5859 (home-page
5860 "https://github.com/pyflakes/pyflakes")
5861 (synopsis "Passive checker of Python programs")
5862 (description
5863 "Pyflakes statically checks Python source code for common errors.")
5864 (license license:expat)))
a59e017c 5865
7261d9eb
CR
5866(define-public python2-pyflakes
5867 (package-with-python2 python-pyflakes))
5868
a59e017c
CR
5869(define-public python-mccabe
5870 (package
5871 (name "python-mccabe")
c6ebd40d 5872 (version "0.4.0")
a59e017c
CR
5873 (source
5874 (origin
5875 (method url-fetch)
c6ebd40d 5876 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5877 (sha256
5878 (base32
c6ebd40d 5879 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5880 (build-system python-build-system)
328bb95d 5881 (native-inputs
c6ebd40d 5882 `(("python-pytest" ,python-pytest)
f3b98f4f 5883 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5884 (home-page "https://github.com/flintwork/mccabe")
5885 (synopsis "McCabe checker, plugin for flake8")
5886 (description
5887 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5888complexity of Python source code.")
7362371d 5889 (license license:expat)))
a59e017c
CR
5890
5891(define-public python2-mccabe
5892 (package-with-python2 python-mccabe))
e8df8f47 5893
7477fbb1
CR
5894(define-public python-mccabe-0.2.1
5895 (package (inherit python-mccabe)
5896 (version "0.2.1")
5897 (source
5898 (origin
5899 (method url-fetch)
5900 (uri (pypi-uri "mccabe" version))
5901 (sha256
5902 (base32
f3b98f4f 5903 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5904
5905(define-public python2-mccabe-0.2.1
5906 (package-with-python2 python-mccabe-0.2.1))
5907
e8df8f47
CR
5908;; Flake8 2.4.1 requires an older version of pep8.
5909;; This should be removed ASAP.
5910(define-public python-pep8-1.5.7
5911 (package (inherit python-pep8)
5912 (version "1.5.7")
5913 (source
5914 (origin
5915 (method url-fetch)
5916 (uri (string-append
5917 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5918 version
5919 ".tar.gz"))
5920 (sha256
5921 (base32
5922 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5923
5924(define-public python2-pep8-1.5.7
5925 (package-with-python2 python-pep8-1.5.7))
5926
5927;; Flake8 2.4.1 requires an older version of pyflakes.
5928;; This should be removed ASAP.
5929(define-public python-pyflakes-0.8.1
5930 (package (inherit python-pyflakes)
5931 (version "0.8.1")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (string-append
5936 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5937 version
5938 ".tar.gz"))
5939 (sha256
5940 (base32
5941 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5942
5943(define-public python2-pyflakes-0.8.1
7261d9eb 5944 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5945
5946(define-public python-flake8
5947 (package
5948 (name "python-flake8")
43789136 5949 (version "2.5.4")
e8df8f47
CR
5950 (source
5951 (origin
5952 (method url-fetch)
1b995533 5953 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5954 (sha256
5955 (base32
011271c7
HG
5956 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5957 (modules '((guix build utils)))
5958 (snippet
5959 '(begin
5960 ;; Remove pre-compiled .pyc files from source.
5961 (for-each delete-file-recursively
5962 (find-files "." "__pycache__" #:directories? #t))
5963 (for-each delete-file (find-files "." "\\.pyc$"))
5964 #t))))
e8df8f47 5965 (build-system python-build-system)
482d9591 5966 (propagated-inputs
f3b98f4f 5967 `(("python-pep8" ,python-pep8)
43789136 5968 ("python-pyflakes" ,python-pyflakes)
482d9591 5969 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5970 (native-inputs
5971 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5972 ("python-nose" ,python-nose)))
5973 (home-page "https://gitlab.com/pycqa/flake8")
5974 (synopsis
5975 "The modular source code checker: pep8, pyflakes and co")
5976 (description
5977 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5978 (license license:expat)))
5979
5980(define-public python2-flake8
5981 (package-with-python2 python-flake8))
61b9ac53 5982
abf21efc
CR
5983;; This will only be needed by the python-hacking package and will not be
5984;; necessary once python-hacking > 0.10.2 is released.
5985(define-public python-flake8-2.2.4
5986 (package (inherit python-flake8)
482d9591 5987 (propagated-inputs
f3b98f4f 5988 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5989 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5990 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5991 (native-inputs
482d9591 5992 `(("python-mock" ,python-mock)
abf21efc
CR
5993 ("python-nose" ,python-nose)))
5994 (version "2.2.4")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (pypi-uri "flake8" version))
5999 (sha256
6000 (base32
b9c8ccce
HG
6001 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6002 (modules '((guix build utils)))
6003 (snippet
6004 '(begin
6005 ;; Remove pre-compiled .pyc files from source.
6006 (for-each delete-file-recursively
6007 (find-files "." "__pycache__" #:directories? #t))
6008 (for-each delete-file (find-files "." "\\.pyc$"))
6009 #t))))))
abf21efc
CR
6010
6011(define-public python2-flake8-2.2.4
6012 (package-with-python2 python-flake8-2.2.4))
6013
1f42d824
MFM
6014(define-public python-flake8-polyfill
6015 (package
6016 (name "python-flake8-polyfill")
6017 (version "1.0.1")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "flake8-polyfill" version))
6022 (sha256
6023 (base32
6024 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6025 (build-system python-build-system)
6026 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6027 (synopsis "Polyfill package for Flake8 plugins")
6028 (description
6029 "This package that provides some compatibility helpers for Flake8
6030plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6031 (license license:expat)))
6032
6033(define-public python2-flake8-polyfill
6034 (package-with-python2 python-flake8-polyfill))
6035
61b9ac53
FB
6036(define-public python-mistune
6037 (package
6038 (name "python-mistune")
08b81336 6039 (version "0.7.3")
61b9ac53
FB
6040 (source
6041 (origin
6042 (method url-fetch)
eff8d773 6043 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6044 (sha256
6045 (base32
08b81336 6046 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6047 (build-system python-build-system)
328bb95d 6048 (native-inputs
f3b98f4f 6049 `(("python-nose" ,python-nose)
61b9ac53
FB
6050 ("python-cython" ,python-cython)))
6051 (home-page "https://github.com/lepture/mistune")
6052 (synopsis "Markdown parser in pure Python")
6053 (description "This package provides a fast markdown parser in pure
6054Python.")
3f641af0 6055 (license license:bsd-3)))
61b9ac53
FB
6056
6057(define-public python2-mistune
6058 (package-with-python2 python-mistune))
6d992d07 6059
b9893908
EE
6060(define-public python-markdown
6061 (package
6062 (name "python-markdown")
791ac6a6 6063 (version "2.6.7")
b9893908
EE
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (pypi-uri "Markdown" version))
6068 (sha256
6069 (base32
791ac6a6 6070 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6071 (build-system python-build-system)
6072 (arguments
6073 `(#:phases
6074 (modify-phases %standard-phases
6075 (replace 'check
6076 (lambda _
6077 (zero? (system* "python" "run-tests.py")))))))
6078 (native-inputs
6079 `(("python-nose" ,python-nose)
6080 ("python-pyyaml" ,python-pyyaml)))
6081 (home-page "https://pythonhosted.org/Markdown/")
6082 (synopsis "Python implementation of Markdown")
6083 (description
6084 "This package provides a Python implementation of John Gruber's
6085Markdown. The library features international input, various Markdown
6086extensions, and several HTML output formats. A command line wrapper
6087markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6088 (license license:bsd-3)))
b9893908
EE
6089
6090(define-public python2-markdown
6091 (package-with-python2 python-markdown))
6092
6d992d07
FB
6093(define-public python-ptyprocess
6094 (package
6095 (name "python-ptyprocess")
6096 (version "0.5")
6097 (source
6098 (origin
6099 (method url-fetch)
6100 (uri (string-append
6101 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6102 version ".tar.gz"))
6103 (sha256
6104 (base32
6105 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6106 (build-system python-build-system)
328bb95d 6107 (native-inputs
f3b98f4f 6108 `(("python-nose" ,python-nose)))
6d992d07
FB
6109 (arguments
6110 `(#:phases
6111 (modify-phases %standard-phases
6112 (replace 'check
6113 (lambda _
6114 (zero? (system* "nosetests")))))))
6115 (home-page "https://github.com/pexpect/ptyprocess")
6116 (synopsis "Run a subprocess in a pseudo terminal")
6117 (description
6118 "This package provides a Python library used to launch a subprocess in a
6119pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6120 (license license:isc)))
6d992d07
FB
6121
6122(define-public python2-ptyprocess
6123 (package-with-python2 python-ptyprocess))
4aadb1df 6124
df893a38
MB
6125(define-public python-cram
6126 (package
6127 (name "python-cram")
6128 (version "0.7")
6129 (home-page "https://bitheap.org/cram/")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (list (string-append home-page "cram-"
6133 version ".tar.gz")
6134 (pypi-uri "cram" version)))
6135 (sha256
6136 (base32
6137 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6138 (arguments
6139 '(#:phases
6140 (modify-phases %standard-phases
6141 (add-after 'unpack 'patch-source
6142 (lambda _
6143 (substitute* (find-files "cram" ".*\\.py$")
6144 ;; Replace default shell path.
6145 (("/bin/sh") (which "sh")))
6146 (substitute* (find-files "tests" ".*\\.t$")
6147 (("md5") "md5sum")
6148 (("/bin/bash") (which "bash"))
6149 (("/bin/sh") (which "sh")))
6150 (substitute* "cram/_test.py"
6151 ;; This hack works around a bug triggered by substituting
6152 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6153 ;; "cram -h", which breaks the output at 80 characters. This
6154 ;; causes the line showing the default shell to break into two
6155 ;; lines, but the test expects a single line...
6156 (("env\\['COLUMNS'\\] = '80'")
6157 "env['COLUMNS'] = '160'"))
6158 #t))
6159 (delete 'check)
6160 (add-after 'install 'check
6161 ;; The test phase uses the built library and executable.
6162 ;; It's easier to run it after install since the build
6163 ;; directory contains version-specific PATH.
6164 (lambda* (#:key inputs outputs #:allow-other-keys)
6165 (add-installed-pythonpath inputs outputs)
6166 (setenv "PATH" (string-append (getenv "PATH") ":"
6167 (assoc-ref outputs "out") "/bin"))
6168 (zero? (system* "make" "test")))))))
6169 (build-system python-build-system)
6170 (native-inputs
6171 `(("python-coverage" ,python-coverage)
6172 ("which" ,which)))
6173 (synopsis "Simple testing framework for command line applications")
6174 (description
6175 "Cram is a functional testing framework for command line applications.
6176Cram tests look like snippets of interactive shell sessions. Cram runs each
6177command and compares the command output in the test with the command’s actual
6178output.")
6179 (license license:gpl2+)))
6180
6181(define-public python2-cram
6182 (package-with-python2 python-cram))
6183
4aadb1df
FB
6184(define-public python-terminado
6185 (package
6186 (name "python-terminado")
783fb0a3 6187 (version "0.6")
4aadb1df
FB
6188 (source
6189 (origin
6190 (method url-fetch)
783fb0a3 6191 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6192 (sha256
6193 (base32
783fb0a3 6194 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6195 (build-system python-build-system)
6196 (propagated-inputs
6197 `(("python-tornado" ,python-tornado)
6198 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6199 (native-inputs
6200 `(("python-nose" ,python-nose)))
4aadb1df
FB
6201 (arguments
6202 `(#:phases
6203 (modify-phases %standard-phases
6204 (replace 'check
6205 (lambda _
6206 (zero? (system* "nosetests")))))))
6207 (home-page "https://github.com/takluyver/terminado")
6208 (synopsis "Terminals served to term.js using Tornado websockets")
6209 (description "This package provides a Tornado websocket backend for the
6210term.js Javascript terminal emulator library.")
3f641af0 6211 (license license:bsd-2)
783fb0a3 6212 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6213
6214(define-public python2-terminado
783fb0a3 6215 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6216 (package (inherit terminado)
783fb0a3
EF
6217 (propagated-inputs
6218 `(("python2-backport-ssl-match-hostname"
6219 ,python2-backport-ssl-match-hostname)
00e10c6e 6220 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6221
789de5e2 6222(define-public python-straight-plugin
6223 (package
6224 (name "python-straight-plugin")
6225 (version "1.4.1")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "straight.plugin" version))
6230 (sha256
6231 (base32
6232 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6233 (build-system python-build-system)
6234 (home-page "https://github.com/ironfroggy/straight.plugin")
6235 (synopsis "Simple namespaced plugin facility")
6236 (description "Straight Plugin provides a type of plugin you can create from
6237almost any existing Python modules, and an easy way for outside developers to
6238add functionality and customization to your projects with their own plugins.")
6239 (license license:expat)))
6240
6241(define-public python2-straight-plugin
6242 (package-with-python2 python-straight-plugin))
6243
d582eaac
SB
6244(define-public python-fonttools
6245 (package
6246 (name "python-fonttools")
6247 (version "2.5")
6248 (source (origin
6249 (method url-fetch)
6250 (uri (string-append
6251 "https://pypi.python.org/packages/source/F/FontTools/"
6252 "fonttools-" version ".tar.gz"))
6253 (sha256
6254 (base32
6255 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6256 (build-system python-build-system)
9e8c6a37
HG
6257 (arguments
6258 '(#:test-target "check"
6259 #:phases
6260 (modify-phases %standard-phases
6261 (add-after 'unpack 'patch-setuppy
6262 ;; Remove the undocumented "extra_path" argument, which adds an
6263 ;; intervening directories between site-packages and the package
6264 ;; directory.
6265 (lambda _
6266 (substitute* "setup.py"
6267 (("^[ \t]*extra_path *= *'FontTools',") ""))
6268 #t)))))
d582eaac
SB
6269 (home-page "http://github.com/behdad/fonttools")
6270 (synopsis "Tools to manipulate font files")
6271 (description
6272 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6273supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6274of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6275also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6276from an XML-based format.")
3f641af0
DC
6277 (license (license:non-copyleft
6278 "file://LICENSE.txt"
6279 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6280
6281(define-public python2-fonttools
6282 (package-with-python2 python-fonttools))
75710da6 6283
5faa5ce4
RW
6284(define-public python-ly
6285 (package
6286 (name "python-ly")
5135354f 6287 (version "0.9.4")
5faa5ce4
RW
6288 (source
6289 (origin
6290 (method url-fetch)
5135354f
RW
6291 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6292 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6293 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6294 (sha256
6295 (base32
5135354f 6296 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6297 (build-system python-build-system)
5faa5ce4
RW
6298 (synopsis "Tool and library for manipulating LilyPond files")
6299 (description "This package provides a Python library to parse, manipulate
6300or create documents in LilyPond format. A command line program ly is also
6301provided that can be used to do various manipulations with LilyPond files.")
6302 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6303 (license license:gpl2+)))
7e7b27d9
CR
6304
6305(define-public python-appdirs
6306 (package
6307 (name "python-appdirs")
6308 (version "1.4.0")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (string-append
6313 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6314 version
6315 ".tar.gz"))
6316 (sha256
6317 (base32
6318 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6319 (build-system python-build-system)
7e7b27d9
CR
6320 (home-page "http://github.com/ActiveState/appdirs")
6321 (synopsis
6322 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6323 (description
6324 "This module provides a portable way of finding out where user data
6325should be stored on various operating systems.")
6326 (license license:expat)))
6327
6328(define-public python2-appdirs
6329 (package-with-python2 python-appdirs))
89b2e0b0
LF
6330
6331(define-public python-llfuse
6332 (package
6333 (name "python-llfuse")
e36ace36 6334 (version "1.1.1")
89b2e0b0
LF
6335 (source (origin
6336 (method url-fetch)
6337 (uri (string-append
6338 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6339 "llfuse-" version ".tar.bz2"))
6340 (sha256
6341 (base32
e36ace36 6342 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6343 (build-system python-build-system)
6344 (inputs
6345 `(("fuse" ,fuse)
6346 ("attr" ,attr)))
6347 (native-inputs
f3b98f4f 6348 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6349 (synopsis "Python bindings for FUSE")
6350 (description
6351 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6352 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6353 (license license:lgpl2.0+)
cd0569c4 6354 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6355
6356(define-public python2-llfuse
cd0569c4
LF
6357 (package (inherit (package-with-python2
6358 (strip-python2-variant python-llfuse)))
6359 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6360
6361;; For attic-0.16
6362(define-public python-llfuse-0.41
6363 (package (inherit python-llfuse)
229b3661 6364 (version "0.41.1")
cd0569c4
LF
6365 (source (origin
6366 (method url-fetch)
6367 (uri (string-append
6368 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6369 "llfuse-" version ".tar.bz2"))
6370 (sha256
6371 (base32
229b3661 6372 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6373 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6374 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6375 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6376
6377(define-public python-msgpack
6378 (package
6379 (name "python-msgpack")
aed625bd 6380 (version "0.4.8")
641c9871
LF
6381 (source (origin
6382 (method url-fetch)
ae831df4 6383 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6384 (sha256
6385 (base32
aed625bd 6386 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6387 (build-system python-build-system)
641c9871
LF
6388 (synopsis "MessagePack (de)serializer")
6389 (description "MessagePack is a fast, compact binary serialization format,
6390suitable for similar data to JSON. This package provides CPython bindings for
6391reading and writing MessagePack data.")
6392 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6393 (license license:asl2.0)))
bd74be7b
LF
6394
6395(define-public python2-msgpack
f210e944 6396 (package-with-python2 python-msgpack))
641c9871 6397
6e5e39f4
CR
6398(define-public python-netaddr
6399 (package
6400 (name "python-netaddr")
6401 (version "0.7.18")
6402 (source
6403 (origin
6404 (method url-fetch)
6405 (uri (string-append
6406 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6407 version
6408 ".tar.gz"))
6409 (sha256
6410 (base32
6411 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6412 (build-system python-build-system)
6413 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6414 (home-page "https://github.com/drkjam/netaddr/")
6415 (synopsis "Pythonic manipulation of network addresses")
6416 (description
6417 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6418and MAC network addresses.")
3f641af0 6419 (license license:bsd-3)))
6e5e39f4
CR
6420
6421(define-public python2-netaddr
6422 (package-with-python2 python-netaddr))
8c692a52
CR
6423
6424(define-public python-wrapt
6425 (package
6426 (name "python-wrapt")
6427 (version "1.10.5")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (string-append
6432 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6433 version
6434 ".tar.gz"))
6435 (sha256
6436 (base32
6437 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6438 (build-system python-build-system)
6439 (arguments
6440 ;; Tests are not included in the tarball, they are only available in the
6441 ;; git repository.
6442 `(#:tests? #f))
8c692a52
CR
6443 (home-page "https://github.com/GrahamDumpleton/wrapt")
6444 (synopsis "Module for decorators, wrappers and monkey patching")
6445 (description
6446 "The aim of the wrapt module is to provide a transparent object proxy for
6447 Python, which can be used as the basis for the construction of function
6448 wrappers and decorator functions.")
3f641af0 6449 (license license:bsd-2)))
8c692a52
CR
6450
6451(define-public python2-wrapt
6452 (package-with-python2 python-wrapt))
b85c85be
CR
6453
6454(define-public python-iso8601
6455 (package
6456 (name "python-iso8601")
fe84bc9a 6457 (version "0.1.11")
b85c85be
CR
6458 (source
6459 (origin
6460 (method url-fetch)
fe84bc9a 6461 (uri (pypi-uri "iso8601" version))
b85c85be 6462 (sha256
fe84bc9a
EF
6463 (base32
6464 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6465 (build-system python-build-system)
b85c85be
CR
6466 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6467 (synopsis "Module to parse ISO 8601 dates")
6468 (description
6469 "This module parses the most common forms of ISO 8601 date strings (e.g.
6470@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6471 (license license:expat)))
6472
6473(define-public python2-iso8601
6474 (package-with-python2 python-iso8601))
5e412b63
CR
6475
6476(define-public python-monotonic
6477 (package
6478 (name "python-monotonic")
6479 (version "0.3")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri (string-append
6484 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6485 version
6486 ".tar.gz"))
6487 (sha256
6488 (base32
6489 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6490 (build-system python-build-system)
5e412b63
CR
6491 (home-page "https://github.com/atdt/monotonic")
6492 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6493 (description
6494 "This module provides a monotonic() function which returns the value (in
6495fractional seconds) of a clock which never goes backwards.")
3f641af0 6496 (license license:asl2.0)))
5e412b63
CR
6497
6498(define-public python2-monotonic
6499 (package-with-python2 python-monotonic))
de34afac
CR
6500
6501(define-public python-webob
6502 (package
6503 (name "python-webob")
b8834c21 6504 (version "1.5.1")
de34afac
CR
6505 (source
6506 (origin
6507 (method url-fetch)
b8834c21 6508 (uri (pypi-uri "WebOb" version))
de34afac
CR
6509 (sha256
6510 (base32
b8834c21 6511 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6512 (build-system python-build-system)
328bb95d 6513 (native-inputs
f3b98f4f 6514 `(("python-nose" ,python-nose)))
de34afac
CR
6515 (home-page "http://webob.org/")
6516 (synopsis "WSGI request and response object")
6517 (description
6518 "WebOb provides wrappers around the WSGI request environment, and an
6519object to help create WSGI responses.")
6520 (license license:expat)))
6521
6522(define-public python2-webob
6523 (package-with-python2 python-webob))
350ba0a3 6524
02a8a187
BW
6525(define-public python-xlrd
6526 (package
6527 (name "python-xlrd")
c2ad4d70 6528 (version "1.0.0")
02a8a187
BW
6529 (source (origin
6530 (method url-fetch)
e775f48e 6531 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6532 (sha256
6533 (base32
c2ad4d70 6534 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6535 (build-system python-build-system)
6536 (arguments
6537 `(#:phases
6538 (modify-phases %standard-phases
c2ad4d70 6539 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6540 ;; run tests instead for now.
6541 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6542 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6543 (home-page "http://www.python-excel.org/")
6544 (synopsis "Library for extracting data from Excel files")
6545 (description "This packages provides a library to extract data from
c598e35c 6546spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6547@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6548Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6549 (license license:bsd-3)))
02a8a187
BW
6550
6551(define-public python2-xlrd
6552 (package-with-python2 python-xlrd))
6553
350ba0a3
CR
6554(define-public python-prettytable
6555 (package
6556 (name "python-prettytable")
6557 (version "0.7.2")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (string-append
6562 "https://pypi.python.org/packages/source/P/PrettyTable/"
6563 "prettytable-" version ".tar.bz2"))
6564 (sha256
6565 (base32
6566 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6567 (build-system python-build-system)
350ba0a3
CR
6568 (home-page "http://code.google.com/p/prettytable/")
6569 (synopsis "Display tabular data in an ASCII table format")
6570 (description
6571 "A library designed to represent tabular data in visually appealing ASCII
6572tables. PrettyTable allows for selection of which columns are to be printed,
6573independent alignment of columns (left or right justified or centred) and
6574printing of sub-tables by specifying a row range.")
3f641af0 6575 (license license:bsd-3)))
350ba0a3
CR
6576
6577(define-public python2-prettytable
6578 (package-with-python2 python-prettytable))
7a8ac75a 6579
9f8ee3fe
RW
6580(define-public python-tables
6581 (package
6582 (name "python-tables")
6583 (version "3.2.2")
6584 (source
6585 (origin
6586 (method url-fetch)
6587 (uri (pypi-uri "tables" version))
6588 (sha256
6589 (base32
bac23672
HG
6590 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6591 (modules '((guix build utils)))
6592 (snippet
6593 '(begin
6594 ;; Remove pre-compiled .pyc files from source.
6595 (for-each delete-file-recursively
6596 (find-files "." "__pycache__" #:directories? #t))
6597 (for-each delete-file (find-files "." "\\.pyc$"))
6598 #t))))
9f8ee3fe
RW
6599 (build-system python-build-system)
6600 (arguments
6601 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6602 ;; or "check", so we must override the build and check phases.
6603 #:phases
6604 (modify-phases %standard-phases
6605 (add-after 'unpack 'use-gcc
6606 (lambda _
6607 (substitute* "setup.py"
6608 (("compiler = new_compiler\\(\\)" line)
6609 (string-append line
6610 "\ncompiler.set_executables(compiler='gcc',"
6611 "compiler_so='gcc',"
6612 "linker_exe='gcc',"
6613 "linker_so='gcc -shared')")))
6614 #t))
6615 (replace 'build
6616 (lambda* (#:key inputs #:allow-other-keys)
6617 (zero? (system* "python" "setup.py" "build"
6618 (string-append "--hdf5="
6619 (assoc-ref inputs "hdf5"))))))
6620 (replace 'check
6621 (lambda* (#:key inputs #:allow-other-keys)
6622 (zero? (system* "python" "setup.py" "check"
6623 (string-append "--hdf5="
6624 (assoc-ref inputs "hdf5")))))))))
6625 (propagated-inputs
6626 `(("python-numexpr" ,python-numexpr)
6627 ("python-numpy" ,python-numpy)))
6628 (native-inputs
f3b98f4f 6629 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6630 ("pkg-config" ,pkg-config)))
6631 (inputs
6632 `(("hdf5" ,hdf5)
6633 ("bzip2" ,bzip2)
6634 ("zlib" ,zlib)))
6635 (home-page "http://www.pytables.org/")
6636 (synopsis "Hierarchical datasets for Python")
6637 (description "PyTables is a package for managing hierarchical datasets and
6638designed to efficently cope with extremely large amounts of data.")
3f641af0 6639 (license license:bsd-3)))
9f8ee3fe
RW
6640
6641(define-public python2-tables
6642 (package-with-python2 python-tables))
6643
7a8ac75a
RW
6644(define-public python-pyasn1
6645 (package
6646 (name "python-pyasn1")
caa0edb3 6647 (version "0.1.9")
7a8ac75a
RW
6648 (source
6649 (origin
6650 (method url-fetch)
caa0edb3 6651 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6652 (sha256
6653 (base32
caa0edb3 6654 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6655 (build-system python-build-system)
6656 (home-page "http://pyasn1.sourceforge.net/")
6657 (synopsis "ASN.1 types and codecs")
6658 (description
6659 "This is an implementation of ASN.1 types and codecs in Python. It is
6660suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6661 (license license:bsd-2)))
7a8ac75a
RW
6662
6663(define-public python2-pyasn1
6664 (package-with-python2 python-pyasn1))
9a49a535 6665
5988c299
EF
6666(define-public python-pyasn1-modules
6667 (package
6668 (name "python-pyasn1-modules")
6669 (version "0.0.8")
6670 (source
6671 (origin
6672 (method url-fetch)
6673 (uri (pypi-uri "pyasn1-modules" version))
6674 (sha256
6675 (base32
6676 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6677 (build-system python-build-system)
5988c299
EF
6678 (propagated-inputs
6679 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 6680 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
6681 (synopsis "ASN.1 codec implementations")
6682 (description
6683 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6684implementations of ASN.1-based codecs and protocols.")
3f641af0 6685 (license license:bsd-3)))
5988c299
EF
6686
6687(define-public python2-pyasn1-modules
6688 (package-with-python2 python-pyasn1-modules))
6689
520af157 6690(define-public python-ipaddress
9a49a535 6691 (package
520af157
DC
6692 (name "python-ipaddress")
6693 (version "1.0.16")
6694 (source (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "ipaddress" version))
6697 (sha256
6698 (base32
6699 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6700 (build-system python-build-system)
9a49a535
RW
6701 (home-page "https://github.com/phihag/ipaddress")
6702 (synopsis "IP address manipulation library")
6703 (description
520af157
DC
6704 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6705 in Python. This library is used to create, poke at, and manipulate IPv4 and
6706 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6707 module to older versions of Python.")
f210e944 6708 (license license:psfl)))
520af157
DC
6709
6710(define-public python2-ipaddress
f210e944 6711 (package-with-python2 python-ipaddress))
3f00e078 6712
4a238186
HG
6713(define-public python2-ipaddr
6714 (package
6715 (name "python2-ipaddr")
6716 (version "2.1.11")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "ipaddr" version))
6721 (sha256
6722 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6723 (build-system python-build-system)
6724 (arguments
6725 `(#:python ,python-2 ;version 2 only
6726 #:phases
6727 (modify-phases %standard-phases
6728 (replace 'check
6729 (lambda* _
6730 (zero? (system* "python" "ipaddr_test.py")))))))
6731 (home-page "https://github.com/google/ipaddr-py")
6732 (synopsis "IP address manipulation library")
6733 (description
6734 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6735IPv6 addresses and networks.
6736
6737For new implementations you may prefer to use the standard module
6738@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6739versions of Python.")
3f641af0 6740 (license license:asl2.0)))
4a238186 6741
3f00e078
RW
6742(define-public python-idna
6743 (package
6744 (name "python-idna")
6745 (version "2.0")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (string-append "https://pypi.python.org/packages/source/i/"
6750 "idna/idna-" version ".tar.gz"))
6751 (sha256
6752 (base32
6753 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6754 (build-system python-build-system)
3f00e078
RW
6755 (home-page "https://github.com/kjd/idna")
6756 (synopsis "Internationalized domain names in applications")
6757 (description
6758 "This is a library to support the Internationalised Domain Names in
6759Applications (IDNA) protocol as specified in RFC 5891. This version of the
6760protocol is often referred to as “IDNA2008” and can produce different results
6761from the earlier standard from 2003. The library is also intended to act as a
6762suitable drop-in replacement for the “encodings.idna” module that comes with
6763the Python standard library but currently only supports the older 2003
6764specification.")
3f641af0 6765 (license license:bsd-4)))
3f00e078
RW
6766
6767(define-public python2-idna
6768 (package-with-python2 python-idna))
36ebf972
RW
6769
6770(define-public python-pretend
6771 (package
6772 (name "python-pretend")
6773 (version "1.0.8")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (string-append "https://pypi.python.org/packages/source/p/"
6778 "pretend/pretend-" version ".tar.gz"))
6779 (sha256
6780 (base32
6781 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6782 (build-system python-build-system)
36ebf972
RW
6783 (home-page "https://github.com/alex/pretend")
6784 (synopsis "Library for stubbing in Python")
6785 (description
6786 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6787technique for writing tests. You may hear the term mixed up with mocks,
6788fakes, or doubles. Basically, a stub is an object that returns pre-canned
6789responses, rather than doing any computation.")
3f641af0 6790 (license license:bsd-3)))
36ebf972
RW
6791
6792(define-public python2-pretend
6793 (package-with-python2 python-pretend))
aa759a51
RW
6794
6795(define-public python-cryptography-vectors
6796 (package
6797 (name "python-cryptography-vectors")
27fab2bf 6798 (version "1.7.1")
aa759a51
RW
6799 (source
6800 (origin
6801 (method url-fetch)
9c509ca9 6802 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6803 (sha256
6804 (base32
27fab2bf 6805 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 6806 (build-system python-build-system)
aa759a51 6807 (home-page "https://github.com/pyca/cryptography")
66e07664 6808 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6809 (description
6810 "This package contains test vectors for the cryptography package.")
6811 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6812 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6813
6814(define-public python2-cryptography-vectors
6815 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6816
6817(define-public python-cryptography
6818 (package
6819 (name "python-cryptography")
27fab2bf 6820 (version "1.7.1")
88b47cb0
RW
6821 (source
6822 (origin
6823 (method url-fetch)
9c509ca9 6824 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6825 (sha256
6826 (base32
27fab2bf 6827 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
6828 (build-system python-build-system)
6829 (inputs
6830 `(("openssl" ,openssl)))
6831 (propagated-inputs
6832 `(("python-cffi" ,python-cffi)
6833 ("python-six" ,python-six)
6834 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6835 ("python-idna" ,python-idna)
6836 ("python-iso8601" ,python-iso8601)))
6837 (native-inputs
6838 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6839 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6840 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6841 ("python-pyasn1" ,python-pyasn1)
6842 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6843 ("python-pytz" ,python-pytz)
6844 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6845 (home-page "https://github.com/pyca/cryptography")
6846 (synopsis "Cryptographic recipes and primitives for Python")
6847 (description
6848 "cryptography is a package which provides cryptographic recipes and
6849primitives to Python developers. It aims to be the “cryptographic standard
6850library” for Python. The package includes both high level recipes, and low
6851level interfaces to common cryptographic algorithms such as symmetric ciphers,
6852message digests and key derivation functions.")
6853 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6854 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6855 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6856
6857(define-public python2-cryptography
519e2f4f
LF
6858 (let ((crypto (package-with-python2
6859 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6860 (package (inherit crypto)
6861 (propagated-inputs
6862 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6863 ("python2-backport-ssl-match-hostname"
6864 ,python2-backport-ssl-match-hostname)
68f1cdec 6865 ("python2-enum34" ,python2-enum34)
88b47cb0 6866 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6867
6868(define-public python-pyopenssl
6869 (package
6870 (name "python-pyopenssl")
61684de2 6871 (version "16.2.0")
5af999b8
RW
6872 (source
6873 (origin
6874 (method url-fetch)
eb68d268 6875 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6876 (sha256
6877 (base32
61684de2 6878 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6879 (build-system python-build-system)
5af999b8
RW
6880 (propagated-inputs
6881 `(("python-cryptography" ,python-cryptography)
6882 ("python-six" ,python-six)))
6883 (inputs
6884 `(("openssl" ,openssl)))
5af999b8
RW
6885 (home-page "https://github.com/pyca/pyopenssl")
6886 (synopsis "Python wrapper module around the OpenSSL library")
6887 (description
6888 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6889library.")
3f641af0 6890 (license license:asl2.0)))
5af999b8
RW
6891
6892(define-public python2-pyopenssl
519e2f4f 6893 (package-with-python2 python-pyopenssl))
643725a1
CR
6894
6895(define-public python-pip
6896 (package
6897 (name "python-pip")
392c26b0 6898 (version "9.0.1")
643725a1
CR
6899 (source
6900 (origin
6901 (method url-fetch)
6fb54e3b 6902 (uri (pypi-uri "pip" version))
643725a1
CR
6903 (sha256
6904 (base32
392c26b0 6905 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 6906 (build-system python-build-system)
392c26b0
MC
6907 (arguments
6908 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 6909 (home-page "https://pip.pypa.io/")
392c26b0 6910 (synopsis "Package manager for Python software")
643725a1 6911 (description
392c26b0 6912 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
6913Python Package Index (PyPI).")
6914 (license license:expat)))
6915
6916(define-public python2-pip
6917 (package-with-python2 python-pip))
d8c4998f
LC
6918
6919(define-public python-tlsh
6920 (package
6921 (name "python-tlsh")
99b00dc7 6922 (version "3.4.4")
d8c4998f
LC
6923 (home-page "https://github.com/trendmicro/tlsh")
6924 (source (origin
99b00dc7
EF
6925 (method url-fetch)
6926 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6927 version ".tar.gz"))
d8c4998f
LC
6928 (sha256
6929 (base32
99b00dc7
EF
6930 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6931 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6932 (build-system cmake-build-system)
6933 (arguments
6934 '(#:out-of-source? #f
6935 #:phases (modify-phases %standard-phases
6936 (replace
6937 'install
6938 (lambda* (#:key outputs #:allow-other-keys)
6939 ;; Build and install the Python bindings. The underlying
6940 ;; C++ library is apparently not meant to be installed.
6941 (let ((out (assoc-ref outputs "out")))
6942 (with-directory-excursion "py_ext"
6943 (and (system* "python" "setup.py" "build")
6944 (system* "python" "setup.py" "install"
6945 (string-append "--prefix=" out))))))))))
6946 (inputs `(("python" ,python-wrapper))) ;for the bindings
6947 (synopsis "Fuzzy matching library for Python")
6948 (description
6949 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6950Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6951value which can be used for similarity comparisons. Similar objects have
6952similar hash values, which allows for the detection of similar objects by
6953comparing their hash values. The byte stream should have a sufficient amount
6954of complexity; for example, a byte stream of identical bytes will not generate
6955a hash value.")
3f641af0 6956 (license license:asl2.0)))
d8c4998f
LC
6957
6958(define-public python2-tlsh
6959 (package
6960 (inherit python-tlsh)
6961 (name "python2-tlsh")
6962 (inputs `(("python" ,python-2)))))
d96034ed 6963
67f66812
BW
6964(define-public python-termcolor
6965 (package
6966 (name "python-termcolor")
6967 (version "1.1.0")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "python-termcolor" version))
6972 (sha256
6973 (base32
6974 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6975 (build-system python-build-system)
6976 (arguments
6977 ;; There are no tests.
6978 `(#:tests? #f))
6979 (home-page "http://pypi.python.org/pypi/termcolor")
6980 (synopsis "ANSII Color formatting for terminal output")
6981 (description
6982 "This package provides ANSII Color formatting for output in terminals.")
6983 (license license:expat)))
6984
6985(define-public python2-termcolor
6986 (package-with-python2 python-termcolor))
6987
d96034ed
LC
6988(define-public python-libarchive-c
6989 (package
6990 (name "python-libarchive-c")
03fd001c 6991 (version "2.2")
d96034ed
LC
6992 (source (origin
6993 (method url-fetch)
03fd001c 6994 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6995 (sha256
6996 (base32
03fd001c 6997 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6998 (build-system python-build-system)
6999 (arguments
7000 '(#:phases (modify-phases %standard-phases
7001 (add-before
7002 'build 'reference-libarchive
7003 (lambda* (#:key inputs #:allow-other-keys)
7004 ;; Retain the absolute file name of libarchive.so.
7005 (let ((libarchive (assoc-ref inputs "libarchive")))
7006 (substitute* "libarchive/ffi.py"
7007 (("find_library\\('archive'\\)")
7008 (string-append "'" libarchive
b41a05ce 7009 "/lib/libarchive.so'")))))))))
d96034ed 7010 (inputs
f3b98f4f 7011 `(("libarchive" ,libarchive)))
d96034ed
LC
7012 (home-page "https://github.com/Changaco/python-libarchive-c")
7013 (synopsis "Python interface to libarchive")
7014 (description
7015 "This package provides Python bindings to libarchive, a C library to
7016access possibly compressed archives in many different formats. It uses
7017Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7018 (license license:lgpl2.0+)))
d96034ed
LC
7019
7020(define-public python2-libarchive-c
7021 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7022
7023(define-public python-file
7024 (package
7025 (inherit file)
7026 (name "python-file")
7ffa5d4a
LF
7027 (source (origin
7028 (inherit (package-source file))
7029 ;; This patch should not be applied to python2-file.
7030 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7031 (build-system python-build-system)
7032 (arguments
7033 '(#:tests? #f ;no tests
00bf74be 7034 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7035 #:phases (modify-phases %standard-phases
7036 (add-before 'build 'change-directory
7037 (lambda _
7038 (chdir "python")
7039 #t))
7040 (add-before 'build 'set-library-file-name
7041 (lambda* (#:key inputs #:allow-other-keys)
7042 (let ((file (assoc-ref inputs "file")))
7043 (substitute* "magic.py"
7044 (("find_library\\('magic'\\)")
7045 (string-append "'" file "/lib/libmagic.so'")))
7046 #t))))))
7047 (inputs `(("file" ,file)))
7048 (self-native-input? #f)
daeeea71
CM
7049 (synopsis "Python bindings to the libmagic file type guesser. Note that
7050this module and the python-magic module both provide a \"magic.py\" file;
7051these two modules, which are different and were developed separately, both
f210e944 7052serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7053
7054(define-public python2-file
f210e944 7055 (package-with-python2 python-file))
85d4aeac
LC
7056
7057(define-public python-debian
7058 (package
7059 (name "python-debian")
02d7f337 7060 (version "0.1.28")
85d4aeac
LC
7061 (source
7062 (origin
7063 (method url-fetch)
5e217a8b 7064 (uri (pypi-uri name version))
85d4aeac
LC
7065 (sha256
7066 (base32
02d7f337 7067 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7068 (build-system python-build-system)
f22efa01 7069 (propagated-inputs
85d4aeac 7070 `(("python-six" ,python-six)))
85d4aeac
LC
7071 (home-page "http://packages.debian.org/sid/python-debian")
7072 (synopsis "Debian package related modules")
7073 (description
5c7bdc9a
LC
7074 ;; XXX: Use @enumerate instead of @itemize to work around
7075 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7076 "This package provides Python modules that abstract many formats of
7077Debian-related files, such as:
7078
5c7bdc9a 7079@enumerate
85d4aeac
LC
7080@item Debtags information;
7081@item @file{debian/changelog} files;
7082@item packages files, pdiffs;
7083@item control files of single or multiple RFC822-style paragraphs---e.g.
7084 @file{debian/control}, @file{.changes}, @file{.dsc};
7085@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7086 contained files and meta-information.
5c7bdc9a 7087@end enumerate\n")
85d4aeac
LC
7088
7089 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7090 (license license:gpl3+)))
85d4aeac
LC
7091
7092(define-public python2-debian
7093 (package-with-python2 python-debian))
816a6538 7094
2d321bb2
RW
7095(define-public python-nbformat
7096 (package
7097 (name "python-nbformat")
7098 (version "4.1.0")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "nbformat" version))
7103 (sha256
7104 (base32
7105 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7106 (build-system python-build-system)
7107 (arguments `(#:tests? #f)) ; no test target
7108 (propagated-inputs
7109 `(("python-ipython-genutils" ,python-ipython-genutils)
7110 ("python-jsonschema" ,python-jsonschema)
7111 ("python-jupyter-core" ,python-jupyter-core)
7112 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7113 (home-page "http://jupyter.org")
7114 (synopsis "Jupyter Notebook format")
7115 (description "This package provides the reference implementation of the
7116Jupyter Notebook format and Python APIs for working with notebooks.")
7117 (license license:bsd-3)))
7118
7119(define-public python2-nbformat
7120 (package-with-python2 python-nbformat))
7121
55436048
RW
7122(define-public python-bleach
7123 (package
7124 (name "python-bleach")
7125 (version "1.4.3")
7126 (source
7127 (origin
7128 (method url-fetch)
7129 (uri (pypi-uri "bleach" version))
7130 (sha256
7131 (base32
7132 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7133 (build-system python-build-system)
7134 (propagated-inputs
7135 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7136 ("python-six" ,python-six)))
7137 (native-inputs
7138 `(("python-nose" ,python-nose)))
7139 (home-page "http://github.com/jsocol/bleach")
7140 (synopsis "Whitelist-based HTML-sanitizing tool")
7141 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7142 (license license:asl2.0)))
7143
7144(define-public python2-bleach
7145 (package-with-python2 python-bleach))
7146
60590a3a
RW
7147(define-public python-entrypoints
7148 (package
7149 (name "python-entrypoints")
7150 (version "0.2.2")
7151 (source
7152 (origin
7153 (method url-fetch)
7154 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7155 version ".tar.gz"))
7156 (file-name (string-append name "-" version ".tar.gz"))
7157 (sha256
7158 (base32
7159 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7160 (build-system python-build-system)
7161 ;; The package does not come with a setup.py file, so we have to generate
7162 ;; one ourselves.
7163 (arguments
7164 `(#:tests? #f
7165 #:phases
7166 (modify-phases %standard-phases
7167 (add-after 'unpack 'create-setup.py
7168 (lambda _
7169 (call-with-output-file "setup.py"
7170 (lambda (port)
7171 (format port "\
7172from setuptools import setup
7173setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7174" ,version))))))))
7175 (home-page "https://github.com/takluyver/entrypoints")
7176 (synopsis "Discover and load entry points from installed Python packages")
7177 (description "Entry points are a way for Python packages to advertise
7178objects with some common interface. The most common examples are
7179@code{console_scripts} entry points, which define shell commands by
7180identifying a Python function to run. The @code{entrypoints} module contains
7181functions to find and load entry points.")
7182 (license license:expat)))
7183
7184(define-public python2-entrypoints
7185 (package-with-python2 python-entrypoints))
7186
c60898a8
RW
7187(define-public python-nbconvert
7188 (package
7189 (name "python-nbconvert")
7190 (version "5.0.0b1")
7191 (source
7192 (origin
7193 (method url-fetch)
7194 (uri (pypi-uri "nbconvert" version))
7195 (sha256
7196 (base32
7197 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7198 (build-system python-build-system)
7199 ;; The "bdist_egg" target is disabled by default, causing the installation
7200 ;; to fail.
7201 (arguments `(#:configure-flags (list "bdist_egg")))
7202 (propagated-inputs
7203 `(("python-bleach" ,python-bleach)
7204 ("python-entrypoints" ,python-entrypoints)
7205 ("python-jinja2" ,python-jinja2)
7206 ("python-jupyter-core" ,python-jupyter-core)
7207 ("python-mistune" ,python-mistune)
7208 ("python-nbformat" ,python-nbformat)
7209 ("python-pygments" ,python-pygments)
c60898a8
RW
7210 ("python-traitlets" ,python-traitlets)))
7211 (home-page "http://jupyter.org")
7212 (synopsis "Converting Jupyter Notebooks")
7213 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7214notebooks to various other formats via Jinja templates. It allows you to
7215convert an @code{.ipynb} notebook file into various static formats including:
7216
7217@enumerate
7218@item HTML
7219@item LaTeX
7220@item PDF
7221@item Reveal JS
7222@item Markdown (md)
7223@item ReStructured Text (rst)
7224@item executable script
7225@end enumerate\n")
7226 (license license:bsd-3)))
7227
7228(define-public python2-nbconvert
7229 (package-with-python2 python-nbconvert))
7230
a0d62280
RW
7231(define-public python-notebook
7232 (package
7233 (name "python-notebook")
7234 (version "4.2.3")
7235 (source (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "notebook" version))
7238 (sha256
7239 (base32
7240 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7241 (build-system python-build-system)
7242 (arguments
7243 `(#:phases
7244 (modify-phases %standard-phases
7245 (replace 'check
7246 (lambda _
7247 ;; HOME must be set for tests
7248 (setenv "HOME" "/tmp")
7249 (zero? (system* "nosetests")))))))
7250 (propagated-inputs
7251 `(("python-jupyter-core" ,python-jupyter-core)
7252 ("python-nbformat" ,python-nbformat)
7253 ("python-nbconvert" ,python-nbconvert)
7254 ("python-ipython" ,python-ipython)))
7255 (native-inputs
7256 `(("python-nose" ,python-nose)
7257 ("python-sphinx" ,python-sphinx)
7258 ("python-requests" ,python-requests)))
7259 (home-page "http://jupyter.org/")
7260 (synopsis "Web-based notebook environment for interactive computing")
7261 (description
7262 "The Jupyter HTML notebook is a web-based notebook environment for
7263interactive computing.")
3a735ecf 7264 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7265 (license license:bsd-3)))
7266
7267(define-public python2-notebook
3a735ecf
HG
7268 (let ((base (package-with-python2
7269 (strip-python2-variant python-notebook))))
7270 (package (inherit base)
7271 (native-inputs
7272 `(("python2-mock" ,python2-mock)
7273 ,@(package-native-inputs base)))
7274 (arguments
7275 (substitute-keyword-arguments (package-arguments base)
7276 ((#:phases phases)
7277 `(modify-phases ,phases
7278 (add-before 'check 'disable-test-case
7279 ;; The test requires network access to localhost. Curiously it
7280 ;; fails with Python 2 only. Simply make the test-case return
7281 ;; immediately.
7282 (lambda _
7283 (substitute*
7284 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7285 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7286
d55724ed
RW
7287(define-public python-widgetsnbextension
7288 (package
7289 (name "python-widgetsnbextension")
7290 (version "1.2.6")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "widgetsnbextension" version))
7295 (sha256
7296 (base32
7297 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7298 (build-system python-build-system)
7299 (propagated-inputs
7300 `(("python-notebook" ,python-notebook)))
7301 (native-inputs
f3b98f4f 7302 `(("python-nose" ,python-nose)))
d55724ed
RW
7303 (home-page "http://ipython.org")
7304 (synopsis "IPython HTML widgets for Jupyter")
7305 (description "This package provides interactive HTML widgets for Jupyter
7306notebooks.")
7307 (license license:bsd-3)))
7308
7309(define-public python2-widgetsnbextension
7310 (package-with-python2 python-widgetsnbextension))
7311
4fe2e344
RW
7312(define-public python-ipywidgets
7313 (package
7314 (name "python-ipywidgets")
7315 (version "5.2.2")
7316 (source
7317 (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "ipywidgets" version))
7320 (sha256
7321 (base32
7322 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7323 (build-system python-build-system)
7324 ;; FIXME: it's not clear how to run the tests.
7325 (arguments `(#:tests? #f))
7326 (propagated-inputs
7327 `(("python-ipykernel" ,python-ipykernel)
7328 ("python-ipython" ,python-ipython)
4fe2e344
RW
7329 ("python-traitlets" ,python-traitlets)
7330 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7331 (home-page "http://ipython.org")
7332 (synopsis "IPython HTML widgets for Jupyter")
7333 (description "Ipywidgets are interactive HTML widgets for Jupyter
7334notebooks and the IPython kernel. Notebooks come alive when interactive
7335widgets are used. Users gain control of their data and can visualize changes
7336in the data.")
7337 (license license:bsd-3)))
7338
7339(define-public python2-ipywidgets
7340 (package-with-python2 python-ipywidgets))
7341
8ceebf8f
RW
7342(define-public python-jupyter-console
7343 (package
7344 (name "python-jupyter-console")
7345 (version "5.0.0")
7346 (source
7347 (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "jupyter_console" version))
7350 (sha256
7351 (base32
7352 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7353 (build-system python-build-system)
7354 ;; FIXME: it's not clear how to run the tests.
7355 (arguments `(#:tests? #f))
7356 (propagated-inputs
7357 `(("python-ipykernel" ,python-ipykernel)
7358 ("python-ipython" ,python-ipython)
7359 ("python-jupyter-client" ,python-jupyter-client)
7360 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7361 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7362 (home-page "https://jupyter.org")
7363 (synopsis "Jupyter terminal console")
7364 (description "This package provides a terminal-based console frontend for
7365Jupyter kernels. It also allows for console-based interaction with non-Python
7366Jupyter kernels such as IJulia and IRKernel.")
7367 (license license:bsd-3)))
7368
7369(define-public python2-jupyter-console
7370 (package-with-python2 python-jupyter-console))
7371
c27ae827
RW
7372(define-public jupyter
7373 (package
7374 (name "jupyter")
7375 (version "1.0.0")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "jupyter" version))
7380 (sha256
7381 (base32
7382 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7383 (build-system python-build-system)
7384 ;; FIXME: it's not clear how to run the tests.
7385 (arguments `(#:tests? #f))
7386 (propagated-inputs
7387 `(("python-ipykernel" ,python-ipykernel)
7388 ("python-ipywidgets" ,python-ipywidgets)
7389 ("python-jupyter-console" ,python-jupyter-console)
7390 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7391 ("python-notebook" ,python-notebook)))
c27ae827
RW
7392 (home-page "http://jupyter.org")
7393 (synopsis "Web application for interactive documents")
7394 (description
7395 "The Jupyter Notebook is a web application that allows you to create and
7396share documents that contain live code, equations, visualizations and
7397explanatory text. Uses include: data cleaning and transformation, numerical
7398simulation, statistical modeling, machine learning and much more.")
7399 (license license:bsd-3)))
7400
816a6538
LC
7401(define-public python-chardet
7402 (package
7403 (name "python-chardet")
7404 (version "2.3.0")
7405 (source
7406 (origin
7407 (method url-fetch)
7408 (uri (string-append
7409 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7410 version
7411 ".tar.gz"))
7412 (sha256
7413 (base32
7414 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7415 (build-system python-build-system)
816a6538
LC
7416 (home-page "https://github.com/chardet/chardet")
7417 (synopsis "Universal encoding detector for Python 2 and 3")
7418 (description
7419 "This package provides @code{chardet}, a Python module that can
7420automatically detect a wide range of file encodings.")
3f641af0 7421 (license license:lgpl2.1+)))
816a6538
LC
7422
7423(define-public python2-chardet
7424 (package-with-python2 python-chardet))
2fc5f186 7425
1872f1bb
KM
7426(define-public python-docopt
7427 (package
7428 (name "python-docopt")
7429 (version "0.6.2")
7430 (source
7431 (origin
7432 (method url-fetch)
7433 ;; The release on PyPI does not include tests.
7434 (uri (string-append
7435 "https://github.com/docopt/docopt/archive/"
7436 version ".tar.gz"))
7437 (file-name (string-append name "-" version ".tar.gz"))
7438 (sha256
7439 (base32
7440 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7441 (build-system python-build-system)
7442 (native-inputs
f3b98f4f 7443 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7444 (arguments
7445 `(#:phases (alist-replace
7446 'check
7447 (lambda _ (zero? (system* "py.test")))
7448 %standard-phases)))
7449 (home-page "http://docopt.org")
7450 (synopsis "Command-line interface description language for Python")
7451 (description "This library allows the user to define a command-line
7452interface from a program's help message rather than specifying it
7453programatically with command-line parsers like @code{getopt} and
7454@code{argparse}.")
7455 (license license:expat)))
7456
7457(define-public python2-docopt
7458 (package-with-python2 python-docopt))
7459
2fc5f186
LF
7460(define-public python-zope-event
7461 (package
7462 (name "python-zope-event")
7463 (version "4.1.0")
7464 (source
7465 (origin
7466 (method url-fetch)
7467 (uri (string-append "https://pypi.python.org/packages/source/z"
7468 "/zope.event/zope.event-" version ".tar.gz"))
7469 (sha256
7470 (base32
7471 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7472 (build-system python-build-system)
2fc5f186
LF
7473 (home-page "http://pypi.python.org/pypi/zope.event")
7474 (synopsis "Event publishing system for Python")
7475 (description "Zope.event provides an event publishing API, intended for
7476use by applications which are unaware of any subscribers to their events. It
7477is a simple event-dispatching system on which more sophisticated event
7478dispatching systems can be built.")
3f641af0 7479 (license license:zpl2.1)))
2fc5f186
LF
7480
7481(define-public python2-zope-event
7482 (package-with-python2 python-zope-event))
97abe268
LF
7483
7484(define-public python-zope-interface
7485 (package
7486 (name "python-zope-interface")
7487 (version "4.1.3")
7488 (source
7489 (origin
7490 (method url-fetch)
7491 (uri (string-append "https://pypi.python.org/packages/source/z"
7492 "/zope.interface/zope.interface-" version ".tar.gz"))
7493 (sha256
7494 (base32
7495 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7496 (build-system python-build-system)
38d480a8 7497 (native-inputs
97abe268
LF
7498 `(("python-zope-event" ,python-zope-event)))
7499 (home-page "https://github.com/zopefoundation/zope.interface")
7500 (synopsis "Python implementation of the \"design by contract\"
7501methodology")
7502 (description "Zope.interface provides an implementation of \"object
7503interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7504conforming to a given API or contract.")
3f641af0 7505 (license license:zpl2.1)))
97abe268
LF
7506
7507(define-public python2-zope-interface
7508 (package-with-python2 python-zope-interface))
81f2373c
LF
7509
7510(define-public python-zope-exceptions
7511 (package
7512 (name "python-zope-exceptions")
7513 (version "4.0.8")
7514 (source
7515 (origin
7516 (method url-fetch)
7517 (uri (string-append "https://pypi.python.org/packages/source/z"
7518 "/zope.exceptions/zope.exceptions-"
7519 version ".tar.gz"))
7520 (sha256
7521 (base32
7522 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7523 (build-system python-build-system)
7524 (arguments
7525 '(#:tests? #f)) ; circular dependency with zope.testrunner
7526 (propagated-inputs
7527 `(("python-zope-interface" ,python-zope-interface)))
7528 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7529 (synopsis "Zope exceptions")
7530 (description "Zope.exceptions provides general-purpose exception types
7531that have uses outside of the Zope framework.")
3f641af0 7532 (license license:zpl2.1)))
81f2373c
LF
7533
7534(define-public python2-zope-exceptions
7535 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7536
7537(define-public python-zope-testing
7538 (package
7539 (name "python-zope-testing")
7540 (version "4.5.0")
7541 (source
7542 (origin
7543 (method url-fetch)
7544 (uri (string-append "https://pypi.python.org/packages/source/z"
7545 "/zope.testing/zope.testing-" version ".tar.gz"))
7546 (sha256
7547 (base32
b02f7a21
HG
7548 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7549 (modules '((guix build utils)))
7550 (snippet
7551 '(begin
7552 ;; Remove pre-compiled .pyc files backup files from source.
7553 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7554 #t))))
900e3c0e
LF
7555 (build-system python-build-system)
7556 (native-inputs
7557 `(("python-zope-exceptions" ,python-zope-exceptions)))
7558 (propagated-inputs
7559 `(("python-zope-interface" ,python-zope-interface)))
7560 (home-page "http://pypi.python.org/pypi/zope.testing")
7561 (synopsis "Zope testing helpers")
7562 (description "Zope.testing provides a number of testing utilities for HTML
7563forms, HTTP servers, regular expressions, and more.")
3f641af0 7564 (license license:zpl2.1)))
900e3c0e
LF
7565
7566(define-public python2-zope-testing
7567 (package-with-python2 python-zope-testing))
01614c4f
LF
7568
7569(define-public python-zope-testrunner
7570 (package
7571 (name "python-zope-testrunner")
7572 (version "4.4.9")
7573 (source
7574 (origin
7575 (method url-fetch)
7576 (uri (string-append "https://pypi.python.org/packages/source/z"
7577 "/zope.testrunner/zope.testrunner-"
7578 version ".zip"))
7579 (sha256
7580 (base32
7581 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7582 (build-system python-build-system)
7583 (native-inputs
7584 `(("python-six" ,python-six)
e408ffc3 7585 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7586 ("python-zope-exceptions" ,python-zope-exceptions)
7587 ("python-zope-testing" ,python-zope-testing)
7588 ("unzip" ,unzip)))
7589 (propagated-inputs
7590 `(("python-zope-interface" ,python-zope-interface)))
7591 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7592 (synopsis "Zope testrunner script")
7593 (description "Zope.testrunner provides a script for running Python
7594tests.")
3f641af0 7595 (license license:zpl2.1)))
01614c4f
LF
7596
7597(define-public python2-zope-testrunner
7598 (let ((base (package-with-python2 python-zope-testrunner)))
7599 (package
7600 (inherit base)
7601 (native-inputs
7602 (append (package-native-inputs base)
7603 `(("python2-subunit" ,python2-subunit)
7604 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7605
7606(define-public python-zope-i18nmessageid
7607 (package
7608 (name "python-zope-i18nmessageid")
7609 (version "4.0.3")
7610 (source
7611 (origin
7612 (method url-fetch)
7613 (uri (string-append
7614 "https://pypi.python.org/packages/source/z"
7615 "/zope.i18nmessageid/zope.i18nmessageid-"
7616 version ".tar.gz"))
7617 (sha256
7618 (base32
7619 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7620 (build-system python-build-system)
6a5c710c
LF
7621 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7622 (synopsis "Message identifiers for internationalization")
7623 (description "Zope.i18nmessageid provides facilities for declaring
7624internationalized messages within program source text.")
3f641af0 7625 (license license:zpl2.1)))
6a5c710c
LF
7626
7627(define-public python2-zope-i18nmessageid
7628 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7629
7630(define-public python-zope-schema
7631 (package
7632 (name "python-zope-schema")
7633 (version "4.4.2")
7634 (source
7635 (origin
7636 (method url-fetch)
7637 (uri (string-append "https://pypi.python.org/packages/source/z"
7638 "/zope.schema/zope.schema-" version ".tar.gz"))
7639 (sha256
7640 (base32
7641 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7642 (build-system python-build-system)
7643 (propagated-inputs
7644 `(("python-zope-event" ,python-zope-event)
7645 ("python-zope-interface" ,python-zope-interface)))
7646 (native-inputs
47f77210
HG
7647 `(("python-zope-testing" ,python-zope-testing)
7648 ("python-coverage" ,python-coverage)
7649 ("python-nose" ,python-nose)))
71fb09f3
LF
7650 (home-page "http://pypi.python.org/pypi/zope.schema")
7651 (synopsis "Zope data schemas")
7652 (description "Zope.scheme provides extensions to zope.interface for
7653defining data schemas.")
3f641af0 7654 (license license:zpl2.1)))
71fb09f3
LF
7655
7656(define-public python2-zope-schema
7657 (package-with-python2 python-zope-schema))
fbac9b17
LF
7658
7659(define-public python-zope-configuration
7660 (package
7661 (name "python-zope-configuration")
7662 (version "4.0.3")
7663 (source (origin
7664 (method url-fetch)
7665 (uri (string-append "https://pypi.python.org/packages/source/z"
7666 "/zope.configuration/zope.configuration-"
7667 version ".tar.gz"))
7668 (sha256
7669 (base32
7670 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7671 (build-system python-build-system)
7672 (propagated-inputs
7673 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7674 ("python-zope-schema" ,python-zope-schema)))
7675 (home-page "http://pypi.python.org/pypi/zope.configuration")
7676 (synopsis "Zope Configuration Markup Language")
7677 (description "Zope.configuration implements ZCML, the Zope Configuration
7678Markup Language.")
3f641af0 7679 (license license:zpl2.1)))
fbac9b17
LF
7680
7681(define-public python2-zope-configuration
7682 (package-with-python2 python-zope-configuration))
2ad52086
LF
7683
7684(define-public python-zope-proxy
7685 (package
7686 (name "python-zope-proxy")
7687 (version "4.1.6")
7688 (source
7689 (origin
7690 (method url-fetch)
7691 (uri (string-append "https://pypi.python.org/packages/source/z"
7692 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7693 (sha256
7694 (base32
7695 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7696 (build-system python-build-system)
7697 (propagated-inputs
7698 `(("python-zope-interface" ,python-zope-interface)))
7699 (home-page "http://pypi.python.org/pypi/zope.proxy")
7700 (synopsis "Generic, transparent proxies")
7701 (description "Zope.proxy provides generic, transparent proxies for Python.
7702Proxies are special objects which serve as mostly-transparent wrappers around
7703another object, intervening in the apparent behavior of the wrapped object
7704only when necessary to apply the policy (e.g., access checking, location
7705brokering, etc.) for which the proxy is responsible.")
3f641af0 7706 (license license:zpl2.1)))
2ad52086
LF
7707
7708(define-public python2-zope-proxy
7709 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7710
7711(define-public python-zope-location
7712 (package
7713 (name "python-zope-location")
7714 (version "4.0.3")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (string-append "https://pypi.python.org/packages/source/z"
7719 "/zope.location/zope.location-" version ".tar.gz"))
7720 (sha256
7721 (base32
7722 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7723 (build-system python-build-system)
d27f176a 7724 (propagated-inputs
f404b5ea
LF
7725 `(("python-zope-proxy" ,python-zope-proxy)
7726 ("python-zope-schema" ,python-zope-schema)))
7727 (home-page "http://pypi.python.org/pypi/zope.location/")
7728 (synopsis "Zope location library")
7729 (description "Zope.location implements the concept of \"locations\" in
7730Zope3, which are are special objects that have a structural location.")
3f641af0 7731 (license license:zpl2.1)))
f404b5ea
LF
7732
7733(define-public python2-zope-location
7734 (package-with-python2 python-zope-location))
d4b77f36
LF
7735
7736(define-public python-zope-security
7737 (package
7738 (name "python-zope-security")
7739 (version "4.0.3")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (string-append "https://pypi.python.org/packages/source/z"
7744 "/zope.security/zope.security-" version ".tar.gz"))
7745 (sha256
7746 (base32
7747 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7748 (build-system python-build-system)
7749 (propagated-inputs
7750 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7751 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7752 ("python-zope-schema" ,python-zope-schema)))
7753 (native-inputs
7754 `(("python-zope-component" ,python-zope-component)
7755 ("python-zope-configuration" ,python-zope-configuration)
7756 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7757 ("python-zope-testrunner" ,python-zope-testrunner)
7758 ("python-zope-testing" ,python-zope-testing)))
7759 (home-page "http://pypi.python.org/pypi/zope.security")
7760 (synopsis "Zope security framework")
7761 (description "Zope.security provides a generic mechanism to implement
7762security policies on Python objects.")
3f641af0 7763 (license license:zpl2.1)))
d4b77f36
LF
7764
7765(define-public python2-zope-security
04417662
EF
7766 (let ((zope-security (package-with-python2 python-zope-security)))
7767 (package (inherit zope-security)
7768 (propagated-inputs
7769 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7770 ,@(alist-delete
7771 "python-zope-testrunner"
7772 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7773
7774(define-public python-zope-component
7775 (package
7776 (name "python-zope-component")
7777 (version "4.2.2")
7778 (source
7779 (origin
7780 (method url-fetch)
7781 (uri (string-append "https://pypi.python.org/packages/source/z"
7782 "/zope.component/zope.component-" version ".tar.gz"))
7783 (sha256
7784 (base32
7785 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7786 (build-system python-build-system)
7787 (arguments
7788 ;; Skip tests due to circular dependency with python-zope-security.
7789 '(#:tests? #f))
7790 (native-inputs
7791 `(("python-zope-testing" ,python-zope-testing)))
7792 (propagated-inputs
7793 `(("python-zope-event" ,python-zope-event)
7794 ("python-zope-interface" ,python-zope-interface)
7795 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7796 ("python-zope-configuration" ,python-zope-configuration)))
7797 (home-page "https://github.com/zopefoundation/zope.component")
7798 (synopsis "Zope Component Architecture")
7799 (description "Zope.component represents the core of the Zope Component
7800Architecture. Together with the zope.interface package, it provides
7801facilities for defining, registering and looking up components.")
3f641af0 7802 (license license:zpl2.1)))
a6b61b27
LF
7803
7804(define-public python2-zope-component
7805 (package-with-python2 python-zope-component))
3859ac12 7806
1ae44b80 7807(define-public python-pythondialog
b5f218be 7808 (package
1ae44b80 7809 (name "python-pythondialog")
42c4b246 7810 (version "3.4.0")
b5f218be
LF
7811 (source
7812 (origin
7813 (method url-fetch)
1ae44b80 7814 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7815 (sha256
7816 (base32
1ae44b80 7817 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7818 (build-system python-build-system)
7819 (arguments
7820 `(#:phases
7821 (modify-phases %standard-phases
7822 (add-after 'unpack 'patch-path
7823 (lambda* (#:key inputs #:allow-other-keys)
7824 (let* ((dialog (assoc-ref inputs "dialog")))
7825 ;; Since this library really wants to grovel the search path, we
7826 ;; must hardcode dialog's store path into it.
7827 (substitute* "dialog.py"
7828 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7829 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7830 #t))))
b5f218be
LF
7831 #:tests? #f)) ; no test suite
7832 (propagated-inputs
7833 `(("dialog" ,dialog)))
7834 (home-page "http://pythondialog.sourceforge.net/")
7835 (synopsis "Python interface to the UNIX dialog utility")
7836 (description "A Python wrapper for the dialog utility. Its purpose is to
7837provide an easy to use, pythonic and comprehensive Python interface to dialog.
7838This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7839 (license license:lgpl2.1)
1ae44b80
LF
7840 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7841
7842(define-public python2-pythondialog
7843 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7844 (package
7845 (inherit base)
7846 (version (package-version python-pythondialog))
7847 (source (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "python2-pythondialog" version))
7850 (sha256
7851 (base32
7852 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7853
3859ac12
LF
7854(define-public python-pyrfc3339
7855 (package
7856 (name "python-pyrfc3339")
d9aa097b 7857 (version "1.0")
3859ac12
LF
7858 (source
7859 (origin
7860 (method url-fetch)
d9aa097b 7861 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7862 (sha256
7863 (base32
d9aa097b 7864 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7865 (build-system python-build-system)
7866 (propagated-inputs
7867 `(("python-pytz" ,python-pytz)))
7868 (native-inputs
f3b98f4f 7869 `(("python-nose" ,python-nose)))
3859ac12
LF
7870 (home-page "https://github.com/kurtraschke/pyRFC3339")
7871 (synopsis "Python timestamp library")
7872 (description "Python library for generating and parsing RFC 3339-compliant
7873timestamps.")
7874 (license license:expat)))
7875
7876(define-public python2-pyrfc3339
7877 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7878
7879(define-public python-werkzeug
7880 (package
7881 (name "python-werkzeug")
bbb99d6b 7882 (version "0.11.15")
5eea2005
LF
7883 (source
7884 (origin
7885 (method url-fetch)
4b47cbfa 7886 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7887 (sha256
7888 (base32
bbb99d6b 7889 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
7890 (build-system python-build-system)
7891 (native-inputs
7892 `(("python-pytest" ,python-pytest)))
7893 (home-page "http://werkzeug.pocoo.org/")
7894 (synopsis "Utilities for WSGI applications")
7895 (description "One of the most advanced WSGI utility modules. It includes a
7896powerful debugger, full-featured request and response objects, HTTP utilities to
7897handle entity tags, cache control headers, HTTP dates, cookie handling, file
7898uploads, a powerful URL routing system and a bunch of community-contributed
7899addon modules.")
3f641af0 7900 (license license:x11)))
5eea2005
LF
7901
7902(define-public python2-werkzeug
7903 (package-with-python2 python-werkzeug))
99fffa8a
LF
7904
7905(define-public python-configobj
7906 (package
7907 (name "python-configobj")
7908 (version "5.0.6")
7909 (source (origin
7910 (method url-fetch)
7911 (uri (string-append
7912 "https://pypi.python.org/packages/source/c/configobj/"
7913 "configobj-" version ".tar.gz"))
7914 (sha256
7915 (base32
7916 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7917 ;; Patch setup.py so it looks for python-setuptools, which is
7918 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7919 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7920 (build-system python-build-system)
861f70c9 7921 (propagated-inputs
f3b98f4f 7922 `(("python-six" ,python-six)))
99fffa8a
LF
7923 (synopsis "Config file reading, writing and validation")
7924 (description "ConfigObj is a simple but powerful config file reader and
7925writer: an ini file round tripper. Its main feature is that it is very easy to
7926use, with a straightforward programmer’s interface and a simple syntax for
7927config files.")
7928 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7929 (license license:bsd-3)))
99fffa8a
LF
7930
7931(define-public python2-configobj
7932 (package-with-python2 python-configobj))
79e8a291
LF
7933
7934(define-public python-configargparse
7935 (package
7936 (name "python-configargparse")
7937 (version "0.10.0")
7938 (source (origin
7939 (method url-fetch)
7940 (uri (string-append
7941 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7942 "ConfigArgParse-" version ".tar.gz"))
7943 (sha256
7944 (base32
7945 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7946 (build-system python-build-system)
7947 (arguments
7948 ;; FIXME: Bug in test suite filed upstream:
7949 ;; https://github.com/bw2/ConfigArgParse/issues/32
7950 '(#:tests? #f))
7951 (synopsis "Replacement for argparse")
7952 (description "A drop-in replacement for argparse that allows options to also
7953be set via config files and/or environment variables.")
7954 (home-page "https://github.com/bw2/ConfigArgParse")
7955 (license license:expat)))
7956
7957(define-public python2-configargparse
7958 (package-with-python2 python-configargparse))
ab41f979
LF
7959
7960(define-public python-ndg-httpsclient
7961 (package
7962 (name "python-ndg-httpsclient")
ae476d01 7963 (version "0.4.2")
ab41f979
LF
7964 (source (origin
7965 (method url-fetch)
7be13d00 7966 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
7967 (sha256
7968 (base32
ae476d01 7969 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 7970 (build-system python-build-system)
a39cc016
LF
7971 (arguments
7972 '(;; The tests appear to require networking.
7973 #:tests? #f))
ab41f979
LF
7974 (propagated-inputs
7975 `(("python-pyopenssl" ,python-pyopenssl)))
7976 (synopsis "HTTPS support for Python's httplib and urllib2")
7977 (description "This is a HTTPS client implementation for httplib and urllib2
7978based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7979over the default provided with Python and importantly enables full verification
7980of the SSL peer.")
7981 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7982 (license license:bsd-3)))
ab41f979
LF
7983
7984;; python2-openssl requires special care, so package-with-python2 is
7985;; insufficient.
7986(define-public python2-ndg-httpsclient
7987 (package (inherit python-ndg-httpsclient)
7988 (name "python2-ndg-httpsclient")
7989 (arguments `(#:python ,python-2))
7990 (propagated-inputs
7991 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7992
7993(define-public python-contextlib2
7994 (package
7995 (name "python-contextlib2")
7996 (version "0.4.0")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (pypi-uri "contextlib2" version))
8001 (sha256
8002 (base32
8003 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8004 (build-system python-build-system)
8005 (arguments
8006 `(#:phases
8007 (modify-phases %standard-phases
8008 (replace 'check
8009 (lambda _ (zero?
8010 (system*
b3546174 8011 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8012 (home-page "http://contextlib2.readthedocs.org/")
8013 (synopsis "Tools for decorators and context managers")
8014 (description "This module is primarily a backport of the Python
80153.2 contextlib to earlier Python versions. Like contextlib, it
8016provides utilities for common tasks involving decorators and context
8017managers. It also contains additional features that are not part of
8018the standard library.")
3f641af0 8019 (license license:psfl)))
03f964a5
CM
8020
8021(define-public python2-contextlib2
8022 (package-with-python2 python-contextlib2))
210bf497
DT
8023
8024(define-public python-texttable
8025 (package
8026 (name "python-texttable")
8027 (version "0.8.4")
8028 (source
8029 (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "texttable" version))
8032 (sha256
8033 (base32
8034 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8035 (build-system python-build-system)
8036 (arguments '(#:tests? #f)) ; no tests
8037 (home-page "https://github.com/foutaise/texttable/")
8038 (synopsis "Python module for creating simple ASCII tables")
8039 (description "Texttable is a Python module for creating simple ASCII
8040tables.")
3f641af0 8041 (license license:lgpl2.1+)))
210bf497
DT
8042
8043(define-public python2-texttable
8044 (package-with-python2 python-texttable))
67c52bb3
DT
8045
8046(define-public python-websocket-client
8047 (package
8048 (name "python-websocket-client")
6b810897 8049 (version "0.37.0")
67c52bb3
DT
8050 (source
8051 (origin
8052 (method url-fetch)
6b810897 8053 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8054 (sha256
8055 (base32
6b810897 8056 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8057 (build-system python-build-system)
a5333f7c
HG
8058 (propagated-inputs
8059 `(("python-six" ,python-six)))
67c52bb3
DT
8060 (home-page "https://github.com/liris/websocket-client")
8061 (synopsis "WebSocket client for Python")
8062 (description "The Websocket-client module provides the low level APIs for
8063WebSocket usage in Python programs.")
3f641af0 8064 (license license:lgpl2.1+)))
67c52bb3
DT
8065
8066(define-public python2-websocket-client
8067 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8068
8069(define-public python-atomicwrites
8070 (package
8071 (name "python-atomicwrites")
4e92d76a 8072 (version "1.1.0")
5c6eea2a
LF
8073 (source (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "atomicwrites" version))
8076 (sha256
8077 (base32
4e92d76a 8078 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
8079 (build-system python-build-system)
8080 (synopsis "Atomic file writes in Python")
8081 (description "Library for atomic file writes using platform dependent tools
8f65585b 8082for atomic file system operations.")
5c6eea2a 8083 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8084 (license license:expat)))
9bb6d184
LF
8085
8086(define-public python2-atomicwrites
f210e944 8087 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8088
8089(define-public python-requests-toolbelt
8090 (package
8091 (name "python-requests-toolbelt")
c02af1c8 8092 (version "0.6.2")
561bb3cb
LF
8093 (source (origin
8094 (method url-fetch)
c02af1c8
LF
8095 (uri (string-append
8096 "https://pypi.python.org/packages/"
8097 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8098 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8099 (sha256
8100 (base32
c02af1c8 8101 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8102 (build-system python-build-system)
759aadd4
LF
8103 (native-inputs
8104 `(("python-betamax" ,python-betamax)
8105 ("python-mock" ,python-mock)
8106 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8107 (propagated-inputs
8108 `(("python-requests" ,python-requests)))
8109 (synopsis "Extensions to python-requests")
8110 (description "This is a toolbelt of useful classes and functions to be used
8111with python-requests.")
8112 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8113 (license license:asl2.0)))
d1deb90b
LF
8114
8115(define-public python-click-threading
8116 (package
8117 (name "python-click-threading")
3d2e0dbc 8118 (version "0.2.0")
d1deb90b
LF
8119 (source (origin
8120 (method url-fetch)
3d2e0dbc
LF
8121 (uri (string-append
8122 "https://pypi.python.org/packages/"
8123 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8124 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8125 (sha256
8126 (base32
3d2e0dbc 8127 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8128 (build-system python-build-system)
8129 (propagated-inputs
8130 `(("python-click" ,python-click)))
8131 (synopsis "Utilities for multithreading in Click")
8132 (description "This package provides utilities for multithreading in Click
8133applications.")
8134 (home-page "https://github.com/click-contrib/click-threading")
8135 (license license:expat)))
7b17cab9
LF
8136
8137(define-public python-click-log
8138 (package
8139 (name "python-click-log")
42734b9a 8140 (version "0.1.8")
7b17cab9
LF
8141 (source (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "click-log" version))
8144 (sha256
8145 (base32
42734b9a 8146 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8147 (build-system python-build-system)
8148 (propagated-inputs
8149 `(("python-click" ,python-click)))
8150 (synopsis "Logging for click applications")
8151 (description "This package provides a Python library for logging Click
8152applications.")
8153 (home-page "https://github.com/click-contrib/click-log")
8154 (license license:expat)))
7b3a4ee4
LF
8155
8156(define-public python-apipkg
8157 (package
8158 (name "python-apipkg")
8159 (version "1.4")
8160 (source (origin
8161 (method url-fetch)
8162 (uri (pypi-uri "apipkg" version))
8163 (sha256
8164 (base32
8165 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8166 (build-system python-build-system)
328bb95d 8167 (native-inputs
7b3a4ee4
LF
8168 `(("python-pytest" ,python-pytest)))
8169 (synopsis "Namespace control and lazy-import mechanism")
8170 (description "With apipkg you can control the exported namespace of a Python
8171package and greatly reduce the number of imports for your users. It is a small
8172pure Python module that works on virtually all Python versions.")
8173 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8174 (license license:expat)))
e08739c3
CAW
8175
8176(define-public python2-apipkg
f210e944 8177 (package-with-python2 python-apipkg))
848964fe
LF
8178
8179(define-public python-execnet
8180 (package
8181 (name "python-execnet")
8182 (version "1.4.1")
8183 (source (origin
8184 (method url-fetch)
8185 (uri (pypi-uri "execnet" version))
8186 (sha256
8187 (base32
8188 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8189 (build-system python-build-system)
ca0eee9d
LF
8190 (arguments
8191 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8192 ;; The two test failures are caused by the lack of an `ssh` executable.
8193 ;; The test suite can be run with pytest after the 'install' phase.
8194 #:tests? #f))
848964fe 8195 (native-inputs
ca0eee9d
LF
8196 `(("python-pytest" ,python-pytest)
8197 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8198 (propagated-inputs
848964fe
LF
8199 `(("python-apipkg" ,python-apipkg)))
8200 (synopsis "Rapid multi-Python deployment")
8201 (description "Execnet provides a share-nothing model with
8202channel-send/receive communication for distributing execution across many
8203Python interpreters across version, platform and network barriers. It has a
8204minimal and fast API targetting the following uses:
8205@enumerate
8206@item distribute tasks to (many) local or remote CPUs
8207@item write and deploy hybrid multi-process applications
8208@item write scripts to administer multiple environments
8209@end enumerate")
8210 (home-page "http://codespeak.net/execnet/")
f210e944 8211 (license license:expat)))
16c84f90
CAW
8212
8213(define-public python2-execnet
f210e944 8214 (package-with-python2 python-execnet))
6720dbb4 8215
d5bbf806 8216(define-public python-trollius-redis
8217 (package
8218 (name "python-trollius-redis")
8219 (version "0.1.4")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "trollius_redis" version))
8224 (sha256
8225 (base32
8226 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8227 (build-system python-build-system)
8228 (home-page "https://github.com/benjolitz/trollius-redis")
8229 (synopsis "Port of asyncio-redis to trollius")
8230 (description "@code{trollius-redis} is a Redis client for Python
8231 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8232 Redis protocol.")
8233 (license license:bsd-2)))
8234
8235(define-public python2-trollius-redis
8236 (package-with-python2 python-trollius-redis))
8237
6720dbb4
LF
8238;;; The software provided by this package was integrated into pytest 2.8.
8239(define-public python-pytest-cache
8240 (package
8241 (name "python-pytest-cache")
8242 (version "1.0")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "pytest-cache" version))
8246 (sha256
8247 (base32
8248 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8249 (build-system python-build-system)
f22efa01 8250 (propagated-inputs
630d938f
EF
8251 `(("python-apipkg" ,python-apipkg)
8252 ("python-execnet" ,python-execnet)
8253 ("python-py" ,python-py)
8254 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8255 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8256 (description "The pytest-cache plugin provides tools to rerun failures from
8257the last py.test invocation.")
8258 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8259 (license license:expat)))
0adc21c2
EF
8260
8261(define-public python2-pytest-cache
f210e944 8262 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8263
8264(define-public python-pytest-localserver
8265 (package
8266 (name "python-pytest-localserver")
29f20168 8267 (version "0.3.5")
d7e729fe
LF
8268 (source (origin
8269 (method url-fetch)
29f20168 8270 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8271 (sha256
8272 (base32
29f20168 8273 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8274 (build-system python-build-system)
8275 (arguments
8276 `(#:phases (modify-phases %standard-phases
8277 (replace 'check
8278 (lambda _
8279 (zero? (system* "py.test" "--genscript=runtests.py"))
8280 (zero? (system* "py.test")))))))
8281 (native-inputs
d7e729fe
LF
8282 `(("python-pytest" ,python-pytest)
8283 ("python-requests" ,python-requests)
9ba40f05 8284 ("python-six" ,python-six)))
f22efa01 8285 (propagated-inputs
9ba40f05 8286 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8287 (synopsis "Py.test plugin to test server connections locally")
8288 (description "Pytest-localserver is a plugin for the pytest testing
8289framework which enables you to test server connections locally.")
8290 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8291 (license license:expat)))
28cecbb7
LF
8292
8293(define-public python-wsgi-intercept
8294 (package
8295 (name "python-wsgi-intercept")
909fbd2b 8296 (version "1.2.2")
28cecbb7
LF
8297 (source (origin
8298 (method url-fetch)
909fbd2b
LF
8299 (uri (string-append
8300 "https://pypi.python.org/packages/"
8301 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8302 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8303 (sha256
8304 (base32
909fbd2b 8305 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8306 (build-system python-build-system)
b9fc496f
HG
8307 (propagated-inputs
8308 `(("python-six" ,python-six)))
28cecbb7 8309 (native-inputs
9d813ec1 8310 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8311 ("python-httplib2" ,python-httplib2)
8312 ("python-requests" ,python-requests)
8757f050 8313 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8314 (synopsis "Puts a WSGI application in place of a real URI for testing")
8315 (description "Wsgi_intercept installs a WSGI application in place of a real
8316URI for testing. Testing a WSGI application normally involves starting a
8317server at a local host and port, then pointing your test code to that address.
8318Instead, this library lets you intercept calls to any specific host/port
8319combination and redirect them into a WSGI application importable by your test
8320program. Thus, you can avoid spawning multiple processes or threads to test
8321your Web app.")
8322 (home-page "https://github.com/cdent/wsgi-intercept")
8323 (license license:expat)))
89b8a551
LF
8324
8325(define-public python-pytest-xprocess
8326 (package
8327 (name "python-pytest-xprocess")
8328 (version "0.9.1")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "pytest-xprocess" version))
8332 (sha256
8333 (base32
8334 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8335 (build-system python-build-system)
8336 (propagated-inputs
8337 `(("python-pytest" ,python-pytest)
8338 ("python-pytest-cache" ,python-pytest-cache)
8339 ("python-psutil" ,python-psutil)))
8340 (synopsis "Pytest plugin to manage external processes across test runs")
8341 (description "Pytest-xprocess is an experimental py.test plugin for managing
8342processes across test runs.")
8343 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8344 (license license:expat)))
5c299bf0
LF
8345
8346(define-public python-icalendar
8347 (package
8348 (name "python-icalendar")
268e8ad8 8349 (version "3.11.2")
5c299bf0
LF
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "icalendar" version))
8353 (sha256
8354 (base32
268e8ad8 8355 "17rcy6rb9kqjf4p707ivmx7phjq7ngcz3bf7zriwxrqgrjagj7ag"))))
5c299bf0
LF
8356 (build-system python-build-system)
8357 (propagated-inputs
8358 `(("python-dateutil-2" ,python-dateutil-2)
8359 ("python-pytz" ,python-pytz)))
8360 (synopsis "Python library for parsing iCalendar files")
8361 (description "The icalendar package is a parser/generator of iCalendar
8362files for use with Python.")
8363 (home-page "https://github.com/collective/icalendar")
3f641af0 8364 (license license:bsd-2)))
6bbbb53e
LF
8365
8366(define-public python-sphinxcontrib-newsfeed
8367 (package
8368 (name "python-sphinxcontrib-newsfeed")
8369 (version "0.1.4")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8373 (sha256
8374 (base32
8375 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8376 (build-system python-build-system)
8377 (propagated-inputs
251ed7f2 8378 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8379 (synopsis "News Feed extension for Sphinx")
8380 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8381Blog, News or Announcements section to a Sphinx website.")
8382 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8383 (license license:bsd-2)))
2216e15c
SB
8384
8385(define-public python-args
8386 (package
8387 (name "python-args")
8388 (version "0.1.0")
8389 (source (origin
8390 (method url-fetch)
8391 (uri (pypi-uri "args" version))
8392 (sha256
8393 (base32
8394 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8395 (build-system python-build-system)
2216e15c
SB
8396 (home-page "https://github.com/kennethreitz/args")
8397 (synopsis "Command-line argument parser")
8398 (description
8399 "This library provides a Python module to parse command-line arguments.")
3f641af0 8400 (license license:bsd-3)))
2216e15c
SB
8401
8402(define-public python2-args
8403 (package-with-python2 python-args))
c06a3de9
SB
8404
8405(define-public python-clint
8406 (package
8407 (name "python-clint")
8408 (version "0.5.1")
8409 (source (origin
8410 (method url-fetch)
8411 (uri (pypi-uri "clint" version))
8412 (sha256
8413 (base32
8414 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8415 (build-system python-build-system)
f22efa01 8416 (propagated-inputs
f3b98f4f 8417 `(("python-args" ,python-args)))
c06a3de9
SB
8418 (home-page "https://github.com/kennethreitz/clint")
8419 (synopsis "Command-line interface tools")
8420 (description
8421 "Clint is a Python module filled with a set of tools for developing
8422command-line applications, including tools for colored and indented
8423output, progress bar display, and pipes.")
3f641af0 8424 (license license:isc)))
c06a3de9
SB
8425
8426(define-public python2-clint
8427 (package-with-python2 python-clint))
4ecdeef8
SB
8428
8429(define-public python-astor
8430 (package
8431 (name "python-astor")
8432 (version "0.5")
8433 (source (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "astor" version))
8436 (sha256
8437 (base32
8438 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8439 (build-system python-build-system)
4ecdeef8
SB
8440 (home-page "https://github.com/berkerpeksag/astor")
8441 (synopsis "Read and write Python ASTs")
8442 (description
8443 "Astor is designed to allow easy manipulation of Python source via the
8444Abstract Syntax Tree.")
3f641af0 8445 (license license:bsd-3)))
4ecdeef8
SB
8446
8447(define-public python2-astor
8448 (package-with-python2 python-astor))
e224b7d0
SB
8449
8450(define-public python-rply
8451 (package
8452 (name "python-rply")
8453 (version "0.7.4")
8454 (source (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "rply" version))
8457 (sha256
8458 (base32
8459 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8460 (build-system python-build-system)
f22efa01 8461 (propagated-inputs
f3b98f4f 8462 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8463 (home-page "https://github.com/alex/rply")
8464 (synopsis "Parser generator for Python")
8465 (description
8466 "This package provides a pure Python based parser generator, that also
8467works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8468with a new public API, and RPython support.")
3f641af0 8469 (license license:bsd-3)))
e224b7d0
SB
8470
8471(define-public python2-rply
8472 (package-with-python2 python-rply))
c3e919d7
SB
8473
8474(define-public python-hy
8475 (package
8476 (name "python-hy")
8477 (version "0.11.1")
8478 (source (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "hy" version))
8481 (sha256
8482 (base32
8483 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8484 (build-system python-build-system)
f22efa01 8485 (propagated-inputs
c3e919d7
SB
8486 `(("python-astor" ,python-astor)
8487 ("python-clint" ,python-clint)
f3b98f4f 8488 ("python-rply" ,python-rply)))
c3e919d7
SB
8489 (home-page "http://hylang.org/")
8490 (synopsis "Lisp frontend to Python")
8491 (description
8492 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8493its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8494Python at your fingertips, in Lisp form.")
8495 (license license:expat)))
8496
8497(define-public python2-hy
8498 (package-with-python2 python-hy))
7a5b944e 8499
81f7f297
EF
8500(define-public python-rauth
8501 (package
8502 (name "python-rauth")
8503 (version "0.7.2")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "rauth" version))
8508 (sha256
8509 (base32
8510 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8511 (build-system python-build-system)
8512 (arguments
8513 `(#:test-target "check"))
f22efa01 8514 (propagated-inputs
81f7f297
EF
8515 `(("python-requests" ,python-requests)))
8516 (home-page "https://github.com/litl/rauth")
8517 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8518 (description
8519 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8520provides service wrappers for convenient connection initialization and
8521authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8522 (license license:expat)
8523 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8524
8525(define-public python2-rauth
0848d8d3
EF
8526 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8527 (package
8528 (inherit base)
00e10c6e 8529 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8530 ,@(package-native-inputs base))))))
81f7f297 8531
1abe448d
EF
8532(define-public python2-functools32
8533 (package
8534 (name "python2-functools32")
8535 (version "3.2.3-2")
8536 (source
8537 (origin
8538 (method url-fetch)
8539 (uri (pypi-uri "functools32" version))
8540 (sha256
8541 (base32
8542 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8543 (build-system python-build-system)
8544 (arguments
8545 `(#:python ,python-2
8546 #:tests? #f)) ; no test target
1abe448d
EF
8547 (home-page "https://github.com/MiCHiLU/python-functools32")
8548 (synopsis
8549 "Backport of the functools module from Python 3.2.3")
8550 (description
8551 "This package is a backport of the @code{functools} module from Python
85523.2.3 for use with older versions of Python and PyPy.")
8553 (license license:expat)))
8554
877889f3 8555(define-public python2-futures
7a5b944e 8556 (package
877889f3 8557 (name "python2-futures")
7a5b944e
EF
8558 (version "3.0.3")
8559 (source
8560 (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "futures" version))
8563 (sha256
8564 (base32
8565 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8566 (build-system python-build-system)
877889f3 8567 (arguments `(#:python ,python-2))
7a5b944e
EF
8568 (home-page "https://github.com/agronholm/pythonfutures")
8569 (synopsis
8570 "Backport of the concurrent.futures package from Python 3.2")
8571 (description
8572 "The concurrent.futures module provides a high-level interface for
8573asynchronously executing callables. This package backports the
8574concurrent.futures package from Python 3.2")
3f641af0 8575 (license license:bsd-3)))
7a5b944e 8576
5cb2fe44
EF
8577(define-public python-promise
8578 (package
8579 (name "python-promise")
8580 (version "0.4.2")
8581 (source
8582 (origin
8583 (method url-fetch)
8584 (uri (pypi-uri "promise" version))
8585 (sha256
8586 (base32
8587 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8588 (build-system python-build-system)
8589 ;; Tests wants python-futures, which is a python2 only program, and
8590 ;; can't be found by python-promise at test time.
8591 (arguments `(#:tests? #f))
8592 (home-page "https://github.com/syrusakbary/promise")
8593 (synopsis "Promises/A+ implementation for Python")
8594 (description
8595 "Promises/A+ implementation for Python")
8596 (properties `((python2-variant . ,(delay python2-promise))))
8597 (license license:expat)))
8598
8599(define-public python2-promise
8600 (let ((promise (package-with-python2
8601 (strip-python2-variant python-promise))))
8602 (package (inherit promise)
8603 (arguments (substitute-keyword-arguments (package-arguments promise)
8604 ((#:tests? _) #t)))
8605 (native-inputs
8606 `(("python2-futures" ,python2-futures)
8607 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8608 ,@(package-native-inputs promise))))))
8609
c18f6368
EF
8610(define-public python-urllib3
8611 (package
8612 (name "python-urllib3")
6178274d 8613 (version "1.18.1")
c18f6368
EF
8614 (source
8615 (origin
8616 (method url-fetch)
8617 (uri (pypi-uri "urllib3" version))
8618 (sha256
8619 (base32
6178274d 8620 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8621 (build-system python-build-system)
8622 (arguments `(#:tests? #f))
8623 (native-inputs
f3b98f4f 8624 `(;; some packages for tests
c18f6368
EF
8625 ("python-nose" ,python-nose)
8626 ("python-mock" ,python-mock)
8627 ("python-tornado" ,python-tornado)))
8628 (propagated-inputs
8322749a 8629 `(;; extra packages for https security
c18f6368
EF
8630 ("python-certifi" ,python-certifi)
8631 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8632 ("python-pyasn1" ,python-pyasn1)
8633 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8634 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8635 (synopsis "HTTP library with thread-safe connection pooling")
8636 (description
8637 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8638can reuse the same socket connection for multiple requests, it can POST files,
8639supports url redirection and retries, and also gzip and deflate decoding.")
8640 (license license:expat)))
8641
8642(define-public python2-urllib3
8643 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8644
8645(define-public python-colorama
8646 (package
8647 (name "python-colorama")
f92576f9 8648 (version "0.3.7")
2b2f2fc1
DT
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "colorama" version))
8653 (sha256
8654 (base32
f92576f9 8655 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 8656 (build-system python-build-system)
46e110cc 8657 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
8658 (description "Colorama is a Python library for rendering colored terminal
8659text.")
8660 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8661 (license license:bsd-3)))
2b2f2fc1
DT
8662
8663(define-public python2-colorama
8664 (package-with-python2 python-colorama))
f5bcec6e
DT
8665
8666(define-public python-rsa
8667 (package
8668 (name "python-rsa")
ecd68c53 8669 (version "3.4.2")
f5bcec6e
DT
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "rsa" version))
8674 (sha256
8675 (base32
ecd68c53 8676 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8677 (build-system python-build-system)
f22efa01 8678 (propagated-inputs
f3b98f4f 8679 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8680 (synopsis "Pure-Python RSA implementation")
8681 (description "Python-RSA is a pure-Python RSA implementation. It supports
8682encryption and decryption, signing and verifying signatures, and key
8683generation according to PKCS#1 version 1.5. It can be used as a Python
8684library as well as on the command line.")
8685 (home-page "http://stuvel.eu/rsa")
3f641af0 8686 (license license:asl2.0)))
f5bcec6e
DT
8687
8688(define-public python2-rsa
8689 (package-with-python2 python-rsa))
c0aacfa5
DT
8690
8691(define-public python-pluggy
8692 (package
8693 (name "python-pluggy")
8694 (version "0.3.1")
8695 (source
8696 (origin
8697 (method url-fetch)
8698 (uri (pypi-uri "pluggy" version))
8699 (sha256
8700 (base32
8701 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8702 (build-system python-build-system)
c0aacfa5
DT
8703 (synopsis "Plugin and hook calling mechanism for Python")
8704 (description "Pluggy is an extraction of the plugin manager as used by
8705Pytest but stripped of Pytest specific details.")
8706 (home-page "https://pypi.python.org/pypi/pluggy")
8707 (license license:expat)))
8708
8709(define-public python2-pluggy
8710 (package-with-python2 python-pluggy))
a4af21ca
DT
8711
8712(define-public python-tox
8713 (package
8714 (name "python-tox")
8715 (version "2.3.1")
8716 (source
8717 (origin
8718 (method url-fetch)
8719 (uri (pypi-uri "tox" version))
8720 (sha256
8721 (base32
8722 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8723 (build-system python-build-system)
8724 (arguments
7ba07edf
HG
8725 ;; FIXME: Tests require pytest-timeout, which itself requires
8726 ;; pytest>=2.8.0 for installation.
a4af21ca 8727 '(#:tests? #f))
482d9591
HG
8728 (propagated-inputs
8729 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8730 ("python-py" ,python-py)
482d9591 8731 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8732 (native-inputs
7ba07edf
HG
8733 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8734 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8735 (home-page "http://tox.testrun.org/")
8736 (synopsis "Virtualenv-based automation of test activities")
8737 (description "Tox is a generic virtualenv management and test command line
8738tool. It can be used to check that a package installs correctly with
8739different Python versions and interpreters, or run tests in each type of
8740supported environment, or act as a frontend to continuous integration
8741servers.")
8742 (license license:expat)))
8743
8744(define-public python2-tox
8745 (package-with-python2 python-tox))
ba9da248
DT
8746
8747(define-public python-jmespath
8748 (package
8749 (name "python-jmespath")
8750 (version "0.9.0")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "jmespath" version))
8755 (sha256
8756 (base32
8757 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8758 (build-system python-build-system)
ba9da248
DT
8759 (synopsis "JSON Matching Expressions")
8760 (description "JMESPath (pronounced “james path”) is a Python library that
8761allows one to declaratively specify how to extract elements from a JSON
8762document.")
8763 (home-page "https://github.com/jmespath/jmespath.py")
8764 (license license:expat)))
8765
8766(define-public python2-jmespath
8767 (package-with-python2 python-jmespath))
935fcd5c
DT
8768
8769(define-public python-botocore
8770 (package
8771 (name "python-botocore")
0a7d96f8 8772 (version "1.5.10")
935fcd5c
DT
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "botocore" version))
8777 (sha256
8778 (base32
0a7d96f8 8779 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
935fcd5c 8780 (build-system python-build-system)
482d9591 8781 (propagated-inputs
935fcd5c
DT
8782 `(("python-dateutil" ,python-dateutil-2)
8783 ("python-docutils" ,python-docutils)
482d9591 8784 ("python-jmespath" ,python-jmespath)))
8fa6890b 8785 (native-inputs
482d9591 8786 `(("python-mock" ,python-mock)
935fcd5c 8787 ("python-nose" ,python-nose)
482d9591 8788 ("behave" ,behave)
935fcd5c 8789 ("python-tox" ,python-tox)
482d9591 8790 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8791 (home-page "https://github.com/boto/botocore")
8792 (synopsis "Low-level interface to AWS")
8793 (description "Botocore is a Python library that provides a low-level
8794interface to the Amazon Web Services (AWS) API.")
3f641af0 8795 (license license:asl2.0)))
935fcd5c
DT
8796
8797(define-public python2-botocore
8798 (package-with-python2 python-botocore))
f861b8b8
DT
8799
8800(define-public awscli
8801 (package
8802 (name "awscli")
a9c15e8b 8803 (version "1.11.47")
f861b8b8
DT
8804 (source
8805 (origin
8806 (method url-fetch)
d5ccf71e 8807 (uri (pypi-uri name version))
f861b8b8
DT
8808 (sha256
8809 (base32
a9c15e8b 8810 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
f861b8b8 8811 (build-system python-build-system)
482d9591 8812 (propagated-inputs
f861b8b8 8813 `(("python-colorama" ,python-colorama)
482d9591
HG
8814 ("python-botocore" ,python-botocore)
8815 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8816 ("python-docutils" ,python-docutils)
482d9591 8817 ("python-rsa" ,python-rsa)))
d4649177 8818 (native-inputs
482d9591 8819 `(("python-mock" ,python-mock)
f861b8b8 8820 ("python-nose" ,python-nose)
f861b8b8
DT
8821 ("python-sphinx" ,python-sphinx)
8822 ("python-tox" ,python-tox)
482d9591 8823 ("python-wheel" ,python-wheel)))
60a8be3a 8824 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
8825 (synopsis "Command line client for AWS")
8826 (description "AWS CLI provides a unified command line interface to the
8827Amazon Web Services (AWS) API.")
3f641af0 8828 (license license:asl2.0)))
6a44697d
LF
8829
8830(define-public python-hypothesis
8831 (package
8832 (name "python-hypothesis")
bea6d94d 8833 (version "3.1.0")
6a44697d
LF
8834 (source (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "hypothesis" version))
8837 (sha256
8838 (base32
bea6d94d 8839 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8840 (build-system python-build-system)
6a44697d
LF
8841 (propagated-inputs
8842 `(("python-flake8" ,python-flake8)
8843 ("python-pytest" ,python-pytest)))
8844 (synopsis "Library for property based testing")
8845 (description "Hypothesis is a library for testing your Python code against a
8846much larger range of examples than you would ever want to write by hand. It’s
8847based on the Haskell library, Quickcheck, and is designed to integrate
8848seamlessly into your existing Python unit testing work flow.")
8849 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8850 (license license:mpl2.0)
6f068e08 8851 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8852
8853(define-public python2-hypothesis
6f068e08
EF
8854 (let ((hypothesis (package-with-python2
8855 (strip-python2-variant python-hypothesis))))
8856 (package (inherit hypothesis)
8857 (native-inputs
f3b98f4f 8858 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8859
8860(define-public python-pytest-subtesthack
8861 (package
8862 (name "python-pytest-subtesthack")
8863 (version "0.1.1")
8864 (source (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "pytest-subtesthack" version))
8867 (sha256
8868 (base32
8869 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8870 (build-system python-build-system)
7517e73c
LF
8871 (propagated-inputs
8872 `(("python-pytest" ,python-pytest)))
8873 (synopsis "Set-up and tear-down fixtures for unit tests")
8874 (description "This plugin allows you to set up and tear down fixtures within
8875unit test functions that use @code{py.test}. This is useful for using
8876@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8877function multiple times, without setting up or tearing down fixture state as is
8878normally the case.")
8879 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8880 (license license:unlicense)))
7517e73c
LF
8881
8882(define-public python2-pytest-subtesthack
8883 (package-with-python2 python-pytest-subtesthack))
0bdc1671 8884
7637de23 8885(define-public python-xdo
0bdc1671 8886 (package
7637de23 8887 (name "python-xdo")
e871c332 8888 (version "0.3")
0bdc1671
CAW
8889 (source (origin
8890 (method url-fetch)
8891 (uri (string-append
8892 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8893 "python-xdo_" version ".orig.tar.gz"))
8894 (sha256
8895 (base32
e871c332 8896 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
8897 (build-system python-build-system)
8898 (arguments
736cfc10
SB
8899 '(#:phases
8900 (modify-phases %standard-phases
8901 (add-before 'install 'patch-libxdo-path
8902 ;; Hardcode the path of dynamically loaded libxdo library.
8903 (lambda* (#:key inputs #:allow-other-keys)
8904 (let ((libxdo (string-append
8905 (assoc-ref inputs "xdotool")
8906 "/lib/libxdo.so")))
8907 (substitute* "xdo/_xdo.py"
8908 (("find_library\\(\"xdo\"\\)")
8909 (simple-format #f "\"~a\"" libxdo)))
8910 #t))))
8911 #:tests? #f)) ; no tests provided
0b5e0863
SB
8912 (propagated-inputs
8913 `(("python-six" ,python-six)))
0bdc1671
CAW
8914 (inputs
8915 `(("xdotool" ,xdotool)
8916 ("libX11" ,libx11)))
8917 (home-page "https://tracker.debian.org/pkg/python-xdo")
8918 (synopsis "Python library for simulating X11 keyboard/mouse input")
8919 (description "Provides bindings to libxdo for manipulating X11 via simulated
8920input. (Note that this is mostly a legacy library; you may wish to look at
8921python-xdo for newer bindings.)")
3f641af0 8922 (license license:bsd-3)))
0bdc1671 8923
7637de23
LF
8924(define-public python2-xdo
8925 (package-with-python2 python-xdo))
8926
cb34dc6c
CAW
8927(define-public python-wtforms
8928 (package
8929 (name "python-wtforms")
8930 (version "2.1")
8931 (source
8932 (origin
8933 (method url-fetch)
8934 (uri (pypi-uri "WTForms" version ".zip"))
8935 (sha256
8936 (base32
8937 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8938 (build-system python-build-system)
13c4d874
EF
8939 (arguments
8940 '(#:phases
8941 (modify-phases %standard-phases
8942 (add-after 'unpack 'remove-django-test
8943 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8944 (lambda _
8945 (substitute*
8946 "tests/runtests.py"
8947 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8948 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8949 #t)))))
cb34dc6c
CAW
8950 (native-inputs
8951 `(("unzip" ,unzip)))
8952 (home-page "http://wtforms.simplecodes.com/")
8953 (synopsis
8954 "Form validation and rendering library for Python web development")
8955 (description
8956 "WTForms is a flexible forms validation and rendering library
8957for Python web development. It is very similar to the web form API
8958available in Django, but is a standalone package.")
f210e944 8959 (license license:bsd-3)))
cb34dc6c
CAW
8960
8961(define-public python2-wtforms
f210e944 8962 (package-with-python2 python-wtforms))
50aaec25
DT
8963
8964(define-public python-mako
8965 (package
8966 (name "python-mako")
3753f2e6 8967 (version "1.0.6")
50aaec25
DT
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "Mako" version))
8972 (sha256
8973 (base32
3753f2e6 8974 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 8975 (build-system python-build-system)
482d9591
HG
8976 (propagated-inputs
8977 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8978 (native-inputs
482d9591 8979 `(("python-mock" ,python-mock)
50aaec25
DT
8980 ("python-nose" ,python-nose)))
8981 (home-page "http://www.makotemplates.org/")
8982 (synopsis "Templating language for Python")
8983 (description "Mako is a templating language for Python that compiles
8984templates into Python modules.")
f210e944 8985 (license license:expat)))
50aaec25
DT
8986
8987(define-public python2-mako
f210e944 8988 (package-with-python2 python-mako))
ae00a41f
CAW
8989
8990(define-public python-waitress
8991 (package
8992 (name "python-waitress")
8993 (version "0.8.10")
8994 (source
8995 (origin
8996 (method url-fetch)
8997 (uri (pypi-uri "waitress" version))
8998 (sha256
8999 (base32
9000 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9001 (build-system python-build-system)
9002 (home-page "https://github.com/Pylons/waitress")
9003 (synopsis "Waitress WSGI server")
9004 (description "Waitress is meant to be a production-quality pure-Python WSGI
9005server with very acceptable performance.")
f210e944 9006 (license license:zpl2.1)))
ae00a41f
CAW
9007
9008(define-public python2-waitress
f210e944 9009 (package-with-python2 python-waitress))
778a284b
CAW
9010
9011(define-public python-wsgiproxy2
9012 (package
9013 (name "python-wsgiproxy2")
9014 (version "0.4.2")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9019 (sha256
9020 (base32
9021 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9022 (build-system python-build-system)
e359b31a
LF
9023 (arguments
9024 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9025 ;; support Python 3:
9026 ;; https://github.com/benoitc/restkit/issues/140
9027 #:tests? #f))
778a284b
CAW
9028 (native-inputs
9029 `(("unzip" ,unzip)
9030 ("python-nose" ,python-nose)
9031 ("python-coverage" ,python-coverage)))
9032 (propagated-inputs
9033 `(("python-six" ,python-six)
9034 ("python-webob" ,python-webob)))
9035 (home-page
9036 "https://github.com/gawel/WSGIProxy2/")
9037 (synopsis "WSGI Proxy with various http client backends")
9038 (description "WSGI turns HTTP requests into WSGI function calls.
9039WSGIProxy turns WSGI function calls into HTTP requests.
9040It also includes code to sign requests and pass private data,
9041and to spawn subprocesses to handle requests.")
f210e944 9042 (license license:expat)))
778a284b
CAW
9043
9044(define-public python2-wsgiproxy2
f210e944 9045 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9046
9047(define-public python-pastedeploy
9048 (package
9049 (name "python-pastedeploy")
9050 (version "1.5.2")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "PasteDeploy" version))
9055 (sha256
9056 (base32
9057 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9058 (build-system python-build-system)
9059 (native-inputs
9060 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9061 (home-page "http://pythonpaste.org/deploy/")
9062 (synopsis
9063 "Load, configure, and compose WSGI applications and servers")
9064 (description
9065 "This tool provides code to load WSGI applications and servers from URIs;
9066these URIs can refer to Python Eggs for INI-style configuration files. Paste
9067Script provides commands to serve applications based on this configuration
9068file.")
9069 (license license:expat)))
9070
9071(define-public python2-pastedeploy
9072 (package-with-python2 python-pastedeploy))
1cf53652 9073
c4a7904c
CAW
9074(define-public python-paste
9075 (package
9076 (name "python-paste")
ba1731da 9077 (version "2.0.3")
c4a7904c
CAW
9078 (source
9079 (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "Paste" version))
9082 (sha256
9083 (base32
ba1731da 9084 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9085 (patches (search-patches "python-paste-remove-website-test.patch"
9086 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9087 (build-system python-build-system)
9088 (native-inputs
9089 `(("python-nose" ,python-nose)))
9090 (propagated-inputs
f3b98f4f 9091 `(("python-six" ,python-six)))
c4a7904c
CAW
9092 (home-page "http://pythonpaste.org")
9093 (synopsis
9094 "Python web development tools, focusing on WSGI")
9095 (description
9096 "Paste provides a variety of web development tools and middleware which
9097can be nested together to build web applications. Paste's design closely
9098follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9099 (license license:expat)))
c4a7904c
CAW
9100
9101(define-public python2-paste
ba1731da 9102 (package-with-python2 python-paste))
c4a7904c 9103
a8f20f63
CAW
9104(define-public python-pastescript
9105 (package
9106 (name "python-pastescript")
9107 (version "2.0.2")
9108 (source
9109 (origin
9110 (method url-fetch)
9111 (uri (pypi-uri "PasteScript" version))
9112 (sha256
9113 (base32
9114 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9115 (build-system python-build-system)
9116 (native-inputs
9117 `(("python-nose" ,python-nose)))
9118 (propagated-inputs
f3b98f4f 9119 `(("python-paste" ,python-paste)
a8f20f63
CAW
9120 ("python-pastedeploy" ,python-pastedeploy)))
9121 (home-page "http://pythonpaste.org/script/")
9122 (arguments
9123 '(;; Unfortunately, this requires the latest unittest2,
9124 ;; but that requires traceback2 which requires linecache2 which requires
9125 ;; unittest2. So we're skipping tests for now.
9126 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9127 ;; so in theory we could get around this situation somehow.)
9128 #:tests? #f))
9129 (synopsis
9130 "Pluggable command line tool for serving web applications and more")
9131 (description
9132 "PasteScript is a plugin-friendly command line tool which provides a
9133variety of features, from launching web applications to bootstrapping project
9134layouts.")
9135 (license license:expat)))
9136
9137(define-public python2-pastescript
9138 (package-with-python2 python-pastescript))
9139
1cf53652
CAW
9140(define-public python-pyquery
9141 (package
9142 (name "python-pyquery")
ab0c3429 9143 (version "1.2.17")
1cf53652
CAW
9144 (source
9145 (origin
9146 (method url-fetch)
9147 (uri (pypi-uri "pyquery" version))
9148 (sha256
9149 (base32
ab0c3429 9150 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9151 (build-system python-build-system)
2ddbfa8c
LF
9152 (native-inputs
9153 `(("python-webob" ,python-webob)
9154 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9155 (propagated-inputs
9156 `(("python-lxml" ,python-lxml)
9157 ("python-cssselect" ,python-cssselect)))
9158 (home-page "https://github.com/gawel/pyquery")
9159 (synopsis "Make jQuery-like queries on xml documents")
9160 (description "pyquery allows you to make jQuery queries on xml documents.
9161The API is as much as possible the similar to jQuery. pyquery uses lxml for
9162fast xml and html manipulation.")
f210e944 9163 (license license:bsd-3)))
1cf53652
CAW
9164
9165(define-public python2-pyquery
f210e944 9166 (package-with-python2 python-pyquery))
aa6313d6
CAW
9167
9168(define-public python-webtest
9169 (package
9170 (name "python-webtest")
9171 (version "2.0.20")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "WebTest" version))
9176 (sha256
9177 (base32
9178 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9179 (build-system python-build-system)
9180 (arguments
9181 `(;; Unfortunately we have to disable tests!
9182 ;; This release of WebTest is pinned to python-nose < 1.3,
9183 ;; but older versions of python-nose are plagued with the following
9184 ;; bug(s), which rears its ugly head during test execution:
9185 ;; https://github.com/nose-devs/nose/issues/759
9186 ;; https://github.com/nose-devs/nose/pull/811
9187 #:tests? #f))
9188 ;; Commented out code is no good, but in this case, once tests
9189 ;; are ready to be enabled again, we should put the following
9190 ;; in place:
9191 ;; (native-inputs
9192 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9193 ;; ; but see above comment
9194 ;; ("python-coverage" ,python-coverage)
9195 ;; ("python-mock" ,python-mock)
9196 ;; ("python-pastedeploy" ,python-pastedeploy)
9197 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9198 ;; ("python-pyquery" ,python-pyquery)))
9199 (propagated-inputs
9200 `(("python-waitress" ,python-waitress)
9201 ("python-webob" ,python-webob)
9202 ("python-six" ,python-six)
9203 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9204 (home-page "http://webtest.pythonpaste.org/")
9205 (synopsis "Helper to test WSGI applications")
9206 (description "Webtest allows you to test your Python web applications
9207without starting an HTTP server. It supports anything that supports the
9208minimum of WSGI.")
f210e944 9209 (license license:expat)))
aa6313d6
CAW
9210
9211(define-public python2-webtest
f210e944 9212 (package-with-python2 python-webtest))
4cb122cd
CAW
9213
9214(define-public python-anyjson
9215 (package
9216 (name "python-anyjson")
9217 (version "0.3.3")
9218 (source
9219 (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "anyjson" version))
9222 (sha256
9223 (base32
9224 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9225 (build-system python-build-system)
9226 (arguments
9227 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9228 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9229 ;; whatever) so this transformation needs to be done before the tests
9230 ;; can be run. Maybe we could add a build step to transform beforehand
9231 ;; but it could be annoying/difficult.
9232 ;; We can enable tests for the Python 2 version, though, and do below.
9233 #:tests? #f))
9234 (home-page "http://bitbucket.org/runeh/anyjson/")
9235 (synopsis
9236 "Wraps best available JSON implementation in a common interface")
9237 (description
9238 "Anyjson loads whichever is the fastest JSON module installed
9239and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9240 (license license:bsd-3)
4cb122cd
CAW
9241 (properties `((python2-variant . ,(delay python2-anyjson))))))
9242
9243(define-public python2-anyjson
9244 (let ((anyjson (package-with-python2
9245 (strip-python2-variant python-anyjson))))
9246 (package
9247 (inherit anyjson)
9248 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9249 #:tests? #t
9250 ,@(package-arguments anyjson)))
00e10c6e 9251 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9252
9253(define-public python-amqp
9254 (package
9255 (name "python-amqp")
9256 (version "1.4.9")
9257 (source
9258 (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "amqp" version))
9261 (sha256
9262 (base32
9263 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9264 (build-system python-build-system)
9265 (native-inputs
9266 `(("python-nose" ,python-nose)
9267 ("python-mock" ,python-mock)))
9268 (home-page "http://github.com/celery/py-amqp")
9269 (synopsis
9270 "Low-level AMQP client for Python (fork of amqplib)")
9271 (description
9272 "This is a fork of amqplib which was originally written by Barry Pederson.
9273It is maintained by the Celery project, and used by kombu as a pure python
9274alternative when librabbitmq is not available.")
3f641af0 9275 (license license:lgpl2.1+)
8dfceab7
CAW
9276 (properties `((python2-variant . ,(delay python2-amqp))))))
9277
9278(define-public python2-amqp
9279 (let ((amqp (package-with-python2
9280 (strip-python2-variant python-amqp))))
9281 (package
9282 (inherit amqp)
9283 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9284 ;; unmaintained. Weirdly, does not do this on the python 3
9285 ;; version?
9286 #:tests? #f
00e10c6e 9287 ,@(package-arguments amqp))))))
7d387305
CAW
9288
9289(define-public python-kombu
9290 (package
9291 (name "python-kombu")
0cb59822 9292 (version "3.0.37")
7d387305
CAW
9293 (source
9294 (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "kombu" version))
9297 (sha256
9298 (base32
0cb59822 9299 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9300 (build-system python-build-system)
9301 (native-inputs
9302 `(("python-mock" ,python-mock)
9303 ("python-nose" ,python-nose)))
9304 (propagated-inputs
9305 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9306 ("python-amqp" ,python-amqp)
9307 ("python-redis" ,python-redis)))
7d387305
CAW
9308 (home-page "http://kombu.readthedocs.org")
9309 (synopsis "Message passing library for Python")
9310 (description "The aim of Kombu is to make messaging in Python as easy as
9311possible by providing an idiomatic high-level interface for the AMQ protocol,
9312and also provide proven and tested solutions to common messaging problems.
9313AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9314message orientation, queuing, routing, reliability and security, for which the
9315RabbitMQ messaging server is the most popular implementation.")
3f641af0 9316 (license license:bsd-3)
7d387305
CAW
9317 (properties `((python2-variant . ,(delay python2-kombu))))))
9318
9319(define-public python2-kombu
9320 (let ((kombu (package-with-python2
9321 (strip-python2-variant python-kombu))))
9322 (package
9323 (inherit kombu)
328bb95d
HG
9324 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9325 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9326
9327(define-public python-billiard
9328 (package
9329 (name "python-billiard")
a6bb9e44 9330 (version "3.3.0.23")
b6f0b9fb
CAW
9331 (source
9332 (origin
9333 (method url-fetch)
9334 (uri (pypi-uri "billiard" version))
9335 (sha256
9336 (base32
a6bb9e44 9337 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9338 (build-system python-build-system)
9339 (native-inputs
9340 `(("python-nose" ,python-nose)))
9341 (home-page "http://github.com/celery/billiard")
9342 (synopsis
9343 "Python multiprocessing fork with improvements and bugfixes")
9344 (description
9345 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9346multiprocessing package itself is a renamed and updated version of R Oudkerk's
9347pyprocessing package. This standalone variant is intended to be compatible with
9348Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9349 (license license:bsd-3)
b6f0b9fb
CAW
9350 (properties `((python2-variant . ,(delay python2-billiard))))))
9351
9352(define-public python2-billiard
9353 (let ((billiard (package-with-python2
9354 (strip-python2-variant python-billiard))))
9355 (package
9356 (inherit billiard)
00e10c6e 9357 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9358 ("python2-mock" ,python2-mock)
9359 ,@(package-native-inputs billiard))))))
22df6419
CAW
9360
9361(define-public python-celery
9362 (package
9363 (name "python-celery")
9ebe87fe 9364 (version "3.1.24")
22df6419
CAW
9365 (source
9366 (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "celery" version))
9369 (sha256
9370 (base32
9ebe87fe 9371 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9372 (build-system python-build-system)
9ebe87fe
LF
9373 (arguments
9374 `(#:phases
9375 (modify-phases %standard-phases
9376 ;; These tests break with Python 3.5:
9377 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9378 (replace 'check
9379 (lambda _
9380 (zero?
9381 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9382 (native-inputs
9383 `(("python-nose" ,python-nose)))
f22efa01 9384 (propagated-inputs
22df6419
CAW
9385 `(("python-pytz" ,python-pytz)
9386 ("python-billiard" ,python-billiard)
9387 ("python-kombu" ,python-kombu)))
9388 (home-page "http://celeryproject.org")
9389 (synopsis "Distributed Task Queue")
9390 (description "Celery is an asynchronous task queue/job queue based on
9391distributed message passing. It is focused on real-time operation, but
9392supports scheduling as well. The execution units, called tasks, are executed
9393concurrently on a single or more worker servers using multiprocessing,
9394Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9395synchronously (wait until ready).")
3f641af0 9396 (license license:bsd-3)
22df6419
CAW
9397 (properties `((python2-variant . ,(delay python2-celery))))))
9398
9399(define-public python2-celery
9400 (let ((celery (package-with-python2
9401 (strip-python2-variant python-celery))))
9402 (package
9403 (inherit celery)
00e10c6e 9404 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9405 ("python2-mock" ,python2-mock)
9406 ,@(package-native-inputs celery))))))
97e32948
CAW
9407
9408(define-public python-translitcodec
9409 (package
9410 (name "python-translitcodec")
9411 (version "0.4.0")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "translitcodec" version))
9416 (sha256
9417 (base32
9418 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9419 (build-system python-build-system)
9420 (arguments
9421 `(#:tests? #f)) ; no tests provided
9422 (home-page
9423 "https://github.com/claudep/translitcodec")
9424 (synopsis
9425 "Unicode to 8-bit charset transliteration codec")
9426 (description
9427 "This package contains codecs for transliterating ISO 10646 texts into
9428best-effort representations using smaller coded character sets (ASCII,
9429ISO 8859, etc.).")
f210e944 9430 (license license:expat)))
97e32948
CAW
9431
9432(define-public python2-translitcodec
f210e944 9433 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9434
9435(define-public python-editor
9436 (package
9437 (name "python-editor")
9438 (version "0.5")
9439 (source
9440 (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "python-editor" version))
9443 (sha256
9444 (base32
9445 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9446 (build-system python-build-system)
9447 (home-page
9448 "https://github.com/fmoo/python-editor")
9449 (synopsis
9450 "Programmatically open an editor, capture the result")
9451 (description
9452 "python-editor is a library that provides the editor module for
9453programmatically interfacing with your system's $EDITOR.")
f210e944 9454 (license license:asl2.0)))
0c3b90d4
CAW
9455
9456(define-public python2-editor
f210e944 9457 (package-with-python2 python-editor))
3276517c
LF
9458
9459(define-public python-sphinxcontrib-programoutput
9460 (package
9461 (name "python-sphinxcontrib-programoutput")
9462 (version "0.8")
9463 (source (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9466 (sha256
9467 (base32
9468 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9469 (build-system python-build-system)
9470 (propagated-inputs
a0a09859 9471 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9472 (synopsis "Sphinx extension to include program output")
9473 (description "A Sphinx extension to literally insert the output of arbitrary
9474commands into documents, helping you to keep your command examples up to date.")
9475 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9476 (license license:bsd-2)))
3276517c
LF
9477
9478(define-public python2-sphinxcontrib-programoutput
f210e944 9479 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9480
9481(define-public python-sphinx-repoze-autointerface
9482 (package
9483 (name "python-sphinx-repoze-autointerface")
328ae341 9484 (version "0.8")
548d7165
LF
9485 (source (origin
9486 (method url-fetch)
9487 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9488 (sha256
9489 (base32
328ae341 9490 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9491 (build-system python-build-system)
9492 (propagated-inputs
47c7dc4a 9493 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9494 ("python-zope-interface" ,python-zope-interface)))
9495 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9496 (description "This package defines an extension for the Sphinx documentation
9497system. The extension allows generation of API documentation by
9498introspection of @code{zope.interface} instances in code.")
9499 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9500 (license license:repoze)))
548d7165
LF
9501
9502(define-public python2-sphinx-repoze-autointerface
9503 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9504
9505(define-public python-psycopg2
9506 (package
9507 (name "python-psycopg2")
9508 (version "2.6.1")
9509 (source
9510 (origin
9511 (method url-fetch)
9512 (uri (pypi-uri "psycopg2" version))
9513 (sha256
9514 (base32
9515 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9516 (build-system python-build-system)
9517 (arguments
9518 ;; Tests would require a postgresql database "psycopg2_test"
9519 ;; and a running postgresql database management service.
9520 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9521 (inputs
9522 `(("postgresql" ,postgresql))) ; libpq
9523 (home-page "http://initd.org/psycopg/")
9524 (synopsis "Python PostgreSQL adapter")
9525 (description
9526 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9527 (license license:lgpl3+)))
b31fbea5
DM
9528
9529(define-public python2-psycopg2
f210e944 9530 (package-with-python2 python-psycopg2))
eed1a61f
LF
9531
9532(define-public python-vobject
9533 (package
9534 (name "python-vobject")
9bed9b15 9535 (version "0.9.2")
eed1a61f
LF
9536 (source (origin
9537 (method url-fetch)
9538 (uri (pypi-uri "vobject" version))
9539 (sha256
9540 (base32
9bed9b15 9541 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9542 (build-system python-build-system)
a9871b7b
LF
9543 (arguments
9544 '(;; The test suite relies on some non-portable Windows interfaces.
9545 #:tests? #f))
f22efa01 9546 (propagated-inputs
eed1a61f
LF
9547 `(("python-dateutil-2" ,python-dateutil-2)
9548 ("python-pyicu" ,python-pyicu)))
9549 (synopsis "Parse and generate vCard and vCalendar files")
9550 (description "Vobject is intended to be a full featured Python package for
9551parsing and generating vCard and vCalendar files. Currently, iCalendar files
9552are supported and well tested. vCard 3.0 files are supported, and all data
9553should be imported, but only a few components are understood in a sophisticated
9554way.")
9555 (home-page "http://eventable.github.io/vobject/")
f210e944 9556 (license license:asl2.0)))
eed1a61f
LF
9557
9558(define-public python2-vobject
f210e944 9559 (package-with-python2 python-vobject))
cedac813
LF
9560
9561(define-public python-munkres
9562 (package
9563 (name "python-munkres")
38e81a2c 9564 (version "1.0.8")
cedac813
LF
9565 (source (origin
9566 (method url-fetch)
9567 (uri (pypi-uri "munkres" version))
9568 (sha256
9569 (base32
38e81a2c 9570 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9571 (build-system python-build-system)
9572 (arguments
9573 '(#:tests? #f)) ; no test suite
9574 (home-page "http://software.clapper.org/munkres/")
9575 (synopsis "Implementation of the Munkres algorithm")
9576 (description "The Munkres module provides an implementation of the Munkres
9577algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9578useful for solving the Assignment Problem.")
3f641af0 9579 (license license:bsd-3)))
cedac813
LF
9580
9581(define-public python2-munkres
9582 (package-with-python2 python-munkres))
f3b3d78f
LF
9583
9584(define-public python-flask
9585 (package
9586 (name "python-flask")
c6c80104 9587 (version "0.11.1")
f3b3d78f
LF
9588 (source (origin
9589 (method url-fetch)
9590 (uri (pypi-uri "Flask" version))
9591 (sha256
9592 (base32
c6c80104 9593 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9594 (build-system python-build-system)
9595 (propagated-inputs
9596 `(("python-itsdangerous" ,python-itsdangerous)
9597 ("python-jinja2" ,python-jinja2)
8f35c030 9598 ("python-click" ,python-click)
f3b3d78f
LF
9599 ("python-werkzeug" ,python-werkzeug)))
9600 (home-page "https://github.com/mitsuhiko/flask/")
9601 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9602 (description "Flask is a micro web framework based on the Werkzeug toolkit
9603and Jinja2 template engine. It is called a micro framework because it does not
9604presume or force a developer to use a particular tool or library.")
f210e944 9605 (license license:bsd-3)))
f3b3d78f
LF
9606
9607(define-public python2-flask
f210e944 9608 (package-with-python2 python-flask))
603d665b 9609
a7ad802b 9610(define-public python-flask-wtf
9611 (package
9612 (name "python-flask-wtf")
9613 (version "0.13.1")
9614 (source
9615 (origin
9616 (method url-fetch)
9617 (uri (pypi-uri "Flask-WTF" version))
9618 (sha256
9619 (base32
9620 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9621 (build-system python-build-system)
9622 (propagated-inputs
9623 `(("python-flask-babel" ,python-flask-babel)
9624 ("python-babel" ,python-babel)
9625 ("python-wtforms" ,python-wtforms)))
9626 (native-inputs
9627 `(("python-nose" ,python-nose)))
9628 (home-page "https://github.com/lepture/flask-wtf")
9629 (synopsis "Simple integration of Flask and WTForms")
9630 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9631upload, and reCAPTCHA.")
9632 (license license:bsd-3)))
9633
9634(define-public python2-flask-wtf
9635 (package-with-python2 python-flask-wtf))
9636
a2c7d88e 9637(define-public python-flask-multistatic
9638 (package
9639 (name "python-flask-multistatic")
9640 (version "1.0")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "flask-multistatic" version))
9645 (sha256
9646 (base32
9647 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9648 (build-system python-build-system)
9649 (propagated-inputs
9650 `(("python-flask" ,python-flask)))
9651 (home-page "https://pagure.io/flask-multistatic")
9652 (synopsis "Flask plugin to allow overriding static files")
9653 (description "@code{flask-multistatic} is a flask plugin that adds support
9654for overriding static files.")
9655 (license license:gpl3+)))
9656
9657(define-public python2-flask-multistatic
9658 (package-with-python2 python-flask-multistatic))
9659
603d665b
LF
9660(define-public python-cookies
9661 (package
9662 (name "python-cookies")
9663 (version "2.2.1")
9664 (source (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "cookies" version))
9667 (sha256
9668 (base32
9669 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9670 (build-system python-build-system)
9671 (arguments
9672 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9673 #:tests? #f))
9674 (native-inputs
9675 `(("python-pytest" ,python2-pytest)))
9676 (synopsis "HTTP cookie parser and renderer")
9677 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9678Python.")
9679 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9680 (license license:expat)))
603d665b
LF
9681
9682(define-public python2-cookies
f210e944 9683 (package-with-python2 python-cookies))
0efde7d6
LF
9684
9685(define-public python-responses
9686 (package
9687 (name "python-responses")
9688 (version "0.5.1")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (pypi-uri "responses" version))
9692 (sha256
9693 (base32
9694 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9695 (build-system python-build-system)
9696 (arguments
9697 `(;; Test suite is not distributed:
9698 ;; https://github.com/getsentry/responses/issues/38
9699 #:tests? #f))
9700 (native-inputs
d8ea5f2f 9701 `(("python-mock" ,python-mock)))
0efde7d6
LF
9702 (propagated-inputs
9703 `(("python-requests" ,python-requests)
d8ea5f2f 9704 ("python-cookies" ,python-cookies)
0efde7d6
LF
9705 ("python-six" ,python-six)))
9706 (home-page "https://github.com/getsentry/responses")
9707 (synopsis "Utility for mocking out the `requests` Python library")
9708 (description "A utility library for mocking out the `requests` Python
9709library.")
f210e944 9710 (license license:asl2.0)))
0efde7d6
LF
9711
9712(define-public python2-responses
f210e944 9713 (package-with-python2 python-responses))
76b94885 9714
b7afd018
RW
9715(define-public python-whoosh
9716 (package
9717 (name "python-whoosh")
9718 (version "2.7.4")
9719 (source
9720 (origin
9721 (method url-fetch)
9722 (uri (pypi-uri "Whoosh" version))
9723 (sha256
9724 (base32
9725 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9726 (build-system python-build-system)
9727 (native-inputs
f3b98f4f 9728 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9729 (home-page "http://bitbucket.org/mchaput/whoosh")
9730 (synopsis "Full text indexing, search, and spell checking library")
9731 (description
9732 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9733checking library.")
9734 (license license:bsd-2)))
9735
9736(define-public python2-whoosh
9737 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9738 (package (inherit whoosh)
9739 (propagated-inputs
9740 `(("python2-backport-ssl-match-hostname"
9741 ,python2-backport-ssl-match-hostname)
9742 ,@(package-propagated-inputs whoosh))))))
9743
76b94885
LF
9744(define-public python-pathlib
9745 (package
9746 (name "python-pathlib")
9747 (version "1.0.1")
9748 (source (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "pathlib" version))
9751 (sha256
9752 (base32
9753 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9754 (build-system python-build-system)
92a312dc
RW
9755 ;; The tests depend on the internal "test" module, which does not provide
9756 ;; a stable interface.
9757 (arguments `(#:tests? #f))
76b94885 9758 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9759 (synopsis "Object-oriented file system paths")
9760 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9761It offers the following advantages over using string objects:
9762
9763@enumerate
9764@item No more cumbersome use of os and os.path functions. Everything can
9765be done easily through operators, attribute accesses, and method calls.
9766@item Embodies the semantics of different path types. For example,
9767comparing Windows paths ignores casing.
9768@item Well-defined semantics, eliminating any inconsistencies or
9769ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9770@end enumerate
9771
9772Note: In Python 3.4, pathlib is now part of the standard library. For other
9773Python versions please consider python-pathlib2 instead, which tracks the
9774standard library module. This module (python-pathlib) isn't maintained
9775anymore.")
76b94885
LF
9776 (license license:expat)))
9777
9778(define-public python2-pathlib
9779 (package-with-python2 python-pathlib))
25a7db0a 9780
b7703c81
HG
9781(define-public python2-pathlib2
9782 (package
9783 (name "python2-pathlib2")
9784 (version "2.1.0")
9785 (source (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "pathlib2" version))
9788 (sha256
9789 (base32
9790 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9791 (build-system python-build-system)
49a531f5
HG
9792 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9793 ;; version is 3.4 which already includes this package as part of the
9794 ;; standard library.
b7703c81
HG
9795 (arguments
9796 `(#:python ,python-2))
9797 (native-inputs
f3b98f4f 9798 `(("python2-six" ,python2-six)))
b7703c81
HG
9799 (home-page "http://pypi.python.org/pypi/pathlib2/")
9800 (synopsis "Object-oriented file system paths - backport of standard
9801pathlib module")
9802 (description "The goal of pathlib2 is to provide a backport of standard
9803pathlib module which tracks the standard library module, so all the newest
9804features of the standard pathlib can be used also on older Python versions.
9805
9806Pathlib offers a set of classes to handle file system paths. It offers the
9807following advantages over using string objects:
9808
9809@enumerate
9810@item No more cumbersome use of os and os.path functions. Everything can
9811be done easily through operators, attribute accesses, and method calls.
9812@item Embodies the semantics of different path types. For example,
9813comparing Windows paths ignores casing.
9814@item Well-defined semantics, eliminating any inconsistencies or
9815ambiguities (forward vs. backward slashes, etc.).
9816@end enumerate")
9817 (license license:expat)))
9818
25a7db0a
LF
9819(define-public python-jellyfish
9820 (package
9821 (name "python-jellyfish")
8c4964dd 9822 (version "0.5.6")
25a7db0a
LF
9823 (source (origin
9824 (method url-fetch)
9825 (uri (pypi-uri "jellyfish" version))
9826 (sha256
9827 (base32
8c4964dd 9828 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9829 (build-system python-build-system)
9830 (native-inputs
9831 `(("python-pytest" ,python-pytest)))
9832 (home-page "https://github.com/jamesturk/jellyfish")
9833 (synopsis "Approximate and phonetic matching of strings")
9834 (description "Jellyfish uses a variety of string comparison and phonetic
9835encoding algorithms to do fuzzy string matching.")
3f641af0 9836 (license license:bsd-2)
25a7db0a
LF
9837 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9838
9839(define-public python2-jellyfish
9840 (let ((jellyfish (package-with-python2
9841 (strip-python2-variant python-jellyfish))))
9842 (package (inherit jellyfish)
00e10c6e 9843 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9844 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9845
9846(define-public python2-unicodecsv
9847 (package
9848 (name "python2-unicodecsv")
9849 (version "0.14.1")
9850 (source (origin
9851 (method url-fetch)
9852 ;; The test suite is not included in the PyPi release.
9853 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9854 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9855 "archive/" version ".tar.gz"))
9856 (file-name (string-append name "-" version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9860 (build-system python-build-system)
9861 (arguments
9862 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9863 #:python ,python-2))
9864 (native-inputs
f3b98f4f 9865 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9866 (home-page "https://github.com/jdunck/python-unicodecsv")
9867 (synopsis "Unicode CSV module for Python 2")
9868 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9869module, adding support for Unicode strings.")
3f641af0 9870 (license license:bsd-2)))
064503aa
LF
9871
9872(define-public python-rarfile
9873 (package
9874 (name "python-rarfile")
67824447 9875 (version "2.8")
064503aa
LF
9876 (source (origin
9877 (method url-fetch)
9878 (uri (pypi-uri "rarfile" version))
9879 (sha256
9880 (base32
67824447 9881 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9882 (build-system python-build-system)
9883 (arguments
9884 '(#:phases
9885 (modify-phases %standard-phases
9886 (replace 'check
9887 ;; Many tests fail, but the installation proceeds.
9888 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9889 (native-inputs
9890 `(("which" ,which))) ; required for tests
9891 (propagated-inputs
9892 `(("libarchive" ,libarchive)))
9893 (home-page "https://github.com/markokr/rarfile")
9894 (synopsis "RAR archive reader for Python")
9895 (description "This is Python module for RAR archive reading. The interface
9896is made as zipfile like as possible.")
3f641af0 9897 (license license:isc)))
064503aa
LF
9898
9899(define-public python2-rarfile
9900 (package-with-python2 python-rarfile))
daeeea71
CM
9901
9902(define-public python-magic
9903 (package
9904 (name "python-magic")
9905 (version "0.4.3")
9906 (source
9907 (origin
9908 (method url-fetch)
9909 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9910 version ".tar.gz"))
9911 (sha256
9912 (base32
9913 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9914 (file-name (string-append name "-" version "-checkout"))))
9915 (build-system python-build-system)
9916 (arguments
9917 ;; The tests are unreliable, so don't run them. The tests fail
9918 ;; under Python3 because they were written for Python2 and
9919 ;; contain import statements that do not work in Python3. One of
9920 ;; the tests fails under Python2 because its assertions are
9921 ;; overly stringent; it relies on comparing output strings which
9922 ;; are brittle and can change depending on the version of
9923 ;; libmagic being used and the system on which the test is
9924 ;; running. In my case, under GuixSD 0.10.0, only one test
9925 ;; failed, and it seems to have failed only because the version
9926 ;; of libmagic that is packaged in Guix outputs a slightly
9927 ;; different (but not wrong) string than the one that the test
9928 ;; expected.
9929 '(#:tests? #f
9930 #:phases (modify-phases %standard-phases
9931 ;; Replace a specific method call with a hard-coded
9932 ;; path to the necessary libmagic.so file in the
9933 ;; store. If we don't do this, then the method call
9934 ;; will fail to find the libmagic.so file, which in
9935 ;; turn will cause any application using
9936 ;; python-magic to fail.
9937 (add-before 'build 'hard-code-path-to-libmagic
9938 (lambda* (#:key inputs #:allow-other-keys)
9939 (let ((file (assoc-ref inputs "file")))
9940 (substitute* "magic.py"
9941 (("ctypes.util.find_library\\('magic'\\)")
9942 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9943 #t)))
9944 (add-before 'install 'disable-egg-compression
9945 (lambda _
9946 (let ((port (open-file "setup.cfg" "a")))
9947 (display "\n[easy_install]\nzip_ok = 0\n"
9948 port)
9949 (close-port port)
9950 #t))))))
daeeea71
CM
9951 (inputs
9952 ;; python-magic needs to be able to find libmagic.so.
9953 `(("file" ,file)))
9954 (home-page "https://github.com/ahupp/python-magic")
9955 (synopsis "File type identification using libmagic")
9956 (description
9957 "This module uses ctypes to access the libmagic file type
9958identification library. It makes use of the local magic database and
9959supports both textual and MIME-type output. Note that this module and
9960the python-file module both provide a \"magic.py\" file; these two
9961modules, which are different and were developed separately, both serve
9962the same purpose: to provide Python bindings for libmagic.")
9963 (license license:expat)))
9964
9965(define-public python2-magic
9966 (package-with-python2 python-magic))
12af303f
CM
9967
9968(define-public python2-s3cmd
9969 (package
9970 (name "python2-s3cmd")
9971 (version "1.6.1")
9972 (source
9973 (origin
9974 (method url-fetch)
de67e922 9975 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9976 "s3cmd-" version ".tar.gz"))
9977 (sha256
9978 (base32
9979 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9980 (build-system python-build-system)
9981 (arguments
9982 ;; s3cmd is written for python2 only and contains no tests.
9983 `(#:python ,python-2
9984 #:tests? #f))
f22efa01 9985 (propagated-inputs
12af303f
CM
9986 `(("python2-dateutil" ,python2-dateutil)
9987 ;; The python-file package also provides a magic.py module.
9988 ;; This is an unfortunate state of affairs; however, s3cmd
9989 ;; fails to install if it cannot find specifically the
9990 ;; python-magic package. Thus we include it, instead of using
9991 ;; python-file. Ironically, s3cmd sometimes works better
9992 ;; without libmagic bindings at all:
9993 ;; https://github.com/s3tools/s3cmd/issues/198
9994 ("python2-magic" ,python2-magic)))
9995 (home-page "http://s3tools.org/s3cmd")
9996 (synopsis "Command line tool for S3-compatible storage services")
9997 (description
9998 "S3cmd is a command line tool for uploading, retrieving and managing data
9999in storage services that are compatible with the Amazon Simple Storage
10000Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10001GnuPG encryption, and more. It also supports management of Amazon's
10002CloudFront content delivery network.")
3f641af0 10003 (license license:gpl2+)))
4323a5f0
AE
10004
10005(define-public python-pkgconfig
10006 (package
10007 (name "python-pkgconfig")
10008 (version "1.1.0")
10009 (source
10010 (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "pkgconfig" version))
10013 (sha256
10014 (base32
10015 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10016 (build-system python-build-system)
10017 (native-inputs
f3b98f4f 10018 `(("python-nose" ,python-nose)))
4323a5f0
AE
10019 (inputs
10020 `(("pkg-config" ,pkg-config)))
10021 (arguments
10022 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10023 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10024 #:tests? #f
4323a5f0
AE
10025 ;; Hard-code the path to pkg-config.
10026 #:phases
10027 (modify-phases %standard-phases
10028 (add-before
10029 'build 'patch
10030 (lambda _
10031 (substitute* "pkgconfig/pkgconfig.py"
10032 (("cmd = 'pkg-config")
10033 (string-append "cmd = '" (which "pkg-config"))))
10034 #t)))))
10035 (home-page "http://github.com/matze/pkgconfig")
10036 (synopsis "Python interface for pkg-config")
10037 (description "This module provides a Python interface to pkg-config. It
10038can be used to find all pkg-config packages, check if a package exists,
10039check if a package meets certain version requirements, query CFLAGS and
10040LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10041 (license license:expat)))
4323a5f0
AE
10042
10043(define-public python2-pkgconfig
10044 (package-with-python2 python-pkgconfig))
10045
2e697322
BW
10046(define-public python-bz2file
10047 (package
10048 (name "python-bz2file")
10049 (version "0.98")
10050 (source
10051 (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "bz2file" version))
10054 (sha256
10055 (base32
10056 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10057 (build-system python-build-system)
10058 (arguments
124df723 10059 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10060 (home-page "https://github.com/nvawda/bz2file")
10061 (synopsis "Read and write bzip2-compressed files")
10062 (description
10063 "Bz2file is a Python library for reading and writing bzip2-compressed
10064files. It contains a drop-in replacement for the I/O interface in the
10065standard library's @code{bz2} module, including features from the latest
10066development version of CPython that are not available in older releases.")
3f641af0 10067 (license license:asl2.0)
2e697322
BW
10068 (properties `((python2-variant . ,(delay python2-bz2file))))))
10069
10070(define-public python2-bz2file
10071 (let ((base (package-with-python2
10072 (strip-python2-variant python-bz2file))))
10073 (package
10074 (inherit base)
124df723 10075 (arguments
752bb447
BW
10076 `(#:python ,python-2
10077 #:phases
124df723
BW
10078 (modify-phases %standard-phases
10079 ;; 'python setup.py test' does not work as of 0.98.
10080 ;; There is only the one test file, so we run it directly.
10081 (replace 'check
10082 (lambda _ (zero? (system* "python"
10083 "test_bz2file.py"))))))))))
2e697322 10084
da4ac1aa
BW
10085(define-public python-future
10086 (package
10087 (name "python-future")
10088 (version "0.15.2")
10089 (source
10090 (origin
10091 (method url-fetch)
10092 (uri (pypi-uri "future" version))
10093 (sha256
10094 (base32
10095 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10096 (build-system python-build-system)
10097 ;; Many tests connect to the network or are otherwise flawed.
10098 ;; https://github.com/PythonCharmers/python-future/issues/210
10099 (arguments
10100 `(#:tests? #f))
10101 (home-page "http://python-future.org")
10102 (synopsis "Single-source support for Python 3 and 2")
10103 (description
10104 "@code{python-future} is the missing compatibility layer between Python 2 and
10105Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10106to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10107 (license license:expat)))
da4ac1aa
BW
10108
10109(define-public python2-future
f210e944 10110 (package-with-python2 python-future))
da4ac1aa 10111
8e451885
AE
10112(define-public python-cysignals
10113 (package
10114 (name "python-cysignals")
10115 (version "1.1.0")
10116 (source
10117 (origin
10118 (method url-fetch)
10119 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10120 (sha256
10121 (base32
10122 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10123 (build-system python-build-system)
10124 (native-inputs
10125 `(("python-cython" ,python-cython)
8e451885
AE
10126 ("python-sphinx" ,python-sphinx)))
10127 (inputs
10128 `(("pari-gp" ,pari-gp)))
10129 (arguments
10130 `(#:modules ((guix build python-build-system)
10131 ((guix build gnu-build-system) #:prefix gnu:)
10132 (guix build utils))
10133 ;; FIXME: Tests are executed after installation and currently fail
10134 ;; when not installing into standard locations; the author is working
10135 ;; on a fix.
10136 #:tests? #f
10137 #:phases
10138 (modify-phases %standard-phases
10139 (add-before
10140 'build 'configure
10141 (assoc-ref gnu:%standard-phases 'configure)))))
10142 (home-page
10143 "https://github.com/sagemath/cysignals")
10144 (synopsis
10145 "Handling of interrupts and signals for Cython")
10146 (description
10147 "The cysignals package provides mechanisms to handle interrupts (and
10148other signals and errors) in Cython code, using two related approaches,
10149for mixed Cython/Python code or external C libraries and pure Cython code,
10150respectively.")
3f641af0 10151 (license license:lgpl3+)))
8e451885
AE
10152
10153(define-public python2-cysignals
10154 (package-with-python2 python-cysignals))
10155
63bcec71
DM
10156(define-public python2-shedskin
10157 (package
10158 (name "python2-shedskin")
10159 (version "0.9.4")
10160 (source
10161 (origin
10162 (method url-fetch)
10163 (uri (string-append "https://github.com/shedskin/shedskin/"
10164 "releases/download/v" version
10165 "/shedskin-" version ".tgz"))
10166 (sha256
10167 (base32
10168 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10169 (build-system python-build-system)
10170 (arguments
10171 `(#:python ,python-2
10172 #:phases (modify-phases %standard-phases
10173 (add-after 'unpack 'fix-resulting-include-libs
10174 (lambda* (#:key inputs #:allow-other-keys)
10175 (let ((libgc (assoc-ref inputs "libgc"))
10176 (pcre (assoc-ref inputs "pcre")))
10177 (substitute* "shedskin/makefile.py"
10178 (("variable == 'CCFLAGS':[ ]*")
10179 (string-append "variable == 'CCFLAGS':\n"
10180 " line += ' -I " pcre "/include"
10181 " -I " libgc "/include'"))
10182 (("variable == 'LFLAGS':[ ]*")
10183 (string-append "variable == 'LFLAGS':\n"
10184 " line += ' -L" pcre "/lib"
10185 " -L " libgc "/lib'")))
10186 #t))))))
63bcec71
DM
10187 (inputs `(("pcre" ,pcre)
10188 ("libgc" ,libgc)))
10189 (home-page "https://shedskin.github.io/")
10190 (synopsis "Experimental Python-2 to C++ Compiler")
10191 (description (string-append "This is an experimental compiler for a subset of
10192Python. It generates C++ code and a Makefile."))
3f641af0 10193 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10194
10195(define-public python2-rope
10196 (package
10197 (name "python2-rope")
10198 (version "0.10.3")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "rope" version))
10203 (sha256
10204 (base32
10205 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10206 (arguments
10207 ;; Rope is currently python-2 only.
10208 ;; https://github.com/python-rope/rope/issues/57
10209 `(#:python ,python-2))
10210 (build-system python-build-system)
10211 (native-inputs
f3b98f4f 10212 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10213 (home-page "https://github.com/python-rope/rope")
10214 (synopsis "Refactoring library for Python")
10215 (description "Rope is a refactoring library for Python. It facilitates
10216the renaming, moving and extracting of attributes, functions, modules, fields
10217and parameters in Python 2 source code. These refactorings can also be applied
10218to occurences in strings and comments.")
3f641af0 10219 (license license:gpl2)))
6ba8ca17
10220
10221(define-public python-py3status
10222 (package
10223 (name "python-py3status")
d2262d70 10224 (version "3.1")
6ba8ca17
10225 (source
10226 (origin
10227 (method url-fetch)
10228 (uri (pypi-uri "py3status" version))
10229 (sha256
10230 (base32
d2262d70 10231 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10232 (build-system python-build-system)
6ba8ca17
10233 (home-page "https://github.com/ultrabug/py3status")
10234 (synopsis "Extensible i3status wrapper written in Python")
10235 (description "py3status is an i3status wrapper which extends i3status
10236functionality in a modular way, allowing you to extend your panel with your
10237own code, responding to click events and updating clock every second.")
3f641af0 10238 (license license:bsd-3)))
b8fdbca3
HG
10239
10240(define-public python-tblib
10241 (package
10242 (name "python-tblib")
10243 (version "1.3.0")
10244 (source (origin
10245 (method url-fetch)
10246 (uri (pypi-uri "tblib" version))
10247 (sha256 (base32
10248 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10249 (build-system python-build-system)
10250 (arguments
10251 `(#:phases
10252 (modify-phases %standard-phases
10253 (replace 'check
10254 (lambda _
10255 ;; Upstream runs tests after installation and the package itself
10256 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10257 ;; found.
10258 (setenv "PYTHONPATH"
10259 (string-append (getcwd) "/build/lib:"
10260 (getenv "PYTHONPATH")))
10261 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10262 (native-inputs
10263 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10264 ("python-six" ,python-six)))
10265 (home-page "https://github.com/ionelmc/python-tblib")
10266 (synopsis "Traceback serialization library")
10267 (description
10268 "Traceback serialization allows you to:
10269
10270@enumerate
10271@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10272different processes. This allows better error handling when running code over
10273multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10274
10275@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10276@end enumerate\n")
3f641af0 10277 (license license:bsd-3)))
b8fdbca3
HG
10278
10279(define-public python2-tblib
10280 (package-with-python2 python-tblib))
1a024de4
HG
10281
10282(define-public python-sqlparse
10283 (package
10284 (name "python-sqlparse")
10285 (version "0.1.19")
10286 (source (origin
10287 (method url-fetch)
10288 (uri (pypi-uri "sqlparse" version))
10289 (sha256
10290 (base32
10291 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10292 (build-system python-build-system)
10293 (arguments
10294 `(#:phases
10295 (modify-phases %standard-phases
10296 (replace 'check
10297 (lambda* _
10298 ;; setup.py-integrated 2to3 only affects the build files, but
10299 ;; py.test is using the source files. So we need to convert them
10300 ;; manually.
10301 (when (zero? (system* "python3"))
10302 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10303 (zero? (system* "py.test")))))))
10304 (native-inputs
f3b98f4f 10305 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10306 (home-page "https://github.com/andialbrecht/sqlparse")
10307 (synopsis "Non-validating SQL parser")
10308 (description "Sqlparse is a non-validating SQL parser for Python. It
10309provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10310 (license license:bsd-3)))
1a024de4
HG
10311
10312(define-public python2-sqlparse
10313 (package-with-python2 python-sqlparse))
68b9d242
SB
10314
10315(define-public python-greenlet
10316 (package
10317 (name "python-greenlet")
1f89fb16 10318 (version "0.4.11")
68b9d242
SB
10319 (source (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "greenlet" version))
10322 (sha256
10323 (base32
1f89fb16 10324 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10325 (build-system python-build-system)
68b9d242
SB
10326 (home-page "https://greenlet.readthedocs.io/")
10327 (synopsis "Lightweight in-process concurrent programming")
10328 (description
10329 "Greenlet package is a spin-off of Stackless, a version of CPython
10330that supports micro-threads called \"tasklets\". Tasklets run
10331pseudo-concurrently (typically in a single or a few OS-level threads) and
10332are synchronized with data exchanges on \"channels\".")
3f641af0 10333 (license (list license:psfl license:expat))))
68b9d242
SB
10334
10335(define-public python2-greenlet
10336 (package-with-python2 python-greenlet))
d79a343b
SB
10337
10338(define-public python-gevent
10339 (package
10340 (name "python-gevent")
10341 (version "1.1.1")
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "gevent" version))
10345 (sha256
10346 (base32
10347 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10348 (modules '((guix build utils)))
10349 (snippet
10350 '(begin
10351 ;; unbunding libev and c-ares
10352 (for-each delete-file-recursively '("libev" "c-ares"))
10353 ;; fixing testsuite
10354 (call-with-output-file "greentest/__init__.py" noop)
10355 (substitute* "greentest/testrunner.py"
10356 (("import util") "from . import util")
10357 (("from util import log") "from .util import log"))))))
10358 (build-system python-build-system)
10359 (propagated-inputs
10360 `(("python-greenlet" ,python-greenlet)))
10361 (native-inputs
f3b98f4f 10362 `(("python-six" ,python-six)))
d79a343b
SB
10363 (inputs
10364 `(("c-ares" ,c-ares)
10365 ("libev" ,libev)))
10366 (home-page "http://www.gevent.org/")
10367 (synopsis "Coroutine-based network library")
10368 (description
10369 "gevent is a coroutine-based Python networking library that uses greenlet
10370to provide a high-level synchronous API on top of the libev event loop.")
10371 (license license:expat)))
10372
10373(define-public python2-gevent
10374 (package-with-python2 python-gevent))
da3aeeb6
SB
10375
10376(define-public python-twisted
10377 (package
10378 (name "python-twisted")
10379 (version "16.2.0")
10380 (source (origin
10381 (method url-fetch)
8ea8e8d3 10382 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10383 (sha256
10384 (base32
10385 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10386 (build-system python-build-system)
45912170
SB
10387 (propagated-inputs
10388 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10389 (home-page "https://twistedmatrix.com/")
10390 (synopsis "Asynchronous networking framework written in Python")
10391 (description
10392 "Twisted is an extensible framework for Python programming, with special
10393focus on event-based network programming and multiprotocol integration.")
10394 (license license:expat)))
10395
10396(define-public python2-twisted
10397 (package-with-python2 python-twisted))
d0b6fed6 10398
4d3fa5a4
EF
10399(define-public python-pika
10400 (package
10401 (name "python-pika")
10402 (version "0.10.0")
10403 (source
10404 (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "pika" version))
10407 (sha256
10408 (base32
10409 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10410 (build-system python-build-system)
10411 (native-inputs
269d9172
LF
10412 `(("python-pyev" ,python-pyev)
10413 ("python-tornado" ,python-tornado)
10414 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10415 (home-page "https://pika.readthedocs.org")
10416 (synopsis "Pure Python AMQP Client Library")
10417 (description
10418 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10419Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10420network support library.")
10421 (license license:bsd-3)))
10422
10423(define-public python2-pika
10424 (package-with-python2 python-pika))
10425
d0b6fed6
DM
10426(define-public python-ply
10427 (package
10428 (name "python-ply")
234ade2d 10429 (version "3.9")
d0b6fed6
DM
10430 (source
10431 (origin
10432 (method url-fetch)
234ade2d 10433 (uri (pypi-uri "ply" version))
d0b6fed6
DM
10434 (sha256
10435 (base32
234ade2d 10436 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
10437 (build-system python-build-system)
10438 (home-page "http://www.dabeaz.com/ply/")
10439 (synopsis "Python Lex & Yacc")
10440 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10441It uses LR parsing and does extensive error checking.")
f210e944 10442 (license license:bsd-3)))
d0b6fed6
DM
10443
10444(define-public python2-ply
f210e944 10445 (package-with-python2 python-ply))
d951bd54
SB
10446
10447(define-public python-tabulate
10448 (package
10449 (name "python-tabulate")
e6ace98d 10450 (version "0.7.7")
d951bd54
SB
10451 (source (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "tabulate" version))
10454 (sha256
10455 (base32
e6ace98d 10456 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))
d951bd54
SB
10457 ;; Fix tests
10458 (modules '((guix build utils)))
10459 (snippet '(substitute* '("test/test_cli.py"
10460 "test/test_input.py"
10461 "test/test_output.py"
10462 "test/test_regression.py")
10463 (("from common") "from nose.tools")))))
10464 (build-system python-build-system)
10465 (native-inputs
f3b98f4f 10466 `(;; For testing
d951bd54
SB
10467 ("python-nose" ,python-nose)))
10468 (home-page "https://bitbucket.org/astanin/python-tabulate")
10469 (synopsis "Pretty-print tabular data")
10470 (description
10471 "Tabulate is a library and command-line utility to pretty-print tabular
10472data in Python.")
10473 (license license:expat)))
10474
10475(define-public python2-tabulate
10476 (package-with-python2 python-tabulate))
1c4c8a33
SB
10477
10478(define-public python-kazoo
10479 (package
10480 (name "python-kazoo")
10481 (version "2.2.1")
10482 (source
10483 (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "kazoo" version))
10486 (sha256
10487 (base32
10488 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10489 (build-system python-build-system)
10490 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10491 (propagated-inputs
10492 `(("python-six" ,python-six)))
1c4c8a33
SB
10493 (home-page "https://kazoo.readthedocs.org")
10494 (synopsis "High-level Zookeeper client library")
10495 (description
10496 "Kazoo is a Python client library for the Apache Zookeeper distributed
10497application service. It is designed to be easy to use and to avoid common
10498programming errors.")
3f641af0 10499 (license license:asl2.0)))
1c4c8a33
SB
10500
10501(define-public python2-kazoo
10502 (package-with-python2 python-kazoo))
45dda35e
SB
10503
10504(define-public python-pykafka
10505 (package
10506 (name "python-pykafka")
10507 (version "2.4.0")
10508 (source (origin
10509 (method url-fetch)
c6bccf71
EF
10510 (uri (string-append
10511 "https://pypi.python.org/packages/8b/3e/"
10512 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10513 "pykafka-" version ".tar.gz"))
45dda35e
SB
10514 (sha256
10515 (base32
10516 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10517 (build-system python-build-system)
10518 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10519 (propagated-inputs
45dda35e
SB
10520 `(("python-gevent" ,python-gevent)
10521 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10522 ("python-tabulate" ,python-tabulate)))
10523 (inputs
10524 `(("librdkafka" ,librdkafka)))
10525 (home-page "https://pykafka.readthedocs.io/")
10526 (synopsis "Apache Kafka client for Python")
10527 (description
10528 "PyKafka is a client for the Apache Kafka distributed messaging system.
10529It includes Python implementations of Kafka producers and consumers, which
10530are optionally backed by a C extension built on librdkafka.")
3f641af0 10531 (license license:asl2.0)))
45dda35e
SB
10532
10533(define-public python2-pykafka
10534 (package-with-python2 python-pykafka))
a44fd439
DM
10535
10536(define-public python-wcwidth
10537 (package
10538 (name "python-wcwidth")
10539 (version "0.1.6")
10540 (source
10541 (origin
10542 (method url-fetch)
10543 (uri (string-append
10544 "https://pypi.python.org/packages/"
10545 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10546 "wcwidth-" version ".tar.gz"))
10547 (sha256
10548 (base32
10549 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10550 (build-system python-build-system)
10551 (home-page "https://github.com/jquast/wcwidth")
66e07664 10552 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10553 (description "Wcwidth measures the number of terminal column cells of
10554wide-character codes. It is useful for those implementing a terminal emulator,
10555or programs that carefully produce output to be interpreted by one. It is a
10556Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10557specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10558 (license license:expat)))
a44fd439
DM
10559
10560(define-public python2-wcwidth
f210e944 10561 (package-with-python2 python-wcwidth))
0de78c95
DP
10562
10563(define-public python2-jsonrpclib
10564 (package
10565 (name "python2-jsonrpclib")
10566 (version "0.1.7")
10567 (source (origin
10568 (method url-fetch)
10569 (uri (string-append
10570 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10571 "jsonrpclib-" version ".tar.gz"))
10572 (sha256
10573 (base32
10574 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10575 (build-system python-build-system)
0de78c95
DP
10576 (arguments
10577 `(#:tests? #f
10578 #:python ,python-2))
10579 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10580 (synopsis "Implementation of JSON-RPC specification for Python")
10581 (description
10582 "This library is an implementation of the JSON-RPC specification.
10583It supports both the original 1.0 specification, as well as the
10584new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10585etc.")
3f641af0 10586 (license license:asl2.0)))
9250b0f3
SB
10587
10588(define-public python-chai
10589 (package
10590 (name "python-chai")
10591 (version "1.1.1")
10592 (source (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "chai" version))
10595 (sha256
10596 (base32
10597 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10598 (build-system python-build-system)
9250b0f3
SB
10599 (home-page "https://github.com/agoragames/chai")
10600 (synopsis "Mocking framework for Python")
10601 (description
10602 "Chai provides an api for mocking, stubbing and spying your python
10603objects, patterned after the Mocha library for Ruby.")
3f641af0 10604 (license license:bsd-3)))
9250b0f3
SB
10605
10606(define-public python2-chai
10607 (package-with-python2 python-chai))
10608
ae43baa8
SB
10609(define-public python-arrow
10610 (package
10611 (name "python-arrow")
10612 (version "0.8.0")
10613 (source (origin
10614 (method url-fetch)
10615 (uri (pypi-uri "arrow" version))
10616 (sha256
10617 (base32
10618 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10619 (build-system python-build-system)
10620 (native-inputs
f3b98f4f 10621 `(;; For testing
ae43baa8
SB
10622 ("python-chai" ,python-chai)
10623 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10624 (propagated-inputs
10625 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10626 (home-page "https://github.com/crsmithdev/arrow/")
10627 (synopsis "Dates and times for Python")
10628 (description
10629 "Arrow is a Python library to creating, manipulating, formatting and
10630converting dates, times, and timestamps. It implements and updates the
10631datetime type.")
3f641af0 10632 (license license:asl2.0)))
ae43baa8
SB
10633
10634(define-public python2-arrow
10635 (package-with-python2 python-arrow))
10636
1f2b62a4
SB
10637(define-public python-inflection
10638 (package
10639 (name "python-inflection")
10640 (version "0.3.1")
10641 (source
10642 (origin (method url-fetch)
10643 (uri (pypi-uri "inflection" version))
10644 (sha256
10645 (base32
10646 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10647 (build-system python-build-system)
1f2b62a4
SB
10648 (home-page "http://github.com/jpvanhal/inflection")
10649 (synopsis "Python string transformation library")
10650 (description
10651 "Inflection is a string transformation library. It singularizes
10652and pluralizes English words, and transforms strings from CamelCase to
10653underscored string.")
10654 (license license:expat)))
10655
10656(define-public python2-inflection
10657 (package-with-python2 python-inflection))
10658
18995566
SB
10659(define-public python-pylev
10660 (package
10661 (name "python-pylev")
10662 (version "1.3.0")
10663 (source (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "pylev" version))
10666 (sha256
10667 (base32
10668 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10669 (build-system python-build-system)
18995566
SB
10670 (home-page "http://github.com/toastdriven/pylev")
10671 (synopsis "Levenshtein distance implementation in Python")
10672 (description "Pure Python Levenshtein implementation, based off the
10673Wikipedia code samples at
10674@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10675 (license license:bsd-3)))
18995566
SB
10676
10677(define-public python2-pylev
10678 (package-with-python2 python-pylev))
10679
f5deff7a
SB
10680(define-public python-cleo
10681 (package
10682 (name "python-cleo")
10683 (version "0.4.1")
10684 (source (origin
10685 (method url-fetch)
10686 (uri (pypi-uri "cleo" version))
10687 (sha256
10688 (base32
10689 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10690 (build-system python-build-system)
10691 (native-inputs
f3b98f4f 10692 `(;; For testing
f5deff7a
SB
10693 ("python-mock" ,python-mock)
10694 ("python-pytest" ,python-pytest)))
9403150a
SB
10695 (propagated-inputs
10696 `(("python-psutil" ,python-psutil)
10697 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10698 (home-page "https://github.com/sdispater/cleo")
10699 (synopsis "Command-line arguments library for Python")
10700 (description
10701 "Cleo allows you to create command-line commands with signature in
10702docstring and colored output.")
10703 (license license:expat)))
10704
10705(define-public python2-cleo
10706 (package-with-python2 python-cleo))
10707
77cadb43
SB
10708(define-public python-lazy-object-proxy
10709 (package
10710 (name "python-lazy-object-proxy")
10711 (version "1.2.2")
10712 (source (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "lazy-object-proxy" version))
10715 (sha256
10716 (base32
10717 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10718 (build-system python-build-system)
77cadb43
SB
10719 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10720 (synopsis "Lazy object proxy for python")
10721 (description
10722 "Lazy object proxy is an object that wraps a callable but defers the call
10723until the object is actually required, and caches the result of said call.")
3f641af0 10724 (license license:bsd-2)))
77cadb43
SB
10725
10726(define-public python2-lazy-object-proxy
10727 (package-with-python2 python-lazy-object-proxy))
10728
5477e05f
SB
10729(define-public python-dnspython
10730 (package
10731 (name "python-dnspython")
6c514128 10732 (version "1.15.0")
5477e05f
SB
10733 (source (origin
10734 (method url-fetch)
10735 (uri (string-append "http://www.dnspython.org/kits/"
10736 version "/dnspython-" version ".tar.gz"))
10737 (sha256
10738 (base32
6c514128 10739 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10740 (build-system python-build-system)
10741 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10742 (home-page "http://www.dnspython.org")
10743 (synopsis "DNS toolkit for Python")
10744 (description
10745 "dnspython is a DNS toolkit for Python. It supports almost all record
10746types. It can be used for queries, zone transfers, and dynamic updates.
10747It supports TSIG authenticated messages and EDNS0.")
10748 (license license:expat)))
10749
10750(define-public python2-dnspython
10751 (package-with-python2 python-dnspython))
10752
22711e25
SB
10753(define-public python-email-validator
10754 (package
10755 (name "python-email-validator")
b165c215 10756 (version "1.0.2")
22711e25
SB
10757 (source
10758 (origin (method url-fetch)
10759 (uri (pypi-uri "email_validator" version))
10760 (sha256
10761 (base32
b165c215 10762 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
10763 (build-system python-build-system)
10764 (arguments
10765 '(#:phases
10766 (modify-phases %standard-phases
10767 (add-before 'build 'use-dnspython
10768 (lambda _
10769 (substitute* "setup.py"
10770 (("dnspython3") "dnspython"))
10771 #t)))))
d42560bd 10772 (propagated-inputs
22711e25 10773 `(("python-dnspython" ,python-dnspython)
d42560bd 10774 ("python-idna" ,python-idna)))
22711e25
SB
10775 (home-page "https://github.com/JoshData/python-email-validator")
10776 (synopsis "Email address validation library for Python")
10777 (description
10778 "This library validates email address syntax and deliverability.")
3f641af0 10779 (license license:cc0)))
22711e25
SB
10780
10781(define-public python2-email-validator
10782 (package-with-python2 python-email-validator))
10783
8987d91e
SB
10784(define-public python-ukpostcodeparser
10785 (package
10786 (name "python-ukpostcodeparser")
10787 (version "1.0.3")
10788 (source (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "UkPostcodeParser" version))
10791 (sha256
10792 (base32
10793 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10794 (build-system python-build-system)
8987d91e
SB
10795 (home-page "https://github.com/hamstah/ukpostcodeparser")
10796 (synopsis "UK Postcode parser for Python")
10797 (description
10798 "This library provides the @code{parse_uk_postcode} function for
10799parsing UK postcodes.")
10800 (license license:expat)))
10801
10802(define-public python2-ukpostcodeparser
10803 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10804
10805(define-public python-fake-factory
10806 (package
10807 (name "python-fake-factory")
7adc698f 10808 (version "0.7.2")
ea92ae01
SB
10809 (source (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "fake-factory" version))
10812 (sha256
10813 (base32
7adc698f 10814 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10815 (build-system python-build-system)
ea92ae01 10816 (native-inputs
f3b98f4f 10817 `(;; For testing
ea92ae01
SB
10818 ("python-email-validator" ,python-email-validator)
10819 ("python-mock" ,python-mock)
10820 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10821 (propagated-inputs
10822 `(("python-dateutil" ,python-dateutil-2)
10823 ("python-six" ,python-six)))
7adc698f 10824 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10825 (synopsis "Python package that generates fake data")
10826 (description
10827 "Faker is a Python package that generates fake data such as names,
10828addresses, and phone numbers.")
10829 (license license:expat)
10830 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10831
10832(define-public python2-fake-factory
10833 (let ((base (package-with-python2 (strip-python2-variant
10834 python-fake-factory))))
10835 (package
10836 (inherit base)
24c9aa18 10837 (propagated-inputs
ea92ae01 10838 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10839 ,@(package-propagated-inputs base))))))
ea92ae01 10840
b49504fd
SB
10841(define-public python-pyaml
10842 (package
10843 (name "python-pyaml")
10844 (version "15.8.2")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "pyaml" version))
10848 (sha256
10849 (base32
10850 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10851 (build-system python-build-system)
b49504fd
SB
10852 (propagated-inputs
10853 `(("python-pyyaml" ,python-pyyaml)))
10854 (home-page "https://github.com/mk-fg/pretty-yaml")
10855 (synopsis "YAML pretty-print library for Python")
10856 (description
10857 "pyaml is a PyYAML based python module to produce pretty and readable
10858YAML-serialized data.")
3f641af0 10859 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10860
10861(define-public python2-pyaml
10862 (package-with-python2 python-pyaml))
10863
347175a2
SB
10864(define-public python-flexmock
10865 (package
10866 (name "python-flexmock")
10867 (version "0.10.2")
10868 (source (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "flexmock" version))
10871 (sha256
10872 (base32
10873 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10874 (build-system python-build-system)
347175a2
SB
10875 (home-page "https://flexmock.readthedocs.org")
10876 (synopsis "Testing library for Python")
10877 (description
10878 "flexmock is a testing library for Python that makes it easy to create
10879mocks, stubs and fakes.")
3f641af0 10880 (license license:bsd-3)))
347175a2
SB
10881
10882(define-public python2-flexmock
10883 (package-with-python2 python-flexmock))
10884
5a744191
SB
10885(define-public python-orator
10886 (package
10887 (name "python-orator")
10888 (version "0.8.2")
10889 (source (origin
10890 (method url-fetch)
10891 (uri (pypi-uri "orator" version))
10892 (sha256
10893 (base32
10894 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10895 (build-system python-build-system)
10896 (arguments '(#:tests? #f)) ; no tests
b2676030 10897 (propagated-inputs
5a744191
SB
10898 `(("python-arrow" ,python-arrow)
10899 ("python-blinker" ,python-blinker)
10900 ("python-cleo" ,python-cleo)
10901 ("python-fake-factory" ,python-fake-factory)
10902 ("python-inflection" ,python-inflection)
10903 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10904 ("python-pyaml" ,python-pyaml)
5a744191
SB
10905 ("python-simplejson" ,python-simplejson)
10906 ("python-wrapt" ,python-wrapt)))
10907 (home-page "https://orator-orm.com/")
10908 (synopsis "ActiveRecord ORM for Python")
10909 (description
10910 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10911implementation for Python.")
10912 (license license:expat)
10913 (properties `((python2-variant . ,(delay python2-orator))))))
10914
10915(define-public python2-orator
10916 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10917 (package
10918 (inherit base)
06961617 10919 (propagated-inputs
5a744191 10920 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10921 ,@(package-propagated-inputs base))))))
f4155188
DM
10922
10923(define-public python-prompt-toolkit
10924 (package
10925 (name "python-prompt-toolkit")
6a34f4cc 10926 (version "1.0.9")
f4155188
DM
10927 (source
10928 (origin
10929 (method url-fetch)
d15e2ef0 10930 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10931 (sha256
10932 (base32
6a34f4cc 10933 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 10934 (build-system python-build-system)
bae18710
LF
10935 (arguments
10936 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10937 (propagated-inputs
10938 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10939 ("python-six" ,python-six)
f22efa01 10940 ("python-pygments" ,python-pygments)))
f4155188
DM
10941 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10942 (synopsis "Library for building command line interfaces in Python")
10943 (description
10944 "Prompt-Toolkit is a library for building interactive command line
10945interfaces in Python. It's like GNU Readline but it also features syntax
10946highlighting while typing, out-of-the-box multi-line input editing, advanced
10947code completion, incremental search, support for Chinese double-width
10948characters, mouse support, and auto suggestions.")
f210e944 10949 (license license:bsd-3)))
f4155188
DM
10950
10951(define-public python2-prompt-toolkit
f210e944 10952 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10953
10954(define-public python-jedi
10955 (package
10956 (name "python-jedi")
10957 (version "0.9.0")
10958 (source
10959 (origin
10960 (method url-fetch)
10961 (uri (pypi-uri "jedi" version))
10962 (sha256
10963 (base32
10964 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10965 (build-system python-build-system)
10966 (home-page "https://github.com/davidhalter/jedi")
10967 (synopsis
10968 "Autocompletion for Python that can be used for text editors")
10969 (description
10970 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10971 (license license:expat)))
a502dfbf
DM
10972
10973(define-public python2-jedi
f210e944 10974 (package-with-python2 python-jedi))
c2f0dc6e
DM
10975
10976(define-public ptpython
10977 (package
10978 (name "ptpython")
10979 (version "0.34")
10980 (source (origin
10981 (method url-fetch)
10982 (uri (pypi-uri "ptpython" version))
10983 (sha256
10984 (base32
10985 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10986 (build-system python-build-system)
f22efa01 10987 (propagated-inputs
c2f0dc6e
DM
10988 `(("python-docopt" ,python-docopt)
10989 ("python-jedi" ,python-jedi)
10990 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10991 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10992 (home-page "https://github.com/jonathanslenders/ptpython")
10993 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10994 (description
10995 "ptpython is a Python read-eval-print loop with IDE-like features.
10996It supports syntax highlighting, multiline editing, autocompletion, mouse,
10997color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10998etc.")
3f641af0 10999 (license license:bsd-3)
c2f0dc6e
DM
11000 (properties `((python2-variant . ,(delay ptpython-2))))))
11001
11002(define-public ptpython-2
11003 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11004 (package
11005 (inherit base)
11006 (name "ptpython2"))))
b227f0be 11007
b04a52a6
DJ
11008(define-public python-requests-oauthlib
11009 (package
11010 (name "python-requests-oauthlib")
11011 (version "0.6.2")
11012 (source
11013 (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "requests-oauthlib" version))
11016 (sha256
11017 (base32
11018 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11019 (build-system python-build-system)
11020 (arguments
11021 `(#:phases
11022 (modify-phases %standard-phases
11023 ;; removes tests that require network access
11024 (add-before 'check 'pre-check
11025 (lambda _
11026 (delete-file "tests/test_core.py")
11027 #t)))))
11028 (native-inputs
11029 `(("python-requests-mock" ,python-requests-mock)
11030 ("python-mock" ,python-mock)))
f22efa01 11031 (propagated-inputs
b04a52a6
DJ
11032 `(("python-oauthlib" ,python-oauthlib)
11033 ("python-requests" ,python-requests)))
11034 (home-page
11035 "https://github.com/requests/requests-oauthlib")
11036 (synopsis
11037 "OAuthlib authentication support for Requests")
11038 (description
11039 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11040provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11041 (license license:isc)))
b04a52a6
DJ
11042
11043(define-public python2-requests-oauthlib
f210e944 11044 (package-with-python2 python-requests-oauthlib))
b04a52a6 11045
b227f0be 11046(define-public python-stem
11047 (package
11048 (name "python-stem")
0bb1c35a 11049 (version "1.5.4")
b227f0be 11050 (source
11051 (origin
11052 (method url-fetch)
c976b319 11053 (uri (pypi-uri "stem" version))
b227f0be 11054 (sha256
11055 (base32
0bb1c35a 11056 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11057 (build-system python-build-system)
11058 (arguments
11059 `(#:phases
11060 (modify-phases %standard-phases
11061 (replace 'check
11062 (lambda _
11063 (zero? (system* "./run_tests.py" "--unit")))))))
11064 (native-inputs
11065 `(("python-mock" ,python-mock)
11066 ("python-pep8" ,python-pep8)
11067 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11068 (home-page "https://stem.torproject.org/")
11069 (synopsis
11070 "Python controller library that allows applications to interact with Tor")
11071 (description
11072 "Stem is a Python controller library for Tor. With it you can use Tor's
11073control protocol to script against the Tor process and read descriptor data
11074relays publish about themselves.")
3f641af0 11075 (license license:lgpl3)))
b227f0be 11076
11077(define-public python2-stem
11078 (package-with-python2 python-stem))
517a6c0c
DM
11079
11080(define-public python-pyserial
11081 (package
11082 (name "python-pyserial")
11083 (version "3.1.1")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "pyserial" version))
11088 (sha256
11089 (base32
11090 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11091 (build-system python-build-system)
11092 (home-page
11093 "https://github.com/pyserial/pyserial")
11094 (synopsis "Python Serial Port Bindings")
11095 (description "@code{pyserial} provide serial port bindings for Python. It
11096supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11097and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11098 (license license:bsd-3)))
517a6c0c
DM
11099
11100(define-public python2-pyserial
f210e944 11101 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11102
11103(define-public python-kivy
11104 (package
11105 (name "python-kivy")
11106 (version "1.9.1")
11107 (source
11108 (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "kivy" version))
11111 (file-name (string-append name "-" version ".tar.gz"))
11112 (sha256
11113 (base32
11114 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11115 (build-system python-build-system)
11116 (arguments
11117 `(#:tests? #f ; Tests require many optional packages
11118 #:phases
11119 (modify-phases %standard-phases
11120 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11121 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11122 (lambda* (#:key inputs #:allow-other-keys)
11123 (setenv "KIVY_SDL2_PATH"
11124 (string-append (assoc-ref inputs "sdl-union")
11125 "/include/SDL2"))
11126 #t)))))
11127 (native-inputs
f2516de2
HG
11128 `(("pkg-config" ,pkg-config)
11129 ("python-cython" ,python-cython)))
6eb7af2a 11130 (inputs
f2516de2 11131 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11132 ("mesa" ,mesa)
11133 ("sdl-union"
11134 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11135 (home-page "http://kivy.org")
11136 (synopsis
11137 "Multitouch application framework")
11138 (description
11139 "A software library for rapid development of
11140hardware-accelerated multitouch applications.")
11141 (license license:expat)))
11142
11143(define-public python2-kivy
11144 (package-with-python2 python-kivy))
11145
11146(define-public python-kivy-next
11147 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11148 (revision "1"))
11149 (package (inherit python-kivy)
11150 (name "python-kivy-next")
d80a71eb 11151 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11152 (string-take commit 7)))
11153 (source
11154 (origin
11155 (method git-fetch)
11156 (uri (git-reference
11157 (url "https://github.com/kivy/kivy")
11158 (commit commit)))
11159 (file-name (string-append name "-" version "-checkout"))
11160 (sha256
11161 (base32
11162 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11163
11164(define-public python2-kivy-next
11165 (package-with-python2 python-kivy-next))
8794bd8b
DC
11166
11167(define-public python-binaryornot
11168 (package
11169 (name "python-binaryornot")
11170 (version "0.4.0")
11171 (source (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "binaryornot" version))
11174 (sha256
11175 (base32
11176 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11177 (build-system python-build-system)
f22efa01 11178 (propagated-inputs
8794bd8b
DC
11179 `(("python-chardet" ,python-chardet)
11180 ("python-hypothesis" ,python-hypothesis)))
11181 (home-page "https://github.com/audreyr/binaryornot")
11182 (synopsis "Package to check if a file is binary or text")
11183 (description "Ultra-lightweight pure Python package to check if a file is
11184binary or text.")
11185 (license license:bsd-3)
11186 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11187
11188(define-public python2-binaryornot
11189 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11190 (package (inherit base)
f22efa01 11191 (propagated-inputs
8794bd8b 11192 `(("python2-enum34" ,python2-enum34)
f22efa01 11193 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11194
11195(define-public python-nltk
11196 (package
11197 (name "python-nltk")
11198 (version "3.2.1")
11199 (source (origin
11200 (method url-fetch)
11201 (uri (pypi-uri "nltk" version))
11202 (sha256
11203 (base32
11204 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11205 (build-system python-build-system)
59f12985
LF
11206 (arguments
11207 '(;; The tests require some extra resources to be downloaded.
11208 ;; TODO Try packaging these resources.
11209 #:tests? #f))
a9ac982a
DC
11210 (home-page "http://nltk.org/")
11211 (synopsis "Natural Language Toolkit")
11212 (description "It provides interfaces to over 50 corpora and lexical
11213resources such as WordNet, along with a suite of text processing libraries
11214for classification, tokenization, stemming, tagging, parsing, and semantic
11215reasoning, wrappers for natural language processing libraries.")
f210e944 11216 (license license:asl2.0)))
a9ac982a
DC
11217
11218(define-public python2-nltk
f210e944 11219 (package-with-python2 python-nltk))
691cd90d
DC
11220
11221(define-public python-pymongo
11222 (package
11223 (name "python-pymongo")
11224 (version "3.3.0")
11225 (source (origin
11226 (method url-fetch)
11227 (uri (pypi-uri "pymongo" version))
11228 (sha256
11229 (base32
11230 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11231 (build-system python-build-system)
f22efa01 11232 (propagated-inputs
691cd90d
DC
11233 `(("python-certifi" ,python-certifi)))
11234 (home-page "http://github.com/mongodb/mongo-python-driver")
11235 (synopsis "Python driver for MongoDB")
11236 (description "Python driver for MongoDB.")
f210e944 11237 (license license:asl2.0)))
691cd90d
DC
11238
11239(define-public python2-pymongo
f210e944 11240 (package-with-python2 python-pymongo))
6a6c9d43
DC
11241
11242(define-public python-sh
11243 (package
11244 (name "python-sh")
11245 (version "1.11")
11246 (source (origin
11247 (method url-fetch)
11248 (uri (pypi-uri "sh" version))
11249 (sha256
11250 (base32
11251 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11252 (build-system python-build-system)
11253 (arguments
11254 `(#:tests? #f)) ; no tests
11255 (home-page "https://github.com/amoffat/sh")
11256 (synopsis "Python subprocess interface")
11257 (description "Abstracts process invocation by providing a function
11258interface for programs.")
f210e944 11259 (license license:expat)))
6a6c9d43
DC
11260
11261(define-public python2-sh
f210e944 11262 (package-with-python2 python-sh))
05b59190 11263
25702397
EF
11264(define-public python-consul
11265 (package
11266 (name "python-consul")
11267 (version "0.6.1")
11268 (source
11269 (origin
11270 (method url-fetch)
11271 (uri (pypi-uri "python-consul" version))
11272 (sha256
11273 (base32
11274 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11275 (build-system python-build-system)
11276 (native-inputs
fd1d6de7
HG
11277 `(("python-pytest" ,python-pytest)))
11278 (propagated-inputs
11279 `(("python-requests" ,python-requests)
25702397
EF
11280 ("python-six" ,python-six)))
11281 (home-page "https://github.com/cablehead/python-consul")
11282 (synopsis "Python client for Consul")
11283 (description
11284 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11285discovery, monitoring and configuration.")
11286 (license license:expat)))
11287
11288(define-public python2-consul
f210e944 11289 (package-with-python2 python-consul))
25702397 11290
05b59190
DC
11291(define-public python-schematics
11292 (package
11293 (name "python-schematics")
11294 (version "1.1.1")
11295 (source
11296 (origin
11297 (method url-fetch)
11298 (uri (string-append
11299 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11300 (file-name (string-append name "-" version ".tar.gz"))
11301 (sha256
11302 (base32
11303 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11304 (build-system python-build-system)
f22efa01 11305 (propagated-inputs
05b59190
DC
11306 `(("python-six" ,python-six)))
11307 (arguments
11308 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11309 ; version requirements (eg python-coveralls)
11310 (home-page "https://github.com/schematics/schematics")
11311 (synopsis "Python Data Structures for Humans")
11312 (description "Python Data Structures for Humans.")
f210e944 11313 (license license:bsd-3)))
05b59190
DC
11314
11315(define-public python2-schematics
f210e944 11316 (package-with-python2 python-schematics))
d6907ff7
DC
11317
11318(define-public python-publicsuffix
11319 (package
11320 (name "python-publicsuffix")
11321 (version "1.1.0")
11322 (source (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "publicsuffix" version))
11325 (sha256
11326 (base32
11327 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11328 (build-system python-build-system)
11329 (arguments
11330 `(#:tests? #f)) ; tests use the internet
11331 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11332 (synopsis "Get suffix for a domain name")
11333 (description "Get a public suffix for a domain name using the Public Suffix
11334List.")
f210e944 11335 (license license:expat)))
d6907ff7
DC
11336
11337(define-public python2-publicsuffix
f210e944 11338 (package-with-python2 python-publicsuffix))
b2319996
DC
11339
11340(define-public python-publicsuffix2
11341 (package
11342 (name "python-publicsuffix2")
11343 (version "2.20160621")
11344 (source
11345 (origin
11346 (method url-fetch)
11347 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11348 (sha256
11349 (base32
11350 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11351 (build-system python-build-system)
10797a0a
LF
11352 (arguments
11353 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11354 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11355 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11356 (description "Get a public suffix for a domain name using the Public Suffix
11357List. Forked from and using the same API as the publicsuffix package.")
f210e944 11358 (license (list license:expat license:mpl2.0))))
b2319996
DC
11359
11360(define-public python2-publicsuffix2
f210e944 11361 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11362
11363(define-public python-url
11364 (package
11365 (name "python-url")
11366 (version "0.2.0")
11367 (source (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "url" version))
11370 (sha256
11371 (base32
11372 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11373 (build-system python-build-system)
f22efa01 11374 (propagated-inputs
81f1515d
DC
11375 `(("python-publicsuffix" ,python-publicsuffix)))
11376 (native-inputs
11377 `(("python-coverage" ,python-coverage)
11378 ("python-nose" ,python-nose)))
11379 (arguments
11380 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11381 (home-page "http://github.com/seomoz/url-py")
11382 (synopsis "URL Parsing")
11383 (description "Library for parsing urls.")
11384 (license license:expat)
11385 (properties `((python2-variant . ,(delay python2-url))))))
11386
11387(define-public python2-url
11388 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11389 (package (inherit base)
f22efa01 11390 (propagated-inputs
f210e944 11391 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11392
11393(define-public python-freezegun
11394 (package
11395 (name "python-freezegun")
0c315fb3 11396 (version "0.3.8")
974ee2c1
TS
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "freezegun" version))
11401 (sha256
11402 (base32
0c315fb3 11403 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
11404 (build-system python-build-system)
11405 (native-inputs
11406 `(("python-mock" ,python-mock)
11407 ("python-nose" ,python-nose)
4e096968 11408 ("python-coverage" ,python-coverage)))
f22efa01 11409 (propagated-inputs
4e096968
HG
11410 `(("python-six" ,python-six)
11411 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11412 (arguments
11413 `(#:phases (modify-phases %standard-phases
11414 ;; The tests are normally executed via `make test`, but the PyPi
11415 ;; package does not include the Makefile.
11416 (replace 'check
11417 (lambda _
11418 (zero? (system* "nosetests" "./tests/")))))))
11419 (home-page "https://github.com/spulec/freezegun")
11420 (synopsis "Test utility for mocking the datetime module")
11421 (description
11422 "FreezeGun is a library that allows your python tests to travel through
11423time by mocking the datetime module.")
11424 (license license:asl2.0)))
11425
11426(define-public python2-freezegun
f210e944
HG
11427 (package-with-python2 python-freezegun))
11428
dddcb25c
MB
11429
11430(define-public python-odfpy
11431 (package
11432 (name "python-odfpy")
11433 (version "1.3.3")
11434 (source (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "odfpy" version))
11437 (sha256
11438 (base32
11439 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11440 (arguments
11441 `(#:modules ((srfi srfi-1)
11442 (guix build python-build-system)
11443 (guix build utils))
11444 #:phases
11445 (modify-phases %standard-phases
11446 (replace 'check
11447 ;; The test runner invokes python2 and python3 for test*.py.
11448 ;; To avoid having both in inputs, we replicate it here.
11449 (lambda _
11450 (every (lambda (test-file)
11451 (zero? (system* "python" test-file)))
11452 (find-files "tests" "^test.*\\.py$")))))))
11453 (build-system python-build-system)
11454 (home-page "https://github.com/eea/odfpy")
11455 (synopsis "Python API and tools to manipulate OpenDocument files")
11456 (description "Collection of libraries and utility programs written in
11457Python to manipulate OpenDocument 1.2 files.")
11458 (license
11459 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11460 ;; number of files with other licenses.
11461 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11462
11463(define-public python2-odfpy
11464 (package-with-python2 python-odfpy))
b30565bd
MB
11465
11466(define-public python-cachecontrol
11467 (package
11468 (name "python-cachecontrol")
11469 (version "0.11.6")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 ;; Pypi does not have tests.
11474 (uri (string-append
11475 "https://github.com/ionrock/cachecontrol/archive/v"
11476 version ".tar.gz"))
11477 (file-name (string-append name "-" version ".tar.gz"))
11478 (sha256
11479 (base32
11480 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11481 (build-system python-build-system)
11482 (arguments
11483 `(#:phases
11484 (modify-phases %standard-phases
11485 (replace 'check
11486 (lambda _
11487 ;; Drop test that requires internet access.
11488 (delete-file "tests/test_regressions.py")
11489 (setenv "PYTHONPATH"
11490 (string-append (getcwd) "/build/lib:"
11491 (getenv "PYTHONPATH")))
11492 (zero? (system* "py.test" "-vv")))))))
11493 (native-inputs
11494 `(("python-pytest" ,python-pytest)
11495 ("python-redis" ,python-redis)
11496 ("python-webtest" ,python-webtest)
11497 ("python-mock" ,python-mock)))
11498 (propagated-inputs
11499 `(("python-requests" ,python-requests)
11500 ("python-lockfile" ,python-lockfile)))
11501 (home-page "https://github.com/ionrock/cachecontrol")
11502 (synopsis "The httplib2 caching algorithms for use with requests")
11503 (description "CacheControl is a port of the caching algorithms in
11504@code{httplib2} for use with @code{requests} session objects.")
f210e944 11505 (license license:asl2.0)))
b30565bd
MB
11506
11507(define-public python2-cachecontrol
f210e944 11508 (package-with-python2 python-cachecontrol))
243db824
DM
11509
11510(define-public python-lit
11511 (package
11512 (name "python-lit")
11513 (version "0.5.0")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "lit" version))
11518 (sha256
11519 (base32
11520 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11521 (build-system python-build-system)
11522 (home-page "http://llvm.org/")
11523 (synopsis "LLVM Software Testing Tool")
11524 (description "@code{lit} is a portable tool for executing LLVM and Clang
11525style test suites, summarizing their results, and providing indication of
11526failures.")
f210e944 11527 (license license:ncsa)))
243db824
DM
11528
11529(define-public python2-lit
f210e944 11530 (package-with-python2 python-lit))
66f95b20
MB
11531
11532(define-public python-pytest-pep8
11533 (package
11534 (name "python-pytest-pep8")
11535 (version "1.0.6")
11536 (source (origin
11537 (method url-fetch)
11538 (uri (pypi-uri "pytest-pep8" version))
11539 (sha256
11540 (base32
11541 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11542 (build-system python-build-system)
11543 (arguments
b41a05ce 11544 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11545 (native-inputs
11546 `(("python-pytest" ,python-pytest)))
11547 (propagated-inputs
11548 `(("python-pep8" ,python-pep8)))
11549 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11550 (synopsis "Py.test plugin to check PEP8 requirements")
11551 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11552 (license license:expat)))
66f95b20
MB
11553
11554(define-public python2-pytest-pep8
f210e944 11555 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11556
11557(define-public python-pytest-flakes
11558 (package
11559 (name "python-pytest-flakes")
11560 (version "1.0.1")
11561 (source (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "pytest-flakes" version))
11564 (sha256
11565 (base32
11566 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11567 (build-system python-build-system)
11568 (arguments
b41a05ce 11569 `(#:phases
df94a6b5
MB
11570 (modify-phases %standard-phases
11571 (delete 'check)
11572 (add-after 'install 'check
05c2fd36
HG
11573 (lambda* (#:key outputs inputs #:allow-other-keys)
11574 ;; It's easier to run tests after install.
11575 ;; Make installed package available for running the tests
11576 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11577 (zero? (system* "py.test" "-vv")))))))
11578 (native-inputs
11579 `(("python-coverage" ,python-coverage)
11580 ("python-pytest" ,python-pytest)
11581 ("python-pytest-cache" ,python-pytest-cache)
11582 ("python-pytest-pep8" ,python-pytest-pep8)))
11583 (propagated-inputs
11584 `(("python-pyflakes" ,python-pyflakes)))
11585 (home-page "https://github.com/fschulze/pytest-flakes")
11586 (synopsis "Py.test plugin to check source code with pyflakes")
11587 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11588 (license license:expat)))
df94a6b5
MB
11589
11590(define-public python2-pytest-flakes
f210e944 11591 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11592
11593(define-public python-natsort
11594 (package
11595 (name "python-natsort")
11596 (version "5.0.1")
11597 (source (origin
11598 (method url-fetch)
11599 (uri (pypi-uri "natsort" version))
11600 (sha256
11601 (base32
11602 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11603 (build-system python-build-system)
11604 (arguments
11605 `(#:phases
11606 (modify-phases %standard-phases
11607 (add-before 'check 'set-cachedir
11608 ;; Tests require write access to $HOME by default
11609 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11610 (native-inputs
11611 `(("python-hypothesis" ,python-hypothesis)
11612 ("python-pytest-cache" ,python-pytest-cache)
11613 ("python-pytest-cov" ,python-pytest-cov)
11614 ("python-pytest-flakes" ,python-pytest-flakes)
11615 ("python-pytest-pep8" ,python-pytest-pep8)))
11616 (propagated-inputs ; TODO: Add python-fastnumbers.
11617 `(("python-pyicu" ,python-pyicu)))
11618 (home-page "https://github.com/SethMMorton/natsort")
11619 (synopsis "Natural sorting for python and shell")
11620 (description
11621 "Natsort lets you apply natural sorting on lists instead of
11622lexicographical. If you use the built-in @code{sorted} method in python
11623on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11624returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11625function @code{natsorted} that identifies numbers and sorts them separately
11626from strings. It can also sort version numbers, real numbers, mixed types
11627and more, and comes with a shell command @command{natsort} that exposes this
11628functionality in the command line.")
11629 (license license:expat)
11630 (properties `((python2-variant . ,(delay python2-natsort))))))
11631
11632(define-public python2-natsort
11633 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11634 (package (inherit base)
11635 (native-inputs
00e10c6e 11636 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11637 ("python2-mock" ,python2-mock)
11638 ("python2-enum34" ,python2-enum34)
11639 ,@(package-native-inputs base))))))
4efb9c54
SR
11640
11641(define-public python-glances
11642 (package
11643 (name "python-glances")
11644 (version "2.7.1")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "Glances" version))
11649 (sha256
11650 (base32
11651 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11652 (build-system python-build-system)
f22efa01 11653 (propagated-inputs
4efb9c54
SR
11654 `(("python-psutil" ,python-psutil)))
11655 (home-page
11656 "https://github.com/nicolargo/glances")
11657 (synopsis
11658 "A cross-platform curses-based monitoring tool")
11659 (description
11660 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11661Glances uses the PsUtil library to get information from your system. It monitors
11662CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11663 (license license:lgpl3+)))
4efb9c54
SR
11664
11665(define-public python2-glances
f210e944 11666 (package-with-python2 python-glances))
05b7a593
EF
11667
11668(define-public python-graphql-core
11669 (package
11670 (name "python-graphql-core")
11671 (version "0.5.3")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "graphql-core" version))
11676 (sha256
11677 (base32
11678 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11679 (build-system python-build-system)
11680 (arguments
326f8285
LF
11681 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11682 #:phases
05b7a593
EF
11683 (modify-phases %standard-phases
11684 (add-after 'unpack 'patch-hardcoded-version
11685 (lambda _ (substitute*
11686 "setup.py"
11687 (("'gevent==1.1rc1'") "'gevent'"))
11688 #t)))))
11689 (native-inputs
11690 `(("python-gevent" ,python-gevent)
11691 ("python-mock" ,python-mock)
11692 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11693 (propagated-inputs
05b7a593
EF
11694 `(("python-promise" ,python-promise)
11695 ("python-six" ,python-six)))
11696 (home-page "https://github.com/graphql-python/graphql-core")
11697 (synopsis "GraphQL implementation for Python")
11698 (description
11699 "GraphQL implementation for Python. GraphQL is a data query language and
11700runtime designed and used to request and deliver data to mobile and web apps.
11701This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11702to Python.")
05b7a593
EF
11703 (license license:expat)))
11704
11705(define-public python2-graphql-core
f210e944 11706 (package-with-python2 python-graphql-core))
7ee51575
EF
11707
11708(define-public python-graphql-relay
11709 (package
11710 (name "python-graphql-relay")
b13a5b4d 11711 (version "0.4.5")
7ee51575
EF
11712 (source
11713 (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "graphql-relay" version))
11716 (sha256
11717 (base32
b13a5b4d 11718 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
11719 (build-system python-build-system)
11720 (native-inputs
11721 `(("python-pytest" ,python-pytest)))
f22efa01 11722 (propagated-inputs
7ee51575
EF
11723 `(("python-graphql-core" ,python-graphql-core)
11724 ("python-promise" ,python-promise)
11725 ("python-six" ,python-six)))
11726 (home-page "https://github.com/graphql-python/graphql-relay-py")
11727 (synopsis "Relay implementation for Python")
11728 (description
11729 "This is a library to allow the easy creation of Relay-compliant servers
11730using the GraphQL Python reference implementation of a GraphQL server. It
11731should be noted that the code is a exact port of the original
11732@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11733from Facebook.")
7ee51575
EF
11734 (license license:expat)))
11735
11736(define-public python2-graphql-relay
f210e944 11737 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11738
11739(define-public python-graphene
11740 (package
11741 (name "python-graphene")
11742 (version "0.10.2")
11743 (source
11744 (origin
11745 (method url-fetch)
11746 (uri (pypi-uri "graphene" version))
11747 (sha256
11748 (base32
11749 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11750 (build-system python-build-system)
11751 (native-inputs
11752 `(("python-django-filter" ,python-django-filter)
11753 ("python-mock" ,python-mock)
11754 ("python-psycopg2" ,python-psycopg2)
11755 ("python-pytest-django" ,python-pytest-django)
11756 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11757 (propagated-inputs
ddc63a56
EF
11758 `(("python-graphql-core" ,python-graphql-core)
11759 ("python-graphql-relay" ,python-graphql-relay)
11760 ("python-iso8601" ,python-iso8601)
11761 ("python-promise" ,python-promise)
11762 ("python-six" ,python-six)))
11763 (home-page "http://graphene-python.org/")
11764 (synopsis "GraphQL Framework for Python")
11765 (description
11766 "Graphene is a Python library for building GraphQL schemas/types.
11767A GraphQL schema describes your data model, and provides a GraphQL server
11768with an associated set of resolve methods that know how to fetch data.")
11769 (properties `((python2-variant . ,(delay python2-graphene))))
11770 (license license:expat)))
11771
11772(define-public python2-graphene
11773 (let ((base (package-with-python2
11774 (strip-python2-variant python-graphene))))
11775 (package (inherit base)
11776 (native-inputs
00e10c6e 11777 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11778 ,@(package-native-inputs base))))))
d488d5d6
EF
11779
11780(define-public python-nautilus
11781 (package
11782 (name "python-nautilus")
11783 (version "0.4.9")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "nautilus" version))
11788 (sha256
11789 (base32
11790 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11791 (build-system python-build-system)
11792 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11793 (propagated-inputs
d488d5d6
EF
11794 `(("python-bcrypt" ,python-bcrypt)
11795 ("python-click" ,python-click)
11796 ("python-consul" ,python-consul)
d488d5d6
EF
11797 ("python-graphene" ,python-graphene)
11798 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11799 ("python-peewee" ,python-peewee)
11800 ("python-pika" ,python-pika)
d488d5d6
EF
11801 ("python-tornado" ,python-tornado)
11802 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11803 (native-inputs
11804 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11805 (home-page "https://github.com/AlecAivazis/nautilus")
11806 (synopsis "Library for creating microservice applications")
11807 (description
11808 "Nautilus is a framework for flux based microservices that looks to
11809provide extendible implementations of common aspects of a cloud so that you can
11810focus on building massively scalable web applications.")
11811 (license license:expat)))
94cffc63 11812
89cd988b
DM
11813(define-public python-snowballstemmer
11814 (package
11815 (name "python-snowballstemmer")
11816 (version "1.2.1")
11817 (source (origin
1bd858cc
MB
11818 (method url-fetch)
11819 (uri (pypi-uri "snowballstemmer" version))
11820 (sha256
11821 (base32
11822 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
11823 (build-system python-build-system)
11824 (arguments
11825 `(;; No tests exist
11826 #:tests? #f))
11827 (home-page "https://github.com/shibukawa/snowball_py")
11828 (synopsis "Snowball stemming library collection for Python")
11829 (description "This package provides 16 word stemmer algorithms generated
11830from Snowball algorithms. It includes the 15 original ones plus the Poerter
11831English stemmer.")
11832 (license license:bsd-3)))
11833
11834(define-public python2-snowballstemmer
11835 (package-with-python2 python-snowballstemmer))
11836
754bfd70
DM
11837(define-public python-sphinx-cloud-sptheme
11838 (package
11839 (name "python-sphinx-cloud-sptheme")
11840 (version "1.7.1")
11841 (source (origin
1bd858cc
MB
11842 (method url-fetch)
11843 (uri (pypi-uri "cloud_sptheme" version))
11844 (sha256
11845 (base32
11846 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
11847 (build-system python-build-system)
11848 (native-inputs
11849 `(("python-sphinx" ,python-sphinx)))
11850 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
11851 (synopsis "'Cloud' theme for Sphinx documenter")
11852 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 11853related extensions.")
1bd858cc 11854 (license license:bsd-3)))
754bfd70
DM
11855
11856(define-public python2-sphinx-cloud-sptheme
11857 (package-with-python2 python-sphinx-cloud-sptheme))
11858
807a5b32
DM
11859(define-public python-sphinx-alabaster-theme
11860 (package
11861 (name "python-sphinx-alabaster-theme")
11862 (version "0.7.9")
1bd858cc
MB
11863 (source (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "alabaster" version))
11866 (sha256
11867 (base32
11868 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
11869 (build-system python-build-system)
11870 (propagated-inputs
11871 `(("python-pygments" ,python-pygments)))
11872 (home-page "https://alabaster.readthedocs.io/")
11873 (synopsis "Configurable sidebar-enabled Sphinx theme")
11874 (description "Alabaster is a visually (c)lean, responsive, configurable
11875theme for the Sphinx documentation system. It's the default theme of Sphinx.")
11876 (license license:bsd-3)))
11877
11878(define-public python2-sphinx-alabaster-theme
11879 (package-with-python2 python-sphinx-alabaster-theme))
11880
66d3f50a
LF
11881(define-public python-betamax
11882 (package
11883 (name "python-betamax")
11884 (version "0.8.0")
11885 (source
11886 (origin
11887 (method url-fetch)
11888 (uri (pypi-uri "betamax" version))
11889 (sha256
11890 (base32
11891 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11892 (build-system python-build-system)
11893 (arguments
11894 '(;; Many tests fail because they require networking.
11895 #:tests? #f))
c415f763 11896 (propagated-inputs
66d3f50a
LF
11897 `(("python-requests" ,python-requests)))
11898 (home-page "https://github.com/sigmavirus24/betamax")
11899 (synopsis "Record HTTP interactions with python-requests")
11900 (description "Betamax will record your test suite's HTTP interactions and
11901replay them during future tests. It is designed to work with python-requests.")
f210e944 11902 (license license:expat)))
66d3f50a
LF
11903
11904(define-public python2-betamax
f210e944 11905 (package-with-python2 python-betamax))
ca0635b4 11906
94cffc63
LF
11907(define-public python-s3transfer
11908 (package
11909 (name "python-s3transfer")
1b5ea092 11910 (version "0.1.10")
94cffc63
LF
11911 (source (origin
11912 (method url-fetch)
11913 (uri (pypi-uri "s3transfer" version))
11914 (sha256
11915 (base32
1b5ea092 11916 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 11917 (build-system python-build-system)
fad8bf97
LF
11918 (arguments
11919 `(#:phases
11920 (modify-phases %standard-phases
11921 (replace 'check
11922 (lambda _
11923 ;; 7 of the 'integration' tests require network access or login
11924 ;; credentials.
11925 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11926 (native-inputs
fad8bf97
LF
11927 `(("python-docutils" ,python-docutils)
11928 ("python-mock" ,python-mock)
11929 ("python-nose" ,python-nose)))
f22efa01 11930 (propagated-inputs
94cffc63
LF
11931 `(("python-botocore" ,python-botocore)))
11932 (synopsis "Amazon S3 Transfer Manager")
11933 (description "S3transfer is a Python library for managing Amazon S3
11934transfers.")
11935 (home-page "https://github.com/boto/s3transfer")
11936 (license license:asl2.0)
11937 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11938
11939(define-public python2-s3transfer
11940 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11941 (package
11942 (inherit base)
11943 (native-inputs
11944 `(("python2-futures" ,python2-futures)
94cffc63 11945 ,@(package-native-inputs base))))))
8ab59181
HG
11946
11947(define-public python-setproctitle
11948(package
11949 (name "python-setproctitle")
11950 (version "1.1.10")
11951 (source
11952 (origin
11953 (method url-fetch)
11954 (uri (pypi-uri "setproctitle" version))
11955 (sha256
11956 (base32
11957 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11958 (build-system python-build-system)
11959 (arguments
11960 '(#:phases
11961 (modify-phases %standard-phases
11962 (add-before 'check 'patch-Makefile
11963 ;; Stricly this is only required for the python2 variant.
11964 ;; But adding a phase in an inherited package seems to be
11965 ;; cumbersum. So we patch even for python3.
11966 (lambda _
11967 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11968 (when nose
11969 (substitute* "Makefile"
11970 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11971 (string-append nose "/bin/nosetests "))))
11972 #t)))
11973 (replace 'check
11974 (lambda _
11975 (setenv "PYTHON" (or (which "python3") (which "python")))
11976 (setenv "PYCONFIG" (or (which "python3-config")
11977 (which "python-config")))
11978 (setenv "CC" "gcc")
11979 ;; No need to extend PYTHONPATH to find the built package, since
11980 ;; the Makefile will build anyway
11981 (zero? (system* "make" "check")))))))
11982 (native-inputs
11983 `(("procps" ,procps))) ; required for tests
11984 (home-page
11985 "https://github.com/dvarrazzo/py-setproctitle")
11986 (synopsis
11987 "Setproctitle implementation for Python to customize the process title")
11988 (description "The library allows a process to change its title (as displayed
11989by system tools such as ps and top).
11990
11991Changing the title is mostly useful in multi-process systems, for
11992example when a master process is forked: changing the children's title
11993allows to identify the task each process is busy with. The technique
11994is used by PostgreSQL and the OpenSSH Server for example.")
11995 (license license:bsd-3)
11996 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11997
11998(define-public python2-setproctitle
11999 (let ((base (package-with-python2
12000 (strip-python2-variant python-setproctitle))))
12001 (package
12002 (inherit base)
12003 (native-inputs `(("python2-nose" ,python2-nose)
12004 ,@(package-native-inputs base))))))
162e42d8
HG
12005
12006(define-public python-validictory
12007 (package
12008 (name "python-validictory")
12009 (version "1.0.1")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "validictory" version))
12014 (sha256
12015 (base32
12016 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12017 (build-system python-build-system)
12018 (arguments
12019 '(#:phases
12020 (modify-phases %standard-phases
12021 (add-after 'unpack 'bootstrap
12022 ;; Move the tests out of the package directory to avoid
12023 ;; packaging them.
12024 (lambda* _
12025 (rename-file "validictory/tests" "tests")
12026 (delete-file "tests/__init__.py")))
12027 (replace 'check
12028 (lambda _
12029 ;; Extend PYTHONPATH so the built package will be found.
12030 (setenv "PYTHONPATH"
12031 (string-append (getcwd) "/build/lib:"
12032 (getenv "PYTHONPATH")))
12033 (zero? (system* "py.test" "-vv" )))))))
12034 (native-inputs
12035 `(("python-pytest" ,python-pytest)))
12036 (home-page
12037 "https://github.com/jamesturk/validictory")
12038 (synopsis "General purpose Python data validator")
12039 (description "It allows validation of arbitrary Python data structures.
12040
12041The schema format is based on the JSON Schema
12042proposal (http://json-schema.org), so combined with json the library is also
12043useful as a validator for JSON data.")
f210e944 12044 (license license:expat)))
162e42d8
HG
12045
12046(define-public python2-validictory
f210e944 12047 (package-with-python2 python-validictory))
0990edfe
DM
12048
12049(define-public python-aniso8601
12050 (package
12051 (name "python-aniso8601")
12052 (version "1.1.0")
12053 (source
12054 (origin
12055 (method url-fetch)
12056 (uri (pypi-uri "aniso8601" version))
12057 (sha256
12058 (base32
12059 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12060 (build-system python-build-system)
12061 (propagated-inputs
12062 `(("python-dateutil-2" ,python-dateutil-2)))
12063 (home-page
12064 "https://bitbucket.org/nielsenb/aniso8601")
12065 (synopsis
12066 "Python library for parsing ISO 8601 strings")
12067 (description
12068 "This package contains a library for parsing ISO 8601 datetime strings.")
12069 (license license:bsd-3)))
999d964d
DM
12070
12071(define-public python-flask-restful
12072 (package
12073 (name "python-flask-restful")
12074 (version "0.3.5")
12075 (source
12076 (origin
12077 (method url-fetch)
12078 (uri (pypi-uri "Flask-RESTful" version))
12079 (sha256
12080 (base32
12081 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12082 (build-system python-build-system)
12083 (propagated-inputs
12084 `(("python-aniso8601" ,python-aniso8601)
12085 ("python-flask" ,python-flask)
12086 ("python-pycrypto" ,python-pycrypto)
12087 ("python-pytz" ,python-pytz)))
12088 (native-inputs
12089 `(;; Optional dependency of Flask. Tests need it.
12090 ("python-blinker" ,python-blinker)
12091 ("python-mock" ,python-mock) ; For tests
12092 ("python-nose" ,python-nose) ; For tests
12093 ("python-sphinx" ,python-sphinx)))
12094 (home-page
12095 "https://www.github.com/flask-restful/flask-restful/")
12096 (synopsis
12097 "Flask module for creating REST APIs")
12098 (description
12099 "This package contains a Flask module for creating REST APIs.")
12100 (license license:bsd-3)))
31288222
DM
12101
12102(define-public python-flask-basicauth
12103 (package
12104 (name "python-flask-basicauth")
12105 (version "0.2.0")
12106 (source
12107 (origin
12108 (method url-fetch)
12109 (uri (pypi-uri "Flask-BasicAuth" version))
12110 (sha256
12111 (base32
12112 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12113 (build-system python-build-system)
12114 (propagated-inputs
12115 `(("python-flask" ,python-flask)))
12116 (home-page
12117 "https://github.com/jpvanhal/flask-basicauth")
12118 (synopsis
12119 "HTTP basic access authentication for Flask")
12120 (description
12121 "This package provides HTTP basic access authentication for Flask.")
12122 (license license:bsd-3)))
903276d0
DM
12123
12124(define-public python-flask-sqlalchemy
12125 (package
12126 (name "python-flask-sqlalchemy")
12127 (version "2.1")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (pypi-uri "Flask-SQLAlchemy" version))
12132 (sha256
12133 (base32
12134 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12135 (build-system python-build-system)
12136 (propagated-inputs
12137 `(("python-flask" ,python-flask)
12138 ("python-sqlalchemy" ,python-sqlalchemy)))
12139 (home-page
12140 "http://github.com/mitsuhiko/flask-sqlalchemy")
12141 (synopsis
12142 "Module adding SQLAlchemy support to your Flask application")
12143 (description
12144 "This package adds SQLAlchemy support to your Flask application.")
12145 (license license:bsd-3)))
329b4b3b
LF
12146
12147(define-public python-pyev
12148 (package
12149 (name "python-pyev")
12150 (version "0.9.0")
12151 (source
12152 (origin
12153 (method url-fetch)
12154 (uri (pypi-uri "pyev" version))
12155 (sha256
12156 (base32
12157 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12158 (build-system python-build-system)
12159 (arguments
12160 `(#:tests? #f ; no test suite
12161 #:phases
12162 (modify-phases %standard-phases
12163 (add-after 'unpack 'patch
12164 (lambda* (#:key inputs #:allow-other-keys)
12165 (let ((libev (string-append (assoc-ref inputs "libev")
12166 "/lib/libev.so.4")))
12167 (substitute* "setup.py"
12168 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12169 (string-append "libev_dll_name = \"" libev "\"")))))))))
12170 (inputs
12171 `(("libev" ,libev)))
12172 (home-page "http://pythonhosted.org/pyev/")
12173 (synopsis "Python libev interface")
12174 (description "Pyev provides a Python interface to libev.")
12175 (license license:gpl3)))
12176
12177(define-public python2-pyev
12178 (package-with-python2 python-pyev))
45b4f127
DM
12179
12180(define-public python-imagesize
12181 (package
12182 (name "python-imagesize")
12183 (version "0.7.1")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "imagesize" version))
12188 (sha256
12189 (base32
12190 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12191 (build-system python-build-system)
9422c98a
LF
12192 (arguments
12193 '(;; Test files are not distributed on PyPi:
12194 ;; https://github.com/shibukawa/imagesize_py/issues/7
12195 #:tests? #f))
45b4f127
DM
12196 (home-page "https://github.com/shibukawa/imagesize_py")
12197 (synopsis "Gets image size of files in variaous formats in Python")
12198 (description
12199 "This package allows determination of image size from
12200PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12201 (license license:expat)))
45b4f127
DM
12202
12203(define-public python2-imagesize
f210e944 12204 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12205
12206(define-public python-axolotl-curve25519
12207 (package
12208 (name "python-axolotl-curve25519")
12209 (version "0.1")
12210 (source
12211 (origin
12212 (method git-fetch)
12213 (uri (git-reference
12214 (url "git://github.com/tgalal/python-axolotl-curve25519")
12215 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12216 (file-name (string-append name "-" version "-checkout"))
12217 (sha256
12218 (base32
12219 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12220 (build-system python-build-system)
12221 (arguments
12222 `(;; Prevent creation of the egg. This works around
12223 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12224 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12225 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12226 (synopsis "Python wrapper for curve25519 library")
12227 (description "This is a python wrapper for the curve25519 library
12228with ed25519 signatures. The C code was pulled from
12229libaxolotl-android. At the moment this wrapper is meant for use by
12230python-axolotl.")
12231 (license (list license:gpl3 ; Most files
683cdbf5 12232 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12233
12234(define-public python2-axolotl-curve25519
12235 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12236
12237(define-public python-axolotl
12238 (package
12239 (name "python-axolotl")
12240 (version "0.1.35")
12241 (source
12242 (origin
12243 (method url-fetch)
12244 (uri (string-append
12245 "https://github.com/tgalal/python-axolotl/archive/"
12246 version ".tar.gz"))
12247 (file-name (string-append name "-" version ".tar.gz"))
12248 (sha256
12249 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12250 (build-system python-build-system)
12251 (arguments
12252 `(#:phases
12253 (modify-phases %standard-phases
12254 ;; Don't install tests
12255 (add-before 'install 'remove-tests
12256 (lambda _
12257 (for-each delete-file-recursively
12258 '("axolotl/tests" "build/lib/axolotl/tests"))
12259 #t)))
12260 ;; Prevent creation of the egg. This works around
12261 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12262 #:configure-flags '("--root=/")))
06ff0837
AI
12263 (propagated-inputs
12264 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12265 ("python-dateutil" ,python-dateutil)
12266 ("python-protobuf" ,python-protobuf)
12267 ("python-pycrypto" ,python-pycrypto)))
12268 (home-page "https://github.com/tgalal/python-axolotl")
12269 (synopsis "Python port of libaxolotl-android")
12270 (description "This is a python port of libaxolotl-android. This
12271is a ratcheting forward secrecy protocol that works in synchronous and
12272asynchronous messaging environments.")
12273 (license license:gpl3)))
12274
12275(define-public python2-axolotl
12276 (package-with-python2 python-axolotl))
e2fca490
DM
12277
12278(define-public python-termstyle
12279 (package
12280 (name "python-termstyle")
12281 (version "0.1.11")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "termstyle" version))
12286 (sha256
12287 (base32
12288 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12289 (build-system python-build-system)
12290 (home-page "http://github.com/gfxmonk/termstyle")
12291 (synopsis "Console text coloring for Python")
12292 (description "This package provides console text coloring for Python.")
12293 (license license:bsd-3)))
1e6112d8
DM
12294
12295(define-public python-rednose
12296 (package
12297 (name "python-rednose")
12298 (version "1.2.1")
12299 (source
12300 (origin
12301 (method url-fetch)
12302 (uri (pypi-uri "rednose" version))
12303 (sha256
12304 (base32
12305 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12306 (build-system python-build-system)
12307 (arguments
12308 `(#:phases
12309 (modify-phases %standard-phases
12310 (add-after 'unpack 'fix-deps
12311 (lambda _
12312 ;; See <https://github.com/JBKahn/rednose/issues/12>
12313 (substitute* "setup.py"
12314 (("python-termstyle") "termstyle"))
12315 #t)))))
12316 (propagated-inputs
12317 `(("python-colorama" ,python-colorama)
12318 ("python-termstyle" ,python-termstyle)))
12319 (native-inputs
12320 `(("python-six" ,python-six)
12321 ("python-nose" ,python-nose)))
12322 (home-page "https://github.com/JBKahn/rednose")
12323 (synopsis "Colored output for Python nosetests")
12324 (description "This package provides colored output for the
12325@command{nosetests} command of the Python Nose unit test framework.")
12326 (license license:bsd-3)))
0a7f17f0
DM
12327
12328(define-public python-flask-restplus
12329 (package
12330 (name "python-flask-restplus")
12331 (version "0.9.2")
12332 (source
12333 (origin
12334 (method url-fetch)
12335 (uri (pypi-uri "flask-restplus" version))
12336 (sha256
12337 (base32
12338 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12339 (build-system python-build-system)
12340 (propagated-inputs
12341 `(("python-aniso8601" ,python-aniso8601)
12342 ("python-flask" ,python-flask)
12343 ("python-jsonschema" ,python-jsonschema)
12344 ("python-pytz" ,python-pytz)
12345 ("python-six" ,python-six)))
12346 (native-inputs
12347 `(("python-tzlocal" ,python-tzlocal)
12348 ("python-blinker" ,python-blinker)
12349 ("python-nose" ,python-nose)
12350 ("python-rednose" ,python-rednose)))
12351 (home-page "https://github.com/noirbizarre/flask-restplus")
12352 (synopsis "Framework for documented API development with Flask")
12353 (description "This package provides a framework for API development with
12354the Flask web framework in Python. It is similar to package
12355@code{python-flask-restful} but supports the @code{python-swagger}
12356documentation builder.")
12357 (license license:expat)))
1ed21519
DM
12358
12359(define-public python-sadisplay
12360 (package
12361 (name "python-sadisplay")
12362 (version "0.4.6")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "sadisplay" version))
12367 (sha256
12368 (base32
12369 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12370 (build-system python-build-system)
12371 (propagated-inputs
12372 `(("python-sqlalchemy" ,python-sqlalchemy)))
12373 (native-inputs
12374 `(("python-nose" ,python-nose)))
12375 (home-page "https://bitbucket.org/estin/sadisplay")
12376 (synopsis "SQLAlchemy schema displayer")
12377 (description "This package provides a program to build Entity
12378Relationship diagrams from a SQLAlchemy model (or directly from the
12379database).")
12380 (license license:bsd-3)))
12381
12382(define-public python2-sadisplay
12383 (package-with-python2 python-sadisplay))
444a79b6
DM
12384
12385(define-public python-flask-restful-swagger
12386 (package
12387 (name "python-flask-restful-swagger")
12388 (version "0.19")
12389 (source
12390 (origin
12391 (method url-fetch)
12392 (uri (pypi-uri "flask-restful-swagger" version))
12393 (sha256
12394 (base32
12395 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12396 (build-system python-build-system)
12397 (propagated-inputs
12398 `(("python-flask-restful" ,python-flask-restful)))
12399 (home-page "https://github.com/rantav/flask-restful-swagger")
12400 (synopsis "Extract Swagger specs from Flask-Restful projects")
12401 (description "This package lets you extract Swagger API documentation
12402specs from your Flask-Restful projects.")
12403 (license license:expat)))
12404
12405(define-public python2-flask-restful-swagger
12406 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12407
12408(define-public python-argcomplete
12409 (package
12410 (name "python-argcomplete")
12411 (version "1.7.0")
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "argcomplete" version))
12416 (sha256
12417 (base32
12418 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12419 (build-system python-build-system)
12420 (home-page "https://github.com/kislyuk/argcomplete")
12421 (synopsis "Shell tab completion for Python argparse")
12422 (description "argcomplete provides extensible command line tab completion
12423of arguments and options for Python scripts using @code{argparse}. It's
12424particularly useful for programs with many options or sub-parsers that can
12425dynamically suggest completions; for example, when browsing resources over the
12426network.")
12427 (license license:asl2.0)))
12428
12429(define-public python2-argcomplete
12430 (package-with-python2 python-argcomplete))
361a2fcf
TGR
12431
12432(define-public python-xopen
12433 (package
12434 (name "python-xopen")
12435 (version "0.1.1")
12436 (source
12437 (origin
12438 (method url-fetch)
12439 (uri (pypi-uri "xopen" version))
12440 (sha256
12441 (base32
12442 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12443 (file-name (string-append name "-" version ".tar.gz"))))
12444 (build-system python-build-system)
12445 (home-page "https://github.com/marcelm/xopen/")
12446 (synopsis "Open compressed files transparently")
12447 (description "This module provides an @code{xopen} function that works like
12448Python's built-in @code{open} function, but can also deal with compressed files.
12449Supported compression formats are gzip, bzip2 and, xz, and are automatically
12450recognized by their file extensions. The focus is on being as efficient as
12451possible on all supported Python versions.")
12452 (license license:expat)))
12453
12454(define-public python2-xopen
12455 (package-with-python2 python-xopen))
8d67610b
DM
12456
12457(define-public python2-cheetah
12458 (package
12459 (name "python2-cheetah")
12460 (version "2.4.4")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "Cheetah" version))
12465 (sha256
12466 (base32
12467 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
12468 (build-system python-build-system)
12469 (arguments
12470 `(#:python ,python-2))
12471 (propagated-inputs
12472 `(("python2-markdown" ,python2-markdown)))
12473 (home-page "https://pythonhosted.org/Cheetah/")
12474 (synopsis "Template engine")
12475 (description "Cheetah is a text-based template engine and Python code
12476generator.
12477
12478Cheetah can be used as a standalone templating utility or referenced as
12479a library from other Python applications. It has many potential uses,
12480but web developers looking for a viable alternative to ASP, JSP, PHP and
12481PSP are expected to be its principle user group.
12482
12483Features:
12484@enumerate
12485@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12486 text-based format.
12487@item Cleanly separates content, graphic design, and program code.
12488@item Blends the power and flexibility of Python with a simple template language
12489 that non-programmers can understand.
12490@item Gives template writers full access to any Python data structure, module,
12491 function, object, or method in their templates.
12492@item Makes code reuse easy by providing an object-orientated interface to
12493 templates that is accessible from Python code or other Cheetah templates.
12494 One template can subclass another and selectively reimplement sections of it.
12495@item Provides a simple, yet powerful, caching mechanism that can dramatically
12496 improve the performance of a dynamic website.
12497@item Compiles templates into optimized, yet readable, Python code.
12498@end enumerate")
12499 (license (license:x11-style "file://LICENSE"))))
916aafa4
CZ
12500
12501(define-public python-pbkdf2
12502 (package
12503 (name "python-pbkdf2")
12504 (version "1.3")
12505 (source
12506 (origin
12507 (method url-fetch)
12508 (uri (pypi-uri "pbkdf2" version))
12509 (sha256
12510 (base32
12511 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12512 (build-system python-build-system)
12513 (propagated-inputs
12514 `(("python-pycrypto" ,python-pycrypto))) ; optional
12515 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
12516 (synopsis "Password-based key derivation")
12517 (description "This module implements the password-based key derivation
12518function, PBKDF2, specified in RSA PKCS#5 v2.0.
12519
12520PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12521is part of the RSA Public Key Cryptography Standards series. The provided
12522implementation takes a password or a passphrase and a salt value (and
12523optionally a iteration count, a digest module, and a MAC module) and provides
12524a file-like object from which an arbitrarly-sized key can be read.")
12525 (license license:expat)))
12526
12527(define-public python2-pbkdf2
12528 (package-with-python2 python-pbkdf2))
cba84a38
CZ
12529
12530(define-public python-qrcode
12531 (package
12532 (name "python-qrcode")
12533 (version "5.3")
12534 (source
12535 (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "qrcode" version))
12538 (sha256
12539 (base32
12540 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
12541 (build-system python-build-system)
12542 (propagated-inputs
12543 `(("python-lxml" ,python-lxml) ; for SVG output
12544 ("python-pillow" ,python-pillow) ; for PNG output
12545 ("python-six" ,python-six)))
12546 (home-page "https://github.com/lincolnloop/python-qrcode")
12547 (synopsis "QR Code image generator")
12548 (description "This package provides a pure Python QR Code generator
12549module. It uses the Python Imaging Library (PIL) to allow for the generation
12550of QR Codes.
12551
12552In addition this package provides a command line tool to generate QR codes and
12553either write these QR codes to a file or do the output as ascii art at the
12554console.")
12555 (license license:bsd-3)))
12556
12557(define-public python2-qrcode
12558 (package-with-python2 python-qrcode))
af7caada
CZ
12559
12560;; SlowAES isn't compatible with Python 3.
12561(define-public python2-slowaes
12562 (package
12563 (name "python2-slowaes")
12564 (version "0.1a1")
12565 (source
12566 (origin
12567 (method url-fetch)
12568 (uri (pypi-uri "slowaes" version))
12569 (sha256
12570 (base32
12571 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
12572 (build-system python-build-system)
12573 (arguments `(#:python ,python-2))
12574 (home-page "http://code.google.com/p/slowaes/")
12575 (synopsis "Implementation of AES in Python")
12576 (description "This package contains an implementation of AES in Python.
12577This implementation is slow (hence the project name) but still useful when
12578faster ones are not available.")
12579 (license license:asl2.0)))
1a917fc9
MFM
12580
12581(define-public python-rst2ansi
12582 (package
12583 (name "python-rst2ansi")
12584 (version "0.1.5")
12585 (source
12586 (origin
12587 (method url-fetch)
12588 (uri (pypi-uri "rst2ansi" version))
12589 (sha256
12590 (base32
12591 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12592 (build-system python-build-system)
12593 (propagated-inputs
12594 `(("python-docutils" ,python-docutils)))
12595 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12596 (synopsis "Convert RST to ANSI-decorated console output")
12597 (description
12598 "Python module dedicated to rendering RST (reStructuredText) documents
12599to ansi-escaped strings suitable for display in a terminal.")
12600 (license license:expat)))
2f4623db
MFM
12601
12602(define-public python-ddt
12603 (package
12604 (name "python-ddt")
12605 (version "1.1.1")
12606 (source
12607 (origin
12608 (method url-fetch)
12609 (uri (pypi-uri "ddt" version))
12610 (sha256
12611 (base32
12612 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
12613 (build-system python-build-system)
12614 (native-inputs
12615 `(("python-mock" ,python-mock)
12616 ("python-nose" ,python-nose)))
12617 (propagated-inputs
12618 `(("python-six" ,python-six)
12619 ("python-pyyaml" ,python-pyyaml)))
12620 (home-page "https://github.com/txels/ddt")
12621 (synopsis "Data-Driven Tests")
12622 (description
12623 "DDT (Data-Driven Tests) allows you to multiply one test case by running
12624it with different test data, and make it appear as multiple test cases.")
12625 (license license:expat)))
12626
12627(define-public python2-ddt
12628 (package-with-python2 python-ddt))
2299b137
MFM
12629
12630(define-public python-pycosat
12631 (package
12632 (name "python-pycosat")
12633 (version "0.6.1")
12634 (source
12635 (origin
12636 (method url-fetch)
12637 (uri (pypi-uri "pycosat" version))
12638 (sha256
12639 (base32
12640 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12641 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12642 (build-system python-build-system)
12643 (home-page "https://github.com/ContinuumIO/pycosat")
12644 (synopsis "Bindings to picosat (a SAT solver)")
12645 (description
12646 "This package provides efficient Python bindings to @code{picosat} on
12647the C level. When importing pycosat, the @code{picosat} solver becomes part
12648of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12649Problem} (SAT) solver.")
12650 (license license:expat)))
12651
12652(define-public python2-pycosat
12653 (package-with-python2 python-pycosat))
8fd68504
MFM
12654
12655(define-public python2-ruamel.ordereddict
12656 (package
12657 (name "python2-ruamel.ordereddict")
12658 (version "0.4.9")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "ruamel.ordereddict" version))
12663 (sha256
12664 (base32
12665 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12666 (build-system python-build-system)
12667 (arguments
12668 `(#:python ,python-2
12669 #:phases
12670 (modify-phases %standard-phases
12671 (delete 'check)
12672 (add-after 'install 'check
12673 (lambda* (#:key inputs outputs #:allow-other-keys)
12674 (add-installed-pythonpath inputs outputs)
12675 (zero? (system* "python" "test/testordereddict.py")))))))
12676 (home-page "https://bitbucket.org/ruamel/ordereddict")
12677 (synopsis "Version of dict that keeps keys in insertion order")
12678 (description
12679 "This is an implementation of an ordered dictionary with @dfn{Key
12680Insertion Order} (KIO: updates of values do not affect the position of the
12681key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12682removed and put at the back). The standard library module @code{OrderedDict},
12683implemented later, implements a subset of @code{ordereddict} functionality.
12684Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12685Order} (KSO, no sorting function can be specified, but a transform can be
12686specified to apply on the key before comparison (e.g. @code{string.lower})).")
12687 (license license:expat)))