gnu: youtube-dl: Disable the tests.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
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")
f0499100 109 (version "2.7.12")
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
f0499100 117 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
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"
f0499100 129 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
130 "Lib/test/test_distutils.py"
131 "Lib/test/test_import.py"
132 "Lib/test/test_shutil.py"
133 "Lib/test/test_socket.py"
1bb163b0 134 "Lib/test/test_subprocess.py"))
10a42aa2 135 #t))))
02f0c3b2
LC
136 (outputs '("out"
137 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 138 (build-system gnu-build-system)
3fdc99da 139 (arguments
10a42aa2 140 `(;; 356 tests OK.
e7e7a1eb
EF
141 ;; 6 tests failed:
142 ;; test_compileall test_distutils test_import test_shutil test_socket
143 ;; test_subprocess
144 ;; 39 tests skipped:
ff6f33cf
ED
145 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
146 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
147 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
148 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
149 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
150 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
151 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
152 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
153 ;; test_winreg test_winsound test_zipfile64
154 ;; 4 skips unexpected on linux2:
155 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 156 #:test-target "test"
3fdc99da 157 #:configure-flags
6a20289d
LC
158 (list "--enable-shared" ;allow embedding
159 "--with-system-ffi" ;build ctypes
160 (string-append "LDFLAGS=-Wl,-rpath="
161 (assoc-ref %outputs "out") "/lib"))
fd982732 162
d2cc9c7c
LC
163 #:modules ((ice-9 ftw) (ice-9 match)
164 (guix build utils) (guix build gnu-build-system))
fd982732 165 #:phases
46472ecd
MW
166 (modify-phases %standard-phases
167 (add-before
168 'configure 'patch-lib-shells
169 (lambda _
170 ;; Filter for existing files, since some may not exist in all
171 ;; versions of python that are built with this recipe.
172 (substitute* (filter file-exists?
173 '("Lib/subprocess.py"
174 "Lib/popen2.py"
175 "Lib/distutils/tests/test_spawn.py"
176 "Lib/test/test_subprocess.py"))
177 (("/bin/sh") (which "sh")))
dedc8320
LC
178
179 ;; Use zero as the timestamp in .pyc files so that builds are
180 ;; deterministic. TODO: Remove it when this variable is set in
181 ;; gnu-build-system.scm.
a665996f 182 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 183 #t))
5b4e2791
LC
184 (add-before 'configure 'do-not-record-configure-flags
185 (lambda* (#:key configure-flags #:allow-other-keys)
186 ;; Remove configure flags from the installed '_sysconfigdata.py'
187 ;; and 'Makefile' so we don't end up keeping references to the
188 ;; build tools.
189 ;;
190 ;; Preserve at least '--with-system-ffi' since otherwise the
191 ;; thing tries to build libffi, fails, and we end up with a
192 ;; Python that lacks ctypes.
193 (substitute* "configure"
194 (("^CONFIG_ARGS=.*$")
195 (format #f "CONFIG_ARGS='~a'\n"
196 (if (member "--with-system-ffi" configure-flags)
197 "--with-system-ffi"
198 ""))))
199 #t))
46472ecd
MW
200 (add-before
201 'check 'pre-check
202 (lambda _
203 ;; 'Lib/test/test_site.py' needs a valid $HOME
204 (setenv "HOME" (getcwd))
205 #t))
206 (add-after
207 'unpack 'set-source-file-times-to-1980
208 ;; XXX One of the tests uses a ZIP library to pack up some of the
209 ;; source tree, and fails with "ZIP does not support timestamps
210 ;; before 1980". Work around this by setting the file times in the
211 ;; source tree to sometime in early 1980.
212 (lambda _
213 (let ((circa-1980 (* 10 366 24 60 60)))
214 (ftw "." (lambda (file stat flag)
215 (utime file circa-1980 circa-1980)
216 #t))
02f0c3b2 217 #t)))
9ffe61b0
LC
218 (add-after 'install 'remove-tests
219 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
220 ;; because these files are used by some libraries out there.
221 (lambda* (#:key outputs #:allow-other-keys)
222 (let ((out (assoc-ref outputs "out")))
223 (match (scandir (string-append out "/lib")
224 (lambda (name)
225 (string-prefix? "python" name)))
226 ((pythonX.Y)
227 (let ((testdir (string-append out "/lib/" pythonX.Y
228 "/test")))
229 (with-directory-excursion testdir
230 (for-each delete-file-recursively
231 (scandir testdir
232 (match-lambda
233 ((or "." "..") #f)
234 (file
235 (not
236 (string-prefix? "test_support."
237 file))))))
238 (call-with-output-file "__init__.py" (const #t))
239 #t)))))))
216c283b
LC
240 (add-before 'strip 'make-libraries-writable
241 (lambda* (#:key outputs #:allow-other-keys)
242 ;; Make .so files writable so they can be stripped.
243 (let ((out (assoc-ref outputs "out")))
244 (for-each (lambda (file)
245 (chmod file #o755))
246 (find-files (string-append out "/lib")
247 "\\.so"))
248 #t)))
02f0c3b2
LC
249 (add-after 'install 'move-tk-inter
250 (lambda* (#:key outputs #:allow-other-keys)
251 ;; When Tkinter support is built move it to a separate output so
252 ;; that the main output doesn't contain a reference to Tcl/Tk.
253 (let ((out (assoc-ref outputs "out"))
254 (tk (assoc-ref outputs "tk")))
255 (when tk
256 (match (find-files out "tkinter.*\\.so")
257 ((tkinter.so)
258 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
259 ;; want it under TK/lib/pythonX.Y/site-packages.
260 (let* ((len (string-length out))
261 (target (string-append
262 tk "/"
263 (string-drop
264 (dirname (dirname tkinter.so))
265 len)
266 "/site-packages")))
267 (install-file tkinter.so target)
268 (delete-file tkinter.so)))))
269 #t))))))
a01b6da7 270 (inputs
3fdc99da
CR
271 `(("bzip2" ,bzip2)
272 ("gdbm" ,gdbm)
b10ab723 273 ("libffi" ,libffi) ; for ctypes
b88e1b0a 274 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 275 ("openssl" ,openssl)
3fdc99da 276 ("readline" ,readline)
afa181ff
LC
277 ("zlib" ,zlib)
278 ("tcl" ,tcl)
279 ("tk" ,tk))) ; for tkinter
b10ab723
CR
280 (native-inputs
281 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
282 (native-search-paths
283 (list (search-path-specification
284 (variable "PYTHONPATH")
af070955 285 (files '("lib/python2.7/site-packages")))))
f0499100 286 (home-page "https://www.python.org")
afa181ff 287 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
288 (description
289 "Python is a remarkably powerful dynamic programming language that
290is used in a wide variety of application domains. Some of its key
291distinguishing features include: clear, readable syntax; strong
292introspection capabilities; intuitive object orientation; natural
293expression of procedural code; full modularity, supporting hierarchical
294packages; exception-based error handling; and very high level dynamic
295data types.")
3f641af0 296 (license license:psfl)))
acc26ff1 297
45848023
HG
298;; Current 2.x version.
299(define-public python-2 python-2.7)
300
72df6680 301(define-public python-3.5
b24d1cfc 302 (package (inherit python-2)
72df6680 303 (version "3.5.2")
717003e3
LC
304 (source (origin
305 (method url-fetch)
306 (uri (string-append "https://www.python.org/ftp/python/"
307 version "/Python-" version ".tar.xz"))
fc1adab1
AK
308 (patches (search-patches
309 "python-fix-tests.patch"
72df6680 310 "python-3.5-fix-tests.patch"
fc1adab1
AK
311 "python-3-deterministic-build-info.patch"
312 "python-3-search-paths.patch"))
717003e3
LC
313 (patch-flags '("-p0"))
314 (sha256
315 (base32
72df6680 316 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
317 (arguments (substitute-keyword-arguments (package-arguments python-2)
318 ((#:tests? _) #t)))
1aebc0cb
AE
319 (native-search-paths
320 (list (search-path-specification
321 (variable "PYTHONPATH")
0e05d01e
SB
322 (files (list (string-append "lib/python"
323 (version-major+minor version)
324 "/site-packages"))))))))
f26a77ff 325
72df6680
LF
326(define-public python-3.4
327 (package (inherit python-3.5)
328 (version "3.4.5")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "https://www.python.org/ftp/python/"
332 version "/Python-" version ".tar.xz"))
333 (patches (search-patches
334 "python-fix-tests.patch"
335 "python-3.4-fix-tests.patch"
336 "python-3-deterministic-build-info.patch"
337 "python-3-search-paths.patch"))
338 (patch-flags '("-p0"))
339 (sha256
340 (base32
341 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
342
45848023 343;; Current 3.x version.
72df6680 344(define-public python-3 python-3.5)
45848023
HG
345
346;; Current major version.
347(define-public python python-3)
348
95288fcc
LC
349;; Minimal variants of Python, mostly used to break the cycle between Tk and
350;; Python (Tk -> libxcb -> Python.)
351
352(define-public python2-minimal
353 (package (inherit python-2)
354 (name "python-minimal")
02f0c3b2 355 (outputs '("out"))
95288fcc
LC
356 (arguments
357 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
358 ((#:configure-flags cf)
359 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
360 (inputs '()))) ;none of the optional dependencies
361
362(define-public python-minimal
898238b9 363 (package (inherit python)
95288fcc 364 (name "python-minimal")
02f0c3b2 365 (outputs '("out"))
95288fcc 366
d0b73960 367 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
368 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
369 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
370 (inputs `(("libffi" ,libffi)
371 ("openssl" ,openssl)
95288fcc
LC
372 ("zlib" ,zlib)))))
373
64cb064c
LC
374(define* (wrap-python3 python
375 #:optional
376 (name (string-append (package-name python) "-wrapper")))
898238b9 377 (package (inherit python)
95288fcc 378 (name name)
898238b9
AE
379 (source #f)
380 (build-system trivial-build-system)
02f0c3b2 381 (outputs '("out"))
3c0f2329 382 (propagated-inputs `(("python" ,python)))
898238b9
AE
383 (arguments
384 `(#:modules ((guix build utils))
385 #:builder
386 (begin
387 (use-modules (guix build utils))
388 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
389 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
390 (mkdir-p bin)
391 (for-each
392 (lambda (old new)
393 (symlink (string-append python old)
394 (string-append bin "/" new)))
d06df41d
HG
395 `("python3" ,"pydoc3" ,"idle3" ,"pip3" ,"python3-config")
396 `("python" ,"pydoc" ,"idle" ,"pip" ,"python-config"))))))
0d56e3e1
LC
397 (synopsis "Wrapper for the Python 3 commands")
398 (description
399 "This package provides wrappers for the commands of Python@tie{}3.x such
400that they can be invoked under their usual name---e.g., @command{python}
401instead of @command{python3}.")))
402
95288fcc
LC
403(define-public python-wrapper (wrap-python3 python))
404(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 405
aaf625b8
RW
406(define-public python-psutil
407 (package
408 (name "python-psutil")
88535a44 409 (version "4.3.0")
aaf625b8
RW
410 (source
411 (origin
412 (method url-fetch)
f56777be 413 (uri (pypi-uri "psutil" version))
aaf625b8
RW
414 (sha256
415 (base32
88535a44 416 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
417 (build-system python-build-system)
418 (native-inputs
419 `(("python-setuptools" ,python-setuptools)))
88535a44 420 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
421 (synopsis "Library for retrieving information on running processes")
422 (description
423 "psutil (Python system and process utilities) is a library for retrieving
424information on running processes and system utilization (CPU, memory, disks,
425network) in Python. It is useful mainly for system monitoring, profiling and
426limiting process resources and management of running processes. It implements
427many functionalities offered by command line tools such as: ps, top, lsof,
428netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
429pidof, tty, taskset, pmap.")
3f641af0 430 (license license:bsd-3)))
aaf625b8
RW
431
432(define-public python2-psutil
433 (package-with-python2 python-psutil))
898238b9 434
f9da1d8a
ED
435(define-public python-passlib
436 (package
437 (name "python-passlib")
690e8c66 438 (version "1.6.5")
f9da1d8a
ED
439 (source
440 (origin
441 (method url-fetch)
690e8c66 442 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
443 (sha256
444 (base32
690e8c66 445 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
446 (build-system python-build-system)
447 (native-inputs
448 `(("python-nose" ,python-nose)
449 ("python-setuptools" ,python-setuptools)))
450 (inputs
451 `(("python-py-bcrypt" ,python-py-bcrypt)))
452 (arguments
453 `(#:phases
454 (alist-cons-before
455 'check 'set-PYTHON_EGG_CACHE
456 ;; some tests require access to "$HOME/.cython"
457 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
458 %standard-phases)))
459 (home-page "https://bitbucket.org/ecollins/passlib")
460 (synopsis
461 "Comprehensive password hashing framework")
462 (description
463 "Passlib is a password hashing library for Python 2 & 3, which provides
464cross-platform implementations of over 30 password hashing algorithms, as well
465as a framework for managing existing password hashes. It's designed to be
466useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
467to providing full-strength password hashing for multi-user application.")
3f641af0 468 (license license:bsd-3)))
f9da1d8a
ED
469
470(define-public python2-passlib
471 (package-with-python2 python-passlib))
472
feb0d9c3
ED
473(define-public python-py-bcrypt
474 (package
475 (name "python-py-bcrypt")
476 (version "0.4")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (string-append
481 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
482 version
483 ".tar.gz"))
484 (sha256
485 (base32
486 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
487 (build-system python-build-system)
488 (native-inputs
489 `(("python-setuptools" ,python-setuptools)))
490 (home-page "https://code.google.com/p/py-bcrypt")
491 (synopsis
492 "Bcrypt password hashing and key derivation")
493 (description
494 "A python wrapper of OpenBSD's Blowfish password hashing code. This
495system hashes passwords using a version of Bruce Schneier's Blowfish block
496cipher with modifications designed to raise the cost of off-line password
497cracking and frustrate fast hardware implementation. The computation cost of
498the algorithm is parametised, so it can be increased as computers get faster.
499The intent is to make a compromise of a password database less likely to
500result in an attacker gaining knowledge of the plaintext passwords (e.g. using
501John the Ripper).")
502 ;; "sha2.c" is under BSD-3;
503 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
504 ;; the rest is under ISC.
3f641af0 505 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
506
507(define-public python2-py-bcrypt
508 (package-with-python2 python-py-bcrypt))
509
510
429fdea1
ED
511(define-public python-paramiko
512 (package
513 (name "python-paramiko")
81b9bbbd 514 (version "1.16.0")
429fdea1
ED
515 (source
516 (origin
517 (method url-fetch)
81b9bbbd 518 (uri (pypi-uri "paramiko" version))
429fdea1
ED
519 (sha256
520 (base32
81b9bbbd 521 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
522 (build-system python-build-system)
523 (native-inputs
524 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
525 (propagated-inputs
526 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 527 (inputs
a3fc12da 528 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
529 (home-page "http://www.paramiko.org/")
530 (synopsis "SSHv2 protocol library")
531 (description "Paramiko is a python implementation of the SSHv2 protocol,
532providing both client and server functionality. While it leverages a Python C
533extension for low level cryptography (PyCrypto), Paramiko itself is a pure
534Python interface around SSH networking concepts.")
3f641af0 535 (license license:lgpl2.1+)))
429fdea1
ED
536
537(define-public python2-paramiko
538 (package-with-python2 python-paramiko))
539
540
de73dbf6
ED
541(define-public python-httplib2
542 (package
543 (name "python-httplib2")
286f1bac 544 (version "0.9.2")
de73dbf6
ED
545 (source
546 (origin
547 (method url-fetch)
286f1bac 548 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
549 (sha256
550 (base32
286f1bac 551 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
552 (build-system python-build-system)
553 (native-inputs
554 `(("python-setuptools" ,python-setuptools)))
286f1bac 555 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
556 (synopsis "Comprehensive HTTP client library")
557 (description
558 "A comprehensive HTTP client library supporting many features left out of
559other HTTP libraries.")
560 (license license:expat)))
561
562(define-public python2-httplib2
563 (package-with-python2 python-httplib2))
564
67039875
ED
565(define-public python-ecdsa
566 (package
567 (name "python-ecdsa")
568 (version "0.13")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (string-append
573 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
574 version
575 ".tar.gz"))
576 (sha256
577 (base32
578 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
579 (build-system python-build-system)
580 (native-inputs
581 `(("python-setuptools" ,python-setuptools)))
582 (inputs
583 `(("openssl" ,openssl)))
584 (home-page
585 "http://github.com/warner/python-ecdsa")
586 (synopsis
587 "ECDSA cryptographic signature library (pure python)")
588 (description
589 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
590Curve Digital Signature Algorithm), implemented purely in Python. With this
591library, you can quickly create keypairs (signing key and verifying key), sign
592messages, and verify the signatures. The keys and signatures are very short,
593making them easy to handle and incorporate into other protocols.")
594 (license license:expat)))
595
596(define-public python2-ecdsa
597 (package-with-python2 python-ecdsa))
598
52323f32
ED
599(define-public python-ccm
600 (package
601 (name "python-ccm")
db5567f7 602 (version "2.1.6")
52323f32
ED
603 (source
604 (origin
605 (method url-fetch)
db5567f7 606 (uri (pypi-uri "ccm" version))
52323f32
ED
607 (sha256
608 (base32
db5567f7 609 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
610 (build-system python-build-system)
611 (native-inputs
612 `(("python-setuptools" ,python-setuptools)))
613 (inputs
614 `(("python-pyyaml" ,python-pyyaml)
615 ("python-six" ,python-six)))
616 (home-page "https://github.com/pcmanus/ccm")
617 (synopsis "Cassandra Cluster Manager")
618 (description "A script/library to create, launch and remove an Apache
619Cassandra cluster on localhost.")
3f641af0 620 (license license:asl2.0)))
52323f32
ED
621
622(define-public python2-ccm
623 (package-with-python2 python-ccm))
624
89114f39 625(define-public python-pytz
acc26ff1 626 (package
89114f39 627 (name "python-pytz")
61c9babb 628 (version "2016.3")
acc26ff1
CR
629 (source
630 (origin
631 (method url-fetch)
61c9babb 632 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
633 (sha256
634 (base32
61c9babb 635 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 636 (build-system python-build-system)
8498b8cf 637 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 638 (home-page "http://pythonhosted.org/pytz")
9e771e3b 639 (synopsis "Python timezone library")
acc26ff1
CR
640 (description
641 "This library allows accurate and cross platform timezone calculations
642using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 643 (license license:expat)))
5ace6e2f 644
89114f39 645(define-public python2-pytz
11bb85a1 646 (package-with-python2 python-pytz))
89114f39 647
fc50e9c6 648
89114f39 649(define-public python-babel
5ace6e2f 650 (package
89114f39 651 (name "python-babel")
3f37db6b 652 (version "2.3.2")
5ace6e2f
CR
653 (source
654 (origin
655 (method url-fetch)
b850a6d8 656 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
657 (sha256
658 (base32
3f37db6b 659 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
660 (build-system python-build-system)
661 (inputs
e1804763
AE
662 `(("python-pytz" ,python-pytz)
663 ("python-setuptools" ,python-setuptools)))
8498b8cf 664 (arguments `(#:tests? #f)) ; no test target
e1804763 665 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
666 (synopsis
667 "Tools for internationalizing Python applications")
668 (description
669 "Babel is composed of two major parts:
670- tools to build and work with gettext message catalogs
671- a Python interface to the CLDR (Common Locale Data Repository), providing
672access to various locale display names, localized number and date formatting,
673etc. ")
3f641af0 674 (license license:bsd-3)))
89114f39
AE
675
676(define-public python2-babel
11bb85a1 677 (package-with-python2 python-babel))
73adf220 678
ed377cc6
RW
679(define-public python2-backport-ssl-match-hostname
680 (package
681 (name "python2-backport-ssl-match-hostname")
f2d06d46 682 (version "3.5.0.1")
ed377cc6
RW
683 (source
684 (origin
685 (method url-fetch)
686 (uri (string-append
687 "https://pypi.python.org/packages/source/b/"
688 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
689 version ".tar.gz"))
690 (sha256
691 (base32
f2d06d46 692 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 693 (build-system python-build-system)
f2d06d46
EF
694 (arguments
695 `(#:python ,python-2
696 #:tests? #f)) ; no test target
ed377cc6
RW
697 (inputs
698 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
699 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
700 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
701 (description
702 "This backport brings the ssl.match_hostname() function to users of
703earlier versions of Python. The function checks the hostname in the
704certificate returned by the server to which a connection has been established,
705and verifies that it matches the intended target hostname.")
3f641af0 706 (license license:psfl)))
ed377cc6 707
ef5cbf9b
RW
708(define-public python-h5py
709 (package
710 (name "python-h5py")
fe147c41 711 (version "2.6.0")
ef5cbf9b
RW
712 (source
713 (origin
714 (method url-fetch)
fe147c41 715 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
716 (sha256
717 (base32
fe147c41 718 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 719 (build-system python-build-system)
797e1401
RW
720 (arguments
721 `(#:tests? #f ; no test target
722 #:phases
723 (modify-phases %standard-phases
724 (add-after 'unpack 'fix-hdf5-paths
725 (lambda* (#:key inputs #:allow-other-keys)
726 (let ((prefix (assoc-ref inputs "hdf5")))
727 (substitute* "setup_build.py"
728 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
729 (string-append "['" prefix "/lib" "']"))
730 (("'/opt/local/include', '/usr/local/include'")
731 (string-append "'" prefix "/include" "'")))
732 (substitute* "setup_configure.py"
733 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
734 (string-append "['" prefix "/lib" "']")))
735 #t))))))
3c4010b1
RW
736 (propagated-inputs
737 `(("python-numpy" ,python-numpy)))
ef5cbf9b 738 (inputs
fe147c41
EF
739 `(("hdf5" ,hdf5)
740 ("python-six" ,python-six)))
ef5cbf9b 741 (native-inputs
fe147c41
EF
742 `(("python-cython" ,python-cython)
743 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
744 (home-page "http://www.h5py.org/")
745 (synopsis "Read and write HDF5 files from Python")
746 (description
747 "The h5py package provides both a high- and low-level interface to the
748HDF5 library from Python. The low-level interface is intended to be a
749complete wrapping of the HDF5 API, while the high-level component supports
750access to HDF5 files, datasets and groups using established Python and NumPy
751concepts.")
3f641af0 752 (license license:bsd-3)
fe147c41 753 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
754
755(define-public python2-h5py
fe147c41 756 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 757
c1448c69
EB
758(define-public python-lockfile
759 (package
760 (name "python-lockfile")
692add53 761 (version "0.12.2")
c1448c69
EB
762 (source
763 (origin
764 (method url-fetch)
765 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
766 "lockfile-" version ".tar.gz"))
767 (sha256
768 (base32
692add53 769 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
770 (build-system python-build-system)
771 (arguments '(#:test-target "check"))
692add53
BW
772 (native-inputs
773 `(("python-pbr" ,python-pbr)))
c1448c69
EB
774 (home-page "http://code.google.com/p/pylockfile/")
775 (synopsis "Platform-independent file locking module")
776 (description
777 "The lockfile package exports a LockFile class which provides a simple
778API for locking files.")
1804527a
BW
779 (license license:expat)
780 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
781
782(define-public python2-lockfile
1804527a
BW
783 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
784 (package
692add53
BW
785 (inherit base)
786 (native-inputs `(("python2-setuptools" ,python2-setuptools)
787 ,@(package-native-inputs base))))))
c1448c69 788
5a1a4bf6
EB
789(define-public python-mock
790 (package
791 (name "python-mock")
792 (version "1.0.1")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
797 "mock-" version ".tar.gz"))
798 (sha256
799 (base32
800 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
801 (build-system python-build-system)
802 (arguments '(#:test-target "check"))
07af3e5e 803 (home-page "http://code.google.com/p/mock/")
9e771e3b 804 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
805 (description
806 "Mock is a library for testing in Python. It allows you to replace parts
807of your system under test with mock objects and make assertions about how they
808have been used.")
bd3fa666 809 (license license:expat)))
5a1a4bf6
EB
810
811(define-public python2-mock
812 (package-with-python2 python-mock))
813
fc50e9c6 814
73adf220
AE
815(define-public python-setuptools
816 (package
817 (name "python-setuptools")
62a9a23b 818 (version "18.3.1")
73adf220
AE
819 (source
820 (origin
821 (method url-fetch)
822 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
823 version ".tar.gz"))
824 (sha256
825 (base32
62a9a23b 826 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 827 (build-system python-build-system)
d3d656c5
AE
828 ;; FIXME: Tests require pytest, which itself relies on setuptools.
829 ;; One could bootstrap with an internal untested setuptools.
73adf220 830 (arguments
824af8ca 831 `(#:tests? #f))
73adf220
AE
832 (home-page "https://pypi.python.org/pypi/setuptools")
833 (synopsis
834 "Library designed to facilitate packaging Python projects")
835 (description
836 "Setuptools is a fully-featured, stable library designed to facilitate
837packaging Python projects, where packaging includes:
838Python package and module definitions,
839distribution package metadata,
840test hooks,
841project installation,
842platform-specific details,
843Python 3 support.")
3f641af0 844 (license license:psfl)))
73adf220
AE
845
846(define-public python2-setuptools
847 (package-with-python2 python-setuptools))
fc50e9c6
AE
848
849
cafc3f5a
EB
850(define-public python-pycrypto
851 (package
852 (name "python-pycrypto")
853 (version "2.6.1")
854 (source
855 (origin
856 (method url-fetch)
857 (uri (string-append "https://pypi.python.org/packages/source/p/"
858 "pycrypto/pycrypto-" version ".tar.gz"))
859 (sha256
860 (base32
861 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
862 (build-system python-build-system)
863 (native-inputs
864 `(("python-setuptools" ,python-setuptools)))
865 (inputs
866 `(("python" ,python)
867 ("gmp" ,gmp)))
868 (arguments
869 `(#:phases
870 (alist-cons-before
871 'build 'set-build-env
872 ;; pycrypto runs an autoconf configure script behind the scenes
873 (lambda _
874 (setenv "CONFIG_SHELL" (which "bash")))
875 %standard-phases)))
876 (home-page "http://www.pycrypto.org/")
877 (synopsis "Cryptographic modules for Python")
878 (description
879 "Pycrypto is a collection of both secure hash functions (such as SHA256
880and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 881etc.). The package is structured to make adding new modules easy.")
3f641af0 882 (license license:public-domain)))
cafc3f5a 883
345f0611 884(define-public python2-pycrypto
1c0059da
EF
885 (let ((pycrypto (package-with-python2 python-pycrypto)))
886 (package (inherit pycrypto)
887 (inputs
888 `(("python" ,python-2)
889 ,@(alist-delete
890 "python"
891 (package-inputs pycrypto)))))))
345f0611 892
cafc3f5a
EB
893(define-public python-keyring
894 (package
895 (name "python-keyring")
13f3ff35 896 (version "8.7")
cafc3f5a
EB
897 (source
898 (origin
899 (method url-fetch)
664e6c3a 900 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
901 (sha256
902 (base32
13f3ff35 903 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
904 (build-system python-build-system)
905 (native-inputs
13f3ff35 906 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
907 (inputs
908 `(("python-pycrypto" ,python-pycrypto)))
909 (arguments
664e6c3a 910 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
911 (home-page "http://bitbucket.org/kang/python-keyring-lib")
912 (synopsis "Store and access your passwords safely")
913 (description
914 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 915service from python. It can be used in any application that needs safe
cafc3f5a
EB
916password storage.")
917 ;; "MIT" and PSF dual license
3f641af0 918 (license license:x11)
13f3ff35 919 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 920
d7af1069 921(define-public python2-keyring
13f3ff35
EF
922 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
923 (package
924 (inherit base)
925 (native-inputs `(("python2-setuptools" ,python2-setuptools)
926 ,@(package-native-inputs base))))))
d7af1069 927
a480bc41
EB
928(define-public python-six
929 (package
930 (name "python-six")
b6ab89ef 931 (version "1.10.0")
a480bc41
EB
932 (source
933 (origin
934 (method url-fetch)
b6ab89ef 935 (uri (pypi-uri "six" version))
a480bc41
EB
936 (sha256
937 (base32
b6ab89ef 938 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
939 (build-system python-build-system)
940 (inputs
941 `(("python-setuptools" ,python-setuptools)))
942 (home-page "http://pypi.python.org/pypi/six/")
943 (synopsis "Python 2 and 3 compatibility utilities")
944 (description
35b9e423 945 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
946functions for smoothing over the differences between the Python versions with
947the goal of writing Python code that is compatible on both Python versions.
35b9e423 948Six supports every Python version since 2.5. It is contained in only one
a480bc41 949Python file, so it can be easily copied into your project.")
3f641af0 950 (license license:x11)))
a480bc41 951
0c20025c
AE
952(define-public python2-six
953 (package-with-python2 python-six))
954
cafc3f5a
EB
955(define-public python-dateutil-2
956 (package
957 (name "python-dateutil")
394b8060 958 (version "2.5.2")
cafc3f5a
EB
959 (source
960 (origin
961 (method url-fetch)
394b8060 962 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
963 (sha256
964 (base32
394b8060 965 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
966 (build-system python-build-system)
967 (inputs
394b8060 968 `(("python-six" ,python-six)))
cafc3f5a
EB
969 (home-page "http://labix.org/python-dateutil")
970 (synopsis "Extensions to the standard datetime module")
971 (description
972 "The dateutil module provides powerful extensions to the standard
973datetime module, available in Python 2.3+.")
3f641af0 974 (license license:bsd-3)
394b8060 975 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
976
977(define-public python2-dateutil-2
394b8060
EF
978 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
979 (package
980 (inherit base)
981 (inputs `(("python2-setuptools" ,python2-setuptools)
982 ,@(package-inputs base))))))
cafc3f5a 983
fc50e9c6
AE
984(define-public python-dateutil
985 (package
986 (name "python-dateutil")
987 (version "1.5") ; last version for python < 3
988 (source
989 (origin
990 (method url-fetch)
cafc3f5a
EB
991 (uri (string-append "http://labix.org/download/python-dateutil/"
992 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
993 (sha256
994 (base32
995 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
996 (build-system python-build-system)
997 (inputs
998 `(("python-setuptools" ,python-setuptools)))
999 (home-page "http://labix.org/python-dateutil")
cafc3f5a 1000 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1001 (description
1002 "The dateutil module provides powerful extensions to the standard
1003datetime module, available in Python 2.3+.")
3f641af0 1004 (license license:psfl)))
fc50e9c6
AE
1005
1006(define-public python2-dateutil
1007 (package-with-python2 python-dateutil))
1d08c01f 1008
cafc3f5a
EB
1009(define-public python-parsedatetime
1010 (package
1011 (name "python-parsedatetime")
eebf6f01 1012 (version "2.1")
cafc3f5a
EB
1013 (source
1014 (origin
1015 (method url-fetch)
eebf6f01 1016 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1017 (sha256
1018 (base32
eebf6f01 1019 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1020 (build-system python-build-system)
1021 (native-inputs
eebf6f01
EF
1022 `(("python-nose" ,python-nose)
1023 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1024 (home-page "http://github.com/bear/parsedatetime/")
1025 (synopsis
1026 "Parse human-readable date/time text")
1027 (description
e881752c 1028 "Parse human-readable date/time text.")
3f641af0 1029 (license license:asl2.0)
eebf6f01 1030 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1031
38b8f9b2 1032(define-public python2-parsedatetime
eebf6f01
EF
1033 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1034 (package
1035 (inherit base)
1036 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1037 ,@(package-native-inputs base))))))
38b8f9b2 1038
d072efcb
RW
1039(define-public python-pandas
1040 (package
1041 (name "python-pandas")
7d0c3c8d 1042 (version "0.18.1")
d072efcb
RW
1043 (source
1044 (origin
1b96f069 1045 (method url-fetch)
7d0c3c8d
EF
1046 (uri (string-append
1047 "https://pypi.python.org/packages/11/09/"
1048 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1049 "pandas-" version ".tar.gz"))
1b96f069 1050 (sha256
7d0c3c8d 1051 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1052 (build-system python-build-system)
d072efcb 1053 (propagated-inputs
42603726
EF
1054 `(("python-numpy" ,python-numpy)))
1055 (inputs
1056 `(("python-pytz" ,python-pytz)
d072efcb
RW
1057 ("python-dateutil" ,python-dateutil-2)))
1058 (native-inputs
7d0c3c8d 1059 `(("python-nose" ,python-nose)))
d072efcb
RW
1060 (home-page "http://pandas.pydata.org")
1061 (synopsis "Data structures for data analysis, time series, and statistics")
1062 (description
1063 "Pandas is a Python package providing fast, flexible, and expressive data
1064structures designed to make working with structured (tabular,
1065multidimensional, potentially heterogeneous) and time series data both easy
1066and intuitive. It aims to be the fundamental high-level building block for
1067doing practical, real world data analysis in Python.")
3f641af0 1068 (license license:bsd-3)
7d0c3c8d 1069 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1070
1071(define-public python2-pandas
7d0c3c8d
EF
1072 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1073 (package
1074 (inherit base)
1075 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1076 ,@(package-native-inputs base))))))
d072efcb 1077
cafc3f5a
EB
1078(define-public python-tzlocal
1079 (package
1080 (name "python-tzlocal")
ed80839b 1081 (version "1.2.2")
cafc3f5a
EB
1082 (source
1083 (origin
1084 (method url-fetch)
226d3331 1085 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1086 (sha256
1087 (base32
ed80839b 1088 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1089 (build-system python-build-system)
ed80839b 1090 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1091 (home-page "https://github.com/regebro/tzlocal")
1092 (synopsis
35b9e423 1093 "Local timezone information for Python")
cafc3f5a
EB
1094 (description
1095 "Tzlocal returns a tzinfo object with the local timezone information.
1096This module attempts to fix a glaring hole in pytz, that there is no way to
1097get the local timezone information, unless you know the zoneinfo name, and
1098under several distributions that's hard or impossible to figure out.")
3f641af0 1099 (license license:cc0)))
cafc3f5a 1100
1d08c01f
AE
1101(define-public python2-pysqlite
1102 (package
1103 (name "python2-pysqlite")
fe476868 1104 (version "2.8.1")
1d08c01f
AE
1105 (source
1106 (origin
1107 (method url-fetch)
fe476868 1108 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1109 (sha256
1110 (base32
fe476868 1111 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1112 (build-system python-build-system)
1113 (inputs
1114 `(("sqlite" ,sqlite)))
1115 (arguments
1116 `(#:python ,python-2 ; incompatible with Python 3
1117 #:tests? #f)) ; no test target
fe476868 1118 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1119 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1120 (description
1121 "Pysqlite provides SQLite bindings for Python that comply to the
1122Database API 2.0T.")
ed0cdf83 1123 (license license:zlib)))
1d08c01f 1124
2875caf5
AE
1125
1126(define-public python2-mechanize
1127 (package
1128 (name "python2-mechanize")
1129 (version "0.2.5")
1130 (source
1131 (origin
1132 (method url-fetch)
1133 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1134 version ".tar.gz"))
1135 (sha256
1136 (base32
1137 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1138 (build-system python-build-system)
1139 (inputs
1140 `(("python2-setuptools" ,python2-setuptools)))
1141 (arguments
1142 `(#:python ,python-2 ; apparently incompatible with Python 3
1143 #:tests? #f))
1144 ;; test fails with message
1145 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1146 ;; (python-3.3.2) or
1147 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1148 ;; (python-2.7.5).
1149 ;; The source code is from March 2011 and probably not up-to-date
1150 ;; with respect to python unit tests.
1151 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1152 (synopsis
1153 "Stateful programmatic web browsing in Python")
1154 (description
1155 "Mechanize implements stateful programmatic web browsing in Python,
1156after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1157 (license (license:non-copyleft
1158 "file://COPYING"
1159 "See COPYING in the distribution."))))
2875caf5 1160
0352532e
AE
1161
1162(define-public python-simplejson
1163 (package
1164 (name "python-simplejson")
988d1bad 1165 (version "3.8.2")
0352532e
AE
1166 (source
1167 (origin
1168 (method url-fetch)
988d1bad 1169 (uri (pypi-uri "simplejson" version))
0352532e
AE
1170 (sha256
1171 (base32
988d1bad 1172 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1173 (build-system python-build-system)
1174 (home-page "http://simplejson.readthedocs.org/en/latest/")
1175 (synopsis
1176 "Json library for Python")
1177 (description
e881752c
AK
1178 "JSON (JavaScript Object Notation) is a subset of JavaScript
1179syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1180format.
0352532e
AE
1181
1182Simplejson exposes an API familiar to users of the standard library marshal
1183and pickle modules. It is the externally maintained version of the json
1184library contained in Python 2.6, but maintains compatibility with Python 2.5
1185and (currently) has significant performance advantages, even without using
1186the optional C extension for speedups. Simplejson is also supported on
1187Python 3.3+.")
3f641af0 1188 (license license:x11)))
0352532e
AE
1189
1190(define-public python2-simplejson
1191 (package-with-python2 python-simplejson))
421a80a2
AE
1192
1193
ed07b08d 1194(define-public python-pyicu
421a80a2 1195 (package
ed07b08d 1196 (name "python-pyicu")
d3b29319 1197 (version "1.9.2")
421a80a2
AE
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1202 version ".tar.gz"))
1203 (sha256
1204 (base32
d3b29319 1205 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1206 (build-system python-build-system)
1207 (inputs
1208 `(("icu4c" ,icu4c)))
421a80a2 1209 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1210 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1211 (description
1212 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1213 (license license:x11)
ed07b08d
LF
1214 (properties `((python2-variant . ,(delay python2-pyicu))))))
1215
1216(define-public python2-pyicu
1217 (package
1218 (inherit (package-with-python2
1219 (strip-python2-variant python-pyicu)))
1220 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1221
1222(define-public python2-dogtail
1223 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1224 ;; spaces in indentation" with Python 3.
1225 (package
1226 (name "python2-dogtail")
1227 (version "0.8.2")
1228 (source (origin
1229 (method url-fetch)
1230 (uri (string-append
1231 "https://fedorahosted.org/released/dogtail/dogtail-"
1232 version ".tar.gz"))
1233 (sha256
1234 (base32
1235 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1236 (build-system python-build-system)
1237 (arguments `(#:python ,python-2
1238 #:tests? #f)) ; invalid command "test"
1239 (home-page "https://fedorahosted.org/dogtail/")
1240 (synopsis "GUI test tool and automation framework written in ​Python")
1241 (description
35b9e423 1242 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1243It uses Accessibility (a11y) technologies to communicate with desktop
1244applications. dogtail scripts are written in Python and executed like any
1245other Python program.")
3f641af0 1246 (license license:gpl2+)))
515e6878 1247
011b18c3
LC
1248(define-public python2-empy
1249 (package
1250 (name "python2-empy")
1251 (version "3.3")
1252 (source (origin
1253 (method url-fetch)
1254 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1255 version ".tar.gz"))
1256 (sha256
1257 (base32
1258 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1259 (build-system python-build-system)
1260 (arguments
1261 `(#:python ,python-2
1262 #:phases (alist-replace
1263 'check
1264 (lambda _
1265 (zero? (system* "./test.sh")))
1266 %standard-phases)))
1267 (home-page "http://www.alcyone.com/software/empy/")
1268 (synopsis "Templating system for Python")
1269 (description
1270 "EmPy is a system for embedding Python expressions and statements in
1271template text; it takes an EmPy source file, processes it, and produces
1272output. This is accomplished via expansions, which are special signals to the
1cd4027c 1273EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1274EmPy can expand arbitrary Python expressions and statements in this way, as
1275well as a variety of special forms. Textual data not explicitly delimited in
1276this way is sent unaffected to the output, allowing Python to be used in
1277effect as a markup language. Also supported are callbacks via hooks,
1278recording and playback via diversions, and dynamic, chainable filters. The
1279system is highly configurable via command line options and embedded
1280commands.")
3f641af0 1281 (license license:lgpl2.1+)))
011b18c3 1282
8deeda0c
LC
1283(define-public python2-element-tree
1284 (package
1285 (name "python2-element-tree")
1286 (version "1.2.6")
1287 (source (origin
1288 (method url-fetch)
1289 (uri (string-append
1290 "http://effbot.org/media/downloads/elementtree-"
1291 version "-20050316.tar.gz"))
1292 (sha256
1293 (base32
1294 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1295 (build-system python-build-system)
1296 (arguments
1297 `(#:python ,python-2 ; seems to be part of Python 3
1298 #:tests? #f)) ; no 'test' sub-command
1299 (synopsis "Toolkit for XML processing in Python")
1300 (description
1301 "ElementTree is a Python library supporting lightweight XML processing.")
1302 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1303 (license (license:x11-style
1304 "http://docs.python.org/2/license.html"
1305 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1306
1307(define-public python2-pybugz
1308 (package
1309 (name "python2-pybugz")
1310 (version "0.6.11")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (string-append
1314 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1315 version ".tar.gz"))
1316 (sha256
1317 (base32
6f194a1e 1318 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1319 (patches (search-patches "pybugz-stty.patch"
1320 "pybugz-encode-error.patch"))))
8deeda0c
LC
1321 (build-system python-build-system)
1322 (arguments
1323 `(#:python ,python-2 ; SyntaxError with Python 3
1324 #:tests? #f)) ; no 'test' sub-command
1325 (inputs `(("element-tree" ,python2-element-tree)))
1326 (synopsis "Python and command-line interface to Bugzilla")
1327 (description
1328 "PyBugz is a Python library and command-line tool to query the Bugzilla
1329bug tracking system. It is meant as an aid to speed up interaction with the
1330bug tracker.")
1331 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1332 (license license:gpl2)))
8deeda0c 1333
a480bc41
EB
1334(define-public python-enum34
1335 (package
1336 (name "python-enum34")
d39ae1e5 1337 (version "1.1.0")
a480bc41
EB
1338 (source
1339 (origin
1340 (method url-fetch)
d39ae1e5 1341 (uri (pypi-uri "enum34" version))
a480bc41
EB
1342 (sha256
1343 (base32
d39ae1e5 1344 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1345 (build-system python-build-system)
a480bc41
EB
1346 (arguments
1347 `(#:phases
1348 (alist-replace
1349 'check
1350 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1351 %standard-phases)))
1352 (home-page "https://pypi.python.org/pypi/enum34")
1353 (synopsis "Backported Python 3.4 Enum")
1354 (description
1355 "Enum34 is the new Python stdlib enum module available in Python 3.4
1356backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1357 (license license:bsd-3)))
a480bc41 1358
820acd1b
LF
1359(define-public python2-enum34
1360 (package-with-python2 python-enum34))
1361
a480bc41
EB
1362(define-public python-parse-type
1363 (package
1364 (name "python-parse-type")
1365 (version "0.3.4")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "https://pypi.python.org/packages/source/p/"
1370 "parse_type/parse_type-" version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1374 (build-system python-build-system)
1375 (inputs
1376 `(("python-setuptools" ,python-setuptools)
1377 ("python-six" ,python-six)
68f1cdec 1378 ("python-parse" ,python-parse)))
a480bc41
EB
1379 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1380 (home-page "https://github.com/jenisys/parse_type")
1381 (synopsis "Extended parse module")
1382 (description
1383 "Parse_type extends the python parse module.")
3f641af0 1384 (license license:bsd-3)))
a480bc41
EB
1385
1386(define-public python-parse
1387 (package
1388 (name "python-parse")
eb3d3503 1389 (version "1.6.6")
a480bc41
EB
1390 (source
1391 (origin
1392 (method url-fetch)
eb3d3503 1393 (uri (pypi-uri "parse" version))
a480bc41
EB
1394 (sha256
1395 (base32
eb3d3503 1396 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1397 (build-system python-build-system)
1398 (arguments
1399 `(#:phases
1400 (alist-replace
1401 'check
1402 (lambda _ (zero? (system* "python" "test_parse.py")))
1403 %standard-phases)))
1404 (home-page "https://github.com/r1chardj0n3s/parse")
1405 (synopsis "Parse strings")
1406 (description
1407 "Parse strings using a specification based on the Python format()
1408syntax.")
3f641af0 1409 (license license:x11)))
a480bc41
EB
1410
1411
515e6878
LC
1412(define-public scons
1413 (package
1414 (name "scons")
a3f61425 1415 (version "2.3.4")
515e6878
LC
1416 (source (origin
1417 (method url-fetch)
de67e922
LF
1418 (uri (string-append "mirror://sourceforge/scons/scons/" version
1419 "/scons-" version ".tar.gz"))
515e6878
LC
1420 (sha256
1421 (base32
a3f61425 1422 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1423 (build-system python-build-system)
1424 (arguments
1425 ;; With Python 3.x, fails to build with a syntax error.
1426 `(#:python ,python-2
1427 #:tests? #f)) ; no 'python setup.py test' command
1428 (home-page "http://scons.org/")
1429 (synopsis "Software construction tool written in Python")
1430 (description
1431 "SCons is a software construction tool. Think of SCons as an improved,
1432cross-platform substitute for the classic Make utility with integrated
1433functionality similar to autoconf/automake and compiler caches such as ccache.
1434In short, SCons is an easier, more reliable and faster way to build
1435software.")
3f641af0 1436 (license license:x11)))
011b18c3 1437
c15a5c0e
DT
1438(define-public python-extras
1439 (package
1440 (name "python-extras")
1441 (version "0.0.3")
1442 (source
1443 (origin
1444 (method url-fetch)
1445 (uri (string-append
1446 "https://pypi.python.org/packages/source/e/extras/extras-"
1447 version ".tar.gz"))
1448 (sha256
1449 (base32
1450 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1451 (build-system python-build-system)
1452 (inputs
1453 `(("python-setuptools" ,python-setuptools)))
1454 (arguments
1455 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1456 '(#:tests? #f))
1457 (home-page "https://github.com/testing-cabal/extras")
1458 (synopsis "Useful extensions to the Python standard library")
1459 (description
1460 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1461 (license license:expat)))
c15a5c0e
DT
1462
1463(define-public python2-extras
1464 (package-with-python2 python-extras))
1465
56ea0efd
DT
1466(define-public python-mimeparse
1467 (package
1468 (name "python-mimeparse")
1469 (version "0.1.4")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (string-append
1474 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1475 version ".tar.gz"))
1476 (sha256
1477 (base32
1478 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1479 (build-system python-build-system)
1480 (inputs
1481 `(("python-setuptools" ,python-setuptools)))
1482 (arguments
1483 '(#:tests? #f)) ; no setup.py test command
1484 (home-page
1485 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1486 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1487 (description
1488 "Mimeparse provides basic functions for parsing MIME type names and
1489matching them against a list of media-ranges.")
bd3fa666 1490 (license license:expat)))
56ea0efd
DT
1491
1492(define-public python2-mimeparse
1493 (package-with-python2 python-mimeparse))
1494
4435427e
DT
1495(define-public python-nose
1496 (package
1497 (name "python-nose")
f7cb9841 1498 (version "1.3.7")
4435427e
DT
1499 (source
1500 (origin
1501 (method url-fetch)
f7cb9841 1502 (uri (pypi-uri "nose" version))
4435427e
DT
1503 (sha256
1504 (base32
f7cb9841 1505 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1506 (build-system python-build-system)
1507 (inputs
1508 `(("python-setuptools" ,python-setuptools)))
1509 (arguments
1510 '(#:tests? #f)) ; FIXME: test suite fails
1511 (home-page "http://readthedocs.org/docs/nose/")
1512 (synopsis "Python testing library")
1513 (description
1514 "Nose extends the unittest library to make testing easier.")
3f641af0 1515 (license license:lgpl2.0+)))
4435427e
DT
1516
1517(define-public python2-nose
1518 (package-with-python2 python-nose))
1519
0aea283a
EF
1520(define-public python-nose2
1521 (package
1522 (name "python-nose2")
1523 (version "0.6.5")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (pypi-uri "nose2" version))
1528 (sha256
1529 (base32
1530 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1531 (build-system python-build-system)
1532 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1533 (native-inputs
1534 `(("python-setuptools" ,python-setuptools)))
1535 (inputs
1536 `(("python-cov-core" ,python-cov-core)
1537 ("python-pytest-cov" ,python-pytest-cov)
1538 ("python-six" ,python-six)))
1539 (home-page "https://github.com/nose-devs/nose2")
1540 (synopsis "Next generation of nicer testing for Python")
1541 (description
1542 "Nose2 is the next generation of nicer testing for Python, based on the
1543plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1544better plugin api, being easier for users to configure, and simplifying internal
1545interfaces and processes.")
1546 (license license:bsd-2)))
1547
1548(define-public python2-nose2
1549 (package-with-python2 python-nose2))
1550
6cd9c356
DT
1551(define-public python-unittest2
1552 (package
1553 (name "python-unittest2")
1554 (version "0.5.1")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (string-append
1559 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1560 version ".tar.gz"))
1561 (sha256
1562 (base32
1563 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1564 (build-system python-build-system)
1565 (inputs
1566 `(("python-setuptools" ,python-setuptools)))
1567 (home-page "http://pypi.python.org/pypi/unittest2")
1568 (synopsis "Python unit testing library")
1569 (description
1570 "Unittest2 is a replacement for the unittest module in the Python
1571standard library.")
3f641af0 1572 (license license:psfl)))
6cd9c356
DT
1573
1574(define-public python2-unittest2
1575 (package (inherit python-unittest2)
1576 (name "python2-unittest2")
1577 (version "0.5.1")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1583 version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1587 (inputs
7957fe6c 1588 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1589 (arguments
1590 `(#:python ,python-2
1591 #:tests? #f)))) ; no setup.py test command
1592
542ad60f
DT
1593(define-public python-py
1594 (package
1595 (name "python-py")
71c8a804 1596 (version "1.4.31")
542ad60f
DT
1597 (source
1598 (origin
1599 (method url-fetch)
71c8a804 1600 (uri (pypi-uri "py" version))
542ad60f
DT
1601 (sha256
1602 (base32
71c8a804 1603 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1604 (build-system python-build-system)
1605 (inputs
1606 `(("python-setuptools" ,python-setuptools)))
1607 (home-page "http://pylib.readthedocs.org/")
1608 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1609 (description
1610 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1611code introspection, and logging.")
bd3fa666 1612 (license license:expat)))
542ad60f
DT
1613
1614(define-public python2-py
1615 (package-with-python2 python-py))
1616
855d4761
DT
1617(define-public python-pytest
1618 (package
1619 (name "python-pytest")
61a4332d 1620 (version "2.7.3")
855d4761
DT
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (string-append
1625 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1626 version ".tar.gz"))
1627 (sha256
1628 (base32
61a4332d 1629 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1630 (modules '((guix build utils)))
1631 (snippet
1632 ;; One of the tests involves the /usr directory, so it fails.
1633 '(substitute* "testing/test_argcomplete.py"
1634 (("def test_remove_dir_prefix\\(self\\):")
1635 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1636 (build-system python-build-system)
1637 (inputs
1638 `(("python-setuptools" ,python-setuptools)
1639 ("python-py" ,python-py)
1640 ("python-nose" ,python-nose)
1641 ("python-mock" ,python-mock)))
1642 (home-page "http://pytest.org")
1643 (synopsis "Python testing library")
1644 (description
1645 "Pytest is a testing tool that provides auto-discovery of test modules
1646and functions, detailed info on failing assert statements, modular fixtures,
1647and many external plugins.")
bd3fa666 1648 (license license:expat)))
855d4761
DT
1649
1650(define-public python2-pytest
1651 (package-with-python2 python-pytest))
1652
358c3d61
EF
1653(define-public python-pytest-cov
1654 (package
1655 (name "python-pytest-cov")
545f4a1c 1656 (version "2.2.1")
358c3d61
EF
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "pytest-cov" version))
1661 (sha256
545f4a1c
EF
1662 (base32
1663 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1664 (build-system python-build-system)
545f4a1c 1665 (inputs
10468636
EF
1666 `(("python-coverage" ,python-coverage)
1667 ("python-pytest" ,python-pytest)))
10468636
EF
1668 (home-page "https://github.com/pytest-dev/pytest-cov")
1669 (synopsis "Pytest plugin for measuring coverage")
1670 (description
1671 "Pytest-cov produces coverage reports. It supports centralised testing and
1672distributed testing in both @code{load} and @code{each} modes. It also
1673supports coverage of subprocesses.")
545f4a1c
EF
1674 (license license:expat)
1675 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1676
1677(define-public python2-pytest-cov
545f4a1c
EF
1678 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1679 (package
1680 (inherit base)
1681 (inputs `(("python2-setuptools" ,python2-setuptools)
1682 ,@(package-inputs base))))))
358c3d61 1683
6784f2e3
RW
1684(define-public python-pytest-runner
1685 (package
1686 (name "python-pytest-runner")
1687 (version "2.6.2")
1688 (source
1689 (origin
1690 (method url-fetch)
54cd239b 1691 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1692 (sha256
1693 (base32
1694 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1695 (build-system python-build-system)
1696 (arguments
1697 `(#:phases
1698 (modify-phases %standard-phases
1699 ;; The fancy way of setting the version with setuptools_scm does not
1700 ;; seem to work here.
1701 (add-after 'unpack 'set-version
1702 (lambda _
1703 (substitute* "docs/conf.py"
1704 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1705 (string-append "version = \"" ,version "\"")))
1706 #t)))))
1707 (native-inputs
1708 `(("python-pytest" ,python-pytest)
1709 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1710 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1711 (synopsis "Invoke py.test as a distutils command")
1712 (description
1713 "This package provides a @command{pytest-runner} command that
1714@file{setup.py} files can use to run tests.")
54cd239b
EF
1715 (license license:expat)
1716 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1717
1718(define-public python2-pytest-runner
1719 (let ((base (package-with-python2
1720 (strip-python2-variant python-pytest-runner))))
1721 (package
1722 (inherit base)
1723 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1724 ,@(package-native-inputs base))))))
6784f2e3
RW
1725
1726(define-public python2-pytest-runner
1727 (package-with-python2 python-pytest-runner))
1728
44547e51
EF
1729(define-public python-pytest-mock
1730 (package
1731 (name "python-pytest-mock")
1732 (version "1.2")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (pypi-uri "pytest-mock" version ".zip"))
1737 (sha256
1738 (base32
1739 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1740 (build-system python-build-system)
1741 (native-inputs
1742 `(("unzip" ,unzip)))
1743 (inputs
1744 `(("python-py" ,python-py)
1745 ("python-pytest" ,python-pytest)))
1746 (home-page "https://github.com/pytest-dev/pytest-mock/")
1747 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1748 (description
1749 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1750around the patching API provided by the @code{mock} package, but with the
1751benefit of not having to worry about undoing patches at the end of a test.
1752The mocker fixture has the same API as @code{mock.patch}, supporting the
1753same arguments.")
1754 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1755 (license license:expat)))
1756
1757(define-public python2-pytest-mock
1758 (let ((base (package-with-python2
1759 (strip-python2-variant python-pytest-mock))))
1760 (package (inherit base)
1761 (native-inputs
1762 `(("python2-setuptools" ,python2-setuptools)
1763 ,@(package-native-inputs base)))
1764 (inputs
1765 `(("python2-mock" ,python2-mock)
1766 ,@(package-inputs base))))))
1767
8fa58fc9
CAW
1768(define-public python-pytest-xdist
1769 (package
1770 (name "python-pytest-xdist")
1771 (version "1.14")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "pytest-xdist" version ".zip"))
1776 (sha256
1777 (base32
1778 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))))
1779 (build-system python-build-system)
1780 (native-inputs
1781 `(("unzip" ,unzip)
8fa58fc9 1782 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1783 (inputs
1784 `(("python-apipkg" ,python-apipkg)
1785 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1786 ("python-pytest" ,python-pytest)
1787 ("python-py" ,python-py)))
1788 (home-page
1789 "https://github.com/pytest-dev/pytest-xdist")
1790 (synopsis
1791 "Plugin for py.test with distributed testing and loop-on-failing modes")
1792 (description
1793 "The pytest-xdist plugin extends py.test with some unique test execution
1794modes: parallelization, running tests in boxed subprocesses, the ability
1795to run tests repeatedly when failed, and the ability to run tests on multiple
1796Python interpreters or platforms. It uses rsync to copy the existing
1797program code to a remote location, executes there, and then syncs the
1798result back.")
fbe9abcc
EF
1799 (license license:expat)
1800 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1801
1802(define-public python2-pytest-xdist
fbe9abcc
EF
1803 (let ((base (package-with-python2
1804 (strip-python2-variant python-pytest-xdist))))
1805 (package
1806 (inherit base)
1807 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1808 ,@(package-native-inputs base))))))
8fa58fc9 1809
84d24017
DT
1810(define-public python-scripttest
1811 (package
1812 (name "python-scripttest")
1813 (version "1.3")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (string-append
1818 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1823 (build-system python-build-system)
1824 (inputs
1825 `(("python-setuptools" ,python-setuptools)
1826 ("python-pytest" ,python-pytest)))
1827 (home-page "http://pythonpaste.org/scripttest/")
1828 (synopsis "Python library to test command-line scripts")
1829 (description "Scripttest is a Python helper library for testing
1830interactive command-line applications. With it you can run a script in a
1831subprocess and see the output as well as any file modifications.")
bd3fa666 1832 (license license:expat)))
84d24017
DT
1833
1834(define-public python2-scripttest
1835 (package-with-python2 python-scripttest))
1836
d8fa80e1
DT
1837(define-public python-testtools
1838 (package
1839 (name "python-testtools")
1840 (version "1.0.0")
1841 (source
1842 (origin
1843 (method url-fetch)
1844 (uri (string-append
1845 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1846 version ".tar.gz"))
1847 (sha256
1848 (base32
1849 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1850 (build-system python-build-system)
0e88cbf8
CR
1851 (propagated-inputs
1852 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1853 (inputs
1854 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1855 ("python-extras" ,python-extras)))
1856 (home-page "https://github.com/testing-cabal/testtools")
1857 (synopsis
1858 "Extensions to the Python standard library unit testing framework")
1859 (description
1860 "Testtools extends the Python standard library unit testing framework to
1861provide matchers, more debugging information, and cross-Python
1862compatibility.")
3f641af0 1863 (license license:psfl)))
d8fa80e1
DT
1864
1865(define-public python2-testtools
1866 (package-with-python2 python-testtools))
1867
5bf3afea
DT
1868(define-public python-testscenarios
1869 (package
1870 (name "python-testscenarios")
1871 (version "0.4")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (string-append
1876 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1877 version ".tar.gz"))
1878 (sha256
1879 (base32
1880 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1881 (build-system python-build-system)
1882 (inputs
1883 `(("python-setuptools" ,python-setuptools)
1884 ("python-testtools" ,python-testtools)
1885 ("python-mimeparse" ,python-mimeparse)))
1886 (home-page "https://launchpad.net/testscenarios")
1887 (synopsis "Pyunit extension for dependency injection")
1888 (description
1889 "Testscenarios provides clean dependency injection for Python unittest
1890style tests.")
3f641af0 1891 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1892
1893(define-public python2-testscenarios
1894 (package-with-python2 python-testscenarios))
1895
dac79ecc
DT
1896(define-public python-testresources
1897 (package
1898 (name "python-testresources")
1899 (version "0.2.7")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (string-append
1904 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1905 version ".tar.gz"))
1906 (sha256
1907 (base32
1908 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1909 (build-system python-build-system)
1910 (inputs
1911 `(("python-setuptools" ,python-setuptools)))
1912 (home-page "https://launchpad.net/testresources")
1913 (synopsis
1914 "Pyunit extension for managing test resources")
1915 (description
1916 "Testresources is an extension to Python's unittest to allow declarative
1917use of resources by test cases.")
3f641af0 1918 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1919
1920(define-public python2-testresources
1921 (package-with-python2 python-testresources))
1922
070ab058
DT
1923(define-public python-subunit
1924 (package
1925 (name "python-subunit")
1926 (version "0.0.21")
1927 (source
1928 (origin
1929 (method url-fetch)
1930 (uri (string-append
1931 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1932 version ".tar.gz"))
1933 (sha256
1934 (base32
1935 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1936 (build-system python-build-system)
1937 (inputs
1938 `(("python-setuptools" ,python-setuptools)
1939 ("python-testtools" ,python-testtools)
1940 ("python-mimeparse" ,python-mimeparse)
1941 ("python-testscenarios" ,python-testscenarios)))
1942 (home-page "http://launchpad.net/subunit")
1943 (synopsis "Python implementation of the subunit protocol")
1944 (description
1945 "Python-subunit is a Python implementation of the subunit test streaming
1946protocol.")
3f641af0 1947 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1948
1949(define-public python2-subunit
1950 (package-with-python2 python-subunit))
1951
7787ef76
CR
1952;; Recent versions of python-fixtures need a recent version of python-pbr,
1953;; which needs a recent version of python-fixtures. To fix this circular
1954;; dependency, we keep old versions of python-fixtures and python-pbr to
1955;; bootstrap the whole thing:
1956;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1957;; - python-pbr-0.11 is used to build python-fixtures
1958;; - python-fixtures is used to build python-pbr
1959(define-public python-fixtures-0.3.16
cd49454b
DT
1960 (package
1961 (name "python-fixtures")
1962 (version "0.3.16")
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (string-append
1967 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1968 version ".tar.gz"))
1969 (sha256
1970 (base32
1971 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1972 (build-system python-build-system)
1973 (inputs
1974 `(("python-setuptools" ,python-setuptools)))
1975 (arguments
1976 '(#:tests? #f)) ; no setup.py test command
1977 (home-page "https://launchpad.net/python-fixtures")
1978 (synopsis "Python test fixture library")
1979 (description
1980 "Fixtures provides a way to create reusable state, useful when writing
1981Python tests.")
3f641af0 1982 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 1983
7787ef76
CR
1984(define-public python2-fixtures-0.3.16
1985 (package-with-python2 python-fixtures-0.3.16))
1986
1987(define-public python-pbr-0.11
1988 (package
1989 (name "python-pbr")
1990 (version "0.11.0")
1991 (source
1992 (origin
1993 (method url-fetch)
1994 (uri (string-append
1995 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1996 version ".tar.gz"))
1997 (sha256
1998 (base32
1999 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2000 (build-system python-build-system)
2001 (arguments
2002 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2003 (inputs
2004 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2005 ("python-pip" ,python-pip)
2006 ("python-setuptools" ,python-setuptools)))
2007 (home-page "https://launchpad.net/pbr")
2008 (synopsis "Change the default behavior of Python’s setuptools")
2009 (description
2010 "Python Build Reasonableness (PBR) is a library that injects some useful
2011and sensible default behaviors into your setuptools run.")
3f641af0 2012 (license license:asl2.0)))
7787ef76
CR
2013
2014(define-public python2-pbr-0.11
2015 (package-with-python2 python-pbr-0.11))
2016
1ef09c0c 2017(define-public python-pbr
e25f0174
BW
2018 (package
2019 (name "python-pbr")
1ef09c0c
BW
2020 (version "1.8.1")
2021 (source
e25f0174
BW
2022 (origin
2023 (method url-fetch)
2024 (uri (string-append
2025 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2026 version
2027 ".tar.gz"))
2028 (sha256
2029 (base32
2030 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2031 (build-system python-build-system)
e25f0174
BW
2032 (arguments
2033 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2034 (propagated-inputs
2035 `(("python-testrepository" ,python-testrepository)
2036 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2037 (inputs
e25f0174
BW
2038 `(("python-fixtures" ,python-fixtures)
2039 ("python-mimeparse" ,python-mimeparse)
2040 ("python-mock" ,python-mock)
2041 ("python-setuptools" ,python-setuptools)
2042 ("python-six" ,python-six)
2043 ("python-sphinx" ,python-sphinx)
2044 ("python-testrepository" ,python-testrepository)
2045 ("python-testresources" ,python-testresources)
2046 ("python-testscenarios" ,python-testscenarios)
2047 ("python-testtools" ,python-testtools)
2048 ("python-virtualenv" ,python-virtualenv)))
2049 (home-page "https://launchpad.net/pbr")
2050 (synopsis "Change the default behavior of Python’s setuptools")
2051 (description
2052 "Python Build Reasonableness (PBR) is a library that injects some useful
2053and sensible default behaviors into your setuptools run.")
3f641af0 2054 (license license:asl2.0)))
1ef09c0c
BW
2055
2056(define-public python2-pbr
e25f0174 2057 (package-with-python2 python-pbr))
1ef09c0c 2058
7787ef76
CR
2059(define-public python-fixtures
2060 (package
2061 (name "python-fixtures")
13fcc6df 2062 (version "1.4.0")
7787ef76
CR
2063 (source
2064 (origin
2065 (method url-fetch)
13fcc6df 2066 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2067 (sha256
2068 (base32
13fcc6df 2069 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2070 (build-system python-build-system)
2071 (propagated-inputs
2072 `(("python-six" ,python-six)
2073 ("python-pbr-0.11" ,python-pbr-0.11)))
2074 (inputs
2075 `(("python-pip" ,python-pip)
2076 ("python-setuptools" ,python-setuptools)
2077 ;; Tests
2078 ("python-testtools" ,python-testtools)))
2079 (arguments
2080 '(#:tests? #f)) ; no setup.py test command
2081 (home-page "https://launchpad.net/python-fixtures")
2082 (synopsis "Python test fixture library")
2083 (description
2084 "Fixtures provides a way to create reusable state, useful when writing
2085Python tests.")
3f641af0 2086 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2087
cd49454b
DT
2088(define-public python2-fixtures
2089 (package-with-python2 python-fixtures))
2090
b24a0c00
DT
2091(define-public python-testrepository
2092 (package
2093 (name "python-testrepository")
2094 (version "0.0.20")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (string-append
2099 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2100 version ".tar.gz"))
2101 (sha256
2102 (base32
2103 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2104 (build-system python-build-system)
05de40c5 2105 (propagated-inputs
7787ef76 2106 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2107 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2108 (inputs
2109 `(("python-setuptools" ,python-setuptools)
b24a0c00 2110 ("python-subunit" ,python-subunit)
b24a0c00
DT
2111 ("python-mimeparse" ,python-mimeparse)))
2112 (home-page "https://launchpad.net/testrepository")
2113 (synopsis "Database for Python test results")
2114 (description "Testrepository provides a database of test results which can
2115be used as part of a developer's workflow to check things such as what tests
2116have failed since the last commit or what tests are currently failing.")
3f641af0 2117 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2118
2119(define-public python2-testrepository
2120 (package-with-python2 python-testrepository))
2121
243a009a
DT
2122(define-public python-coverage
2123 (package
2124 (name "python-coverage")
4d4cf3dd 2125 (version "4.1")
243a009a
DT
2126 (source
2127 (origin
2128 (method url-fetch)
82a3c582 2129 (uri (pypi-uri "coverage" version))
243a009a
DT
2130 (sha256
2131 (base32
4d4cf3dd 2132 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2133 (build-system python-build-system)
2134 (inputs
2135 `(("python-setuptools" ,python-setuptools)))
2136 (home-page "http://nedbatchelder.com/code/coverage")
2137 (synopsis "Code coverage measurement for Python")
2138 (description
2139 "Coverage measures code coverage, typically during test execution. It
2140uses the code analysis tools and tracing hooks provided in the Python standard
2141library to determine which lines are executable, and which have been
2142executed.")
3f641af0 2143 (license license:bsd-3)))
243a009a
DT
2144
2145(define-public python2-coverage
2146 (package-with-python2 python-coverage))
2147
12f839fd
EF
2148(define-public python-cov-core
2149 (package
2150 (name "python-cov-core")
2151 (version "1.15.0")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "cov-core" version))
2156 (sha256
2157 (base32
2158 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2159 (build-system python-build-system)
2160 (native-inputs
2161 `(("python-coverage" ,python-coverage)))
2162 (home-page "https://github.com/schlamar/cov-core")
2163 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2164 (description
2165 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2166It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2167 (license license:expat)
2168 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2169
2170(define-public python2-cov-core
8120205c 2171 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2172 (package (inherit cov-core)
2173 (native-inputs
2174 `(("python2-setuptools" ,python2-setuptools)
2175 ,@(package-native-inputs cov-core))))))
2176
041358fb
DT
2177(define-public python-discover
2178 (package
2179 (name "python-discover")
2180 (version "0.4.0")
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri (string-append
2185 "https://pypi.python.org/packages/source/d/discover/discover-"
2186 version ".tar.gz"))
2187 (sha256
2188 (base32
2189 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2190 (build-system python-build-system)
2191 (inputs
2192 `(("python-setuptools" ,python-setuptools)))
2193 (home-page "http://pypi.python.org/pypi/discover/")
2194 (synopsis
2195 "Python test discovery for unittest")
2196 (description
2197 "Discover provides test discovery for unittest, a feature that has been
e881752c 2198backported from Python 2.7 for Python 2.4+.")
3f641af0 2199 (license license:bsd-3)))
041358fb
DT
2200
2201(define-public python2-discover
2202 (package-with-python2 python-discover))
2203
a480bc41
EB
2204(define-public behave
2205 (package
2206 (name "behave")
287cfd1a 2207 (version "1.2.5")
a480bc41
EB
2208 (source (origin
2209 (method url-fetch)
287cfd1a 2210 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2211 (sha256
2212 (base32
287cfd1a 2213 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2214 (build-system python-build-system)
2215 (inputs
2216 `(("python-setuptools" ,python-setuptools)
2217 ("python-six" ,python-six)
a480bc41
EB
2218 ("python-parse" ,python-parse)
2219 ("python-parse-type" ,python-parse-type)))
2220 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2221 ;PyHamcrest>=1.8
2222 (home-page "http://github.com/behave/behave")
2223 (synopsis "Python behavior-driven development")
2224 (description
2225 "Behave is a tool for behavior-driven development in python.
2226Behavior-driven development (or BDD) is an agile software development
2227technique that encourages collaboration between developers, QA and
2228non-technical or business participants in a software project. Behave uses
2229tests written in a natural language style, backed up by Python code.")
3f641af0 2230 (license license:x11)))
c7303d3c
DT
2231
2232(define-public python-exif-read
2233 (package
2234 (name "python-exif-read")
2a2d0981 2235 (version "2.1.2")
c7303d3c
DT
2236 (source (origin
2237 (method url-fetch)
2a2d0981 2238 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2239 (sha256
2240 (base32
2a2d0981 2241 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2242 (build-system python-build-system)
2243 (inputs
2244 `(("python-setuptools" ,python-setuptools)))
2245 (arguments `(#:tests? #f)) ; no tests
2246 (home-page "https://github.com/ianare/exif-py")
2247 (synopsis "Python library to extract EXIF data from image files")
2248 (description
2249 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2250files.")
3f641af0 2251 (license license:bsd-3)))
c7303d3c
DT
2252
2253(define-public python2-exif-read
2254 (package-with-python2 python-exif-read))
d5f89b22
DT
2255
2256(define-public python-pyld
2257 (package
2258 (name "python-pyld")
af1ab773 2259 (version "0.6.8")
d5f89b22
DT
2260 (source (origin
2261 (method url-fetch)
af1ab773 2262 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2263 (sha256
2264 (base32
af1ab773 2265 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2266 (build-system python-build-system)
2267 (inputs
2268 `(("python-setuptools" ,python-setuptools)))
2269 (arguments `(#:tests? #f)) ; no tests
2270 (home-page "http://github.com/digitalbazaar/pyld")
2271 (synopsis "Python implementation of the JSON-LD specification")
2272 (description
2273 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2274 (license license:bsd-3)))
d5f89b22
DT
2275
2276(define-public python2-pyld
2277 (package-with-python2 python-pyld))
3a1f9a68
DT
2278
2279(define-public python-certifi
2280 (package
2281 (name "python-certifi")
9a41f443 2282 (version "2015.11.20.1")
3a1f9a68
DT
2283 (source (origin
2284 (method url-fetch)
9a41f443 2285 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2286 (sha256
2287 (base32
9a41f443 2288 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2289 (build-system python-build-system)
2290 (inputs
2291 `(("python-setuptools" ,python-setuptools)))
2292 (arguments `(#:tests? #f)) ; no tests
2293 (home-page "http://python-requests.org/")
2294 (synopsis "Python CA certificate bundle")
2295 (description
2296 "Certifi is a Python library that contains a CA certificate bundle, which
2297is used by the Requests library to verify HTTPS requests.")
3f641af0 2298 (license license:asl2.0)))
3a1f9a68
DT
2299
2300(define-public python2-certifi
2301 (package-with-python2 python-certifi))
e6cfbd36 2302
12c270dd
RW
2303(define-public python-click
2304 (package
2305 (name "python-click")
43accb58 2306 (version "6.6")
12c270dd
RW
2307 (source
2308 (origin
2309 (method url-fetch)
375f224b 2310 (uri (pypi-uri "click" version))
12c270dd 2311 (sha256
43accb58
LF
2312 (base32
2313 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2314 (build-system python-build-system)
e2ab5a09
BW
2315 (arguments
2316 `(#:phases
2317 (modify-phases %standard-phases
2318 (add-after 'unpack 'fix-paths
2319 (lambda* (#:key inputs #:allow-other-keys)
2320 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2321 "cross-libc" "libc"))))
2322 (substitute* "click/_unicodefun.py"
2323 (("'locale'")
2324 (string-append "'" glibc "/bin/locale'"))))
2325 #t)))))
12c270dd
RW
2326 (native-inputs
2327 `(("python-setuptools" ,python-setuptools)))
2328 (home-page "http://click.pocoo.org")
2329 (synopsis "Command line library for Python")
2330 (description
2331 "Click is a Python package for creating command line interfaces in a
2332composable way with as little code as necessary. Its name stands for
2333\"Command Line Interface Creation Kit\". It's highly configurable but comes
2334with sensible defaults out of the box.")
3f641af0 2335 (license license:bsd-3)))
12c270dd
RW
2336
2337(define-public python2-click
2338 (package-with-python2 python-click))
2339
addc808d
EF
2340(define-public python-wheel
2341 (package
2342 (name "python-wheel")
40981b5c 2343 (version "0.29.0")
e1ba0749
EF
2344 (source
2345 (origin
2346 (method url-fetch)
2347 (uri (pypi-uri "wheel" version))
2348 (sha256
2349 (base32
40981b5c 2350 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2351 (build-system python-build-system)
2352 (native-inputs
2353 `(("python-setuptools" ,python-setuptools)
2354 ("python-jsonschema" ,python-jsonschema)
2355 ("python-pytest-cov" ,python-pytest-cov)))
2356 (home-page "https://bitbucket.org/pypa/wheel/")
2357 (synopsis "Format for built Python packages")
2358 (description
2359 "A wheel is a ZIP-format archive with a specially formatted filename and
2360the @code{.whl} extension. It is designed to contain all the files for a PEP
2361376 compatible install in a way that is very close to the on-disk format. Many
2362packages will be properly installed with only the @code{Unpack} step and the
2363unpacked archive preserves enough information to @code{Spread} (copy data and
2364scripts to their final locations) at any later time. Wheel files can be
2365installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2366 (license license:expat)
2367 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2368
2369(define-public python2-wheel
8ad4ae20
LF
2370 (let ((wheel (package-with-python2
2371 (strip-python2-variant python-wheel))))
264ae686 2372 (package (inherit wheel)
8ad4ae20
LF
2373 (native-inputs `(("python2-functools32" ,python2-functools32)
2374 ,@(package-native-inputs wheel))))))
2375
addc808d 2376
ae641128 2377(define-public python-requests
e6cfbd36 2378 (package
ae641128 2379 (name "python-requests")
74a066f9 2380 (version "2.9.1")
e6cfbd36
DT
2381 (source (origin
2382 (method url-fetch)
5d691657 2383 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2384 (sha256
2385 (base32
74a066f9 2386 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2387 (build-system python-build-system)
5d691657 2388 (native-inputs
6a308947
EF
2389 `(("python-setuptools" ,python-setuptools)
2390 ("python-py" ,python-py)
5d691657
EF
2391 ("python-pytest" ,python-pytest)
2392 ("python-pytest-cov" ,python-pytest-cov)
2393 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2394 (home-page "http://python-requests.org/")
2395 (synopsis "Python HTTP library")
2396 (description
2397 "Requests is a Python HTTP client library. It aims to be easier to use
2398than Python’s urllib2 library.")
3f641af0 2399 (license license:asl2.0)))
864b5211 2400
e9005180
DT
2401;; Some software requires an older version of Requests, notably Docker
2402;; Compose.
2403(define-public python-requests-2.7
2404 (package (inherit python-requests)
2405 (version "2.7.0")
2406 (source (origin
2407 (method url-fetch)
2408 (uri (pypi-uri "requests" version))
2409 (sha256
2410 (base32
2411 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2412
ae641128 2413(define-public python2-requests
8ad4ae20 2414 (package-with-python2 python-requests))
ae641128 2415
ea521b42
DT
2416(define-public python-vcversioner
2417 (package
2418 (name "python-vcversioner")
2419 (version "2.14.0.0")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "vcversioner" version))
2424 (sha256
2425 (base32
2426 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2427 (build-system python-build-system)
2428 (inputs
2429 `(("python-setuptools" ,python-setuptools)))
2430 (synopsis "Python library for version number discovery")
2431 (description "Vcversioner is a Python library that inspects tagging
2432information in a variety of version control systems in order to discover
2433version numbers.")
2434 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2435 (license license:isc)))
ea521b42
DT
2436
2437(define-public python2-vcversioner
2438 (package-with-python2 python-vcversioner))
ae641128 2439
864b5211
DT
2440(define-public python-jsonschema
2441 (package
2442 (name "python-jsonschema")
b3667afb 2443 (version "2.5.1")
864b5211
DT
2444 (source (origin
2445 (method url-fetch)
2446 (uri
2447 (string-append
2448 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2449 version ".tar.gz"))
2450 (sha256
2451 (base32
b3667afb 2452 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2453 (build-system python-build-system)
2454 (inputs
b3667afb
DT
2455 `(("python-setuptools" ,python-setuptools)
2456 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2457 (home-page "http://github.com/Julian/jsonschema")
2458 (synopsis "Implementation of JSON Schema for Python")
2459 (description
2460 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2461 (license license:expat)
2462 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2463
2464(define-public python2-jsonschema
a14600ec
LF
2465 (let ((jsonschema (package-with-python2
2466 (strip-python2-variant python-jsonschema))))
264ae686
EF
2467 (package (inherit jsonschema)
2468 (inputs
2469 `(("python2-functools32" ,python2-functools32)
2470 ,@(package-inputs jsonschema))))))
850189b8
DT
2471
2472(define-public python-unidecode
2473 (package
2474 (name "python-unidecode")
8925d4f3 2475 (version "0.04.18")
850189b8
DT
2476 (source (origin
2477 (method url-fetch)
8925d4f3 2478 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2479 (sha256
2480 (base32
8925d4f3 2481 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2482 (build-system python-build-system)
2483 (inputs
2484 `(("python-setuptools" ,python-setuptools)))
2485 (home-page "https://pypi.python.org/pypi/Unidecode")
2486 (synopsis "ASCII transliterations of Unicode text")
2487 (description
2488 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2489useful when integrating with legacy code that doesn't support Unicode, or for
2490ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2491machine identifiers from human-readable Unicode strings that should still be
2492somewhat intelligeble.")
3f641af0 2493 (license license:gpl2+)))
850189b8
DT
2494
2495(define-public python2-unidecode
2496 (package-with-python2 python-unidecode))
6d45fef4
DT
2497
2498(define-public python-pyjwt
2499 (package
2500 (name "python-pyjwt")
eb31d4b4 2501 (version "1.4.0")
6d45fef4
DT
2502 (source
2503 (origin
2504 (method url-fetch)
eb31d4b4 2505 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2506 (sha256
2507 (base32
eb31d4b4 2508 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2509 (build-system python-build-system)
eb31d4b4
EF
2510 (native-inputs
2511 `(("python-setuptools" ,python-setuptools)
2512 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2513 (arguments
2514 '(#:tests? #f)) ; test suite doesn't work
2515 (home-page "http://github.com/progrium/pyjwt")
2516 (synopsis "JSON Web Token implementation in Python")
2517 (description
2518 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2519 (license license:expat)))
6d45fef4
DT
2520
2521(define-public python2-pyjwt
2522 (package-with-python2 python-pyjwt))
2523
2cec1f6f
DT
2524(define-public python-oauthlib
2525 (package
2526 (name "python-oauthlib")
bde2171d 2527 (version "1.0.3")
2cec1f6f
DT
2528 (source (origin
2529 (method url-fetch)
bde2171d 2530 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2531 (sha256
2532 (base32
bde2171d 2533 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2534 (build-system python-build-system)
bde2171d 2535 (native-inputs
59f151ec 2536 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2537 ("python-nose" ,python-nose)
2538 ("python-mock" ,python-mock)))
bde2171d
EF
2539 (inputs
2540 `(("python-blinker" ,python-blinker)
2541 ("python-cryptography" ,python-cryptography)
2542 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2543 (home-page "https://github.com/idan/oauthlib")
2544 (synopsis "OAuth implementation for Python")
2545 (description
2546 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2547OAuth request-signing logic.")
3f641af0 2548 (license license:bsd-3)
59f151ec 2549 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2550
2551(define-public python2-oauthlib
59f151ec 2552 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2553 (package
2554 (inherit base)
59f151ec
EF
2555 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2556 ("python2-unittest2" ,python2-unittest2)
2557 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2558
2559(define-public python-itsdangerous
2560 (package
2561 (name "python-itsdangerous")
2562 (version "0.24")
2563 (source
2564 (origin
2565 (method url-fetch)
2566 (uri (string-append
2567 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2568 version ".tar.gz"))
2569 (sha256
2570 (base32
2571 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2572 (build-system python-build-system)
ec5dbb5c
DT
2573 (home-page "http://github.com/mitsuhiko/itsdangerous")
2574 (synopsis "Python library for passing data to/from untrusted environments")
2575 (description
2576 "Itsdangerous provides various helpers to pass trusted data to untrusted
2577environments and back.")
3f641af0 2578 (license license:bsd-3)
194d0d98 2579 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2580
2581(define-public python2-itsdangerous
194d0d98
EF
2582 (let ((base (package-with-python2
2583 (strip-python2-variant python-itsdangerous))))
2584 (package
2585 (inherit base)
2586 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2587 ,@(package-native-inputs base))))))
5731cae3 2588
8d12be1e
RW
2589(define-public python-pyyaml
2590 (package
2591 (name "python-pyyaml")
2592 (version "3.11")
2593 (source
2594 (origin
2595 (method url-fetch)
2596 (uri (string-append
2597 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2598 version ".tar.gz"))
2599 (sha256
2600 (base32
2601 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2602 (build-system python-build-system)
2603 (inputs
2604 `(("libyaml" ,libyaml)))
2605 (native-inputs
2606 `(("python-setuptools" ,python-setuptools)))
2607 (home-page "http://pyyaml.org/wiki/PyYAML")
2608 (synopsis "YAML parser and emitter for Python")
2609 (description
2610 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2611complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2612API, and sensible error messages. PyYAML supports standard YAML tags and
2613provides Python-specific tags that allow to represent an arbitrary Python
2614object.")
2615 (license license:expat)))
2616
2617(define-public python2-pyyaml
2618 (package-with-python2 python-pyyaml))
2619
5731cae3
DT
2620(define-public python-virtualenv
2621 (package
2622 (name "python-virtualenv")
58d04dba 2623 (version "15.0.3")
5731cae3
DT
2624 (source
2625 (origin
2626 (method url-fetch)
17804240 2627 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2628 (sha256
2629 (base32
58d04dba 2630 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2631 (build-system python-build-system)
17804240
EF
2632 (arguments
2633 `(#:phases
2634 (modify-phases %standard-phases
58d04dba
RW
2635 (replace 'check
2636 (lambda _
2637 ;; Disable failing test. See upstream bug report
2638 ;; https://github.com/pypa/virtualenv/issues/957
2639 (substitute* "tests/test_virtualenv.py"
2640 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2641 (zero? (system* "py.test")))))))
5731cae3
DT
2642 (inputs
2643 `(("python-setuptools" ,python-setuptools)
2644 ("python-mock" ,python-mock)
17804240 2645 ("python-pytest" ,python-pytest)))
5731cae3
DT
2646 (home-page "https://virtualenv.pypa.io/")
2647 (synopsis "Virtual Python environment builder")
2648 (description
2649 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2650 (license license:expat)))
5731cae3
DT
2651
2652(define-public python2-virtualenv
2653 (package-with-python2 python-virtualenv))
8176d4d5
DT
2654
2655(define-public python-markupsafe
2656 (package
2657 (name "python-markupsafe")
2658 (version "0.23")
2659 (source
2660 (origin
2661 (method url-fetch)
2662 (uri (string-append
2663 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2664 version ".tar.gz"))
2665 (sha256
2666 (base32
2667 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2668 (build-system python-build-system)
2669 (inputs
2670 `(("python-setuptools" ,python-setuptools)))
2671 (home-page "http://github.com/mitsuhiko/markupsafe")
2672 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2673 (description
2674 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2675for Python.")
3f641af0 2676 (license license:bsd-3)))
8176d4d5
DT
2677
2678(define-public python2-markupsafe
2679 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2680
2681(define-public python-jinja2
2682 (package
2683 (name "python-jinja2")
e98149b3 2684 (version "2.8")
fe34f0d1
DT
2685 (source
2686 (origin
2687 (method url-fetch)
e98149b3 2688 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2689 (sha256
2690 (base32
e98149b3 2691 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2692 (build-system python-build-system)
2693 (inputs
2694 `(("python-setuptools" ,python-setuptools)
2695 ("python-markupsafe" ,python-markupsafe)))
2696 (home-page "http://jinja.pocoo.org/")
2697 (synopsis "Python template engine")
2698 (description
2699 "Jinja2 is a small but fast and easy to use stand-alone template engine
2700written in pure Python.")
3f641af0 2701 (license license:bsd-3)))
fe34f0d1
DT
2702
2703(define-public python2-jinja2
2704 (package-with-python2 python-jinja2))
3580ab8b 2705
f7d17ac7
EE
2706(define-public python-pystache
2707 (package
2708 (name "python-pystache")
2709 (version "0.5.4")
2710 (source (origin
2711 (method url-fetch)
2712 (uri (pypi-uri "pystache" version))
2713 (sha256
2714 (base32
2715 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2716 (build-system python-build-system)
2717 (native-inputs
2718 `(("python-setuptools" ,python-setuptools)))
2719 (home-page "http://defunkt.io/pystache/")
2720 (synopsis "Python logic-less template engine")
2721 (description
2722 "Pystache is a Python implementation of the framework agnostic,
2723logic-free templating system Mustache.")
2724 (license license:expat)))
2725
2726(define-public python2-pystache
2727 (package-with-python2 python-pystache))
2728
1285119b
RW
2729(define-public python-joblib
2730 (package
2731 (name "python-joblib")
2732 (version "0.9.0b4")
2733 (source (origin
2734 (method url-fetch)
2735 (uri (string-append "https://pypi.python.org/packages/source/"
2736 "j/joblib/joblib-" version ".tar.gz"))
2737 (sha256
2738 (base32
2739 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2740 (build-system python-build-system)
2741 (native-inputs
2742 `(("python-setuptools" ,python-setuptools)
2743 ("python-nose" ,python-nose)))
2744 (home-page "http://pythonhosted.org/joblib/")
2745 (synopsis "Using Python functions as pipeline jobs")
2746 (description
2747 "Joblib is a set of tools to provide lightweight pipelining in Python.
2748In particular, joblib offers: transparent disk-caching of the output values
2749and lazy re-evaluation (memoize pattern), easy simple parallel computing
2750logging and tracing of the execution.")
3f641af0 2751 (license license:bsd-3)))
1285119b
RW
2752
2753(define-public python2-joblib
2754 (package-with-python2 python-joblib))
2755
3580ab8b
DT
2756(define-public python-docutils
2757 (package
2758 (name "python-docutils")
2759 (version "0.12")
2760 (source
2761 (origin
2762 (method url-fetch)
2763 (uri (string-append
2764 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2765 version ".tar.gz"))
2766 (sha256
2767 (base32
2768 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2769 (build-system python-build-system)
2770 (inputs
2771 `(("python-setuptools" ,python-setuptools)))
2772 (arguments
2773 '(#:tests? #f)) ; no setup.py test command
2774 (home-page "http://docutils.sourceforge.net/")
2775 (synopsis "Python Documentation Utilities")
2776 (description
2777 "Docutils is a modular system for processing documentation into useful
2778formats, such as HTML, XML, and LaTeX. For input Docutils supports
2779reStructuredText.")
2780 ;; Most of the source code is public domain, but some source files are
2781 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2782 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2783
2784(define-public python2-docutils
2785 (package-with-python2 python-docutils))
fb35b7c0
DT
2786
2787(define-public python-pygments
2788 (package
2789 (name "python-pygments")
9f442285 2790 (version "2.0.2")
fb35b7c0
DT
2791 (source
2792 (origin
2793 (method url-fetch)
9f442285 2794 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2795 (sha256
2796 (base32
9f442285 2797 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2798 (build-system python-build-system)
2799 (inputs
2800 `(("python-setuptools" ,python-setuptools)))
2801 (home-page "http://pygments.org/")
2802 (synopsis "Syntax highlighting")
2803 (description
2804 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2805 (license license:bsd-2)))
fb35b7c0
DT
2806
2807(define-public python2-pygments
2808 (package-with-python2 python-pygments))
9dd6078d
DT
2809
2810(define-public python-sphinx
2811 (package
2812 (name "python-sphinx")
2813 (version "1.2.3")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (string-append
2818 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2819 version ".tar.gz"))
2820 (sha256
2821 (base32
2822 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2823 (build-system python-build-system)
2824 (inputs
2825 `(("python-setuptools" ,python-setuptools)
2826 ("python-jinja2" ,python-jinja2)
2827 ("python-docutils" ,python-docutils)
2828 ("python-pygments" ,python-pygments)))
2829 (home-page "http://sphinx-doc.org/")
2830 (synopsis "Python documentation generator")
2831 (description "Sphinx is a tool that makes it easy to create documentation
2832for Python projects or other documents consisting of multiple reStructuredText
2833sources.")
3f641af0 2834 (license license:bsd-3)))
9dd6078d
DT
2835
2836(define-public python2-sphinx
2837 (package-with-python2 python-sphinx))
6888830b 2838
ad320b20
RW
2839(define-public python-sphinx-rtd-theme
2840 (package
2841 (name "python-sphinx-rtd-theme")
2842 (version "0.1.6")
2843 (source
2844 (origin
2845 (method url-fetch)
2846 (uri (string-append "https://pypi.python.org/packages/source/s/"
2847 "sphinx_rtd_theme/sphinx_rtd_theme-"
2848 version ".tar.gz"))
2849 (sha256
2850 (base32
2851 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2852 (build-system python-build-system)
2853 (arguments
2854 `(;; With standard flags, the install phase attempts to create a zip'd
2855 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2856 ;; before 1980'
2857 #:configure-flags '("--single-version-externally-managed"
2858 "--record=sphinx-rtd-theme.txt")))
2859 (native-inputs
2860 `(("python-setuptools" ,python-setuptools)))
2861 (inputs
2862 `(("python-docutils" ,python-docutils)
2863 ("python-sphinx" ,python-sphinx)))
2864 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2865 (synopsis "ReadTheDocs.org theme for Sphinx")
2866 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2867 (license license:expat)))
ad320b20
RW
2868
2869(define-public python2-sphinx-rtd-theme
2870 (package-with-python2 python-sphinx-rtd-theme))
2871
f4de5b3b
CAW
2872(define-public python-feedgenerator
2873 (package
2874 (name "python-feedgenerator")
f0412aa2 2875 (version "1.8")
f4de5b3b 2876 (source
f4de5b3b 2877 (origin
f0412aa2
EF
2878 (method url-fetch)
2879 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2880 (sha256
2881 (base32
f0412aa2 2882 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2883 (build-system python-build-system)
f0412aa2 2884 (native-inputs
f4de5b3b
CAW
2885 `(("python-setuptools" ,python-setuptools)
2886 ("python-pytz" ,python-pytz)
2887 ("python-six" ,python-six)))
f0412aa2 2888 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2889 (synopsis
2890 "Standalone version of Django's Atom/RSS feed generator")
2891 (description
2892 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2893which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2894 (license license:bsd-3)))
f4de5b3b
CAW
2895
2896(define-public python2-feedgenerator
2897 (package-with-python2 python-feedgenerator))
2898
59ad30e3
CAW
2899(define-public python-blinker
2900 (package
2901 (name "python-blinker")
7fb9ff4d 2902 (version "1.4")
59ad30e3
CAW
2903 (source
2904 (origin
2905 (method url-fetch)
7fb9ff4d 2906 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2907 (sha256
2908 (base32
7fb9ff4d 2909 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2910 (build-system python-build-system)
2911 (native-inputs
2912 `(("python-setuptools" ,python-setuptools)))
2913 ;; No "test" command supplied to setuptools, so unless there's another way
2914 ;; to run tests, we're skipping them!
2915 (arguments '(#:tests? #f))
2916 (home-page "http://pythonhosted.org/blinker/")
2917 (synopsis "Fast, simple object-to-object and broadcast signaling")
2918 (description
2919 "Blinker provides a fast dispatching system that allows any number of
2920interested parties to subscribe to events, or \"signals\".")
2921 (license license:expat)))
2922
2923(define-public python2-blinker
2924 (package-with-python2 python-blinker))
2925
b8050e71
CAW
2926(define-public pelican
2927 (package
2928 (name "pelican")
11f97c27 2929 (version "3.6.3")
b8050e71
CAW
2930 (source
2931 (origin
2932 (method url-fetch)
11f97c27 2933 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2934 (sha256
2935 (base32
11f97c27 2936 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2937 (build-system python-build-system)
d9f2dece 2938 (inputs
b8050e71
CAW
2939 `(("python-feedgenerator" ,python-feedgenerator)
2940 ("python-jinja2" ,python-jinja2)
2941 ("python-pygments" ,python-pygments)
2942 ("python-docutils" ,python-docutils)
2943 ("python-pytz" ,python-pytz)
2944 ("python-blinker" ,python-blinker)
2945 ("python-unidecode" ,python-unidecode)
2946 ("python-six" ,python-six)
2947 ("python-dateutil-2" ,python-dateutil-2)))
2948 (home-page "http://getpelican.com/")
2949 (arguments
2950 `(;; XXX Requires a lot more packages to do unit tests :P
2951 #:tests? #f
2952 #:phases (modify-phases %standard-phases
2953 (add-before
2954 'install 'adjust-requires
2955 ;; Since feedgenerator is installed from git, it doesn't
2956 ;; conform to the version requirements.
2957 ;;
2958 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2959 ;; version requirement so setuptools doesn't get confused.
2960 (lambda _
2961 (substitute* "setup.py"
2962 (("['\"]feedgenerator.*?['\"]")
2963 "'feedgenerator'")))))))
2964 (synopsis "Python-based static site publishing system")
2965 (description
2966 "Pelican is a tool to generate a static blog from reStructuredText,
2967Markdown input files, and more. Pelican uses Jinja2 for templating
2968and is very extensible.")
3f641af0 2969 (license license:agpl3+)))
b8050e71 2970
240ca4aa
RW
2971(define-public python-scikit-learn
2972 (package
2973 (name "python-scikit-learn")
be0a4c26 2974 (version "0.16.1")
240ca4aa
RW
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (string-append
2979 "https://github.com/scikit-learn/scikit-learn/archive/"
2980 version ".tar.gz"))
7e21b9fb 2981 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2982 (sha256
2983 (base32
be0a4c26 2984 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2985 (build-system python-build-system)
2986 (arguments
2987 `(#:phases
2988 (alist-cons-before
2f6b3d2e
RW
2989 'check 'set-HOME
2990 ;; some tests require access to "$HOME"
2991 (lambda _ (setenv "HOME" "/tmp"))
2992 ;; Tests can only be run after the library has been installed and not
2993 ;; within the source directory.
2994 (alist-cons-after
2995 'install 'check
2996 (lambda _
2997 (with-directory-excursion "/tmp"
2998 ;; With Python 3 one test of 3334 fails
2999 ;; (sklearn.tests.test_common.test_transformers); see
3000 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3001 (system* "nosetests" "-v" "sklearn")))
3002 (alist-delete 'check %standard-phases)))))
240ca4aa 3003 (inputs
2f6b3d2e 3004 `(("openblas" ,openblas)
240ca4aa
RW
3005 ("python-nose" ,python-nose)))
3006 (propagated-inputs
3007 `(("python-numpy" ,python-numpy)
3008 ("python-scipy" ,python-scipy)))
3009 (home-page "http://scikit-learn.org/")
3010 (synopsis "Machine Learning in Python")
3011 (description
3012 "Scikit-learn provides simple and efficient tools for data
3013mining and data analysis.")
25a2f81f
EF
3014 (license license:bsd-3)
3015 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3016
3017(define-public python2-scikit-learn
25a2f81f 3018 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3019
12f8f9bb
RW
3020(define-public python-scikit-image
3021 (package
3022 (name "python-scikit-image")
3023 (version "0.11.3")
3024 (source
3025 (origin
3026 (method url-fetch)
3027 (uri (string-append
3028 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3029 version ".tar.gz"))
3030 (sha256
3031 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3032 (build-system python-build-system)
3033 (propagated-inputs
3034 `(("python-matplotlib" ,python-matplotlib)
3035 ("python-networkx" ,python-networkx)
3036 ("python-numpy" ,python-numpy)
3037 ("python-scipy" ,python-scipy)
3038 ("python-six" ,python-six)
3039 ("python-pillow" ,python-pillow)))
3040 (native-inputs
3041 `(("python-cython" ,python-cython)
3042 ("python-setuptools" ,python-setuptools)))
3043 (home-page "http://scikit-image.org/")
3044 (synopsis "Image processing in Python")
3045 (description
e881752c 3046 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3047 (license license:bsd-3)
3048 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3049
3050(define-public python2-scikit-image
2b031d3f
EF
3051 (let ((scikit-image (package-with-python2
3052 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3053 (package (inherit scikit-image)
3054 (native-inputs
3055 `(("python2-mock" ,python2-mock)
3056 ,@(package-native-inputs scikit-image)))
3057 (propagated-inputs
3058 `(("python2-pytz" ,python2-pytz)
2b031d3f 3059 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3060
5394a6a6
RW
3061(define-public python-redis
3062 (package
3063 (name "python-redis")
3064 (version "2.10.3")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (string-append
3069 "https://pypi.python.org/packages/source/r/redis/redis-"
3070 version ".tar.gz"))
3071 (sha256
3072 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3073 (build-system python-build-system)
3074 ;; Tests require a running Redis server
3075 (arguments '(#:tests? #f))
3076 (native-inputs
3077 `(("python-setuptools" ,python-setuptools)
3078 ("python-pytest" ,python-pytest)))
3079 (home-page "https://github.com/andymccurdy/redis-py")
3080 (synopsis "Redis Python client")
3081 (description
3082 "This package provides a Python interface to the Redis key-value store.")
3083 (license license:expat)))
3084
3085(define-public python2-redis
3086 (package-with-python2 python-redis))
3087
748cef5b
RW
3088(define-public python-rq
3089 (package
3090 (name "python-rq")
3091 (version "0.5.2")
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (string-append
3096 "https://pypi.python.org/packages/source/r/rq/rq-"
3097 version ".tar.gz"))
3098 (sha256
3099 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3100 (build-system python-build-system)
3101 (propagated-inputs
3102 `(("python-click" ,python-click)
3103 ("python-redis" ,python-redis)))
3104 (native-inputs
3105 `(("python-setuptools" ,python-setuptools)))
3106 (home-page "http://python-rq.org/")
3107 (synopsis "Simple job queues for Python")
3108 (description
3109 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3110processing them in the background with workers. It is backed by Redis and it
3111is designed to have a low barrier to entry.")
3f641af0 3112 (license license:bsd-2)))
748cef5b
RW
3113
3114(define-public python2-rq
3115 (package-with-python2 python-rq))
3116
6888830b
FB
3117(define-public python-cython
3118 (package
3119 (name "python-cython")
dd22efef 3120 (version "0.24.1")
6888830b
FB
3121 (source
3122 (origin
3123 (method url-fetch)
56918e26 3124 (uri (pypi-uri "Cython" version))
6888830b
FB
3125 (sha256
3126 (base32
dd22efef 3127 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3128 (build-system python-build-system)
3129 ;; we need the full python package and not just the python-wrapper
3130 ;; because we need libpython3.3m.so
3131 (inputs
3132 `(("python" ,python)))
3133 (arguments
3134 `(#:phases
b92f651b
EF
3135 (modify-phases %standard-phases
3136 (add-before 'check 'set-HOME
3137 ;; some tests require access to "$HOME/.cython"
3138 (lambda _ (setenv "HOME" "/tmp")))
3139 (replace 'check
3140 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3141 (home-page "http://cython.org/")
3142 (synopsis "C extensions for Python")
3143 (description "Cython is an optimising static compiler for both the Python
3144programming language and the extended Cython programming language. It makes
3145writing C extensions for Python as easy as Python itself.")
3f641af0 3146 (license license:asl2.0)
48b311b1 3147 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3148
3149(define-public python2-cython
48b311b1
LC
3150 (package (inherit (package-with-python2
3151 (strip-python2-variant python-cython)))
6888830b
FB
3152 (name "python2-cython")
3153 (inputs
3154 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
3155
3156;; This version of numpy is missing the documentation and is only used to
3157;; build matplotlib which is required to build numpy's documentation.
3158(define python-numpy-bootstrap
3159 (package
3160 (name "python-numpy-bootstrap")
ef9b4c04 3161 (version "1.10.4")
0da98533
FB
3162 (source
3163 (origin
3164 (method url-fetch)
de67e922 3165 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3166 "/numpy-" version ".tar.gz"))
3167 (sha256
3168 (base32
ef9b4c04 3169 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3170 (build-system python-build-system)
3171 (inputs
3172 `(("python-nose" ,python-nose)
cba256f8
RW
3173 ("openblas" ,openblas)
3174 ("lapack" ,lapack)))
0da98533 3175 (native-inputs
19afbea1 3176 `(("gfortran" ,gfortran)))
0da98533
FB
3177 (arguments
3178 `(#:phases
3179 (alist-cons-before
3180 'build 'set-environment-variables
3181 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3182 (call-with-output-file "site.cfg"
3183 (lambda (port)
cba256f8
RW
3184 (format port
3185 "[openblas]
dbdfe515
RW
3186libraries = openblas
3187library_dirs = ~a/lib
3188include_dirs = ~a/include
cba256f8
RW
3189
3190[lapack]
3191lapack_libs = lapack
3192library_dirs = ~a/lib
3193include_dirs = ~a/include
3194"
3195 (assoc-ref inputs "openblas")
3196 (assoc-ref inputs "openblas")
3197 (assoc-ref inputs "lapack")
3198 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3199 ;; Use "gcc" executable, not "cc".
3200 (substitute* "numpy/distutils/system_info.py"
3201 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3202 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3203 #t)
6a843168
FB
3204 ;; Tests can only be run after the library has been installed and not
3205 ;; within the source directory.
3206 (alist-cons-after
3207 'install 'check
89b5c60e 3208 (lambda _
6a843168 3209 (with-directory-excursion "/tmp"
89b5c60e 3210 (zero? (system* "python" "-c"
6a843168 3211 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3212 (alist-delete
3213 'check
6a843168 3214 %standard-phases)))))
0da98533
FB
3215 (home-page "http://www.numpy.org/")
3216 (synopsis "Fundamental package for scientific computing with Python")
3217 (description "NumPy is the fundamental package for scientific computing
e881752c 3218with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3219object, sophisticated (broadcasting) functions, tools for integrating C/C++
3220and Fortran code, useful linear algebra, Fourier transform, and random number
3221capabilities.")
3f641af0 3222 (license license:bsd-3)))
0da98533
FB
3223
3224(define python2-numpy-bootstrap
3225 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3226
3a1bfe18
RW
3227(define-public python2-fastlmm
3228 (package
3229 (name "python2-fastlmm")
b074e7d4 3230 (version "0.2.21")
3a1bfe18
RW
3231 (source
3232 (origin
3233 (method url-fetch)
b074e7d4 3234 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3235 (sha256
3236 (base32
b074e7d4 3237 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3238 (build-system python-build-system)
3239 (arguments
3240 `(#:python ,python-2)) ; only Python 2.7 is supported
3241 (propagated-inputs
3242 `(("python2-numpy" ,python2-numpy)
3243 ("python2-scipy" ,python2-scipy)
3244 ("python2-matplotlib" ,python2-matplotlib)
3245 ("python2-pandas" ,python2-pandas)
3246 ("python2-scikit-learn" ,python2-scikit-learn)
3247 ("python2-cython" ,python2-cython)
3248 ("python2-pysnptools" ,python2-pysnptools)))
3249 (native-inputs
3250 `(("unzip" ,unzip)
3251 ("python2-mock" ,python2-mock)
3252 ("python2-setuptools" ,python2-setuptools)))
3253 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3254 (synopsis "Perform genome-wide association studies on large data sets")
3255 (description
3256 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3257Models, is a program for performing both single-SNP and SNP-set genome-wide
3258association studies (GWAS) on extremely large data sets.")
3f641af0 3259 (license license:asl2.0)))
3a1bfe18 3260
2ee8869a
FB
3261(define-public python-numpy
3262 (package (inherit python-numpy-bootstrap)
3263 (name "python-numpy")
3264 (outputs '("out" "doc"))
89b5c60e 3265 (inputs
2ee8869a
FB
3266 `(("which" ,which)
3267 ("python-setuptools" ,python-setuptools)
3268 ("python-matplotlib" ,python-matplotlib)
3269 ("python-sphinx" ,python-sphinx)
3270 ("python-pyparsing" ,python-pyparsing)
3271 ("python-numpydoc" ,python-numpydoc)
3272 ,@(package-inputs python-numpy-bootstrap)))
3273 (native-inputs
3274 `(("pkg-config" ,pkg-config)
3275 ("texlive" ,texlive)
3276 ("texinfo" ,texinfo)
3277 ("perl" ,perl)
3278 ,@(package-native-inputs python-numpy-bootstrap)))
3279 (arguments
89b5c60e 3280 `(,@(substitute-keyword-arguments
2ee8869a
FB
3281 (package-arguments python-numpy-bootstrap)
3282 ((#:phases phases)
3283 `(alist-cons-after
3284 'install 'install-doc
3285 (lambda* (#:key outputs #:allow-other-keys)
3286 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3287 (doc (string-append
3288 data "/doc/" ,name "-"
2ee8869a
FB
3289 ,(package-version python-numpy-bootstrap)))
3290 (info (string-append data "/info"))
3291 (html (string-append doc "/html"))
3292 (pyver ,(string-append "PYVER=")))
3293 (with-directory-excursion "doc"
3294 (mkdir-p html)
3295 (system* "make" "html" pyver)
3296 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3297 (system* "make" "-C" "build/latex"
2ee8869a
FB
3298 "all-pdf" "PAPER=a4" pyver)
3299 ;; FIXME: Generation of the info file fails.
3300 ;; (system* "make" "info" pyver)
3301 ;; (mkdir-p info)
3302 ;; (copy-file "build/texinfo/numpy.info"
3303 ;; (string-append info "/numpy.info"))
3304 (for-each (lambda (file)
3305 (copy-file (string-append "build/latex" file)
3306 (string-append doc file)))
3307 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3308 (with-directory-excursion "build/html"
3309 (for-each (lambda (file)
3310 (let* ((dir (dirname file))
3311 (tgt-dir (string-append html "/" dir)))
3312 (unless (equal? "." dir)
3313 (mkdir-p tgt-dir))
96c46210 3314 (install-file file html)))
2ee8869a
FB
3315 (find-files "." ".*"))))))
3316 ,phases)))))))
3317
764c077b 3318(define-public python2-numpy
57b7b8cd 3319 (package-with-python2 python-numpy))
2ee8869a 3320
15bfe6d6
FB
3321(define-public python-pyparsing
3322 (package
3323 (name "python-pyparsing")
e0669289 3324 (version "2.0.3")
15bfe6d6
FB
3325 (source
3326 (origin
3327 (method url-fetch)
de67e922
LF
3328 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3329 "/pyparsing-" version
15bfe6d6
FB
3330 "/pyparsing-" version ".tar.gz"))
3331 (sha256
3332 (base32
e0669289 3333 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3334 (build-system python-build-system)
3335 (outputs '("out" "doc"))
3336 (arguments
3337 `(#:tests? #f ; no test target
3338 #:modules ((guix build python-build-system)
3339 (guix build utils))
3340 #:phases
3341 (alist-cons-after
3342 'install 'install-doc
3343 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3344 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3345 "/share/doc/" ,name "-" ,version))
3346 (html-doc (string-append doc "/html"))
3347 (examples (string-append doc "/examples")))
3348 (mkdir-p html-doc)
3349 (mkdir-p examples)
89b5c60e 3350 (for-each
15bfe6d6 3351 (lambda (dir tgt)
89b5c60e 3352 (map (lambda (file)
96c46210 3353 (install-file file tgt))
15bfe6d6
FB
3354 (find-files dir ".*")))
3355 (list "docs" "htmldoc" "examples")
3356 (list doc html-doc examples))))
3357 %standard-phases)))
3358 (home-page "http://pyparsing.wikispaces.com")
3359 (synopsis "Python parsing class library")
3360 (description
3361 "The pyparsing module is an alternative approach to creating and
3362executing simple grammars, vs. the traditional lex/yacc approach, or the use
3363of regular expressions. The pyparsing module provides a library of classes
3364that client code uses to construct the grammar directly in Python code.")
bd3fa666 3365 (license license:expat)))
15bfe6d6
FB
3366
3367(define-public python2-pyparsing
3368 (package-with-python2 python-pyparsing))
3369
ec00de35
FB
3370(define-public python-numpydoc
3371 (package
3372 (name "python-numpydoc")
3373 (version "0.5")
3374 (source
3375 (origin
3376 (method url-fetch)
89b5c60e 3377 (uri (string-append
ec00de35
FB
3378 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3379 version ".tar.gz"))
3380 (sha256
3381 (base32
5e4d8f67
AE
3382 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3383 (modules '((guix build utils)))
3384 (snippet
3385 '(begin
3386 ;; Drop a test requiring matplotlib, which we cannot add as an
3387 ;; input since it would create a circular dependency: Extend the
3388 ;; test for Python 3, where it is already dropped, to Python 2.
3389 (substitute* "numpydoc/tests/test_plot_directive.py"
3390 (("3") "2"))))))
ec00de35
FB
3391 (build-system python-build-system)
3392 (inputs
3393 `(("python-setuptools" ,python-setuptools)
3394 ("python-docutils" ,python-docutils)
3395 ("python-sphinx" ,python-sphinx)
3396 ("python-nose" ,python-nose)))
3397 (home-page "https://pypi.python.org/pypi/numpydoc")
3398 (synopsis
3399 "Numpy's Sphinx extensions")
3400 (description
3401 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3402 (license license:bsd-2)))
ec00de35
FB
3403
3404(define-public python2-numpydoc
5e4d8f67 3405 (package-with-python2 python-numpydoc))
1c65314c 3406
1e656049
RW
3407(define-public python-numexpr
3408 (package
3409 (name "python-numexpr")
26112c0a 3410 (version "2.6.0")
1e656049
RW
3411 (source
3412 (origin
3413 (method url-fetch)
26112c0a 3414 (uri (pypi-uri "numexpr" version))
1e656049
RW
3415 (sha256
3416 (base32
26112c0a 3417 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3418 (build-system python-build-system)
3419 (arguments `(#:tests? #f)) ; no tests included
3420 (propagated-inputs
3421 `(("python-numpy" ,python-numpy)))
3422 (home-page "https://github.com/pydata/numexpr")
3423 (synopsis "Fast numerical expression evaluator for NumPy")
3424 (description
3425 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3426expressions that operate on arrays are accelerated and use less memory than
3427doing the same calculation in Python. In addition, its multi-threaded
3428capabilities can make use of all your cores, which may accelerate
3429computations, most specially if they are not memory-bounded (e.g. those using
3430transcendental functions).")
fc1a170e
EF
3431 (license license:expat)
3432 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3433
3434(define-public python2-numexpr
fc1a170e 3435 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3436
1c65314c
FB
3437(define-public python-matplotlib
3438 (package
3439 (name "python-matplotlib")
1bbc659f 3440 (version "1.4.3")
1c65314c
FB
3441 (source
3442 (origin
3443 (method url-fetch)
de67e922
LF
3444 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3445 "/matplotlib-" version
1c65314c
FB
3446 "/matplotlib-" version ".tar.gz"))
3447 (sha256
3448 (base32
1bbc659f 3449 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3450 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3451 (build-system python-build-system)
3452 (outputs '("out" "doc"))
25f9a068
FB
3453 (propagated-inputs ; the following packages are all needed at run time
3454 `(("python-pyparsing" ,python-pyparsing)
3455 ("python-pygobject" ,python-pygobject)
3456 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3457 ("python-tkinter" ,python "tk")
25f9a068
FB
3458 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3459 ;; from 'gtk+') provides the required 'typelib' files used by
3460 ;; 'gobject-introspection'. The location of these files is set with the
3461 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3462 ;; is done automatically by a 'native-search-path' procedure. However,
3463 ;; at run-time the user must set this variable as follows:
3464 ;;
3465 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3466 ("gtk+" ,gtk+)
3467 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3468 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3469 ;; object. For this reason we need to import both libraries.
3470 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3471 ("python-pycairo" ,python-pycairo)
3472 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3473 (inputs
3474 `(("python-setuptools" ,python-setuptools)
3475 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3476 ("python-six" ,python-six)
3477 ("python-pytz" ,python-pytz)
3478 ("python-numpy" ,python-numpy-bootstrap)
3479 ("python-sphinx" ,python-sphinx)
3480 ("python-numpydoc" ,python-numpydoc)
3481 ("python-nose" ,python-nose)
3482 ("python-mock" ,python-mock)
3483 ("libpng" ,libpng)
3484 ("imagemagick" ,imagemagick)
3485 ("freetype" ,freetype)
25f9a068
FB
3486 ("cairo" ,cairo)
3487 ("glib" ,glib)
4e7a137a 3488 ("python-pillow" ,python-pillow)
1c65314c 3489 ;; FIXME: Add backends when available.
1c65314c
FB
3490 ;("python-wxpython" ,python-wxpython)
3491 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3492 ("tcl" ,tcl)
3493 ("tk" ,tk)))
1c65314c
FB
3494 (native-inputs
3495 `(("pkg-config" ,pkg-config)
3496 ("texlive" ,texlive)
3497 ("texinfo" ,texinfo)))
3498 (arguments
3499 `(#:phases
25f9a068
FB
3500 (alist-cons-before
3501 'build 'configure-environment
3502 (lambda* (#:key outputs inputs #:allow-other-keys)
3503 (let ((cairo (assoc-ref inputs "cairo"))
3504 (gtk+ (assoc-ref inputs "gtk+")))
3505 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3506 ;; has not effect.
25f9a068
FB
3507 (setenv "LD_LIBRARY_PATH"
3508 (string-append cairo "/lib:" gtk+ "/lib"))
3509 (setenv "HOME" (getcwd))
3510 (call-with-output-file "setup.cfg"
3511 (lambda (port)
1bbc659f
FB
3512 (format port "[directories]~%
3513basedirlist = ~a,~a~%
57b7b8cd 3514 [rc_options]~%
1bbc659f
FB
3515backend = TkAgg~%"
3516 (assoc-ref inputs "tcl")
3517 (assoc-ref inputs "tk"))))))
25f9a068
FB
3518 (alist-cons-after
3519 'install 'install-doc
3520 (lambda* (#:key outputs #:allow-other-keys)
3521 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3522 (doc (string-append data "/doc/" ,name "-" ,version))
3523 (info (string-append data "/info"))
3524 (html (string-append doc "/html")))
3525 (with-directory-excursion "doc"
25f9a068
FB
3526 ;; Produce pdf in 'A4' format.
3527 (substitute* (find-files "." "conf\\.py")
3528 (("latex_paper_size = 'letter'")
3529 "latex_paper_size = 'a4'"))
3530 (mkdir-p html)
3531 (mkdir-p info)
3532 ;; The doc recommends to run the 'html' target twice.
3533 (system* "python" "make.py" "html")
3534 (system* "python" "make.py" "html")
18b31516 3535 (copy-recursively "build/html" html)
25f9a068
FB
3536 (system* "python" "make.py" "latex")
3537 (system* "python" "make.py" "texinfo")
18b31516
FB
3538 (symlink (string-append html "/_images")
3539 (string-append info "/matplotlib-figures"))
3540 (with-directory-excursion "build/texinfo"
3541 (substitute* "matplotlib.texi"
3542 (("@image\\{([^,]*)" all file)
3543 (string-append "@image{matplotlib-figures/" file)))
3544 (symlink (string-append html "/_images")
3545 "./matplotlib-figures")
3546 (system* "makeinfo" "--no-split"
3547 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3548 (copy-file "build/texinfo/matplotlib.info"
3549 (string-append info "/matplotlib.info"))
3550 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3551 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3552 %standard-phases))))
1c65314c
FB
3553 (home-page "http://matplotlib.org")
3554 (synopsis "2D plotting library for Python")
3555 (description
3556 "Matplotlib is a Python 2D plotting library which produces publication
3557quality figures in a variety of hardcopy formats and interactive environments
3558across platforms. Matplotlib can be used in Python scripts, the python and
3559ipython shell, web application servers, and six graphical user interface
3560toolkits.")
3f641af0 3561 (license license:psfl)
57b7b8cd 3562 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3563
764c077b 3564(define-public python2-matplotlib
57b7b8cd
LC
3565 (let ((matplotlib (package-with-python2
3566 (strip-python2-variant python-matplotlib))))
764c077b 3567 (package (inherit matplotlib)
88c26834
AE
3568 ;; Make sure to use special packages for Python 2 instead
3569 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3570 (propagated-inputs
7ca0dbc3 3571 `(("python2-pycairo" ,python2-pycairo)
764c077b 3572 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3573 ("python2-tkinter" ,python-2 "tk")
3574 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3575 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3576
0dde6232
RW
3577(define-public python2-pysnptools
3578 (package
3579 (name "python2-pysnptools")
a800018e 3580 (version "0.3.9")
0dde6232
RW
3581 (source
3582 (origin
3583 (method url-fetch)
3f2e9675 3584 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3585 (sha256
3586 (base32
a800018e 3587 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3588 (build-system python-build-system)
3589 (arguments
3590 `(#:python ,python-2)) ; only Python 2.7 is supported
3591 (propagated-inputs
3592 `(("python2-numpy" ,python2-numpy)
3593 ("python2-scipy" ,python2-scipy)
a800018e 3594 ("python2-pytz" ,python2-pytz)
0dde6232 3595 ("python2-cython" ,python2-cython)))
a800018e
EF
3596 (inputs
3597 `(("python2-dateutil-2" ,python2-dateutil-2)
3598 ("python2-pandas" ,python2-pandas)
3599 ("python2-six" ,python2-six)))
0dde6232
RW
3600 (native-inputs
3601 `(("unzip" ,unzip)
3602 ("python2-setuptools" ,python2-setuptools)))
3603 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3604 (synopsis "Library for reading and manipulating genetic data")
3605 (description
3606 "PySnpTools is a library for reading and manipulating genetic data. It
3607can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3608those files. It can also efficiently manipulate ranges of integers using set
3609operators such as union, intersection, and difference.")
3f641af0 3610 (license license:asl2.0)))
0dde6232 3611
c9b1b4f9
RW
3612(define-public python-rpy2
3613 (package
3614 (name "python-rpy2")
ec3bcbc7 3615 (version "2.7.6")
c9b1b4f9
RW
3616 (source
3617 (origin
3618 (method url-fetch)
ec3bcbc7 3619 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3620 (sha256
3621 (base32
ec3bcbc7 3622 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3623 (build-system python-build-system)
3624 (inputs
3625 `(("python-six" ,python-six)
3626 ("readline" ,readline)
3627 ("icu4c" ,icu4c)
3628 ("pcre" ,pcre)
3629 ("r" ,r)))
3630 (native-inputs
5ff6575b
RW
3631 `(("python-setuptools" ,python-setuptools)
3632 ("zlib" ,zlib)))
c9b1b4f9
RW
3633 (home-page "http://rpy.sourceforge.net/")
3634 (synopsis "Python interface to the R language")
3635 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3636low-level interface to R from Python, a proposed high-level interface,
3637including wrappers to graphical libraries, as well as R-like structures and
3638functions.")
3f641af0 3639 (license license:gpl3+)))
c9b1b4f9
RW
3640
3641(define-public python2-rpy2
3642 (let ((rpy2 (package-with-python2 python-rpy2)))
3643 (package (inherit rpy2)
3644 (native-inputs
3645 `(("python2-singledispatch" ,python2-singledispatch)
3646 ,@(package-native-inputs rpy2))))))
3647
bb986599
FB
3648(define-public python-scipy
3649 (package
3650 (name "python-scipy")
ba8a0824 3651 (version "0.16.0")
bb986599
FB
3652 (source
3653 (origin
3654 (method url-fetch)
de67e922
LF
3655; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3656 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3657 "/scipy-" version ".tar.xz"))
bb986599
FB
3658 (sha256
3659 (base32
ba8a0824 3660 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3661 (build-system python-build-system)
dd86c0d1 3662 (propagated-inputs
bb986599
FB
3663 `(("python-numpy" ,python-numpy)
3664 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3665 ("python-pyparsing" ,python-pyparsing)))
3666 (inputs
3667 `(("lapack" ,lapack)
719b01c1 3668 ("openblas" ,openblas)))
bb986599 3669 (native-inputs
dd86c0d1
RW
3670 `(("python-nose" ,python-nose)
3671 ("python-sphinx" ,python-sphinx)
5248d49e 3672 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3673 ("gfortran" ,gfortran)
bb986599
FB
3674 ("texlive" ,texlive)
3675 ("perl" ,perl)))
3676 (outputs '("out" "doc"))
3677 (arguments
3678 `(#:phases
3679 (alist-cons-before
719b01c1 3680 'build 'configure-openblas
bb986599 3681 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3682 (call-with-output-file "site.cfg"
3683 (lambda (port)
3684 (format port
3685 "[blas]
3686libraries = openblas
3687library_dirs = ~a/lib
3688include_dirs = ~a/include
3689[atlas]
3690library_dirs = ~a/lib
3691atlas_libs = openblas
3692"
3693 (assoc-ref inputs "openblas")
3694 (assoc-ref inputs "openblas")
3695 (assoc-ref inputs "openblas"))))
3696 #t)
bb986599
FB
3697 (alist-cons-after
3698 'install 'install-doc
3699 (lambda* (#:key outputs #:allow-other-keys)
3700 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3701 (doc (string-append data "/doc/" ,name "-" ,version))
3702 (html (string-append doc "/html"))
3703 (pyver ,(string-append "PYVER=")))
3704 (with-directory-excursion "doc"
bb986599
FB
3705 ;; Fix generation of images for mathematical expressions.
3706 (substitute* (find-files "source" "conf\\.py")
3707 (("pngmath_use_preview = True")
3708 "pngmath_use_preview = False"))
3709 (mkdir-p html)
3710 (system* "make" "html" pyver)
3711 (system* "make" "latex" "PAPER=a4" pyver)
3712 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3713 (copy-file "build/latex/scipy-ref.pdf"
3714 (string-append doc "/scipy-ref.pdf"))
3715 (with-directory-excursion "build/html"
3716 (for-each (lambda (file)
3717 (let* ((dir (dirname file))
3718 (tgt-dir (string-append html "/" dir)))
96c46210 3719 (install-file file html)))
bb986599
FB
3720 (find-files "." ".*"))))))
3721 ;; Tests can only be run after the library has been installed and not
3722 ;; within the source directory.
3723 (alist-cons-after
3724 'install 'check
89b5c60e 3725 (lambda _
bb986599
FB
3726 (with-directory-excursion "/tmp"
3727 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3728 (alist-delete
3729 'check
4f9ff21e
RW
3730 (alist-cons-after
3731 'unpack 'fix-tests
3732 (lambda _
3733 (substitute* "scipy/integrate/tests/test_quadpack.py"
3734 (("libm.so") "libm.so.6"))
3735 #t)
3736 %standard-phases)))))))
bb986599
FB
3737 (home-page "http://www.scipy.org/")
3738 (synopsis "The Scipy library provides efficient numerical routines")
3739 (description "The SciPy library is one of the core packages that make up
3740the SciPy stack. It provides many user-friendly and efficient numerical
3741routines such as routines for numerical integration and optimization.")
3f641af0 3742 (license license:bsd-3)))
bb986599 3743
764c077b 3744(define-public python2-scipy
57b7b8cd 3745 (package-with-python2 python-scipy))
bb986599 3746
73acc193 3747(define-public python-socksipy-branch
3748 (package
3749 (name "python-socksipy-branch")
3750 (version "1.01")
3751 (source
3752 (origin
3753 (method url-fetch)
3754 (uri (pypi-uri "SocksiPy-branch" version))
3755 (sha256
3756 (base32
3757 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3758 (build-system python-build-system)
3759 (arguments
3760 `(#:tests? #f)) ; There are no tests
3761 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3762 (synopsis "Python SOCKS module")
3763 (description
3764 "SocksiPy - A Python SOCKS client module. It provides a
3765socket-like interface that supports connections to any TCP
3766service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3767The original version was developed by Dan Haim, this is a
3768branch created by Mario Vilas to address some open issues,
3769as the original project seems to have been abandoned circa 2007.")
3770 (license license:bsd-3)))
3771
3772(define-public python2-socksipy-branch
3773 (package-with-python2 python-socksipy-branch))
3774
94914805
EB
3775(define-public python-sqlalchemy
3776 (package
3777 (name "python-sqlalchemy")
a4ba286b 3778 (version "1.0.12")
94914805
EB
3779 (source
3780 (origin
3781 (method url-fetch)
3782 (uri (string-append "https://pypi.python.org/packages/source/S/"
3783 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3784 (sha256
3785 (base32
a4ba286b 3786 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3787 (build-system python-build-system)
3788 (native-inputs
3789 `(("python-cython" ,python-cython) ;for c extensions
3790 ("python-pytest" ,python-pytest)
3791 ("python-mock" ,python-mock))) ;for tests
3792 (arguments
3793 `(#:phases (alist-replace
3794 'check
3795 (lambda _ (zero? (system* "py.test")))
3796 %standard-phases)))
3797 (home-page "http://www.sqlalchemy.org")
3798 (synopsis "Database abstraction library")
3799 (description
3800 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3801gives application developers the full power and flexibility of SQL. It
3802provides a full suite of well known enterprise-level persistence patterns,
3803designed for efficient and high-performing database access, adapted into a
3804simple and Pythonic domain language.")
3f641af0 3805 (license license:x11)))
94914805
EB
3806
3807(define-public python2-sqlalchemy
3808 (package-with-python2 python-sqlalchemy))
c937562e 3809
de2966cf
EF
3810(define-public python-sqlalchemy-utils
3811 (package
3812 (name "python-sqlalchemy-utils")
3813 (version "0.32.9")
3814 (source
3815 (origin
3816 (method url-fetch)
3817 (uri (pypi-uri "SQLAlchemy-Utils" version))
3818 (sha256
3819 (base32
3820 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3821 (build-system python-build-system)
3822 (inputs
3823 `(("python-six" ,python-six)
3824 ("python-sqlalchemy" ,python-sqlalchemy)))
3825 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3826 (synopsis "Various utility functions for SQLAlchemy")
3827 (description
3828 "SQLAlchemy-utils provides various utility functions and custom data types
3829for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3830 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3831 (license license:bsd-3)))
3832
3833(define-public python2-sqlalchemy-utils
3834 (let ((base (package-with-python2
3835 (strip-python2-variant python-sqlalchemy-utils))))
3836 (package (inherit base)
3837 (native-inputs
3838 `(("python2-setuptools" ,python2-setuptools)
3839 ,@(package-native-inputs base))))))
3840
af5a4602
CAW
3841(define-public python-alembic
3842 (package
3843 (name "python-alembic")
bb484529 3844 (version "0.8.7")
af5a4602
CAW
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (pypi-uri "alembic" version))
3849 (sha256
3850 (base32
bb484529 3851 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3852 (build-system python-build-system)
3853 (native-inputs
3854 `(("python-mock" ,python-mock)
3855 ("python-pytest-cov" ,python-pytest-cov)))
3856 (propagated-inputs
3857 `(("python-sqlalchemy" ,python-sqlalchemy)
3858 ("python-mako" ,python-mako)
3859 ("python-editor" ,python-editor)))
3860 (home-page "http://bitbucket.org/zzzeek/alembic")
3861 (synopsis
3862 "Database migration tool for SQLAlchemy")
3863 (description
3864 "Alembic is a lightweight database migration tool for usage with the
3865SQLAlchemy Database Toolkit for Python.")
3866 (license license:expat)
3867 (properties `((python2-variant . ,(delay python2-alembic))))))
3868
3869(define-public python2-alembic
3870 (let ((alembic (package-with-python2
3871 (strip-python2-variant python-alembic))))
3872 (package
3873 (inherit alembic)
3874 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3875 ,@(package-native-inputs alembic))))))
3876
1671c07c
EB
3877(define-public python-distutils-extra
3878 (package
3879 (name "python-distutils-extra")
3880 (version "2.38")
3881 (source
3882 (origin
3883 (method url-fetch)
3884 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3885 version "/+download/python-distutils-extra-"
3886 version ".tar.gz"))
3887 (sha256
3888 (base32
3889 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3890 (build-system python-build-system)
3891 (native-inputs
3892 `(("python-setuptools" ,python-setuptools)))
3893 (home-page "https://launchpad.net/python-distutils-extra/")
3894 (synopsis "Enhancements to Python's distutils")
3895 (description
3896 "The python-distutils-extra module enables you to easily integrate
3897gettext support, themed icons, and scrollkeeper-based documentation into
3898Python's distutils.")
3f641af0 3899 (license license:gpl2)))
1671c07c
EB
3900
3901(define-public python2-distutils-extra
3902 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3903
3904(define-public python2-elib.intl
3905 (package
3906 (name "python2-elib.intl")
3907 (version "0.0.3")
3908 (source
3909 (origin
3910 ;; This project doesn't tag releases or publish tarballs, so we take
3911 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3912 (method git-fetch)
3913 (uri (git-reference
3914 (url "https://github.com/dieterv/elib.intl.git")
3915 (commit "d09997cfef")))
3916 (sha256
3917 (base32
3918 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3919 (build-system python-build-system)
3920 (native-inputs
3921 `(("python2-setuptools" ,python2-setuptools)))
3922 (arguments
3923 ;; incompatible with Python 3 (exception syntax)
3924 `(#:python ,python-2
3925 #:tests? #f
3926 ;; With standard flags, the install phase attempts to create a zip'd
3927 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3928 ;; before 1980'
3929 #:configure-flags '("--single-version-externally-managed"
3930 "--record=elib.txt")))
3931 (home-page "https://github.com/dieterv/elib.intl")
3932 (synopsis "Enhanced internationalization for Python")
3933 (description
3934 "The elib.intl module provides enhanced internationalization (I18N)
3935services for your Python modules and applications.")
3f641af0 3936 (license license:lgpl3+)))
ea5456c8 3937
c937562e
EB
3938(define-public python-pillow
3939 (package
3940 (name "python-pillow")
debf4179 3941 (version "3.3.1")
c937562e
EB
3942 (source
3943 (origin
3944 (method url-fetch)
f1d9231d 3945 (uri (pypi-uri "Pillow" version))
c937562e
EB
3946 (sha256
3947 (base32
debf4179 3948 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
3949 (build-system python-build-system)
3950 (native-inputs
3951 `(("python-setuptools" ,python-setuptools)
3952 ("python-nose" ,python-nose)))
3953 (inputs
5ff408d9
SB
3954 `(("freetype" ,freetype)
3955 ("lcms" ,lcms)
c937562e
EB
3956 ("zlib" ,zlib)
3957 ("libjpeg" ,libjpeg)
3958 ("openjpeg" ,openjpeg)
5ff408d9
SB
3959 ("libtiff" ,libtiff)
3960 ("libwebp" ,libwebp)))
c937562e
EB
3961 (propagated-inputs
3962 `(;; Used at runtime for pkg_resources
3963 ("python-setuptools" ,python-setuptools)))
3964 (arguments
e5358a6b
LC
3965 `(#:phases (modify-phases %standard-phases
3966 (add-before
3967 'install 'disable-egg-compression
3968 (lambda _
3969 ;; Leave the .egg uncompressed since compressing it would
3970 ;; prevent the GC from identifying run-time dependencies.
3971 ;; See <http://bugs.gnu.org/20765>.
3972 (let ((port (open-file "setup.cfg" "a")))
3973 (display "\n[easy_install]\nzip_ok = 0\n"
3974 port)
3975 (close-port port)
3976 #t)))
3977 (add-after
3978 'install 'check-installed
3979 (lambda _
3980 (begin
3981 (setenv "HOME" (getcwd))
3982 (and (zero? (system* "python" "selftest.py"
3983 "--installed"))
3984 (zero? (system* "python" "test-installed.py"))))))
3985 (delete 'check))))
c937562e
EB
3986 (home-page "https://pypi.python.org/pypi/Pillow")
3987 (synopsis "Fork of the Python Imaging Library")
3988 (description
3989 "The Python Imaging Library adds image processing capabilities to your
3990Python interpreter. This library provides extensive file format support, an
3991efficient internal representation, and fairly powerful image processing
3992capabilities. The core image library is designed for fast access to data
3993stored in a few basic pixel formats. It should provide a solid foundation for
3994a general image processing tool.")
3f641af0 3995 (license (license:x11-style
c937562e
EB
3996 "http://www.pythonware.com/products/pil/license.htm"
3997 "The PIL Software License"))))
3998
3999(define-public python2-pillow
4000 (package-with-python2 python-pillow))
bb986599 4001
a415f036
FB
4002(define-public python-pycparser
4003 (package
4004 (name "python-pycparser")
38eb6919 4005 (version "2.14")
a415f036
FB
4006 (source
4007 (origin
4008 (method url-fetch)
38eb6919 4009 (uri (pypi-uri "pycparser" version))
a415f036
FB
4010 (sha256
4011 (base32
38eb6919 4012 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4013 (outputs '("out" "doc"))
4014 (build-system python-build-system)
4015 (native-inputs
4016 `(("pkg-config" ,pkg-config)
4017 ("python-setuptools" ,python-setuptools)))
4018 (arguments
89b5c60e 4019 `(#:phases
a415f036
FB
4020 (alist-replace
4021 'check
4022 (lambda _
4023 (with-directory-excursion "tests"
4024 (zero? (system* "python" "all_tests.py"))))
4025 (alist-cons-after
4026 'install 'install-doc
4027 (lambda* (#:key outputs #:allow-other-keys)
4028 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4029 (doc (string-append data "/doc/" ,name "-" ,version))
4030 (examples (string-append doc "/examples")))
4031 (mkdir-p examples)
4032 (for-each (lambda (file)
4033 (copy-file (string-append "." file)
4034 (string-append doc file)))
4035 '("/README.rst" "/CHANGES" "/LICENSE"))
4036 (copy-recursively "examples" examples)))
4037 %standard-phases))))
4038 (home-page "https://github.com/eliben/pycparser")
4039 (synopsis "C parser in Python")
4040 (description
4041 "Pycparser is a complete parser of the C language, written in pure Python
4042using the PLY parsing library. It parses C code into an AST and can serve as
4043a front-end for C compilers or analysis tools.")
3f641af0 4044 (license license:bsd-3)))
a415f036
FB
4045
4046(define-public python2-pycparser
4047 (package-with-python2 python-pycparser))
57c3f716
FB
4048
4049(define-public python-cffi
4050 (package
4051 (name "python-cffi")
2d3a437c 4052 (version "1.4.2")
57c3f716
FB
4053 (source
4054 (origin
4055 (method url-fetch)
2d3a437c 4056 (uri (pypi-uri "cffi" version))
89b5c60e 4057 (sha256
2d3a437c 4058 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4059 (build-system python-build-system)
4060 (outputs '("out" "doc"))
4061 (inputs
4062 `(("libffi" ,libffi)))
4063 (propagated-inputs ; required at run-time
4064 `(("python-pycparser" ,python-pycparser)))
4065 (native-inputs
4066 `(("pkg-config" ,pkg-config)
4067 ("python-sphinx" ,python-sphinx)
4179f952 4068 ("python-pytest" ,python-pytest)
57c3f716
FB
4069 ("python-setuptools" ,python-setuptools)))
4070 (arguments
4179f952 4071 `(#:phases
57c3f716
FB
4072 (alist-cons-after
4073 'install 'install-doc
4074 (lambda* (#:key outputs #:allow-other-keys)
4075 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4076 (doc (string-append data "/doc/" ,name "-" ,version))
4077 (html (string-append doc "/html")))
4078 (with-directory-excursion "doc"
4079 (system* "make" "html")
4080 (mkdir-p html)
4081 (copy-recursively "build/html" html))
4082 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4083 %standard-phases)))
4084 (home-page "http://cffi.readthedocs.org")
4085 (synopsis "Foreign function interface for Python")
4086 (description
4087 "Foreign Function Interface for Python calling C code.")
bd3fa666 4088 (license license:expat)))
57c3f716
FB
4089
4090(define-public python2-cffi
4091 (package-with-python2 python-cffi))
6fa14469
FB
4092
4093(define-public python-xcffib
4094 (package
4095 (name "python-xcffib")
4096 (version "0.1.9")
4097 (source
4098 (origin
4099 (method url-fetch)
4100 (uri (string-append "https://pypi.python.org/packages/source/x/"
4101 "xcffib/xcffib-" version ".tar.gz"))
4102 (sha256
4103 (base32
4104 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4105 (build-system python-build-system)
4106 (inputs
4107 `(("libxcb" ,libxcb)
4108 ("python-six" ,python-six)))
4109 (native-inputs
4110 `(("python-setuptools" ,python-setuptools)))
4111 (propagated-inputs
4112 `(("python-cffi" ,python-cffi))) ; used at run time
4113 (arguments
89b5c60e 4114 `(#:phases
6fa14469
FB
4115 (alist-cons-after
4116 'install 'install-doc
4117 (lambda* (#:key outputs #:allow-other-keys)
4118 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4119 "/doc/" ,name "-" ,version)))
4120 (mkdir-p doc)
4121 (copy-file "README.md"
4122 (string-append doc "/README.md"))))
4123 %standard-phases)))
4124 (home-page "https://github.com/tych0/xcffib")
4125 (synopsis "XCB Python bindings")
4126 (description
4127 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4128support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4129 (license license:expat)))
6fa14469
FB
4130
4131(define-public python2-xcffib
4132 (package-with-python2 python-xcffib))
4133
9e099723
FB
4134(define-public python-cairocffi
4135 (package
4136 (name "python-cairocffi")
4137 (version "0.6")
4138 (source
4139 (origin
4140 (method url-fetch)
4141 ;; The archive on pypi is missing the 'utils' directory!
4142 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4143 version ".tar.gz"))
f586c877 4144 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4145 (sha256
4146 (base32
4147 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4148 (build-system python-build-system)
4149 (outputs '("out" "doc"))
4150 (inputs
4151 `(("gdk-pixbuf" ,gdk-pixbuf)
4152 ("cairo" ,cairo)))
4153 (native-inputs
4154 `(("pkg-config" ,pkg-config)
4155 ("python-sphinx" ,python-sphinx)
4156 ("python-docutils" ,python-docutils)
4157 ("python-setuptools" ,python-setuptools)))
4158 (propagated-inputs
4159 `(("python-xcffib" ,python-xcffib))) ; used at run time
4160 (arguments
89b5c60e 4161 `(#:phases
9e099723
FB
4162 (alist-cons-after
4163 'install 'install-doc
4164 (lambda* (#:key inputs outputs #:allow-other-keys)
4165 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4166 (doc (string-append data "/doc/" ,name "-" ,version))
4167 (html (string-append doc "/html")))
89b5c60e 4168 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4169 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4170 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4171 (setenv "LANG" "en_US.UTF-8")
4172 (mkdir-p html)
4173 (for-each (lambda (file)
4174 (copy-file (string-append "." file)
4175 (string-append doc file)))
4176 '("/README.rst" "/CHANGES" "/LICENSE"))
4177 (system* "python" "setup.py" "build_sphinx")
4178 (copy-recursively "docs/_build/html" html)))
4179 %standard-phases)))
4180 (home-page "https://github.com/SimonSapin/cairocffi")
4181 (synopsis "Python bindings and object-oriented API for Cairo")
4182 (description
4183 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4184Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4185graphics library with support for multiple backends including image buffers,
4186PNG, PostScript, PDF, and SVG file output.")
3f641af0 4187 (license license:bsd-3)))
9e099723
FB
4188
4189(define-public python2-cairocffi
4190 (package-with-python2 python-cairocffi))
4191
3cff95cb
RW
4192(define-public python-decorator
4193 (package
4194 (name "python-decorator")
eb6e2e81 4195 (version "4.0.9")
3cff95cb
RW
4196 (source
4197 (origin
4198 (method url-fetch)
e21338be 4199 (uri (pypi-uri "decorator" version))
3cff95cb 4200 (sha256
eb6e2e81 4201 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4202 (build-system python-build-system)
4203 (arguments '(#:tests? #f)) ; no test target
4204 (native-inputs
4205 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4206 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4207 (synopsis "Python module to simplify usage of decorators")
4208 (description
4209 "The aim of the decorator module is to simplify the usage of decorators
4210for the average programmer, and to popularize decorators usage giving examples
4211of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4212etc. The core of this module is a decorator factory.")
4213 (license license:expat)))
4214
4215(define-public python2-decorator
4216 (package-with-python2 python-decorator))
4217
2c0499ad
RW
4218(define-public python-drmaa
4219 (package
4220 (name "python-drmaa")
4221 (version "0.7.6")
4222 (source
4223 (origin
4224 (method url-fetch)
4225 (uri (string-append
4226 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4227 version ".tar.gz"))
4228 (sha256
4229 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4230 (build-system python-build-system)
4231 ;; The test suite requires libdrmaa which is provided by the cluster
4232 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4233 ;; should be set to the path of the libdrmaa library.
4234 (arguments '(#:tests? #f))
4235 (native-inputs
4236 `(("python-nose" ,python-nose)
4237 ("python-setuptools" ,python-setuptools)))
4238 (home-page "https://pypi.python.org/pypi/drmaa")
4239 (synopsis "Python bindings for the DRMAA library")
4240 (description
4241 "A Python package for Distributed Resource Management (DRM) job
4242submission and control. This package is an implementation of the DRMAA 1.0
4243Python language binding specification.")
3f641af0 4244 (license license:bsd-3)))
2c0499ad
RW
4245
4246(define-public python2-drmaa
4247 (package-with-python2 python-drmaa))
4248
d05c6da0
RW
4249(define-public python-gridmap
4250 (package
4251 (name "python-gridmap")
4252 (version "0.13.0")
4253 (source
4254 (origin
4255 (method url-fetch)
4256 (uri (string-append
4257 "https://github.com/pygridtools/gridmap/archive/v"
4258 version ".tar.gz"))
4259 (file-name (string-append name "-" version ".tar.gz"))
4260 (sha256
4261 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4262 (build-system python-build-system)
4263 (inputs
4264 `(("python-psutil" ,python-psutil)
4265 ("python-drmaa" ,python-drmaa)
4266 ("python-pyzmq" ,python-pyzmq)))
4267 (native-inputs
4268 `(("python-setuptools" ,python-setuptools)))
4269 (home-page "https://github.com/pygridtools/gridmap")
4270 (synopsis "Create jobs on a cluster directly from Python")
4271 (description
4272 "Gridmap is a Python package to allow you to easily create jobs on the
4273cluster directly from Python. You can directly map Python functions onto the
4274cluster without needing to write any wrapper code yourself.")
3f641af0 4275 (license license:gpl3+)))
d05c6da0
RW
4276
4277(define-public python2-gridmap
4278 (package-with-python2 python-gridmap))
4279
cb6d5c54
RW
4280(define-public python-pexpect
4281 (package
4282 (name "python-pexpect")
4283 (version "3.3")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (string-append "https://pypi.python.org/packages/source/p/"
4288 "pexpect/pexpect-" version ".tar.gz"))
4289 (sha256
4290 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4291 (build-system python-build-system)
4292 (arguments
4293 `(#:phases
4294 (modify-phases %standard-phases
4295 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4296 (native-inputs
4297 `(("python-nose" ,python-nose)))
4298 (home-page "http://pexpect.readthedocs.org/")
4299 (synopsis "Controlling interactive console applications")
4300 (description
4301 "Pexpect is a pure Python module for spawning child applications;
4302controlling them; and responding to expected patterns in their output.
4303Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4304child application and control it as if a human were typing commands.")
3f641af0 4305 (license license:isc)))
cb6d5c54
RW
4306
4307(define-public python2-pexpect
4308 (package-with-python2 python-pexpect))
4309
229ad120
RW
4310(define-public python-setuptools-scm
4311 (package
4312 (name "python-setuptools-scm")
42d6d0d0 4313 (version "1.11.1")
229ad120
RW
4314 (source (origin
4315 (method url-fetch)
383af6b0 4316 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4317 (sha256
4318 (base32
42d6d0d0 4319 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4320 (build-system python-build-system)
383af6b0 4321 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4322 (home-page "https://github.com/pypa/setuptools_scm/")
4323 (synopsis "Manage Python package versions in SCM metadata")
4324 (description
383af6b0 4325 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4326@dfn{software configuration management} (SCM) metadata instead of declaring
4327them as the version argument or in a SCM managed file.")
4328 (license license:expat)))
4329
4330(define-public python2-setuptools-scm
4331 (package-with-python2 python-setuptools-scm))
4332
b74270ee
RW
4333(define-public python-pathpy
4334 (package
4335 (name "python-pathpy")
4336 (version "8.1.1")
4337 (source
4338 (origin
4339 (method url-fetch)
4340 (uri (string-append "https://pypi.python.org/packages/source/p/"
4341 "path.py/path.py-" version ".tar.gz"))
4342 (sha256
4343 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4344 (build-system python-build-system)
4345 (propagated-inputs
4346 `(("python-appdirs" ,python-appdirs)))
4347 (native-inputs
553b709b
EF
4348 `(("python-setuptools" ,python-setuptools)
4349 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4350 ("python-pytest" ,python-pytest)
4351 ("python-pytest-runner" ,python-pytest-runner)))
4352 (home-page "http://github.com/jaraco/path.py")
4353 (synopsis "Python module wrapper for built-in os.path")
4354 (description
4355 "@code{path.py} implements path objects as first-class entities, allowing
4356common operations on files to be invoked on those path objects directly.")
4357 (license license:expat)))
4358
4359(define-public python2-pathpy
4360 (package-with-python2 python-pathpy))
4361
0d34e01b
RW
4362(define-public python-pickleshare
4363 (package
4364 (name "python-pickleshare")
4365 (version "0.5")
4366 (source
4367 (origin
4368 (method url-fetch)
4369 (uri (string-append "https://pypi.python.org/packages/source/p/"
4370 "pickleshare/pickleshare-" version ".tar.gz"))
4371 (sha256
4372 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4373 (build-system python-build-system)
4374 (propagated-inputs
4375 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4376 (native-inputs
4377 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4378 (home-page "https://github.com/vivainio/pickleshare")
4379 (synopsis "Tiny key value database with concurrency support")
4380 (description
4381 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4382Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4383shelve, many processes can access the database simultaneously. Changing a
4384value in database is immediately visible to other processes accessing the same
4385database. Concurrency is possible because the values are stored in separate
4386files. Hence the “database” is a directory where all files are governed by
4387PickleShare.")
4388 (license license:expat)))
4389
4390(define-public python2-pickleshare
4391 (package-with-python2 python-pickleshare))
4392
cd6e5189
RW
4393(define-public python-simplegeneric
4394 (package
4395 (name "python-simplegeneric")
4396 (version "0.8.1")
4397 (source
4398 (origin
4399 (method url-fetch)
4400 (uri (string-append "https://pypi.python.org/packages/source/s/"
4401 "simplegeneric/simplegeneric-" version ".zip"))
4402 (sha256
4403 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4404 (build-system python-build-system)
4405 (native-inputs
69b96e5e
RW
4406 `(("python-setuptools" ,python-setuptools)
4407 ("unzip" ,unzip)))
cd6e5189
RW
4408 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4409 (synopsis "Python module for simple generic functions")
4410 (description
4411 "The simplegeneric module lets you define simple single-dispatch generic
4412functions, akin to Python’s built-in generic functions like @code{len()},
4413@code{iter()} and so on. However, instead of using specially-named methods,
4414these generic functions use simple lookup tables, akin to those used by
4415e.g. @code{pickle.dump()} and other generic functions found in the Python
4416standard library.")
3f641af0 4417 (license license:zpl2.1)))
cd6e5189
RW
4418
4419(define-public python2-simplegeneric
4420 (package-with-python2 python-simplegeneric))
4421
ddc7d8ed
RW
4422(define-public python-ipython-genutils
4423 (package
4424 (name "python-ipython-genutils")
4425 (version "0.1.0")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (string-append "https://pypi.python.org/packages/source/i/"
4430 "ipython_genutils/ipython_genutils-"
4431 version ".tar.gz"))
4432 (sha256
4433 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4434 (build-system python-build-system)
4435 (arguments `(#:tests? #f)) ; no tests
4436 (home-page "http://ipython.org")
4437 (synopsis "Vestigial utilities from IPython")
4438 (description
4439 "This package provides retired utilities from IPython.")
3f641af0 4440 (license license:bsd-3)))
ddc7d8ed
RW
4441
4442(define-public python2-ipython-genutils
4443 (package-with-python2 python-ipython-genutils))
4444
2b10eb48
RW
4445(define-public python-traitlets
4446 (package
4447 (name "python-traitlets")
cc0c4fde 4448 (version "4.1.0")
2b10eb48
RW
4449 (source
4450 (origin
4451 (method url-fetch)
cc0c4fde 4452 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4453 (sha256
4454 (base32
cc0c4fde 4455 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
2b10eb48
RW
4456 (build-system python-build-system)
4457 (arguments
4458 `(#:phases
4459 (modify-phases %standard-phases
4460 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4461 (propagated-inputs
4462 `(("python-ipython-genutils" ,python-ipython-genutils)
4463 ("python-decorator" ,python-decorator)))
4464 (native-inputs
cc0c4fde
EF
4465 `(("python-mock" ,python-mock)
4466 ("python-nose" ,python-nose)))
2b10eb48
RW
4467 (home-page "http://ipython.org")
4468 (synopsis "Configuration system for Python applications")
4469 (description
4470 "Traitlets is a framework that lets Python classes have attributes with
4471type checking, dynamically calculated default values, and ‘on change’
4472callbacks. The package also includes a mechanism to use traitlets for
4473configuration, loading values from files or from command line arguments. This
4474is a distinct layer on top of traitlets, so you can use traitlets in your code
4475without using the configuration machinery.")
3f641af0 4476 (license license:bsd-3)))
2b10eb48
RW
4477
4478(define-public python2-traitlets
4479 (package-with-python2 python-traitlets))
4480
ae1ab9fe
FB
4481(define-public python-ipython
4482 (package
4483 (name "python-ipython")
3a0b1b9a 4484 (version "3.2.1")
ae1ab9fe
FB
4485 (source
4486 (origin
fceac880 4487 (method url-fetch)
fc1adab1 4488 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4489 (uri (string-append "https://pypi.python.org/packages/source/i/"
4490 "ipython/ipython-" version ".tar.gz"))
4491 (sha256
4492 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4493 (build-system python-build-system)
4494 (outputs '("out" "doc"))
3a0b1b9a
FB
4495 (propagated-inputs
4496 `(("python-pyzmq" ,python-pyzmq)
4497 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4498 (inputs
4499 `(("readline" ,readline)
3a0b1b9a 4500 ("which" ,which)
ae1ab9fe 4501 ("python-matplotlib" ,python-matplotlib)
5d26e542 4502 ("python-numpy" ,python-numpy)
ae1ab9fe 4503 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4504 ("python-jinja2" ,python-jinja2)
4505 ("python-mistune" ,python-mistune)
4506 ("python-jsonschema" ,python-jsonschema)
4507 ("python-pygments" ,python-pygments)
4508 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4509 ("python-nose" ,python-nose)))
4510 (native-inputs
4511 `(("pkg-config" ,pkg-config)
4512 ("python-sphinx" ,python-sphinx)
4513 ("texlive" ,texlive)
4514 ("texinfo" ,texinfo)
4515 ("python-setuptools" ,python-setuptools)))
4516 (arguments
89b5c60e 4517 `(#:phases
3a0b1b9a
FB
4518 (modify-phases %standard-phases
4519 (add-after
4520 'install 'install-doc
4521 (lambda* (#:key inputs outputs #:allow-other-keys)
4522 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4523 (doc (string-append data "/doc/" ,name "-" ,version))
4524 (html (string-append doc "/html"))
4525 (man1 (string-append data "/man/man1"))
4526 (info (string-append data "/info"))
4527 (examples (string-append doc "/examples")))
afd3d931 4528 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4529 (with-directory-excursion "docs"
4530 ;; FIXME: html and pdf fail to build
4531 ;; (system* "make" "html")
4532 ;; (system* "make" "pdf" "PAPER=a4")
4533 (system* "make" "info"))
4534 (copy-recursively "docs/man" man1)
4535 (copy-recursively "examples" examples)
4536 ;; (copy-recursively "docs/build/html" html)
4537 ;; (copy-file "docs/build/latex/ipython.pdf"
4538 ;; (string-append doc "/ipython.pdf"))
4539 (mkdir-p info)
4540 (copy-file "docs/build/texinfo/ipython.info"
4541 (string-append info "/ipython.info"))
4542 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4543 ;; Tests can only be run after the library has been installed and not
4544 ;; within the source directory.
4545 (delete 'check)
4546 (add-after
4547 'install 'check
4548 (lambda* (#:key outputs tests? #:allow-other-keys)
4549 (if tests?
4550 (with-directory-excursion "/tmp"
4551 (setenv "HOME" "/tmp/") ;; required by a test
4552 (zero? (system* (string-append (assoc-ref outputs "out")
4553 "/bin/iptest"))))
4554 #t)))
4555 (add-before
4556 'install 'fix-tests
4557 (lambda* (#:key inputs #:allow-other-keys)
4558 (substitute* "./IPython/utils/_process_posix.py"
4559 (("/usr/bin/env', 'which") (which "which")))
4560 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4561 (("#!/usr/bin/env python")
4562 (string-append "#!" (which "python"))))
4563 ;; Disable 1 failing test
4564 (substitute* "./IPython/core/tests/test_magic.py"
4565 (("def test_dirops\\(\\):" all)
4566 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4567 (home-page "http://ipython.org")
4568 (synopsis "IPython is a tool for interactive computing in Python")
4569 (description
4570 "IPython provides a rich architecture for interactive computing with:
4571Powerful interactive shells, a browser-based notebook, support for interactive
4572data visualization, embeddable interpreters and tools for parallel
4573computing.")
135ba811
EF
4574 (license license:bsd-3)
4575 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4576
4577(define-public python2-ipython
135ba811 4578 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4579 (package
4580 (inherit ipython)
4581 ;; FIXME: some tests are failing
4582 (arguments
4583 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4584 ;; FIXME: add pyreadline once available.
89b5c60e 4585 (inputs
135ba811
EF
4586 `(("python2-mock" ,python2-mock)
4587 ,@(package-inputs ipython))))))
03411993
AE
4588
4589(define-public python-isodate
4590 (package
4591 (name "python-isodate")
b6785c2e 4592 (version "0.5.4")
03411993
AE
4593 (source
4594 (origin
4595 (method url-fetch)
b6785c2e 4596 (uri (pypi-uri "isodate" version))
03411993
AE
4597 (sha256
4598 (base32
b6785c2e 4599 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4600 (build-system python-build-system)
4601 (inputs
4602 `(("python-setuptools" ,python-setuptools)))
4603 (home-page
4604 "http://cheeseshop.python.org/pypi/isodate")
4605 (synopsis
4606 "Python date parser and formatter")
4607 (description
4608 "Python-isodate is a python module for parsing and formatting
4609ISO 8601 dates, time and duration.")
3f641af0 4610 (license license:bsd-3)))
03411993
AE
4611
4612(define-public python2-isodate
4613 (package-with-python2 python-isodate))
673ab897
AE
4614
4615(define-public python-html5lib
4616 (package
4617 (name "python-html5lib")
fee04c19 4618 (version "1.0b8")
673ab897
AE
4619 (source
4620 (origin
4621 (method url-fetch)
fee04c19 4622 (uri (pypi-uri "html5lib" version))
673ab897
AE
4623 (sha256
4624 (base32
fee04c19 4625 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4626 (build-system python-build-system)
3dd75476
AE
4627 (propagated-inputs
4628 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4629 (inputs
4630 `(("python-setuptools" ,python-setuptools)))
4631 (arguments
4632 `(#:test-target "check"))
4633 (home-page
4634 "https://github.com/html5lib/html5lib-python")
4635 (synopsis
4636 "Python HTML parser based on the WHATWG HTML specifcation")
4637 (description
4638 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4639and written in Python.")
bd3fa666 4640 (license license:expat)))
673ab897
AE
4641
4642(define-public python2-html5lib
4643 (package-with-python2 python-html5lib))
e99f4211
MW
4644
4645(define-public python-urwid
4646 (package
4647 (name "python-urwid")
51ff41f6 4648 (version "1.3.1")
e99f4211
MW
4649 (source
4650 (origin
4651 (method url-fetch)
b97c1bfd 4652 (uri (pypi-uri "urwid" version))
e99f4211
MW
4653 (sha256
4654 (base32
51ff41f6 4655 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4656 (build-system python-build-system)
b97c1bfd
LF
4657 (arguments
4658 `(#:phases
4659 (modify-phases %standard-phases
4660 ;; Disable failing test. Bug filed upstream:
4661 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4662 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4663 (add-after 'unpack 'disable-failing-test
4664 (lambda _
4665 (substitute* "urwid/tests/test_event_loops.py"
4666 (("test_remove_watch_file")
4667 "disable_remove_watch_file")))))))
e99f4211
MW
4668 (native-inputs `(("python-setuptools" ,python-setuptools)))
4669 (home-page "http://urwid.org")
4670 (synopsis "Console user interface library for Python")
4671 (description
4672 "Urwid is a curses-based UI/widget library for Python. It includes many
4673features useful for text console applications.")
3f641af0 4674 (license license:lgpl2.1+)))
e99f4211
MW
4675
4676(define-public python2-urwid
4677 (package-with-python2 python-urwid))
d95a56c6 4678
47d0b292
TS
4679(define-public python-urwidtrees
4680 (package
4681 (name "python-urwidtrees")
37ec4623 4682 (version "1.0.2")
47d0b292
TS
4683 (source
4684 (origin
4685 (method url-fetch)
37ec4623
TS
4686 ;; package author intends on distributing via github rather than pypi:
4687 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4688 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4689 version ".tar.gz"))
4690 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4691 (sha256
4692 (base32
37ec4623 4693 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4694 (build-system python-build-system)
4695 (arguments
4696 '(#:tests? #f)) ; no tests
4697 (inputs `(("python-urwid" ,python-urwid)))
4698 (home-page "https://github.com/pazz/urwidtrees")
4699 (synopsis "Tree widgets for urwid")
4700 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4701toolkit. Use it to build trees of widgets.")
3f641af0 4702 (license license:gpl3+)))
47d0b292
TS
4703
4704(define-public python2-urwidtrees
4705 (package-with-python2 python-urwidtrees))
4706
d95a56c6
PAR
4707(define-public python-dbus
4708 (package
4709 (name "python-dbus")
4710 (version "1.2.0")
4711 (source
4712 (origin
4713 (method url-fetch)
4714 (uri (string-append
5cc3096c 4715 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4716 version ".tar.gz"))
4717 (sha256
4718 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4719 (build-system gnu-build-system)
6717c879
SB
4720 (arguments
4721 '(#:phases
4722 (modify-phases %standard-phases
4723 (add-before
4724 'check 'pre-check
4725 (lambda _
4726 ;; XXX: For the missing '/etc/machine-id'.
4727 (substitute* "test/run-test.sh"
4728 (("DBUS_FATAL_WARNINGS=1")
4729 "DBUS_FATAL_WARNINGS=0"))
4730 #t)))))
d95a56c6
PAR
4731 (native-inputs
4732 `(("pkg-config" ,pkg-config)))
4733 (inputs
4734 `(("python" ,python)
2e88d113 4735 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4736 (synopsis "Python bindings for D-bus")
4737 (description "python-dbus provides bindings for libdbus, the reference
4738implementation of D-Bus.")
4739 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4740 (license license:expat)))
b52af02b
MW
4741
4742(define-public python2-dbus
4743 (package (inherit python-dbus)
4744 (name "python2-dbus")
4745 (inputs `(("python" ,python-2)
4746 ,@(alist-delete "python"
4747 (package-inputs python-dbus)
4748 equal?)))
4749 ;; FIXME: on Python 2, the test_utf8 fails with:
4750 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4751 (arguments `(#:tests? #f))))
a6ac8332
AE
4752
4753(define-public python-apsw
4754 (package
4755 (name "python-apsw")
917708c2 4756 (version "3.9.2-r1")
a6ac8332
AE
4757 (source
4758 (origin
4759 (method url-fetch)
917708c2 4760 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4761 (sha256
4762 (base32
917708c2 4763 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4764 (build-system python-build-system)
4765 (inputs
4766 `(("python-setuptools" ,python-setuptools)
4767 ("sqlite" ,sqlite)))
4768 (arguments
4769 `(#:phases
4770 ;; swap check and install phases
4771 (alist-cons-after
4772 'install 'check
4773 (assoc-ref %standard-phases 'check)
4774 (alist-delete
4775 'check
4776 %standard-phases))))
4777 (home-page "https://github.com/rogerbinns/apsw/")
4778 (synopsis "Another Python SQLite Wrapper")
4779 (description "APSW is a Python wrapper for the SQLite
4780embedded relational database engine. In contrast to other wrappers such as
4781pysqlite it focuses on being a minimal layer over SQLite attempting just to
4782translate the complete SQLite API into Python.")
abde5f37 4783 (license license:zlib)))
a6ac8332
AE
4784
4785(define-public python2-apsw
4786 (package-with-python2 python-apsw))
26b307e2
AE
4787
4788(define-public python-lxml
4789 (package
4790 (name "python-lxml")
d58a3203 4791 (version "3.6.0")
26b307e2
AE
4792 (source
4793 (origin
4794 (method url-fetch)
97bbc480 4795 (uri (pypi-uri "lxml" version))
26b307e2 4796 (sha256
d58a3203
EF
4797 (base32
4798 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4799 (build-system python-build-system)
4800 (inputs
4801 `(("libxml2" ,libxml2)
4802 ("libxslt" ,libxslt)
4803 ("python-setuptools" ,python-setuptools)))
4804 (home-page "http://lxml.de/")
4805 (synopsis
4806 "Python XML processing library")
4807 (description
4808 "The lxml XML toolkit is a Pythonic binding for the C libraries
4809libxml2 and libxslt.")
3f641af0 4810 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4811
4812(define-public python2-lxml
4813 (package-with-python2 python-lxml))
4ed20663 4814
b32a1e47
CAW
4815;; beautifulsoup4 has a totally different namespace than 3.x,
4816;; and pypi seems to put it under its own name, so I guess we should too
4817(define-public python-beautifulsoup4
4818 (package
4819 (name "python-beautifulsoup4")
cfbb3b0d 4820 (version "4.5.0")
b32a1e47
CAW
4821 (source
4822 (origin
4823 (method url-fetch)
4824 (uri (pypi-uri "beautifulsoup4" version))
4825 (sha256
4826 (base32
cfbb3b0d 4827 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
b32a1e47
CAW
4828 (build-system python-build-system)
4829 (home-page
4830 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4831 (synopsis
4832 "Python screen-scraping library")
4833 (description
4834 "Beautiful Soup is a Python library designed for rapidly setting up
4835screen-scraping projects. It offers Pythonic idioms for navigating,
4836searching, and modifying a parse tree, providing a toolkit for
4837dissecting a document and extracting what you need. It automatically
4838converts incoming documents to Unicode and outgoing documents to UTF-8.")
4839 (license license:expat)
4840 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4841
4842(define-public python2-beautifulsoup4
4843 (package
4844 (inherit (package-with-python2
4845 (strip-python2-variant python-beautifulsoup4)))
4846 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4847
092e86f5
AE
4848(define-public python2-cssutils
4849 (package
4850 (name "python2-cssutils")
58d1d816 4851 (version "1.0.1")
092e86f5
AE
4852 (source
4853 (origin
4854 (method url-fetch)
58d1d816 4855 (uri (pypi-uri "cssutils" version))
092e86f5 4856 (sha256
58d1d816
EF
4857 (base32
4858 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
4859 (build-system python-build-system)
4860 (native-inputs
4861 `(("python2-mock" ,python2-mock) ; for the tests
4862 ("unzip" ,unzip))) ; for unpacking the source
4863 (inputs
4864 `(("python2-setuptools" ,python2-setuptools)))
4865 (arguments
4866 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4867 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4868 ))
092e86f5
AE
4869 (home-page "http://cthedot.de/cssutils/")
4870 (synopsis
4871 "CSS Cascading Style Sheets library for Python")
4872 (description
4873 "Cssutils is a Python package for parsing and building CSS
4874Cascading Style Sheets. Currently it provides a DOM only and no rendering
4875options.")
3f641af0 4876 (license license:lgpl3+)))
880ff77c
AE
4877
4878(define-public python-cssselect
4879 (package
4880 (name "python-cssselect")
d5ccd9ab 4881 (version "0.9.2")
880ff77c
AE
4882 (source
4883 (origin
4884 (method url-fetch)
d5ccd9ab 4885 (uri (pypi-uri "cssselect" version))
880ff77c 4886 (sha256
d5ccd9ab
EF
4887 (base32
4888 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
4889 (build-system python-build-system)
4890 (inputs
4891 `(("python-setuptools" ,python-setuptools)))
4892 (arguments
4893 ;; tests fail with message
4894 ;; AttributeError: 'module' object has no attribute 'tests'
4895 `(#:tests? #f))
4896 (home-page
4897 "https://pythonhosted.org/cssselect/")
4898 (synopsis
4899 "CSS3 selector parser and translator to XPath 1.0")
4900 (description
4901 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4902them to XPath 1.0 expressions. Such expressions can be used in lxml or
4903another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 4904 (license license:bsd-3)))
880ff77c
AE
4905
4906(define-public python2-cssselect
4907 (package-with-python2 python-cssselect))
60357f99
AE
4908
4909(define-public python-netifaces
4910 (package
4911 (name "python-netifaces")
4912 (version "0.10.4")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 (uri (string-append
4917 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4918 version
4919 ".tar.gz"))
4920 (sha256
4921 (base32
4922 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4923 (build-system python-build-system)
4924 (inputs
4925 `(("python-setuptools" ,python-setuptools)))
4926 (home-page
4927 "https://bitbucket.org/al45tair/netifaces")
4928 (synopsis
4929 "Python module for portable network interface information")
4930 (description
4931 "Netifaces is a Python module providing information on network
4932interfaces in an easy and portable manner.")
4933 (license license:expat)))
4934
4935(define-public python2-netifaces
4936 (package-with-python2 python-netifaces))
92cb152b 4937
32f77c04
RW
4938(define-public python-networkx
4939 (package
4940 (name "python-networkx")
a4d9609c 4941 (version "1.11")
32f77c04
RW
4942 (source
4943 (origin
4944 (method url-fetch)
a4d9609c 4945 (uri (pypi-uri "networkx" version))
32f77c04 4946 (sha256
a4d9609c 4947 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
4948 (build-system python-build-system)
4949 ;; python-decorator is needed at runtime
4950 (propagated-inputs
4951 `(("python-decorator" ,python-decorator)))
4952 (native-inputs
4953 `(("python-setuptools" ,python-setuptools)
4954 ("python-nose" ,python-nose)))
4955 (home-page "http://networkx.github.io/")
4956 (synopsis "Python module for creating and manipulating graphs and networks")
4957 (description
4958 "NetworkX is a Python package for the creation, manipulation, and study
4959of the structure, dynamics, and functions of complex networks.")
3f641af0 4960 (license license:bsd-3)))
32f77c04
RW
4961
4962(define-public python2-networkx
4963 (package-with-python2 python-networkx))
4964
92cb152b
RW
4965(define-public snakemake
4966 (package
4967 (name "snakemake")
4968 (version "3.2.1")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (string-append
4973 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4974 version ".tar.gz"))
4975 (sha256
4976 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4977 (build-system python-build-system)
4978 (inputs `(("python-setuptools" ,python-setuptools)))
4979 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4980 (synopsis "Python-based execution environment for make-like workflows")
4981 (description
4982 "Snakemake aims to reduce the complexity of creating workflows by
4983providing a clean and modern domain specific specification language (DSL) in
4984Python style, together with a fast and comfortable execution environment.")
4985 (license license:expat)))
a1920bc9 4986
35de1fbd
RW
4987(define-public python-seaborn
4988 (package
4989 (name "python-seaborn")
fc899d4f 4990 (version "0.7.0")
35de1fbd
RW
4991 (source
4992 (origin
4993 (method url-fetch)
fc899d4f 4994 (uri (pypi-uri "seaborn" version))
35de1fbd 4995 (sha256
fc899d4f 4996 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
4997 (build-system python-build-system)
4998 (propagated-inputs
4999 `(("python-pandas" ,python-pandas)
5000 ("python-matplotlib" ,python-matplotlib)
5001 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5002 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5003 (synopsis "Statistical data visualization")
5004 (description
5005 "Seaborn is a library for making attractive and informative statistical
5006graphics in Python. It is built on top of matplotlib and tightly integrated
5007with the PyData stack, including support for numpy and pandas data structures
5008and statistical routines from scipy and statsmodels.")
3f641af0 5009 (license license:bsd-3)
fc899d4f 5010 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5011
5012(define-public python2-seaborn
fc899d4f
EF
5013 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5014 (package
5015 (inherit base)
5016 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5017 ,@(package-propagated-inputs base)))
5018 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5019 ,@(package-native-inputs base))))))
35de1fbd 5020
90fc547f
RW
5021(define-public python-sympy
5022 (package
5023 (name "python-sympy")
5024 (version "0.7.6")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (string-append
5029 "https://github.com/sympy/sympy/releases/download/sympy-"
5030 version "/sympy-" version ".tar.gz"))
5031 (sha256
5032 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5033 (build-system python-build-system)
5034 (native-inputs
5035 `(("python-setuptools" ,python-setuptools)))
5036 (home-page "http://www.sympy.org/")
5037 (synopsis "Python library for symbolic mathematics")
5038 (description
5039 "SymPy is a Python library for symbolic mathematics. It aims to become a
5040full-featured computer algebra system (CAS) while keeping the code as simple
5041as possible in order to be comprehensible and easily extensible.")
3f641af0 5042 (license license:bsd-3)))
90fc547f
RW
5043
5044(define-public python2-sympy
5045 (package-with-python2 python-sympy))
5046
e8c9b010
SR
5047(define-public python-q
5048 (package
5049 (name "python-q")
5050 (version "2.6")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "q" version))
5055 (sha256
5056 (base32
5057 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5058 (build-system python-build-system)
5059 (home-page "https://github.com/zestyping/q")
5060 (synopsis "Quick-and-dirty debugging output for tired programmers")
5061 (description
5062 "q is a Python module for \"print\" style of debugging Python code. It
5063provides convenient short API for print out of values, tracebacks, and
5064falling into the Python interpreter.")
5065 (license license:asl2.0)
5066 (properties `((python2-variant . ,(delay python2-q))))))
5067
5068(define-public python2-q
5069 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5070 (package
5071 (inherit base)
5072 (native-inputs
5073 `(("python2-setuptools" ,python2-setuptools)
5074 ,@(package-native-inputs base))))))
5075
a1920bc9
FB
5076(define-public python-testlib
5077 (package
5078 (name "python-testlib")
5079 (version "0.6.5")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (string-append
5084 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5085 version ".zip"))
5086 (sha256
5087 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5088 (build-system python-build-system)
5089 (inputs
5090 `(("python-setuptools" ,python-setuptools)))
5091 (native-inputs
5092 `(("unzip" ,unzip)))
5093 (arguments
5094 `(#:phases
5095 (alist-replace
5096 'unpack
5097 (lambda* (#:key inputs outputs #:allow-other-keys)
5098 (let ((unzip (string-append (assoc-ref inputs "unzip")
5099 "/bin/unzip"))
5100 (source (assoc-ref inputs "source")))
5101 (and (zero? (system* unzip source))
5102 (chdir (string-append "testlib-" ,version)))))
5103 %standard-phases)))
5104 (synopsis "Python micro test suite harness")
5105 (description "A micro unittest suite harness for Python.")
5106 (home-page "https://github.com/trentm/testlib")
1cb9c006 5107 (license license:expat)))
a1920bc9
FB
5108
5109(define-public python2-testlib
5110 (package-with-python2 python-testlib))
db62afa5
LC
5111
5112(define-public python2-xlib
5113 (package
5114 (name "python2-xlib")
5115 (version "0.14")
5116 (source (origin
5117 (method url-fetch)
de67e922
LF
5118 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5119 "/" version "/"
db62afa5
LC
5120 "python-xlib-" version ".tar.gz"))
5121 (sha256
5122 (base32
5123 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5124 (build-system python-build-system)
5125 (arguments
5126 `(#:python ,python-2 ;Python 2 only
5127 #:tests? #f)) ;no tests
5128 (inputs
5129 `(("python-setuptools" ,python-setuptools)))
5130 (home-page "http://python-xlib.sourceforge.net/")
5131 (synopsis "Python X11 client library")
5132 (description
5133 "The Python X Library is intended to be a fully functional X client
5134library for Python programs. It is useful to implement low-level X clients.
5135It is written entirely in Python.")
3f641af0 5136 (license license:gpl2+)))
0234ca06
DT
5137
5138(define-public python-singledispatch
5139 (package
5140 (name "python-singledispatch")
5141 (version "3.4.0.3")
5142 (source
5143 (origin
5144 (method url-fetch)
bdb67d84 5145 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5146 (sha256
5147 (base32
5148 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5149 (build-system python-build-system)
5150 (native-inputs
5151 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5152 (inputs
0234ca06
DT
5153 `(("python-six" ,python-six)))
5154 (home-page
5155 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5156 (synopsis "Backport of singledispatch feature from Python 3.4")
5157 (description
5158 "This library brings functools.singledispatch from Python 3.4 to Python
51592.6-3.3.")
5160 (license license:expat)))
5161
5162(define-public python2-singledispatch
5163 (package-with-python2 python-singledispatch))
feaae484 5164
310d218f
RW
5165(define-public python-tornado
5166 (package
5167 (name "python-tornado")
a724924b 5168 (version "4.3")
310d218f
RW
5169 (source
5170 (origin
5171 (method url-fetch)
a724924b 5172 (uri (pypi-uri "tornado" version))
310d218f 5173 (sha256
a724924b 5174 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5175 (build-system python-build-system)
310d218f 5176 (native-inputs
b455439b
EF
5177 `(("python-certifi" ,python-certifi)))
5178 (inputs
5179 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5180 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5181 (synopsis "Python web framework and asynchronous networking library")
5182 (description
5183 "Tornado is a Python web framework and asynchronous networking library,
5184originally developed at FriendFeed. By using non-blocking network I/O,
5185Tornado can scale to tens of thousands of open connections, making it ideal
5186for long polling, WebSockets, and other applications that require a long-lived
5187connection to each user.")
3f641af0 5188 (license license:asl2.0)
b455439b 5189 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5190
5191(define-public python2-tornado
b455439b 5192 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5193 (package (inherit tornado)
5194 (inputs
5195 `(("python2-backport-ssl-match-hostname"
5196 ,python2-backport-ssl-match-hostname)
b455439b
EF
5197 ("python2-singledispatch" ,python2-singledispatch)
5198 ,@(package-inputs tornado)))
5199 (native-inputs
5200 `(("python2-setuptools" ,python2-setuptools)
5201 ,@(package-native-inputs tornado))))))
310d218f 5202
6b59fc10
EF
5203;; the python- version can be removed with python-3.5
5204(define-public python-backports-abc
5205 (package
5206 (name "python-backports-abc")
5207 (version "0.4")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (pypi-uri "backports_abc" version))
5212 (sha256
5213 (base32
5214 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5215 (build-system python-build-system)
5216 (inputs
5217 `(("python-setuptools" ,python-setuptools)))
5218 (home-page "https://github.com/cython/backports_abc")
66e07664 5219 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5220 (description
5221 "Python-backports-abc provides a backport of additions to the
5222'collections.abc' module in Python-3.5.")
3f641af0 5223 (license license:psfl)))
6b59fc10
EF
5224
5225(define-public python2-backports-abc
5226 (package-with-python2 python-backports-abc))
5227
feaae484
SB
5228(define-public python-waf
5229 (package
5230 (name "python-waf")
f0e8d85e 5231 (version "1.9.1")
feaae484
SB
5232 (source (origin
5233 (method url-fetch)
5234 (uri (string-append "https://waf.io/"
5235 "waf-" version ".tar.bz2"))
5236 (sha256
5237 (base32
f0e8d85e 5238 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
feaae484
SB
5239 (build-system python-build-system)
5240 (arguments
5241 '(#:phases
5242 (modify-phases %standard-phases
5243 (replace 'build
5244 (lambda _
5245 (zero? (begin
5246 (system* "python" "waf-light" "configure")
5247 (system* "python" "waf-light" "build")))))
5248 (replace 'check
5249 (lambda _
5250 (zero? (system* "python" "waf" "--version"))))
5251 (replace 'install
5252 (lambda _
5253 (copy-file "waf" %output))))))
5254 (home-page "https://waf.io/")
5255 (synopsis "Python-based build system")
5256 (description
5257 "Waf is a Python-based framework for configuring, compiling and installing
5258applications.")
3f641af0 5259 (license license:bsd-3)))
feaae484
SB
5260
5261(define-public python2-waf
5262 (package-with-python2 python-waf))
45203542
RW
5263
5264(define-public python-pyzmq
5265 (package
5266 (name "python-pyzmq")
3655ee76 5267 (version "15.1.0")
45203542
RW
5268 (source
5269 (origin
5270 (method url-fetch)
3655ee76 5271 (uri (pypi-uri "pyzmq" version))
45203542 5272 (sha256
3655ee76 5273 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5274 (build-system python-build-system)
5275 (arguments
5276 `(#:configure-flags
5277 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5278 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5279 ;; --inplace' for 'python setup.py test' to work.
5280 #:tests? #f))
5281 (inputs
5282 `(("zeromq" ,zeromq)))
5283 (native-inputs
5284 `(("pkg-config" ,pkg-config)
5285 ("python-nose" ,python-nose)
5286 ("python-setuptools" ,python-setuptools)))
5287 (home-page "http://github.com/zeromq/pyzmq")
5288 (synopsis "Python bindings for 0MQ")
5289 (description
5290 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5291 (license license:bsd-4)))
45203542
RW
5292
5293(define-public python2-pyzmq
5294 (package-with-python2 python-pyzmq))
d889e6c4
CR
5295
5296(define-public python-pep8
5297 (package
5298 (name "python-pep8")
db251311 5299 (version "1.7.0")
d889e6c4
CR
5300 (source
5301 (origin
5302 (method url-fetch)
db251311 5303 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5304 (sha256
5305 (base32
db251311 5306 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5307 (build-system python-build-system)
5308 (inputs
5309 `(("python-setuptools" ,python-setuptools)))
5310 (home-page "http://pep8.readthedocs.org/")
5311 (synopsis "Python style guide checker")
5312 (description
5313 "This tools checks Python code against some of the style conventions in
5314PEP 8.")
5315 (license license:expat)))
5316
5317(define-public python2-pep8
5318 (package-with-python2 python-pep8))
e31d7f44
CR
5319
5320(define-public python-pyflakes
5321 (package
5322 (name "python-pyflakes")
2abc3972 5323 (version "1.0.0")
e31d7f44
CR
5324 (source
5325 (origin
5326 (method url-fetch)
2abc3972 5327 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5328 (sha256
5329 (base32
2abc3972 5330 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5331 (build-system python-build-system)
5332 (inputs
5333 `(("python-setuptools" ,python-setuptools)))
5334 (home-page
5335 "https://github.com/pyflakes/pyflakes")
5336 (synopsis "Passive checker of Python programs")
5337 (description
5338 "Pyflakes statically checks Python source code for common errors.")
5339 (license license:expat)))
a59e017c 5340
7261d9eb
CR
5341(define-public python2-pyflakes
5342 (package-with-python2 python-pyflakes))
5343
a59e017c
CR
5344(define-public python-mccabe
5345 (package
5346 (name "python-mccabe")
c6ebd40d 5347 (version "0.4.0")
a59e017c
CR
5348 (source
5349 (origin
5350 (method url-fetch)
c6ebd40d 5351 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5352 (sha256
5353 (base32
c6ebd40d 5354 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5355 (build-system python-build-system)
5356 (inputs
c6ebd40d
EF
5357 `(("python-pytest" ,python-pytest)
5358 ("python-pytest-runner" ,python-pytest-runner)
5359 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5360 (home-page "https://github.com/flintwork/mccabe")
5361 (synopsis "McCabe checker, plugin for flake8")
5362 (description
5363 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5364complexity of Python source code.")
7362371d 5365 (license license:expat)))
a59e017c
CR
5366
5367(define-public python2-mccabe
5368 (package-with-python2 python-mccabe))
e8df8f47 5369
7477fbb1
CR
5370(define-public python-mccabe-0.2.1
5371 (package (inherit python-mccabe)
5372 (version "0.2.1")
5373 (source
5374 (origin
5375 (method url-fetch)
5376 (uri (pypi-uri "mccabe" version))
5377 (sha256
5378 (base32
c6ebd40d 5379 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5380 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5381
5382(define-public python2-mccabe-0.2.1
5383 (package-with-python2 python-mccabe-0.2.1))
5384
e8df8f47
CR
5385;; Flake8 2.4.1 requires an older version of pep8.
5386;; This should be removed ASAP.
5387(define-public python-pep8-1.5.7
5388 (package (inherit python-pep8)
5389 (version "1.5.7")
5390 (source
5391 (origin
5392 (method url-fetch)
5393 (uri (string-append
5394 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5395 version
5396 ".tar.gz"))
5397 (sha256
5398 (base32
5399 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5400
5401(define-public python2-pep8-1.5.7
5402 (package-with-python2 python-pep8-1.5.7))
5403
5404;; Flake8 2.4.1 requires an older version of pyflakes.
5405;; This should be removed ASAP.
5406(define-public python-pyflakes-0.8.1
5407 (package (inherit python-pyflakes)
5408 (version "0.8.1")
5409 (source
5410 (origin
5411 (method url-fetch)
5412 (uri (string-append
5413 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5414 version
5415 ".tar.gz"))
5416 (sha256
5417 (base32
5418 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5419
5420(define-public python2-pyflakes-0.8.1
7261d9eb 5421 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5422
5423(define-public python-flake8
5424 (package
5425 (name "python-flake8")
43789136 5426 (version "2.5.4")
e8df8f47
CR
5427 (source
5428 (origin
5429 (method url-fetch)
1b995533 5430 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5431 (sha256
5432 (base32
43789136 5433 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5434 (build-system python-build-system)
5435 (inputs
5436 `(("python-setuptools" ,python-setuptools)
43789136
EF
5437 ("python-pep8" ,python-pep8)
5438 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5439 ("python-mccabe" ,python-mccabe)
5440 ("python-mock" ,python-mock)
5441 ("python-nose" ,python-nose)))
5442 (home-page "https://gitlab.com/pycqa/flake8")
5443 (synopsis
5444 "The modular source code checker: pep8, pyflakes and co")
5445 (description
5446 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5447 (license license:expat)))
5448
5449(define-public python2-flake8
5450 (package-with-python2 python-flake8))
61b9ac53 5451
abf21efc
CR
5452;; This will only be needed by the python-hacking package and will not be
5453;; necessary once python-hacking > 0.10.2 is released.
5454(define-public python-flake8-2.2.4
5455 (package (inherit python-flake8)
5456 (inputs
5457 `(("python-setuptools" ,python-setuptools)
5458 ("python-pep8" ,python-pep8-1.5.7)
5459 ("python-pyflakes" ,python-pyflakes-0.8.1)
5460 ("python-mccabe" ,python-mccabe-0.2.1)
5461 ("python-mock" ,python-mock)
5462 ("python-nose" ,python-nose)))
5463 (version "2.2.4")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (pypi-uri "flake8" version))
5468 (sha256
5469 (base32
5470 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5471
5472(define-public python2-flake8-2.2.4
5473 (package-with-python2 python-flake8-2.2.4))
5474
61b9ac53
FB
5475(define-public python-mistune
5476 (package
5477 (name "python-mistune")
5478 (version "0.7")
5479 (source
5480 (origin
5481 (method url-fetch)
5482 (uri (string-append
5483 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5484 version
5485 ".tar.gz"))
5486 (sha256
5487 (base32
5488 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5489 (build-system python-build-system)
5490 (inputs
5491 `(("python-setuptools" ,python-setuptools)
5492 ("python-nose" ,python-nose)
5493 ("python-cython" ,python-cython)))
5494 (home-page "https://github.com/lepture/mistune")
5495 (synopsis "Markdown parser in pure Python")
5496 (description "This package provides a fast markdown parser in pure
5497Python.")
3f641af0 5498 (license license:bsd-3)))
61b9ac53
FB
5499
5500(define-public python2-mistune
5501 (package-with-python2 python-mistune))
6d992d07 5502
b9893908
EE
5503(define-public python-markdown
5504 (package
5505 (name "python-markdown")
5506 (version "2.6.5")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "Markdown" version))
5511 (sha256
5512 (base32
5513 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5514 (build-system python-build-system)
5515 (arguments
5516 `(#:phases
5517 (modify-phases %standard-phases
5518 (replace 'check
5519 (lambda _
5520 (zero? (system* "python" "run-tests.py")))))))
5521 (native-inputs
5522 `(("python-nose" ,python-nose)
5523 ("python-pyyaml" ,python-pyyaml)))
5524 (home-page "https://pythonhosted.org/Markdown/")
5525 (synopsis "Python implementation of Markdown")
5526 (description
5527 "This package provides a Python implementation of John Gruber's
5528Markdown. The library features international input, various Markdown
5529extensions, and several HTML output formats. A command line wrapper
5530markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5531 (license license:bsd-3)))
b9893908
EE
5532
5533(define-public python2-markdown
5534 (package-with-python2 python-markdown))
5535
6d992d07
FB
5536(define-public python-ptyprocess
5537 (package
5538 (name "python-ptyprocess")
5539 (version "0.5")
5540 (source
5541 (origin
5542 (method url-fetch)
5543 (uri (string-append
5544 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5545 version ".tar.gz"))
5546 (sha256
5547 (base32
5548 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5549 (build-system python-build-system)
5550 (inputs
5551 `(("python-setuptools" ,python-setuptools)
5552 ("python-nose" ,python-nose)))
5553 (arguments
5554 `(#:phases
5555 (modify-phases %standard-phases
5556 (replace 'check
5557 (lambda _
5558 (zero? (system* "nosetests")))))))
5559 (home-page "https://github.com/pexpect/ptyprocess")
5560 (synopsis "Run a subprocess in a pseudo terminal")
5561 (description
5562 "This package provides a Python library used to launch a subprocess in a
5563pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5564 (license license:isc)))
6d992d07
FB
5565
5566(define-public python2-ptyprocess
5567 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5568
5569(define-public python-terminado
5570 (package
5571 (name "python-terminado")
783fb0a3 5572 (version "0.6")
4aadb1df
FB
5573 (source
5574 (origin
5575 (method url-fetch)
783fb0a3 5576 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5577 (sha256
5578 (base32
783fb0a3 5579 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5580 (build-system python-build-system)
5581 (propagated-inputs
5582 `(("python-tornado" ,python-tornado)
5583 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5584 (native-inputs
5585 `(("python-nose" ,python-nose)))
4aadb1df
FB
5586 (arguments
5587 `(#:phases
5588 (modify-phases %standard-phases
5589 (replace 'check
5590 (lambda _
5591 (zero? (system* "nosetests")))))))
5592 (home-page "https://github.com/takluyver/terminado")
5593 (synopsis "Terminals served to term.js using Tornado websockets")
5594 (description "This package provides a Tornado websocket backend for the
5595term.js Javascript terminal emulator library.")
3f641af0 5596 (license license:bsd-2)
783fb0a3 5597 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5598
5599(define-public python2-terminado
783fb0a3 5600 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5601 (package (inherit terminado)
783fb0a3
EF
5602 (propagated-inputs
5603 `(("python2-backport-ssl-match-hostname"
5604 ,python2-backport-ssl-match-hostname)
5605 ,@(package-propagated-inputs terminado)))
5606 (native-inputs
5607 `(("python2-setuptools" ,python2-setuptools)
5608 ,@(package-native-inputs terminado))))))
5faa5ce4 5609
d582eaac
SB
5610(define-public python-fonttools
5611 (package
5612 (name "python-fonttools")
5613 (version "2.5")
5614 (source (origin
5615 (method url-fetch)
5616 (uri (string-append
5617 "https://pypi.python.org/packages/source/F/FontTools/"
5618 "fonttools-" version ".tar.gz"))
5619 (sha256
5620 (base32
5621 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5622 (build-system python-build-system)
5623 (arguments '(#:test-target "check"))
5624 (propagated-inputs
5625 ;; XXX: module not found if setuptools is not available.
5626 `(("python-setuptools" ,python-setuptools)))
5627 (home-page "http://github.com/behdad/fonttools")
5628 (synopsis "Tools to manipulate font files")
5629 (description
5630 "FontTools/TTX is a library to manipulate font files from Python. It
5631supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5632of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5633also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5634from an XML-based format.")
3f641af0
DC
5635 (license (license:non-copyleft
5636 "file://LICENSE.txt"
5637 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5638
5639(define-public python2-fonttools
5640 (package-with-python2 python-fonttools))
75710da6 5641
5faa5ce4
RW
5642(define-public python-ly
5643 (package
5644 (name "python-ly")
5135354f 5645 (version "0.9.4")
5faa5ce4
RW
5646 (source
5647 (origin
5648 (method url-fetch)
5135354f
RW
5649 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5650 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5651 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5652 (sha256
5653 (base32
5135354f 5654 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5655 (build-system python-build-system)
5656 (native-inputs
5657 `(("python-setuptools" ,python-setuptools)))
5658 (synopsis "Tool and library for manipulating LilyPond files")
5659 (description "This package provides a Python library to parse, manipulate
5660or create documents in LilyPond format. A command line program ly is also
5661provided that can be used to do various manipulations with LilyPond files.")
5662 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5663 (license license:gpl2+)))
7e7b27d9
CR
5664
5665(define-public python-appdirs
5666 (package
5667 (name "python-appdirs")
5668 (version "1.4.0")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (string-append
5673 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5674 version
5675 ".tar.gz"))
5676 (sha256
5677 (base32
5678 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5679 (build-system python-build-system)
5680 (inputs
5681 `(("python-setuptools" ,python-setuptools)))
5682 (home-page "http://github.com/ActiveState/appdirs")
5683 (synopsis
5684 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5685 (description
5686 "This module provides a portable way of finding out where user data
5687should be stored on various operating systems.")
5688 (license license:expat)))
5689
5690(define-public python2-appdirs
5691 (package-with-python2 python-appdirs))
89b2e0b0
LF
5692
5693(define-public python-llfuse
5694 (package
5695 (name "python-llfuse")
e36ace36 5696 (version "1.1.1")
89b2e0b0
LF
5697 (source (origin
5698 (method url-fetch)
5699 (uri (string-append
5700 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5701 "llfuse-" version ".tar.bz2"))
5702 (sha256
5703 (base32
e36ace36 5704 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5705 (build-system python-build-system)
5706 (inputs
5707 `(("fuse" ,fuse)
5708 ("attr" ,attr)))
5709 (native-inputs
5710 `(("pkg-config" ,pkg-config)
5711 ("python-setuptools" ,python-setuptools)))
5712 (synopsis "Python bindings for FUSE")
5713 (description
5714 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5715 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5716 (license license:lgpl2.0+)
cd0569c4 5717 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5718
5719(define-public python2-llfuse
cd0569c4
LF
5720 (package (inherit (package-with-python2
5721 (strip-python2-variant python-llfuse)))
5722 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5723
5724;; For attic-0.16
5725(define-public python-llfuse-0.41
5726 (package (inherit python-llfuse)
229b3661 5727 (version "0.41.1")
cd0569c4
LF
5728 (source (origin
5729 (method url-fetch)
5730 (uri (string-append
5731 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5732 "llfuse-" version ".tar.bz2"))
5733 (sha256
5734 (base32
229b3661 5735 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5736 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5737 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5738 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5739
5740(define-public python-msgpack
5741 (package
5742 (name "python-msgpack")
aed625bd 5743 (version "0.4.8")
641c9871
LF
5744 (source (origin
5745 (method url-fetch)
ae831df4 5746 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5747 (sha256
5748 (base32
aed625bd 5749 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5750 (build-system python-build-system)
641c9871
LF
5751 (synopsis "MessagePack (de)serializer")
5752 (description "MessagePack is a fast, compact binary serialization format,
5753suitable for similar data to JSON. This package provides CPython bindings for
5754reading and writing MessagePack data.")
5755 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5756 (license license:asl2.0)
bd74be7b
LF
5757 (properties `((python2-variant . ,(delay python2-msgpack))))))
5758
5759(define-public python2-msgpack
5760 (package (inherit (package-with-python2
5761 (strip-python2-variant python-msgpack)))
5762 (native-inputs
5763 `(("python2-setuptools" ,python2-setuptools)))))
641c9871
LF
5764
5765(define-public python2-msgpack
5766 (package-with-python2 python-msgpack))
6e5e39f4
CR
5767
5768(define-public python-netaddr
5769 (package
5770 (name "python-netaddr")
5771 (version "0.7.18")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (string-append
5776 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5777 version
5778 ".tar.gz"))
5779 (sha256
5780 (base32
5781 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5782 (build-system python-build-system)
5783 (arguments `(#:tests? #f)) ;; No tests.
5784 (inputs
5785 `(("python-setuptools" ,python-setuptools)))
5786 (home-page "https://github.com/drkjam/netaddr/")
5787 (synopsis "Pythonic manipulation of network addresses")
5788 (description
5789 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5790and MAC network addresses.")
3f641af0 5791 (license license:bsd-3)))
6e5e39f4
CR
5792
5793(define-public python2-netaddr
5794 (package-with-python2 python-netaddr))
8c692a52
CR
5795
5796(define-public python-wrapt
5797 (package
5798 (name "python-wrapt")
5799 (version "1.10.5")
5800 (source
5801 (origin
5802 (method url-fetch)
5803 (uri (string-append
5804 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5805 version
5806 ".tar.gz"))
5807 (sha256
5808 (base32
5809 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5810 (build-system python-build-system)
5811 (arguments
5812 ;; Tests are not included in the tarball, they are only available in the
5813 ;; git repository.
5814 `(#:tests? #f))
5815 (inputs
5816 `(("python-setuptools" ,python-setuptools)))
5817 (home-page "https://github.com/GrahamDumpleton/wrapt")
5818 (synopsis "Module for decorators, wrappers and monkey patching")
5819 (description
5820 "The aim of the wrapt module is to provide a transparent object proxy for
5821 Python, which can be used as the basis for the construction of function
5822 wrappers and decorator functions.")
3f641af0 5823 (license license:bsd-2)))
8c692a52
CR
5824
5825(define-public python2-wrapt
5826 (package-with-python2 python-wrapt))
b85c85be
CR
5827
5828(define-public python-iso8601
5829 (package
5830 (name "python-iso8601")
fe84bc9a 5831 (version "0.1.11")
b85c85be
CR
5832 (source
5833 (origin
5834 (method url-fetch)
fe84bc9a 5835 (uri (pypi-uri "iso8601" version))
b85c85be 5836 (sha256
fe84bc9a
EF
5837 (base32
5838 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
5839 (build-system python-build-system)
5840 (inputs
5841 `(("python-setuptools" ,python-setuptools)))
5842 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5843 (synopsis "Module to parse ISO 8601 dates")
5844 (description
5845 "This module parses the most common forms of ISO 8601 date strings (e.g.
5846@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5847 (license license:expat)))
5848
5849(define-public python2-iso8601
5850 (package-with-python2 python-iso8601))
5e412b63
CR
5851
5852(define-public python-monotonic
5853 (package
5854 (name "python-monotonic")
5855 (version "0.3")
5856 (source
5857 (origin
5858 (method url-fetch)
5859 (uri (string-append
5860 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5861 version
5862 ".tar.gz"))
5863 (sha256
5864 (base32
5865 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5866 (build-system python-build-system)
5867 (inputs
5868 `(("python-setuptools" ,python-setuptools)))
5869 (home-page "https://github.com/atdt/monotonic")
5870 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5871 (description
5872 "This module provides a monotonic() function which returns the value (in
5873fractional seconds) of a clock which never goes backwards.")
3f641af0 5874 (license license:asl2.0)))
5e412b63
CR
5875
5876(define-public python2-monotonic
5877 (package-with-python2 python-monotonic))
de34afac
CR
5878
5879(define-public python-webob
5880 (package
5881 (name "python-webob")
b8834c21 5882 (version "1.5.1")
de34afac
CR
5883 (source
5884 (origin
5885 (method url-fetch)
b8834c21 5886 (uri (pypi-uri "WebOb" version))
de34afac
CR
5887 (sha256
5888 (base32
b8834c21 5889 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5890 (build-system python-build-system)
5891 (inputs
5892 `(("python-nose" ,python-nose)
5893 ("python-setuptools" ,python-setuptools)))
5894 (home-page "http://webob.org/")
5895 (synopsis "WSGI request and response object")
5896 (description
5897 "WebOb provides wrappers around the WSGI request environment, and an
5898object to help create WSGI responses.")
5899 (license license:expat)))
5900
5901(define-public python2-webob
5902 (package-with-python2 python-webob))
350ba0a3 5903
02a8a187
BW
5904(define-public python-xlrd
5905 (package
5906 (name "python-xlrd")
c2ad4d70 5907 (version "1.0.0")
02a8a187
BW
5908 (source (origin
5909 (method url-fetch)
e775f48e 5910 (uri (pypi-uri "xlrd" version))
02a8a187
BW
5911 (sha256
5912 (base32
c2ad4d70 5913 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
5914 (build-system python-build-system)
5915 (arguments
5916 `(#:phases
5917 (modify-phases %standard-phases
c2ad4d70 5918 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
5919 ;; run tests instead for now.
5920 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5921 (native-inputs `(("python-nose" ,python-nose)
5922 ("python-setuptools" ,python-setuptools)))
5923 (home-page "http://www.python-excel.org/")
5924 (synopsis "Library for extracting data from Excel files")
5925 (description "This packages provides a library to extract data from
c598e35c 5926spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
5927@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5928Unicode-aware. It is not intended as an end-user tool.")
3f641af0 5929 (license license:bsd-3)))
02a8a187
BW
5930
5931(define-public python2-xlrd
5932 (package-with-python2 python-xlrd))
5933
350ba0a3
CR
5934(define-public python-prettytable
5935 (package
5936 (name "python-prettytable")
5937 (version "0.7.2")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (string-append
5942 "https://pypi.python.org/packages/source/P/PrettyTable/"
5943 "prettytable-" version ".tar.bz2"))
5944 (sha256
5945 (base32
5946 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5947 (build-system python-build-system)
5948 (inputs
5949 `(("python-setuptools" ,python-setuptools)))
5950 (home-page "http://code.google.com/p/prettytable/")
5951 (synopsis "Display tabular data in an ASCII table format")
5952 (description
5953 "A library designed to represent tabular data in visually appealing ASCII
5954tables. PrettyTable allows for selection of which columns are to be printed,
5955independent alignment of columns (left or right justified or centred) and
5956printing of sub-tables by specifying a row range.")
3f641af0 5957 (license license:bsd-3)))
350ba0a3
CR
5958
5959(define-public python2-prettytable
5960 (package-with-python2 python-prettytable))
7a8ac75a 5961
9f8ee3fe
RW
5962(define-public python-tables
5963 (package
5964 (name "python-tables")
5965 (version "3.2.2")
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (pypi-uri "tables" version))
5970 (sha256
5971 (base32
5972 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5973 (build-system python-build-system)
5974 (arguments
5975 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5976 ;; or "check", so we must override the build and check phases.
5977 #:phases
5978 (modify-phases %standard-phases
5979 (add-after 'unpack 'use-gcc
5980 (lambda _
5981 (substitute* "setup.py"
5982 (("compiler = new_compiler\\(\\)" line)
5983 (string-append line
5984 "\ncompiler.set_executables(compiler='gcc',"
5985 "compiler_so='gcc',"
5986 "linker_exe='gcc',"
5987 "linker_so='gcc -shared')")))
5988 #t))
5989 (replace 'build
5990 (lambda* (#:key inputs #:allow-other-keys)
5991 (zero? (system* "python" "setup.py" "build"
5992 (string-append "--hdf5="
5993 (assoc-ref inputs "hdf5"))))))
5994 (replace 'check
5995 (lambda* (#:key inputs #:allow-other-keys)
5996 (zero? (system* "python" "setup.py" "check"
5997 (string-append "--hdf5="
5998 (assoc-ref inputs "hdf5")))))))))
5999 (propagated-inputs
6000 `(("python-numexpr" ,python-numexpr)
6001 ("python-numpy" ,python-numpy)))
6002 (native-inputs
6003 `(("python-setuptools" ,python-setuptools)
6004 ("python-cython" ,python-cython)
6005 ("pkg-config" ,pkg-config)))
6006 (inputs
6007 `(("hdf5" ,hdf5)
6008 ("bzip2" ,bzip2)
6009 ("zlib" ,zlib)))
6010 (home-page "http://www.pytables.org/")
6011 (synopsis "Hierarchical datasets for Python")
6012 (description "PyTables is a package for managing hierarchical datasets and
6013designed to efficently cope with extremely large amounts of data.")
3f641af0 6014 (license license:bsd-3)))
9f8ee3fe
RW
6015
6016(define-public python2-tables
6017 (package-with-python2 python-tables))
6018
7a8ac75a
RW
6019(define-public python-pyasn1
6020 (package
6021 (name "python-pyasn1")
6022 (version "0.1.8")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (string-append "https://pypi.python.org/packages/source/p/"
6027 "pyasn1/pyasn1-" version ".tar.gz"))
6028 (sha256
6029 (base32
6030 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
6031 (build-system python-build-system)
6032 (home-page "http://pyasn1.sourceforge.net/")
6033 (synopsis "ASN.1 types and codecs")
6034 (description
6035 "This is an implementation of ASN.1 types and codecs in Python. It is
6036suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6037 (license license:bsd-2)))
7a8ac75a
RW
6038
6039(define-public python2-pyasn1
6040 (package-with-python2 python-pyasn1))
9a49a535 6041
5988c299
EF
6042(define-public python-pyasn1-modules
6043 (package
6044 (name "python-pyasn1-modules")
6045 (version "0.0.8")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (pypi-uri "pyasn1-modules" version))
6050 (sha256
6051 (base32
6052 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6053 (build-system python-build-system)
6054 (native-inputs
6055 `(("python-setuptools" ,python-setuptools)))
6056 (propagated-inputs
6057 `(("python-pyasn1" ,python-pyasn1)))
6058 (home-page "http://sourceforge.net/projects/pyasn1/")
6059 (synopsis "ASN.1 codec implementations")
6060 (description
6061 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6062implementations of ASN.1-based codecs and protocols.")
3f641af0 6063 (license license:bsd-3)))
5988c299
EF
6064
6065(define-public python2-pyasn1-modules
6066 (package-with-python2 python-pyasn1-modules))
6067
520af157 6068(define-public python-ipaddress
9a49a535 6069 (package
520af157
DC
6070 (name "python-ipaddress")
6071 (version "1.0.16")
6072 (source (origin
6073 (method url-fetch)
6074 (uri (pypi-uri "ipaddress" version))
6075 (sha256
6076 (base32
6077 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6078 (build-system python-build-system)
9a49a535
RW
6079 (home-page "https://github.com/phihag/ipaddress")
6080 (synopsis "IP address manipulation library")
6081 (description
520af157
DC
6082 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6083 in Python. This library is used to create, poke at, and manipulate IPv4 and
6084 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6085 module to older versions of Python.")
6086 (license license:psfl)
6087 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6088
6089(define-public python2-ipaddress
6090 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6091 (package (inherit base)
6092 (native-inputs
6093 `(("python2-setuptools" ,python2-setuptools)
6094 ,@(package-native-inputs base))))))
3f00e078 6095
4a238186
HG
6096(define-public python2-ipaddr
6097 (package
6098 (name "python2-ipaddr")
6099 (version "2.1.11")
6100 (source
6101 (origin
6102 (method url-fetch)
6103 (uri (pypi-uri "ipaddr" version))
6104 (sha256
6105 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6106 (build-system python-build-system)
6107 (arguments
6108 `(#:python ,python-2 ;version 2 only
6109 #:phases
6110 (modify-phases %standard-phases
6111 (replace 'check
6112 (lambda* _
6113 (zero? (system* "python" "ipaddr_test.py")))))))
6114 (home-page "https://github.com/google/ipaddr-py")
6115 (synopsis "IP address manipulation library")
6116 (description
6117 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6118IPv6 addresses and networks.
6119
6120For new implementations you may prefer to use the standard module
6121@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6122versions of Python.")
3f641af0 6123 (license license:asl2.0)))
4a238186 6124
3f00e078
RW
6125(define-public python-idna
6126 (package
6127 (name "python-idna")
6128 (version "2.0")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (string-append "https://pypi.python.org/packages/source/i/"
6133 "idna/idna-" version ".tar.gz"))
6134 (sha256
6135 (base32
6136 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6137 (build-system python-build-system)
6138 (native-inputs
6139 `(("python-setuptools" ,python-setuptools)))
6140 (home-page "https://github.com/kjd/idna")
6141 (synopsis "Internationalized domain names in applications")
6142 (description
6143 "This is a library to support the Internationalised Domain Names in
6144Applications (IDNA) protocol as specified in RFC 5891. This version of the
6145protocol is often referred to as “IDNA2008” and can produce different results
6146from the earlier standard from 2003. The library is also intended to act as a
6147suitable drop-in replacement for the “encodings.idna” module that comes with
6148the Python standard library but currently only supports the older 2003
6149specification.")
3f641af0 6150 (license license:bsd-4)))
3f00e078
RW
6151
6152(define-public python2-idna
6153 (package-with-python2 python-idna))
36ebf972
RW
6154
6155(define-public python-pretend
6156 (package
6157 (name "python-pretend")
6158 (version "1.0.8")
6159 (source
6160 (origin
6161 (method url-fetch)
6162 (uri (string-append "https://pypi.python.org/packages/source/p/"
6163 "pretend/pretend-" version ".tar.gz"))
6164 (sha256
6165 (base32
6166 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6167 (build-system python-build-system)
6168 (native-inputs
6169 `(("python-setuptools" ,python-setuptools)))
6170 (home-page "https://github.com/alex/pretend")
6171 (synopsis "Library for stubbing in Python")
6172 (description
6173 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6174technique for writing tests. You may hear the term mixed up with mocks,
6175fakes, or doubles. Basically, a stub is an object that returns pre-canned
6176responses, rather than doing any computation.")
3f641af0 6177 (license license:bsd-3)))
36ebf972
RW
6178
6179(define-public python2-pretend
6180 (package-with-python2 python-pretend))
aa759a51
RW
6181
6182(define-public python-cryptography-vectors
6183 (package
6184 (name "python-cryptography-vectors")
9c509ca9 6185 (version "1.3.4")
aa759a51
RW
6186 (source
6187 (origin
6188 (method url-fetch)
9c509ca9 6189 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6190 (sha256
6191 (base32
9c509ca9 6192 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
6193 (build-system python-build-system)
6194 (native-inputs
6195 `(("python-setuptools" ,python-setuptools)))
6196 (home-page "https://github.com/pyca/cryptography")
66e07664 6197 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6198 (description
6199 "This package contains test vectors for the cryptography package.")
6200 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6201 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6202
6203(define-public python2-cryptography-vectors
6204 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6205
6206(define-public python-cryptography
6207 (package
6208 (name "python-cryptography")
9c509ca9 6209 (version "1.3.4")
88b47cb0
RW
6210 (source
6211 (origin
6212 (method url-fetch)
9c509ca9 6213 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6214 (sha256
6215 (base32
9c509ca9 6216 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0 6217 (build-system python-build-system)
470613f9
LF
6218 (arguments
6219 `(#:phases
6220 (modify-phases %standard-phases
6221 (add-before 'check 'disable-failing-test
6222 (lambda _
6223 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6224 ;; versions of python-cryptography:
6225 ;; https://github.com/pyca/cryptography/issues/3196
6226 ;; TODO: Try re-enabling the test when upgrading
6227 ;; python-cryptography.
6228 (substitute* "tests/hazmat/backends/test_openssl.py"
6229 (("def test_numeric_string_x509_name_entry")
6230 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6231 #t)))))
88b47cb0
RW
6232 (inputs
6233 `(("openssl" ,openssl)))
6234 (propagated-inputs
6235 `(("python-cffi" ,python-cffi)
6236 ("python-six" ,python-six)
6237 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6238 ("python-idna" ,python-idna)
6239 ("python-iso8601" ,python-iso8601)))
6240 (native-inputs
6241 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6242 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6243 ("python-setuptools" ,python-setuptools)
6244 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6245 ("python-pyasn1" ,python-pyasn1)
6246 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6247 ("python-pytest" ,python-pytest)))
6248 (home-page "https://github.com/pyca/cryptography")
6249 (synopsis "Cryptographic recipes and primitives for Python")
6250 (description
6251 "cryptography is a package which provides cryptographic recipes and
6252primitives to Python developers. It aims to be the “cryptographic standard
6253library” for Python. The package includes both high level recipes, and low
6254level interfaces to common cryptographic algorithms such as symmetric ciphers,
6255message digests and key derivation functions.")
6256 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6257 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6258 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6259
6260(define-public python2-cryptography
519e2f4f
LF
6261 (let ((crypto (package-with-python2
6262 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6263 (package (inherit crypto)
6264 (propagated-inputs
6265 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6266 ("python2-backport-ssl-match-hostname"
6267 ,python2-backport-ssl-match-hostname)
68f1cdec 6268 ("python2-enum34" ,python2-enum34)
88b47cb0 6269 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6270
6271(define-public python-pyopenssl
6272 (package
6273 (name "python-pyopenssl")
2fc629dd 6274 (version "16.0.0")
5af999b8
RW
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (string-append "https://pypi.python.org/packages/source/p/"
6279 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
6280 (sha256
6281 (base32
2fc629dd 6282 "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
5af999b8 6283 (build-system python-build-system)
5af999b8
RW
6284 (propagated-inputs
6285 `(("python-cryptography" ,python-cryptography)
6286 ("python-six" ,python-six)))
6287 (inputs
6288 `(("openssl" ,openssl)))
6289 (native-inputs
6290 `(("python-setuptools" ,python-setuptools)))
6291 (home-page "https://github.com/pyca/pyopenssl")
6292 (synopsis "Python wrapper module around the OpenSSL library")
6293 (description
6294 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6295library.")
3f641af0 6296 (license license:asl2.0)))
5af999b8
RW
6297
6298(define-public python2-pyopenssl
519e2f4f 6299 (package-with-python2 python-pyopenssl))
643725a1
CR
6300
6301(define-public python-pip
6302 (package
6303 (name "python-pip")
6fb54e3b 6304 (version "8.0.2")
643725a1
CR
6305 (source
6306 (origin
6307 (method url-fetch)
6fb54e3b 6308 (uri (pypi-uri "pip" version))
643725a1
CR
6309 (sha256
6310 (base32
6fb54e3b 6311 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6312 (build-system python-build-system)
6313 (inputs
6314 `(("python-setuptools" ,python-setuptools)
6315 ("python-virtualenv" ,python-virtualenv)
6316 ;; Tests
6317 ("python-mock" ,python-mock)
6318 ("python-pytest" ,python-pytest)
6319 ("python-scripttest" ,python-scripttest)))
6320 (home-page "https://pip.pypa.io/")
6321 (synopsis
6322 "Package manager for Python software")
6323 (description
6324 "Pip is a package manager for Python software, that finds packages on the
6325Python Package Index (PyPI).")
6326 (license license:expat)))
6327
6328(define-public python2-pip
6329 (package-with-python2 python-pip))
d8c4998f
LC
6330
6331(define-public python-tlsh
6332 (package
6333 (name "python-tlsh")
99b00dc7 6334 (version "3.4.4")
d8c4998f
LC
6335 (home-page "https://github.com/trendmicro/tlsh")
6336 (source (origin
99b00dc7
EF
6337 (method url-fetch)
6338 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6339 version ".tar.gz"))
d8c4998f
LC
6340 (sha256
6341 (base32
99b00dc7
EF
6342 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6343 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6344 (build-system cmake-build-system)
6345 (arguments
6346 '(#:out-of-source? #f
6347 #:phases (modify-phases %standard-phases
6348 (replace
6349 'install
6350 (lambda* (#:key outputs #:allow-other-keys)
6351 ;; Build and install the Python bindings. The underlying
6352 ;; C++ library is apparently not meant to be installed.
6353 (let ((out (assoc-ref outputs "out")))
6354 (with-directory-excursion "py_ext"
6355 (and (system* "python" "setup.py" "build")
6356 (system* "python" "setup.py" "install"
6357 (string-append "--prefix=" out))))))))))
6358 (inputs `(("python" ,python-wrapper))) ;for the bindings
6359 (synopsis "Fuzzy matching library for Python")
6360 (description
6361 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6362Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6363value which can be used for similarity comparisons. Similar objects have
6364similar hash values, which allows for the detection of similar objects by
6365comparing their hash values. The byte stream should have a sufficient amount
6366of complexity; for example, a byte stream of identical bytes will not generate
6367a hash value.")
3f641af0 6368 (license license:asl2.0)))
d8c4998f
LC
6369
6370(define-public python2-tlsh
6371 (package
6372 (inherit python-tlsh)
6373 (name "python2-tlsh")
6374 (inputs `(("python" ,python-2)))))
d96034ed 6375
67f66812
BW
6376(define-public python-termcolor
6377 (package
6378 (name "python-termcolor")
6379 (version "1.1.0")
6380 (source
6381 (origin
6382 (method url-fetch)
6383 (uri (pypi-uri "python-termcolor" version))
6384 (sha256
6385 (base32
6386 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6387 (build-system python-build-system)
6388 (arguments
6389 ;; There are no tests.
6390 `(#:tests? #f))
6391 (home-page "http://pypi.python.org/pypi/termcolor")
6392 (synopsis "ANSII Color formatting for terminal output")
6393 (description
6394 "This package provides ANSII Color formatting for output in terminals.")
6395 (license license:expat)))
6396
6397(define-public python2-termcolor
6398 (package-with-python2 python-termcolor))
6399
d96034ed
LC
6400(define-public python-libarchive-c
6401 (package
6402 (name "python-libarchive-c")
03fd001c 6403 (version "2.2")
d96034ed
LC
6404 (source (origin
6405 (method url-fetch)
03fd001c 6406 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6407 (sha256
6408 (base32
03fd001c 6409 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6410 (build-system python-build-system)
6411 (arguments
6412 '(#:phases (modify-phases %standard-phases
6413 (add-before
6414 'build 'reference-libarchive
6415 (lambda* (#:key inputs #:allow-other-keys)
6416 ;; Retain the absolute file name of libarchive.so.
6417 (let ((libarchive (assoc-ref inputs "libarchive")))
6418 (substitute* "libarchive/ffi.py"
6419 (("find_library\\('archive'\\)")
6420 (string-append "'" libarchive
6421 "/lib/libarchive.so'"))))
6422
6423 ;; Do not make a compressed egg (see
6424 ;; <http://bugs.gnu.org/20765>).
6425 (let ((port (open-file "setup.cfg" "a")))
6426 (display "\n[easy_install]\nzip_ok = 0\n"
6427 port)
6428 (close-port port)
6429 #t))))))
6430 (inputs
6431 `(("python-setuptools" ,python-setuptools)
6432 ("libarchive" ,libarchive)))
6433 (home-page "https://github.com/Changaco/python-libarchive-c")
6434 (synopsis "Python interface to libarchive")
6435 (description
6436 "This package provides Python bindings to libarchive, a C library to
6437access possibly compressed archives in many different formats. It uses
6438Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6439 (license license:lgpl2.0+)))
d96034ed
LC
6440
6441(define-public python2-libarchive-c
6442 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6443
6444(define-public python-file
6445 (package
6446 (inherit file)
6447 (name "python-file")
6448 (build-system python-build-system)
6449 (arguments
6450 '(#:tests? #f ;no tests
6451 #:phases (modify-phases %standard-phases
6452 (add-before 'build 'change-directory
6453 (lambda _
6454 (chdir "python")
6455 #t))
6456 (add-before 'build 'set-library-file-name
6457 (lambda* (#:key inputs #:allow-other-keys)
6458 (let ((file (assoc-ref inputs "file")))
6459 (substitute* "magic.py"
6460 (("find_library\\('magic'\\)")
6461 (string-append "'" file "/lib/libmagic.so'")))
6462 #t))))))
6463 (inputs `(("file" ,file)))
6464 (self-native-input? #f)
daeeea71
CM
6465 (synopsis "Python bindings to the libmagic file type guesser. Note that
6466this module and the python-magic module both provide a \"magic.py\" file;
6467these two modules, which are different and were developed separately, both
2f87a77f
LF
6468serve the same purpose: provide Python bindings for libmagic.")
6469 (properties `((python2-variant . ,(delay python2-file))))))
5e1c9367
LC
6470
6471(define-public python2-file
2f87a77f
LF
6472 (let ((base (package-with-python2 (strip-python2-variant python-file))))
6473 (package
6474 (inherit base)
6475 (native-inputs
6476 `(("python2-setuptools" ,python2-setuptools)
6477 ,@(package-native-inputs base))))))
85d4aeac
LC
6478
6479(define-public python-debian
6480 (package
6481 (name "python-debian")
6482 (version "0.1.23")
6483 (source
6484 (origin
6485 (method url-fetch)
6486 (uri (string-append
6487 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6488 version ".tar.gz"))
6489 (sha256
6490 (base32
6491 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6492 (build-system python-build-system)
6493 (inputs
6494 `(("python-six" ,python-six)))
6495 (native-inputs
6496 `(("python-setuptools" ,python-setuptools)))
6497 (home-page "http://packages.debian.org/sid/python-debian")
6498 (synopsis "Debian package related modules")
6499 (description
5c7bdc9a
LC
6500 ;; XXX: Use @enumerate instead of @itemize to work around
6501 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6502 "This package provides Python modules that abstract many formats of
6503Debian-related files, such as:
6504
5c7bdc9a 6505@enumerate
85d4aeac
LC
6506@item Debtags information;
6507@item @file{debian/changelog} files;
6508@item packages files, pdiffs;
6509@item control files of single or multiple RFC822-style paragraphs---e.g.
6510 @file{debian/control}, @file{.changes}, @file{.dsc};
6511@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6512 contained files and meta-information.
5c7bdc9a 6513@end enumerate\n")
85d4aeac
LC
6514
6515 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6516 (license license:gpl3+)))
85d4aeac
LC
6517
6518(define-public python2-debian
6519 (package-with-python2 python-debian))
816a6538
LC
6520
6521(define-public python-chardet
6522 (package
6523 (name "python-chardet")
6524 (version "2.3.0")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (string-append
6529 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6530 version
6531 ".tar.gz"))
6532 (sha256
6533 (base32
6534 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6535 (build-system python-build-system)
6536 (native-inputs
6537 `(("python-setuptools" ,python-setuptools)))
6538 (home-page "https://github.com/chardet/chardet")
6539 (synopsis "Universal encoding detector for Python 2 and 3")
6540 (description
6541 "This package provides @code{chardet}, a Python module that can
6542automatically detect a wide range of file encodings.")
3f641af0 6543 (license license:lgpl2.1+)))
816a6538
LC
6544
6545(define-public python2-chardet
6546 (package-with-python2 python-chardet))
2fc5f186 6547
1872f1bb
KM
6548(define-public python-docopt
6549 (package
6550 (name "python-docopt")
6551 (version "0.6.2")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 ;; The release on PyPI does not include tests.
6556 (uri (string-append
6557 "https://github.com/docopt/docopt/archive/"
6558 version ".tar.gz"))
6559 (file-name (string-append name "-" version ".tar.gz"))
6560 (sha256
6561 (base32
6562 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6563 (build-system python-build-system)
6564 (native-inputs
6565 `(("python-pytest" ,python-pytest)
6566 ("python-setuptools" ,python-setuptools)))
6567 (arguments
6568 `(#:phases (alist-replace
6569 'check
6570 (lambda _ (zero? (system* "py.test")))
6571 %standard-phases)))
6572 (home-page "http://docopt.org")
6573 (synopsis "Command-line interface description language for Python")
6574 (description "This library allows the user to define a command-line
6575interface from a program's help message rather than specifying it
6576programatically with command-line parsers like @code{getopt} and
6577@code{argparse}.")
6578 (license license:expat)))
6579
6580(define-public python2-docopt
6581 (package-with-python2 python-docopt))
6582
2fc5f186
LF
6583(define-public python-zope-event
6584 (package
6585 (name "python-zope-event")
6586 (version "4.1.0")
6587 (source
6588 (origin
6589 (method url-fetch)
6590 (uri (string-append "https://pypi.python.org/packages/source/z"
6591 "/zope.event/zope.event-" version ".tar.gz"))
6592 (sha256
6593 (base32
6594 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6595 (build-system python-build-system)
6596 (inputs
6597 `(("python-setuptools" ,python-setuptools)))
6598 (home-page "http://pypi.python.org/pypi/zope.event")
6599 (synopsis "Event publishing system for Python")
6600 (description "Zope.event provides an event publishing API, intended for
6601use by applications which are unaware of any subscribers to their events. It
6602is a simple event-dispatching system on which more sophisticated event
6603dispatching systems can be built.")
3f641af0 6604 (license license:zpl2.1)))
2fc5f186
LF
6605
6606(define-public python2-zope-event
6607 (package-with-python2 python-zope-event))
97abe268
LF
6608
6609(define-public python-zope-interface
6610 (package
6611 (name "python-zope-interface")
6612 (version "4.1.3")
6613 (source
6614 (origin
6615 (method url-fetch)
6616 (uri (string-append "https://pypi.python.org/packages/source/z"
6617 "/zope.interface/zope.interface-" version ".tar.gz"))
6618 (sha256
6619 (base32
6620 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6621 (build-system python-build-system)
6622 (propagated-inputs
6623 `(("python-zope-event" ,python-zope-event)))
6624 (home-page "https://github.com/zopefoundation/zope.interface")
6625 (synopsis "Python implementation of the \"design by contract\"
6626methodology")
6627 (description "Zope.interface provides an implementation of \"object
6628interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6629conforming to a given API or contract.")
3f641af0 6630 (license license:zpl2.1)))
97abe268
LF
6631
6632(define-public python2-zope-interface
6633 (package-with-python2 python-zope-interface))
81f2373c
LF
6634
6635(define-public python-zope-exceptions
6636 (package
6637 (name "python-zope-exceptions")
6638 (version "4.0.8")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (string-append "https://pypi.python.org/packages/source/z"
6643 "/zope.exceptions/zope.exceptions-"
6644 version ".tar.gz"))
6645 (sha256
6646 (base32
6647 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6648 (build-system python-build-system)
6649 (arguments
6650 '(#:tests? #f)) ; circular dependency with zope.testrunner
6651 (propagated-inputs
6652 `(("python-zope-interface" ,python-zope-interface)))
6653 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6654 (synopsis "Zope exceptions")
6655 (description "Zope.exceptions provides general-purpose exception types
6656that have uses outside of the Zope framework.")
3f641af0 6657 (license license:zpl2.1)))
81f2373c
LF
6658
6659(define-public python2-zope-exceptions
6660 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6661
6662(define-public python-zope-testing
6663 (package
6664 (name "python-zope-testing")
6665 (version "4.5.0")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (string-append "https://pypi.python.org/packages/source/z"
6670 "/zope.testing/zope.testing-" version ".tar.gz"))
6671 (sha256
6672 (base32
6673 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6674 (build-system python-build-system)
6675 (native-inputs
6676 `(("python-zope-exceptions" ,python-zope-exceptions)))
6677 (propagated-inputs
6678 `(("python-zope-interface" ,python-zope-interface)))
6679 (home-page "http://pypi.python.org/pypi/zope.testing")
6680 (synopsis "Zope testing helpers")
6681 (description "Zope.testing provides a number of testing utilities for HTML
6682forms, HTTP servers, regular expressions, and more.")
3f641af0 6683 (license license:zpl2.1)))
900e3c0e
LF
6684
6685(define-public python2-zope-testing
6686 (package-with-python2 python-zope-testing))
01614c4f
LF
6687
6688(define-public python-zope-testrunner
6689 (package
6690 (name "python-zope-testrunner")
6691 (version "4.4.9")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (string-append "https://pypi.python.org/packages/source/z"
6696 "/zope.testrunner/zope.testrunner-"
6697 version ".zip"))
6698 (sha256
6699 (base32
6700 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6701 (build-system python-build-system)
6702 (native-inputs
6703 `(("python-six" ,python-six)
6704 ("python-zope-exceptions" ,python-zope-exceptions)
6705 ("python-zope-testing" ,python-zope-testing)
6706 ("unzip" ,unzip)))
6707 (propagated-inputs
6708 `(("python-zope-interface" ,python-zope-interface)))
6709 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6710 (synopsis "Zope testrunner script")
6711 (description "Zope.testrunner provides a script for running Python
6712tests.")
3f641af0 6713 (license license:zpl2.1)))
01614c4f
LF
6714
6715(define-public python2-zope-testrunner
6716 (let ((base (package-with-python2 python-zope-testrunner)))
6717 (package
6718 (inherit base)
6719 (native-inputs
6720 (append (package-native-inputs base)
6721 `(("python2-subunit" ,python2-subunit)
6722 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6723
6724(define-public python-zope-i18nmessageid
6725 (package
6726 (name "python-zope-i18nmessageid")
6727 (version "4.0.3")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (string-append
6732 "https://pypi.python.org/packages/source/z"
6733 "/zope.i18nmessageid/zope.i18nmessageid-"
6734 version ".tar.gz"))
6735 (sha256
6736 (base32
6737 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6738 (build-system python-build-system)
6739 (inputs
6740 `(("python-setuptools" ,python-setuptools)))
6741 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6742 (synopsis "Message identifiers for internationalization")
6743 (description "Zope.i18nmessageid provides facilities for declaring
6744internationalized messages within program source text.")
3f641af0 6745 (license license:zpl2.1)))
6a5c710c
LF
6746
6747(define-public python2-zope-i18nmessageid
6748 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6749
6750(define-public python-zope-schema
6751 (package
6752 (name "python-zope-schema")
6753 (version "4.4.2")
6754 (source
6755 (origin
6756 (method url-fetch)
6757 (uri (string-append "https://pypi.python.org/packages/source/z"
6758 "/zope.schema/zope.schema-" version ".tar.gz"))
6759 (sha256
6760 (base32
6761 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6762 (build-system python-build-system)
6763 (propagated-inputs
6764 `(("python-zope-event" ,python-zope-event)
6765 ("python-zope-interface" ,python-zope-interface)))
6766 (native-inputs
6767 `(("python-zope-testing" ,python-zope-testing)))
6768 (home-page "http://pypi.python.org/pypi/zope.schema")
6769 (synopsis "Zope data schemas")
6770 (description "Zope.scheme provides extensions to zope.interface for
6771defining data schemas.")
3f641af0 6772 (license license:zpl2.1)))
71fb09f3
LF
6773
6774(define-public python2-zope-schema
6775 (package-with-python2 python-zope-schema))
fbac9b17
LF
6776
6777(define-public python-zope-configuration
6778 (package
6779 (name "python-zope-configuration")
6780 (version "4.0.3")
6781 (source (origin
6782 (method url-fetch)
6783 (uri (string-append "https://pypi.python.org/packages/source/z"
6784 "/zope.configuration/zope.configuration-"
6785 version ".tar.gz"))
6786 (sha256
6787 (base32
6788 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6789 (build-system python-build-system)
6790 (propagated-inputs
6791 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6792 ("python-zope-schema" ,python-zope-schema)))
6793 (home-page "http://pypi.python.org/pypi/zope.configuration")
6794 (synopsis "Zope Configuration Markup Language")
6795 (description "Zope.configuration implements ZCML, the Zope Configuration
6796Markup Language.")
3f641af0 6797 (license license:zpl2.1)))
fbac9b17
LF
6798
6799(define-public python2-zope-configuration
6800 (package-with-python2 python-zope-configuration))
2ad52086
LF
6801
6802(define-public python-zope-proxy
6803 (package
6804 (name "python-zope-proxy")
6805 (version "4.1.6")
6806 (source
6807 (origin
6808 (method url-fetch)
6809 (uri (string-append "https://pypi.python.org/packages/source/z"
6810 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6811 (sha256
6812 (base32
6813 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6814 (build-system python-build-system)
6815 (propagated-inputs
6816 `(("python-zope-interface" ,python-zope-interface)))
6817 (home-page "http://pypi.python.org/pypi/zope.proxy")
6818 (synopsis "Generic, transparent proxies")
6819 (description "Zope.proxy provides generic, transparent proxies for Python.
6820Proxies are special objects which serve as mostly-transparent wrappers around
6821another object, intervening in the apparent behavior of the wrapped object
6822only when necessary to apply the policy (e.g., access checking, location
6823brokering, etc.) for which the proxy is responsible.")
3f641af0 6824 (license license:zpl2.1)))
2ad52086
LF
6825
6826(define-public python2-zope-proxy
6827 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6828
6829(define-public python-zope-location
6830 (package
6831 (name "python-zope-location")
6832 (version "4.0.3")
6833 (source
6834 (origin
6835 (method url-fetch)
6836 (uri (string-append "https://pypi.python.org/packages/source/z"
6837 "/zope.location/zope.location-" version ".tar.gz"))
6838 (sha256
6839 (base32
6840 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6841 (build-system python-build-system)
6842 (native-inputs
6843 `(("python-zope-proxy" ,python-zope-proxy)
6844 ("python-zope-schema" ,python-zope-schema)))
6845 (home-page "http://pypi.python.org/pypi/zope.location/")
6846 (synopsis "Zope location library")
6847 (description "Zope.location implements the concept of \"locations\" in
6848Zope3, which are are special objects that have a structural location.")
3f641af0 6849 (license license:zpl2.1)))
f404b5ea
LF
6850
6851(define-public python2-zope-location
6852 (package-with-python2 python-zope-location))
d4b77f36
LF
6853
6854(define-public python-zope-security
6855 (package
6856 (name "python-zope-security")
6857 (version "4.0.3")
6858 (source
6859 (origin
6860 (method url-fetch)
6861 (uri (string-append "https://pypi.python.org/packages/source/z"
6862 "/zope.security/zope.security-" version ".tar.gz"))
6863 (sha256
6864 (base32
6865 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6866 (build-system python-build-system)
6867 (propagated-inputs
6868 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6869 ("python-zope-component" ,python-zope-component)
6870 ("python-zope-location" ,python-zope-location)
6871 ("python-zope-proxy" ,python-zope-proxy)
6872 ("python-zope-schema" ,python-zope-schema)
6873 ("python-zope-testrunner" ,python-zope-testrunner)
6874 ("python-zope-testing" ,python-zope-testing)))
6875 (home-page "http://pypi.python.org/pypi/zope.security")
6876 (synopsis "Zope security framework")
6877 (description "Zope.security provides a generic mechanism to implement
6878security policies on Python objects.")
3f641af0 6879 (license license:zpl2.1)))
d4b77f36
LF
6880
6881(define-public python2-zope-security
04417662
EF
6882 (let ((zope-security (package-with-python2 python-zope-security)))
6883 (package (inherit zope-security)
6884 (propagated-inputs
6885 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6886 ,@(alist-delete
6887 "python-zope-testrunner"
6888 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6889
6890(define-public python-zope-component
6891 (package
6892 (name "python-zope-component")
6893 (version "4.2.2")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (string-append "https://pypi.python.org/packages/source/z"
6898 "/zope.component/zope.component-" version ".tar.gz"))
6899 (sha256
6900 (base32
6901 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6902 (build-system python-build-system)
6903 (arguments
6904 ;; Skip tests due to circular dependency with python-zope-security.
6905 '(#:tests? #f))
6906 (native-inputs
6907 `(("python-zope-testing" ,python-zope-testing)))
6908 (propagated-inputs
6909 `(("python-zope-event" ,python-zope-event)
6910 ("python-zope-interface" ,python-zope-interface)
6911 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6912 ("python-zope-configuration" ,python-zope-configuration)))
6913 (home-page "https://github.com/zopefoundation/zope.component")
6914 (synopsis "Zope Component Architecture")
6915 (description "Zope.component represents the core of the Zope Component
6916Architecture. Together with the zope.interface package, it provides
6917facilities for defining, registering and looking up components.")
3f641af0 6918 (license license:zpl2.1)))
a6b61b27
LF
6919
6920(define-public python2-zope-component
6921 (package-with-python2 python-zope-component))
3859ac12 6922
1ae44b80 6923(define-public python-pythondialog
b5f218be 6924 (package
1ae44b80 6925 (name "python-pythondialog")
42c4b246 6926 (version "3.4.0")
b5f218be
LF
6927 (source
6928 (origin
6929 (method url-fetch)
1ae44b80 6930 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
6931 (sha256
6932 (base32
1ae44b80 6933 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
6934 (build-system python-build-system)
6935 (arguments
6936 `(#:phases
6937 (modify-phases %standard-phases
6938 (add-after 'unpack 'patch-path
6939 (lambda* (#:key inputs #:allow-other-keys)
6940 (let* ((dialog (assoc-ref inputs "dialog")))
6941 ;; Since this library really wants to grovel the search path, we
6942 ;; must hardcode dialog's store path into it.
6943 (substitute* "dialog.py"
6944 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6945 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6946 #t))))
b5f218be
LF
6947 #:tests? #f)) ; no test suite
6948 (propagated-inputs
6949 `(("dialog" ,dialog)))
6950 (home-page "http://pythondialog.sourceforge.net/")
6951 (synopsis "Python interface to the UNIX dialog utility")
6952 (description "A Python wrapper for the dialog utility. Its purpose is to
6953provide an easy to use, pythonic and comprehensive Python interface to dialog.
6954This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 6955 (license license:lgpl2.1)
1ae44b80
LF
6956 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6957
6958(define-public python2-pythondialog
6959 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6960 (package
6961 (inherit base)
6962 (version (package-version python-pythondialog))
6963 (source (origin
6964 (method url-fetch)
6965 (uri (pypi-uri "python2-pythondialog" version))
6966 (sha256
6967 (base32
6968 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 6969
3859ac12
LF
6970(define-public python-pyrfc3339
6971 (package
6972 (name "python-pyrfc3339")
d9aa097b 6973 (version "1.0")
3859ac12
LF
6974 (source
6975 (origin
6976 (method url-fetch)
d9aa097b 6977 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6978 (sha256
6979 (base32
d9aa097b 6980 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6981 (build-system python-build-system)
6982 (propagated-inputs
6983 `(("python-pytz" ,python-pytz)))
6984 (native-inputs
6985 `(("python-nose" ,python-nose)
6986 ("python-setuptools" ,python-setuptools)))
6987 (home-page "https://github.com/kurtraschke/pyRFC3339")
6988 (synopsis "Python timestamp library")
6989 (description "Python library for generating and parsing RFC 3339-compliant
6990timestamps.")
6991 (license license:expat)))
6992
6993(define-public python2-pyrfc3339
6994 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6995
6996(define-public python-werkzeug
6997 (package
6998 (name "python-werkzeug")
4b47cbfa 6999 (version "0.11.5")
5eea2005
LF
7000 (source
7001 (origin
7002 (method url-fetch)
4b47cbfa 7003 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7004 (sha256
7005 (base32
4b47cbfa 7006 "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
5eea2005
LF
7007 (build-system python-build-system)
7008 (native-inputs
7009 `(("python-pytest" ,python-pytest)))
7010 (home-page "http://werkzeug.pocoo.org/")
7011 (synopsis "Utilities for WSGI applications")
7012 (description "One of the most advanced WSGI utility modules. It includes a
7013powerful debugger, full-featured request and response objects, HTTP utilities to
7014handle entity tags, cache control headers, HTTP dates, cookie handling, file
7015uploads, a powerful URL routing system and a bunch of community-contributed
7016addon modules.")
3f641af0 7017 (license license:x11)))
5eea2005
LF
7018
7019(define-public python2-werkzeug
7020 (package-with-python2 python-werkzeug))
99fffa8a
LF
7021
7022(define-public python-configobj
7023 (package
7024 (name "python-configobj")
7025 (version "5.0.6")
7026 (source (origin
7027 (method url-fetch)
7028 (uri (string-append
7029 "https://pypi.python.org/packages/source/c/configobj/"
7030 "configobj-" version ".tar.gz"))
7031 (sha256
7032 (base32
7033 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7034 ;; Patch setup.py so it looks for python-setuptools, which is
7035 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7036 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7037 (build-system python-build-system)
7038 (native-inputs
7039 `(("python-setuptools" ,python-setuptools)
7040 ("python-six" ,python-six)))
7041 (synopsis "Config file reading, writing and validation")
7042 (description "ConfigObj is a simple but powerful config file reader and
7043writer: an ini file round tripper. Its main feature is that it is very easy to
7044use, with a straightforward programmer’s interface and a simple syntax for
7045config files.")
7046 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7047 (license license:bsd-3)))
99fffa8a
LF
7048
7049(define-public python2-configobj
7050 (package-with-python2 python-configobj))
79e8a291
LF
7051
7052(define-public python-configargparse
7053 (package
7054 (name "python-configargparse")
7055 (version "0.10.0")
7056 (source (origin
7057 (method url-fetch)
7058 (uri (string-append
7059 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7060 "ConfigArgParse-" version ".tar.gz"))
7061 (sha256
7062 (base32
7063 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7064 (build-system python-build-system)
7065 (arguments
7066 ;; FIXME: Bug in test suite filed upstream:
7067 ;; https://github.com/bw2/ConfigArgParse/issues/32
7068 '(#:tests? #f))
7069 (synopsis "Replacement for argparse")
7070 (description "A drop-in replacement for argparse that allows options to also
7071be set via config files and/or environment variables.")
7072 (home-page "https://github.com/bw2/ConfigArgParse")
7073 (license license:expat)))
7074
7075(define-public python2-configargparse
7076 (package-with-python2 python-configargparse))
ab41f979
LF
7077
7078(define-public python-ndg-httpsclient
7079 (package
7080 (name "python-ndg-httpsclient")
7081 (version "0.4.0")
7082 (source (origin
7083 (method url-fetch)
7084 (uri (string-append
7085 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7086 "ndg_httpsclient-" version ".tar.gz"))
7087 (sha256
7088 (base32
7089 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7090 (build-system python-build-system)
7091 (propagated-inputs
7092 `(("python-pyopenssl" ,python-pyopenssl)))
7093 (synopsis "HTTPS support for Python's httplib and urllib2")
7094 (description "This is a HTTPS client implementation for httplib and urllib2
7095based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7096over the default provided with Python and importantly enables full verification
7097of the SSL peer.")
7098 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7099 (license license:bsd-3)))
ab41f979
LF
7100
7101;; python2-openssl requires special care, so package-with-python2 is
7102;; insufficient.
7103(define-public python2-ndg-httpsclient
7104 (package (inherit python-ndg-httpsclient)
7105 (name "python2-ndg-httpsclient")
7106 (arguments `(#:python ,python-2))
7107 (propagated-inputs
7108 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7109
7110(define-public python-contextlib2
7111 (package
7112 (name "python-contextlib2")
7113 (version "0.4.0")
7114 (source
7115 (origin
7116 (method url-fetch)
7117 (uri (pypi-uri "contextlib2" version))
7118 (sha256
7119 (base32
7120 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7121 (build-system python-build-system)
7122 (arguments
7123 `(#:phases
7124 (modify-phases %standard-phases
7125 (replace 'check
7126 (lambda _ (zero?
7127 (system*
b3546174 7128 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7129 (home-page "http://contextlib2.readthedocs.org/")
7130 (synopsis "Tools for decorators and context managers")
7131 (description "This module is primarily a backport of the Python
71323.2 contextlib to earlier Python versions. Like contextlib, it
7133provides utilities for common tasks involving decorators and context
7134managers. It also contains additional features that are not part of
7135the standard library.")
3f641af0 7136 (license license:psfl)))
03f964a5
CM
7137
7138(define-public python2-contextlib2
7139 (package-with-python2 python-contextlib2))
210bf497
DT
7140
7141(define-public python-texttable
7142 (package
7143 (name "python-texttable")
7144 (version "0.8.4")
7145 (source
7146 (origin
7147 (method url-fetch)
7148 (uri (pypi-uri "texttable" version))
7149 (sha256
7150 (base32
7151 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7152 (build-system python-build-system)
7153 (arguments '(#:tests? #f)) ; no tests
7154 (home-page "https://github.com/foutaise/texttable/")
7155 (synopsis "Python module for creating simple ASCII tables")
7156 (description "Texttable is a Python module for creating simple ASCII
7157tables.")
3f641af0 7158 (license license:lgpl2.1+)))
210bf497
DT
7159
7160(define-public python2-texttable
7161 (package-with-python2 python-texttable))
67c52bb3
DT
7162
7163(define-public python-websocket-client
7164 (package
7165 (name "python-websocket-client")
6b810897 7166 (version "0.37.0")
67c52bb3
DT
7167 (source
7168 (origin
7169 (method url-fetch)
6b810897 7170 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7171 (sha256
7172 (base32
6b810897 7173 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7174 (build-system python-build-system)
7175 (native-inputs
7176 `(("python-six" ,python-six))) ; for tests
7177 (inputs
7178 `(("python-setuptools" ,python-setuptools)))
7179 (home-page "https://github.com/liris/websocket-client")
7180 (synopsis "WebSocket client for Python")
7181 (description "The Websocket-client module provides the low level APIs for
7182WebSocket usage in Python programs.")
3f641af0 7183 (license license:lgpl2.1+)))
67c52bb3
DT
7184
7185(define-public python2-websocket-client
7186 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7187
7188(define-public python-atomicwrites
7189 (package
7190 (name "python-atomicwrites")
4e92d76a 7191 (version "1.1.0")
5c6eea2a
LF
7192 (source (origin
7193 (method url-fetch)
7194 (uri (pypi-uri "atomicwrites" version))
7195 (sha256
7196 (base32
4e92d76a 7197 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7198 (build-system python-build-system)
7199 (synopsis "Atomic file writes in Python")
7200 (description "Library for atomic file writes using platform dependent tools
8f65585b 7201for atomic file system operations.")
5c6eea2a 7202 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7203 (license license:expat)
7204 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7205
7206(define-public python2-atomicwrites
7207 (package (inherit (package-with-python2
7208 (strip-python2-variant python-atomicwrites)))
7209 (native-inputs
7210 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7211
7212(define-public python-requests-toolbelt
7213 (package
7214 (name "python-requests-toolbelt")
c02af1c8 7215 (version "0.6.2")
561bb3cb
LF
7216 (source (origin
7217 (method url-fetch)
c02af1c8
LF
7218 (uri (string-append
7219 "https://pypi.python.org/packages/"
7220 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7221 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7222 (sha256
7223 (base32
c02af1c8 7224 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
7225 (build-system python-build-system)
7226 (propagated-inputs
7227 `(("python-requests" ,python-requests)))
7228 (synopsis "Extensions to python-requests")
7229 (description "This is a toolbelt of useful classes and functions to be used
7230with python-requests.")
7231 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7232 (license license:asl2.0)))
d1deb90b
LF
7233
7234(define-public python-click-threading
7235 (package
7236 (name "python-click-threading")
3d2e0dbc 7237 (version "0.2.0")
d1deb90b
LF
7238 (source (origin
7239 (method url-fetch)
3d2e0dbc
LF
7240 (uri (string-append
7241 "https://pypi.python.org/packages/"
7242 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7243 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7244 (sha256
7245 (base32
3d2e0dbc 7246 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7247 (build-system python-build-system)
7248 (propagated-inputs
7249 `(("python-click" ,python-click)))
7250 (synopsis "Utilities for multithreading in Click")
7251 (description "This package provides utilities for multithreading in Click
7252applications.")
7253 (home-page "https://github.com/click-contrib/click-threading")
7254 (license license:expat)))
7b17cab9
LF
7255
7256(define-public python-click-log
7257 (package
7258 (name "python-click-log")
a9da8fec 7259 (version "0.1.3")
7b17cab9
LF
7260 (source (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "click-log" version))
7263 (sha256
7264 (base32
a9da8fec 7265 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7266 (build-system python-build-system)
7267 (propagated-inputs
7268 `(("python-click" ,python-click)))
7269 (synopsis "Logging for click applications")
7270 (description "This package provides a Python library for logging Click
7271applications.")
7272 (home-page "https://github.com/click-contrib/click-log")
7273 (license license:expat)))
7b3a4ee4
LF
7274
7275(define-public python-apipkg
7276 (package
7277 (name "python-apipkg")
7278 (version "1.4")
7279 (source (origin
7280 (method url-fetch)
7281 (uri (pypi-uri "apipkg" version))
7282 (sha256
7283 (base32
7284 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7285 (build-system python-build-system)
b43bab3c 7286 (inputs
7b3a4ee4
LF
7287 `(("python-pytest" ,python-pytest)))
7288 (synopsis "Namespace control and lazy-import mechanism")
7289 (description "With apipkg you can control the exported namespace of a Python
7290package and greatly reduce the number of imports for your users. It is a small
7291pure Python module that works on virtually all Python versions.")
7292 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7293 (license license:expat)
7294 (properties `((python2-variant . ,(delay python2-apipkg))))))
7295
7296(define-public python2-apipkg
7297 (package
7298 (inherit (package-with-python2
7299 (strip-python2-variant python-apipkg)))
7300 (native-inputs
7301 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7302
7303(define-public python-execnet
7304 (package
7305 (name "python-execnet")
7306 (version "1.4.1")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "execnet" version))
7310 (sha256
7311 (base32
7312 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7313 (build-system python-build-system)
7314 (native-inputs
7315 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7316 (inputs
848964fe
LF
7317 `(("python-apipkg" ,python-apipkg)))
7318 (synopsis "Rapid multi-Python deployment")
7319 (description "Execnet provides a share-nothing model with
7320channel-send/receive communication for distributing execution across many
7321Python interpreters across version, platform and network barriers. It has a
7322minimal and fast API targetting the following uses:
7323@enumerate
7324@item distribute tasks to (many) local or remote CPUs
7325@item write and deploy hybrid multi-process applications
7326@item write scripts to administer multiple environments
7327@end enumerate")
7328 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7329 (license license:expat)
7330 (properties `((python2-variant . ,(delay python2-execnet))))))
7331
7332(define-public python2-execnet
7333 (let ((execnet (package-with-python2
7334 (strip-python2-variant python-execnet))))
7335 (package
7336 (inherit execnet)
7337 (native-inputs
7338 `(("python2-setuptools" ,python2-setuptools)
7339 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7340
7341;;; The software provided by this package was integrated into pytest 2.8.
7342(define-public python-pytest-cache
7343 (package
7344 (name "python-pytest-cache")
7345 (version "1.0")
7346 (source (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "pytest-cache" version))
7349 (sha256
7350 (base32
7351 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7352 (build-system python-build-system)
630d938f
EF
7353 (inputs
7354 `(("python-apipkg" ,python-apipkg)
7355 ("python-execnet" ,python-execnet)
7356 ("python-py" ,python-py)
7357 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7358 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7359 (description "The pytest-cache plugin provides tools to rerun failures from
7360the last py.test invocation.")
7361 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7362 (license license:expat)
7363 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7364
7365(define-public python2-pytest-cache
7366 (let ((pytest-cache (package-with-python2
7367 (strip-python2-variant python-pytest-cache))))
7368 (package
7369 (inherit pytest-cache)
7370 (native-inputs
7371 `(("python2-setuptools" ,python2-setuptools)
7372 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7373
7374(define-public python-pytest-localserver
7375 (package
7376 (name "python-pytest-localserver")
29f20168 7377 (version "0.3.5")
d7e729fe
LF
7378 (source (origin
7379 (method url-fetch)
29f20168 7380 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7381 (sha256
7382 (base32
29f20168 7383 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7384 (build-system python-build-system)
7385 (arguments
7386 `(#:phases (modify-phases %standard-phases
7387 (replace 'check
7388 (lambda _
7389 (zero? (system* "py.test" "--genscript=runtests.py"))
7390 (zero? (system* "py.test")))))))
7391 (native-inputs
d7e729fe
LF
7392 `(("python-pytest" ,python-pytest)
7393 ("python-requests" ,python-requests)
9ba40f05
EF
7394 ("python-six" ,python-six)))
7395 (inputs
7396 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7397 (synopsis "Py.test plugin to test server connections locally")
7398 (description "Pytest-localserver is a plugin for the pytest testing
7399framework which enables you to test server connections locally.")
7400 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7401 (license license:expat)))
28cecbb7
LF
7402
7403(define-public python-wsgi-intercept
7404 (package
7405 (name "python-wsgi-intercept")
909fbd2b 7406 (version "1.2.2")
28cecbb7
LF
7407 (source (origin
7408 (method url-fetch)
909fbd2b
LF
7409 (uri (string-append
7410 "https://pypi.python.org/packages/"
7411 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7412 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7413 (sha256
7414 (base32
909fbd2b 7415 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7416 (build-system python-build-system)
7417 (native-inputs
9d813ec1
EF
7418 `(("python-pytest" ,python-pytest)
7419 ("python-six" ,python-six)))
28cecbb7
LF
7420 (propagated-inputs
7421 `(("python-httplib2" ,python-httplib2)
7422 ("python-requests" ,python-requests)))
7423 (synopsis "Puts a WSGI application in place of a real URI for testing")
7424 (description "Wsgi_intercept installs a WSGI application in place of a real
7425URI for testing. Testing a WSGI application normally involves starting a
7426server at a local host and port, then pointing your test code to that address.
7427Instead, this library lets you intercept calls to any specific host/port
7428combination and redirect them into a WSGI application importable by your test
7429program. Thus, you can avoid spawning multiple processes or threads to test
7430your Web app.")
7431 (home-page "https://github.com/cdent/wsgi-intercept")
7432 (license license:expat)))
89b8a551
LF
7433
7434(define-public python-pytest-xprocess
7435 (package
7436 (name "python-pytest-xprocess")
7437 (version "0.9.1")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "pytest-xprocess" version))
7441 (sha256
7442 (base32
7443 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7444 (build-system python-build-system)
7445 (propagated-inputs
7446 `(("python-pytest" ,python-pytest)
7447 ("python-pytest-cache" ,python-pytest-cache)
7448 ("python-psutil" ,python-psutil)))
7449 (synopsis "Pytest plugin to manage external processes across test runs")
7450 (description "Pytest-xprocess is an experimental py.test plugin for managing
7451processes across test runs.")
7452 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7453 (license license:expat)))
5c299bf0
LF
7454
7455(define-public python-icalendar
7456 (package
7457 (name "python-icalendar")
f2f53353 7458 (version "3.10")
5c299bf0
LF
7459 (source (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "icalendar" version))
7462 (sha256
7463 (base32
f2f53353 7464 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7465 (build-system python-build-system)
7466 (propagated-inputs
7467 `(("python-dateutil-2" ,python-dateutil-2)
7468 ("python-pytz" ,python-pytz)))
7469 (synopsis "Python library for parsing iCalendar files")
7470 (description "The icalendar package is a parser/generator of iCalendar
7471files for use with Python.")
7472 (home-page "https://github.com/collective/icalendar")
3f641af0 7473 (license license:bsd-2)))
6bbbb53e
LF
7474
7475(define-public python-sphinxcontrib-newsfeed
7476 (package
7477 (name "python-sphinxcontrib-newsfeed")
7478 (version "0.1.4")
7479 (source (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7482 (sha256
7483 (base32
7484 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7485 (build-system python-build-system)
7486 (propagated-inputs
7487 `(("python-docutils" ,python-docutils)
7488 ("python-sphinx" ,python-sphinx)))
7489 (synopsis "News Feed extension for Sphinx")
7490 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7491Blog, News or Announcements section to a Sphinx website.")
7492 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7493 (license license:bsd-2)))
2216e15c
SB
7494
7495(define-public python-args
7496 (package
7497 (name "python-args")
7498 (version "0.1.0")
7499 (source (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "args" version))
7502 (sha256
7503 (base32
7504 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7505 (build-system python-build-system)
7506 (inputs
7507 `(("python-setuptools" ,python-setuptools)))
7508 (home-page "https://github.com/kennethreitz/args")
7509 (synopsis "Command-line argument parser")
7510 (description
7511 "This library provides a Python module to parse command-line arguments.")
3f641af0 7512 (license license:bsd-3)))
2216e15c
SB
7513
7514(define-public python2-args
7515 (package-with-python2 python-args))
c06a3de9
SB
7516
7517(define-public python-clint
7518 (package
7519 (name "python-clint")
7520 (version "0.5.1")
7521 (source (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "clint" version))
7524 (sha256
7525 (base32
7526 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7527 (build-system python-build-system)
7528 (inputs
7529 `(("python-args" ,python-args)
7530 ("python-setuptools" ,python-setuptools)))
7531 (home-page "https://github.com/kennethreitz/clint")
7532 (synopsis "Command-line interface tools")
7533 (description
7534 "Clint is a Python module filled with a set of tools for developing
7535command-line applications, including tools for colored and indented
7536output, progress bar display, and pipes.")
3f641af0 7537 (license license:isc)))
c06a3de9
SB
7538
7539(define-public python2-clint
7540 (package-with-python2 python-clint))
4ecdeef8
SB
7541
7542(define-public python-astor
7543 (package
7544 (name "python-astor")
7545 (version "0.5")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "astor" version))
7549 (sha256
7550 (base32
7551 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7552 (build-system python-build-system)
7553 (inputs
7554 `(("python-setuptools" ,python-setuptools)))
7555 (home-page "https://github.com/berkerpeksag/astor")
7556 (synopsis "Read and write Python ASTs")
7557 (description
7558 "Astor is designed to allow easy manipulation of Python source via the
7559Abstract Syntax Tree.")
3f641af0 7560 (license license:bsd-3)))
4ecdeef8
SB
7561
7562(define-public python2-astor
7563 (package-with-python2 python-astor))
e224b7d0
SB
7564
7565(define-public python-rply
7566 (package
7567 (name "python-rply")
7568 (version "0.7.4")
7569 (source (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "rply" version))
7572 (sha256
7573 (base32
7574 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7575 (build-system python-build-system)
7576 (inputs
7577 `(("python-appdirs" ,python-appdirs)
7578 ("python-setuptools" ,python-setuptools)))
7579 (home-page "https://github.com/alex/rply")
7580 (synopsis "Parser generator for Python")
7581 (description
7582 "This package provides a pure Python based parser generator, that also
7583works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7584with a new public API, and RPython support.")
3f641af0 7585 (license license:bsd-3)))
e224b7d0
SB
7586
7587(define-public python2-rply
7588 (package-with-python2 python-rply))
c3e919d7
SB
7589
7590(define-public python-hy
7591 (package
7592 (name "python-hy")
7593 (version "0.11.1")
7594 (source (origin
7595 (method url-fetch)
7596 (uri (pypi-uri "hy" version))
7597 (sha256
7598 (base32
7599 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7600 (build-system python-build-system)
7601 (inputs
7602 `(("python-astor" ,python-astor)
7603 ("python-clint" ,python-clint)
7604 ("python-rply" ,python-rply)
7605 ("python-setuptools" ,python-setuptools)))
7606 (home-page "http://hylang.org/")
7607 (synopsis "Lisp frontend to Python")
7608 (description
7609 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7610its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7611Python at your fingertips, in Lisp form.")
7612 (license license:expat)))
7613
7614(define-public python2-hy
7615 (package-with-python2 python-hy))
7a5b944e 7616
81f7f297
EF
7617(define-public python-rauth
7618 (package
7619 (name "python-rauth")
7620 (version "0.7.2")
7621 (source
7622 (origin
7623 (method url-fetch)
7624 (uri (pypi-uri "rauth" version))
7625 (sha256
7626 (base32
7627 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7628 (build-system python-build-system)
7629 (arguments
7630 `(#:test-target "check"))
0848d8d3 7631 (inputs
81f7f297
EF
7632 `(("python-requests" ,python-requests)))
7633 (home-page "https://github.com/litl/rauth")
7634 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7635 (description
7636 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7637provides service wrappers for convenient connection initialization and
7638authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7639 (license license:expat)
7640 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7641
7642(define-public python2-rauth
0848d8d3
EF
7643 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7644 (package
7645 (inherit base)
7646 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7647 ("python2-unittest2" ,python2-unittest2)
7648 ,@(package-native-inputs base))))))
81f7f297 7649
1abe448d
EF
7650(define-public python2-functools32
7651 (package
7652 (name "python2-functools32")
7653 (version "3.2.3-2")
7654 (source
7655 (origin
7656 (method url-fetch)
7657 (uri (pypi-uri "functools32" version))
7658 (sha256
7659 (base32
7660 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7661 (build-system python-build-system)
7662 (arguments
7663 `(#:python ,python-2
7664 #:tests? #f)) ; no test target
7665 (native-inputs
7666 `(("python2-setuptools" ,python2-setuptools)))
7667 (home-page "https://github.com/MiCHiLU/python-functools32")
7668 (synopsis
7669 "Backport of the functools module from Python 3.2.3")
7670 (description
7671 "This package is a backport of the @code{functools} module from Python
76723.2.3 for use with older versions of Python and PyPy.")
7673 (license license:expat)))
7674
877889f3 7675(define-public python2-futures
7a5b944e 7676 (package
877889f3 7677 (name "python2-futures")
7a5b944e
EF
7678 (version "3.0.3")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "futures" version))
7683 (sha256
7684 (base32
7685 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7686 (build-system python-build-system)
877889f3 7687 (arguments `(#:python ,python-2))
7a5b944e 7688 (native-inputs
877889f3 7689 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7690 (home-page "https://github.com/agronholm/pythonfutures")
7691 (synopsis
7692 "Backport of the concurrent.futures package from Python 3.2")
7693 (description
7694 "The concurrent.futures module provides a high-level interface for
7695asynchronously executing callables. This package backports the
7696concurrent.futures package from Python 3.2")
3f641af0 7697 (license license:bsd-3)))
7a5b944e 7698
5cb2fe44
EF
7699(define-public python-promise
7700 (package
7701 (name "python-promise")
7702 (version "0.4.2")
7703 (source
7704 (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "promise" version))
7707 (sha256
7708 (base32
7709 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7710 (build-system python-build-system)
7711 ;; Tests wants python-futures, which is a python2 only program, and
7712 ;; can't be found by python-promise at test time.
7713 (arguments `(#:tests? #f))
7714 (home-page "https://github.com/syrusakbary/promise")
7715 (synopsis "Promises/A+ implementation for Python")
7716 (description
7717 "Promises/A+ implementation for Python")
7718 (properties `((python2-variant . ,(delay python2-promise))))
7719 (license license:expat)))
7720
7721(define-public python2-promise
7722 (let ((promise (package-with-python2
7723 (strip-python2-variant python-promise))))
7724 (package (inherit promise)
7725 (arguments (substitute-keyword-arguments (package-arguments promise)
7726 ((#:tests? _) #t)))
7727 (native-inputs
7728 `(("python2-futures" ,python2-futures)
7729 ("python2-pytest" ,python2-pytest)
7730 ("python2-setuptools" ,python2-setuptools)
7731 ,@(package-native-inputs promise))))))
7732
c18f6368
EF
7733(define-public python-urllib3
7734 (package
7735 (name "python-urllib3")
7736 (version "1.13.1")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "urllib3" version))
7741 (sha256
7742 (base32
7743 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7744 (build-system python-build-system)
7745 (arguments `(#:tests? #f))
7746 (native-inputs
7747 `(("python-setuptools" ,python-setuptools)
7748 ;; some packages for tests
7749 ("python-nose" ,python-nose)
7750 ("python-mock" ,python-mock)
7751 ("python-tornado" ,python-tornado)))
7752 (propagated-inputs
7753 `(;; packages for https security
7754 ("python-certifi" ,python-certifi)
7755 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7756 ("python-pyasn1" ,python-pyasn1)
7757 ("python-pyopenssl" ,python-pyopenssl)))
7758 (home-page "http://urllib3.readthedocs.org/")
7759 (synopsis "HTTP library with thread-safe connection pooling")
7760 (description
7761 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7762can reuse the same socket connection for multiple requests, it can POST files,
7763supports url redirection and retries, and also gzip and deflate decoding.")
7764 (license license:expat)))
7765
7766(define-public python2-urllib3
7767 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7768
7769(define-public python-colorama
7770 (package
7771 (name "python-colorama")
7772 (version "0.3.3")
7773 (source
7774 (origin
7775 (method url-fetch)
7776 (uri (pypi-uri "colorama" version))
7777 (sha256
7778 (base32
7779 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7780 (build-system python-build-system)
7781 (inputs
7782 `(("python-setuptools" ,python-setuptools)))
7783 (synopsis "colored terminal text rendering for Python")
7784 (description "Colorama is a Python library for rendering colored terminal
7785text.")
7786 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 7787 (license license:bsd-3)))
2b2f2fc1
DT
7788
7789(define-public python2-colorama
7790 (package-with-python2 python-colorama))
f5bcec6e
DT
7791
7792(define-public python-rsa
7793 (package
7794 (name "python-rsa")
7795 (version "3.2")
7796 (source
7797 (origin
7798 (method url-fetch)
7799 (uri (pypi-uri "rsa" version))
7800 (sha256
7801 (base32
7802 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7803 (build-system python-build-system)
7804 (inputs
7805 `(("python-pyasn1" ,python-pyasn1)
7806 ("python-setuptools" ,python-setuptools)))
7807 (synopsis "Pure-Python RSA implementation")
7808 (description "Python-RSA is a pure-Python RSA implementation. It supports
7809encryption and decryption, signing and verifying signatures, and key
7810generation according to PKCS#1 version 1.5. It can be used as a Python
7811library as well as on the command line.")
7812 (home-page "http://stuvel.eu/rsa")
3f641af0 7813 (license license:asl2.0)))
f5bcec6e
DT
7814
7815(define-public python2-rsa
7816 (package-with-python2 python-rsa))
c0aacfa5
DT
7817
7818(define-public python-pluggy
7819 (package
7820 (name "python-pluggy")
7821 (version "0.3.1")
7822 (source
7823 (origin
7824 (method url-fetch)
7825 (uri (pypi-uri "pluggy" version))
7826 (sha256
7827 (base32
7828 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7829 (build-system python-build-system)
7830 (inputs
7831 `(("python-setuptools" ,python-setuptools)))
7832 (synopsis "Plugin and hook calling mechanism for Python")
7833 (description "Pluggy is an extraction of the plugin manager as used by
7834Pytest but stripped of Pytest specific details.")
7835 (home-page "https://pypi.python.org/pypi/pluggy")
7836 (license license:expat)))
7837
7838(define-public python2-pluggy
7839 (package-with-python2 python-pluggy))
a4af21ca
DT
7840
7841(define-public python-tox
7842 (package
7843 (name "python-tox")
7844 (version "2.3.1")
7845 (source
7846 (origin
7847 (method url-fetch)
7848 (uri (pypi-uri "tox" version))
7849 (sha256
7850 (base32
7851 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7852 (build-system python-build-system)
7853 (arguments
7854 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7855 ;; pytest breaks other packages.
7856 '(#:tests? #f))
7857 (inputs
7858 `(("python-setuptools" ,python-setuptools)
7859 ("python-pluggy" ,python-pluggy)
7860 ("python-py" ,python-py)
7861 ("python-virtualenv" ,python-virtualenv)
7862 ("python-pytest" ,python-pytest)))
7863 (home-page "http://tox.testrun.org/")
7864 (synopsis "Virtualenv-based automation of test activities")
7865 (description "Tox is a generic virtualenv management and test command line
7866tool. It can be used to check that a package installs correctly with
7867different Python versions and interpreters, or run tests in each type of
7868supported environment, or act as a frontend to continuous integration
7869servers.")
7870 (license license:expat)))
7871
7872(define-public python2-tox
7873 (package-with-python2 python-tox))
ba9da248
DT
7874
7875(define-public python-jmespath
7876 (package
7877 (name "python-jmespath")
7878 (version "0.9.0")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "jmespath" version))
7883 (sha256
7884 (base32
7885 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7886 (build-system python-build-system)
7887 (inputs
7888 `(("python-setuptools" ,python-setuptools)))
7889 (synopsis "JSON Matching Expressions")
7890 (description "JMESPath (pronounced “james path”) is a Python library that
7891allows one to declaratively specify how to extract elements from a JSON
7892document.")
7893 (home-page "https://github.com/jmespath/jmespath.py")
7894 (license license:expat)))
7895
7896(define-public python2-jmespath
7897 (package-with-python2 python-jmespath))
935fcd5c
DT
7898
7899(define-public python-botocore
7900 (package
7901 (name "python-botocore")
7902 (version "1.3.17")
7903 (source
7904 (origin
7905 (method url-fetch)
7906 (uri (pypi-uri "botocore" version))
7907 (sha256
7908 (base32
7909 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7910 (build-system python-build-system)
7911 (inputs
7912 `(("python-dateutil" ,python-dateutil-2)
7913 ("python-docutils" ,python-docutils)
7914 ("python-mock" ,python-mock)
7915 ("python-nose" ,python-nose)
7916 ("python-setuptools" ,python-setuptools)
7917 ("python-tox" ,python-tox)
7918 ("python-wheel" ,python-wheel)
7919 ("python-jmespath" ,python-jmespath)))
7920 (home-page "https://github.com/boto/botocore")
7921 (synopsis "Low-level interface to AWS")
7922 (description "Botocore is a Python library that provides a low-level
7923interface to the Amazon Web Services (AWS) API.")
3f641af0 7924 (license license:asl2.0)))
935fcd5c
DT
7925
7926(define-public python2-botocore
7927 (package-with-python2 python-botocore))
f861b8b8
DT
7928
7929(define-public awscli
7930 (package
7931 (name "awscli")
7932 (version "1.9.17")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (string-append
7937 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7938 version ".tar.gz"))
7939 (sha256
7940 (base32
7941 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7942 (build-system python-build-system)
7943 (inputs
7944 `(("python-colorama" ,python-colorama)
7945 ("python-docutils" ,python-docutils)
7946 ("python-mock" ,python-mock)
7947 ("python-nose" ,python-nose)
7948 ("python-rsa" ,python-rsa)
7949 ("python-setuptools" ,python-setuptools)
7950 ("python-sphinx" ,python-sphinx)
7951 ("python-tox" ,python-tox)
7952 ("python-wheel" ,python-wheel)
7953 ("python-botocore" ,python-botocore)))
7954 (home-page "http://aws.amazon.com/cli/")
7955 (synopsis "Command line client for AWS")
7956 (description "AWS CLI provides a unified command line interface to the
7957Amazon Web Services (AWS) API.")
3f641af0 7958 (license license:asl2.0)))
6a44697d
LF
7959
7960(define-public python-hypothesis
7961 (package
7962 (name "python-hypothesis")
bea6d94d 7963 (version "3.1.0")
6a44697d
LF
7964 (source (origin
7965 (method url-fetch)
7966 (uri (pypi-uri "hypothesis" version))
7967 (sha256
7968 (base32
bea6d94d 7969 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 7970 (build-system python-build-system)
6a44697d
LF
7971 (propagated-inputs
7972 `(("python-flake8" ,python-flake8)
7973 ("python-pytest" ,python-pytest)))
7974 (synopsis "Library for property based testing")
7975 (description "Hypothesis is a library for testing your Python code against a
7976much larger range of examples than you would ever want to write by hand. It’s
7977based on the Haskell library, Quickcheck, and is designed to integrate
7978seamlessly into your existing Python unit testing work flow.")
7979 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 7980 (license license:mpl2.0)
6f068e08 7981 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
7982
7983(define-public python2-hypothesis
6f068e08
EF
7984 (let ((hypothesis (package-with-python2
7985 (strip-python2-variant python-hypothesis))))
7986 (package (inherit hypothesis)
7987 (native-inputs
7988 `(("python2-enum34" ,python2-enum34)
7989 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
7990
7991(define-public python-pytest-subtesthack
7992 (package
7993 (name "python-pytest-subtesthack")
7994 (version "0.1.1")
7995 (source (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "pytest-subtesthack" version))
7998 (sha256
7999 (base32
8000 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8001 (build-system python-build-system)
8002 (native-inputs
8003 `(;; setuptools required for python-2 variant
8004 ("python-setuptools" ,python-setuptools)))
8005 (propagated-inputs
8006 `(("python-pytest" ,python-pytest)))
8007 (synopsis "Set-up and tear-down fixtures for unit tests")
8008 (description "This plugin allows you to set up and tear down fixtures within
8009unit test functions that use @code{py.test}. This is useful for using
8010@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8011function multiple times, without setting up or tearing down fixture state as is
8012normally the case.")
8013 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8014 (license license:unlicense)))
7517e73c
LF
8015
8016(define-public python2-pytest-subtesthack
8017 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8018
8019(define-public python2-xdo
8020 (package
8021 (name "python2-xdo")
8022 (version "0.2")
8023 (source (origin
8024 (method url-fetch)
8025 (uri (string-append
8026 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8027 "python-xdo_" version ".orig.tar.gz"))
8028 (sha256
8029 (base32
8030 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8031 (build-system python-build-system)
8032 (arguments
8033 `(#:python ,python-2
8034 #:tests? #f)) ; no tests provided
8035 (inputs
8036 `(("xdotool" ,xdotool)
8037 ("libX11" ,libx11)))
8038 (home-page "https://tracker.debian.org/pkg/python-xdo")
8039 (synopsis "Python library for simulating X11 keyboard/mouse input")
8040 (description "Provides bindings to libxdo for manipulating X11 via simulated
8041input. (Note that this is mostly a legacy library; you may wish to look at
8042python-xdo for newer bindings.)")
3f641af0 8043 (license license:bsd-3)))
0bdc1671 8044
cb34dc6c
CAW
8045(define-public python-wtforms
8046 (package
8047 (name "python-wtforms")
8048 (version "2.1")
8049 (source
8050 (origin
8051 (method url-fetch)
8052 (uri (pypi-uri "WTForms" version ".zip"))
8053 (sha256
8054 (base32
8055 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8056 (build-system python-build-system)
8057 (native-inputs
8058 `(("unzip" ,unzip)))
8059 (home-page "http://wtforms.simplecodes.com/")
8060 (synopsis
8061 "Form validation and rendering library for Python web development")
8062 (description
8063 "WTForms is a flexible forms validation and rendering library
8064for Python web development. It is very similar to the web form API
8065available in Django, but is a standalone package.")
3f641af0 8066 (license license:bsd-3)
cb34dc6c
CAW
8067 (properties `((python2-variant . ,(delay python2-wtforms))))))
8068
8069(define-public python2-wtforms
8070 (package
8071 (inherit (package-with-python2
8072 (strip-python2-variant python-wtforms)))
8073 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8074
8075(define-public python-mako
8076 (package
8077 (name "python-mako")
8078 (version "1.0.3")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "Mako" version))
8083 (sha256
8084 (base32
8085 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8086 (build-system python-build-system)
8087 (native-inputs
8088 `(("python-markupsafe" ,python-markupsafe)
8089 ("python-mock" ,python-mock)
8090 ("python-nose" ,python-nose)))
8091 (home-page "http://www.makotemplates.org/")
8092 (synopsis "Templating language for Python")
8093 (description "Mako is a templating language for Python that compiles
8094templates into Python modules.")
8095 (license license:expat)
8096 (properties `((python2-variant . ,(delay python2-mako))))))
8097
8098(define-public python2-mako
8099 (let ((base (package-with-python2
8100 (strip-python2-variant python-mako))))
8101 (package
8102 (inherit base)
8103 (native-inputs
8104 (cons `("python2-setuptools" ,python2-setuptools)
8105 (package-native-inputs base))))))
ae00a41f
CAW
8106
8107(define-public python-waitress
8108 (package
8109 (name "python-waitress")
8110 (version "0.8.10")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "waitress" version))
8115 (sha256
8116 (base32
8117 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8118 (build-system python-build-system)
8119 (home-page "https://github.com/Pylons/waitress")
8120 (synopsis "Waitress WSGI server")
8121 (description "Waitress is meant to be a production-quality pure-Python WSGI
8122server with very acceptable performance.")
3f641af0 8123 (license license:zpl2.1)
ae00a41f
CAW
8124 (properties `((python2-variant . ,(delay python2-waitress))))))
8125
8126(define-public python2-waitress
8127 (package
8128 (inherit (package-with-python2
8129 (strip-python2-variant python-waitress)))
8130 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8131
8132(define-public python-wsgiproxy2
8133 (package
8134 (name "python-wsgiproxy2")
8135 (version "0.4.2")
8136 (source
8137 (origin
8138 (method url-fetch)
8139 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8140 (sha256
8141 (base32
8142 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8143 (build-system python-build-system)
8144 (native-inputs
8145 `(("unzip" ,unzip)
8146 ("python-nose" ,python-nose)
8147 ("python-coverage" ,python-coverage)))
8148 (propagated-inputs
8149 `(("python-six" ,python-six)
8150 ("python-webob" ,python-webob)))
8151 (home-page
8152 "https://github.com/gawel/WSGIProxy2/")
8153 (synopsis "WSGI Proxy with various http client backends")
8154 (description "WSGI turns HTTP requests into WSGI function calls.
8155WSGIProxy turns WSGI function calls into HTTP requests.
8156It also includes code to sign requests and pass private data,
8157and to spawn subprocesses to handle requests.")
8158 (license license:expat)
8159 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8160
8161(define-public python2-wsgiproxy2
8162 (let ((wsgiproxy2 (package-with-python2
8163 (strip-python2-variant python-wsgiproxy2))))
8164 (package
8165 (inherit wsgiproxy2)
8166 (inputs `(("python2-setuptools" ,python2-setuptools)
8167 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8168
8169(define-public python-pastedeploy
8170 (package
8171 (name "python-pastedeploy")
8172 (version "1.5.2")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "PasteDeploy" version))
8177 (sha256
8178 (base32
8179 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8180 (build-system python-build-system)
8181 (native-inputs
8182 `(("python-nose" ,python-nose)))
8183 (propagated-inputs
8184 ;; This package uses pkg_resources, part of setuptools, during runtime,
8185 ;; hence why not a native-input.
8186 `(("python-setuptools" ,python-setuptools)))
8187 (home-page "http://pythonpaste.org/deploy/")
8188 (synopsis
8189 "Load, configure, and compose WSGI applications and servers")
8190 (description
8191 "This tool provides code to load WSGI applications and servers from URIs;
8192these URIs can refer to Python Eggs for INI-style configuration files. Paste
8193Script provides commands to serve applications based on this configuration
8194file.")
8195 (license license:expat)))
8196
8197(define-public python2-pastedeploy
8198 (package-with-python2 python-pastedeploy))
1cf53652 8199
c4a7904c
CAW
8200(define-public python-paste
8201 (package
8202 (name "python-paste")
8203 (version "2.0.2")
8204 (source
8205 (origin
8206 (method url-fetch)
8207 (uri (pypi-uri "Paste" version))
8208 (sha256
8209 (base32
8210 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8211 (patches (search-patches "python-paste-remove-website-test.patch"
8212 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8213 (build-system python-build-system)
8214 (native-inputs
8215 `(("python-nose" ,python-nose)))
8216 (propagated-inputs
8217 `(;; Uses pkg_resources provided by setuptools internally.
8218 ("python-setuptools" ,python-setuptools)
8219 ("python-six" ,python-six)))
8220 (arguments
8221 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8222 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8223 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8224 ;; still... things should be better by the next Paste release.)
8225 #:tests? #f))
8226 (home-page "http://pythonpaste.org")
8227 (synopsis
8228 "Python web development tools, focusing on WSGI")
8229 (description
8230 "Paste provides a variety of web development tools and middleware which
8231can be nested together to build web applications. Paste's design closely
8232follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8233 (license license:expat)
8234 (properties `((python2-variant . ,(delay python2-paste))))))
8235
8236(define-public python2-paste
8237 (let ((paste (package-with-python2
8238 (strip-python2-variant python-paste))))
8239 (package
8240 (inherit paste)
8241 (arguments
8242 ;; Tests are back for Python 2!
8243 `(#:tests? #t
8244 ,@(package-arguments paste))))))
8245
a8f20f63
CAW
8246(define-public python-pastescript
8247 (package
8248 (name "python-pastescript")
8249 (version "2.0.2")
8250 (source
8251 (origin
8252 (method url-fetch)
8253 (uri (pypi-uri "PasteScript" version))
8254 (sha256
8255 (base32
8256 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8257 (build-system python-build-system)
8258 (native-inputs
8259 `(("python-nose" ,python-nose)))
8260 (propagated-inputs
8261 `(;; Uses pkg_resources provided by setuptools internally.
8262 ("python-setuptools" ,python-setuptools)
8263 ("python-paste" ,python-paste)
8264 ("python-pastedeploy" ,python-pastedeploy)))
8265 (home-page "http://pythonpaste.org/script/")
8266 (arguments
8267 '(;; Unfortunately, this requires the latest unittest2,
8268 ;; but that requires traceback2 which requires linecache2 which requires
8269 ;; unittest2. So we're skipping tests for now.
8270 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8271 ;; so in theory we could get around this situation somehow.)
8272 #:tests? #f))
8273 (synopsis
8274 "Pluggable command line tool for serving web applications and more")
8275 (description
8276 "PasteScript is a plugin-friendly command line tool which provides a
8277variety of features, from launching web applications to bootstrapping project
8278layouts.")
8279 (license license:expat)))
8280
8281(define-public python2-pastescript
8282 (package-with-python2 python-pastescript))
8283
1cf53652
CAW
8284(define-public python-pyquery
8285 (package
8286 (name "python-pyquery")
aab76e80 8287 (version "1.2.13")
1cf53652
CAW
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "pyquery" version))
8292 (sha256
8293 (base32
aab76e80 8294 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652
CAW
8295 (build-system python-build-system)
8296 (propagated-inputs
8297 `(("python-lxml" ,python-lxml)
8298 ("python-cssselect" ,python-cssselect)))
8299 (home-page "https://github.com/gawel/pyquery")
8300 (synopsis "Make jQuery-like queries on xml documents")
8301 (description "pyquery allows you to make jQuery queries on xml documents.
8302The API is as much as possible the similar to jQuery. pyquery uses lxml for
8303fast xml and html manipulation.")
3f641af0 8304 (license license:bsd-3)
1cf53652
CAW
8305 (properties `((python2-variant . ,(delay python2-pyquery))))))
8306
8307(define-public python2-pyquery
8308 (let ((pyquery (package-with-python2
8309 (strip-python2-variant python-pyquery))))
8310 (package
8311 (inherit pyquery)
8312 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
aa6313d6
CAW
8313
8314(define-public python-webtest
8315 (package
8316 (name "python-webtest")
8317 (version "2.0.20")
8318 (source
8319 (origin
8320 (method url-fetch)
8321 (uri (pypi-uri "WebTest" version))
8322 (sha256
8323 (base32
8324 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8325 (build-system python-build-system)
8326 (arguments
8327 `(;; Unfortunately we have to disable tests!
8328 ;; This release of WebTest is pinned to python-nose < 1.3,
8329 ;; but older versions of python-nose are plagued with the following
8330 ;; bug(s), which rears its ugly head during test execution:
8331 ;; https://github.com/nose-devs/nose/issues/759
8332 ;; https://github.com/nose-devs/nose/pull/811
8333 #:tests? #f))
8334 ;; Commented out code is no good, but in this case, once tests
8335 ;; are ready to be enabled again, we should put the following
8336 ;; in place:
8337 ;; (native-inputs
8338 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8339 ;; ; but see above comment
8340 ;; ("python-coverage" ,python-coverage)
8341 ;; ("python-mock" ,python-mock)
8342 ;; ("python-pastedeploy" ,python-pastedeploy)
8343 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8344 ;; ("python-pyquery" ,python-pyquery)))
8345 (propagated-inputs
8346 `(("python-waitress" ,python-waitress)
8347 ("python-webob" ,python-webob)
8348 ("python-six" ,python-six)
8349 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8350 (home-page "http://webtest.pythonpaste.org/")
8351 (synopsis "Helper to test WSGI applications")
8352 (description "Webtest allows you to test your Python web applications
8353without starting an HTTP server. It supports anything that supports the
8354minimum of WSGI.")
8355 (license license:expat)
8356 (properties `((python2-variant . ,(delay python2-webtest))))))
8357
8358(define-public python2-webtest
8359 (let ((webtest (package-with-python2
8360 (strip-python2-variant python-webtest))))
8361 (package
8362 (inherit webtest)
8363 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8364 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8365
8366(define-public python-anyjson
8367 (package
8368 (name "python-anyjson")
8369 (version "0.3.3")
8370 (source
8371 (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "anyjson" version))
8374 (sha256
8375 (base32
8376 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8377 (build-system python-build-system)
8378 (arguments
8379 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8380 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8381 ;; whatever) so this transformation needs to be done before the tests
8382 ;; can be run. Maybe we could add a build step to transform beforehand
8383 ;; but it could be annoying/difficult.
8384 ;; We can enable tests for the Python 2 version, though, and do below.
8385 #:tests? #f))
8386 (home-page "http://bitbucket.org/runeh/anyjson/")
8387 (synopsis
8388 "Wraps best available JSON implementation in a common interface")
8389 (description
8390 "Anyjson loads whichever is the fastest JSON module installed
8391and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8392 (license license:bsd-3)
4cb122cd
CAW
8393 (properties `((python2-variant . ,(delay python2-anyjson))))))
8394
8395(define-public python2-anyjson
8396 (let ((anyjson (package-with-python2
8397 (strip-python2-variant python-anyjson))))
8398 (package
8399 (inherit anyjson)
8400 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8401 #:tests? #t
8402 ,@(package-arguments anyjson)))
8403 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8404 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8405
8406(define-public python-amqp
8407 (package
8408 (name "python-amqp")
8409 (version "1.4.9")
8410 (source
8411 (origin
8412 (method url-fetch)
8413 (uri (pypi-uri "amqp" version))
8414 (sha256
8415 (base32
8416 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8417 (build-system python-build-system)
8418 (native-inputs
8419 `(("python-nose" ,python-nose)
8420 ("python-mock" ,python-mock)))
8421 (home-page "http://github.com/celery/py-amqp")
8422 (synopsis
8423 "Low-level AMQP client for Python (fork of amqplib)")
8424 (description
8425 "This is a fork of amqplib which was originally written by Barry Pederson.
8426It is maintained by the Celery project, and used by kombu as a pure python
8427alternative when librabbitmq is not available.")
3f641af0 8428 (license license:lgpl2.1+)
8dfceab7
CAW
8429 (properties `((python2-variant . ,(delay python2-amqp))))))
8430
8431(define-public python2-amqp
8432 (let ((amqp (package-with-python2
8433 (strip-python2-variant python-amqp))))
8434 (package
8435 (inherit amqp)
8436 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8437 ;; unmaintained. Weirdly, does not do this on the python 3
8438 ;; version?
8439 #:tests? #f
8440 ,@(package-arguments amqp)))
8441 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8442 ,@(package-native-inputs amqp))))))
7d387305
CAW
8443
8444(define-public python-kombu
8445 (package
8446 (name "python-kombu")
0cb59822 8447 (version "3.0.37")
7d387305
CAW
8448 (source
8449 (origin
8450 (method url-fetch)
8451 (uri (pypi-uri "kombu" version))
8452 (sha256
8453 (base32
0cb59822 8454 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8455 (build-system python-build-system)
8456 (native-inputs
8457 `(("python-mock" ,python-mock)
8458 ("python-nose" ,python-nose)))
8459 (propagated-inputs
8460 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8461 ("python-amqp" ,python-amqp)
8462 ("python-redis" ,python-redis)))
7d387305
CAW
8463 (home-page "http://kombu.readthedocs.org")
8464 (synopsis "Message passing library for Python")
8465 (description "The aim of Kombu is to make messaging in Python as easy as
8466possible by providing an idiomatic high-level interface for the AMQ protocol,
8467and also provide proven and tested solutions to common messaging problems.
8468AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8469message orientation, queuing, routing, reliability and security, for which the
8470RabbitMQ messaging server is the most popular implementation.")
3f641af0 8471 (license license:bsd-3)
7d387305
CAW
8472 (properties `((python2-variant . ,(delay python2-kombu))))))
8473
8474(define-public python2-kombu
8475 (let ((kombu (package-with-python2
8476 (strip-python2-variant python-kombu))))
8477 (package
8478 (inherit kombu)
8479 (inputs `(("python2-setuptools" ,python2-setuptools)
8480 ("python2-unittest2" ,python2-unittest2)
8481 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8482
8483(define-public python-billiard
8484 (package
8485 (name "python-billiard")
a6bb9e44 8486 (version "3.3.0.23")
b6f0b9fb
CAW
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "billiard" version))
8491 (sha256
8492 (base32
a6bb9e44 8493 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
8494 (build-system python-build-system)
8495 (native-inputs
8496 `(("python-nose" ,python-nose)))
8497 (home-page "http://github.com/celery/billiard")
8498 (synopsis
8499 "Python multiprocessing fork with improvements and bugfixes")
8500 (description
8501 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8502multiprocessing package itself is a renamed and updated version of R Oudkerk's
8503pyprocessing package. This standalone variant is intended to be compatible with
8504Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8505 (license license:bsd-3)
b6f0b9fb
CAW
8506 (properties `((python2-variant . ,(delay python2-billiard))))))
8507
8508(define-public python2-billiard
8509 (let ((billiard (package-with-python2
8510 (strip-python2-variant python-billiard))))
8511 (package
8512 (inherit billiard)
8513 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8514 ("python2-unittest2" ,python2-unittest2)
8515 ("python2-mock" ,python2-mock)
8516 ,@(package-native-inputs billiard))))))
22df6419
CAW
8517
8518(define-public python-celery
8519 (package
8520 (name "python-celery")
9ebe87fe 8521 (version "3.1.24")
22df6419
CAW
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "celery" version))
8526 (sha256
8527 (base32
9ebe87fe 8528 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 8529 (build-system python-build-system)
9ebe87fe
LF
8530 (arguments
8531 `(#:phases
8532 (modify-phases %standard-phases
8533 ;; These tests break with Python 3.5:
8534 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8535 (replace 'check
8536 (lambda _
8537 (zero?
8538 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
8539 (native-inputs
8540 `(("python-nose" ,python-nose)))
a64cbb6f 8541 (inputs
22df6419 8542 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8543 ("python-amqp" ,python-amqp)
8544 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8545 ("python-billiard" ,python-billiard)
8546 ("python-kombu" ,python-kombu)))
8547 (home-page "http://celeryproject.org")
8548 (synopsis "Distributed Task Queue")
8549 (description "Celery is an asynchronous task queue/job queue based on
8550distributed message passing. It is focused on real-time operation, but
8551supports scheduling as well. The execution units, called tasks, are executed
8552concurrently on a single or more worker servers using multiprocessing,
8553Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8554synchronously (wait until ready).")
3f641af0 8555 (license license:bsd-3)
22df6419
CAW
8556 (properties `((python2-variant . ,(delay python2-celery))))))
8557
8558(define-public python2-celery
8559 (let ((celery (package-with-python2
8560 (strip-python2-variant python-celery))))
8561 (package
8562 (inherit celery)
8563 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8564 ("python2-unittest2" ,python2-unittest2)
8565 ("python2-mock" ,python2-mock)
8566 ,@(package-native-inputs celery))))))
97e32948
CAW
8567
8568(define-public python-translitcodec
8569 (package
8570 (name "python-translitcodec")
8571 (version "0.4.0")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "translitcodec" version))
8576 (sha256
8577 (base32
8578 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8579 (build-system python-build-system)
8580 (arguments
8581 `(#:tests? #f)) ; no tests provided
8582 (home-page
8583 "https://github.com/claudep/translitcodec")
8584 (synopsis
8585 "Unicode to 8-bit charset transliteration codec")
8586 (description
8587 "This package contains codecs for transliterating ISO 10646 texts into
8588best-effort representations using smaller coded character sets (ASCII,
8589ISO 8859, etc.).")
8590 (license license:expat)
8591 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8592
8593(define-public python2-translitcodec
8594 (package
8595 (inherit (package-with-python2
8596 (strip-python2-variant python-translitcodec)))
8597 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8598
8599(define-public python-editor
8600 (package
8601 (name "python-editor")
8602 (version "0.5")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "python-editor" version))
8607 (sha256
8608 (base32
8609 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8610 (build-system python-build-system)
8611 (home-page
8612 "https://github.com/fmoo/python-editor")
8613 (synopsis
8614 "Programmatically open an editor, capture the result")
8615 (description
8616 "python-editor is a library that provides the editor module for
8617programmatically interfacing with your system's $EDITOR.")
3f641af0 8618 (license license:asl2.0)
0c3b90d4
CAW
8619 (properties `((python2-variant . ,(delay python2-editor))))))
8620
8621(define-public python2-editor
8622 (package
8623 (inherit (package-with-python2
8624 (strip-python2-variant python-editor)))
8625 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8626
8627(define-public python-sphinxcontrib-programoutput
8628 (package
8629 (name "python-sphinxcontrib-programoutput")
8630 (version "0.8")
8631 (source (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8634 (sha256
8635 (base32
8636 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8637 (build-system python-build-system)
8638 (propagated-inputs
8639 `(("python-docutils" ,python-docutils)
8640 ("python-sphinx" ,python-sphinx)))
8641 (synopsis "Sphinx extension to include program output")
8642 (description "A Sphinx extension to literally insert the output of arbitrary
8643commands into documents, helping you to keep your command examples up to date.")
8644 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8645 (license license:bsd-2)
3276517c
LF
8646 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8647
8648(define-public python2-sphinxcontrib-programoutput
8649 (package
8650 (inherit (package-with-python2
8651 (strip-python2-variant python-sphinxcontrib-programoutput)))
8652 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8653
8654(define-public python-sphinx-repoze-autointerface
8655 (package
8656 (name "python-sphinx-repoze-autointerface")
328ae341 8657 (version "0.8")
548d7165
LF
8658 (source (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8661 (sha256
8662 (base32
328ae341 8663 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8664 (build-system python-build-system)
8665 (propagated-inputs
8666 `(("python-docutils" ,python-docutils)
8667 ("python-sphinx" ,python-sphinx)
8668 ("python-zope-interface" ,python-zope-interface)))
8669 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8670 (description "This package defines an extension for the Sphinx documentation
8671system. The extension allows generation of API documentation by
8672introspection of @code{zope.interface} instances in code.")
8673 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8674 (license license:repoze)))
548d7165
LF
8675
8676(define-public python2-sphinx-repoze-autointerface
8677 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8678
8679(define-public python-psycopg2
8680 (package
8681 (name "python-psycopg2")
8682 (version "2.6.1")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "psycopg2" version))
8687 (sha256
8688 (base32
8689 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8690 (build-system python-build-system)
8691 (arguments
8692 ;; Tests would require a postgresql database "psycopg2_test"
8693 ;; and a running postgresql database management service.
8694 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8695 (inputs
8696 `(("postgresql" ,postgresql))) ; libpq
8697 (home-page "http://initd.org/psycopg/")
8698 (synopsis "Python PostgreSQL adapter")
8699 (description
8700 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 8701 (license license:lgpl3+)
b31fbea5
DM
8702 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8703
8704(define-public python2-psycopg2
8705 (package
8706 (inherit (package-with-python2
8707 (strip-python2-variant python-psycopg2)))
8708 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8709
8710(define-public python-vobject
8711 (package
8712 (name "python-vobject")
9bed9b15 8713 (version "0.9.2")
eed1a61f
LF
8714 (source (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "vobject" version))
8717 (sha256
8718 (base32
9bed9b15 8719 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
8720 (build-system python-build-system)
8721 (inputs
8722 `(("python-dateutil-2" ,python-dateutil-2)
8723 ("python-pyicu" ,python-pyicu)))
8724 (synopsis "Parse and generate vCard and vCalendar files")
8725 (description "Vobject is intended to be a full featured Python package for
8726parsing and generating vCard and vCalendar files. Currently, iCalendar files
8727are supported and well tested. vCard 3.0 files are supported, and all data
8728should be imported, but only a few components are understood in a sophisticated
8729way.")
8730 (home-page "http://eventable.github.io/vobject/")
3f641af0 8731 (license license:asl2.0)
eed1a61f
LF
8732 (properties `((python2-variant . ,(delay python2-vobject))))))
8733
8734(define-public python2-vobject
8735 (package
8736 (inherit (package-with-python2
8737 (strip-python2-variant python-vobject)))
8738 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8739
8740(define-public python-munkres
8741 (package
8742 (name "python-munkres")
8743 (version "1.0.7")
8744 (source (origin
8745 (method url-fetch)
8746 (uri (pypi-uri "munkres" version))
8747 (sha256
8748 (base32
8749 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8750 (build-system python-build-system)
8751 (arguments
8752 '(#:tests? #f)) ; no test suite
8753 (home-page "http://software.clapper.org/munkres/")
8754 (synopsis "Implementation of the Munkres algorithm")
8755 (description "The Munkres module provides an implementation of the Munkres
8756algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8757useful for solving the Assignment Problem.")
3f641af0 8758 (license license:bsd-3)))
cedac813
LF
8759
8760(define-public python2-munkres
8761 (package-with-python2 python-munkres))
f3b3d78f
LF
8762
8763(define-public python-flask
8764 (package
8765 (name "python-flask")
8766 (version "0.10.1")
8767 (source (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "Flask" version))
8770 (sha256
8771 (base32
8772 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8773 (build-system python-build-system)
8774 (propagated-inputs
8775 `(("python-itsdangerous" ,python-itsdangerous)
8776 ("python-jinja2" ,python-jinja2)
8777 ("python-werkzeug" ,python-werkzeug)))
8778 (home-page "https://github.com/mitsuhiko/flask/")
8779 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8780 (description "Flask is a micro web framework based on the Werkzeug toolkit
8781and Jinja2 template engine. It is called a micro framework because it does not
8782presume or force a developer to use a particular tool or library.")
3f641af0 8783 (license license:bsd-3)
f3b3d78f
LF
8784 (properties `((python2-variant . ,(delay python2-flask))))))
8785
8786(define-public python2-flask
8787 (package (inherit (package-with-python2
8788 (strip-python2-variant python-flask)))
8789 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8790
8791(define-public python-cookies
8792 (package
8793 (name "python-cookies")
8794 (version "2.2.1")
8795 (source (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "cookies" version))
8798 (sha256
8799 (base32
8800 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8801 (build-system python-build-system)
8802 (arguments
8803 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8804 #:tests? #f))
8805 (native-inputs
8806 `(("python-pytest" ,python2-pytest)))
8807 (synopsis "HTTP cookie parser and renderer")
8808 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8809Python.")
8810 (home-page "https://gitlab.com/sashahart/cookies")
8811 (license license:expat)
8812 (properties `((python2-variant . ,(delay python2-cookies))))))
8813
8814(define-public python2-cookies
8815 (let ((cookies (package-with-python2
8816 (strip-python2-variant python-cookies))))
8817 (package (inherit cookies)
8818 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8819 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8820
8821(define-public python-responses
8822 (package
8823 (name "python-responses")
8824 (version "0.5.1")
8825 (source (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "responses" version))
8828 (sha256
8829 (base32
8830 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8831 (build-system python-build-system)
8832 (arguments
8833 `(;; Test suite is not distributed:
8834 ;; https://github.com/getsentry/responses/issues/38
8835 #:tests? #f))
8836 (native-inputs
8837 `(("python-cookies" ,python-cookies)
8838 ("python-mock" ,python-mock)))
8839 (propagated-inputs
8840 `(("python-requests" ,python-requests)
8841 ("python-six" ,python-six)))
8842 (home-page "https://github.com/getsentry/responses")
8843 (synopsis "Utility for mocking out the `requests` Python library")
8844 (description "A utility library for mocking out the `requests` Python
8845library.")
3f641af0 8846 (license license:asl2.0)
0efde7d6
LF
8847 (properties `((python2-variant . ,(delay python2-responses))))))
8848
8849(define-public python2-responses
8850 (let ((responses (package-with-python2
8851 (strip-python2-variant python-responses))))
8852 (package (inherit responses)
8853 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8854 ,@(package-native-inputs responses))))))
76b94885
LF
8855
8856(define-public python-pathlib
8857 (package
8858 (name "python-pathlib")
8859 (version "1.0.1")
8860 (source (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "pathlib" version))
8863 (sha256
8864 (base32
8865 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8866 (build-system python-build-system)
92a312dc
RW
8867 ;; The tests depend on the internal "test" module, which does not provide
8868 ;; a stable interface.
8869 (arguments `(#:tests? #f))
76b94885 8870 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
8871 (synopsis "Object-oriented file system paths")
8872 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
8873It offers the following advantages over using string objects:
8874
8875@enumerate
8876@item No more cumbersome use of os and os.path functions. Everything can
8877be done easily through operators, attribute accesses, and method calls.
8878@item Embodies the semantics of different path types. For example,
8879comparing Windows paths ignores casing.
8880@item Well-defined semantics, eliminating any inconsistencies or
8881ambiguities (forward vs. backward slashes, etc.).
8882@end enumerate\n")
8883 (license license:expat)))
8884
8885(define-public python2-pathlib
8886 (package-with-python2 python-pathlib))
25a7db0a
LF
8887
8888(define-public python-jellyfish
8889 (package
8890 (name "python-jellyfish")
8891 (version "0.5.3")
8892 (source (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "jellyfish" version))
8895 (sha256
8896 (base32
8897 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8898 (build-system python-build-system)
8899 (native-inputs
8900 `(("python-pytest" ,python-pytest)))
8901 (home-page "https://github.com/jamesturk/jellyfish")
8902 (synopsis "Approximate and phonetic matching of strings")
8903 (description "Jellyfish uses a variety of string comparison and phonetic
8904encoding algorithms to do fuzzy string matching.")
3f641af0 8905 (license license:bsd-2)
25a7db0a
LF
8906 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8907
8908(define-public python2-jellyfish
8909 (let ((jellyfish (package-with-python2
8910 (strip-python2-variant python-jellyfish))))
8911 (package (inherit jellyfish)
8912 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8913 ("python2-unicodecsv" ,python2-unicodecsv)
8914 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
8915
8916(define-public python2-unicodecsv
8917 (package
8918 (name "python2-unicodecsv")
8919 (version "0.14.1")
8920 (source (origin
8921 (method url-fetch)
8922 ;; The test suite is not included in the PyPi release.
8923 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8924 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8925 "archive/" version ".tar.gz"))
8926 (file-name (string-append name "-" version ".tar.gz"))
8927 (sha256
8928 (base32
8929 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8930 (build-system python-build-system)
8931 (arguments
8932 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8933 #:python ,python-2))
8934 (native-inputs
8935 `(("python2-setuptools" ,python2-setuptools)
8936 ("python2-unittest2" ,python2-unittest2)))
8937 (home-page "https://github.com/jdunck/python-unicodecsv")
8938 (synopsis "Unicode CSV module for Python 2")
8939 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8940module, adding support for Unicode strings.")
3f641af0 8941 (license license:bsd-2)))
064503aa
LF
8942
8943(define-public python-rarfile
8944 (package
8945 (name "python-rarfile")
8946 (version "2.7")
8947 (source (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "rarfile" version))
8950 (sha256
8951 (base32
8952 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8953 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 8954 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
8955 (build-system python-build-system)
8956 (arguments
8957 '(#:phases
8958 (modify-phases %standard-phases
8959 (replace 'check
8960 ;; Many tests fail, but the installation proceeds.
8961 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8962 (native-inputs
8963 `(("which" ,which))) ; required for tests
8964 (propagated-inputs
8965 `(("libarchive" ,libarchive)))
8966 (home-page "https://github.com/markokr/rarfile")
8967 (synopsis "RAR archive reader for Python")
8968 (description "This is Python module for RAR archive reading. The interface
8969is made as zipfile like as possible.")
3f641af0 8970 (license license:isc)))
064503aa
LF
8971
8972(define-public python2-rarfile
8973 (package-with-python2 python-rarfile))
daeeea71
CM
8974
8975(define-public python-magic
8976 (package
8977 (name "python-magic")
8978 (version "0.4.3")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8983 version ".tar.gz"))
8984 (sha256
8985 (base32
8986 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8987 (file-name (string-append name "-" version "-checkout"))))
8988 (build-system python-build-system)
8989 (arguments
8990 ;; The tests are unreliable, so don't run them. The tests fail
8991 ;; under Python3 because they were written for Python2 and
8992 ;; contain import statements that do not work in Python3. One of
8993 ;; the tests fails under Python2 because its assertions are
8994 ;; overly stringent; it relies on comparing output strings which
8995 ;; are brittle and can change depending on the version of
8996 ;; libmagic being used and the system on which the test is
8997 ;; running. In my case, under GuixSD 0.10.0, only one test
8998 ;; failed, and it seems to have failed only because the version
8999 ;; of libmagic that is packaged in Guix outputs a slightly
9000 ;; different (but not wrong) string than the one that the test
9001 ;; expected.
9002 '(#:tests? #f
9003 #:phases (modify-phases %standard-phases
9004 ;; Replace a specific method call with a hard-coded
9005 ;; path to the necessary libmagic.so file in the
9006 ;; store. If we don't do this, then the method call
9007 ;; will fail to find the libmagic.so file, which in
9008 ;; turn will cause any application using
9009 ;; python-magic to fail.
9010 (add-before 'build 'hard-code-path-to-libmagic
9011 (lambda* (#:key inputs #:allow-other-keys)
9012 (let ((file (assoc-ref inputs "file")))
9013 (substitute* "magic.py"
9014 (("ctypes.util.find_library\\('magic'\\)")
9015 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9016 #t)))
9017 (add-before 'install 'disable-egg-compression
9018 (lambda _
9019 (let ((port (open-file "setup.cfg" "a")))
9020 (display "\n[easy_install]\nzip_ok = 0\n"
9021 port)
9022 (close-port port)
9023 #t))))))
daeeea71
CM
9024 (native-inputs
9025 `(("python-setuptools" ,python-setuptools)))
9026 (inputs
9027 ;; python-magic needs to be able to find libmagic.so.
9028 `(("file" ,file)))
9029 (home-page "https://github.com/ahupp/python-magic")
9030 (synopsis "File type identification using libmagic")
9031 (description
9032 "This module uses ctypes to access the libmagic file type
9033identification library. It makes use of the local magic database and
9034supports both textual and MIME-type output. Note that this module and
9035the python-file module both provide a \"magic.py\" file; these two
9036modules, which are different and were developed separately, both serve
9037the same purpose: to provide Python bindings for libmagic.")
9038 (license license:expat)))
9039
9040(define-public python2-magic
9041 (package-with-python2 python-magic))
12af303f
CM
9042
9043(define-public python2-s3cmd
9044 (package
9045 (name "python2-s3cmd")
9046 (version "1.6.1")
9047 (source
9048 (origin
9049 (method url-fetch)
de67e922 9050 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9051 "s3cmd-" version ".tar.gz"))
9052 (sha256
9053 (base32
9054 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9055 (build-system python-build-system)
9056 (arguments
9057 ;; s3cmd is written for python2 only and contains no tests.
9058 `(#:python ,python-2
9059 #:tests? #f))
9060 (native-inputs
9061 `(("python2-setuptools" ,python2-setuptools)))
9062 (inputs
9063 `(("python2-dateutil" ,python2-dateutil)
9064 ;; The python-file package also provides a magic.py module.
9065 ;; This is an unfortunate state of affairs; however, s3cmd
9066 ;; fails to install if it cannot find specifically the
9067 ;; python-magic package. Thus we include it, instead of using
9068 ;; python-file. Ironically, s3cmd sometimes works better
9069 ;; without libmagic bindings at all:
9070 ;; https://github.com/s3tools/s3cmd/issues/198
9071 ("python2-magic" ,python2-magic)))
9072 (home-page "http://s3tools.org/s3cmd")
9073 (synopsis "Command line tool for S3-compatible storage services")
9074 (description
9075 "S3cmd is a command line tool for uploading, retrieving and managing data
9076in storage services that are compatible with the Amazon Simple Storage
9077Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9078GnuPG encryption, and more. It also supports management of Amazon's
9079CloudFront content delivery network.")
3f641af0 9080 (license license:gpl2+)))
4323a5f0
AE
9081
9082(define-public python-pkgconfig
9083 (package
9084 (name "python-pkgconfig")
9085 (version "1.1.0")
9086 (source
9087 (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "pkgconfig" version))
9090 (sha256
9091 (base32
9092 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9093 (build-system python-build-system)
9094 (native-inputs
9095 `(("python-nose" ,python-nose)
9096 ("python-setuptools" ,python-setuptools)))
9097 (inputs
9098 `(("pkg-config" ,pkg-config)))
9099 (arguments
9100 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9101 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9102 #:tests? #f
9103 ;; Prevent creation of the egg. This works around
9104 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9105 #:configure-flags '("--single-version-externally-managed" "--root=/")
9106 ;; Hard-code the path to pkg-config.
9107 #:phases
9108 (modify-phases %standard-phases
9109 (add-before
9110 'build 'patch
9111 (lambda _
9112 (substitute* "pkgconfig/pkgconfig.py"
9113 (("cmd = 'pkg-config")
9114 (string-append "cmd = '" (which "pkg-config"))))
9115 #t)))))
9116 (home-page "http://github.com/matze/pkgconfig")
9117 (synopsis "Python interface for pkg-config")
9118 (description "This module provides a Python interface to pkg-config. It
9119can be used to find all pkg-config packages, check if a package exists,
9120check if a package meets certain version requirements, query CFLAGS and
9121LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9122 (license license:expat)))
4323a5f0
AE
9123
9124(define-public python2-pkgconfig
9125 (package-with-python2 python-pkgconfig))
9126
2e697322
BW
9127(define-public python-bz2file
9128 (package
9129 (name "python-bz2file")
9130 (version "0.98")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "bz2file" version))
9135 (sha256
9136 (base32
9137 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9138 (build-system python-build-system)
9139 (arguments
124df723 9140 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9141 (home-page "https://github.com/nvawda/bz2file")
9142 (synopsis "Read and write bzip2-compressed files")
9143 (description
9144 "Bz2file is a Python library for reading and writing bzip2-compressed
9145files. It contains a drop-in replacement for the I/O interface in the
9146standard library's @code{bz2} module, including features from the latest
9147development version of CPython that are not available in older releases.")
3f641af0 9148 (license license:asl2.0)
2e697322
BW
9149 (properties `((python2-variant . ,(delay python2-bz2file))))))
9150
9151(define-public python2-bz2file
9152 (let ((base (package-with-python2
9153 (strip-python2-variant python-bz2file))))
9154 (package
9155 (inherit base)
9156 (native-inputs
124df723
BW
9157 `(("python2-setuptools" ,python2-setuptools)))
9158 (arguments
752bb447
BW
9159 `(#:python ,python-2
9160 #:phases
124df723
BW
9161 (modify-phases %standard-phases
9162 ;; 'python setup.py test' does not work as of 0.98.
9163 ;; There is only the one test file, so we run it directly.
9164 (replace 'check
9165 (lambda _ (zero? (system* "python"
9166 "test_bz2file.py"))))))))))
2e697322 9167
da4ac1aa
BW
9168(define-public python-future
9169 (package
9170 (name "python-future")
9171 (version "0.15.2")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "future" version))
9176 (sha256
9177 (base32
9178 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9179 (build-system python-build-system)
9180 ;; Many tests connect to the network or are otherwise flawed.
9181 ;; https://github.com/PythonCharmers/python-future/issues/210
9182 (arguments
9183 `(#:tests? #f))
9184 (home-page "http://python-future.org")
9185 (synopsis "Single-source support for Python 3 and 2")
9186 (description
9187 "@code{python-future} is the missing compatibility layer between Python 2 and
9188Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9189to support both Python 2 and Python 3 with minimal overhead.")
9190 (license license:expat)
9191 (properties `((python2-variant . ,(delay python2-future))))))
9192
9193(define-public python2-future
9194 (let ((base (package-with-python2
9195 (strip-python2-variant python-future))))
9196 (package
9197 (inherit base)
9198 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9199
8e451885
AE
9200(define-public python-cysignals
9201 (package
9202 (name "python-cysignals")
9203 (version "1.1.0")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9208 (sha256
9209 (base32
9210 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9211 (build-system python-build-system)
9212 (native-inputs
9213 `(("python-cython" ,python-cython)
9214 ("python-setuptools" ,python-setuptools)
9215 ("python-sphinx" ,python-sphinx)))
9216 (inputs
9217 `(("pari-gp" ,pari-gp)))
9218 (arguments
9219 `(#:modules ((guix build python-build-system)
9220 ((guix build gnu-build-system) #:prefix gnu:)
9221 (guix build utils))
9222 ;; FIXME: Tests are executed after installation and currently fail
9223 ;; when not installing into standard locations; the author is working
9224 ;; on a fix.
9225 #:tests? #f
9226 #:phases
9227 (modify-phases %standard-phases
9228 (add-before
9229 'build 'configure
9230 (assoc-ref gnu:%standard-phases 'configure)))))
9231 (home-page
9232 "https://github.com/sagemath/cysignals")
9233 (synopsis
9234 "Handling of interrupts and signals for Cython")
9235 (description
9236 "The cysignals package provides mechanisms to handle interrupts (and
9237other signals and errors) in Cython code, using two related approaches,
9238for mixed Cython/Python code or external C libraries and pure Cython code,
9239respectively.")
3f641af0 9240 (license license:lgpl3+)))
8e451885
AE
9241
9242(define-public python2-cysignals
9243 (package-with-python2 python-cysignals))
9244
63bcec71
DM
9245(define-public python2-shedskin
9246 (package
9247 (name "python2-shedskin")
9248 (version "0.9.4")
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (string-append "https://github.com/shedskin/shedskin/"
9253 "releases/download/v" version
9254 "/shedskin-" version ".tgz"))
9255 (sha256
9256 (base32
9257 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9258 (build-system python-build-system)
9259 (arguments
9260 `(#:python ,python-2
9261 #:phases (modify-phases %standard-phases
9262 (add-after 'unpack 'fix-resulting-include-libs
9263 (lambda* (#:key inputs #:allow-other-keys)
9264 (let ((libgc (assoc-ref inputs "libgc"))
9265 (pcre (assoc-ref inputs "pcre")))
9266 (substitute* "shedskin/makefile.py"
9267 (("variable == 'CCFLAGS':[ ]*")
9268 (string-append "variable == 'CCFLAGS':\n"
9269 " line += ' -I " pcre "/include"
9270 " -I " libgc "/include'"))
9271 (("variable == 'LFLAGS':[ ]*")
9272 (string-append "variable == 'LFLAGS':\n"
9273 " line += ' -L" pcre "/lib"
9274 " -L " libgc "/lib'")))
9275 #t))))))
9276 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9277 (inputs `(("pcre" ,pcre)
9278 ("libgc" ,libgc)))
9279 (home-page "https://shedskin.github.io/")
9280 (synopsis "Experimental Python-2 to C++ Compiler")
9281 (description (string-append "This is an experimental compiler for a subset of
9282Python. It generates C++ code and a Makefile."))
3f641af0 9283 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9284
9285(define-public python2-rope
9286 (package
9287 (name "python2-rope")
9288 (version "0.10.3")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "rope" version))
9293 (sha256
9294 (base32
9295 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9296 (arguments
9297 ;; Rope is currently python-2 only.
9298 ;; https://github.com/python-rope/rope/issues/57
9299 `(#:python ,python-2))
9300 (build-system python-build-system)
9301 (native-inputs
9302 `(("python2-unittest2" ,python2-unittest2)
9303 ("python2-setuptools" ,python2-setuptools)))
9304 (home-page "https://github.com/python-rope/rope")
9305 (synopsis "Refactoring library for Python")
9306 (description "Rope is a refactoring library for Python. It facilitates
9307the renaming, moving and extracting of attributes, functions, modules, fields
9308and parameters in Python 2 source code. These refactorings can also be applied
9309to occurences in strings and comments.")
3f641af0 9310 (license license:gpl2)))
6ba8ca17
9311
9312(define-public python-py3status
9313 (package
9314 (name "python-py3status")
d2262d70 9315 (version "3.1")
6ba8ca17
9316 (source
9317 (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "py3status" version))
9320 (sha256
9321 (base32
d2262d70 9322 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
9323 (build-system python-build-system)
9324 (native-inputs
9325 `(("python-setuptools" ,python-setuptools)))
9326 (home-page "https://github.com/ultrabug/py3status")
9327 (synopsis "Extensible i3status wrapper written in Python")
9328 (description "py3status is an i3status wrapper which extends i3status
9329functionality in a modular way, allowing you to extend your panel with your
9330own code, responding to click events and updating clock every second.")
3f641af0 9331 (license license:bsd-3)))
b8fdbca3
HG
9332
9333(define-public python-tblib
9334 (package
9335 (name "python-tblib")
9336 (version "1.3.0")
9337 (source (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "tblib" version))
9340 (sha256 (base32
9341 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9342 (build-system python-build-system)
9343 (arguments
9344 `(#:phases
9345 (modify-phases %standard-phases
9346 (replace 'check
9347 (lambda _
9348 ;; Upstream runs tests after installation and the package itself
9349 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9350 ;; found.
9351 (setenv "PYTHONPATH"
9352 (string-append (getcwd) "/build/lib:"
9353 (getenv "PYTHONPATH")))
9354 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9355 (native-inputs
9356 `(("python-pytest" ,python-pytest)
9357 ("python-setuptools" ,python-setuptools)
9358 ("python-six" ,python-six)))
9359 (home-page "https://github.com/ionelmc/python-tblib")
9360 (synopsis "Traceback serialization library")
9361 (description
9362 "Traceback serialization allows you to:
9363
9364@enumerate
9365@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9366different processes. This allows better error handling when running code over
9367multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9368
9369@item Parse traceback strings and raise with the parsed tracebacks.
9370@end itemize")
3f641af0 9371 (license license:bsd-3)))
b8fdbca3
HG
9372
9373(define-public python2-tblib
9374 (package-with-python2 python-tblib))
1a024de4
HG
9375
9376(define-public python-sqlparse
9377 (package
9378 (name "python-sqlparse")
9379 (version "0.1.19")
9380 (source (origin
9381 (method url-fetch)
9382 (uri (pypi-uri "sqlparse" version))
9383 (sha256
9384 (base32
9385 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9386 (build-system python-build-system)
9387 (arguments
9388 `(#:phases
9389 (modify-phases %standard-phases
9390 (replace 'check
9391 (lambda* _
9392 ;; setup.py-integrated 2to3 only affects the build files, but
9393 ;; py.test is using the source files. So we need to convert them
9394 ;; manually.
9395 (when (zero? (system* "python3"))
9396 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9397 (zero? (system* "py.test")))))))
9398 (native-inputs
9399 `(("python-pytest" ,python-pytest)
9400 ("python-setuptools" ,python-setuptools)))
9401 (home-page "https://github.com/andialbrecht/sqlparse")
9402 (synopsis "Non-validating SQL parser")
9403 (description "Sqlparse is a non-validating SQL parser for Python. It
9404provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9405 (license license:bsd-3)))
1a024de4
HG
9406
9407(define-public python2-sqlparse
9408 (package-with-python2 python-sqlparse))
68b9d242
SB
9409
9410(define-public python-greenlet
9411 (package
9412 (name "python-greenlet")
9413 (version "0.4.9")
9414 (source (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "greenlet" version))
9417 (sha256
9418 (base32
9419 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9420 (build-system python-build-system)
9421 (native-inputs
9422 `(("python-setuptools" ,python-setuptools)))
9423 (home-page "https://greenlet.readthedocs.io/")
9424 (synopsis "Lightweight in-process concurrent programming")
9425 (description
9426 "Greenlet package is a spin-off of Stackless, a version of CPython
9427that supports micro-threads called \"tasklets\". Tasklets run
9428pseudo-concurrently (typically in a single or a few OS-level threads) and
9429are synchronized with data exchanges on \"channels\".")
3f641af0 9430 (license (list license:psfl license:expat))))
68b9d242
SB
9431
9432(define-public python2-greenlet
9433 (package-with-python2 python-greenlet))
d79a343b
SB
9434
9435(define-public python-gevent
9436 (package
9437 (name "python-gevent")
9438 (version "1.1.1")
9439 (source (origin
9440 (method url-fetch)
9441 (uri (pypi-uri "gevent" version))
9442 (sha256
9443 (base32
9444 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9445 (modules '((guix build utils)))
9446 (snippet
9447 '(begin
9448 ;; unbunding libev and c-ares
9449 (for-each delete-file-recursively '("libev" "c-ares"))
9450 ;; fixing testsuite
9451 (call-with-output-file "greentest/__init__.py" noop)
9452 (substitute* "greentest/testrunner.py"
9453 (("import util") "from . import util")
9454 (("from util import log") "from .util import log"))))))
9455 (build-system python-build-system)
9456 (propagated-inputs
9457 `(("python-greenlet" ,python-greenlet)))
9458 (native-inputs
9459 `(("python-setuptools" ,python-setuptools)
9460 ("python-six" ,python-six)))
9461 (inputs
9462 `(("c-ares" ,c-ares)
9463 ("libev" ,libev)))
9464 (home-page "http://www.gevent.org/")
9465 (synopsis "Coroutine-based network library")
9466 (description
9467 "gevent is a coroutine-based Python networking library that uses greenlet
9468to provide a high-level synchronous API on top of the libev event loop.")
9469 (license license:expat)))
9470
9471(define-public python2-gevent
9472 (package-with-python2 python-gevent))
da3aeeb6
SB
9473
9474(define-public python-twisted
9475 (package
9476 (name "python-twisted")
9477 (version "16.2.0")
9478 (source (origin
9479 (method url-fetch)
8ea8e8d3 9480 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9481 (sha256
9482 (base32
9483 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9484 (build-system python-build-system)
9485 (native-inputs
45912170
SB
9486 `(("python-setuptools" ,python-setuptools)))
9487 (propagated-inputs
9488 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9489 (home-page "https://twistedmatrix.com/")
9490 (synopsis "Asynchronous networking framework written in Python")
9491 (description
9492 "Twisted is an extensible framework for Python programming, with special
9493focus on event-based network programming and multiprotocol integration.")
9494 (license license:expat)))
9495
9496(define-public python2-twisted
9497 (package-with-python2 python-twisted))
d0b6fed6 9498
4d3fa5a4
EF
9499(define-public python-pika
9500 (package
9501 (name "python-pika")
9502 (version "0.10.0")
9503 (source
9504 (origin
9505 (method url-fetch)
9506 (uri (pypi-uri "pika" version))
9507 (sha256
9508 (base32
9509 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9510 (build-system python-build-system)
9511 (native-inputs
9512 `(("python-twisted" ,python-twisted)))
9513 (home-page "https://pika.readthedocs.org")
9514 (synopsis "Pure Python AMQP Client Library")
9515 (description
9516 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9517Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9518network support library.")
9519 (license license:bsd-3)))
9520
9521(define-public python2-pika
9522 (package-with-python2 python-pika))
9523
d0b6fed6
DM
9524(define-public python-ply
9525 (package
9526 (name "python-ply")
9527 (version "3.8")
9528 (source
9529 (origin
9530 (method url-fetch)
9531 (uri (string-append
9532 "https://pypi.python.org/packages/"
9533 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9534 "/ply-" version ".tar.gz"))
9535 (sha256
9536 (base32
9537 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9538 (build-system python-build-system)
9539 (home-page "http://www.dabeaz.com/ply/")
9540 (synopsis "Python Lex & Yacc")
9541 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9542It uses LR parsing and does extensive error checking.")
3f641af0 9543 (license license:bsd-3)
d0b6fed6
DM
9544 (properties `((python2-variant . ,(delay python2-ply))))))
9545
9546(define-public python2-ply
9547 (package
9548 (inherit (package-with-python2
9549 (strip-python2-variant python-ply)))
9550 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9551
9552(define-public python-tabulate
9553 (package
9554 (name "python-tabulate")
9555 (version "0.7.5")
9556 (source (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "tabulate" version))
9559 (sha256
9560 (base32
9561 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9562 ;; Fix tests
9563 (modules '((guix build utils)))
9564 (snippet '(substitute* '("test/test_cli.py"
9565 "test/test_input.py"
9566 "test/test_output.py"
9567 "test/test_regression.py")
9568 (("from common") "from nose.tools")))))
9569 (build-system python-build-system)
9570 (native-inputs
9571 `(("python-setuptools" ,python-setuptools)
9572 ;; For testing
9573 ("python-nose" ,python-nose)))
9574 (home-page "https://bitbucket.org/astanin/python-tabulate")
9575 (synopsis "Pretty-print tabular data")
9576 (description
9577 "Tabulate is a library and command-line utility to pretty-print tabular
9578data in Python.")
9579 (license license:expat)))
9580
9581(define-public python2-tabulate
9582 (package-with-python2 python-tabulate))
1c4c8a33
SB
9583
9584(define-public python-kazoo
9585 (package
9586 (name "python-kazoo")
9587 (version "2.2.1")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "kazoo" version))
9592 (sha256
9593 (base32
9594 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9595 (build-system python-build-system)
9596 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9597 (native-inputs
c18899e8
SB
9598 `(("python-setuptools" ,python-setuptools)))
9599 (propagated-inputs
9600 `(("python-six" ,python-six)))
1c4c8a33
SB
9601 (home-page "https://kazoo.readthedocs.org")
9602 (synopsis "High-level Zookeeper client library")
9603 (description
9604 "Kazoo is a Python client library for the Apache Zookeeper distributed
9605application service. It is designed to be easy to use and to avoid common
9606programming errors.")
3f641af0 9607 (license license:asl2.0)))
1c4c8a33
SB
9608
9609(define-public python2-kazoo
9610 (package-with-python2 python-kazoo))
45dda35e
SB
9611
9612(define-public python-pykafka
9613 (package
9614 (name "python-pykafka")
9615 (version "2.4.0")
9616 (source (origin
9617 (method url-fetch)
c6bccf71
EF
9618 (uri (string-append
9619 "https://pypi.python.org/packages/8b/3e/"
9620 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9621 "pykafka-" version ".tar.gz"))
45dda35e
SB
9622 (sha256
9623 (base32
9624 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9625 (build-system python-build-system)
9626 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9627 (native-inputs
c8fa3d9b
SB
9628 `(("python-setuptools" ,python-setuptools)))
9629 (propagated-inputs
45dda35e
SB
9630 `(("python-gevent" ,python-gevent)
9631 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9632 ("python-tabulate" ,python-tabulate)))
9633 (inputs
9634 `(("librdkafka" ,librdkafka)))
9635 (home-page "https://pykafka.readthedocs.io/")
9636 (synopsis "Apache Kafka client for Python")
9637 (description
9638 "PyKafka is a client for the Apache Kafka distributed messaging system.
9639It includes Python implementations of Kafka producers and consumers, which
9640are optionally backed by a C extension built on librdkafka.")
3f641af0 9641 (license license:asl2.0)))
45dda35e
SB
9642
9643(define-public python2-pykafka
9644 (package-with-python2 python-pykafka))
a44fd439
DM
9645
9646(define-public python-wcwidth
9647 (package
9648 (name "python-wcwidth")
9649 (version "0.1.6")
9650 (source
9651 (origin
9652 (method url-fetch)
9653 (uri (string-append
9654 "https://pypi.python.org/packages/"
9655 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9656 "wcwidth-" version ".tar.gz"))
9657 (sha256
9658 (base32
9659 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9660 (build-system python-build-system)
9661 (home-page "https://github.com/jquast/wcwidth")
66e07664 9662 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9663 (description "Wcwidth measures the number of terminal column cells of
9664wide-character codes. It is useful for those implementing a terminal emulator,
9665or programs that carefully produce output to be interpreted by one. It is a
9666Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9667specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
9668 (license license:expat)
9669 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
9670
9671(define-public python2-wcwidth
9672 (package
9673 (inherit (package-with-python2
9674 (strip-python2-variant python-wcwidth)))
9675 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
9676
9677(define-public python2-jsonrpclib
9678 (package
9679 (name "python2-jsonrpclib")
9680 (version "0.1.7")
9681 (source (origin
9682 (method url-fetch)
9683 (uri (string-append
9684 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9685 "jsonrpclib-" version ".tar.gz"))
9686 (sha256
9687 (base32
9688 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9689 (build-system python-build-system)
9690 (native-inputs
9691 `(("python2-setuptools" ,python2-setuptools)))
9692 (arguments
9693 `(#:tests? #f
9694 #:python ,python-2))
9695 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9696 (synopsis "Implementation of JSON-RPC specification for Python")
9697 (description
9698 "This library is an implementation of the JSON-RPC specification.
9699It supports both the original 1.0 specification, as well as the
9700new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9701etc.")
3f641af0 9702 (license license:asl2.0)))
9250b0f3
SB
9703
9704(define-public python-chai
9705 (package
9706 (name "python-chai")
9707 (version "1.1.1")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "chai" version))
9711 (sha256
9712 (base32
9713 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9714 (build-system python-build-system)
9715 (native-inputs
9716 `(("python-setuptools" ,python-setuptools)))
9717 (home-page "https://github.com/agoragames/chai")
9718 (synopsis "Mocking framework for Python")
9719 (description
9720 "Chai provides an api for mocking, stubbing and spying your python
9721objects, patterned after the Mocha library for Ruby.")
3f641af0 9722 (license license:bsd-3)))
9250b0f3
SB
9723
9724(define-public python2-chai
9725 (package-with-python2 python-chai))
9726
ae43baa8
SB
9727(define-public python-arrow
9728 (package
9729 (name "python-arrow")
9730 (version "0.8.0")
9731 (source (origin
9732 (method url-fetch)
9733 (uri (pypi-uri "arrow" version))
9734 (sha256
9735 (base32
9736 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9737 (build-system python-build-system)
9738 (native-inputs
9739 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
9740 ;; For testing
9741 ("python-chai" ,python-chai)
9742 ("python-simplejson" ,python-simplejson)))
36aed736
SB
9743 (propagated-inputs
9744 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
9745 (home-page "https://github.com/crsmithdev/arrow/")
9746 (synopsis "Dates and times for Python")
9747 (description
9748 "Arrow is a Python library to creating, manipulating, formatting and
9749converting dates, times, and timestamps. It implements and updates the
9750datetime type.")
3f641af0 9751 (license license:asl2.0)))
ae43baa8
SB
9752
9753(define-public python2-arrow
9754 (package-with-python2 python-arrow))
9755
1f2b62a4
SB
9756(define-public python-inflection
9757 (package
9758 (name "python-inflection")
9759 (version "0.3.1")
9760 (source
9761 (origin (method url-fetch)
9762 (uri (pypi-uri "inflection" version))
9763 (sha256
9764 (base32
9765 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9766 (build-system python-build-system)
9767 (native-inputs
9768 `(("python-setuptools" ,python-setuptools)))
9769 (home-page "http://github.com/jpvanhal/inflection")
9770 (synopsis "Python string transformation library")
9771 (description
9772 "Inflection is a string transformation library. It singularizes
9773and pluralizes English words, and transforms strings from CamelCase to
9774underscored string.")
9775 (license license:expat)))
9776
9777(define-public python2-inflection
9778 (package-with-python2 python-inflection))
9779
18995566
SB
9780(define-public python-pylev
9781 (package
9782 (name "python-pylev")
9783 (version "1.3.0")
9784 (source (origin
9785 (method url-fetch)
9786 (uri (pypi-uri "pylev" version))
9787 (sha256
9788 (base32
9789 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9790 (build-system python-build-system)
9791 (native-inputs
9792 `(("python-setuptools" ,python-setuptools)))
9793 (home-page "http://github.com/toastdriven/pylev")
9794 (synopsis "Levenshtein distance implementation in Python")
9795 (description "Pure Python Levenshtein implementation, based off the
9796Wikipedia code samples at
9797@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 9798 (license license:bsd-3)))
18995566
SB
9799
9800(define-public python2-pylev
9801 (package-with-python2 python-pylev))
9802
f5deff7a
SB
9803(define-public python-cleo
9804 (package
9805 (name "python-cleo")
9806 (version "0.4.1")
9807 (source (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "cleo" version))
9810 (sha256
9811 (base32
9812 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9813 (build-system python-build-system)
9814 (native-inputs
9403150a 9815 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
9816 ;; For testing
9817 ("python-mock" ,python-mock)
9818 ("python-pytest" ,python-pytest)))
9403150a
SB
9819 (propagated-inputs
9820 `(("python-psutil" ,python-psutil)
9821 ("python-pylev" ,python-pylev)))
f5deff7a
SB
9822 (home-page "https://github.com/sdispater/cleo")
9823 (synopsis "Command-line arguments library for Python")
9824 (description
9825 "Cleo allows you to create command-line commands with signature in
9826docstring and colored output.")
9827 (license license:expat)))
9828
9829(define-public python2-cleo
9830 (package-with-python2 python-cleo))
9831
77cadb43
SB
9832(define-public python-lazy-object-proxy
9833 (package
9834 (name "python-lazy-object-proxy")
9835 (version "1.2.2")
9836 (source (origin
9837 (method url-fetch)
9838 (uri (pypi-uri "lazy-object-proxy" version))
9839 (sha256
9840 (base32
9841 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9842 (build-system python-build-system)
9843 (native-inputs
9844 `(("python-setuptools" ,python-setuptools)))
9845 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9846 (synopsis "Lazy object proxy for python")
9847 (description
9848 "Lazy object proxy is an object that wraps a callable but defers the call
9849until the object is actually required, and caches the result of said call.")
3f641af0 9850 (license license:bsd-2)))
77cadb43
SB
9851
9852(define-public python2-lazy-object-proxy
9853 (package-with-python2 python-lazy-object-proxy))
9854
5477e05f
SB
9855(define-public python-dnspython
9856 (package
9857 (name "python-dnspython")
9858 (version "1.14.0")
9859 (source (origin
9860 (method url-fetch)
9861 (uri (string-append "http://www.dnspython.org/kits/"
9862 version "/dnspython-" version ".tar.gz"))
9863 (sha256
9864 (base32
9865 "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
9866 (build-system python-build-system)
9867 (arguments '(#:tests? #f)) ; XXX: requires internet access
9868 (native-inputs
9869 `(("python-setuptools" ,python-setuptools)))
9870 (home-page "http://www.dnspython.org")
9871 (synopsis "DNS toolkit for Python")
9872 (description
9873 "dnspython is a DNS toolkit for Python. It supports almost all record
9874types. It can be used for queries, zone transfers, and dynamic updates.
9875It supports TSIG authenticated messages and EDNS0.")
9876 (license license:expat)))
9877
9878(define-public python2-dnspython
9879 (package-with-python2 python-dnspython))
9880
22711e25
SB
9881(define-public python-email-validator
9882 (package
9883 (name "python-email-validator")
9884 (version "1.0.1")
9885 (source
9886 (origin (method url-fetch)
9887 (uri (pypi-uri "email_validator" version))
9888 (sha256
9889 (base32
9890 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9891 (build-system python-build-system)
9892 (arguments
9893 '(#:phases
9894 (modify-phases %standard-phases
9895 (add-before 'build 'use-dnspython
9896 (lambda _
9897 (substitute* "setup.py"
9898 (("dnspython3") "dnspython"))
9899 #t)))))
9900 (native-inputs
d42560bd
SB
9901 `(("python-setuptools" ,python-setuptools)))
9902 (propagated-inputs
22711e25 9903 `(("python-dnspython" ,python-dnspython)
d42560bd 9904 ("python-idna" ,python-idna)))
22711e25
SB
9905 (home-page "https://github.com/JoshData/python-email-validator")
9906 (synopsis "Email address validation library for Python")
9907 (description
9908 "This library validates email address syntax and deliverability.")
3f641af0 9909 (license license:cc0)))
22711e25
SB
9910
9911(define-public python2-email-validator
9912 (package-with-python2 python-email-validator))
9913
8987d91e
SB
9914(define-public python-ukpostcodeparser
9915 (package
9916 (name "python-ukpostcodeparser")
9917 (version "1.0.3")
9918 (source (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "UkPostcodeParser" version))
9921 (sha256
9922 (base32
9923 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9924 (build-system python-build-system)
9925 (native-inputs
9926 `(("python-setuptools" ,python-setuptools)))
9927 (home-page "https://github.com/hamstah/ukpostcodeparser")
9928 (synopsis "UK Postcode parser for Python")
9929 (description
9930 "This library provides the @code{parse_uk_postcode} function for
9931parsing UK postcodes.")
9932 (license license:expat)))
9933
9934(define-public python2-ukpostcodeparser
9935 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
9936
9937(define-public python-fake-factory
9938 (package
9939 (name "python-fake-factory")
7adc698f 9940 (version "0.7.2")
ea92ae01
SB
9941 (source (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "fake-factory" version))
9944 (sha256
9945 (base32
7adc698f 9946 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 9947 (build-system python-build-system)
ea92ae01 9948 (native-inputs
bbcd7297 9949 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
9950 ;; For testing
9951 ("python-email-validator" ,python-email-validator)
9952 ("python-mock" ,python-mock)
9953 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
9954 (propagated-inputs
9955 `(("python-dateutil" ,python-dateutil-2)
9956 ("python-six" ,python-six)))
7adc698f 9957 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
9958 (synopsis "Python package that generates fake data")
9959 (description
9960 "Faker is a Python package that generates fake data such as names,
9961addresses, and phone numbers.")
9962 (license license:expat)
9963 (properties `((python2-variant . ,(delay python2-fake-factory))))))
9964
9965(define-public python2-fake-factory
9966 (let ((base (package-with-python2 (strip-python2-variant
9967 python-fake-factory))))
9968 (package
9969 (inherit base)
24c9aa18 9970 (propagated-inputs
ea92ae01 9971 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 9972 ,@(package-propagated-inputs base))))))
ea92ae01 9973
b49504fd
SB
9974(define-public python-pyaml
9975 (package
9976 (name "python-pyaml")
9977 (version "15.8.2")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "pyaml" version))
9981 (sha256
9982 (base32
9983 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
9984 (build-system python-build-system)
9985 (native-inputs
9986 `(("python-setuptools" ,python-setuptools)))
9987 (propagated-inputs
9988 `(("python-pyyaml" ,python-pyyaml)))
9989 (home-page "https://github.com/mk-fg/pretty-yaml")
9990 (synopsis "YAML pretty-print library for Python")
9991 (description
9992 "pyaml is a PyYAML based python module to produce pretty and readable
9993YAML-serialized data.")
3f641af0 9994 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
9995
9996(define-public python2-pyaml
9997 (package-with-python2 python-pyaml))
9998
347175a2
SB
9999(define-public python-flexmock
10000 (package
10001 (name "python-flexmock")
10002 (version "0.10.2")
10003 (source (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "flexmock" version))
10006 (sha256
10007 (base32
10008 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10009 (build-system python-build-system)
10010 (native-inputs
10011 `(("python-setuptools" ,python-setuptools)))
10012 (home-page "https://flexmock.readthedocs.org")
10013 (synopsis "Testing library for Python")
10014 (description
10015 "flexmock is a testing library for Python that makes it easy to create
10016mocks, stubs and fakes.")
3f641af0 10017 (license license:bsd-3)))
347175a2
SB
10018
10019(define-public python2-flexmock
10020 (package-with-python2 python-flexmock))
10021
5a744191
SB
10022(define-public python-orator
10023 (package
10024 (name "python-orator")
10025 (version "0.8.2")
10026 (source (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "orator" version))
10029 (sha256
10030 (base32
10031 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10032 (build-system python-build-system)
10033 (arguments '(#:tests? #f)) ; no tests
10034 (native-inputs
b2676030
SB
10035 `(("python-setuptools" ,python-setuptools)))
10036 (propagated-inputs
5a744191
SB
10037 `(("python-arrow" ,python-arrow)
10038 ("python-blinker" ,python-blinker)
10039 ("python-cleo" ,python-cleo)
10040 ("python-fake-factory" ,python-fake-factory)
10041 ("python-inflection" ,python-inflection)
10042 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10043 ("python-pyaml" ,python-pyaml)
5a744191
SB
10044 ("python-simplejson" ,python-simplejson)
10045 ("python-wrapt" ,python-wrapt)))
10046 (home-page "https://orator-orm.com/")
10047 (synopsis "ActiveRecord ORM for Python")
10048 (description
10049 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10050implementation for Python.")
10051 (license license:expat)
10052 (properties `((python2-variant . ,(delay python2-orator))))))
10053
10054(define-public python2-orator
10055 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10056 (package
10057 (inherit base)
06961617 10058 (propagated-inputs
5a744191 10059 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10060 ,@(package-propagated-inputs base))))))
f4155188
DM
10061
10062(define-public python-prompt-toolkit
10063 (package
10064 (name "python-prompt-toolkit")
d15e2ef0 10065 (version "1.0.7")
f4155188
DM
10066 (source
10067 (origin
10068 (method url-fetch)
d15e2ef0 10069 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10070 (sha256
10071 (base32
d15e2ef0 10072 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188
DM
10073 (build-system python-build-system)
10074 (inputs `(("python-wcwidth" ,python-wcwidth)
10075 ("python-pygments" ,python-pygments)))
10076 (native-inputs `(("python-six" ,python-six)))
10077 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10078 (synopsis "Library for building command line interfaces in Python")
10079 (description
10080 "Prompt-Toolkit is a library for building interactive command line
10081interfaces in Python. It's like GNU Readline but it also features syntax
10082highlighting while typing, out-of-the-box multi-line input editing, advanced
10083code completion, incremental search, support for Chinese double-width
10084characters, mouse support, and auto suggestions.")
3f641af0 10085 (license license:bsd-3)
f4155188
DM
10086 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10087
10088(define-public python2-prompt-toolkit
10089 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10090 (package
10091 (inherit base)
10092 (native-inputs
10093 `(("python2-setuptools" ,python2-setuptools)
10094 ,@(package-native-inputs base))))))
a502dfbf
DM
10095
10096(define-public python-jedi
10097 (package
10098 (name "python-jedi")
10099 (version "0.9.0")
10100 (source
10101 (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "jedi" version))
10104 (sha256
10105 (base32
10106 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10107 (build-system python-build-system)
10108 (home-page "https://github.com/davidhalter/jedi")
10109 (synopsis
10110 "Autocompletion for Python that can be used for text editors")
10111 (description
10112 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10113 (license license:expat)
10114 (properties `((python2-variant . ,(delay python2-jedi))))))
10115
10116(define-public python2-jedi
10117 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10118 (package
10119 (inherit base)
10120 (native-inputs
10121 `(("python2-setuptools" ,python2-setuptools)
10122 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10123
10124(define-public ptpython
10125 (package
10126 (name "ptpython")
10127 (version "0.34")
10128 (source (origin
10129 (method url-fetch)
10130 (uri (pypi-uri "ptpython" version))
10131 (sha256
10132 (base32
10133 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10134 (build-system python-build-system)
10135 (inputs
10136 `(("python-docopt" ,python-docopt)
10137 ("python-jedi" ,python-jedi)
10138 ("python-prompt-toolkit" ,python-prompt-toolkit)
10139 ("python-pygments" ,python-pygments)
10140 ("python-setuptools" ,python-setuptools)))
10141 (home-page "https://github.com/jonathanslenders/ptpython")
10142 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10143 (description
10144 "ptpython is a Python read-eval-print loop with IDE-like features.
10145It supports syntax highlighting, multiline editing, autocompletion, mouse,
10146color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10147etc.")
3f641af0 10148 (license license:bsd-3)
c2f0dc6e
DM
10149 (properties `((python2-variant . ,(delay ptpython-2))))))
10150
10151(define-public ptpython-2
10152 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10153 (package
10154 (inherit base)
10155 (name "ptpython2"))))
b227f0be 10156
b04a52a6
DJ
10157(define-public python-requests-oauthlib
10158 (package
10159 (name "python-requests-oauthlib")
10160 (version "0.6.2")
10161 (source
10162 (origin
10163 (method url-fetch)
10164 (uri (pypi-uri "requests-oauthlib" version))
10165 (sha256
10166 (base32
10167 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10168 (build-system python-build-system)
10169 (arguments
10170 `(#:phases
10171 (modify-phases %standard-phases
10172 ;; removes tests that require network access
10173 (add-before 'check 'pre-check
10174 (lambda _
10175 (delete-file "tests/test_core.py")
10176 #t)))))
10177 (native-inputs
10178 `(("python-requests-mock" ,python-requests-mock)
10179 ("python-mock" ,python-mock)))
10180 (inputs
10181 `(("python-oauthlib" ,python-oauthlib)
10182 ("python-requests" ,python-requests)))
10183 (home-page
10184 "https://github.com/requests/requests-oauthlib")
10185 (synopsis
10186 "OAuthlib authentication support for Requests")
10187 (description
10188 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10189provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10190 (license license:isc)
10191 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10192
10193(define-public python2-requests-oauthlib
10194 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10195 (package
10196 (inherit base)
10197 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10198 ,@(package-native-inputs base))))))
10199
b227f0be 10200(define-public python-stem
10201 (package
10202 (name "python-stem")
10203 (version "1.4.1b")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "stem" version ".tar.bz2"))
10208 (sha256
10209 (base32
10210 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10211 (build-system python-build-system)
10212 (arguments
10213 `(#:phases
10214 (modify-phases %standard-phases
10215 (replace 'check
10216 (lambda _
10217 (zero? (system* "./run_tests.py" "--unit")))))))
10218 (native-inputs
10219 `(("python-mock" ,python-mock)
10220 ("python-pep8" ,python-pep8)
10221 ("python-pyflakes" ,python-pyflakes)))
10222 (inputs
10223 `(("python-pycrypto" ,python-pycrypto)))
10224 (home-page "https://stem.torproject.org/")
10225 (synopsis
10226 "Python controller library that allows applications to interact with Tor")
10227 (description
10228 "Stem is a Python controller library for Tor. With it you can use Tor's
10229control protocol to script against the Tor process and read descriptor data
10230relays publish about themselves.")
3f641af0 10231 (license license:lgpl3)))
b227f0be 10232
10233(define-public python2-stem
10234 (package-with-python2 python-stem))
517a6c0c
DM
10235
10236(define-public python-pyserial
10237 (package
10238 (name "python-pyserial")
10239 (version "3.1.1")
10240 (source
10241 (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "pyserial" version))
10244 (sha256
10245 (base32
10246 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10247 (build-system python-build-system)
10248 (home-page
10249 "https://github.com/pyserial/pyserial")
10250 (synopsis "Python Serial Port Bindings")
10251 (description "@code{pyserial} provide serial port bindings for Python. It
10252supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10253and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10254 (license license:bsd-3)
517a6c0c
DM
10255 (properties `((python2-variant . ,(delay python2-pyserial))))))
10256
10257(define-public python2-pyserial
10258 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10259 (package
10260 (inherit base)
10261 (native-inputs
10262 `(("python2-setuptools" ,python2-setuptools)
10263 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10264
10265(define-public python-kivy
10266 (package
10267 (name "python-kivy")
10268 (version "1.9.1")
10269 (source
10270 (origin
10271 (method url-fetch)
10272 (uri (pypi-uri "kivy" version))
10273 (file-name (string-append name "-" version ".tar.gz"))
10274 (sha256
10275 (base32
10276 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10277 (build-system python-build-system)
10278 (arguments
10279 `(#:tests? #f ; Tests require many optional packages
10280 #:phases
10281 (modify-phases %standard-phases
10282 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10283 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10284 (lambda* (#:key inputs #:allow-other-keys)
10285 (setenv "KIVY_SDL2_PATH"
10286 (string-append (assoc-ref inputs "sdl-union")
10287 "/include/SDL2"))
10288 #t)))))
10289 (native-inputs
10290 `(("pkg-config" ,pkg-config)))
10291 (inputs
10292 `(("python-cython" ,python-cython)
10293 ("gstreamer" ,gstreamer)
10294 ("mesa" ,mesa)
10295 ("sdl-union"
10296 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10297 (home-page "http://kivy.org")
10298 (synopsis
10299 "Multitouch application framework")
10300 (description
10301 "A software library for rapid development of
10302hardware-accelerated multitouch applications.")
10303 (license license:expat)))
10304
10305(define-public python2-kivy
10306 (package-with-python2 python-kivy))
10307
10308(define-public python-kivy-next
10309 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10310 (revision "1"))
10311 (package (inherit python-kivy)
10312 (name "python-kivy-next")
d80a71eb 10313 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10314 (string-take commit 7)))
10315 (source
10316 (origin
10317 (method git-fetch)
10318 (uri (git-reference
10319 (url "https://github.com/kivy/kivy")
10320 (commit commit)))
10321 (file-name (string-append name "-" version "-checkout"))
10322 (sha256
10323 (base32
10324 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10325
10326(define-public python2-kivy-next
10327 (package-with-python2 python-kivy-next))
8794bd8b
DC
10328
10329(define-public python-binaryornot
10330 (package
10331 (name "python-binaryornot")
10332 (version "0.4.0")
10333 (source (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "binaryornot" version))
10336 (sha256
10337 (base32
10338 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10339 (build-system python-build-system)
10340 (inputs
10341 `(("python-chardet" ,python-chardet)
10342 ("python-hypothesis" ,python-hypothesis)))
10343 (home-page "https://github.com/audreyr/binaryornot")
10344 (synopsis "Package to check if a file is binary or text")
10345 (description "Ultra-lightweight pure Python package to check if a file is
10346binary or text.")
10347 (license license:bsd-3)
10348 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10349
10350(define-public python2-binaryornot
10351 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10352 (package (inherit base)
10353 (native-inputs
10354 `(("python2-setuptools" ,python2-setuptools)
10355 ,@(package-native-inputs base)))
10356 (inputs
10357 `(("python2-enum34" ,python2-enum34)
10358 ,@(package-inputs base))))))
a9ac982a
DC
10359
10360(define-public python-nltk
10361 (package
10362 (name "python-nltk")
10363 (version "3.2.1")
10364 (source (origin
10365 (method url-fetch)
10366 (uri (pypi-uri "nltk" version))
10367 (sha256
10368 (base32
10369 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10370 (build-system python-build-system)
10371 (home-page "http://nltk.org/")
10372 (synopsis "Natural Language Toolkit")
10373 (description "It provides interfaces to over 50 corpora and lexical
10374resources such as WordNet, along with a suite of text processing libraries
10375for classification, tokenization, stemming, tagging, parsing, and semantic
10376reasoning, wrappers for natural language processing libraries.")
10377 (license license:asl2.0)
10378 (properties `((python2-variant . ,(delay python2-nltk))))))
10379
10380(define-public python2-nltk
10381 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10382 (package (inherit base)
10383 (native-inputs
10384 `(("python2-setuptools" ,python2-setuptools)
10385 ,@(package-native-inputs base))))))
691cd90d
DC
10386
10387(define-public python-pymongo
10388 (package
10389 (name "python-pymongo")
10390 (version "3.3.0")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "pymongo" version))
10394 (sha256
10395 (base32
10396 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10397 (build-system python-build-system)
10398 (inputs
10399 `(("python-certifi" ,python-certifi)))
10400 (home-page "http://github.com/mongodb/mongo-python-driver")
10401 (synopsis "Python driver for MongoDB")
10402 (description "Python driver for MongoDB.")
10403 (license license:asl2.0)
10404 (properties `((python2-variant . ,(delay python2-pymongo))))))
10405
10406(define-public python2-pymongo
10407 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10408 (package (inherit base)
10409 (native-inputs
10410 `(("python2-setuptools" ,python2-setuptools)
10411 ,@(package-native-inputs base))))))
6a6c9d43
DC
10412
10413(define-public python-sh
10414 (package
10415 (name "python-sh")
10416 (version "1.11")
10417 (source (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "sh" version))
10420 (sha256
10421 (base32
10422 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10423 (build-system python-build-system)
10424 (arguments
10425 `(#:tests? #f)) ; no tests
10426 (home-page "https://github.com/amoffat/sh")
10427 (synopsis "Python subprocess interface")
10428 (description "Abstracts process invocation by providing a function
10429interface for programs.")
10430 (license license:expat)
10431 (properties `((python2-variant . ,(delay python2-sh))))))
10432
10433(define-public python2-sh
10434 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10435 (package (inherit base)
10436 (native-inputs
10437 `(("python2-setuptools" ,python2-setuptools)
10438 ,@(package-native-inputs base))))))
05b59190 10439
25702397
EF
10440(define-public python-consul
10441 (package
10442 (name "python-consul")
10443 (version "0.6.1")
10444 (source
10445 (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "python-consul" version))
10448 (sha256
10449 (base32
10450 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10451 (build-system python-build-system)
10452 (native-inputs
10453 `(("python-pytest" ,python-pytest)
10454 ("python-requests" ,python-requests)
10455 ("python-six" ,python-six)))
10456 (home-page "https://github.com/cablehead/python-consul")
10457 (synopsis "Python client for Consul")
10458 (description
10459 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10460discovery, monitoring and configuration.")
10461 (license license:expat)))
10462
10463(define-public python2-consul
10464 (let ((consul (package-with-python2 python-consul)))
10465 (package (inherit consul)
10466 (native-inputs
10467 `(("python2-setuptools" ,python2-setuptools)
10468 ,@(package-native-inputs consul))))))
10469
05b59190
DC
10470(define-public python-schematics
10471 (package
10472 (name "python-schematics")
10473 (version "1.1.1")
10474 (source
10475 (origin
10476 (method url-fetch)
10477 (uri (string-append
10478 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10479 (file-name (string-append name "-" version ".tar.gz"))
10480 (sha256
10481 (base32
10482 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10483 (build-system python-build-system)
10484 (inputs
10485 `(("python-six" ,python-six)))
10486 (arguments
10487 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10488 ; version requirements (eg python-coveralls)
10489 (home-page "https://github.com/schematics/schematics")
10490 (synopsis "Python Data Structures for Humans")
10491 (description "Python Data Structures for Humans.")
10492 (license license:bsd-3)
10493 (properties `((python2-variant . ,(delay python2-schematics))))))
10494
10495(define-public python2-schematics
10496 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10497 (package (inherit base)
10498 (native-inputs
10499 `(("python2-setuptools" ,python2-setuptools)
10500 ,@(package-native-inputs base))))))
d6907ff7
DC
10501
10502(define-public python-publicsuffix
10503 (package
10504 (name "python-publicsuffix")
10505 (version "1.1.0")
10506 (source (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "publicsuffix" version))
10509 (sha256
10510 (base32
10511 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10512 (build-system python-build-system)
10513 (arguments
10514 `(#:tests? #f)) ; tests use the internet
10515 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10516 (synopsis "Get suffix for a domain name")
10517 (description "Get a public suffix for a domain name using the Public Suffix
10518List.")
10519 (license license:expat)
10520 (properties `((python2-variant . ,(delay python2-nltk))))))
10521
10522(define-public python2-publicsuffix
10523 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10524 (package (inherit base)
10525 (native-inputs
10526 `(("python2-setuptools" ,python2-setuptools)
10527 ,@(package-native-inputs base))))))
b2319996
DC
10528
10529(define-public python-publicsuffix2
10530 (package
10531 (name "python-publicsuffix2")
10532 (version "2.20160621")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10537 (sha256
10538 (base32
10539 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10540 (build-system python-build-system)
10541 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10542 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10543 (description "Get a public suffix for a domain name using the Public Suffix
10544List. Forked from and using the same API as the publicsuffix package.")
10545 (license (list license:expat license:mpl2.0))
10546 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10547
10548(define-public python2-publicsuffix2
10549 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10550 (package (inherit base)
10551 (native-inputs
10552 `(("python2-setuptools" ,python2-setuptools)
10553 ,@(package-native-inputs base))))))
81f1515d
DC
10554
10555(define-public python-url
10556 (package
10557 (name "python-url")
10558 (version "0.2.0")
10559 (source (origin
10560 (method url-fetch)
10561 (uri (pypi-uri "url" version))
10562 (sha256
10563 (base32
10564 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10565 (build-system python-build-system)
10566 (inputs
10567 `(("python-publicsuffix" ,python-publicsuffix)))
10568 (native-inputs
10569 `(("python-coverage" ,python-coverage)
10570 ("python-nose" ,python-nose)))
10571 (arguments
10572 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10573 (home-page "http://github.com/seomoz/url-py")
10574 (synopsis "URL Parsing")
10575 (description "Library for parsing urls.")
10576 (license license:expat)
10577 (properties `((python2-variant . ,(delay python2-url))))))
10578
10579(define-public python2-url
10580 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10581 (package (inherit base)
10582 (inputs
10583 `(("python2-publicsuffix" ,python2-publicsuffix)))
10584 (native-inputs
10585 `(("python2-setuptools" ,python2-setuptools)
10586 ,@(package-native-inputs base))))))
974ee2c1
TS
10587
10588(define-public python-freezegun
10589 (package
10590 (name "python-freezegun")
10591 (version "0.3.7")
10592 (source
10593 (origin
10594 (method url-fetch)
10595 (uri (pypi-uri "freezegun" version))
10596 (sha256
10597 (base32
10598 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10599 (build-system python-build-system)
10600 (native-inputs
10601 `(("python-mock" ,python-mock)
10602 ("python-nose" ,python-nose)
10603 ("python-coverage" ,python-coverage)
10604 ("python-dateutil-2" ,python-dateutil-2)))
10605 (inputs
10606 `(("python-six" ,python-six)))
10607 (arguments
10608 `(#:phases (modify-phases %standard-phases
10609 ;; The tests are normally executed via `make test`, but the PyPi
10610 ;; package does not include the Makefile.
10611 (replace 'check
10612 (lambda _
10613 (zero? (system* "nosetests" "./tests/")))))))
10614 (home-page "https://github.com/spulec/freezegun")
10615 (synopsis "Test utility for mocking the datetime module")
10616 (description
10617 "FreezeGun is a library that allows your python tests to travel through
10618time by mocking the datetime module.")
10619 (license license:asl2.0)))
10620
10621(define-public python2-freezegun
10622 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10623 (package (inherit base)
10624 (native-inputs
10625 `(("python2-setuptools" ,python2-setuptools)
10626 ,@(package-native-inputs base))))))
dddcb25c
MB
10627
10628(define-public python-odfpy
10629 (package
10630 (name "python-odfpy")
10631 (version "1.3.3")
10632 (source (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "odfpy" version))
10635 (sha256
10636 (base32
10637 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10638 (arguments
10639 `(#:modules ((srfi srfi-1)
10640 (guix build python-build-system)
10641 (guix build utils))
10642 #:phases
10643 (modify-phases %standard-phases
10644 (replace 'check
10645 ;; The test runner invokes python2 and python3 for test*.py.
10646 ;; To avoid having both in inputs, we replicate it here.
10647 (lambda _
10648 (every (lambda (test-file)
10649 (zero? (system* "python" test-file)))
10650 (find-files "tests" "^test.*\\.py$")))))))
10651 (build-system python-build-system)
10652 (home-page "https://github.com/eea/odfpy")
10653 (synopsis "Python API and tools to manipulate OpenDocument files")
10654 (description "Collection of libraries and utility programs written in
10655Python to manipulate OpenDocument 1.2 files.")
10656 (license
10657 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10658 ;; number of files with other licenses.
10659 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10660
10661(define-public python2-odfpy
10662 (package-with-python2 python-odfpy))
b30565bd
MB
10663
10664(define-public python-cachecontrol
10665 (package
10666 (name "python-cachecontrol")
10667 (version "0.11.6")
10668 (source
10669 (origin
10670 (method url-fetch)
10671 ;; Pypi does not have tests.
10672 (uri (string-append
10673 "https://github.com/ionrock/cachecontrol/archive/v"
10674 version ".tar.gz"))
10675 (file-name (string-append name "-" version ".tar.gz"))
10676 (sha256
10677 (base32
10678 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10679 (build-system python-build-system)
10680 (arguments
10681 `(#:phases
10682 (modify-phases %standard-phases
10683 (replace 'check
10684 (lambda _
10685 ;; Drop test that requires internet access.
10686 (delete-file "tests/test_regressions.py")
10687 (setenv "PYTHONPATH"
10688 (string-append (getcwd) "/build/lib:"
10689 (getenv "PYTHONPATH")))
10690 (zero? (system* "py.test" "-vv")))))))
10691 (native-inputs
10692 `(("python-pytest" ,python-pytest)
10693 ("python-redis" ,python-redis)
10694 ("python-webtest" ,python-webtest)
10695 ("python-mock" ,python-mock)))
10696 (propagated-inputs
10697 `(("python-requests" ,python-requests)
10698 ("python-lockfile" ,python-lockfile)))
10699 (home-page "https://github.com/ionrock/cachecontrol")
10700 (synopsis "The httplib2 caching algorithms for use with requests")
10701 (description "CacheControl is a port of the caching algorithms in
10702@code{httplib2} for use with @code{requests} session objects.")
10703 (license license:asl2.0)
dd447621 10704 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
10705
10706(define-public python2-cachecontrol
10707 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10708 (package (inherit base)
10709 (native-inputs
10710 `(("python2-setuptools" ,python2-setuptools)
10711 ,@(package-native-inputs base))))))
243db824
DM
10712
10713(define-public python-lit
10714 (package
10715 (name "python-lit")
10716 (version "0.5.0")
10717 (source
10718 (origin
10719 (method url-fetch)
10720 (uri (pypi-uri "lit" version))
10721 (sha256
10722 (base32
10723 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10724 (build-system python-build-system)
10725 (home-page "http://llvm.org/")
10726 (synopsis "LLVM Software Testing Tool")
10727 (description "@code{lit} is a portable tool for executing LLVM and Clang
10728style test suites, summarizing their results, and providing indication of
10729failures.")
10730 (license license:ncsa)
10731 (properties `((python2-variant . ,(delay python2-lit))))))
10732
10733(define-public python2-lit
10734 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10735 (package
10736 (inherit base)
10737 (native-inputs
10738 `(("python2-setuptools" ,python2-setuptools)
10739 ,@(package-native-inputs base))))))
66f95b20
MB
10740
10741(define-public python-pytest-pep8
10742 (package
10743 (name "python-pytest-pep8")
10744 (version "1.0.6")
10745 (source (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "pytest-pep8" version))
10748 (sha256
10749 (base32
10750 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10751 (build-system python-build-system)
10752 (arguments
10753 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10754 ;; Prevent creation of the egg. This works around
10755 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10756 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10757 (native-inputs
10758 `(("python-pytest" ,python-pytest)))
10759 (propagated-inputs
10760 `(("python-pep8" ,python-pep8)))
10761 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10762 (synopsis "Py.test plugin to check PEP8 requirements")
10763 (description "Pytest plugin for checking PEP8 compliance.")
10764 (license license:expat)
10765 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10766
10767(define-public python2-pytest-pep8
10768 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10769 (package (inherit base)
10770 (native-inputs
10771 `(("python2-setuptools" ,python2-setuptools)
10772 ,@(package-native-inputs base))))))
df94a6b5
MB
10773
10774(define-public python-pytest-flakes
10775 (package
10776 (name "python-pytest-flakes")
10777 (version "1.0.1")
10778 (source (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "pytest-flakes" version))
10781 (sha256
10782 (base32
10783 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10784 (build-system python-build-system)
10785 (arguments
10786 `(;; Prevent creation of the egg. This works around
10787 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10788 #:configure-flags '("--single-version-externally-managed" "--root=/")
10789 #:phases
10790 (modify-phases %standard-phases
10791 (delete 'check)
10792 (add-after 'install 'check
10793 (lambda _ ; It's easier to run tests after install.
10794 (zero? (system* "py.test" "-vv")))))))
10795 (native-inputs
10796 `(("python-coverage" ,python-coverage)
10797 ("python-pytest" ,python-pytest)
10798 ("python-pytest-cache" ,python-pytest-cache)
10799 ("python-pytest-pep8" ,python-pytest-pep8)))
10800 (propagated-inputs
10801 `(("python-pyflakes" ,python-pyflakes)))
10802 (home-page "https://github.com/fschulze/pytest-flakes")
10803 (synopsis "Py.test plugin to check source code with pyflakes")
10804 (description "Pytest plugin for checking Python source code with pyflakes.")
10805 (license license:expat)
10806 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10807
10808(define-public python2-pytest-flakes
10809 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10810 (package (inherit base)
10811 (native-inputs
10812 `(("python2-setuptools" ,python2-setuptools)
10813 ,@(package-native-inputs base))))))
5467ea62
MB
10814
10815(define-public python-natsort
10816 (package
10817 (name "python-natsort")
10818 (version "5.0.1")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "natsort" version))
10822 (sha256
10823 (base32
10824 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10825 (build-system python-build-system)
10826 (arguments
10827 `(#:phases
10828 (modify-phases %standard-phases
10829 (add-before 'check 'set-cachedir
10830 ;; Tests require write access to $HOME by default
10831 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10832 (native-inputs
10833 `(("python-hypothesis" ,python-hypothesis)
10834 ("python-pytest-cache" ,python-pytest-cache)
10835 ("python-pytest-cov" ,python-pytest-cov)
10836 ("python-pytest-flakes" ,python-pytest-flakes)
10837 ("python-pytest-pep8" ,python-pytest-pep8)))
10838 (propagated-inputs ; TODO: Add python-fastnumbers.
10839 `(("python-pyicu" ,python-pyicu)))
10840 (home-page "https://github.com/SethMMorton/natsort")
10841 (synopsis "Natural sorting for python and shell")
10842 (description
10843 "Natsort lets you apply natural sorting on lists instead of
10844lexicographical. If you use the built-in @code{sorted} method in python
10845on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10846returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10847function @code{natsorted} that identifies numbers and sorts them separately
10848from strings. It can also sort version numbers, real numbers, mixed types
10849and more, and comes with a shell command @command{natsort} that exposes this
10850functionality in the command line.")
10851 (license license:expat)
10852 (properties `((python2-variant . ,(delay python2-natsort))))))
10853
10854(define-public python2-natsort
10855 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10856 (package (inherit base)
10857 (native-inputs
10858 `(("python2-setuptools" ,python2-setuptools)
10859 ("python2-pathlib" ,python2-pathlib)
10860 ("python2-mock" ,python2-mock)
10861 ("python2-enum34" ,python2-enum34)
10862 ,@(package-native-inputs base))))))
4efb9c54
SR
10863
10864(define-public python-glances
10865 (package
10866 (name "python-glances")
10867 (version "2.7.1")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "Glances" version))
10872 (sha256
10873 (base32
10874 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10875 (build-system python-build-system)
10876 (inputs
10877 `(("python-psutil" ,python-psutil)))
10878 (home-page
10879 "https://github.com/nicolargo/glances")
10880 (synopsis
10881 "A cross-platform curses-based monitoring tool")
10882 (description
10883 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10884Glances uses the PsUtil library to get information from your system. It monitors
10885CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10886 (license license:lgpl3+)
10887 (properties `((python2-variant . ,(delay python2-glances))))))
10888
10889(define-public python2-glances
10890 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
10891 (package
10892 (inherit base)
10893 (native-inputs
10894 `(("python2-setuptools" ,python2-setuptools)
10895 ,@(package-native-inputs base))))))
05b7a593
EF
10896
10897(define-public python-graphql-core
10898 (package
10899 (name "python-graphql-core")
10900 (version "0.5.3")
10901 (source
10902 (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "graphql-core" version))
10905 (sha256
10906 (base32
10907 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10908 (build-system python-build-system)
10909 (arguments
10910 `(#:phases
10911 (modify-phases %standard-phases
10912 (add-after 'unpack 'patch-hardcoded-version
10913 (lambda _ (substitute*
10914 "setup.py"
10915 (("'gevent==1.1rc1'") "'gevent'"))
10916 #t)))))
10917 (native-inputs
10918 `(("python-gevent" ,python-gevent)
10919 ("python-mock" ,python-mock)
10920 ("python-pytest-mock" ,python-pytest-mock)))
10921 (inputs
10922 `(("python-promise" ,python-promise)
10923 ("python-six" ,python-six)))
10924 (home-page "https://github.com/graphql-python/graphql-core")
10925 (synopsis "GraphQL implementation for Python")
10926 (description
10927 "GraphQL implementation for Python. GraphQL is a data query language and
10928runtime designed and used to request and deliver data to mobile and web apps.
10929This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10930to Python.")
10931 (properties `((python2-variant . ,(delay python2-graphql-core))))
10932 (license license:expat)))
10933
10934(define-public python2-graphql-core
10935 (let ((base (package-with-python2
10936 (strip-python2-variant python-graphql-core))))
10937 (package (inherit base)
10938 (native-inputs
10939 `(("python2-setuptools" ,python2-setuptools)
10940 ,@(package-native-inputs base))))))
7ee51575
EF
10941
10942(define-public python-graphql-relay
10943 (package
10944 (name "python-graphql-relay")
10945 (version "0.4.4")
10946 (source
10947 (origin
10948 (method url-fetch)
10949 (uri (pypi-uri "graphql-relay" version))
10950 (sha256
10951 (base32
10952 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
10953 (build-system python-build-system)
10954 (native-inputs
10955 `(("python-pytest" ,python-pytest)))
10956 (inputs
10957 `(("python-graphql-core" ,python-graphql-core)
10958 ("python-promise" ,python-promise)
10959 ("python-six" ,python-six)))
10960 (home-page "https://github.com/graphql-python/graphql-relay-py")
10961 (synopsis "Relay implementation for Python")
10962 (description
10963 "This is a library to allow the easy creation of Relay-compliant servers
10964using the GraphQL Python reference implementation of a GraphQL server. It
10965should be noted that the code is a exact port of the original
10966@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10967from Facebook.")
10968 (properties `((python2-variant . ,(delay python2-graphql-relay))))
10969 (license license:expat)))
10970
10971(define-public python2-graphql-relay
10972 (let ((base (package-with-python2
10973 (strip-python2-variant python-graphql-relay))))
10974 (package (inherit base)
10975 (native-inputs
10976 `(("python2-setuptools" ,python2-setuptools)
10977 ,@(package-native-inputs base))))))
ddc63a56
EF
10978
10979(define-public python-graphene
10980 (package
10981 (name "python-graphene")
10982 (version "0.10.2")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "graphene" version))
10987 (sha256
10988 (base32
10989 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10990 (build-system python-build-system)
10991 (native-inputs
10992 `(("python-django-filter" ,python-django-filter)
10993 ("python-mock" ,python-mock)
10994 ("python-psycopg2" ,python-psycopg2)
10995 ("python-pytest-django" ,python-pytest-django)
10996 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
10997 (inputs
10998 `(("python-graphql-core" ,python-graphql-core)
10999 ("python-graphql-relay" ,python-graphql-relay)
11000 ("python-iso8601" ,python-iso8601)
11001 ("python-promise" ,python-promise)
11002 ("python-six" ,python-six)))
11003 (home-page "http://graphene-python.org/")
11004 (synopsis "GraphQL Framework for Python")
11005 (description
11006 "Graphene is a Python library for building GraphQL schemas/types.
11007A GraphQL schema describes your data model, and provides a GraphQL server
11008with an associated set of resolve methods that know how to fetch data.")
11009 (properties `((python2-variant . ,(delay python2-graphene))))
11010 (license license:expat)))
11011
11012(define-public python2-graphene
11013 (let ((base (package-with-python2
11014 (strip-python2-variant python-graphene))))
11015 (package (inherit base)
11016 (native-inputs
11017 `(("python2-setuptools" ,python2-setuptools)
11018 ("python2-sqlalchemy" ,python2-sqlalchemy)
11019 ,@(package-native-inputs base))))))
d488d5d6
EF
11020
11021(define-public python-nautilus
11022 (package
11023 (name "python-nautilus")
11024 (version "0.4.9")
11025 (source
11026 (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "nautilus" version))
11029 (sha256
11030 (base32
11031 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11032 (build-system python-build-system)
11033 (arguments `(#:tests? #f)) ; fails to import test modules
11034 (native-inputs
11035 `(("python-setuptools" ,python-setuptools)))
11036 (inputs
11037 `(("python-bcrypt" ,python-bcrypt)
11038 ("python-click" ,python-click)
11039 ("python-consul" ,python-consul)
11040 ("python-graphql-core" ,python-graphql-core)
11041 ("python-graphql-relay" ,python-graphql-relay)
11042 ("python-graphene" ,python-graphene)
11043 ("python-jinja2" ,python-jinja2)
11044 ("python-nose2" ,python-nose2)
11045 ("python-peewee" ,python-peewee)
11046 ("python-pika" ,python-pika)
11047 ("python-pycparser" ,python-pycparser)
11048 ("python-requests" ,python-requests)
11049 ("python-tornado" ,python-tornado)
11050 ("python-wtforms" ,python-wtforms)))
11051 (home-page "https://github.com/AlecAivazis/nautilus")
11052 (synopsis "Library for creating microservice applications")
11053 (description
11054 "Nautilus is a framework for flux based microservices that looks to
11055provide extendible implementations of common aspects of a cloud so that you can
11056focus on building massively scalable web applications.")
11057 (license license:expat)))