gnu: Add python-jupyter-core.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
a01b6da7
NK
33;;;
34;;; This file is part of GNU Guix.
35;;;
36;;; GNU Guix is free software; you can redistribute it and/or modify it
37;;; under the terms of the GNU General Public License as published by
38;;; the Free Software Foundation; either version 3 of the License, or (at
39;;; your option) any later version.
40;;;
41;;; GNU Guix is distributed in the hope that it will be useful, but
42;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44;;; GNU General Public License for more details.
45;;;
46;;; You should have received a copy of the GNU General Public License
47;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48
1ffa7090 49(define-module (gnu packages python)
3f641af0 50 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 51 #:use-module (gnu packages)
8e451885 52 #:use-module (gnu packages algebra)
d79a343b 53 #:use-module (gnu packages adns)
89b2e0b0 54 #:use-module (gnu packages attr)
d96034ed 55 #:use-module (gnu packages backup)
1ffa7090 56 #:use-module (gnu packages compression)
4ed20663 57 #:use-module (gnu packages databases)
ddc63a56 58 #:use-module (gnu packages django)
5e1c9367 59 #:use-module (gnu packages file)
4ed20663 60 #:use-module (gnu packages fontutils)
4ed20663
AE
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
6eb7af2a 63 #:use-module (gnu packages gl)
4ed20663 64 #:use-module (gnu packages glib)
6eb7af2a 65 #:use-module (gnu packages gstreamer)
4ed20663 66 #:use-module (gnu packages gtk)
421a80a2 67 #:use-module (gnu packages icu4c)
c937562e 68 #:use-module (gnu packages image)
4ed20663 69 #:use-module (gnu packages imagemagick)
d79a343b 70 #:use-module (gnu packages libevent)
b10ab723 71 #:use-module (gnu packages libffi)
89b2e0b0 72 #:use-module (gnu packages linux)
0da98533 73 #:use-module (gnu packages maths)
4ed20663 74 #:use-module (gnu packages multiprecision)
45203542 75 #:use-module (gnu packages networking)
be7134bf 76 #:use-module (gnu packages ncurses)
b04a52a6 77 #:use-module (gnu packages openstack)
d488d5d6 78 #:use-module (gnu packages password-utils)
c9b1b4f9 79 #:use-module (gnu packages pcre)
4ed20663 80 #:use-module (gnu packages perl)
b10ab723 81 #:use-module (gnu packages pkg-config)
4ed20663 82 #:use-module (gnu packages readline)
6eb7af2a 83 #:use-module (gnu packages sdl)
c9b1b4f9 84 #:use-module (gnu packages statistics)
8f9ac901 85 #:use-module (gnu packages tex)
1c65314c 86 #:use-module (gnu packages texinfo)
cc2b77df 87 #:use-module (gnu packages tls)
e25f0174 88 #:use-module (gnu packages version-control)
8d12be1e 89 #:use-module (gnu packages web)
ce0614dd 90 #:use-module (gnu packages base)
26b307e2 91 #:use-module (gnu packages xml)
6fa14469 92 #:use-module (gnu packages xorg)
0bdc1671 93 #:use-module (gnu packages xdisorg)
4ed20663 94 #:use-module (gnu packages zip)
afa181ff 95 #:use-module (gnu packages tcl)
63bcec71 96 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
97 #:use-module (guix packages)
98 #:use-module (guix download)
ea5456c8 99 #:use-module (guix git-download)
11bb85a1 100 #:use-module (guix utils)
acc26ff1 101 #:use-module (guix build-system gnu)
d8c4998f 102 #:use-module (guix build-system cmake)
898238b9 103 #:use-module (guix build-system python)
1c65314c
FB
104 #:use-module (guix build-system trivial)
105 #:use-module (srfi srfi-1))
a01b6da7 106
45848023 107(define-public python-2.7
a01b6da7
NK
108 (package
109 (name "python")
e7e7a1eb 110 (version "2.7.11")
a01b6da7
NK
111 (source
112 (origin
113 (method url-fetch)
9b43a0ff 114 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
115 version "/Python-" version ".tar.xz"))
116 (sha256
117 (base32
e7e7a1eb 118 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
c3052d6b
ML
119 (patches (search-patches "python-2.7-search-paths.patch"
120 "python-2-deterministic-build-info.patch"
121 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
122 (modules '((guix build utils)))
123 ;; suboptimal to delete failing tests here, but if we delete them in the
124 ;; arguments then we need to make sure to strip out that phase when it
125 ;; gets inherited by python and python-minimal.
126 (snippet
127 '(begin
128 (for-each delete-file
129 '("Lib/test/test_compileall.py"
130 "Lib/test/test_distutils.py"
131 "Lib/test/test_import.py"
132 "Lib/test/test_shutil.py"
133 "Lib/test/test_socket.py"
1bb163b0 134 "Lib/test/test_subprocess.py"))
10a42aa2 135 #t))))
02f0c3b2
LC
136 (outputs '("out"
137 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 138 (build-system gnu-build-system)
3fdc99da 139 (arguments
10a42aa2 140 `(;; 356 tests OK.
e7e7a1eb
EF
141 ;; 6 tests failed:
142 ;; test_compileall test_distutils test_import test_shutil test_socket
143 ;; test_subprocess
144 ;; 39 tests skipped:
ff6f33cf
ED
145 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
146 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
147 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
148 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
149 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
150 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
151 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
152 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
153 ;; test_winreg test_winsound test_zipfile64
154 ;; 4 skips unexpected on linux2:
155 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 156 #:test-target "test"
3fdc99da 157 #:configure-flags
6a20289d
LC
158 (list "--enable-shared" ;allow embedding
159 "--with-system-ffi" ;build ctypes
160 (string-append "LDFLAGS=-Wl,-rpath="
161 (assoc-ref %outputs "out") "/lib"))
fd982732 162
d2cc9c7c
LC
163 #:modules ((ice-9 ftw) (ice-9 match)
164 (guix build utils) (guix build gnu-build-system))
fd982732 165 #:phases
46472ecd
MW
166 (modify-phases %standard-phases
167 (add-before
168 'configure 'patch-lib-shells
169 (lambda _
170 ;; Filter for existing files, since some may not exist in all
171 ;; versions of python that are built with this recipe.
172 (substitute* (filter file-exists?
173 '("Lib/subprocess.py"
174 "Lib/popen2.py"
175 "Lib/distutils/tests/test_spawn.py"
176 "Lib/test/test_subprocess.py"))
177 (("/bin/sh") (which "sh")))
dedc8320
LC
178
179 ;; Use zero as the timestamp in .pyc files so that builds are
180 ;; deterministic. TODO: Remove it when this variable is set in
181 ;; gnu-build-system.scm.
a665996f 182 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 183 #t))
5b4e2791
LC
184 (add-before 'configure 'do-not-record-configure-flags
185 (lambda* (#:key configure-flags #:allow-other-keys)
186 ;; Remove configure flags from the installed '_sysconfigdata.py'
187 ;; and 'Makefile' so we don't end up keeping references to the
188 ;; build tools.
189 ;;
190 ;; Preserve at least '--with-system-ffi' since otherwise the
191 ;; thing tries to build libffi, fails, and we end up with a
192 ;; Python that lacks ctypes.
193 (substitute* "configure"
194 (("^CONFIG_ARGS=.*$")
195 (format #f "CONFIG_ARGS='~a'\n"
196 (if (member "--with-system-ffi" configure-flags)
197 "--with-system-ffi"
198 ""))))
199 #t))
46472ecd
MW
200 (add-before
201 'check 'pre-check
202 (lambda _
203 ;; 'Lib/test/test_site.py' needs a valid $HOME
204 (setenv "HOME" (getcwd))
1bb163b0
LC
205 ,@(if (string-prefix? "mips64el" (%current-system))
206
207 ;; XXX: The following test fails on mips64el.
208 '((false-if-exception
209 (delete-file "Lib/test/test_ctypes.py")))
210
211 '())
46472ecd
MW
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
02f0c3b2 224 #t)))
9ffe61b0
LC
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
216c283b
LC
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
02f0c3b2
LC
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
a01b6da7 277 (inputs
3fdc99da
CR
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
b10ab723 280 ("libffi" ,libffi) ; for ctypes
b88e1b0a 281 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 282 ("openssl" ,openssl)
3fdc99da 283 ("readline" ,readline)
afa181ff
LC
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
b10ab723
CR
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
af070955 292 (files '("lib/python2.7/site-packages")))))
a01b6da7 293 (home-page "http://python.org")
afa181ff 294 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297is used in a wide variety of application domains. Some of its key
298distinguishing features include: clear, readable syntax; strong
299introspection capabilities; intuitive object orientation; natural
300expression of procedural code; full modularity, supporting hierarchical
301packages; exception-based error handling; and very high level dynamic
302data types.")
3f641af0 303 (license license:psfl)))
acc26ff1 304
45848023
HG
305;; Current 2.x version.
306(define-public python-2 python-2.7)
307
308(define-public python-3.4
b24d1cfc 309 (package (inherit python-2)
08c04509 310 (version "3.4.3")
717003e3
LC
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
fc1adab1
AK
315 (patches (search-patches
316 "python-fix-tests.patch"
317 ;; XXX Try removing this patch for python > 3.4.3
318 "python-disable-ssl-test.patch"
319 "python-3-deterministic-build-info.patch"
320 "python-3-search-paths.patch"))
717003e3
LC
321 (patch-flags '("-p0"))
322 (sha256
323 (base32
08c04509 324 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
325 (arguments (substitute-keyword-arguments (package-arguments python-2)
326 ((#:tests? _) #t)))
1aebc0cb
AE
327 (native-search-paths
328 (list (search-path-specification
329 (variable "PYTHONPATH")
0e05d01e
SB
330 (files (list (string-append "lib/python"
331 (version-major+minor version)
332 "/site-packages"))))))))
f26a77ff 333
45848023
HG
334;; Current 3.x version.
335(define-public python-3 python-3.4)
336
337;; Current major version.
338(define-public python python-3)
339
95288fcc
LC
340;; Minimal variants of Python, mostly used to break the cycle between Tk and
341;; Python (Tk -> libxcb -> Python.)
342
343(define-public python2-minimal
344 (package (inherit python-2)
345 (name "python-minimal")
02f0c3b2 346 (outputs '("out"))
95288fcc
LC
347 (arguments
348 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
349 ((#:configure-flags cf)
350 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
351 (inputs '()))) ;none of the optional dependencies
352
353(define-public python-minimal
898238b9 354 (package (inherit python)
95288fcc 355 (name "python-minimal")
02f0c3b2 356 (outputs '("out"))
95288fcc
LC
357 (arguments
358 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
359 ((#:configure-flags cf)
360 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
361
362 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
363 ;; zlib is required by 'zipimport', used by pip.
364 (inputs `(("openssl" ,openssl)
365 ("zlib" ,zlib)))))
366
64cb064c
LC
367(define* (wrap-python3 python
368 #:optional
369 (name (string-append (package-name python) "-wrapper")))
898238b9 370 (package (inherit python)
95288fcc 371 (name name)
898238b9
AE
372 (source #f)
373 (build-system trivial-build-system)
02f0c3b2 374 (outputs '("out"))
3c0f2329 375 (propagated-inputs `(("python" ,python)))
898238b9
AE
376 (arguments
377 `(#:modules ((guix build utils))
378 #:builder
379 (begin
380 (use-modules (guix build utils))
381 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
382 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
383 (mkdir-p bin)
384 (for-each
385 (lambda (old new)
386 (symlink (string-append python old)
387 (string-append bin "/" new)))
187e9094
LF
388 '("python3" "pydoc3" "idle3")
389 '("python" "pydoc" "idle"))))))
0d56e3e1
LC
390 (synopsis "Wrapper for the Python 3 commands")
391 (description
392 "This package provides wrappers for the commands of Python@tie{}3.x such
393that they can be invoked under their usual name---e.g., @command{python}
394instead of @command{python3}.")))
395
95288fcc
LC
396(define-public python-wrapper (wrap-python3 python))
397(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 398
aaf625b8
RW
399(define-public python-psutil
400 (package
401 (name "python-psutil")
88535a44 402 (version "4.3.0")
aaf625b8
RW
403 (source
404 (origin
405 (method url-fetch)
f56777be 406 (uri (pypi-uri "psutil" version))
aaf625b8
RW
407 (sha256
408 (base32
88535a44 409 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-setuptools" ,python-setuptools)))
88535a44 413 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
414 (synopsis "Library for retrieving information on running processes")
415 (description
416 "psutil (Python system and process utilities) is a library for retrieving
417information on running processes and system utilization (CPU, memory, disks,
418network) in Python. It is useful mainly for system monitoring, profiling and
419limiting process resources and management of running processes. It implements
420many functionalities offered by command line tools such as: ps, top, lsof,
421netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
422pidof, tty, taskset, pmap.")
3f641af0 423 (license license:bsd-3)))
aaf625b8
RW
424
425(define-public python2-psutil
426 (package-with-python2 python-psutil))
898238b9 427
f9da1d8a
ED
428(define-public python-passlib
429 (package
430 (name "python-passlib")
690e8c66 431 (version "1.6.5")
f9da1d8a
ED
432 (source
433 (origin
434 (method url-fetch)
690e8c66 435 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
436 (sha256
437 (base32
690e8c66 438 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
439 (build-system python-build-system)
440 (native-inputs
441 `(("python-nose" ,python-nose)
442 ("python-setuptools" ,python-setuptools)))
443 (inputs
444 `(("python-py-bcrypt" ,python-py-bcrypt)))
445 (arguments
446 `(#:phases
447 (alist-cons-before
448 'check 'set-PYTHON_EGG_CACHE
449 ;; some tests require access to "$HOME/.cython"
450 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
451 %standard-phases)))
452 (home-page "https://bitbucket.org/ecollins/passlib")
453 (synopsis
454 "Comprehensive password hashing framework")
455 (description
456 "Passlib is a password hashing library for Python 2 & 3, which provides
457cross-platform implementations of over 30 password hashing algorithms, as well
458as a framework for managing existing password hashes. It's designed to be
459useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
460to providing full-strength password hashing for multi-user application.")
3f641af0 461 (license license:bsd-3)))
f9da1d8a
ED
462
463(define-public python2-passlib
464 (package-with-python2 python-passlib))
465
feb0d9c3
ED
466(define-public python-py-bcrypt
467 (package
468 (name "python-py-bcrypt")
469 (version "0.4")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append
474 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
475 version
476 ".tar.gz"))
477 (sha256
478 (base32
479 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
480 (build-system python-build-system)
481 (native-inputs
482 `(("python-setuptools" ,python-setuptools)))
483 (home-page "https://code.google.com/p/py-bcrypt")
484 (synopsis
485 "Bcrypt password hashing and key derivation")
486 (description
487 "A python wrapper of OpenBSD's Blowfish password hashing code. This
488system hashes passwords using a version of Bruce Schneier's Blowfish block
489cipher with modifications designed to raise the cost of off-line password
490cracking and frustrate fast hardware implementation. The computation cost of
491the algorithm is parametised, so it can be increased as computers get faster.
492The intent is to make a compromise of a password database less likely to
493result in an attacker gaining knowledge of the plaintext passwords (e.g. using
494John the Ripper).")
495 ;; "sha2.c" is under BSD-3;
496 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
497 ;; the rest is under ISC.
3f641af0 498 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
499
500(define-public python2-py-bcrypt
501 (package-with-python2 python-py-bcrypt))
502
503
429fdea1
ED
504(define-public python-paramiko
505 (package
506 (name "python-paramiko")
81b9bbbd 507 (version "1.16.0")
429fdea1
ED
508 (source
509 (origin
510 (method url-fetch)
81b9bbbd 511 (uri (pypi-uri "paramiko" version))
429fdea1
ED
512 (sha256
513 (base32
81b9bbbd 514 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
515 (build-system python-build-system)
516 (native-inputs
517 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
518 (propagated-inputs
519 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 520 (inputs
a3fc12da 521 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
522 (home-page "http://www.paramiko.org/")
523 (synopsis "SSHv2 protocol library")
524 (description "Paramiko is a python implementation of the SSHv2 protocol,
525providing both client and server functionality. While it leverages a Python C
526extension for low level cryptography (PyCrypto), Paramiko itself is a pure
527Python interface around SSH networking concepts.")
3f641af0 528 (license license:lgpl2.1+)))
429fdea1
ED
529
530(define-public python2-paramiko
531 (package-with-python2 python-paramiko))
532
533
de73dbf6
ED
534(define-public python-httplib2
535 (package
536 (name "python-httplib2")
286f1bac 537 (version "0.9.2")
de73dbf6
ED
538 (source
539 (origin
540 (method url-fetch)
286f1bac 541 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
542 (sha256
543 (base32
286f1bac 544 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
545 (build-system python-build-system)
546 (native-inputs
547 `(("python-setuptools" ,python-setuptools)))
286f1bac 548 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
549 (synopsis "Comprehensive HTTP client library")
550 (description
551 "A comprehensive HTTP client library supporting many features left out of
552other HTTP libraries.")
553 (license license:expat)))
554
555(define-public python2-httplib2
556 (package-with-python2 python-httplib2))
557
67039875
ED
558(define-public python-ecdsa
559 (package
560 (name "python-ecdsa")
561 (version "0.13")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (string-append
566 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
567 version
568 ".tar.gz"))
569 (sha256
570 (base32
571 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
572 (build-system python-build-system)
573 (native-inputs
574 `(("python-setuptools" ,python-setuptools)))
575 (inputs
576 `(("openssl" ,openssl)))
577 (home-page
578 "http://github.com/warner/python-ecdsa")
579 (synopsis
580 "ECDSA cryptographic signature library (pure python)")
581 (description
582 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
583Curve Digital Signature Algorithm), implemented purely in Python. With this
584library, you can quickly create keypairs (signing key and verifying key), sign
585messages, and verify the signatures. The keys and signatures are very short,
586making them easy to handle and incorporate into other protocols.")
587 (license license:expat)))
588
589(define-public python2-ecdsa
590 (package-with-python2 python-ecdsa))
591
52323f32
ED
592(define-public python-ccm
593 (package
594 (name "python-ccm")
db5567f7 595 (version "2.1.6")
52323f32
ED
596 (source
597 (origin
598 (method url-fetch)
db5567f7 599 (uri (pypi-uri "ccm" version))
52323f32
ED
600 (sha256
601 (base32
db5567f7 602 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
603 (build-system python-build-system)
604 (native-inputs
605 `(("python-setuptools" ,python-setuptools)))
606 (inputs
607 `(("python-pyyaml" ,python-pyyaml)
608 ("python-six" ,python-six)))
609 (home-page "https://github.com/pcmanus/ccm")
610 (synopsis "Cassandra Cluster Manager")
611 (description "A script/library to create, launch and remove an Apache
612Cassandra cluster on localhost.")
3f641af0 613 (license license:asl2.0)))
52323f32
ED
614
615(define-public python2-ccm
616 (package-with-python2 python-ccm))
617
89114f39 618(define-public python-pytz
acc26ff1 619 (package
89114f39 620 (name "python-pytz")
61c9babb 621 (version "2016.3")
acc26ff1
CR
622 (source
623 (origin
624 (method url-fetch)
61c9babb 625 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
626 (sha256
627 (base32
61c9babb 628 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 629 (build-system python-build-system)
8498b8cf 630 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 631 (home-page "http://pythonhosted.org/pytz")
9e771e3b 632 (synopsis "Python timezone library")
acc26ff1
CR
633 (description
634 "This library allows accurate and cross platform timezone calculations
635using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 636 (license license:expat)))
5ace6e2f 637
89114f39 638(define-public python2-pytz
11bb85a1 639 (package-with-python2 python-pytz))
89114f39 640
fc50e9c6 641
89114f39 642(define-public python-babel
5ace6e2f 643 (package
89114f39 644 (name "python-babel")
3f37db6b 645 (version "2.3.2")
5ace6e2f
CR
646 (source
647 (origin
648 (method url-fetch)
b850a6d8 649 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
650 (sha256
651 (base32
3f37db6b 652 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
653 (build-system python-build-system)
654 (inputs
e1804763
AE
655 `(("python-pytz" ,python-pytz)
656 ("python-setuptools" ,python-setuptools)))
8498b8cf 657 (arguments `(#:tests? #f)) ; no test target
e1804763 658 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
659 (synopsis
660 "Tools for internationalizing Python applications")
661 (description
662 "Babel is composed of two major parts:
663- tools to build and work with gettext message catalogs
664- a Python interface to the CLDR (Common Locale Data Repository), providing
665access to various locale display names, localized number and date formatting,
666etc. ")
3f641af0 667 (license license:bsd-3)))
89114f39
AE
668
669(define-public python2-babel
11bb85a1 670 (package-with-python2 python-babel))
73adf220 671
ed377cc6
RW
672(define-public python2-backport-ssl-match-hostname
673 (package
674 (name "python2-backport-ssl-match-hostname")
f2d06d46 675 (version "3.5.0.1")
ed377cc6
RW
676 (source
677 (origin
678 (method url-fetch)
679 (uri (string-append
680 "https://pypi.python.org/packages/source/b/"
681 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
682 version ".tar.gz"))
683 (sha256
684 (base32
f2d06d46 685 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 686 (build-system python-build-system)
f2d06d46
EF
687 (arguments
688 `(#:python ,python-2
689 #:tests? #f)) ; no test target
ed377cc6
RW
690 (inputs
691 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
692 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
693 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
694 (description
695 "This backport brings the ssl.match_hostname() function to users of
696earlier versions of Python. The function checks the hostname in the
697certificate returned by the server to which a connection has been established,
698and verifies that it matches the intended target hostname.")
3f641af0 699 (license license:psfl)))
ed377cc6 700
ef5cbf9b
RW
701(define-public python-h5py
702 (package
703 (name "python-h5py")
fe147c41 704 (version "2.6.0")
ef5cbf9b
RW
705 (source
706 (origin
707 (method url-fetch)
fe147c41 708 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
709 (sha256
710 (base32
fe147c41 711 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 712 (build-system python-build-system)
797e1401
RW
713 (arguments
714 `(#:tests? #f ; no test target
715 #:phases
716 (modify-phases %standard-phases
717 (add-after 'unpack 'fix-hdf5-paths
718 (lambda* (#:key inputs #:allow-other-keys)
719 (let ((prefix (assoc-ref inputs "hdf5")))
720 (substitute* "setup_build.py"
721 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
722 (string-append "['" prefix "/lib" "']"))
723 (("'/opt/local/include', '/usr/local/include'")
724 (string-append "'" prefix "/include" "'")))
725 (substitute* "setup_configure.py"
726 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
727 (string-append "['" prefix "/lib" "']")))
728 #t))))))
3c4010b1
RW
729 (propagated-inputs
730 `(("python-numpy" ,python-numpy)))
ef5cbf9b 731 (inputs
fe147c41
EF
732 `(("hdf5" ,hdf5)
733 ("python-six" ,python-six)))
ef5cbf9b 734 (native-inputs
fe147c41
EF
735 `(("python-cython" ,python-cython)
736 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
737 (home-page "http://www.h5py.org/")
738 (synopsis "Read and write HDF5 files from Python")
739 (description
740 "The h5py package provides both a high- and low-level interface to the
741HDF5 library from Python. The low-level interface is intended to be a
742complete wrapping of the HDF5 API, while the high-level component supports
743access to HDF5 files, datasets and groups using established Python and NumPy
744concepts.")
3f641af0 745 (license license:bsd-3)
fe147c41 746 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
747
748(define-public python2-h5py
fe147c41 749 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 750
c1448c69
EB
751(define-public python-lockfile
752 (package
753 (name "python-lockfile")
692add53 754 (version "0.12.2")
c1448c69
EB
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
759 "lockfile-" version ".tar.gz"))
760 (sha256
761 (base32
692add53 762 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
763 (build-system python-build-system)
764 (arguments '(#:test-target "check"))
692add53
BW
765 (native-inputs
766 `(("python-pbr" ,python-pbr)))
6a8f26a4 767 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
768 (synopsis "Platform-independent file locking module")
769 (description
770 "The lockfile package exports a LockFile class which provides a simple
771API for locking files.")
1804527a
BW
772 (license license:expat)
773 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
774
775(define-public python2-lockfile
1804527a
BW
776 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
777 (package
692add53
BW
778 (inherit base)
779 (native-inputs `(("python2-setuptools" ,python2-setuptools)
780 ,@(package-native-inputs base))))))
c1448c69 781
5a1a4bf6
EB
782(define-public python-mock
783 (package
784 (name "python-mock")
785 (version "1.0.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
790 "mock-" version ".tar.gz"))
791 (sha256
792 (base32
793 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
794 (build-system python-build-system)
795 (arguments '(#:test-target "check"))
07af3e5e 796 (home-page "http://code.google.com/p/mock/")
9e771e3b 797 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
798 (description
799 "Mock is a library for testing in Python. It allows you to replace parts
800of your system under test with mock objects and make assertions about how they
801have been used.")
bd3fa666 802 (license license:expat)))
5a1a4bf6
EB
803
804(define-public python2-mock
805 (package-with-python2 python-mock))
806
fc50e9c6 807
73adf220
AE
808(define-public python-setuptools
809 (package
810 (name "python-setuptools")
62a9a23b 811 (version "18.3.1")
73adf220
AE
812 (source
813 (origin
814 (method url-fetch)
815 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
816 version ".tar.gz"))
817 (sha256
818 (base32
62a9a23b 819 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 820 (build-system python-build-system)
d3d656c5
AE
821 ;; FIXME: Tests require pytest, which itself relies on setuptools.
822 ;; One could bootstrap with an internal untested setuptools.
73adf220 823 (arguments
824af8ca 824 `(#:tests? #f))
73adf220
AE
825 (home-page "https://pypi.python.org/pypi/setuptools")
826 (synopsis
827 "Library designed to facilitate packaging Python projects")
828 (description
829 "Setuptools is a fully-featured, stable library designed to facilitate
830packaging Python projects, where packaging includes:
831Python package and module definitions,
832distribution package metadata,
833test hooks,
834project installation,
835platform-specific details,
836Python 3 support.")
3f641af0 837 (license license:psfl)))
73adf220
AE
838
839(define-public python2-setuptools
840 (package-with-python2 python-setuptools))
fc50e9c6
AE
841
842
cafc3f5a
EB
843(define-public python-pycrypto
844 (package
845 (name "python-pycrypto")
846 (version "2.6.1")
847 (source
848 (origin
849 (method url-fetch)
850 (uri (string-append "https://pypi.python.org/packages/source/p/"
851 "pycrypto/pycrypto-" version ".tar.gz"))
852 (sha256
853 (base32
854 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
855 (build-system python-build-system)
856 (native-inputs
857 `(("python-setuptools" ,python-setuptools)))
858 (inputs
859 `(("python" ,python)
860 ("gmp" ,gmp)))
861 (arguments
862 `(#:phases
863 (alist-cons-before
864 'build 'set-build-env
865 ;; pycrypto runs an autoconf configure script behind the scenes
866 (lambda _
867 (setenv "CONFIG_SHELL" (which "bash")))
868 %standard-phases)))
869 (home-page "http://www.pycrypto.org/")
870 (synopsis "Cryptographic modules for Python")
871 (description
872 "Pycrypto is a collection of both secure hash functions (such as SHA256
873and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 874etc.). The package is structured to make adding new modules easy.")
3f641af0 875 (license license:public-domain)))
cafc3f5a 876
345f0611 877(define-public python2-pycrypto
1c0059da
EF
878 (let ((pycrypto (package-with-python2 python-pycrypto)))
879 (package (inherit pycrypto)
880 (inputs
881 `(("python" ,python-2)
882 ,@(alist-delete
883 "python"
884 (package-inputs pycrypto)))))))
345f0611 885
cafc3f5a
EB
886(define-public python-keyring
887 (package
888 (name "python-keyring")
13f3ff35 889 (version "8.7")
cafc3f5a
EB
890 (source
891 (origin
892 (method url-fetch)
664e6c3a 893 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
894 (sha256
895 (base32
13f3ff35 896 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
897 (build-system python-build-system)
898 (native-inputs
13f3ff35 899 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
900 (inputs
901 `(("python-pycrypto" ,python-pycrypto)))
902 (arguments
664e6c3a 903 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 904 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
905 (synopsis "Store and access your passwords safely")
906 (description
907 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 908service from python. It can be used in any application that needs safe
cafc3f5a
EB
909password storage.")
910 ;; "MIT" and PSF dual license
3f641af0 911 (license license:x11)
13f3ff35 912 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 913
d7af1069 914(define-public python2-keyring
13f3ff35
EF
915 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
916 (package
917 (inherit base)
918 (native-inputs `(("python2-setuptools" ,python2-setuptools)
919 ,@(package-native-inputs base))))))
d7af1069 920
a480bc41
EB
921(define-public python-six
922 (package
923 (name "python-six")
b6ab89ef 924 (version "1.10.0")
a480bc41
EB
925 (source
926 (origin
927 (method url-fetch)
b6ab89ef 928 (uri (pypi-uri "six" version))
a480bc41
EB
929 (sha256
930 (base32
b6ab89ef 931 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
932 (build-system python-build-system)
933 (inputs
934 `(("python-setuptools" ,python-setuptools)))
935 (home-page "http://pypi.python.org/pypi/six/")
936 (synopsis "Python 2 and 3 compatibility utilities")
937 (description
35b9e423 938 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
939functions for smoothing over the differences between the Python versions with
940the goal of writing Python code that is compatible on both Python versions.
35b9e423 941Six supports every Python version since 2.5. It is contained in only one
a480bc41 942Python file, so it can be easily copied into your project.")
3f641af0 943 (license license:x11)))
a480bc41 944
0c20025c
AE
945(define-public python2-six
946 (package-with-python2 python-six))
947
cafc3f5a
EB
948(define-public python-dateutil-2
949 (package
950 (name "python-dateutil")
394b8060 951 (version "2.5.2")
cafc3f5a
EB
952 (source
953 (origin
954 (method url-fetch)
394b8060 955 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
956 (sha256
957 (base32
394b8060 958 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
959 (build-system python-build-system)
960 (inputs
394b8060 961 `(("python-six" ,python-six)))
b5a5fb19 962 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
963 (synopsis "Extensions to the standard datetime module")
964 (description
965 "The dateutil module provides powerful extensions to the standard
966datetime module, available in Python 2.3+.")
3f641af0 967 (license license:bsd-3)
394b8060 968 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
969
970(define-public python2-dateutil-2
394b8060
EF
971 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
972 (package
973 (inherit base)
974 (inputs `(("python2-setuptools" ,python2-setuptools)
975 ,@(package-inputs base))))))
cafc3f5a 976
fc50e9c6
AE
977(define-public python-dateutil
978 (package
979 (name "python-dateutil")
980 (version "1.5") ; last version for python < 3
981 (source
982 (origin
983 (method url-fetch)
cafc3f5a
EB
984 (uri (string-append "http://labix.org/download/python-dateutil/"
985 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
986 (sha256
987 (base32
988 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
989 (build-system python-build-system)
990 (inputs
991 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 992 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 993 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
994 (description
995 "The dateutil module provides powerful extensions to the standard
996datetime module, available in Python 2.3+.")
3f641af0 997 (license license:psfl)))
fc50e9c6
AE
998
999(define-public python2-dateutil
1000 (package-with-python2 python-dateutil))
1d08c01f 1001
cafc3f5a
EB
1002(define-public python-parsedatetime
1003 (package
1004 (name "python-parsedatetime")
eebf6f01 1005 (version "2.1")
cafc3f5a
EB
1006 (source
1007 (origin
1008 (method url-fetch)
eebf6f01 1009 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1010 (sha256
1011 (base32
eebf6f01 1012 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1013 (build-system python-build-system)
1014 (native-inputs
eebf6f01
EF
1015 `(("python-nose" ,python-nose)
1016 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1017 (home-page "http://github.com/bear/parsedatetime/")
1018 (synopsis
1019 "Parse human-readable date/time text")
1020 (description
e881752c 1021 "Parse human-readable date/time text.")
3f641af0 1022 (license license:asl2.0)
eebf6f01 1023 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1024
38b8f9b2 1025(define-public python2-parsedatetime
eebf6f01
EF
1026 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1027 (package
1028 (inherit base)
1029 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1030 ,@(package-native-inputs base))))))
38b8f9b2 1031
d072efcb
RW
1032(define-public python-pandas
1033 (package
1034 (name "python-pandas")
7d0c3c8d 1035 (version "0.18.1")
d072efcb
RW
1036 (source
1037 (origin
1b96f069 1038 (method url-fetch)
7d0c3c8d
EF
1039 (uri (string-append
1040 "https://pypi.python.org/packages/11/09/"
1041 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1042 "pandas-" version ".tar.gz"))
1b96f069 1043 (sha256
7d0c3c8d 1044 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1045 (build-system python-build-system)
d072efcb 1046 (propagated-inputs
42603726
EF
1047 `(("python-numpy" ,python-numpy)))
1048 (inputs
1049 `(("python-pytz" ,python-pytz)
d072efcb
RW
1050 ("python-dateutil" ,python-dateutil-2)))
1051 (native-inputs
7d0c3c8d 1052 `(("python-nose" ,python-nose)))
d072efcb
RW
1053 (home-page "http://pandas.pydata.org")
1054 (synopsis "Data structures for data analysis, time series, and statistics")
1055 (description
1056 "Pandas is a Python package providing fast, flexible, and expressive data
1057structures designed to make working with structured (tabular,
1058multidimensional, potentially heterogeneous) and time series data both easy
1059and intuitive. It aims to be the fundamental high-level building block for
1060doing practical, real world data analysis in Python.")
3f641af0 1061 (license license:bsd-3)
7d0c3c8d 1062 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1063
1064(define-public python2-pandas
7d0c3c8d
EF
1065 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1066 (package
1067 (inherit base)
1068 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1069 ,@(package-native-inputs base))))))
d072efcb 1070
cafc3f5a
EB
1071(define-public python-tzlocal
1072 (package
1073 (name "python-tzlocal")
ed80839b 1074 (version "1.2.2")
cafc3f5a
EB
1075 (source
1076 (origin
1077 (method url-fetch)
226d3331 1078 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1079 (sha256
1080 (base32
ed80839b 1081 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1082 (build-system python-build-system)
ed80839b 1083 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1084 (home-page "https://github.com/regebro/tzlocal")
1085 (synopsis
35b9e423 1086 "Local timezone information for Python")
cafc3f5a
EB
1087 (description
1088 "Tzlocal returns a tzinfo object with the local timezone information.
1089This module attempts to fix a glaring hole in pytz, that there is no way to
1090get the local timezone information, unless you know the zoneinfo name, and
1091under several distributions that's hard or impossible to figure out.")
3f641af0 1092 (license license:cc0)))
cafc3f5a 1093
1d08c01f
AE
1094(define-public python2-pysqlite
1095 (package
1096 (name "python2-pysqlite")
fe476868 1097 (version "2.8.1")
1d08c01f
AE
1098 (source
1099 (origin
1100 (method url-fetch)
fe476868 1101 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1102 (sha256
1103 (base32
fe476868 1104 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1105 (build-system python-build-system)
1106 (inputs
1107 `(("sqlite" ,sqlite)))
1108 (arguments
1109 `(#:python ,python-2 ; incompatible with Python 3
1110 #:tests? #f)) ; no test target
fe476868 1111 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1112 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1113 (description
1114 "Pysqlite provides SQLite bindings for Python that comply to the
1115Database API 2.0T.")
ed0cdf83 1116 (license license:zlib)))
1d08c01f 1117
2875caf5
AE
1118
1119(define-public python2-mechanize
1120 (package
1121 (name "python2-mechanize")
1122 (version "0.2.5")
1123 (source
1124 (origin
1125 (method url-fetch)
1126 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1127 version ".tar.gz"))
1128 (sha256
1129 (base32
1130 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1131 (build-system python-build-system)
1132 (inputs
1133 `(("python2-setuptools" ,python2-setuptools)))
1134 (arguments
1135 `(#:python ,python-2 ; apparently incompatible with Python 3
1136 #:tests? #f))
1137 ;; test fails with message
1138 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1139 ;; (python-3.3.2) or
1140 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1141 ;; (python-2.7.5).
1142 ;; The source code is from March 2011 and probably not up-to-date
1143 ;; with respect to python unit tests.
1144 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1145 (synopsis
1146 "Stateful programmatic web browsing in Python")
1147 (description
1148 "Mechanize implements stateful programmatic web browsing in Python,
1149after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1150 (license (license:non-copyleft
1151 "file://COPYING"
1152 "See COPYING in the distribution."))))
2875caf5 1153
0352532e
AE
1154
1155(define-public python-simplejson
1156 (package
1157 (name "python-simplejson")
988d1bad 1158 (version "3.8.2")
0352532e
AE
1159 (source
1160 (origin
1161 (method url-fetch)
988d1bad 1162 (uri (pypi-uri "simplejson" version))
0352532e
AE
1163 (sha256
1164 (base32
988d1bad 1165 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1166 (build-system python-build-system)
1167 (home-page "http://simplejson.readthedocs.org/en/latest/")
1168 (synopsis
1169 "Json library for Python")
1170 (description
e881752c
AK
1171 "JSON (JavaScript Object Notation) is a subset of JavaScript
1172syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1173format.
0352532e
AE
1174
1175Simplejson exposes an API familiar to users of the standard library marshal
1176and pickle modules. It is the externally maintained version of the json
1177library contained in Python 2.6, but maintains compatibility with Python 2.5
1178and (currently) has significant performance advantages, even without using
1179the optional C extension for speedups. Simplejson is also supported on
1180Python 3.3+.")
3f641af0 1181 (license license:x11)))
0352532e
AE
1182
1183(define-public python2-simplejson
1184 (package-with-python2 python-simplejson))
421a80a2
AE
1185
1186
ed07b08d 1187(define-public python-pyicu
421a80a2 1188 (package
ed07b08d 1189 (name "python-pyicu")
d3b29319 1190 (version "1.9.2")
421a80a2
AE
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1195 version ".tar.gz"))
1196 (sha256
1197 (base32
d3b29319 1198 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1199 (build-system python-build-system)
1200 (inputs
1201 `(("icu4c" ,icu4c)))
421a80a2 1202 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1203 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1204 (description
1205 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1206 (license license:x11)
ed07b08d
LF
1207 (properties `((python2-variant . ,(delay python2-pyicu))))))
1208
1209(define-public python2-pyicu
1210 (package
1211 (inherit (package-with-python2
1212 (strip-python2-variant python-pyicu)))
1213 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1214
1215(define-public python2-dogtail
1216 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1217 ;; spaces in indentation" with Python 3.
1218 (package
1219 (name "python2-dogtail")
1220 (version "0.8.2")
1221 (source (origin
1222 (method url-fetch)
1223 (uri (string-append
1224 "https://fedorahosted.org/released/dogtail/dogtail-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1229 (build-system python-build-system)
1230 (arguments `(#:python ,python-2
1231 #:tests? #f)) ; invalid command "test"
1232 (home-page "https://fedorahosted.org/dogtail/")
1233 (synopsis "GUI test tool and automation framework written in ​Python")
1234 (description
35b9e423 1235 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1236It uses Accessibility (a11y) technologies to communicate with desktop
1237applications. dogtail scripts are written in Python and executed like any
1238other Python program.")
3f641af0 1239 (license license:gpl2+)))
515e6878 1240
011b18c3
LC
1241(define-public python2-empy
1242 (package
1243 (name "python2-empy")
1244 (version "3.3")
1245 (source (origin
1246 (method url-fetch)
1247 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1248 version ".tar.gz"))
1249 (sha256
1250 (base32
1251 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1252 (build-system python-build-system)
1253 (arguments
1254 `(#:python ,python-2
1255 #:phases (alist-replace
1256 'check
1257 (lambda _
1258 (zero? (system* "./test.sh")))
1259 %standard-phases)))
1260 (home-page "http://www.alcyone.com/software/empy/")
1261 (synopsis "Templating system for Python")
1262 (description
1263 "EmPy is a system for embedding Python expressions and statements in
1264template text; it takes an EmPy source file, processes it, and produces
1265output. This is accomplished via expansions, which are special signals to the
1cd4027c 1266EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1267EmPy can expand arbitrary Python expressions and statements in this way, as
1268well as a variety of special forms. Textual data not explicitly delimited in
1269this way is sent unaffected to the output, allowing Python to be used in
1270effect as a markup language. Also supported are callbacks via hooks,
1271recording and playback via diversions, and dynamic, chainable filters. The
1272system is highly configurable via command line options and embedded
1273commands.")
3f641af0 1274 (license license:lgpl2.1+)))
011b18c3 1275
8deeda0c
LC
1276(define-public python2-element-tree
1277 (package
1278 (name "python2-element-tree")
1279 (version "1.2.6")
1280 (source (origin
1281 (method url-fetch)
1282 (uri (string-append
1283 "http://effbot.org/media/downloads/elementtree-"
1284 version "-20050316.tar.gz"))
1285 (sha256
1286 (base32
1287 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:python ,python-2 ; seems to be part of Python 3
1291 #:tests? #f)) ; no 'test' sub-command
1292 (synopsis "Toolkit for XML processing in Python")
1293 (description
1294 "ElementTree is a Python library supporting lightweight XML processing.")
1295 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1296 (license (license:x11-style
1297 "http://docs.python.org/2/license.html"
1298 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1299
1300(define-public python2-pybugz
1301 (package
1302 (name "python2-pybugz")
1303 (version "0.6.11")
1304 (source (origin
1305 (method url-fetch)
1306 (uri (string-append
1307 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1308 version ".tar.gz"))
1309 (sha256
1310 (base32
6f194a1e 1311 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1312 (patches (search-patches "pybugz-stty.patch"
1313 "pybugz-encode-error.patch"))))
8deeda0c
LC
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; SyntaxError with Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (inputs `(("element-tree" ,python2-element-tree)))
1319 (synopsis "Python and command-line interface to Bugzilla")
1320 (description
1321 "PyBugz is a Python library and command-line tool to query the Bugzilla
1322bug tracking system. It is meant as an aid to speed up interaction with the
1323bug tracker.")
1324 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1325 (license license:gpl2)))
8deeda0c 1326
a480bc41
EB
1327(define-public python-enum34
1328 (package
1329 (name "python-enum34")
d39ae1e5 1330 (version "1.1.0")
a480bc41
EB
1331 (source
1332 (origin
1333 (method url-fetch)
d39ae1e5 1334 (uri (pypi-uri "enum34" version))
a480bc41
EB
1335 (sha256
1336 (base32
d39ae1e5 1337 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1338 (build-system python-build-system)
a480bc41
EB
1339 (arguments
1340 `(#:phases
1341 (alist-replace
1342 'check
1343 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1344 %standard-phases)))
1345 (home-page "https://pypi.python.org/pypi/enum34")
1346 (synopsis "Backported Python 3.4 Enum")
1347 (description
1348 "Enum34 is the new Python stdlib enum module available in Python 3.4
1349backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1350 (license license:bsd-3)))
a480bc41 1351
820acd1b
LF
1352(define-public python2-enum34
1353 (package-with-python2 python-enum34))
1354
a480bc41
EB
1355(define-public python-parse-type
1356 (package
1357 (name "python-parse-type")
1358 (version "0.3.4")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "https://pypi.python.org/packages/source/p/"
1363 "parse_type/parse_type-" version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1367 (build-system python-build-system)
1368 (inputs
1369 `(("python-setuptools" ,python-setuptools)
1370 ("python-six" ,python-six)
68f1cdec 1371 ("python-parse" ,python-parse)))
a480bc41
EB
1372 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1373 (home-page "https://github.com/jenisys/parse_type")
1374 (synopsis "Extended parse module")
1375 (description
1376 "Parse_type extends the python parse module.")
3f641af0 1377 (license license:bsd-3)))
a480bc41
EB
1378
1379(define-public python-parse
1380 (package
1381 (name "python-parse")
eb3d3503 1382 (version "1.6.6")
a480bc41
EB
1383 (source
1384 (origin
1385 (method url-fetch)
eb3d3503 1386 (uri (pypi-uri "parse" version))
a480bc41
EB
1387 (sha256
1388 (base32
eb3d3503 1389 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases
1393 (alist-replace
1394 'check
1395 (lambda _ (zero? (system* "python" "test_parse.py")))
1396 %standard-phases)))
1397 (home-page "https://github.com/r1chardj0n3s/parse")
1398 (synopsis "Parse strings")
1399 (description
1400 "Parse strings using a specification based on the Python format()
1401syntax.")
3f641af0 1402 (license license:x11)))
a480bc41
EB
1403
1404
515e6878
LC
1405(define-public scons
1406 (package
1407 (name "scons")
a3f61425 1408 (version "2.3.4")
515e6878
LC
1409 (source (origin
1410 (method url-fetch)
de67e922
LF
1411 (uri (string-append "mirror://sourceforge/scons/scons/" version
1412 "/scons-" version ".tar.gz"))
515e6878
LC
1413 (sha256
1414 (base32
a3f61425 1415 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1416 (build-system python-build-system)
1417 (arguments
1418 ;; With Python 3.x, fails to build with a syntax error.
1419 `(#:python ,python-2
1420 #:tests? #f)) ; no 'python setup.py test' command
1421 (home-page "http://scons.org/")
1422 (synopsis "Software construction tool written in Python")
1423 (description
1424 "SCons is a software construction tool. Think of SCons as an improved,
1425cross-platform substitute for the classic Make utility with integrated
1426functionality similar to autoconf/automake and compiler caches such as ccache.
1427In short, SCons is an easier, more reliable and faster way to build
1428software.")
3f641af0 1429 (license license:x11)))
011b18c3 1430
c15a5c0e
DT
1431(define-public python-extras
1432 (package
1433 (name "python-extras")
1434 (version "0.0.3")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (string-append
1439 "https://pypi.python.org/packages/source/e/extras/extras-"
1440 version ".tar.gz"))
1441 (sha256
1442 (base32
1443 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1444 (build-system python-build-system)
1445 (inputs
1446 `(("python-setuptools" ,python-setuptools)))
1447 (arguments
1448 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1449 '(#:tests? #f))
1450 (home-page "https://github.com/testing-cabal/extras")
1451 (synopsis "Useful extensions to the Python standard library")
1452 (description
1453 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1454 (license license:expat)))
c15a5c0e
DT
1455
1456(define-public python2-extras
1457 (package-with-python2 python-extras))
1458
56ea0efd
DT
1459(define-public python-mimeparse
1460 (package
1461 (name "python-mimeparse")
1462 (version "0.1.4")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1468 version ".tar.gz"))
1469 (sha256
1470 (base32
1471 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1472 (build-system python-build-system)
1473 (inputs
1474 `(("python-setuptools" ,python-setuptools)))
1475 (arguments
1476 '(#:tests? #f)) ; no setup.py test command
1477 (home-page
1478 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1479 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1480 (description
1481 "Mimeparse provides basic functions for parsing MIME type names and
1482matching them against a list of media-ranges.")
bd3fa666 1483 (license license:expat)))
56ea0efd
DT
1484
1485(define-public python2-mimeparse
1486 (package-with-python2 python-mimeparse))
1487
4435427e
DT
1488(define-public python-nose
1489 (package
1490 (name "python-nose")
f7cb9841 1491 (version "1.3.7")
4435427e
DT
1492 (source
1493 (origin
1494 (method url-fetch)
f7cb9841 1495 (uri (pypi-uri "nose" version))
4435427e
DT
1496 (sha256
1497 (base32
f7cb9841 1498 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1499 (build-system python-build-system)
1500 (inputs
1501 `(("python-setuptools" ,python-setuptools)))
1502 (arguments
1503 '(#:tests? #f)) ; FIXME: test suite fails
1504 (home-page "http://readthedocs.org/docs/nose/")
1505 (synopsis "Python testing library")
1506 (description
1507 "Nose extends the unittest library to make testing easier.")
3f641af0 1508 (license license:lgpl2.0+)))
4435427e
DT
1509
1510(define-public python2-nose
1511 (package-with-python2 python-nose))
1512
0aea283a
EF
1513(define-public python-nose2
1514 (package
1515 (name "python-nose2")
1516 (version "0.6.5")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "nose2" version))
1521 (sha256
1522 (base32
1523 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1524 (build-system python-build-system)
1525 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1526 (native-inputs
1527 `(("python-setuptools" ,python-setuptools)))
1528 (inputs
1529 `(("python-cov-core" ,python-cov-core)
1530 ("python-pytest-cov" ,python-pytest-cov)
1531 ("python-six" ,python-six)))
1532 (home-page "https://github.com/nose-devs/nose2")
1533 (synopsis "Next generation of nicer testing for Python")
1534 (description
1535 "Nose2 is the next generation of nicer testing for Python, based on the
1536plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1537better plugin api, being easier for users to configure, and simplifying internal
1538interfaces and processes.")
1539 (license license:bsd-2)))
1540
1541(define-public python2-nose2
1542 (package-with-python2 python-nose2))
1543
6cd9c356
DT
1544(define-public python-unittest2
1545 (package
1546 (name "python-unittest2")
1547 (version "0.5.1")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1557 (build-system python-build-system)
1558 (inputs
1559 `(("python-setuptools" ,python-setuptools)))
1560 (home-page "http://pypi.python.org/pypi/unittest2")
1561 (synopsis "Python unit testing library")
1562 (description
1563 "Unittest2 is a replacement for the unittest module in the Python
1564standard library.")
3f641af0 1565 (license license:psfl)))
6cd9c356
DT
1566
1567(define-public python2-unittest2
1568 (package (inherit python-unittest2)
1569 (name "python2-unittest2")
1570 (version "0.5.1")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1580 (inputs
7957fe6c 1581 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1582 (arguments
1583 `(#:python ,python-2
1584 #:tests? #f)))) ; no setup.py test command
1585
542ad60f
DT
1586(define-public python-py
1587 (package
1588 (name "python-py")
71c8a804 1589 (version "1.4.31")
542ad60f
DT
1590 (source
1591 (origin
1592 (method url-fetch)
71c8a804 1593 (uri (pypi-uri "py" version))
542ad60f
DT
1594 (sha256
1595 (base32
71c8a804 1596 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1597 (build-system python-build-system)
1598 (inputs
1599 `(("python-setuptools" ,python-setuptools)))
1600 (home-page "http://pylib.readthedocs.org/")
1601 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1602 (description
1603 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1604code introspection, and logging.")
bd3fa666 1605 (license license:expat)))
542ad60f
DT
1606
1607(define-public python2-py
1608 (package-with-python2 python-py))
1609
855d4761
DT
1610(define-public python-pytest
1611 (package
1612 (name "python-pytest")
61a4332d 1613 (version "2.7.3")
855d4761
DT
1614 (source
1615 (origin
1616 (method url-fetch)
1617 (uri (string-append
1618 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1619 version ".tar.gz"))
1620 (sha256
1621 (base32
61a4332d 1622 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1623 (modules '((guix build utils)))
1624 (snippet
1625 ;; One of the tests involves the /usr directory, so it fails.
1626 '(substitute* "testing/test_argcomplete.py"
1627 (("def test_remove_dir_prefix\\(self\\):")
1628 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1629 (build-system python-build-system)
1630 (inputs
1631 `(("python-setuptools" ,python-setuptools)
1632 ("python-py" ,python-py)
1633 ("python-nose" ,python-nose)
1634 ("python-mock" ,python-mock)))
1635 (home-page "http://pytest.org")
1636 (synopsis "Python testing library")
1637 (description
1638 "Pytest is a testing tool that provides auto-discovery of test modules
1639and functions, detailed info on failing assert statements, modular fixtures,
1640and many external plugins.")
bd3fa666 1641 (license license:expat)))
855d4761
DT
1642
1643(define-public python2-pytest
1644 (package-with-python2 python-pytest))
1645
358c3d61
EF
1646(define-public python-pytest-cov
1647 (package
1648 (name "python-pytest-cov")
545f4a1c 1649 (version "2.2.1")
358c3d61
EF
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "pytest-cov" version))
1654 (sha256
545f4a1c
EF
1655 (base32
1656 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1657 (build-system python-build-system)
545f4a1c 1658 (inputs
10468636
EF
1659 `(("python-coverage" ,python-coverage)
1660 ("python-pytest" ,python-pytest)))
10468636
EF
1661 (home-page "https://github.com/pytest-dev/pytest-cov")
1662 (synopsis "Pytest plugin for measuring coverage")
1663 (description
1664 "Pytest-cov produces coverage reports. It supports centralised testing and
1665distributed testing in both @code{load} and @code{each} modes. It also
1666supports coverage of subprocesses.")
545f4a1c
EF
1667 (license license:expat)
1668 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1669
1670(define-public python2-pytest-cov
545f4a1c
EF
1671 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1672 (package
1673 (inherit base)
1674 (inputs `(("python2-setuptools" ,python2-setuptools)
1675 ,@(package-inputs base))))))
358c3d61 1676
6784f2e3
RW
1677(define-public python-pytest-runner
1678 (package
1679 (name "python-pytest-runner")
1680 (version "2.6.2")
1681 (source
1682 (origin
1683 (method url-fetch)
54cd239b 1684 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1685 (sha256
1686 (base32
1687 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:phases
1691 (modify-phases %standard-phases
1692 ;; The fancy way of setting the version with setuptools_scm does not
1693 ;; seem to work here.
1694 (add-after 'unpack 'set-version
1695 (lambda _
1696 (substitute* "docs/conf.py"
1697 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1698 (string-append "version = \"" ,version "\"")))
1699 #t)))))
1700 (native-inputs
1701 `(("python-pytest" ,python-pytest)
1702 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1703 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1704 (synopsis "Invoke py.test as a distutils command")
1705 (description
1706 "This package provides a @command{pytest-runner} command that
1707@file{setup.py} files can use to run tests.")
54cd239b
EF
1708 (license license:expat)
1709 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1710
1711(define-public python2-pytest-runner
1712 (let ((base (package-with-python2
1713 (strip-python2-variant python-pytest-runner))))
1714 (package
1715 (inherit base)
1716 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1717 ,@(package-native-inputs base))))))
6784f2e3 1718
44547e51
EF
1719(define-public python-pytest-mock
1720 (package
1721 (name "python-pytest-mock")
1722 (version "1.2")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pytest-mock" version ".zip"))
1727 (sha256
1728 (base32
1729 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1730 (build-system python-build-system)
1731 (native-inputs
1732 `(("unzip" ,unzip)))
1733 (inputs
1734 `(("python-py" ,python-py)
1735 ("python-pytest" ,python-pytest)))
1736 (home-page "https://github.com/pytest-dev/pytest-mock/")
1737 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1738 (description
1739 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1740around the patching API provided by the @code{mock} package, but with the
1741benefit of not having to worry about undoing patches at the end of a test.
1742The mocker fixture has the same API as @code{mock.patch}, supporting the
1743same arguments.")
1744 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1745 (license license:expat)))
1746
1747(define-public python2-pytest-mock
1748 (let ((base (package-with-python2
1749 (strip-python2-variant python-pytest-mock))))
1750 (package (inherit base)
1751 (native-inputs
1752 `(("python2-setuptools" ,python2-setuptools)
1753 ,@(package-native-inputs base)))
1754 (inputs
1755 `(("python2-mock" ,python2-mock)
1756 ,@(package-inputs base))))))
1757
8fa58fc9
CAW
1758(define-public python-pytest-xdist
1759 (package
1760 (name "python-pytest-xdist")
1761 (version "1.14")
1762 (source
1763 (origin
1764 (method url-fetch)
1765 (uri (pypi-uri "pytest-xdist" version ".zip"))
1766 (sha256
1767 (base32
de585a7e
HG
1768 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1769 (modules '((guix build utils)))
1770 (snippet
1771 '(begin
1772 ;; Remove pre-compiled .pyc files from source.
1773 (for-each delete-file-recursively
1774 (find-files "." "__pycache__" #:directories? #t))
1775 (for-each delete-file (find-files "." "\\.pyc$"))
1776 #t))))
8fa58fc9
CAW
1777 (build-system python-build-system)
1778 (native-inputs
1779 `(("unzip" ,unzip)
8fa58fc9 1780 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1781 (inputs
1782 `(("python-apipkg" ,python-apipkg)
1783 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1784 ("python-pytest" ,python-pytest)
1785 ("python-py" ,python-py)))
1786 (home-page
1787 "https://github.com/pytest-dev/pytest-xdist")
1788 (synopsis
1789 "Plugin for py.test with distributed testing and loop-on-failing modes")
1790 (description
1791 "The pytest-xdist plugin extends py.test with some unique test execution
1792modes: parallelization, running tests in boxed subprocesses, the ability
1793to run tests repeatedly when failed, and the ability to run tests on multiple
1794Python interpreters or platforms. It uses rsync to copy the existing
1795program code to a remote location, executes there, and then syncs the
1796result back.")
fbe9abcc
EF
1797 (license license:expat)
1798 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1799
1800(define-public python2-pytest-xdist
fbe9abcc
EF
1801 (let ((base (package-with-python2
1802 (strip-python2-variant python-pytest-xdist))))
1803 (package
1804 (inherit base)
1805 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1806 ,@(package-native-inputs base))))))
8fa58fc9 1807
84d24017
DT
1808(define-public python-scripttest
1809 (package
1810 (name "python-scripttest")
1811 (version "1.3")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (string-append
1816 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1817 version ".tar.gz"))
1818 (sha256
1819 (base32
1820 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1821 (build-system python-build-system)
1822 (inputs
1823 `(("python-setuptools" ,python-setuptools)
1824 ("python-pytest" ,python-pytest)))
1825 (home-page "http://pythonpaste.org/scripttest/")
1826 (synopsis "Python library to test command-line scripts")
1827 (description "Scripttest is a Python helper library for testing
1828interactive command-line applications. With it you can run a script in a
1829subprocess and see the output as well as any file modifications.")
bd3fa666 1830 (license license:expat)))
84d24017
DT
1831
1832(define-public python2-scripttest
1833 (package-with-python2 python-scripttest))
1834
d8fa80e1
DT
1835(define-public python-testtools
1836 (package
1837 (name "python-testtools")
1838 (version "1.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (string-append
1843 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1844 version ".tar.gz"))
1845 (sha256
1846 (base32
1847 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1848 (build-system python-build-system)
0e88cbf8
CR
1849 (propagated-inputs
1850 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1851 (inputs
1852 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1853 ("python-extras" ,python-extras)))
1854 (home-page "https://github.com/testing-cabal/testtools")
1855 (synopsis
1856 "Extensions to the Python standard library unit testing framework")
1857 (description
1858 "Testtools extends the Python standard library unit testing framework to
1859provide matchers, more debugging information, and cross-Python
1860compatibility.")
3f641af0 1861 (license license:psfl)))
d8fa80e1
DT
1862
1863(define-public python2-testtools
1864 (package-with-python2 python-testtools))
1865
5bf3afea
DT
1866(define-public python-testscenarios
1867 (package
1868 (name "python-testscenarios")
1869 (version "0.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32
1878 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1879 (build-system python-build-system)
1880 (inputs
1881 `(("python-setuptools" ,python-setuptools)
1882 ("python-testtools" ,python-testtools)
1883 ("python-mimeparse" ,python-mimeparse)))
1884 (home-page "https://launchpad.net/testscenarios")
1885 (synopsis "Pyunit extension for dependency injection")
1886 (description
1887 "Testscenarios provides clean dependency injection for Python unittest
1888style tests.")
3f641af0 1889 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1890
1891(define-public python2-testscenarios
1892 (package-with-python2 python-testscenarios))
1893
dac79ecc
DT
1894(define-public python-testresources
1895 (package
1896 (name "python-testresources")
1897 (version "0.2.7")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (string-append
1902 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1903 version ".tar.gz"))
1904 (sha256
1905 (base32
1906 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1907 (build-system python-build-system)
1908 (inputs
1909 `(("python-setuptools" ,python-setuptools)))
1910 (home-page "https://launchpad.net/testresources")
1911 (synopsis
1912 "Pyunit extension for managing test resources")
1913 (description
1914 "Testresources is an extension to Python's unittest to allow declarative
1915use of resources by test cases.")
3f641af0 1916 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1917
1918(define-public python2-testresources
1919 (package-with-python2 python-testresources))
1920
070ab058
DT
1921(define-public python-subunit
1922 (package
1923 (name "python-subunit")
1924 (version "0.0.21")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (string-append
1929 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1930 version ".tar.gz"))
1931 (sha256
1932 (base32
1933 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1934 (build-system python-build-system)
1935 (inputs
1936 `(("python-setuptools" ,python-setuptools)
1937 ("python-testtools" ,python-testtools)
1938 ("python-mimeparse" ,python-mimeparse)
1939 ("python-testscenarios" ,python-testscenarios)))
1940 (home-page "http://launchpad.net/subunit")
1941 (synopsis "Python implementation of the subunit protocol")
1942 (description
1943 "Python-subunit is a Python implementation of the subunit test streaming
1944protocol.")
3f641af0 1945 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1946
1947(define-public python2-subunit
1948 (package-with-python2 python-subunit))
1949
7787ef76
CR
1950;; Recent versions of python-fixtures need a recent version of python-pbr,
1951;; which needs a recent version of python-fixtures. To fix this circular
1952;; dependency, we keep old versions of python-fixtures and python-pbr to
1953;; bootstrap the whole thing:
1954;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1955;; - python-pbr-0.11 is used to build python-fixtures
1956;; - python-fixtures is used to build python-pbr
1957(define-public python-fixtures-0.3.16
cd49454b
DT
1958 (package
1959 (name "python-fixtures")
1960 (version "0.3.16")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (string-append
1965 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1966 version ".tar.gz"))
1967 (sha256
1968 (base32
1969 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1970 (build-system python-build-system)
1971 (inputs
1972 `(("python-setuptools" ,python-setuptools)))
1973 (arguments
1974 '(#:tests? #f)) ; no setup.py test command
1975 (home-page "https://launchpad.net/python-fixtures")
1976 (synopsis "Python test fixture library")
1977 (description
1978 "Fixtures provides a way to create reusable state, useful when writing
1979Python tests.")
3f641af0 1980 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 1981
7787ef76
CR
1982(define-public python2-fixtures-0.3.16
1983 (package-with-python2 python-fixtures-0.3.16))
1984
1985(define-public python-pbr-0.11
1986 (package
1987 (name "python-pbr")
1988 (version "0.11.0")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (string-append
1993 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1994 version ".tar.gz"))
1995 (sha256
1996 (base32
1997 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1998 (build-system python-build-system)
1999 (arguments
2000 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2001 (inputs
2002 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2003 ("python-pip" ,python-pip)
2004 ("python-setuptools" ,python-setuptools)))
2005 (home-page "https://launchpad.net/pbr")
2006 (synopsis "Change the default behavior of Python’s setuptools")
2007 (description
2008 "Python Build Reasonableness (PBR) is a library that injects some useful
2009and sensible default behaviors into your setuptools run.")
3f641af0 2010 (license license:asl2.0)))
7787ef76
CR
2011
2012(define-public python2-pbr-0.11
2013 (package-with-python2 python-pbr-0.11))
2014
1ef09c0c 2015(define-public python-pbr
e25f0174
BW
2016 (package
2017 (name "python-pbr")
1ef09c0c
BW
2018 (version "1.8.1")
2019 (source
e25f0174
BW
2020 (origin
2021 (method url-fetch)
2022 (uri (string-append
2023 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2024 version
2025 ".tar.gz"))
2026 (sha256
2027 (base32
2028 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2029 (build-system python-build-system)
e25f0174
BW
2030 (arguments
2031 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2032 (propagated-inputs
2033 `(("python-testrepository" ,python-testrepository)
2034 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2035 (inputs
e25f0174
BW
2036 `(("python-fixtures" ,python-fixtures)
2037 ("python-mimeparse" ,python-mimeparse)
2038 ("python-mock" ,python-mock)
2039 ("python-setuptools" ,python-setuptools)
2040 ("python-six" ,python-six)
2041 ("python-sphinx" ,python-sphinx)
2042 ("python-testrepository" ,python-testrepository)
2043 ("python-testresources" ,python-testresources)
2044 ("python-testscenarios" ,python-testscenarios)
2045 ("python-testtools" ,python-testtools)
2046 ("python-virtualenv" ,python-virtualenv)))
2047 (home-page "https://launchpad.net/pbr")
2048 (synopsis "Change the default behavior of Python’s setuptools")
2049 (description
2050 "Python Build Reasonableness (PBR) is a library that injects some useful
2051and sensible default behaviors into your setuptools run.")
3f641af0 2052 (license license:asl2.0)))
1ef09c0c
BW
2053
2054(define-public python2-pbr
e25f0174 2055 (package-with-python2 python-pbr))
1ef09c0c 2056
7787ef76
CR
2057(define-public python-fixtures
2058 (package
2059 (name "python-fixtures")
13fcc6df 2060 (version "1.4.0")
7787ef76
CR
2061 (source
2062 (origin
2063 (method url-fetch)
13fcc6df 2064 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2065 (sha256
2066 (base32
13fcc6df 2067 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2068 (build-system python-build-system)
2069 (propagated-inputs
2070 `(("python-six" ,python-six)
2071 ("python-pbr-0.11" ,python-pbr-0.11)))
2072 (inputs
2073 `(("python-pip" ,python-pip)
2074 ("python-setuptools" ,python-setuptools)
2075 ;; Tests
2076 ("python-testtools" ,python-testtools)))
2077 (arguments
2078 '(#:tests? #f)) ; no setup.py test command
2079 (home-page "https://launchpad.net/python-fixtures")
2080 (synopsis "Python test fixture library")
2081 (description
2082 "Fixtures provides a way to create reusable state, useful when writing
2083Python tests.")
3f641af0 2084 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2085
cd49454b
DT
2086(define-public python2-fixtures
2087 (package-with-python2 python-fixtures))
2088
b24a0c00
DT
2089(define-public python-testrepository
2090 (package
2091 (name "python-testrepository")
2092 (version "0.0.20")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (string-append
2097 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2098 version ".tar.gz"))
2099 (sha256
2100 (base32
2101 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2102 (build-system python-build-system)
05de40c5 2103 (propagated-inputs
7787ef76 2104 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2105 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2106 (inputs
2107 `(("python-setuptools" ,python-setuptools)
b24a0c00 2108 ("python-subunit" ,python-subunit)
b24a0c00
DT
2109 ("python-mimeparse" ,python-mimeparse)))
2110 (home-page "https://launchpad.net/testrepository")
2111 (synopsis "Database for Python test results")
2112 (description "Testrepository provides a database of test results which can
2113be used as part of a developer's workflow to check things such as what tests
2114have failed since the last commit or what tests are currently failing.")
3f641af0 2115 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2116
2117(define-public python2-testrepository
2118 (package-with-python2 python-testrepository))
2119
243a009a
DT
2120(define-public python-coverage
2121 (package
2122 (name "python-coverage")
4d4cf3dd 2123 (version "4.1")
243a009a
DT
2124 (source
2125 (origin
2126 (method url-fetch)
82a3c582 2127 (uri (pypi-uri "coverage" version))
243a009a
DT
2128 (sha256
2129 (base32
4d4cf3dd 2130 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2131 (build-system python-build-system)
2132 (inputs
2133 `(("python-setuptools" ,python-setuptools)))
2134 (home-page "http://nedbatchelder.com/code/coverage")
2135 (synopsis "Code coverage measurement for Python")
2136 (description
2137 "Coverage measures code coverage, typically during test execution. It
2138uses the code analysis tools and tracing hooks provided in the Python standard
2139library to determine which lines are executable, and which have been
2140executed.")
3f641af0 2141 (license license:bsd-3)))
243a009a
DT
2142
2143(define-public python2-coverage
2144 (package-with-python2 python-coverage))
2145
12f839fd
EF
2146(define-public python-cov-core
2147 (package
2148 (name "python-cov-core")
2149 (version "1.15.0")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "cov-core" version))
2154 (sha256
2155 (base32
2156 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2157 (build-system python-build-system)
2158 (native-inputs
2159 `(("python-coverage" ,python-coverage)))
2160 (home-page "https://github.com/schlamar/cov-core")
2161 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2162 (description
2163 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2164It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2165 (license license:expat)
2166 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2167
2168(define-public python2-cov-core
8120205c 2169 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2170 (package (inherit cov-core)
2171 (native-inputs
2172 `(("python2-setuptools" ,python2-setuptools)
2173 ,@(package-native-inputs cov-core))))))
2174
041358fb
DT
2175(define-public python-discover
2176 (package
2177 (name "python-discover")
2178 (version "0.4.0")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/d/discover/discover-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2188 (build-system python-build-system)
2189 (inputs
2190 `(("python-setuptools" ,python-setuptools)))
2191 (home-page "http://pypi.python.org/pypi/discover/")
2192 (synopsis
2193 "Python test discovery for unittest")
2194 (description
2195 "Discover provides test discovery for unittest, a feature that has been
e881752c 2196backported from Python 2.7 for Python 2.4+.")
3f641af0 2197 (license license:bsd-3)))
041358fb
DT
2198
2199(define-public python2-discover
2200 (package-with-python2 python-discover))
2201
a480bc41
EB
2202(define-public behave
2203 (package
2204 (name "behave")
287cfd1a 2205 (version "1.2.5")
a480bc41
EB
2206 (source (origin
2207 (method url-fetch)
287cfd1a 2208 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2209 (sha256
2210 (base32
287cfd1a 2211 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2212 (build-system python-build-system)
2213 (inputs
2214 `(("python-setuptools" ,python-setuptools)
2215 ("python-six" ,python-six)
a480bc41
EB
2216 ("python-parse" ,python-parse)
2217 ("python-parse-type" ,python-parse-type)))
2218 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2219 ;PyHamcrest>=1.8
2220 (home-page "http://github.com/behave/behave")
2221 (synopsis "Python behavior-driven development")
2222 (description
2223 "Behave is a tool for behavior-driven development in python.
2224Behavior-driven development (or BDD) is an agile software development
2225technique that encourages collaboration between developers, QA and
2226non-technical or business participants in a software project. Behave uses
2227tests written in a natural language style, backed up by Python code.")
3f641af0 2228 (license license:x11)))
c7303d3c
DT
2229
2230(define-public python-exif-read
2231 (package
2232 (name "python-exif-read")
2a2d0981 2233 (version "2.1.2")
c7303d3c
DT
2234 (source (origin
2235 (method url-fetch)
2a2d0981 2236 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2237 (sha256
2238 (base32
2a2d0981 2239 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2240 (build-system python-build-system)
2241 (inputs
2242 `(("python-setuptools" ,python-setuptools)))
2243 (arguments `(#:tests? #f)) ; no tests
2244 (home-page "https://github.com/ianare/exif-py")
2245 (synopsis "Python library to extract EXIF data from image files")
2246 (description
2247 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2248files.")
3f641af0 2249 (license license:bsd-3)))
c7303d3c
DT
2250
2251(define-public python2-exif-read
2252 (package-with-python2 python-exif-read))
d5f89b22
DT
2253
2254(define-public python-pyld
2255 (package
2256 (name "python-pyld")
af1ab773 2257 (version "0.6.8")
d5f89b22
DT
2258 (source (origin
2259 (method url-fetch)
af1ab773 2260 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2261 (sha256
2262 (base32
af1ab773 2263 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2264 (build-system python-build-system)
2265 (inputs
2266 `(("python-setuptools" ,python-setuptools)))
2267 (arguments `(#:tests? #f)) ; no tests
2268 (home-page "http://github.com/digitalbazaar/pyld")
2269 (synopsis "Python implementation of the JSON-LD specification")
2270 (description
2271 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2272 (license license:bsd-3)))
d5f89b22
DT
2273
2274(define-public python2-pyld
2275 (package-with-python2 python-pyld))
3a1f9a68
DT
2276
2277(define-public python-certifi
2278 (package
2279 (name "python-certifi")
b2a2232c 2280 (version "2016.8.31")
3a1f9a68
DT
2281 (source (origin
2282 (method url-fetch)
9a41f443 2283 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2284 (sha256
2285 (base32
b2a2232c 2286 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2287 (build-system python-build-system)
2288 (inputs
2289 `(("python-setuptools" ,python-setuptools)))
2290 (arguments `(#:tests? #f)) ; no tests
2291 (home-page "http://python-requests.org/")
2292 (synopsis "Python CA certificate bundle")
2293 (description
2294 "Certifi is a Python library that contains a CA certificate bundle, which
2295is used by the Requests library to verify HTTPS requests.")
3f641af0 2296 (license license:asl2.0)))
3a1f9a68
DT
2297
2298(define-public python2-certifi
2299 (package-with-python2 python-certifi))
e6cfbd36 2300
12c270dd
RW
2301(define-public python-click
2302 (package
2303 (name "python-click")
43accb58 2304 (version "6.6")
12c270dd
RW
2305 (source
2306 (origin
2307 (method url-fetch)
375f224b 2308 (uri (pypi-uri "click" version))
12c270dd 2309 (sha256
43accb58
LF
2310 (base32
2311 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2312 (build-system python-build-system)
e2ab5a09
BW
2313 (arguments
2314 `(#:phases
2315 (modify-phases %standard-phases
2316 (add-after 'unpack 'fix-paths
2317 (lambda* (#:key inputs #:allow-other-keys)
2318 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2319 "cross-libc" "libc"))))
2320 (substitute* "click/_unicodefun.py"
2321 (("'locale'")
2322 (string-append "'" glibc "/bin/locale'"))))
2323 #t)))))
12c270dd
RW
2324 (native-inputs
2325 `(("python-setuptools" ,python-setuptools)))
2326 (home-page "http://click.pocoo.org")
2327 (synopsis "Command line library for Python")
2328 (description
2329 "Click is a Python package for creating command line interfaces in a
2330composable way with as little code as necessary. Its name stands for
2331\"Command Line Interface Creation Kit\". It's highly configurable but comes
2332with sensible defaults out of the box.")
3f641af0 2333 (license license:bsd-3)))
12c270dd
RW
2334
2335(define-public python2-click
2336 (package-with-python2 python-click))
2337
addc808d
EF
2338(define-public python-wheel
2339 (package
2340 (name "python-wheel")
40981b5c 2341 (version "0.29.0")
e1ba0749
EF
2342 (source
2343 (origin
2344 (method url-fetch)
2345 (uri (pypi-uri "wheel" version))
2346 (sha256
2347 (base32
40981b5c 2348 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2349 (build-system python-build-system)
2350 (native-inputs
2351 `(("python-setuptools" ,python-setuptools)
2352 ("python-jsonschema" ,python-jsonschema)
2353 ("python-pytest-cov" ,python-pytest-cov)))
2354 (home-page "https://bitbucket.org/pypa/wheel/")
2355 (synopsis "Format for built Python packages")
2356 (description
2357 "A wheel is a ZIP-format archive with a specially formatted filename and
2358the @code{.whl} extension. It is designed to contain all the files for a PEP
2359376 compatible install in a way that is very close to the on-disk format. Many
2360packages will be properly installed with only the @code{Unpack} step and the
2361unpacked archive preserves enough information to @code{Spread} (copy data and
2362scripts to their final locations) at any later time. Wheel files can be
2363installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2364 (license license:expat)
2365 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2366
2367(define-public python2-wheel
8ad4ae20
LF
2368 (let ((wheel (package-with-python2
2369 (strip-python2-variant python-wheel))))
264ae686 2370 (package (inherit wheel)
8ad4ae20
LF
2371 (native-inputs `(("python2-functools32" ,python2-functools32)
2372 ,@(package-native-inputs wheel))))))
2373
addc808d 2374
ae641128 2375(define-public python-requests
e6cfbd36 2376 (package
ae641128 2377 (name "python-requests")
74a066f9 2378 (version "2.9.1")
e6cfbd36
DT
2379 (source (origin
2380 (method url-fetch)
5d691657 2381 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2382 (sha256
2383 (base32
74a066f9 2384 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2385 (build-system python-build-system)
5d691657 2386 (native-inputs
6a308947
EF
2387 `(("python-setuptools" ,python-setuptools)
2388 ("python-py" ,python-py)
5d691657
EF
2389 ("python-pytest" ,python-pytest)
2390 ("python-pytest-cov" ,python-pytest-cov)
2391 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2392 (home-page "http://python-requests.org/")
2393 (synopsis "Python HTTP library")
2394 (description
2395 "Requests is a Python HTTP client library. It aims to be easier to use
2396than Python’s urllib2 library.")
3f641af0 2397 (license license:asl2.0)))
864b5211 2398
e9005180
DT
2399;; Some software requires an older version of Requests, notably Docker
2400;; Compose.
2401(define-public python-requests-2.7
2402 (package (inherit python-requests)
2403 (version "2.7.0")
2404 (source (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "requests" version))
2407 (sha256
2408 (base32
2409 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2410
ae641128 2411(define-public python2-requests
8ad4ae20 2412 (package-with-python2 python-requests))
ae641128 2413
ea521b42
DT
2414(define-public python-vcversioner
2415 (package
2416 (name "python-vcversioner")
2417 (version "2.14.0.0")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (pypi-uri "vcversioner" version))
2422 (sha256
2423 (base32
2424 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2425 (build-system python-build-system)
2426 (inputs
2427 `(("python-setuptools" ,python-setuptools)))
2428 (synopsis "Python library for version number discovery")
2429 (description "Vcversioner is a Python library that inspects tagging
2430information in a variety of version control systems in order to discover
2431version numbers.")
2432 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2433 (license license:isc)))
ea521b42
DT
2434
2435(define-public python2-vcversioner
2436 (package-with-python2 python-vcversioner))
ae641128 2437
864b5211
DT
2438(define-public python-jsonschema
2439 (package
2440 (name "python-jsonschema")
b3667afb 2441 (version "2.5.1")
864b5211
DT
2442 (source (origin
2443 (method url-fetch)
2444 (uri
2445 (string-append
2446 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2447 version ".tar.gz"))
2448 (sha256
2449 (base32
b3667afb 2450 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2451 (build-system python-build-system)
2452 (inputs
b3667afb
DT
2453 `(("python-setuptools" ,python-setuptools)
2454 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2455 (home-page "http://github.com/Julian/jsonschema")
2456 (synopsis "Implementation of JSON Schema for Python")
2457 (description
2458 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2459 (license license:expat)
2460 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2461
2462(define-public python2-jsonschema
a14600ec
LF
2463 (let ((jsonschema (package-with-python2
2464 (strip-python2-variant python-jsonschema))))
264ae686
EF
2465 (package (inherit jsonschema)
2466 (inputs
2467 `(("python2-functools32" ,python2-functools32)
2468 ,@(package-inputs jsonschema))))))
850189b8
DT
2469
2470(define-public python-unidecode
2471 (package
2472 (name "python-unidecode")
8925d4f3 2473 (version "0.04.18")
850189b8
DT
2474 (source (origin
2475 (method url-fetch)
8925d4f3 2476 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2477 (sha256
2478 (base32
8925d4f3 2479 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2480 (build-system python-build-system)
2481 (inputs
2482 `(("python-setuptools" ,python-setuptools)))
2483 (home-page "https://pypi.python.org/pypi/Unidecode")
2484 (synopsis "ASCII transliterations of Unicode text")
2485 (description
2486 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2487useful when integrating with legacy code that doesn't support Unicode, or for
2488ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2489machine identifiers from human-readable Unicode strings that should still be
2490somewhat intelligeble.")
3f641af0 2491 (license license:gpl2+)))
850189b8
DT
2492
2493(define-public python2-unidecode
2494 (package-with-python2 python-unidecode))
6d45fef4
DT
2495
2496(define-public python-pyjwt
2497 (package
2498 (name "python-pyjwt")
eb31d4b4 2499 (version "1.4.0")
6d45fef4
DT
2500 (source
2501 (origin
2502 (method url-fetch)
eb31d4b4 2503 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2504 (sha256
2505 (base32
eb31d4b4 2506 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2507 (build-system python-build-system)
eb31d4b4
EF
2508 (native-inputs
2509 `(("python-setuptools" ,python-setuptools)
2510 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2511 (arguments
2512 '(#:tests? #f)) ; test suite doesn't work
2513 (home-page "http://github.com/progrium/pyjwt")
2514 (synopsis "JSON Web Token implementation in Python")
2515 (description
2516 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2517 (license license:expat)))
6d45fef4
DT
2518
2519(define-public python2-pyjwt
2520 (package-with-python2 python-pyjwt))
2521
2cec1f6f
DT
2522(define-public python-oauthlib
2523 (package
2524 (name "python-oauthlib")
bde2171d 2525 (version "1.0.3")
2cec1f6f
DT
2526 (source (origin
2527 (method url-fetch)
bde2171d 2528 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2529 (sha256
2530 (base32
bde2171d 2531 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2532 (build-system python-build-system)
bde2171d 2533 (native-inputs
59f151ec 2534 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2535 ("python-nose" ,python-nose)
2536 ("python-mock" ,python-mock)))
bde2171d
EF
2537 (inputs
2538 `(("python-blinker" ,python-blinker)
2539 ("python-cryptography" ,python-cryptography)
2540 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2541 (home-page "https://github.com/idan/oauthlib")
2542 (synopsis "OAuth implementation for Python")
2543 (description
2544 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2545OAuth request-signing logic.")
3f641af0 2546 (license license:bsd-3)
59f151ec 2547 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2548
2549(define-public python2-oauthlib
59f151ec 2550 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2551 (package
2552 (inherit base)
59f151ec
EF
2553 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2554 ("python2-unittest2" ,python2-unittest2)
2555 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2556
2557(define-public python-itsdangerous
2558 (package
2559 (name "python-itsdangerous")
2560 (version "0.24")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (string-append
2565 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2566 version ".tar.gz"))
2567 (sha256
2568 (base32
2569 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2570 (build-system python-build-system)
ec5dbb5c
DT
2571 (home-page "http://github.com/mitsuhiko/itsdangerous")
2572 (synopsis "Python library for passing data to/from untrusted environments")
2573 (description
2574 "Itsdangerous provides various helpers to pass trusted data to untrusted
2575environments and back.")
3f641af0 2576 (license license:bsd-3)
194d0d98 2577 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2578
2579(define-public python2-itsdangerous
194d0d98
EF
2580 (let ((base (package-with-python2
2581 (strip-python2-variant python-itsdangerous))))
2582 (package
2583 (inherit base)
2584 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2585 ,@(package-native-inputs base))))))
5731cae3 2586
8d12be1e
RW
2587(define-public python-pyyaml
2588 (package
2589 (name "python-pyyaml")
2590 (version "3.11")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (string-append
2595 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2596 version ".tar.gz"))
2597 (sha256
2598 (base32
2599 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2600 (build-system python-build-system)
2601 (inputs
2602 `(("libyaml" ,libyaml)))
2603 (native-inputs
2604 `(("python-setuptools" ,python-setuptools)))
2605 (home-page "http://pyyaml.org/wiki/PyYAML")
2606 (synopsis "YAML parser and emitter for Python")
2607 (description
2608 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2609complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2610API, and sensible error messages. PyYAML supports standard YAML tags and
2611provides Python-specific tags that allow to represent an arbitrary Python
2612object.")
2613 (license license:expat)))
2614
2615(define-public python2-pyyaml
2616 (package-with-python2 python-pyyaml))
2617
5731cae3
DT
2618(define-public python-virtualenv
2619 (package
2620 (name "python-virtualenv")
58d04dba 2621 (version "15.0.3")
5731cae3
DT
2622 (source
2623 (origin
2624 (method url-fetch)
17804240 2625 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2626 (sha256
2627 (base32
58d04dba 2628 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2629 (build-system python-build-system)
17804240
EF
2630 (arguments
2631 `(#:phases
2632 (modify-phases %standard-phases
58d04dba
RW
2633 (replace 'check
2634 (lambda _
2635 ;; Disable failing test. See upstream bug report
2636 ;; https://github.com/pypa/virtualenv/issues/957
2637 (substitute* "tests/test_virtualenv.py"
2638 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2639 (zero? (system* "py.test")))))))
5731cae3
DT
2640 (inputs
2641 `(("python-setuptools" ,python-setuptools)
2642 ("python-mock" ,python-mock)
17804240 2643 ("python-pytest" ,python-pytest)))
5731cae3
DT
2644 (home-page "https://virtualenv.pypa.io/")
2645 (synopsis "Virtual Python environment builder")
2646 (description
2647 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2648 (license license:expat)))
5731cae3
DT
2649
2650(define-public python2-virtualenv
2651 (package-with-python2 python-virtualenv))
8176d4d5
DT
2652
2653(define-public python-markupsafe
2654 (package
2655 (name "python-markupsafe")
2656 (version "0.23")
2657 (source
2658 (origin
2659 (method url-fetch)
2660 (uri (string-append
2661 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2662 version ".tar.gz"))
2663 (sha256
2664 (base32
2665 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2666 (build-system python-build-system)
2667 (inputs
2668 `(("python-setuptools" ,python-setuptools)))
2669 (home-page "http://github.com/mitsuhiko/markupsafe")
2670 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2671 (description
2672 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2673for Python.")
3f641af0 2674 (license license:bsd-3)))
8176d4d5
DT
2675
2676(define-public python2-markupsafe
2677 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2678
2679(define-public python-jinja2
2680 (package
2681 (name "python-jinja2")
e98149b3 2682 (version "2.8")
fe34f0d1
DT
2683 (source
2684 (origin
2685 (method url-fetch)
e98149b3 2686 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2687 (sha256
2688 (base32
e98149b3 2689 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2690 (build-system python-build-system)
2691 (inputs
2692 `(("python-setuptools" ,python-setuptools)
2693 ("python-markupsafe" ,python-markupsafe)))
2694 (home-page "http://jinja.pocoo.org/")
2695 (synopsis "Python template engine")
2696 (description
2697 "Jinja2 is a small but fast and easy to use stand-alone template engine
2698written in pure Python.")
3f641af0 2699 (license license:bsd-3)))
fe34f0d1
DT
2700
2701(define-public python2-jinja2
2702 (package-with-python2 python-jinja2))
3580ab8b 2703
f7d17ac7
EE
2704(define-public python-pystache
2705 (package
2706 (name "python-pystache")
2707 (version "0.5.4")
2708 (source (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "pystache" version))
2711 (sha256
2712 (base32
2713 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2714 (build-system python-build-system)
2715 (native-inputs
2716 `(("python-setuptools" ,python-setuptools)))
2717 (home-page "http://defunkt.io/pystache/")
2718 (synopsis "Python logic-less template engine")
2719 (description
2720 "Pystache is a Python implementation of the framework agnostic,
2721logic-free templating system Mustache.")
2722 (license license:expat)))
2723
2724(define-public python2-pystache
2725 (package-with-python2 python-pystache))
2726
1285119b
RW
2727(define-public python-joblib
2728 (package
2729 (name "python-joblib")
2730 (version "0.9.0b4")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (string-append "https://pypi.python.org/packages/source/"
2734 "j/joblib/joblib-" version ".tar.gz"))
2735 (sha256
2736 (base32
2737 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2738 (build-system python-build-system)
2739 (native-inputs
2740 `(("python-setuptools" ,python-setuptools)
2741 ("python-nose" ,python-nose)))
2742 (home-page "http://pythonhosted.org/joblib/")
2743 (synopsis "Using Python functions as pipeline jobs")
2744 (description
2745 "Joblib is a set of tools to provide lightweight pipelining in Python.
2746In particular, joblib offers: transparent disk-caching of the output values
2747and lazy re-evaluation (memoize pattern), easy simple parallel computing
2748logging and tracing of the execution.")
3f641af0 2749 (license license:bsd-3)))
1285119b
RW
2750
2751(define-public python2-joblib
2752 (package-with-python2 python-joblib))
2753
3580ab8b
DT
2754(define-public python-docutils
2755 (package
2756 (name "python-docutils")
2757 (version "0.12")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (string-append
2762 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2763 version ".tar.gz"))
2764 (sha256
2765 (base32
2766 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2767 (build-system python-build-system)
2768 (inputs
2769 `(("python-setuptools" ,python-setuptools)))
2770 (arguments
2771 '(#:tests? #f)) ; no setup.py test command
2772 (home-page "http://docutils.sourceforge.net/")
2773 (synopsis "Python Documentation Utilities")
2774 (description
2775 "Docutils is a modular system for processing documentation into useful
2776formats, such as HTML, XML, and LaTeX. For input Docutils supports
2777reStructuredText.")
2778 ;; Most of the source code is public domain, but some source files are
2779 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2780 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2781
2782(define-public python2-docutils
2783 (package-with-python2 python-docutils))
fb35b7c0
DT
2784
2785(define-public python-pygments
2786 (package
2787 (name "python-pygments")
9f442285 2788 (version "2.0.2")
fb35b7c0
DT
2789 (source
2790 (origin
2791 (method url-fetch)
9f442285 2792 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2793 (sha256
2794 (base32
9f442285 2795 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2796 (build-system python-build-system)
2797 (inputs
2798 `(("python-setuptools" ,python-setuptools)))
2799 (home-page "http://pygments.org/")
2800 (synopsis "Syntax highlighting")
2801 (description
2802 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2803 (license license:bsd-2)))
fb35b7c0
DT
2804
2805(define-public python2-pygments
2806 (package-with-python2 python-pygments))
9dd6078d
DT
2807
2808(define-public python-sphinx
2809 (package
2810 (name "python-sphinx")
2811 (version "1.2.3")
2812 (source
2813 (origin
2814 (method url-fetch)
2815 (uri (string-append
2816 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2817 version ".tar.gz"))
2818 (sha256
2819 (base32
2820 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2821 (build-system python-build-system)
2822 (inputs
2823 `(("python-setuptools" ,python-setuptools)
2824 ("python-jinja2" ,python-jinja2)
2825 ("python-docutils" ,python-docutils)
2826 ("python-pygments" ,python-pygments)))
2827 (home-page "http://sphinx-doc.org/")
2828 (synopsis "Python documentation generator")
2829 (description "Sphinx is a tool that makes it easy to create documentation
2830for Python projects or other documents consisting of multiple reStructuredText
2831sources.")
3f641af0 2832 (license license:bsd-3)))
9dd6078d
DT
2833
2834(define-public python2-sphinx
2835 (package-with-python2 python-sphinx))
6888830b 2836
ad320b20
RW
2837(define-public python-sphinx-rtd-theme
2838 (package
2839 (name "python-sphinx-rtd-theme")
2840 (version "0.1.6")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (string-append "https://pypi.python.org/packages/source/s/"
2845 "sphinx_rtd_theme/sphinx_rtd_theme-"
2846 version ".tar.gz"))
2847 (sha256
2848 (base32
2849 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2850 (build-system python-build-system)
2851 (arguments
2852 `(;; With standard flags, the install phase attempts to create a zip'd
2853 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2854 ;; before 1980'
2855 #:configure-flags '("--single-version-externally-managed"
2856 "--record=sphinx-rtd-theme.txt")))
2857 (native-inputs
2858 `(("python-setuptools" ,python-setuptools)))
2859 (inputs
2860 `(("python-docutils" ,python-docutils)
2861 ("python-sphinx" ,python-sphinx)))
2862 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2863 (synopsis "ReadTheDocs.org theme for Sphinx")
2864 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2865 (license license:expat)))
ad320b20
RW
2866
2867(define-public python2-sphinx-rtd-theme
2868 (package-with-python2 python-sphinx-rtd-theme))
2869
f4de5b3b
CAW
2870(define-public python-feedgenerator
2871 (package
2872 (name "python-feedgenerator")
f0412aa2 2873 (version "1.8")
f4de5b3b 2874 (source
f4de5b3b 2875 (origin
f0412aa2
EF
2876 (method url-fetch)
2877 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2878 (sha256
2879 (base32
f0412aa2 2880 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2881 (build-system python-build-system)
f0412aa2 2882 (native-inputs
f4de5b3b
CAW
2883 `(("python-setuptools" ,python-setuptools)
2884 ("python-pytz" ,python-pytz)
2885 ("python-six" ,python-six)))
f0412aa2 2886 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2887 (synopsis
2888 "Standalone version of Django's Atom/RSS feed generator")
2889 (description
2890 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2891which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2892 (license license:bsd-3)))
f4de5b3b
CAW
2893
2894(define-public python2-feedgenerator
2895 (package-with-python2 python-feedgenerator))
2896
59ad30e3
CAW
2897(define-public python-blinker
2898 (package
2899 (name "python-blinker")
7fb9ff4d 2900 (version "1.4")
59ad30e3
CAW
2901 (source
2902 (origin
2903 (method url-fetch)
7fb9ff4d 2904 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2905 (sha256
2906 (base32
7fb9ff4d 2907 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2908 (build-system python-build-system)
2909 (native-inputs
2910 `(("python-setuptools" ,python-setuptools)))
2911 ;; No "test" command supplied to setuptools, so unless there's another way
2912 ;; to run tests, we're skipping them!
2913 (arguments '(#:tests? #f))
2914 (home-page "http://pythonhosted.org/blinker/")
2915 (synopsis "Fast, simple object-to-object and broadcast signaling")
2916 (description
2917 "Blinker provides a fast dispatching system that allows any number of
2918interested parties to subscribe to events, or \"signals\".")
2919 (license license:expat)))
2920
2921(define-public python2-blinker
2922 (package-with-python2 python-blinker))
2923
b8050e71
CAW
2924(define-public pelican
2925 (package
2926 (name "pelican")
11f97c27 2927 (version "3.6.3")
b8050e71
CAW
2928 (source
2929 (origin
2930 (method url-fetch)
11f97c27 2931 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2932 (sha256
2933 (base32
11f97c27 2934 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2935 (build-system python-build-system)
d9f2dece 2936 (inputs
b8050e71
CAW
2937 `(("python-feedgenerator" ,python-feedgenerator)
2938 ("python-jinja2" ,python-jinja2)
2939 ("python-pygments" ,python-pygments)
2940 ("python-docutils" ,python-docutils)
2941 ("python-pytz" ,python-pytz)
2942 ("python-blinker" ,python-blinker)
2943 ("python-unidecode" ,python-unidecode)
2944 ("python-six" ,python-six)
2945 ("python-dateutil-2" ,python-dateutil-2)))
2946 (home-page "http://getpelican.com/")
2947 (arguments
2948 `(;; XXX Requires a lot more packages to do unit tests :P
2949 #:tests? #f
2950 #:phases (modify-phases %standard-phases
2951 (add-before
2952 'install 'adjust-requires
2953 ;; Since feedgenerator is installed from git, it doesn't
2954 ;; conform to the version requirements.
2955 ;;
2956 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2957 ;; version requirement so setuptools doesn't get confused.
2958 (lambda _
2959 (substitute* "setup.py"
2960 (("['\"]feedgenerator.*?['\"]")
2961 "'feedgenerator'")))))))
2962 (synopsis "Python-based static site publishing system")
2963 (description
2964 "Pelican is a tool to generate a static blog from reStructuredText,
2965Markdown input files, and more. Pelican uses Jinja2 for templating
2966and is very extensible.")
3f641af0 2967 (license license:agpl3+)))
b8050e71 2968
240ca4aa
RW
2969(define-public python-scikit-learn
2970 (package
2971 (name "python-scikit-learn")
be0a4c26 2972 (version "0.16.1")
240ca4aa
RW
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (string-append
2977 "https://github.com/scikit-learn/scikit-learn/archive/"
2978 version ".tar.gz"))
7e21b9fb 2979 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2980 (sha256
2981 (base32
be0a4c26 2982 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2983 (build-system python-build-system)
2984 (arguments
2985 `(#:phases
2986 (alist-cons-before
2f6b3d2e
RW
2987 'check 'set-HOME
2988 ;; some tests require access to "$HOME"
2989 (lambda _ (setenv "HOME" "/tmp"))
2990 ;; Tests can only be run after the library has been installed and not
2991 ;; within the source directory.
2992 (alist-cons-after
2993 'install 'check
2994 (lambda _
2995 (with-directory-excursion "/tmp"
2996 ;; With Python 3 one test of 3334 fails
2997 ;; (sklearn.tests.test_common.test_transformers); see
2998 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2999 (system* "nosetests" "-v" "sklearn")))
3000 (alist-delete 'check %standard-phases)))))
240ca4aa 3001 (inputs
2f6b3d2e 3002 `(("openblas" ,openblas)
240ca4aa
RW
3003 ("python-nose" ,python-nose)))
3004 (propagated-inputs
3005 `(("python-numpy" ,python-numpy)
3006 ("python-scipy" ,python-scipy)))
3007 (home-page "http://scikit-learn.org/")
3008 (synopsis "Machine Learning in Python")
3009 (description
3010 "Scikit-learn provides simple and efficient tools for data
3011mining and data analysis.")
25a2f81f
EF
3012 (license license:bsd-3)
3013 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3014
3015(define-public python2-scikit-learn
25a2f81f 3016 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3017
12f8f9bb
RW
3018(define-public python-scikit-image
3019 (package
3020 (name "python-scikit-image")
3021 (version "0.11.3")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (string-append
3026 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3027 version ".tar.gz"))
3028 (sha256
3029 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3030 (build-system python-build-system)
3031 (propagated-inputs
3032 `(("python-matplotlib" ,python-matplotlib)
3033 ("python-networkx" ,python-networkx)
3034 ("python-numpy" ,python-numpy)
3035 ("python-scipy" ,python-scipy)
3036 ("python-six" ,python-six)
3037 ("python-pillow" ,python-pillow)))
3038 (native-inputs
3039 `(("python-cython" ,python-cython)
3040 ("python-setuptools" ,python-setuptools)))
3041 (home-page "http://scikit-image.org/")
3042 (synopsis "Image processing in Python")
3043 (description
e881752c 3044 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3045 (license license:bsd-3)
3046 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3047
3048(define-public python2-scikit-image
2b031d3f
EF
3049 (let ((scikit-image (package-with-python2
3050 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3051 (package (inherit scikit-image)
3052 (native-inputs
3053 `(("python2-mock" ,python2-mock)
3054 ,@(package-native-inputs scikit-image)))
3055 (propagated-inputs
3056 `(("python2-pytz" ,python2-pytz)
2b031d3f 3057 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3058
5394a6a6
RW
3059(define-public python-redis
3060 (package
3061 (name "python-redis")
3062 (version "2.10.3")
3063 (source
3064 (origin
3065 (method url-fetch)
3066 (uri (string-append
3067 "https://pypi.python.org/packages/source/r/redis/redis-"
3068 version ".tar.gz"))
3069 (sha256
3070 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3071 (build-system python-build-system)
3072 ;; Tests require a running Redis server
3073 (arguments '(#:tests? #f))
3074 (native-inputs
3075 `(("python-setuptools" ,python-setuptools)
3076 ("python-pytest" ,python-pytest)))
3077 (home-page "https://github.com/andymccurdy/redis-py")
3078 (synopsis "Redis Python client")
3079 (description
3080 "This package provides a Python interface to the Redis key-value store.")
3081 (license license:expat)))
3082
3083(define-public python2-redis
3084 (package-with-python2 python-redis))
3085
748cef5b
RW
3086(define-public python-rq
3087 (package
3088 (name "python-rq")
3089 (version "0.5.2")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (string-append
3094 "https://pypi.python.org/packages/source/r/rq/rq-"
3095 version ".tar.gz"))
3096 (sha256
3097 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3098 (build-system python-build-system)
3099 (propagated-inputs
3100 `(("python-click" ,python-click)
3101 ("python-redis" ,python-redis)))
3102 (native-inputs
3103 `(("python-setuptools" ,python-setuptools)))
3104 (home-page "http://python-rq.org/")
3105 (synopsis "Simple job queues for Python")
3106 (description
3107 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3108processing them in the background with workers. It is backed by Redis and it
3109is designed to have a low barrier to entry.")
3f641af0 3110 (license license:bsd-2)))
748cef5b
RW
3111
3112(define-public python2-rq
3113 (package-with-python2 python-rq))
3114
6888830b
FB
3115(define-public python-cython
3116 (package
3117 (name "python-cython")
dd22efef 3118 (version "0.24.1")
6888830b
FB
3119 (source
3120 (origin
3121 (method url-fetch)
56918e26 3122 (uri (pypi-uri "Cython" version))
6888830b
FB
3123 (sha256
3124 (base32
dd22efef 3125 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3126 (build-system python-build-system)
3127 ;; we need the full python package and not just the python-wrapper
3128 ;; because we need libpython3.3m.so
3129 (inputs
3130 `(("python" ,python)))
3131 (arguments
3132 `(#:phases
b92f651b
EF
3133 (modify-phases %standard-phases
3134 (add-before 'check 'set-HOME
3135 ;; some tests require access to "$HOME/.cython"
3136 (lambda _ (setenv "HOME" "/tmp")))
3137 (replace 'check
3138 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3139 (home-page "http://cython.org/")
3140 (synopsis "C extensions for Python")
3141 (description "Cython is an optimising static compiler for both the Python
3142programming language and the extended Cython programming language. It makes
3143writing C extensions for Python as easy as Python itself.")
3f641af0 3144 (license license:asl2.0)
48b311b1 3145 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3146
3147(define-public python2-cython
48b311b1
LC
3148 (package (inherit (package-with-python2
3149 (strip-python2-variant python-cython)))
6888830b
FB
3150 (name "python2-cython")
3151 (inputs
3152 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3153
ee5fb7ee
AV
3154;; The RPython toolchain currently does not support Python 3.
3155(define-public python2-rpython
3156 (package
3157 (name "python2-rpython")
3158 (version "0.1.4")
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "rpython" version))
3163 (sha256
3164 (base32
3165 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3166 (build-system python-build-system)
3167 (arguments `(#:python ,python-2))
3168 (native-inputs
3169 `(("python2-pytest" ,python2-pytest) ; needed for running tests
3170 ("python2-setuptools" ,python2-setuptools)))
3171 (home-page "https://rpython.readthedocs.org")
3172 (synopsis "Framework for implementing interpreters and virtual machines")
3173 (description "RPython is a translation and support framework for
3174producing implementations of dynamic languages, emphasizing a clean separation
3175between language specification and implementation aspects.")
3176 (license license:expat)))
3177
0da98533
FB
3178;; This version of numpy is missing the documentation and is only used to
3179;; build matplotlib which is required to build numpy's documentation.
3180(define python-numpy-bootstrap
3181 (package
3182 (name "python-numpy-bootstrap")
ef9b4c04 3183 (version "1.10.4")
0da98533
FB
3184 (source
3185 (origin
3186 (method url-fetch)
de67e922 3187 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3188 "/numpy-" version ".tar.gz"))
3189 (sha256
3190 (base32
ef9b4c04 3191 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3192 (build-system python-build-system)
3193 (inputs
3194 `(("python-nose" ,python-nose)
cba256f8
RW
3195 ("openblas" ,openblas)
3196 ("lapack" ,lapack)))
0da98533 3197 (native-inputs
19afbea1 3198 `(("gfortran" ,gfortran)))
0da98533
FB
3199 (arguments
3200 `(#:phases
3201 (alist-cons-before
3202 'build 'set-environment-variables
3203 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3204 (call-with-output-file "site.cfg"
3205 (lambda (port)
cba256f8
RW
3206 (format port
3207 "[openblas]
dbdfe515
RW
3208libraries = openblas
3209library_dirs = ~a/lib
3210include_dirs = ~a/include
cba256f8
RW
3211
3212[lapack]
3213lapack_libs = lapack
3214library_dirs = ~a/lib
3215include_dirs = ~a/include
3216"
3217 (assoc-ref inputs "openblas")
3218 (assoc-ref inputs "openblas")
3219 (assoc-ref inputs "lapack")
3220 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3221 ;; Use "gcc" executable, not "cc".
3222 (substitute* "numpy/distutils/system_info.py"
3223 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3224 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3225 #t)
6a843168
FB
3226 ;; Tests can only be run after the library has been installed and not
3227 ;; within the source directory.
3228 (alist-cons-after
3229 'install 'check
89b5c60e 3230 (lambda _
6a843168 3231 (with-directory-excursion "/tmp"
89b5c60e 3232 (zero? (system* "python" "-c"
6a843168 3233 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3234 (alist-delete
3235 'check
6a843168 3236 %standard-phases)))))
0da98533
FB
3237 (home-page "http://www.numpy.org/")
3238 (synopsis "Fundamental package for scientific computing with Python")
3239 (description "NumPy is the fundamental package for scientific computing
e881752c 3240with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3241object, sophisticated (broadcasting) functions, tools for integrating C/C++
3242and Fortran code, useful linear algebra, Fourier transform, and random number
3243capabilities.")
3f641af0 3244 (license license:bsd-3)))
0da98533
FB
3245
3246(define python2-numpy-bootstrap
3247 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3248
3a1bfe18
RW
3249(define-public python2-fastlmm
3250 (package
3251 (name "python2-fastlmm")
b074e7d4 3252 (version "0.2.21")
3a1bfe18
RW
3253 (source
3254 (origin
3255 (method url-fetch)
b074e7d4 3256 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3257 (sha256
3258 (base32
b074e7d4 3259 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3260 (build-system python-build-system)
3261 (arguments
3262 `(#:python ,python-2)) ; only Python 2.7 is supported
3263 (propagated-inputs
3264 `(("python2-numpy" ,python2-numpy)
3265 ("python2-scipy" ,python2-scipy)
3266 ("python2-matplotlib" ,python2-matplotlib)
3267 ("python2-pandas" ,python2-pandas)
3268 ("python2-scikit-learn" ,python2-scikit-learn)
3269 ("python2-cython" ,python2-cython)
3270 ("python2-pysnptools" ,python2-pysnptools)))
3271 (native-inputs
3272 `(("unzip" ,unzip)
3273 ("python2-mock" ,python2-mock)
3274 ("python2-setuptools" ,python2-setuptools)))
3275 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3276 (synopsis "Perform genome-wide association studies on large data sets")
3277 (description
3278 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3279Models, is a program for performing both single-SNP and SNP-set genome-wide
3280association studies (GWAS) on extremely large data sets.")
3f641af0 3281 (license license:asl2.0)))
3a1bfe18 3282
2ee8869a
FB
3283(define-public python-numpy
3284 (package (inherit python-numpy-bootstrap)
3285 (name "python-numpy")
3286 (outputs '("out" "doc"))
89b5c60e 3287 (inputs
2ee8869a
FB
3288 `(("which" ,which)
3289 ("python-setuptools" ,python-setuptools)
3290 ("python-matplotlib" ,python-matplotlib)
3291 ("python-sphinx" ,python-sphinx)
3292 ("python-pyparsing" ,python-pyparsing)
3293 ("python-numpydoc" ,python-numpydoc)
3294 ,@(package-inputs python-numpy-bootstrap)))
3295 (native-inputs
3296 `(("pkg-config" ,pkg-config)
3297 ("texlive" ,texlive)
3298 ("texinfo" ,texinfo)
3299 ("perl" ,perl)
3300 ,@(package-native-inputs python-numpy-bootstrap)))
3301 (arguments
89b5c60e 3302 `(,@(substitute-keyword-arguments
2ee8869a
FB
3303 (package-arguments python-numpy-bootstrap)
3304 ((#:phases phases)
3305 `(alist-cons-after
3306 'install 'install-doc
3307 (lambda* (#:key outputs #:allow-other-keys)
3308 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3309 (doc (string-append
3310 data "/doc/" ,name "-"
2ee8869a
FB
3311 ,(package-version python-numpy-bootstrap)))
3312 (info (string-append data "/info"))
3313 (html (string-append doc "/html"))
3314 (pyver ,(string-append "PYVER=")))
3315 (with-directory-excursion "doc"
3316 (mkdir-p html)
3317 (system* "make" "html" pyver)
3318 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3319 (system* "make" "-C" "build/latex"
2ee8869a
FB
3320 "all-pdf" "PAPER=a4" pyver)
3321 ;; FIXME: Generation of the info file fails.
3322 ;; (system* "make" "info" pyver)
3323 ;; (mkdir-p info)
3324 ;; (copy-file "build/texinfo/numpy.info"
3325 ;; (string-append info "/numpy.info"))
3326 (for-each (lambda (file)
3327 (copy-file (string-append "build/latex" file)
3328 (string-append doc file)))
3329 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3330 (with-directory-excursion "build/html"
3331 (for-each (lambda (file)
3332 (let* ((dir (dirname file))
3333 (tgt-dir (string-append html "/" dir)))
3334 (unless (equal? "." dir)
3335 (mkdir-p tgt-dir))
96c46210 3336 (install-file file html)))
2ee8869a
FB
3337 (find-files "." ".*"))))))
3338 ,phases)))))))
3339
764c077b 3340(define-public python2-numpy
57b7b8cd 3341 (package-with-python2 python-numpy))
2ee8869a 3342
15bfe6d6
FB
3343(define-public python-pyparsing
3344 (package
3345 (name "python-pyparsing")
e0669289 3346 (version "2.0.3")
15bfe6d6
FB
3347 (source
3348 (origin
3349 (method url-fetch)
de67e922
LF
3350 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3351 "/pyparsing-" version
15bfe6d6
FB
3352 "/pyparsing-" version ".tar.gz"))
3353 (sha256
3354 (base32
e0669289 3355 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3356 (build-system python-build-system)
3357 (outputs '("out" "doc"))
3358 (arguments
3359 `(#:tests? #f ; no test target
3360 #:modules ((guix build python-build-system)
3361 (guix build utils))
3362 #:phases
3363 (alist-cons-after
3364 'install 'install-doc
3365 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3366 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3367 "/share/doc/" ,name "-" ,version))
3368 (html-doc (string-append doc "/html"))
3369 (examples (string-append doc "/examples")))
3370 (mkdir-p html-doc)
3371 (mkdir-p examples)
89b5c60e 3372 (for-each
15bfe6d6 3373 (lambda (dir tgt)
89b5c60e 3374 (map (lambda (file)
96c46210 3375 (install-file file tgt))
15bfe6d6
FB
3376 (find-files dir ".*")))
3377 (list "docs" "htmldoc" "examples")
3378 (list doc html-doc examples))))
3379 %standard-phases)))
3380 (home-page "http://pyparsing.wikispaces.com")
3381 (synopsis "Python parsing class library")
3382 (description
3383 "The pyparsing module is an alternative approach to creating and
3384executing simple grammars, vs. the traditional lex/yacc approach, or the use
3385of regular expressions. The pyparsing module provides a library of classes
3386that client code uses to construct the grammar directly in Python code.")
bd3fa666 3387 (license license:expat)))
15bfe6d6
FB
3388
3389(define-public python2-pyparsing
3390 (package-with-python2 python-pyparsing))
3391
ec00de35
FB
3392(define-public python-numpydoc
3393 (package
3394 (name "python-numpydoc")
3395 (version "0.5")
3396 (source
3397 (origin
3398 (method url-fetch)
89b5c60e 3399 (uri (string-append
ec00de35
FB
3400 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3401 version ".tar.gz"))
3402 (sha256
3403 (base32
5e4d8f67
AE
3404 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3405 (modules '((guix build utils)))
3406 (snippet
3407 '(begin
3408 ;; Drop a test requiring matplotlib, which we cannot add as an
3409 ;; input since it would create a circular dependency: Extend the
3410 ;; test for Python 3, where it is already dropped, to Python 2.
3411 (substitute* "numpydoc/tests/test_plot_directive.py"
3412 (("3") "2"))))))
ec00de35
FB
3413 (build-system python-build-system)
3414 (inputs
3415 `(("python-setuptools" ,python-setuptools)
3416 ("python-docutils" ,python-docutils)
3417 ("python-sphinx" ,python-sphinx)
3418 ("python-nose" ,python-nose)))
3419 (home-page "https://pypi.python.org/pypi/numpydoc")
3420 (synopsis
3421 "Numpy's Sphinx extensions")
3422 (description
3423 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3424 (license license:bsd-2)))
ec00de35
FB
3425
3426(define-public python2-numpydoc
5e4d8f67 3427 (package-with-python2 python-numpydoc))
1c65314c 3428
1e656049
RW
3429(define-public python-numexpr
3430 (package
3431 (name "python-numexpr")
26112c0a 3432 (version "2.6.0")
1e656049
RW
3433 (source
3434 (origin
3435 (method url-fetch)
26112c0a 3436 (uri (pypi-uri "numexpr" version))
1e656049
RW
3437 (sha256
3438 (base32
26112c0a 3439 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3440 (build-system python-build-system)
3441 (arguments `(#:tests? #f)) ; no tests included
3442 (propagated-inputs
3443 `(("python-numpy" ,python-numpy)))
3444 (home-page "https://github.com/pydata/numexpr")
3445 (synopsis "Fast numerical expression evaluator for NumPy")
3446 (description
3447 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3448expressions that operate on arrays are accelerated and use less memory than
3449doing the same calculation in Python. In addition, its multi-threaded
3450capabilities can make use of all your cores, which may accelerate
3451computations, most specially if they are not memory-bounded (e.g. those using
3452transcendental functions).")
fc1a170e
EF
3453 (license license:expat)
3454 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3455
3456(define-public python2-numexpr
fc1a170e 3457 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3458
1c65314c
FB
3459(define-public python-matplotlib
3460 (package
3461 (name "python-matplotlib")
1bbc659f 3462 (version "1.4.3")
1c65314c
FB
3463 (source
3464 (origin
3465 (method url-fetch)
de67e922
LF
3466 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3467 "/matplotlib-" version
1c65314c
FB
3468 "/matplotlib-" version ".tar.gz"))
3469 (sha256
3470 (base32
1bbc659f 3471 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3472 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3473 (build-system python-build-system)
3474 (outputs '("out" "doc"))
25f9a068
FB
3475 (propagated-inputs ; the following packages are all needed at run time
3476 `(("python-pyparsing" ,python-pyparsing)
3477 ("python-pygobject" ,python-pygobject)
3478 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3479 ("python-tkinter" ,python "tk")
25f9a068
FB
3480 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3481 ;; from 'gtk+') provides the required 'typelib' files used by
3482 ;; 'gobject-introspection'. The location of these files is set with the
3483 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3484 ;; is done automatically by a 'native-search-path' procedure. However,
3485 ;; at run-time the user must set this variable as follows:
3486 ;;
3487 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3488 ("gtk+" ,gtk+)
3489 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3490 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3491 ;; object. For this reason we need to import both libraries.
3492 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3493 ("python-pycairo" ,python-pycairo)
3494 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3495 (inputs
3496 `(("python-setuptools" ,python-setuptools)
3497 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3498 ("python-six" ,python-six)
3499 ("python-pytz" ,python-pytz)
3500 ("python-numpy" ,python-numpy-bootstrap)
3501 ("python-sphinx" ,python-sphinx)
3502 ("python-numpydoc" ,python-numpydoc)
3503 ("python-nose" ,python-nose)
3504 ("python-mock" ,python-mock)
3505 ("libpng" ,libpng)
3506 ("imagemagick" ,imagemagick)
3507 ("freetype" ,freetype)
25f9a068
FB
3508 ("cairo" ,cairo)
3509 ("glib" ,glib)
4e7a137a 3510 ("python-pillow" ,python-pillow)
1c65314c 3511 ;; FIXME: Add backends when available.
1c65314c
FB
3512 ;("python-wxpython" ,python-wxpython)
3513 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3514 ("tcl" ,tcl)
3515 ("tk" ,tk)))
1c65314c
FB
3516 (native-inputs
3517 `(("pkg-config" ,pkg-config)
3518 ("texlive" ,texlive)
3519 ("texinfo" ,texinfo)))
3520 (arguments
3521 `(#:phases
25f9a068
FB
3522 (alist-cons-before
3523 'build 'configure-environment
3524 (lambda* (#:key outputs inputs #:allow-other-keys)
3525 (let ((cairo (assoc-ref inputs "cairo"))
3526 (gtk+ (assoc-ref inputs "gtk+")))
3527 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3528 ;; has not effect.
25f9a068
FB
3529 (setenv "LD_LIBRARY_PATH"
3530 (string-append cairo "/lib:" gtk+ "/lib"))
3531 (setenv "HOME" (getcwd))
3532 (call-with-output-file "setup.cfg"
3533 (lambda (port)
1bbc659f
FB
3534 (format port "[directories]~%
3535basedirlist = ~a,~a~%
57b7b8cd 3536 [rc_options]~%
1bbc659f
FB
3537backend = TkAgg~%"
3538 (assoc-ref inputs "tcl")
3539 (assoc-ref inputs "tk"))))))
25f9a068
FB
3540 (alist-cons-after
3541 'install 'install-doc
3542 (lambda* (#:key outputs #:allow-other-keys)
3543 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3544 (doc (string-append data "/doc/" ,name "-" ,version))
3545 (info (string-append data "/info"))
3546 (html (string-append doc "/html")))
3547 (with-directory-excursion "doc"
25f9a068
FB
3548 ;; Produce pdf in 'A4' format.
3549 (substitute* (find-files "." "conf\\.py")
3550 (("latex_paper_size = 'letter'")
3551 "latex_paper_size = 'a4'"))
3552 (mkdir-p html)
3553 (mkdir-p info)
3554 ;; The doc recommends to run the 'html' target twice.
3555 (system* "python" "make.py" "html")
3556 (system* "python" "make.py" "html")
18b31516 3557 (copy-recursively "build/html" html)
25f9a068
FB
3558 (system* "python" "make.py" "latex")
3559 (system* "python" "make.py" "texinfo")
18b31516
FB
3560 (symlink (string-append html "/_images")
3561 (string-append info "/matplotlib-figures"))
3562 (with-directory-excursion "build/texinfo"
3563 (substitute* "matplotlib.texi"
3564 (("@image\\{([^,]*)" all file)
3565 (string-append "@image{matplotlib-figures/" file)))
3566 (symlink (string-append html "/_images")
3567 "./matplotlib-figures")
3568 (system* "makeinfo" "--no-split"
3569 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3570 (copy-file "build/texinfo/matplotlib.info"
3571 (string-append info "/matplotlib.info"))
3572 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3573 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3574 %standard-phases))))
1c65314c
FB
3575 (home-page "http://matplotlib.org")
3576 (synopsis "2D plotting library for Python")
3577 (description
3578 "Matplotlib is a Python 2D plotting library which produces publication
3579quality figures in a variety of hardcopy formats and interactive environments
3580across platforms. Matplotlib can be used in Python scripts, the python and
3581ipython shell, web application servers, and six graphical user interface
3582toolkits.")
3f641af0 3583 (license license:psfl)
57b7b8cd 3584 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3585
764c077b 3586(define-public python2-matplotlib
57b7b8cd
LC
3587 (let ((matplotlib (package-with-python2
3588 (strip-python2-variant python-matplotlib))))
764c077b 3589 (package (inherit matplotlib)
88c26834
AE
3590 ;; Make sure to use special packages for Python 2 instead
3591 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3592 (propagated-inputs
7ca0dbc3 3593 `(("python2-pycairo" ,python2-pycairo)
764c077b 3594 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3595 ("python2-tkinter" ,python-2 "tk")
3596 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3597 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3598
0dde6232
RW
3599(define-public python2-pysnptools
3600 (package
3601 (name "python2-pysnptools")
a800018e 3602 (version "0.3.9")
0dde6232
RW
3603 (source
3604 (origin
3605 (method url-fetch)
3f2e9675 3606 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3607 (sha256
3608 (base32
a800018e 3609 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3610 (build-system python-build-system)
3611 (arguments
3612 `(#:python ,python-2)) ; only Python 2.7 is supported
3613 (propagated-inputs
3614 `(("python2-numpy" ,python2-numpy)
3615 ("python2-scipy" ,python2-scipy)
a800018e 3616 ("python2-pytz" ,python2-pytz)
0dde6232 3617 ("python2-cython" ,python2-cython)))
a800018e
EF
3618 (inputs
3619 `(("python2-dateutil-2" ,python2-dateutil-2)
3620 ("python2-pandas" ,python2-pandas)
3621 ("python2-six" ,python2-six)))
0dde6232
RW
3622 (native-inputs
3623 `(("unzip" ,unzip)
3624 ("python2-setuptools" ,python2-setuptools)))
3625 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3626 (synopsis "Library for reading and manipulating genetic data")
3627 (description
3628 "PySnpTools is a library for reading and manipulating genetic data. It
3629can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3630those files. It can also efficiently manipulate ranges of integers using set
3631operators such as union, intersection, and difference.")
3f641af0 3632 (license license:asl2.0)))
0dde6232 3633
c9b1b4f9
RW
3634(define-public python-rpy2
3635 (package
3636 (name "python-rpy2")
ec3bcbc7 3637 (version "2.7.6")
c9b1b4f9
RW
3638 (source
3639 (origin
3640 (method url-fetch)
ec3bcbc7 3641 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3642 (sha256
3643 (base32
ec3bcbc7 3644 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3645 (build-system python-build-system)
3646 (inputs
3647 `(("python-six" ,python-six)
3648 ("readline" ,readline)
3649 ("icu4c" ,icu4c)
3650 ("pcre" ,pcre)
3651 ("r" ,r)))
3652 (native-inputs
5ff6575b
RW
3653 `(("python-setuptools" ,python-setuptools)
3654 ("zlib" ,zlib)))
c9b1b4f9
RW
3655 (home-page "http://rpy.sourceforge.net/")
3656 (synopsis "Python interface to the R language")
3657 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3658low-level interface to R from Python, a proposed high-level interface,
3659including wrappers to graphical libraries, as well as R-like structures and
3660functions.")
3f641af0 3661 (license license:gpl3+)))
c9b1b4f9
RW
3662
3663(define-public python2-rpy2
3664 (let ((rpy2 (package-with-python2 python-rpy2)))
3665 (package (inherit rpy2)
3666 (native-inputs
3667 `(("python2-singledispatch" ,python2-singledispatch)
3668 ,@(package-native-inputs rpy2))))))
3669
bb986599
FB
3670(define-public python-scipy
3671 (package
3672 (name "python-scipy")
ba8a0824 3673 (version "0.16.0")
bb986599
FB
3674 (source
3675 (origin
3676 (method url-fetch)
de67e922
LF
3677; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3678 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3679 "/scipy-" version ".tar.xz"))
bb986599
FB
3680 (sha256
3681 (base32
ba8a0824 3682 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3683 (build-system python-build-system)
dd86c0d1 3684 (propagated-inputs
bb986599
FB
3685 `(("python-numpy" ,python-numpy)
3686 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3687 ("python-pyparsing" ,python-pyparsing)))
3688 (inputs
3689 `(("lapack" ,lapack)
719b01c1 3690 ("openblas" ,openblas)))
bb986599 3691 (native-inputs
dd86c0d1
RW
3692 `(("python-nose" ,python-nose)
3693 ("python-sphinx" ,python-sphinx)
5248d49e 3694 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3695 ("gfortran" ,gfortran)
bb986599
FB
3696 ("texlive" ,texlive)
3697 ("perl" ,perl)))
3698 (outputs '("out" "doc"))
3699 (arguments
3700 `(#:phases
3701 (alist-cons-before
719b01c1 3702 'build 'configure-openblas
bb986599 3703 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3704 (call-with-output-file "site.cfg"
3705 (lambda (port)
3706 (format port
3707 "[blas]
3708libraries = openblas
3709library_dirs = ~a/lib
3710include_dirs = ~a/include
3711[atlas]
3712library_dirs = ~a/lib
3713atlas_libs = openblas
3714"
3715 (assoc-ref inputs "openblas")
3716 (assoc-ref inputs "openblas")
3717 (assoc-ref inputs "openblas"))))
3718 #t)
bb986599
FB
3719 (alist-cons-after
3720 'install 'install-doc
3721 (lambda* (#:key outputs #:allow-other-keys)
3722 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3723 (doc (string-append data "/doc/" ,name "-" ,version))
3724 (html (string-append doc "/html"))
3725 (pyver ,(string-append "PYVER=")))
3726 (with-directory-excursion "doc"
bb986599
FB
3727 ;; Fix generation of images for mathematical expressions.
3728 (substitute* (find-files "source" "conf\\.py")
3729 (("pngmath_use_preview = True")
3730 "pngmath_use_preview = False"))
3731 (mkdir-p html)
3732 (system* "make" "html" pyver)
3733 (system* "make" "latex" "PAPER=a4" pyver)
3734 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3735 (copy-file "build/latex/scipy-ref.pdf"
3736 (string-append doc "/scipy-ref.pdf"))
3737 (with-directory-excursion "build/html"
3738 (for-each (lambda (file)
3739 (let* ((dir (dirname file))
3740 (tgt-dir (string-append html "/" dir)))
96c46210 3741 (install-file file html)))
bb986599
FB
3742 (find-files "." ".*"))))))
3743 ;; Tests can only be run after the library has been installed and not
3744 ;; within the source directory.
3745 (alist-cons-after
3746 'install 'check
89b5c60e 3747 (lambda _
bb986599
FB
3748 (with-directory-excursion "/tmp"
3749 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3750 (alist-delete
3751 'check
4f9ff21e
RW
3752 (alist-cons-after
3753 'unpack 'fix-tests
3754 (lambda _
3755 (substitute* "scipy/integrate/tests/test_quadpack.py"
3756 (("libm.so") "libm.so.6"))
3757 #t)
3758 %standard-phases)))))))
bb986599
FB
3759 (home-page "http://www.scipy.org/")
3760 (synopsis "The Scipy library provides efficient numerical routines")
3761 (description "The SciPy library is one of the core packages that make up
3762the SciPy stack. It provides many user-friendly and efficient numerical
3763routines such as routines for numerical integration and optimization.")
3f641af0 3764 (license license:bsd-3)))
bb986599 3765
764c077b 3766(define-public python2-scipy
57b7b8cd 3767 (package-with-python2 python-scipy))
bb986599 3768
73acc193 3769(define-public python-socksipy-branch
3770 (package
3771 (name "python-socksipy-branch")
3772 (version "1.01")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "SocksiPy-branch" version))
3777 (sha256
3778 (base32
3779 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3780 (build-system python-build-system)
3781 (arguments
3782 `(#:tests? #f)) ; There are no tests
3783 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3784 (synopsis "Python SOCKS module")
3785 (description
3786 "SocksiPy - A Python SOCKS client module. It provides a
3787socket-like interface that supports connections to any TCP
3788service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3789The original version was developed by Dan Haim, this is a
3790branch created by Mario Vilas to address some open issues,
3791as the original project seems to have been abandoned circa 2007.")
3792 (license license:bsd-3)))
3793
3794(define-public python2-socksipy-branch
3795 (package-with-python2 python-socksipy-branch))
3796
94914805
EB
3797(define-public python-sqlalchemy
3798 (package
3799 (name "python-sqlalchemy")
a4ba286b 3800 (version "1.0.12")
94914805
EB
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (string-append "https://pypi.python.org/packages/source/S/"
3805 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3806 (sha256
3807 (base32
a4ba286b 3808 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3809 (build-system python-build-system)
3810 (native-inputs
3811 `(("python-cython" ,python-cython) ;for c extensions
3812 ("python-pytest" ,python-pytest)
3813 ("python-mock" ,python-mock))) ;for tests
3814 (arguments
3815 `(#:phases (alist-replace
3816 'check
3817 (lambda _ (zero? (system* "py.test")))
3818 %standard-phases)))
3819 (home-page "http://www.sqlalchemy.org")
3820 (synopsis "Database abstraction library")
3821 (description
3822 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3823gives application developers the full power and flexibility of SQL. It
3824provides a full suite of well known enterprise-level persistence patterns,
3825designed for efficient and high-performing database access, adapted into a
3826simple and Pythonic domain language.")
3f641af0 3827 (license license:x11)))
94914805
EB
3828
3829(define-public python2-sqlalchemy
3830 (package-with-python2 python-sqlalchemy))
c937562e 3831
de2966cf
EF
3832(define-public python-sqlalchemy-utils
3833 (package
3834 (name "python-sqlalchemy-utils")
3835 (version "0.32.9")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "SQLAlchemy-Utils" version))
3840 (sha256
3841 (base32
3842 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3843 (build-system python-build-system)
3844 (inputs
3845 `(("python-six" ,python-six)
3846 ("python-sqlalchemy" ,python-sqlalchemy)))
3847 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3848 (synopsis "Various utility functions for SQLAlchemy")
3849 (description
3850 "SQLAlchemy-utils provides various utility functions and custom data types
3851for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3852 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3853 (license license:bsd-3)))
3854
3855(define-public python2-sqlalchemy-utils
3856 (let ((base (package-with-python2
3857 (strip-python2-variant python-sqlalchemy-utils))))
3858 (package (inherit base)
3859 (native-inputs
3860 `(("python2-setuptools" ,python2-setuptools)
3861 ,@(package-native-inputs base))))))
3862
af5a4602
CAW
3863(define-public python-alembic
3864 (package
3865 (name "python-alembic")
bb484529 3866 (version "0.8.7")
af5a4602
CAW
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "alembic" version))
3871 (sha256
3872 (base32
bb484529 3873 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3874 (build-system python-build-system)
3875 (native-inputs
3876 `(("python-mock" ,python-mock)
3877 ("python-pytest-cov" ,python-pytest-cov)))
3878 (propagated-inputs
3879 `(("python-sqlalchemy" ,python-sqlalchemy)
3880 ("python-mako" ,python-mako)
3881 ("python-editor" ,python-editor)))
3882 (home-page "http://bitbucket.org/zzzeek/alembic")
3883 (synopsis
3884 "Database migration tool for SQLAlchemy")
3885 (description
3886 "Alembic is a lightweight database migration tool for usage with the
3887SQLAlchemy Database Toolkit for Python.")
3888 (license license:expat)
3889 (properties `((python2-variant . ,(delay python2-alembic))))))
3890
3891(define-public python2-alembic
3892 (let ((alembic (package-with-python2
3893 (strip-python2-variant python-alembic))))
3894 (package
3895 (inherit alembic)
3896 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3897 ,@(package-native-inputs alembic))))))
3898
1671c07c
EB
3899(define-public python-distutils-extra
3900 (package
3901 (name "python-distutils-extra")
3902 (version "2.38")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3907 version "/+download/python-distutils-extra-"
3908 version ".tar.gz"))
3909 (sha256
3910 (base32
3911 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3912 (build-system python-build-system)
3913 (native-inputs
3914 `(("python-setuptools" ,python-setuptools)))
3915 (home-page "https://launchpad.net/python-distutils-extra/")
3916 (synopsis "Enhancements to Python's distutils")
3917 (description
3918 "The python-distutils-extra module enables you to easily integrate
3919gettext support, themed icons, and scrollkeeper-based documentation into
3920Python's distutils.")
3f641af0 3921 (license license:gpl2)))
1671c07c
EB
3922
3923(define-public python2-distutils-extra
3924 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3925
3926(define-public python2-elib.intl
3927 (package
3928 (name "python2-elib.intl")
3929 (version "0.0.3")
3930 (source
3931 (origin
3932 ;; This project doesn't tag releases or publish tarballs, so we take
3933 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3934 (method git-fetch)
3935 (uri (git-reference
3936 (url "https://github.com/dieterv/elib.intl.git")
3937 (commit "d09997cfef")))
3938 (sha256
3939 (base32
3940 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3941 (build-system python-build-system)
3942 (native-inputs
3943 `(("python2-setuptools" ,python2-setuptools)))
3944 (arguments
3945 ;; incompatible with Python 3 (exception syntax)
3946 `(#:python ,python-2
3947 #:tests? #f
3948 ;; With standard flags, the install phase attempts to create a zip'd
3949 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3950 ;; before 1980'
3951 #:configure-flags '("--single-version-externally-managed"
3952 "--record=elib.txt")))
3953 (home-page "https://github.com/dieterv/elib.intl")
3954 (synopsis "Enhanced internationalization for Python")
3955 (description
3956 "The elib.intl module provides enhanced internationalization (I18N)
3957services for your Python modules and applications.")
3f641af0 3958 (license license:lgpl3+)))
ea5456c8 3959
c937562e
EB
3960(define-public python-pillow
3961 (package
3962 (name "python-pillow")
debf4179 3963 (version "3.3.1")
c937562e
EB
3964 (source
3965 (origin
3966 (method url-fetch)
f1d9231d 3967 (uri (pypi-uri "Pillow" version))
c937562e
EB
3968 (sha256
3969 (base32
debf4179 3970 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
3971 (build-system python-build-system)
3972 (native-inputs
3973 `(("python-setuptools" ,python-setuptools)
3974 ("python-nose" ,python-nose)))
3975 (inputs
5ff408d9
SB
3976 `(("freetype" ,freetype)
3977 ("lcms" ,lcms)
c937562e
EB
3978 ("zlib" ,zlib)
3979 ("libjpeg" ,libjpeg)
3980 ("openjpeg" ,openjpeg)
5ff408d9
SB
3981 ("libtiff" ,libtiff)
3982 ("libwebp" ,libwebp)))
c937562e
EB
3983 (propagated-inputs
3984 `(;; Used at runtime for pkg_resources
3985 ("python-setuptools" ,python-setuptools)))
3986 (arguments
e5358a6b
LC
3987 `(#:phases (modify-phases %standard-phases
3988 (add-before
3989 'install 'disable-egg-compression
3990 (lambda _
3991 ;; Leave the .egg uncompressed since compressing it would
3992 ;; prevent the GC from identifying run-time dependencies.
3993 ;; See <http://bugs.gnu.org/20765>.
3994 (let ((port (open-file "setup.cfg" "a")))
3995 (display "\n[easy_install]\nzip_ok = 0\n"
3996 port)
3997 (close-port port)
3998 #t)))
3999 (add-after
4000 'install 'check-installed
4001 (lambda _
4002 (begin
4003 (setenv "HOME" (getcwd))
4004 (and (zero? (system* "python" "selftest.py"
4005 "--installed"))
4006 (zero? (system* "python" "test-installed.py"))))))
4007 (delete 'check))))
c937562e
EB
4008 (home-page "https://pypi.python.org/pypi/Pillow")
4009 (synopsis "Fork of the Python Imaging Library")
4010 (description
4011 "The Python Imaging Library adds image processing capabilities to your
4012Python interpreter. This library provides extensive file format support, an
4013efficient internal representation, and fairly powerful image processing
4014capabilities. The core image library is designed for fast access to data
4015stored in a few basic pixel formats. It should provide a solid foundation for
4016a general image processing tool.")
3f641af0 4017 (license (license:x11-style
c937562e
EB
4018 "http://www.pythonware.com/products/pil/license.htm"
4019 "The PIL Software License"))))
4020
4021(define-public python2-pillow
4022 (package-with-python2 python-pillow))
bb986599 4023
a415f036
FB
4024(define-public python-pycparser
4025 (package
4026 (name "python-pycparser")
38eb6919 4027 (version "2.14")
a415f036
FB
4028 (source
4029 (origin
4030 (method url-fetch)
38eb6919 4031 (uri (pypi-uri "pycparser" version))
a415f036
FB
4032 (sha256
4033 (base32
38eb6919 4034 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4035 (outputs '("out" "doc"))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("pkg-config" ,pkg-config)
4039 ("python-setuptools" ,python-setuptools)))
4040 (arguments
89b5c60e 4041 `(#:phases
a415f036
FB
4042 (alist-replace
4043 'check
4044 (lambda _
4045 (with-directory-excursion "tests"
4046 (zero? (system* "python" "all_tests.py"))))
4047 (alist-cons-after
4048 'install 'install-doc
4049 (lambda* (#:key outputs #:allow-other-keys)
4050 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4051 (doc (string-append data "/doc/" ,name "-" ,version))
4052 (examples (string-append doc "/examples")))
4053 (mkdir-p examples)
4054 (for-each (lambda (file)
4055 (copy-file (string-append "." file)
4056 (string-append doc file)))
4057 '("/README.rst" "/CHANGES" "/LICENSE"))
4058 (copy-recursively "examples" examples)))
4059 %standard-phases))))
4060 (home-page "https://github.com/eliben/pycparser")
4061 (synopsis "C parser in Python")
4062 (description
4063 "Pycparser is a complete parser of the C language, written in pure Python
4064using the PLY parsing library. It parses C code into an AST and can serve as
4065a front-end for C compilers or analysis tools.")
3f641af0 4066 (license license:bsd-3)))
a415f036
FB
4067
4068(define-public python2-pycparser
4069 (package-with-python2 python-pycparser))
57c3f716
FB
4070
4071(define-public python-cffi
4072 (package
4073 (name "python-cffi")
2d3a437c 4074 (version "1.4.2")
57c3f716
FB
4075 (source
4076 (origin
4077 (method url-fetch)
2d3a437c 4078 (uri (pypi-uri "cffi" version))
89b5c60e 4079 (sha256
2d3a437c 4080 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4081 (build-system python-build-system)
4082 (outputs '("out" "doc"))
4083 (inputs
4084 `(("libffi" ,libffi)))
4085 (propagated-inputs ; required at run-time
4086 `(("python-pycparser" ,python-pycparser)))
4087 (native-inputs
4088 `(("pkg-config" ,pkg-config)
4089 ("python-sphinx" ,python-sphinx)
4179f952 4090 ("python-pytest" ,python-pytest)
57c3f716
FB
4091 ("python-setuptools" ,python-setuptools)))
4092 (arguments
4179f952 4093 `(#:phases
57c3f716
FB
4094 (alist-cons-after
4095 'install 'install-doc
4096 (lambda* (#:key outputs #:allow-other-keys)
4097 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4098 (doc (string-append data "/doc/" ,name "-" ,version))
4099 (html (string-append doc "/html")))
4100 (with-directory-excursion "doc"
4101 (system* "make" "html")
4102 (mkdir-p html)
4103 (copy-recursively "build/html" html))
4104 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4105 %standard-phases)))
4106 (home-page "http://cffi.readthedocs.org")
4107 (synopsis "Foreign function interface for Python")
4108 (description
4109 "Foreign Function Interface for Python calling C code.")
bd3fa666 4110 (license license:expat)))
57c3f716
FB
4111
4112(define-public python2-cffi
4113 (package-with-python2 python-cffi))
6fa14469
FB
4114
4115(define-public python-xcffib
4116 (package
4117 (name "python-xcffib")
4118 (version "0.1.9")
4119 (source
4120 (origin
4121 (method url-fetch)
4122 (uri (string-append "https://pypi.python.org/packages/source/x/"
4123 "xcffib/xcffib-" version ".tar.gz"))
4124 (sha256
4125 (base32
4126 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4127 (build-system python-build-system)
4128 (inputs
4129 `(("libxcb" ,libxcb)
4130 ("python-six" ,python-six)))
4131 (native-inputs
4132 `(("python-setuptools" ,python-setuptools)))
4133 (propagated-inputs
4134 `(("python-cffi" ,python-cffi))) ; used at run time
4135 (arguments
89b5c60e 4136 `(#:phases
6fa14469
FB
4137 (alist-cons-after
4138 'install 'install-doc
4139 (lambda* (#:key outputs #:allow-other-keys)
4140 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4141 "/doc/" ,name "-" ,version)))
4142 (mkdir-p doc)
4143 (copy-file "README.md"
4144 (string-append doc "/README.md"))))
4145 %standard-phases)))
4146 (home-page "https://github.com/tych0/xcffib")
4147 (synopsis "XCB Python bindings")
4148 (description
4149 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4150support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4151 (license license:expat)))
6fa14469
FB
4152
4153(define-public python2-xcffib
4154 (package-with-python2 python-xcffib))
4155
9e099723
FB
4156(define-public python-cairocffi
4157 (package
4158 (name "python-cairocffi")
4159 (version "0.6")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 ;; The archive on pypi is missing the 'utils' directory!
4164 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4165 version ".tar.gz"))
f586c877 4166 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4167 (sha256
4168 (base32
4169 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4170 (build-system python-build-system)
4171 (outputs '("out" "doc"))
4172 (inputs
4173 `(("gdk-pixbuf" ,gdk-pixbuf)
4174 ("cairo" ,cairo)))
4175 (native-inputs
4176 `(("pkg-config" ,pkg-config)
4177 ("python-sphinx" ,python-sphinx)
4178 ("python-docutils" ,python-docutils)
4179 ("python-setuptools" ,python-setuptools)))
4180 (propagated-inputs
4181 `(("python-xcffib" ,python-xcffib))) ; used at run time
4182 (arguments
89b5c60e 4183 `(#:phases
9e099723
FB
4184 (alist-cons-after
4185 'install 'install-doc
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4188 (doc (string-append data "/doc/" ,name "-" ,version))
4189 (html (string-append doc "/html")))
89b5c60e 4190 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4191 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4192 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4193 (setenv "LANG" "en_US.UTF-8")
4194 (mkdir-p html)
4195 (for-each (lambda (file)
4196 (copy-file (string-append "." file)
4197 (string-append doc file)))
4198 '("/README.rst" "/CHANGES" "/LICENSE"))
4199 (system* "python" "setup.py" "build_sphinx")
4200 (copy-recursively "docs/_build/html" html)))
4201 %standard-phases)))
4202 (home-page "https://github.com/SimonSapin/cairocffi")
4203 (synopsis "Python bindings and object-oriented API for Cairo")
4204 (description
4205 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4206Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4207graphics library with support for multiple backends including image buffers,
4208PNG, PostScript, PDF, and SVG file output.")
3f641af0 4209 (license license:bsd-3)))
9e099723
FB
4210
4211(define-public python2-cairocffi
4212 (package-with-python2 python-cairocffi))
4213
3cff95cb
RW
4214(define-public python-decorator
4215 (package
4216 (name "python-decorator")
eb6e2e81 4217 (version "4.0.9")
3cff95cb
RW
4218 (source
4219 (origin
4220 (method url-fetch)
e21338be 4221 (uri (pypi-uri "decorator" version))
3cff95cb 4222 (sha256
eb6e2e81 4223 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4224 (build-system python-build-system)
4225 (arguments '(#:tests? #f)) ; no test target
4226 (native-inputs
4227 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4228 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4229 (synopsis "Python module to simplify usage of decorators")
4230 (description
4231 "The aim of the decorator module is to simplify the usage of decorators
4232for the average programmer, and to popularize decorators usage giving examples
4233of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4234etc. The core of this module is a decorator factory.")
4235 (license license:expat)))
4236
4237(define-public python2-decorator
4238 (package-with-python2 python-decorator))
4239
2c0499ad
RW
4240(define-public python-drmaa
4241 (package
4242 (name "python-drmaa")
4243 (version "0.7.6")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (string-append
4248 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4249 version ".tar.gz"))
4250 (sha256
4251 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4252 (build-system python-build-system)
4253 ;; The test suite requires libdrmaa which is provided by the cluster
4254 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4255 ;; should be set to the path of the libdrmaa library.
4256 (arguments '(#:tests? #f))
4257 (native-inputs
4258 `(("python-nose" ,python-nose)
4259 ("python-setuptools" ,python-setuptools)))
4260 (home-page "https://pypi.python.org/pypi/drmaa")
4261 (synopsis "Python bindings for the DRMAA library")
4262 (description
4263 "A Python package for Distributed Resource Management (DRM) job
4264submission and control. This package is an implementation of the DRMAA 1.0
4265Python language binding specification.")
3f641af0 4266 (license license:bsd-3)))
2c0499ad
RW
4267
4268(define-public python2-drmaa
4269 (package-with-python2 python-drmaa))
4270
d05c6da0
RW
4271(define-public python-gridmap
4272 (package
4273 (name "python-gridmap")
4274 (version "0.13.0")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (string-append
4279 "https://github.com/pygridtools/gridmap/archive/v"
4280 version ".tar.gz"))
4281 (file-name (string-append name "-" version ".tar.gz"))
4282 (sha256
4283 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4284 (build-system python-build-system)
4285 (inputs
4286 `(("python-psutil" ,python-psutil)
4287 ("python-drmaa" ,python-drmaa)
4288 ("python-pyzmq" ,python-pyzmq)))
4289 (native-inputs
4290 `(("python-setuptools" ,python-setuptools)))
4291 (home-page "https://github.com/pygridtools/gridmap")
4292 (synopsis "Create jobs on a cluster directly from Python")
4293 (description
4294 "Gridmap is a Python package to allow you to easily create jobs on the
4295cluster directly from Python. You can directly map Python functions onto the
4296cluster without needing to write any wrapper code yourself.")
3f641af0 4297 (license license:gpl3+)))
d05c6da0
RW
4298
4299(define-public python2-gridmap
4300 (package-with-python2 python-gridmap))
4301
cb6d5c54
RW
4302(define-public python-pexpect
4303 (package
4304 (name "python-pexpect")
4305 (version "3.3")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (string-append "https://pypi.python.org/packages/source/p/"
4310 "pexpect/pexpect-" version ".tar.gz"))
4311 (sha256
4312 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:phases
4316 (modify-phases %standard-phases
4317 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4318 (native-inputs
4319 `(("python-nose" ,python-nose)))
4320 (home-page "http://pexpect.readthedocs.org/")
4321 (synopsis "Controlling interactive console applications")
4322 (description
4323 "Pexpect is a pure Python module for spawning child applications;
4324controlling them; and responding to expected patterns in their output.
4325Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4326child application and control it as if a human were typing commands.")
3f641af0 4327 (license license:isc)))
cb6d5c54
RW
4328
4329(define-public python2-pexpect
4330 (package-with-python2 python-pexpect))
4331
229ad120
RW
4332(define-public python-setuptools-scm
4333 (package
4334 (name "python-setuptools-scm")
42d6d0d0 4335 (version "1.11.1")
229ad120
RW
4336 (source (origin
4337 (method url-fetch)
383af6b0 4338 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4339 (sha256
4340 (base32
42d6d0d0 4341 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4342 (build-system python-build-system)
383af6b0 4343 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4344 (home-page "https://github.com/pypa/setuptools_scm/")
4345 (synopsis "Manage Python package versions in SCM metadata")
4346 (description
383af6b0 4347 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4348@dfn{software configuration management} (SCM) metadata instead of declaring
4349them as the version argument or in a SCM managed file.")
4350 (license license:expat)))
4351
4352(define-public python2-setuptools-scm
4353 (package-with-python2 python-setuptools-scm))
4354
b74270ee
RW
4355(define-public python-pathpy
4356 (package
4357 (name "python-pathpy")
4358 (version "8.1.1")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (string-append "https://pypi.python.org/packages/source/p/"
4363 "path.py/path.py-" version ".tar.gz"))
4364 (sha256
4365 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4366 (build-system python-build-system)
4367 (propagated-inputs
4368 `(("python-appdirs" ,python-appdirs)))
4369 (native-inputs
553b709b
EF
4370 `(("python-setuptools" ,python-setuptools)
4371 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4372 ("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "http://github.com/jaraco/path.py")
4375 (synopsis "Python module wrapper for built-in os.path")
4376 (description
4377 "@code{path.py} implements path objects as first-class entities, allowing
4378common operations on files to be invoked on those path objects directly.")
4379 (license license:expat)))
4380
4381(define-public python2-pathpy
4382 (package-with-python2 python-pathpy))
4383
0d34e01b
RW
4384(define-public python-pickleshare
4385 (package
4386 (name "python-pickleshare")
4387 (version "0.5")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (string-append "https://pypi.python.org/packages/source/p/"
4392 "pickleshare/pickleshare-" version ".tar.gz"))
4393 (sha256
4394 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4395 (build-system python-build-system)
4396 (propagated-inputs
4397 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4398 (native-inputs
4399 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4400 (home-page "https://github.com/vivainio/pickleshare")
4401 (synopsis "Tiny key value database with concurrency support")
4402 (description
4403 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4404Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4405shelve, many processes can access the database simultaneously. Changing a
4406value in database is immediately visible to other processes accessing the same
4407database. Concurrency is possible because the values are stored in separate
4408files. Hence the “database” is a directory where all files are governed by
4409PickleShare.")
4410 (license license:expat)))
4411
4412(define-public python2-pickleshare
4413 (package-with-python2 python-pickleshare))
4414
cd6e5189
RW
4415(define-public python-simplegeneric
4416 (package
4417 (name "python-simplegeneric")
4418 (version "0.8.1")
4419 (source
4420 (origin
4421 (method url-fetch)
4422 (uri (string-append "https://pypi.python.org/packages/source/s/"
4423 "simplegeneric/simplegeneric-" version ".zip"))
4424 (sha256
4425 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4426 (build-system python-build-system)
4427 (native-inputs
69b96e5e
RW
4428 `(("python-setuptools" ,python-setuptools)
4429 ("unzip" ,unzip)))
cd6e5189
RW
4430 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4431 (synopsis "Python module for simple generic functions")
4432 (description
4433 "The simplegeneric module lets you define simple single-dispatch generic
4434functions, akin to Python’s built-in generic functions like @code{len()},
4435@code{iter()} and so on. However, instead of using specially-named methods,
4436these generic functions use simple lookup tables, akin to those used by
4437e.g. @code{pickle.dump()} and other generic functions found in the Python
4438standard library.")
3f641af0 4439 (license license:zpl2.1)))
cd6e5189
RW
4440
4441(define-public python2-simplegeneric
4442 (package-with-python2 python-simplegeneric))
4443
ddc7d8ed
RW
4444(define-public python-ipython-genutils
4445 (package
4446 (name "python-ipython-genutils")
4447 (version "0.1.0")
4448 (source
4449 (origin
4450 (method url-fetch)
4451 (uri (string-append "https://pypi.python.org/packages/source/i/"
4452 "ipython_genutils/ipython_genutils-"
4453 version ".tar.gz"))
4454 (sha256
4455 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4456 (build-system python-build-system)
4457 (arguments `(#:tests? #f)) ; no tests
4458 (home-page "http://ipython.org")
4459 (synopsis "Vestigial utilities from IPython")
4460 (description
4461 "This package provides retired utilities from IPython.")
3f641af0 4462 (license license:bsd-3)))
ddc7d8ed
RW
4463
4464(define-public python2-ipython-genutils
4465 (package-with-python2 python-ipython-genutils))
4466
2b10eb48
RW
4467(define-public python-traitlets
4468 (package
4469 (name "python-traitlets")
a5ba1481 4470 (version "4.2.0")
2b10eb48
RW
4471 (source
4472 (origin
4473 (method url-fetch)
cc0c4fde 4474 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4475 (sha256
4476 (base32
a5ba1481 4477 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4478 (build-system python-build-system)
4479 (arguments
4480 `(#:phases
4481 (modify-phases %standard-phases
4482 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4483 (propagated-inputs
4484 `(("python-ipython-genutils" ,python-ipython-genutils)
4485 ("python-decorator" ,python-decorator)))
4486 (native-inputs
cc0c4fde
EF
4487 `(("python-mock" ,python-mock)
4488 ("python-nose" ,python-nose)))
2b10eb48
RW
4489 (home-page "http://ipython.org")
4490 (synopsis "Configuration system for Python applications")
4491 (description
4492 "Traitlets is a framework that lets Python classes have attributes with
4493type checking, dynamically calculated default values, and ‘on change’
4494callbacks. The package also includes a mechanism to use traitlets for
4495configuration, loading values from files or from command line arguments. This
4496is a distinct layer on top of traitlets, so you can use traitlets in your code
4497without using the configuration machinery.")
3f641af0 4498 (license license:bsd-3)))
2b10eb48
RW
4499
4500(define-public python2-traitlets
4501 (package-with-python2 python-traitlets))
4502
4263b06f
RW
4503(define-public python-jupyter-core
4504 (package
4505 (name "python-jupyter-core")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (string-append (pypi-uri "jupyter_core" version)))
4511 (sha256
4512 (base32
4513 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4514 (build-system python-build-system)
4515 ;; FIXME: not sure how to run the tests
4516 (arguments `(#:tests? #f))
4517 (propagated-inputs
4518 `(("python-traitlets" ,python-traitlets)))
4519 (home-page "http://jupyter.org/")
4520 (synopsis "Jupyter base package")
4521 (description
4522 "Jupyter core is the base package on which Jupyter projects rely.")
4523 (license license:bsd-3)))
4524
4525(define-public python2-jupyter-core
4526 (package-with-python2 python-jupyter-core))
4527
ae1ab9fe
FB
4528(define-public python-ipython
4529 (package
4530 (name "python-ipython")
3a0b1b9a 4531 (version "3.2.1")
ae1ab9fe
FB
4532 (source
4533 (origin
fceac880 4534 (method url-fetch)
fc1adab1 4535 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4536 (uri (string-append "https://pypi.python.org/packages/source/i/"
4537 "ipython/ipython-" version ".tar.gz"))
4538 (sha256
4539 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4540 (build-system python-build-system)
4541 (outputs '("out" "doc"))
3a0b1b9a
FB
4542 (propagated-inputs
4543 `(("python-pyzmq" ,python-pyzmq)
4544 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4545 (inputs
4546 `(("readline" ,readline)
3a0b1b9a 4547 ("which" ,which)
ae1ab9fe 4548 ("python-matplotlib" ,python-matplotlib)
5d26e542 4549 ("python-numpy" ,python-numpy)
ae1ab9fe 4550 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4551 ("python-jinja2" ,python-jinja2)
4552 ("python-mistune" ,python-mistune)
4553 ("python-jsonschema" ,python-jsonschema)
4554 ("python-pygments" ,python-pygments)
4555 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4556 ("python-nose" ,python-nose)))
4557 (native-inputs
4558 `(("pkg-config" ,pkg-config)
4559 ("python-sphinx" ,python-sphinx)
4560 ("texlive" ,texlive)
4561 ("texinfo" ,texinfo)
4562 ("python-setuptools" ,python-setuptools)))
4563 (arguments
89b5c60e 4564 `(#:phases
3a0b1b9a
FB
4565 (modify-phases %standard-phases
4566 (add-after
4567 'install 'install-doc
4568 (lambda* (#:key inputs outputs #:allow-other-keys)
4569 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4570 (doc (string-append data "/doc/" ,name "-" ,version))
4571 (html (string-append doc "/html"))
4572 (man1 (string-append data "/man/man1"))
4573 (info (string-append data "/info"))
4574 (examples (string-append doc "/examples")))
afd3d931 4575 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4576 (with-directory-excursion "docs"
4577 ;; FIXME: html and pdf fail to build
4578 ;; (system* "make" "html")
4579 ;; (system* "make" "pdf" "PAPER=a4")
4580 (system* "make" "info"))
4581 (copy-recursively "docs/man" man1)
4582 (copy-recursively "examples" examples)
4583 ;; (copy-recursively "docs/build/html" html)
4584 ;; (copy-file "docs/build/latex/ipython.pdf"
4585 ;; (string-append doc "/ipython.pdf"))
4586 (mkdir-p info)
4587 (copy-file "docs/build/texinfo/ipython.info"
4588 (string-append info "/ipython.info"))
4589 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4590 ;; Tests can only be run after the library has been installed and not
4591 ;; within the source directory.
4592 (delete 'check)
4593 (add-after
4594 'install 'check
4595 (lambda* (#:key outputs tests? #:allow-other-keys)
4596 (if tests?
4597 (with-directory-excursion "/tmp"
4598 (setenv "HOME" "/tmp/") ;; required by a test
4599 (zero? (system* (string-append (assoc-ref outputs "out")
4600 "/bin/iptest"))))
4601 #t)))
4602 (add-before
4603 'install 'fix-tests
4604 (lambda* (#:key inputs #:allow-other-keys)
4605 (substitute* "./IPython/utils/_process_posix.py"
4606 (("/usr/bin/env', 'which") (which "which")))
4607 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4608 (("#!/usr/bin/env python")
4609 (string-append "#!" (which "python"))))
4610 ;; Disable 1 failing test
4611 (substitute* "./IPython/core/tests/test_magic.py"
4612 (("def test_dirops\\(\\):" all)
4613 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4614 (home-page "http://ipython.org")
4615 (synopsis "IPython is a tool for interactive computing in Python")
4616 (description
4617 "IPython provides a rich architecture for interactive computing with:
4618Powerful interactive shells, a browser-based notebook, support for interactive
4619data visualization, embeddable interpreters and tools for parallel
4620computing.")
135ba811
EF
4621 (license license:bsd-3)
4622 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4623
4624(define-public python2-ipython
135ba811 4625 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4626 (package
4627 (inherit ipython)
4628 ;; FIXME: some tests are failing
4629 (arguments
4630 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4631 ;; FIXME: add pyreadline once available.
89b5c60e 4632 (inputs
135ba811
EF
4633 `(("python2-mock" ,python2-mock)
4634 ,@(package-inputs ipython))))))
03411993
AE
4635
4636(define-public python-isodate
4637 (package
4638 (name "python-isodate")
b6785c2e 4639 (version "0.5.4")
03411993
AE
4640 (source
4641 (origin
4642 (method url-fetch)
b6785c2e 4643 (uri (pypi-uri "isodate" version))
03411993
AE
4644 (sha256
4645 (base32
b6785c2e 4646 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4647 (build-system python-build-system)
4648 (inputs
4649 `(("python-setuptools" ,python-setuptools)))
4650 (home-page
4651 "http://cheeseshop.python.org/pypi/isodate")
4652 (synopsis
4653 "Python date parser and formatter")
4654 (description
4655 "Python-isodate is a python module for parsing and formatting
4656ISO 8601 dates, time and duration.")
3f641af0 4657 (license license:bsd-3)))
03411993
AE
4658
4659(define-public python2-isodate
4660 (package-with-python2 python-isodate))
673ab897
AE
4661
4662(define-public python-html5lib
4663 (package
4664 (name "python-html5lib")
fee04c19 4665 (version "1.0b8")
673ab897
AE
4666 (source
4667 (origin
4668 (method url-fetch)
fee04c19 4669 (uri (pypi-uri "html5lib" version))
673ab897
AE
4670 (sha256
4671 (base32
fee04c19 4672 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4673 (build-system python-build-system)
3dd75476
AE
4674 (propagated-inputs
4675 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4676 (inputs
4677 `(("python-setuptools" ,python-setuptools)))
4678 (arguments
4679 `(#:test-target "check"))
4680 (home-page
4681 "https://github.com/html5lib/html5lib-python")
4682 (synopsis
4683 "Python HTML parser based on the WHATWG HTML specifcation")
4684 (description
4685 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4686and written in Python.")
bd3fa666 4687 (license license:expat)))
673ab897
AE
4688
4689(define-public python2-html5lib
4690 (package-with-python2 python-html5lib))
e99f4211
MW
4691
4692(define-public python-urwid
4693 (package
4694 (name "python-urwid")
51ff41f6 4695 (version "1.3.1")
e99f4211
MW
4696 (source
4697 (origin
4698 (method url-fetch)
b97c1bfd 4699 (uri (pypi-uri "urwid" version))
e99f4211
MW
4700 (sha256
4701 (base32
51ff41f6 4702 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4703 (build-system python-build-system)
b97c1bfd
LF
4704 (arguments
4705 `(#:phases
4706 (modify-phases %standard-phases
4707 ;; Disable failing test. Bug filed upstream:
4708 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4709 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4710 (add-after 'unpack 'disable-failing-test
4711 (lambda _
4712 (substitute* "urwid/tests/test_event_loops.py"
4713 (("test_remove_watch_file")
4714 "disable_remove_watch_file")))))))
e99f4211
MW
4715 (native-inputs `(("python-setuptools" ,python-setuptools)))
4716 (home-page "http://urwid.org")
4717 (synopsis "Console user interface library for Python")
4718 (description
4719 "Urwid is a curses-based UI/widget library for Python. It includes many
4720features useful for text console applications.")
3f641af0 4721 (license license:lgpl2.1+)))
e99f4211
MW
4722
4723(define-public python2-urwid
4724 (package-with-python2 python-urwid))
d95a56c6 4725
47d0b292
TS
4726(define-public python-urwidtrees
4727 (package
4728 (name "python-urwidtrees")
37ec4623 4729 (version "1.0.2")
47d0b292
TS
4730 (source
4731 (origin
4732 (method url-fetch)
37ec4623
TS
4733 ;; package author intends on distributing via github rather than pypi:
4734 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4735 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4736 version ".tar.gz"))
4737 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4738 (sha256
4739 (base32
37ec4623 4740 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4741 (build-system python-build-system)
4742 (arguments
4743 '(#:tests? #f)) ; no tests
4744 (inputs `(("python-urwid" ,python-urwid)))
4745 (home-page "https://github.com/pazz/urwidtrees")
4746 (synopsis "Tree widgets for urwid")
4747 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4748toolkit. Use it to build trees of widgets.")
3f641af0 4749 (license license:gpl3+)))
47d0b292
TS
4750
4751(define-public python2-urwidtrees
4752 (package-with-python2 python-urwidtrees))
4753
d95a56c6
PAR
4754(define-public python-dbus
4755 (package
4756 (name "python-dbus")
4757 (version "1.2.0")
4758 (source
4759 (origin
4760 (method url-fetch)
4761 (uri (string-append
5cc3096c 4762 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4763 version ".tar.gz"))
4764 (sha256
4765 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4766 (build-system gnu-build-system)
6717c879
SB
4767 (arguments
4768 '(#:phases
4769 (modify-phases %standard-phases
4770 (add-before
4771 'check 'pre-check
4772 (lambda _
4773 ;; XXX: For the missing '/etc/machine-id'.
4774 (substitute* "test/run-test.sh"
4775 (("DBUS_FATAL_WARNINGS=1")
4776 "DBUS_FATAL_WARNINGS=0"))
4777 #t)))))
d95a56c6
PAR
4778 (native-inputs
4779 `(("pkg-config" ,pkg-config)))
4780 (inputs
4781 `(("python" ,python)
2e88d113 4782 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4783 (synopsis "Python bindings for D-bus")
4784 (description "python-dbus provides bindings for libdbus, the reference
4785implementation of D-Bus.")
4786 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4787 (license license:expat)))
b52af02b
MW
4788
4789(define-public python2-dbus
4790 (package (inherit python-dbus)
4791 (name "python2-dbus")
4792 (inputs `(("python" ,python-2)
4793 ,@(alist-delete "python"
4794 (package-inputs python-dbus)
4795 equal?)))
4796 ;; FIXME: on Python 2, the test_utf8 fails with:
4797 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4798 (arguments `(#:tests? #f))))
a6ac8332
AE
4799
4800(define-public python-apsw
4801 (package
4802 (name "python-apsw")
917708c2 4803 (version "3.9.2-r1")
a6ac8332
AE
4804 (source
4805 (origin
4806 (method url-fetch)
917708c2 4807 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4808 (sha256
4809 (base32
917708c2 4810 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4811 (build-system python-build-system)
4812 (inputs
4813 `(("python-setuptools" ,python-setuptools)
4814 ("sqlite" ,sqlite)))
4815 (arguments
4816 `(#:phases
4817 ;; swap check and install phases
4818 (alist-cons-after
4819 'install 'check
4820 (assoc-ref %standard-phases 'check)
4821 (alist-delete
4822 'check
4823 %standard-phases))))
4824 (home-page "https://github.com/rogerbinns/apsw/")
4825 (synopsis "Another Python SQLite Wrapper")
4826 (description "APSW is a Python wrapper for the SQLite
4827embedded relational database engine. In contrast to other wrappers such as
4828pysqlite it focuses on being a minimal layer over SQLite attempting just to
4829translate the complete SQLite API into Python.")
abde5f37 4830 (license license:zlib)))
a6ac8332
AE
4831
4832(define-public python2-apsw
4833 (package-with-python2 python-apsw))
26b307e2
AE
4834
4835(define-public python-lxml
4836 (package
4837 (name "python-lxml")
d58a3203 4838 (version "3.6.0")
26b307e2
AE
4839 (source
4840 (origin
4841 (method url-fetch)
97bbc480 4842 (uri (pypi-uri "lxml" version))
26b307e2 4843 (sha256
d58a3203
EF
4844 (base32
4845 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4846 (build-system python-build-system)
4847 (inputs
4848 `(("libxml2" ,libxml2)
4849 ("libxslt" ,libxslt)
4850 ("python-setuptools" ,python-setuptools)))
4851 (home-page "http://lxml.de/")
4852 (synopsis
4853 "Python XML processing library")
4854 (description
4855 "The lxml XML toolkit is a Pythonic binding for the C libraries
4856libxml2 and libxslt.")
3f641af0 4857 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4858
4859(define-public python2-lxml
4860 (package-with-python2 python-lxml))
4ed20663 4861
b32a1e47
CAW
4862;; beautifulsoup4 has a totally different namespace than 3.x,
4863;; and pypi seems to put it under its own name, so I guess we should too
4864(define-public python-beautifulsoup4
4865 (package
4866 (name "python-beautifulsoup4")
67fd4a12 4867 (version "4.5.1")
b32a1e47
CAW
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "beautifulsoup4" version))
4872 (sha256
4873 (base32
67fd4a12 4874 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 4875 (build-system python-build-system)
5f37f0b6
LF
4876 (arguments
4877 `(#:phases
4878 (modify-phases %standard-phases
4879 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4880 ;; must use this conversion script when building with Python 3. The
4881 ;; conversion script also runs the tests.
4882 ;; For more information, see the file 'convert-py3k' in the source
4883 ;; distribution.
4884 (replace 'check
4885 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
4886 (home-page
4887 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4888 (synopsis
4889 "Python screen-scraping library")
4890 (description
4891 "Beautiful Soup is a Python library designed for rapidly setting up
4892screen-scraping projects. It offers Pythonic idioms for navigating,
4893searching, and modifying a parse tree, providing a toolkit for
4894dissecting a document and extracting what you need. It automatically
4895converts incoming documents to Unicode and outgoing documents to UTF-8.")
4896 (license license:expat)
4897 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4898
4899(define-public python2-beautifulsoup4
4900 (package
4901 (inherit (package-with-python2
4902 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6
LF
4903 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
4904 (arguments `(#:python ,python-2))))
b32a1e47 4905
092e86f5
AE
4906(define-public python2-cssutils
4907 (package
4908 (name "python2-cssutils")
58d1d816 4909 (version "1.0.1")
092e86f5
AE
4910 (source
4911 (origin
4912 (method url-fetch)
58d1d816 4913 (uri (pypi-uri "cssutils" version))
092e86f5 4914 (sha256
58d1d816
EF
4915 (base32
4916 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
4917 (build-system python-build-system)
4918 (native-inputs
4919 `(("python2-mock" ,python2-mock) ; for the tests
4920 ("unzip" ,unzip))) ; for unpacking the source
4921 (inputs
4922 `(("python2-setuptools" ,python2-setuptools)))
4923 (arguments
4924 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4925 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4926 ))
092e86f5
AE
4927 (home-page "http://cthedot.de/cssutils/")
4928 (synopsis
4929 "CSS Cascading Style Sheets library for Python")
4930 (description
4931 "Cssutils is a Python package for parsing and building CSS
4932Cascading Style Sheets. Currently it provides a DOM only and no rendering
4933options.")
3f641af0 4934 (license license:lgpl3+)))
880ff77c
AE
4935
4936(define-public python-cssselect
4937 (package
4938 (name "python-cssselect")
d5ccd9ab 4939 (version "0.9.2")
880ff77c
AE
4940 (source
4941 (origin
4942 (method url-fetch)
d5ccd9ab 4943 (uri (pypi-uri "cssselect" version))
880ff77c 4944 (sha256
d5ccd9ab
EF
4945 (base32
4946 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
4947 (build-system python-build-system)
4948 (inputs
4949 `(("python-setuptools" ,python-setuptools)))
4950 (arguments
4951 ;; tests fail with message
4952 ;; AttributeError: 'module' object has no attribute 'tests'
4953 `(#:tests? #f))
4954 (home-page
4955 "https://pythonhosted.org/cssselect/")
4956 (synopsis
4957 "CSS3 selector parser and translator to XPath 1.0")
4958 (description
4959 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4960them to XPath 1.0 expressions. Such expressions can be used in lxml or
4961another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 4962 (license license:bsd-3)))
880ff77c
AE
4963
4964(define-public python2-cssselect
4965 (package-with-python2 python-cssselect))
60357f99
AE
4966
4967(define-public python-netifaces
4968 (package
4969 (name "python-netifaces")
4970 (version "0.10.4")
4971 (source
4972 (origin
4973 (method url-fetch)
4974 (uri (string-append
4975 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4976 version
4977 ".tar.gz"))
4978 (sha256
4979 (base32
4980 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4981 (build-system python-build-system)
4982 (inputs
4983 `(("python-setuptools" ,python-setuptools)))
4984 (home-page
4985 "https://bitbucket.org/al45tair/netifaces")
4986 (synopsis
4987 "Python module for portable network interface information")
4988 (description
4989 "Netifaces is a Python module providing information on network
4990interfaces in an easy and portable manner.")
4991 (license license:expat)))
4992
4993(define-public python2-netifaces
4994 (package-with-python2 python-netifaces))
92cb152b 4995
32f77c04
RW
4996(define-public python-networkx
4997 (package
4998 (name "python-networkx")
a4d9609c 4999 (version "1.11")
32f77c04
RW
5000 (source
5001 (origin
5002 (method url-fetch)
a4d9609c 5003 (uri (pypi-uri "networkx" version))
32f77c04 5004 (sha256
a4d9609c 5005 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5006 (build-system python-build-system)
5007 ;; python-decorator is needed at runtime
5008 (propagated-inputs
5009 `(("python-decorator" ,python-decorator)))
5010 (native-inputs
5011 `(("python-setuptools" ,python-setuptools)
5012 ("python-nose" ,python-nose)))
5013 (home-page "http://networkx.github.io/")
5014 (synopsis "Python module for creating and manipulating graphs and networks")
5015 (description
5016 "NetworkX is a Python package for the creation, manipulation, and study
5017of the structure, dynamics, and functions of complex networks.")
3f641af0 5018 (license license:bsd-3)))
32f77c04
RW
5019
5020(define-public python2-networkx
5021 (package-with-python2 python-networkx))
5022
92cb152b
RW
5023(define-public snakemake
5024 (package
5025 (name "snakemake")
5026 (version "3.2.1")
5027 (source
5028 (origin
5029 (method url-fetch)
5030 (uri (string-append
5031 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5032 version ".tar.gz"))
5033 (sha256
5034 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5035 (build-system python-build-system)
5036 (inputs `(("python-setuptools" ,python-setuptools)))
5037 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5038 (synopsis "Python-based execution environment for make-like workflows")
5039 (description
5040 "Snakemake aims to reduce the complexity of creating workflows by
5041providing a clean and modern domain specific specification language (DSL) in
5042Python style, together with a fast and comfortable execution environment.")
5043 (license license:expat)))
a1920bc9 5044
35de1fbd
RW
5045(define-public python-seaborn
5046 (package
5047 (name "python-seaborn")
fc899d4f 5048 (version "0.7.0")
35de1fbd
RW
5049 (source
5050 (origin
5051 (method url-fetch)
fc899d4f 5052 (uri (pypi-uri "seaborn" version))
35de1fbd 5053 (sha256
fc899d4f 5054 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5055 (build-system python-build-system)
5056 (propagated-inputs
5057 `(("python-pandas" ,python-pandas)
5058 ("python-matplotlib" ,python-matplotlib)
5059 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5060 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5061 (synopsis "Statistical data visualization")
5062 (description
5063 "Seaborn is a library for making attractive and informative statistical
5064graphics in Python. It is built on top of matplotlib and tightly integrated
5065with the PyData stack, including support for numpy and pandas data structures
5066and statistical routines from scipy and statsmodels.")
3f641af0 5067 (license license:bsd-3)
fc899d4f 5068 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5069
5070(define-public python2-seaborn
fc899d4f
EF
5071 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5072 (package
5073 (inherit base)
5074 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5075 ,@(package-propagated-inputs base)))
5076 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5077 ,@(package-native-inputs base))))))
35de1fbd 5078
90fc547f
RW
5079(define-public python-sympy
5080 (package
5081 (name "python-sympy")
5082 (version "0.7.6")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (string-append
5087 "https://github.com/sympy/sympy/releases/download/sympy-"
5088 version "/sympy-" version ".tar.gz"))
5089 (sha256
5090 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5091 (build-system python-build-system)
5092 (native-inputs
5093 `(("python-setuptools" ,python-setuptools)))
5094 (home-page "http://www.sympy.org/")
5095 (synopsis "Python library for symbolic mathematics")
5096 (description
5097 "SymPy is a Python library for symbolic mathematics. It aims to become a
5098full-featured computer algebra system (CAS) while keeping the code as simple
5099as possible in order to be comprehensible and easily extensible.")
3f641af0 5100 (license license:bsd-3)))
90fc547f
RW
5101
5102(define-public python2-sympy
5103 (package-with-python2 python-sympy))
5104
e8c9b010
SR
5105(define-public python-q
5106 (package
5107 (name "python-q")
5108 (version "2.6")
5109 (source
5110 (origin
5111 (method url-fetch)
5112 (uri (pypi-uri "q" version))
5113 (sha256
5114 (base32
5115 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5116 (build-system python-build-system)
5117 (home-page "https://github.com/zestyping/q")
5118 (synopsis "Quick-and-dirty debugging output for tired programmers")
5119 (description
5120 "q is a Python module for \"print\" style of debugging Python code. It
5121provides convenient short API for print out of values, tracebacks, and
5122falling into the Python interpreter.")
5123 (license license:asl2.0)
5124 (properties `((python2-variant . ,(delay python2-q))))))
5125
5126(define-public python2-q
5127 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5128 (package
5129 (inherit base)
5130 (native-inputs
5131 `(("python2-setuptools" ,python2-setuptools)
5132 ,@(package-native-inputs base))))))
5133
a1920bc9
FB
5134(define-public python-testlib
5135 (package
5136 (name "python-testlib")
5137 (version "0.6.5")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (string-append
5142 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5143 version ".zip"))
5144 (sha256
5145 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5146 (build-system python-build-system)
5147 (inputs
5148 `(("python-setuptools" ,python-setuptools)))
5149 (native-inputs
5150 `(("unzip" ,unzip)))
5151 (arguments
5152 `(#:phases
5153 (alist-replace
5154 'unpack
5155 (lambda* (#:key inputs outputs #:allow-other-keys)
5156 (let ((unzip (string-append (assoc-ref inputs "unzip")
5157 "/bin/unzip"))
5158 (source (assoc-ref inputs "source")))
5159 (and (zero? (system* unzip source))
5160 (chdir (string-append "testlib-" ,version)))))
5161 %standard-phases)))
5162 (synopsis "Python micro test suite harness")
5163 (description "A micro unittest suite harness for Python.")
5164 (home-page "https://github.com/trentm/testlib")
1cb9c006 5165 (license license:expat)))
a1920bc9
FB
5166
5167(define-public python2-testlib
5168 (package-with-python2 python-testlib))
db62afa5
LC
5169
5170(define-public python2-xlib
5171 (package
5172 (name "python2-xlib")
5173 (version "0.14")
5174 (source (origin
5175 (method url-fetch)
de67e922
LF
5176 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5177 "/" version "/"
db62afa5
LC
5178 "python-xlib-" version ".tar.gz"))
5179 (sha256
5180 (base32
5181 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5182 (build-system python-build-system)
5183 (arguments
5184 `(#:python ,python-2 ;Python 2 only
5185 #:tests? #f)) ;no tests
5186 (inputs
5187 `(("python-setuptools" ,python-setuptools)))
5188 (home-page "http://python-xlib.sourceforge.net/")
5189 (synopsis "Python X11 client library")
5190 (description
5191 "The Python X Library is intended to be a fully functional X client
5192library for Python programs. It is useful to implement low-level X clients.
5193It is written entirely in Python.")
3f641af0 5194 (license license:gpl2+)))
0234ca06
DT
5195
5196(define-public python-singledispatch
5197 (package
5198 (name "python-singledispatch")
5199 (version "3.4.0.3")
5200 (source
5201 (origin
5202 (method url-fetch)
bdb67d84 5203 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5204 (sha256
5205 (base32
5206 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5207 (build-system python-build-system)
5208 (native-inputs
5209 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5210 (inputs
0234ca06
DT
5211 `(("python-six" ,python-six)))
5212 (home-page
5213 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5214 (synopsis "Backport of singledispatch feature from Python 3.4")
5215 (description
5216 "This library brings functools.singledispatch from Python 3.4 to Python
52172.6-3.3.")
5218 (license license:expat)))
5219
5220(define-public python2-singledispatch
5221 (package-with-python2 python-singledispatch))
feaae484 5222
310d218f
RW
5223(define-public python-tornado
5224 (package
5225 (name "python-tornado")
a724924b 5226 (version "4.3")
310d218f
RW
5227 (source
5228 (origin
5229 (method url-fetch)
a724924b 5230 (uri (pypi-uri "tornado" version))
310d218f 5231 (sha256
a724924b 5232 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5233 (build-system python-build-system)
310d218f 5234 (native-inputs
b455439b
EF
5235 `(("python-certifi" ,python-certifi)))
5236 (inputs
5237 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5238 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5239 (synopsis "Python web framework and asynchronous networking library")
5240 (description
5241 "Tornado is a Python web framework and asynchronous networking library,
5242originally developed at FriendFeed. By using non-blocking network I/O,
5243Tornado can scale to tens of thousands of open connections, making it ideal
5244for long polling, WebSockets, and other applications that require a long-lived
5245connection to each user.")
3f641af0 5246 (license license:asl2.0)
b455439b 5247 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5248
5249(define-public python2-tornado
b455439b 5250 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5251 (package (inherit tornado)
5252 (inputs
5253 `(("python2-backport-ssl-match-hostname"
5254 ,python2-backport-ssl-match-hostname)
b455439b
EF
5255 ("python2-singledispatch" ,python2-singledispatch)
5256 ,@(package-inputs tornado)))
5257 (native-inputs
5258 `(("python2-setuptools" ,python2-setuptools)
5259 ,@(package-native-inputs tornado))))))
310d218f 5260
6b59fc10
EF
5261;; the python- version can be removed with python-3.5
5262(define-public python-backports-abc
5263 (package
5264 (name "python-backports-abc")
5265 (version "0.4")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "backports_abc" version))
5270 (sha256
5271 (base32
5272 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5273 (build-system python-build-system)
5274 (inputs
5275 `(("python-setuptools" ,python-setuptools)))
5276 (home-page "https://github.com/cython/backports_abc")
66e07664 5277 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5278 (description
5279 "Python-backports-abc provides a backport of additions to the
5280'collections.abc' module in Python-3.5.")
3f641af0 5281 (license license:psfl)))
6b59fc10
EF
5282
5283(define-public python2-backports-abc
5284 (package-with-python2 python-backports-abc))
5285
feaae484
SB
5286(define-public python-waf
5287 (package
5288 (name "python-waf")
7dd55dfe 5289 (version "1.9.5")
feaae484
SB
5290 (source (origin
5291 (method url-fetch)
bae67829 5292 (uri (string-append "https://waf.io/"
feaae484
SB
5293 "waf-" version ".tar.bz2"))
5294 (sha256
5295 (base32
7dd55dfe 5296 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5297 (build-system python-build-system)
5298 (arguments
5299 '(#:phases
5300 (modify-phases %standard-phases
5301 (replace 'build
7dd55dfe
EF
5302 (lambda _
5303 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5304 (replace 'check
7dd55dfe
EF
5305 (lambda _
5306 (zero? (system* "python" "waf" "--version"))))
feaae484 5307 (replace 'install
7dd55dfe
EF
5308 (lambda _
5309 (copy-file "waf" %output))))))
5310 (home-page "http://waf.io/")
feaae484
SB
5311 (synopsis "Python-based build system")
5312 (description
5313 "Waf is a Python-based framework for configuring, compiling and installing
5314applications.")
3f641af0 5315 (license license:bsd-3)))
feaae484
SB
5316
5317(define-public python2-waf
5318 (package-with-python2 python-waf))
45203542
RW
5319
5320(define-public python-pyzmq
5321 (package
5322 (name "python-pyzmq")
3655ee76 5323 (version "15.1.0")
45203542
RW
5324 (source
5325 (origin
5326 (method url-fetch)
3655ee76 5327 (uri (pypi-uri "pyzmq" version))
45203542 5328 (sha256
3655ee76 5329 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5330 (build-system python-build-system)
5331 (arguments
5332 `(#:configure-flags
5333 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5334 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5335 ;; --inplace' for 'python setup.py test' to work.
5336 #:tests? #f))
5337 (inputs
5338 `(("zeromq" ,zeromq)))
5339 (native-inputs
5340 `(("pkg-config" ,pkg-config)
5341 ("python-nose" ,python-nose)
5342 ("python-setuptools" ,python-setuptools)))
5343 (home-page "http://github.com/zeromq/pyzmq")
5344 (synopsis "Python bindings for 0MQ")
5345 (description
5346 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5347 (license license:bsd-4)))
45203542
RW
5348
5349(define-public python2-pyzmq
5350 (package-with-python2 python-pyzmq))
d889e6c4
CR
5351
5352(define-public python-pep8
5353 (package
5354 (name "python-pep8")
db251311 5355 (version "1.7.0")
d889e6c4
CR
5356 (source
5357 (origin
5358 (method url-fetch)
db251311 5359 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5360 (sha256
5361 (base32
db251311 5362 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5363 (build-system python-build-system)
5364 (inputs
5365 `(("python-setuptools" ,python-setuptools)))
5366 (home-page "http://pep8.readthedocs.org/")
5367 (synopsis "Python style guide checker")
5368 (description
5369 "This tools checks Python code against some of the style conventions in
5370PEP 8.")
5371 (license license:expat)))
5372
5373(define-public python2-pep8
5374 (package-with-python2 python-pep8))
e31d7f44
CR
5375
5376(define-public python-pyflakes
5377 (package
5378 (name "python-pyflakes")
2abc3972 5379 (version "1.0.0")
e31d7f44
CR
5380 (source
5381 (origin
5382 (method url-fetch)
2abc3972 5383 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5384 (sha256
5385 (base32
2abc3972 5386 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5387 (build-system python-build-system)
5388 (inputs
5389 `(("python-setuptools" ,python-setuptools)))
5390 (home-page
5391 "https://github.com/pyflakes/pyflakes")
5392 (synopsis "Passive checker of Python programs")
5393 (description
5394 "Pyflakes statically checks Python source code for common errors.")
5395 (license license:expat)))
a59e017c 5396
7261d9eb
CR
5397(define-public python2-pyflakes
5398 (package-with-python2 python-pyflakes))
5399
a59e017c
CR
5400(define-public python-mccabe
5401 (package
5402 (name "python-mccabe")
c6ebd40d 5403 (version "0.4.0")
a59e017c
CR
5404 (source
5405 (origin
5406 (method url-fetch)
c6ebd40d 5407 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5408 (sha256
5409 (base32
c6ebd40d 5410 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5411 (build-system python-build-system)
5412 (inputs
c6ebd40d
EF
5413 `(("python-pytest" ,python-pytest)
5414 ("python-pytest-runner" ,python-pytest-runner)
5415 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5416 (home-page "https://github.com/flintwork/mccabe")
5417 (synopsis "McCabe checker, plugin for flake8")
5418 (description
5419 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5420complexity of Python source code.")
7362371d 5421 (license license:expat)))
a59e017c
CR
5422
5423(define-public python2-mccabe
5424 (package-with-python2 python-mccabe))
e8df8f47 5425
7477fbb1
CR
5426(define-public python-mccabe-0.2.1
5427 (package (inherit python-mccabe)
5428 (version "0.2.1")
5429 (source
5430 (origin
5431 (method url-fetch)
5432 (uri (pypi-uri "mccabe" version))
5433 (sha256
5434 (base32
c6ebd40d 5435 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5436 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5437
5438(define-public python2-mccabe-0.2.1
5439 (package-with-python2 python-mccabe-0.2.1))
5440
e8df8f47
CR
5441;; Flake8 2.4.1 requires an older version of pep8.
5442;; This should be removed ASAP.
5443(define-public python-pep8-1.5.7
5444 (package (inherit python-pep8)
5445 (version "1.5.7")
5446 (source
5447 (origin
5448 (method url-fetch)
5449 (uri (string-append
5450 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5451 version
5452 ".tar.gz"))
5453 (sha256
5454 (base32
5455 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5456
5457(define-public python2-pep8-1.5.7
5458 (package-with-python2 python-pep8-1.5.7))
5459
5460;; Flake8 2.4.1 requires an older version of pyflakes.
5461;; This should be removed ASAP.
5462(define-public python-pyflakes-0.8.1
5463 (package (inherit python-pyflakes)
5464 (version "0.8.1")
5465 (source
5466 (origin
5467 (method url-fetch)
5468 (uri (string-append
5469 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5470 version
5471 ".tar.gz"))
5472 (sha256
5473 (base32
5474 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5475
5476(define-public python2-pyflakes-0.8.1
7261d9eb 5477 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5478
5479(define-public python-flake8
5480 (package
5481 (name "python-flake8")
43789136 5482 (version "2.5.4")
e8df8f47
CR
5483 (source
5484 (origin
5485 (method url-fetch)
1b995533 5486 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5487 (sha256
5488 (base32
43789136 5489 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5490 (build-system python-build-system)
5491 (inputs
5492 `(("python-setuptools" ,python-setuptools)
43789136
EF
5493 ("python-pep8" ,python-pep8)
5494 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5495 ("python-mccabe" ,python-mccabe)
5496 ("python-mock" ,python-mock)
5497 ("python-nose" ,python-nose)))
5498 (home-page "https://gitlab.com/pycqa/flake8")
5499 (synopsis
5500 "The modular source code checker: pep8, pyflakes and co")
5501 (description
5502 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5503 (license license:expat)))
5504
5505(define-public python2-flake8
5506 (package-with-python2 python-flake8))
61b9ac53 5507
abf21efc
CR
5508;; This will only be needed by the python-hacking package and will not be
5509;; necessary once python-hacking > 0.10.2 is released.
5510(define-public python-flake8-2.2.4
5511 (package (inherit python-flake8)
5512 (inputs
5513 `(("python-setuptools" ,python-setuptools)
5514 ("python-pep8" ,python-pep8-1.5.7)
5515 ("python-pyflakes" ,python-pyflakes-0.8.1)
5516 ("python-mccabe" ,python-mccabe-0.2.1)
5517 ("python-mock" ,python-mock)
5518 ("python-nose" ,python-nose)))
5519 (version "2.2.4")
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (pypi-uri "flake8" version))
5524 (sha256
5525 (base32
5526 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5527
5528(define-public python2-flake8-2.2.4
5529 (package-with-python2 python-flake8-2.2.4))
5530
61b9ac53
FB
5531(define-public python-mistune
5532 (package
5533 (name "python-mistune")
5534 (version "0.7")
5535 (source
5536 (origin
5537 (method url-fetch)
5538 (uri (string-append
5539 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5540 version
5541 ".tar.gz"))
5542 (sha256
5543 (base32
5544 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5545 (build-system python-build-system)
5546 (inputs
5547 `(("python-setuptools" ,python-setuptools)
5548 ("python-nose" ,python-nose)
5549 ("python-cython" ,python-cython)))
5550 (home-page "https://github.com/lepture/mistune")
5551 (synopsis "Markdown parser in pure Python")
5552 (description "This package provides a fast markdown parser in pure
5553Python.")
3f641af0 5554 (license license:bsd-3)))
61b9ac53
FB
5555
5556(define-public python2-mistune
5557 (package-with-python2 python-mistune))
6d992d07 5558
b9893908
EE
5559(define-public python-markdown
5560 (package
5561 (name "python-markdown")
5562 (version "2.6.5")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "Markdown" version))
5567 (sha256
5568 (base32
5569 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5570 (build-system python-build-system)
5571 (arguments
5572 `(#:phases
5573 (modify-phases %standard-phases
5574 (replace 'check
5575 (lambda _
5576 (zero? (system* "python" "run-tests.py")))))))
5577 (native-inputs
5578 `(("python-nose" ,python-nose)
5579 ("python-pyyaml" ,python-pyyaml)))
5580 (home-page "https://pythonhosted.org/Markdown/")
5581 (synopsis "Python implementation of Markdown")
5582 (description
5583 "This package provides a Python implementation of John Gruber's
5584Markdown. The library features international input, various Markdown
5585extensions, and several HTML output formats. A command line wrapper
5586markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5587 (license license:bsd-3)))
b9893908
EE
5588
5589(define-public python2-markdown
5590 (package-with-python2 python-markdown))
5591
6d992d07
FB
5592(define-public python-ptyprocess
5593 (package
5594 (name "python-ptyprocess")
5595 (version "0.5")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (string-append
5600 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5601 version ".tar.gz"))
5602 (sha256
5603 (base32
5604 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5605 (build-system python-build-system)
5606 (inputs
5607 `(("python-setuptools" ,python-setuptools)
5608 ("python-nose" ,python-nose)))
5609 (arguments
5610 `(#:phases
5611 (modify-phases %standard-phases
5612 (replace 'check
5613 (lambda _
5614 (zero? (system* "nosetests")))))))
5615 (home-page "https://github.com/pexpect/ptyprocess")
5616 (synopsis "Run a subprocess in a pseudo terminal")
5617 (description
5618 "This package provides a Python library used to launch a subprocess in a
5619pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5620 (license license:isc)))
6d992d07
FB
5621
5622(define-public python2-ptyprocess
5623 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5624
5625(define-public python-terminado
5626 (package
5627 (name "python-terminado")
783fb0a3 5628 (version "0.6")
4aadb1df
FB
5629 (source
5630 (origin
5631 (method url-fetch)
783fb0a3 5632 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5633 (sha256
5634 (base32
783fb0a3 5635 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5636 (build-system python-build-system)
5637 (propagated-inputs
5638 `(("python-tornado" ,python-tornado)
5639 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5640 (native-inputs
5641 `(("python-nose" ,python-nose)))
4aadb1df
FB
5642 (arguments
5643 `(#:phases
5644 (modify-phases %standard-phases
5645 (replace 'check
5646 (lambda _
5647 (zero? (system* "nosetests")))))))
5648 (home-page "https://github.com/takluyver/terminado")
5649 (synopsis "Terminals served to term.js using Tornado websockets")
5650 (description "This package provides a Tornado websocket backend for the
5651term.js Javascript terminal emulator library.")
3f641af0 5652 (license license:bsd-2)
783fb0a3 5653 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5654
5655(define-public python2-terminado
783fb0a3 5656 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5657 (package (inherit terminado)
783fb0a3
EF
5658 (propagated-inputs
5659 `(("python2-backport-ssl-match-hostname"
5660 ,python2-backport-ssl-match-hostname)
5661 ,@(package-propagated-inputs terminado)))
5662 (native-inputs
5663 `(("python2-setuptools" ,python2-setuptools)
5664 ,@(package-native-inputs terminado))))))
5faa5ce4 5665
d582eaac
SB
5666(define-public python-fonttools
5667 (package
5668 (name "python-fonttools")
5669 (version "2.5")
5670 (source (origin
5671 (method url-fetch)
5672 (uri (string-append
5673 "https://pypi.python.org/packages/source/F/FontTools/"
5674 "fonttools-" version ".tar.gz"))
5675 (sha256
5676 (base32
5677 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5678 (build-system python-build-system)
5679 (arguments '(#:test-target "check"))
5680 (propagated-inputs
5681 ;; XXX: module not found if setuptools is not available.
5682 `(("python-setuptools" ,python-setuptools)))
5683 (home-page "http://github.com/behdad/fonttools")
5684 (synopsis "Tools to manipulate font files")
5685 (description
5686 "FontTools/TTX is a library to manipulate font files from Python. It
5687supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5688of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5689also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5690from an XML-based format.")
3f641af0
DC
5691 (license (license:non-copyleft
5692 "file://LICENSE.txt"
5693 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5694
5695(define-public python2-fonttools
5696 (package-with-python2 python-fonttools))
75710da6 5697
5faa5ce4
RW
5698(define-public python-ly
5699 (package
5700 (name "python-ly")
5135354f 5701 (version "0.9.4")
5faa5ce4
RW
5702 (source
5703 (origin
5704 (method url-fetch)
5135354f
RW
5705 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5706 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5707 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5708 (sha256
5709 (base32
5135354f 5710 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5711 (build-system python-build-system)
5712 (native-inputs
5713 `(("python-setuptools" ,python-setuptools)))
5714 (synopsis "Tool and library for manipulating LilyPond files")
5715 (description "This package provides a Python library to parse, manipulate
5716or create documents in LilyPond format. A command line program ly is also
5717provided that can be used to do various manipulations with LilyPond files.")
5718 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5719 (license license:gpl2+)))
7e7b27d9
CR
5720
5721(define-public python-appdirs
5722 (package
5723 (name "python-appdirs")
5724 (version "1.4.0")
5725 (source
5726 (origin
5727 (method url-fetch)
5728 (uri (string-append
5729 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5730 version
5731 ".tar.gz"))
5732 (sha256
5733 (base32
5734 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5735 (build-system python-build-system)
5736 (inputs
5737 `(("python-setuptools" ,python-setuptools)))
5738 (home-page "http://github.com/ActiveState/appdirs")
5739 (synopsis
5740 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5741 (description
5742 "This module provides a portable way of finding out where user data
5743should be stored on various operating systems.")
5744 (license license:expat)))
5745
5746(define-public python2-appdirs
5747 (package-with-python2 python-appdirs))
89b2e0b0
LF
5748
5749(define-public python-llfuse
5750 (package
5751 (name "python-llfuse")
e36ace36 5752 (version "1.1.1")
89b2e0b0
LF
5753 (source (origin
5754 (method url-fetch)
5755 (uri (string-append
5756 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5757 "llfuse-" version ".tar.bz2"))
5758 (sha256
5759 (base32
e36ace36 5760 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5761 (build-system python-build-system)
5762 (inputs
5763 `(("fuse" ,fuse)
5764 ("attr" ,attr)))
5765 (native-inputs
5766 `(("pkg-config" ,pkg-config)
5767 ("python-setuptools" ,python-setuptools)))
5768 (synopsis "Python bindings for FUSE")
5769 (description
5770 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5771 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5772 (license license:lgpl2.0+)
cd0569c4 5773 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5774
5775(define-public python2-llfuse
cd0569c4
LF
5776 (package (inherit (package-with-python2
5777 (strip-python2-variant python-llfuse)))
5778 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5779
5780;; For attic-0.16
5781(define-public python-llfuse-0.41
5782 (package (inherit python-llfuse)
229b3661 5783 (version "0.41.1")
cd0569c4
LF
5784 (source (origin
5785 (method url-fetch)
5786 (uri (string-append
5787 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5788 "llfuse-" version ".tar.bz2"))
5789 (sha256
5790 (base32
229b3661 5791 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5792 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5793 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5794 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5795
5796(define-public python-msgpack
5797 (package
5798 (name "python-msgpack")
aed625bd 5799 (version "0.4.8")
641c9871
LF
5800 (source (origin
5801 (method url-fetch)
ae831df4 5802 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5803 (sha256
5804 (base32
aed625bd 5805 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5806 (build-system python-build-system)
641c9871
LF
5807 (synopsis "MessagePack (de)serializer")
5808 (description "MessagePack is a fast, compact binary serialization format,
5809suitable for similar data to JSON. This package provides CPython bindings for
5810reading and writing MessagePack data.")
5811 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5812 (license license:asl2.0)
bd74be7b
LF
5813 (properties `((python2-variant . ,(delay python2-msgpack))))))
5814
5815(define-public python2-msgpack
5816 (package (inherit (package-with-python2
5817 (strip-python2-variant python-msgpack)))
5818 (native-inputs
5819 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 5820
6e5e39f4
CR
5821(define-public python-netaddr
5822 (package
5823 (name "python-netaddr")
5824 (version "0.7.18")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (string-append
5829 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5830 version
5831 ".tar.gz"))
5832 (sha256
5833 (base32
5834 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5835 (build-system python-build-system)
5836 (arguments `(#:tests? #f)) ;; No tests.
5837 (inputs
5838 `(("python-setuptools" ,python-setuptools)))
5839 (home-page "https://github.com/drkjam/netaddr/")
5840 (synopsis "Pythonic manipulation of network addresses")
5841 (description
5842 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5843and MAC network addresses.")
3f641af0 5844 (license license:bsd-3)))
6e5e39f4
CR
5845
5846(define-public python2-netaddr
5847 (package-with-python2 python-netaddr))
8c692a52
CR
5848
5849(define-public python-wrapt
5850 (package
5851 (name "python-wrapt")
5852 (version "1.10.5")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (string-append
5857 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5858 version
5859 ".tar.gz"))
5860 (sha256
5861 (base32
5862 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5863 (build-system python-build-system)
5864 (arguments
5865 ;; Tests are not included in the tarball, they are only available in the
5866 ;; git repository.
5867 `(#:tests? #f))
5868 (inputs
5869 `(("python-setuptools" ,python-setuptools)))
5870 (home-page "https://github.com/GrahamDumpleton/wrapt")
5871 (synopsis "Module for decorators, wrappers and monkey patching")
5872 (description
5873 "The aim of the wrapt module is to provide a transparent object proxy for
5874 Python, which can be used as the basis for the construction of function
5875 wrappers and decorator functions.")
3f641af0 5876 (license license:bsd-2)))
8c692a52
CR
5877
5878(define-public python2-wrapt
5879 (package-with-python2 python-wrapt))
b85c85be
CR
5880
5881(define-public python-iso8601
5882 (package
5883 (name "python-iso8601")
fe84bc9a 5884 (version "0.1.11")
b85c85be
CR
5885 (source
5886 (origin
5887 (method url-fetch)
fe84bc9a 5888 (uri (pypi-uri "iso8601" version))
b85c85be 5889 (sha256
fe84bc9a
EF
5890 (base32
5891 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
5892 (build-system python-build-system)
5893 (inputs
5894 `(("python-setuptools" ,python-setuptools)))
5895 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5896 (synopsis "Module to parse ISO 8601 dates")
5897 (description
5898 "This module parses the most common forms of ISO 8601 date strings (e.g.
5899@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5900 (license license:expat)))
5901
5902(define-public python2-iso8601
5903 (package-with-python2 python-iso8601))
5e412b63
CR
5904
5905(define-public python-monotonic
5906 (package
5907 (name "python-monotonic")
5908 (version "0.3")
5909 (source
5910 (origin
5911 (method url-fetch)
5912 (uri (string-append
5913 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5914 version
5915 ".tar.gz"))
5916 (sha256
5917 (base32
5918 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5919 (build-system python-build-system)
5920 (inputs
5921 `(("python-setuptools" ,python-setuptools)))
5922 (home-page "https://github.com/atdt/monotonic")
5923 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5924 (description
5925 "This module provides a monotonic() function which returns the value (in
5926fractional seconds) of a clock which never goes backwards.")
3f641af0 5927 (license license:asl2.0)))
5e412b63
CR
5928
5929(define-public python2-monotonic
5930 (package-with-python2 python-monotonic))
de34afac
CR
5931
5932(define-public python-webob
5933 (package
5934 (name "python-webob")
b8834c21 5935 (version "1.5.1")
de34afac
CR
5936 (source
5937 (origin
5938 (method url-fetch)
b8834c21 5939 (uri (pypi-uri "WebOb" version))
de34afac
CR
5940 (sha256
5941 (base32
b8834c21 5942 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5943 (build-system python-build-system)
5944 (inputs
5945 `(("python-nose" ,python-nose)
5946 ("python-setuptools" ,python-setuptools)))
5947 (home-page "http://webob.org/")
5948 (synopsis "WSGI request and response object")
5949 (description
5950 "WebOb provides wrappers around the WSGI request environment, and an
5951object to help create WSGI responses.")
5952 (license license:expat)))
5953
5954(define-public python2-webob
5955 (package-with-python2 python-webob))
350ba0a3 5956
02a8a187
BW
5957(define-public python-xlrd
5958 (package
5959 (name "python-xlrd")
c2ad4d70 5960 (version "1.0.0")
02a8a187
BW
5961 (source (origin
5962 (method url-fetch)
e775f48e 5963 (uri (pypi-uri "xlrd" version))
02a8a187
BW
5964 (sha256
5965 (base32
c2ad4d70 5966 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
5967 (build-system python-build-system)
5968 (arguments
5969 `(#:phases
5970 (modify-phases %standard-phases
c2ad4d70 5971 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
5972 ;; run tests instead for now.
5973 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5974 (native-inputs `(("python-nose" ,python-nose)
5975 ("python-setuptools" ,python-setuptools)))
5976 (home-page "http://www.python-excel.org/")
5977 (synopsis "Library for extracting data from Excel files")
5978 (description "This packages provides a library to extract data from
c598e35c 5979spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
5980@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5981Unicode-aware. It is not intended as an end-user tool.")
3f641af0 5982 (license license:bsd-3)))
02a8a187
BW
5983
5984(define-public python2-xlrd
5985 (package-with-python2 python-xlrd))
5986
350ba0a3
CR
5987(define-public python-prettytable
5988 (package
5989 (name "python-prettytable")
5990 (version "0.7.2")
5991 (source
5992 (origin
5993 (method url-fetch)
5994 (uri (string-append
5995 "https://pypi.python.org/packages/source/P/PrettyTable/"
5996 "prettytable-" version ".tar.bz2"))
5997 (sha256
5998 (base32
5999 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6000 (build-system python-build-system)
6001 (inputs
6002 `(("python-setuptools" ,python-setuptools)))
6003 (home-page "http://code.google.com/p/prettytable/")
6004 (synopsis "Display tabular data in an ASCII table format")
6005 (description
6006 "A library designed to represent tabular data in visually appealing ASCII
6007tables. PrettyTable allows for selection of which columns are to be printed,
6008independent alignment of columns (left or right justified or centred) and
6009printing of sub-tables by specifying a row range.")
3f641af0 6010 (license license:bsd-3)))
350ba0a3
CR
6011
6012(define-public python2-prettytable
6013 (package-with-python2 python-prettytable))
7a8ac75a 6014
9f8ee3fe
RW
6015(define-public python-tables
6016 (package
6017 (name "python-tables")
6018 (version "3.2.2")
6019 (source
6020 (origin
6021 (method url-fetch)
6022 (uri (pypi-uri "tables" version))
6023 (sha256
6024 (base32
6025 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6026 (build-system python-build-system)
6027 (arguments
6028 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6029 ;; or "check", so we must override the build and check phases.
6030 #:phases
6031 (modify-phases %standard-phases
6032 (add-after 'unpack 'use-gcc
6033 (lambda _
6034 (substitute* "setup.py"
6035 (("compiler = new_compiler\\(\\)" line)
6036 (string-append line
6037 "\ncompiler.set_executables(compiler='gcc',"
6038 "compiler_so='gcc',"
6039 "linker_exe='gcc',"
6040 "linker_so='gcc -shared')")))
6041 #t))
6042 (replace 'build
6043 (lambda* (#:key inputs #:allow-other-keys)
6044 (zero? (system* "python" "setup.py" "build"
6045 (string-append "--hdf5="
6046 (assoc-ref inputs "hdf5"))))))
6047 (replace 'check
6048 (lambda* (#:key inputs #:allow-other-keys)
6049 (zero? (system* "python" "setup.py" "check"
6050 (string-append "--hdf5="
6051 (assoc-ref inputs "hdf5")))))))))
6052 (propagated-inputs
6053 `(("python-numexpr" ,python-numexpr)
6054 ("python-numpy" ,python-numpy)))
6055 (native-inputs
6056 `(("python-setuptools" ,python-setuptools)
6057 ("python-cython" ,python-cython)
6058 ("pkg-config" ,pkg-config)))
6059 (inputs
6060 `(("hdf5" ,hdf5)
6061 ("bzip2" ,bzip2)
6062 ("zlib" ,zlib)))
6063 (home-page "http://www.pytables.org/")
6064 (synopsis "Hierarchical datasets for Python")
6065 (description "PyTables is a package for managing hierarchical datasets and
6066designed to efficently cope with extremely large amounts of data.")
3f641af0 6067 (license license:bsd-3)))
9f8ee3fe
RW
6068
6069(define-public python2-tables
6070 (package-with-python2 python-tables))
6071
7a8ac75a
RW
6072(define-public python-pyasn1
6073 (package
6074 (name "python-pyasn1")
caa0edb3 6075 (version "0.1.9")
7a8ac75a
RW
6076 (source
6077 (origin
6078 (method url-fetch)
caa0edb3 6079 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6080 (sha256
6081 (base32
caa0edb3 6082 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6083 (build-system python-build-system)
6084 (home-page "http://pyasn1.sourceforge.net/")
6085 (synopsis "ASN.1 types and codecs")
6086 (description
6087 "This is an implementation of ASN.1 types and codecs in Python. It is
6088suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6089 (license license:bsd-2)))
7a8ac75a
RW
6090
6091(define-public python2-pyasn1
6092 (package-with-python2 python-pyasn1))
9a49a535 6093
5988c299
EF
6094(define-public python-pyasn1-modules
6095 (package
6096 (name "python-pyasn1-modules")
6097 (version "0.0.8")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "pyasn1-modules" version))
6102 (sha256
6103 (base32
6104 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6105 (build-system python-build-system)
6106 (native-inputs
6107 `(("python-setuptools" ,python-setuptools)))
6108 (propagated-inputs
6109 `(("python-pyasn1" ,python-pyasn1)))
6110 (home-page "http://sourceforge.net/projects/pyasn1/")
6111 (synopsis "ASN.1 codec implementations")
6112 (description
6113 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6114implementations of ASN.1-based codecs and protocols.")
3f641af0 6115 (license license:bsd-3)))
5988c299
EF
6116
6117(define-public python2-pyasn1-modules
6118 (package-with-python2 python-pyasn1-modules))
6119
520af157 6120(define-public python-ipaddress
9a49a535 6121 (package
520af157
DC
6122 (name "python-ipaddress")
6123 (version "1.0.16")
6124 (source (origin
6125 (method url-fetch)
6126 (uri (pypi-uri "ipaddress" version))
6127 (sha256
6128 (base32
6129 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6130 (build-system python-build-system)
9a49a535
RW
6131 (home-page "https://github.com/phihag/ipaddress")
6132 (synopsis "IP address manipulation library")
6133 (description
520af157
DC
6134 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6135 in Python. This library is used to create, poke at, and manipulate IPv4 and
6136 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6137 module to older versions of Python.")
6138 (license license:psfl)
6139 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6140
6141(define-public python2-ipaddress
6142 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6143 (package (inherit base)
6144 (native-inputs
6145 `(("python2-setuptools" ,python2-setuptools)
6146 ,@(package-native-inputs base))))))
3f00e078 6147
4a238186
HG
6148(define-public python2-ipaddr
6149 (package
6150 (name "python2-ipaddr")
6151 (version "2.1.11")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri (pypi-uri "ipaddr" version))
6156 (sha256
6157 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6158 (build-system python-build-system)
6159 (arguments
6160 `(#:python ,python-2 ;version 2 only
6161 #:phases
6162 (modify-phases %standard-phases
6163 (replace 'check
6164 (lambda* _
6165 (zero? (system* "python" "ipaddr_test.py")))))))
6166 (home-page "https://github.com/google/ipaddr-py")
6167 (synopsis "IP address manipulation library")
6168 (description
6169 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6170IPv6 addresses and networks.
6171
6172For new implementations you may prefer to use the standard module
6173@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6174versions of Python.")
3f641af0 6175 (license license:asl2.0)))
4a238186 6176
3f00e078
RW
6177(define-public python-idna
6178 (package
6179 (name "python-idna")
6180 (version "2.0")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (string-append "https://pypi.python.org/packages/source/i/"
6185 "idna/idna-" version ".tar.gz"))
6186 (sha256
6187 (base32
6188 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6189 (build-system python-build-system)
6190 (native-inputs
6191 `(("python-setuptools" ,python-setuptools)))
6192 (home-page "https://github.com/kjd/idna")
6193 (synopsis "Internationalized domain names in applications")
6194 (description
6195 "This is a library to support the Internationalised Domain Names in
6196Applications (IDNA) protocol as specified in RFC 5891. This version of the
6197protocol is often referred to as “IDNA2008” and can produce different results
6198from the earlier standard from 2003. The library is also intended to act as a
6199suitable drop-in replacement for the “encodings.idna” module that comes with
6200the Python standard library but currently only supports the older 2003
6201specification.")
3f641af0 6202 (license license:bsd-4)))
3f00e078
RW
6203
6204(define-public python2-idna
6205 (package-with-python2 python-idna))
36ebf972
RW
6206
6207(define-public python-pretend
6208 (package
6209 (name "python-pretend")
6210 (version "1.0.8")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (string-append "https://pypi.python.org/packages/source/p/"
6215 "pretend/pretend-" version ".tar.gz"))
6216 (sha256
6217 (base32
6218 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6219 (build-system python-build-system)
6220 (native-inputs
6221 `(("python-setuptools" ,python-setuptools)))
6222 (home-page "https://github.com/alex/pretend")
6223 (synopsis "Library for stubbing in Python")
6224 (description
6225 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6226technique for writing tests. You may hear the term mixed up with mocks,
6227fakes, or doubles. Basically, a stub is an object that returns pre-canned
6228responses, rather than doing any computation.")
3f641af0 6229 (license license:bsd-3)))
36ebf972
RW
6230
6231(define-public python2-pretend
6232 (package-with-python2 python-pretend))
aa759a51
RW
6233
6234(define-public python-cryptography-vectors
6235 (package
6236 (name "python-cryptography-vectors")
9c509ca9 6237 (version "1.3.4")
aa759a51
RW
6238 (source
6239 (origin
6240 (method url-fetch)
9c509ca9 6241 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6242 (sha256
6243 (base32
9c509ca9 6244 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
6245 (build-system python-build-system)
6246 (native-inputs
6247 `(("python-setuptools" ,python-setuptools)))
6248 (home-page "https://github.com/pyca/cryptography")
66e07664 6249 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6250 (description
6251 "This package contains test vectors for the cryptography package.")
6252 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6253 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6254
6255(define-public python2-cryptography-vectors
6256 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6257
6258(define-public python-cryptography
6259 (package
6260 (name "python-cryptography")
9c509ca9 6261 (version "1.3.4")
88b47cb0
RW
6262 (source
6263 (origin
6264 (method url-fetch)
9c509ca9 6265 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6266 (sha256
6267 (base32
9c509ca9 6268 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0
RW
6269 (build-system python-build-system)
6270 (inputs
6271 `(("openssl" ,openssl)))
6272 (propagated-inputs
6273 `(("python-cffi" ,python-cffi)
6274 ("python-six" ,python-six)
6275 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6276 ("python-idna" ,python-idna)
6277 ("python-iso8601" ,python-iso8601)))
6278 (native-inputs
6279 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6280 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6281 ("python-setuptools" ,python-setuptools)
6282 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6283 ("python-pyasn1" ,python-pyasn1)
6284 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6285 ("python-pytest" ,python-pytest)))
6286 (home-page "https://github.com/pyca/cryptography")
6287 (synopsis "Cryptographic recipes and primitives for Python")
6288 (description
6289 "cryptography is a package which provides cryptographic recipes and
6290primitives to Python developers. It aims to be the “cryptographic standard
6291library” for Python. The package includes both high level recipes, and low
6292level interfaces to common cryptographic algorithms such as symmetric ciphers,
6293message digests and key derivation functions.")
6294 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6295 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6296 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6297
6298(define-public python2-cryptography
519e2f4f
LF
6299 (let ((crypto (package-with-python2
6300 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6301 (package (inherit crypto)
6302 (propagated-inputs
6303 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6304 ("python2-backport-ssl-match-hostname"
6305 ,python2-backport-ssl-match-hostname)
68f1cdec 6306 ("python2-enum34" ,python2-enum34)
88b47cb0 6307 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6308
6309(define-public python-pyopenssl
6310 (package
6311 (name "python-pyopenssl")
eb68d268 6312 (version "16.1.0")
5af999b8
RW
6313 (source
6314 (origin
6315 (method url-fetch)
eb68d268 6316 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6317 (sha256
6318 (base32
eb68d268 6319 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6320 (build-system python-build-system)
5af999b8
RW
6321 (propagated-inputs
6322 `(("python-cryptography" ,python-cryptography)
6323 ("python-six" ,python-six)))
6324 (inputs
6325 `(("openssl" ,openssl)))
6326 (native-inputs
6327 `(("python-setuptools" ,python-setuptools)))
6328 (home-page "https://github.com/pyca/pyopenssl")
6329 (synopsis "Python wrapper module around the OpenSSL library")
6330 (description
6331 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6332library.")
3f641af0 6333 (license license:asl2.0)))
5af999b8
RW
6334
6335(define-public python2-pyopenssl
519e2f4f 6336 (package-with-python2 python-pyopenssl))
643725a1
CR
6337
6338(define-public python-pip
6339 (package
6340 (name "python-pip")
6fb54e3b 6341 (version "8.0.2")
643725a1
CR
6342 (source
6343 (origin
6344 (method url-fetch)
6fb54e3b 6345 (uri (pypi-uri "pip" version))
643725a1
CR
6346 (sha256
6347 (base32
6fb54e3b 6348 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6349 (build-system python-build-system)
6350 (inputs
6351 `(("python-setuptools" ,python-setuptools)
6352 ("python-virtualenv" ,python-virtualenv)
6353 ;; Tests
6354 ("python-mock" ,python-mock)
6355 ("python-pytest" ,python-pytest)
6356 ("python-scripttest" ,python-scripttest)))
6357 (home-page "https://pip.pypa.io/")
6358 (synopsis
6359 "Package manager for Python software")
6360 (description
6361 "Pip is a package manager for Python software, that finds packages on the
6362Python Package Index (PyPI).")
6363 (license license:expat)))
6364
6365(define-public python2-pip
6366 (package-with-python2 python-pip))
d8c4998f
LC
6367
6368(define-public python-tlsh
6369 (package
6370 (name "python-tlsh")
99b00dc7 6371 (version "3.4.4")
d8c4998f
LC
6372 (home-page "https://github.com/trendmicro/tlsh")
6373 (source (origin
99b00dc7
EF
6374 (method url-fetch)
6375 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6376 version ".tar.gz"))
d8c4998f
LC
6377 (sha256
6378 (base32
99b00dc7
EF
6379 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6380 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6381 (build-system cmake-build-system)
6382 (arguments
6383 '(#:out-of-source? #f
6384 #:phases (modify-phases %standard-phases
6385 (replace
6386 'install
6387 (lambda* (#:key outputs #:allow-other-keys)
6388 ;; Build and install the Python bindings. The underlying
6389 ;; C++ library is apparently not meant to be installed.
6390 (let ((out (assoc-ref outputs "out")))
6391 (with-directory-excursion "py_ext"
6392 (and (system* "python" "setup.py" "build")
6393 (system* "python" "setup.py" "install"
6394 (string-append "--prefix=" out))))))))))
6395 (inputs `(("python" ,python-wrapper))) ;for the bindings
6396 (synopsis "Fuzzy matching library for Python")
6397 (description
6398 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6399Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6400value which can be used for similarity comparisons. Similar objects have
6401similar hash values, which allows for the detection of similar objects by
6402comparing their hash values. The byte stream should have a sufficient amount
6403of complexity; for example, a byte stream of identical bytes will not generate
6404a hash value.")
3f641af0 6405 (license license:asl2.0)))
d8c4998f
LC
6406
6407(define-public python2-tlsh
6408 (package
6409 (inherit python-tlsh)
6410 (name "python2-tlsh")
6411 (inputs `(("python" ,python-2)))))
d96034ed 6412
67f66812
BW
6413(define-public python-termcolor
6414 (package
6415 (name "python-termcolor")
6416 (version "1.1.0")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "python-termcolor" version))
6421 (sha256
6422 (base32
6423 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6424 (build-system python-build-system)
6425 (arguments
6426 ;; There are no tests.
6427 `(#:tests? #f))
6428 (home-page "http://pypi.python.org/pypi/termcolor")
6429 (synopsis "ANSII Color formatting for terminal output")
6430 (description
6431 "This package provides ANSII Color formatting for output in terminals.")
6432 (license license:expat)))
6433
6434(define-public python2-termcolor
6435 (package-with-python2 python-termcolor))
6436
d96034ed
LC
6437(define-public python-libarchive-c
6438 (package
6439 (name "python-libarchive-c")
03fd001c 6440 (version "2.2")
d96034ed
LC
6441 (source (origin
6442 (method url-fetch)
03fd001c 6443 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6444 (sha256
6445 (base32
03fd001c 6446 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6447 (build-system python-build-system)
6448 (arguments
6449 '(#:phases (modify-phases %standard-phases
6450 (add-before
6451 'build 'reference-libarchive
6452 (lambda* (#:key inputs #:allow-other-keys)
6453 ;; Retain the absolute file name of libarchive.so.
6454 (let ((libarchive (assoc-ref inputs "libarchive")))
6455 (substitute* "libarchive/ffi.py"
6456 (("find_library\\('archive'\\)")
6457 (string-append "'" libarchive
6458 "/lib/libarchive.so'"))))
6459
6460 ;; Do not make a compressed egg (see
6461 ;; <http://bugs.gnu.org/20765>).
6462 (let ((port (open-file "setup.cfg" "a")))
6463 (display "\n[easy_install]\nzip_ok = 0\n"
6464 port)
6465 (close-port port)
6466 #t))))))
6467 (inputs
6468 `(("python-setuptools" ,python-setuptools)
6469 ("libarchive" ,libarchive)))
6470 (home-page "https://github.com/Changaco/python-libarchive-c")
6471 (synopsis "Python interface to libarchive")
6472 (description
6473 "This package provides Python bindings to libarchive, a C library to
6474access possibly compressed archives in many different formats. It uses
6475Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6476 (license license:lgpl2.0+)))
d96034ed
LC
6477
6478(define-public python2-libarchive-c
6479 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6480
6481(define-public python-file
6482 (package
6483 (inherit file)
6484 (name "python-file")
6485 (build-system python-build-system)
6486 (arguments
6487 '(#:tests? #f ;no tests
6488 #:phases (modify-phases %standard-phases
6489 (add-before 'build 'change-directory
6490 (lambda _
6491 (chdir "python")
6492 #t))
6493 (add-before 'build 'set-library-file-name
6494 (lambda* (#:key inputs #:allow-other-keys)
6495 (let ((file (assoc-ref inputs "file")))
6496 (substitute* "magic.py"
6497 (("find_library\\('magic'\\)")
6498 (string-append "'" file "/lib/libmagic.so'")))
6499 #t))))))
6500 (inputs `(("file" ,file)))
6501 (self-native-input? #f)
daeeea71
CM
6502 (synopsis "Python bindings to the libmagic file type guesser. Note that
6503this module and the python-magic module both provide a \"magic.py\" file;
6504these two modules, which are different and were developed separately, both
6505serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6506
6507(define-public python2-file
6508 (package-with-python2 python-file))
85d4aeac
LC
6509
6510(define-public python-debian
6511 (package
6512 (name "python-debian")
6513 (version "0.1.23")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (string-append
6518 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6519 version ".tar.gz"))
6520 (sha256
6521 (base32
6522 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6523 (build-system python-build-system)
6524 (inputs
6525 `(("python-six" ,python-six)))
6526 (native-inputs
6527 `(("python-setuptools" ,python-setuptools)))
6528 (home-page "http://packages.debian.org/sid/python-debian")
6529 (synopsis "Debian package related modules")
6530 (description
5c7bdc9a
LC
6531 ;; XXX: Use @enumerate instead of @itemize to work around
6532 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6533 "This package provides Python modules that abstract many formats of
6534Debian-related files, such as:
6535
5c7bdc9a 6536@enumerate
85d4aeac
LC
6537@item Debtags information;
6538@item @file{debian/changelog} files;
6539@item packages files, pdiffs;
6540@item control files of single or multiple RFC822-style paragraphs---e.g.
6541 @file{debian/control}, @file{.changes}, @file{.dsc};
6542@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6543 contained files and meta-information.
5c7bdc9a 6544@end enumerate\n")
85d4aeac
LC
6545
6546 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6547 (license license:gpl3+)))
85d4aeac
LC
6548
6549(define-public python2-debian
6550 (package-with-python2 python-debian))
816a6538
LC
6551
6552(define-public python-chardet
6553 (package
6554 (name "python-chardet")
6555 (version "2.3.0")
6556 (source
6557 (origin
6558 (method url-fetch)
6559 (uri (string-append
6560 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6561 version
6562 ".tar.gz"))
6563 (sha256
6564 (base32
6565 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6566 (build-system python-build-system)
6567 (native-inputs
6568 `(("python-setuptools" ,python-setuptools)))
6569 (home-page "https://github.com/chardet/chardet")
6570 (synopsis "Universal encoding detector for Python 2 and 3")
6571 (description
6572 "This package provides @code{chardet}, a Python module that can
6573automatically detect a wide range of file encodings.")
3f641af0 6574 (license license:lgpl2.1+)))
816a6538
LC
6575
6576(define-public python2-chardet
6577 (package-with-python2 python-chardet))
2fc5f186 6578
1872f1bb
KM
6579(define-public python-docopt
6580 (package
6581 (name "python-docopt")
6582 (version "0.6.2")
6583 (source
6584 (origin
6585 (method url-fetch)
6586 ;; The release on PyPI does not include tests.
6587 (uri (string-append
6588 "https://github.com/docopt/docopt/archive/"
6589 version ".tar.gz"))
6590 (file-name (string-append name "-" version ".tar.gz"))
6591 (sha256
6592 (base32
6593 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6594 (build-system python-build-system)
6595 (native-inputs
6596 `(("python-pytest" ,python-pytest)
6597 ("python-setuptools" ,python-setuptools)))
6598 (arguments
6599 `(#:phases (alist-replace
6600 'check
6601 (lambda _ (zero? (system* "py.test")))
6602 %standard-phases)))
6603 (home-page "http://docopt.org")
6604 (synopsis "Command-line interface description language for Python")
6605 (description "This library allows the user to define a command-line
6606interface from a program's help message rather than specifying it
6607programatically with command-line parsers like @code{getopt} and
6608@code{argparse}.")
6609 (license license:expat)))
6610
6611(define-public python2-docopt
6612 (package-with-python2 python-docopt))
6613
2fc5f186
LF
6614(define-public python-zope-event
6615 (package
6616 (name "python-zope-event")
6617 (version "4.1.0")
6618 (source
6619 (origin
6620 (method url-fetch)
6621 (uri (string-append "https://pypi.python.org/packages/source/z"
6622 "/zope.event/zope.event-" version ".tar.gz"))
6623 (sha256
6624 (base32
6625 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6626 (build-system python-build-system)
6627 (inputs
6628 `(("python-setuptools" ,python-setuptools)))
6629 (home-page "http://pypi.python.org/pypi/zope.event")
6630 (synopsis "Event publishing system for Python")
6631 (description "Zope.event provides an event publishing API, intended for
6632use by applications which are unaware of any subscribers to their events. It
6633is a simple event-dispatching system on which more sophisticated event
6634dispatching systems can be built.")
3f641af0 6635 (license license:zpl2.1)))
2fc5f186
LF
6636
6637(define-public python2-zope-event
6638 (package-with-python2 python-zope-event))
97abe268
LF
6639
6640(define-public python-zope-interface
6641 (package
6642 (name "python-zope-interface")
6643 (version "4.1.3")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (string-append "https://pypi.python.org/packages/source/z"
6648 "/zope.interface/zope.interface-" version ".tar.gz"))
6649 (sha256
6650 (base32
6651 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6652 (build-system python-build-system)
6653 (propagated-inputs
6654 `(("python-zope-event" ,python-zope-event)))
6655 (home-page "https://github.com/zopefoundation/zope.interface")
6656 (synopsis "Python implementation of the \"design by contract\"
6657methodology")
6658 (description "Zope.interface provides an implementation of \"object
6659interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6660conforming to a given API or contract.")
3f641af0 6661 (license license:zpl2.1)))
97abe268
LF
6662
6663(define-public python2-zope-interface
6664 (package-with-python2 python-zope-interface))
81f2373c
LF
6665
6666(define-public python-zope-exceptions
6667 (package
6668 (name "python-zope-exceptions")
6669 (version "4.0.8")
6670 (source
6671 (origin
6672 (method url-fetch)
6673 (uri (string-append "https://pypi.python.org/packages/source/z"
6674 "/zope.exceptions/zope.exceptions-"
6675 version ".tar.gz"))
6676 (sha256
6677 (base32
6678 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6679 (build-system python-build-system)
6680 (arguments
6681 '(#:tests? #f)) ; circular dependency with zope.testrunner
6682 (propagated-inputs
6683 `(("python-zope-interface" ,python-zope-interface)))
6684 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6685 (synopsis "Zope exceptions")
6686 (description "Zope.exceptions provides general-purpose exception types
6687that have uses outside of the Zope framework.")
3f641af0 6688 (license license:zpl2.1)))
81f2373c
LF
6689
6690(define-public python2-zope-exceptions
6691 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6692
6693(define-public python-zope-testing
6694 (package
6695 (name "python-zope-testing")
6696 (version "4.5.0")
6697 (source
6698 (origin
6699 (method url-fetch)
6700 (uri (string-append "https://pypi.python.org/packages/source/z"
6701 "/zope.testing/zope.testing-" version ".tar.gz"))
6702 (sha256
6703 (base32
b02f7a21
HG
6704 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
6705 (modules '((guix build utils)))
6706 (snippet
6707 '(begin
6708 ;; Remove pre-compiled .pyc files backup files from source.
6709 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
6710 #t))))
900e3c0e
LF
6711 (build-system python-build-system)
6712 (native-inputs
6713 `(("python-zope-exceptions" ,python-zope-exceptions)))
6714 (propagated-inputs
6715 `(("python-zope-interface" ,python-zope-interface)))
6716 (home-page "http://pypi.python.org/pypi/zope.testing")
6717 (synopsis "Zope testing helpers")
6718 (description "Zope.testing provides a number of testing utilities for HTML
6719forms, HTTP servers, regular expressions, and more.")
3f641af0 6720 (license license:zpl2.1)))
900e3c0e
LF
6721
6722(define-public python2-zope-testing
6723 (package-with-python2 python-zope-testing))
01614c4f
LF
6724
6725(define-public python-zope-testrunner
6726 (package
6727 (name "python-zope-testrunner")
6728 (version "4.4.9")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (string-append "https://pypi.python.org/packages/source/z"
6733 "/zope.testrunner/zope.testrunner-"
6734 version ".zip"))
6735 (sha256
6736 (base32
6737 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6738 (build-system python-build-system)
6739 (native-inputs
6740 `(("python-six" ,python-six)
6741 ("python-zope-exceptions" ,python-zope-exceptions)
6742 ("python-zope-testing" ,python-zope-testing)
6743 ("unzip" ,unzip)))
6744 (propagated-inputs
6745 `(("python-zope-interface" ,python-zope-interface)))
6746 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6747 (synopsis "Zope testrunner script")
6748 (description "Zope.testrunner provides a script for running Python
6749tests.")
3f641af0 6750 (license license:zpl2.1)))
01614c4f
LF
6751
6752(define-public python2-zope-testrunner
6753 (let ((base (package-with-python2 python-zope-testrunner)))
6754 (package
6755 (inherit base)
6756 (native-inputs
6757 (append (package-native-inputs base)
6758 `(("python2-subunit" ,python2-subunit)
6759 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6760
6761(define-public python-zope-i18nmessageid
6762 (package
6763 (name "python-zope-i18nmessageid")
6764 (version "4.0.3")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (string-append
6769 "https://pypi.python.org/packages/source/z"
6770 "/zope.i18nmessageid/zope.i18nmessageid-"
6771 version ".tar.gz"))
6772 (sha256
6773 (base32
6774 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6775 (build-system python-build-system)
6776 (inputs
6777 `(("python-setuptools" ,python-setuptools)))
6778 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6779 (synopsis "Message identifiers for internationalization")
6780 (description "Zope.i18nmessageid provides facilities for declaring
6781internationalized messages within program source text.")
3f641af0 6782 (license license:zpl2.1)))
6a5c710c
LF
6783
6784(define-public python2-zope-i18nmessageid
6785 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6786
6787(define-public python-zope-schema
6788 (package
6789 (name "python-zope-schema")
6790 (version "4.4.2")
6791 (source
6792 (origin
6793 (method url-fetch)
6794 (uri (string-append "https://pypi.python.org/packages/source/z"
6795 "/zope.schema/zope.schema-" version ".tar.gz"))
6796 (sha256
6797 (base32
6798 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6799 (build-system python-build-system)
6800 (propagated-inputs
6801 `(("python-zope-event" ,python-zope-event)
6802 ("python-zope-interface" ,python-zope-interface)))
6803 (native-inputs
6804 `(("python-zope-testing" ,python-zope-testing)))
6805 (home-page "http://pypi.python.org/pypi/zope.schema")
6806 (synopsis "Zope data schemas")
6807 (description "Zope.scheme provides extensions to zope.interface for
6808defining data schemas.")
3f641af0 6809 (license license:zpl2.1)))
71fb09f3
LF
6810
6811(define-public python2-zope-schema
6812 (package-with-python2 python-zope-schema))
fbac9b17
LF
6813
6814(define-public python-zope-configuration
6815 (package
6816 (name "python-zope-configuration")
6817 (version "4.0.3")
6818 (source (origin
6819 (method url-fetch)
6820 (uri (string-append "https://pypi.python.org/packages/source/z"
6821 "/zope.configuration/zope.configuration-"
6822 version ".tar.gz"))
6823 (sha256
6824 (base32
6825 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6826 (build-system python-build-system)
6827 (propagated-inputs
6828 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6829 ("python-zope-schema" ,python-zope-schema)))
6830 (home-page "http://pypi.python.org/pypi/zope.configuration")
6831 (synopsis "Zope Configuration Markup Language")
6832 (description "Zope.configuration implements ZCML, the Zope Configuration
6833Markup Language.")
3f641af0 6834 (license license:zpl2.1)))
fbac9b17
LF
6835
6836(define-public python2-zope-configuration
6837 (package-with-python2 python-zope-configuration))
2ad52086
LF
6838
6839(define-public python-zope-proxy
6840 (package
6841 (name "python-zope-proxy")
6842 (version "4.1.6")
6843 (source
6844 (origin
6845 (method url-fetch)
6846 (uri (string-append "https://pypi.python.org/packages/source/z"
6847 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6848 (sha256
6849 (base32
6850 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6851 (build-system python-build-system)
6852 (propagated-inputs
6853 `(("python-zope-interface" ,python-zope-interface)))
6854 (home-page "http://pypi.python.org/pypi/zope.proxy")
6855 (synopsis "Generic, transparent proxies")
6856 (description "Zope.proxy provides generic, transparent proxies for Python.
6857Proxies are special objects which serve as mostly-transparent wrappers around
6858another object, intervening in the apparent behavior of the wrapped object
6859only when necessary to apply the policy (e.g., access checking, location
6860brokering, etc.) for which the proxy is responsible.")
3f641af0 6861 (license license:zpl2.1)))
2ad52086
LF
6862
6863(define-public python2-zope-proxy
6864 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6865
6866(define-public python-zope-location
6867 (package
6868 (name "python-zope-location")
6869 (version "4.0.3")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (string-append "https://pypi.python.org/packages/source/z"
6874 "/zope.location/zope.location-" version ".tar.gz"))
6875 (sha256
6876 (base32
6877 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6878 (build-system python-build-system)
6879 (native-inputs
6880 `(("python-zope-proxy" ,python-zope-proxy)
6881 ("python-zope-schema" ,python-zope-schema)))
6882 (home-page "http://pypi.python.org/pypi/zope.location/")
6883 (synopsis "Zope location library")
6884 (description "Zope.location implements the concept of \"locations\" in
6885Zope3, which are are special objects that have a structural location.")
3f641af0 6886 (license license:zpl2.1)))
f404b5ea
LF
6887
6888(define-public python2-zope-location
6889 (package-with-python2 python-zope-location))
d4b77f36
LF
6890
6891(define-public python-zope-security
6892 (package
6893 (name "python-zope-security")
6894 (version "4.0.3")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (string-append "https://pypi.python.org/packages/source/z"
6899 "/zope.security/zope.security-" version ".tar.gz"))
6900 (sha256
6901 (base32
6902 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6903 (build-system python-build-system)
6904 (propagated-inputs
6905 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6906 ("python-zope-component" ,python-zope-component)
6907 ("python-zope-location" ,python-zope-location)
6908 ("python-zope-proxy" ,python-zope-proxy)
6909 ("python-zope-schema" ,python-zope-schema)
6910 ("python-zope-testrunner" ,python-zope-testrunner)
6911 ("python-zope-testing" ,python-zope-testing)))
6912 (home-page "http://pypi.python.org/pypi/zope.security")
6913 (synopsis "Zope security framework")
6914 (description "Zope.security provides a generic mechanism to implement
6915security policies on Python objects.")
3f641af0 6916 (license license:zpl2.1)))
d4b77f36
LF
6917
6918(define-public python2-zope-security
04417662
EF
6919 (let ((zope-security (package-with-python2 python-zope-security)))
6920 (package (inherit zope-security)
6921 (propagated-inputs
6922 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6923 ,@(alist-delete
6924 "python-zope-testrunner"
6925 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6926
6927(define-public python-zope-component
6928 (package
6929 (name "python-zope-component")
6930 (version "4.2.2")
6931 (source
6932 (origin
6933 (method url-fetch)
6934 (uri (string-append "https://pypi.python.org/packages/source/z"
6935 "/zope.component/zope.component-" version ".tar.gz"))
6936 (sha256
6937 (base32
6938 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6939 (build-system python-build-system)
6940 (arguments
6941 ;; Skip tests due to circular dependency with python-zope-security.
6942 '(#:tests? #f))
6943 (native-inputs
6944 `(("python-zope-testing" ,python-zope-testing)))
6945 (propagated-inputs
6946 `(("python-zope-event" ,python-zope-event)
6947 ("python-zope-interface" ,python-zope-interface)
6948 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6949 ("python-zope-configuration" ,python-zope-configuration)))
6950 (home-page "https://github.com/zopefoundation/zope.component")
6951 (synopsis "Zope Component Architecture")
6952 (description "Zope.component represents the core of the Zope Component
6953Architecture. Together with the zope.interface package, it provides
6954facilities for defining, registering and looking up components.")
3f641af0 6955 (license license:zpl2.1)))
a6b61b27
LF
6956
6957(define-public python2-zope-component
6958 (package-with-python2 python-zope-component))
3859ac12 6959
1ae44b80 6960(define-public python-pythondialog
b5f218be 6961 (package
1ae44b80 6962 (name "python-pythondialog")
42c4b246 6963 (version "3.4.0")
b5f218be
LF
6964 (source
6965 (origin
6966 (method url-fetch)
1ae44b80 6967 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
6968 (sha256
6969 (base32
1ae44b80 6970 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
6971 (build-system python-build-system)
6972 (arguments
6973 `(#:phases
6974 (modify-phases %standard-phases
6975 (add-after 'unpack 'patch-path
6976 (lambda* (#:key inputs #:allow-other-keys)
6977 (let* ((dialog (assoc-ref inputs "dialog")))
6978 ;; Since this library really wants to grovel the search path, we
6979 ;; must hardcode dialog's store path into it.
6980 (substitute* "dialog.py"
6981 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6982 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6983 #t))))
b5f218be
LF
6984 #:tests? #f)) ; no test suite
6985 (propagated-inputs
6986 `(("dialog" ,dialog)))
6987 (home-page "http://pythondialog.sourceforge.net/")
6988 (synopsis "Python interface to the UNIX dialog utility")
6989 (description "A Python wrapper for the dialog utility. Its purpose is to
6990provide an easy to use, pythonic and comprehensive Python interface to dialog.
6991This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 6992 (license license:lgpl2.1)
1ae44b80
LF
6993 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6994
6995(define-public python2-pythondialog
6996 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6997 (package
6998 (inherit base)
6999 (version (package-version python-pythondialog))
7000 (source (origin
7001 (method url-fetch)
7002 (uri (pypi-uri "python2-pythondialog" version))
7003 (sha256
7004 (base32
7005 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7006
3859ac12
LF
7007(define-public python-pyrfc3339
7008 (package
7009 (name "python-pyrfc3339")
d9aa097b 7010 (version "1.0")
3859ac12
LF
7011 (source
7012 (origin
7013 (method url-fetch)
d9aa097b 7014 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7015 (sha256
7016 (base32
d9aa097b 7017 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7018 (build-system python-build-system)
7019 (propagated-inputs
7020 `(("python-pytz" ,python-pytz)))
7021 (native-inputs
7022 `(("python-nose" ,python-nose)
7023 ("python-setuptools" ,python-setuptools)))
7024 (home-page "https://github.com/kurtraschke/pyRFC3339")
7025 (synopsis "Python timestamp library")
7026 (description "Python library for generating and parsing RFC 3339-compliant
7027timestamps.")
7028 (license license:expat)))
7029
7030(define-public python2-pyrfc3339
7031 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7032
7033(define-public python-werkzeug
7034 (package
7035 (name "python-werkzeug")
0580e383 7036 (version "0.11.11")
5eea2005
LF
7037 (source
7038 (origin
7039 (method url-fetch)
4b47cbfa 7040 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7041 (sha256
7042 (base32
0580e383 7043 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7044 (build-system python-build-system)
7045 (native-inputs
7046 `(("python-pytest" ,python-pytest)))
7047 (home-page "http://werkzeug.pocoo.org/")
7048 (synopsis "Utilities for WSGI applications")
7049 (description "One of the most advanced WSGI utility modules. It includes a
7050powerful debugger, full-featured request and response objects, HTTP utilities to
7051handle entity tags, cache control headers, HTTP dates, cookie handling, file
7052uploads, a powerful URL routing system and a bunch of community-contributed
7053addon modules.")
3f641af0 7054 (license license:x11)))
5eea2005
LF
7055
7056(define-public python2-werkzeug
7057 (package-with-python2 python-werkzeug))
99fffa8a
LF
7058
7059(define-public python-configobj
7060 (package
7061 (name "python-configobj")
7062 (version "5.0.6")
7063 (source (origin
7064 (method url-fetch)
7065 (uri (string-append
7066 "https://pypi.python.org/packages/source/c/configobj/"
7067 "configobj-" version ".tar.gz"))
7068 (sha256
7069 (base32
7070 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7071 ;; Patch setup.py so it looks for python-setuptools, which is
7072 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7073 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7074 (build-system python-build-system)
7075 (native-inputs
7076 `(("python-setuptools" ,python-setuptools)
7077 ("python-six" ,python-six)))
7078 (synopsis "Config file reading, writing and validation")
7079 (description "ConfigObj is a simple but powerful config file reader and
7080writer: an ini file round tripper. Its main feature is that it is very easy to
7081use, with a straightforward programmer’s interface and a simple syntax for
7082config files.")
7083 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7084 (license license:bsd-3)))
99fffa8a
LF
7085
7086(define-public python2-configobj
7087 (package-with-python2 python-configobj))
79e8a291
LF
7088
7089(define-public python-configargparse
7090 (package
7091 (name "python-configargparse")
7092 (version "0.10.0")
7093 (source (origin
7094 (method url-fetch)
7095 (uri (string-append
7096 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7097 "ConfigArgParse-" version ".tar.gz"))
7098 (sha256
7099 (base32
7100 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7101 (build-system python-build-system)
7102 (arguments
7103 ;; FIXME: Bug in test suite filed upstream:
7104 ;; https://github.com/bw2/ConfigArgParse/issues/32
7105 '(#:tests? #f))
7106 (synopsis "Replacement for argparse")
7107 (description "A drop-in replacement for argparse that allows options to also
7108be set via config files and/or environment variables.")
7109 (home-page "https://github.com/bw2/ConfigArgParse")
7110 (license license:expat)))
7111
7112(define-public python2-configargparse
7113 (package-with-python2 python-configargparse))
ab41f979
LF
7114
7115(define-public python-ndg-httpsclient
7116 (package
7117 (name "python-ndg-httpsclient")
7118 (version "0.4.0")
7119 (source (origin
7120 (method url-fetch)
7121 (uri (string-append
7122 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7123 "ndg_httpsclient-" version ".tar.gz"))
7124 (sha256
7125 (base32
7126 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7127 (build-system python-build-system)
7128 (propagated-inputs
7129 `(("python-pyopenssl" ,python-pyopenssl)))
7130 (synopsis "HTTPS support for Python's httplib and urllib2")
7131 (description "This is a HTTPS client implementation for httplib and urllib2
7132based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7133over the default provided with Python and importantly enables full verification
7134of the SSL peer.")
7135 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7136 (license license:bsd-3)))
ab41f979
LF
7137
7138;; python2-openssl requires special care, so package-with-python2 is
7139;; insufficient.
7140(define-public python2-ndg-httpsclient
7141 (package (inherit python-ndg-httpsclient)
7142 (name "python2-ndg-httpsclient")
7143 (arguments `(#:python ,python-2))
7144 (propagated-inputs
7145 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7146
7147(define-public python-contextlib2
7148 (package
7149 (name "python-contextlib2")
7150 (version "0.4.0")
7151 (source
7152 (origin
7153 (method url-fetch)
7154 (uri (pypi-uri "contextlib2" version))
7155 (sha256
7156 (base32
7157 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7158 (build-system python-build-system)
7159 (arguments
7160 `(#:phases
7161 (modify-phases %standard-phases
7162 (replace 'check
7163 (lambda _ (zero?
7164 (system*
b3546174 7165 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7166 (home-page "http://contextlib2.readthedocs.org/")
7167 (synopsis "Tools for decorators and context managers")
7168 (description "This module is primarily a backport of the Python
71693.2 contextlib to earlier Python versions. Like contextlib, it
7170provides utilities for common tasks involving decorators and context
7171managers. It also contains additional features that are not part of
7172the standard library.")
3f641af0 7173 (license license:psfl)))
03f964a5
CM
7174
7175(define-public python2-contextlib2
7176 (package-with-python2 python-contextlib2))
210bf497
DT
7177
7178(define-public python-texttable
7179 (package
7180 (name "python-texttable")
7181 (version "0.8.4")
7182 (source
7183 (origin
7184 (method url-fetch)
7185 (uri (pypi-uri "texttable" version))
7186 (sha256
7187 (base32
7188 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7189 (build-system python-build-system)
7190 (arguments '(#:tests? #f)) ; no tests
7191 (home-page "https://github.com/foutaise/texttable/")
7192 (synopsis "Python module for creating simple ASCII tables")
7193 (description "Texttable is a Python module for creating simple ASCII
7194tables.")
3f641af0 7195 (license license:lgpl2.1+)))
210bf497
DT
7196
7197(define-public python2-texttable
7198 (package-with-python2 python-texttable))
67c52bb3
DT
7199
7200(define-public python-websocket-client
7201 (package
7202 (name "python-websocket-client")
6b810897 7203 (version "0.37.0")
67c52bb3
DT
7204 (source
7205 (origin
7206 (method url-fetch)
6b810897 7207 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7208 (sha256
7209 (base32
6b810897 7210 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7211 (build-system python-build-system)
7212 (native-inputs
7213 `(("python-six" ,python-six))) ; for tests
7214 (inputs
7215 `(("python-setuptools" ,python-setuptools)))
7216 (home-page "https://github.com/liris/websocket-client")
7217 (synopsis "WebSocket client for Python")
7218 (description "The Websocket-client module provides the low level APIs for
7219WebSocket usage in Python programs.")
3f641af0 7220 (license license:lgpl2.1+)))
67c52bb3
DT
7221
7222(define-public python2-websocket-client
7223 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7224
7225(define-public python-atomicwrites
7226 (package
7227 (name "python-atomicwrites")
4e92d76a 7228 (version "1.1.0")
5c6eea2a
LF
7229 (source (origin
7230 (method url-fetch)
7231 (uri (pypi-uri "atomicwrites" version))
7232 (sha256
7233 (base32
4e92d76a 7234 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7235 (build-system python-build-system)
7236 (synopsis "Atomic file writes in Python")
7237 (description "Library for atomic file writes using platform dependent tools
8f65585b 7238for atomic file system operations.")
5c6eea2a 7239 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7240 (license license:expat)
7241 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7242
7243(define-public python2-atomicwrites
7244 (package (inherit (package-with-python2
7245 (strip-python2-variant python-atomicwrites)))
7246 (native-inputs
7247 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7248
7249(define-public python-requests-toolbelt
7250 (package
7251 (name "python-requests-toolbelt")
c02af1c8 7252 (version "0.6.2")
561bb3cb
LF
7253 (source (origin
7254 (method url-fetch)
c02af1c8
LF
7255 (uri (string-append
7256 "https://pypi.python.org/packages/"
7257 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7258 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7259 (sha256
7260 (base32
c02af1c8 7261 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
7262 (build-system python-build-system)
7263 (propagated-inputs
7264 `(("python-requests" ,python-requests)))
7265 (synopsis "Extensions to python-requests")
7266 (description "This is a toolbelt of useful classes and functions to be used
7267with python-requests.")
7268 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7269 (license license:asl2.0)))
d1deb90b
LF
7270
7271(define-public python-click-threading
7272 (package
7273 (name "python-click-threading")
3d2e0dbc 7274 (version "0.2.0")
d1deb90b
LF
7275 (source (origin
7276 (method url-fetch)
3d2e0dbc
LF
7277 (uri (string-append
7278 "https://pypi.python.org/packages/"
7279 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7280 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7281 (sha256
7282 (base32
3d2e0dbc 7283 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7284 (build-system python-build-system)
7285 (propagated-inputs
7286 `(("python-click" ,python-click)))
7287 (synopsis "Utilities for multithreading in Click")
7288 (description "This package provides utilities for multithreading in Click
7289applications.")
7290 (home-page "https://github.com/click-contrib/click-threading")
7291 (license license:expat)))
7b17cab9
LF
7292
7293(define-public python-click-log
7294 (package
7295 (name "python-click-log")
a9da8fec 7296 (version "0.1.3")
7b17cab9
LF
7297 (source (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "click-log" version))
7300 (sha256
7301 (base32
a9da8fec 7302 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7303 (build-system python-build-system)
7304 (propagated-inputs
7305 `(("python-click" ,python-click)))
7306 (synopsis "Logging for click applications")
7307 (description "This package provides a Python library for logging Click
7308applications.")
7309 (home-page "https://github.com/click-contrib/click-log")
7310 (license license:expat)))
7b3a4ee4
LF
7311
7312(define-public python-apipkg
7313 (package
7314 (name "python-apipkg")
7315 (version "1.4")
7316 (source (origin
7317 (method url-fetch)
7318 (uri (pypi-uri "apipkg" version))
7319 (sha256
7320 (base32
7321 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7322 (build-system python-build-system)
b43bab3c 7323 (inputs
7b3a4ee4
LF
7324 `(("python-pytest" ,python-pytest)))
7325 (synopsis "Namespace control and lazy-import mechanism")
7326 (description "With apipkg you can control the exported namespace of a Python
7327package and greatly reduce the number of imports for your users. It is a small
7328pure Python module that works on virtually all Python versions.")
7329 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7330 (license license:expat)
7331 (properties `((python2-variant . ,(delay python2-apipkg))))))
7332
7333(define-public python2-apipkg
7334 (package
7335 (inherit (package-with-python2
7336 (strip-python2-variant python-apipkg)))
7337 (native-inputs
7338 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7339
7340(define-public python-execnet
7341 (package
7342 (name "python-execnet")
7343 (version "1.4.1")
7344 (source (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "execnet" version))
7347 (sha256
7348 (base32
7349 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7350 (build-system python-build-system)
7351 (native-inputs
7352 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7353 (inputs
848964fe
LF
7354 `(("python-apipkg" ,python-apipkg)))
7355 (synopsis "Rapid multi-Python deployment")
7356 (description "Execnet provides a share-nothing model with
7357channel-send/receive communication for distributing execution across many
7358Python interpreters across version, platform and network barriers. It has a
7359minimal and fast API targetting the following uses:
7360@enumerate
7361@item distribute tasks to (many) local or remote CPUs
7362@item write and deploy hybrid multi-process applications
7363@item write scripts to administer multiple environments
7364@end enumerate")
7365 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7366 (license license:expat)
7367 (properties `((python2-variant . ,(delay python2-execnet))))))
7368
7369(define-public python2-execnet
7370 (let ((execnet (package-with-python2
7371 (strip-python2-variant python-execnet))))
7372 (package
7373 (inherit execnet)
7374 (native-inputs
7375 `(("python2-setuptools" ,python2-setuptools)
7376 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7377
7378;;; The software provided by this package was integrated into pytest 2.8.
7379(define-public python-pytest-cache
7380 (package
7381 (name "python-pytest-cache")
7382 (version "1.0")
7383 (source (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "pytest-cache" version))
7386 (sha256
7387 (base32
7388 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7389 (build-system python-build-system)
630d938f
EF
7390 (inputs
7391 `(("python-apipkg" ,python-apipkg)
7392 ("python-execnet" ,python-execnet)
7393 ("python-py" ,python-py)
7394 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7395 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7396 (description "The pytest-cache plugin provides tools to rerun failures from
7397the last py.test invocation.")
7398 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7399 (license license:expat)
7400 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7401
7402(define-public python2-pytest-cache
7403 (let ((pytest-cache (package-with-python2
7404 (strip-python2-variant python-pytest-cache))))
7405 (package
7406 (inherit pytest-cache)
7407 (native-inputs
7408 `(("python2-setuptools" ,python2-setuptools)
7409 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7410
7411(define-public python-pytest-localserver
7412 (package
7413 (name "python-pytest-localserver")
29f20168 7414 (version "0.3.5")
d7e729fe
LF
7415 (source (origin
7416 (method url-fetch)
29f20168 7417 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7418 (sha256
7419 (base32
29f20168 7420 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7421 (build-system python-build-system)
7422 (arguments
7423 `(#:phases (modify-phases %standard-phases
7424 (replace 'check
7425 (lambda _
7426 (zero? (system* "py.test" "--genscript=runtests.py"))
7427 (zero? (system* "py.test")))))))
7428 (native-inputs
d7e729fe
LF
7429 `(("python-pytest" ,python-pytest)
7430 ("python-requests" ,python-requests)
9ba40f05
EF
7431 ("python-six" ,python-six)))
7432 (inputs
7433 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7434 (synopsis "Py.test plugin to test server connections locally")
7435 (description "Pytest-localserver is a plugin for the pytest testing
7436framework which enables you to test server connections locally.")
7437 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7438 (license license:expat)))
28cecbb7
LF
7439
7440(define-public python-wsgi-intercept
7441 (package
7442 (name "python-wsgi-intercept")
909fbd2b 7443 (version "1.2.2")
28cecbb7
LF
7444 (source (origin
7445 (method url-fetch)
909fbd2b
LF
7446 (uri (string-append
7447 "https://pypi.python.org/packages/"
7448 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7449 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7450 (sha256
7451 (base32
909fbd2b 7452 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7453 (build-system python-build-system)
7454 (native-inputs
9d813ec1
EF
7455 `(("python-pytest" ,python-pytest)
7456 ("python-six" ,python-six)))
28cecbb7
LF
7457 (propagated-inputs
7458 `(("python-httplib2" ,python-httplib2)
7459 ("python-requests" ,python-requests)))
7460 (synopsis "Puts a WSGI application in place of a real URI for testing")
7461 (description "Wsgi_intercept installs a WSGI application in place of a real
7462URI for testing. Testing a WSGI application normally involves starting a
7463server at a local host and port, then pointing your test code to that address.
7464Instead, this library lets you intercept calls to any specific host/port
7465combination and redirect them into a WSGI application importable by your test
7466program. Thus, you can avoid spawning multiple processes or threads to test
7467your Web app.")
7468 (home-page "https://github.com/cdent/wsgi-intercept")
7469 (license license:expat)))
89b8a551
LF
7470
7471(define-public python-pytest-xprocess
7472 (package
7473 (name "python-pytest-xprocess")
7474 (version "0.9.1")
7475 (source (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "pytest-xprocess" version))
7478 (sha256
7479 (base32
7480 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7481 (build-system python-build-system)
7482 (propagated-inputs
7483 `(("python-pytest" ,python-pytest)
7484 ("python-pytest-cache" ,python-pytest-cache)
7485 ("python-psutil" ,python-psutil)))
7486 (synopsis "Pytest plugin to manage external processes across test runs")
7487 (description "Pytest-xprocess is an experimental py.test plugin for managing
7488processes across test runs.")
7489 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7490 (license license:expat)))
5c299bf0
LF
7491
7492(define-public python-icalendar
7493 (package
7494 (name "python-icalendar")
f2f53353 7495 (version "3.10")
5c299bf0
LF
7496 (source (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "icalendar" version))
7499 (sha256
7500 (base32
f2f53353 7501 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7502 (build-system python-build-system)
7503 (propagated-inputs
7504 `(("python-dateutil-2" ,python-dateutil-2)
7505 ("python-pytz" ,python-pytz)))
7506 (synopsis "Python library for parsing iCalendar files")
7507 (description "The icalendar package is a parser/generator of iCalendar
7508files for use with Python.")
7509 (home-page "https://github.com/collective/icalendar")
3f641af0 7510 (license license:bsd-2)))
6bbbb53e
LF
7511
7512(define-public python-sphinxcontrib-newsfeed
7513 (package
7514 (name "python-sphinxcontrib-newsfeed")
7515 (version "0.1.4")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7519 (sha256
7520 (base32
7521 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7522 (build-system python-build-system)
7523 (propagated-inputs
7524 `(("python-docutils" ,python-docutils)
7525 ("python-sphinx" ,python-sphinx)))
7526 (synopsis "News Feed extension for Sphinx")
7527 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7528Blog, News or Announcements section to a Sphinx website.")
7529 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7530 (license license:bsd-2)))
2216e15c
SB
7531
7532(define-public python-args
7533 (package
7534 (name "python-args")
7535 (version "0.1.0")
7536 (source (origin
7537 (method url-fetch)
7538 (uri (pypi-uri "args" version))
7539 (sha256
7540 (base32
7541 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7542 (build-system python-build-system)
7543 (inputs
7544 `(("python-setuptools" ,python-setuptools)))
7545 (home-page "https://github.com/kennethreitz/args")
7546 (synopsis "Command-line argument parser")
7547 (description
7548 "This library provides a Python module to parse command-line arguments.")
3f641af0 7549 (license license:bsd-3)))
2216e15c
SB
7550
7551(define-public python2-args
7552 (package-with-python2 python-args))
c06a3de9
SB
7553
7554(define-public python-clint
7555 (package
7556 (name "python-clint")
7557 (version "0.5.1")
7558 (source (origin
7559 (method url-fetch)
7560 (uri (pypi-uri "clint" version))
7561 (sha256
7562 (base32
7563 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7564 (build-system python-build-system)
7565 (inputs
7566 `(("python-args" ,python-args)
7567 ("python-setuptools" ,python-setuptools)))
7568 (home-page "https://github.com/kennethreitz/clint")
7569 (synopsis "Command-line interface tools")
7570 (description
7571 "Clint is a Python module filled with a set of tools for developing
7572command-line applications, including tools for colored and indented
7573output, progress bar display, and pipes.")
3f641af0 7574 (license license:isc)))
c06a3de9
SB
7575
7576(define-public python2-clint
7577 (package-with-python2 python-clint))
4ecdeef8
SB
7578
7579(define-public python-astor
7580 (package
7581 (name "python-astor")
7582 (version "0.5")
7583 (source (origin
7584 (method url-fetch)
7585 (uri (pypi-uri "astor" version))
7586 (sha256
7587 (base32
7588 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7589 (build-system python-build-system)
7590 (inputs
7591 `(("python-setuptools" ,python-setuptools)))
7592 (home-page "https://github.com/berkerpeksag/astor")
7593 (synopsis "Read and write Python ASTs")
7594 (description
7595 "Astor is designed to allow easy manipulation of Python source via the
7596Abstract Syntax Tree.")
3f641af0 7597 (license license:bsd-3)))
4ecdeef8
SB
7598
7599(define-public python2-astor
7600 (package-with-python2 python-astor))
e224b7d0
SB
7601
7602(define-public python-rply
7603 (package
7604 (name "python-rply")
7605 (version "0.7.4")
7606 (source (origin
7607 (method url-fetch)
7608 (uri (pypi-uri "rply" version))
7609 (sha256
7610 (base32
7611 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7612 (build-system python-build-system)
7613 (inputs
7614 `(("python-appdirs" ,python-appdirs)
7615 ("python-setuptools" ,python-setuptools)))
7616 (home-page "https://github.com/alex/rply")
7617 (synopsis "Parser generator for Python")
7618 (description
7619 "This package provides a pure Python based parser generator, that also
7620works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7621with a new public API, and RPython support.")
3f641af0 7622 (license license:bsd-3)))
e224b7d0
SB
7623
7624(define-public python2-rply
7625 (package-with-python2 python-rply))
c3e919d7
SB
7626
7627(define-public python-hy
7628 (package
7629 (name "python-hy")
7630 (version "0.11.1")
7631 (source (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "hy" version))
7634 (sha256
7635 (base32
7636 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7637 (build-system python-build-system)
7638 (inputs
7639 `(("python-astor" ,python-astor)
7640 ("python-clint" ,python-clint)
7641 ("python-rply" ,python-rply)
7642 ("python-setuptools" ,python-setuptools)))
7643 (home-page "http://hylang.org/")
7644 (synopsis "Lisp frontend to Python")
7645 (description
7646 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7647its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7648Python at your fingertips, in Lisp form.")
7649 (license license:expat)))
7650
7651(define-public python2-hy
7652 (package-with-python2 python-hy))
7a5b944e 7653
81f7f297
EF
7654(define-public python-rauth
7655 (package
7656 (name "python-rauth")
7657 (version "0.7.2")
7658 (source
7659 (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "rauth" version))
7662 (sha256
7663 (base32
7664 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7665 (build-system python-build-system)
7666 (arguments
7667 `(#:test-target "check"))
0848d8d3 7668 (inputs
81f7f297
EF
7669 `(("python-requests" ,python-requests)))
7670 (home-page "https://github.com/litl/rauth")
7671 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7672 (description
7673 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7674provides service wrappers for convenient connection initialization and
7675authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7676 (license license:expat)
7677 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7678
7679(define-public python2-rauth
0848d8d3
EF
7680 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7681 (package
7682 (inherit base)
7683 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7684 ("python2-unittest2" ,python2-unittest2)
7685 ,@(package-native-inputs base))))))
81f7f297 7686
1abe448d
EF
7687(define-public python2-functools32
7688 (package
7689 (name "python2-functools32")
7690 (version "3.2.3-2")
7691 (source
7692 (origin
7693 (method url-fetch)
7694 (uri (pypi-uri "functools32" version))
7695 (sha256
7696 (base32
7697 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7698 (build-system python-build-system)
7699 (arguments
7700 `(#:python ,python-2
7701 #:tests? #f)) ; no test target
7702 (native-inputs
7703 `(("python2-setuptools" ,python2-setuptools)))
7704 (home-page "https://github.com/MiCHiLU/python-functools32")
7705 (synopsis
7706 "Backport of the functools module from Python 3.2.3")
7707 (description
7708 "This package is a backport of the @code{functools} module from Python
77093.2.3 for use with older versions of Python and PyPy.")
7710 (license license:expat)))
7711
877889f3 7712(define-public python2-futures
7a5b944e 7713 (package
877889f3 7714 (name "python2-futures")
7a5b944e
EF
7715 (version "3.0.3")
7716 (source
7717 (origin
7718 (method url-fetch)
7719 (uri (pypi-uri "futures" version))
7720 (sha256
7721 (base32
7722 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7723 (build-system python-build-system)
877889f3 7724 (arguments `(#:python ,python-2))
7a5b944e 7725 (native-inputs
877889f3 7726 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7727 (home-page "https://github.com/agronholm/pythonfutures")
7728 (synopsis
7729 "Backport of the concurrent.futures package from Python 3.2")
7730 (description
7731 "The concurrent.futures module provides a high-level interface for
7732asynchronously executing callables. This package backports the
7733concurrent.futures package from Python 3.2")
3f641af0 7734 (license license:bsd-3)))
7a5b944e 7735
5cb2fe44
EF
7736(define-public python-promise
7737 (package
7738 (name "python-promise")
7739 (version "0.4.2")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (pypi-uri "promise" version))
7744 (sha256
7745 (base32
7746 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7747 (build-system python-build-system)
7748 ;; Tests wants python-futures, which is a python2 only program, and
7749 ;; can't be found by python-promise at test time.
7750 (arguments `(#:tests? #f))
7751 (home-page "https://github.com/syrusakbary/promise")
7752 (synopsis "Promises/A+ implementation for Python")
7753 (description
7754 "Promises/A+ implementation for Python")
7755 (properties `((python2-variant . ,(delay python2-promise))))
7756 (license license:expat)))
7757
7758(define-public python2-promise
7759 (let ((promise (package-with-python2
7760 (strip-python2-variant python-promise))))
7761 (package (inherit promise)
7762 (arguments (substitute-keyword-arguments (package-arguments promise)
7763 ((#:tests? _) #t)))
7764 (native-inputs
7765 `(("python2-futures" ,python2-futures)
7766 ("python2-pytest" ,python2-pytest)
7767 ("python2-setuptools" ,python2-setuptools)
7768 ,@(package-native-inputs promise))))))
7769
c18f6368
EF
7770(define-public python-urllib3
7771 (package
7772 (name "python-urllib3")
6178274d 7773 (version "1.18.1")
c18f6368
EF
7774 (source
7775 (origin
7776 (method url-fetch)
7777 (uri (pypi-uri "urllib3" version))
7778 (sha256
7779 (base32
6178274d 7780 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
7781 (build-system python-build-system)
7782 (arguments `(#:tests? #f))
7783 (native-inputs
7784 `(("python-setuptools" ,python-setuptools)
7785 ;; some packages for tests
7786 ("python-nose" ,python-nose)
7787 ("python-mock" ,python-mock)
7788 ("python-tornado" ,python-tornado)))
7789 (propagated-inputs
7790 `(;; packages for https security
7791 ("python-certifi" ,python-certifi)
7792 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7793 ("python-pyasn1" ,python-pyasn1)
7794 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 7795 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
7796 (synopsis "HTTP library with thread-safe connection pooling")
7797 (description
7798 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7799can reuse the same socket connection for multiple requests, it can POST files,
7800supports url redirection and retries, and also gzip and deflate decoding.")
7801 (license license:expat)))
7802
7803(define-public python2-urllib3
7804 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7805
7806(define-public python-colorama
7807 (package
7808 (name "python-colorama")
7809 (version "0.3.3")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "colorama" version))
7814 (sha256
7815 (base32
7816 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7817 (build-system python-build-system)
7818 (inputs
7819 `(("python-setuptools" ,python-setuptools)))
7820 (synopsis "colored terminal text rendering for Python")
7821 (description "Colorama is a Python library for rendering colored terminal
7822text.")
7823 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 7824 (license license:bsd-3)))
2b2f2fc1
DT
7825
7826(define-public python2-colorama
7827 (package-with-python2 python-colorama))
f5bcec6e
DT
7828
7829(define-public python-rsa
7830 (package
7831 (name "python-rsa")
ecd68c53 7832 (version "3.4.2")
f5bcec6e
DT
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "rsa" version))
7837 (sha256
7838 (base32
ecd68c53 7839 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
7840 (build-system python-build-system)
7841 (inputs
7842 `(("python-pyasn1" ,python-pyasn1)
7843 ("python-setuptools" ,python-setuptools)))
7844 (synopsis "Pure-Python RSA implementation")
7845 (description "Python-RSA is a pure-Python RSA implementation. It supports
7846encryption and decryption, signing and verifying signatures, and key
7847generation according to PKCS#1 version 1.5. It can be used as a Python
7848library as well as on the command line.")
7849 (home-page "http://stuvel.eu/rsa")
3f641af0 7850 (license license:asl2.0)))
f5bcec6e
DT
7851
7852(define-public python2-rsa
7853 (package-with-python2 python-rsa))
c0aacfa5
DT
7854
7855(define-public python-pluggy
7856 (package
7857 (name "python-pluggy")
7858 (version "0.3.1")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "pluggy" version))
7863 (sha256
7864 (base32
7865 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7866 (build-system python-build-system)
7867 (inputs
7868 `(("python-setuptools" ,python-setuptools)))
7869 (synopsis "Plugin and hook calling mechanism for Python")
7870 (description "Pluggy is an extraction of the plugin manager as used by
7871Pytest but stripped of Pytest specific details.")
7872 (home-page "https://pypi.python.org/pypi/pluggy")
7873 (license license:expat)))
7874
7875(define-public python2-pluggy
7876 (package-with-python2 python-pluggy))
a4af21ca
DT
7877
7878(define-public python-tox
7879 (package
7880 (name "python-tox")
7881 (version "2.3.1")
7882 (source
7883 (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "tox" version))
7886 (sha256
7887 (base32
7888 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7889 (build-system python-build-system)
7890 (arguments
7891 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7892 ;; pytest breaks other packages.
7893 '(#:tests? #f))
7894 (inputs
7895 `(("python-setuptools" ,python-setuptools)
7896 ("python-pluggy" ,python-pluggy)
7897 ("python-py" ,python-py)
7898 ("python-virtualenv" ,python-virtualenv)
7899 ("python-pytest" ,python-pytest)))
7900 (home-page "http://tox.testrun.org/")
7901 (synopsis "Virtualenv-based automation of test activities")
7902 (description "Tox is a generic virtualenv management and test command line
7903tool. It can be used to check that a package installs correctly with
7904different Python versions and interpreters, or run tests in each type of
7905supported environment, or act as a frontend to continuous integration
7906servers.")
7907 (license license:expat)))
7908
7909(define-public python2-tox
7910 (package-with-python2 python-tox))
ba9da248
DT
7911
7912(define-public python-jmespath
7913 (package
7914 (name "python-jmespath")
7915 (version "0.9.0")
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "jmespath" version))
7920 (sha256
7921 (base32
7922 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7923 (build-system python-build-system)
7924 (inputs
7925 `(("python-setuptools" ,python-setuptools)))
7926 (synopsis "JSON Matching Expressions")
7927 (description "JMESPath (pronounced “james path”) is a Python library that
7928allows one to declaratively specify how to extract elements from a JSON
7929document.")
7930 (home-page "https://github.com/jmespath/jmespath.py")
7931 (license license:expat)))
7932
7933(define-public python2-jmespath
7934 (package-with-python2 python-jmespath))
935fcd5c
DT
7935
7936(define-public python-botocore
7937 (package
7938 (name "python-botocore")
e09f952d 7939 (version "1.4.62")
935fcd5c
DT
7940 (source
7941 (origin
7942 (method url-fetch)
7943 (uri (pypi-uri "botocore" version))
7944 (sha256
7945 (base32
e09f952d 7946 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
7947 (build-system python-build-system)
7948 (inputs
7949 `(("python-dateutil" ,python-dateutil-2)
7950 ("python-docutils" ,python-docutils)
7951 ("python-mock" ,python-mock)
7952 ("python-nose" ,python-nose)
7953 ("python-setuptools" ,python-setuptools)
7954 ("python-tox" ,python-tox)
7955 ("python-wheel" ,python-wheel)
7956 ("python-jmespath" ,python-jmespath)))
7957 (home-page "https://github.com/boto/botocore")
7958 (synopsis "Low-level interface to AWS")
7959 (description "Botocore is a Python library that provides a low-level
7960interface to the Amazon Web Services (AWS) API.")
3f641af0 7961 (license license:asl2.0)))
935fcd5c
DT
7962
7963(define-public python2-botocore
7964 (package-with-python2 python-botocore))
f861b8b8
DT
7965
7966(define-public awscli
7967 (package
7968 (name "awscli")
d5ccf71e 7969 (version "1.11.5")
f861b8b8
DT
7970 (source
7971 (origin
7972 (method url-fetch)
d5ccf71e 7973 (uri (pypi-uri name version))
f861b8b8
DT
7974 (sha256
7975 (base32
d5ccf71e 7976 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
7977 (build-system python-build-system)
7978 (inputs
7979 `(("python-colorama" ,python-colorama)
7980 ("python-docutils" ,python-docutils)
7981 ("python-mock" ,python-mock)
7982 ("python-nose" ,python-nose)
7983 ("python-rsa" ,python-rsa)
7984 ("python-setuptools" ,python-setuptools)
7985 ("python-sphinx" ,python-sphinx)
7986 ("python-tox" ,python-tox)
7987 ("python-wheel" ,python-wheel)
d5ccf71e
LF
7988 ("python-botocore" ,python-botocore)
7989 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
7990 (home-page "http://aws.amazon.com/cli/")
7991 (synopsis "Command line client for AWS")
7992 (description "AWS CLI provides a unified command line interface to the
7993Amazon Web Services (AWS) API.")
3f641af0 7994 (license license:asl2.0)))
6a44697d
LF
7995
7996(define-public python-hypothesis
7997 (package
7998 (name "python-hypothesis")
bea6d94d 7999 (version "3.1.0")
6a44697d
LF
8000 (source (origin
8001 (method url-fetch)
8002 (uri (pypi-uri "hypothesis" version))
8003 (sha256
8004 (base32
bea6d94d 8005 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8006 (build-system python-build-system)
6a44697d
LF
8007 (propagated-inputs
8008 `(("python-flake8" ,python-flake8)
8009 ("python-pytest" ,python-pytest)))
8010 (synopsis "Library for property based testing")
8011 (description "Hypothesis is a library for testing your Python code against a
8012much larger range of examples than you would ever want to write by hand. It’s
8013based on the Haskell library, Quickcheck, and is designed to integrate
8014seamlessly into your existing Python unit testing work flow.")
8015 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8016 (license license:mpl2.0)
6f068e08 8017 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8018
8019(define-public python2-hypothesis
6f068e08
EF
8020 (let ((hypothesis (package-with-python2
8021 (strip-python2-variant python-hypothesis))))
8022 (package (inherit hypothesis)
8023 (native-inputs
8024 `(("python2-enum34" ,python2-enum34)
8025 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
8026
8027(define-public python-pytest-subtesthack
8028 (package
8029 (name "python-pytest-subtesthack")
8030 (version "0.1.1")
8031 (source (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "pytest-subtesthack" version))
8034 (sha256
8035 (base32
8036 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8037 (build-system python-build-system)
8038 (native-inputs
8039 `(;; setuptools required for python-2 variant
8040 ("python-setuptools" ,python-setuptools)))
8041 (propagated-inputs
8042 `(("python-pytest" ,python-pytest)))
8043 (synopsis "Set-up and tear-down fixtures for unit tests")
8044 (description "This plugin allows you to set up and tear down fixtures within
8045unit test functions that use @code{py.test}. This is useful for using
8046@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8047function multiple times, without setting up or tearing down fixture state as is
8048normally the case.")
8049 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8050 (license license:unlicense)))
7517e73c
LF
8051
8052(define-public python2-pytest-subtesthack
8053 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8054
8055(define-public python2-xdo
8056 (package
8057 (name "python2-xdo")
8058 (version "0.2")
8059 (source (origin
8060 (method url-fetch)
8061 (uri (string-append
8062 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8063 "python-xdo_" version ".orig.tar.gz"))
8064 (sha256
8065 (base32
8066 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8067 (build-system python-build-system)
8068 (arguments
8069 `(#:python ,python-2
8070 #:tests? #f)) ; no tests provided
8071 (inputs
8072 `(("xdotool" ,xdotool)
8073 ("libX11" ,libx11)))
8074 (home-page "https://tracker.debian.org/pkg/python-xdo")
8075 (synopsis "Python library for simulating X11 keyboard/mouse input")
8076 (description "Provides bindings to libxdo for manipulating X11 via simulated
8077input. (Note that this is mostly a legacy library; you may wish to look at
8078python-xdo for newer bindings.)")
3f641af0 8079 (license license:bsd-3)))
0bdc1671 8080
cb34dc6c
CAW
8081(define-public python-wtforms
8082 (package
8083 (name "python-wtforms")
8084 (version "2.1")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "WTForms" version ".zip"))
8089 (sha256
8090 (base32
8091 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8092 (build-system python-build-system)
8093 (native-inputs
8094 `(("unzip" ,unzip)))
8095 (home-page "http://wtforms.simplecodes.com/")
8096 (synopsis
8097 "Form validation and rendering library for Python web development")
8098 (description
8099 "WTForms is a flexible forms validation and rendering library
8100for Python web development. It is very similar to the web form API
8101available in Django, but is a standalone package.")
3f641af0 8102 (license license:bsd-3)
cb34dc6c
CAW
8103 (properties `((python2-variant . ,(delay python2-wtforms))))))
8104
8105(define-public python2-wtforms
8106 (package
8107 (inherit (package-with-python2
8108 (strip-python2-variant python-wtforms)))
8109 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8110
8111(define-public python-mako
8112 (package
8113 (name "python-mako")
8114 (version "1.0.3")
8115 (source
8116 (origin
8117 (method url-fetch)
8118 (uri (pypi-uri "Mako" version))
8119 (sha256
8120 (base32
8121 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8122 (build-system python-build-system)
8123 (native-inputs
8124 `(("python-markupsafe" ,python-markupsafe)
8125 ("python-mock" ,python-mock)
8126 ("python-nose" ,python-nose)))
8127 (home-page "http://www.makotemplates.org/")
8128 (synopsis "Templating language for Python")
8129 (description "Mako is a templating language for Python that compiles
8130templates into Python modules.")
8131 (license license:expat)
8132 (properties `((python2-variant . ,(delay python2-mako))))))
8133
8134(define-public python2-mako
8135 (let ((base (package-with-python2
8136 (strip-python2-variant python-mako))))
8137 (package
8138 (inherit base)
8139 (native-inputs
8140 (cons `("python2-setuptools" ,python2-setuptools)
8141 (package-native-inputs base))))))
ae00a41f
CAW
8142
8143(define-public python-waitress
8144 (package
8145 (name "python-waitress")
8146 (version "0.8.10")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "waitress" version))
8151 (sha256
8152 (base32
8153 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8154 (build-system python-build-system)
8155 (home-page "https://github.com/Pylons/waitress")
8156 (synopsis "Waitress WSGI server")
8157 (description "Waitress is meant to be a production-quality pure-Python WSGI
8158server with very acceptable performance.")
3f641af0 8159 (license license:zpl2.1)
ae00a41f
CAW
8160 (properties `((python2-variant . ,(delay python2-waitress))))))
8161
8162(define-public python2-waitress
8163 (package
8164 (inherit (package-with-python2
8165 (strip-python2-variant python-waitress)))
8166 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8167
8168(define-public python-wsgiproxy2
8169 (package
8170 (name "python-wsgiproxy2")
8171 (version "0.4.2")
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8176 (sha256
8177 (base32
8178 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8179 (build-system python-build-system)
e359b31a
LF
8180 (arguments
8181 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8182 ;; support Python 3:
8183 ;; https://github.com/benoitc/restkit/issues/140
8184 #:tests? #f))
778a284b
CAW
8185 (native-inputs
8186 `(("unzip" ,unzip)
8187 ("python-nose" ,python-nose)
8188 ("python-coverage" ,python-coverage)))
8189 (propagated-inputs
8190 `(("python-six" ,python-six)
8191 ("python-webob" ,python-webob)))
8192 (home-page
8193 "https://github.com/gawel/WSGIProxy2/")
8194 (synopsis "WSGI Proxy with various http client backends")
8195 (description "WSGI turns HTTP requests into WSGI function calls.
8196WSGIProxy turns WSGI function calls into HTTP requests.
8197It also includes code to sign requests and pass private data,
8198and to spawn subprocesses to handle requests.")
8199 (license license:expat)
8200 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8201
8202(define-public python2-wsgiproxy2
8203 (let ((wsgiproxy2 (package-with-python2
8204 (strip-python2-variant python-wsgiproxy2))))
8205 (package
8206 (inherit wsgiproxy2)
8207 (inputs `(("python2-setuptools" ,python2-setuptools)
8208 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8209
8210(define-public python-pastedeploy
8211 (package
8212 (name "python-pastedeploy")
8213 (version "1.5.2")
8214 (source
8215 (origin
8216 (method url-fetch)
8217 (uri (pypi-uri "PasteDeploy" version))
8218 (sha256
8219 (base32
8220 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8221 (build-system python-build-system)
8222 (native-inputs
8223 `(("python-nose" ,python-nose)))
8224 (propagated-inputs
8225 ;; This package uses pkg_resources, part of setuptools, during runtime,
8226 ;; hence why not a native-input.
8227 `(("python-setuptools" ,python-setuptools)))
8228 (home-page "http://pythonpaste.org/deploy/")
8229 (synopsis
8230 "Load, configure, and compose WSGI applications and servers")
8231 (description
8232 "This tool provides code to load WSGI applications and servers from URIs;
8233these URIs can refer to Python Eggs for INI-style configuration files. Paste
8234Script provides commands to serve applications based on this configuration
8235file.")
8236 (license license:expat)))
8237
8238(define-public python2-pastedeploy
8239 (package-with-python2 python-pastedeploy))
1cf53652 8240
c4a7904c
CAW
8241(define-public python-paste
8242 (package
8243 (name "python-paste")
8244 (version "2.0.2")
8245 (source
8246 (origin
8247 (method url-fetch)
8248 (uri (pypi-uri "Paste" version))
8249 (sha256
8250 (base32
8251 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8252 (patches (search-patches "python-paste-remove-website-test.patch"
8253 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8254 (build-system python-build-system)
8255 (native-inputs
8256 `(("python-nose" ,python-nose)))
8257 (propagated-inputs
8258 `(;; Uses pkg_resources provided by setuptools internally.
8259 ("python-setuptools" ,python-setuptools)
8260 ("python-six" ,python-six)))
8261 (arguments
8262 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8263 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8264 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8265 ;; still... things should be better by the next Paste release.)
8266 #:tests? #f))
8267 (home-page "http://pythonpaste.org")
8268 (synopsis
8269 "Python web development tools, focusing on WSGI")
8270 (description
8271 "Paste provides a variety of web development tools and middleware which
8272can be nested together to build web applications. Paste's design closely
8273follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8274 (license license:expat)
8275 (properties `((python2-variant . ,(delay python2-paste))))))
8276
8277(define-public python2-paste
8278 (let ((paste (package-with-python2
8279 (strip-python2-variant python-paste))))
8280 (package
8281 (inherit paste)
8282 (arguments
8283 ;; Tests are back for Python 2!
8284 `(#:tests? #t
8285 ,@(package-arguments paste))))))
8286
a8f20f63
CAW
8287(define-public python-pastescript
8288 (package
8289 (name "python-pastescript")
8290 (version "2.0.2")
8291 (source
8292 (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "PasteScript" version))
8295 (sha256
8296 (base32
8297 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8298 (build-system python-build-system)
8299 (native-inputs
8300 `(("python-nose" ,python-nose)))
8301 (propagated-inputs
8302 `(;; Uses pkg_resources provided by setuptools internally.
8303 ("python-setuptools" ,python-setuptools)
8304 ("python-paste" ,python-paste)
8305 ("python-pastedeploy" ,python-pastedeploy)))
8306 (home-page "http://pythonpaste.org/script/")
8307 (arguments
8308 '(;; Unfortunately, this requires the latest unittest2,
8309 ;; but that requires traceback2 which requires linecache2 which requires
8310 ;; unittest2. So we're skipping tests for now.
8311 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8312 ;; so in theory we could get around this situation somehow.)
8313 #:tests? #f))
8314 (synopsis
8315 "Pluggable command line tool for serving web applications and more")
8316 (description
8317 "PasteScript is a plugin-friendly command line tool which provides a
8318variety of features, from launching web applications to bootstrapping project
8319layouts.")
8320 (license license:expat)))
8321
8322(define-public python2-pastescript
8323 (package-with-python2 python-pastescript))
8324
1cf53652
CAW
8325(define-public python-pyquery
8326 (package
8327 (name "python-pyquery")
aab76e80 8328 (version "1.2.13")
1cf53652
CAW
8329 (source
8330 (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "pyquery" version))
8333 (sha256
8334 (base32
aab76e80 8335 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8336 (build-system python-build-system)
2ddbfa8c
LF
8337 (native-inputs
8338 `(("python-webob" ,python-webob)
8339 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8340 (propagated-inputs
8341 `(("python-lxml" ,python-lxml)
8342 ("python-cssselect" ,python-cssselect)))
8343 (home-page "https://github.com/gawel/pyquery")
8344 (synopsis "Make jQuery-like queries on xml documents")
8345 (description "pyquery allows you to make jQuery queries on xml documents.
8346The API is as much as possible the similar to jQuery. pyquery uses lxml for
8347fast xml and html manipulation.")
3f641af0 8348 (license license:bsd-3)
1cf53652
CAW
8349 (properties `((python2-variant . ,(delay python2-pyquery))))))
8350
8351(define-public python2-pyquery
8352 (let ((pyquery (package-with-python2
8353 (strip-python2-variant python-pyquery))))
8354 (package
8355 (inherit pyquery)
2ddbfa8c
LF
8356 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8357 ,@(package-native-inputs pyquery))))))
aa6313d6
CAW
8358
8359(define-public python-webtest
8360 (package
8361 (name "python-webtest")
8362 (version "2.0.20")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "WebTest" version))
8367 (sha256
8368 (base32
8369 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8370 (build-system python-build-system)
8371 (arguments
8372 `(;; Unfortunately we have to disable tests!
8373 ;; This release of WebTest is pinned to python-nose < 1.3,
8374 ;; but older versions of python-nose are plagued with the following
8375 ;; bug(s), which rears its ugly head during test execution:
8376 ;; https://github.com/nose-devs/nose/issues/759
8377 ;; https://github.com/nose-devs/nose/pull/811
8378 #:tests? #f))
8379 ;; Commented out code is no good, but in this case, once tests
8380 ;; are ready to be enabled again, we should put the following
8381 ;; in place:
8382 ;; (native-inputs
8383 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8384 ;; ; but see above comment
8385 ;; ("python-coverage" ,python-coverage)
8386 ;; ("python-mock" ,python-mock)
8387 ;; ("python-pastedeploy" ,python-pastedeploy)
8388 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8389 ;; ("python-pyquery" ,python-pyquery)))
8390 (propagated-inputs
8391 `(("python-waitress" ,python-waitress)
8392 ("python-webob" ,python-webob)
8393 ("python-six" ,python-six)
8394 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8395 (home-page "http://webtest.pythonpaste.org/")
8396 (synopsis "Helper to test WSGI applications")
8397 (description "Webtest allows you to test your Python web applications
8398without starting an HTTP server. It supports anything that supports the
8399minimum of WSGI.")
8400 (license license:expat)
8401 (properties `((python2-variant . ,(delay python2-webtest))))))
8402
8403(define-public python2-webtest
8404 (let ((webtest (package-with-python2
8405 (strip-python2-variant python-webtest))))
8406 (package
8407 (inherit webtest)
8408 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8409 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8410
8411(define-public python-anyjson
8412 (package
8413 (name "python-anyjson")
8414 (version "0.3.3")
8415 (source
8416 (origin
8417 (method url-fetch)
8418 (uri (pypi-uri "anyjson" version))
8419 (sha256
8420 (base32
8421 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8422 (build-system python-build-system)
8423 (arguments
8424 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8425 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8426 ;; whatever) so this transformation needs to be done before the tests
8427 ;; can be run. Maybe we could add a build step to transform beforehand
8428 ;; but it could be annoying/difficult.
8429 ;; We can enable tests for the Python 2 version, though, and do below.
8430 #:tests? #f))
8431 (home-page "http://bitbucket.org/runeh/anyjson/")
8432 (synopsis
8433 "Wraps best available JSON implementation in a common interface")
8434 (description
8435 "Anyjson loads whichever is the fastest JSON module installed
8436and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8437 (license license:bsd-3)
4cb122cd
CAW
8438 (properties `((python2-variant . ,(delay python2-anyjson))))))
8439
8440(define-public python2-anyjson
8441 (let ((anyjson (package-with-python2
8442 (strip-python2-variant python-anyjson))))
8443 (package
8444 (inherit anyjson)
8445 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8446 #:tests? #t
8447 ,@(package-arguments anyjson)))
8448 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8449 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8450
8451(define-public python-amqp
8452 (package
8453 (name "python-amqp")
8454 (version "1.4.9")
8455 (source
8456 (origin
8457 (method url-fetch)
8458 (uri (pypi-uri "amqp" version))
8459 (sha256
8460 (base32
8461 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8462 (build-system python-build-system)
8463 (native-inputs
8464 `(("python-nose" ,python-nose)
8465 ("python-mock" ,python-mock)))
8466 (home-page "http://github.com/celery/py-amqp")
8467 (synopsis
8468 "Low-level AMQP client for Python (fork of amqplib)")
8469 (description
8470 "This is a fork of amqplib which was originally written by Barry Pederson.
8471It is maintained by the Celery project, and used by kombu as a pure python
8472alternative when librabbitmq is not available.")
3f641af0 8473 (license license:lgpl2.1+)
8dfceab7
CAW
8474 (properties `((python2-variant . ,(delay python2-amqp))))))
8475
8476(define-public python2-amqp
8477 (let ((amqp (package-with-python2
8478 (strip-python2-variant python-amqp))))
8479 (package
8480 (inherit amqp)
8481 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8482 ;; unmaintained. Weirdly, does not do this on the python 3
8483 ;; version?
8484 #:tests? #f
8485 ,@(package-arguments amqp)))
8486 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8487 ,@(package-native-inputs amqp))))))
7d387305
CAW
8488
8489(define-public python-kombu
8490 (package
8491 (name "python-kombu")
8492 (version "3.0.33")
8493 (source
8494 (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "kombu" version))
8497 (sha256
8498 (base32
8499 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8500 (build-system python-build-system)
8501 (native-inputs
8502 `(("python-mock" ,python-mock)
8503 ("python-nose" ,python-nose)))
8504 (propagated-inputs
8505 `(("python-anyjson" ,python-anyjson)
8506 ("python-amqp" ,python-amqp)))
8507 (home-page "http://kombu.readthedocs.org")
8508 (synopsis "Message passing library for Python")
8509 (description "The aim of Kombu is to make messaging in Python as easy as
8510possible by providing an idiomatic high-level interface for the AMQ protocol,
8511and also provide proven and tested solutions to common messaging problems.
8512AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8513message orientation, queuing, routing, reliability and security, for which the
8514RabbitMQ messaging server is the most popular implementation.")
3f641af0 8515 (license license:bsd-3)
7d387305
CAW
8516 (properties `((python2-variant . ,(delay python2-kombu))))))
8517
8518(define-public python2-kombu
8519 (let ((kombu (package-with-python2
8520 (strip-python2-variant python-kombu))))
8521 (package
8522 (inherit kombu)
8523 (inputs `(("python2-setuptools" ,python2-setuptools)
8524 ("python2-unittest2" ,python2-unittest2)
8525 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8526
8527(define-public python-billiard
8528 (package
8529 (name "python-billiard")
8530 (version "3.3.0.22")
8531 (source
8532 (origin
8533 (method url-fetch)
8534 (uri (pypi-uri "billiard" version))
8535 (sha256
8536 (base32
8537 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8538 (build-system python-build-system)
8539 (native-inputs
8540 `(("python-nose" ,python-nose)))
8541 (home-page "http://github.com/celery/billiard")
8542 (synopsis
8543 "Python multiprocessing fork with improvements and bugfixes")
8544 (description
8545 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8546multiprocessing package itself is a renamed and updated version of R Oudkerk's
8547pyprocessing package. This standalone variant is intended to be compatible with
8548Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8549 (license license:bsd-3)
b6f0b9fb
CAW
8550 (properties `((python2-variant . ,(delay python2-billiard))))))
8551
8552(define-public python2-billiard
8553 (let ((billiard (package-with-python2
8554 (strip-python2-variant python-billiard))))
8555 (package
8556 (inherit billiard)
8557 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8558 ("python2-unittest2" ,python2-unittest2)
8559 ("python2-mock" ,python2-mock)
8560 ,@(package-native-inputs billiard))))))
22df6419
CAW
8561
8562(define-public python-celery
8563 (package
8564 (name "python-celery")
8565 (version "3.1.20")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "celery" version))
8570 (sha256
8571 (base32
8572 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8573 (build-system python-build-system)
8574 (native-inputs
8575 `(("python-nose" ,python-nose)))
a64cbb6f 8576 (inputs
22df6419 8577 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8578 ("python-amqp" ,python-amqp)
8579 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8580 ("python-billiard" ,python-billiard)
8581 ("python-kombu" ,python-kombu)))
8582 (home-page "http://celeryproject.org")
8583 (synopsis "Distributed Task Queue")
8584 (description "Celery is an asynchronous task queue/job queue based on
8585distributed message passing. It is focused on real-time operation, but
8586supports scheduling as well. The execution units, called tasks, are executed
8587concurrently on a single or more worker servers using multiprocessing,
8588Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8589synchronously (wait until ready).")
3f641af0 8590 (license license:bsd-3)
22df6419
CAW
8591 (properties `((python2-variant . ,(delay python2-celery))))))
8592
8593(define-public python2-celery
8594 (let ((celery (package-with-python2
8595 (strip-python2-variant python-celery))))
8596 (package
8597 (inherit celery)
8598 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8599 ("python2-unittest2" ,python2-unittest2)
8600 ("python2-mock" ,python2-mock)
8601 ,@(package-native-inputs celery))))))
97e32948
CAW
8602
8603(define-public python-translitcodec
8604 (package
8605 (name "python-translitcodec")
8606 (version "0.4.0")
8607 (source
8608 (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "translitcodec" version))
8611 (sha256
8612 (base32
8613 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8614 (build-system python-build-system)
8615 (arguments
8616 `(#:tests? #f)) ; no tests provided
8617 (home-page
8618 "https://github.com/claudep/translitcodec")
8619 (synopsis
8620 "Unicode to 8-bit charset transliteration codec")
8621 (description
8622 "This package contains codecs for transliterating ISO 10646 texts into
8623best-effort representations using smaller coded character sets (ASCII,
8624ISO 8859, etc.).")
8625 (license license:expat)
8626 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8627
8628(define-public python2-translitcodec
8629 (package
8630 (inherit (package-with-python2
8631 (strip-python2-variant python-translitcodec)))
8632 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8633
8634(define-public python-editor
8635 (package
8636 (name "python-editor")
8637 (version "0.5")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "python-editor" version))
8642 (sha256
8643 (base32
8644 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8645 (build-system python-build-system)
8646 (home-page
8647 "https://github.com/fmoo/python-editor")
8648 (synopsis
8649 "Programmatically open an editor, capture the result")
8650 (description
8651 "python-editor is a library that provides the editor module for
8652programmatically interfacing with your system's $EDITOR.")
3f641af0 8653 (license license:asl2.0)
0c3b90d4
CAW
8654 (properties `((python2-variant . ,(delay python2-editor))))))
8655
8656(define-public python2-editor
8657 (package
8658 (inherit (package-with-python2
8659 (strip-python2-variant python-editor)))
8660 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8661
8662(define-public python-sphinxcontrib-programoutput
8663 (package
8664 (name "python-sphinxcontrib-programoutput")
8665 (version "0.8")
8666 (source (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8669 (sha256
8670 (base32
8671 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8672 (build-system python-build-system)
8673 (propagated-inputs
8674 `(("python-docutils" ,python-docutils)
8675 ("python-sphinx" ,python-sphinx)))
8676 (synopsis "Sphinx extension to include program output")
8677 (description "A Sphinx extension to literally insert the output of arbitrary
8678commands into documents, helping you to keep your command examples up to date.")
8679 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8680 (license license:bsd-2)
3276517c
LF
8681 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8682
8683(define-public python2-sphinxcontrib-programoutput
8684 (package
8685 (inherit (package-with-python2
8686 (strip-python2-variant python-sphinxcontrib-programoutput)))
8687 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8688
8689(define-public python-sphinx-repoze-autointerface
8690 (package
8691 (name "python-sphinx-repoze-autointerface")
328ae341 8692 (version "0.8")
548d7165
LF
8693 (source (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8696 (sha256
8697 (base32
328ae341 8698 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8699 (build-system python-build-system)
8700 (propagated-inputs
8701 `(("python-docutils" ,python-docutils)
8702 ("python-sphinx" ,python-sphinx)
8703 ("python-zope-interface" ,python-zope-interface)))
8704 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8705 (description "This package defines an extension for the Sphinx documentation
8706system. The extension allows generation of API documentation by
8707introspection of @code{zope.interface} instances in code.")
8708 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8709 (license license:repoze)))
548d7165
LF
8710
8711(define-public python2-sphinx-repoze-autointerface
8712 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8713
8714(define-public python-psycopg2
8715 (package
8716 (name "python-psycopg2")
8717 (version "2.6.1")
8718 (source
8719 (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "psycopg2" version))
8722 (sha256
8723 (base32
8724 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8725 (build-system python-build-system)
8726 (arguments
8727 ;; Tests would require a postgresql database "psycopg2_test"
8728 ;; and a running postgresql database management service.
8729 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8730 (inputs
8731 `(("postgresql" ,postgresql))) ; libpq
8732 (home-page "http://initd.org/psycopg/")
8733 (synopsis "Python PostgreSQL adapter")
8734 (description
8735 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 8736 (license license:lgpl3+)
b31fbea5
DM
8737 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8738
8739(define-public python2-psycopg2
8740 (package
8741 (inherit (package-with-python2
8742 (strip-python2-variant python-psycopg2)))
8743 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8744
8745(define-public python-vobject
8746 (package
8747 (name "python-vobject")
9bed9b15 8748 (version "0.9.2")
eed1a61f
LF
8749 (source (origin
8750 (method url-fetch)
8751 (uri (pypi-uri "vobject" version))
8752 (sha256
8753 (base32
9bed9b15 8754 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
8755 (build-system python-build-system)
8756 (inputs
8757 `(("python-dateutil-2" ,python-dateutil-2)
8758 ("python-pyicu" ,python-pyicu)))
8759 (synopsis "Parse and generate vCard and vCalendar files")
8760 (description "Vobject is intended to be a full featured Python package for
8761parsing and generating vCard and vCalendar files. Currently, iCalendar files
8762are supported and well tested. vCard 3.0 files are supported, and all data
8763should be imported, but only a few components are understood in a sophisticated
8764way.")
8765 (home-page "http://eventable.github.io/vobject/")
3f641af0 8766 (license license:asl2.0)
eed1a61f
LF
8767 (properties `((python2-variant . ,(delay python2-vobject))))))
8768
8769(define-public python2-vobject
8770 (package
8771 (inherit (package-with-python2
8772 (strip-python2-variant python-vobject)))
8773 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8774
8775(define-public python-munkres
8776 (package
8777 (name "python-munkres")
8778 (version "1.0.7")
8779 (source (origin
8780 (method url-fetch)
8781 (uri (pypi-uri "munkres" version))
8782 (sha256
8783 (base32
8784 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8785 (build-system python-build-system)
8786 (arguments
8787 '(#:tests? #f)) ; no test suite
8788 (home-page "http://software.clapper.org/munkres/")
8789 (synopsis "Implementation of the Munkres algorithm")
8790 (description "The Munkres module provides an implementation of the Munkres
8791algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8792useful for solving the Assignment Problem.")
3f641af0 8793 (license license:bsd-3)))
cedac813
LF
8794
8795(define-public python2-munkres
8796 (package-with-python2 python-munkres))
f3b3d78f
LF
8797
8798(define-public python-flask
8799 (package
8800 (name "python-flask")
8801 (version "0.10.1")
8802 (source (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "Flask" version))
8805 (sha256
8806 (base32
8807 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8808 (build-system python-build-system)
8809 (propagated-inputs
8810 `(("python-itsdangerous" ,python-itsdangerous)
8811 ("python-jinja2" ,python-jinja2)
8812 ("python-werkzeug" ,python-werkzeug)))
8813 (home-page "https://github.com/mitsuhiko/flask/")
8814 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8815 (description "Flask is a micro web framework based on the Werkzeug toolkit
8816and Jinja2 template engine. It is called a micro framework because it does not
8817presume or force a developer to use a particular tool or library.")
3f641af0 8818 (license license:bsd-3)
f3b3d78f
LF
8819 (properties `((python2-variant . ,(delay python2-flask))))))
8820
8821(define-public python2-flask
8822 (package (inherit (package-with-python2
8823 (strip-python2-variant python-flask)))
8824 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8825
8826(define-public python-cookies
8827 (package
8828 (name "python-cookies")
8829 (version "2.2.1")
8830 (source (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "cookies" version))
8833 (sha256
8834 (base32
8835 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8836 (build-system python-build-system)
8837 (arguments
8838 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8839 #:tests? #f))
8840 (native-inputs
8841 `(("python-pytest" ,python2-pytest)))
8842 (synopsis "HTTP cookie parser and renderer")
8843 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8844Python.")
8845 (home-page "https://gitlab.com/sashahart/cookies")
8846 (license license:expat)
8847 (properties `((python2-variant . ,(delay python2-cookies))))))
8848
8849(define-public python2-cookies
8850 (let ((cookies (package-with-python2
8851 (strip-python2-variant python-cookies))))
8852 (package (inherit cookies)
8853 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8854 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8855
8856(define-public python-responses
8857 (package
8858 (name "python-responses")
8859 (version "0.5.1")
8860 (source (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "responses" version))
8863 (sha256
8864 (base32
8865 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8866 (build-system python-build-system)
8867 (arguments
8868 `(;; Test suite is not distributed:
8869 ;; https://github.com/getsentry/responses/issues/38
8870 #:tests? #f))
8871 (native-inputs
8872 `(("python-cookies" ,python-cookies)
8873 ("python-mock" ,python-mock)))
8874 (propagated-inputs
8875 `(("python-requests" ,python-requests)
8876 ("python-six" ,python-six)))
8877 (home-page "https://github.com/getsentry/responses")
8878 (synopsis "Utility for mocking out the `requests` Python library")
8879 (description "A utility library for mocking out the `requests` Python
8880library.")
3f641af0 8881 (license license:asl2.0)
0efde7d6
LF
8882 (properties `((python2-variant . ,(delay python2-responses))))))
8883
8884(define-public python2-responses
8885 (let ((responses (package-with-python2
8886 (strip-python2-variant python-responses))))
8887 (package (inherit responses)
8888 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8889 ,@(package-native-inputs responses))))))
76b94885 8890
b7afd018
RW
8891(define-public python-whoosh
8892 (package
8893 (name "python-whoosh")
8894 (version "2.7.4")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "Whoosh" version))
8899 (sha256
8900 (base32
8901 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-setuptools" ,python-setuptools)
8905 ("python-pytest" ,python-pytest)))
8906 (home-page "http://bitbucket.org/mchaput/whoosh")
8907 (synopsis "Full text indexing, search, and spell checking library")
8908 (description
8909 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8910checking library.")
8911 (license license:bsd-2)))
8912
8913(define-public python2-whoosh
8914 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8915 (package (inherit whoosh)
8916 (propagated-inputs
8917 `(("python2-backport-ssl-match-hostname"
8918 ,python2-backport-ssl-match-hostname)
8919 ,@(package-propagated-inputs whoosh))))))
8920
76b94885
LF
8921(define-public python-pathlib
8922 (package
8923 (name "python-pathlib")
8924 (version "1.0.1")
8925 (source (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "pathlib" version))
8928 (sha256
8929 (base32
8930 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8931 (build-system python-build-system)
92a312dc
RW
8932 ;; The tests depend on the internal "test" module, which does not provide
8933 ;; a stable interface.
8934 (arguments `(#:tests? #f))
76b94885 8935 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
8936 (synopsis "Object-oriented file system paths")
8937 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
8938It offers the following advantages over using string objects:
8939
8940@enumerate
8941@item No more cumbersome use of os and os.path functions. Everything can
8942be done easily through operators, attribute accesses, and method calls.
8943@item Embodies the semantics of different path types. For example,
8944comparing Windows paths ignores casing.
8945@item Well-defined semantics, eliminating any inconsistencies or
8946ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
8947@end enumerate
8948
8949Note: In Python 3.4, pathlib is now part of the standard library. For other
8950Python versions please consider python-pathlib2 instead, which tracks the
8951standard library module. This module (python-pathlib) isn't maintained
8952anymore.")
76b94885
LF
8953 (license license:expat)))
8954
8955(define-public python2-pathlib
8956 (package-with-python2 python-pathlib))
25a7db0a 8957
b7703c81
HG
8958(define-public python2-pathlib2
8959 (package
8960 (name "python2-pathlib2")
8961 (version "2.1.0")
8962 (source (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "pathlib2" version))
8965 (sha256
8966 (base32
8967 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
8968 (build-system python-build-system)
49a531f5
HG
8969 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8970 ;; version is 3.4 which already includes this package as part of the
8971 ;; standard library.
b7703c81
HG
8972 (arguments
8973 `(#:python ,python-2))
8974 (native-inputs
8975 `(("python2-setuptools" ,python2-setuptools)
8976 ("python2-six" ,python2-six)))
8977 (home-page "http://pypi.python.org/pypi/pathlib2/")
8978 (synopsis "Object-oriented file system paths - backport of standard
8979pathlib module")
8980 (description "The goal of pathlib2 is to provide a backport of standard
8981pathlib module which tracks the standard library module, so all the newest
8982features of the standard pathlib can be used also on older Python versions.
8983
8984Pathlib offers a set of classes to handle file system paths. It offers the
8985following advantages over using string objects:
8986
8987@enumerate
8988@item No more cumbersome use of os and os.path functions. Everything can
8989be done easily through operators, attribute accesses, and method calls.
8990@item Embodies the semantics of different path types. For example,
8991comparing Windows paths ignores casing.
8992@item Well-defined semantics, eliminating any inconsistencies or
8993ambiguities (forward vs. backward slashes, etc.).
8994@end enumerate")
8995 (license license:expat)))
8996
25a7db0a
LF
8997(define-public python-jellyfish
8998 (package
8999 (name "python-jellyfish")
9000 (version "0.5.3")
9001 (source (origin
9002 (method url-fetch)
9003 (uri (pypi-uri "jellyfish" version))
9004 (sha256
9005 (base32
9006 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9007 (build-system python-build-system)
9008 (native-inputs
9009 `(("python-pytest" ,python-pytest)))
9010 (home-page "https://github.com/jamesturk/jellyfish")
9011 (synopsis "Approximate and phonetic matching of strings")
9012 (description "Jellyfish uses a variety of string comparison and phonetic
9013encoding algorithms to do fuzzy string matching.")
3f641af0 9014 (license license:bsd-2)
25a7db0a
LF
9015 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9016
9017(define-public python2-jellyfish
9018 (let ((jellyfish (package-with-python2
9019 (strip-python2-variant python-jellyfish))))
9020 (package (inherit jellyfish)
9021 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9022 ("python2-unicodecsv" ,python2-unicodecsv)
9023 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9024
9025(define-public python2-unicodecsv
9026 (package
9027 (name "python2-unicodecsv")
9028 (version "0.14.1")
9029 (source (origin
9030 (method url-fetch)
9031 ;; The test suite is not included in the PyPi release.
9032 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9033 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9034 "archive/" version ".tar.gz"))
9035 (file-name (string-append name "-" version ".tar.gz"))
9036 (sha256
9037 (base32
9038 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9039 (build-system python-build-system)
9040 (arguments
9041 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9042 #:python ,python-2))
9043 (native-inputs
9044 `(("python2-setuptools" ,python2-setuptools)
9045 ("python2-unittest2" ,python2-unittest2)))
9046 (home-page "https://github.com/jdunck/python-unicodecsv")
9047 (synopsis "Unicode CSV module for Python 2")
9048 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9049module, adding support for Unicode strings.")
3f641af0 9050 (license license:bsd-2)))
064503aa
LF
9051
9052(define-public python-rarfile
9053 (package
9054 (name "python-rarfile")
9055 (version "2.7")
9056 (source (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "rarfile" version))
9059 (sha256
9060 (base32
9061 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9062 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9063 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9064 (build-system python-build-system)
9065 (arguments
9066 '(#:phases
9067 (modify-phases %standard-phases
9068 (replace 'check
9069 ;; Many tests fail, but the installation proceeds.
9070 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9071 (native-inputs
9072 `(("which" ,which))) ; required for tests
9073 (propagated-inputs
9074 `(("libarchive" ,libarchive)))
9075 (home-page "https://github.com/markokr/rarfile")
9076 (synopsis "RAR archive reader for Python")
9077 (description "This is Python module for RAR archive reading. The interface
9078is made as zipfile like as possible.")
3f641af0 9079 (license license:isc)))
064503aa
LF
9080
9081(define-public python2-rarfile
9082 (package-with-python2 python-rarfile))
daeeea71
CM
9083
9084(define-public python-magic
9085 (package
9086 (name "python-magic")
9087 (version "0.4.3")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9092 version ".tar.gz"))
9093 (sha256
9094 (base32
9095 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9096 (file-name (string-append name "-" version "-checkout"))))
9097 (build-system python-build-system)
9098 (arguments
9099 ;; The tests are unreliable, so don't run them. The tests fail
9100 ;; under Python3 because they were written for Python2 and
9101 ;; contain import statements that do not work in Python3. One of
9102 ;; the tests fails under Python2 because its assertions are
9103 ;; overly stringent; it relies on comparing output strings which
9104 ;; are brittle and can change depending on the version of
9105 ;; libmagic being used and the system on which the test is
9106 ;; running. In my case, under GuixSD 0.10.0, only one test
9107 ;; failed, and it seems to have failed only because the version
9108 ;; of libmagic that is packaged in Guix outputs a slightly
9109 ;; different (but not wrong) string than the one that the test
9110 ;; expected.
9111 '(#:tests? #f
9112 #:phases (modify-phases %standard-phases
9113 ;; Replace a specific method call with a hard-coded
9114 ;; path to the necessary libmagic.so file in the
9115 ;; store. If we don't do this, then the method call
9116 ;; will fail to find the libmagic.so file, which in
9117 ;; turn will cause any application using
9118 ;; python-magic to fail.
9119 (add-before 'build 'hard-code-path-to-libmagic
9120 (lambda* (#:key inputs #:allow-other-keys)
9121 (let ((file (assoc-ref inputs "file")))
9122 (substitute* "magic.py"
9123 (("ctypes.util.find_library\\('magic'\\)")
9124 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9125 #t)))
9126 (add-before 'install 'disable-egg-compression
9127 (lambda _
9128 (let ((port (open-file "setup.cfg" "a")))
9129 (display "\n[easy_install]\nzip_ok = 0\n"
9130 port)
9131 (close-port port)
9132 #t))))))
daeeea71
CM
9133 (native-inputs
9134 `(("python-setuptools" ,python-setuptools)))
9135 (inputs
9136 ;; python-magic needs to be able to find libmagic.so.
9137 `(("file" ,file)))
9138 (home-page "https://github.com/ahupp/python-magic")
9139 (synopsis "File type identification using libmagic")
9140 (description
9141 "This module uses ctypes to access the libmagic file type
9142identification library. It makes use of the local magic database and
9143supports both textual and MIME-type output. Note that this module and
9144the python-file module both provide a \"magic.py\" file; these two
9145modules, which are different and were developed separately, both serve
9146the same purpose: to provide Python bindings for libmagic.")
9147 (license license:expat)))
9148
9149(define-public python2-magic
9150 (package-with-python2 python-magic))
12af303f
CM
9151
9152(define-public python2-s3cmd
9153 (package
9154 (name "python2-s3cmd")
9155 (version "1.6.1")
9156 (source
9157 (origin
9158 (method url-fetch)
de67e922 9159 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9160 "s3cmd-" version ".tar.gz"))
9161 (sha256
9162 (base32
9163 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9164 (build-system python-build-system)
9165 (arguments
9166 ;; s3cmd is written for python2 only and contains no tests.
9167 `(#:python ,python-2
9168 #:tests? #f))
9169 (native-inputs
9170 `(("python2-setuptools" ,python2-setuptools)))
9171 (inputs
9172 `(("python2-dateutil" ,python2-dateutil)
9173 ;; The python-file package also provides a magic.py module.
9174 ;; This is an unfortunate state of affairs; however, s3cmd
9175 ;; fails to install if it cannot find specifically the
9176 ;; python-magic package. Thus we include it, instead of using
9177 ;; python-file. Ironically, s3cmd sometimes works better
9178 ;; without libmagic bindings at all:
9179 ;; https://github.com/s3tools/s3cmd/issues/198
9180 ("python2-magic" ,python2-magic)))
9181 (home-page "http://s3tools.org/s3cmd")
9182 (synopsis "Command line tool for S3-compatible storage services")
9183 (description
9184 "S3cmd is a command line tool for uploading, retrieving and managing data
9185in storage services that are compatible with the Amazon Simple Storage
9186Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9187GnuPG encryption, and more. It also supports management of Amazon's
9188CloudFront content delivery network.")
3f641af0 9189 (license license:gpl2+)))
4323a5f0
AE
9190
9191(define-public python-pkgconfig
9192 (package
9193 (name "python-pkgconfig")
9194 (version "1.1.0")
9195 (source
9196 (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "pkgconfig" version))
9199 (sha256
9200 (base32
9201 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9202 (build-system python-build-system)
9203 (native-inputs
9204 `(("python-nose" ,python-nose)
9205 ("python-setuptools" ,python-setuptools)))
9206 (inputs
9207 `(("pkg-config" ,pkg-config)))
9208 (arguments
9209 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9210 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9211 #:tests? #f
9212 ;; Prevent creation of the egg. This works around
9213 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9214 #:configure-flags '("--single-version-externally-managed" "--root=/")
9215 ;; Hard-code the path to pkg-config.
9216 #:phases
9217 (modify-phases %standard-phases
9218 (add-before
9219 'build 'patch
9220 (lambda _
9221 (substitute* "pkgconfig/pkgconfig.py"
9222 (("cmd = 'pkg-config")
9223 (string-append "cmd = '" (which "pkg-config"))))
9224 #t)))))
9225 (home-page "http://github.com/matze/pkgconfig")
9226 (synopsis "Python interface for pkg-config")
9227 (description "This module provides a Python interface to pkg-config. It
9228can be used to find all pkg-config packages, check if a package exists,
9229check if a package meets certain version requirements, query CFLAGS and
9230LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9231 (license license:expat)))
4323a5f0
AE
9232
9233(define-public python2-pkgconfig
9234 (package-with-python2 python-pkgconfig))
9235
2e697322
BW
9236(define-public python-bz2file
9237 (package
9238 (name "python-bz2file")
9239 (version "0.98")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "bz2file" version))
9244 (sha256
9245 (base32
9246 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9247 (build-system python-build-system)
9248 (arguments
124df723 9249 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9250 (home-page "https://github.com/nvawda/bz2file")
9251 (synopsis "Read and write bzip2-compressed files")
9252 (description
9253 "Bz2file is a Python library for reading and writing bzip2-compressed
9254files. It contains a drop-in replacement for the I/O interface in the
9255standard library's @code{bz2} module, including features from the latest
9256development version of CPython that are not available in older releases.")
3f641af0 9257 (license license:asl2.0)
2e697322
BW
9258 (properties `((python2-variant . ,(delay python2-bz2file))))))
9259
9260(define-public python2-bz2file
9261 (let ((base (package-with-python2
9262 (strip-python2-variant python-bz2file))))
9263 (package
9264 (inherit base)
9265 (native-inputs
124df723
BW
9266 `(("python2-setuptools" ,python2-setuptools)))
9267 (arguments
752bb447
BW
9268 `(#:python ,python-2
9269 #:phases
124df723
BW
9270 (modify-phases %standard-phases
9271 ;; 'python setup.py test' does not work as of 0.98.
9272 ;; There is only the one test file, so we run it directly.
9273 (replace 'check
9274 (lambda _ (zero? (system* "python"
9275 "test_bz2file.py"))))))))))
2e697322 9276
da4ac1aa
BW
9277(define-public python-future
9278 (package
9279 (name "python-future")
9280 (version "0.15.2")
9281 (source
9282 (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "future" version))
9285 (sha256
9286 (base32
9287 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9288 (build-system python-build-system)
9289 ;; Many tests connect to the network or are otherwise flawed.
9290 ;; https://github.com/PythonCharmers/python-future/issues/210
9291 (arguments
9292 `(#:tests? #f))
9293 (home-page "http://python-future.org")
9294 (synopsis "Single-source support for Python 3 and 2")
9295 (description
9296 "@code{python-future} is the missing compatibility layer between Python 2 and
9297Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9298to support both Python 2 and Python 3 with minimal overhead.")
9299 (license license:expat)
9300 (properties `((python2-variant . ,(delay python2-future))))))
9301
9302(define-public python2-future
9303 (let ((base (package-with-python2
9304 (strip-python2-variant python-future))))
9305 (package
9306 (inherit base)
9307 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9308
8e451885
AE
9309(define-public python-cysignals
9310 (package
9311 (name "python-cysignals")
9312 (version "1.1.0")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9317 (sha256
9318 (base32
9319 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9320 (build-system python-build-system)
9321 (native-inputs
9322 `(("python-cython" ,python-cython)
9323 ("python-setuptools" ,python-setuptools)
9324 ("python-sphinx" ,python-sphinx)))
9325 (inputs
9326 `(("pari-gp" ,pari-gp)))
9327 (arguments
9328 `(#:modules ((guix build python-build-system)
9329 ((guix build gnu-build-system) #:prefix gnu:)
9330 (guix build utils))
9331 ;; FIXME: Tests are executed after installation and currently fail
9332 ;; when not installing into standard locations; the author is working
9333 ;; on a fix.
9334 #:tests? #f
9335 #:phases
9336 (modify-phases %standard-phases
9337 (add-before
9338 'build 'configure
9339 (assoc-ref gnu:%standard-phases 'configure)))))
9340 (home-page
9341 "https://github.com/sagemath/cysignals")
9342 (synopsis
9343 "Handling of interrupts and signals for Cython")
9344 (description
9345 "The cysignals package provides mechanisms to handle interrupts (and
9346other signals and errors) in Cython code, using two related approaches,
9347for mixed Cython/Python code or external C libraries and pure Cython code,
9348respectively.")
3f641af0 9349 (license license:lgpl3+)))
8e451885
AE
9350
9351(define-public python2-cysignals
9352 (package-with-python2 python-cysignals))
9353
63bcec71
DM
9354(define-public python2-shedskin
9355 (package
9356 (name "python2-shedskin")
9357 (version "0.9.4")
9358 (source
9359 (origin
9360 (method url-fetch)
9361 (uri (string-append "https://github.com/shedskin/shedskin/"
9362 "releases/download/v" version
9363 "/shedskin-" version ".tgz"))
9364 (sha256
9365 (base32
9366 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9367 (build-system python-build-system)
9368 (arguments
9369 `(#:python ,python-2
9370 #:phases (modify-phases %standard-phases
9371 (add-after 'unpack 'fix-resulting-include-libs
9372 (lambda* (#:key inputs #:allow-other-keys)
9373 (let ((libgc (assoc-ref inputs "libgc"))
9374 (pcre (assoc-ref inputs "pcre")))
9375 (substitute* "shedskin/makefile.py"
9376 (("variable == 'CCFLAGS':[ ]*")
9377 (string-append "variable == 'CCFLAGS':\n"
9378 " line += ' -I " pcre "/include"
9379 " -I " libgc "/include'"))
9380 (("variable == 'LFLAGS':[ ]*")
9381 (string-append "variable == 'LFLAGS':\n"
9382 " line += ' -L" pcre "/lib"
9383 " -L " libgc "/lib'")))
9384 #t))))))
9385 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9386 (inputs `(("pcre" ,pcre)
9387 ("libgc" ,libgc)))
9388 (home-page "https://shedskin.github.io/")
9389 (synopsis "Experimental Python-2 to C++ Compiler")
9390 (description (string-append "This is an experimental compiler for a subset of
9391Python. It generates C++ code and a Makefile."))
3f641af0 9392 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9393
9394(define-public python2-rope
9395 (package
9396 (name "python2-rope")
9397 (version "0.10.3")
9398 (source
9399 (origin
9400 (method url-fetch)
9401 (uri (pypi-uri "rope" version))
9402 (sha256
9403 (base32
9404 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9405 (arguments
9406 ;; Rope is currently python-2 only.
9407 ;; https://github.com/python-rope/rope/issues/57
9408 `(#:python ,python-2))
9409 (build-system python-build-system)
9410 (native-inputs
9411 `(("python2-unittest2" ,python2-unittest2)
9412 ("python2-setuptools" ,python2-setuptools)))
9413 (home-page "https://github.com/python-rope/rope")
9414 (synopsis "Refactoring library for Python")
9415 (description "Rope is a refactoring library for Python. It facilitates
9416the renaming, moving and extracting of attributes, functions, modules, fields
9417and parameters in Python 2 source code. These refactorings can also be applied
9418to occurences in strings and comments.")
3f641af0 9419 (license license:gpl2)))
6ba8ca17
9420
9421(define-public python-py3status
9422 (package
9423 (name "python-py3status")
d2262d70 9424 (version "3.1")
6ba8ca17
9425 (source
9426 (origin
9427 (method url-fetch)
9428 (uri (pypi-uri "py3status" version))
9429 (sha256
9430 (base32
d2262d70 9431 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
9432 (build-system python-build-system)
9433 (native-inputs
9434 `(("python-setuptools" ,python-setuptools)))
9435 (home-page "https://github.com/ultrabug/py3status")
9436 (synopsis "Extensible i3status wrapper written in Python")
9437 (description "py3status is an i3status wrapper which extends i3status
9438functionality in a modular way, allowing you to extend your panel with your
9439own code, responding to click events and updating clock every second.")
3f641af0 9440 (license license:bsd-3)))
b8fdbca3
HG
9441
9442(define-public python-tblib
9443 (package
9444 (name "python-tblib")
9445 (version "1.3.0")
9446 (source (origin
9447 (method url-fetch)
9448 (uri (pypi-uri "tblib" version))
9449 (sha256 (base32
9450 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9451 (build-system python-build-system)
9452 (arguments
9453 `(#:phases
9454 (modify-phases %standard-phases
9455 (replace 'check
9456 (lambda _
9457 ;; Upstream runs tests after installation and the package itself
9458 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9459 ;; found.
9460 (setenv "PYTHONPATH"
9461 (string-append (getcwd) "/build/lib:"
9462 (getenv "PYTHONPATH")))
9463 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9464 (native-inputs
9465 `(("python-pytest" ,python-pytest)
9466 ("python-setuptools" ,python-setuptools)
9467 ("python-six" ,python-six)))
9468 (home-page "https://github.com/ionelmc/python-tblib")
9469 (synopsis "Traceback serialization library")
9470 (description
9471 "Traceback serialization allows you to:
9472
9473@enumerate
9474@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9475different processes. This allows better error handling when running code over
9476multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9477
9478@item Parse traceback strings and raise with the parsed tracebacks.
9479@end itemize")
3f641af0 9480 (license license:bsd-3)))
b8fdbca3
HG
9481
9482(define-public python2-tblib
9483 (package-with-python2 python-tblib))
1a024de4
HG
9484
9485(define-public python-sqlparse
9486 (package
9487 (name "python-sqlparse")
9488 (version "0.1.19")
9489 (source (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "sqlparse" version))
9492 (sha256
9493 (base32
9494 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9495 (build-system python-build-system)
9496 (arguments
9497 `(#:phases
9498 (modify-phases %standard-phases
9499 (replace 'check
9500 (lambda* _
9501 ;; setup.py-integrated 2to3 only affects the build files, but
9502 ;; py.test is using the source files. So we need to convert them
9503 ;; manually.
9504 (when (zero? (system* "python3"))
9505 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9506 (zero? (system* "py.test")))))))
9507 (native-inputs
9508 `(("python-pytest" ,python-pytest)
9509 ("python-setuptools" ,python-setuptools)))
9510 (home-page "https://github.com/andialbrecht/sqlparse")
9511 (synopsis "Non-validating SQL parser")
9512 (description "Sqlparse is a non-validating SQL parser for Python. It
9513provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9514 (license license:bsd-3)))
1a024de4
HG
9515
9516(define-public python2-sqlparse
9517 (package-with-python2 python-sqlparse))
68b9d242
SB
9518
9519(define-public python-greenlet
9520 (package
9521 (name "python-greenlet")
9522 (version "0.4.9")
9523 (source (origin
9524 (method url-fetch)
9525 (uri (pypi-uri "greenlet" version))
9526 (sha256
9527 (base32
9528 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9529 (build-system python-build-system)
9530 (native-inputs
9531 `(("python-setuptools" ,python-setuptools)))
9532 (home-page "https://greenlet.readthedocs.io/")
9533 (synopsis "Lightweight in-process concurrent programming")
9534 (description
9535 "Greenlet package is a spin-off of Stackless, a version of CPython
9536that supports micro-threads called \"tasklets\". Tasklets run
9537pseudo-concurrently (typically in a single or a few OS-level threads) and
9538are synchronized with data exchanges on \"channels\".")
3f641af0 9539 (license (list license:psfl license:expat))))
68b9d242
SB
9540
9541(define-public python2-greenlet
9542 (package-with-python2 python-greenlet))
d79a343b
SB
9543
9544(define-public python-gevent
9545 (package
9546 (name "python-gevent")
9547 (version "1.1.1")
9548 (source (origin
9549 (method url-fetch)
9550 (uri (pypi-uri "gevent" version))
9551 (sha256
9552 (base32
9553 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9554 (modules '((guix build utils)))
9555 (snippet
9556 '(begin
9557 ;; unbunding libev and c-ares
9558 (for-each delete-file-recursively '("libev" "c-ares"))
9559 ;; fixing testsuite
9560 (call-with-output-file "greentest/__init__.py" noop)
9561 (substitute* "greentest/testrunner.py"
9562 (("import util") "from . import util")
9563 (("from util import log") "from .util import log"))))))
9564 (build-system python-build-system)
9565 (propagated-inputs
9566 `(("python-greenlet" ,python-greenlet)))
9567 (native-inputs
9568 `(("python-setuptools" ,python-setuptools)
9569 ("python-six" ,python-six)))
9570 (inputs
9571 `(("c-ares" ,c-ares)
9572 ("libev" ,libev)))
9573 (home-page "http://www.gevent.org/")
9574 (synopsis "Coroutine-based network library")
9575 (description
9576 "gevent is a coroutine-based Python networking library that uses greenlet
9577to provide a high-level synchronous API on top of the libev event loop.")
9578 (license license:expat)))
9579
9580(define-public python2-gevent
9581 (package-with-python2 python-gevent))
da3aeeb6
SB
9582
9583(define-public python-twisted
9584 (package
9585 (name "python-twisted")
9586 (version "16.2.0")
9587 (source (origin
9588 (method url-fetch)
8ea8e8d3 9589 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9590 (sha256
9591 (base32
9592 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9593 (build-system python-build-system)
9594 (native-inputs
45912170
SB
9595 `(("python-setuptools" ,python-setuptools)))
9596 (propagated-inputs
9597 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9598 (home-page "https://twistedmatrix.com/")
9599 (synopsis "Asynchronous networking framework written in Python")
9600 (description
9601 "Twisted is an extensible framework for Python programming, with special
9602focus on event-based network programming and multiprotocol integration.")
9603 (license license:expat)))
9604
9605(define-public python2-twisted
9606 (package-with-python2 python-twisted))
d0b6fed6 9607
4d3fa5a4
EF
9608(define-public python-pika
9609 (package
9610 (name "python-pika")
9611 (version "0.10.0")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "pika" version))
9616 (sha256
9617 (base32
9618 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9619 (build-system python-build-system)
9620 (native-inputs
269d9172
LF
9621 `(("python-pyev" ,python-pyev)
9622 ("python-tornado" ,python-tornado)
9623 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
9624 (home-page "https://pika.readthedocs.org")
9625 (synopsis "Pure Python AMQP Client Library")
9626 (description
9627 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9628Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9629network support library.")
9630 (license license:bsd-3)))
9631
9632(define-public python2-pika
9633 (package-with-python2 python-pika))
9634
d0b6fed6
DM
9635(define-public python-ply
9636 (package
9637 (name "python-ply")
9638 (version "3.8")
9639 (source
9640 (origin
9641 (method url-fetch)
9642 (uri (string-append
9643 "https://pypi.python.org/packages/"
9644 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9645 "/ply-" version ".tar.gz"))
9646 (sha256
9647 (base32
9648 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9649 (build-system python-build-system)
9650 (home-page "http://www.dabeaz.com/ply/")
9651 (synopsis "Python Lex & Yacc")
9652 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9653It uses LR parsing and does extensive error checking.")
3f641af0 9654 (license license:bsd-3)
d0b6fed6
DM
9655 (properties `((python2-variant . ,(delay python2-ply))))))
9656
9657(define-public python2-ply
9658 (package
9659 (inherit (package-with-python2
9660 (strip-python2-variant python-ply)))
9661 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9662
9663(define-public python-tabulate
9664 (package
9665 (name "python-tabulate")
9666 (version "0.7.5")
9667 (source (origin
9668 (method url-fetch)
9669 (uri (pypi-uri "tabulate" version))
9670 (sha256
9671 (base32
9672 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9673 ;; Fix tests
9674 (modules '((guix build utils)))
9675 (snippet '(substitute* '("test/test_cli.py"
9676 "test/test_input.py"
9677 "test/test_output.py"
9678 "test/test_regression.py")
9679 (("from common") "from nose.tools")))))
9680 (build-system python-build-system)
9681 (native-inputs
9682 `(("python-setuptools" ,python-setuptools)
9683 ;; For testing
9684 ("python-nose" ,python-nose)))
9685 (home-page "https://bitbucket.org/astanin/python-tabulate")
9686 (synopsis "Pretty-print tabular data")
9687 (description
9688 "Tabulate is a library and command-line utility to pretty-print tabular
9689data in Python.")
9690 (license license:expat)))
9691
9692(define-public python2-tabulate
9693 (package-with-python2 python-tabulate))
1c4c8a33
SB
9694
9695(define-public python-kazoo
9696 (package
9697 (name "python-kazoo")
9698 (version "2.2.1")
9699 (source
9700 (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "kazoo" version))
9703 (sha256
9704 (base32
9705 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9706 (build-system python-build-system)
9707 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9708 (native-inputs
c18899e8
SB
9709 `(("python-setuptools" ,python-setuptools)))
9710 (propagated-inputs
9711 `(("python-six" ,python-six)))
1c4c8a33
SB
9712 (home-page "https://kazoo.readthedocs.org")
9713 (synopsis "High-level Zookeeper client library")
9714 (description
9715 "Kazoo is a Python client library for the Apache Zookeeper distributed
9716application service. It is designed to be easy to use and to avoid common
9717programming errors.")
3f641af0 9718 (license license:asl2.0)))
1c4c8a33
SB
9719
9720(define-public python2-kazoo
9721 (package-with-python2 python-kazoo))
45dda35e
SB
9722
9723(define-public python-pykafka
9724 (package
9725 (name "python-pykafka")
9726 (version "2.4.0")
9727 (source (origin
9728 (method url-fetch)
c6bccf71
EF
9729 (uri (string-append
9730 "https://pypi.python.org/packages/8b/3e/"
9731 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9732 "pykafka-" version ".tar.gz"))
45dda35e
SB
9733 (sha256
9734 (base32
9735 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9736 (build-system python-build-system)
9737 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9738 (native-inputs
c8fa3d9b
SB
9739 `(("python-setuptools" ,python-setuptools)))
9740 (propagated-inputs
45dda35e
SB
9741 `(("python-gevent" ,python-gevent)
9742 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9743 ("python-tabulate" ,python-tabulate)))
9744 (inputs
9745 `(("librdkafka" ,librdkafka)))
9746 (home-page "https://pykafka.readthedocs.io/")
9747 (synopsis "Apache Kafka client for Python")
9748 (description
9749 "PyKafka is a client for the Apache Kafka distributed messaging system.
9750It includes Python implementations of Kafka producers and consumers, which
9751are optionally backed by a C extension built on librdkafka.")
3f641af0 9752 (license license:asl2.0)))
45dda35e
SB
9753
9754(define-public python2-pykafka
9755 (package-with-python2 python-pykafka))
a44fd439
DM
9756
9757(define-public python-wcwidth
9758 (package
9759 (name "python-wcwidth")
9760 (version "0.1.6")
9761 (source
9762 (origin
9763 (method url-fetch)
9764 (uri (string-append
9765 "https://pypi.python.org/packages/"
9766 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9767 "wcwidth-" version ".tar.gz"))
9768 (sha256
9769 (base32
9770 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9771 (build-system python-build-system)
9772 (home-page "https://github.com/jquast/wcwidth")
66e07664 9773 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9774 (description "Wcwidth measures the number of terminal column cells of
9775wide-character codes. It is useful for those implementing a terminal emulator,
9776or programs that carefully produce output to be interpreted by one. It is a
9777Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9778specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
9779 (license license:expat)
9780 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
9781
9782(define-public python2-wcwidth
9783 (package
9784 (inherit (package-with-python2
9785 (strip-python2-variant python-wcwidth)))
9786 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
9787
9788(define-public python2-jsonrpclib
9789 (package
9790 (name "python2-jsonrpclib")
9791 (version "0.1.7")
9792 (source (origin
9793 (method url-fetch)
9794 (uri (string-append
9795 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9796 "jsonrpclib-" version ".tar.gz"))
9797 (sha256
9798 (base32
9799 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9800 (build-system python-build-system)
9801 (native-inputs
9802 `(("python2-setuptools" ,python2-setuptools)))
9803 (arguments
9804 `(#:tests? #f
9805 #:python ,python-2))
9806 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9807 (synopsis "Implementation of JSON-RPC specification for Python")
9808 (description
9809 "This library is an implementation of the JSON-RPC specification.
9810It supports both the original 1.0 specification, as well as the
9811new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9812etc.")
3f641af0 9813 (license license:asl2.0)))
9250b0f3
SB
9814
9815(define-public python-chai
9816 (package
9817 (name "python-chai")
9818 (version "1.1.1")
9819 (source (origin
9820 (method url-fetch)
9821 (uri (pypi-uri "chai" version))
9822 (sha256
9823 (base32
9824 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9825 (build-system python-build-system)
9826 (native-inputs
9827 `(("python-setuptools" ,python-setuptools)))
9828 (home-page "https://github.com/agoragames/chai")
9829 (synopsis "Mocking framework for Python")
9830 (description
9831 "Chai provides an api for mocking, stubbing and spying your python
9832objects, patterned after the Mocha library for Ruby.")
3f641af0 9833 (license license:bsd-3)))
9250b0f3
SB
9834
9835(define-public python2-chai
9836 (package-with-python2 python-chai))
9837
ae43baa8
SB
9838(define-public python-arrow
9839 (package
9840 (name "python-arrow")
9841 (version "0.8.0")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "arrow" version))
9845 (sha256
9846 (base32
9847 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9848 (build-system python-build-system)
9849 (native-inputs
9850 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
9851 ;; For testing
9852 ("python-chai" ,python-chai)
9853 ("python-simplejson" ,python-simplejson)))
36aed736
SB
9854 (propagated-inputs
9855 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
9856 (home-page "https://github.com/crsmithdev/arrow/")
9857 (synopsis "Dates and times for Python")
9858 (description
9859 "Arrow is a Python library to creating, manipulating, formatting and
9860converting dates, times, and timestamps. It implements and updates the
9861datetime type.")
3f641af0 9862 (license license:asl2.0)))
ae43baa8
SB
9863
9864(define-public python2-arrow
9865 (package-with-python2 python-arrow))
9866
1f2b62a4
SB
9867(define-public python-inflection
9868 (package
9869 (name "python-inflection")
9870 (version "0.3.1")
9871 (source
9872 (origin (method url-fetch)
9873 (uri (pypi-uri "inflection" version))
9874 (sha256
9875 (base32
9876 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9877 (build-system python-build-system)
9878 (native-inputs
9879 `(("python-setuptools" ,python-setuptools)))
9880 (home-page "http://github.com/jpvanhal/inflection")
9881 (synopsis "Python string transformation library")
9882 (description
9883 "Inflection is a string transformation library. It singularizes
9884and pluralizes English words, and transforms strings from CamelCase to
9885underscored string.")
9886 (license license:expat)))
9887
9888(define-public python2-inflection
9889 (package-with-python2 python-inflection))
9890
18995566
SB
9891(define-public python-pylev
9892 (package
9893 (name "python-pylev")
9894 (version "1.3.0")
9895 (source (origin
9896 (method url-fetch)
9897 (uri (pypi-uri "pylev" version))
9898 (sha256
9899 (base32
9900 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9901 (build-system python-build-system)
9902 (native-inputs
9903 `(("python-setuptools" ,python-setuptools)))
9904 (home-page "http://github.com/toastdriven/pylev")
9905 (synopsis "Levenshtein distance implementation in Python")
9906 (description "Pure Python Levenshtein implementation, based off the
9907Wikipedia code samples at
9908@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 9909 (license license:bsd-3)))
18995566
SB
9910
9911(define-public python2-pylev
9912 (package-with-python2 python-pylev))
9913
f5deff7a
SB
9914(define-public python-cleo
9915 (package
9916 (name "python-cleo")
9917 (version "0.4.1")
9918 (source (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "cleo" version))
9921 (sha256
9922 (base32
9923 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9924 (build-system python-build-system)
9925 (native-inputs
9403150a 9926 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
9927 ;; For testing
9928 ("python-mock" ,python-mock)
9929 ("python-pytest" ,python-pytest)))
9403150a
SB
9930 (propagated-inputs
9931 `(("python-psutil" ,python-psutil)
9932 ("python-pylev" ,python-pylev)))
f5deff7a
SB
9933 (home-page "https://github.com/sdispater/cleo")
9934 (synopsis "Command-line arguments library for Python")
9935 (description
9936 "Cleo allows you to create command-line commands with signature in
9937docstring and colored output.")
9938 (license license:expat)))
9939
9940(define-public python2-cleo
9941 (package-with-python2 python-cleo))
9942
77cadb43
SB
9943(define-public python-lazy-object-proxy
9944 (package
9945 (name "python-lazy-object-proxy")
9946 (version "1.2.2")
9947 (source (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "lazy-object-proxy" version))
9950 (sha256
9951 (base32
9952 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9953 (build-system python-build-system)
9954 (native-inputs
9955 `(("python-setuptools" ,python-setuptools)))
9956 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9957 (synopsis "Lazy object proxy for python")
9958 (description
9959 "Lazy object proxy is an object that wraps a callable but defers the call
9960until the object is actually required, and caches the result of said call.")
3f641af0 9961 (license license:bsd-2)))
77cadb43
SB
9962
9963(define-public python2-lazy-object-proxy
9964 (package-with-python2 python-lazy-object-proxy))
9965
5477e05f
SB
9966(define-public python-dnspython
9967 (package
9968 (name "python-dnspython")
6c514128 9969 (version "1.15.0")
5477e05f
SB
9970 (source (origin
9971 (method url-fetch)
9972 (uri (string-append "http://www.dnspython.org/kits/"
9973 version "/dnspython-" version ".tar.gz"))
9974 (sha256
9975 (base32
6c514128 9976 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
9977 (build-system python-build-system)
9978 (arguments '(#:tests? #f)) ; XXX: requires internet access
9979 (native-inputs
9980 `(("python-setuptools" ,python-setuptools)))
9981 (home-page "http://www.dnspython.org")
9982 (synopsis "DNS toolkit for Python")
9983 (description
9984 "dnspython is a DNS toolkit for Python. It supports almost all record
9985types. It can be used for queries, zone transfers, and dynamic updates.
9986It supports TSIG authenticated messages and EDNS0.")
9987 (license license:expat)))
9988
9989(define-public python2-dnspython
9990 (package-with-python2 python-dnspython))
9991
22711e25
SB
9992(define-public python-email-validator
9993 (package
9994 (name "python-email-validator")
9995 (version "1.0.1")
9996 (source
9997 (origin (method url-fetch)
9998 (uri (pypi-uri "email_validator" version))
9999 (sha256
10000 (base32
10001 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10002 (build-system python-build-system)
10003 (arguments
10004 '(#:phases
10005 (modify-phases %standard-phases
10006 (add-before 'build 'use-dnspython
10007 (lambda _
10008 (substitute* "setup.py"
10009 (("dnspython3") "dnspython"))
10010 #t)))))
10011 (native-inputs
d42560bd
SB
10012 `(("python-setuptools" ,python-setuptools)))
10013 (propagated-inputs
22711e25 10014 `(("python-dnspython" ,python-dnspython)
d42560bd 10015 ("python-idna" ,python-idna)))
22711e25
SB
10016 (home-page "https://github.com/JoshData/python-email-validator")
10017 (synopsis "Email address validation library for Python")
10018 (description
10019 "This library validates email address syntax and deliverability.")
3f641af0 10020 (license license:cc0)))
22711e25
SB
10021
10022(define-public python2-email-validator
10023 (package-with-python2 python-email-validator))
10024
8987d91e
SB
10025(define-public python-ukpostcodeparser
10026 (package
10027 (name "python-ukpostcodeparser")
10028 (version "1.0.3")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "UkPostcodeParser" version))
10032 (sha256
10033 (base32
10034 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10035 (build-system python-build-system)
10036 (native-inputs
10037 `(("python-setuptools" ,python-setuptools)))
10038 (home-page "https://github.com/hamstah/ukpostcodeparser")
10039 (synopsis "UK Postcode parser for Python")
10040 (description
10041 "This library provides the @code{parse_uk_postcode} function for
10042parsing UK postcodes.")
10043 (license license:expat)))
10044
10045(define-public python2-ukpostcodeparser
10046 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10047
10048(define-public python-fake-factory
10049 (package
10050 (name "python-fake-factory")
7adc698f 10051 (version "0.7.2")
ea92ae01
SB
10052 (source (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "fake-factory" version))
10055 (sha256
10056 (base32
7adc698f 10057 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10058 (build-system python-build-system)
ea92ae01 10059 (native-inputs
bbcd7297 10060 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
10061 ;; For testing
10062 ("python-email-validator" ,python-email-validator)
10063 ("python-mock" ,python-mock)
10064 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10065 (propagated-inputs
10066 `(("python-dateutil" ,python-dateutil-2)
10067 ("python-six" ,python-six)))
7adc698f 10068 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10069 (synopsis "Python package that generates fake data")
10070 (description
10071 "Faker is a Python package that generates fake data such as names,
10072addresses, and phone numbers.")
10073 (license license:expat)
10074 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10075
10076(define-public python2-fake-factory
10077 (let ((base (package-with-python2 (strip-python2-variant
10078 python-fake-factory))))
10079 (package
10080 (inherit base)
24c9aa18 10081 (propagated-inputs
ea92ae01 10082 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10083 ,@(package-propagated-inputs base))))))
ea92ae01 10084
b49504fd
SB
10085(define-public python-pyaml
10086 (package
10087 (name "python-pyaml")
10088 (version "15.8.2")
10089 (source (origin
10090 (method url-fetch)
10091 (uri (pypi-uri "pyaml" version))
10092 (sha256
10093 (base32
10094 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10095 (build-system python-build-system)
10096 (native-inputs
10097 `(("python-setuptools" ,python-setuptools)))
10098 (propagated-inputs
10099 `(("python-pyyaml" ,python-pyyaml)))
10100 (home-page "https://github.com/mk-fg/pretty-yaml")
10101 (synopsis "YAML pretty-print library for Python")
10102 (description
10103 "pyaml is a PyYAML based python module to produce pretty and readable
10104YAML-serialized data.")
3f641af0 10105 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10106
10107(define-public python2-pyaml
10108 (package-with-python2 python-pyaml))
10109
347175a2
SB
10110(define-public python-flexmock
10111 (package
10112 (name "python-flexmock")
10113 (version "0.10.2")
10114 (source (origin
10115 (method url-fetch)
10116 (uri (pypi-uri "flexmock" version))
10117 (sha256
10118 (base32
10119 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10120 (build-system python-build-system)
10121 (native-inputs
10122 `(("python-setuptools" ,python-setuptools)))
10123 (home-page "https://flexmock.readthedocs.org")
10124 (synopsis "Testing library for Python")
10125 (description
10126 "flexmock is a testing library for Python that makes it easy to create
10127mocks, stubs and fakes.")
3f641af0 10128 (license license:bsd-3)))
347175a2
SB
10129
10130(define-public python2-flexmock
10131 (package-with-python2 python-flexmock))
10132
5a744191
SB
10133(define-public python-orator
10134 (package
10135 (name "python-orator")
10136 (version "0.8.2")
10137 (source (origin
10138 (method url-fetch)
10139 (uri (pypi-uri "orator" version))
10140 (sha256
10141 (base32
10142 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10143 (build-system python-build-system)
10144 (arguments '(#:tests? #f)) ; no tests
10145 (native-inputs
b2676030
SB
10146 `(("python-setuptools" ,python-setuptools)))
10147 (propagated-inputs
5a744191
SB
10148 `(("python-arrow" ,python-arrow)
10149 ("python-blinker" ,python-blinker)
10150 ("python-cleo" ,python-cleo)
10151 ("python-fake-factory" ,python-fake-factory)
10152 ("python-inflection" ,python-inflection)
10153 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10154 ("python-pyaml" ,python-pyaml)
5a744191
SB
10155 ("python-simplejson" ,python-simplejson)
10156 ("python-wrapt" ,python-wrapt)))
10157 (home-page "https://orator-orm.com/")
10158 (synopsis "ActiveRecord ORM for Python")
10159 (description
10160 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10161implementation for Python.")
10162 (license license:expat)
10163 (properties `((python2-variant . ,(delay python2-orator))))))
10164
10165(define-public python2-orator
10166 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10167 (package
10168 (inherit base)
06961617 10169 (propagated-inputs
5a744191 10170 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10171 ,@(package-propagated-inputs base))))))
f4155188
DM
10172
10173(define-public python-prompt-toolkit
10174 (package
10175 (name "python-prompt-toolkit")
d15e2ef0 10176 (version "1.0.7")
f4155188
DM
10177 (source
10178 (origin
10179 (method url-fetch)
d15e2ef0 10180 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10181 (sha256
10182 (base32
d15e2ef0 10183 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10184 (build-system python-build-system)
bae18710
LF
10185 (arguments
10186 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f4155188
DM
10187 (inputs `(("python-wcwidth" ,python-wcwidth)
10188 ("python-pygments" ,python-pygments)))
10189 (native-inputs `(("python-six" ,python-six)))
10190 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10191 (synopsis "Library for building command line interfaces in Python")
10192 (description
10193 "Prompt-Toolkit is a library for building interactive command line
10194interfaces in Python. It's like GNU Readline but it also features syntax
10195highlighting while typing, out-of-the-box multi-line input editing, advanced
10196code completion, incremental search, support for Chinese double-width
10197characters, mouse support, and auto suggestions.")
3f641af0 10198 (license license:bsd-3)
f4155188
DM
10199 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10200
10201(define-public python2-prompt-toolkit
10202 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10203 (package
10204 (inherit base)
10205 (native-inputs
10206 `(("python2-setuptools" ,python2-setuptools)
10207 ,@(package-native-inputs base))))))
a502dfbf
DM
10208
10209(define-public python-jedi
10210 (package
10211 (name "python-jedi")
10212 (version "0.9.0")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "jedi" version))
10217 (sha256
10218 (base32
10219 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10220 (build-system python-build-system)
10221 (home-page "https://github.com/davidhalter/jedi")
10222 (synopsis
10223 "Autocompletion for Python that can be used for text editors")
10224 (description
10225 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10226 (license license:expat)
10227 (properties `((python2-variant . ,(delay python2-jedi))))))
10228
10229(define-public python2-jedi
10230 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10231 (package
10232 (inherit base)
10233 (native-inputs
10234 `(("python2-setuptools" ,python2-setuptools)
10235 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10236
10237(define-public ptpython
10238 (package
10239 (name "ptpython")
10240 (version "0.34")
10241 (source (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "ptpython" version))
10244 (sha256
10245 (base32
10246 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10247 (build-system python-build-system)
10248 (inputs
10249 `(("python-docopt" ,python-docopt)
10250 ("python-jedi" ,python-jedi)
10251 ("python-prompt-toolkit" ,python-prompt-toolkit)
10252 ("python-pygments" ,python-pygments)
10253 ("python-setuptools" ,python-setuptools)))
10254 (home-page "https://github.com/jonathanslenders/ptpython")
10255 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10256 (description
10257 "ptpython is a Python read-eval-print loop with IDE-like features.
10258It supports syntax highlighting, multiline editing, autocompletion, mouse,
10259color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10260etc.")
3f641af0 10261 (license license:bsd-3)
c2f0dc6e
DM
10262 (properties `((python2-variant . ,(delay ptpython-2))))))
10263
10264(define-public ptpython-2
10265 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10266 (package
10267 (inherit base)
10268 (name "ptpython2"))))
b227f0be 10269
b04a52a6
DJ
10270(define-public python-requests-oauthlib
10271 (package
10272 (name "python-requests-oauthlib")
10273 (version "0.6.2")
10274 (source
10275 (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "requests-oauthlib" version))
10278 (sha256
10279 (base32
10280 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10281 (build-system python-build-system)
10282 (arguments
10283 `(#:phases
10284 (modify-phases %standard-phases
10285 ;; removes tests that require network access
10286 (add-before 'check 'pre-check
10287 (lambda _
10288 (delete-file "tests/test_core.py")
10289 #t)))))
10290 (native-inputs
10291 `(("python-requests-mock" ,python-requests-mock)
10292 ("python-mock" ,python-mock)))
10293 (inputs
10294 `(("python-oauthlib" ,python-oauthlib)
10295 ("python-requests" ,python-requests)))
10296 (home-page
10297 "https://github.com/requests/requests-oauthlib")
10298 (synopsis
10299 "OAuthlib authentication support for Requests")
10300 (description
10301 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10302provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10303 (license license:isc)
10304 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10305
10306(define-public python2-requests-oauthlib
10307 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10308 (package
10309 (inherit base)
10310 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10311 ,@(package-native-inputs base))))))
10312
b227f0be 10313(define-public python-stem
10314 (package
10315 (name "python-stem")
10316 (version "1.4.1b")
10317 (source
10318 (origin
10319 (method url-fetch)
10320 (uri (pypi-uri "stem" version ".tar.bz2"))
10321 (sha256
10322 (base32
10323 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10324 (build-system python-build-system)
10325 (arguments
10326 `(#:phases
10327 (modify-phases %standard-phases
10328 (replace 'check
10329 (lambda _
10330 (zero? (system* "./run_tests.py" "--unit")))))))
10331 (native-inputs
10332 `(("python-mock" ,python-mock)
10333 ("python-pep8" ,python-pep8)
10334 ("python-pyflakes" ,python-pyflakes)))
10335 (inputs
10336 `(("python-pycrypto" ,python-pycrypto)))
10337 (home-page "https://stem.torproject.org/")
10338 (synopsis
10339 "Python controller library that allows applications to interact with Tor")
10340 (description
10341 "Stem is a Python controller library for Tor. With it you can use Tor's
10342control protocol to script against the Tor process and read descriptor data
10343relays publish about themselves.")
3f641af0 10344 (license license:lgpl3)))
b227f0be 10345
10346(define-public python2-stem
10347 (package-with-python2 python-stem))
517a6c0c
DM
10348
10349(define-public python-pyserial
10350 (package
10351 (name "python-pyserial")
10352 (version "3.1.1")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "pyserial" version))
10357 (sha256
10358 (base32
10359 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10360 (build-system python-build-system)
10361 (home-page
10362 "https://github.com/pyserial/pyserial")
10363 (synopsis "Python Serial Port Bindings")
10364 (description "@code{pyserial} provide serial port bindings for Python. It
10365supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10366and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10367 (license license:bsd-3)
517a6c0c
DM
10368 (properties `((python2-variant . ,(delay python2-pyserial))))))
10369
10370(define-public python2-pyserial
10371 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10372 (package
10373 (inherit base)
10374 (native-inputs
10375 `(("python2-setuptools" ,python2-setuptools)
10376 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10377
10378(define-public python-kivy
10379 (package
10380 (name "python-kivy")
10381 (version "1.9.1")
10382 (source
10383 (origin
10384 (method url-fetch)
10385 (uri (pypi-uri "kivy" version))
10386 (file-name (string-append name "-" version ".tar.gz"))
10387 (sha256
10388 (base32
10389 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10390 (build-system python-build-system)
10391 (arguments
10392 `(#:tests? #f ; Tests require many optional packages
10393 #:phases
10394 (modify-phases %standard-phases
10395 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10396 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10397 (lambda* (#:key inputs #:allow-other-keys)
10398 (setenv "KIVY_SDL2_PATH"
10399 (string-append (assoc-ref inputs "sdl-union")
10400 "/include/SDL2"))
10401 #t)))))
10402 (native-inputs
10403 `(("pkg-config" ,pkg-config)))
10404 (inputs
10405 `(("python-cython" ,python-cython)
10406 ("gstreamer" ,gstreamer)
10407 ("mesa" ,mesa)
10408 ("sdl-union"
10409 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10410 (home-page "http://kivy.org")
10411 (synopsis
10412 "Multitouch application framework")
10413 (description
10414 "A software library for rapid development of
10415hardware-accelerated multitouch applications.")
10416 (license license:expat)))
10417
10418(define-public python2-kivy
10419 (package-with-python2 python-kivy))
10420
10421(define-public python-kivy-next
10422 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10423 (revision "1"))
10424 (package (inherit python-kivy)
10425 (name "python-kivy-next")
d80a71eb 10426 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10427 (string-take commit 7)))
10428 (source
10429 (origin
10430 (method git-fetch)
10431 (uri (git-reference
10432 (url "https://github.com/kivy/kivy")
10433 (commit commit)))
10434 (file-name (string-append name "-" version "-checkout"))
10435 (sha256
10436 (base32
10437 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10438
10439(define-public python2-kivy-next
10440 (package-with-python2 python-kivy-next))
8794bd8b
DC
10441
10442(define-public python-binaryornot
10443 (package
10444 (name "python-binaryornot")
10445 (version "0.4.0")
10446 (source (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "binaryornot" version))
10449 (sha256
10450 (base32
10451 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10452 (build-system python-build-system)
10453 (inputs
10454 `(("python-chardet" ,python-chardet)
10455 ("python-hypothesis" ,python-hypothesis)))
10456 (home-page "https://github.com/audreyr/binaryornot")
10457 (synopsis "Package to check if a file is binary or text")
10458 (description "Ultra-lightweight pure Python package to check if a file is
10459binary or text.")
10460 (license license:bsd-3)
10461 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10462
10463(define-public python2-binaryornot
10464 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10465 (package (inherit base)
10466 (native-inputs
10467 `(("python2-setuptools" ,python2-setuptools)
10468 ,@(package-native-inputs base)))
10469 (inputs
10470 `(("python2-enum34" ,python2-enum34)
10471 ,@(package-inputs base))))))
a9ac982a
DC
10472
10473(define-public python-nltk
10474 (package
10475 (name "python-nltk")
10476 (version "3.2.1")
10477 (source (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "nltk" version))
10480 (sha256
10481 (base32
10482 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10483 (build-system python-build-system)
59f12985
LF
10484 (arguments
10485 '(;; The tests require some extra resources to be downloaded.
10486 ;; TODO Try packaging these resources.
10487 #:tests? #f))
a9ac982a
DC
10488 (home-page "http://nltk.org/")
10489 (synopsis "Natural Language Toolkit")
10490 (description "It provides interfaces to over 50 corpora and lexical
10491resources such as WordNet, along with a suite of text processing libraries
10492for classification, tokenization, stemming, tagging, parsing, and semantic
10493reasoning, wrappers for natural language processing libraries.")
10494 (license license:asl2.0)
10495 (properties `((python2-variant . ,(delay python2-nltk))))))
10496
10497(define-public python2-nltk
10498 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10499 (package (inherit base)
10500 (native-inputs
10501 `(("python2-setuptools" ,python2-setuptools)
10502 ,@(package-native-inputs base))))))
691cd90d
DC
10503
10504(define-public python-pymongo
10505 (package
10506 (name "python-pymongo")
10507 (version "3.3.0")
10508 (source (origin
10509 (method url-fetch)
10510 (uri (pypi-uri "pymongo" version))
10511 (sha256
10512 (base32
10513 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10514 (build-system python-build-system)
10515 (inputs
10516 `(("python-certifi" ,python-certifi)))
10517 (home-page "http://github.com/mongodb/mongo-python-driver")
10518 (synopsis "Python driver for MongoDB")
10519 (description "Python driver for MongoDB.")
10520 (license license:asl2.0)
10521 (properties `((python2-variant . ,(delay python2-pymongo))))))
10522
10523(define-public python2-pymongo
10524 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10525 (package (inherit base)
10526 (native-inputs
10527 `(("python2-setuptools" ,python2-setuptools)
10528 ,@(package-native-inputs base))))))
6a6c9d43
DC
10529
10530(define-public python-sh
10531 (package
10532 (name "python-sh")
10533 (version "1.11")
10534 (source (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "sh" version))
10537 (sha256
10538 (base32
10539 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10540 (build-system python-build-system)
10541 (arguments
10542 `(#:tests? #f)) ; no tests
10543 (home-page "https://github.com/amoffat/sh")
10544 (synopsis "Python subprocess interface")
10545 (description "Abstracts process invocation by providing a function
10546interface for programs.")
10547 (license license:expat)
10548 (properties `((python2-variant . ,(delay python2-sh))))))
10549
10550(define-public python2-sh
10551 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10552 (package (inherit base)
10553 (native-inputs
10554 `(("python2-setuptools" ,python2-setuptools)
10555 ,@(package-native-inputs base))))))
05b59190 10556
25702397
EF
10557(define-public python-consul
10558 (package
10559 (name "python-consul")
10560 (version "0.6.1")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "python-consul" version))
10565 (sha256
10566 (base32
10567 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10568 (build-system python-build-system)
10569 (native-inputs
10570 `(("python-pytest" ,python-pytest)
10571 ("python-requests" ,python-requests)
10572 ("python-six" ,python-six)))
10573 (home-page "https://github.com/cablehead/python-consul")
10574 (synopsis "Python client for Consul")
10575 (description
10576 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10577discovery, monitoring and configuration.")
10578 (license license:expat)))
10579
10580(define-public python2-consul
10581 (let ((consul (package-with-python2 python-consul)))
10582 (package (inherit consul)
10583 (native-inputs
10584 `(("python2-setuptools" ,python2-setuptools)
10585 ,@(package-native-inputs consul))))))
10586
05b59190
DC
10587(define-public python-schematics
10588 (package
10589 (name "python-schematics")
10590 (version "1.1.1")
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (string-append
10595 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10596 (file-name (string-append name "-" version ".tar.gz"))
10597 (sha256
10598 (base32
10599 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10600 (build-system python-build-system)
10601 (inputs
10602 `(("python-six" ,python-six)))
10603 (arguments
10604 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10605 ; version requirements (eg python-coveralls)
10606 (home-page "https://github.com/schematics/schematics")
10607 (synopsis "Python Data Structures for Humans")
10608 (description "Python Data Structures for Humans.")
10609 (license license:bsd-3)
10610 (properties `((python2-variant . ,(delay python2-schematics))))))
10611
10612(define-public python2-schematics
10613 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10614 (package (inherit base)
10615 (native-inputs
10616 `(("python2-setuptools" ,python2-setuptools)
10617 ,@(package-native-inputs base))))))
d6907ff7
DC
10618
10619(define-public python-publicsuffix
10620 (package
10621 (name "python-publicsuffix")
10622 (version "1.1.0")
10623 (source (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "publicsuffix" version))
10626 (sha256
10627 (base32
10628 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10629 (build-system python-build-system)
10630 (arguments
10631 `(#:tests? #f)) ; tests use the internet
10632 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10633 (synopsis "Get suffix for a domain name")
10634 (description "Get a public suffix for a domain name using the Public Suffix
10635List.")
10636 (license license:expat)
10637 (properties `((python2-variant . ,(delay python2-nltk))))))
10638
10639(define-public python2-publicsuffix
10640 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10641 (package (inherit base)
10642 (native-inputs
10643 `(("python2-setuptools" ,python2-setuptools)
10644 ,@(package-native-inputs base))))))
b2319996
DC
10645
10646(define-public python-publicsuffix2
10647 (package
10648 (name "python-publicsuffix2")
10649 (version "2.20160621")
10650 (source
10651 (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10654 (sha256
10655 (base32
10656 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10657 (build-system python-build-system)
10797a0a
LF
10658 (arguments
10659 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10660 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10661 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10662 (description "Get a public suffix for a domain name using the Public Suffix
10663List. Forked from and using the same API as the publicsuffix package.")
10664 (license (list license:expat license:mpl2.0))
10665 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10666
10667(define-public python2-publicsuffix2
10668 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10669 (package (inherit base)
10670 (native-inputs
10671 `(("python2-setuptools" ,python2-setuptools)
10672 ,@(package-native-inputs base))))))
81f1515d
DC
10673
10674(define-public python-url
10675 (package
10676 (name "python-url")
10677 (version "0.2.0")
10678 (source (origin
10679 (method url-fetch)
10680 (uri (pypi-uri "url" version))
10681 (sha256
10682 (base32
10683 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10684 (build-system python-build-system)
10685 (inputs
10686 `(("python-publicsuffix" ,python-publicsuffix)))
10687 (native-inputs
10688 `(("python-coverage" ,python-coverage)
10689 ("python-nose" ,python-nose)))
10690 (arguments
10691 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10692 (home-page "http://github.com/seomoz/url-py")
10693 (synopsis "URL Parsing")
10694 (description "Library for parsing urls.")
10695 (license license:expat)
10696 (properties `((python2-variant . ,(delay python2-url))))))
10697
10698(define-public python2-url
10699 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10700 (package (inherit base)
10701 (inputs
10702 `(("python2-publicsuffix" ,python2-publicsuffix)))
10703 (native-inputs
10704 `(("python2-setuptools" ,python2-setuptools)
10705 ,@(package-native-inputs base))))))
974ee2c1
TS
10706
10707(define-public python-freezegun
10708 (package
10709 (name "python-freezegun")
10710 (version "0.3.7")
10711 (source
10712 (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "freezegun" version))
10715 (sha256
10716 (base32
10717 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10718 (build-system python-build-system)
10719 (native-inputs
10720 `(("python-mock" ,python-mock)
10721 ("python-nose" ,python-nose)
10722 ("python-coverage" ,python-coverage)
10723 ("python-dateutil-2" ,python-dateutil-2)))
10724 (inputs
10725 `(("python-six" ,python-six)))
10726 (arguments
10727 `(#:phases (modify-phases %standard-phases
10728 ;; The tests are normally executed via `make test`, but the PyPi
10729 ;; package does not include the Makefile.
10730 (replace 'check
10731 (lambda _
10732 (zero? (system* "nosetests" "./tests/")))))))
10733 (home-page "https://github.com/spulec/freezegun")
10734 (synopsis "Test utility for mocking the datetime module")
10735 (description
10736 "FreezeGun is a library that allows your python tests to travel through
10737time by mocking the datetime module.")
10738 (license license:asl2.0)))
10739
10740(define-public python2-freezegun
10741 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10742 (package (inherit base)
10743 (native-inputs
10744 `(("python2-setuptools" ,python2-setuptools)
10745 ,@(package-native-inputs base))))))
dddcb25c
MB
10746
10747(define-public python-odfpy
10748 (package
10749 (name "python-odfpy")
10750 (version "1.3.3")
10751 (source (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "odfpy" version))
10754 (sha256
10755 (base32
10756 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10757 (arguments
10758 `(#:modules ((srfi srfi-1)
10759 (guix build python-build-system)
10760 (guix build utils))
10761 #:phases
10762 (modify-phases %standard-phases
10763 (replace 'check
10764 ;; The test runner invokes python2 and python3 for test*.py.
10765 ;; To avoid having both in inputs, we replicate it here.
10766 (lambda _
10767 (every (lambda (test-file)
10768 (zero? (system* "python" test-file)))
10769 (find-files "tests" "^test.*\\.py$")))))))
10770 (build-system python-build-system)
10771 (home-page "https://github.com/eea/odfpy")
10772 (synopsis "Python API and tools to manipulate OpenDocument files")
10773 (description "Collection of libraries and utility programs written in
10774Python to manipulate OpenDocument 1.2 files.")
10775 (license
10776 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10777 ;; number of files with other licenses.
10778 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10779
10780(define-public python2-odfpy
10781 (package-with-python2 python-odfpy))
b30565bd
MB
10782
10783(define-public python-cachecontrol
10784 (package
10785 (name "python-cachecontrol")
10786 (version "0.11.6")
10787 (source
10788 (origin
10789 (method url-fetch)
10790 ;; Pypi does not have tests.
10791 (uri (string-append
10792 "https://github.com/ionrock/cachecontrol/archive/v"
10793 version ".tar.gz"))
10794 (file-name (string-append name "-" version ".tar.gz"))
10795 (sha256
10796 (base32
10797 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10798 (build-system python-build-system)
10799 (arguments
10800 `(#:phases
10801 (modify-phases %standard-phases
10802 (replace 'check
10803 (lambda _
10804 ;; Drop test that requires internet access.
10805 (delete-file "tests/test_regressions.py")
10806 (setenv "PYTHONPATH"
10807 (string-append (getcwd) "/build/lib:"
10808 (getenv "PYTHONPATH")))
10809 (zero? (system* "py.test" "-vv")))))))
10810 (native-inputs
10811 `(("python-pytest" ,python-pytest)
10812 ("python-redis" ,python-redis)
10813 ("python-webtest" ,python-webtest)
10814 ("python-mock" ,python-mock)))
10815 (propagated-inputs
10816 `(("python-requests" ,python-requests)
10817 ("python-lockfile" ,python-lockfile)))
10818 (home-page "https://github.com/ionrock/cachecontrol")
10819 (synopsis "The httplib2 caching algorithms for use with requests")
10820 (description "CacheControl is a port of the caching algorithms in
10821@code{httplib2} for use with @code{requests} session objects.")
10822 (license license:asl2.0)
dd447621 10823 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
10824
10825(define-public python2-cachecontrol
10826 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10827 (package (inherit base)
10828 (native-inputs
10829 `(("python2-setuptools" ,python2-setuptools)
10830 ,@(package-native-inputs base))))))
243db824
DM
10831
10832(define-public python-lit
10833 (package
10834 (name "python-lit")
10835 (version "0.5.0")
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "lit" version))
10840 (sha256
10841 (base32
10842 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10843 (build-system python-build-system)
10844 (home-page "http://llvm.org/")
10845 (synopsis "LLVM Software Testing Tool")
10846 (description "@code{lit} is a portable tool for executing LLVM and Clang
10847style test suites, summarizing their results, and providing indication of
10848failures.")
10849 (license license:ncsa)
10850 (properties `((python2-variant . ,(delay python2-lit))))))
10851
10852(define-public python2-lit
10853 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10854 (package
10855 (inherit base)
10856 (native-inputs
10857 `(("python2-setuptools" ,python2-setuptools)
10858 ,@(package-native-inputs base))))))
66f95b20
MB
10859
10860(define-public python-pytest-pep8
10861 (package
10862 (name "python-pytest-pep8")
10863 (version "1.0.6")
10864 (source (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "pytest-pep8" version))
10867 (sha256
10868 (base32
10869 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10870 (build-system python-build-system)
10871 (arguments
10872 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10873 ;; Prevent creation of the egg. This works around
10874 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10875 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10876 (native-inputs
10877 `(("python-pytest" ,python-pytest)))
10878 (propagated-inputs
10879 `(("python-pep8" ,python-pep8)))
10880 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10881 (synopsis "Py.test plugin to check PEP8 requirements")
10882 (description "Pytest plugin for checking PEP8 compliance.")
10883 (license license:expat)
10884 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10885
10886(define-public python2-pytest-pep8
10887 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10888 (package (inherit base)
10889 (native-inputs
10890 `(("python2-setuptools" ,python2-setuptools)
10891 ,@(package-native-inputs base))))))
df94a6b5
MB
10892
10893(define-public python-pytest-flakes
10894 (package
10895 (name "python-pytest-flakes")
10896 (version "1.0.1")
10897 (source (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "pytest-flakes" version))
10900 (sha256
10901 (base32
10902 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10903 (build-system python-build-system)
10904 (arguments
10905 `(;; Prevent creation of the egg. This works around
10906 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10907 #:configure-flags '("--single-version-externally-managed" "--root=/")
10908 #:phases
10909 (modify-phases %standard-phases
10910 (delete 'check)
10911 (add-after 'install 'check
10912 (lambda _ ; It's easier to run tests after install.
10913 (zero? (system* "py.test" "-vv")))))))
10914 (native-inputs
10915 `(("python-coverage" ,python-coverage)
10916 ("python-pytest" ,python-pytest)
10917 ("python-pytest-cache" ,python-pytest-cache)
10918 ("python-pytest-pep8" ,python-pytest-pep8)))
10919 (propagated-inputs
10920 `(("python-pyflakes" ,python-pyflakes)))
10921 (home-page "https://github.com/fschulze/pytest-flakes")
10922 (synopsis "Py.test plugin to check source code with pyflakes")
10923 (description "Pytest plugin for checking Python source code with pyflakes.")
10924 (license license:expat)
10925 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10926
10927(define-public python2-pytest-flakes
10928 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10929 (package (inherit base)
10930 (native-inputs
10931 `(("python2-setuptools" ,python2-setuptools)
10932 ,@(package-native-inputs base))))))
5467ea62
MB
10933
10934(define-public python-natsort
10935 (package
10936 (name "python-natsort")
10937 (version "5.0.1")
10938 (source (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "natsort" version))
10941 (sha256
10942 (base32
10943 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10944 (build-system python-build-system)
10945 (arguments
10946 `(#:phases
10947 (modify-phases %standard-phases
10948 (add-before 'check 'set-cachedir
10949 ;; Tests require write access to $HOME by default
10950 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10951 (native-inputs
10952 `(("python-hypothesis" ,python-hypothesis)
10953 ("python-pytest-cache" ,python-pytest-cache)
10954 ("python-pytest-cov" ,python-pytest-cov)
10955 ("python-pytest-flakes" ,python-pytest-flakes)
10956 ("python-pytest-pep8" ,python-pytest-pep8)))
10957 (propagated-inputs ; TODO: Add python-fastnumbers.
10958 `(("python-pyicu" ,python-pyicu)))
10959 (home-page "https://github.com/SethMMorton/natsort")
10960 (synopsis "Natural sorting for python and shell")
10961 (description
10962 "Natsort lets you apply natural sorting on lists instead of
10963lexicographical. If you use the built-in @code{sorted} method in python
10964on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10965returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10966function @code{natsorted} that identifies numbers and sorts them separately
10967from strings. It can also sort version numbers, real numbers, mixed types
10968and more, and comes with a shell command @command{natsort} that exposes this
10969functionality in the command line.")
10970 (license license:expat)
10971 (properties `((python2-variant . ,(delay python2-natsort))))))
10972
10973(define-public python2-natsort
10974 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10975 (package (inherit base)
10976 (native-inputs
10977 `(("python2-setuptools" ,python2-setuptools)
10978 ("python2-pathlib" ,python2-pathlib)
10979 ("python2-mock" ,python2-mock)
10980 ("python2-enum34" ,python2-enum34)
10981 ,@(package-native-inputs base))))))
4efb9c54
SR
10982
10983(define-public python-glances
10984 (package
10985 (name "python-glances")
10986 (version "2.7.1")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "Glances" version))
10991 (sha256
10992 (base32
10993 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10994 (build-system python-build-system)
10995 (inputs
10996 `(("python-psutil" ,python-psutil)))
10997 (home-page
10998 "https://github.com/nicolargo/glances")
10999 (synopsis
11000 "A cross-platform curses-based monitoring tool")
11001 (description
11002 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11003Glances uses the PsUtil library to get information from your system. It monitors
11004CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11005 (license license:lgpl3+)
11006 (properties `((python2-variant . ,(delay python2-glances))))))
11007
11008(define-public python2-glances
11009 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11010 (package
11011 (inherit base)
11012 (native-inputs
11013 `(("python2-setuptools" ,python2-setuptools)
11014 ,@(package-native-inputs base))))))
05b7a593
EF
11015
11016(define-public python-graphql-core
11017 (package
11018 (name "python-graphql-core")
11019 (version "0.5.3")
11020 (source
11021 (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "graphql-core" version))
11024 (sha256
11025 (base32
11026 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11027 (build-system python-build-system)
11028 (arguments
11029 `(#:phases
11030 (modify-phases %standard-phases
11031 (add-after 'unpack 'patch-hardcoded-version
11032 (lambda _ (substitute*
11033 "setup.py"
11034 (("'gevent==1.1rc1'") "'gevent'"))
11035 #t)))))
11036 (native-inputs
11037 `(("python-gevent" ,python-gevent)
11038 ("python-mock" ,python-mock)
11039 ("python-pytest-mock" ,python-pytest-mock)))
11040 (inputs
11041 `(("python-promise" ,python-promise)
11042 ("python-six" ,python-six)))
11043 (home-page "https://github.com/graphql-python/graphql-core")
11044 (synopsis "GraphQL implementation for Python")
11045 (description
11046 "GraphQL implementation for Python. GraphQL is a data query language and
11047runtime designed and used to request and deliver data to mobile and web apps.
11048This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11049to Python.")
11050 (properties `((python2-variant . ,(delay python2-graphql-core))))
11051 (license license:expat)))
11052
11053(define-public python2-graphql-core
11054 (let ((base (package-with-python2
11055 (strip-python2-variant python-graphql-core))))
11056 (package (inherit base)
11057 (native-inputs
11058 `(("python2-setuptools" ,python2-setuptools)
11059 ,@(package-native-inputs base))))))
7ee51575
EF
11060
11061(define-public python-graphql-relay
11062 (package
11063 (name "python-graphql-relay")
11064 (version "0.4.4")
11065 (source
11066 (origin
11067 (method url-fetch)
11068 (uri (pypi-uri "graphql-relay" version))
11069 (sha256
11070 (base32
11071 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11072 (build-system python-build-system)
11073 (native-inputs
11074 `(("python-pytest" ,python-pytest)))
11075 (inputs
11076 `(("python-graphql-core" ,python-graphql-core)
11077 ("python-promise" ,python-promise)
11078 ("python-six" ,python-six)))
11079 (home-page "https://github.com/graphql-python/graphql-relay-py")
11080 (synopsis "Relay implementation for Python")
11081 (description
11082 "This is a library to allow the easy creation of Relay-compliant servers
11083using the GraphQL Python reference implementation of a GraphQL server. It
11084should be noted that the code is a exact port of the original
11085@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11086from Facebook.")
11087 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11088 (license license:expat)))
11089
11090(define-public python2-graphql-relay
11091 (let ((base (package-with-python2
11092 (strip-python2-variant python-graphql-relay))))
11093 (package (inherit base)
11094 (native-inputs
11095 `(("python2-setuptools" ,python2-setuptools)
11096 ,@(package-native-inputs base))))))
ddc63a56
EF
11097
11098(define-public python-graphene
11099 (package
11100 (name "python-graphene")
11101 (version "0.10.2")
11102 (source
11103 (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "graphene" version))
11106 (sha256
11107 (base32
11108 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11109 (build-system python-build-system)
11110 (native-inputs
11111 `(("python-django-filter" ,python-django-filter)
11112 ("python-mock" ,python-mock)
11113 ("python-psycopg2" ,python-psycopg2)
11114 ("python-pytest-django" ,python-pytest-django)
11115 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11116 (inputs
11117 `(("python-graphql-core" ,python-graphql-core)
11118 ("python-graphql-relay" ,python-graphql-relay)
11119 ("python-iso8601" ,python-iso8601)
11120 ("python-promise" ,python-promise)
11121 ("python-six" ,python-six)))
11122 (home-page "http://graphene-python.org/")
11123 (synopsis "GraphQL Framework for Python")
11124 (description
11125 "Graphene is a Python library for building GraphQL schemas/types.
11126A GraphQL schema describes your data model, and provides a GraphQL server
11127with an associated set of resolve methods that know how to fetch data.")
11128 (properties `((python2-variant . ,(delay python2-graphene))))
11129 (license license:expat)))
11130
11131(define-public python2-graphene
11132 (let ((base (package-with-python2
11133 (strip-python2-variant python-graphene))))
11134 (package (inherit base)
11135 (native-inputs
11136 `(("python2-setuptools" ,python2-setuptools)
11137 ("python2-sqlalchemy" ,python2-sqlalchemy)
11138 ,@(package-native-inputs base))))))
d488d5d6
EF
11139
11140(define-public python-nautilus
11141 (package
11142 (name "python-nautilus")
11143 (version "0.4.9")
11144 (source
11145 (origin
11146 (method url-fetch)
11147 (uri (pypi-uri "nautilus" version))
11148 (sha256
11149 (base32
11150 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11151 (build-system python-build-system)
11152 (arguments `(#:tests? #f)) ; fails to import test modules
11153 (native-inputs
11154 `(("python-setuptools" ,python-setuptools)))
11155 (inputs
11156 `(("python-bcrypt" ,python-bcrypt)
11157 ("python-click" ,python-click)
11158 ("python-consul" ,python-consul)
11159 ("python-graphql-core" ,python-graphql-core)
11160 ("python-graphql-relay" ,python-graphql-relay)
11161 ("python-graphene" ,python-graphene)
11162 ("python-jinja2" ,python-jinja2)
11163 ("python-nose2" ,python-nose2)
11164 ("python-peewee" ,python-peewee)
11165 ("python-pika" ,python-pika)
11166 ("python-pycparser" ,python-pycparser)
11167 ("python-requests" ,python-requests)
11168 ("python-tornado" ,python-tornado)
11169 ("python-wtforms" ,python-wtforms)))
11170 (home-page "https://github.com/AlecAivazis/nautilus")
11171 (synopsis "Library for creating microservice applications")
11172 (description
11173 "Nautilus is a framework for flux based microservices that looks to
11174provide extendible implementations of common aspects of a cloud so that you can
11175focus on building massively scalable web applications.")
11176 (license license:expat)))
94cffc63
LF
11177
11178(define-public python-s3transfer
11179 (package
11180 (name "python-s3transfer")
11181 (version "0.1.8")
11182 (source (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "s3transfer" version))
11185 (sha256
11186 (base32
11187 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11188 (build-system python-build-system)
11189 (native-inputs
11190 `(("python-docutils" ,python-docutils)))
11191 (inputs
11192 `(("python-botocore" ,python-botocore)))
11193 (synopsis "Amazon S3 Transfer Manager")
11194 (description "S3transfer is a Python library for managing Amazon S3
11195transfers.")
11196 (home-page "https://github.com/boto/s3transfer")
11197 (license license:asl2.0)
11198 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11199
11200(define-public python2-s3transfer
11201 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11202 (package
11203 (inherit base)
11204 (native-inputs
11205 `(("python2-futures" ,python2-futures)
11206 ("python2-setuptools" ,python2-setuptools)
11207 ,@(package-native-inputs base))))))
8ab59181
HG
11208
11209(define-public python-setproctitle
11210(package
11211 (name "python-setproctitle")
11212 (version "1.1.10")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "setproctitle" version))
11217 (sha256
11218 (base32
11219 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11220 (build-system python-build-system)
11221 (arguments
11222 '(#:phases
11223 (modify-phases %standard-phases
11224 (add-before 'check 'patch-Makefile
11225 ;; Stricly this is only required for the python2 variant.
11226 ;; But adding a phase in an inherited package seems to be
11227 ;; cumbersum. So we patch even for python3.
11228 (lambda _
11229 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11230 (when nose
11231 (substitute* "Makefile"
11232 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11233 (string-append nose "/bin/nosetests "))))
11234 #t)))
11235 (replace 'check
11236 (lambda _
11237 (setenv "PYTHON" (or (which "python3") (which "python")))
11238 (setenv "PYCONFIG" (or (which "python3-config")
11239 (which "python-config")))
11240 (setenv "CC" "gcc")
11241 ;; No need to extend PYTHONPATH to find the built package, since
11242 ;; the Makefile will build anyway
11243 (zero? (system* "make" "check")))))))
11244 (native-inputs
11245 `(("procps" ,procps))) ; required for tests
11246 (home-page
11247 "https://github.com/dvarrazzo/py-setproctitle")
11248 (synopsis
11249 "Setproctitle implementation for Python to customize the process title")
11250 (description "The library allows a process to change its title (as displayed
11251by system tools such as ps and top).
11252
11253Changing the title is mostly useful in multi-process systems, for
11254example when a master process is forked: changing the children's title
11255allows to identify the task each process is busy with. The technique
11256is used by PostgreSQL and the OpenSSH Server for example.")
11257 (license license:bsd-3)
11258 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11259
11260(define-public python2-setproctitle
11261 (let ((base (package-with-python2
11262 (strip-python2-variant python-setproctitle))))
11263 (package
11264 (inherit base)
11265 (native-inputs `(("python2-nose" ,python2-nose)
11266 ,@(package-native-inputs base))))))
162e42d8
HG
11267
11268(define-public python-validictory
11269 (package
11270 (name "python-validictory")
11271 (version "1.0.1")
11272 (source
11273 (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "validictory" version))
11276 (sha256
11277 (base32
11278 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11279 (build-system python-build-system)
11280 (arguments
11281 '(#:phases
11282 (modify-phases %standard-phases
11283 (add-after 'unpack 'bootstrap
11284 ;; Move the tests out of the package directory to avoid
11285 ;; packaging them.
11286 (lambda* _
11287 (rename-file "validictory/tests" "tests")
11288 (delete-file "tests/__init__.py")))
11289 (replace 'check
11290 (lambda _
11291 ;; Extend PYTHONPATH so the built package will be found.
11292 (setenv "PYTHONPATH"
11293 (string-append (getcwd) "/build/lib:"
11294 (getenv "PYTHONPATH")))
11295 (zero? (system* "py.test" "-vv" )))))))
11296 (native-inputs
11297 `(("python-pytest" ,python-pytest)))
11298 (home-page
11299 "https://github.com/jamesturk/validictory")
11300 (synopsis "General purpose Python data validator")
11301 (description "It allows validation of arbitrary Python data structures.
11302
11303The schema format is based on the JSON Schema
11304proposal (http://json-schema.org), so combined with json the library is also
11305useful as a validator for JSON data.")
7ca68304
EF
11306 (license license:expat)
11307 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
11308
11309(define-public python2-validictory
7ca68304
EF
11310 (let ((base (package-with-python2
11311 (strip-python2-variant python-validictory))))
11312 (package
11313 (inherit base)
11314 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11315 ,@(package-native-inputs base))))))
0990edfe
DM
11316
11317(define-public python-aniso8601
11318 (package
11319 (name "python-aniso8601")
11320 (version "1.1.0")
11321 (source
11322 (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "aniso8601" version))
11325 (sha256
11326 (base32
11327 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11328 (build-system python-build-system)
11329 (propagated-inputs
11330 `(("python-dateutil-2" ,python-dateutil-2)))
11331 (home-page
11332 "https://bitbucket.org/nielsenb/aniso8601")
11333 (synopsis
11334 "Python library for parsing ISO 8601 strings")
11335 (description
11336 "This package contains a library for parsing ISO 8601 datetime strings.")
11337 (license license:bsd-3)))
999d964d
DM
11338
11339(define-public python-flask-restful
11340 (package
11341 (name "python-flask-restful")
11342 (version "0.3.5")
11343 (source
11344 (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "Flask-RESTful" version))
11347 (sha256
11348 (base32
11349 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11350 (build-system python-build-system)
11351 (propagated-inputs
11352 `(("python-aniso8601" ,python-aniso8601)
11353 ("python-flask" ,python-flask)
11354 ("python-pycrypto" ,python-pycrypto)
11355 ("python-pytz" ,python-pytz)))
11356 (native-inputs
11357 `(;; Optional dependency of Flask. Tests need it.
11358 ("python-blinker" ,python-blinker)
11359 ("python-mock" ,python-mock) ; For tests
11360 ("python-nose" ,python-nose) ; For tests
11361 ("python-sphinx" ,python-sphinx)))
11362 (home-page
11363 "https://www.github.com/flask-restful/flask-restful/")
11364 (synopsis
11365 "Flask module for creating REST APIs")
11366 (description
11367 "This package contains a Flask module for creating REST APIs.")
11368 (license license:bsd-3)))
31288222
DM
11369
11370(define-public python-flask-basicauth
11371 (package
11372 (name "python-flask-basicauth")
11373 (version "0.2.0")
11374 (source
11375 (origin
11376 (method url-fetch)
11377 (uri (pypi-uri "Flask-BasicAuth" version))
11378 (sha256
11379 (base32
11380 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11381 (build-system python-build-system)
11382 (propagated-inputs
11383 `(("python-flask" ,python-flask)))
11384 (home-page
11385 "https://github.com/jpvanhal/flask-basicauth")
11386 (synopsis
11387 "HTTP basic access authentication for Flask")
11388 (description
11389 "This package provides HTTP basic access authentication for Flask.")
11390 (license license:bsd-3)))
903276d0
DM
11391
11392(define-public python-flask-sqlalchemy
11393 (package
11394 (name "python-flask-sqlalchemy")
11395 (version "2.1")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (pypi-uri "Flask-SQLAlchemy" version))
11400 (sha256
11401 (base32
11402 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11403 (build-system python-build-system)
11404 (propagated-inputs
11405 `(("python-flask" ,python-flask)
11406 ("python-sqlalchemy" ,python-sqlalchemy)))
11407 (home-page
11408 "http://github.com/mitsuhiko/flask-sqlalchemy")
11409 (synopsis
11410 "Module adding SQLAlchemy support to your Flask application")
11411 (description
11412 "This package adds SQLAlchemy support to your Flask application.")
11413 (license license:bsd-3)))
329b4b3b
LF
11414
11415(define-public python-pyev
11416 (package
11417 (name "python-pyev")
11418 (version "0.9.0")
11419 (source
11420 (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "pyev" version))
11423 (sha256
11424 (base32
11425 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11426 (build-system python-build-system)
11427 (arguments
11428 `(#:tests? #f ; no test suite
11429 #:phases
11430 (modify-phases %standard-phases
11431 (add-after 'unpack 'patch
11432 (lambda* (#:key inputs #:allow-other-keys)
11433 (let ((libev (string-append (assoc-ref inputs "libev")
11434 "/lib/libev.so.4")))
11435 (substitute* "setup.py"
11436 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11437 (string-append "libev_dll_name = \"" libev "\"")))))))))
11438 (inputs
11439 `(("libev" ,libev)))
11440 (home-page "http://pythonhosted.org/pyev/")
11441 (synopsis "Python libev interface")
11442 (description "Pyev provides a Python interface to libev.")
11443 (license license:gpl3)))
11444
11445(define-public python2-pyev
11446 (package-with-python2 python-pyev))
45b4f127
DM
11447
11448(define-public python-imagesize
11449 (package
11450 (name "python-imagesize")
11451 (version "0.7.1")
11452 (source
11453 (origin
11454 (method url-fetch)
11455 (uri (pypi-uri "imagesize" version))
11456 (sha256
11457 (base32
11458 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11459 (build-system python-build-system)
11460 (home-page "https://github.com/shibukawa/imagesize_py")
11461 (synopsis "Gets image size of files in variaous formats in Python")
11462 (description
11463 "This package allows determination of image size from
11464PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11465 (license license:expat)
11466 (properties `((python2-variant . ,(delay python2-imagesize))))))
11467
11468(define-public python2-imagesize
11469 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
11470 (package
11471 (inherit base)
11472 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11473 ,@(package-native-inputs base))))))