tests: Test installation with a RAID root partition.
[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>
a01b6da7
NK
32;;;
33;;; This file is part of GNU Guix.
34;;;
35;;; GNU Guix is free software; you can redistribute it and/or modify it
36;;; under the terms of the GNU General Public License as published by
37;;; the Free Software Foundation; either version 3 of the License, or (at
38;;; your option) any later version.
39;;;
40;;; GNU Guix is distributed in the hope that it will be useful, but
41;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43;;; GNU General Public License for more details.
44;;;
45;;; You should have received a copy of the GNU General Public License
46;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
1ffa7090 48(define-module (gnu packages python)
3f641af0 49 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 50 #:use-module (gnu packages)
8e451885 51 #:use-module (gnu packages algebra)
d79a343b 52 #:use-module (gnu packages adns)
89b2e0b0 53 #:use-module (gnu packages attr)
d96034ed 54 #:use-module (gnu packages backup)
1ffa7090 55 #:use-module (gnu packages compression)
4ed20663 56 #:use-module (gnu packages databases)
ddc63a56 57 #:use-module (gnu packages django)
5e1c9367 58 #:use-module (gnu packages file)
4ed20663 59 #:use-module (gnu packages fontutils)
4ed20663
AE
60 #:use-module (gnu packages gcc)
61 #:use-module (gnu packages ghostscript)
6eb7af2a 62 #:use-module (gnu packages gl)
4ed20663 63 #:use-module (gnu packages glib)
6eb7af2a 64 #:use-module (gnu packages gstreamer)
4ed20663 65 #:use-module (gnu packages gtk)
421a80a2 66 #:use-module (gnu packages icu4c)
c937562e 67 #:use-module (gnu packages image)
4ed20663 68 #:use-module (gnu packages imagemagick)
d79a343b 69 #:use-module (gnu packages libevent)
b10ab723 70 #:use-module (gnu packages libffi)
89b2e0b0 71 #:use-module (gnu packages linux)
0da98533 72 #:use-module (gnu packages maths)
4ed20663 73 #:use-module (gnu packages multiprecision)
45203542 74 #:use-module (gnu packages networking)
be7134bf 75 #:use-module (gnu packages ncurses)
b04a52a6 76 #:use-module (gnu packages openstack)
d488d5d6 77 #:use-module (gnu packages password-utils)
c9b1b4f9 78 #:use-module (gnu packages pcre)
4ed20663 79 #:use-module (gnu packages perl)
b10ab723 80 #:use-module (gnu packages pkg-config)
4ed20663 81 #:use-module (gnu packages readline)
6eb7af2a 82 #:use-module (gnu packages sdl)
c9b1b4f9 83 #:use-module (gnu packages statistics)
8f9ac901 84 #:use-module (gnu packages tex)
1c65314c 85 #:use-module (gnu packages texinfo)
cc2b77df 86 #:use-module (gnu packages tls)
e25f0174 87 #:use-module (gnu packages version-control)
8d12be1e 88 #:use-module (gnu packages web)
ce0614dd 89 #:use-module (gnu packages base)
26b307e2 90 #:use-module (gnu packages xml)
6fa14469 91 #:use-module (gnu packages xorg)
0bdc1671 92 #:use-module (gnu packages xdisorg)
4ed20663 93 #:use-module (gnu packages zip)
afa181ff 94 #:use-module (gnu packages tcl)
63bcec71 95 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
96 #:use-module (guix packages)
97 #:use-module (guix download)
ea5456c8 98 #:use-module (guix git-download)
11bb85a1 99 #:use-module (guix utils)
acc26ff1 100 #:use-module (guix build-system gnu)
d8c4998f 101 #:use-module (guix build-system cmake)
898238b9 102 #:use-module (guix build-system python)
1c65314c
FB
103 #:use-module (guix build-system trivial)
104 #:use-module (srfi srfi-1))
a01b6da7 105
45848023 106(define-public python-2.7
a01b6da7
NK
107 (package
108 (name "python")
e7e7a1eb 109 (version "2.7.11")
a01b6da7
NK
110 (source
111 (origin
112 (method url-fetch)
9b43a0ff 113 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
114 version "/Python-" version ".tar.xz"))
115 (sha256
116 (base32
e7e7a1eb 117 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
c3052d6b
ML
118 (patches (search-patches "python-2.7-search-paths.patch"
119 "python-2-deterministic-build-info.patch"
120 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
121 (modules '((guix build utils)))
122 ;; suboptimal to delete failing tests here, but if we delete them in the
123 ;; arguments then we need to make sure to strip out that phase when it
124 ;; gets inherited by python and python-minimal.
125 (snippet
126 '(begin
127 (for-each delete-file
128 '("Lib/test/test_compileall.py"
129 "Lib/test/test_distutils.py"
130 "Lib/test/test_import.py"
131 "Lib/test/test_shutil.py"
132 "Lib/test/test_socket.py"
1bb163b0 133 "Lib/test/test_subprocess.py"))
10a42aa2 134 #t))))
02f0c3b2
LC
135 (outputs '("out"
136 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 137 (build-system gnu-build-system)
3fdc99da 138 (arguments
10a42aa2 139 `(;; 356 tests OK.
e7e7a1eb
EF
140 ;; 6 tests failed:
141 ;; test_compileall test_distutils test_import test_shutil test_socket
142 ;; test_subprocess
143 ;; 39 tests skipped:
ff6f33cf
ED
144 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
145 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
146 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
147 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
148 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
149 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
150 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
151 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
152 ;; test_winreg test_winsound test_zipfile64
153 ;; 4 skips unexpected on linux2:
154 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 155 #:test-target "test"
3fdc99da 156 #:configure-flags
6a20289d
LC
157 (list "--enable-shared" ;allow embedding
158 "--with-system-ffi" ;build ctypes
159 (string-append "LDFLAGS=-Wl,-rpath="
160 (assoc-ref %outputs "out") "/lib"))
fd982732 161
d2cc9c7c
LC
162 #:modules ((ice-9 ftw) (ice-9 match)
163 (guix build utils) (guix build gnu-build-system))
fd982732 164 #:phases
46472ecd
MW
165 (modify-phases %standard-phases
166 (add-before
167 'configure 'patch-lib-shells
168 (lambda _
169 ;; Filter for existing files, since some may not exist in all
170 ;; versions of python that are built with this recipe.
171 (substitute* (filter file-exists?
172 '("Lib/subprocess.py"
173 "Lib/popen2.py"
174 "Lib/distutils/tests/test_spawn.py"
175 "Lib/test/test_subprocess.py"))
176 (("/bin/sh") (which "sh")))
dedc8320
LC
177
178 ;; Use zero as the timestamp in .pyc files so that builds are
179 ;; deterministic. TODO: Remove it when this variable is set in
180 ;; gnu-build-system.scm.
a665996f 181 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 182 #t))
5b4e2791
LC
183 (add-before 'configure 'do-not-record-configure-flags
184 (lambda* (#:key configure-flags #:allow-other-keys)
185 ;; Remove configure flags from the installed '_sysconfigdata.py'
186 ;; and 'Makefile' so we don't end up keeping references to the
187 ;; build tools.
188 ;;
189 ;; Preserve at least '--with-system-ffi' since otherwise the
190 ;; thing tries to build libffi, fails, and we end up with a
191 ;; Python that lacks ctypes.
192 (substitute* "configure"
193 (("^CONFIG_ARGS=.*$")
194 (format #f "CONFIG_ARGS='~a'\n"
195 (if (member "--with-system-ffi" configure-flags)
196 "--with-system-ffi"
197 ""))))
198 #t))
46472ecd
MW
199 (add-before
200 'check 'pre-check
201 (lambda _
202 ;; 'Lib/test/test_site.py' needs a valid $HOME
203 (setenv "HOME" (getcwd))
1bb163b0
LC
204 ,@(if (string-prefix? "mips64el" (%current-system))
205
206 ;; XXX: The following test fails on mips64el.
207 '((false-if-exception
208 (delete-file "Lib/test/test_ctypes.py")))
209
210 '())
46472ecd
MW
211 #t))
212 (add-after
213 'unpack 'set-source-file-times-to-1980
214 ;; XXX One of the tests uses a ZIP library to pack up some of the
215 ;; source tree, and fails with "ZIP does not support timestamps
216 ;; before 1980". Work around this by setting the file times in the
217 ;; source tree to sometime in early 1980.
218 (lambda _
219 (let ((circa-1980 (* 10 366 24 60 60)))
220 (ftw "." (lambda (file stat flag)
221 (utime file circa-1980 circa-1980)
222 #t))
02f0c3b2 223 #t)))
9ffe61b0
LC
224 (add-after 'install 'remove-tests
225 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
226 ;; because these files are used by some libraries out there.
227 (lambda* (#:key outputs #:allow-other-keys)
228 (let ((out (assoc-ref outputs "out")))
229 (match (scandir (string-append out "/lib")
230 (lambda (name)
231 (string-prefix? "python" name)))
232 ((pythonX.Y)
233 (let ((testdir (string-append out "/lib/" pythonX.Y
234 "/test")))
235 (with-directory-excursion testdir
236 (for-each delete-file-recursively
237 (scandir testdir
238 (match-lambda
239 ((or "." "..") #f)
240 (file
241 (not
242 (string-prefix? "test_support."
243 file))))))
244 (call-with-output-file "__init__.py" (const #t))
245 #t)))))))
216c283b
LC
246 (add-before 'strip 'make-libraries-writable
247 (lambda* (#:key outputs #:allow-other-keys)
248 ;; Make .so files writable so they can be stripped.
249 (let ((out (assoc-ref outputs "out")))
250 (for-each (lambda (file)
251 (chmod file #o755))
252 (find-files (string-append out "/lib")
253 "\\.so"))
254 #t)))
02f0c3b2
LC
255 (add-after 'install 'move-tk-inter
256 (lambda* (#:key outputs #:allow-other-keys)
257 ;; When Tkinter support is built move it to a separate output so
258 ;; that the main output doesn't contain a reference to Tcl/Tk.
259 (let ((out (assoc-ref outputs "out"))
260 (tk (assoc-ref outputs "tk")))
261 (when tk
262 (match (find-files out "tkinter.*\\.so")
263 ((tkinter.so)
264 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
265 ;; want it under TK/lib/pythonX.Y/site-packages.
266 (let* ((len (string-length out))
267 (target (string-append
268 tk "/"
269 (string-drop
270 (dirname (dirname tkinter.so))
271 len)
272 "/site-packages")))
273 (install-file tkinter.so target)
274 (delete-file tkinter.so)))))
275 #t))))))
a01b6da7 276 (inputs
3fdc99da
CR
277 `(("bzip2" ,bzip2)
278 ("gdbm" ,gdbm)
b10ab723 279 ("libffi" ,libffi) ; for ctypes
b88e1b0a 280 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 281 ("openssl" ,openssl)
3fdc99da 282 ("readline" ,readline)
afa181ff
LC
283 ("zlib" ,zlib)
284 ("tcl" ,tcl)
285 ("tk" ,tk))) ; for tkinter
b10ab723
CR
286 (native-inputs
287 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
288 (native-search-paths
289 (list (search-path-specification
290 (variable "PYTHONPATH")
af070955 291 (files '("lib/python2.7/site-packages")))))
a01b6da7 292 (home-page "http://python.org")
afa181ff 293 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
294 (description
295 "Python is a remarkably powerful dynamic programming language that
296is used in a wide variety of application domains. Some of its key
297distinguishing features include: clear, readable syntax; strong
298introspection capabilities; intuitive object orientation; natural
299expression of procedural code; full modularity, supporting hierarchical
300packages; exception-based error handling; and very high level dynamic
301data types.")
3f641af0 302 (license license:psfl)))
acc26ff1 303
45848023
HG
304;; Current 2.x version.
305(define-public python-2 python-2.7)
306
307(define-public python-3.4
b24d1cfc 308 (package (inherit python-2)
08c04509 309 (version "3.4.3")
717003e3
LC
310 (source (origin
311 (method url-fetch)
312 (uri (string-append "https://www.python.org/ftp/python/"
313 version "/Python-" version ".tar.xz"))
fc1adab1
AK
314 (patches (search-patches
315 "python-fix-tests.patch"
316 ;; XXX Try removing this patch for python > 3.4.3
317 "python-disable-ssl-test.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
717003e3
LC
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
08c04509 323 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
1aebc0cb
AE
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
0e05d01e
SB
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
f26a77ff 332
45848023
HG
333;; Current 3.x version.
334(define-public python-3 python-3.4)
335
336;; Current major version.
337(define-public python python-3)
338
95288fcc
LC
339;; Minimal variants of Python, mostly used to break the cycle between Tk and
340;; Python (Tk -> libxcb -> Python.)
341
342(define-public python2-minimal
343 (package (inherit python-2)
344 (name "python-minimal")
02f0c3b2 345 (outputs '("out"))
95288fcc
LC
346 (arguments
347 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
348 ((#:configure-flags cf)
349 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
350 (inputs '()))) ;none of the optional dependencies
351
352(define-public python-minimal
898238b9 353 (package (inherit python)
95288fcc 354 (name "python-minimal")
02f0c3b2 355 (outputs '("out"))
95288fcc
LC
356 (arguments
357 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
358 ((#:configure-flags cf)
359 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
360
361 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
362 ;; zlib is required by 'zipimport', used by pip.
363 (inputs `(("openssl" ,openssl)
364 ("zlib" ,zlib)))))
365
64cb064c
LC
366(define* (wrap-python3 python
367 #:optional
368 (name (string-append (package-name python) "-wrapper")))
898238b9 369 (package (inherit python)
95288fcc 370 (name name)
898238b9
AE
371 (source #f)
372 (build-system trivial-build-system)
02f0c3b2 373 (outputs '("out"))
3c0f2329 374 (propagated-inputs `(("python" ,python)))
898238b9
AE
375 (arguments
376 `(#:modules ((guix build utils))
377 #:builder
378 (begin
379 (use-modules (guix build utils))
380 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
381 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
382 (mkdir-p bin)
383 (for-each
384 (lambda (old new)
385 (symlink (string-append python old)
386 (string-append bin "/" new)))
187e9094
LF
387 '("python3" "pydoc3" "idle3")
388 '("python" "pydoc" "idle"))))))
0d56e3e1
LC
389 (synopsis "Wrapper for the Python 3 commands")
390 (description
391 "This package provides wrappers for the commands of Python@tie{}3.x such
392that they can be invoked under their usual name---e.g., @command{python}
393instead of @command{python3}.")))
394
95288fcc
LC
395(define-public python-wrapper (wrap-python3 python))
396(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 397
aaf625b8
RW
398(define-public python-psutil
399 (package
400 (name "python-psutil")
88535a44 401 (version "4.3.0")
aaf625b8
RW
402 (source
403 (origin
404 (method url-fetch)
f56777be 405 (uri (pypi-uri "psutil" version))
aaf625b8
RW
406 (sha256
407 (base32
88535a44 408 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-setuptools" ,python-setuptools)))
88535a44 412 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
413 (synopsis "Library for retrieving information on running processes")
414 (description
415 "psutil (Python system and process utilities) is a library for retrieving
416information on running processes and system utilization (CPU, memory, disks,
417network) in Python. It is useful mainly for system monitoring, profiling and
418limiting process resources and management of running processes. It implements
419many functionalities offered by command line tools such as: ps, top, lsof,
420netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
421pidof, tty, taskset, pmap.")
3f641af0 422 (license license:bsd-3)))
aaf625b8
RW
423
424(define-public python2-psutil
425 (package-with-python2 python-psutil))
898238b9 426
f9da1d8a
ED
427(define-public python-passlib
428 (package
429 (name "python-passlib")
690e8c66 430 (version "1.6.5")
f9da1d8a
ED
431 (source
432 (origin
433 (method url-fetch)
690e8c66 434 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
435 (sha256
436 (base32
690e8c66 437 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
438 (build-system python-build-system)
439 (native-inputs
440 `(("python-nose" ,python-nose)
441 ("python-setuptools" ,python-setuptools)))
442 (inputs
443 `(("python-py-bcrypt" ,python-py-bcrypt)))
444 (arguments
445 `(#:phases
446 (alist-cons-before
447 'check 'set-PYTHON_EGG_CACHE
448 ;; some tests require access to "$HOME/.cython"
449 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
450 %standard-phases)))
451 (home-page "https://bitbucket.org/ecollins/passlib")
452 (synopsis
453 "Comprehensive password hashing framework")
454 (description
455 "Passlib is a password hashing library for Python 2 & 3, which provides
456cross-platform implementations of over 30 password hashing algorithms, as well
457as a framework for managing existing password hashes. It's designed to be
458useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
459to providing full-strength password hashing for multi-user application.")
3f641af0 460 (license license:bsd-3)))
f9da1d8a
ED
461
462(define-public python2-passlib
463 (package-with-python2 python-passlib))
464
feb0d9c3
ED
465(define-public python-py-bcrypt
466 (package
467 (name "python-py-bcrypt")
468 (version "0.4")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (string-append
473 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
474 version
475 ".tar.gz"))
476 (sha256
477 (base32
478 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
479 (build-system python-build-system)
480 (native-inputs
481 `(("python-setuptools" ,python-setuptools)))
482 (home-page "https://code.google.com/p/py-bcrypt")
483 (synopsis
484 "Bcrypt password hashing and key derivation")
485 (description
486 "A python wrapper of OpenBSD's Blowfish password hashing code. This
487system hashes passwords using a version of Bruce Schneier's Blowfish block
488cipher with modifications designed to raise the cost of off-line password
489cracking and frustrate fast hardware implementation. The computation cost of
490the algorithm is parametised, so it can be increased as computers get faster.
491The intent is to make a compromise of a password database less likely to
492result in an attacker gaining knowledge of the plaintext passwords (e.g. using
493John the Ripper).")
494 ;; "sha2.c" is under BSD-3;
495 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
496 ;; the rest is under ISC.
3f641af0 497 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
498
499(define-public python2-py-bcrypt
500 (package-with-python2 python-py-bcrypt))
501
502
429fdea1
ED
503(define-public python-paramiko
504 (package
505 (name "python-paramiko")
81b9bbbd 506 (version "1.16.0")
429fdea1
ED
507 (source
508 (origin
509 (method url-fetch)
81b9bbbd 510 (uri (pypi-uri "paramiko" version))
429fdea1
ED
511 (sha256
512 (base32
81b9bbbd 513 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
514 (build-system python-build-system)
515 (native-inputs
516 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
517 (propagated-inputs
518 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 519 (inputs
a3fc12da 520 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
521 (home-page "http://www.paramiko.org/")
522 (synopsis "SSHv2 protocol library")
523 (description "Paramiko is a python implementation of the SSHv2 protocol,
524providing both client and server functionality. While it leverages a Python C
525extension for low level cryptography (PyCrypto), Paramiko itself is a pure
526Python interface around SSH networking concepts.")
3f641af0 527 (license license:lgpl2.1+)))
429fdea1
ED
528
529(define-public python2-paramiko
530 (package-with-python2 python-paramiko))
531
532
de73dbf6
ED
533(define-public python-httplib2
534 (package
535 (name "python-httplib2")
286f1bac 536 (version "0.9.2")
de73dbf6
ED
537 (source
538 (origin
539 (method url-fetch)
286f1bac 540 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
541 (sha256
542 (base32
286f1bac 543 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
544 (build-system python-build-system)
545 (native-inputs
546 `(("python-setuptools" ,python-setuptools)))
286f1bac 547 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
548 (synopsis "Comprehensive HTTP client library")
549 (description
550 "A comprehensive HTTP client library supporting many features left out of
551other HTTP libraries.")
552 (license license:expat)))
553
554(define-public python2-httplib2
555 (package-with-python2 python-httplib2))
556
67039875
ED
557(define-public python-ecdsa
558 (package
559 (name "python-ecdsa")
560 (version "0.13")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (string-append
565 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
566 version
567 ".tar.gz"))
568 (sha256
569 (base32
570 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
571 (build-system python-build-system)
572 (native-inputs
573 `(("python-setuptools" ,python-setuptools)))
574 (inputs
575 `(("openssl" ,openssl)))
576 (home-page
577 "http://github.com/warner/python-ecdsa")
578 (synopsis
579 "ECDSA cryptographic signature library (pure python)")
580 (description
581 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
582Curve Digital Signature Algorithm), implemented purely in Python. With this
583library, you can quickly create keypairs (signing key and verifying key), sign
584messages, and verify the signatures. The keys and signatures are very short,
585making them easy to handle and incorporate into other protocols.")
586 (license license:expat)))
587
588(define-public python2-ecdsa
589 (package-with-python2 python-ecdsa))
590
52323f32
ED
591(define-public python-ccm
592 (package
593 (name "python-ccm")
db5567f7 594 (version "2.1.6")
52323f32
ED
595 (source
596 (origin
597 (method url-fetch)
db5567f7 598 (uri (pypi-uri "ccm" version))
52323f32
ED
599 (sha256
600 (base32
db5567f7 601 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
602 (build-system python-build-system)
603 (native-inputs
604 `(("python-setuptools" ,python-setuptools)))
605 (inputs
606 `(("python-pyyaml" ,python-pyyaml)
607 ("python-six" ,python-six)))
608 (home-page "https://github.com/pcmanus/ccm")
609 (synopsis "Cassandra Cluster Manager")
610 (description "A script/library to create, launch and remove an Apache
611Cassandra cluster on localhost.")
3f641af0 612 (license license:asl2.0)))
52323f32
ED
613
614(define-public python2-ccm
615 (package-with-python2 python-ccm))
616
89114f39 617(define-public python-pytz
acc26ff1 618 (package
89114f39 619 (name "python-pytz")
61c9babb 620 (version "2016.3")
acc26ff1
CR
621 (source
622 (origin
623 (method url-fetch)
61c9babb 624 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
625 (sha256
626 (base32
61c9babb 627 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 628 (build-system python-build-system)
8498b8cf 629 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 630 (home-page "http://pythonhosted.org/pytz")
9e771e3b 631 (synopsis "Python timezone library")
acc26ff1
CR
632 (description
633 "This library allows accurate and cross platform timezone calculations
634using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 635 (license license:expat)))
5ace6e2f 636
89114f39 637(define-public python2-pytz
11bb85a1 638 (package-with-python2 python-pytz))
89114f39 639
fc50e9c6 640
89114f39 641(define-public python-babel
5ace6e2f 642 (package
89114f39 643 (name "python-babel")
3f37db6b 644 (version "2.3.2")
5ace6e2f
CR
645 (source
646 (origin
647 (method url-fetch)
b850a6d8 648 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
649 (sha256
650 (base32
3f37db6b 651 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
652 (build-system python-build-system)
653 (inputs
e1804763
AE
654 `(("python-pytz" ,python-pytz)
655 ("python-setuptools" ,python-setuptools)))
8498b8cf 656 (arguments `(#:tests? #f)) ; no test target
e1804763 657 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
658 (synopsis
659 "Tools for internationalizing Python applications")
660 (description
661 "Babel is composed of two major parts:
662- tools to build and work with gettext message catalogs
663- a Python interface to the CLDR (Common Locale Data Repository), providing
664access to various locale display names, localized number and date formatting,
665etc. ")
3f641af0 666 (license license:bsd-3)))
89114f39
AE
667
668(define-public python2-babel
11bb85a1 669 (package-with-python2 python-babel))
73adf220 670
ed377cc6
RW
671(define-public python2-backport-ssl-match-hostname
672 (package
673 (name "python2-backport-ssl-match-hostname")
f2d06d46 674 (version "3.5.0.1")
ed377cc6
RW
675 (source
676 (origin
677 (method url-fetch)
678 (uri (string-append
679 "https://pypi.python.org/packages/source/b/"
680 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
681 version ".tar.gz"))
682 (sha256
683 (base32
f2d06d46 684 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 685 (build-system python-build-system)
f2d06d46
EF
686 (arguments
687 `(#:python ,python-2
688 #:tests? #f)) ; no test target
ed377cc6
RW
689 (inputs
690 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
691 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
692 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
693 (description
694 "This backport brings the ssl.match_hostname() function to users of
695earlier versions of Python. The function checks the hostname in the
696certificate returned by the server to which a connection has been established,
697and verifies that it matches the intended target hostname.")
3f641af0 698 (license license:psfl)))
ed377cc6 699
ef5cbf9b
RW
700(define-public python-h5py
701 (package
702 (name "python-h5py")
fe147c41 703 (version "2.6.0")
ef5cbf9b
RW
704 (source
705 (origin
706 (method url-fetch)
fe147c41 707 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
708 (sha256
709 (base32
fe147c41 710 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 711 (build-system python-build-system)
797e1401
RW
712 (arguments
713 `(#:tests? #f ; no test target
714 #:phases
715 (modify-phases %standard-phases
716 (add-after 'unpack 'fix-hdf5-paths
717 (lambda* (#:key inputs #:allow-other-keys)
718 (let ((prefix (assoc-ref inputs "hdf5")))
719 (substitute* "setup_build.py"
720 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
721 (string-append "['" prefix "/lib" "']"))
722 (("'/opt/local/include', '/usr/local/include'")
723 (string-append "'" prefix "/include" "'")))
724 (substitute* "setup_configure.py"
725 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
726 (string-append "['" prefix "/lib" "']")))
727 #t))))))
3c4010b1
RW
728 (propagated-inputs
729 `(("python-numpy" ,python-numpy)))
ef5cbf9b 730 (inputs
fe147c41
EF
731 `(("hdf5" ,hdf5)
732 ("python-six" ,python-six)))
ef5cbf9b 733 (native-inputs
fe147c41
EF
734 `(("python-cython" ,python-cython)
735 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
736 (home-page "http://www.h5py.org/")
737 (synopsis "Read and write HDF5 files from Python")
738 (description
739 "The h5py package provides both a high- and low-level interface to the
740HDF5 library from Python. The low-level interface is intended to be a
741complete wrapping of the HDF5 API, while the high-level component supports
742access to HDF5 files, datasets and groups using established Python and NumPy
743concepts.")
3f641af0 744 (license license:bsd-3)
fe147c41 745 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
746
747(define-public python2-h5py
fe147c41 748 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 749
c1448c69
EB
750(define-public python-lockfile
751 (package
752 (name "python-lockfile")
692add53 753 (version "0.12.2")
c1448c69
EB
754 (source
755 (origin
756 (method url-fetch)
757 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
758 "lockfile-" version ".tar.gz"))
759 (sha256
760 (base32
692add53 761 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
762 (build-system python-build-system)
763 (arguments '(#:test-target "check"))
692add53
BW
764 (native-inputs
765 `(("python-pbr" ,python-pbr)))
6a8f26a4 766 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
767 (synopsis "Platform-independent file locking module")
768 (description
769 "The lockfile package exports a LockFile class which provides a simple
770API for locking files.")
1804527a
BW
771 (license license:expat)
772 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
773
774(define-public python2-lockfile
1804527a
BW
775 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
776 (package
692add53
BW
777 (inherit base)
778 (native-inputs `(("python2-setuptools" ,python2-setuptools)
779 ,@(package-native-inputs base))))))
c1448c69 780
5a1a4bf6
EB
781(define-public python-mock
782 (package
783 (name "python-mock")
784 (version "1.0.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
789 "mock-" version ".tar.gz"))
790 (sha256
791 (base32
792 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
793 (build-system python-build-system)
794 (arguments '(#:test-target "check"))
07af3e5e 795 (home-page "http://code.google.com/p/mock/")
9e771e3b 796 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
797 (description
798 "Mock is a library for testing in Python. It allows you to replace parts
799of your system under test with mock objects and make assertions about how they
800have been used.")
bd3fa666 801 (license license:expat)))
5a1a4bf6
EB
802
803(define-public python2-mock
804 (package-with-python2 python-mock))
805
fc50e9c6 806
73adf220
AE
807(define-public python-setuptools
808 (package
809 (name "python-setuptools")
62a9a23b 810 (version "18.3.1")
73adf220
AE
811 (source
812 (origin
813 (method url-fetch)
814 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
815 version ".tar.gz"))
816 (sha256
817 (base32
62a9a23b 818 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 819 (build-system python-build-system)
d3d656c5
AE
820 ;; FIXME: Tests require pytest, which itself relies on setuptools.
821 ;; One could bootstrap with an internal untested setuptools.
73adf220 822 (arguments
824af8ca 823 `(#:tests? #f))
73adf220
AE
824 (home-page "https://pypi.python.org/pypi/setuptools")
825 (synopsis
826 "Library designed to facilitate packaging Python projects")
827 (description
828 "Setuptools is a fully-featured, stable library designed to facilitate
829packaging Python projects, where packaging includes:
830Python package and module definitions,
831distribution package metadata,
832test hooks,
833project installation,
834platform-specific details,
835Python 3 support.")
3f641af0 836 (license license:psfl)))
73adf220
AE
837
838(define-public python2-setuptools
839 (package-with-python2 python-setuptools))
fc50e9c6
AE
840
841
cafc3f5a
EB
842(define-public python-pycrypto
843 (package
844 (name "python-pycrypto")
845 (version "2.6.1")
846 (source
847 (origin
848 (method url-fetch)
849 (uri (string-append "https://pypi.python.org/packages/source/p/"
850 "pycrypto/pycrypto-" version ".tar.gz"))
851 (sha256
852 (base32
853 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
854 (build-system python-build-system)
855 (native-inputs
856 `(("python-setuptools" ,python-setuptools)))
857 (inputs
858 `(("python" ,python)
859 ("gmp" ,gmp)))
860 (arguments
861 `(#:phases
862 (alist-cons-before
863 'build 'set-build-env
864 ;; pycrypto runs an autoconf configure script behind the scenes
865 (lambda _
866 (setenv "CONFIG_SHELL" (which "bash")))
867 %standard-phases)))
868 (home-page "http://www.pycrypto.org/")
869 (synopsis "Cryptographic modules for Python")
870 (description
871 "Pycrypto is a collection of both secure hash functions (such as SHA256
872and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 873etc.). The package is structured to make adding new modules easy.")
3f641af0 874 (license license:public-domain)))
cafc3f5a 875
345f0611 876(define-public python2-pycrypto
1c0059da
EF
877 (let ((pycrypto (package-with-python2 python-pycrypto)))
878 (package (inherit pycrypto)
879 (inputs
880 `(("python" ,python-2)
881 ,@(alist-delete
882 "python"
883 (package-inputs pycrypto)))))))
345f0611 884
cafc3f5a
EB
885(define-public python-keyring
886 (package
887 (name "python-keyring")
13f3ff35 888 (version "8.7")
cafc3f5a
EB
889 (source
890 (origin
891 (method url-fetch)
664e6c3a 892 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
893 (sha256
894 (base32
13f3ff35 895 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
896 (build-system python-build-system)
897 (native-inputs
13f3ff35 898 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
899 (inputs
900 `(("python-pycrypto" ,python-pycrypto)))
901 (arguments
664e6c3a 902 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 903 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
904 (synopsis "Store and access your passwords safely")
905 (description
906 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 907service from python. It can be used in any application that needs safe
cafc3f5a
EB
908password storage.")
909 ;; "MIT" and PSF dual license
3f641af0 910 (license license:x11)
13f3ff35 911 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 912
d7af1069 913(define-public python2-keyring
13f3ff35
EF
914 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
915 (package
916 (inherit base)
917 (native-inputs `(("python2-setuptools" ,python2-setuptools)
918 ,@(package-native-inputs base))))))
d7af1069 919
a480bc41
EB
920(define-public python-six
921 (package
922 (name "python-six")
b6ab89ef 923 (version "1.10.0")
a480bc41
EB
924 (source
925 (origin
926 (method url-fetch)
b6ab89ef 927 (uri (pypi-uri "six" version))
a480bc41
EB
928 (sha256
929 (base32
b6ab89ef 930 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
931 (build-system python-build-system)
932 (inputs
933 `(("python-setuptools" ,python-setuptools)))
934 (home-page "http://pypi.python.org/pypi/six/")
935 (synopsis "Python 2 and 3 compatibility utilities")
936 (description
35b9e423 937 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
938functions for smoothing over the differences between the Python versions with
939the goal of writing Python code that is compatible on both Python versions.
35b9e423 940Six supports every Python version since 2.5. It is contained in only one
a480bc41 941Python file, so it can be easily copied into your project.")
3f641af0 942 (license license:x11)))
a480bc41 943
0c20025c
AE
944(define-public python2-six
945 (package-with-python2 python-six))
946
cafc3f5a
EB
947(define-public python-dateutil-2
948 (package
949 (name "python-dateutil")
394b8060 950 (version "2.5.2")
cafc3f5a
EB
951 (source
952 (origin
953 (method url-fetch)
394b8060 954 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
955 (sha256
956 (base32
394b8060 957 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
958 (build-system python-build-system)
959 (inputs
394b8060 960 `(("python-six" ,python-six)))
b5a5fb19 961 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
962 (synopsis "Extensions to the standard datetime module")
963 (description
964 "The dateutil module provides powerful extensions to the standard
965datetime module, available in Python 2.3+.")
3f641af0 966 (license license:bsd-3)
394b8060 967 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
968
969(define-public python2-dateutil-2
394b8060
EF
970 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
971 (package
972 (inherit base)
973 (inputs `(("python2-setuptools" ,python2-setuptools)
974 ,@(package-inputs base))))))
cafc3f5a 975
fc50e9c6
AE
976(define-public python-dateutil
977 (package
978 (name "python-dateutil")
979 (version "1.5") ; last version for python < 3
980 (source
981 (origin
982 (method url-fetch)
cafc3f5a
EB
983 (uri (string-append "http://labix.org/download/python-dateutil/"
984 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
985 (sha256
986 (base32
987 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
988 (build-system python-build-system)
989 (inputs
990 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 991 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 992 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
993 (description
994 "The dateutil module provides powerful extensions to the standard
995datetime module, available in Python 2.3+.")
3f641af0 996 (license license:psfl)))
fc50e9c6
AE
997
998(define-public python2-dateutil
999 (package-with-python2 python-dateutil))
1d08c01f 1000
cafc3f5a
EB
1001(define-public python-parsedatetime
1002 (package
1003 (name "python-parsedatetime")
eebf6f01 1004 (version "2.1")
cafc3f5a
EB
1005 (source
1006 (origin
1007 (method url-fetch)
eebf6f01 1008 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1009 (sha256
1010 (base32
eebf6f01 1011 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1012 (build-system python-build-system)
1013 (native-inputs
eebf6f01
EF
1014 `(("python-nose" ,python-nose)
1015 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1016 (home-page "http://github.com/bear/parsedatetime/")
1017 (synopsis
1018 "Parse human-readable date/time text")
1019 (description
e881752c 1020 "Parse human-readable date/time text.")
3f641af0 1021 (license license:asl2.0)
eebf6f01 1022 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1023
38b8f9b2 1024(define-public python2-parsedatetime
eebf6f01
EF
1025 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1026 (package
1027 (inherit base)
1028 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1029 ,@(package-native-inputs base))))))
38b8f9b2 1030
d072efcb
RW
1031(define-public python-pandas
1032 (package
1033 (name "python-pandas")
7d0c3c8d 1034 (version "0.18.1")
d072efcb
RW
1035 (source
1036 (origin
1b96f069 1037 (method url-fetch)
7d0c3c8d
EF
1038 (uri (string-append
1039 "https://pypi.python.org/packages/11/09/"
1040 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1041 "pandas-" version ".tar.gz"))
1b96f069 1042 (sha256
7d0c3c8d 1043 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1044 (build-system python-build-system)
d072efcb 1045 (propagated-inputs
42603726
EF
1046 `(("python-numpy" ,python-numpy)))
1047 (inputs
1048 `(("python-pytz" ,python-pytz)
d072efcb
RW
1049 ("python-dateutil" ,python-dateutil-2)))
1050 (native-inputs
7d0c3c8d 1051 `(("python-nose" ,python-nose)))
d072efcb
RW
1052 (home-page "http://pandas.pydata.org")
1053 (synopsis "Data structures for data analysis, time series, and statistics")
1054 (description
1055 "Pandas is a Python package providing fast, flexible, and expressive data
1056structures designed to make working with structured (tabular,
1057multidimensional, potentially heterogeneous) and time series data both easy
1058and intuitive. It aims to be the fundamental high-level building block for
1059doing practical, real world data analysis in Python.")
3f641af0 1060 (license license:bsd-3)
7d0c3c8d 1061 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1062
1063(define-public python2-pandas
7d0c3c8d
EF
1064 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1065 (package
1066 (inherit base)
1067 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1068 ,@(package-native-inputs base))))))
d072efcb 1069
cafc3f5a
EB
1070(define-public python-tzlocal
1071 (package
1072 (name "python-tzlocal")
ed80839b 1073 (version "1.2.2")
cafc3f5a
EB
1074 (source
1075 (origin
1076 (method url-fetch)
226d3331 1077 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1078 (sha256
1079 (base32
ed80839b 1080 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1081 (build-system python-build-system)
ed80839b 1082 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1083 (home-page "https://github.com/regebro/tzlocal")
1084 (synopsis
35b9e423 1085 "Local timezone information for Python")
cafc3f5a
EB
1086 (description
1087 "Tzlocal returns a tzinfo object with the local timezone information.
1088This module attempts to fix a glaring hole in pytz, that there is no way to
1089get the local timezone information, unless you know the zoneinfo name, and
1090under several distributions that's hard or impossible to figure out.")
3f641af0 1091 (license license:cc0)))
cafc3f5a 1092
1d08c01f
AE
1093(define-public python2-pysqlite
1094 (package
1095 (name "python2-pysqlite")
fe476868 1096 (version "2.8.1")
1d08c01f
AE
1097 (source
1098 (origin
1099 (method url-fetch)
fe476868 1100 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1101 (sha256
1102 (base32
fe476868 1103 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1104 (build-system python-build-system)
1105 (inputs
1106 `(("sqlite" ,sqlite)))
1107 (arguments
1108 `(#:python ,python-2 ; incompatible with Python 3
1109 #:tests? #f)) ; no test target
fe476868 1110 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1111 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1112 (description
1113 "Pysqlite provides SQLite bindings for Python that comply to the
1114Database API 2.0T.")
ed0cdf83 1115 (license license:zlib)))
1d08c01f 1116
2875caf5
AE
1117
1118(define-public python2-mechanize
1119 (package
1120 (name "python2-mechanize")
1121 (version "0.2.5")
1122 (source
1123 (origin
1124 (method url-fetch)
1125 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1126 version ".tar.gz"))
1127 (sha256
1128 (base32
1129 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1130 (build-system python-build-system)
1131 (inputs
1132 `(("python2-setuptools" ,python2-setuptools)))
1133 (arguments
1134 `(#:python ,python-2 ; apparently incompatible with Python 3
1135 #:tests? #f))
1136 ;; test fails with message
1137 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1138 ;; (python-3.3.2) or
1139 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1140 ;; (python-2.7.5).
1141 ;; The source code is from March 2011 and probably not up-to-date
1142 ;; with respect to python unit tests.
1143 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1144 (synopsis
1145 "Stateful programmatic web browsing in Python")
1146 (description
1147 "Mechanize implements stateful programmatic web browsing in Python,
1148after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1149 (license (license:non-copyleft
1150 "file://COPYING"
1151 "See COPYING in the distribution."))))
2875caf5 1152
0352532e
AE
1153
1154(define-public python-simplejson
1155 (package
1156 (name "python-simplejson")
988d1bad 1157 (version "3.8.2")
0352532e
AE
1158 (source
1159 (origin
1160 (method url-fetch)
988d1bad 1161 (uri (pypi-uri "simplejson" version))
0352532e
AE
1162 (sha256
1163 (base32
988d1bad 1164 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1165 (build-system python-build-system)
1166 (home-page "http://simplejson.readthedocs.org/en/latest/")
1167 (synopsis
1168 "Json library for Python")
1169 (description
e881752c
AK
1170 "JSON (JavaScript Object Notation) is a subset of JavaScript
1171syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1172format.
0352532e
AE
1173
1174Simplejson exposes an API familiar to users of the standard library marshal
1175and pickle modules. It is the externally maintained version of the json
1176library contained in Python 2.6, but maintains compatibility with Python 2.5
1177and (currently) has significant performance advantages, even without using
1178the optional C extension for speedups. Simplejson is also supported on
1179Python 3.3+.")
3f641af0 1180 (license license:x11)))
0352532e
AE
1181
1182(define-public python2-simplejson
1183 (package-with-python2 python-simplejson))
421a80a2
AE
1184
1185
ed07b08d 1186(define-public python-pyicu
421a80a2 1187 (package
ed07b08d 1188 (name "python-pyicu")
d3b29319 1189 (version "1.9.2")
421a80a2
AE
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
d3b29319 1197 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1198 (build-system python-build-system)
1199 (inputs
1200 `(("icu4c" ,icu4c)))
421a80a2 1201 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1202 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1203 (description
1204 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1205 (license license:x11)
ed07b08d
LF
1206 (properties `((python2-variant . ,(delay python2-pyicu))))))
1207
1208(define-public python2-pyicu
1209 (package
1210 (inherit (package-with-python2
1211 (strip-python2-variant python-pyicu)))
1212 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1213
1214(define-public python2-dogtail
1215 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1216 ;; spaces in indentation" with Python 3.
1217 (package
1218 (name "python2-dogtail")
1219 (version "0.8.2")
1220 (source (origin
1221 (method url-fetch)
1222 (uri (string-append
1223 "https://fedorahosted.org/released/dogtail/dogtail-"
1224 version ".tar.gz"))
1225 (sha256
1226 (base32
1227 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1228 (build-system python-build-system)
1229 (arguments `(#:python ,python-2
1230 #:tests? #f)) ; invalid command "test"
1231 (home-page "https://fedorahosted.org/dogtail/")
1232 (synopsis "GUI test tool and automation framework written in ​Python")
1233 (description
35b9e423 1234 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1235It uses Accessibility (a11y) technologies to communicate with desktop
1236applications. dogtail scripts are written in Python and executed like any
1237other Python program.")
3f641af0 1238 (license license:gpl2+)))
515e6878 1239
011b18c3
LC
1240(define-public python2-empy
1241 (package
1242 (name "python2-empy")
1243 (version "3.3")
1244 (source (origin
1245 (method url-fetch)
1246 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1247 version ".tar.gz"))
1248 (sha256
1249 (base32
1250 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1251 (build-system python-build-system)
1252 (arguments
1253 `(#:python ,python-2
1254 #:phases (alist-replace
1255 'check
1256 (lambda _
1257 (zero? (system* "./test.sh")))
1258 %standard-phases)))
1259 (home-page "http://www.alcyone.com/software/empy/")
1260 (synopsis "Templating system for Python")
1261 (description
1262 "EmPy is a system for embedding Python expressions and statements in
1263template text; it takes an EmPy source file, processes it, and produces
1264output. This is accomplished via expansions, which are special signals to the
1cd4027c 1265EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1266EmPy can expand arbitrary Python expressions and statements in this way, as
1267well as a variety of special forms. Textual data not explicitly delimited in
1268this way is sent unaffected to the output, allowing Python to be used in
1269effect as a markup language. Also supported are callbacks via hooks,
1270recording and playback via diversions, and dynamic, chainable filters. The
1271system is highly configurable via command line options and embedded
1272commands.")
3f641af0 1273 (license license:lgpl2.1+)))
011b18c3 1274
8deeda0c
LC
1275(define-public python2-element-tree
1276 (package
1277 (name "python2-element-tree")
1278 (version "1.2.6")
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append
1282 "http://effbot.org/media/downloads/elementtree-"
1283 version "-20050316.tar.gz"))
1284 (sha256
1285 (base32
1286 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; seems to be part of Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (synopsis "Toolkit for XML processing in Python")
1292 (description
1293 "ElementTree is a Python library supporting lightweight XML processing.")
1294 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1295 (license (license:x11-style
1296 "http://docs.python.org/2/license.html"
1297 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1298
1299(define-public python2-pybugz
1300 (package
1301 (name "python2-pybugz")
1302 (version "0.6.11")
1303 (source (origin
1304 (method url-fetch)
1305 (uri (string-append
1306 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1307 version ".tar.gz"))
1308 (sha256
1309 (base32
6f194a1e 1310 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1311 (patches (search-patches "pybugz-stty.patch"
1312 "pybugz-encode-error.patch"))))
8deeda0c
LC
1313 (build-system python-build-system)
1314 (arguments
1315 `(#:python ,python-2 ; SyntaxError with Python 3
1316 #:tests? #f)) ; no 'test' sub-command
1317 (inputs `(("element-tree" ,python2-element-tree)))
1318 (synopsis "Python and command-line interface to Bugzilla")
1319 (description
1320 "PyBugz is a Python library and command-line tool to query the Bugzilla
1321bug tracking system. It is meant as an aid to speed up interaction with the
1322bug tracker.")
1323 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1324 (license license:gpl2)))
8deeda0c 1325
a480bc41
EB
1326(define-public python-enum34
1327 (package
1328 (name "python-enum34")
d39ae1e5 1329 (version "1.1.0")
a480bc41
EB
1330 (source
1331 (origin
1332 (method url-fetch)
d39ae1e5 1333 (uri (pypi-uri "enum34" version))
a480bc41
EB
1334 (sha256
1335 (base32
d39ae1e5 1336 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1337 (build-system python-build-system)
a480bc41
EB
1338 (arguments
1339 `(#:phases
1340 (alist-replace
1341 'check
1342 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1343 %standard-phases)))
1344 (home-page "https://pypi.python.org/pypi/enum34")
1345 (synopsis "Backported Python 3.4 Enum")
1346 (description
1347 "Enum34 is the new Python stdlib enum module available in Python 3.4
1348backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1349 (license license:bsd-3)))
a480bc41 1350
820acd1b
LF
1351(define-public python2-enum34
1352 (package-with-python2 python-enum34))
1353
a480bc41
EB
1354(define-public python-parse-type
1355 (package
1356 (name "python-parse-type")
1357 (version "0.3.4")
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (string-append "https://pypi.python.org/packages/source/p/"
1362 "parse_type/parse_type-" version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1366 (build-system python-build-system)
1367 (inputs
1368 `(("python-setuptools" ,python-setuptools)
1369 ("python-six" ,python-six)
68f1cdec 1370 ("python-parse" ,python-parse)))
a480bc41
EB
1371 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1372 (home-page "https://github.com/jenisys/parse_type")
1373 (synopsis "Extended parse module")
1374 (description
1375 "Parse_type extends the python parse module.")
3f641af0 1376 (license license:bsd-3)))
a480bc41
EB
1377
1378(define-public python-parse
1379 (package
1380 (name "python-parse")
eb3d3503 1381 (version "1.6.6")
a480bc41
EB
1382 (source
1383 (origin
1384 (method url-fetch)
eb3d3503 1385 (uri (pypi-uri "parse" version))
a480bc41
EB
1386 (sha256
1387 (base32
eb3d3503 1388 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:phases
1392 (alist-replace
1393 'check
1394 (lambda _ (zero? (system* "python" "test_parse.py")))
1395 %standard-phases)))
1396 (home-page "https://github.com/r1chardj0n3s/parse")
1397 (synopsis "Parse strings")
1398 (description
1399 "Parse strings using a specification based on the Python format()
1400syntax.")
3f641af0 1401 (license license:x11)))
a480bc41
EB
1402
1403
515e6878
LC
1404(define-public scons
1405 (package
1406 (name "scons")
a3f61425 1407 (version "2.3.4")
515e6878
LC
1408 (source (origin
1409 (method url-fetch)
de67e922
LF
1410 (uri (string-append "mirror://sourceforge/scons/scons/" version
1411 "/scons-" version ".tar.gz"))
515e6878
LC
1412 (sha256
1413 (base32
a3f61425 1414 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1415 (build-system python-build-system)
1416 (arguments
1417 ;; With Python 3.x, fails to build with a syntax error.
1418 `(#:python ,python-2
1419 #:tests? #f)) ; no 'python setup.py test' command
1420 (home-page "http://scons.org/")
1421 (synopsis "Software construction tool written in Python")
1422 (description
1423 "SCons is a software construction tool. Think of SCons as an improved,
1424cross-platform substitute for the classic Make utility with integrated
1425functionality similar to autoconf/automake and compiler caches such as ccache.
1426In short, SCons is an easier, more reliable and faster way to build
1427software.")
3f641af0 1428 (license license:x11)))
011b18c3 1429
c15a5c0e
DT
1430(define-public python-extras
1431 (package
1432 (name "python-extras")
1433 (version "0.0.3")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append
1438 "https://pypi.python.org/packages/source/e/extras/extras-"
1439 version ".tar.gz"))
1440 (sha256
1441 (base32
1442 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1443 (build-system python-build-system)
1444 (inputs
1445 `(("python-setuptools" ,python-setuptools)))
1446 (arguments
1447 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1448 '(#:tests? #f))
1449 (home-page "https://github.com/testing-cabal/extras")
1450 (synopsis "Useful extensions to the Python standard library")
1451 (description
1452 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1453 (license license:expat)))
c15a5c0e
DT
1454
1455(define-public python2-extras
1456 (package-with-python2 python-extras))
1457
56ea0efd
DT
1458(define-public python-mimeparse
1459 (package
1460 (name "python-mimeparse")
1461 (version "0.1.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (string-append
1466 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1467 version ".tar.gz"))
1468 (sha256
1469 (base32
1470 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1471 (build-system python-build-system)
1472 (inputs
1473 `(("python-setuptools" ,python-setuptools)))
1474 (arguments
1475 '(#:tests? #f)) ; no setup.py test command
1476 (home-page
1477 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1478 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1479 (description
1480 "Mimeparse provides basic functions for parsing MIME type names and
1481matching them against a list of media-ranges.")
bd3fa666 1482 (license license:expat)))
56ea0efd
DT
1483
1484(define-public python2-mimeparse
1485 (package-with-python2 python-mimeparse))
1486
4435427e
DT
1487(define-public python-nose
1488 (package
1489 (name "python-nose")
f7cb9841 1490 (version "1.3.7")
4435427e
DT
1491 (source
1492 (origin
1493 (method url-fetch)
f7cb9841 1494 (uri (pypi-uri "nose" version))
4435427e
DT
1495 (sha256
1496 (base32
f7cb9841 1497 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1498 (build-system python-build-system)
1499 (inputs
1500 `(("python-setuptools" ,python-setuptools)))
1501 (arguments
1502 '(#:tests? #f)) ; FIXME: test suite fails
1503 (home-page "http://readthedocs.org/docs/nose/")
1504 (synopsis "Python testing library")
1505 (description
1506 "Nose extends the unittest library to make testing easier.")
3f641af0 1507 (license license:lgpl2.0+)))
4435427e
DT
1508
1509(define-public python2-nose
1510 (package-with-python2 python-nose))
1511
0aea283a
EF
1512(define-public python-nose2
1513 (package
1514 (name "python-nose2")
1515 (version "0.6.5")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "nose2" version))
1520 (sha256
1521 (base32
1522 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1523 (build-system python-build-system)
1524 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1525 (native-inputs
1526 `(("python-setuptools" ,python-setuptools)))
1527 (inputs
1528 `(("python-cov-core" ,python-cov-core)
1529 ("python-pytest-cov" ,python-pytest-cov)
1530 ("python-six" ,python-six)))
1531 (home-page "https://github.com/nose-devs/nose2")
1532 (synopsis "Next generation of nicer testing for Python")
1533 (description
1534 "Nose2 is the next generation of nicer testing for Python, based on the
1535plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1536better plugin api, being easier for users to configure, and simplifying internal
1537interfaces and processes.")
1538 (license license:bsd-2)))
1539
1540(define-public python2-nose2
1541 (package-with-python2 python-nose2))
1542
6cd9c356
DT
1543(define-public python-unittest2
1544 (package
1545 (name "python-unittest2")
1546 (version "0.5.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append
1551 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1552 version ".tar.gz"))
1553 (sha256
1554 (base32
1555 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1556 (build-system python-build-system)
1557 (inputs
1558 `(("python-setuptools" ,python-setuptools)))
1559 (home-page "http://pypi.python.org/pypi/unittest2")
1560 (synopsis "Python unit testing library")
1561 (description
1562 "Unittest2 is a replacement for the unittest module in the Python
1563standard library.")
3f641af0 1564 (license license:psfl)))
6cd9c356
DT
1565
1566(define-public python2-unittest2
1567 (package (inherit python-unittest2)
1568 (name "python2-unittest2")
1569 (version "0.5.1")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append
1574 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1575 version ".tar.gz"))
1576 (sha256
1577 (base32
1578 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1579 (inputs
7957fe6c 1580 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1581 (arguments
1582 `(#:python ,python-2
1583 #:tests? #f)))) ; no setup.py test command
1584
542ad60f
DT
1585(define-public python-py
1586 (package
1587 (name "python-py")
71c8a804 1588 (version "1.4.31")
542ad60f
DT
1589 (source
1590 (origin
1591 (method url-fetch)
71c8a804 1592 (uri (pypi-uri "py" version))
542ad60f
DT
1593 (sha256
1594 (base32
71c8a804 1595 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1596 (build-system python-build-system)
1597 (inputs
1598 `(("python-setuptools" ,python-setuptools)))
1599 (home-page "http://pylib.readthedocs.org/")
1600 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1601 (description
1602 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1603code introspection, and logging.")
bd3fa666 1604 (license license:expat)))
542ad60f
DT
1605
1606(define-public python2-py
1607 (package-with-python2 python-py))
1608
855d4761
DT
1609(define-public python-pytest
1610 (package
1611 (name "python-pytest")
61a4332d 1612 (version "2.7.3")
855d4761
DT
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (string-append
1617 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1618 version ".tar.gz"))
1619 (sha256
1620 (base32
61a4332d 1621 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1622 (modules '((guix build utils)))
1623 (snippet
1624 ;; One of the tests involves the /usr directory, so it fails.
1625 '(substitute* "testing/test_argcomplete.py"
1626 (("def test_remove_dir_prefix\\(self\\):")
1627 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1628 (build-system python-build-system)
1629 (inputs
1630 `(("python-setuptools" ,python-setuptools)
1631 ("python-py" ,python-py)
1632 ("python-nose" ,python-nose)
1633 ("python-mock" ,python-mock)))
1634 (home-page "http://pytest.org")
1635 (synopsis "Python testing library")
1636 (description
1637 "Pytest is a testing tool that provides auto-discovery of test modules
1638and functions, detailed info on failing assert statements, modular fixtures,
1639and many external plugins.")
bd3fa666 1640 (license license:expat)))
855d4761
DT
1641
1642(define-public python2-pytest
1643 (package-with-python2 python-pytest))
1644
358c3d61
EF
1645(define-public python-pytest-cov
1646 (package
1647 (name "python-pytest-cov")
545f4a1c 1648 (version "2.2.1")
358c3d61
EF
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "pytest-cov" version))
1653 (sha256
545f4a1c
EF
1654 (base32
1655 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1656 (build-system python-build-system)
545f4a1c 1657 (inputs
10468636
EF
1658 `(("python-coverage" ,python-coverage)
1659 ("python-pytest" ,python-pytest)))
10468636
EF
1660 (home-page "https://github.com/pytest-dev/pytest-cov")
1661 (synopsis "Pytest plugin for measuring coverage")
1662 (description
1663 "Pytest-cov produces coverage reports. It supports centralised testing and
1664distributed testing in both @code{load} and @code{each} modes. It also
1665supports coverage of subprocesses.")
545f4a1c
EF
1666 (license license:expat)
1667 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1668
1669(define-public python2-pytest-cov
545f4a1c
EF
1670 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1671 (package
1672 (inherit base)
1673 (inputs `(("python2-setuptools" ,python2-setuptools)
1674 ,@(package-inputs base))))))
358c3d61 1675
6784f2e3
RW
1676(define-public python-pytest-runner
1677 (package
1678 (name "python-pytest-runner")
1679 (version "2.6.2")
1680 (source
1681 (origin
1682 (method url-fetch)
54cd239b 1683 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1684 (sha256
1685 (base32
1686 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1687 (build-system python-build-system)
1688 (arguments
1689 `(#:phases
1690 (modify-phases %standard-phases
1691 ;; The fancy way of setting the version with setuptools_scm does not
1692 ;; seem to work here.
1693 (add-after 'unpack 'set-version
1694 (lambda _
1695 (substitute* "docs/conf.py"
1696 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1697 (string-append "version = \"" ,version "\"")))
1698 #t)))))
1699 (native-inputs
1700 `(("python-pytest" ,python-pytest)
1701 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1702 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1703 (synopsis "Invoke py.test as a distutils command")
1704 (description
1705 "This package provides a @command{pytest-runner} command that
1706@file{setup.py} files can use to run tests.")
54cd239b
EF
1707 (license license:expat)
1708 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1709
1710(define-public python2-pytest-runner
1711 (let ((base (package-with-python2
1712 (strip-python2-variant python-pytest-runner))))
1713 (package
1714 (inherit base)
1715 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1716 ,@(package-native-inputs base))))))
6784f2e3 1717
44547e51
EF
1718(define-public python-pytest-mock
1719 (package
1720 (name "python-pytest-mock")
1721 (version "1.2")
1722 (source
1723 (origin
1724 (method url-fetch)
1725 (uri (pypi-uri "pytest-mock" version ".zip"))
1726 (sha256
1727 (base32
1728 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1729 (build-system python-build-system)
1730 (native-inputs
1731 `(("unzip" ,unzip)))
1732 (inputs
1733 `(("python-py" ,python-py)
1734 ("python-pytest" ,python-pytest)))
1735 (home-page "https://github.com/pytest-dev/pytest-mock/")
1736 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1737 (description
1738 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1739around the patching API provided by the @code{mock} package, but with the
1740benefit of not having to worry about undoing patches at the end of a test.
1741The mocker fixture has the same API as @code{mock.patch}, supporting the
1742same arguments.")
1743 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1744 (license license:expat)))
1745
1746(define-public python2-pytest-mock
1747 (let ((base (package-with-python2
1748 (strip-python2-variant python-pytest-mock))))
1749 (package (inherit base)
1750 (native-inputs
1751 `(("python2-setuptools" ,python2-setuptools)
1752 ,@(package-native-inputs base)))
1753 (inputs
1754 `(("python2-mock" ,python2-mock)
1755 ,@(package-inputs base))))))
1756
8fa58fc9
CAW
1757(define-public python-pytest-xdist
1758 (package
1759 (name "python-pytest-xdist")
1760 (version "1.14")
1761 (source
1762 (origin
1763 (method url-fetch)
1764 (uri (pypi-uri "pytest-xdist" version ".zip"))
1765 (sha256
1766 (base32
de585a7e
HG
1767 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1768 (modules '((guix build utils)))
1769 (snippet
1770 '(begin
1771 ;; Remove pre-compiled .pyc files from source.
1772 (for-each delete-file-recursively
1773 (find-files "." "__pycache__" #:directories? #t))
1774 (for-each delete-file (find-files "." "\\.pyc$"))
1775 #t))))
8fa58fc9
CAW
1776 (build-system python-build-system)
1777 (native-inputs
1778 `(("unzip" ,unzip)
8fa58fc9 1779 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1780 (inputs
1781 `(("python-apipkg" ,python-apipkg)
1782 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1783 ("python-pytest" ,python-pytest)
1784 ("python-py" ,python-py)))
1785 (home-page
1786 "https://github.com/pytest-dev/pytest-xdist")
1787 (synopsis
1788 "Plugin for py.test with distributed testing and loop-on-failing modes")
1789 (description
1790 "The pytest-xdist plugin extends py.test with some unique test execution
1791modes: parallelization, running tests in boxed subprocesses, the ability
1792to run tests repeatedly when failed, and the ability to run tests on multiple
1793Python interpreters or platforms. It uses rsync to copy the existing
1794program code to a remote location, executes there, and then syncs the
1795result back.")
fbe9abcc
EF
1796 (license license:expat)
1797 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1798
1799(define-public python2-pytest-xdist
fbe9abcc
EF
1800 (let ((base (package-with-python2
1801 (strip-python2-variant python-pytest-xdist))))
1802 (package
1803 (inherit base)
1804 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1805 ,@(package-native-inputs base))))))
8fa58fc9 1806
84d24017
DT
1807(define-public python-scripttest
1808 (package
1809 (name "python-scripttest")
1810 (version "1.3")
1811 (source
1812 (origin
1813 (method url-fetch)
1814 (uri (string-append
1815 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1816 version ".tar.gz"))
1817 (sha256
1818 (base32
1819 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1820 (build-system python-build-system)
1821 (inputs
1822 `(("python-setuptools" ,python-setuptools)
1823 ("python-pytest" ,python-pytest)))
1824 (home-page "http://pythonpaste.org/scripttest/")
1825 (synopsis "Python library to test command-line scripts")
1826 (description "Scripttest is a Python helper library for testing
1827interactive command-line applications. With it you can run a script in a
1828subprocess and see the output as well as any file modifications.")
bd3fa666 1829 (license license:expat)))
84d24017
DT
1830
1831(define-public python2-scripttest
1832 (package-with-python2 python-scripttest))
1833
d8fa80e1
DT
1834(define-public python-testtools
1835 (package
1836 (name "python-testtools")
1837 (version "1.0.0")
1838 (source
1839 (origin
1840 (method url-fetch)
1841 (uri (string-append
1842 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1843 version ".tar.gz"))
1844 (sha256
1845 (base32
1846 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1847 (build-system python-build-system)
0e88cbf8
CR
1848 (propagated-inputs
1849 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1850 (inputs
1851 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1852 ("python-extras" ,python-extras)))
1853 (home-page "https://github.com/testing-cabal/testtools")
1854 (synopsis
1855 "Extensions to the Python standard library unit testing framework")
1856 (description
1857 "Testtools extends the Python standard library unit testing framework to
1858provide matchers, more debugging information, and cross-Python
1859compatibility.")
3f641af0 1860 (license license:psfl)))
d8fa80e1
DT
1861
1862(define-public python2-testtools
1863 (package-with-python2 python-testtools))
1864
5bf3afea
DT
1865(define-public python-testscenarios
1866 (package
1867 (name "python-testscenarios")
1868 (version "0.4")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (string-append
1873 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1874 version ".tar.gz"))
1875 (sha256
1876 (base32
1877 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1878 (build-system python-build-system)
1879 (inputs
1880 `(("python-setuptools" ,python-setuptools)
1881 ("python-testtools" ,python-testtools)
1882 ("python-mimeparse" ,python-mimeparse)))
1883 (home-page "https://launchpad.net/testscenarios")
1884 (synopsis "Pyunit extension for dependency injection")
1885 (description
1886 "Testscenarios provides clean dependency injection for Python unittest
1887style tests.")
3f641af0 1888 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1889
1890(define-public python2-testscenarios
1891 (package-with-python2 python-testscenarios))
1892
dac79ecc
DT
1893(define-public python-testresources
1894 (package
1895 (name "python-testresources")
1896 (version "0.2.7")
1897 (source
1898 (origin
1899 (method url-fetch)
1900 (uri (string-append
1901 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1902 version ".tar.gz"))
1903 (sha256
1904 (base32
1905 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1906 (build-system python-build-system)
1907 (inputs
1908 `(("python-setuptools" ,python-setuptools)))
1909 (home-page "https://launchpad.net/testresources")
1910 (synopsis
1911 "Pyunit extension for managing test resources")
1912 (description
1913 "Testresources is an extension to Python's unittest to allow declarative
1914use of resources by test cases.")
3f641af0 1915 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1916
1917(define-public python2-testresources
1918 (package-with-python2 python-testresources))
1919
070ab058
DT
1920(define-public python-subunit
1921 (package
1922 (name "python-subunit")
1923 (version "0.0.21")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (string-append
1928 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1929 version ".tar.gz"))
1930 (sha256
1931 (base32
1932 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1933 (build-system python-build-system)
1934 (inputs
1935 `(("python-setuptools" ,python-setuptools)
1936 ("python-testtools" ,python-testtools)
1937 ("python-mimeparse" ,python-mimeparse)
1938 ("python-testscenarios" ,python-testscenarios)))
1939 (home-page "http://launchpad.net/subunit")
1940 (synopsis "Python implementation of the subunit protocol")
1941 (description
1942 "Python-subunit is a Python implementation of the subunit test streaming
1943protocol.")
3f641af0 1944 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1945
1946(define-public python2-subunit
1947 (package-with-python2 python-subunit))
1948
7787ef76
CR
1949;; Recent versions of python-fixtures need a recent version of python-pbr,
1950;; which needs a recent version of python-fixtures. To fix this circular
1951;; dependency, we keep old versions of python-fixtures and python-pbr to
1952;; bootstrap the whole thing:
1953;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1954;; - python-pbr-0.11 is used to build python-fixtures
1955;; - python-fixtures is used to build python-pbr
1956(define-public python-fixtures-0.3.16
cd49454b
DT
1957 (package
1958 (name "python-fixtures")
1959 (version "0.3.16")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (string-append
1964 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1965 version ".tar.gz"))
1966 (sha256
1967 (base32
1968 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1969 (build-system python-build-system)
1970 (inputs
1971 `(("python-setuptools" ,python-setuptools)))
1972 (arguments
1973 '(#:tests? #f)) ; no setup.py test command
1974 (home-page "https://launchpad.net/python-fixtures")
1975 (synopsis "Python test fixture library")
1976 (description
1977 "Fixtures provides a way to create reusable state, useful when writing
1978Python tests.")
3f641af0 1979 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 1980
7787ef76
CR
1981(define-public python2-fixtures-0.3.16
1982 (package-with-python2 python-fixtures-0.3.16))
1983
1984(define-public python-pbr-0.11
1985 (package
1986 (name "python-pbr")
1987 (version "0.11.0")
1988 (source
1989 (origin
1990 (method url-fetch)
1991 (uri (string-append
1992 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1993 version ".tar.gz"))
1994 (sha256
1995 (base32
1996 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1997 (build-system python-build-system)
1998 (arguments
1999 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2000 (inputs
2001 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2002 ("python-pip" ,python-pip)
2003 ("python-setuptools" ,python-setuptools)))
2004 (home-page "https://launchpad.net/pbr")
2005 (synopsis "Change the default behavior of Python’s setuptools")
2006 (description
2007 "Python Build Reasonableness (PBR) is a library that injects some useful
2008and sensible default behaviors into your setuptools run.")
3f641af0 2009 (license license:asl2.0)))
7787ef76
CR
2010
2011(define-public python2-pbr-0.11
2012 (package-with-python2 python-pbr-0.11))
2013
1ef09c0c 2014(define-public python-pbr
e25f0174
BW
2015 (package
2016 (name "python-pbr")
1ef09c0c
BW
2017 (version "1.8.1")
2018 (source
e25f0174
BW
2019 (origin
2020 (method url-fetch)
2021 (uri (string-append
2022 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2023 version
2024 ".tar.gz"))
2025 (sha256
2026 (base32
2027 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2028 (build-system python-build-system)
e25f0174
BW
2029 (arguments
2030 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2031 (propagated-inputs
2032 `(("python-testrepository" ,python-testrepository)
2033 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2034 (inputs
e25f0174
BW
2035 `(("python-fixtures" ,python-fixtures)
2036 ("python-mimeparse" ,python-mimeparse)
2037 ("python-mock" ,python-mock)
2038 ("python-setuptools" ,python-setuptools)
2039 ("python-six" ,python-six)
2040 ("python-sphinx" ,python-sphinx)
2041 ("python-testrepository" ,python-testrepository)
2042 ("python-testresources" ,python-testresources)
2043 ("python-testscenarios" ,python-testscenarios)
2044 ("python-testtools" ,python-testtools)
2045 ("python-virtualenv" ,python-virtualenv)))
2046 (home-page "https://launchpad.net/pbr")
2047 (synopsis "Change the default behavior of Python’s setuptools")
2048 (description
2049 "Python Build Reasonableness (PBR) is a library that injects some useful
2050and sensible default behaviors into your setuptools run.")
3f641af0 2051 (license license:asl2.0)))
1ef09c0c
BW
2052
2053(define-public python2-pbr
e25f0174 2054 (package-with-python2 python-pbr))
1ef09c0c 2055
7787ef76
CR
2056(define-public python-fixtures
2057 (package
2058 (name "python-fixtures")
13fcc6df 2059 (version "1.4.0")
7787ef76
CR
2060 (source
2061 (origin
2062 (method url-fetch)
13fcc6df 2063 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2064 (sha256
2065 (base32
13fcc6df 2066 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2067 (build-system python-build-system)
2068 (propagated-inputs
2069 `(("python-six" ,python-six)
2070 ("python-pbr-0.11" ,python-pbr-0.11)))
2071 (inputs
2072 `(("python-pip" ,python-pip)
2073 ("python-setuptools" ,python-setuptools)
2074 ;; Tests
2075 ("python-testtools" ,python-testtools)))
2076 (arguments
2077 '(#:tests? #f)) ; no setup.py test command
2078 (home-page "https://launchpad.net/python-fixtures")
2079 (synopsis "Python test fixture library")
2080 (description
2081 "Fixtures provides a way to create reusable state, useful when writing
2082Python tests.")
3f641af0 2083 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2084
cd49454b
DT
2085(define-public python2-fixtures
2086 (package-with-python2 python-fixtures))
2087
b24a0c00
DT
2088(define-public python-testrepository
2089 (package
2090 (name "python-testrepository")
2091 (version "0.0.20")
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (string-append
2096 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2097 version ".tar.gz"))
2098 (sha256
2099 (base32
2100 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2101 (build-system python-build-system)
05de40c5 2102 (propagated-inputs
7787ef76 2103 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2104 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2105 (inputs
2106 `(("python-setuptools" ,python-setuptools)
b24a0c00 2107 ("python-subunit" ,python-subunit)
b24a0c00
DT
2108 ("python-mimeparse" ,python-mimeparse)))
2109 (home-page "https://launchpad.net/testrepository")
2110 (synopsis "Database for Python test results")
2111 (description "Testrepository provides a database of test results which can
2112be used as part of a developer's workflow to check things such as what tests
2113have failed since the last commit or what tests are currently failing.")
3f641af0 2114 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2115
2116(define-public python2-testrepository
2117 (package-with-python2 python-testrepository))
2118
243a009a
DT
2119(define-public python-coverage
2120 (package
2121 (name "python-coverage")
4d4cf3dd 2122 (version "4.1")
243a009a
DT
2123 (source
2124 (origin
2125 (method url-fetch)
82a3c582 2126 (uri (pypi-uri "coverage" version))
243a009a
DT
2127 (sha256
2128 (base32
4d4cf3dd 2129 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2130 (build-system python-build-system)
2131 (inputs
2132 `(("python-setuptools" ,python-setuptools)))
2133 (home-page "http://nedbatchelder.com/code/coverage")
2134 (synopsis "Code coverage measurement for Python")
2135 (description
2136 "Coverage measures code coverage, typically during test execution. It
2137uses the code analysis tools and tracing hooks provided in the Python standard
2138library to determine which lines are executable, and which have been
2139executed.")
3f641af0 2140 (license license:bsd-3)))
243a009a
DT
2141
2142(define-public python2-coverage
2143 (package-with-python2 python-coverage))
2144
12f839fd
EF
2145(define-public python-cov-core
2146 (package
2147 (name "python-cov-core")
2148 (version "1.15.0")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "cov-core" version))
2153 (sha256
2154 (base32
2155 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2156 (build-system python-build-system)
2157 (native-inputs
2158 `(("python-coverage" ,python-coverage)))
2159 (home-page "https://github.com/schlamar/cov-core")
2160 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2161 (description
2162 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2163It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2164 (license license:expat)
2165 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2166
2167(define-public python2-cov-core
8120205c 2168 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2169 (package (inherit cov-core)
2170 (native-inputs
2171 `(("python2-setuptools" ,python2-setuptools)
2172 ,@(package-native-inputs cov-core))))))
2173
041358fb
DT
2174(define-public python-discover
2175 (package
2176 (name "python-discover")
2177 (version "0.4.0")
2178 (source
2179 (origin
2180 (method url-fetch)
2181 (uri (string-append
2182 "https://pypi.python.org/packages/source/d/discover/discover-"
2183 version ".tar.gz"))
2184 (sha256
2185 (base32
2186 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2187 (build-system python-build-system)
2188 (inputs
2189 `(("python-setuptools" ,python-setuptools)))
2190 (home-page "http://pypi.python.org/pypi/discover/")
2191 (synopsis
2192 "Python test discovery for unittest")
2193 (description
2194 "Discover provides test discovery for unittest, a feature that has been
e881752c 2195backported from Python 2.7 for Python 2.4+.")
3f641af0 2196 (license license:bsd-3)))
041358fb
DT
2197
2198(define-public python2-discover
2199 (package-with-python2 python-discover))
2200
a480bc41
EB
2201(define-public behave
2202 (package
2203 (name "behave")
287cfd1a 2204 (version "1.2.5")
a480bc41
EB
2205 (source (origin
2206 (method url-fetch)
287cfd1a 2207 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2208 (sha256
2209 (base32
287cfd1a 2210 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2211 (build-system python-build-system)
2212 (inputs
2213 `(("python-setuptools" ,python-setuptools)
2214 ("python-six" ,python-six)
a480bc41
EB
2215 ("python-parse" ,python-parse)
2216 ("python-parse-type" ,python-parse-type)))
2217 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2218 ;PyHamcrest>=1.8
2219 (home-page "http://github.com/behave/behave")
2220 (synopsis "Python behavior-driven development")
2221 (description
2222 "Behave is a tool for behavior-driven development in python.
2223Behavior-driven development (or BDD) is an agile software development
2224technique that encourages collaboration between developers, QA and
2225non-technical or business participants in a software project. Behave uses
2226tests written in a natural language style, backed up by Python code.")
3f641af0 2227 (license license:x11)))
c7303d3c
DT
2228
2229(define-public python-exif-read
2230 (package
2231 (name "python-exif-read")
2a2d0981 2232 (version "2.1.2")
c7303d3c
DT
2233 (source (origin
2234 (method url-fetch)
2a2d0981 2235 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2236 (sha256
2237 (base32
2a2d0981 2238 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2239 (build-system python-build-system)
2240 (inputs
2241 `(("python-setuptools" ,python-setuptools)))
2242 (arguments `(#:tests? #f)) ; no tests
2243 (home-page "https://github.com/ianare/exif-py")
2244 (synopsis "Python library to extract EXIF data from image files")
2245 (description
2246 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2247files.")
3f641af0 2248 (license license:bsd-3)))
c7303d3c
DT
2249
2250(define-public python2-exif-read
2251 (package-with-python2 python-exif-read))
d5f89b22
DT
2252
2253(define-public python-pyld
2254 (package
2255 (name "python-pyld")
af1ab773 2256 (version "0.6.8")
d5f89b22
DT
2257 (source (origin
2258 (method url-fetch)
af1ab773 2259 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2260 (sha256
2261 (base32
af1ab773 2262 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2263 (build-system python-build-system)
2264 (inputs
2265 `(("python-setuptools" ,python-setuptools)))
2266 (arguments `(#:tests? #f)) ; no tests
2267 (home-page "http://github.com/digitalbazaar/pyld")
2268 (synopsis "Python implementation of the JSON-LD specification")
2269 (description
2270 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2271 (license license:bsd-3)))
d5f89b22
DT
2272
2273(define-public python2-pyld
2274 (package-with-python2 python-pyld))
3a1f9a68
DT
2275
2276(define-public python-certifi
2277 (package
2278 (name "python-certifi")
b2a2232c 2279 (version "2016.8.31")
3a1f9a68
DT
2280 (source (origin
2281 (method url-fetch)
9a41f443 2282 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2283 (sha256
2284 (base32
b2a2232c 2285 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2286 (build-system python-build-system)
2287 (inputs
2288 `(("python-setuptools" ,python-setuptools)))
2289 (arguments `(#:tests? #f)) ; no tests
2290 (home-page "http://python-requests.org/")
2291 (synopsis "Python CA certificate bundle")
2292 (description
2293 "Certifi is a Python library that contains a CA certificate bundle, which
2294is used by the Requests library to verify HTTPS requests.")
3f641af0 2295 (license license:asl2.0)))
3a1f9a68
DT
2296
2297(define-public python2-certifi
2298 (package-with-python2 python-certifi))
e6cfbd36 2299
12c270dd
RW
2300(define-public python-click
2301 (package
2302 (name "python-click")
43accb58 2303 (version "6.6")
12c270dd
RW
2304 (source
2305 (origin
2306 (method url-fetch)
375f224b 2307 (uri (pypi-uri "click" version))
12c270dd 2308 (sha256
43accb58
LF
2309 (base32
2310 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2311 (build-system python-build-system)
e2ab5a09
BW
2312 (arguments
2313 `(#:phases
2314 (modify-phases %standard-phases
2315 (add-after 'unpack 'fix-paths
2316 (lambda* (#:key inputs #:allow-other-keys)
2317 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2318 "cross-libc" "libc"))))
2319 (substitute* "click/_unicodefun.py"
2320 (("'locale'")
2321 (string-append "'" glibc "/bin/locale'"))))
2322 #t)))))
12c270dd
RW
2323 (native-inputs
2324 `(("python-setuptools" ,python-setuptools)))
2325 (home-page "http://click.pocoo.org")
2326 (synopsis "Command line library for Python")
2327 (description
2328 "Click is a Python package for creating command line interfaces in a
2329composable way with as little code as necessary. Its name stands for
2330\"Command Line Interface Creation Kit\". It's highly configurable but comes
2331with sensible defaults out of the box.")
3f641af0 2332 (license license:bsd-3)))
12c270dd
RW
2333
2334(define-public python2-click
2335 (package-with-python2 python-click))
2336
addc808d
EF
2337(define-public python-wheel
2338 (package
2339 (name "python-wheel")
40981b5c 2340 (version "0.29.0")
e1ba0749
EF
2341 (source
2342 (origin
2343 (method url-fetch)
2344 (uri (pypi-uri "wheel" version))
2345 (sha256
2346 (base32
40981b5c 2347 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2348 (build-system python-build-system)
2349 (native-inputs
2350 `(("python-setuptools" ,python-setuptools)
2351 ("python-jsonschema" ,python-jsonschema)
2352 ("python-pytest-cov" ,python-pytest-cov)))
2353 (home-page "https://bitbucket.org/pypa/wheel/")
2354 (synopsis "Format for built Python packages")
2355 (description
2356 "A wheel is a ZIP-format archive with a specially formatted filename and
2357the @code{.whl} extension. It is designed to contain all the files for a PEP
2358376 compatible install in a way that is very close to the on-disk format. Many
2359packages will be properly installed with only the @code{Unpack} step and the
2360unpacked archive preserves enough information to @code{Spread} (copy data and
2361scripts to their final locations) at any later time. Wheel files can be
2362installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2363 (license license:expat)
2364 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2365
2366(define-public python2-wheel
8ad4ae20
LF
2367 (let ((wheel (package-with-python2
2368 (strip-python2-variant python-wheel))))
264ae686 2369 (package (inherit wheel)
8ad4ae20
LF
2370 (native-inputs `(("python2-functools32" ,python2-functools32)
2371 ,@(package-native-inputs wheel))))))
2372
addc808d 2373
ae641128 2374(define-public python-requests
e6cfbd36 2375 (package
ae641128 2376 (name "python-requests")
74a066f9 2377 (version "2.9.1")
e6cfbd36
DT
2378 (source (origin
2379 (method url-fetch)
5d691657 2380 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2381 (sha256
2382 (base32
74a066f9 2383 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2384 (build-system python-build-system)
5d691657 2385 (native-inputs
6a308947
EF
2386 `(("python-setuptools" ,python-setuptools)
2387 ("python-py" ,python-py)
5d691657
EF
2388 ("python-pytest" ,python-pytest)
2389 ("python-pytest-cov" ,python-pytest-cov)
2390 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2391 (home-page "http://python-requests.org/")
2392 (synopsis "Python HTTP library")
2393 (description
2394 "Requests is a Python HTTP client library. It aims to be easier to use
2395than Python’s urllib2 library.")
3f641af0 2396 (license license:asl2.0)))
864b5211 2397
e9005180
DT
2398;; Some software requires an older version of Requests, notably Docker
2399;; Compose.
2400(define-public python-requests-2.7
2401 (package (inherit python-requests)
2402 (version "2.7.0")
2403 (source (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "requests" version))
2406 (sha256
2407 (base32
2408 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2409
ae641128 2410(define-public python2-requests
8ad4ae20 2411 (package-with-python2 python-requests))
ae641128 2412
ea521b42
DT
2413(define-public python-vcversioner
2414 (package
2415 (name "python-vcversioner")
2416 (version "2.14.0.0")
2417 (source
2418 (origin
2419 (method url-fetch)
2420 (uri (pypi-uri "vcversioner" version))
2421 (sha256
2422 (base32
2423 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2424 (build-system python-build-system)
2425 (inputs
2426 `(("python-setuptools" ,python-setuptools)))
2427 (synopsis "Python library for version number discovery")
2428 (description "Vcversioner is a Python library that inspects tagging
2429information in a variety of version control systems in order to discover
2430version numbers.")
2431 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2432 (license license:isc)))
ea521b42
DT
2433
2434(define-public python2-vcversioner
2435 (package-with-python2 python-vcversioner))
ae641128 2436
864b5211
DT
2437(define-public python-jsonschema
2438 (package
2439 (name "python-jsonschema")
b3667afb 2440 (version "2.5.1")
864b5211
DT
2441 (source (origin
2442 (method url-fetch)
2443 (uri
2444 (string-append
2445 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2446 version ".tar.gz"))
2447 (sha256
2448 (base32
b3667afb 2449 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2450 (build-system python-build-system)
2451 (inputs
b3667afb
DT
2452 `(("python-setuptools" ,python-setuptools)
2453 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2454 (home-page "http://github.com/Julian/jsonschema")
2455 (synopsis "Implementation of JSON Schema for Python")
2456 (description
2457 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2458 (license license:expat)
2459 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2460
2461(define-public python2-jsonschema
a14600ec
LF
2462 (let ((jsonschema (package-with-python2
2463 (strip-python2-variant python-jsonschema))))
264ae686
EF
2464 (package (inherit jsonschema)
2465 (inputs
2466 `(("python2-functools32" ,python2-functools32)
2467 ,@(package-inputs jsonschema))))))
850189b8
DT
2468
2469(define-public python-unidecode
2470 (package
2471 (name "python-unidecode")
8925d4f3 2472 (version "0.04.18")
850189b8
DT
2473 (source (origin
2474 (method url-fetch)
8925d4f3 2475 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2476 (sha256
2477 (base32
8925d4f3 2478 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2479 (build-system python-build-system)
2480 (inputs
2481 `(("python-setuptools" ,python-setuptools)))
2482 (home-page "https://pypi.python.org/pypi/Unidecode")
2483 (synopsis "ASCII transliterations of Unicode text")
2484 (description
2485 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2486useful when integrating with legacy code that doesn't support Unicode, or for
2487ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2488machine identifiers from human-readable Unicode strings that should still be
2489somewhat intelligeble.")
3f641af0 2490 (license license:gpl2+)))
850189b8
DT
2491
2492(define-public python2-unidecode
2493 (package-with-python2 python-unidecode))
6d45fef4
DT
2494
2495(define-public python-pyjwt
2496 (package
2497 (name "python-pyjwt")
eb31d4b4 2498 (version "1.4.0")
6d45fef4
DT
2499 (source
2500 (origin
2501 (method url-fetch)
eb31d4b4 2502 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2503 (sha256
2504 (base32
eb31d4b4 2505 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2506 (build-system python-build-system)
eb31d4b4
EF
2507 (native-inputs
2508 `(("python-setuptools" ,python-setuptools)
2509 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2510 (arguments
2511 '(#:tests? #f)) ; test suite doesn't work
2512 (home-page "http://github.com/progrium/pyjwt")
2513 (synopsis "JSON Web Token implementation in Python")
2514 (description
2515 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2516 (license license:expat)))
6d45fef4
DT
2517
2518(define-public python2-pyjwt
2519 (package-with-python2 python-pyjwt))
2520
2cec1f6f
DT
2521(define-public python-oauthlib
2522 (package
2523 (name "python-oauthlib")
bde2171d 2524 (version "1.0.3")
2cec1f6f
DT
2525 (source (origin
2526 (method url-fetch)
bde2171d 2527 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2528 (sha256
2529 (base32
bde2171d 2530 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2531 (build-system python-build-system)
bde2171d 2532 (native-inputs
59f151ec 2533 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2534 ("python-nose" ,python-nose)
2535 ("python-mock" ,python-mock)))
bde2171d
EF
2536 (inputs
2537 `(("python-blinker" ,python-blinker)
2538 ("python-cryptography" ,python-cryptography)
2539 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2540 (home-page "https://github.com/idan/oauthlib")
2541 (synopsis "OAuth implementation for Python")
2542 (description
2543 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2544OAuth request-signing logic.")
3f641af0 2545 (license license:bsd-3)
59f151ec 2546 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2547
2548(define-public python2-oauthlib
59f151ec 2549 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2550 (package
2551 (inherit base)
59f151ec
EF
2552 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2553 ("python2-unittest2" ,python2-unittest2)
2554 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2555
2556(define-public python-itsdangerous
2557 (package
2558 (name "python-itsdangerous")
2559 (version "0.24")
2560 (source
2561 (origin
2562 (method url-fetch)
2563 (uri (string-append
2564 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2565 version ".tar.gz"))
2566 (sha256
2567 (base32
2568 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2569 (build-system python-build-system)
ec5dbb5c
DT
2570 (home-page "http://github.com/mitsuhiko/itsdangerous")
2571 (synopsis "Python library for passing data to/from untrusted environments")
2572 (description
2573 "Itsdangerous provides various helpers to pass trusted data to untrusted
2574environments and back.")
3f641af0 2575 (license license:bsd-3)
194d0d98 2576 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2577
2578(define-public python2-itsdangerous
194d0d98
EF
2579 (let ((base (package-with-python2
2580 (strip-python2-variant python-itsdangerous))))
2581 (package
2582 (inherit base)
2583 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2584 ,@(package-native-inputs base))))))
5731cae3 2585
8d12be1e
RW
2586(define-public python-pyyaml
2587 (package
2588 (name "python-pyyaml")
2589 (version "3.11")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (string-append
2594 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2595 version ".tar.gz"))
2596 (sha256
2597 (base32
2598 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2599 (build-system python-build-system)
2600 (inputs
2601 `(("libyaml" ,libyaml)))
2602 (native-inputs
2603 `(("python-setuptools" ,python-setuptools)))
2604 (home-page "http://pyyaml.org/wiki/PyYAML")
2605 (synopsis "YAML parser and emitter for Python")
2606 (description
2607 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2608complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2609API, and sensible error messages. PyYAML supports standard YAML tags and
2610provides Python-specific tags that allow to represent an arbitrary Python
2611object.")
2612 (license license:expat)))
2613
2614(define-public python2-pyyaml
2615 (package-with-python2 python-pyyaml))
2616
5731cae3
DT
2617(define-public python-virtualenv
2618 (package
2619 (name "python-virtualenv")
58d04dba 2620 (version "15.0.3")
5731cae3
DT
2621 (source
2622 (origin
2623 (method url-fetch)
17804240 2624 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2625 (sha256
2626 (base32
58d04dba 2627 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2628 (build-system python-build-system)
17804240
EF
2629 (arguments
2630 `(#:phases
2631 (modify-phases %standard-phases
58d04dba
RW
2632 (replace 'check
2633 (lambda _
2634 ;; Disable failing test. See upstream bug report
2635 ;; https://github.com/pypa/virtualenv/issues/957
2636 (substitute* "tests/test_virtualenv.py"
2637 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2638 (zero? (system* "py.test")))))))
5731cae3
DT
2639 (inputs
2640 `(("python-setuptools" ,python-setuptools)
2641 ("python-mock" ,python-mock)
17804240 2642 ("python-pytest" ,python-pytest)))
5731cae3
DT
2643 (home-page "https://virtualenv.pypa.io/")
2644 (synopsis "Virtual Python environment builder")
2645 (description
2646 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2647 (license license:expat)))
5731cae3
DT
2648
2649(define-public python2-virtualenv
2650 (package-with-python2 python-virtualenv))
8176d4d5
DT
2651
2652(define-public python-markupsafe
2653 (package
2654 (name "python-markupsafe")
2655 (version "0.23")
2656 (source
2657 (origin
2658 (method url-fetch)
2659 (uri (string-append
2660 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2661 version ".tar.gz"))
2662 (sha256
2663 (base32
2664 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2665 (build-system python-build-system)
2666 (inputs
2667 `(("python-setuptools" ,python-setuptools)))
2668 (home-page "http://github.com/mitsuhiko/markupsafe")
2669 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2670 (description
2671 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2672for Python.")
3f641af0 2673 (license license:bsd-3)))
8176d4d5
DT
2674
2675(define-public python2-markupsafe
2676 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2677
2678(define-public python-jinja2
2679 (package
2680 (name "python-jinja2")
e98149b3 2681 (version "2.8")
fe34f0d1
DT
2682 (source
2683 (origin
2684 (method url-fetch)
e98149b3 2685 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2686 (sha256
2687 (base32
e98149b3 2688 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2689 (build-system python-build-system)
2690 (inputs
2691 `(("python-setuptools" ,python-setuptools)
2692 ("python-markupsafe" ,python-markupsafe)))
2693 (home-page "http://jinja.pocoo.org/")
2694 (synopsis "Python template engine")
2695 (description
2696 "Jinja2 is a small but fast and easy to use stand-alone template engine
2697written in pure Python.")
3f641af0 2698 (license license:bsd-3)))
fe34f0d1
DT
2699
2700(define-public python2-jinja2
2701 (package-with-python2 python-jinja2))
3580ab8b 2702
f7d17ac7
EE
2703(define-public python-pystache
2704 (package
2705 (name "python-pystache")
2706 (version "0.5.4")
2707 (source (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "pystache" version))
2710 (sha256
2711 (base32
2712 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2713 (build-system python-build-system)
2714 (native-inputs
2715 `(("python-setuptools" ,python-setuptools)))
2716 (home-page "http://defunkt.io/pystache/")
2717 (synopsis "Python logic-less template engine")
2718 (description
2719 "Pystache is a Python implementation of the framework agnostic,
2720logic-free templating system Mustache.")
2721 (license license:expat)))
2722
2723(define-public python2-pystache
2724 (package-with-python2 python-pystache))
2725
1285119b
RW
2726(define-public python-joblib
2727 (package
2728 (name "python-joblib")
2729 (version "0.9.0b4")
2730 (source (origin
2731 (method url-fetch)
2732 (uri (string-append "https://pypi.python.org/packages/source/"
2733 "j/joblib/joblib-" version ".tar.gz"))
2734 (sha256
2735 (base32
2736 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2737 (build-system python-build-system)
2738 (native-inputs
2739 `(("python-setuptools" ,python-setuptools)
2740 ("python-nose" ,python-nose)))
2741 (home-page "http://pythonhosted.org/joblib/")
2742 (synopsis "Using Python functions as pipeline jobs")
2743 (description
2744 "Joblib is a set of tools to provide lightweight pipelining in Python.
2745In particular, joblib offers: transparent disk-caching of the output values
2746and lazy re-evaluation (memoize pattern), easy simple parallel computing
2747logging and tracing of the execution.")
3f641af0 2748 (license license:bsd-3)))
1285119b
RW
2749
2750(define-public python2-joblib
2751 (package-with-python2 python-joblib))
2752
3580ab8b
DT
2753(define-public python-docutils
2754 (package
2755 (name "python-docutils")
2756 (version "0.12")
2757 (source
2758 (origin
2759 (method url-fetch)
2760 (uri (string-append
2761 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2762 version ".tar.gz"))
2763 (sha256
2764 (base32
2765 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2766 (build-system python-build-system)
2767 (inputs
2768 `(("python-setuptools" ,python-setuptools)))
2769 (arguments
2770 '(#:tests? #f)) ; no setup.py test command
2771 (home-page "http://docutils.sourceforge.net/")
2772 (synopsis "Python Documentation Utilities")
2773 (description
2774 "Docutils is a modular system for processing documentation into useful
2775formats, such as HTML, XML, and LaTeX. For input Docutils supports
2776reStructuredText.")
2777 ;; Most of the source code is public domain, but some source files are
2778 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2779 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2780
2781(define-public python2-docutils
2782 (package-with-python2 python-docutils))
fb35b7c0
DT
2783
2784(define-public python-pygments
2785 (package
2786 (name "python-pygments")
9f442285 2787 (version "2.0.2")
fb35b7c0
DT
2788 (source
2789 (origin
2790 (method url-fetch)
9f442285 2791 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2792 (sha256
2793 (base32
9f442285 2794 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2795 (build-system python-build-system)
2796 (inputs
2797 `(("python-setuptools" ,python-setuptools)))
2798 (home-page "http://pygments.org/")
2799 (synopsis "Syntax highlighting")
2800 (description
2801 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2802 (license license:bsd-2)))
fb35b7c0
DT
2803
2804(define-public python2-pygments
2805 (package-with-python2 python-pygments))
9dd6078d
DT
2806
2807(define-public python-sphinx
2808 (package
2809 (name "python-sphinx")
2810 (version "1.2.3")
2811 (source
2812 (origin
2813 (method url-fetch)
2814 (uri (string-append
2815 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2816 version ".tar.gz"))
2817 (sha256
2818 (base32
2819 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2820 (build-system python-build-system)
2821 (inputs
2822 `(("python-setuptools" ,python-setuptools)
2823 ("python-jinja2" ,python-jinja2)
2824 ("python-docutils" ,python-docutils)
2825 ("python-pygments" ,python-pygments)))
2826 (home-page "http://sphinx-doc.org/")
2827 (synopsis "Python documentation generator")
2828 (description "Sphinx is a tool that makes it easy to create documentation
2829for Python projects or other documents consisting of multiple reStructuredText
2830sources.")
3f641af0 2831 (license license:bsd-3)))
9dd6078d
DT
2832
2833(define-public python2-sphinx
2834 (package-with-python2 python-sphinx))
6888830b 2835
ad320b20
RW
2836(define-public python-sphinx-rtd-theme
2837 (package
2838 (name "python-sphinx-rtd-theme")
2839 (version "0.1.6")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (string-append "https://pypi.python.org/packages/source/s/"
2844 "sphinx_rtd_theme/sphinx_rtd_theme-"
2845 version ".tar.gz"))
2846 (sha256
2847 (base32
2848 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2849 (build-system python-build-system)
2850 (arguments
2851 `(;; With standard flags, the install phase attempts to create a zip'd
2852 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2853 ;; before 1980'
2854 #:configure-flags '("--single-version-externally-managed"
2855 "--record=sphinx-rtd-theme.txt")))
2856 (native-inputs
2857 `(("python-setuptools" ,python-setuptools)))
2858 (inputs
2859 `(("python-docutils" ,python-docutils)
2860 ("python-sphinx" ,python-sphinx)))
2861 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2862 (synopsis "ReadTheDocs.org theme for Sphinx")
2863 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2864 (license license:expat)))
ad320b20
RW
2865
2866(define-public python2-sphinx-rtd-theme
2867 (package-with-python2 python-sphinx-rtd-theme))
2868
f4de5b3b
CAW
2869(define-public python-feedgenerator
2870 (package
2871 (name "python-feedgenerator")
f0412aa2 2872 (version "1.8")
f4de5b3b 2873 (source
f4de5b3b 2874 (origin
f0412aa2
EF
2875 (method url-fetch)
2876 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2877 (sha256
2878 (base32
f0412aa2 2879 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2880 (build-system python-build-system)
f0412aa2 2881 (native-inputs
f4de5b3b
CAW
2882 `(("python-setuptools" ,python-setuptools)
2883 ("python-pytz" ,python-pytz)
2884 ("python-six" ,python-six)))
f0412aa2 2885 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2886 (synopsis
2887 "Standalone version of Django's Atom/RSS feed generator")
2888 (description
2889 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2890which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2891 (license license:bsd-3)))
f4de5b3b
CAW
2892
2893(define-public python2-feedgenerator
2894 (package-with-python2 python-feedgenerator))
2895
59ad30e3
CAW
2896(define-public python-blinker
2897 (package
2898 (name "python-blinker")
7fb9ff4d 2899 (version "1.4")
59ad30e3
CAW
2900 (source
2901 (origin
2902 (method url-fetch)
7fb9ff4d 2903 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2904 (sha256
2905 (base32
7fb9ff4d 2906 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2907 (build-system python-build-system)
2908 (native-inputs
2909 `(("python-setuptools" ,python-setuptools)))
2910 ;; No "test" command supplied to setuptools, so unless there's another way
2911 ;; to run tests, we're skipping them!
2912 (arguments '(#:tests? #f))
2913 (home-page "http://pythonhosted.org/blinker/")
2914 (synopsis "Fast, simple object-to-object and broadcast signaling")
2915 (description
2916 "Blinker provides a fast dispatching system that allows any number of
2917interested parties to subscribe to events, or \"signals\".")
2918 (license license:expat)))
2919
2920(define-public python2-blinker
2921 (package-with-python2 python-blinker))
2922
b8050e71
CAW
2923(define-public pelican
2924 (package
2925 (name "pelican")
11f97c27 2926 (version "3.6.3")
b8050e71
CAW
2927 (source
2928 (origin
2929 (method url-fetch)
11f97c27 2930 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2931 (sha256
2932 (base32
11f97c27 2933 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2934 (build-system python-build-system)
d9f2dece 2935 (inputs
b8050e71
CAW
2936 `(("python-feedgenerator" ,python-feedgenerator)
2937 ("python-jinja2" ,python-jinja2)
2938 ("python-pygments" ,python-pygments)
2939 ("python-docutils" ,python-docutils)
2940 ("python-pytz" ,python-pytz)
2941 ("python-blinker" ,python-blinker)
2942 ("python-unidecode" ,python-unidecode)
2943 ("python-six" ,python-six)
2944 ("python-dateutil-2" ,python-dateutil-2)))
2945 (home-page "http://getpelican.com/")
2946 (arguments
2947 `(;; XXX Requires a lot more packages to do unit tests :P
2948 #:tests? #f
2949 #:phases (modify-phases %standard-phases
2950 (add-before
2951 'install 'adjust-requires
2952 ;; Since feedgenerator is installed from git, it doesn't
2953 ;; conform to the version requirements.
2954 ;;
2955 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2956 ;; version requirement so setuptools doesn't get confused.
2957 (lambda _
2958 (substitute* "setup.py"
2959 (("['\"]feedgenerator.*?['\"]")
2960 "'feedgenerator'")))))))
2961 (synopsis "Python-based static site publishing system")
2962 (description
2963 "Pelican is a tool to generate a static blog from reStructuredText,
2964Markdown input files, and more. Pelican uses Jinja2 for templating
2965and is very extensible.")
3f641af0 2966 (license license:agpl3+)))
b8050e71 2967
240ca4aa
RW
2968(define-public python-scikit-learn
2969 (package
2970 (name "python-scikit-learn")
be0a4c26 2971 (version "0.16.1")
240ca4aa
RW
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (string-append
2976 "https://github.com/scikit-learn/scikit-learn/archive/"
2977 version ".tar.gz"))
7e21b9fb 2978 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2979 (sha256
2980 (base32
be0a4c26 2981 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2982 (build-system python-build-system)
2983 (arguments
2984 `(#:phases
2985 (alist-cons-before
2f6b3d2e
RW
2986 'check 'set-HOME
2987 ;; some tests require access to "$HOME"
2988 (lambda _ (setenv "HOME" "/tmp"))
2989 ;; Tests can only be run after the library has been installed and not
2990 ;; within the source directory.
2991 (alist-cons-after
2992 'install 'check
2993 (lambda _
2994 (with-directory-excursion "/tmp"
2995 ;; With Python 3 one test of 3334 fails
2996 ;; (sklearn.tests.test_common.test_transformers); see
2997 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2998 (system* "nosetests" "-v" "sklearn")))
2999 (alist-delete 'check %standard-phases)))))
240ca4aa 3000 (inputs
2f6b3d2e 3001 `(("openblas" ,openblas)
240ca4aa
RW
3002 ("python-nose" ,python-nose)))
3003 (propagated-inputs
3004 `(("python-numpy" ,python-numpy)
3005 ("python-scipy" ,python-scipy)))
3006 (home-page "http://scikit-learn.org/")
3007 (synopsis "Machine Learning in Python")
3008 (description
3009 "Scikit-learn provides simple and efficient tools for data
3010mining and data analysis.")
25a2f81f
EF
3011 (license license:bsd-3)
3012 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3013
3014(define-public python2-scikit-learn
25a2f81f 3015 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3016
12f8f9bb
RW
3017(define-public python-scikit-image
3018 (package
3019 (name "python-scikit-image")
3020 (version "0.11.3")
3021 (source
3022 (origin
3023 (method url-fetch)
3024 (uri (string-append
3025 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3026 version ".tar.gz"))
3027 (sha256
3028 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3029 (build-system python-build-system)
3030 (propagated-inputs
3031 `(("python-matplotlib" ,python-matplotlib)
3032 ("python-networkx" ,python-networkx)
3033 ("python-numpy" ,python-numpy)
3034 ("python-scipy" ,python-scipy)
3035 ("python-six" ,python-six)
3036 ("python-pillow" ,python-pillow)))
3037 (native-inputs
3038 `(("python-cython" ,python-cython)
3039 ("python-setuptools" ,python-setuptools)))
3040 (home-page "http://scikit-image.org/")
3041 (synopsis "Image processing in Python")
3042 (description
e881752c 3043 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3044 (license license:bsd-3)
3045 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3046
3047(define-public python2-scikit-image
2b031d3f
EF
3048 (let ((scikit-image (package-with-python2
3049 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3050 (package (inherit scikit-image)
3051 (native-inputs
3052 `(("python2-mock" ,python2-mock)
3053 ,@(package-native-inputs scikit-image)))
3054 (propagated-inputs
3055 `(("python2-pytz" ,python2-pytz)
2b031d3f 3056 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3057
5394a6a6
RW
3058(define-public python-redis
3059 (package
3060 (name "python-redis")
3061 (version "2.10.3")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (string-append
3066 "https://pypi.python.org/packages/source/r/redis/redis-"
3067 version ".tar.gz"))
3068 (sha256
3069 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3070 (build-system python-build-system)
3071 ;; Tests require a running Redis server
3072 (arguments '(#:tests? #f))
3073 (native-inputs
3074 `(("python-setuptools" ,python-setuptools)
3075 ("python-pytest" ,python-pytest)))
3076 (home-page "https://github.com/andymccurdy/redis-py")
3077 (synopsis "Redis Python client")
3078 (description
3079 "This package provides a Python interface to the Redis key-value store.")
3080 (license license:expat)))
3081
3082(define-public python2-redis
3083 (package-with-python2 python-redis))
3084
748cef5b
RW
3085(define-public python-rq
3086 (package
3087 (name "python-rq")
3088 (version "0.5.2")
3089 (source
3090 (origin
3091 (method url-fetch)
3092 (uri (string-append
3093 "https://pypi.python.org/packages/source/r/rq/rq-"
3094 version ".tar.gz"))
3095 (sha256
3096 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3097 (build-system python-build-system)
3098 (propagated-inputs
3099 `(("python-click" ,python-click)
3100 ("python-redis" ,python-redis)))
3101 (native-inputs
3102 `(("python-setuptools" ,python-setuptools)))
3103 (home-page "http://python-rq.org/")
3104 (synopsis "Simple job queues for Python")
3105 (description
3106 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3107processing them in the background with workers. It is backed by Redis and it
3108is designed to have a low barrier to entry.")
3f641af0 3109 (license license:bsd-2)))
748cef5b
RW
3110
3111(define-public python2-rq
3112 (package-with-python2 python-rq))
3113
6888830b
FB
3114(define-public python-cython
3115 (package
3116 (name "python-cython")
dd22efef 3117 (version "0.24.1")
6888830b
FB
3118 (source
3119 (origin
3120 (method url-fetch)
56918e26 3121 (uri (pypi-uri "Cython" version))
6888830b
FB
3122 (sha256
3123 (base32
dd22efef 3124 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3125 (build-system python-build-system)
3126 ;; we need the full python package and not just the python-wrapper
3127 ;; because we need libpython3.3m.so
3128 (inputs
3129 `(("python" ,python)))
3130 (arguments
3131 `(#:phases
b92f651b
EF
3132 (modify-phases %standard-phases
3133 (add-before 'check 'set-HOME
3134 ;; some tests require access to "$HOME/.cython"
3135 (lambda _ (setenv "HOME" "/tmp")))
3136 (replace 'check
3137 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3138 (home-page "http://cython.org/")
3139 (synopsis "C extensions for Python")
3140 (description "Cython is an optimising static compiler for both the Python
3141programming language and the extended Cython programming language. It makes
3142writing C extensions for Python as easy as Python itself.")
3f641af0 3143 (license license:asl2.0)
48b311b1 3144 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3145
3146(define-public python2-cython
48b311b1
LC
3147 (package (inherit (package-with-python2
3148 (strip-python2-variant python-cython)))
6888830b
FB
3149 (name "python2-cython")
3150 (inputs
3151 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
3152
3153;; This version of numpy is missing the documentation and is only used to
3154;; build matplotlib which is required to build numpy's documentation.
3155(define python-numpy-bootstrap
3156 (package
3157 (name "python-numpy-bootstrap")
ef9b4c04 3158 (version "1.10.4")
0da98533
FB
3159 (source
3160 (origin
3161 (method url-fetch)
de67e922 3162 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3163 "/numpy-" version ".tar.gz"))
3164 (sha256
3165 (base32
ef9b4c04 3166 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3167 (build-system python-build-system)
3168 (inputs
3169 `(("python-nose" ,python-nose)
cba256f8
RW
3170 ("openblas" ,openblas)
3171 ("lapack" ,lapack)))
0da98533 3172 (native-inputs
19afbea1 3173 `(("gfortran" ,gfortran)))
0da98533
FB
3174 (arguments
3175 `(#:phases
3176 (alist-cons-before
3177 'build 'set-environment-variables
3178 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3179 (call-with-output-file "site.cfg"
3180 (lambda (port)
cba256f8
RW
3181 (format port
3182 "[openblas]
dbdfe515
RW
3183libraries = openblas
3184library_dirs = ~a/lib
3185include_dirs = ~a/include
cba256f8
RW
3186
3187[lapack]
3188lapack_libs = lapack
3189library_dirs = ~a/lib
3190include_dirs = ~a/include
3191"
3192 (assoc-ref inputs "openblas")
3193 (assoc-ref inputs "openblas")
3194 (assoc-ref inputs "lapack")
3195 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3196 ;; Use "gcc" executable, not "cc".
3197 (substitute* "numpy/distutils/system_info.py"
3198 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3199 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3200 #t)
6a843168
FB
3201 ;; Tests can only be run after the library has been installed and not
3202 ;; within the source directory.
3203 (alist-cons-after
3204 'install 'check
89b5c60e 3205 (lambda _
6a843168 3206 (with-directory-excursion "/tmp"
89b5c60e 3207 (zero? (system* "python" "-c"
6a843168 3208 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3209 (alist-delete
3210 'check
6a843168 3211 %standard-phases)))))
0da98533
FB
3212 (home-page "http://www.numpy.org/")
3213 (synopsis "Fundamental package for scientific computing with Python")
3214 (description "NumPy is the fundamental package for scientific computing
e881752c 3215with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3216object, sophisticated (broadcasting) functions, tools for integrating C/C++
3217and Fortran code, useful linear algebra, Fourier transform, and random number
3218capabilities.")
3f641af0 3219 (license license:bsd-3)))
0da98533
FB
3220
3221(define python2-numpy-bootstrap
3222 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3223
3a1bfe18
RW
3224(define-public python2-fastlmm
3225 (package
3226 (name "python2-fastlmm")
b074e7d4 3227 (version "0.2.21")
3a1bfe18
RW
3228 (source
3229 (origin
3230 (method url-fetch)
b074e7d4 3231 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3232 (sha256
3233 (base32
b074e7d4 3234 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3235 (build-system python-build-system)
3236 (arguments
3237 `(#:python ,python-2)) ; only Python 2.7 is supported
3238 (propagated-inputs
3239 `(("python2-numpy" ,python2-numpy)
3240 ("python2-scipy" ,python2-scipy)
3241 ("python2-matplotlib" ,python2-matplotlib)
3242 ("python2-pandas" ,python2-pandas)
3243 ("python2-scikit-learn" ,python2-scikit-learn)
3244 ("python2-cython" ,python2-cython)
3245 ("python2-pysnptools" ,python2-pysnptools)))
3246 (native-inputs
3247 `(("unzip" ,unzip)
3248 ("python2-mock" ,python2-mock)
3249 ("python2-setuptools" ,python2-setuptools)))
3250 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3251 (synopsis "Perform genome-wide association studies on large data sets")
3252 (description
3253 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3254Models, is a program for performing both single-SNP and SNP-set genome-wide
3255association studies (GWAS) on extremely large data sets.")
3f641af0 3256 (license license:asl2.0)))
3a1bfe18 3257
2ee8869a
FB
3258(define-public python-numpy
3259 (package (inherit python-numpy-bootstrap)
3260 (name "python-numpy")
3261 (outputs '("out" "doc"))
89b5c60e 3262 (inputs
2ee8869a
FB
3263 `(("which" ,which)
3264 ("python-setuptools" ,python-setuptools)
3265 ("python-matplotlib" ,python-matplotlib)
3266 ("python-sphinx" ,python-sphinx)
3267 ("python-pyparsing" ,python-pyparsing)
3268 ("python-numpydoc" ,python-numpydoc)
3269 ,@(package-inputs python-numpy-bootstrap)))
3270 (native-inputs
3271 `(("pkg-config" ,pkg-config)
3272 ("texlive" ,texlive)
3273 ("texinfo" ,texinfo)
3274 ("perl" ,perl)
3275 ,@(package-native-inputs python-numpy-bootstrap)))
3276 (arguments
89b5c60e 3277 `(,@(substitute-keyword-arguments
2ee8869a
FB
3278 (package-arguments python-numpy-bootstrap)
3279 ((#:phases phases)
3280 `(alist-cons-after
3281 'install 'install-doc
3282 (lambda* (#:key outputs #:allow-other-keys)
3283 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3284 (doc (string-append
3285 data "/doc/" ,name "-"
2ee8869a
FB
3286 ,(package-version python-numpy-bootstrap)))
3287 (info (string-append data "/info"))
3288 (html (string-append doc "/html"))
3289 (pyver ,(string-append "PYVER=")))
3290 (with-directory-excursion "doc"
3291 (mkdir-p html)
3292 (system* "make" "html" pyver)
3293 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3294 (system* "make" "-C" "build/latex"
2ee8869a
FB
3295 "all-pdf" "PAPER=a4" pyver)
3296 ;; FIXME: Generation of the info file fails.
3297 ;; (system* "make" "info" pyver)
3298 ;; (mkdir-p info)
3299 ;; (copy-file "build/texinfo/numpy.info"
3300 ;; (string-append info "/numpy.info"))
3301 (for-each (lambda (file)
3302 (copy-file (string-append "build/latex" file)
3303 (string-append doc file)))
3304 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3305 (with-directory-excursion "build/html"
3306 (for-each (lambda (file)
3307 (let* ((dir (dirname file))
3308 (tgt-dir (string-append html "/" dir)))
3309 (unless (equal? "." dir)
3310 (mkdir-p tgt-dir))
96c46210 3311 (install-file file html)))
2ee8869a
FB
3312 (find-files "." ".*"))))))
3313 ,phases)))))))
3314
764c077b 3315(define-public python2-numpy
57b7b8cd 3316 (package-with-python2 python-numpy))
2ee8869a 3317
15bfe6d6
FB
3318(define-public python-pyparsing
3319 (package
3320 (name "python-pyparsing")
e0669289 3321 (version "2.0.3")
15bfe6d6
FB
3322 (source
3323 (origin
3324 (method url-fetch)
de67e922
LF
3325 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3326 "/pyparsing-" version
15bfe6d6
FB
3327 "/pyparsing-" version ".tar.gz"))
3328 (sha256
3329 (base32
e0669289 3330 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3331 (build-system python-build-system)
3332 (outputs '("out" "doc"))
3333 (arguments
3334 `(#:tests? #f ; no test target
3335 #:modules ((guix build python-build-system)
3336 (guix build utils))
3337 #:phases
3338 (alist-cons-after
3339 'install 'install-doc
3340 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3341 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3342 "/share/doc/" ,name "-" ,version))
3343 (html-doc (string-append doc "/html"))
3344 (examples (string-append doc "/examples")))
3345 (mkdir-p html-doc)
3346 (mkdir-p examples)
89b5c60e 3347 (for-each
15bfe6d6 3348 (lambda (dir tgt)
89b5c60e 3349 (map (lambda (file)
96c46210 3350 (install-file file tgt))
15bfe6d6
FB
3351 (find-files dir ".*")))
3352 (list "docs" "htmldoc" "examples")
3353 (list doc html-doc examples))))
3354 %standard-phases)))
3355 (home-page "http://pyparsing.wikispaces.com")
3356 (synopsis "Python parsing class library")
3357 (description
3358 "The pyparsing module is an alternative approach to creating and
3359executing simple grammars, vs. the traditional lex/yacc approach, or the use
3360of regular expressions. The pyparsing module provides a library of classes
3361that client code uses to construct the grammar directly in Python code.")
bd3fa666 3362 (license license:expat)))
15bfe6d6
FB
3363
3364(define-public python2-pyparsing
3365 (package-with-python2 python-pyparsing))
3366
ec00de35
FB
3367(define-public python-numpydoc
3368 (package
3369 (name "python-numpydoc")
3370 (version "0.5")
3371 (source
3372 (origin
3373 (method url-fetch)
89b5c60e 3374 (uri (string-append
ec00de35
FB
3375 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3376 version ".tar.gz"))
3377 (sha256
3378 (base32
5e4d8f67
AE
3379 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3380 (modules '((guix build utils)))
3381 (snippet
3382 '(begin
3383 ;; Drop a test requiring matplotlib, which we cannot add as an
3384 ;; input since it would create a circular dependency: Extend the
3385 ;; test for Python 3, where it is already dropped, to Python 2.
3386 (substitute* "numpydoc/tests/test_plot_directive.py"
3387 (("3") "2"))))))
ec00de35
FB
3388 (build-system python-build-system)
3389 (inputs
3390 `(("python-setuptools" ,python-setuptools)
3391 ("python-docutils" ,python-docutils)
3392 ("python-sphinx" ,python-sphinx)
3393 ("python-nose" ,python-nose)))
3394 (home-page "https://pypi.python.org/pypi/numpydoc")
3395 (synopsis
3396 "Numpy's Sphinx extensions")
3397 (description
3398 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3399 (license license:bsd-2)))
ec00de35
FB
3400
3401(define-public python2-numpydoc
5e4d8f67 3402 (package-with-python2 python-numpydoc))
1c65314c 3403
1e656049
RW
3404(define-public python-numexpr
3405 (package
3406 (name "python-numexpr")
26112c0a 3407 (version "2.6.0")
1e656049
RW
3408 (source
3409 (origin
3410 (method url-fetch)
26112c0a 3411 (uri (pypi-uri "numexpr" version))
1e656049
RW
3412 (sha256
3413 (base32
26112c0a 3414 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3415 (build-system python-build-system)
3416 (arguments `(#:tests? #f)) ; no tests included
3417 (propagated-inputs
3418 `(("python-numpy" ,python-numpy)))
3419 (home-page "https://github.com/pydata/numexpr")
3420 (synopsis "Fast numerical expression evaluator for NumPy")
3421 (description
3422 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3423expressions that operate on arrays are accelerated and use less memory than
3424doing the same calculation in Python. In addition, its multi-threaded
3425capabilities can make use of all your cores, which may accelerate
3426computations, most specially if they are not memory-bounded (e.g. those using
3427transcendental functions).")
fc1a170e
EF
3428 (license license:expat)
3429 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3430
3431(define-public python2-numexpr
fc1a170e 3432 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3433
1c65314c
FB
3434(define-public python-matplotlib
3435 (package
3436 (name "python-matplotlib")
1bbc659f 3437 (version "1.4.3")
1c65314c
FB
3438 (source
3439 (origin
3440 (method url-fetch)
de67e922
LF
3441 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3442 "/matplotlib-" version
1c65314c
FB
3443 "/matplotlib-" version ".tar.gz"))
3444 (sha256
3445 (base32
1bbc659f 3446 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3447 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3448 (build-system python-build-system)
3449 (outputs '("out" "doc"))
25f9a068
FB
3450 (propagated-inputs ; the following packages are all needed at run time
3451 `(("python-pyparsing" ,python-pyparsing)
3452 ("python-pygobject" ,python-pygobject)
3453 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3454 ("python-tkinter" ,python "tk")
25f9a068
FB
3455 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3456 ;; from 'gtk+') provides the required 'typelib' files used by
3457 ;; 'gobject-introspection'. The location of these files is set with the
3458 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3459 ;; is done automatically by a 'native-search-path' procedure. However,
3460 ;; at run-time the user must set this variable as follows:
3461 ;;
3462 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3463 ("gtk+" ,gtk+)
3464 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3465 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3466 ;; object. For this reason we need to import both libraries.
3467 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3468 ("python-pycairo" ,python-pycairo)
3469 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3470 (inputs
3471 `(("python-setuptools" ,python-setuptools)
3472 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3473 ("python-six" ,python-six)
3474 ("python-pytz" ,python-pytz)
3475 ("python-numpy" ,python-numpy-bootstrap)
3476 ("python-sphinx" ,python-sphinx)
3477 ("python-numpydoc" ,python-numpydoc)
3478 ("python-nose" ,python-nose)
3479 ("python-mock" ,python-mock)
3480 ("libpng" ,libpng)
3481 ("imagemagick" ,imagemagick)
3482 ("freetype" ,freetype)
25f9a068
FB
3483 ("cairo" ,cairo)
3484 ("glib" ,glib)
4e7a137a 3485 ("python-pillow" ,python-pillow)
1c65314c 3486 ;; FIXME: Add backends when available.
1c65314c
FB
3487 ;("python-wxpython" ,python-wxpython)
3488 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3489 ("tcl" ,tcl)
3490 ("tk" ,tk)))
1c65314c
FB
3491 (native-inputs
3492 `(("pkg-config" ,pkg-config)
3493 ("texlive" ,texlive)
3494 ("texinfo" ,texinfo)))
3495 (arguments
3496 `(#:phases
25f9a068
FB
3497 (alist-cons-before
3498 'build 'configure-environment
3499 (lambda* (#:key outputs inputs #:allow-other-keys)
3500 (let ((cairo (assoc-ref inputs "cairo"))
3501 (gtk+ (assoc-ref inputs "gtk+")))
3502 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3503 ;; has not effect.
25f9a068
FB
3504 (setenv "LD_LIBRARY_PATH"
3505 (string-append cairo "/lib:" gtk+ "/lib"))
3506 (setenv "HOME" (getcwd))
3507 (call-with-output-file "setup.cfg"
3508 (lambda (port)
1bbc659f
FB
3509 (format port "[directories]~%
3510basedirlist = ~a,~a~%
57b7b8cd 3511 [rc_options]~%
1bbc659f
FB
3512backend = TkAgg~%"
3513 (assoc-ref inputs "tcl")
3514 (assoc-ref inputs "tk"))))))
25f9a068
FB
3515 (alist-cons-after
3516 'install 'install-doc
3517 (lambda* (#:key outputs #:allow-other-keys)
3518 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3519 (doc (string-append data "/doc/" ,name "-" ,version))
3520 (info (string-append data "/info"))
3521 (html (string-append doc "/html")))
3522 (with-directory-excursion "doc"
25f9a068
FB
3523 ;; Produce pdf in 'A4' format.
3524 (substitute* (find-files "." "conf\\.py")
3525 (("latex_paper_size = 'letter'")
3526 "latex_paper_size = 'a4'"))
3527 (mkdir-p html)
3528 (mkdir-p info)
3529 ;; The doc recommends to run the 'html' target twice.
3530 (system* "python" "make.py" "html")
3531 (system* "python" "make.py" "html")
18b31516 3532 (copy-recursively "build/html" html)
25f9a068
FB
3533 (system* "python" "make.py" "latex")
3534 (system* "python" "make.py" "texinfo")
18b31516
FB
3535 (symlink (string-append html "/_images")
3536 (string-append info "/matplotlib-figures"))
3537 (with-directory-excursion "build/texinfo"
3538 (substitute* "matplotlib.texi"
3539 (("@image\\{([^,]*)" all file)
3540 (string-append "@image{matplotlib-figures/" file)))
3541 (symlink (string-append html "/_images")
3542 "./matplotlib-figures")
3543 (system* "makeinfo" "--no-split"
3544 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3545 (copy-file "build/texinfo/matplotlib.info"
3546 (string-append info "/matplotlib.info"))
3547 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3548 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3549 %standard-phases))))
1c65314c
FB
3550 (home-page "http://matplotlib.org")
3551 (synopsis "2D plotting library for Python")
3552 (description
3553 "Matplotlib is a Python 2D plotting library which produces publication
3554quality figures in a variety of hardcopy formats and interactive environments
3555across platforms. Matplotlib can be used in Python scripts, the python and
3556ipython shell, web application servers, and six graphical user interface
3557toolkits.")
3f641af0 3558 (license license:psfl)
57b7b8cd 3559 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3560
764c077b 3561(define-public python2-matplotlib
57b7b8cd
LC
3562 (let ((matplotlib (package-with-python2
3563 (strip-python2-variant python-matplotlib))))
764c077b 3564 (package (inherit matplotlib)
88c26834
AE
3565 ;; Make sure to use special packages for Python 2 instead
3566 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3567 (propagated-inputs
7ca0dbc3 3568 `(("python2-pycairo" ,python2-pycairo)
764c077b 3569 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3570 ("python2-tkinter" ,python-2 "tk")
3571 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3572 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3573
0dde6232
RW
3574(define-public python2-pysnptools
3575 (package
3576 (name "python2-pysnptools")
a800018e 3577 (version "0.3.9")
0dde6232
RW
3578 (source
3579 (origin
3580 (method url-fetch)
3f2e9675 3581 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3582 (sha256
3583 (base32
a800018e 3584 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3585 (build-system python-build-system)
3586 (arguments
3587 `(#:python ,python-2)) ; only Python 2.7 is supported
3588 (propagated-inputs
3589 `(("python2-numpy" ,python2-numpy)
3590 ("python2-scipy" ,python2-scipy)
a800018e 3591 ("python2-pytz" ,python2-pytz)
0dde6232 3592 ("python2-cython" ,python2-cython)))
a800018e
EF
3593 (inputs
3594 `(("python2-dateutil-2" ,python2-dateutil-2)
3595 ("python2-pandas" ,python2-pandas)
3596 ("python2-six" ,python2-six)))
0dde6232
RW
3597 (native-inputs
3598 `(("unzip" ,unzip)
3599 ("python2-setuptools" ,python2-setuptools)))
3600 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3601 (synopsis "Library for reading and manipulating genetic data")
3602 (description
3603 "PySnpTools is a library for reading and manipulating genetic data. It
3604can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3605those files. It can also efficiently manipulate ranges of integers using set
3606operators such as union, intersection, and difference.")
3f641af0 3607 (license license:asl2.0)))
0dde6232 3608
c9b1b4f9
RW
3609(define-public python-rpy2
3610 (package
3611 (name "python-rpy2")
ec3bcbc7 3612 (version "2.7.6")
c9b1b4f9
RW
3613 (source
3614 (origin
3615 (method url-fetch)
ec3bcbc7 3616 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3617 (sha256
3618 (base32
ec3bcbc7 3619 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3620 (build-system python-build-system)
3621 (inputs
3622 `(("python-six" ,python-six)
3623 ("readline" ,readline)
3624 ("icu4c" ,icu4c)
3625 ("pcre" ,pcre)
3626 ("r" ,r)))
3627 (native-inputs
5ff6575b
RW
3628 `(("python-setuptools" ,python-setuptools)
3629 ("zlib" ,zlib)))
c9b1b4f9
RW
3630 (home-page "http://rpy.sourceforge.net/")
3631 (synopsis "Python interface to the R language")
3632 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3633low-level interface to R from Python, a proposed high-level interface,
3634including wrappers to graphical libraries, as well as R-like structures and
3635functions.")
3f641af0 3636 (license license:gpl3+)))
c9b1b4f9
RW
3637
3638(define-public python2-rpy2
3639 (let ((rpy2 (package-with-python2 python-rpy2)))
3640 (package (inherit rpy2)
3641 (native-inputs
3642 `(("python2-singledispatch" ,python2-singledispatch)
3643 ,@(package-native-inputs rpy2))))))
3644
bb986599
FB
3645(define-public python-scipy
3646 (package
3647 (name "python-scipy")
ba8a0824 3648 (version "0.16.0")
bb986599
FB
3649 (source
3650 (origin
3651 (method url-fetch)
de67e922
LF
3652; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3653 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3654 "/scipy-" version ".tar.xz"))
bb986599
FB
3655 (sha256
3656 (base32
ba8a0824 3657 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3658 (build-system python-build-system)
dd86c0d1 3659 (propagated-inputs
bb986599
FB
3660 `(("python-numpy" ,python-numpy)
3661 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3662 ("python-pyparsing" ,python-pyparsing)))
3663 (inputs
3664 `(("lapack" ,lapack)
719b01c1 3665 ("openblas" ,openblas)))
bb986599 3666 (native-inputs
dd86c0d1
RW
3667 `(("python-nose" ,python-nose)
3668 ("python-sphinx" ,python-sphinx)
5248d49e 3669 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3670 ("gfortran" ,gfortran)
bb986599
FB
3671 ("texlive" ,texlive)
3672 ("perl" ,perl)))
3673 (outputs '("out" "doc"))
3674 (arguments
3675 `(#:phases
3676 (alist-cons-before
719b01c1 3677 'build 'configure-openblas
bb986599 3678 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3679 (call-with-output-file "site.cfg"
3680 (lambda (port)
3681 (format port
3682 "[blas]
3683libraries = openblas
3684library_dirs = ~a/lib
3685include_dirs = ~a/include
3686[atlas]
3687library_dirs = ~a/lib
3688atlas_libs = openblas
3689"
3690 (assoc-ref inputs "openblas")
3691 (assoc-ref inputs "openblas")
3692 (assoc-ref inputs "openblas"))))
3693 #t)
bb986599
FB
3694 (alist-cons-after
3695 'install 'install-doc
3696 (lambda* (#:key outputs #:allow-other-keys)
3697 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3698 (doc (string-append data "/doc/" ,name "-" ,version))
3699 (html (string-append doc "/html"))
3700 (pyver ,(string-append "PYVER=")))
3701 (with-directory-excursion "doc"
bb986599
FB
3702 ;; Fix generation of images for mathematical expressions.
3703 (substitute* (find-files "source" "conf\\.py")
3704 (("pngmath_use_preview = True")
3705 "pngmath_use_preview = False"))
3706 (mkdir-p html)
3707 (system* "make" "html" pyver)
3708 (system* "make" "latex" "PAPER=a4" pyver)
3709 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3710 (copy-file "build/latex/scipy-ref.pdf"
3711 (string-append doc "/scipy-ref.pdf"))
3712 (with-directory-excursion "build/html"
3713 (for-each (lambda (file)
3714 (let* ((dir (dirname file))
3715 (tgt-dir (string-append html "/" dir)))
96c46210 3716 (install-file file html)))
bb986599
FB
3717 (find-files "." ".*"))))))
3718 ;; Tests can only be run after the library has been installed and not
3719 ;; within the source directory.
3720 (alist-cons-after
3721 'install 'check
89b5c60e 3722 (lambda _
bb986599
FB
3723 (with-directory-excursion "/tmp"
3724 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3725 (alist-delete
3726 'check
4f9ff21e
RW
3727 (alist-cons-after
3728 'unpack 'fix-tests
3729 (lambda _
3730 (substitute* "scipy/integrate/tests/test_quadpack.py"
3731 (("libm.so") "libm.so.6"))
3732 #t)
3733 %standard-phases)))))))
bb986599
FB
3734 (home-page "http://www.scipy.org/")
3735 (synopsis "The Scipy library provides efficient numerical routines")
3736 (description "The SciPy library is one of the core packages that make up
3737the SciPy stack. It provides many user-friendly and efficient numerical
3738routines such as routines for numerical integration and optimization.")
3f641af0 3739 (license license:bsd-3)))
bb986599 3740
764c077b 3741(define-public python2-scipy
57b7b8cd 3742 (package-with-python2 python-scipy))
bb986599 3743
73acc193 3744(define-public python-socksipy-branch
3745 (package
3746 (name "python-socksipy-branch")
3747 (version "1.01")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "SocksiPy-branch" version))
3752 (sha256
3753 (base32
3754 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3755 (build-system python-build-system)
3756 (arguments
3757 `(#:tests? #f)) ; There are no tests
3758 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3759 (synopsis "Python SOCKS module")
3760 (description
3761 "SocksiPy - A Python SOCKS client module. It provides a
3762socket-like interface that supports connections to any TCP
3763service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3764The original version was developed by Dan Haim, this is a
3765branch created by Mario Vilas to address some open issues,
3766as the original project seems to have been abandoned circa 2007.")
3767 (license license:bsd-3)))
3768
3769(define-public python2-socksipy-branch
3770 (package-with-python2 python-socksipy-branch))
3771
94914805
EB
3772(define-public python-sqlalchemy
3773 (package
3774 (name "python-sqlalchemy")
a4ba286b 3775 (version "1.0.12")
94914805
EB
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (string-append "https://pypi.python.org/packages/source/S/"
3780 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3781 (sha256
3782 (base32
a4ba286b 3783 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3784 (build-system python-build-system)
3785 (native-inputs
3786 `(("python-cython" ,python-cython) ;for c extensions
3787 ("python-pytest" ,python-pytest)
3788 ("python-mock" ,python-mock))) ;for tests
3789 (arguments
3790 `(#:phases (alist-replace
3791 'check
3792 (lambda _ (zero? (system* "py.test")))
3793 %standard-phases)))
3794 (home-page "http://www.sqlalchemy.org")
3795 (synopsis "Database abstraction library")
3796 (description
3797 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3798gives application developers the full power and flexibility of SQL. It
3799provides a full suite of well known enterprise-level persistence patterns,
3800designed for efficient and high-performing database access, adapted into a
3801simple and Pythonic domain language.")
3f641af0 3802 (license license:x11)))
94914805
EB
3803
3804(define-public python2-sqlalchemy
3805 (package-with-python2 python-sqlalchemy))
c937562e 3806
de2966cf
EF
3807(define-public python-sqlalchemy-utils
3808 (package
3809 (name "python-sqlalchemy-utils")
3810 (version "0.32.9")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "SQLAlchemy-Utils" version))
3815 (sha256
3816 (base32
3817 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3818 (build-system python-build-system)
3819 (inputs
3820 `(("python-six" ,python-six)
3821 ("python-sqlalchemy" ,python-sqlalchemy)))
3822 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3823 (synopsis "Various utility functions for SQLAlchemy")
3824 (description
3825 "SQLAlchemy-utils provides various utility functions and custom data types
3826for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3827 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3828 (license license:bsd-3)))
3829
3830(define-public python2-sqlalchemy-utils
3831 (let ((base (package-with-python2
3832 (strip-python2-variant python-sqlalchemy-utils))))
3833 (package (inherit base)
3834 (native-inputs
3835 `(("python2-setuptools" ,python2-setuptools)
3836 ,@(package-native-inputs base))))))
3837
af5a4602
CAW
3838(define-public python-alembic
3839 (package
3840 (name "python-alembic")
bb484529 3841 (version "0.8.7")
af5a4602
CAW
3842 (source
3843 (origin
3844 (method url-fetch)
3845 (uri (pypi-uri "alembic" version))
3846 (sha256
3847 (base32
bb484529 3848 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3849 (build-system python-build-system)
3850 (native-inputs
3851 `(("python-mock" ,python-mock)
3852 ("python-pytest-cov" ,python-pytest-cov)))
3853 (propagated-inputs
3854 `(("python-sqlalchemy" ,python-sqlalchemy)
3855 ("python-mako" ,python-mako)
3856 ("python-editor" ,python-editor)))
3857 (home-page "http://bitbucket.org/zzzeek/alembic")
3858 (synopsis
3859 "Database migration tool for SQLAlchemy")
3860 (description
3861 "Alembic is a lightweight database migration tool for usage with the
3862SQLAlchemy Database Toolkit for Python.")
3863 (license license:expat)
3864 (properties `((python2-variant . ,(delay python2-alembic))))))
3865
3866(define-public python2-alembic
3867 (let ((alembic (package-with-python2
3868 (strip-python2-variant python-alembic))))
3869 (package
3870 (inherit alembic)
3871 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3872 ,@(package-native-inputs alembic))))))
3873
1671c07c
EB
3874(define-public python-distutils-extra
3875 (package
3876 (name "python-distutils-extra")
3877 (version "2.38")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3882 version "/+download/python-distutils-extra-"
3883 version ".tar.gz"))
3884 (sha256
3885 (base32
3886 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3887 (build-system python-build-system)
3888 (native-inputs
3889 `(("python-setuptools" ,python-setuptools)))
3890 (home-page "https://launchpad.net/python-distutils-extra/")
3891 (synopsis "Enhancements to Python's distutils")
3892 (description
3893 "The python-distutils-extra module enables you to easily integrate
3894gettext support, themed icons, and scrollkeeper-based documentation into
3895Python's distutils.")
3f641af0 3896 (license license:gpl2)))
1671c07c
EB
3897
3898(define-public python2-distutils-extra
3899 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3900
3901(define-public python2-elib.intl
3902 (package
3903 (name "python2-elib.intl")
3904 (version "0.0.3")
3905 (source
3906 (origin
3907 ;; This project doesn't tag releases or publish tarballs, so we take
3908 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3909 (method git-fetch)
3910 (uri (git-reference
3911 (url "https://github.com/dieterv/elib.intl.git")
3912 (commit "d09997cfef")))
3913 (sha256
3914 (base32
3915 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3916 (build-system python-build-system)
3917 (native-inputs
3918 `(("python2-setuptools" ,python2-setuptools)))
3919 (arguments
3920 ;; incompatible with Python 3 (exception syntax)
3921 `(#:python ,python-2
3922 #:tests? #f
3923 ;; With standard flags, the install phase attempts to create a zip'd
3924 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3925 ;; before 1980'
3926 #:configure-flags '("--single-version-externally-managed"
3927 "--record=elib.txt")))
3928 (home-page "https://github.com/dieterv/elib.intl")
3929 (synopsis "Enhanced internationalization for Python")
3930 (description
3931 "The elib.intl module provides enhanced internationalization (I18N)
3932services for your Python modules and applications.")
3f641af0 3933 (license license:lgpl3+)))
ea5456c8 3934
c937562e
EB
3935(define-public python-pillow
3936 (package
3937 (name "python-pillow")
debf4179 3938 (version "3.3.1")
c937562e
EB
3939 (source
3940 (origin
3941 (method url-fetch)
f1d9231d 3942 (uri (pypi-uri "Pillow" version))
c937562e
EB
3943 (sha256
3944 (base32
debf4179 3945 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
3946 (build-system python-build-system)
3947 (native-inputs
3948 `(("python-setuptools" ,python-setuptools)
3949 ("python-nose" ,python-nose)))
3950 (inputs
5ff408d9
SB
3951 `(("freetype" ,freetype)
3952 ("lcms" ,lcms)
c937562e
EB
3953 ("zlib" ,zlib)
3954 ("libjpeg" ,libjpeg)
3955 ("openjpeg" ,openjpeg)
5ff408d9
SB
3956 ("libtiff" ,libtiff)
3957 ("libwebp" ,libwebp)))
c937562e
EB
3958 (propagated-inputs
3959 `(;; Used at runtime for pkg_resources
3960 ("python-setuptools" ,python-setuptools)))
3961 (arguments
e5358a6b
LC
3962 `(#:phases (modify-phases %standard-phases
3963 (add-before
3964 'install 'disable-egg-compression
3965 (lambda _
3966 ;; Leave the .egg uncompressed since compressing it would
3967 ;; prevent the GC from identifying run-time dependencies.
3968 ;; See <http://bugs.gnu.org/20765>.
3969 (let ((port (open-file "setup.cfg" "a")))
3970 (display "\n[easy_install]\nzip_ok = 0\n"
3971 port)
3972 (close-port port)
3973 #t)))
3974 (add-after
3975 'install 'check-installed
3976 (lambda _
3977 (begin
3978 (setenv "HOME" (getcwd))
3979 (and (zero? (system* "python" "selftest.py"
3980 "--installed"))
3981 (zero? (system* "python" "test-installed.py"))))))
3982 (delete 'check))))
c937562e
EB
3983 (home-page "https://pypi.python.org/pypi/Pillow")
3984 (synopsis "Fork of the Python Imaging Library")
3985 (description
3986 "The Python Imaging Library adds image processing capabilities to your
3987Python interpreter. This library provides extensive file format support, an
3988efficient internal representation, and fairly powerful image processing
3989capabilities. The core image library is designed for fast access to data
3990stored in a few basic pixel formats. It should provide a solid foundation for
3991a general image processing tool.")
3f641af0 3992 (license (license:x11-style
c937562e
EB
3993 "http://www.pythonware.com/products/pil/license.htm"
3994 "The PIL Software License"))))
3995
3996(define-public python2-pillow
3997 (package-with-python2 python-pillow))
bb986599 3998
a415f036
FB
3999(define-public python-pycparser
4000 (package
4001 (name "python-pycparser")
38eb6919 4002 (version "2.14")
a415f036
FB
4003 (source
4004 (origin
4005 (method url-fetch)
38eb6919 4006 (uri (pypi-uri "pycparser" version))
a415f036
FB
4007 (sha256
4008 (base32
38eb6919 4009 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4010 (outputs '("out" "doc"))
4011 (build-system python-build-system)
4012 (native-inputs
4013 `(("pkg-config" ,pkg-config)
4014 ("python-setuptools" ,python-setuptools)))
4015 (arguments
89b5c60e 4016 `(#:phases
a415f036
FB
4017 (alist-replace
4018 'check
4019 (lambda _
4020 (with-directory-excursion "tests"
4021 (zero? (system* "python" "all_tests.py"))))
4022 (alist-cons-after
4023 'install 'install-doc
4024 (lambda* (#:key outputs #:allow-other-keys)
4025 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4026 (doc (string-append data "/doc/" ,name "-" ,version))
4027 (examples (string-append doc "/examples")))
4028 (mkdir-p examples)
4029 (for-each (lambda (file)
4030 (copy-file (string-append "." file)
4031 (string-append doc file)))
4032 '("/README.rst" "/CHANGES" "/LICENSE"))
4033 (copy-recursively "examples" examples)))
4034 %standard-phases))))
4035 (home-page "https://github.com/eliben/pycparser")
4036 (synopsis "C parser in Python")
4037 (description
4038 "Pycparser is a complete parser of the C language, written in pure Python
4039using the PLY parsing library. It parses C code into an AST and can serve as
4040a front-end for C compilers or analysis tools.")
3f641af0 4041 (license license:bsd-3)))
a415f036
FB
4042
4043(define-public python2-pycparser
4044 (package-with-python2 python-pycparser))
57c3f716
FB
4045
4046(define-public python-cffi
4047 (package
4048 (name "python-cffi")
2d3a437c 4049 (version "1.4.2")
57c3f716
FB
4050 (source
4051 (origin
4052 (method url-fetch)
2d3a437c 4053 (uri (pypi-uri "cffi" version))
89b5c60e 4054 (sha256
2d3a437c 4055 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4056 (build-system python-build-system)
4057 (outputs '("out" "doc"))
4058 (inputs
4059 `(("libffi" ,libffi)))
4060 (propagated-inputs ; required at run-time
4061 `(("python-pycparser" ,python-pycparser)))
4062 (native-inputs
4063 `(("pkg-config" ,pkg-config)
4064 ("python-sphinx" ,python-sphinx)
4179f952 4065 ("python-pytest" ,python-pytest)
57c3f716
FB
4066 ("python-setuptools" ,python-setuptools)))
4067 (arguments
4179f952 4068 `(#:phases
57c3f716
FB
4069 (alist-cons-after
4070 'install 'install-doc
4071 (lambda* (#:key outputs #:allow-other-keys)
4072 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4073 (doc (string-append data "/doc/" ,name "-" ,version))
4074 (html (string-append doc "/html")))
4075 (with-directory-excursion "doc"
4076 (system* "make" "html")
4077 (mkdir-p html)
4078 (copy-recursively "build/html" html))
4079 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4080 %standard-phases)))
4081 (home-page "http://cffi.readthedocs.org")
4082 (synopsis "Foreign function interface for Python")
4083 (description
4084 "Foreign Function Interface for Python calling C code.")
bd3fa666 4085 (license license:expat)))
57c3f716
FB
4086
4087(define-public python2-cffi
4088 (package-with-python2 python-cffi))
6fa14469
FB
4089
4090(define-public python-xcffib
4091 (package
4092 (name "python-xcffib")
4093 (version "0.1.9")
4094 (source
4095 (origin
4096 (method url-fetch)
4097 (uri (string-append "https://pypi.python.org/packages/source/x/"
4098 "xcffib/xcffib-" version ".tar.gz"))
4099 (sha256
4100 (base32
4101 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4102 (build-system python-build-system)
4103 (inputs
4104 `(("libxcb" ,libxcb)
4105 ("python-six" ,python-six)))
4106 (native-inputs
4107 `(("python-setuptools" ,python-setuptools)))
4108 (propagated-inputs
4109 `(("python-cffi" ,python-cffi))) ; used at run time
4110 (arguments
89b5c60e 4111 `(#:phases
6fa14469
FB
4112 (alist-cons-after
4113 'install 'install-doc
4114 (lambda* (#:key outputs #:allow-other-keys)
4115 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4116 "/doc/" ,name "-" ,version)))
4117 (mkdir-p doc)
4118 (copy-file "README.md"
4119 (string-append doc "/README.md"))))
4120 %standard-phases)))
4121 (home-page "https://github.com/tych0/xcffib")
4122 (synopsis "XCB Python bindings")
4123 (description
4124 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4125support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4126 (license license:expat)))
6fa14469
FB
4127
4128(define-public python2-xcffib
4129 (package-with-python2 python-xcffib))
4130
9e099723
FB
4131(define-public python-cairocffi
4132 (package
4133 (name "python-cairocffi")
4134 (version "0.6")
4135 (source
4136 (origin
4137 (method url-fetch)
4138 ;; The archive on pypi is missing the 'utils' directory!
4139 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4140 version ".tar.gz"))
f586c877 4141 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4142 (sha256
4143 (base32
4144 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4145 (build-system python-build-system)
4146 (outputs '("out" "doc"))
4147 (inputs
4148 `(("gdk-pixbuf" ,gdk-pixbuf)
4149 ("cairo" ,cairo)))
4150 (native-inputs
4151 `(("pkg-config" ,pkg-config)
4152 ("python-sphinx" ,python-sphinx)
4153 ("python-docutils" ,python-docutils)
4154 ("python-setuptools" ,python-setuptools)))
4155 (propagated-inputs
4156 `(("python-xcffib" ,python-xcffib))) ; used at run time
4157 (arguments
89b5c60e 4158 `(#:phases
9e099723
FB
4159 (alist-cons-after
4160 'install 'install-doc
4161 (lambda* (#:key inputs outputs #:allow-other-keys)
4162 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4163 (doc (string-append data "/doc/" ,name "-" ,version))
4164 (html (string-append doc "/html")))
89b5c60e 4165 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4166 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4167 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4168 (setenv "LANG" "en_US.UTF-8")
4169 (mkdir-p html)
4170 (for-each (lambda (file)
4171 (copy-file (string-append "." file)
4172 (string-append doc file)))
4173 '("/README.rst" "/CHANGES" "/LICENSE"))
4174 (system* "python" "setup.py" "build_sphinx")
4175 (copy-recursively "docs/_build/html" html)))
4176 %standard-phases)))
4177 (home-page "https://github.com/SimonSapin/cairocffi")
4178 (synopsis "Python bindings and object-oriented API for Cairo")
4179 (description
4180 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4181Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4182graphics library with support for multiple backends including image buffers,
4183PNG, PostScript, PDF, and SVG file output.")
3f641af0 4184 (license license:bsd-3)))
9e099723
FB
4185
4186(define-public python2-cairocffi
4187 (package-with-python2 python-cairocffi))
4188
3cff95cb
RW
4189(define-public python-decorator
4190 (package
4191 (name "python-decorator")
eb6e2e81 4192 (version "4.0.9")
3cff95cb
RW
4193 (source
4194 (origin
4195 (method url-fetch)
e21338be 4196 (uri (pypi-uri "decorator" version))
3cff95cb 4197 (sha256
eb6e2e81 4198 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4199 (build-system python-build-system)
4200 (arguments '(#:tests? #f)) ; no test target
4201 (native-inputs
4202 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4203 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4204 (synopsis "Python module to simplify usage of decorators")
4205 (description
4206 "The aim of the decorator module is to simplify the usage of decorators
4207for the average programmer, and to popularize decorators usage giving examples
4208of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4209etc. The core of this module is a decorator factory.")
4210 (license license:expat)))
4211
4212(define-public python2-decorator
4213 (package-with-python2 python-decorator))
4214
2c0499ad
RW
4215(define-public python-drmaa
4216 (package
4217 (name "python-drmaa")
4218 (version "0.7.6")
4219 (source
4220 (origin
4221 (method url-fetch)
4222 (uri (string-append
4223 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4224 version ".tar.gz"))
4225 (sha256
4226 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4227 (build-system python-build-system)
4228 ;; The test suite requires libdrmaa which is provided by the cluster
4229 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4230 ;; should be set to the path of the libdrmaa library.
4231 (arguments '(#:tests? #f))
4232 (native-inputs
4233 `(("python-nose" ,python-nose)
4234 ("python-setuptools" ,python-setuptools)))
4235 (home-page "https://pypi.python.org/pypi/drmaa")
4236 (synopsis "Python bindings for the DRMAA library")
4237 (description
4238 "A Python package for Distributed Resource Management (DRM) job
4239submission and control. This package is an implementation of the DRMAA 1.0
4240Python language binding specification.")
3f641af0 4241 (license license:bsd-3)))
2c0499ad
RW
4242
4243(define-public python2-drmaa
4244 (package-with-python2 python-drmaa))
4245
d05c6da0
RW
4246(define-public python-gridmap
4247 (package
4248 (name "python-gridmap")
4249 (version "0.13.0")
4250 (source
4251 (origin
4252 (method url-fetch)
4253 (uri (string-append
4254 "https://github.com/pygridtools/gridmap/archive/v"
4255 version ".tar.gz"))
4256 (file-name (string-append name "-" version ".tar.gz"))
4257 (sha256
4258 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4259 (build-system python-build-system)
4260 (inputs
4261 `(("python-psutil" ,python-psutil)
4262 ("python-drmaa" ,python-drmaa)
4263 ("python-pyzmq" ,python-pyzmq)))
4264 (native-inputs
4265 `(("python-setuptools" ,python-setuptools)))
4266 (home-page "https://github.com/pygridtools/gridmap")
4267 (synopsis "Create jobs on a cluster directly from Python")
4268 (description
4269 "Gridmap is a Python package to allow you to easily create jobs on the
4270cluster directly from Python. You can directly map Python functions onto the
4271cluster without needing to write any wrapper code yourself.")
3f641af0 4272 (license license:gpl3+)))
d05c6da0
RW
4273
4274(define-public python2-gridmap
4275 (package-with-python2 python-gridmap))
4276
cb6d5c54
RW
4277(define-public python-pexpect
4278 (package
4279 (name "python-pexpect")
4280 (version "3.3")
4281 (source
4282 (origin
4283 (method url-fetch)
4284 (uri (string-append "https://pypi.python.org/packages/source/p/"
4285 "pexpect/pexpect-" version ".tar.gz"))
4286 (sha256
4287 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4288 (build-system python-build-system)
4289 (arguments
4290 `(#:phases
4291 (modify-phases %standard-phases
4292 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4293 (native-inputs
4294 `(("python-nose" ,python-nose)))
4295 (home-page "http://pexpect.readthedocs.org/")
4296 (synopsis "Controlling interactive console applications")
4297 (description
4298 "Pexpect is a pure Python module for spawning child applications;
4299controlling them; and responding to expected patterns in their output.
4300Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4301child application and control it as if a human were typing commands.")
3f641af0 4302 (license license:isc)))
cb6d5c54
RW
4303
4304(define-public python2-pexpect
4305 (package-with-python2 python-pexpect))
4306
229ad120
RW
4307(define-public python-setuptools-scm
4308 (package
4309 (name "python-setuptools-scm")
42d6d0d0 4310 (version "1.11.1")
229ad120
RW
4311 (source (origin
4312 (method url-fetch)
383af6b0 4313 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4314 (sha256
4315 (base32
42d6d0d0 4316 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4317 (build-system python-build-system)
383af6b0 4318 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4319 (home-page "https://github.com/pypa/setuptools_scm/")
4320 (synopsis "Manage Python package versions in SCM metadata")
4321 (description
383af6b0 4322 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4323@dfn{software configuration management} (SCM) metadata instead of declaring
4324them as the version argument or in a SCM managed file.")
4325 (license license:expat)))
4326
4327(define-public python2-setuptools-scm
4328 (package-with-python2 python-setuptools-scm))
4329
b74270ee
RW
4330(define-public python-pathpy
4331 (package
4332 (name "python-pathpy")
4333 (version "8.1.1")
4334 (source
4335 (origin
4336 (method url-fetch)
4337 (uri (string-append "https://pypi.python.org/packages/source/p/"
4338 "path.py/path.py-" version ".tar.gz"))
4339 (sha256
4340 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4341 (build-system python-build-system)
4342 (propagated-inputs
4343 `(("python-appdirs" ,python-appdirs)))
4344 (native-inputs
553b709b
EF
4345 `(("python-setuptools" ,python-setuptools)
4346 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4347 ("python-pytest" ,python-pytest)
4348 ("python-pytest-runner" ,python-pytest-runner)))
4349 (home-page "http://github.com/jaraco/path.py")
4350 (synopsis "Python module wrapper for built-in os.path")
4351 (description
4352 "@code{path.py} implements path objects as first-class entities, allowing
4353common operations on files to be invoked on those path objects directly.")
4354 (license license:expat)))
4355
4356(define-public python2-pathpy
4357 (package-with-python2 python-pathpy))
4358
0d34e01b
RW
4359(define-public python-pickleshare
4360 (package
4361 (name "python-pickleshare")
4362 (version "0.5")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (string-append "https://pypi.python.org/packages/source/p/"
4367 "pickleshare/pickleshare-" version ".tar.gz"))
4368 (sha256
4369 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4370 (build-system python-build-system)
4371 (propagated-inputs
4372 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4373 (native-inputs
4374 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4375 (home-page "https://github.com/vivainio/pickleshare")
4376 (synopsis "Tiny key value database with concurrency support")
4377 (description
4378 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4379Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4380shelve, many processes can access the database simultaneously. Changing a
4381value in database is immediately visible to other processes accessing the same
4382database. Concurrency is possible because the values are stored in separate
4383files. Hence the “database” is a directory where all files are governed by
4384PickleShare.")
4385 (license license:expat)))
4386
4387(define-public python2-pickleshare
4388 (package-with-python2 python-pickleshare))
4389
cd6e5189
RW
4390(define-public python-simplegeneric
4391 (package
4392 (name "python-simplegeneric")
4393 (version "0.8.1")
4394 (source
4395 (origin
4396 (method url-fetch)
4397 (uri (string-append "https://pypi.python.org/packages/source/s/"
4398 "simplegeneric/simplegeneric-" version ".zip"))
4399 (sha256
4400 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4401 (build-system python-build-system)
4402 (native-inputs
69b96e5e
RW
4403 `(("python-setuptools" ,python-setuptools)
4404 ("unzip" ,unzip)))
cd6e5189
RW
4405 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4406 (synopsis "Python module for simple generic functions")
4407 (description
4408 "The simplegeneric module lets you define simple single-dispatch generic
4409functions, akin to Python’s built-in generic functions like @code{len()},
4410@code{iter()} and so on. However, instead of using specially-named methods,
4411these generic functions use simple lookup tables, akin to those used by
4412e.g. @code{pickle.dump()} and other generic functions found in the Python
4413standard library.")
3f641af0 4414 (license license:zpl2.1)))
cd6e5189
RW
4415
4416(define-public python2-simplegeneric
4417 (package-with-python2 python-simplegeneric))
4418
ddc7d8ed
RW
4419(define-public python-ipython-genutils
4420 (package
4421 (name "python-ipython-genutils")
4422 (version "0.1.0")
4423 (source
4424 (origin
4425 (method url-fetch)
4426 (uri (string-append "https://pypi.python.org/packages/source/i/"
4427 "ipython_genutils/ipython_genutils-"
4428 version ".tar.gz"))
4429 (sha256
4430 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4431 (build-system python-build-system)
4432 (arguments `(#:tests? #f)) ; no tests
4433 (home-page "http://ipython.org")
4434 (synopsis "Vestigial utilities from IPython")
4435 (description
4436 "This package provides retired utilities from IPython.")
3f641af0 4437 (license license:bsd-3)))
ddc7d8ed
RW
4438
4439(define-public python2-ipython-genutils
4440 (package-with-python2 python-ipython-genutils))
4441
2b10eb48
RW
4442(define-public python-traitlets
4443 (package
4444 (name "python-traitlets")
cc0c4fde 4445 (version "4.1.0")
2b10eb48
RW
4446 (source
4447 (origin
4448 (method url-fetch)
cc0c4fde 4449 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4450 (sha256
4451 (base32
cc0c4fde 4452 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
2b10eb48
RW
4453 (build-system python-build-system)
4454 (arguments
4455 `(#:phases
4456 (modify-phases %standard-phases
4457 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4458 (propagated-inputs
4459 `(("python-ipython-genutils" ,python-ipython-genutils)
4460 ("python-decorator" ,python-decorator)))
4461 (native-inputs
cc0c4fde
EF
4462 `(("python-mock" ,python-mock)
4463 ("python-nose" ,python-nose)))
2b10eb48
RW
4464 (home-page "http://ipython.org")
4465 (synopsis "Configuration system for Python applications")
4466 (description
4467 "Traitlets is a framework that lets Python classes have attributes with
4468type checking, dynamically calculated default values, and ‘on change’
4469callbacks. The package also includes a mechanism to use traitlets for
4470configuration, loading values from files or from command line arguments. This
4471is a distinct layer on top of traitlets, so you can use traitlets in your code
4472without using the configuration machinery.")
3f641af0 4473 (license license:bsd-3)))
2b10eb48
RW
4474
4475(define-public python2-traitlets
4476 (package-with-python2 python-traitlets))
4477
ae1ab9fe
FB
4478(define-public python-ipython
4479 (package
4480 (name "python-ipython")
3a0b1b9a 4481 (version "3.2.1")
ae1ab9fe
FB
4482 (source
4483 (origin
fceac880 4484 (method url-fetch)
fc1adab1 4485 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4486 (uri (string-append "https://pypi.python.org/packages/source/i/"
4487 "ipython/ipython-" version ".tar.gz"))
4488 (sha256
4489 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4490 (build-system python-build-system)
4491 (outputs '("out" "doc"))
3a0b1b9a
FB
4492 (propagated-inputs
4493 `(("python-pyzmq" ,python-pyzmq)
4494 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4495 (inputs
4496 `(("readline" ,readline)
3a0b1b9a 4497 ("which" ,which)
ae1ab9fe 4498 ("python-matplotlib" ,python-matplotlib)
5d26e542 4499 ("python-numpy" ,python-numpy)
ae1ab9fe 4500 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4501 ("python-jinja2" ,python-jinja2)
4502 ("python-mistune" ,python-mistune)
4503 ("python-jsonschema" ,python-jsonschema)
4504 ("python-pygments" ,python-pygments)
4505 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4506 ("python-nose" ,python-nose)))
4507 (native-inputs
4508 `(("pkg-config" ,pkg-config)
4509 ("python-sphinx" ,python-sphinx)
4510 ("texlive" ,texlive)
4511 ("texinfo" ,texinfo)
4512 ("python-setuptools" ,python-setuptools)))
4513 (arguments
89b5c60e 4514 `(#:phases
3a0b1b9a
FB
4515 (modify-phases %standard-phases
4516 (add-after
4517 'install 'install-doc
4518 (lambda* (#:key inputs outputs #:allow-other-keys)
4519 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4520 (doc (string-append data "/doc/" ,name "-" ,version))
4521 (html (string-append doc "/html"))
4522 (man1 (string-append data "/man/man1"))
4523 (info (string-append data "/info"))
4524 (examples (string-append doc "/examples")))
afd3d931 4525 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4526 (with-directory-excursion "docs"
4527 ;; FIXME: html and pdf fail to build
4528 ;; (system* "make" "html")
4529 ;; (system* "make" "pdf" "PAPER=a4")
4530 (system* "make" "info"))
4531 (copy-recursively "docs/man" man1)
4532 (copy-recursively "examples" examples)
4533 ;; (copy-recursively "docs/build/html" html)
4534 ;; (copy-file "docs/build/latex/ipython.pdf"
4535 ;; (string-append doc "/ipython.pdf"))
4536 (mkdir-p info)
4537 (copy-file "docs/build/texinfo/ipython.info"
4538 (string-append info "/ipython.info"))
4539 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4540 ;; Tests can only be run after the library has been installed and not
4541 ;; within the source directory.
4542 (delete 'check)
4543 (add-after
4544 'install 'check
4545 (lambda* (#:key outputs tests? #:allow-other-keys)
4546 (if tests?
4547 (with-directory-excursion "/tmp"
4548 (setenv "HOME" "/tmp/") ;; required by a test
4549 (zero? (system* (string-append (assoc-ref outputs "out")
4550 "/bin/iptest"))))
4551 #t)))
4552 (add-before
4553 'install 'fix-tests
4554 (lambda* (#:key inputs #:allow-other-keys)
4555 (substitute* "./IPython/utils/_process_posix.py"
4556 (("/usr/bin/env', 'which") (which "which")))
4557 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4558 (("#!/usr/bin/env python")
4559 (string-append "#!" (which "python"))))
4560 ;; Disable 1 failing test
4561 (substitute* "./IPython/core/tests/test_magic.py"
4562 (("def test_dirops\\(\\):" all)
4563 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4564 (home-page "http://ipython.org")
4565 (synopsis "IPython is a tool for interactive computing in Python")
4566 (description
4567 "IPython provides a rich architecture for interactive computing with:
4568Powerful interactive shells, a browser-based notebook, support for interactive
4569data visualization, embeddable interpreters and tools for parallel
4570computing.")
135ba811
EF
4571 (license license:bsd-3)
4572 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4573
4574(define-public python2-ipython
135ba811 4575 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4576 (package
4577 (inherit ipython)
4578 ;; FIXME: some tests are failing
4579 (arguments
4580 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4581 ;; FIXME: add pyreadline once available.
89b5c60e 4582 (inputs
135ba811
EF
4583 `(("python2-mock" ,python2-mock)
4584 ,@(package-inputs ipython))))))
03411993
AE
4585
4586(define-public python-isodate
4587 (package
4588 (name "python-isodate")
b6785c2e 4589 (version "0.5.4")
03411993
AE
4590 (source
4591 (origin
4592 (method url-fetch)
b6785c2e 4593 (uri (pypi-uri "isodate" version))
03411993
AE
4594 (sha256
4595 (base32
b6785c2e 4596 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4597 (build-system python-build-system)
4598 (inputs
4599 `(("python-setuptools" ,python-setuptools)))
4600 (home-page
4601 "http://cheeseshop.python.org/pypi/isodate")
4602 (synopsis
4603 "Python date parser and formatter")
4604 (description
4605 "Python-isodate is a python module for parsing and formatting
4606ISO 8601 dates, time and duration.")
3f641af0 4607 (license license:bsd-3)))
03411993
AE
4608
4609(define-public python2-isodate
4610 (package-with-python2 python-isodate))
673ab897
AE
4611
4612(define-public python-html5lib
4613 (package
4614 (name "python-html5lib")
fee04c19 4615 (version "1.0b8")
673ab897
AE
4616 (source
4617 (origin
4618 (method url-fetch)
fee04c19 4619 (uri (pypi-uri "html5lib" version))
673ab897
AE
4620 (sha256
4621 (base32
fee04c19 4622 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4623 (build-system python-build-system)
3dd75476
AE
4624 (propagated-inputs
4625 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4626 (inputs
4627 `(("python-setuptools" ,python-setuptools)))
4628 (arguments
4629 `(#:test-target "check"))
4630 (home-page
4631 "https://github.com/html5lib/html5lib-python")
4632 (synopsis
4633 "Python HTML parser based on the WHATWG HTML specifcation")
4634 (description
4635 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4636and written in Python.")
bd3fa666 4637 (license license:expat)))
673ab897
AE
4638
4639(define-public python2-html5lib
4640 (package-with-python2 python-html5lib))
e99f4211
MW
4641
4642(define-public python-urwid
4643 (package
4644 (name "python-urwid")
51ff41f6 4645 (version "1.3.1")
e99f4211
MW
4646 (source
4647 (origin
4648 (method url-fetch)
b97c1bfd 4649 (uri (pypi-uri "urwid" version))
e99f4211
MW
4650 (sha256
4651 (base32
51ff41f6 4652 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4653 (build-system python-build-system)
b97c1bfd
LF
4654 (arguments
4655 `(#:phases
4656 (modify-phases %standard-phases
4657 ;; Disable failing test. Bug filed upstream:
4658 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4659 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4660 (add-after 'unpack 'disable-failing-test
4661 (lambda _
4662 (substitute* "urwid/tests/test_event_loops.py"
4663 (("test_remove_watch_file")
4664 "disable_remove_watch_file")))))))
e99f4211
MW
4665 (native-inputs `(("python-setuptools" ,python-setuptools)))
4666 (home-page "http://urwid.org")
4667 (synopsis "Console user interface library for Python")
4668 (description
4669 "Urwid is a curses-based UI/widget library for Python. It includes many
4670features useful for text console applications.")
3f641af0 4671 (license license:lgpl2.1+)))
e99f4211
MW
4672
4673(define-public python2-urwid
4674 (package-with-python2 python-urwid))
d95a56c6 4675
47d0b292
TS
4676(define-public python-urwidtrees
4677 (package
4678 (name "python-urwidtrees")
37ec4623 4679 (version "1.0.2")
47d0b292
TS
4680 (source
4681 (origin
4682 (method url-fetch)
37ec4623
TS
4683 ;; package author intends on distributing via github rather than pypi:
4684 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4685 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4686 version ".tar.gz"))
4687 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4688 (sha256
4689 (base32
37ec4623 4690 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4691 (build-system python-build-system)
4692 (arguments
4693 '(#:tests? #f)) ; no tests
4694 (inputs `(("python-urwid" ,python-urwid)))
4695 (home-page "https://github.com/pazz/urwidtrees")
4696 (synopsis "Tree widgets for urwid")
4697 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4698toolkit. Use it to build trees of widgets.")
3f641af0 4699 (license license:gpl3+)))
47d0b292
TS
4700
4701(define-public python2-urwidtrees
4702 (package-with-python2 python-urwidtrees))
4703
d95a56c6
PAR
4704(define-public python-dbus
4705 (package
4706 (name "python-dbus")
4707 (version "1.2.0")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (string-append
5cc3096c 4712 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4713 version ".tar.gz"))
4714 (sha256
4715 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4716 (build-system gnu-build-system)
6717c879
SB
4717 (arguments
4718 '(#:phases
4719 (modify-phases %standard-phases
4720 (add-before
4721 'check 'pre-check
4722 (lambda _
4723 ;; XXX: For the missing '/etc/machine-id'.
4724 (substitute* "test/run-test.sh"
4725 (("DBUS_FATAL_WARNINGS=1")
4726 "DBUS_FATAL_WARNINGS=0"))
4727 #t)))))
d95a56c6
PAR
4728 (native-inputs
4729 `(("pkg-config" ,pkg-config)))
4730 (inputs
4731 `(("python" ,python)
2e88d113 4732 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4733 (synopsis "Python bindings for D-bus")
4734 (description "python-dbus provides bindings for libdbus, the reference
4735implementation of D-Bus.")
4736 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4737 (license license:expat)))
b52af02b
MW
4738
4739(define-public python2-dbus
4740 (package (inherit python-dbus)
4741 (name "python2-dbus")
4742 (inputs `(("python" ,python-2)
4743 ,@(alist-delete "python"
4744 (package-inputs python-dbus)
4745 equal?)))
4746 ;; FIXME: on Python 2, the test_utf8 fails with:
4747 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4748 (arguments `(#:tests? #f))))
a6ac8332
AE
4749
4750(define-public python-apsw
4751 (package
4752 (name "python-apsw")
917708c2 4753 (version "3.9.2-r1")
a6ac8332
AE
4754 (source
4755 (origin
4756 (method url-fetch)
917708c2 4757 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4758 (sha256
4759 (base32
917708c2 4760 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4761 (build-system python-build-system)
4762 (inputs
4763 `(("python-setuptools" ,python-setuptools)
4764 ("sqlite" ,sqlite)))
4765 (arguments
4766 `(#:phases
4767 ;; swap check and install phases
4768 (alist-cons-after
4769 'install 'check
4770 (assoc-ref %standard-phases 'check)
4771 (alist-delete
4772 'check
4773 %standard-phases))))
4774 (home-page "https://github.com/rogerbinns/apsw/")
4775 (synopsis "Another Python SQLite Wrapper")
4776 (description "APSW is a Python wrapper for the SQLite
4777embedded relational database engine. In contrast to other wrappers such as
4778pysqlite it focuses on being a minimal layer over SQLite attempting just to
4779translate the complete SQLite API into Python.")
abde5f37 4780 (license license:zlib)))
a6ac8332
AE
4781
4782(define-public python2-apsw
4783 (package-with-python2 python-apsw))
26b307e2
AE
4784
4785(define-public python-lxml
4786 (package
4787 (name "python-lxml")
d58a3203 4788 (version "3.6.0")
26b307e2
AE
4789 (source
4790 (origin
4791 (method url-fetch)
97bbc480 4792 (uri (pypi-uri "lxml" version))
26b307e2 4793 (sha256
d58a3203
EF
4794 (base32
4795 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4796 (build-system python-build-system)
4797 (inputs
4798 `(("libxml2" ,libxml2)
4799 ("libxslt" ,libxslt)
4800 ("python-setuptools" ,python-setuptools)))
4801 (home-page "http://lxml.de/")
4802 (synopsis
4803 "Python XML processing library")
4804 (description
4805 "The lxml XML toolkit is a Pythonic binding for the C libraries
4806libxml2 and libxslt.")
3f641af0 4807 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4808
4809(define-public python2-lxml
4810 (package-with-python2 python-lxml))
4ed20663 4811
b32a1e47
CAW
4812;; beautifulsoup4 has a totally different namespace than 3.x,
4813;; and pypi seems to put it under its own name, so I guess we should too
4814(define-public python-beautifulsoup4
4815 (package
4816 (name "python-beautifulsoup4")
cfbb3b0d 4817 (version "4.5.0")
b32a1e47
CAW
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (pypi-uri "beautifulsoup4" version))
4822 (sha256
4823 (base32
cfbb3b0d 4824 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
b32a1e47
CAW
4825 (build-system python-build-system)
4826 (home-page
4827 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4828 (synopsis
4829 "Python screen-scraping library")
4830 (description
4831 "Beautiful Soup is a Python library designed for rapidly setting up
4832screen-scraping projects. It offers Pythonic idioms for navigating,
4833searching, and modifying a parse tree, providing a toolkit for
4834dissecting a document and extracting what you need. It automatically
4835converts incoming documents to Unicode and outgoing documents to UTF-8.")
4836 (license license:expat)
4837 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4838
4839(define-public python2-beautifulsoup4
4840 (package
4841 (inherit (package-with-python2
4842 (strip-python2-variant python-beautifulsoup4)))
4843 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4844
092e86f5
AE
4845(define-public python2-cssutils
4846 (package
4847 (name "python2-cssutils")
58d1d816 4848 (version "1.0.1")
092e86f5
AE
4849 (source
4850 (origin
4851 (method url-fetch)
58d1d816 4852 (uri (pypi-uri "cssutils" version))
092e86f5 4853 (sha256
58d1d816
EF
4854 (base32
4855 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
4856 (build-system python-build-system)
4857 (native-inputs
4858 `(("python2-mock" ,python2-mock) ; for the tests
4859 ("unzip" ,unzip))) ; for unpacking the source
4860 (inputs
4861 `(("python2-setuptools" ,python2-setuptools)))
4862 (arguments
4863 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4864 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4865 ))
092e86f5
AE
4866 (home-page "http://cthedot.de/cssutils/")
4867 (synopsis
4868 "CSS Cascading Style Sheets library for Python")
4869 (description
4870 "Cssutils is a Python package for parsing and building CSS
4871Cascading Style Sheets. Currently it provides a DOM only and no rendering
4872options.")
3f641af0 4873 (license license:lgpl3+)))
880ff77c
AE
4874
4875(define-public python-cssselect
4876 (package
4877 (name "python-cssselect")
d5ccd9ab 4878 (version "0.9.2")
880ff77c
AE
4879 (source
4880 (origin
4881 (method url-fetch)
d5ccd9ab 4882 (uri (pypi-uri "cssselect" version))
880ff77c 4883 (sha256
d5ccd9ab
EF
4884 (base32
4885 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
4886 (build-system python-build-system)
4887 (inputs
4888 `(("python-setuptools" ,python-setuptools)))
4889 (arguments
4890 ;; tests fail with message
4891 ;; AttributeError: 'module' object has no attribute 'tests'
4892 `(#:tests? #f))
4893 (home-page
4894 "https://pythonhosted.org/cssselect/")
4895 (synopsis
4896 "CSS3 selector parser and translator to XPath 1.0")
4897 (description
4898 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4899them to XPath 1.0 expressions. Such expressions can be used in lxml or
4900another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 4901 (license license:bsd-3)))
880ff77c
AE
4902
4903(define-public python2-cssselect
4904 (package-with-python2 python-cssselect))
60357f99
AE
4905
4906(define-public python-netifaces
4907 (package
4908 (name "python-netifaces")
4909 (version "0.10.4")
4910 (source
4911 (origin
4912 (method url-fetch)
4913 (uri (string-append
4914 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4915 version
4916 ".tar.gz"))
4917 (sha256
4918 (base32
4919 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4920 (build-system python-build-system)
4921 (inputs
4922 `(("python-setuptools" ,python-setuptools)))
4923 (home-page
4924 "https://bitbucket.org/al45tair/netifaces")
4925 (synopsis
4926 "Python module for portable network interface information")
4927 (description
4928 "Netifaces is a Python module providing information on network
4929interfaces in an easy and portable manner.")
4930 (license license:expat)))
4931
4932(define-public python2-netifaces
4933 (package-with-python2 python-netifaces))
92cb152b 4934
32f77c04
RW
4935(define-public python-networkx
4936 (package
4937 (name "python-networkx")
a4d9609c 4938 (version "1.11")
32f77c04
RW
4939 (source
4940 (origin
4941 (method url-fetch)
a4d9609c 4942 (uri (pypi-uri "networkx" version))
32f77c04 4943 (sha256
a4d9609c 4944 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
4945 (build-system python-build-system)
4946 ;; python-decorator is needed at runtime
4947 (propagated-inputs
4948 `(("python-decorator" ,python-decorator)))
4949 (native-inputs
4950 `(("python-setuptools" ,python-setuptools)
4951 ("python-nose" ,python-nose)))
4952 (home-page "http://networkx.github.io/")
4953 (synopsis "Python module for creating and manipulating graphs and networks")
4954 (description
4955 "NetworkX is a Python package for the creation, manipulation, and study
4956of the structure, dynamics, and functions of complex networks.")
3f641af0 4957 (license license:bsd-3)))
32f77c04
RW
4958
4959(define-public python2-networkx
4960 (package-with-python2 python-networkx))
4961
92cb152b
RW
4962(define-public snakemake
4963 (package
4964 (name "snakemake")
4965 (version "3.2.1")
4966 (source
4967 (origin
4968 (method url-fetch)
4969 (uri (string-append
4970 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4971 version ".tar.gz"))
4972 (sha256
4973 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4974 (build-system python-build-system)
4975 (inputs `(("python-setuptools" ,python-setuptools)))
4976 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4977 (synopsis "Python-based execution environment for make-like workflows")
4978 (description
4979 "Snakemake aims to reduce the complexity of creating workflows by
4980providing a clean and modern domain specific specification language (DSL) in
4981Python style, together with a fast and comfortable execution environment.")
4982 (license license:expat)))
a1920bc9 4983
35de1fbd
RW
4984(define-public python-seaborn
4985 (package
4986 (name "python-seaborn")
fc899d4f 4987 (version "0.7.0")
35de1fbd
RW
4988 (source
4989 (origin
4990 (method url-fetch)
fc899d4f 4991 (uri (pypi-uri "seaborn" version))
35de1fbd 4992 (sha256
fc899d4f 4993 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
4994 (build-system python-build-system)
4995 (propagated-inputs
4996 `(("python-pandas" ,python-pandas)
4997 ("python-matplotlib" ,python-matplotlib)
4998 ("python-scipy" ,python-scipy)))
35de1fbd
RW
4999 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5000 (synopsis "Statistical data visualization")
5001 (description
5002 "Seaborn is a library for making attractive and informative statistical
5003graphics in Python. It is built on top of matplotlib and tightly integrated
5004with the PyData stack, including support for numpy and pandas data structures
5005and statistical routines from scipy and statsmodels.")
3f641af0 5006 (license license:bsd-3)
fc899d4f 5007 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5008
5009(define-public python2-seaborn
fc899d4f
EF
5010 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5011 (package
5012 (inherit base)
5013 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5014 ,@(package-propagated-inputs base)))
5015 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5016 ,@(package-native-inputs base))))))
35de1fbd 5017
90fc547f
RW
5018(define-public python-sympy
5019 (package
5020 (name "python-sympy")
5021 (version "0.7.6")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (string-append
5026 "https://github.com/sympy/sympy/releases/download/sympy-"
5027 version "/sympy-" version ".tar.gz"))
5028 (sha256
5029 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5030 (build-system python-build-system)
5031 (native-inputs
5032 `(("python-setuptools" ,python-setuptools)))
5033 (home-page "http://www.sympy.org/")
5034 (synopsis "Python library for symbolic mathematics")
5035 (description
5036 "SymPy is a Python library for symbolic mathematics. It aims to become a
5037full-featured computer algebra system (CAS) while keeping the code as simple
5038as possible in order to be comprehensible and easily extensible.")
3f641af0 5039 (license license:bsd-3)))
90fc547f
RW
5040
5041(define-public python2-sympy
5042 (package-with-python2 python-sympy))
5043
e8c9b010
SR
5044(define-public python-q
5045 (package
5046 (name "python-q")
5047 (version "2.6")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "q" version))
5052 (sha256
5053 (base32
5054 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5055 (build-system python-build-system)
5056 (home-page "https://github.com/zestyping/q")
5057 (synopsis "Quick-and-dirty debugging output for tired programmers")
5058 (description
5059 "q is a Python module for \"print\" style of debugging Python code. It
5060provides convenient short API for print out of values, tracebacks, and
5061falling into the Python interpreter.")
5062 (license license:asl2.0)
5063 (properties `((python2-variant . ,(delay python2-q))))))
5064
5065(define-public python2-q
5066 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5067 (package
5068 (inherit base)
5069 (native-inputs
5070 `(("python2-setuptools" ,python2-setuptools)
5071 ,@(package-native-inputs base))))))
5072
a1920bc9
FB
5073(define-public python-testlib
5074 (package
5075 (name "python-testlib")
5076 (version "0.6.5")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (string-append
5081 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5082 version ".zip"))
5083 (sha256
5084 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5085 (build-system python-build-system)
5086 (inputs
5087 `(("python-setuptools" ,python-setuptools)))
5088 (native-inputs
5089 `(("unzip" ,unzip)))
5090 (arguments
5091 `(#:phases
5092 (alist-replace
5093 'unpack
5094 (lambda* (#:key inputs outputs #:allow-other-keys)
5095 (let ((unzip (string-append (assoc-ref inputs "unzip")
5096 "/bin/unzip"))
5097 (source (assoc-ref inputs "source")))
5098 (and (zero? (system* unzip source))
5099 (chdir (string-append "testlib-" ,version)))))
5100 %standard-phases)))
5101 (synopsis "Python micro test suite harness")
5102 (description "A micro unittest suite harness for Python.")
5103 (home-page "https://github.com/trentm/testlib")
1cb9c006 5104 (license license:expat)))
a1920bc9
FB
5105
5106(define-public python2-testlib
5107 (package-with-python2 python-testlib))
db62afa5
LC
5108
5109(define-public python2-xlib
5110 (package
5111 (name "python2-xlib")
5112 (version "0.14")
5113 (source (origin
5114 (method url-fetch)
de67e922
LF
5115 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5116 "/" version "/"
db62afa5
LC
5117 "python-xlib-" version ".tar.gz"))
5118 (sha256
5119 (base32
5120 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5121 (build-system python-build-system)
5122 (arguments
5123 `(#:python ,python-2 ;Python 2 only
5124 #:tests? #f)) ;no tests
5125 (inputs
5126 `(("python-setuptools" ,python-setuptools)))
5127 (home-page "http://python-xlib.sourceforge.net/")
5128 (synopsis "Python X11 client library")
5129 (description
5130 "The Python X Library is intended to be a fully functional X client
5131library for Python programs. It is useful to implement low-level X clients.
5132It is written entirely in Python.")
3f641af0 5133 (license license:gpl2+)))
0234ca06
DT
5134
5135(define-public python-singledispatch
5136 (package
5137 (name "python-singledispatch")
5138 (version "3.4.0.3")
5139 (source
5140 (origin
5141 (method url-fetch)
bdb67d84 5142 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5143 (sha256
5144 (base32
5145 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5146 (build-system python-build-system)
5147 (native-inputs
5148 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5149 (inputs
0234ca06
DT
5150 `(("python-six" ,python-six)))
5151 (home-page
5152 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5153 (synopsis "Backport of singledispatch feature from Python 3.4")
5154 (description
5155 "This library brings functools.singledispatch from Python 3.4 to Python
51562.6-3.3.")
5157 (license license:expat)))
5158
5159(define-public python2-singledispatch
5160 (package-with-python2 python-singledispatch))
feaae484 5161
310d218f
RW
5162(define-public python-tornado
5163 (package
5164 (name "python-tornado")
a724924b 5165 (version "4.3")
310d218f
RW
5166 (source
5167 (origin
5168 (method url-fetch)
a724924b 5169 (uri (pypi-uri "tornado" version))
310d218f 5170 (sha256
a724924b 5171 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5172 (build-system python-build-system)
310d218f 5173 (native-inputs
b455439b
EF
5174 `(("python-certifi" ,python-certifi)))
5175 (inputs
5176 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5177 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5178 (synopsis "Python web framework and asynchronous networking library")
5179 (description
5180 "Tornado is a Python web framework and asynchronous networking library,
5181originally developed at FriendFeed. By using non-blocking network I/O,
5182Tornado can scale to tens of thousands of open connections, making it ideal
5183for long polling, WebSockets, and other applications that require a long-lived
5184connection to each user.")
3f641af0 5185 (license license:asl2.0)
b455439b 5186 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5187
5188(define-public python2-tornado
b455439b 5189 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5190 (package (inherit tornado)
5191 (inputs
5192 `(("python2-backport-ssl-match-hostname"
5193 ,python2-backport-ssl-match-hostname)
b455439b
EF
5194 ("python2-singledispatch" ,python2-singledispatch)
5195 ,@(package-inputs tornado)))
5196 (native-inputs
5197 `(("python2-setuptools" ,python2-setuptools)
5198 ,@(package-native-inputs tornado))))))
310d218f 5199
6b59fc10
EF
5200;; the python- version can be removed with python-3.5
5201(define-public python-backports-abc
5202 (package
5203 (name "python-backports-abc")
5204 (version "0.4")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "backports_abc" version))
5209 (sha256
5210 (base32
5211 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5212 (build-system python-build-system)
5213 (inputs
5214 `(("python-setuptools" ,python-setuptools)))
5215 (home-page "https://github.com/cython/backports_abc")
66e07664 5216 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5217 (description
5218 "Python-backports-abc provides a backport of additions to the
5219'collections.abc' module in Python-3.5.")
3f641af0 5220 (license license:psfl)))
6b59fc10
EF
5221
5222(define-public python2-backports-abc
5223 (package-with-python2 python-backports-abc))
5224
feaae484
SB
5225(define-public python-waf
5226 (package
5227 (name "python-waf")
f0e8d85e 5228 (version "1.9.1")
feaae484
SB
5229 (source (origin
5230 (method url-fetch)
5231 (uri (string-append "https://waf.io/"
5232 "waf-" version ".tar.bz2"))
5233 (sha256
5234 (base32
f0e8d85e 5235 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
feaae484
SB
5236 (build-system python-build-system)
5237 (arguments
5238 '(#:phases
5239 (modify-phases %standard-phases
5240 (replace 'build
5241 (lambda _
5242 (zero? (begin
5243 (system* "python" "waf-light" "configure")
5244 (system* "python" "waf-light" "build")))))
5245 (replace 'check
5246 (lambda _
5247 (zero? (system* "python" "waf" "--version"))))
5248 (replace 'install
5249 (lambda _
5250 (copy-file "waf" %output))))))
5251 (home-page "https://waf.io/")
5252 (synopsis "Python-based build system")
5253 (description
5254 "Waf is a Python-based framework for configuring, compiling and installing
5255applications.")
3f641af0 5256 (license license:bsd-3)))
feaae484
SB
5257
5258(define-public python2-waf
5259 (package-with-python2 python-waf))
45203542
RW
5260
5261(define-public python-pyzmq
5262 (package
5263 (name "python-pyzmq")
3655ee76 5264 (version "15.1.0")
45203542
RW
5265 (source
5266 (origin
5267 (method url-fetch)
3655ee76 5268 (uri (pypi-uri "pyzmq" version))
45203542 5269 (sha256
3655ee76 5270 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5271 (build-system python-build-system)
5272 (arguments
5273 `(#:configure-flags
5274 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5275 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5276 ;; --inplace' for 'python setup.py test' to work.
5277 #:tests? #f))
5278 (inputs
5279 `(("zeromq" ,zeromq)))
5280 (native-inputs
5281 `(("pkg-config" ,pkg-config)
5282 ("python-nose" ,python-nose)
5283 ("python-setuptools" ,python-setuptools)))
5284 (home-page "http://github.com/zeromq/pyzmq")
5285 (synopsis "Python bindings for 0MQ")
5286 (description
5287 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5288 (license license:bsd-4)))
45203542
RW
5289
5290(define-public python2-pyzmq
5291 (package-with-python2 python-pyzmq))
d889e6c4
CR
5292
5293(define-public python-pep8
5294 (package
5295 (name "python-pep8")
db251311 5296 (version "1.7.0")
d889e6c4
CR
5297 (source
5298 (origin
5299 (method url-fetch)
db251311 5300 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5301 (sha256
5302 (base32
db251311 5303 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5304 (build-system python-build-system)
5305 (inputs
5306 `(("python-setuptools" ,python-setuptools)))
5307 (home-page "http://pep8.readthedocs.org/")
5308 (synopsis "Python style guide checker")
5309 (description
5310 "This tools checks Python code against some of the style conventions in
5311PEP 8.")
5312 (license license:expat)))
5313
5314(define-public python2-pep8
5315 (package-with-python2 python-pep8))
e31d7f44
CR
5316
5317(define-public python-pyflakes
5318 (package
5319 (name "python-pyflakes")
2abc3972 5320 (version "1.0.0")
e31d7f44
CR
5321 (source
5322 (origin
5323 (method url-fetch)
2abc3972 5324 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5325 (sha256
5326 (base32
2abc3972 5327 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5328 (build-system python-build-system)
5329 (inputs
5330 `(("python-setuptools" ,python-setuptools)))
5331 (home-page
5332 "https://github.com/pyflakes/pyflakes")
5333 (synopsis "Passive checker of Python programs")
5334 (description
5335 "Pyflakes statically checks Python source code for common errors.")
5336 (license license:expat)))
a59e017c 5337
7261d9eb
CR
5338(define-public python2-pyflakes
5339 (package-with-python2 python-pyflakes))
5340
a59e017c
CR
5341(define-public python-mccabe
5342 (package
5343 (name "python-mccabe")
c6ebd40d 5344 (version "0.4.0")
a59e017c
CR
5345 (source
5346 (origin
5347 (method url-fetch)
c6ebd40d 5348 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5349 (sha256
5350 (base32
c6ebd40d 5351 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5352 (build-system python-build-system)
5353 (inputs
c6ebd40d
EF
5354 `(("python-pytest" ,python-pytest)
5355 ("python-pytest-runner" ,python-pytest-runner)
5356 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5357 (home-page "https://github.com/flintwork/mccabe")
5358 (synopsis "McCabe checker, plugin for flake8")
5359 (description
5360 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5361complexity of Python source code.")
7362371d 5362 (license license:expat)))
a59e017c
CR
5363
5364(define-public python2-mccabe
5365 (package-with-python2 python-mccabe))
e8df8f47 5366
7477fbb1
CR
5367(define-public python-mccabe-0.2.1
5368 (package (inherit python-mccabe)
5369 (version "0.2.1")
5370 (source
5371 (origin
5372 (method url-fetch)
5373 (uri (pypi-uri "mccabe" version))
5374 (sha256
5375 (base32
c6ebd40d 5376 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5377 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5378
5379(define-public python2-mccabe-0.2.1
5380 (package-with-python2 python-mccabe-0.2.1))
5381
e8df8f47
CR
5382;; Flake8 2.4.1 requires an older version of pep8.
5383;; This should be removed ASAP.
5384(define-public python-pep8-1.5.7
5385 (package (inherit python-pep8)
5386 (version "1.5.7")
5387 (source
5388 (origin
5389 (method url-fetch)
5390 (uri (string-append
5391 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5392 version
5393 ".tar.gz"))
5394 (sha256
5395 (base32
5396 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5397
5398(define-public python2-pep8-1.5.7
5399 (package-with-python2 python-pep8-1.5.7))
5400
5401;; Flake8 2.4.1 requires an older version of pyflakes.
5402;; This should be removed ASAP.
5403(define-public python-pyflakes-0.8.1
5404 (package (inherit python-pyflakes)
5405 (version "0.8.1")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (string-append
5410 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5411 version
5412 ".tar.gz"))
5413 (sha256
5414 (base32
5415 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5416
5417(define-public python2-pyflakes-0.8.1
7261d9eb 5418 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5419
5420(define-public python-flake8
5421 (package
5422 (name "python-flake8")
43789136 5423 (version "2.5.4")
e8df8f47
CR
5424 (source
5425 (origin
5426 (method url-fetch)
1b995533 5427 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5428 (sha256
5429 (base32
43789136 5430 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5431 (build-system python-build-system)
5432 (inputs
5433 `(("python-setuptools" ,python-setuptools)
43789136
EF
5434 ("python-pep8" ,python-pep8)
5435 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5436 ("python-mccabe" ,python-mccabe)
5437 ("python-mock" ,python-mock)
5438 ("python-nose" ,python-nose)))
5439 (home-page "https://gitlab.com/pycqa/flake8")
5440 (synopsis
5441 "The modular source code checker: pep8, pyflakes and co")
5442 (description
5443 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5444 (license license:expat)))
5445
5446(define-public python2-flake8
5447 (package-with-python2 python-flake8))
61b9ac53 5448
abf21efc
CR
5449;; This will only be needed by the python-hacking package and will not be
5450;; necessary once python-hacking > 0.10.2 is released.
5451(define-public python-flake8-2.2.4
5452 (package (inherit python-flake8)
5453 (inputs
5454 `(("python-setuptools" ,python-setuptools)
5455 ("python-pep8" ,python-pep8-1.5.7)
5456 ("python-pyflakes" ,python-pyflakes-0.8.1)
5457 ("python-mccabe" ,python-mccabe-0.2.1)
5458 ("python-mock" ,python-mock)
5459 ("python-nose" ,python-nose)))
5460 (version "2.2.4")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "flake8" version))
5465 (sha256
5466 (base32
5467 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5468
5469(define-public python2-flake8-2.2.4
5470 (package-with-python2 python-flake8-2.2.4))
5471
61b9ac53
FB
5472(define-public python-mistune
5473 (package
5474 (name "python-mistune")
5475 (version "0.7")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (string-append
5480 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5481 version
5482 ".tar.gz"))
5483 (sha256
5484 (base32
5485 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5486 (build-system python-build-system)
5487 (inputs
5488 `(("python-setuptools" ,python-setuptools)
5489 ("python-nose" ,python-nose)
5490 ("python-cython" ,python-cython)))
5491 (home-page "https://github.com/lepture/mistune")
5492 (synopsis "Markdown parser in pure Python")
5493 (description "This package provides a fast markdown parser in pure
5494Python.")
3f641af0 5495 (license license:bsd-3)))
61b9ac53
FB
5496
5497(define-public python2-mistune
5498 (package-with-python2 python-mistune))
6d992d07 5499
b9893908
EE
5500(define-public python-markdown
5501 (package
5502 (name "python-markdown")
5503 (version "2.6.5")
5504 (source
5505 (origin
5506 (method url-fetch)
5507 (uri (pypi-uri "Markdown" version))
5508 (sha256
5509 (base32
5510 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5511 (build-system python-build-system)
5512 (arguments
5513 `(#:phases
5514 (modify-phases %standard-phases
5515 (replace 'check
5516 (lambda _
5517 (zero? (system* "python" "run-tests.py")))))))
5518 (native-inputs
5519 `(("python-nose" ,python-nose)
5520 ("python-pyyaml" ,python-pyyaml)))
5521 (home-page "https://pythonhosted.org/Markdown/")
5522 (synopsis "Python implementation of Markdown")
5523 (description
5524 "This package provides a Python implementation of John Gruber's
5525Markdown. The library features international input, various Markdown
5526extensions, and several HTML output formats. A command line wrapper
5527markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5528 (license license:bsd-3)))
b9893908
EE
5529
5530(define-public python2-markdown
5531 (package-with-python2 python-markdown))
5532
6d992d07
FB
5533(define-public python-ptyprocess
5534 (package
5535 (name "python-ptyprocess")
5536 (version "0.5")
5537 (source
5538 (origin
5539 (method url-fetch)
5540 (uri (string-append
5541 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5542 version ".tar.gz"))
5543 (sha256
5544 (base32
5545 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5546 (build-system python-build-system)
5547 (inputs
5548 `(("python-setuptools" ,python-setuptools)
5549 ("python-nose" ,python-nose)))
5550 (arguments
5551 `(#:phases
5552 (modify-phases %standard-phases
5553 (replace 'check
5554 (lambda _
5555 (zero? (system* "nosetests")))))))
5556 (home-page "https://github.com/pexpect/ptyprocess")
5557 (synopsis "Run a subprocess in a pseudo terminal")
5558 (description
5559 "This package provides a Python library used to launch a subprocess in a
5560pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5561 (license license:isc)))
6d992d07
FB
5562
5563(define-public python2-ptyprocess
5564 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5565
5566(define-public python-terminado
5567 (package
5568 (name "python-terminado")
783fb0a3 5569 (version "0.6")
4aadb1df
FB
5570 (source
5571 (origin
5572 (method url-fetch)
783fb0a3 5573 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5574 (sha256
5575 (base32
783fb0a3 5576 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5577 (build-system python-build-system)
5578 (propagated-inputs
5579 `(("python-tornado" ,python-tornado)
5580 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5581 (native-inputs
5582 `(("python-nose" ,python-nose)))
4aadb1df
FB
5583 (arguments
5584 `(#:phases
5585 (modify-phases %standard-phases
5586 (replace 'check
5587 (lambda _
5588 (zero? (system* "nosetests")))))))
5589 (home-page "https://github.com/takluyver/terminado")
5590 (synopsis "Terminals served to term.js using Tornado websockets")
5591 (description "This package provides a Tornado websocket backend for the
5592term.js Javascript terminal emulator library.")
3f641af0 5593 (license license:bsd-2)
783fb0a3 5594 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5595
5596(define-public python2-terminado
783fb0a3 5597 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5598 (package (inherit terminado)
783fb0a3
EF
5599 (propagated-inputs
5600 `(("python2-backport-ssl-match-hostname"
5601 ,python2-backport-ssl-match-hostname)
5602 ,@(package-propagated-inputs terminado)))
5603 (native-inputs
5604 `(("python2-setuptools" ,python2-setuptools)
5605 ,@(package-native-inputs terminado))))))
5faa5ce4 5606
d582eaac
SB
5607(define-public python-fonttools
5608 (package
5609 (name "python-fonttools")
5610 (version "2.5")
5611 (source (origin
5612 (method url-fetch)
5613 (uri (string-append
5614 "https://pypi.python.org/packages/source/F/FontTools/"
5615 "fonttools-" version ".tar.gz"))
5616 (sha256
5617 (base32
5618 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5619 (build-system python-build-system)
5620 (arguments '(#:test-target "check"))
5621 (propagated-inputs
5622 ;; XXX: module not found if setuptools is not available.
5623 `(("python-setuptools" ,python-setuptools)))
5624 (home-page "http://github.com/behdad/fonttools")
5625 (synopsis "Tools to manipulate font files")
5626 (description
5627 "FontTools/TTX is a library to manipulate font files from Python. It
5628supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5629of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5630also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5631from an XML-based format.")
3f641af0
DC
5632 (license (license:non-copyleft
5633 "file://LICENSE.txt"
5634 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5635
5636(define-public python2-fonttools
5637 (package-with-python2 python-fonttools))
75710da6 5638
5faa5ce4
RW
5639(define-public python-ly
5640 (package
5641 (name "python-ly")
5135354f 5642 (version "0.9.4")
5faa5ce4
RW
5643 (source
5644 (origin
5645 (method url-fetch)
5135354f
RW
5646 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5647 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5648 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5649 (sha256
5650 (base32
5135354f 5651 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5652 (build-system python-build-system)
5653 (native-inputs
5654 `(("python-setuptools" ,python-setuptools)))
5655 (synopsis "Tool and library for manipulating LilyPond files")
5656 (description "This package provides a Python library to parse, manipulate
5657or create documents in LilyPond format. A command line program ly is also
5658provided that can be used to do various manipulations with LilyPond files.")
5659 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5660 (license license:gpl2+)))
7e7b27d9
CR
5661
5662(define-public python-appdirs
5663 (package
5664 (name "python-appdirs")
5665 (version "1.4.0")
5666 (source
5667 (origin
5668 (method url-fetch)
5669 (uri (string-append
5670 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5671 version
5672 ".tar.gz"))
5673 (sha256
5674 (base32
5675 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5676 (build-system python-build-system)
5677 (inputs
5678 `(("python-setuptools" ,python-setuptools)))
5679 (home-page "http://github.com/ActiveState/appdirs")
5680 (synopsis
5681 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5682 (description
5683 "This module provides a portable way of finding out where user data
5684should be stored on various operating systems.")
5685 (license license:expat)))
5686
5687(define-public python2-appdirs
5688 (package-with-python2 python-appdirs))
89b2e0b0
LF
5689
5690(define-public python-llfuse
5691 (package
5692 (name "python-llfuse")
e36ace36 5693 (version "1.1.1")
89b2e0b0
LF
5694 (source (origin
5695 (method url-fetch)
5696 (uri (string-append
5697 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5698 "llfuse-" version ".tar.bz2"))
5699 (sha256
5700 (base32
e36ace36 5701 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5702 (build-system python-build-system)
5703 (inputs
5704 `(("fuse" ,fuse)
5705 ("attr" ,attr)))
5706 (native-inputs
5707 `(("pkg-config" ,pkg-config)
5708 ("python-setuptools" ,python-setuptools)))
5709 (synopsis "Python bindings for FUSE")
5710 (description
5711 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5712 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5713 (license license:lgpl2.0+)
cd0569c4 5714 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5715
5716(define-public python2-llfuse
cd0569c4
LF
5717 (package (inherit (package-with-python2
5718 (strip-python2-variant python-llfuse)))
5719 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5720
5721;; For attic-0.16
5722(define-public python-llfuse-0.41
5723 (package (inherit python-llfuse)
229b3661 5724 (version "0.41.1")
cd0569c4
LF
5725 (source (origin
5726 (method url-fetch)
5727 (uri (string-append
5728 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5729 "llfuse-" version ".tar.bz2"))
5730 (sha256
5731 (base32
229b3661 5732 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5733 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5734 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5735 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5736
5737(define-public python-msgpack
5738 (package
5739 (name "python-msgpack")
aed625bd 5740 (version "0.4.8")
641c9871
LF
5741 (source (origin
5742 (method url-fetch)
ae831df4 5743 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5744 (sha256
5745 (base32
aed625bd 5746 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5747 (build-system python-build-system)
641c9871
LF
5748 (synopsis "MessagePack (de)serializer")
5749 (description "MessagePack is a fast, compact binary serialization format,
5750suitable for similar data to JSON. This package provides CPython bindings for
5751reading and writing MessagePack data.")
5752 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5753 (license license:asl2.0)
bd74be7b
LF
5754 (properties `((python2-variant . ,(delay python2-msgpack))))))
5755
5756(define-public python2-msgpack
5757 (package (inherit (package-with-python2
5758 (strip-python2-variant python-msgpack)))
5759 (native-inputs
5760 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 5761
6e5e39f4
CR
5762(define-public python-netaddr
5763 (package
5764 (name "python-netaddr")
5765 (version "0.7.18")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (string-append
5770 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5771 version
5772 ".tar.gz"))
5773 (sha256
5774 (base32
5775 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5776 (build-system python-build-system)
5777 (arguments `(#:tests? #f)) ;; No tests.
5778 (inputs
5779 `(("python-setuptools" ,python-setuptools)))
5780 (home-page "https://github.com/drkjam/netaddr/")
5781 (synopsis "Pythonic manipulation of network addresses")
5782 (description
5783 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5784and MAC network addresses.")
3f641af0 5785 (license license:bsd-3)))
6e5e39f4
CR
5786
5787(define-public python2-netaddr
5788 (package-with-python2 python-netaddr))
8c692a52
CR
5789
5790(define-public python-wrapt
5791 (package
5792 (name "python-wrapt")
5793 (version "1.10.5")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (string-append
5798 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5799 version
5800 ".tar.gz"))
5801 (sha256
5802 (base32
5803 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5804 (build-system python-build-system)
5805 (arguments
5806 ;; Tests are not included in the tarball, they are only available in the
5807 ;; git repository.
5808 `(#:tests? #f))
5809 (inputs
5810 `(("python-setuptools" ,python-setuptools)))
5811 (home-page "https://github.com/GrahamDumpleton/wrapt")
5812 (synopsis "Module for decorators, wrappers and monkey patching")
5813 (description
5814 "The aim of the wrapt module is to provide a transparent object proxy for
5815 Python, which can be used as the basis for the construction of function
5816 wrappers and decorator functions.")
3f641af0 5817 (license license:bsd-2)))
8c692a52
CR
5818
5819(define-public python2-wrapt
5820 (package-with-python2 python-wrapt))
b85c85be
CR
5821
5822(define-public python-iso8601
5823 (package
5824 (name "python-iso8601")
fe84bc9a 5825 (version "0.1.11")
b85c85be
CR
5826 (source
5827 (origin
5828 (method url-fetch)
fe84bc9a 5829 (uri (pypi-uri "iso8601" version))
b85c85be 5830 (sha256
fe84bc9a
EF
5831 (base32
5832 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
5833 (build-system python-build-system)
5834 (inputs
5835 `(("python-setuptools" ,python-setuptools)))
5836 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5837 (synopsis "Module to parse ISO 8601 dates")
5838 (description
5839 "This module parses the most common forms of ISO 8601 date strings (e.g.
5840@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5841 (license license:expat)))
5842
5843(define-public python2-iso8601
5844 (package-with-python2 python-iso8601))
5e412b63
CR
5845
5846(define-public python-monotonic
5847 (package
5848 (name "python-monotonic")
5849 (version "0.3")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (string-append
5854 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5855 version
5856 ".tar.gz"))
5857 (sha256
5858 (base32
5859 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5860 (build-system python-build-system)
5861 (inputs
5862 `(("python-setuptools" ,python-setuptools)))
5863 (home-page "https://github.com/atdt/monotonic")
5864 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5865 (description
5866 "This module provides a monotonic() function which returns the value (in
5867fractional seconds) of a clock which never goes backwards.")
3f641af0 5868 (license license:asl2.0)))
5e412b63
CR
5869
5870(define-public python2-monotonic
5871 (package-with-python2 python-monotonic))
de34afac
CR
5872
5873(define-public python-webob
5874 (package
5875 (name "python-webob")
b8834c21 5876 (version "1.5.1")
de34afac
CR
5877 (source
5878 (origin
5879 (method url-fetch)
b8834c21 5880 (uri (pypi-uri "WebOb" version))
de34afac
CR
5881 (sha256
5882 (base32
b8834c21 5883 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5884 (build-system python-build-system)
5885 (inputs
5886 `(("python-nose" ,python-nose)
5887 ("python-setuptools" ,python-setuptools)))
5888 (home-page "http://webob.org/")
5889 (synopsis "WSGI request and response object")
5890 (description
5891 "WebOb provides wrappers around the WSGI request environment, and an
5892object to help create WSGI responses.")
5893 (license license:expat)))
5894
5895(define-public python2-webob
5896 (package-with-python2 python-webob))
350ba0a3 5897
02a8a187
BW
5898(define-public python-xlrd
5899 (package
5900 (name "python-xlrd")
c2ad4d70 5901 (version "1.0.0")
02a8a187
BW
5902 (source (origin
5903 (method url-fetch)
e775f48e 5904 (uri (pypi-uri "xlrd" version))
02a8a187
BW
5905 (sha256
5906 (base32
c2ad4d70 5907 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
5908 (build-system python-build-system)
5909 (arguments
5910 `(#:phases
5911 (modify-phases %standard-phases
c2ad4d70 5912 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
5913 ;; run tests instead for now.
5914 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5915 (native-inputs `(("python-nose" ,python-nose)
5916 ("python-setuptools" ,python-setuptools)))
5917 (home-page "http://www.python-excel.org/")
5918 (synopsis "Library for extracting data from Excel files")
5919 (description "This packages provides a library to extract data from
c598e35c 5920spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
5921@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5922Unicode-aware. It is not intended as an end-user tool.")
3f641af0 5923 (license license:bsd-3)))
02a8a187
BW
5924
5925(define-public python2-xlrd
5926 (package-with-python2 python-xlrd))
5927
350ba0a3
CR
5928(define-public python-prettytable
5929 (package
5930 (name "python-prettytable")
5931 (version "0.7.2")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (string-append
5936 "https://pypi.python.org/packages/source/P/PrettyTable/"
5937 "prettytable-" version ".tar.bz2"))
5938 (sha256
5939 (base32
5940 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5941 (build-system python-build-system)
5942 (inputs
5943 `(("python-setuptools" ,python-setuptools)))
5944 (home-page "http://code.google.com/p/prettytable/")
5945 (synopsis "Display tabular data in an ASCII table format")
5946 (description
5947 "A library designed to represent tabular data in visually appealing ASCII
5948tables. PrettyTable allows for selection of which columns are to be printed,
5949independent alignment of columns (left or right justified or centred) and
5950printing of sub-tables by specifying a row range.")
3f641af0 5951 (license license:bsd-3)))
350ba0a3
CR
5952
5953(define-public python2-prettytable
5954 (package-with-python2 python-prettytable))
7a8ac75a 5955
9f8ee3fe
RW
5956(define-public python-tables
5957 (package
5958 (name "python-tables")
5959 (version "3.2.2")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (pypi-uri "tables" version))
5964 (sha256
5965 (base32
5966 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5967 (build-system python-build-system)
5968 (arguments
5969 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5970 ;; or "check", so we must override the build and check phases.
5971 #:phases
5972 (modify-phases %standard-phases
5973 (add-after 'unpack 'use-gcc
5974 (lambda _
5975 (substitute* "setup.py"
5976 (("compiler = new_compiler\\(\\)" line)
5977 (string-append line
5978 "\ncompiler.set_executables(compiler='gcc',"
5979 "compiler_so='gcc',"
5980 "linker_exe='gcc',"
5981 "linker_so='gcc -shared')")))
5982 #t))
5983 (replace 'build
5984 (lambda* (#:key inputs #:allow-other-keys)
5985 (zero? (system* "python" "setup.py" "build"
5986 (string-append "--hdf5="
5987 (assoc-ref inputs "hdf5"))))))
5988 (replace 'check
5989 (lambda* (#:key inputs #:allow-other-keys)
5990 (zero? (system* "python" "setup.py" "check"
5991 (string-append "--hdf5="
5992 (assoc-ref inputs "hdf5")))))))))
5993 (propagated-inputs
5994 `(("python-numexpr" ,python-numexpr)
5995 ("python-numpy" ,python-numpy)))
5996 (native-inputs
5997 `(("python-setuptools" ,python-setuptools)
5998 ("python-cython" ,python-cython)
5999 ("pkg-config" ,pkg-config)))
6000 (inputs
6001 `(("hdf5" ,hdf5)
6002 ("bzip2" ,bzip2)
6003 ("zlib" ,zlib)))
6004 (home-page "http://www.pytables.org/")
6005 (synopsis "Hierarchical datasets for Python")
6006 (description "PyTables is a package for managing hierarchical datasets and
6007designed to efficently cope with extremely large amounts of data.")
3f641af0 6008 (license license:bsd-3)))
9f8ee3fe
RW
6009
6010(define-public python2-tables
6011 (package-with-python2 python-tables))
6012
7a8ac75a
RW
6013(define-public python-pyasn1
6014 (package
6015 (name "python-pyasn1")
caa0edb3 6016 (version "0.1.9")
7a8ac75a
RW
6017 (source
6018 (origin
6019 (method url-fetch)
caa0edb3 6020 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6021 (sha256
6022 (base32
caa0edb3 6023 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6024 (build-system python-build-system)
6025 (home-page "http://pyasn1.sourceforge.net/")
6026 (synopsis "ASN.1 types and codecs")
6027 (description
6028 "This is an implementation of ASN.1 types and codecs in Python. It is
6029suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6030 (license license:bsd-2)))
7a8ac75a
RW
6031
6032(define-public python2-pyasn1
6033 (package-with-python2 python-pyasn1))
9a49a535 6034
5988c299
EF
6035(define-public python-pyasn1-modules
6036 (package
6037 (name "python-pyasn1-modules")
6038 (version "0.0.8")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "pyasn1-modules" version))
6043 (sha256
6044 (base32
6045 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6046 (build-system python-build-system)
6047 (native-inputs
6048 `(("python-setuptools" ,python-setuptools)))
6049 (propagated-inputs
6050 `(("python-pyasn1" ,python-pyasn1)))
6051 (home-page "http://sourceforge.net/projects/pyasn1/")
6052 (synopsis "ASN.1 codec implementations")
6053 (description
6054 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6055implementations of ASN.1-based codecs and protocols.")
3f641af0 6056 (license license:bsd-3)))
5988c299
EF
6057
6058(define-public python2-pyasn1-modules
6059 (package-with-python2 python-pyasn1-modules))
6060
520af157 6061(define-public python-ipaddress
9a49a535 6062 (package
520af157
DC
6063 (name "python-ipaddress")
6064 (version "1.0.16")
6065 (source (origin
6066 (method url-fetch)
6067 (uri (pypi-uri "ipaddress" version))
6068 (sha256
6069 (base32
6070 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6071 (build-system python-build-system)
9a49a535
RW
6072 (home-page "https://github.com/phihag/ipaddress")
6073 (synopsis "IP address manipulation library")
6074 (description
520af157
DC
6075 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6076 in Python. This library is used to create, poke at, and manipulate IPv4 and
6077 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6078 module to older versions of Python.")
6079 (license license:psfl)
6080 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6081
6082(define-public python2-ipaddress
6083 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6084 (package (inherit base)
6085 (native-inputs
6086 `(("python2-setuptools" ,python2-setuptools)
6087 ,@(package-native-inputs base))))))
3f00e078 6088
4a238186
HG
6089(define-public python2-ipaddr
6090 (package
6091 (name "python2-ipaddr")
6092 (version "2.1.11")
6093 (source
6094 (origin
6095 (method url-fetch)
6096 (uri (pypi-uri "ipaddr" version))
6097 (sha256
6098 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6099 (build-system python-build-system)
6100 (arguments
6101 `(#:python ,python-2 ;version 2 only
6102 #:phases
6103 (modify-phases %standard-phases
6104 (replace 'check
6105 (lambda* _
6106 (zero? (system* "python" "ipaddr_test.py")))))))
6107 (home-page "https://github.com/google/ipaddr-py")
6108 (synopsis "IP address manipulation library")
6109 (description
6110 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6111IPv6 addresses and networks.
6112
6113For new implementations you may prefer to use the standard module
6114@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6115versions of Python.")
3f641af0 6116 (license license:asl2.0)))
4a238186 6117
3f00e078
RW
6118(define-public python-idna
6119 (package
6120 (name "python-idna")
6121 (version "2.0")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (string-append "https://pypi.python.org/packages/source/i/"
6126 "idna/idna-" version ".tar.gz"))
6127 (sha256
6128 (base32
6129 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6130 (build-system python-build-system)
6131 (native-inputs
6132 `(("python-setuptools" ,python-setuptools)))
6133 (home-page "https://github.com/kjd/idna")
6134 (synopsis "Internationalized domain names in applications")
6135 (description
6136 "This is a library to support the Internationalised Domain Names in
6137Applications (IDNA) protocol as specified in RFC 5891. This version of the
6138protocol is often referred to as “IDNA2008” and can produce different results
6139from the earlier standard from 2003. The library is also intended to act as a
6140suitable drop-in replacement for the “encodings.idna” module that comes with
6141the Python standard library but currently only supports the older 2003
6142specification.")
3f641af0 6143 (license license:bsd-4)))
3f00e078
RW
6144
6145(define-public python2-idna
6146 (package-with-python2 python-idna))
36ebf972
RW
6147
6148(define-public python-pretend
6149 (package
6150 (name "python-pretend")
6151 (version "1.0.8")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri (string-append "https://pypi.python.org/packages/source/p/"
6156 "pretend/pretend-" version ".tar.gz"))
6157 (sha256
6158 (base32
6159 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6160 (build-system python-build-system)
6161 (native-inputs
6162 `(("python-setuptools" ,python-setuptools)))
6163 (home-page "https://github.com/alex/pretend")
6164 (synopsis "Library for stubbing in Python")
6165 (description
6166 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6167technique for writing tests. You may hear the term mixed up with mocks,
6168fakes, or doubles. Basically, a stub is an object that returns pre-canned
6169responses, rather than doing any computation.")
3f641af0 6170 (license license:bsd-3)))
36ebf972
RW
6171
6172(define-public python2-pretend
6173 (package-with-python2 python-pretend))
aa759a51
RW
6174
6175(define-public python-cryptography-vectors
6176 (package
6177 (name "python-cryptography-vectors")
9c509ca9 6178 (version "1.3.4")
aa759a51
RW
6179 (source
6180 (origin
6181 (method url-fetch)
9c509ca9 6182 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6183 (sha256
6184 (base32
9c509ca9 6185 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
6186 (build-system python-build-system)
6187 (native-inputs
6188 `(("python-setuptools" ,python-setuptools)))
6189 (home-page "https://github.com/pyca/cryptography")
66e07664 6190 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6191 (description
6192 "This package contains test vectors for the cryptography package.")
6193 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6194 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6195
6196(define-public python2-cryptography-vectors
6197 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6198
6199(define-public python-cryptography
6200 (package
6201 (name "python-cryptography")
9c509ca9 6202 (version "1.3.4")
88b47cb0
RW
6203 (source
6204 (origin
6205 (method url-fetch)
9c509ca9 6206 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6207 (sha256
6208 (base32
9c509ca9 6209 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0
RW
6210 (build-system python-build-system)
6211 (inputs
6212 `(("openssl" ,openssl)))
6213 (propagated-inputs
6214 `(("python-cffi" ,python-cffi)
6215 ("python-six" ,python-six)
6216 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6217 ("python-idna" ,python-idna)
6218 ("python-iso8601" ,python-iso8601)))
6219 (native-inputs
6220 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6221 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6222 ("python-setuptools" ,python-setuptools)
6223 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6224 ("python-pyasn1" ,python-pyasn1)
6225 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6226 ("python-pytest" ,python-pytest)))
6227 (home-page "https://github.com/pyca/cryptography")
6228 (synopsis "Cryptographic recipes and primitives for Python")
6229 (description
6230 "cryptography is a package which provides cryptographic recipes and
6231primitives to Python developers. It aims to be the “cryptographic standard
6232library” for Python. The package includes both high level recipes, and low
6233level interfaces to common cryptographic algorithms such as symmetric ciphers,
6234message digests and key derivation functions.")
6235 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6236 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6237 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6238
6239(define-public python2-cryptography
519e2f4f
LF
6240 (let ((crypto (package-with-python2
6241 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6242 (package (inherit crypto)
6243 (propagated-inputs
6244 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6245 ("python2-backport-ssl-match-hostname"
6246 ,python2-backport-ssl-match-hostname)
68f1cdec 6247 ("python2-enum34" ,python2-enum34)
88b47cb0 6248 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6249
6250(define-public python-pyopenssl
6251 (package
6252 (name "python-pyopenssl")
eb68d268 6253 (version "16.1.0")
5af999b8
RW
6254 (source
6255 (origin
6256 (method url-fetch)
eb68d268 6257 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6258 (sha256
6259 (base32
eb68d268 6260 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6261 (build-system python-build-system)
5af999b8
RW
6262 (propagated-inputs
6263 `(("python-cryptography" ,python-cryptography)
6264 ("python-six" ,python-six)))
6265 (inputs
6266 `(("openssl" ,openssl)))
6267 (native-inputs
6268 `(("python-setuptools" ,python-setuptools)))
6269 (home-page "https://github.com/pyca/pyopenssl")
6270 (synopsis "Python wrapper module around the OpenSSL library")
6271 (description
6272 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6273library.")
3f641af0 6274 (license license:asl2.0)))
5af999b8
RW
6275
6276(define-public python2-pyopenssl
519e2f4f 6277 (package-with-python2 python-pyopenssl))
643725a1
CR
6278
6279(define-public python-pip
6280 (package
6281 (name "python-pip")
6fb54e3b 6282 (version "8.0.2")
643725a1
CR
6283 (source
6284 (origin
6285 (method url-fetch)
6fb54e3b 6286 (uri (pypi-uri "pip" version))
643725a1
CR
6287 (sha256
6288 (base32
6fb54e3b 6289 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6290 (build-system python-build-system)
6291 (inputs
6292 `(("python-setuptools" ,python-setuptools)
6293 ("python-virtualenv" ,python-virtualenv)
6294 ;; Tests
6295 ("python-mock" ,python-mock)
6296 ("python-pytest" ,python-pytest)
6297 ("python-scripttest" ,python-scripttest)))
6298 (home-page "https://pip.pypa.io/")
6299 (synopsis
6300 "Package manager for Python software")
6301 (description
6302 "Pip is a package manager for Python software, that finds packages on the
6303Python Package Index (PyPI).")
6304 (license license:expat)))
6305
6306(define-public python2-pip
6307 (package-with-python2 python-pip))
d8c4998f
LC
6308
6309(define-public python-tlsh
6310 (package
6311 (name "python-tlsh")
99b00dc7 6312 (version "3.4.4")
d8c4998f
LC
6313 (home-page "https://github.com/trendmicro/tlsh")
6314 (source (origin
99b00dc7
EF
6315 (method url-fetch)
6316 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6317 version ".tar.gz"))
d8c4998f
LC
6318 (sha256
6319 (base32
99b00dc7
EF
6320 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6321 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6322 (build-system cmake-build-system)
6323 (arguments
6324 '(#:out-of-source? #f
6325 #:phases (modify-phases %standard-phases
6326 (replace
6327 'install
6328 (lambda* (#:key outputs #:allow-other-keys)
6329 ;; Build and install the Python bindings. The underlying
6330 ;; C++ library is apparently not meant to be installed.
6331 (let ((out (assoc-ref outputs "out")))
6332 (with-directory-excursion "py_ext"
6333 (and (system* "python" "setup.py" "build")
6334 (system* "python" "setup.py" "install"
6335 (string-append "--prefix=" out))))))))))
6336 (inputs `(("python" ,python-wrapper))) ;for the bindings
6337 (synopsis "Fuzzy matching library for Python")
6338 (description
6339 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6340Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6341value which can be used for similarity comparisons. Similar objects have
6342similar hash values, which allows for the detection of similar objects by
6343comparing their hash values. The byte stream should have a sufficient amount
6344of complexity; for example, a byte stream of identical bytes will not generate
6345a hash value.")
3f641af0 6346 (license license:asl2.0)))
d8c4998f
LC
6347
6348(define-public python2-tlsh
6349 (package
6350 (inherit python-tlsh)
6351 (name "python2-tlsh")
6352 (inputs `(("python" ,python-2)))))
d96034ed 6353
67f66812
BW
6354(define-public python-termcolor
6355 (package
6356 (name "python-termcolor")
6357 (version "1.1.0")
6358 (source
6359 (origin
6360 (method url-fetch)
6361 (uri (pypi-uri "python-termcolor" version))
6362 (sha256
6363 (base32
6364 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6365 (build-system python-build-system)
6366 (arguments
6367 ;; There are no tests.
6368 `(#:tests? #f))
6369 (home-page "http://pypi.python.org/pypi/termcolor")
6370 (synopsis "ANSII Color formatting for terminal output")
6371 (description
6372 "This package provides ANSII Color formatting for output in terminals.")
6373 (license license:expat)))
6374
6375(define-public python2-termcolor
6376 (package-with-python2 python-termcolor))
6377
d96034ed
LC
6378(define-public python-libarchive-c
6379 (package
6380 (name "python-libarchive-c")
03fd001c 6381 (version "2.2")
d96034ed
LC
6382 (source (origin
6383 (method url-fetch)
03fd001c 6384 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6385 (sha256
6386 (base32
03fd001c 6387 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6388 (build-system python-build-system)
6389 (arguments
6390 '(#:phases (modify-phases %standard-phases
6391 (add-before
6392 'build 'reference-libarchive
6393 (lambda* (#:key inputs #:allow-other-keys)
6394 ;; Retain the absolute file name of libarchive.so.
6395 (let ((libarchive (assoc-ref inputs "libarchive")))
6396 (substitute* "libarchive/ffi.py"
6397 (("find_library\\('archive'\\)")
6398 (string-append "'" libarchive
6399 "/lib/libarchive.so'"))))
6400
6401 ;; Do not make a compressed egg (see
6402 ;; <http://bugs.gnu.org/20765>).
6403 (let ((port (open-file "setup.cfg" "a")))
6404 (display "\n[easy_install]\nzip_ok = 0\n"
6405 port)
6406 (close-port port)
6407 #t))))))
6408 (inputs
6409 `(("python-setuptools" ,python-setuptools)
6410 ("libarchive" ,libarchive)))
6411 (home-page "https://github.com/Changaco/python-libarchive-c")
6412 (synopsis "Python interface to libarchive")
6413 (description
6414 "This package provides Python bindings to libarchive, a C library to
6415access possibly compressed archives in many different formats. It uses
6416Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6417 (license license:lgpl2.0+)))
d96034ed
LC
6418
6419(define-public python2-libarchive-c
6420 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6421
6422(define-public python-file
6423 (package
6424 (inherit file)
6425 (name "python-file")
6426 (build-system python-build-system)
6427 (arguments
6428 '(#:tests? #f ;no tests
6429 #:phases (modify-phases %standard-phases
6430 (add-before 'build 'change-directory
6431 (lambda _
6432 (chdir "python")
6433 #t))
6434 (add-before 'build 'set-library-file-name
6435 (lambda* (#:key inputs #:allow-other-keys)
6436 (let ((file (assoc-ref inputs "file")))
6437 (substitute* "magic.py"
6438 (("find_library\\('magic'\\)")
6439 (string-append "'" file "/lib/libmagic.so'")))
6440 #t))))))
6441 (inputs `(("file" ,file)))
6442 (self-native-input? #f)
daeeea71
CM
6443 (synopsis "Python bindings to the libmagic file type guesser. Note that
6444this module and the python-magic module both provide a \"magic.py\" file;
6445these two modules, which are different and were developed separately, both
6446serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6447
6448(define-public python2-file
6449 (package-with-python2 python-file))
85d4aeac
LC
6450
6451(define-public python-debian
6452 (package
6453 (name "python-debian")
6454 (version "0.1.23")
6455 (source
6456 (origin
6457 (method url-fetch)
6458 (uri (string-append
6459 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6460 version ".tar.gz"))
6461 (sha256
6462 (base32
6463 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6464 (build-system python-build-system)
6465 (inputs
6466 `(("python-six" ,python-six)))
6467 (native-inputs
6468 `(("python-setuptools" ,python-setuptools)))
6469 (home-page "http://packages.debian.org/sid/python-debian")
6470 (synopsis "Debian package related modules")
6471 (description
5c7bdc9a
LC
6472 ;; XXX: Use @enumerate instead of @itemize to work around
6473 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6474 "This package provides Python modules that abstract many formats of
6475Debian-related files, such as:
6476
5c7bdc9a 6477@enumerate
85d4aeac
LC
6478@item Debtags information;
6479@item @file{debian/changelog} files;
6480@item packages files, pdiffs;
6481@item control files of single or multiple RFC822-style paragraphs---e.g.
6482 @file{debian/control}, @file{.changes}, @file{.dsc};
6483@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6484 contained files and meta-information.
5c7bdc9a 6485@end enumerate\n")
85d4aeac
LC
6486
6487 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6488 (license license:gpl3+)))
85d4aeac
LC
6489
6490(define-public python2-debian
6491 (package-with-python2 python-debian))
816a6538
LC
6492
6493(define-public python-chardet
6494 (package
6495 (name "python-chardet")
6496 (version "2.3.0")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (string-append
6501 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6502 version
6503 ".tar.gz"))
6504 (sha256
6505 (base32
6506 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6507 (build-system python-build-system)
6508 (native-inputs
6509 `(("python-setuptools" ,python-setuptools)))
6510 (home-page "https://github.com/chardet/chardet")
6511 (synopsis "Universal encoding detector for Python 2 and 3")
6512 (description
6513 "This package provides @code{chardet}, a Python module that can
6514automatically detect a wide range of file encodings.")
3f641af0 6515 (license license:lgpl2.1+)))
816a6538
LC
6516
6517(define-public python2-chardet
6518 (package-with-python2 python-chardet))
2fc5f186 6519
1872f1bb
KM
6520(define-public python-docopt
6521 (package
6522 (name "python-docopt")
6523 (version "0.6.2")
6524 (source
6525 (origin
6526 (method url-fetch)
6527 ;; The release on PyPI does not include tests.
6528 (uri (string-append
6529 "https://github.com/docopt/docopt/archive/"
6530 version ".tar.gz"))
6531 (file-name (string-append name "-" version ".tar.gz"))
6532 (sha256
6533 (base32
6534 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6535 (build-system python-build-system)
6536 (native-inputs
6537 `(("python-pytest" ,python-pytest)
6538 ("python-setuptools" ,python-setuptools)))
6539 (arguments
6540 `(#:phases (alist-replace
6541 'check
6542 (lambda _ (zero? (system* "py.test")))
6543 %standard-phases)))
6544 (home-page "http://docopt.org")
6545 (synopsis "Command-line interface description language for Python")
6546 (description "This library allows the user to define a command-line
6547interface from a program's help message rather than specifying it
6548programatically with command-line parsers like @code{getopt} and
6549@code{argparse}.")
6550 (license license:expat)))
6551
6552(define-public python2-docopt
6553 (package-with-python2 python-docopt))
6554
2fc5f186
LF
6555(define-public python-zope-event
6556 (package
6557 (name "python-zope-event")
6558 (version "4.1.0")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (string-append "https://pypi.python.org/packages/source/z"
6563 "/zope.event/zope.event-" version ".tar.gz"))
6564 (sha256
6565 (base32
6566 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6567 (build-system python-build-system)
6568 (inputs
6569 `(("python-setuptools" ,python-setuptools)))
6570 (home-page "http://pypi.python.org/pypi/zope.event")
6571 (synopsis "Event publishing system for Python")
6572 (description "Zope.event provides an event publishing API, intended for
6573use by applications which are unaware of any subscribers to their events. It
6574is a simple event-dispatching system on which more sophisticated event
6575dispatching systems can be built.")
3f641af0 6576 (license license:zpl2.1)))
2fc5f186
LF
6577
6578(define-public python2-zope-event
6579 (package-with-python2 python-zope-event))
97abe268
LF
6580
6581(define-public python-zope-interface
6582 (package
6583 (name "python-zope-interface")
6584 (version "4.1.3")
6585 (source
6586 (origin
6587 (method url-fetch)
6588 (uri (string-append "https://pypi.python.org/packages/source/z"
6589 "/zope.interface/zope.interface-" version ".tar.gz"))
6590 (sha256
6591 (base32
6592 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6593 (build-system python-build-system)
6594 (propagated-inputs
6595 `(("python-zope-event" ,python-zope-event)))
6596 (home-page "https://github.com/zopefoundation/zope.interface")
6597 (synopsis "Python implementation of the \"design by contract\"
6598methodology")
6599 (description "Zope.interface provides an implementation of \"object
6600interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6601conforming to a given API or contract.")
3f641af0 6602 (license license:zpl2.1)))
97abe268
LF
6603
6604(define-public python2-zope-interface
6605 (package-with-python2 python-zope-interface))
81f2373c
LF
6606
6607(define-public python-zope-exceptions
6608 (package
6609 (name "python-zope-exceptions")
6610 (version "4.0.8")
6611 (source
6612 (origin
6613 (method url-fetch)
6614 (uri (string-append "https://pypi.python.org/packages/source/z"
6615 "/zope.exceptions/zope.exceptions-"
6616 version ".tar.gz"))
6617 (sha256
6618 (base32
6619 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6620 (build-system python-build-system)
6621 (arguments
6622 '(#:tests? #f)) ; circular dependency with zope.testrunner
6623 (propagated-inputs
6624 `(("python-zope-interface" ,python-zope-interface)))
6625 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6626 (synopsis "Zope exceptions")
6627 (description "Zope.exceptions provides general-purpose exception types
6628that have uses outside of the Zope framework.")
3f641af0 6629 (license license:zpl2.1)))
81f2373c
LF
6630
6631(define-public python2-zope-exceptions
6632 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6633
6634(define-public python-zope-testing
6635 (package
6636 (name "python-zope-testing")
6637 (version "4.5.0")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (string-append "https://pypi.python.org/packages/source/z"
6642 "/zope.testing/zope.testing-" version ".tar.gz"))
6643 (sha256
6644 (base32
b02f7a21
HG
6645 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
6646 (modules '((guix build utils)))
6647 (snippet
6648 '(begin
6649 ;; Remove pre-compiled .pyc files backup files from source.
6650 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
6651 #t))))
900e3c0e
LF
6652 (build-system python-build-system)
6653 (native-inputs
6654 `(("python-zope-exceptions" ,python-zope-exceptions)))
6655 (propagated-inputs
6656 `(("python-zope-interface" ,python-zope-interface)))
6657 (home-page "http://pypi.python.org/pypi/zope.testing")
6658 (synopsis "Zope testing helpers")
6659 (description "Zope.testing provides a number of testing utilities for HTML
6660forms, HTTP servers, regular expressions, and more.")
3f641af0 6661 (license license:zpl2.1)))
900e3c0e
LF
6662
6663(define-public python2-zope-testing
6664 (package-with-python2 python-zope-testing))
01614c4f
LF
6665
6666(define-public python-zope-testrunner
6667 (package
6668 (name "python-zope-testrunner")
6669 (version "4.4.9")
6670 (source
6671 (origin
6672 (method url-fetch)
6673 (uri (string-append "https://pypi.python.org/packages/source/z"
6674 "/zope.testrunner/zope.testrunner-"
6675 version ".zip"))
6676 (sha256
6677 (base32
6678 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6679 (build-system python-build-system)
6680 (native-inputs
6681 `(("python-six" ,python-six)
6682 ("python-zope-exceptions" ,python-zope-exceptions)
6683 ("python-zope-testing" ,python-zope-testing)
6684 ("unzip" ,unzip)))
6685 (propagated-inputs
6686 `(("python-zope-interface" ,python-zope-interface)))
6687 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6688 (synopsis "Zope testrunner script")
6689 (description "Zope.testrunner provides a script for running Python
6690tests.")
3f641af0 6691 (license license:zpl2.1)))
01614c4f
LF
6692
6693(define-public python2-zope-testrunner
6694 (let ((base (package-with-python2 python-zope-testrunner)))
6695 (package
6696 (inherit base)
6697 (native-inputs
6698 (append (package-native-inputs base)
6699 `(("python2-subunit" ,python2-subunit)
6700 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6701
6702(define-public python-zope-i18nmessageid
6703 (package
6704 (name "python-zope-i18nmessageid")
6705 (version "4.0.3")
6706 (source
6707 (origin
6708 (method url-fetch)
6709 (uri (string-append
6710 "https://pypi.python.org/packages/source/z"
6711 "/zope.i18nmessageid/zope.i18nmessageid-"
6712 version ".tar.gz"))
6713 (sha256
6714 (base32
6715 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6716 (build-system python-build-system)
6717 (inputs
6718 `(("python-setuptools" ,python-setuptools)))
6719 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6720 (synopsis "Message identifiers for internationalization")
6721 (description "Zope.i18nmessageid provides facilities for declaring
6722internationalized messages within program source text.")
3f641af0 6723 (license license:zpl2.1)))
6a5c710c
LF
6724
6725(define-public python2-zope-i18nmessageid
6726 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6727
6728(define-public python-zope-schema
6729 (package
6730 (name "python-zope-schema")
6731 (version "4.4.2")
6732 (source
6733 (origin
6734 (method url-fetch)
6735 (uri (string-append "https://pypi.python.org/packages/source/z"
6736 "/zope.schema/zope.schema-" version ".tar.gz"))
6737 (sha256
6738 (base32
6739 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6740 (build-system python-build-system)
6741 (propagated-inputs
6742 `(("python-zope-event" ,python-zope-event)
6743 ("python-zope-interface" ,python-zope-interface)))
6744 (native-inputs
6745 `(("python-zope-testing" ,python-zope-testing)))
6746 (home-page "http://pypi.python.org/pypi/zope.schema")
6747 (synopsis "Zope data schemas")
6748 (description "Zope.scheme provides extensions to zope.interface for
6749defining data schemas.")
3f641af0 6750 (license license:zpl2.1)))
71fb09f3
LF
6751
6752(define-public python2-zope-schema
6753 (package-with-python2 python-zope-schema))
fbac9b17
LF
6754
6755(define-public python-zope-configuration
6756 (package
6757 (name "python-zope-configuration")
6758 (version "4.0.3")
6759 (source (origin
6760 (method url-fetch)
6761 (uri (string-append "https://pypi.python.org/packages/source/z"
6762 "/zope.configuration/zope.configuration-"
6763 version ".tar.gz"))
6764 (sha256
6765 (base32
6766 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6767 (build-system python-build-system)
6768 (propagated-inputs
6769 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6770 ("python-zope-schema" ,python-zope-schema)))
6771 (home-page "http://pypi.python.org/pypi/zope.configuration")
6772 (synopsis "Zope Configuration Markup Language")
6773 (description "Zope.configuration implements ZCML, the Zope Configuration
6774Markup Language.")
3f641af0 6775 (license license:zpl2.1)))
fbac9b17
LF
6776
6777(define-public python2-zope-configuration
6778 (package-with-python2 python-zope-configuration))
2ad52086
LF
6779
6780(define-public python-zope-proxy
6781 (package
6782 (name "python-zope-proxy")
6783 (version "4.1.6")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (string-append "https://pypi.python.org/packages/source/z"
6788 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6789 (sha256
6790 (base32
6791 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6792 (build-system python-build-system)
6793 (propagated-inputs
6794 `(("python-zope-interface" ,python-zope-interface)))
6795 (home-page "http://pypi.python.org/pypi/zope.proxy")
6796 (synopsis "Generic, transparent proxies")
6797 (description "Zope.proxy provides generic, transparent proxies for Python.
6798Proxies are special objects which serve as mostly-transparent wrappers around
6799another object, intervening in the apparent behavior of the wrapped object
6800only when necessary to apply the policy (e.g., access checking, location
6801brokering, etc.) for which the proxy is responsible.")
3f641af0 6802 (license license:zpl2.1)))
2ad52086
LF
6803
6804(define-public python2-zope-proxy
6805 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6806
6807(define-public python-zope-location
6808 (package
6809 (name "python-zope-location")
6810 (version "4.0.3")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (string-append "https://pypi.python.org/packages/source/z"
6815 "/zope.location/zope.location-" version ".tar.gz"))
6816 (sha256
6817 (base32
6818 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6819 (build-system python-build-system)
6820 (native-inputs
6821 `(("python-zope-proxy" ,python-zope-proxy)
6822 ("python-zope-schema" ,python-zope-schema)))
6823 (home-page "http://pypi.python.org/pypi/zope.location/")
6824 (synopsis "Zope location library")
6825 (description "Zope.location implements the concept of \"locations\" in
6826Zope3, which are are special objects that have a structural location.")
3f641af0 6827 (license license:zpl2.1)))
f404b5ea
LF
6828
6829(define-public python2-zope-location
6830 (package-with-python2 python-zope-location))
d4b77f36
LF
6831
6832(define-public python-zope-security
6833 (package
6834 (name "python-zope-security")
6835 (version "4.0.3")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (string-append "https://pypi.python.org/packages/source/z"
6840 "/zope.security/zope.security-" version ".tar.gz"))
6841 (sha256
6842 (base32
6843 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6844 (build-system python-build-system)
6845 (propagated-inputs
6846 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6847 ("python-zope-component" ,python-zope-component)
6848 ("python-zope-location" ,python-zope-location)
6849 ("python-zope-proxy" ,python-zope-proxy)
6850 ("python-zope-schema" ,python-zope-schema)
6851 ("python-zope-testrunner" ,python-zope-testrunner)
6852 ("python-zope-testing" ,python-zope-testing)))
6853 (home-page "http://pypi.python.org/pypi/zope.security")
6854 (synopsis "Zope security framework")
6855 (description "Zope.security provides a generic mechanism to implement
6856security policies on Python objects.")
3f641af0 6857 (license license:zpl2.1)))
d4b77f36
LF
6858
6859(define-public python2-zope-security
04417662
EF
6860 (let ((zope-security (package-with-python2 python-zope-security)))
6861 (package (inherit zope-security)
6862 (propagated-inputs
6863 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6864 ,@(alist-delete
6865 "python-zope-testrunner"
6866 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6867
6868(define-public python-zope-component
6869 (package
6870 (name "python-zope-component")
6871 (version "4.2.2")
6872 (source
6873 (origin
6874 (method url-fetch)
6875 (uri (string-append "https://pypi.python.org/packages/source/z"
6876 "/zope.component/zope.component-" version ".tar.gz"))
6877 (sha256
6878 (base32
6879 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6880 (build-system python-build-system)
6881 (arguments
6882 ;; Skip tests due to circular dependency with python-zope-security.
6883 '(#:tests? #f))
6884 (native-inputs
6885 `(("python-zope-testing" ,python-zope-testing)))
6886 (propagated-inputs
6887 `(("python-zope-event" ,python-zope-event)
6888 ("python-zope-interface" ,python-zope-interface)
6889 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6890 ("python-zope-configuration" ,python-zope-configuration)))
6891 (home-page "https://github.com/zopefoundation/zope.component")
6892 (synopsis "Zope Component Architecture")
6893 (description "Zope.component represents the core of the Zope Component
6894Architecture. Together with the zope.interface package, it provides
6895facilities for defining, registering and looking up components.")
3f641af0 6896 (license license:zpl2.1)))
a6b61b27
LF
6897
6898(define-public python2-zope-component
6899 (package-with-python2 python-zope-component))
3859ac12 6900
1ae44b80 6901(define-public python-pythondialog
b5f218be 6902 (package
1ae44b80 6903 (name "python-pythondialog")
42c4b246 6904 (version "3.4.0")
b5f218be
LF
6905 (source
6906 (origin
6907 (method url-fetch)
1ae44b80 6908 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
6909 (sha256
6910 (base32
1ae44b80 6911 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
6912 (build-system python-build-system)
6913 (arguments
6914 `(#:phases
6915 (modify-phases %standard-phases
6916 (add-after 'unpack 'patch-path
6917 (lambda* (#:key inputs #:allow-other-keys)
6918 (let* ((dialog (assoc-ref inputs "dialog")))
6919 ;; Since this library really wants to grovel the search path, we
6920 ;; must hardcode dialog's store path into it.
6921 (substitute* "dialog.py"
6922 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6923 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6924 #t))))
b5f218be
LF
6925 #:tests? #f)) ; no test suite
6926 (propagated-inputs
6927 `(("dialog" ,dialog)))
6928 (home-page "http://pythondialog.sourceforge.net/")
6929 (synopsis "Python interface to the UNIX dialog utility")
6930 (description "A Python wrapper for the dialog utility. Its purpose is to
6931provide an easy to use, pythonic and comprehensive Python interface to dialog.
6932This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 6933 (license license:lgpl2.1)
1ae44b80
LF
6934 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6935
6936(define-public python2-pythondialog
6937 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6938 (package
6939 (inherit base)
6940 (version (package-version python-pythondialog))
6941 (source (origin
6942 (method url-fetch)
6943 (uri (pypi-uri "python2-pythondialog" version))
6944 (sha256
6945 (base32
6946 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 6947
3859ac12
LF
6948(define-public python-pyrfc3339
6949 (package
6950 (name "python-pyrfc3339")
d9aa097b 6951 (version "1.0")
3859ac12
LF
6952 (source
6953 (origin
6954 (method url-fetch)
d9aa097b 6955 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6956 (sha256
6957 (base32
d9aa097b 6958 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6959 (build-system python-build-system)
6960 (propagated-inputs
6961 `(("python-pytz" ,python-pytz)))
6962 (native-inputs
6963 `(("python-nose" ,python-nose)
6964 ("python-setuptools" ,python-setuptools)))
6965 (home-page "https://github.com/kurtraschke/pyRFC3339")
6966 (synopsis "Python timestamp library")
6967 (description "Python library for generating and parsing RFC 3339-compliant
6968timestamps.")
6969 (license license:expat)))
6970
6971(define-public python2-pyrfc3339
6972 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6973
6974(define-public python-werkzeug
6975 (package
6976 (name "python-werkzeug")
0580e383 6977 (version "0.11.11")
5eea2005
LF
6978 (source
6979 (origin
6980 (method url-fetch)
4b47cbfa 6981 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
6982 (sha256
6983 (base32
0580e383 6984 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
6985 (build-system python-build-system)
6986 (native-inputs
6987 `(("python-pytest" ,python-pytest)))
6988 (home-page "http://werkzeug.pocoo.org/")
6989 (synopsis "Utilities for WSGI applications")
6990 (description "One of the most advanced WSGI utility modules. It includes a
6991powerful debugger, full-featured request and response objects, HTTP utilities to
6992handle entity tags, cache control headers, HTTP dates, cookie handling, file
6993uploads, a powerful URL routing system and a bunch of community-contributed
6994addon modules.")
3f641af0 6995 (license license:x11)))
5eea2005
LF
6996
6997(define-public python2-werkzeug
6998 (package-with-python2 python-werkzeug))
99fffa8a
LF
6999
7000(define-public python-configobj
7001 (package
7002 (name "python-configobj")
7003 (version "5.0.6")
7004 (source (origin
7005 (method url-fetch)
7006 (uri (string-append
7007 "https://pypi.python.org/packages/source/c/configobj/"
7008 "configobj-" version ".tar.gz"))
7009 (sha256
7010 (base32
7011 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7012 ;; Patch setup.py so it looks for python-setuptools, which is
7013 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7014 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7015 (build-system python-build-system)
7016 (native-inputs
7017 `(("python-setuptools" ,python-setuptools)
7018 ("python-six" ,python-six)))
7019 (synopsis "Config file reading, writing and validation")
7020 (description "ConfigObj is a simple but powerful config file reader and
7021writer: an ini file round tripper. Its main feature is that it is very easy to
7022use, with a straightforward programmer’s interface and a simple syntax for
7023config files.")
7024 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7025 (license license:bsd-3)))
99fffa8a
LF
7026
7027(define-public python2-configobj
7028 (package-with-python2 python-configobj))
79e8a291
LF
7029
7030(define-public python-configargparse
7031 (package
7032 (name "python-configargparse")
7033 (version "0.10.0")
7034 (source (origin
7035 (method url-fetch)
7036 (uri (string-append
7037 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7038 "ConfigArgParse-" version ".tar.gz"))
7039 (sha256
7040 (base32
7041 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7042 (build-system python-build-system)
7043 (arguments
7044 ;; FIXME: Bug in test suite filed upstream:
7045 ;; https://github.com/bw2/ConfigArgParse/issues/32
7046 '(#:tests? #f))
7047 (synopsis "Replacement for argparse")
7048 (description "A drop-in replacement for argparse that allows options to also
7049be set via config files and/or environment variables.")
7050 (home-page "https://github.com/bw2/ConfigArgParse")
7051 (license license:expat)))
7052
7053(define-public python2-configargparse
7054 (package-with-python2 python-configargparse))
ab41f979
LF
7055
7056(define-public python-ndg-httpsclient
7057 (package
7058 (name "python-ndg-httpsclient")
7059 (version "0.4.0")
7060 (source (origin
7061 (method url-fetch)
7062 (uri (string-append
7063 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7064 "ndg_httpsclient-" version ".tar.gz"))
7065 (sha256
7066 (base32
7067 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7068 (build-system python-build-system)
7069 (propagated-inputs
7070 `(("python-pyopenssl" ,python-pyopenssl)))
7071 (synopsis "HTTPS support for Python's httplib and urllib2")
7072 (description "This is a HTTPS client implementation for httplib and urllib2
7073based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7074over the default provided with Python and importantly enables full verification
7075of the SSL peer.")
7076 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7077 (license license:bsd-3)))
ab41f979
LF
7078
7079;; python2-openssl requires special care, so package-with-python2 is
7080;; insufficient.
7081(define-public python2-ndg-httpsclient
7082 (package (inherit python-ndg-httpsclient)
7083 (name "python2-ndg-httpsclient")
7084 (arguments `(#:python ,python-2))
7085 (propagated-inputs
7086 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7087
7088(define-public python-contextlib2
7089 (package
7090 (name "python-contextlib2")
7091 (version "0.4.0")
7092 (source
7093 (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "contextlib2" version))
7096 (sha256
7097 (base32
7098 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7099 (build-system python-build-system)
7100 (arguments
7101 `(#:phases
7102 (modify-phases %standard-phases
7103 (replace 'check
7104 (lambda _ (zero?
7105 (system*
b3546174 7106 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7107 (home-page "http://contextlib2.readthedocs.org/")
7108 (synopsis "Tools for decorators and context managers")
7109 (description "This module is primarily a backport of the Python
71103.2 contextlib to earlier Python versions. Like contextlib, it
7111provides utilities for common tasks involving decorators and context
7112managers. It also contains additional features that are not part of
7113the standard library.")
3f641af0 7114 (license license:psfl)))
03f964a5
CM
7115
7116(define-public python2-contextlib2
7117 (package-with-python2 python-contextlib2))
210bf497
DT
7118
7119(define-public python-texttable
7120 (package
7121 (name "python-texttable")
7122 (version "0.8.4")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "texttable" version))
7127 (sha256
7128 (base32
7129 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7130 (build-system python-build-system)
7131 (arguments '(#:tests? #f)) ; no tests
7132 (home-page "https://github.com/foutaise/texttable/")
7133 (synopsis "Python module for creating simple ASCII tables")
7134 (description "Texttable is a Python module for creating simple ASCII
7135tables.")
3f641af0 7136 (license license:lgpl2.1+)))
210bf497
DT
7137
7138(define-public python2-texttable
7139 (package-with-python2 python-texttable))
67c52bb3
DT
7140
7141(define-public python-websocket-client
7142 (package
7143 (name "python-websocket-client")
6b810897 7144 (version "0.37.0")
67c52bb3
DT
7145 (source
7146 (origin
7147 (method url-fetch)
6b810897 7148 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7149 (sha256
7150 (base32
6b810897 7151 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7152 (build-system python-build-system)
7153 (native-inputs
7154 `(("python-six" ,python-six))) ; for tests
7155 (inputs
7156 `(("python-setuptools" ,python-setuptools)))
7157 (home-page "https://github.com/liris/websocket-client")
7158 (synopsis "WebSocket client for Python")
7159 (description "The Websocket-client module provides the low level APIs for
7160WebSocket usage in Python programs.")
3f641af0 7161 (license license:lgpl2.1+)))
67c52bb3
DT
7162
7163(define-public python2-websocket-client
7164 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7165
7166(define-public python-atomicwrites
7167 (package
7168 (name "python-atomicwrites")
4e92d76a 7169 (version "1.1.0")
5c6eea2a
LF
7170 (source (origin
7171 (method url-fetch)
7172 (uri (pypi-uri "atomicwrites" version))
7173 (sha256
7174 (base32
4e92d76a 7175 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7176 (build-system python-build-system)
7177 (synopsis "Atomic file writes in Python")
7178 (description "Library for atomic file writes using platform dependent tools
8f65585b 7179for atomic file system operations.")
5c6eea2a 7180 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7181 (license license:expat)
7182 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7183
7184(define-public python2-atomicwrites
7185 (package (inherit (package-with-python2
7186 (strip-python2-variant python-atomicwrites)))
7187 (native-inputs
7188 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7189
7190(define-public python-requests-toolbelt
7191 (package
7192 (name "python-requests-toolbelt")
c02af1c8 7193 (version "0.6.2")
561bb3cb
LF
7194 (source (origin
7195 (method url-fetch)
c02af1c8
LF
7196 (uri (string-append
7197 "https://pypi.python.org/packages/"
7198 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7199 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7200 (sha256
7201 (base32
c02af1c8 7202 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
7203 (build-system python-build-system)
7204 (propagated-inputs
7205 `(("python-requests" ,python-requests)))
7206 (synopsis "Extensions to python-requests")
7207 (description "This is a toolbelt of useful classes and functions to be used
7208with python-requests.")
7209 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7210 (license license:asl2.0)))
d1deb90b
LF
7211
7212(define-public python-click-threading
7213 (package
7214 (name "python-click-threading")
3d2e0dbc 7215 (version "0.2.0")
d1deb90b
LF
7216 (source (origin
7217 (method url-fetch)
3d2e0dbc
LF
7218 (uri (string-append
7219 "https://pypi.python.org/packages/"
7220 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7221 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7222 (sha256
7223 (base32
3d2e0dbc 7224 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7225 (build-system python-build-system)
7226 (propagated-inputs
7227 `(("python-click" ,python-click)))
7228 (synopsis "Utilities for multithreading in Click")
7229 (description "This package provides utilities for multithreading in Click
7230applications.")
7231 (home-page "https://github.com/click-contrib/click-threading")
7232 (license license:expat)))
7b17cab9
LF
7233
7234(define-public python-click-log
7235 (package
7236 (name "python-click-log")
a9da8fec 7237 (version "0.1.3")
7b17cab9
LF
7238 (source (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "click-log" version))
7241 (sha256
7242 (base32
a9da8fec 7243 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7244 (build-system python-build-system)
7245 (propagated-inputs
7246 `(("python-click" ,python-click)))
7247 (synopsis "Logging for click applications")
7248 (description "This package provides a Python library for logging Click
7249applications.")
7250 (home-page "https://github.com/click-contrib/click-log")
7251 (license license:expat)))
7b3a4ee4
LF
7252
7253(define-public python-apipkg
7254 (package
7255 (name "python-apipkg")
7256 (version "1.4")
7257 (source (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "apipkg" version))
7260 (sha256
7261 (base32
7262 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7263 (build-system python-build-system)
b43bab3c 7264 (inputs
7b3a4ee4
LF
7265 `(("python-pytest" ,python-pytest)))
7266 (synopsis "Namespace control and lazy-import mechanism")
7267 (description "With apipkg you can control the exported namespace of a Python
7268package and greatly reduce the number of imports for your users. It is a small
7269pure Python module that works on virtually all Python versions.")
7270 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7271 (license license:expat)
7272 (properties `((python2-variant . ,(delay python2-apipkg))))))
7273
7274(define-public python2-apipkg
7275 (package
7276 (inherit (package-with-python2
7277 (strip-python2-variant python-apipkg)))
7278 (native-inputs
7279 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7280
7281(define-public python-execnet
7282 (package
7283 (name "python-execnet")
7284 (version "1.4.1")
7285 (source (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "execnet" version))
7288 (sha256
7289 (base32
7290 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7291 (build-system python-build-system)
7292 (native-inputs
7293 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7294 (inputs
848964fe
LF
7295 `(("python-apipkg" ,python-apipkg)))
7296 (synopsis "Rapid multi-Python deployment")
7297 (description "Execnet provides a share-nothing model with
7298channel-send/receive communication for distributing execution across many
7299Python interpreters across version, platform and network barriers. It has a
7300minimal and fast API targetting the following uses:
7301@enumerate
7302@item distribute tasks to (many) local or remote CPUs
7303@item write and deploy hybrid multi-process applications
7304@item write scripts to administer multiple environments
7305@end enumerate")
7306 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7307 (license license:expat)
7308 (properties `((python2-variant . ,(delay python2-execnet))))))
7309
7310(define-public python2-execnet
7311 (let ((execnet (package-with-python2
7312 (strip-python2-variant python-execnet))))
7313 (package
7314 (inherit execnet)
7315 (native-inputs
7316 `(("python2-setuptools" ,python2-setuptools)
7317 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7318
7319;;; The software provided by this package was integrated into pytest 2.8.
7320(define-public python-pytest-cache
7321 (package
7322 (name "python-pytest-cache")
7323 (version "1.0")
7324 (source (origin
7325 (method url-fetch)
7326 (uri (pypi-uri "pytest-cache" version))
7327 (sha256
7328 (base32
7329 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7330 (build-system python-build-system)
630d938f
EF
7331 (inputs
7332 `(("python-apipkg" ,python-apipkg)
7333 ("python-execnet" ,python-execnet)
7334 ("python-py" ,python-py)
7335 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7336 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7337 (description "The pytest-cache plugin provides tools to rerun failures from
7338the last py.test invocation.")
7339 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7340 (license license:expat)
7341 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7342
7343(define-public python2-pytest-cache
7344 (let ((pytest-cache (package-with-python2
7345 (strip-python2-variant python-pytest-cache))))
7346 (package
7347 (inherit pytest-cache)
7348 (native-inputs
7349 `(("python2-setuptools" ,python2-setuptools)
7350 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7351
7352(define-public python-pytest-localserver
7353 (package
7354 (name "python-pytest-localserver")
29f20168 7355 (version "0.3.5")
d7e729fe
LF
7356 (source (origin
7357 (method url-fetch)
29f20168 7358 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7359 (sha256
7360 (base32
29f20168 7361 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7362 (build-system python-build-system)
7363 (arguments
7364 `(#:phases (modify-phases %standard-phases
7365 (replace 'check
7366 (lambda _
7367 (zero? (system* "py.test" "--genscript=runtests.py"))
7368 (zero? (system* "py.test")))))))
7369 (native-inputs
d7e729fe
LF
7370 `(("python-pytest" ,python-pytest)
7371 ("python-requests" ,python-requests)
9ba40f05
EF
7372 ("python-six" ,python-six)))
7373 (inputs
7374 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7375 (synopsis "Py.test plugin to test server connections locally")
7376 (description "Pytest-localserver is a plugin for the pytest testing
7377framework which enables you to test server connections locally.")
7378 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7379 (license license:expat)))
28cecbb7
LF
7380
7381(define-public python-wsgi-intercept
7382 (package
7383 (name "python-wsgi-intercept")
909fbd2b 7384 (version "1.2.2")
28cecbb7
LF
7385 (source (origin
7386 (method url-fetch)
909fbd2b
LF
7387 (uri (string-append
7388 "https://pypi.python.org/packages/"
7389 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7390 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7391 (sha256
7392 (base32
909fbd2b 7393 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7394 (build-system python-build-system)
7395 (native-inputs
9d813ec1
EF
7396 `(("python-pytest" ,python-pytest)
7397 ("python-six" ,python-six)))
28cecbb7
LF
7398 (propagated-inputs
7399 `(("python-httplib2" ,python-httplib2)
7400 ("python-requests" ,python-requests)))
7401 (synopsis "Puts a WSGI application in place of a real URI for testing")
7402 (description "Wsgi_intercept installs a WSGI application in place of a real
7403URI for testing. Testing a WSGI application normally involves starting a
7404server at a local host and port, then pointing your test code to that address.
7405Instead, this library lets you intercept calls to any specific host/port
7406combination and redirect them into a WSGI application importable by your test
7407program. Thus, you can avoid spawning multiple processes or threads to test
7408your Web app.")
7409 (home-page "https://github.com/cdent/wsgi-intercept")
7410 (license license:expat)))
89b8a551
LF
7411
7412(define-public python-pytest-xprocess
7413 (package
7414 (name "python-pytest-xprocess")
7415 (version "0.9.1")
7416 (source (origin
7417 (method url-fetch)
7418 (uri (pypi-uri "pytest-xprocess" version))
7419 (sha256
7420 (base32
7421 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7422 (build-system python-build-system)
7423 (propagated-inputs
7424 `(("python-pytest" ,python-pytest)
7425 ("python-pytest-cache" ,python-pytest-cache)
7426 ("python-psutil" ,python-psutil)))
7427 (synopsis "Pytest plugin to manage external processes across test runs")
7428 (description "Pytest-xprocess is an experimental py.test plugin for managing
7429processes across test runs.")
7430 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7431 (license license:expat)))
5c299bf0
LF
7432
7433(define-public python-icalendar
7434 (package
7435 (name "python-icalendar")
f2f53353 7436 (version "3.10")
5c299bf0
LF
7437 (source (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "icalendar" version))
7440 (sha256
7441 (base32
f2f53353 7442 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7443 (build-system python-build-system)
7444 (propagated-inputs
7445 `(("python-dateutil-2" ,python-dateutil-2)
7446 ("python-pytz" ,python-pytz)))
7447 (synopsis "Python library for parsing iCalendar files")
7448 (description "The icalendar package is a parser/generator of iCalendar
7449files for use with Python.")
7450 (home-page "https://github.com/collective/icalendar")
3f641af0 7451 (license license:bsd-2)))
6bbbb53e
LF
7452
7453(define-public python-sphinxcontrib-newsfeed
7454 (package
7455 (name "python-sphinxcontrib-newsfeed")
7456 (version "0.1.4")
7457 (source (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7460 (sha256
7461 (base32
7462 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7463 (build-system python-build-system)
7464 (propagated-inputs
7465 `(("python-docutils" ,python-docutils)
7466 ("python-sphinx" ,python-sphinx)))
7467 (synopsis "News Feed extension for Sphinx")
7468 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7469Blog, News or Announcements section to a Sphinx website.")
7470 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7471 (license license:bsd-2)))
2216e15c
SB
7472
7473(define-public python-args
7474 (package
7475 (name "python-args")
7476 (version "0.1.0")
7477 (source (origin
7478 (method url-fetch)
7479 (uri (pypi-uri "args" version))
7480 (sha256
7481 (base32
7482 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7483 (build-system python-build-system)
7484 (inputs
7485 `(("python-setuptools" ,python-setuptools)))
7486 (home-page "https://github.com/kennethreitz/args")
7487 (synopsis "Command-line argument parser")
7488 (description
7489 "This library provides a Python module to parse command-line arguments.")
3f641af0 7490 (license license:bsd-3)))
2216e15c
SB
7491
7492(define-public python2-args
7493 (package-with-python2 python-args))
c06a3de9
SB
7494
7495(define-public python-clint
7496 (package
7497 (name "python-clint")
7498 (version "0.5.1")
7499 (source (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "clint" version))
7502 (sha256
7503 (base32
7504 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7505 (build-system python-build-system)
7506 (inputs
7507 `(("python-args" ,python-args)
7508 ("python-setuptools" ,python-setuptools)))
7509 (home-page "https://github.com/kennethreitz/clint")
7510 (synopsis "Command-line interface tools")
7511 (description
7512 "Clint is a Python module filled with a set of tools for developing
7513command-line applications, including tools for colored and indented
7514output, progress bar display, and pipes.")
3f641af0 7515 (license license:isc)))
c06a3de9
SB
7516
7517(define-public python2-clint
7518 (package-with-python2 python-clint))
4ecdeef8
SB
7519
7520(define-public python-astor
7521 (package
7522 (name "python-astor")
7523 (version "0.5")
7524 (source (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "astor" version))
7527 (sha256
7528 (base32
7529 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7530 (build-system python-build-system)
7531 (inputs
7532 `(("python-setuptools" ,python-setuptools)))
7533 (home-page "https://github.com/berkerpeksag/astor")
7534 (synopsis "Read and write Python ASTs")
7535 (description
7536 "Astor is designed to allow easy manipulation of Python source via the
7537Abstract Syntax Tree.")
3f641af0 7538 (license license:bsd-3)))
4ecdeef8
SB
7539
7540(define-public python2-astor
7541 (package-with-python2 python-astor))
e224b7d0
SB
7542
7543(define-public python-rply
7544 (package
7545 (name "python-rply")
7546 (version "0.7.4")
7547 (source (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "rply" version))
7550 (sha256
7551 (base32
7552 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7553 (build-system python-build-system)
7554 (inputs
7555 `(("python-appdirs" ,python-appdirs)
7556 ("python-setuptools" ,python-setuptools)))
7557 (home-page "https://github.com/alex/rply")
7558 (synopsis "Parser generator for Python")
7559 (description
7560 "This package provides a pure Python based parser generator, that also
7561works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7562with a new public API, and RPython support.")
3f641af0 7563 (license license:bsd-3)))
e224b7d0
SB
7564
7565(define-public python2-rply
7566 (package-with-python2 python-rply))
c3e919d7
SB
7567
7568(define-public python-hy
7569 (package
7570 (name "python-hy")
7571 (version "0.11.1")
7572 (source (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "hy" version))
7575 (sha256
7576 (base32
7577 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7578 (build-system python-build-system)
7579 (inputs
7580 `(("python-astor" ,python-astor)
7581 ("python-clint" ,python-clint)
7582 ("python-rply" ,python-rply)
7583 ("python-setuptools" ,python-setuptools)))
7584 (home-page "http://hylang.org/")
7585 (synopsis "Lisp frontend to Python")
7586 (description
7587 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7588its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7589Python at your fingertips, in Lisp form.")
7590 (license license:expat)))
7591
7592(define-public python2-hy
7593 (package-with-python2 python-hy))
7a5b944e 7594
81f7f297
EF
7595(define-public python-rauth
7596 (package
7597 (name "python-rauth")
7598 (version "0.7.2")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "rauth" version))
7603 (sha256
7604 (base32
7605 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7606 (build-system python-build-system)
7607 (arguments
7608 `(#:test-target "check"))
0848d8d3 7609 (inputs
81f7f297
EF
7610 `(("python-requests" ,python-requests)))
7611 (home-page "https://github.com/litl/rauth")
7612 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7613 (description
7614 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7615provides service wrappers for convenient connection initialization and
7616authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7617 (license license:expat)
7618 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7619
7620(define-public python2-rauth
0848d8d3
EF
7621 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7622 (package
7623 (inherit base)
7624 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7625 ("python2-unittest2" ,python2-unittest2)
7626 ,@(package-native-inputs base))))))
81f7f297 7627
1abe448d
EF
7628(define-public python2-functools32
7629 (package
7630 (name "python2-functools32")
7631 (version "3.2.3-2")
7632 (source
7633 (origin
7634 (method url-fetch)
7635 (uri (pypi-uri "functools32" version))
7636 (sha256
7637 (base32
7638 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7639 (build-system python-build-system)
7640 (arguments
7641 `(#:python ,python-2
7642 #:tests? #f)) ; no test target
7643 (native-inputs
7644 `(("python2-setuptools" ,python2-setuptools)))
7645 (home-page "https://github.com/MiCHiLU/python-functools32")
7646 (synopsis
7647 "Backport of the functools module from Python 3.2.3")
7648 (description
7649 "This package is a backport of the @code{functools} module from Python
76503.2.3 for use with older versions of Python and PyPy.")
7651 (license license:expat)))
7652
877889f3 7653(define-public python2-futures
7a5b944e 7654 (package
877889f3 7655 (name "python2-futures")
7a5b944e
EF
7656 (version "3.0.3")
7657 (source
7658 (origin
7659 (method url-fetch)
7660 (uri (pypi-uri "futures" version))
7661 (sha256
7662 (base32
7663 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7664 (build-system python-build-system)
877889f3 7665 (arguments `(#:python ,python-2))
7a5b944e 7666 (native-inputs
877889f3 7667 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7668 (home-page "https://github.com/agronholm/pythonfutures")
7669 (synopsis
7670 "Backport of the concurrent.futures package from Python 3.2")
7671 (description
7672 "The concurrent.futures module provides a high-level interface for
7673asynchronously executing callables. This package backports the
7674concurrent.futures package from Python 3.2")
3f641af0 7675 (license license:bsd-3)))
7a5b944e 7676
5cb2fe44
EF
7677(define-public python-promise
7678 (package
7679 (name "python-promise")
7680 (version "0.4.2")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "promise" version))
7685 (sha256
7686 (base32
7687 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7688 (build-system python-build-system)
7689 ;; Tests wants python-futures, which is a python2 only program, and
7690 ;; can't be found by python-promise at test time.
7691 (arguments `(#:tests? #f))
7692 (home-page "https://github.com/syrusakbary/promise")
7693 (synopsis "Promises/A+ implementation for Python")
7694 (description
7695 "Promises/A+ implementation for Python")
7696 (properties `((python2-variant . ,(delay python2-promise))))
7697 (license license:expat)))
7698
7699(define-public python2-promise
7700 (let ((promise (package-with-python2
7701 (strip-python2-variant python-promise))))
7702 (package (inherit promise)
7703 (arguments (substitute-keyword-arguments (package-arguments promise)
7704 ((#:tests? _) #t)))
7705 (native-inputs
7706 `(("python2-futures" ,python2-futures)
7707 ("python2-pytest" ,python2-pytest)
7708 ("python2-setuptools" ,python2-setuptools)
7709 ,@(package-native-inputs promise))))))
7710
c18f6368
EF
7711(define-public python-urllib3
7712 (package
7713 (name "python-urllib3")
7714 (version "1.13.1")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "urllib3" version))
7719 (sha256
7720 (base32
7721 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7722 (build-system python-build-system)
7723 (arguments `(#:tests? #f))
7724 (native-inputs
7725 `(("python-setuptools" ,python-setuptools)
7726 ;; some packages for tests
7727 ("python-nose" ,python-nose)
7728 ("python-mock" ,python-mock)
7729 ("python-tornado" ,python-tornado)))
7730 (propagated-inputs
7731 `(;; packages for https security
7732 ("python-certifi" ,python-certifi)
7733 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7734 ("python-pyasn1" ,python-pyasn1)
7735 ("python-pyopenssl" ,python-pyopenssl)))
7736 (home-page "http://urllib3.readthedocs.org/")
7737 (synopsis "HTTP library with thread-safe connection pooling")
7738 (description
7739 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7740can reuse the same socket connection for multiple requests, it can POST files,
7741supports url redirection and retries, and also gzip and deflate decoding.")
7742 (license license:expat)))
7743
7744(define-public python2-urllib3
7745 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7746
7747(define-public python-colorama
7748 (package
7749 (name "python-colorama")
7750 (version "0.3.3")
7751 (source
7752 (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "colorama" version))
7755 (sha256
7756 (base32
7757 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7758 (build-system python-build-system)
7759 (inputs
7760 `(("python-setuptools" ,python-setuptools)))
7761 (synopsis "colored terminal text rendering for Python")
7762 (description "Colorama is a Python library for rendering colored terminal
7763text.")
7764 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 7765 (license license:bsd-3)))
2b2f2fc1
DT
7766
7767(define-public python2-colorama
7768 (package-with-python2 python-colorama))
f5bcec6e
DT
7769
7770(define-public python-rsa
7771 (package
7772 (name "python-rsa")
ecd68c53 7773 (version "3.4.2")
f5bcec6e
DT
7774 (source
7775 (origin
7776 (method url-fetch)
7777 (uri (pypi-uri "rsa" version))
7778 (sha256
7779 (base32
ecd68c53 7780 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
7781 (build-system python-build-system)
7782 (inputs
7783 `(("python-pyasn1" ,python-pyasn1)
7784 ("python-setuptools" ,python-setuptools)))
7785 (synopsis "Pure-Python RSA implementation")
7786 (description "Python-RSA is a pure-Python RSA implementation. It supports
7787encryption and decryption, signing and verifying signatures, and key
7788generation according to PKCS#1 version 1.5. It can be used as a Python
7789library as well as on the command line.")
7790 (home-page "http://stuvel.eu/rsa")
3f641af0 7791 (license license:asl2.0)))
f5bcec6e
DT
7792
7793(define-public python2-rsa
7794 (package-with-python2 python-rsa))
c0aacfa5
DT
7795
7796(define-public python-pluggy
7797 (package
7798 (name "python-pluggy")
7799 (version "0.3.1")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "pluggy" version))
7804 (sha256
7805 (base32
7806 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7807 (build-system python-build-system)
7808 (inputs
7809 `(("python-setuptools" ,python-setuptools)))
7810 (synopsis "Plugin and hook calling mechanism for Python")
7811 (description "Pluggy is an extraction of the plugin manager as used by
7812Pytest but stripped of Pytest specific details.")
7813 (home-page "https://pypi.python.org/pypi/pluggy")
7814 (license license:expat)))
7815
7816(define-public python2-pluggy
7817 (package-with-python2 python-pluggy))
a4af21ca
DT
7818
7819(define-public python-tox
7820 (package
7821 (name "python-tox")
7822 (version "2.3.1")
7823 (source
7824 (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "tox" version))
7827 (sha256
7828 (base32
7829 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7830 (build-system python-build-system)
7831 (arguments
7832 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7833 ;; pytest breaks other packages.
7834 '(#:tests? #f))
7835 (inputs
7836 `(("python-setuptools" ,python-setuptools)
7837 ("python-pluggy" ,python-pluggy)
7838 ("python-py" ,python-py)
7839 ("python-virtualenv" ,python-virtualenv)
7840 ("python-pytest" ,python-pytest)))
7841 (home-page "http://tox.testrun.org/")
7842 (synopsis "Virtualenv-based automation of test activities")
7843 (description "Tox is a generic virtualenv management and test command line
7844tool. It can be used to check that a package installs correctly with
7845different Python versions and interpreters, or run tests in each type of
7846supported environment, or act as a frontend to continuous integration
7847servers.")
7848 (license license:expat)))
7849
7850(define-public python2-tox
7851 (package-with-python2 python-tox))
ba9da248
DT
7852
7853(define-public python-jmespath
7854 (package
7855 (name "python-jmespath")
7856 (version "0.9.0")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "jmespath" version))
7861 (sha256
7862 (base32
7863 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7864 (build-system python-build-system)
7865 (inputs
7866 `(("python-setuptools" ,python-setuptools)))
7867 (synopsis "JSON Matching Expressions")
7868 (description "JMESPath (pronounced “james path”) is a Python library that
7869allows one to declaratively specify how to extract elements from a JSON
7870document.")
7871 (home-page "https://github.com/jmespath/jmespath.py")
7872 (license license:expat)))
7873
7874(define-public python2-jmespath
7875 (package-with-python2 python-jmespath))
935fcd5c
DT
7876
7877(define-public python-botocore
7878 (package
7879 (name "python-botocore")
e09f952d 7880 (version "1.4.62")
935fcd5c
DT
7881 (source
7882 (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "botocore" version))
7885 (sha256
7886 (base32
e09f952d 7887 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
7888 (build-system python-build-system)
7889 (inputs
7890 `(("python-dateutil" ,python-dateutil-2)
7891 ("python-docutils" ,python-docutils)
7892 ("python-mock" ,python-mock)
7893 ("python-nose" ,python-nose)
7894 ("python-setuptools" ,python-setuptools)
7895 ("python-tox" ,python-tox)
7896 ("python-wheel" ,python-wheel)
7897 ("python-jmespath" ,python-jmespath)))
7898 (home-page "https://github.com/boto/botocore")
7899 (synopsis "Low-level interface to AWS")
7900 (description "Botocore is a Python library that provides a low-level
7901interface to the Amazon Web Services (AWS) API.")
3f641af0 7902 (license license:asl2.0)))
935fcd5c
DT
7903
7904(define-public python2-botocore
7905 (package-with-python2 python-botocore))
f861b8b8
DT
7906
7907(define-public awscli
7908 (package
7909 (name "awscli")
d5ccf71e 7910 (version "1.11.5")
f861b8b8
DT
7911 (source
7912 (origin
7913 (method url-fetch)
d5ccf71e 7914 (uri (pypi-uri name version))
f861b8b8
DT
7915 (sha256
7916 (base32
d5ccf71e 7917 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
7918 (build-system python-build-system)
7919 (inputs
7920 `(("python-colorama" ,python-colorama)
7921 ("python-docutils" ,python-docutils)
7922 ("python-mock" ,python-mock)
7923 ("python-nose" ,python-nose)
7924 ("python-rsa" ,python-rsa)
7925 ("python-setuptools" ,python-setuptools)
7926 ("python-sphinx" ,python-sphinx)
7927 ("python-tox" ,python-tox)
7928 ("python-wheel" ,python-wheel)
d5ccf71e
LF
7929 ("python-botocore" ,python-botocore)
7930 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
7931 (home-page "http://aws.amazon.com/cli/")
7932 (synopsis "Command line client for AWS")
7933 (description "AWS CLI provides a unified command line interface to the
7934Amazon Web Services (AWS) API.")
3f641af0 7935 (license license:asl2.0)))
6a44697d
LF
7936
7937(define-public python-hypothesis
7938 (package
7939 (name "python-hypothesis")
bea6d94d 7940 (version "3.1.0")
6a44697d
LF
7941 (source (origin
7942 (method url-fetch)
7943 (uri (pypi-uri "hypothesis" version))
7944 (sha256
7945 (base32
bea6d94d 7946 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 7947 (build-system python-build-system)
6a44697d
LF
7948 (propagated-inputs
7949 `(("python-flake8" ,python-flake8)
7950 ("python-pytest" ,python-pytest)))
7951 (synopsis "Library for property based testing")
7952 (description "Hypothesis is a library for testing your Python code against a
7953much larger range of examples than you would ever want to write by hand. It’s
7954based on the Haskell library, Quickcheck, and is designed to integrate
7955seamlessly into your existing Python unit testing work flow.")
7956 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 7957 (license license:mpl2.0)
6f068e08 7958 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
7959
7960(define-public python2-hypothesis
6f068e08
EF
7961 (let ((hypothesis (package-with-python2
7962 (strip-python2-variant python-hypothesis))))
7963 (package (inherit hypothesis)
7964 (native-inputs
7965 `(("python2-enum34" ,python2-enum34)
7966 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
7967
7968(define-public python-pytest-subtesthack
7969 (package
7970 (name "python-pytest-subtesthack")
7971 (version "0.1.1")
7972 (source (origin
7973 (method url-fetch)
7974 (uri (pypi-uri "pytest-subtesthack" version))
7975 (sha256
7976 (base32
7977 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7978 (build-system python-build-system)
7979 (native-inputs
7980 `(;; setuptools required for python-2 variant
7981 ("python-setuptools" ,python-setuptools)))
7982 (propagated-inputs
7983 `(("python-pytest" ,python-pytest)))
7984 (synopsis "Set-up and tear-down fixtures for unit tests")
7985 (description "This plugin allows you to set up and tear down fixtures within
7986unit test functions that use @code{py.test}. This is useful for using
7987@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7988function multiple times, without setting up or tearing down fixture state as is
7989normally the case.")
7990 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 7991 (license license:unlicense)))
7517e73c
LF
7992
7993(define-public python2-pytest-subtesthack
7994 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
7995
7996(define-public python2-xdo
7997 (package
7998 (name "python2-xdo")
7999 (version "0.2")
8000 (source (origin
8001 (method url-fetch)
8002 (uri (string-append
8003 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8004 "python-xdo_" version ".orig.tar.gz"))
8005 (sha256
8006 (base32
8007 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8008 (build-system python-build-system)
8009 (arguments
8010 `(#:python ,python-2
8011 #:tests? #f)) ; no tests provided
8012 (inputs
8013 `(("xdotool" ,xdotool)
8014 ("libX11" ,libx11)))
8015 (home-page "https://tracker.debian.org/pkg/python-xdo")
8016 (synopsis "Python library for simulating X11 keyboard/mouse input")
8017 (description "Provides bindings to libxdo for manipulating X11 via simulated
8018input. (Note that this is mostly a legacy library; you may wish to look at
8019python-xdo for newer bindings.)")
3f641af0 8020 (license license:bsd-3)))
0bdc1671 8021
cb34dc6c
CAW
8022(define-public python-wtforms
8023 (package
8024 (name "python-wtforms")
8025 (version "2.1")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (pypi-uri "WTForms" version ".zip"))
8030 (sha256
8031 (base32
8032 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8033 (build-system python-build-system)
8034 (native-inputs
8035 `(("unzip" ,unzip)))
8036 (home-page "http://wtforms.simplecodes.com/")
8037 (synopsis
8038 "Form validation and rendering library for Python web development")
8039 (description
8040 "WTForms is a flexible forms validation and rendering library
8041for Python web development. It is very similar to the web form API
8042available in Django, but is a standalone package.")
3f641af0 8043 (license license:bsd-3)
cb34dc6c
CAW
8044 (properties `((python2-variant . ,(delay python2-wtforms))))))
8045
8046(define-public python2-wtforms
8047 (package
8048 (inherit (package-with-python2
8049 (strip-python2-variant python-wtforms)))
8050 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8051
8052(define-public python-mako
8053 (package
8054 (name "python-mako")
8055 (version "1.0.3")
8056 (source
8057 (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "Mako" version))
8060 (sha256
8061 (base32
8062 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8063 (build-system python-build-system)
8064 (native-inputs
8065 `(("python-markupsafe" ,python-markupsafe)
8066 ("python-mock" ,python-mock)
8067 ("python-nose" ,python-nose)))
8068 (home-page "http://www.makotemplates.org/")
8069 (synopsis "Templating language for Python")
8070 (description "Mako is a templating language for Python that compiles
8071templates into Python modules.")
8072 (license license:expat)
8073 (properties `((python2-variant . ,(delay python2-mako))))))
8074
8075(define-public python2-mako
8076 (let ((base (package-with-python2
8077 (strip-python2-variant python-mako))))
8078 (package
8079 (inherit base)
8080 (native-inputs
8081 (cons `("python2-setuptools" ,python2-setuptools)
8082 (package-native-inputs base))))))
ae00a41f
CAW
8083
8084(define-public python-waitress
8085 (package
8086 (name "python-waitress")
8087 (version "0.8.10")
8088 (source
8089 (origin
8090 (method url-fetch)
8091 (uri (pypi-uri "waitress" version))
8092 (sha256
8093 (base32
8094 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8095 (build-system python-build-system)
8096 (home-page "https://github.com/Pylons/waitress")
8097 (synopsis "Waitress WSGI server")
8098 (description "Waitress is meant to be a production-quality pure-Python WSGI
8099server with very acceptable performance.")
3f641af0 8100 (license license:zpl2.1)
ae00a41f
CAW
8101 (properties `((python2-variant . ,(delay python2-waitress))))))
8102
8103(define-public python2-waitress
8104 (package
8105 (inherit (package-with-python2
8106 (strip-python2-variant python-waitress)))
8107 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8108
8109(define-public python-wsgiproxy2
8110 (package
8111 (name "python-wsgiproxy2")
8112 (version "0.4.2")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8117 (sha256
8118 (base32
8119 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8120 (build-system python-build-system)
8121 (native-inputs
8122 `(("unzip" ,unzip)
8123 ("python-nose" ,python-nose)
8124 ("python-coverage" ,python-coverage)))
8125 (propagated-inputs
8126 `(("python-six" ,python-six)
8127 ("python-webob" ,python-webob)))
8128 (home-page
8129 "https://github.com/gawel/WSGIProxy2/")
8130 (synopsis "WSGI Proxy with various http client backends")
8131 (description "WSGI turns HTTP requests into WSGI function calls.
8132WSGIProxy turns WSGI function calls into HTTP requests.
8133It also includes code to sign requests and pass private data,
8134and to spawn subprocesses to handle requests.")
8135 (license license:expat)
8136 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8137
8138(define-public python2-wsgiproxy2
8139 (let ((wsgiproxy2 (package-with-python2
8140 (strip-python2-variant python-wsgiproxy2))))
8141 (package
8142 (inherit wsgiproxy2)
8143 (inputs `(("python2-setuptools" ,python2-setuptools)
8144 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8145
8146(define-public python-pastedeploy
8147 (package
8148 (name "python-pastedeploy")
8149 (version "1.5.2")
8150 (source
8151 (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "PasteDeploy" version))
8154 (sha256
8155 (base32
8156 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8157 (build-system python-build-system)
8158 (native-inputs
8159 `(("python-nose" ,python-nose)))
8160 (propagated-inputs
8161 ;; This package uses pkg_resources, part of setuptools, during runtime,
8162 ;; hence why not a native-input.
8163 `(("python-setuptools" ,python-setuptools)))
8164 (home-page "http://pythonpaste.org/deploy/")
8165 (synopsis
8166 "Load, configure, and compose WSGI applications and servers")
8167 (description
8168 "This tool provides code to load WSGI applications and servers from URIs;
8169these URIs can refer to Python Eggs for INI-style configuration files. Paste
8170Script provides commands to serve applications based on this configuration
8171file.")
8172 (license license:expat)))
8173
8174(define-public python2-pastedeploy
8175 (package-with-python2 python-pastedeploy))
1cf53652 8176
c4a7904c
CAW
8177(define-public python-paste
8178 (package
8179 (name "python-paste")
8180 (version "2.0.2")
8181 (source
8182 (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "Paste" version))
8185 (sha256
8186 (base32
8187 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8188 (patches (search-patches "python-paste-remove-website-test.patch"
8189 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8190 (build-system python-build-system)
8191 (native-inputs
8192 `(("python-nose" ,python-nose)))
8193 (propagated-inputs
8194 `(;; Uses pkg_resources provided by setuptools internally.
8195 ("python-setuptools" ,python-setuptools)
8196 ("python-six" ,python-six)))
8197 (arguments
8198 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8199 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8200 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8201 ;; still... things should be better by the next Paste release.)
8202 #:tests? #f))
8203 (home-page "http://pythonpaste.org")
8204 (synopsis
8205 "Python web development tools, focusing on WSGI")
8206 (description
8207 "Paste provides a variety of web development tools and middleware which
8208can be nested together to build web applications. Paste's design closely
8209follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8210 (license license:expat)
8211 (properties `((python2-variant . ,(delay python2-paste))))))
8212
8213(define-public python2-paste
8214 (let ((paste (package-with-python2
8215 (strip-python2-variant python-paste))))
8216 (package
8217 (inherit paste)
8218 (arguments
8219 ;; Tests are back for Python 2!
8220 `(#:tests? #t
8221 ,@(package-arguments paste))))))
8222
a8f20f63
CAW
8223(define-public python-pastescript
8224 (package
8225 (name "python-pastescript")
8226 (version "2.0.2")
8227 (source
8228 (origin
8229 (method url-fetch)
8230 (uri (pypi-uri "PasteScript" version))
8231 (sha256
8232 (base32
8233 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8234 (build-system python-build-system)
8235 (native-inputs
8236 `(("python-nose" ,python-nose)))
8237 (propagated-inputs
8238 `(;; Uses pkg_resources provided by setuptools internally.
8239 ("python-setuptools" ,python-setuptools)
8240 ("python-paste" ,python-paste)
8241 ("python-pastedeploy" ,python-pastedeploy)))
8242 (home-page "http://pythonpaste.org/script/")
8243 (arguments
8244 '(;; Unfortunately, this requires the latest unittest2,
8245 ;; but that requires traceback2 which requires linecache2 which requires
8246 ;; unittest2. So we're skipping tests for now.
8247 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8248 ;; so in theory we could get around this situation somehow.)
8249 #:tests? #f))
8250 (synopsis
8251 "Pluggable command line tool for serving web applications and more")
8252 (description
8253 "PasteScript is a plugin-friendly command line tool which provides a
8254variety of features, from launching web applications to bootstrapping project
8255layouts.")
8256 (license license:expat)))
8257
8258(define-public python2-pastescript
8259 (package-with-python2 python-pastescript))
8260
1cf53652
CAW
8261(define-public python-pyquery
8262 (package
8263 (name "python-pyquery")
aab76e80 8264 (version "1.2.13")
1cf53652
CAW
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "pyquery" version))
8269 (sha256
8270 (base32
aab76e80 8271 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652
CAW
8272 (build-system python-build-system)
8273 (propagated-inputs
8274 `(("python-lxml" ,python-lxml)
8275 ("python-cssselect" ,python-cssselect)))
8276 (home-page "https://github.com/gawel/pyquery")
8277 (synopsis "Make jQuery-like queries on xml documents")
8278 (description "pyquery allows you to make jQuery queries on xml documents.
8279The API is as much as possible the similar to jQuery. pyquery uses lxml for
8280fast xml and html manipulation.")
3f641af0 8281 (license license:bsd-3)
1cf53652
CAW
8282 (properties `((python2-variant . ,(delay python2-pyquery))))))
8283
8284(define-public python2-pyquery
8285 (let ((pyquery (package-with-python2
8286 (strip-python2-variant python-pyquery))))
8287 (package
8288 (inherit pyquery)
8289 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
aa6313d6
CAW
8290
8291(define-public python-webtest
8292 (package
8293 (name "python-webtest")
8294 (version "2.0.20")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "WebTest" version))
8299 (sha256
8300 (base32
8301 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8302 (build-system python-build-system)
8303 (arguments
8304 `(;; Unfortunately we have to disable tests!
8305 ;; This release of WebTest is pinned to python-nose < 1.3,
8306 ;; but older versions of python-nose are plagued with the following
8307 ;; bug(s), which rears its ugly head during test execution:
8308 ;; https://github.com/nose-devs/nose/issues/759
8309 ;; https://github.com/nose-devs/nose/pull/811
8310 #:tests? #f))
8311 ;; Commented out code is no good, but in this case, once tests
8312 ;; are ready to be enabled again, we should put the following
8313 ;; in place:
8314 ;; (native-inputs
8315 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8316 ;; ; but see above comment
8317 ;; ("python-coverage" ,python-coverage)
8318 ;; ("python-mock" ,python-mock)
8319 ;; ("python-pastedeploy" ,python-pastedeploy)
8320 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8321 ;; ("python-pyquery" ,python-pyquery)))
8322 (propagated-inputs
8323 `(("python-waitress" ,python-waitress)
8324 ("python-webob" ,python-webob)
8325 ("python-six" ,python-six)
8326 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8327 (home-page "http://webtest.pythonpaste.org/")
8328 (synopsis "Helper to test WSGI applications")
8329 (description "Webtest allows you to test your Python web applications
8330without starting an HTTP server. It supports anything that supports the
8331minimum of WSGI.")
8332 (license license:expat)
8333 (properties `((python2-variant . ,(delay python2-webtest))))))
8334
8335(define-public python2-webtest
8336 (let ((webtest (package-with-python2
8337 (strip-python2-variant python-webtest))))
8338 (package
8339 (inherit webtest)
8340 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8341 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8342
8343(define-public python-anyjson
8344 (package
8345 (name "python-anyjson")
8346 (version "0.3.3")
8347 (source
8348 (origin
8349 (method url-fetch)
8350 (uri (pypi-uri "anyjson" version))
8351 (sha256
8352 (base32
8353 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8354 (build-system python-build-system)
8355 (arguments
8356 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8357 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8358 ;; whatever) so this transformation needs to be done before the tests
8359 ;; can be run. Maybe we could add a build step to transform beforehand
8360 ;; but it could be annoying/difficult.
8361 ;; We can enable tests for the Python 2 version, though, and do below.
8362 #:tests? #f))
8363 (home-page "http://bitbucket.org/runeh/anyjson/")
8364 (synopsis
8365 "Wraps best available JSON implementation in a common interface")
8366 (description
8367 "Anyjson loads whichever is the fastest JSON module installed
8368and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8369 (license license:bsd-3)
4cb122cd
CAW
8370 (properties `((python2-variant . ,(delay python2-anyjson))))))
8371
8372(define-public python2-anyjson
8373 (let ((anyjson (package-with-python2
8374 (strip-python2-variant python-anyjson))))
8375 (package
8376 (inherit anyjson)
8377 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8378 #:tests? #t
8379 ,@(package-arguments anyjson)))
8380 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8381 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8382
8383(define-public python-amqp
8384 (package
8385 (name "python-amqp")
8386 (version "1.4.9")
8387 (source
8388 (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "amqp" version))
8391 (sha256
8392 (base32
8393 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8394 (build-system python-build-system)
8395 (native-inputs
8396 `(("python-nose" ,python-nose)
8397 ("python-mock" ,python-mock)))
8398 (home-page "http://github.com/celery/py-amqp")
8399 (synopsis
8400 "Low-level AMQP client for Python (fork of amqplib)")
8401 (description
8402 "This is a fork of amqplib which was originally written by Barry Pederson.
8403It is maintained by the Celery project, and used by kombu as a pure python
8404alternative when librabbitmq is not available.")
3f641af0 8405 (license license:lgpl2.1+)
8dfceab7
CAW
8406 (properties `((python2-variant . ,(delay python2-amqp))))))
8407
8408(define-public python2-amqp
8409 (let ((amqp (package-with-python2
8410 (strip-python2-variant python-amqp))))
8411 (package
8412 (inherit amqp)
8413 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8414 ;; unmaintained. Weirdly, does not do this on the python 3
8415 ;; version?
8416 #:tests? #f
8417 ,@(package-arguments amqp)))
8418 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8419 ,@(package-native-inputs amqp))))))
7d387305
CAW
8420
8421(define-public python-kombu
8422 (package
8423 (name "python-kombu")
8424 (version "3.0.33")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "kombu" version))
8429 (sha256
8430 (base32
8431 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8432 (build-system python-build-system)
8433 (native-inputs
8434 `(("python-mock" ,python-mock)
8435 ("python-nose" ,python-nose)))
8436 (propagated-inputs
8437 `(("python-anyjson" ,python-anyjson)
8438 ("python-amqp" ,python-amqp)))
8439 (home-page "http://kombu.readthedocs.org")
8440 (synopsis "Message passing library for Python")
8441 (description "The aim of Kombu is to make messaging in Python as easy as
8442possible by providing an idiomatic high-level interface for the AMQ protocol,
8443and also provide proven and tested solutions to common messaging problems.
8444AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8445message orientation, queuing, routing, reliability and security, for which the
8446RabbitMQ messaging server is the most popular implementation.")
3f641af0 8447 (license license:bsd-3)
7d387305
CAW
8448 (properties `((python2-variant . ,(delay python2-kombu))))))
8449
8450(define-public python2-kombu
8451 (let ((kombu (package-with-python2
8452 (strip-python2-variant python-kombu))))
8453 (package
8454 (inherit kombu)
8455 (inputs `(("python2-setuptools" ,python2-setuptools)
8456 ("python2-unittest2" ,python2-unittest2)
8457 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8458
8459(define-public python-billiard
8460 (package
8461 (name "python-billiard")
8462 (version "3.3.0.22")
8463 (source
8464 (origin
8465 (method url-fetch)
8466 (uri (pypi-uri "billiard" version))
8467 (sha256
8468 (base32
8469 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8470 (build-system python-build-system)
8471 (native-inputs
8472 `(("python-nose" ,python-nose)))
8473 (home-page "http://github.com/celery/billiard")
8474 (synopsis
8475 "Python multiprocessing fork with improvements and bugfixes")
8476 (description
8477 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8478multiprocessing package itself is a renamed and updated version of R Oudkerk's
8479pyprocessing package. This standalone variant is intended to be compatible with
8480Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8481 (license license:bsd-3)
b6f0b9fb
CAW
8482 (properties `((python2-variant . ,(delay python2-billiard))))))
8483
8484(define-public python2-billiard
8485 (let ((billiard (package-with-python2
8486 (strip-python2-variant python-billiard))))
8487 (package
8488 (inherit billiard)
8489 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8490 ("python2-unittest2" ,python2-unittest2)
8491 ("python2-mock" ,python2-mock)
8492 ,@(package-native-inputs billiard))))))
22df6419
CAW
8493
8494(define-public python-celery
8495 (package
8496 (name "python-celery")
8497 (version "3.1.20")
8498 (source
8499 (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "celery" version))
8502 (sha256
8503 (base32
8504 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8505 (build-system python-build-system)
8506 (native-inputs
8507 `(("python-nose" ,python-nose)))
a64cbb6f 8508 (inputs
22df6419 8509 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8510 ("python-amqp" ,python-amqp)
8511 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8512 ("python-billiard" ,python-billiard)
8513 ("python-kombu" ,python-kombu)))
8514 (home-page "http://celeryproject.org")
8515 (synopsis "Distributed Task Queue")
8516 (description "Celery is an asynchronous task queue/job queue based on
8517distributed message passing. It is focused on real-time operation, but
8518supports scheduling as well. The execution units, called tasks, are executed
8519concurrently on a single or more worker servers using multiprocessing,
8520Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8521synchronously (wait until ready).")
3f641af0 8522 (license license:bsd-3)
22df6419
CAW
8523 (properties `((python2-variant . ,(delay python2-celery))))))
8524
8525(define-public python2-celery
8526 (let ((celery (package-with-python2
8527 (strip-python2-variant python-celery))))
8528 (package
8529 (inherit celery)
8530 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8531 ("python2-unittest2" ,python2-unittest2)
8532 ("python2-mock" ,python2-mock)
8533 ,@(package-native-inputs celery))))))
97e32948
CAW
8534
8535(define-public python-translitcodec
8536 (package
8537 (name "python-translitcodec")
8538 (version "0.4.0")
8539 (source
8540 (origin
8541 (method url-fetch)
8542 (uri (pypi-uri "translitcodec" version))
8543 (sha256
8544 (base32
8545 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8546 (build-system python-build-system)
8547 (arguments
8548 `(#:tests? #f)) ; no tests provided
8549 (home-page
8550 "https://github.com/claudep/translitcodec")
8551 (synopsis
8552 "Unicode to 8-bit charset transliteration codec")
8553 (description
8554 "This package contains codecs for transliterating ISO 10646 texts into
8555best-effort representations using smaller coded character sets (ASCII,
8556ISO 8859, etc.).")
8557 (license license:expat)
8558 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8559
8560(define-public python2-translitcodec
8561 (package
8562 (inherit (package-with-python2
8563 (strip-python2-variant python-translitcodec)))
8564 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8565
8566(define-public python-editor
8567 (package
8568 (name "python-editor")
8569 (version "0.5")
8570 (source
8571 (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "python-editor" version))
8574 (sha256
8575 (base32
8576 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8577 (build-system python-build-system)
8578 (home-page
8579 "https://github.com/fmoo/python-editor")
8580 (synopsis
8581 "Programmatically open an editor, capture the result")
8582 (description
8583 "python-editor is a library that provides the editor module for
8584programmatically interfacing with your system's $EDITOR.")
3f641af0 8585 (license license:asl2.0)
0c3b90d4
CAW
8586 (properties `((python2-variant . ,(delay python2-editor))))))
8587
8588(define-public python2-editor
8589 (package
8590 (inherit (package-with-python2
8591 (strip-python2-variant python-editor)))
8592 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8593
8594(define-public python-sphinxcontrib-programoutput
8595 (package
8596 (name "python-sphinxcontrib-programoutput")
8597 (version "0.8")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8601 (sha256
8602 (base32
8603 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8604 (build-system python-build-system)
8605 (propagated-inputs
8606 `(("python-docutils" ,python-docutils)
8607 ("python-sphinx" ,python-sphinx)))
8608 (synopsis "Sphinx extension to include program output")
8609 (description "A Sphinx extension to literally insert the output of arbitrary
8610commands into documents, helping you to keep your command examples up to date.")
8611 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8612 (license license:bsd-2)
3276517c
LF
8613 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8614
8615(define-public python2-sphinxcontrib-programoutput
8616 (package
8617 (inherit (package-with-python2
8618 (strip-python2-variant python-sphinxcontrib-programoutput)))
8619 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8620
8621(define-public python-sphinx-repoze-autointerface
8622 (package
8623 (name "python-sphinx-repoze-autointerface")
328ae341 8624 (version "0.8")
548d7165
LF
8625 (source (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8628 (sha256
8629 (base32
328ae341 8630 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8631 (build-system python-build-system)
8632 (propagated-inputs
8633 `(("python-docutils" ,python-docutils)
8634 ("python-sphinx" ,python-sphinx)
8635 ("python-zope-interface" ,python-zope-interface)))
8636 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8637 (description "This package defines an extension for the Sphinx documentation
8638system. The extension allows generation of API documentation by
8639introspection of @code{zope.interface} instances in code.")
8640 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8641 (license license:repoze)))
548d7165
LF
8642
8643(define-public python2-sphinx-repoze-autointerface
8644 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8645
8646(define-public python-psycopg2
8647 (package
8648 (name "python-psycopg2")
8649 (version "2.6.1")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri (pypi-uri "psycopg2" version))
8654 (sha256
8655 (base32
8656 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8657 (build-system python-build-system)
8658 (arguments
8659 ;; Tests would require a postgresql database "psycopg2_test"
8660 ;; and a running postgresql database management service.
8661 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8662 (inputs
8663 `(("postgresql" ,postgresql))) ; libpq
8664 (home-page "http://initd.org/psycopg/")
8665 (synopsis "Python PostgreSQL adapter")
8666 (description
8667 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 8668 (license license:lgpl3+)
b31fbea5
DM
8669 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8670
8671(define-public python2-psycopg2
8672 (package
8673 (inherit (package-with-python2
8674 (strip-python2-variant python-psycopg2)))
8675 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8676
8677(define-public python-vobject
8678 (package
8679 (name "python-vobject")
9bed9b15 8680 (version "0.9.2")
eed1a61f
LF
8681 (source (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "vobject" version))
8684 (sha256
8685 (base32
9bed9b15 8686 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
8687 (build-system python-build-system)
8688 (inputs
8689 `(("python-dateutil-2" ,python-dateutil-2)
8690 ("python-pyicu" ,python-pyicu)))
8691 (synopsis "Parse and generate vCard and vCalendar files")
8692 (description "Vobject is intended to be a full featured Python package for
8693parsing and generating vCard and vCalendar files. Currently, iCalendar files
8694are supported and well tested. vCard 3.0 files are supported, and all data
8695should be imported, but only a few components are understood in a sophisticated
8696way.")
8697 (home-page "http://eventable.github.io/vobject/")
3f641af0 8698 (license license:asl2.0)
eed1a61f
LF
8699 (properties `((python2-variant . ,(delay python2-vobject))))))
8700
8701(define-public python2-vobject
8702 (package
8703 (inherit (package-with-python2
8704 (strip-python2-variant python-vobject)))
8705 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8706
8707(define-public python-munkres
8708 (package
8709 (name "python-munkres")
8710 (version "1.0.7")
8711 (source (origin
8712 (method url-fetch)
8713 (uri (pypi-uri "munkres" version))
8714 (sha256
8715 (base32
8716 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8717 (build-system python-build-system)
8718 (arguments
8719 '(#:tests? #f)) ; no test suite
8720 (home-page "http://software.clapper.org/munkres/")
8721 (synopsis "Implementation of the Munkres algorithm")
8722 (description "The Munkres module provides an implementation of the Munkres
8723algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8724useful for solving the Assignment Problem.")
3f641af0 8725 (license license:bsd-3)))
cedac813
LF
8726
8727(define-public python2-munkres
8728 (package-with-python2 python-munkres))
f3b3d78f
LF
8729
8730(define-public python-flask
8731 (package
8732 (name "python-flask")
8733 (version "0.10.1")
8734 (source (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "Flask" version))
8737 (sha256
8738 (base32
8739 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8740 (build-system python-build-system)
8741 (propagated-inputs
8742 `(("python-itsdangerous" ,python-itsdangerous)
8743 ("python-jinja2" ,python-jinja2)
8744 ("python-werkzeug" ,python-werkzeug)))
8745 (home-page "https://github.com/mitsuhiko/flask/")
8746 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8747 (description "Flask is a micro web framework based on the Werkzeug toolkit
8748and Jinja2 template engine. It is called a micro framework because it does not
8749presume or force a developer to use a particular tool or library.")
3f641af0 8750 (license license:bsd-3)
f3b3d78f
LF
8751 (properties `((python2-variant . ,(delay python2-flask))))))
8752
8753(define-public python2-flask
8754 (package (inherit (package-with-python2
8755 (strip-python2-variant python-flask)))
8756 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8757
8758(define-public python-cookies
8759 (package
8760 (name "python-cookies")
8761 (version "2.2.1")
8762 (source (origin
8763 (method url-fetch)
8764 (uri (pypi-uri "cookies" version))
8765 (sha256
8766 (base32
8767 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8768 (build-system python-build-system)
8769 (arguments
8770 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8771 #:tests? #f))
8772 (native-inputs
8773 `(("python-pytest" ,python2-pytest)))
8774 (synopsis "HTTP cookie parser and renderer")
8775 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8776Python.")
8777 (home-page "https://gitlab.com/sashahart/cookies")
8778 (license license:expat)
8779 (properties `((python2-variant . ,(delay python2-cookies))))))
8780
8781(define-public python2-cookies
8782 (let ((cookies (package-with-python2
8783 (strip-python2-variant python-cookies))))
8784 (package (inherit cookies)
8785 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8786 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8787
8788(define-public python-responses
8789 (package
8790 (name "python-responses")
8791 (version "0.5.1")
8792 (source (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "responses" version))
8795 (sha256
8796 (base32
8797 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8798 (build-system python-build-system)
8799 (arguments
8800 `(;; Test suite is not distributed:
8801 ;; https://github.com/getsentry/responses/issues/38
8802 #:tests? #f))
8803 (native-inputs
8804 `(("python-cookies" ,python-cookies)
8805 ("python-mock" ,python-mock)))
8806 (propagated-inputs
8807 `(("python-requests" ,python-requests)
8808 ("python-six" ,python-six)))
8809 (home-page "https://github.com/getsentry/responses")
8810 (synopsis "Utility for mocking out the `requests` Python library")
8811 (description "A utility library for mocking out the `requests` Python
8812library.")
3f641af0 8813 (license license:asl2.0)
0efde7d6
LF
8814 (properties `((python2-variant . ,(delay python2-responses))))))
8815
8816(define-public python2-responses
8817 (let ((responses (package-with-python2
8818 (strip-python2-variant python-responses))))
8819 (package (inherit responses)
8820 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8821 ,@(package-native-inputs responses))))))
76b94885 8822
b7afd018
RW
8823(define-public python-whoosh
8824 (package
8825 (name "python-whoosh")
8826 (version "2.7.4")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "Whoosh" version))
8831 (sha256
8832 (base32
8833 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8834 (build-system python-build-system)
8835 (native-inputs
8836 `(("python-setuptools" ,python-setuptools)
8837 ("python-pytest" ,python-pytest)))
8838 (home-page "http://bitbucket.org/mchaput/whoosh")
8839 (synopsis "Full text indexing, search, and spell checking library")
8840 (description
8841 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8842checking library.")
8843 (license license:bsd-2)))
8844
8845(define-public python2-whoosh
8846 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8847 (package (inherit whoosh)
8848 (propagated-inputs
8849 `(("python2-backport-ssl-match-hostname"
8850 ,python2-backport-ssl-match-hostname)
8851 ,@(package-propagated-inputs whoosh))))))
8852
76b94885
LF
8853(define-public python-pathlib
8854 (package
8855 (name "python-pathlib")
8856 (version "1.0.1")
8857 (source (origin
8858 (method url-fetch)
8859 (uri (pypi-uri "pathlib" version))
8860 (sha256
8861 (base32
8862 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8863 (build-system python-build-system)
92a312dc
RW
8864 ;; The tests depend on the internal "test" module, which does not provide
8865 ;; a stable interface.
8866 (arguments `(#:tests? #f))
76b94885 8867 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
8868 (synopsis "Object-oriented file system paths")
8869 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
8870It offers the following advantages over using string objects:
8871
8872@enumerate
8873@item No more cumbersome use of os and os.path functions. Everything can
8874be done easily through operators, attribute accesses, and method calls.
8875@item Embodies the semantics of different path types. For example,
8876comparing Windows paths ignores casing.
8877@item Well-defined semantics, eliminating any inconsistencies or
8878ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
8879@end enumerate
8880
8881Note: In Python 3.4, pathlib is now part of the standard library. For other
8882Python versions please consider python-pathlib2 instead, which tracks the
8883standard library module. This module (python-pathlib) isn't maintained
8884anymore.")
76b94885
LF
8885 (license license:expat)))
8886
8887(define-public python2-pathlib
8888 (package-with-python2 python-pathlib))
25a7db0a 8889
b7703c81
HG
8890(define-public python2-pathlib2
8891 (package
8892 (name "python2-pathlib2")
8893 (version "2.1.0")
8894 (source (origin
8895 (method url-fetch)
8896 (uri (pypi-uri "pathlib2" version))
8897 (sha256
8898 (base32
8899 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
8900 (build-system python-build-system)
49a531f5
HG
8901 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8902 ;; version is 3.4 which already includes this package as part of the
8903 ;; standard library.
b7703c81
HG
8904 (arguments
8905 `(#:python ,python-2))
8906 (native-inputs
8907 `(("python2-setuptools" ,python2-setuptools)
8908 ("python2-six" ,python2-six)))
8909 (home-page "http://pypi.python.org/pypi/pathlib2/")
8910 (synopsis "Object-oriented file system paths - backport of standard
8911pathlib module")
8912 (description "The goal of pathlib2 is to provide a backport of standard
8913pathlib module which tracks the standard library module, so all the newest
8914features of the standard pathlib can be used also on older Python versions.
8915
8916Pathlib offers a set of classes to handle file system paths. It offers the
8917following advantages over using string objects:
8918
8919@enumerate
8920@item No more cumbersome use of os and os.path functions. Everything can
8921be done easily through operators, attribute accesses, and method calls.
8922@item Embodies the semantics of different path types. For example,
8923comparing Windows paths ignores casing.
8924@item Well-defined semantics, eliminating any inconsistencies or
8925ambiguities (forward vs. backward slashes, etc.).
8926@end enumerate")
8927 (license license:expat)))
8928
25a7db0a
LF
8929(define-public python-jellyfish
8930 (package
8931 (name "python-jellyfish")
8932 (version "0.5.3")
8933 (source (origin
8934 (method url-fetch)
8935 (uri (pypi-uri "jellyfish" version))
8936 (sha256
8937 (base32
8938 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8939 (build-system python-build-system)
8940 (native-inputs
8941 `(("python-pytest" ,python-pytest)))
8942 (home-page "https://github.com/jamesturk/jellyfish")
8943 (synopsis "Approximate and phonetic matching of strings")
8944 (description "Jellyfish uses a variety of string comparison and phonetic
8945encoding algorithms to do fuzzy string matching.")
3f641af0 8946 (license license:bsd-2)
25a7db0a
LF
8947 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8948
8949(define-public python2-jellyfish
8950 (let ((jellyfish (package-with-python2
8951 (strip-python2-variant python-jellyfish))))
8952 (package (inherit jellyfish)
8953 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8954 ("python2-unicodecsv" ,python2-unicodecsv)
8955 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
8956
8957(define-public python2-unicodecsv
8958 (package
8959 (name "python2-unicodecsv")
8960 (version "0.14.1")
8961 (source (origin
8962 (method url-fetch)
8963 ;; The test suite is not included in the PyPi release.
8964 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8965 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8966 "archive/" version ".tar.gz"))
8967 (file-name (string-append name "-" version ".tar.gz"))
8968 (sha256
8969 (base32
8970 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8971 (build-system python-build-system)
8972 (arguments
8973 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8974 #:python ,python-2))
8975 (native-inputs
8976 `(("python2-setuptools" ,python2-setuptools)
8977 ("python2-unittest2" ,python2-unittest2)))
8978 (home-page "https://github.com/jdunck/python-unicodecsv")
8979 (synopsis "Unicode CSV module for Python 2")
8980 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8981module, adding support for Unicode strings.")
3f641af0 8982 (license license:bsd-2)))
064503aa
LF
8983
8984(define-public python-rarfile
8985 (package
8986 (name "python-rarfile")
8987 (version "2.7")
8988 (source (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "rarfile" version))
8991 (sha256
8992 (base32
8993 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8994 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 8995 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
8996 (build-system python-build-system)
8997 (arguments
8998 '(#:phases
8999 (modify-phases %standard-phases
9000 (replace 'check
9001 ;; Many tests fail, but the installation proceeds.
9002 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9003 (native-inputs
9004 `(("which" ,which))) ; required for tests
9005 (propagated-inputs
9006 `(("libarchive" ,libarchive)))
9007 (home-page "https://github.com/markokr/rarfile")
9008 (synopsis "RAR archive reader for Python")
9009 (description "This is Python module for RAR archive reading. The interface
9010is made as zipfile like as possible.")
3f641af0 9011 (license license:isc)))
064503aa
LF
9012
9013(define-public python2-rarfile
9014 (package-with-python2 python-rarfile))
daeeea71
CM
9015
9016(define-public python-magic
9017 (package
9018 (name "python-magic")
9019 (version "0.4.3")
9020 (source
9021 (origin
9022 (method url-fetch)
9023 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9024 version ".tar.gz"))
9025 (sha256
9026 (base32
9027 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9028 (file-name (string-append name "-" version "-checkout"))))
9029 (build-system python-build-system)
9030 (arguments
9031 ;; The tests are unreliable, so don't run them. The tests fail
9032 ;; under Python3 because they were written for Python2 and
9033 ;; contain import statements that do not work in Python3. One of
9034 ;; the tests fails under Python2 because its assertions are
9035 ;; overly stringent; it relies on comparing output strings which
9036 ;; are brittle and can change depending on the version of
9037 ;; libmagic being used and the system on which the test is
9038 ;; running. In my case, under GuixSD 0.10.0, only one test
9039 ;; failed, and it seems to have failed only because the version
9040 ;; of libmagic that is packaged in Guix outputs a slightly
9041 ;; different (but not wrong) string than the one that the test
9042 ;; expected.
9043 '(#:tests? #f
9044 #:phases (modify-phases %standard-phases
9045 ;; Replace a specific method call with a hard-coded
9046 ;; path to the necessary libmagic.so file in the
9047 ;; store. If we don't do this, then the method call
9048 ;; will fail to find the libmagic.so file, which in
9049 ;; turn will cause any application using
9050 ;; python-magic to fail.
9051 (add-before 'build 'hard-code-path-to-libmagic
9052 (lambda* (#:key inputs #:allow-other-keys)
9053 (let ((file (assoc-ref inputs "file")))
9054 (substitute* "magic.py"
9055 (("ctypes.util.find_library\\('magic'\\)")
9056 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9057 #t)))
9058 (add-before 'install 'disable-egg-compression
9059 (lambda _
9060 (let ((port (open-file "setup.cfg" "a")))
9061 (display "\n[easy_install]\nzip_ok = 0\n"
9062 port)
9063 (close-port port)
9064 #t))))))
daeeea71
CM
9065 (native-inputs
9066 `(("python-setuptools" ,python-setuptools)))
9067 (inputs
9068 ;; python-magic needs to be able to find libmagic.so.
9069 `(("file" ,file)))
9070 (home-page "https://github.com/ahupp/python-magic")
9071 (synopsis "File type identification using libmagic")
9072 (description
9073 "This module uses ctypes to access the libmagic file type
9074identification library. It makes use of the local magic database and
9075supports both textual and MIME-type output. Note that this module and
9076the python-file module both provide a \"magic.py\" file; these two
9077modules, which are different and were developed separately, both serve
9078the same purpose: to provide Python bindings for libmagic.")
9079 (license license:expat)))
9080
9081(define-public python2-magic
9082 (package-with-python2 python-magic))
12af303f
CM
9083
9084(define-public python2-s3cmd
9085 (package
9086 (name "python2-s3cmd")
9087 (version "1.6.1")
9088 (source
9089 (origin
9090 (method url-fetch)
de67e922 9091 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9092 "s3cmd-" version ".tar.gz"))
9093 (sha256
9094 (base32
9095 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9096 (build-system python-build-system)
9097 (arguments
9098 ;; s3cmd is written for python2 only and contains no tests.
9099 `(#:python ,python-2
9100 #:tests? #f))
9101 (native-inputs
9102 `(("python2-setuptools" ,python2-setuptools)))
9103 (inputs
9104 `(("python2-dateutil" ,python2-dateutil)
9105 ;; The python-file package also provides a magic.py module.
9106 ;; This is an unfortunate state of affairs; however, s3cmd
9107 ;; fails to install if it cannot find specifically the
9108 ;; python-magic package. Thus we include it, instead of using
9109 ;; python-file. Ironically, s3cmd sometimes works better
9110 ;; without libmagic bindings at all:
9111 ;; https://github.com/s3tools/s3cmd/issues/198
9112 ("python2-magic" ,python2-magic)))
9113 (home-page "http://s3tools.org/s3cmd")
9114 (synopsis "Command line tool for S3-compatible storage services")
9115 (description
9116 "S3cmd is a command line tool for uploading, retrieving and managing data
9117in storage services that are compatible with the Amazon Simple Storage
9118Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9119GnuPG encryption, and more. It also supports management of Amazon's
9120CloudFront content delivery network.")
3f641af0 9121 (license license:gpl2+)))
4323a5f0
AE
9122
9123(define-public python-pkgconfig
9124 (package
9125 (name "python-pkgconfig")
9126 (version "1.1.0")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "pkgconfig" version))
9131 (sha256
9132 (base32
9133 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9134 (build-system python-build-system)
9135 (native-inputs
9136 `(("python-nose" ,python-nose)
9137 ("python-setuptools" ,python-setuptools)))
9138 (inputs
9139 `(("pkg-config" ,pkg-config)))
9140 (arguments
9141 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9142 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9143 #:tests? #f
9144 ;; Prevent creation of the egg. This works around
9145 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9146 #:configure-flags '("--single-version-externally-managed" "--root=/")
9147 ;; Hard-code the path to pkg-config.
9148 #:phases
9149 (modify-phases %standard-phases
9150 (add-before
9151 'build 'patch
9152 (lambda _
9153 (substitute* "pkgconfig/pkgconfig.py"
9154 (("cmd = 'pkg-config")
9155 (string-append "cmd = '" (which "pkg-config"))))
9156 #t)))))
9157 (home-page "http://github.com/matze/pkgconfig")
9158 (synopsis "Python interface for pkg-config")
9159 (description "This module provides a Python interface to pkg-config. It
9160can be used to find all pkg-config packages, check if a package exists,
9161check if a package meets certain version requirements, query CFLAGS and
9162LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9163 (license license:expat)))
4323a5f0
AE
9164
9165(define-public python2-pkgconfig
9166 (package-with-python2 python-pkgconfig))
9167
2e697322
BW
9168(define-public python-bz2file
9169 (package
9170 (name "python-bz2file")
9171 (version "0.98")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "bz2file" version))
9176 (sha256
9177 (base32
9178 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9179 (build-system python-build-system)
9180 (arguments
124df723 9181 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9182 (home-page "https://github.com/nvawda/bz2file")
9183 (synopsis "Read and write bzip2-compressed files")
9184 (description
9185 "Bz2file is a Python library for reading and writing bzip2-compressed
9186files. It contains a drop-in replacement for the I/O interface in the
9187standard library's @code{bz2} module, including features from the latest
9188development version of CPython that are not available in older releases.")
3f641af0 9189 (license license:asl2.0)
2e697322
BW
9190 (properties `((python2-variant . ,(delay python2-bz2file))))))
9191
9192(define-public python2-bz2file
9193 (let ((base (package-with-python2
9194 (strip-python2-variant python-bz2file))))
9195 (package
9196 (inherit base)
9197 (native-inputs
124df723
BW
9198 `(("python2-setuptools" ,python2-setuptools)))
9199 (arguments
752bb447
BW
9200 `(#:python ,python-2
9201 #:phases
124df723
BW
9202 (modify-phases %standard-phases
9203 ;; 'python setup.py test' does not work as of 0.98.
9204 ;; There is only the one test file, so we run it directly.
9205 (replace 'check
9206 (lambda _ (zero? (system* "python"
9207 "test_bz2file.py"))))))))))
2e697322 9208
da4ac1aa
BW
9209(define-public python-future
9210 (package
9211 (name "python-future")
9212 (version "0.15.2")
9213 (source
9214 (origin
9215 (method url-fetch)
9216 (uri (pypi-uri "future" version))
9217 (sha256
9218 (base32
9219 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9220 (build-system python-build-system)
9221 ;; Many tests connect to the network or are otherwise flawed.
9222 ;; https://github.com/PythonCharmers/python-future/issues/210
9223 (arguments
9224 `(#:tests? #f))
9225 (home-page "http://python-future.org")
9226 (synopsis "Single-source support for Python 3 and 2")
9227 (description
9228 "@code{python-future} is the missing compatibility layer between Python 2 and
9229Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9230to support both Python 2 and Python 3 with minimal overhead.")
9231 (license license:expat)
9232 (properties `((python2-variant . ,(delay python2-future))))))
9233
9234(define-public python2-future
9235 (let ((base (package-with-python2
9236 (strip-python2-variant python-future))))
9237 (package
9238 (inherit base)
9239 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9240
8e451885
AE
9241(define-public python-cysignals
9242 (package
9243 (name "python-cysignals")
9244 (version "1.1.0")
9245 (source
9246 (origin
9247 (method url-fetch)
9248 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9249 (sha256
9250 (base32
9251 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9252 (build-system python-build-system)
9253 (native-inputs
9254 `(("python-cython" ,python-cython)
9255 ("python-setuptools" ,python-setuptools)
9256 ("python-sphinx" ,python-sphinx)))
9257 (inputs
9258 `(("pari-gp" ,pari-gp)))
9259 (arguments
9260 `(#:modules ((guix build python-build-system)
9261 ((guix build gnu-build-system) #:prefix gnu:)
9262 (guix build utils))
9263 ;; FIXME: Tests are executed after installation and currently fail
9264 ;; when not installing into standard locations; the author is working
9265 ;; on a fix.
9266 #:tests? #f
9267 #:phases
9268 (modify-phases %standard-phases
9269 (add-before
9270 'build 'configure
9271 (assoc-ref gnu:%standard-phases 'configure)))))
9272 (home-page
9273 "https://github.com/sagemath/cysignals")
9274 (synopsis
9275 "Handling of interrupts and signals for Cython")
9276 (description
9277 "The cysignals package provides mechanisms to handle interrupts (and
9278other signals and errors) in Cython code, using two related approaches,
9279for mixed Cython/Python code or external C libraries and pure Cython code,
9280respectively.")
3f641af0 9281 (license license:lgpl3+)))
8e451885
AE
9282
9283(define-public python2-cysignals
9284 (package-with-python2 python-cysignals))
9285
63bcec71
DM
9286(define-public python2-shedskin
9287 (package
9288 (name "python2-shedskin")
9289 (version "0.9.4")
9290 (source
9291 (origin
9292 (method url-fetch)
9293 (uri (string-append "https://github.com/shedskin/shedskin/"
9294 "releases/download/v" version
9295 "/shedskin-" version ".tgz"))
9296 (sha256
9297 (base32
9298 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9299 (build-system python-build-system)
9300 (arguments
9301 `(#:python ,python-2
9302 #:phases (modify-phases %standard-phases
9303 (add-after 'unpack 'fix-resulting-include-libs
9304 (lambda* (#:key inputs #:allow-other-keys)
9305 (let ((libgc (assoc-ref inputs "libgc"))
9306 (pcre (assoc-ref inputs "pcre")))
9307 (substitute* "shedskin/makefile.py"
9308 (("variable == 'CCFLAGS':[ ]*")
9309 (string-append "variable == 'CCFLAGS':\n"
9310 " line += ' -I " pcre "/include"
9311 " -I " libgc "/include'"))
9312 (("variable == 'LFLAGS':[ ]*")
9313 (string-append "variable == 'LFLAGS':\n"
9314 " line += ' -L" pcre "/lib"
9315 " -L " libgc "/lib'")))
9316 #t))))))
9317 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9318 (inputs `(("pcre" ,pcre)
9319 ("libgc" ,libgc)))
9320 (home-page "https://shedskin.github.io/")
9321 (synopsis "Experimental Python-2 to C++ Compiler")
9322 (description (string-append "This is an experimental compiler for a subset of
9323Python. It generates C++ code and a Makefile."))
3f641af0 9324 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9325
9326(define-public python2-rope
9327 (package
9328 (name "python2-rope")
9329 (version "0.10.3")
9330 (source
9331 (origin
9332 (method url-fetch)
9333 (uri (pypi-uri "rope" version))
9334 (sha256
9335 (base32
9336 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9337 (arguments
9338 ;; Rope is currently python-2 only.
9339 ;; https://github.com/python-rope/rope/issues/57
9340 `(#:python ,python-2))
9341 (build-system python-build-system)
9342 (native-inputs
9343 `(("python2-unittest2" ,python2-unittest2)
9344 ("python2-setuptools" ,python2-setuptools)))
9345 (home-page "https://github.com/python-rope/rope")
9346 (synopsis "Refactoring library for Python")
9347 (description "Rope is a refactoring library for Python. It facilitates
9348the renaming, moving and extracting of attributes, functions, modules, fields
9349and parameters in Python 2 source code. These refactorings can also be applied
9350to occurences in strings and comments.")
3f641af0 9351 (license license:gpl2)))
6ba8ca17
9352
9353(define-public python-py3status
9354 (package
9355 (name "python-py3status")
d2262d70 9356 (version "3.1")
6ba8ca17
9357 (source
9358 (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "py3status" version))
9361 (sha256
9362 (base32
d2262d70 9363 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
9364 (build-system python-build-system)
9365 (native-inputs
9366 `(("python-setuptools" ,python-setuptools)))
9367 (home-page "https://github.com/ultrabug/py3status")
9368 (synopsis "Extensible i3status wrapper written in Python")
9369 (description "py3status is an i3status wrapper which extends i3status
9370functionality in a modular way, allowing you to extend your panel with your
9371own code, responding to click events and updating clock every second.")
3f641af0 9372 (license license:bsd-3)))
b8fdbca3
HG
9373
9374(define-public python-tblib
9375 (package
9376 (name "python-tblib")
9377 (version "1.3.0")
9378 (source (origin
9379 (method url-fetch)
9380 (uri (pypi-uri "tblib" version))
9381 (sha256 (base32
9382 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9383 (build-system python-build-system)
9384 (arguments
9385 `(#:phases
9386 (modify-phases %standard-phases
9387 (replace 'check
9388 (lambda _
9389 ;; Upstream runs tests after installation and the package itself
9390 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9391 ;; found.
9392 (setenv "PYTHONPATH"
9393 (string-append (getcwd) "/build/lib:"
9394 (getenv "PYTHONPATH")))
9395 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9396 (native-inputs
9397 `(("python-pytest" ,python-pytest)
9398 ("python-setuptools" ,python-setuptools)
9399 ("python-six" ,python-six)))
9400 (home-page "https://github.com/ionelmc/python-tblib")
9401 (synopsis "Traceback serialization library")
9402 (description
9403 "Traceback serialization allows you to:
9404
9405@enumerate
9406@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9407different processes. This allows better error handling when running code over
9408multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9409
9410@item Parse traceback strings and raise with the parsed tracebacks.
9411@end itemize")
3f641af0 9412 (license license:bsd-3)))
b8fdbca3
HG
9413
9414(define-public python2-tblib
9415 (package-with-python2 python-tblib))
1a024de4
HG
9416
9417(define-public python-sqlparse
9418 (package
9419 (name "python-sqlparse")
9420 (version "0.1.19")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (pypi-uri "sqlparse" version))
9424 (sha256
9425 (base32
9426 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9427 (build-system python-build-system)
9428 (arguments
9429 `(#:phases
9430 (modify-phases %standard-phases
9431 (replace 'check
9432 (lambda* _
9433 ;; setup.py-integrated 2to3 only affects the build files, but
9434 ;; py.test is using the source files. So we need to convert them
9435 ;; manually.
9436 (when (zero? (system* "python3"))
9437 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9438 (zero? (system* "py.test")))))))
9439 (native-inputs
9440 `(("python-pytest" ,python-pytest)
9441 ("python-setuptools" ,python-setuptools)))
9442 (home-page "https://github.com/andialbrecht/sqlparse")
9443 (synopsis "Non-validating SQL parser")
9444 (description "Sqlparse is a non-validating SQL parser for Python. It
9445provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9446 (license license:bsd-3)))
1a024de4
HG
9447
9448(define-public python2-sqlparse
9449 (package-with-python2 python-sqlparse))
68b9d242
SB
9450
9451(define-public python-greenlet
9452 (package
9453 (name "python-greenlet")
9454 (version "0.4.9")
9455 (source (origin
9456 (method url-fetch)
9457 (uri (pypi-uri "greenlet" version))
9458 (sha256
9459 (base32
9460 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9461 (build-system python-build-system)
9462 (native-inputs
9463 `(("python-setuptools" ,python-setuptools)))
9464 (home-page "https://greenlet.readthedocs.io/")
9465 (synopsis "Lightweight in-process concurrent programming")
9466 (description
9467 "Greenlet package is a spin-off of Stackless, a version of CPython
9468that supports micro-threads called \"tasklets\". Tasklets run
9469pseudo-concurrently (typically in a single or a few OS-level threads) and
9470are synchronized with data exchanges on \"channels\".")
3f641af0 9471 (license (list license:psfl license:expat))))
68b9d242
SB
9472
9473(define-public python2-greenlet
9474 (package-with-python2 python-greenlet))
d79a343b
SB
9475
9476(define-public python-gevent
9477 (package
9478 (name "python-gevent")
9479 (version "1.1.1")
9480 (source (origin
9481 (method url-fetch)
9482 (uri (pypi-uri "gevent" version))
9483 (sha256
9484 (base32
9485 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9486 (modules '((guix build utils)))
9487 (snippet
9488 '(begin
9489 ;; unbunding libev and c-ares
9490 (for-each delete-file-recursively '("libev" "c-ares"))
9491 ;; fixing testsuite
9492 (call-with-output-file "greentest/__init__.py" noop)
9493 (substitute* "greentest/testrunner.py"
9494 (("import util") "from . import util")
9495 (("from util import log") "from .util import log"))))))
9496 (build-system python-build-system)
9497 (propagated-inputs
9498 `(("python-greenlet" ,python-greenlet)))
9499 (native-inputs
9500 `(("python-setuptools" ,python-setuptools)
9501 ("python-six" ,python-six)))
9502 (inputs
9503 `(("c-ares" ,c-ares)
9504 ("libev" ,libev)))
9505 (home-page "http://www.gevent.org/")
9506 (synopsis "Coroutine-based network library")
9507 (description
9508 "gevent is a coroutine-based Python networking library that uses greenlet
9509to provide a high-level synchronous API on top of the libev event loop.")
9510 (license license:expat)))
9511
9512(define-public python2-gevent
9513 (package-with-python2 python-gevent))
da3aeeb6
SB
9514
9515(define-public python-twisted
9516 (package
9517 (name "python-twisted")
9518 (version "16.2.0")
9519 (source (origin
9520 (method url-fetch)
8ea8e8d3 9521 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9522 (sha256
9523 (base32
9524 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9525 (build-system python-build-system)
9526 (native-inputs
45912170
SB
9527 `(("python-setuptools" ,python-setuptools)))
9528 (propagated-inputs
9529 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9530 (home-page "https://twistedmatrix.com/")
9531 (synopsis "Asynchronous networking framework written in Python")
9532 (description
9533 "Twisted is an extensible framework for Python programming, with special
9534focus on event-based network programming and multiprotocol integration.")
9535 (license license:expat)))
9536
9537(define-public python2-twisted
9538 (package-with-python2 python-twisted))
d0b6fed6 9539
4d3fa5a4
EF
9540(define-public python-pika
9541 (package
9542 (name "python-pika")
9543 (version "0.10.0")
9544 (source
9545 (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "pika" version))
9548 (sha256
9549 (base32
9550 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9551 (build-system python-build-system)
9552 (native-inputs
9553 `(("python-twisted" ,python-twisted)))
9554 (home-page "https://pika.readthedocs.org")
9555 (synopsis "Pure Python AMQP Client Library")
9556 (description
9557 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9558Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9559network support library.")
9560 (license license:bsd-3)))
9561
9562(define-public python2-pika
9563 (package-with-python2 python-pika))
9564
d0b6fed6
DM
9565(define-public python-ply
9566 (package
9567 (name "python-ply")
9568 (version "3.8")
9569 (source
9570 (origin
9571 (method url-fetch)
9572 (uri (string-append
9573 "https://pypi.python.org/packages/"
9574 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9575 "/ply-" version ".tar.gz"))
9576 (sha256
9577 (base32
9578 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9579 (build-system python-build-system)
9580 (home-page "http://www.dabeaz.com/ply/")
9581 (synopsis "Python Lex & Yacc")
9582 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9583It uses LR parsing and does extensive error checking.")
3f641af0 9584 (license license:bsd-3)
d0b6fed6
DM
9585 (properties `((python2-variant . ,(delay python2-ply))))))
9586
9587(define-public python2-ply
9588 (package
9589 (inherit (package-with-python2
9590 (strip-python2-variant python-ply)))
9591 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9592
9593(define-public python-tabulate
9594 (package
9595 (name "python-tabulate")
9596 (version "0.7.5")
9597 (source (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "tabulate" version))
9600 (sha256
9601 (base32
9602 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9603 ;; Fix tests
9604 (modules '((guix build utils)))
9605 (snippet '(substitute* '("test/test_cli.py"
9606 "test/test_input.py"
9607 "test/test_output.py"
9608 "test/test_regression.py")
9609 (("from common") "from nose.tools")))))
9610 (build-system python-build-system)
9611 (native-inputs
9612 `(("python-setuptools" ,python-setuptools)
9613 ;; For testing
9614 ("python-nose" ,python-nose)))
9615 (home-page "https://bitbucket.org/astanin/python-tabulate")
9616 (synopsis "Pretty-print tabular data")
9617 (description
9618 "Tabulate is a library and command-line utility to pretty-print tabular
9619data in Python.")
9620 (license license:expat)))
9621
9622(define-public python2-tabulate
9623 (package-with-python2 python-tabulate))
1c4c8a33
SB
9624
9625(define-public python-kazoo
9626 (package
9627 (name "python-kazoo")
9628 (version "2.2.1")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "kazoo" version))
9633 (sha256
9634 (base32
9635 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9636 (build-system python-build-system)
9637 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9638 (native-inputs
c18899e8
SB
9639 `(("python-setuptools" ,python-setuptools)))
9640 (propagated-inputs
9641 `(("python-six" ,python-six)))
1c4c8a33
SB
9642 (home-page "https://kazoo.readthedocs.org")
9643 (synopsis "High-level Zookeeper client library")
9644 (description
9645 "Kazoo is a Python client library for the Apache Zookeeper distributed
9646application service. It is designed to be easy to use and to avoid common
9647programming errors.")
3f641af0 9648 (license license:asl2.0)))
1c4c8a33
SB
9649
9650(define-public python2-kazoo
9651 (package-with-python2 python-kazoo))
45dda35e
SB
9652
9653(define-public python-pykafka
9654 (package
9655 (name "python-pykafka")
9656 (version "2.4.0")
9657 (source (origin
9658 (method url-fetch)
c6bccf71
EF
9659 (uri (string-append
9660 "https://pypi.python.org/packages/8b/3e/"
9661 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9662 "pykafka-" version ".tar.gz"))
45dda35e
SB
9663 (sha256
9664 (base32
9665 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9666 (build-system python-build-system)
9667 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9668 (native-inputs
c8fa3d9b
SB
9669 `(("python-setuptools" ,python-setuptools)))
9670 (propagated-inputs
45dda35e
SB
9671 `(("python-gevent" ,python-gevent)
9672 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9673 ("python-tabulate" ,python-tabulate)))
9674 (inputs
9675 `(("librdkafka" ,librdkafka)))
9676 (home-page "https://pykafka.readthedocs.io/")
9677 (synopsis "Apache Kafka client for Python")
9678 (description
9679 "PyKafka is a client for the Apache Kafka distributed messaging system.
9680It includes Python implementations of Kafka producers and consumers, which
9681are optionally backed by a C extension built on librdkafka.")
3f641af0 9682 (license license:asl2.0)))
45dda35e
SB
9683
9684(define-public python2-pykafka
9685 (package-with-python2 python-pykafka))
a44fd439
DM
9686
9687(define-public python-wcwidth
9688 (package
9689 (name "python-wcwidth")
9690 (version "0.1.6")
9691 (source
9692 (origin
9693 (method url-fetch)
9694 (uri (string-append
9695 "https://pypi.python.org/packages/"
9696 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9697 "wcwidth-" version ".tar.gz"))
9698 (sha256
9699 (base32
9700 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9701 (build-system python-build-system)
9702 (home-page "https://github.com/jquast/wcwidth")
66e07664 9703 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9704 (description "Wcwidth measures the number of terminal column cells of
9705wide-character codes. It is useful for those implementing a terminal emulator,
9706or programs that carefully produce output to be interpreted by one. It is a
9707Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9708specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
9709 (license license:expat)
9710 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
9711
9712(define-public python2-wcwidth
9713 (package
9714 (inherit (package-with-python2
9715 (strip-python2-variant python-wcwidth)))
9716 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
9717
9718(define-public python2-jsonrpclib
9719 (package
9720 (name "python2-jsonrpclib")
9721 (version "0.1.7")
9722 (source (origin
9723 (method url-fetch)
9724 (uri (string-append
9725 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9726 "jsonrpclib-" version ".tar.gz"))
9727 (sha256
9728 (base32
9729 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9730 (build-system python-build-system)
9731 (native-inputs
9732 `(("python2-setuptools" ,python2-setuptools)))
9733 (arguments
9734 `(#:tests? #f
9735 #:python ,python-2))
9736 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9737 (synopsis "Implementation of JSON-RPC specification for Python")
9738 (description
9739 "This library is an implementation of the JSON-RPC specification.
9740It supports both the original 1.0 specification, as well as the
9741new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9742etc.")
3f641af0 9743 (license license:asl2.0)))
9250b0f3
SB
9744
9745(define-public python-chai
9746 (package
9747 (name "python-chai")
9748 (version "1.1.1")
9749 (source (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "chai" version))
9752 (sha256
9753 (base32
9754 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9755 (build-system python-build-system)
9756 (native-inputs
9757 `(("python-setuptools" ,python-setuptools)))
9758 (home-page "https://github.com/agoragames/chai")
9759 (synopsis "Mocking framework for Python")
9760 (description
9761 "Chai provides an api for mocking, stubbing and spying your python
9762objects, patterned after the Mocha library for Ruby.")
3f641af0 9763 (license license:bsd-3)))
9250b0f3
SB
9764
9765(define-public python2-chai
9766 (package-with-python2 python-chai))
9767
ae43baa8
SB
9768(define-public python-arrow
9769 (package
9770 (name "python-arrow")
9771 (version "0.8.0")
9772 (source (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "arrow" version))
9775 (sha256
9776 (base32
9777 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9778 (build-system python-build-system)
9779 (native-inputs
9780 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
9781 ;; For testing
9782 ("python-chai" ,python-chai)
9783 ("python-simplejson" ,python-simplejson)))
36aed736
SB
9784 (propagated-inputs
9785 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
9786 (home-page "https://github.com/crsmithdev/arrow/")
9787 (synopsis "Dates and times for Python")
9788 (description
9789 "Arrow is a Python library to creating, manipulating, formatting and
9790converting dates, times, and timestamps. It implements and updates the
9791datetime type.")
3f641af0 9792 (license license:asl2.0)))
ae43baa8
SB
9793
9794(define-public python2-arrow
9795 (package-with-python2 python-arrow))
9796
1f2b62a4
SB
9797(define-public python-inflection
9798 (package
9799 (name "python-inflection")
9800 (version "0.3.1")
9801 (source
9802 (origin (method url-fetch)
9803 (uri (pypi-uri "inflection" version))
9804 (sha256
9805 (base32
9806 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9807 (build-system python-build-system)
9808 (native-inputs
9809 `(("python-setuptools" ,python-setuptools)))
9810 (home-page "http://github.com/jpvanhal/inflection")
9811 (synopsis "Python string transformation library")
9812 (description
9813 "Inflection is a string transformation library. It singularizes
9814and pluralizes English words, and transforms strings from CamelCase to
9815underscored string.")
9816 (license license:expat)))
9817
9818(define-public python2-inflection
9819 (package-with-python2 python-inflection))
9820
18995566
SB
9821(define-public python-pylev
9822 (package
9823 (name "python-pylev")
9824 (version "1.3.0")
9825 (source (origin
9826 (method url-fetch)
9827 (uri (pypi-uri "pylev" version))
9828 (sha256
9829 (base32
9830 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9831 (build-system python-build-system)
9832 (native-inputs
9833 `(("python-setuptools" ,python-setuptools)))
9834 (home-page "http://github.com/toastdriven/pylev")
9835 (synopsis "Levenshtein distance implementation in Python")
9836 (description "Pure Python Levenshtein implementation, based off the
9837Wikipedia code samples at
9838@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 9839 (license license:bsd-3)))
18995566
SB
9840
9841(define-public python2-pylev
9842 (package-with-python2 python-pylev))
9843
f5deff7a
SB
9844(define-public python-cleo
9845 (package
9846 (name "python-cleo")
9847 (version "0.4.1")
9848 (source (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "cleo" version))
9851 (sha256
9852 (base32
9853 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9854 (build-system python-build-system)
9855 (native-inputs
9403150a 9856 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
9857 ;; For testing
9858 ("python-mock" ,python-mock)
9859 ("python-pytest" ,python-pytest)))
9403150a
SB
9860 (propagated-inputs
9861 `(("python-psutil" ,python-psutil)
9862 ("python-pylev" ,python-pylev)))
f5deff7a
SB
9863 (home-page "https://github.com/sdispater/cleo")
9864 (synopsis "Command-line arguments library for Python")
9865 (description
9866 "Cleo allows you to create command-line commands with signature in
9867docstring and colored output.")
9868 (license license:expat)))
9869
9870(define-public python2-cleo
9871 (package-with-python2 python-cleo))
9872
77cadb43
SB
9873(define-public python-lazy-object-proxy
9874 (package
9875 (name "python-lazy-object-proxy")
9876 (version "1.2.2")
9877 (source (origin
9878 (method url-fetch)
9879 (uri (pypi-uri "lazy-object-proxy" version))
9880 (sha256
9881 (base32
9882 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9883 (build-system python-build-system)
9884 (native-inputs
9885 `(("python-setuptools" ,python-setuptools)))
9886 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9887 (synopsis "Lazy object proxy for python")
9888 (description
9889 "Lazy object proxy is an object that wraps a callable but defers the call
9890until the object is actually required, and caches the result of said call.")
3f641af0 9891 (license license:bsd-2)))
77cadb43
SB
9892
9893(define-public python2-lazy-object-proxy
9894 (package-with-python2 python-lazy-object-proxy))
9895
5477e05f
SB
9896(define-public python-dnspython
9897 (package
9898 (name "python-dnspython")
6c514128 9899 (version "1.15.0")
5477e05f
SB
9900 (source (origin
9901 (method url-fetch)
9902 (uri (string-append "http://www.dnspython.org/kits/"
9903 version "/dnspython-" version ".tar.gz"))
9904 (sha256
9905 (base32
6c514128 9906 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
9907 (build-system python-build-system)
9908 (arguments '(#:tests? #f)) ; XXX: requires internet access
9909 (native-inputs
9910 `(("python-setuptools" ,python-setuptools)))
9911 (home-page "http://www.dnspython.org")
9912 (synopsis "DNS toolkit for Python")
9913 (description
9914 "dnspython is a DNS toolkit for Python. It supports almost all record
9915types. It can be used for queries, zone transfers, and dynamic updates.
9916It supports TSIG authenticated messages and EDNS0.")
9917 (license license:expat)))
9918
9919(define-public python2-dnspython
9920 (package-with-python2 python-dnspython))
9921
22711e25
SB
9922(define-public python-email-validator
9923 (package
9924 (name "python-email-validator")
9925 (version "1.0.1")
9926 (source
9927 (origin (method url-fetch)
9928 (uri (pypi-uri "email_validator" version))
9929 (sha256
9930 (base32
9931 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9932 (build-system python-build-system)
9933 (arguments
9934 '(#:phases
9935 (modify-phases %standard-phases
9936 (add-before 'build 'use-dnspython
9937 (lambda _
9938 (substitute* "setup.py"
9939 (("dnspython3") "dnspython"))
9940 #t)))))
9941 (native-inputs
d42560bd
SB
9942 `(("python-setuptools" ,python-setuptools)))
9943 (propagated-inputs
22711e25 9944 `(("python-dnspython" ,python-dnspython)
d42560bd 9945 ("python-idna" ,python-idna)))
22711e25
SB
9946 (home-page "https://github.com/JoshData/python-email-validator")
9947 (synopsis "Email address validation library for Python")
9948 (description
9949 "This library validates email address syntax and deliverability.")
3f641af0 9950 (license license:cc0)))
22711e25
SB
9951
9952(define-public python2-email-validator
9953 (package-with-python2 python-email-validator))
9954
8987d91e
SB
9955(define-public python-ukpostcodeparser
9956 (package
9957 (name "python-ukpostcodeparser")
9958 (version "1.0.3")
9959 (source (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "UkPostcodeParser" version))
9962 (sha256
9963 (base32
9964 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9965 (build-system python-build-system)
9966 (native-inputs
9967 `(("python-setuptools" ,python-setuptools)))
9968 (home-page "https://github.com/hamstah/ukpostcodeparser")
9969 (synopsis "UK Postcode parser for Python")
9970 (description
9971 "This library provides the @code{parse_uk_postcode} function for
9972parsing UK postcodes.")
9973 (license license:expat)))
9974
9975(define-public python2-ukpostcodeparser
9976 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
9977
9978(define-public python-fake-factory
9979 (package
9980 (name "python-fake-factory")
7adc698f 9981 (version "0.7.2")
ea92ae01
SB
9982 (source (origin
9983 (method url-fetch)
9984 (uri (pypi-uri "fake-factory" version))
9985 (sha256
9986 (base32
7adc698f 9987 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 9988 (build-system python-build-system)
ea92ae01 9989 (native-inputs
bbcd7297 9990 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
9991 ;; For testing
9992 ("python-email-validator" ,python-email-validator)
9993 ("python-mock" ,python-mock)
9994 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
9995 (propagated-inputs
9996 `(("python-dateutil" ,python-dateutil-2)
9997 ("python-six" ,python-six)))
7adc698f 9998 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
9999 (synopsis "Python package that generates fake data")
10000 (description
10001 "Faker is a Python package that generates fake data such as names,
10002addresses, and phone numbers.")
10003 (license license:expat)
10004 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10005
10006(define-public python2-fake-factory
10007 (let ((base (package-with-python2 (strip-python2-variant
10008 python-fake-factory))))
10009 (package
10010 (inherit base)
24c9aa18 10011 (propagated-inputs
ea92ae01 10012 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10013 ,@(package-propagated-inputs base))))))
ea92ae01 10014
b49504fd
SB
10015(define-public python-pyaml
10016 (package
10017 (name "python-pyaml")
10018 (version "15.8.2")
10019 (source (origin
10020 (method url-fetch)
10021 (uri (pypi-uri "pyaml" version))
10022 (sha256
10023 (base32
10024 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10025 (build-system python-build-system)
10026 (native-inputs
10027 `(("python-setuptools" ,python-setuptools)))
10028 (propagated-inputs
10029 `(("python-pyyaml" ,python-pyyaml)))
10030 (home-page "https://github.com/mk-fg/pretty-yaml")
10031 (synopsis "YAML pretty-print library for Python")
10032 (description
10033 "pyaml is a PyYAML based python module to produce pretty and readable
10034YAML-serialized data.")
3f641af0 10035 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10036
10037(define-public python2-pyaml
10038 (package-with-python2 python-pyaml))
10039
347175a2
SB
10040(define-public python-flexmock
10041 (package
10042 (name "python-flexmock")
10043 (version "0.10.2")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (pypi-uri "flexmock" version))
10047 (sha256
10048 (base32
10049 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10050 (build-system python-build-system)
10051 (native-inputs
10052 `(("python-setuptools" ,python-setuptools)))
10053 (home-page "https://flexmock.readthedocs.org")
10054 (synopsis "Testing library for Python")
10055 (description
10056 "flexmock is a testing library for Python that makes it easy to create
10057mocks, stubs and fakes.")
3f641af0 10058 (license license:bsd-3)))
347175a2
SB
10059
10060(define-public python2-flexmock
10061 (package-with-python2 python-flexmock))
10062
5a744191
SB
10063(define-public python-orator
10064 (package
10065 (name "python-orator")
10066 (version "0.8.2")
10067 (source (origin
10068 (method url-fetch)
10069 (uri (pypi-uri "orator" version))
10070 (sha256
10071 (base32
10072 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10073 (build-system python-build-system)
10074 (arguments '(#:tests? #f)) ; no tests
10075 (native-inputs
b2676030
SB
10076 `(("python-setuptools" ,python-setuptools)))
10077 (propagated-inputs
5a744191
SB
10078 `(("python-arrow" ,python-arrow)
10079 ("python-blinker" ,python-blinker)
10080 ("python-cleo" ,python-cleo)
10081 ("python-fake-factory" ,python-fake-factory)
10082 ("python-inflection" ,python-inflection)
10083 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10084 ("python-pyaml" ,python-pyaml)
5a744191
SB
10085 ("python-simplejson" ,python-simplejson)
10086 ("python-wrapt" ,python-wrapt)))
10087 (home-page "https://orator-orm.com/")
10088 (synopsis "ActiveRecord ORM for Python")
10089 (description
10090 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10091implementation for Python.")
10092 (license license:expat)
10093 (properties `((python2-variant . ,(delay python2-orator))))))
10094
10095(define-public python2-orator
10096 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10097 (package
10098 (inherit base)
06961617 10099 (propagated-inputs
5a744191 10100 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10101 ,@(package-propagated-inputs base))))))
f4155188
DM
10102
10103(define-public python-prompt-toolkit
10104 (package
10105 (name "python-prompt-toolkit")
d15e2ef0 10106 (version "1.0.7")
f4155188
DM
10107 (source
10108 (origin
10109 (method url-fetch)
d15e2ef0 10110 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10111 (sha256
10112 (base32
d15e2ef0 10113 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188
DM
10114 (build-system python-build-system)
10115 (inputs `(("python-wcwidth" ,python-wcwidth)
10116 ("python-pygments" ,python-pygments)))
10117 (native-inputs `(("python-six" ,python-six)))
10118 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10119 (synopsis "Library for building command line interfaces in Python")
10120 (description
10121 "Prompt-Toolkit is a library for building interactive command line
10122interfaces in Python. It's like GNU Readline but it also features syntax
10123highlighting while typing, out-of-the-box multi-line input editing, advanced
10124code completion, incremental search, support for Chinese double-width
10125characters, mouse support, and auto suggestions.")
3f641af0 10126 (license license:bsd-3)
f4155188
DM
10127 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10128
10129(define-public python2-prompt-toolkit
10130 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10131 (package
10132 (inherit base)
10133 (native-inputs
10134 `(("python2-setuptools" ,python2-setuptools)
10135 ,@(package-native-inputs base))))))
a502dfbf
DM
10136
10137(define-public python-jedi
10138 (package
10139 (name "python-jedi")
10140 (version "0.9.0")
10141 (source
10142 (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "jedi" version))
10145 (sha256
10146 (base32
10147 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10148 (build-system python-build-system)
10149 (home-page "https://github.com/davidhalter/jedi")
10150 (synopsis
10151 "Autocompletion for Python that can be used for text editors")
10152 (description
10153 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10154 (license license:expat)
10155 (properties `((python2-variant . ,(delay python2-jedi))))))
10156
10157(define-public python2-jedi
10158 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10159 (package
10160 (inherit base)
10161 (native-inputs
10162 `(("python2-setuptools" ,python2-setuptools)
10163 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10164
10165(define-public ptpython
10166 (package
10167 (name "ptpython")
10168 (version "0.34")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "ptpython" version))
10172 (sha256
10173 (base32
10174 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10175 (build-system python-build-system)
10176 (inputs
10177 `(("python-docopt" ,python-docopt)
10178 ("python-jedi" ,python-jedi)
10179 ("python-prompt-toolkit" ,python-prompt-toolkit)
10180 ("python-pygments" ,python-pygments)
10181 ("python-setuptools" ,python-setuptools)))
10182 (home-page "https://github.com/jonathanslenders/ptpython")
10183 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10184 (description
10185 "ptpython is a Python read-eval-print loop with IDE-like features.
10186It supports syntax highlighting, multiline editing, autocompletion, mouse,
10187color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10188etc.")
3f641af0 10189 (license license:bsd-3)
c2f0dc6e
DM
10190 (properties `((python2-variant . ,(delay ptpython-2))))))
10191
10192(define-public ptpython-2
10193 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10194 (package
10195 (inherit base)
10196 (name "ptpython2"))))
b227f0be 10197
b04a52a6
DJ
10198(define-public python-requests-oauthlib
10199 (package
10200 (name "python-requests-oauthlib")
10201 (version "0.6.2")
10202 (source
10203 (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "requests-oauthlib" version))
10206 (sha256
10207 (base32
10208 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10209 (build-system python-build-system)
10210 (arguments
10211 `(#:phases
10212 (modify-phases %standard-phases
10213 ;; removes tests that require network access
10214 (add-before 'check 'pre-check
10215 (lambda _
10216 (delete-file "tests/test_core.py")
10217 #t)))))
10218 (native-inputs
10219 `(("python-requests-mock" ,python-requests-mock)
10220 ("python-mock" ,python-mock)))
10221 (inputs
10222 `(("python-oauthlib" ,python-oauthlib)
10223 ("python-requests" ,python-requests)))
10224 (home-page
10225 "https://github.com/requests/requests-oauthlib")
10226 (synopsis
10227 "OAuthlib authentication support for Requests")
10228 (description
10229 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10230provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10231 (license license:isc)
10232 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10233
10234(define-public python2-requests-oauthlib
10235 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10236 (package
10237 (inherit base)
10238 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10239 ,@(package-native-inputs base))))))
10240
b227f0be 10241(define-public python-stem
10242 (package
10243 (name "python-stem")
10244 (version "1.4.1b")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "stem" version ".tar.bz2"))
10249 (sha256
10250 (base32
10251 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10252 (build-system python-build-system)
10253 (arguments
10254 `(#:phases
10255 (modify-phases %standard-phases
10256 (replace 'check
10257 (lambda _
10258 (zero? (system* "./run_tests.py" "--unit")))))))
10259 (native-inputs
10260 `(("python-mock" ,python-mock)
10261 ("python-pep8" ,python-pep8)
10262 ("python-pyflakes" ,python-pyflakes)))
10263 (inputs
10264 `(("python-pycrypto" ,python-pycrypto)))
10265 (home-page "https://stem.torproject.org/")
10266 (synopsis
10267 "Python controller library that allows applications to interact with Tor")
10268 (description
10269 "Stem is a Python controller library for Tor. With it you can use Tor's
10270control protocol to script against the Tor process and read descriptor data
10271relays publish about themselves.")
3f641af0 10272 (license license:lgpl3)))
b227f0be 10273
10274(define-public python2-stem
10275 (package-with-python2 python-stem))
517a6c0c
DM
10276
10277(define-public python-pyserial
10278 (package
10279 (name "python-pyserial")
10280 (version "3.1.1")
10281 (source
10282 (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "pyserial" version))
10285 (sha256
10286 (base32
10287 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10288 (build-system python-build-system)
10289 (home-page
10290 "https://github.com/pyserial/pyserial")
10291 (synopsis "Python Serial Port Bindings")
10292 (description "@code{pyserial} provide serial port bindings for Python. It
10293supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10294and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10295 (license license:bsd-3)
517a6c0c
DM
10296 (properties `((python2-variant . ,(delay python2-pyserial))))))
10297
10298(define-public python2-pyserial
10299 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10300 (package
10301 (inherit base)
10302 (native-inputs
10303 `(("python2-setuptools" ,python2-setuptools)
10304 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10305
10306(define-public python-kivy
10307 (package
10308 (name "python-kivy")
10309 (version "1.9.1")
10310 (source
10311 (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "kivy" version))
10314 (file-name (string-append name "-" version ".tar.gz"))
10315 (sha256
10316 (base32
10317 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10318 (build-system python-build-system)
10319 (arguments
10320 `(#:tests? #f ; Tests require many optional packages
10321 #:phases
10322 (modify-phases %standard-phases
10323 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10324 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10325 (lambda* (#:key inputs #:allow-other-keys)
10326 (setenv "KIVY_SDL2_PATH"
10327 (string-append (assoc-ref inputs "sdl-union")
10328 "/include/SDL2"))
10329 #t)))))
10330 (native-inputs
10331 `(("pkg-config" ,pkg-config)))
10332 (inputs
10333 `(("python-cython" ,python-cython)
10334 ("gstreamer" ,gstreamer)
10335 ("mesa" ,mesa)
10336 ("sdl-union"
10337 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10338 (home-page "http://kivy.org")
10339 (synopsis
10340 "Multitouch application framework")
10341 (description
10342 "A software library for rapid development of
10343hardware-accelerated multitouch applications.")
10344 (license license:expat)))
10345
10346(define-public python2-kivy
10347 (package-with-python2 python-kivy))
10348
10349(define-public python-kivy-next
10350 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10351 (revision "1"))
10352 (package (inherit python-kivy)
10353 (name "python-kivy-next")
d80a71eb 10354 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10355 (string-take commit 7)))
10356 (source
10357 (origin
10358 (method git-fetch)
10359 (uri (git-reference
10360 (url "https://github.com/kivy/kivy")
10361 (commit commit)))
10362 (file-name (string-append name "-" version "-checkout"))
10363 (sha256
10364 (base32
10365 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10366
10367(define-public python2-kivy-next
10368 (package-with-python2 python-kivy-next))
8794bd8b
DC
10369
10370(define-public python-binaryornot
10371 (package
10372 (name "python-binaryornot")
10373 (version "0.4.0")
10374 (source (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "binaryornot" version))
10377 (sha256
10378 (base32
10379 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10380 (build-system python-build-system)
10381 (inputs
10382 `(("python-chardet" ,python-chardet)
10383 ("python-hypothesis" ,python-hypothesis)))
10384 (home-page "https://github.com/audreyr/binaryornot")
10385 (synopsis "Package to check if a file is binary or text")
10386 (description "Ultra-lightweight pure Python package to check if a file is
10387binary or text.")
10388 (license license:bsd-3)
10389 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10390
10391(define-public python2-binaryornot
10392 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10393 (package (inherit base)
10394 (native-inputs
10395 `(("python2-setuptools" ,python2-setuptools)
10396 ,@(package-native-inputs base)))
10397 (inputs
10398 `(("python2-enum34" ,python2-enum34)
10399 ,@(package-inputs base))))))
a9ac982a
DC
10400
10401(define-public python-nltk
10402 (package
10403 (name "python-nltk")
10404 (version "3.2.1")
10405 (source (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "nltk" version))
10408 (sha256
10409 (base32
10410 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10411 (build-system python-build-system)
10412 (home-page "http://nltk.org/")
10413 (synopsis "Natural Language Toolkit")
10414 (description "It provides interfaces to over 50 corpora and lexical
10415resources such as WordNet, along with a suite of text processing libraries
10416for classification, tokenization, stemming, tagging, parsing, and semantic
10417reasoning, wrappers for natural language processing libraries.")
10418 (license license:asl2.0)
10419 (properties `((python2-variant . ,(delay python2-nltk))))))
10420
10421(define-public python2-nltk
10422 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10423 (package (inherit base)
10424 (native-inputs
10425 `(("python2-setuptools" ,python2-setuptools)
10426 ,@(package-native-inputs base))))))
691cd90d
DC
10427
10428(define-public python-pymongo
10429 (package
10430 (name "python-pymongo")
10431 (version "3.3.0")
10432 (source (origin
10433 (method url-fetch)
10434 (uri (pypi-uri "pymongo" version))
10435 (sha256
10436 (base32
10437 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10438 (build-system python-build-system)
10439 (inputs
10440 `(("python-certifi" ,python-certifi)))
10441 (home-page "http://github.com/mongodb/mongo-python-driver")
10442 (synopsis "Python driver for MongoDB")
10443 (description "Python driver for MongoDB.")
10444 (license license:asl2.0)
10445 (properties `((python2-variant . ,(delay python2-pymongo))))))
10446
10447(define-public python2-pymongo
10448 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10449 (package (inherit base)
10450 (native-inputs
10451 `(("python2-setuptools" ,python2-setuptools)
10452 ,@(package-native-inputs base))))))
6a6c9d43
DC
10453
10454(define-public python-sh
10455 (package
10456 (name "python-sh")
10457 (version "1.11")
10458 (source (origin
10459 (method url-fetch)
10460 (uri (pypi-uri "sh" version))
10461 (sha256
10462 (base32
10463 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10464 (build-system python-build-system)
10465 (arguments
10466 `(#:tests? #f)) ; no tests
10467 (home-page "https://github.com/amoffat/sh")
10468 (synopsis "Python subprocess interface")
10469 (description "Abstracts process invocation by providing a function
10470interface for programs.")
10471 (license license:expat)
10472 (properties `((python2-variant . ,(delay python2-sh))))))
10473
10474(define-public python2-sh
10475 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10476 (package (inherit base)
10477 (native-inputs
10478 `(("python2-setuptools" ,python2-setuptools)
10479 ,@(package-native-inputs base))))))
05b59190 10480
25702397
EF
10481(define-public python-consul
10482 (package
10483 (name "python-consul")
10484 (version "0.6.1")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "python-consul" version))
10489 (sha256
10490 (base32
10491 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10492 (build-system python-build-system)
10493 (native-inputs
10494 `(("python-pytest" ,python-pytest)
10495 ("python-requests" ,python-requests)
10496 ("python-six" ,python-six)))
10497 (home-page "https://github.com/cablehead/python-consul")
10498 (synopsis "Python client for Consul")
10499 (description
10500 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10501discovery, monitoring and configuration.")
10502 (license license:expat)))
10503
10504(define-public python2-consul
10505 (let ((consul (package-with-python2 python-consul)))
10506 (package (inherit consul)
10507 (native-inputs
10508 `(("python2-setuptools" ,python2-setuptools)
10509 ,@(package-native-inputs consul))))))
10510
05b59190
DC
10511(define-public python-schematics
10512 (package
10513 (name "python-schematics")
10514 (version "1.1.1")
10515 (source
10516 (origin
10517 (method url-fetch)
10518 (uri (string-append
10519 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10520 (file-name (string-append name "-" version ".tar.gz"))
10521 (sha256
10522 (base32
10523 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10524 (build-system python-build-system)
10525 (inputs
10526 `(("python-six" ,python-six)))
10527 (arguments
10528 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10529 ; version requirements (eg python-coveralls)
10530 (home-page "https://github.com/schematics/schematics")
10531 (synopsis "Python Data Structures for Humans")
10532 (description "Python Data Structures for Humans.")
10533 (license license:bsd-3)
10534 (properties `((python2-variant . ,(delay python2-schematics))))))
10535
10536(define-public python2-schematics
10537 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10538 (package (inherit base)
10539 (native-inputs
10540 `(("python2-setuptools" ,python2-setuptools)
10541 ,@(package-native-inputs base))))))
d6907ff7
DC
10542
10543(define-public python-publicsuffix
10544 (package
10545 (name "python-publicsuffix")
10546 (version "1.1.0")
10547 (source (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "publicsuffix" version))
10550 (sha256
10551 (base32
10552 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10553 (build-system python-build-system)
10554 (arguments
10555 `(#:tests? #f)) ; tests use the internet
10556 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10557 (synopsis "Get suffix for a domain name")
10558 (description "Get a public suffix for a domain name using the Public Suffix
10559List.")
10560 (license license:expat)
10561 (properties `((python2-variant . ,(delay python2-nltk))))))
10562
10563(define-public python2-publicsuffix
10564 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10565 (package (inherit base)
10566 (native-inputs
10567 `(("python2-setuptools" ,python2-setuptools)
10568 ,@(package-native-inputs base))))))
b2319996
DC
10569
10570(define-public python-publicsuffix2
10571 (package
10572 (name "python-publicsuffix2")
10573 (version "2.20160621")
10574 (source
10575 (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10578 (sha256
10579 (base32
10580 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10581 (build-system python-build-system)
10582 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10583 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10584 (description "Get a public suffix for a domain name using the Public Suffix
10585List. Forked from and using the same API as the publicsuffix package.")
10586 (license (list license:expat license:mpl2.0))
10587 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10588
10589(define-public python2-publicsuffix2
10590 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10591 (package (inherit base)
10592 (native-inputs
10593 `(("python2-setuptools" ,python2-setuptools)
10594 ,@(package-native-inputs base))))))
81f1515d
DC
10595
10596(define-public python-url
10597 (package
10598 (name "python-url")
10599 (version "0.2.0")
10600 (source (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "url" version))
10603 (sha256
10604 (base32
10605 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10606 (build-system python-build-system)
10607 (inputs
10608 `(("python-publicsuffix" ,python-publicsuffix)))
10609 (native-inputs
10610 `(("python-coverage" ,python-coverage)
10611 ("python-nose" ,python-nose)))
10612 (arguments
10613 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10614 (home-page "http://github.com/seomoz/url-py")
10615 (synopsis "URL Parsing")
10616 (description "Library for parsing urls.")
10617 (license license:expat)
10618 (properties `((python2-variant . ,(delay python2-url))))))
10619
10620(define-public python2-url
10621 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10622 (package (inherit base)
10623 (inputs
10624 `(("python2-publicsuffix" ,python2-publicsuffix)))
10625 (native-inputs
10626 `(("python2-setuptools" ,python2-setuptools)
10627 ,@(package-native-inputs base))))))
974ee2c1
TS
10628
10629(define-public python-freezegun
10630 (package
10631 (name "python-freezegun")
10632 (version "0.3.7")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "freezegun" version))
10637 (sha256
10638 (base32
10639 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10640 (build-system python-build-system)
10641 (native-inputs
10642 `(("python-mock" ,python-mock)
10643 ("python-nose" ,python-nose)
10644 ("python-coverage" ,python-coverage)
10645 ("python-dateutil-2" ,python-dateutil-2)))
10646 (inputs
10647 `(("python-six" ,python-six)))
10648 (arguments
10649 `(#:phases (modify-phases %standard-phases
10650 ;; The tests are normally executed via `make test`, but the PyPi
10651 ;; package does not include the Makefile.
10652 (replace 'check
10653 (lambda _
10654 (zero? (system* "nosetests" "./tests/")))))))
10655 (home-page "https://github.com/spulec/freezegun")
10656 (synopsis "Test utility for mocking the datetime module")
10657 (description
10658 "FreezeGun is a library that allows your python tests to travel through
10659time by mocking the datetime module.")
10660 (license license:asl2.0)))
10661
10662(define-public python2-freezegun
10663 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10664 (package (inherit base)
10665 (native-inputs
10666 `(("python2-setuptools" ,python2-setuptools)
10667 ,@(package-native-inputs base))))))
dddcb25c
MB
10668
10669(define-public python-odfpy
10670 (package
10671 (name "python-odfpy")
10672 (version "1.3.3")
10673 (source (origin
10674 (method url-fetch)
10675 (uri (pypi-uri "odfpy" version))
10676 (sha256
10677 (base32
10678 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10679 (arguments
10680 `(#:modules ((srfi srfi-1)
10681 (guix build python-build-system)
10682 (guix build utils))
10683 #:phases
10684 (modify-phases %standard-phases
10685 (replace 'check
10686 ;; The test runner invokes python2 and python3 for test*.py.
10687 ;; To avoid having both in inputs, we replicate it here.
10688 (lambda _
10689 (every (lambda (test-file)
10690 (zero? (system* "python" test-file)))
10691 (find-files "tests" "^test.*\\.py$")))))))
10692 (build-system python-build-system)
10693 (home-page "https://github.com/eea/odfpy")
10694 (synopsis "Python API and tools to manipulate OpenDocument files")
10695 (description "Collection of libraries and utility programs written in
10696Python to manipulate OpenDocument 1.2 files.")
10697 (license
10698 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10699 ;; number of files with other licenses.
10700 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10701
10702(define-public python2-odfpy
10703 (package-with-python2 python-odfpy))
b30565bd
MB
10704
10705(define-public python-cachecontrol
10706 (package
10707 (name "python-cachecontrol")
10708 (version "0.11.6")
10709 (source
10710 (origin
10711 (method url-fetch)
10712 ;; Pypi does not have tests.
10713 (uri (string-append
10714 "https://github.com/ionrock/cachecontrol/archive/v"
10715 version ".tar.gz"))
10716 (file-name (string-append name "-" version ".tar.gz"))
10717 (sha256
10718 (base32
10719 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10720 (build-system python-build-system)
10721 (arguments
10722 `(#:phases
10723 (modify-phases %standard-phases
10724 (replace 'check
10725 (lambda _
10726 ;; Drop test that requires internet access.
10727 (delete-file "tests/test_regressions.py")
10728 (setenv "PYTHONPATH"
10729 (string-append (getcwd) "/build/lib:"
10730 (getenv "PYTHONPATH")))
10731 (zero? (system* "py.test" "-vv")))))))
10732 (native-inputs
10733 `(("python-pytest" ,python-pytest)
10734 ("python-redis" ,python-redis)
10735 ("python-webtest" ,python-webtest)
10736 ("python-mock" ,python-mock)))
10737 (propagated-inputs
10738 `(("python-requests" ,python-requests)
10739 ("python-lockfile" ,python-lockfile)))
10740 (home-page "https://github.com/ionrock/cachecontrol")
10741 (synopsis "The httplib2 caching algorithms for use with requests")
10742 (description "CacheControl is a port of the caching algorithms in
10743@code{httplib2} for use with @code{requests} session objects.")
10744 (license license:asl2.0)
dd447621 10745 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
10746
10747(define-public python2-cachecontrol
10748 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10749 (package (inherit base)
10750 (native-inputs
10751 `(("python2-setuptools" ,python2-setuptools)
10752 ,@(package-native-inputs base))))))
243db824
DM
10753
10754(define-public python-lit
10755 (package
10756 (name "python-lit")
10757 (version "0.5.0")
10758 (source
10759 (origin
10760 (method url-fetch)
10761 (uri (pypi-uri "lit" version))
10762 (sha256
10763 (base32
10764 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10765 (build-system python-build-system)
10766 (home-page "http://llvm.org/")
10767 (synopsis "LLVM Software Testing Tool")
10768 (description "@code{lit} is a portable tool for executing LLVM and Clang
10769style test suites, summarizing their results, and providing indication of
10770failures.")
10771 (license license:ncsa)
10772 (properties `((python2-variant . ,(delay python2-lit))))))
10773
10774(define-public python2-lit
10775 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10776 (package
10777 (inherit base)
10778 (native-inputs
10779 `(("python2-setuptools" ,python2-setuptools)
10780 ,@(package-native-inputs base))))))
66f95b20
MB
10781
10782(define-public python-pytest-pep8
10783 (package
10784 (name "python-pytest-pep8")
10785 (version "1.0.6")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "pytest-pep8" version))
10789 (sha256
10790 (base32
10791 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10792 (build-system python-build-system)
10793 (arguments
10794 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10795 ;; Prevent creation of the egg. This works around
10796 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10797 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10798 (native-inputs
10799 `(("python-pytest" ,python-pytest)))
10800 (propagated-inputs
10801 `(("python-pep8" ,python-pep8)))
10802 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10803 (synopsis "Py.test plugin to check PEP8 requirements")
10804 (description "Pytest plugin for checking PEP8 compliance.")
10805 (license license:expat)
10806 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10807
10808(define-public python2-pytest-pep8
10809 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10810 (package (inherit base)
10811 (native-inputs
10812 `(("python2-setuptools" ,python2-setuptools)
10813 ,@(package-native-inputs base))))))
df94a6b5
MB
10814
10815(define-public python-pytest-flakes
10816 (package
10817 (name "python-pytest-flakes")
10818 (version "1.0.1")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "pytest-flakes" version))
10822 (sha256
10823 (base32
10824 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10825 (build-system python-build-system)
10826 (arguments
10827 `(;; Prevent creation of the egg. This works around
10828 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10829 #:configure-flags '("--single-version-externally-managed" "--root=/")
10830 #:phases
10831 (modify-phases %standard-phases
10832 (delete 'check)
10833 (add-after 'install 'check
10834 (lambda _ ; It's easier to run tests after install.
10835 (zero? (system* "py.test" "-vv")))))))
10836 (native-inputs
10837 `(("python-coverage" ,python-coverage)
10838 ("python-pytest" ,python-pytest)
10839 ("python-pytest-cache" ,python-pytest-cache)
10840 ("python-pytest-pep8" ,python-pytest-pep8)))
10841 (propagated-inputs
10842 `(("python-pyflakes" ,python-pyflakes)))
10843 (home-page "https://github.com/fschulze/pytest-flakes")
10844 (synopsis "Py.test plugin to check source code with pyflakes")
10845 (description "Pytest plugin for checking Python source code with pyflakes.")
10846 (license license:expat)
10847 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10848
10849(define-public python2-pytest-flakes
10850 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10851 (package (inherit base)
10852 (native-inputs
10853 `(("python2-setuptools" ,python2-setuptools)
10854 ,@(package-native-inputs base))))))
5467ea62
MB
10855
10856(define-public python-natsort
10857 (package
10858 (name "python-natsort")
10859 (version "5.0.1")
10860 (source (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "natsort" version))
10863 (sha256
10864 (base32
10865 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10866 (build-system python-build-system)
10867 (arguments
10868 `(#:phases
10869 (modify-phases %standard-phases
10870 (add-before 'check 'set-cachedir
10871 ;; Tests require write access to $HOME by default
10872 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10873 (native-inputs
10874 `(("python-hypothesis" ,python-hypothesis)
10875 ("python-pytest-cache" ,python-pytest-cache)
10876 ("python-pytest-cov" ,python-pytest-cov)
10877 ("python-pytest-flakes" ,python-pytest-flakes)
10878 ("python-pytest-pep8" ,python-pytest-pep8)))
10879 (propagated-inputs ; TODO: Add python-fastnumbers.
10880 `(("python-pyicu" ,python-pyicu)))
10881 (home-page "https://github.com/SethMMorton/natsort")
10882 (synopsis "Natural sorting for python and shell")
10883 (description
10884 "Natsort lets you apply natural sorting on lists instead of
10885lexicographical. If you use the built-in @code{sorted} method in python
10886on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10887returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10888function @code{natsorted} that identifies numbers and sorts them separately
10889from strings. It can also sort version numbers, real numbers, mixed types
10890and more, and comes with a shell command @command{natsort} that exposes this
10891functionality in the command line.")
10892 (license license:expat)
10893 (properties `((python2-variant . ,(delay python2-natsort))))))
10894
10895(define-public python2-natsort
10896 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10897 (package (inherit base)
10898 (native-inputs
10899 `(("python2-setuptools" ,python2-setuptools)
10900 ("python2-pathlib" ,python2-pathlib)
10901 ("python2-mock" ,python2-mock)
10902 ("python2-enum34" ,python2-enum34)
10903 ,@(package-native-inputs base))))))
4efb9c54
SR
10904
10905(define-public python-glances
10906 (package
10907 (name "python-glances")
10908 (version "2.7.1")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "Glances" version))
10913 (sha256
10914 (base32
10915 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10916 (build-system python-build-system)
10917 (inputs
10918 `(("python-psutil" ,python-psutil)))
10919 (home-page
10920 "https://github.com/nicolargo/glances")
10921 (synopsis
10922 "A cross-platform curses-based monitoring tool")
10923 (description
10924 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10925Glances uses the PsUtil library to get information from your system. It monitors
10926CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10927 (license license:lgpl3+)
10928 (properties `((python2-variant . ,(delay python2-glances))))))
10929
10930(define-public python2-glances
10931 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
10932 (package
10933 (inherit base)
10934 (native-inputs
10935 `(("python2-setuptools" ,python2-setuptools)
10936 ,@(package-native-inputs base))))))
05b7a593
EF
10937
10938(define-public python-graphql-core
10939 (package
10940 (name "python-graphql-core")
10941 (version "0.5.3")
10942 (source
10943 (origin
10944 (method url-fetch)
10945 (uri (pypi-uri "graphql-core" version))
10946 (sha256
10947 (base32
10948 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10949 (build-system python-build-system)
10950 (arguments
10951 `(#:phases
10952 (modify-phases %standard-phases
10953 (add-after 'unpack 'patch-hardcoded-version
10954 (lambda _ (substitute*
10955 "setup.py"
10956 (("'gevent==1.1rc1'") "'gevent'"))
10957 #t)))))
10958 (native-inputs
10959 `(("python-gevent" ,python-gevent)
10960 ("python-mock" ,python-mock)
10961 ("python-pytest-mock" ,python-pytest-mock)))
10962 (inputs
10963 `(("python-promise" ,python-promise)
10964 ("python-six" ,python-six)))
10965 (home-page "https://github.com/graphql-python/graphql-core")
10966 (synopsis "GraphQL implementation for Python")
10967 (description
10968 "GraphQL implementation for Python. GraphQL is a data query language and
10969runtime designed and used to request and deliver data to mobile and web apps.
10970This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10971to Python.")
10972 (properties `((python2-variant . ,(delay python2-graphql-core))))
10973 (license license:expat)))
10974
10975(define-public python2-graphql-core
10976 (let ((base (package-with-python2
10977 (strip-python2-variant python-graphql-core))))
10978 (package (inherit base)
10979 (native-inputs
10980 `(("python2-setuptools" ,python2-setuptools)
10981 ,@(package-native-inputs base))))))
7ee51575
EF
10982
10983(define-public python-graphql-relay
10984 (package
10985 (name "python-graphql-relay")
10986 (version "0.4.4")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "graphql-relay" version))
10991 (sha256
10992 (base32
10993 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
10994 (build-system python-build-system)
10995 (native-inputs
10996 `(("python-pytest" ,python-pytest)))
10997 (inputs
10998 `(("python-graphql-core" ,python-graphql-core)
10999 ("python-promise" ,python-promise)
11000 ("python-six" ,python-six)))
11001 (home-page "https://github.com/graphql-python/graphql-relay-py")
11002 (synopsis "Relay implementation for Python")
11003 (description
11004 "This is a library to allow the easy creation of Relay-compliant servers
11005using the GraphQL Python reference implementation of a GraphQL server. It
11006should be noted that the code is a exact port of the original
11007@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11008from Facebook.")
11009 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11010 (license license:expat)))
11011
11012(define-public python2-graphql-relay
11013 (let ((base (package-with-python2
11014 (strip-python2-variant python-graphql-relay))))
11015 (package (inherit base)
11016 (native-inputs
11017 `(("python2-setuptools" ,python2-setuptools)
11018 ,@(package-native-inputs base))))))
ddc63a56
EF
11019
11020(define-public python-graphene
11021 (package
11022 (name "python-graphene")
11023 (version "0.10.2")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "graphene" version))
11028 (sha256
11029 (base32
11030 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11031 (build-system python-build-system)
11032 (native-inputs
11033 `(("python-django-filter" ,python-django-filter)
11034 ("python-mock" ,python-mock)
11035 ("python-psycopg2" ,python-psycopg2)
11036 ("python-pytest-django" ,python-pytest-django)
11037 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11038 (inputs
11039 `(("python-graphql-core" ,python-graphql-core)
11040 ("python-graphql-relay" ,python-graphql-relay)
11041 ("python-iso8601" ,python-iso8601)
11042 ("python-promise" ,python-promise)
11043 ("python-six" ,python-six)))
11044 (home-page "http://graphene-python.org/")
11045 (synopsis "GraphQL Framework for Python")
11046 (description
11047 "Graphene is a Python library for building GraphQL schemas/types.
11048A GraphQL schema describes your data model, and provides a GraphQL server
11049with an associated set of resolve methods that know how to fetch data.")
11050 (properties `((python2-variant . ,(delay python2-graphene))))
11051 (license license:expat)))
11052
11053(define-public python2-graphene
11054 (let ((base (package-with-python2
11055 (strip-python2-variant python-graphene))))
11056 (package (inherit base)
11057 (native-inputs
11058 `(("python2-setuptools" ,python2-setuptools)
11059 ("python2-sqlalchemy" ,python2-sqlalchemy)
11060 ,@(package-native-inputs base))))))
d488d5d6
EF
11061
11062(define-public python-nautilus
11063 (package
11064 (name "python-nautilus")
11065 (version "0.4.9")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "nautilus" version))
11070 (sha256
11071 (base32
11072 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11073 (build-system python-build-system)
11074 (arguments `(#:tests? #f)) ; fails to import test modules
11075 (native-inputs
11076 `(("python-setuptools" ,python-setuptools)))
11077 (inputs
11078 `(("python-bcrypt" ,python-bcrypt)
11079 ("python-click" ,python-click)
11080 ("python-consul" ,python-consul)
11081 ("python-graphql-core" ,python-graphql-core)
11082 ("python-graphql-relay" ,python-graphql-relay)
11083 ("python-graphene" ,python-graphene)
11084 ("python-jinja2" ,python-jinja2)
11085 ("python-nose2" ,python-nose2)
11086 ("python-peewee" ,python-peewee)
11087 ("python-pika" ,python-pika)
11088 ("python-pycparser" ,python-pycparser)
11089 ("python-requests" ,python-requests)
11090 ("python-tornado" ,python-tornado)
11091 ("python-wtforms" ,python-wtforms)))
11092 (home-page "https://github.com/AlecAivazis/nautilus")
11093 (synopsis "Library for creating microservice applications")
11094 (description
11095 "Nautilus is a framework for flux based microservices that looks to
11096provide extendible implementations of common aspects of a cloud so that you can
11097focus on building massively scalable web applications.")
11098 (license license:expat)))
94cffc63
LF
11099
11100(define-public python-s3transfer
11101 (package
11102 (name "python-s3transfer")
11103 (version "0.1.8")
11104 (source (origin
11105 (method url-fetch)
11106 (uri (pypi-uri "s3transfer" version))
11107 (sha256
11108 (base32
11109 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11110 (build-system python-build-system)
11111 (native-inputs
11112 `(("python-docutils" ,python-docutils)))
11113 (inputs
11114 `(("python-botocore" ,python-botocore)))
11115 (synopsis "Amazon S3 Transfer Manager")
11116 (description "S3transfer is a Python library for managing Amazon S3
11117transfers.")
11118 (home-page "https://github.com/boto/s3transfer")
11119 (license license:asl2.0)
11120 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11121
11122(define-public python2-s3transfer
11123 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11124 (package
11125 (inherit base)
11126 (native-inputs
11127 `(("python2-futures" ,python2-futures)
11128 ("python2-setuptools" ,python2-setuptools)
11129 ,@(package-native-inputs base))))))
8ab59181
HG
11130
11131(define-public python-setproctitle
11132(package
11133 (name "python-setproctitle")
11134 (version "1.1.10")
11135 (source
11136 (origin
11137 (method url-fetch)
11138 (uri (pypi-uri "setproctitle" version))
11139 (sha256
11140 (base32
11141 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11142 (build-system python-build-system)
11143 (arguments
11144 '(#:phases
11145 (modify-phases %standard-phases
11146 (add-before 'check 'patch-Makefile
11147 ;; Stricly this is only required for the python2 variant.
11148 ;; But adding a phase in an inherited package seems to be
11149 ;; cumbersum. So we patch even for python3.
11150 (lambda _
11151 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11152 (when nose
11153 (substitute* "Makefile"
11154 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11155 (string-append nose "/bin/nosetests "))))
11156 #t)))
11157 (replace 'check
11158 (lambda _
11159 (setenv "PYTHON" (or (which "python3") (which "python")))
11160 (setenv "PYCONFIG" (or (which "python3-config")
11161 (which "python-config")))
11162 (setenv "CC" "gcc")
11163 ;; No need to extend PYTHONPATH to find the built package, since
11164 ;; the Makefile will build anyway
11165 (zero? (system* "make" "check")))))))
11166 (native-inputs
11167 `(("procps" ,procps))) ; required for tests
11168 (home-page
11169 "https://github.com/dvarrazzo/py-setproctitle")
11170 (synopsis
11171 "Setproctitle implementation for Python to customize the process title")
11172 (description "The library allows a process to change its title (as displayed
11173by system tools such as ps and top).
11174
11175Changing the title is mostly useful in multi-process systems, for
11176example when a master process is forked: changing the children's title
11177allows to identify the task each process is busy with. The technique
11178is used by PostgreSQL and the OpenSSH Server for example.")
11179 (license license:bsd-3)
11180 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11181
11182(define-public python2-setproctitle
11183 (let ((base (package-with-python2
11184 (strip-python2-variant python-setproctitle))))
11185 (package
11186 (inherit base)
11187 (native-inputs `(("python2-nose" ,python2-nose)
11188 ,@(package-native-inputs base))))))
162e42d8
HG
11189
11190(define-public python-validictory
11191 (package
11192 (name "python-validictory")
11193 (version "1.0.1")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "validictory" version))
11198 (sha256
11199 (base32
11200 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11201 (build-system python-build-system)
11202 (arguments
11203 '(#:phases
11204 (modify-phases %standard-phases
11205 (add-after 'unpack 'bootstrap
11206 ;; Move the tests out of the package directory to avoid
11207 ;; packaging them.
11208 (lambda* _
11209 (rename-file "validictory/tests" "tests")
11210 (delete-file "tests/__init__.py")))
11211 (replace 'check
11212 (lambda _
11213 ;; Extend PYTHONPATH so the built package will be found.
11214 (setenv "PYTHONPATH"
11215 (string-append (getcwd) "/build/lib:"
11216 (getenv "PYTHONPATH")))
11217 (zero? (system* "py.test" "-vv" )))))))
11218 (native-inputs
11219 `(("python-pytest" ,python-pytest)))
11220 (home-page
11221 "https://github.com/jamesturk/validictory")
11222 (synopsis "General purpose Python data validator")
11223 (description "It allows validation of arbitrary Python data structures.
11224
11225The schema format is based on the JSON Schema
11226proposal (http://json-schema.org), so combined with json the library is also
11227useful as a validator for JSON data.")
7ca68304
EF
11228 (license license:expat)
11229 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
11230
11231(define-public python2-validictory
7ca68304
EF
11232 (let ((base (package-with-python2
11233 (strip-python2-variant python-validictory))))
11234 (package
11235 (inherit base)
11236 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11237 ,@(package-native-inputs base))))))
0990edfe
DM
11238
11239(define-public python-aniso8601
11240 (package
11241 (name "python-aniso8601")
11242 (version "1.1.0")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (pypi-uri "aniso8601" version))
11247 (sha256
11248 (base32
11249 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11250 (build-system python-build-system)
11251 (propagated-inputs
11252 `(("python-dateutil-2" ,python-dateutil-2)))
11253 (home-page
11254 "https://bitbucket.org/nielsenb/aniso8601")
11255 (synopsis
11256 "Python library for parsing ISO 8601 strings")
11257 (description
11258 "This package contains a library for parsing ISO 8601 datetime strings.")
11259 (license license:bsd-3)))
999d964d
DM
11260
11261(define-public python-flask-restful
11262 (package
11263 (name "python-flask-restful")
11264 (version "0.3.5")
11265 (source
11266 (origin
11267 (method url-fetch)
11268 (uri (pypi-uri "Flask-RESTful" version))
11269 (sha256
11270 (base32
11271 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11272 (build-system python-build-system)
11273 (propagated-inputs
11274 `(("python-aniso8601" ,python-aniso8601)
11275 ("python-flask" ,python-flask)
11276 ("python-pycrypto" ,python-pycrypto)
11277 ("python-pytz" ,python-pytz)))
11278 (native-inputs
11279 `(;; Optional dependency of Flask. Tests need it.
11280 ("python-blinker" ,python-blinker)
11281 ("python-mock" ,python-mock) ; For tests
11282 ("python-nose" ,python-nose) ; For tests
11283 ("python-sphinx" ,python-sphinx)))
11284 (home-page
11285 "https://www.github.com/flask-restful/flask-restful/")
11286 (synopsis
11287 "Flask module for creating REST APIs")
11288 (description
11289 "This package contains a Flask module for creating REST APIs.")
11290 (license license:bsd-3)))
31288222
DM
11291
11292(define-public python-flask-basicauth
11293 (package
11294 (name "python-flask-basicauth")
11295 (version "0.2.0")
11296 (source
11297 (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "Flask-BasicAuth" version))
11300 (sha256
11301 (base32
11302 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11303 (build-system python-build-system)
11304 (propagated-inputs
11305 `(("python-flask" ,python-flask)))
11306 (home-page
11307 "https://github.com/jpvanhal/flask-basicauth")
11308 (synopsis
11309 "HTTP basic access authentication for Flask")
11310 (description
11311 "This package provides HTTP basic access authentication for Flask.")
11312 (license license:bsd-3)))
903276d0
DM
11313
11314(define-public python-flask-sqlalchemy
11315 (package
11316 (name "python-flask-sqlalchemy")
11317 (version "2.1")
11318 (source
11319 (origin
11320 (method url-fetch)
11321 (uri (pypi-uri "Flask-SQLAlchemy" version))
11322 (sha256
11323 (base32
11324 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11325 (build-system python-build-system)
11326 (propagated-inputs
11327 `(("python-flask" ,python-flask)
11328 ("python-sqlalchemy" ,python-sqlalchemy)))
11329 (home-page
11330 "http://github.com/mitsuhiko/flask-sqlalchemy")
11331 (synopsis
11332 "Module adding SQLAlchemy support to your Flask application")
11333 (description
11334 "This package adds SQLAlchemy support to your Flask application.")
11335 (license license:bsd-3)))