Merge branch 'master' into core-updates
[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)
3969ca54 55 #:use-module (gnu packages bash)
1ffa7090 56 #:use-module (gnu packages compression)
4ed20663 57 #:use-module (gnu packages databases)
ddc63a56 58 #:use-module (gnu packages django)
5e1c9367 59 #:use-module (gnu packages file)
4ed20663 60 #:use-module (gnu packages fontutils)
4ed20663
AE
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
6eb7af2a 63 #:use-module (gnu packages gl)
4ed20663 64 #:use-module (gnu packages glib)
6eb7af2a 65 #:use-module (gnu packages gstreamer)
4ed20663 66 #:use-module (gnu packages gtk)
421a80a2 67 #:use-module (gnu packages icu4c)
c937562e 68 #:use-module (gnu packages image)
4ed20663 69 #:use-module (gnu packages imagemagick)
d79a343b 70 #:use-module (gnu packages libevent)
b10ab723 71 #:use-module (gnu packages libffi)
89b2e0b0 72 #:use-module (gnu packages linux)
0da98533 73 #:use-module (gnu packages maths)
4ed20663 74 #:use-module (gnu packages multiprecision)
45203542 75 #:use-module (gnu packages networking)
be7134bf 76 #:use-module (gnu packages ncurses)
b04a52a6 77 #:use-module (gnu packages openstack)
d488d5d6 78 #:use-module (gnu packages password-utils)
c9b1b4f9 79 #:use-module (gnu packages pcre)
4ed20663 80 #:use-module (gnu packages perl)
b10ab723 81 #:use-module (gnu packages pkg-config)
4ed20663 82 #:use-module (gnu packages readline)
6eb7af2a 83 #:use-module (gnu packages sdl)
c9b1b4f9 84 #:use-module (gnu packages statistics)
8f9ac901 85 #:use-module (gnu packages tex)
1c65314c 86 #:use-module (gnu packages texinfo)
cc2b77df 87 #:use-module (gnu packages tls)
e25f0174 88 #:use-module (gnu packages version-control)
8d12be1e 89 #:use-module (gnu packages web)
ce0614dd 90 #:use-module (gnu packages base)
26b307e2 91 #:use-module (gnu packages xml)
6fa14469 92 #:use-module (gnu packages xorg)
0bdc1671 93 #:use-module (gnu packages xdisorg)
4ed20663 94 #:use-module (gnu packages zip)
afa181ff 95 #:use-module (gnu packages tcl)
63bcec71 96 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
97 #:use-module (guix packages)
98 #:use-module (guix download)
ea5456c8 99 #:use-module (guix git-download)
11bb85a1 100 #:use-module (guix utils)
acc26ff1 101 #:use-module (guix build-system gnu)
d8c4998f 102 #:use-module (guix build-system cmake)
898238b9 103 #:use-module (guix build-system python)
1c65314c
FB
104 #:use-module (guix build-system trivial)
105 #:use-module (srfi srfi-1))
a01b6da7 106
45848023 107(define-public python-2.7
a01b6da7
NK
108 (package
109 (name "python")
f0499100 110 (version "2.7.12")
a01b6da7
NK
111 (source
112 (origin
113 (method url-fetch)
9b43a0ff 114 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
115 version "/Python-" version ".tar.xz"))
116 (sha256
117 (base32
f0499100 118 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
119 (patches (search-patches "python-2.7-search-paths.patch"
120 "python-2-deterministic-build-info.patch"
121 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
122 (modules '((guix build utils)))
123 ;; suboptimal to delete failing tests here, but if we delete them in the
124 ;; arguments then we need to make sure to strip out that phase when it
125 ;; gets inherited by python and python-minimal.
126 (snippet
127 '(begin
128 (for-each delete-file
129 '("Lib/test/test_compileall.py"
f0499100 130 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
131 "Lib/test/test_distutils.py"
132 "Lib/test/test_import.py"
133 "Lib/test/test_shutil.py"
134 "Lib/test/test_socket.py"
1bb163b0 135 "Lib/test/test_subprocess.py"))
10a42aa2 136 #t))))
02f0c3b2
LC
137 (outputs '("out"
138 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 139 (build-system gnu-build-system)
3fdc99da 140 (arguments
10a42aa2 141 `(;; 356 tests OK.
e7e7a1eb
EF
142 ;; 6 tests failed:
143 ;; test_compileall test_distutils test_import test_shutil test_socket
144 ;; test_subprocess
145 ;; 39 tests skipped:
ff6f33cf
ED
146 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
147 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
148 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
149 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
150 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
151 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
152 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
153 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
154 ;; test_winreg test_winsound test_zipfile64
155 ;; 4 skips unexpected on linux2:
156 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 157 #:test-target "test"
3fdc99da 158 #:configure-flags
6a20289d
LC
159 (list "--enable-shared" ;allow embedding
160 "--with-system-ffi" ;build ctypes
161 (string-append "LDFLAGS=-Wl,-rpath="
162 (assoc-ref %outputs "out") "/lib"))
fd982732 163
d2cc9c7c
LC
164 #:modules ((ice-9 ftw) (ice-9 match)
165 (guix build utils) (guix build gnu-build-system))
fd982732 166 #:phases
46472ecd
MW
167 (modify-phases %standard-phases
168 (add-before
169 'configure 'patch-lib-shells
170 (lambda _
171 ;; Filter for existing files, since some may not exist in all
172 ;; versions of python that are built with this recipe.
173 (substitute* (filter file-exists?
174 '("Lib/subprocess.py"
175 "Lib/popen2.py"
176 "Lib/distutils/tests/test_spawn.py"
177 "Lib/test/test_subprocess.py"))
178 (("/bin/sh") (which "sh")))
dedc8320
LC
179
180 ;; Use zero as the timestamp in .pyc files so that builds are
181 ;; deterministic. TODO: Remove it when this variable is set in
182 ;; gnu-build-system.scm.
a665996f 183 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 184 #t))
5b4e2791
LC
185 (add-before 'configure 'do-not-record-configure-flags
186 (lambda* (#:key configure-flags #:allow-other-keys)
187 ;; Remove configure flags from the installed '_sysconfigdata.py'
188 ;; and 'Makefile' so we don't end up keeping references to the
189 ;; build tools.
190 ;;
191 ;; Preserve at least '--with-system-ffi' since otherwise the
192 ;; thing tries to build libffi, fails, and we end up with a
193 ;; Python that lacks ctypes.
194 (substitute* "configure"
195 (("^CONFIG_ARGS=.*$")
196 (format #f "CONFIG_ARGS='~a'\n"
197 (if (member "--with-system-ffi" configure-flags)
198 "--with-system-ffi"
199 ""))))
200 #t))
46472ecd
MW
201 (add-before
202 'check 'pre-check
203 (lambda _
204 ;; 'Lib/test/test_site.py' needs a valid $HOME
205 (setenv "HOME" (getcwd))
206 #t))
207 (add-after
208 'unpack 'set-source-file-times-to-1980
209 ;; XXX One of the tests uses a ZIP library to pack up some of the
210 ;; source tree, and fails with "ZIP does not support timestamps
211 ;; before 1980". Work around this by setting the file times in the
212 ;; source tree to sometime in early 1980.
213 (lambda _
214 (let ((circa-1980 (* 10 366 24 60 60)))
215 (ftw "." (lambda (file stat flag)
216 (utime file circa-1980 circa-1980)
217 #t))
02f0c3b2 218 #t)))
9ffe61b0
LC
219 (add-after 'install 'remove-tests
220 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
221 ;; because these files are used by some libraries out there.
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let ((out (assoc-ref outputs "out")))
224 (match (scandir (string-append out "/lib")
225 (lambda (name)
226 (string-prefix? "python" name)))
227 ((pythonX.Y)
228 (let ((testdir (string-append out "/lib/" pythonX.Y
229 "/test")))
230 (with-directory-excursion testdir
231 (for-each delete-file-recursively
232 (scandir testdir
233 (match-lambda
234 ((or "." "..") #f)
235 (file
236 (not
237 (string-prefix? "test_support."
238 file))))))
239 (call-with-output-file "__init__.py" (const #t))
240 #t)))))))
216c283b
LC
241 (add-before 'strip 'make-libraries-writable
242 (lambda* (#:key outputs #:allow-other-keys)
243 ;; Make .so files writable so they can be stripped.
244 (let ((out (assoc-ref outputs "out")))
245 (for-each (lambda (file)
246 (chmod file #o755))
247 (find-files (string-append out "/lib")
248 "\\.so"))
249 #t)))
02f0c3b2
LC
250 (add-after 'install 'move-tk-inter
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; When Tkinter support is built move it to a separate output so
253 ;; that the main output doesn't contain a reference to Tcl/Tk.
254 (let ((out (assoc-ref outputs "out"))
255 (tk (assoc-ref outputs "tk")))
256 (when tk
257 (match (find-files out "tkinter.*\\.so")
258 ((tkinter.so)
259 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
260 ;; want it under TK/lib/pythonX.Y/site-packages.
261 (let* ((len (string-length out))
262 (target (string-append
263 tk "/"
264 (string-drop
265 (dirname (dirname tkinter.so))
266 len)
267 "/site-packages")))
268 (install-file tkinter.so target)
269 (delete-file tkinter.so)))))
270 #t))))))
a01b6da7 271 (inputs
3fdc99da
CR
272 `(("bzip2" ,bzip2)
273 ("gdbm" ,gdbm)
b10ab723 274 ("libffi" ,libffi) ; for ctypes
b88e1b0a 275 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 276 ("openssl" ,openssl)
3fdc99da 277 ("readline" ,readline)
afa181ff
LC
278 ("zlib" ,zlib)
279 ("tcl" ,tcl)
280 ("tk" ,tk))) ; for tkinter
b10ab723
CR
281 (native-inputs
282 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
283 (native-search-paths
284 (list (search-path-specification
285 (variable "PYTHONPATH")
af070955 286 (files '("lib/python2.7/site-packages")))))
f0499100 287 (home-page "https://www.python.org")
afa181ff 288 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
289 (description
290 "Python is a remarkably powerful dynamic programming language that
291is used in a wide variety of application domains. Some of its key
292distinguishing features include: clear, readable syntax; strong
293introspection capabilities; intuitive object orientation; natural
294expression of procedural code; full modularity, supporting hierarchical
295packages; exception-based error handling; and very high level dynamic
296data types.")
3f641af0 297 (license license:psfl)))
acc26ff1 298
45848023
HG
299;; Current 2.x version.
300(define-public python-2 python-2.7)
301
72df6680 302(define-public python-3.5
b24d1cfc 303 (package (inherit python-2)
72df6680 304 (version "3.5.2")
717003e3
LC
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "https://www.python.org/ftp/python/"
308 version "/Python-" version ".tar.xz"))
fc1adab1
AK
309 (patches (search-patches
310 "python-fix-tests.patch"
72df6680 311 "python-3.5-fix-tests.patch"
fc1adab1
AK
312 "python-3-deterministic-build-info.patch"
313 "python-3-search-paths.patch"))
717003e3
LC
314 (patch-flags '("-p0"))
315 (sha256
316 (base32
72df6680 317 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
318 (arguments (substitute-keyword-arguments (package-arguments python-2)
319 ((#:tests? _) #t)))
1aebc0cb
AE
320 (native-search-paths
321 (list (search-path-specification
322 (variable "PYTHONPATH")
0e05d01e
SB
323 (files (list (string-append "lib/python"
324 (version-major+minor version)
325 "/site-packages"))))))))
f26a77ff 326
72df6680
LF
327(define-public python-3.4
328 (package (inherit python-3.5)
329 (version "3.4.5")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
334 (patches (search-patches
335 "python-fix-tests.patch"
336 "python-3.4-fix-tests.patch"
337 "python-3-deterministic-build-info.patch"
338 "python-3-search-paths.patch"))
339 (patch-flags '("-p0"))
340 (sha256
341 (base32
342 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
343
45848023 344;; Current 3.x version.
72df6680 345(define-public python-3 python-3.5)
45848023
HG
346
347;; Current major version.
348(define-public python python-3)
349
95288fcc
LC
350;; Minimal variants of Python, mostly used to break the cycle between Tk and
351;; Python (Tk -> libxcb -> Python.)
352
353(define-public python2-minimal
354 (package (inherit python-2)
355 (name "python-minimal")
02f0c3b2 356 (outputs '("out"))
95288fcc
LC
357 (arguments
358 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
359 ((#:configure-flags cf)
360 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
361 (inputs '()))) ;none of the optional dependencies
362
363(define-public python-minimal
898238b9 364 (package (inherit python)
95288fcc 365 (name "python-minimal")
02f0c3b2 366 (outputs '("out"))
95288fcc 367
d0b73960 368 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
369 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
370 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
371 (inputs `(("libffi" ,libffi)
372 ("openssl" ,openssl)
95288fcc
LC
373 ("zlib" ,zlib)))))
374
64cb064c
LC
375(define* (wrap-python3 python
376 #:optional
377 (name (string-append (package-name python) "-wrapper")))
898238b9 378 (package (inherit python)
95288fcc 379 (name name)
898238b9
AE
380 (source #f)
381 (build-system trivial-build-system)
02f0c3b2 382 (outputs '("out"))
3969ca54 383 (inputs `(("bash" ,bash)))
3c0f2329 384 (propagated-inputs `(("python" ,python)))
898238b9
AE
385 (arguments
386 `(#:modules ((guix build utils))
387 #:builder
388 (begin
389 (use-modules (guix build utils))
390 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
391 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
392 (mkdir-p bin)
393 (for-each
394 (lambda (old new)
395 (symlink (string-append python old)
396 (string-append bin "/" new)))
3969ca54
SB
397 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
398 `("python" ,"pydoc" ,"idle" ,"pip"))
399 ;; python-config outputs search paths based upon its location,
400 ;; use a bash wrapper to avoid changing its outputs.
401 (let ((bash (string-append (assoc-ref %build-inputs "bash")
402 "/bin/bash"))
403 (old (string-append python "python3-config"))
404 (new (string-append bin "/python-config")))
405 (with-output-to-file new
406 (lambda ()
407 (format #t "#!~a~%" bash)
408 (format #t "exec \"~a\" \"$@\"~%" old)
409 (chmod new #o755)
410 #t)))))))
0d56e3e1
LC
411 (synopsis "Wrapper for the Python 3 commands")
412 (description
413 "This package provides wrappers for the commands of Python@tie{}3.x such
414that they can be invoked under their usual name---e.g., @command{python}
415instead of @command{python3}.")))
416
95288fcc
LC
417(define-public python-wrapper (wrap-python3 python))
418(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 419
aaf625b8
RW
420(define-public python-psutil
421 (package
422 (name "python-psutil")
88535a44 423 (version "4.3.0")
aaf625b8
RW
424 (source
425 (origin
426 (method url-fetch)
f56777be 427 (uri (pypi-uri "psutil" version))
aaf625b8
RW
428 (sha256
429 (base32
88535a44 430 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
431 (build-system python-build-system)
432 (native-inputs
433 `(("python-setuptools" ,python-setuptools)))
88535a44 434 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
435 (synopsis "Library for retrieving information on running processes")
436 (description
437 "psutil (Python system and process utilities) is a library for retrieving
438information on running processes and system utilization (CPU, memory, disks,
439network) in Python. It is useful mainly for system monitoring, profiling and
440limiting process resources and management of running processes. It implements
441many functionalities offered by command line tools such as: ps, top, lsof,
442netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
443pidof, tty, taskset, pmap.")
3f641af0 444 (license license:bsd-3)))
aaf625b8
RW
445
446(define-public python2-psutil
447 (package-with-python2 python-psutil))
898238b9 448
f9da1d8a
ED
449(define-public python-passlib
450 (package
451 (name "python-passlib")
690e8c66 452 (version "1.6.5")
f9da1d8a
ED
453 (source
454 (origin
455 (method url-fetch)
690e8c66 456 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
457 (sha256
458 (base32
690e8c66 459 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
460 (build-system python-build-system)
461 (native-inputs
462 `(("python-nose" ,python-nose)
463 ("python-setuptools" ,python-setuptools)))
464 (inputs
465 `(("python-py-bcrypt" ,python-py-bcrypt)))
466 (arguments
467 `(#:phases
468 (alist-cons-before
469 'check 'set-PYTHON_EGG_CACHE
470 ;; some tests require access to "$HOME/.cython"
471 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
472 %standard-phases)))
473 (home-page "https://bitbucket.org/ecollins/passlib")
474 (synopsis
475 "Comprehensive password hashing framework")
476 (description
477 "Passlib is a password hashing library for Python 2 & 3, which provides
478cross-platform implementations of over 30 password hashing algorithms, as well
479as a framework for managing existing password hashes. It's designed to be
480useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
481to providing full-strength password hashing for multi-user application.")
3f641af0 482 (license license:bsd-3)))
f9da1d8a
ED
483
484(define-public python2-passlib
485 (package-with-python2 python-passlib))
486
feb0d9c3
ED
487(define-public python-py-bcrypt
488 (package
489 (name "python-py-bcrypt")
490 (version "0.4")
491 (source
492 (origin
493 (method url-fetch)
494 (uri (string-append
495 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
496 version
497 ".tar.gz"))
498 (sha256
499 (base32
500 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
501 (build-system python-build-system)
502 (native-inputs
503 `(("python-setuptools" ,python-setuptools)))
504 (home-page "https://code.google.com/p/py-bcrypt")
505 (synopsis
506 "Bcrypt password hashing and key derivation")
507 (description
508 "A python wrapper of OpenBSD's Blowfish password hashing code. This
509system hashes passwords using a version of Bruce Schneier's Blowfish block
510cipher with modifications designed to raise the cost of off-line password
511cracking and frustrate fast hardware implementation. The computation cost of
512the algorithm is parametised, so it can be increased as computers get faster.
513The intent is to make a compromise of a password database less likely to
514result in an attacker gaining knowledge of the plaintext passwords (e.g. using
515John the Ripper).")
516 ;; "sha2.c" is under BSD-3;
517 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
518 ;; the rest is under ISC.
3f641af0 519 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
520
521(define-public python2-py-bcrypt
522 (package-with-python2 python-py-bcrypt))
523
524
429fdea1
ED
525(define-public python-paramiko
526 (package
527 (name "python-paramiko")
81b9bbbd 528 (version "1.16.0")
429fdea1
ED
529 (source
530 (origin
531 (method url-fetch)
81b9bbbd 532 (uri (pypi-uri "paramiko" version))
429fdea1
ED
533 (sha256
534 (base32
81b9bbbd 535 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
536 (build-system python-build-system)
537 (native-inputs
538 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
539 (propagated-inputs
540 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 541 (inputs
a3fc12da 542 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
543 (home-page "http://www.paramiko.org/")
544 (synopsis "SSHv2 protocol library")
545 (description "Paramiko is a python implementation of the SSHv2 protocol,
546providing both client and server functionality. While it leverages a Python C
547extension for low level cryptography (PyCrypto), Paramiko itself is a pure
548Python interface around SSH networking concepts.")
3f641af0 549 (license license:lgpl2.1+)))
429fdea1
ED
550
551(define-public python2-paramiko
552 (package-with-python2 python-paramiko))
553
554
de73dbf6
ED
555(define-public python-httplib2
556 (package
557 (name "python-httplib2")
286f1bac 558 (version "0.9.2")
de73dbf6
ED
559 (source
560 (origin
561 (method url-fetch)
286f1bac 562 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
563 (sha256
564 (base32
286f1bac 565 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
566 (build-system python-build-system)
567 (native-inputs
568 `(("python-setuptools" ,python-setuptools)))
286f1bac 569 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
570 (synopsis "Comprehensive HTTP client library")
571 (description
572 "A comprehensive HTTP client library supporting many features left out of
573other HTTP libraries.")
574 (license license:expat)))
575
576(define-public python2-httplib2
577 (package-with-python2 python-httplib2))
578
67039875
ED
579(define-public python-ecdsa
580 (package
581 (name "python-ecdsa")
582 (version "0.13")
583 (source
584 (origin
585 (method url-fetch)
586 (uri (string-append
587 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
588 version
589 ".tar.gz"))
590 (sha256
591 (base32
592 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
593 (build-system python-build-system)
594 (native-inputs
595 `(("python-setuptools" ,python-setuptools)))
596 (inputs
597 `(("openssl" ,openssl)))
598 (home-page
599 "http://github.com/warner/python-ecdsa")
600 (synopsis
601 "ECDSA cryptographic signature library (pure python)")
602 (description
603 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
604Curve Digital Signature Algorithm), implemented purely in Python. With this
605library, you can quickly create keypairs (signing key and verifying key), sign
606messages, and verify the signatures. The keys and signatures are very short,
607making them easy to handle and incorporate into other protocols.")
608 (license license:expat)))
609
610(define-public python2-ecdsa
611 (package-with-python2 python-ecdsa))
612
52323f32
ED
613(define-public python-ccm
614 (package
615 (name "python-ccm")
db5567f7 616 (version "2.1.6")
52323f32
ED
617 (source
618 (origin
619 (method url-fetch)
db5567f7 620 (uri (pypi-uri "ccm" version))
52323f32
ED
621 (sha256
622 (base32
db5567f7 623 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
624 (build-system python-build-system)
625 (native-inputs
626 `(("python-setuptools" ,python-setuptools)))
627 (inputs
628 `(("python-pyyaml" ,python-pyyaml)
629 ("python-six" ,python-six)))
630 (home-page "https://github.com/pcmanus/ccm")
631 (synopsis "Cassandra Cluster Manager")
632 (description "A script/library to create, launch and remove an Apache
633Cassandra cluster on localhost.")
3f641af0 634 (license license:asl2.0)))
52323f32
ED
635
636(define-public python2-ccm
637 (package-with-python2 python-ccm))
638
89114f39 639(define-public python-pytz
acc26ff1 640 (package
89114f39 641 (name "python-pytz")
61c9babb 642 (version "2016.3")
acc26ff1
CR
643 (source
644 (origin
645 (method url-fetch)
61c9babb 646 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
647 (sha256
648 (base32
61c9babb 649 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 650 (build-system python-build-system)
8498b8cf 651 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 652 (home-page "http://pythonhosted.org/pytz")
9e771e3b 653 (synopsis "Python timezone library")
acc26ff1
CR
654 (description
655 "This library allows accurate and cross platform timezone calculations
656using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 657 (license license:expat)))
5ace6e2f 658
89114f39 659(define-public python2-pytz
11bb85a1 660 (package-with-python2 python-pytz))
89114f39 661
fc50e9c6 662
89114f39 663(define-public python-babel
5ace6e2f 664 (package
89114f39 665 (name "python-babel")
3f37db6b 666 (version "2.3.2")
5ace6e2f
CR
667 (source
668 (origin
669 (method url-fetch)
b850a6d8 670 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
671 (sha256
672 (base32
3f37db6b 673 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
674 (build-system python-build-system)
675 (inputs
e1804763
AE
676 `(("python-pytz" ,python-pytz)
677 ("python-setuptools" ,python-setuptools)))
8498b8cf 678 (arguments `(#:tests? #f)) ; no test target
e1804763 679 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
680 (synopsis
681 "Tools for internationalizing Python applications")
682 (description
683 "Babel is composed of two major parts:
684- tools to build and work with gettext message catalogs
685- a Python interface to the CLDR (Common Locale Data Repository), providing
686access to various locale display names, localized number and date formatting,
687etc. ")
3f641af0 688 (license license:bsd-3)))
89114f39
AE
689
690(define-public python2-babel
11bb85a1 691 (package-with-python2 python-babel))
73adf220 692
ed377cc6
RW
693(define-public python2-backport-ssl-match-hostname
694 (package
695 (name "python2-backport-ssl-match-hostname")
f2d06d46 696 (version "3.5.0.1")
ed377cc6
RW
697 (source
698 (origin
699 (method url-fetch)
700 (uri (string-append
701 "https://pypi.python.org/packages/source/b/"
702 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
703 version ".tar.gz"))
704 (sha256
705 (base32
f2d06d46 706 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 707 (build-system python-build-system)
f2d06d46
EF
708 (arguments
709 `(#:python ,python-2
710 #:tests? #f)) ; no test target
ed377cc6
RW
711 (inputs
712 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
713 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
714 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
715 (description
716 "This backport brings the ssl.match_hostname() function to users of
717earlier versions of Python. The function checks the hostname in the
718certificate returned by the server to which a connection has been established,
719and verifies that it matches the intended target hostname.")
3f641af0 720 (license license:psfl)))
ed377cc6 721
ef5cbf9b
RW
722(define-public python-h5py
723 (package
724 (name "python-h5py")
fe147c41 725 (version "2.6.0")
ef5cbf9b
RW
726 (source
727 (origin
728 (method url-fetch)
fe147c41 729 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
730 (sha256
731 (base32
fe147c41 732 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 733 (build-system python-build-system)
797e1401
RW
734 (arguments
735 `(#:tests? #f ; no test target
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'unpack 'fix-hdf5-paths
739 (lambda* (#:key inputs #:allow-other-keys)
740 (let ((prefix (assoc-ref inputs "hdf5")))
741 (substitute* "setup_build.py"
742 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
743 (string-append "['" prefix "/lib" "']"))
744 (("'/opt/local/include', '/usr/local/include'")
745 (string-append "'" prefix "/include" "'")))
746 (substitute* "setup_configure.py"
747 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
748 (string-append "['" prefix "/lib" "']")))
749 #t))))))
3c4010b1
RW
750 (propagated-inputs
751 `(("python-numpy" ,python-numpy)))
ef5cbf9b 752 (inputs
fe147c41
EF
753 `(("hdf5" ,hdf5)
754 ("python-six" ,python-six)))
ef5cbf9b 755 (native-inputs
fe147c41
EF
756 `(("python-cython" ,python-cython)
757 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
758 (home-page "http://www.h5py.org/")
759 (synopsis "Read and write HDF5 files from Python")
760 (description
761 "The h5py package provides both a high- and low-level interface to the
762HDF5 library from Python. The low-level interface is intended to be a
763complete wrapping of the HDF5 API, while the high-level component supports
764access to HDF5 files, datasets and groups using established Python and NumPy
765concepts.")
3f641af0 766 (license license:bsd-3)
fe147c41 767 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
768
769(define-public python2-h5py
fe147c41 770 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 771
c1448c69
EB
772(define-public python-lockfile
773 (package
774 (name "python-lockfile")
692add53 775 (version "0.12.2")
c1448c69
EB
776 (source
777 (origin
778 (method url-fetch)
779 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
780 "lockfile-" version ".tar.gz"))
781 (sha256
782 (base32
692add53 783 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
784 (build-system python-build-system)
785 (arguments '(#:test-target "check"))
692add53
BW
786 (native-inputs
787 `(("python-pbr" ,python-pbr)))
6a8f26a4 788 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
789 (synopsis "Platform-independent file locking module")
790 (description
791 "The lockfile package exports a LockFile class which provides a simple
792API for locking files.")
1804527a
BW
793 (license license:expat)
794 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
795
796(define-public python2-lockfile
1804527a
BW
797 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
798 (package
692add53
BW
799 (inherit base)
800 (native-inputs `(("python2-setuptools" ,python2-setuptools)
801 ,@(package-native-inputs base))))))
c1448c69 802
5a1a4bf6
EB
803(define-public python-mock
804 (package
805 (name "python-mock")
806 (version "1.0.1")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
811 "mock-" version ".tar.gz"))
812 (sha256
813 (base32
814 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
815 (build-system python-build-system)
816 (arguments '(#:test-target "check"))
07af3e5e 817 (home-page "http://code.google.com/p/mock/")
9e771e3b 818 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
819 (description
820 "Mock is a library for testing in Python. It allows you to replace parts
821of your system under test with mock objects and make assertions about how they
822have been used.")
bd3fa666 823 (license license:expat)))
5a1a4bf6
EB
824
825(define-public python2-mock
826 (package-with-python2 python-mock))
827
fc50e9c6 828
73adf220
AE
829(define-public python-setuptools
830 (package
831 (name "python-setuptools")
62a9a23b 832 (version "18.3.1")
73adf220
AE
833 (source
834 (origin
835 (method url-fetch)
836 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
837 version ".tar.gz"))
838 (sha256
839 (base32
62a9a23b 840 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 841 (build-system python-build-system)
d3d656c5
AE
842 ;; FIXME: Tests require pytest, which itself relies on setuptools.
843 ;; One could bootstrap with an internal untested setuptools.
73adf220 844 (arguments
824af8ca 845 `(#:tests? #f))
73adf220
AE
846 (home-page "https://pypi.python.org/pypi/setuptools")
847 (synopsis
848 "Library designed to facilitate packaging Python projects")
849 (description
850 "Setuptools is a fully-featured, stable library designed to facilitate
851packaging Python projects, where packaging includes:
852Python package and module definitions,
853distribution package metadata,
854test hooks,
855project installation,
856platform-specific details,
857Python 3 support.")
3f641af0 858 (license license:psfl)))
73adf220
AE
859
860(define-public python2-setuptools
861 (package-with-python2 python-setuptools))
fc50e9c6
AE
862
863
cafc3f5a
EB
864(define-public python-pycrypto
865 (package
866 (name "python-pycrypto")
867 (version "2.6.1")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/p/"
872 "pycrypto/pycrypto-" version ".tar.gz"))
873 (sha256
874 (base32
875 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
876 (build-system python-build-system)
877 (native-inputs
878 `(("python-setuptools" ,python-setuptools)))
879 (inputs
880 `(("python" ,python)
881 ("gmp" ,gmp)))
882 (arguments
883 `(#:phases
884 (alist-cons-before
885 'build 'set-build-env
886 ;; pycrypto runs an autoconf configure script behind the scenes
887 (lambda _
888 (setenv "CONFIG_SHELL" (which "bash")))
889 %standard-phases)))
890 (home-page "http://www.pycrypto.org/")
891 (synopsis "Cryptographic modules for Python")
892 (description
893 "Pycrypto is a collection of both secure hash functions (such as SHA256
894and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 895etc.). The package is structured to make adding new modules easy.")
3f641af0 896 (license license:public-domain)))
cafc3f5a 897
345f0611 898(define-public python2-pycrypto
1c0059da
EF
899 (let ((pycrypto (package-with-python2 python-pycrypto)))
900 (package (inherit pycrypto)
901 (inputs
902 `(("python" ,python-2)
903 ,@(alist-delete
904 "python"
905 (package-inputs pycrypto)))))))
345f0611 906
cafc3f5a
EB
907(define-public python-keyring
908 (package
909 (name "python-keyring")
13f3ff35 910 (version "8.7")
cafc3f5a
EB
911 (source
912 (origin
913 (method url-fetch)
664e6c3a 914 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
915 (sha256
916 (base32
13f3ff35 917 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
918 (build-system python-build-system)
919 (native-inputs
13f3ff35 920 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
921 (inputs
922 `(("python-pycrypto" ,python-pycrypto)))
923 (arguments
664e6c3a 924 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 925 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
926 (synopsis "Store and access your passwords safely")
927 (description
928 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 929service from python. It can be used in any application that needs safe
cafc3f5a
EB
930password storage.")
931 ;; "MIT" and PSF dual license
3f641af0 932 (license license:x11)
13f3ff35 933 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 934
d7af1069 935(define-public python2-keyring
13f3ff35
EF
936 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
937 (package
938 (inherit base)
939 (native-inputs `(("python2-setuptools" ,python2-setuptools)
940 ,@(package-native-inputs base))))))
d7af1069 941
a480bc41
EB
942(define-public python-six
943 (package
944 (name "python-six")
b6ab89ef 945 (version "1.10.0")
a480bc41
EB
946 (source
947 (origin
948 (method url-fetch)
b6ab89ef 949 (uri (pypi-uri "six" version))
a480bc41
EB
950 (sha256
951 (base32
b6ab89ef 952 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
953 (build-system python-build-system)
954 (inputs
955 `(("python-setuptools" ,python-setuptools)))
956 (home-page "http://pypi.python.org/pypi/six/")
957 (synopsis "Python 2 and 3 compatibility utilities")
958 (description
35b9e423 959 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
960functions for smoothing over the differences between the Python versions with
961the goal of writing Python code that is compatible on both Python versions.
35b9e423 962Six supports every Python version since 2.5. It is contained in only one
a480bc41 963Python file, so it can be easily copied into your project.")
3f641af0 964 (license license:x11)))
a480bc41 965
0c20025c
AE
966(define-public python2-six
967 (package-with-python2 python-six))
968
cafc3f5a
EB
969(define-public python-dateutil-2
970 (package
971 (name "python-dateutil")
394b8060 972 (version "2.5.2")
cafc3f5a
EB
973 (source
974 (origin
975 (method url-fetch)
394b8060 976 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
977 (sha256
978 (base32
394b8060 979 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
980 (build-system python-build-system)
981 (inputs
394b8060 982 `(("python-six" ,python-six)))
b5a5fb19 983 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
984 (synopsis "Extensions to the standard datetime module")
985 (description
986 "The dateutil module provides powerful extensions to the standard
987datetime module, available in Python 2.3+.")
3f641af0 988 (license license:bsd-3)
394b8060 989 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
990
991(define-public python2-dateutil-2
394b8060
EF
992 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
993 (package
994 (inherit base)
995 (inputs `(("python2-setuptools" ,python2-setuptools)
996 ,@(package-inputs base))))))
cafc3f5a 997
fc50e9c6
AE
998(define-public python-dateutil
999 (package
1000 (name "python-dateutil")
1001 (version "1.5") ; last version for python < 3
1002 (source
1003 (origin
1004 (method url-fetch)
cafc3f5a
EB
1005 (uri (string-append "http://labix.org/download/python-dateutil/"
1006 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1007 (sha256
1008 (base32
1009 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1010 (build-system python-build-system)
1011 (inputs
1012 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 1013 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1014 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1015 (description
1016 "The dateutil module provides powerful extensions to the standard
1017datetime module, available in Python 2.3+.")
3f641af0 1018 (license license:psfl)))
fc50e9c6
AE
1019
1020(define-public python2-dateutil
1021 (package-with-python2 python-dateutil))
1d08c01f 1022
cafc3f5a
EB
1023(define-public python-parsedatetime
1024 (package
1025 (name "python-parsedatetime")
eebf6f01 1026 (version "2.1")
cafc3f5a
EB
1027 (source
1028 (origin
1029 (method url-fetch)
eebf6f01 1030 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1031 (sha256
1032 (base32
eebf6f01 1033 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1034 (build-system python-build-system)
1035 (native-inputs
eebf6f01
EF
1036 `(("python-nose" ,python-nose)
1037 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1038 (home-page "http://github.com/bear/parsedatetime/")
1039 (synopsis
1040 "Parse human-readable date/time text")
1041 (description
e881752c 1042 "Parse human-readable date/time text.")
3f641af0 1043 (license license:asl2.0)
eebf6f01 1044 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1045
38b8f9b2 1046(define-public python2-parsedatetime
eebf6f01
EF
1047 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1048 (package
1049 (inherit base)
1050 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1051 ,@(package-native-inputs base))))))
38b8f9b2 1052
d072efcb
RW
1053(define-public python-pandas
1054 (package
1055 (name "python-pandas")
7d0c3c8d 1056 (version "0.18.1")
d072efcb
RW
1057 (source
1058 (origin
1b96f069 1059 (method url-fetch)
7d0c3c8d
EF
1060 (uri (string-append
1061 "https://pypi.python.org/packages/11/09/"
1062 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1063 "pandas-" version ".tar.gz"))
1b96f069 1064 (sha256
7d0c3c8d 1065 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1066 (build-system python-build-system)
d072efcb 1067 (propagated-inputs
42603726
EF
1068 `(("python-numpy" ,python-numpy)))
1069 (inputs
1070 `(("python-pytz" ,python-pytz)
d072efcb
RW
1071 ("python-dateutil" ,python-dateutil-2)))
1072 (native-inputs
7d0c3c8d 1073 `(("python-nose" ,python-nose)))
d072efcb
RW
1074 (home-page "http://pandas.pydata.org")
1075 (synopsis "Data structures for data analysis, time series, and statistics")
1076 (description
1077 "Pandas is a Python package providing fast, flexible, and expressive data
1078structures designed to make working with structured (tabular,
1079multidimensional, potentially heterogeneous) and time series data both easy
1080and intuitive. It aims to be the fundamental high-level building block for
1081doing practical, real world data analysis in Python.")
3f641af0 1082 (license license:bsd-3)
7d0c3c8d 1083 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1084
1085(define-public python2-pandas
7d0c3c8d
EF
1086 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1087 (package
1088 (inherit base)
1089 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1090 ,@(package-native-inputs base))))))
d072efcb 1091
cafc3f5a
EB
1092(define-public python-tzlocal
1093 (package
1094 (name "python-tzlocal")
ed80839b 1095 (version "1.2.2")
cafc3f5a
EB
1096 (source
1097 (origin
1098 (method url-fetch)
226d3331 1099 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1100 (sha256
1101 (base32
ed80839b 1102 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1103 (build-system python-build-system)
ed80839b 1104 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1105 (home-page "https://github.com/regebro/tzlocal")
1106 (synopsis
35b9e423 1107 "Local timezone information for Python")
cafc3f5a
EB
1108 (description
1109 "Tzlocal returns a tzinfo object with the local timezone information.
1110This module attempts to fix a glaring hole in pytz, that there is no way to
1111get the local timezone information, unless you know the zoneinfo name, and
1112under several distributions that's hard or impossible to figure out.")
3f641af0 1113 (license license:cc0)))
cafc3f5a 1114
1d08c01f
AE
1115(define-public python2-pysqlite
1116 (package
1117 (name "python2-pysqlite")
fe476868 1118 (version "2.8.1")
1d08c01f
AE
1119 (source
1120 (origin
1121 (method url-fetch)
fe476868 1122 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1123 (sha256
1124 (base32
fe476868 1125 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1126 (build-system python-build-system)
1127 (inputs
1128 `(("sqlite" ,sqlite)))
1129 (arguments
1130 `(#:python ,python-2 ; incompatible with Python 3
1131 #:tests? #f)) ; no test target
fe476868 1132 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1133 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1134 (description
1135 "Pysqlite provides SQLite bindings for Python that comply to the
1136Database API 2.0T.")
ed0cdf83 1137 (license license:zlib)))
1d08c01f 1138
2875caf5
AE
1139
1140(define-public python2-mechanize
1141 (package
1142 (name "python2-mechanize")
1143 (version "0.2.5")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1148 version ".tar.gz"))
1149 (sha256
1150 (base32
1151 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1152 (build-system python-build-system)
1153 (inputs
1154 `(("python2-setuptools" ,python2-setuptools)))
1155 (arguments
1156 `(#:python ,python-2 ; apparently incompatible with Python 3
1157 #:tests? #f))
1158 ;; test fails with message
1159 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1160 ;; (python-3.3.2) or
1161 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1162 ;; (python-2.7.5).
1163 ;; The source code is from March 2011 and probably not up-to-date
1164 ;; with respect to python unit tests.
1165 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1166 (synopsis
1167 "Stateful programmatic web browsing in Python")
1168 (description
1169 "Mechanize implements stateful programmatic web browsing in Python,
1170after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1171 (license (license:non-copyleft
1172 "file://COPYING"
1173 "See COPYING in the distribution."))))
2875caf5 1174
0352532e
AE
1175
1176(define-public python-simplejson
1177 (package
1178 (name "python-simplejson")
988d1bad 1179 (version "3.8.2")
0352532e
AE
1180 (source
1181 (origin
1182 (method url-fetch)
988d1bad 1183 (uri (pypi-uri "simplejson" version))
0352532e
AE
1184 (sha256
1185 (base32
988d1bad 1186 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1187 (build-system python-build-system)
1188 (home-page "http://simplejson.readthedocs.org/en/latest/")
1189 (synopsis
1190 "Json library for Python")
1191 (description
e881752c
AK
1192 "JSON (JavaScript Object Notation) is a subset of JavaScript
1193syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1194format.
0352532e
AE
1195
1196Simplejson exposes an API familiar to users of the standard library marshal
1197and pickle modules. It is the externally maintained version of the json
1198library contained in Python 2.6, but maintains compatibility with Python 2.5
1199and (currently) has significant performance advantages, even without using
1200the optional C extension for speedups. Simplejson is also supported on
1201Python 3.3+.")
3f641af0 1202 (license license:x11)))
0352532e
AE
1203
1204(define-public python2-simplejson
1205 (package-with-python2 python-simplejson))
421a80a2
AE
1206
1207
ed07b08d 1208(define-public python-pyicu
421a80a2 1209 (package
ed07b08d 1210 (name "python-pyicu")
d3b29319 1211 (version "1.9.2")
421a80a2
AE
1212 (source
1213 (origin
1214 (method url-fetch)
1215 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1216 version ".tar.gz"))
1217 (sha256
1218 (base32
d3b29319 1219 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1220 (build-system python-build-system)
1221 (inputs
1222 `(("icu4c" ,icu4c)))
421a80a2 1223 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1224 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1225 (description
1226 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1227 (license license:x11)
ed07b08d
LF
1228 (properties `((python2-variant . ,(delay python2-pyicu))))))
1229
1230(define-public python2-pyicu
1231 (package
1232 (inherit (package-with-python2
1233 (strip-python2-variant python-pyicu)))
1234 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1235
1236(define-public python2-dogtail
1237 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1238 ;; spaces in indentation" with Python 3.
1239 (package
1240 (name "python2-dogtail")
1241 (version "0.8.2")
1242 (source (origin
1243 (method url-fetch)
1244 (uri (string-append
1245 "https://fedorahosted.org/released/dogtail/dogtail-"
1246 version ".tar.gz"))
1247 (sha256
1248 (base32
1249 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1250 (build-system python-build-system)
1251 (arguments `(#:python ,python-2
1252 #:tests? #f)) ; invalid command "test"
1253 (home-page "https://fedorahosted.org/dogtail/")
1254 (synopsis "GUI test tool and automation framework written in ​Python")
1255 (description
35b9e423 1256 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1257It uses Accessibility (a11y) technologies to communicate with desktop
1258applications. dogtail scripts are written in Python and executed like any
1259other Python program.")
3f641af0 1260 (license license:gpl2+)))
515e6878 1261
011b18c3
LC
1262(define-public python2-empy
1263 (package
1264 (name "python2-empy")
1265 (version "3.3")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1269 version ".tar.gz"))
1270 (sha256
1271 (base32
1272 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1273 (build-system python-build-system)
1274 (arguments
1275 `(#:python ,python-2
1276 #:phases (alist-replace
1277 'check
1278 (lambda _
1279 (zero? (system* "./test.sh")))
1280 %standard-phases)))
1281 (home-page "http://www.alcyone.com/software/empy/")
1282 (synopsis "Templating system for Python")
1283 (description
1284 "EmPy is a system for embedding Python expressions and statements in
1285template text; it takes an EmPy source file, processes it, and produces
1286output. This is accomplished via expansions, which are special signals to the
1cd4027c 1287EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1288EmPy can expand arbitrary Python expressions and statements in this way, as
1289well as a variety of special forms. Textual data not explicitly delimited in
1290this way is sent unaffected to the output, allowing Python to be used in
1291effect as a markup language. Also supported are callbacks via hooks,
1292recording and playback via diversions, and dynamic, chainable filters. The
1293system is highly configurable via command line options and embedded
1294commands.")
3f641af0 1295 (license license:lgpl2.1+)))
011b18c3 1296
8deeda0c
LC
1297(define-public python2-element-tree
1298 (package
1299 (name "python2-element-tree")
1300 (version "1.2.6")
1301 (source (origin
1302 (method url-fetch)
1303 (uri (string-append
1304 "http://effbot.org/media/downloads/elementtree-"
1305 version "-20050316.tar.gz"))
1306 (sha256
1307 (base32
1308 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1309 (build-system python-build-system)
1310 (arguments
1311 `(#:python ,python-2 ; seems to be part of Python 3
1312 #:tests? #f)) ; no 'test' sub-command
1313 (synopsis "Toolkit for XML processing in Python")
1314 (description
1315 "ElementTree is a Python library supporting lightweight XML processing.")
1316 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1317 (license (license:x11-style
1318 "http://docs.python.org/2/license.html"
1319 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1320
1321(define-public python2-pybugz
1322 (package
1323 (name "python2-pybugz")
1324 (version "0.6.11")
1325 (source (origin
1326 (method url-fetch)
1327 (uri (string-append
1328 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1329 version ".tar.gz"))
1330 (sha256
1331 (base32
6f194a1e 1332 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1333 (patches (search-patches "pybugz-stty.patch"
1334 "pybugz-encode-error.patch"))))
8deeda0c
LC
1335 (build-system python-build-system)
1336 (arguments
1337 `(#:python ,python-2 ; SyntaxError with Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (inputs `(("element-tree" ,python2-element-tree)))
1340 (synopsis "Python and command-line interface to Bugzilla")
1341 (description
1342 "PyBugz is a Python library and command-line tool to query the Bugzilla
1343bug tracking system. It is meant as an aid to speed up interaction with the
1344bug tracker.")
1345 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1346 (license license:gpl2)))
8deeda0c 1347
a480bc41
EB
1348(define-public python-enum34
1349 (package
1350 (name "python-enum34")
d39ae1e5 1351 (version "1.1.0")
a480bc41
EB
1352 (source
1353 (origin
1354 (method url-fetch)
d39ae1e5 1355 (uri (pypi-uri "enum34" version))
a480bc41
EB
1356 (sha256
1357 (base32
d39ae1e5 1358 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1359 (build-system python-build-system)
a480bc41
EB
1360 (arguments
1361 `(#:phases
1362 (alist-replace
1363 'check
1364 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1365 %standard-phases)))
1366 (home-page "https://pypi.python.org/pypi/enum34")
1367 (synopsis "Backported Python 3.4 Enum")
1368 (description
1369 "Enum34 is the new Python stdlib enum module available in Python 3.4
1370backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1371 (license license:bsd-3)))
a480bc41 1372
820acd1b
LF
1373(define-public python2-enum34
1374 (package-with-python2 python-enum34))
1375
a480bc41
EB
1376(define-public python-parse-type
1377 (package
1378 (name "python-parse-type")
1379 (version "0.3.4")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (string-append "https://pypi.python.org/packages/source/p/"
1384 "parse_type/parse_type-" version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1388 (build-system python-build-system)
1389 (inputs
1390 `(("python-setuptools" ,python-setuptools)
1391 ("python-six" ,python-six)
68f1cdec 1392 ("python-parse" ,python-parse)))
a480bc41
EB
1393 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1394 (home-page "https://github.com/jenisys/parse_type")
1395 (synopsis "Extended parse module")
1396 (description
1397 "Parse_type extends the python parse module.")
3f641af0 1398 (license license:bsd-3)))
a480bc41
EB
1399
1400(define-public python-parse
1401 (package
1402 (name "python-parse")
eb3d3503 1403 (version "1.6.6")
a480bc41
EB
1404 (source
1405 (origin
1406 (method url-fetch)
eb3d3503 1407 (uri (pypi-uri "parse" version))
a480bc41
EB
1408 (sha256
1409 (base32
eb3d3503 1410 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1411 (build-system python-build-system)
1412 (arguments
1413 `(#:phases
1414 (alist-replace
1415 'check
1416 (lambda _ (zero? (system* "python" "test_parse.py")))
1417 %standard-phases)))
1418 (home-page "https://github.com/r1chardj0n3s/parse")
1419 (synopsis "Parse strings")
1420 (description
1421 "Parse strings using a specification based on the Python format()
1422syntax.")
3f641af0 1423 (license license:x11)))
a480bc41
EB
1424
1425
515e6878
LC
1426(define-public scons
1427 (package
1428 (name "scons")
a3f61425 1429 (version "2.3.4")
515e6878
LC
1430 (source (origin
1431 (method url-fetch)
de67e922
LF
1432 (uri (string-append "mirror://sourceforge/scons/scons/" version
1433 "/scons-" version ".tar.gz"))
515e6878
LC
1434 (sha256
1435 (base32
a3f61425 1436 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1437 (build-system python-build-system)
1438 (arguments
1439 ;; With Python 3.x, fails to build with a syntax error.
1440 `(#:python ,python-2
1441 #:tests? #f)) ; no 'python setup.py test' command
1442 (home-page "http://scons.org/")
1443 (synopsis "Software construction tool written in Python")
1444 (description
1445 "SCons is a software construction tool. Think of SCons as an improved,
1446cross-platform substitute for the classic Make utility with integrated
1447functionality similar to autoconf/automake and compiler caches such as ccache.
1448In short, SCons is an easier, more reliable and faster way to build
1449software.")
3f641af0 1450 (license license:x11)))
011b18c3 1451
c15a5c0e
DT
1452(define-public python-extras
1453 (package
1454 (name "python-extras")
1455 (version "0.0.3")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "https://pypi.python.org/packages/source/e/extras/extras-"
1461 version ".tar.gz"))
1462 (sha256
1463 (base32
1464 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1465 (build-system python-build-system)
1466 (inputs
1467 `(("python-setuptools" ,python-setuptools)))
1468 (arguments
1469 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1470 '(#:tests? #f))
1471 (home-page "https://github.com/testing-cabal/extras")
1472 (synopsis "Useful extensions to the Python standard library")
1473 (description
1474 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1475 (license license:expat)))
c15a5c0e
DT
1476
1477(define-public python2-extras
1478 (package-with-python2 python-extras))
1479
56ea0efd
DT
1480(define-public python-mimeparse
1481 (package
1482 (name "python-mimeparse")
1483 (version "0.1.4")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (string-append
1488 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1489 version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1493 (build-system python-build-system)
1494 (inputs
1495 `(("python-setuptools" ,python-setuptools)))
1496 (arguments
1497 '(#:tests? #f)) ; no setup.py test command
1498 (home-page
1499 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1500 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1501 (description
1502 "Mimeparse provides basic functions for parsing MIME type names and
1503matching them against a list of media-ranges.")
bd3fa666 1504 (license license:expat)))
56ea0efd
DT
1505
1506(define-public python2-mimeparse
1507 (package-with-python2 python-mimeparse))
1508
4435427e
DT
1509(define-public python-nose
1510 (package
1511 (name "python-nose")
f7cb9841 1512 (version "1.3.7")
4435427e
DT
1513 (source
1514 (origin
1515 (method url-fetch)
f7cb9841 1516 (uri (pypi-uri "nose" version))
4435427e
DT
1517 (sha256
1518 (base32
f7cb9841 1519 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1520 (build-system python-build-system)
1521 (inputs
1522 `(("python-setuptools" ,python-setuptools)))
1523 (arguments
1524 '(#:tests? #f)) ; FIXME: test suite fails
1525 (home-page "http://readthedocs.org/docs/nose/")
1526 (synopsis "Python testing library")
1527 (description
1528 "Nose extends the unittest library to make testing easier.")
3f641af0 1529 (license license:lgpl2.0+)))
4435427e
DT
1530
1531(define-public python2-nose
1532 (package-with-python2 python-nose))
1533
0aea283a
EF
1534(define-public python-nose2
1535 (package
1536 (name "python-nose2")
1537 (version "0.6.5")
1538 (source
1539 (origin
1540 (method url-fetch)
1541 (uri (pypi-uri "nose2" version))
1542 (sha256
1543 (base32
1544 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1545 (build-system python-build-system)
1546 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1547 (native-inputs
1548 `(("python-setuptools" ,python-setuptools)))
1549 (inputs
1550 `(("python-cov-core" ,python-cov-core)
1551 ("python-pytest-cov" ,python-pytest-cov)
1552 ("python-six" ,python-six)))
1553 (home-page "https://github.com/nose-devs/nose2")
1554 (synopsis "Next generation of nicer testing for Python")
1555 (description
1556 "Nose2 is the next generation of nicer testing for Python, based on the
1557plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1558better plugin api, being easier for users to configure, and simplifying internal
1559interfaces and processes.")
1560 (license license:bsd-2)))
1561
1562(define-public python2-nose2
1563 (package-with-python2 python-nose2))
1564
6cd9c356
DT
1565(define-public python-unittest2
1566 (package
1567 (name "python-unittest2")
1568 (version "0.5.1")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (string-append
1573 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1574 version ".tar.gz"))
1575 (sha256
1576 (base32
1577 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1578 (build-system python-build-system)
1579 (inputs
1580 `(("python-setuptools" ,python-setuptools)))
1581 (home-page "http://pypi.python.org/pypi/unittest2")
1582 (synopsis "Python unit testing library")
1583 (description
1584 "Unittest2 is a replacement for the unittest module in the Python
1585standard library.")
3f641af0 1586 (license license:psfl)))
6cd9c356
DT
1587
1588(define-public python2-unittest2
1589 (package (inherit python-unittest2)
1590 (name "python2-unittest2")
1591 (version "0.5.1")
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (string-append
1596 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1597 version ".tar.gz"))
1598 (sha256
1599 (base32
1600 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1601 (inputs
7957fe6c 1602 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1603 (arguments
1604 `(#:python ,python-2
1605 #:tests? #f)))) ; no setup.py test command
1606
542ad60f
DT
1607(define-public python-py
1608 (package
1609 (name "python-py")
71c8a804 1610 (version "1.4.31")
542ad60f
DT
1611 (source
1612 (origin
1613 (method url-fetch)
71c8a804 1614 (uri (pypi-uri "py" version))
542ad60f
DT
1615 (sha256
1616 (base32
71c8a804 1617 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1618 (build-system python-build-system)
1619 (inputs
1620 `(("python-setuptools" ,python-setuptools)))
1621 (home-page "http://pylib.readthedocs.org/")
1622 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1623 (description
1624 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1625code introspection, and logging.")
bd3fa666 1626 (license license:expat)))
542ad60f
DT
1627
1628(define-public python2-py
1629 (package-with-python2 python-py))
1630
855d4761
DT
1631(define-public python-pytest
1632 (package
1633 (name "python-pytest")
61a4332d 1634 (version "2.7.3")
855d4761
DT
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (string-append
1639 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1640 version ".tar.gz"))
1641 (sha256
1642 (base32
61a4332d 1643 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1644 (modules '((guix build utils)))
1645 (snippet
1646 ;; One of the tests involves the /usr directory, so it fails.
1647 '(substitute* "testing/test_argcomplete.py"
1648 (("def test_remove_dir_prefix\\(self\\):")
1649 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1650 (build-system python-build-system)
1651 (inputs
1652 `(("python-setuptools" ,python-setuptools)
1653 ("python-py" ,python-py)
1654 ("python-nose" ,python-nose)
1655 ("python-mock" ,python-mock)))
1656 (home-page "http://pytest.org")
1657 (synopsis "Python testing library")
1658 (description
1659 "Pytest is a testing tool that provides auto-discovery of test modules
1660and functions, detailed info on failing assert statements, modular fixtures,
1661and many external plugins.")
bd3fa666 1662 (license license:expat)))
855d4761
DT
1663
1664(define-public python2-pytest
1665 (package-with-python2 python-pytest))
1666
358c3d61
EF
1667(define-public python-pytest-cov
1668 (package
1669 (name "python-pytest-cov")
545f4a1c 1670 (version "2.2.1")
358c3d61
EF
1671 (source
1672 (origin
1673 (method url-fetch)
1674 (uri (pypi-uri "pytest-cov" version))
1675 (sha256
545f4a1c
EF
1676 (base32
1677 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1678 (build-system python-build-system)
545f4a1c 1679 (inputs
10468636
EF
1680 `(("python-coverage" ,python-coverage)
1681 ("python-pytest" ,python-pytest)))
10468636
EF
1682 (home-page "https://github.com/pytest-dev/pytest-cov")
1683 (synopsis "Pytest plugin for measuring coverage")
1684 (description
1685 "Pytest-cov produces coverage reports. It supports centralised testing and
1686distributed testing in both @code{load} and @code{each} modes. It also
1687supports coverage of subprocesses.")
545f4a1c
EF
1688 (license license:expat)
1689 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1690
1691(define-public python2-pytest-cov
545f4a1c
EF
1692 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1693 (package
1694 (inherit base)
1695 (inputs `(("python2-setuptools" ,python2-setuptools)
1696 ,@(package-inputs base))))))
358c3d61 1697
6784f2e3
RW
1698(define-public python-pytest-runner
1699 (package
1700 (name "python-pytest-runner")
1701 (version "2.6.2")
1702 (source
1703 (origin
1704 (method url-fetch)
54cd239b 1705 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1706 (sha256
1707 (base32
1708 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1709 (build-system python-build-system)
1710 (arguments
1711 `(#:phases
1712 (modify-phases %standard-phases
1713 ;; The fancy way of setting the version with setuptools_scm does not
1714 ;; seem to work here.
1715 (add-after 'unpack 'set-version
1716 (lambda _
1717 (substitute* "docs/conf.py"
1718 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1719 (string-append "version = \"" ,version "\"")))
1720 #t)))))
1721 (native-inputs
1722 `(("python-pytest" ,python-pytest)
1723 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1724 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1725 (synopsis "Invoke py.test as a distutils command")
1726 (description
1727 "This package provides a @command{pytest-runner} command that
1728@file{setup.py} files can use to run tests.")
54cd239b
EF
1729 (license license:expat)
1730 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1731
1732(define-public python2-pytest-runner
1733 (let ((base (package-with-python2
1734 (strip-python2-variant python-pytest-runner))))
1735 (package
1736 (inherit base)
1737 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1738 ,@(package-native-inputs base))))))
6784f2e3 1739
44547e51
EF
1740(define-public python-pytest-mock
1741 (package
1742 (name "python-pytest-mock")
1743 (version "1.2")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (pypi-uri "pytest-mock" version ".zip"))
1748 (sha256
1749 (base32
1750 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1751 (build-system python-build-system)
1752 (native-inputs
1753 `(("unzip" ,unzip)))
1754 (inputs
1755 `(("python-py" ,python-py)
1756 ("python-pytest" ,python-pytest)))
1757 (home-page "https://github.com/pytest-dev/pytest-mock/")
1758 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1759 (description
1760 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1761around the patching API provided by the @code{mock} package, but with the
1762benefit of not having to worry about undoing patches at the end of a test.
1763The mocker fixture has the same API as @code{mock.patch}, supporting the
1764same arguments.")
1765 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1766 (license license:expat)))
1767
1768(define-public python2-pytest-mock
1769 (let ((base (package-with-python2
1770 (strip-python2-variant python-pytest-mock))))
1771 (package (inherit base)
1772 (native-inputs
1773 `(("python2-setuptools" ,python2-setuptools)
1774 ,@(package-native-inputs base)))
1775 (inputs
1776 `(("python2-mock" ,python2-mock)
1777 ,@(package-inputs base))))))
1778
8fa58fc9
CAW
1779(define-public python-pytest-xdist
1780 (package
1781 (name "python-pytest-xdist")
1782 (version "1.14")
1783 (source
1784 (origin
1785 (method url-fetch)
1786 (uri (pypi-uri "pytest-xdist" version ".zip"))
1787 (sha256
1788 (base32
de585a7e
HG
1789 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1790 (modules '((guix build utils)))
1791 (snippet
1792 '(begin
1793 ;; Remove pre-compiled .pyc files from source.
1794 (for-each delete-file-recursively
1795 (find-files "." "__pycache__" #:directories? #t))
1796 (for-each delete-file (find-files "." "\\.pyc$"))
1797 #t))))
8fa58fc9
CAW
1798 (build-system python-build-system)
1799 (native-inputs
1800 `(("unzip" ,unzip)
8fa58fc9 1801 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1802 (inputs
1803 `(("python-apipkg" ,python-apipkg)
1804 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1805 ("python-pytest" ,python-pytest)
1806 ("python-py" ,python-py)))
1807 (home-page
1808 "https://github.com/pytest-dev/pytest-xdist")
1809 (synopsis
1810 "Plugin for py.test with distributed testing and loop-on-failing modes")
1811 (description
1812 "The pytest-xdist plugin extends py.test with some unique test execution
1813modes: parallelization, running tests in boxed subprocesses, the ability
1814to run tests repeatedly when failed, and the ability to run tests on multiple
1815Python interpreters or platforms. It uses rsync to copy the existing
1816program code to a remote location, executes there, and then syncs the
1817result back.")
fbe9abcc
EF
1818 (license license:expat)
1819 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1820
1821(define-public python2-pytest-xdist
fbe9abcc
EF
1822 (let ((base (package-with-python2
1823 (strip-python2-variant python-pytest-xdist))))
1824 (package
1825 (inherit base)
1826 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1827 ,@(package-native-inputs base))))))
8fa58fc9 1828
84d24017
DT
1829(define-public python-scripttest
1830 (package
1831 (name "python-scripttest")
1832 (version "1.3")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (string-append
1837 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1838 version ".tar.gz"))
1839 (sha256
1840 (base32
1841 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1842 (build-system python-build-system)
1843 (inputs
1844 `(("python-setuptools" ,python-setuptools)
1845 ("python-pytest" ,python-pytest)))
1846 (home-page "http://pythonpaste.org/scripttest/")
1847 (synopsis "Python library to test command-line scripts")
1848 (description "Scripttest is a Python helper library for testing
1849interactive command-line applications. With it you can run a script in a
1850subprocess and see the output as well as any file modifications.")
bd3fa666 1851 (license license:expat)))
84d24017
DT
1852
1853(define-public python2-scripttest
1854 (package-with-python2 python-scripttest))
1855
d8fa80e1
DT
1856(define-public python-testtools
1857 (package
1858 (name "python-testtools")
1859 (version "1.0.0")
1860 (source
1861 (origin
1862 (method url-fetch)
1863 (uri (string-append
1864 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1865 version ".tar.gz"))
1866 (sha256
1867 (base32
1868 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1869 (build-system python-build-system)
0e88cbf8
CR
1870 (propagated-inputs
1871 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1872 (inputs
1873 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1874 ("python-extras" ,python-extras)))
1875 (home-page "https://github.com/testing-cabal/testtools")
1876 (synopsis
1877 "Extensions to the Python standard library unit testing framework")
1878 (description
1879 "Testtools extends the Python standard library unit testing framework to
1880provide matchers, more debugging information, and cross-Python
1881compatibility.")
3f641af0 1882 (license license:psfl)))
d8fa80e1
DT
1883
1884(define-public python2-testtools
1885 (package-with-python2 python-testtools))
1886
5bf3afea
DT
1887(define-public python-testscenarios
1888 (package
1889 (name "python-testscenarios")
1890 (version "0.4")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append
1895 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1896 version ".tar.gz"))
1897 (sha256
1898 (base32
1899 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1900 (build-system python-build-system)
1901 (inputs
1902 `(("python-setuptools" ,python-setuptools)
1903 ("python-testtools" ,python-testtools)
1904 ("python-mimeparse" ,python-mimeparse)))
1905 (home-page "https://launchpad.net/testscenarios")
1906 (synopsis "Pyunit extension for dependency injection")
1907 (description
1908 "Testscenarios provides clean dependency injection for Python unittest
1909style tests.")
3f641af0 1910 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1911
1912(define-public python2-testscenarios
1913 (package-with-python2 python-testscenarios))
1914
dac79ecc
DT
1915(define-public python-testresources
1916 (package
1917 (name "python-testresources")
1918 (version "0.2.7")
1919 (source
1920 (origin
1921 (method url-fetch)
1922 (uri (string-append
1923 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1924 version ".tar.gz"))
1925 (sha256
1926 (base32
1927 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1928 (build-system python-build-system)
1929 (inputs
1930 `(("python-setuptools" ,python-setuptools)))
1931 (home-page "https://launchpad.net/testresources")
1932 (synopsis
1933 "Pyunit extension for managing test resources")
1934 (description
1935 "Testresources is an extension to Python's unittest to allow declarative
1936use of resources by test cases.")
3f641af0 1937 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1938
1939(define-public python2-testresources
1940 (package-with-python2 python-testresources))
1941
070ab058
DT
1942(define-public python-subunit
1943 (package
1944 (name "python-subunit")
1945 (version "0.0.21")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (string-append
1950 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1951 version ".tar.gz"))
1952 (sha256
1953 (base32
1954 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1955 (build-system python-build-system)
1956 (inputs
1957 `(("python-setuptools" ,python-setuptools)
1958 ("python-testtools" ,python-testtools)
1959 ("python-mimeparse" ,python-mimeparse)
1960 ("python-testscenarios" ,python-testscenarios)))
1961 (home-page "http://launchpad.net/subunit")
1962 (synopsis "Python implementation of the subunit protocol")
1963 (description
1964 "Python-subunit is a Python implementation of the subunit test streaming
1965protocol.")
3f641af0 1966 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1967
1968(define-public python2-subunit
1969 (package-with-python2 python-subunit))
1970
7787ef76
CR
1971;; Recent versions of python-fixtures need a recent version of python-pbr,
1972;; which needs a recent version of python-fixtures. To fix this circular
1973;; dependency, we keep old versions of python-fixtures and python-pbr to
1974;; bootstrap the whole thing:
1975;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1976;; - python-pbr-0.11 is used to build python-fixtures
1977;; - python-fixtures is used to build python-pbr
1978(define-public python-fixtures-0.3.16
cd49454b
DT
1979 (package
1980 (name "python-fixtures")
1981 (version "0.3.16")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append
1986 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1987 version ".tar.gz"))
1988 (sha256
1989 (base32
1990 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1991 (build-system python-build-system)
1992 (inputs
1993 `(("python-setuptools" ,python-setuptools)))
1994 (arguments
1995 '(#:tests? #f)) ; no setup.py test command
1996 (home-page "https://launchpad.net/python-fixtures")
1997 (synopsis "Python test fixture library")
1998 (description
1999 "Fixtures provides a way to create reusable state, useful when writing
2000Python tests.")
3f641af0 2001 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 2002
7787ef76
CR
2003(define-public python2-fixtures-0.3.16
2004 (package-with-python2 python-fixtures-0.3.16))
2005
2006(define-public python-pbr-0.11
2007 (package
2008 (name "python-pbr")
2009 (version "0.11.0")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append
2014 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2015 version ".tar.gz"))
2016 (sha256
2017 (base32
2018 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2019 (build-system python-build-system)
2020 (arguments
2021 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2022 (inputs
2023 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2024 ("python-pip" ,python-pip)
2025 ("python-setuptools" ,python-setuptools)))
2026 (home-page "https://launchpad.net/pbr")
2027 (synopsis "Change the default behavior of Python’s setuptools")
2028 (description
2029 "Python Build Reasonableness (PBR) is a library that injects some useful
2030and sensible default behaviors into your setuptools run.")
3f641af0 2031 (license license:asl2.0)))
7787ef76
CR
2032
2033(define-public python2-pbr-0.11
2034 (package-with-python2 python-pbr-0.11))
2035
1ef09c0c 2036(define-public python-pbr
e25f0174
BW
2037 (package
2038 (name "python-pbr")
1ef09c0c
BW
2039 (version "1.8.1")
2040 (source
e25f0174
BW
2041 (origin
2042 (method url-fetch)
2043 (uri (string-append
2044 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2045 version
2046 ".tar.gz"))
2047 (sha256
2048 (base32
2049 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2050 (build-system python-build-system)
e25f0174
BW
2051 (arguments
2052 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2053 (propagated-inputs
2054 `(("python-testrepository" ,python-testrepository)
2055 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2056 (inputs
e25f0174
BW
2057 `(("python-fixtures" ,python-fixtures)
2058 ("python-mimeparse" ,python-mimeparse)
2059 ("python-mock" ,python-mock)
2060 ("python-setuptools" ,python-setuptools)
2061 ("python-six" ,python-six)
2062 ("python-sphinx" ,python-sphinx)
2063 ("python-testrepository" ,python-testrepository)
2064 ("python-testresources" ,python-testresources)
2065 ("python-testscenarios" ,python-testscenarios)
2066 ("python-testtools" ,python-testtools)
2067 ("python-virtualenv" ,python-virtualenv)))
2068 (home-page "https://launchpad.net/pbr")
2069 (synopsis "Change the default behavior of Python’s setuptools")
2070 (description
2071 "Python Build Reasonableness (PBR) is a library that injects some useful
2072and sensible default behaviors into your setuptools run.")
3f641af0 2073 (license license:asl2.0)))
1ef09c0c
BW
2074
2075(define-public python2-pbr
e25f0174 2076 (package-with-python2 python-pbr))
1ef09c0c 2077
7787ef76
CR
2078(define-public python-fixtures
2079 (package
2080 (name "python-fixtures")
13fcc6df 2081 (version "1.4.0")
7787ef76
CR
2082 (source
2083 (origin
2084 (method url-fetch)
13fcc6df 2085 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2086 (sha256
2087 (base32
13fcc6df 2088 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2089 (build-system python-build-system)
2090 (propagated-inputs
2091 `(("python-six" ,python-six)
2092 ("python-pbr-0.11" ,python-pbr-0.11)))
2093 (inputs
2094 `(("python-pip" ,python-pip)
2095 ("python-setuptools" ,python-setuptools)
2096 ;; Tests
2097 ("python-testtools" ,python-testtools)))
2098 (arguments
2099 '(#:tests? #f)) ; no setup.py test command
2100 (home-page "https://launchpad.net/python-fixtures")
2101 (synopsis "Python test fixture library")
2102 (description
2103 "Fixtures provides a way to create reusable state, useful when writing
2104Python tests.")
3f641af0 2105 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2106
cd49454b
DT
2107(define-public python2-fixtures
2108 (package-with-python2 python-fixtures))
2109
b24a0c00
DT
2110(define-public python-testrepository
2111 (package
2112 (name "python-testrepository")
2113 (version "0.0.20")
2114 (source
2115 (origin
2116 (method url-fetch)
2117 (uri (string-append
2118 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2119 version ".tar.gz"))
2120 (sha256
2121 (base32
2122 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2123 (build-system python-build-system)
05de40c5 2124 (propagated-inputs
7787ef76 2125 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2126 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2127 (inputs
2128 `(("python-setuptools" ,python-setuptools)
b24a0c00 2129 ("python-subunit" ,python-subunit)
b24a0c00
DT
2130 ("python-mimeparse" ,python-mimeparse)))
2131 (home-page "https://launchpad.net/testrepository")
2132 (synopsis "Database for Python test results")
2133 (description "Testrepository provides a database of test results which can
2134be used as part of a developer's workflow to check things such as what tests
2135have failed since the last commit or what tests are currently failing.")
3f641af0 2136 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2137
2138(define-public python2-testrepository
2139 (package-with-python2 python-testrepository))
2140
243a009a
DT
2141(define-public python-coverage
2142 (package
2143 (name "python-coverage")
4d4cf3dd 2144 (version "4.1")
243a009a
DT
2145 (source
2146 (origin
2147 (method url-fetch)
82a3c582 2148 (uri (pypi-uri "coverage" version))
243a009a
DT
2149 (sha256
2150 (base32
4d4cf3dd 2151 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2152 (build-system python-build-system)
2153 (inputs
2154 `(("python-setuptools" ,python-setuptools)))
2155 (home-page "http://nedbatchelder.com/code/coverage")
2156 (synopsis "Code coverage measurement for Python")
2157 (description
2158 "Coverage measures code coverage, typically during test execution. It
2159uses the code analysis tools and tracing hooks provided in the Python standard
2160library to determine which lines are executable, and which have been
2161executed.")
3f641af0 2162 (license license:bsd-3)))
243a009a
DT
2163
2164(define-public python2-coverage
2165 (package-with-python2 python-coverage))
2166
12f839fd
EF
2167(define-public python-cov-core
2168 (package
2169 (name "python-cov-core")
2170 (version "1.15.0")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "cov-core" version))
2175 (sha256
2176 (base32
2177 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2178 (build-system python-build-system)
2179 (native-inputs
2180 `(("python-coverage" ,python-coverage)))
2181 (home-page "https://github.com/schlamar/cov-core")
2182 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2183 (description
2184 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2185It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2186 (license license:expat)
2187 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2188
2189(define-public python2-cov-core
8120205c 2190 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2191 (package (inherit cov-core)
2192 (native-inputs
2193 `(("python2-setuptools" ,python2-setuptools)
2194 ,@(package-native-inputs cov-core))))))
2195
041358fb
DT
2196(define-public python-discover
2197 (package
2198 (name "python-discover")
2199 (version "0.4.0")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (string-append
2204 "https://pypi.python.org/packages/source/d/discover/discover-"
2205 version ".tar.gz"))
2206 (sha256
2207 (base32
2208 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2209 (build-system python-build-system)
2210 (inputs
2211 `(("python-setuptools" ,python-setuptools)))
2212 (home-page "http://pypi.python.org/pypi/discover/")
2213 (synopsis
2214 "Python test discovery for unittest")
2215 (description
2216 "Discover provides test discovery for unittest, a feature that has been
e881752c 2217backported from Python 2.7 for Python 2.4+.")
3f641af0 2218 (license license:bsd-3)))
041358fb
DT
2219
2220(define-public python2-discover
2221 (package-with-python2 python-discover))
2222
a480bc41
EB
2223(define-public behave
2224 (package
2225 (name "behave")
287cfd1a 2226 (version "1.2.5")
a480bc41
EB
2227 (source (origin
2228 (method url-fetch)
287cfd1a 2229 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2230 (sha256
2231 (base32
287cfd1a 2232 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2233 (build-system python-build-system)
2234 (inputs
2235 `(("python-setuptools" ,python-setuptools)
2236 ("python-six" ,python-six)
a480bc41
EB
2237 ("python-parse" ,python-parse)
2238 ("python-parse-type" ,python-parse-type)))
2239 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2240 ;PyHamcrest>=1.8
2241 (home-page "http://github.com/behave/behave")
2242 (synopsis "Python behavior-driven development")
2243 (description
2244 "Behave is a tool for behavior-driven development in python.
2245Behavior-driven development (or BDD) is an agile software development
2246technique that encourages collaboration between developers, QA and
2247non-technical or business participants in a software project. Behave uses
2248tests written in a natural language style, backed up by Python code.")
3f641af0 2249 (license license:x11)))
c7303d3c
DT
2250
2251(define-public python-exif-read
2252 (package
2253 (name "python-exif-read")
2a2d0981 2254 (version "2.1.2")
c7303d3c
DT
2255 (source (origin
2256 (method url-fetch)
2a2d0981 2257 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2258 (sha256
2259 (base32
2a2d0981 2260 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2261 (build-system python-build-system)
2262 (inputs
2263 `(("python-setuptools" ,python-setuptools)))
2264 (arguments `(#:tests? #f)) ; no tests
2265 (home-page "https://github.com/ianare/exif-py")
2266 (synopsis "Python library to extract EXIF data from image files")
2267 (description
2268 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2269files.")
3f641af0 2270 (license license:bsd-3)))
c7303d3c
DT
2271
2272(define-public python2-exif-read
2273 (package-with-python2 python-exif-read))
d5f89b22
DT
2274
2275(define-public python-pyld
2276 (package
2277 (name "python-pyld")
af1ab773 2278 (version "0.6.8")
d5f89b22
DT
2279 (source (origin
2280 (method url-fetch)
af1ab773 2281 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2282 (sha256
2283 (base32
af1ab773 2284 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2285 (build-system python-build-system)
2286 (inputs
2287 `(("python-setuptools" ,python-setuptools)))
2288 (arguments `(#:tests? #f)) ; no tests
2289 (home-page "http://github.com/digitalbazaar/pyld")
2290 (synopsis "Python implementation of the JSON-LD specification")
2291 (description
2292 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2293 (license license:bsd-3)))
d5f89b22
DT
2294
2295(define-public python2-pyld
2296 (package-with-python2 python-pyld))
3a1f9a68
DT
2297
2298(define-public python-certifi
2299 (package
2300 (name "python-certifi")
b2a2232c 2301 (version "2016.8.31")
3a1f9a68
DT
2302 (source (origin
2303 (method url-fetch)
9a41f443 2304 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2305 (sha256
2306 (base32
b2a2232c 2307 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2308 (build-system python-build-system)
2309 (inputs
2310 `(("python-setuptools" ,python-setuptools)))
2311 (arguments `(#:tests? #f)) ; no tests
2312 (home-page "http://python-requests.org/")
2313 (synopsis "Python CA certificate bundle")
2314 (description
2315 "Certifi is a Python library that contains a CA certificate bundle, which
2316is used by the Requests library to verify HTTPS requests.")
3f641af0 2317 (license license:asl2.0)))
3a1f9a68
DT
2318
2319(define-public python2-certifi
2320 (package-with-python2 python-certifi))
e6cfbd36 2321
12c270dd
RW
2322(define-public python-click
2323 (package
2324 (name "python-click")
43accb58 2325 (version "6.6")
12c270dd
RW
2326 (source
2327 (origin
2328 (method url-fetch)
375f224b 2329 (uri (pypi-uri "click" version))
12c270dd 2330 (sha256
43accb58
LF
2331 (base32
2332 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2333 (build-system python-build-system)
e2ab5a09
BW
2334 (arguments
2335 `(#:phases
2336 (modify-phases %standard-phases
2337 (add-after 'unpack 'fix-paths
2338 (lambda* (#:key inputs #:allow-other-keys)
2339 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2340 "cross-libc" "libc"))))
2341 (substitute* "click/_unicodefun.py"
2342 (("'locale'")
2343 (string-append "'" glibc "/bin/locale'"))))
2344 #t)))))
12c270dd
RW
2345 (native-inputs
2346 `(("python-setuptools" ,python-setuptools)))
2347 (home-page "http://click.pocoo.org")
2348 (synopsis "Command line library for Python")
2349 (description
2350 "Click is a Python package for creating command line interfaces in a
2351composable way with as little code as necessary. Its name stands for
2352\"Command Line Interface Creation Kit\". It's highly configurable but comes
2353with sensible defaults out of the box.")
3f641af0 2354 (license license:bsd-3)))
12c270dd
RW
2355
2356(define-public python2-click
2357 (package-with-python2 python-click))
2358
addc808d
EF
2359(define-public python-wheel
2360 (package
2361 (name "python-wheel")
40981b5c 2362 (version "0.29.0")
e1ba0749
EF
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "wheel" version))
2367 (sha256
2368 (base32
40981b5c 2369 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2370 (build-system python-build-system)
2371 (native-inputs
2372 `(("python-setuptools" ,python-setuptools)
2373 ("python-jsonschema" ,python-jsonschema)
2374 ("python-pytest-cov" ,python-pytest-cov)))
2375 (home-page "https://bitbucket.org/pypa/wheel/")
2376 (synopsis "Format for built Python packages")
2377 (description
2378 "A wheel is a ZIP-format archive with a specially formatted filename and
2379the @code{.whl} extension. It is designed to contain all the files for a PEP
2380376 compatible install in a way that is very close to the on-disk format. Many
2381packages will be properly installed with only the @code{Unpack} step and the
2382unpacked archive preserves enough information to @code{Spread} (copy data and
2383scripts to their final locations) at any later time. Wheel files can be
2384installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2385 (license license:expat)
2386 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2387
2388(define-public python2-wheel
8ad4ae20
LF
2389 (let ((wheel (package-with-python2
2390 (strip-python2-variant python-wheel))))
264ae686 2391 (package (inherit wheel)
8ad4ae20
LF
2392 (native-inputs `(("python2-functools32" ,python2-functools32)
2393 ,@(package-native-inputs wheel))))))
2394
addc808d 2395
ae641128 2396(define-public python-requests
e6cfbd36 2397 (package
ae641128 2398 (name "python-requests")
74a066f9 2399 (version "2.9.1")
e6cfbd36
DT
2400 (source (origin
2401 (method url-fetch)
5d691657 2402 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2403 (sha256
2404 (base32
74a066f9 2405 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2406 (build-system python-build-system)
5d691657 2407 (native-inputs
6a308947
EF
2408 `(("python-setuptools" ,python-setuptools)
2409 ("python-py" ,python-py)
5d691657
EF
2410 ("python-pytest" ,python-pytest)
2411 ("python-pytest-cov" ,python-pytest-cov)
2412 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2413 (home-page "http://python-requests.org/")
2414 (synopsis "Python HTTP library")
2415 (description
2416 "Requests is a Python HTTP client library. It aims to be easier to use
2417than Python’s urllib2 library.")
3f641af0 2418 (license license:asl2.0)))
864b5211 2419
e9005180
DT
2420;; Some software requires an older version of Requests, notably Docker
2421;; Compose.
2422(define-public python-requests-2.7
2423 (package (inherit python-requests)
2424 (version "2.7.0")
2425 (source (origin
2426 (method url-fetch)
2427 (uri (pypi-uri "requests" version))
2428 (sha256
2429 (base32
2430 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2431
ae641128 2432(define-public python2-requests
8ad4ae20 2433 (package-with-python2 python-requests))
ae641128 2434
ea521b42
DT
2435(define-public python-vcversioner
2436 (package
2437 (name "python-vcversioner")
2438 (version "2.14.0.0")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "vcversioner" version))
2443 (sha256
2444 (base32
2445 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2446 (build-system python-build-system)
2447 (inputs
2448 `(("python-setuptools" ,python-setuptools)))
2449 (synopsis "Python library for version number discovery")
2450 (description "Vcversioner is a Python library that inspects tagging
2451information in a variety of version control systems in order to discover
2452version numbers.")
2453 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2454 (license license:isc)))
ea521b42
DT
2455
2456(define-public python2-vcversioner
2457 (package-with-python2 python-vcversioner))
ae641128 2458
864b5211
DT
2459(define-public python-jsonschema
2460 (package
2461 (name "python-jsonschema")
b3667afb 2462 (version "2.5.1")
864b5211
DT
2463 (source (origin
2464 (method url-fetch)
2465 (uri
2466 (string-append
2467 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2468 version ".tar.gz"))
2469 (sha256
2470 (base32
b3667afb 2471 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2472 (build-system python-build-system)
2473 (inputs
b3667afb
DT
2474 `(("python-setuptools" ,python-setuptools)
2475 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2476 (home-page "http://github.com/Julian/jsonschema")
2477 (synopsis "Implementation of JSON Schema for Python")
2478 (description
2479 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2480 (license license:expat)
2481 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2482
2483(define-public python2-jsonschema
a14600ec
LF
2484 (let ((jsonschema (package-with-python2
2485 (strip-python2-variant python-jsonschema))))
264ae686
EF
2486 (package (inherit jsonschema)
2487 (inputs
2488 `(("python2-functools32" ,python2-functools32)
2489 ,@(package-inputs jsonschema))))))
850189b8
DT
2490
2491(define-public python-unidecode
2492 (package
2493 (name "python-unidecode")
8925d4f3 2494 (version "0.04.18")
850189b8
DT
2495 (source (origin
2496 (method url-fetch)
8925d4f3 2497 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2498 (sha256
2499 (base32
8925d4f3 2500 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2501 (build-system python-build-system)
2502 (inputs
2503 `(("python-setuptools" ,python-setuptools)))
2504 (home-page "https://pypi.python.org/pypi/Unidecode")
2505 (synopsis "ASCII transliterations of Unicode text")
2506 (description
2507 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2508useful when integrating with legacy code that doesn't support Unicode, or for
2509ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2510machine identifiers from human-readable Unicode strings that should still be
2511somewhat intelligeble.")
3f641af0 2512 (license license:gpl2+)))
850189b8
DT
2513
2514(define-public python2-unidecode
2515 (package-with-python2 python-unidecode))
6d45fef4
DT
2516
2517(define-public python-pyjwt
2518 (package
2519 (name "python-pyjwt")
eb31d4b4 2520 (version "1.4.0")
6d45fef4
DT
2521 (source
2522 (origin
2523 (method url-fetch)
eb31d4b4 2524 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2525 (sha256
2526 (base32
eb31d4b4 2527 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2528 (build-system python-build-system)
eb31d4b4
EF
2529 (native-inputs
2530 `(("python-setuptools" ,python-setuptools)
2531 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2532 (arguments
2533 '(#:tests? #f)) ; test suite doesn't work
2534 (home-page "http://github.com/progrium/pyjwt")
2535 (synopsis "JSON Web Token implementation in Python")
2536 (description
2537 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2538 (license license:expat)))
6d45fef4
DT
2539
2540(define-public python2-pyjwt
2541 (package-with-python2 python-pyjwt))
2542
2cec1f6f
DT
2543(define-public python-oauthlib
2544 (package
2545 (name "python-oauthlib")
bde2171d 2546 (version "1.0.3")
2cec1f6f
DT
2547 (source (origin
2548 (method url-fetch)
bde2171d 2549 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2550 (sha256
2551 (base32
bde2171d 2552 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2553 (build-system python-build-system)
bde2171d 2554 (native-inputs
59f151ec 2555 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2556 ("python-nose" ,python-nose)
2557 ("python-mock" ,python-mock)))
bde2171d
EF
2558 (inputs
2559 `(("python-blinker" ,python-blinker)
2560 ("python-cryptography" ,python-cryptography)
2561 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2562 (home-page "https://github.com/idan/oauthlib")
2563 (synopsis "OAuth implementation for Python")
2564 (description
2565 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2566OAuth request-signing logic.")
3f641af0 2567 (license license:bsd-3)
59f151ec 2568 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2569
2570(define-public python2-oauthlib
59f151ec 2571 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2572 (package
2573 (inherit base)
59f151ec
EF
2574 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2575 ("python2-unittest2" ,python2-unittest2)
2576 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2577
2578(define-public python-itsdangerous
2579 (package
2580 (name "python-itsdangerous")
2581 (version "0.24")
2582 (source
2583 (origin
2584 (method url-fetch)
2585 (uri (string-append
2586 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2587 version ".tar.gz"))
2588 (sha256
2589 (base32
2590 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2591 (build-system python-build-system)
ec5dbb5c
DT
2592 (home-page "http://github.com/mitsuhiko/itsdangerous")
2593 (synopsis "Python library for passing data to/from untrusted environments")
2594 (description
2595 "Itsdangerous provides various helpers to pass trusted data to untrusted
2596environments and back.")
3f641af0 2597 (license license:bsd-3)
194d0d98 2598 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2599
2600(define-public python2-itsdangerous
194d0d98
EF
2601 (let ((base (package-with-python2
2602 (strip-python2-variant python-itsdangerous))))
2603 (package
2604 (inherit base)
2605 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2606 ,@(package-native-inputs base))))))
5731cae3 2607
8d12be1e
RW
2608(define-public python-pyyaml
2609 (package
2610 (name "python-pyyaml")
2611 (version "3.11")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (string-append
2616 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2617 version ".tar.gz"))
2618 (sha256
2619 (base32
2620 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2621 (build-system python-build-system)
2622 (inputs
2623 `(("libyaml" ,libyaml)))
2624 (native-inputs
2625 `(("python-setuptools" ,python-setuptools)))
2626 (home-page "http://pyyaml.org/wiki/PyYAML")
2627 (synopsis "YAML parser and emitter for Python")
2628 (description
2629 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2630complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2631API, and sensible error messages. PyYAML supports standard YAML tags and
2632provides Python-specific tags that allow to represent an arbitrary Python
2633object.")
2634 (license license:expat)))
2635
2636(define-public python2-pyyaml
2637 (package-with-python2 python-pyyaml))
2638
5731cae3
DT
2639(define-public python-virtualenv
2640 (package
2641 (name "python-virtualenv")
58d04dba 2642 (version "15.0.3")
5731cae3
DT
2643 (source
2644 (origin
2645 (method url-fetch)
17804240 2646 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2647 (sha256
2648 (base32
58d04dba 2649 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2650 (build-system python-build-system)
17804240
EF
2651 (arguments
2652 `(#:phases
2653 (modify-phases %standard-phases
58d04dba
RW
2654 (replace 'check
2655 (lambda _
2656 ;; Disable failing test. See upstream bug report
2657 ;; https://github.com/pypa/virtualenv/issues/957
2658 (substitute* "tests/test_virtualenv.py"
2659 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2660 (zero? (system* "py.test")))))))
5731cae3
DT
2661 (inputs
2662 `(("python-setuptools" ,python-setuptools)
2663 ("python-mock" ,python-mock)
17804240 2664 ("python-pytest" ,python-pytest)))
5731cae3
DT
2665 (home-page "https://virtualenv.pypa.io/")
2666 (synopsis "Virtual Python environment builder")
2667 (description
2668 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2669 (license license:expat)))
5731cae3
DT
2670
2671(define-public python2-virtualenv
2672 (package-with-python2 python-virtualenv))
8176d4d5
DT
2673
2674(define-public python-markupsafe
2675 (package
2676 (name "python-markupsafe")
2677 (version "0.23")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (string-append
2682 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2683 version ".tar.gz"))
2684 (sha256
2685 (base32
2686 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2687 (build-system python-build-system)
2688 (inputs
2689 `(("python-setuptools" ,python-setuptools)))
2690 (home-page "http://github.com/mitsuhiko/markupsafe")
2691 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2692 (description
2693 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2694for Python.")
3f641af0 2695 (license license:bsd-3)))
8176d4d5
DT
2696
2697(define-public python2-markupsafe
2698 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2699
2700(define-public python-jinja2
2701 (package
2702 (name "python-jinja2")
e98149b3 2703 (version "2.8")
fe34f0d1
DT
2704 (source
2705 (origin
2706 (method url-fetch)
e98149b3 2707 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2708 (sha256
2709 (base32
e98149b3 2710 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2711 (build-system python-build-system)
2712 (inputs
2713 `(("python-setuptools" ,python-setuptools)
2714 ("python-markupsafe" ,python-markupsafe)))
2715 (home-page "http://jinja.pocoo.org/")
2716 (synopsis "Python template engine")
2717 (description
2718 "Jinja2 is a small but fast and easy to use stand-alone template engine
2719written in pure Python.")
3f641af0 2720 (license license:bsd-3)))
fe34f0d1
DT
2721
2722(define-public python2-jinja2
2723 (package-with-python2 python-jinja2))
3580ab8b 2724
f7d17ac7
EE
2725(define-public python-pystache
2726 (package
2727 (name "python-pystache")
2728 (version "0.5.4")
2729 (source (origin
2730 (method url-fetch)
2731 (uri (pypi-uri "pystache" version))
2732 (sha256
2733 (base32
2734 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2735 (build-system python-build-system)
2736 (native-inputs
2737 `(("python-setuptools" ,python-setuptools)))
2738 (home-page "http://defunkt.io/pystache/")
2739 (synopsis "Python logic-less template engine")
2740 (description
2741 "Pystache is a Python implementation of the framework agnostic,
2742logic-free templating system Mustache.")
2743 (license license:expat)))
2744
2745(define-public python2-pystache
2746 (package-with-python2 python-pystache))
2747
1285119b
RW
2748(define-public python-joblib
2749 (package
2750 (name "python-joblib")
2751 (version "0.9.0b4")
2752 (source (origin
2753 (method url-fetch)
2754 (uri (string-append "https://pypi.python.org/packages/source/"
2755 "j/joblib/joblib-" version ".tar.gz"))
2756 (sha256
2757 (base32
2758 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2759 (build-system python-build-system)
2760 (native-inputs
2761 `(("python-setuptools" ,python-setuptools)
2762 ("python-nose" ,python-nose)))
2763 (home-page "http://pythonhosted.org/joblib/")
2764 (synopsis "Using Python functions as pipeline jobs")
2765 (description
2766 "Joblib is a set of tools to provide lightweight pipelining in Python.
2767In particular, joblib offers: transparent disk-caching of the output values
2768and lazy re-evaluation (memoize pattern), easy simple parallel computing
2769logging and tracing of the execution.")
3f641af0 2770 (license license:bsd-3)))
1285119b
RW
2771
2772(define-public python2-joblib
2773 (package-with-python2 python-joblib))
2774
3580ab8b
DT
2775(define-public python-docutils
2776 (package
2777 (name "python-docutils")
2778 (version "0.12")
2779 (source
2780 (origin
2781 (method url-fetch)
2782 (uri (string-append
2783 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2784 version ".tar.gz"))
2785 (sha256
2786 (base32
2787 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2788 (build-system python-build-system)
2789 (inputs
2790 `(("python-setuptools" ,python-setuptools)))
2791 (arguments
2792 '(#:tests? #f)) ; no setup.py test command
2793 (home-page "http://docutils.sourceforge.net/")
2794 (synopsis "Python Documentation Utilities")
2795 (description
2796 "Docutils is a modular system for processing documentation into useful
2797formats, such as HTML, XML, and LaTeX. For input Docutils supports
2798reStructuredText.")
2799 ;; Most of the source code is public domain, but some source files are
2800 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2801 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2802
2803(define-public python2-docutils
2804 (package-with-python2 python-docutils))
fb35b7c0
DT
2805
2806(define-public python-pygments
2807 (package
2808 (name "python-pygments")
9f442285 2809 (version "2.0.2")
fb35b7c0
DT
2810 (source
2811 (origin
2812 (method url-fetch)
9f442285 2813 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2814 (sha256
2815 (base32
9f442285 2816 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2817 (build-system python-build-system)
2818 (inputs
2819 `(("python-setuptools" ,python-setuptools)))
2820 (home-page "http://pygments.org/")
2821 (synopsis "Syntax highlighting")
2822 (description
2823 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2824 (license license:bsd-2)))
fb35b7c0
DT
2825
2826(define-public python2-pygments
2827 (package-with-python2 python-pygments))
9dd6078d
DT
2828
2829(define-public python-sphinx
2830 (package
2831 (name "python-sphinx")
2832 (version "1.2.3")
2833 (source
2834 (origin
2835 (method url-fetch)
2836 (uri (string-append
2837 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2838 version ".tar.gz"))
2839 (sha256
2840 (base32
2841 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2842 (build-system python-build-system)
2843 (inputs
2844 `(("python-setuptools" ,python-setuptools)
2845 ("python-jinja2" ,python-jinja2)
2846 ("python-docutils" ,python-docutils)
2847 ("python-pygments" ,python-pygments)))
2848 (home-page "http://sphinx-doc.org/")
2849 (synopsis "Python documentation generator")
2850 (description "Sphinx is a tool that makes it easy to create documentation
2851for Python projects or other documents consisting of multiple reStructuredText
2852sources.")
3f641af0 2853 (license license:bsd-3)))
9dd6078d
DT
2854
2855(define-public python2-sphinx
2856 (package-with-python2 python-sphinx))
6888830b 2857
ad320b20
RW
2858(define-public python-sphinx-rtd-theme
2859 (package
2860 (name "python-sphinx-rtd-theme")
2861 (version "0.1.6")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (string-append "https://pypi.python.org/packages/source/s/"
2866 "sphinx_rtd_theme/sphinx_rtd_theme-"
2867 version ".tar.gz"))
2868 (sha256
2869 (base32
2870 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2871 (build-system python-build-system)
2872 (arguments
2873 `(;; With standard flags, the install phase attempts to create a zip'd
2874 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2875 ;; before 1980'
2876 #:configure-flags '("--single-version-externally-managed"
2877 "--record=sphinx-rtd-theme.txt")))
2878 (native-inputs
2879 `(("python-setuptools" ,python-setuptools)))
2880 (inputs
2881 `(("python-docutils" ,python-docutils)
2882 ("python-sphinx" ,python-sphinx)))
2883 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2884 (synopsis "ReadTheDocs.org theme for Sphinx")
2885 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2886 (license license:expat)))
ad320b20
RW
2887
2888(define-public python2-sphinx-rtd-theme
2889 (package-with-python2 python-sphinx-rtd-theme))
2890
f4de5b3b
CAW
2891(define-public python-feedgenerator
2892 (package
2893 (name "python-feedgenerator")
f0412aa2 2894 (version "1.8")
f4de5b3b 2895 (source
f4de5b3b 2896 (origin
f0412aa2
EF
2897 (method url-fetch)
2898 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2899 (sha256
2900 (base32
f0412aa2 2901 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2902 (build-system python-build-system)
f0412aa2 2903 (native-inputs
f4de5b3b
CAW
2904 `(("python-setuptools" ,python-setuptools)
2905 ("python-pytz" ,python-pytz)
2906 ("python-six" ,python-six)))
f0412aa2 2907 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2908 (synopsis
2909 "Standalone version of Django's Atom/RSS feed generator")
2910 (description
2911 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2912which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2913 (license license:bsd-3)))
f4de5b3b
CAW
2914
2915(define-public python2-feedgenerator
2916 (package-with-python2 python-feedgenerator))
2917
59ad30e3
CAW
2918(define-public python-blinker
2919 (package
2920 (name "python-blinker")
7fb9ff4d 2921 (version "1.4")
59ad30e3
CAW
2922 (source
2923 (origin
2924 (method url-fetch)
7fb9ff4d 2925 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2926 (sha256
2927 (base32
7fb9ff4d 2928 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2929 (build-system python-build-system)
2930 (native-inputs
2931 `(("python-setuptools" ,python-setuptools)))
2932 ;; No "test" command supplied to setuptools, so unless there's another way
2933 ;; to run tests, we're skipping them!
2934 (arguments '(#:tests? #f))
2935 (home-page "http://pythonhosted.org/blinker/")
2936 (synopsis "Fast, simple object-to-object and broadcast signaling")
2937 (description
2938 "Blinker provides a fast dispatching system that allows any number of
2939interested parties to subscribe to events, or \"signals\".")
2940 (license license:expat)))
2941
2942(define-public python2-blinker
2943 (package-with-python2 python-blinker))
2944
b8050e71
CAW
2945(define-public pelican
2946 (package
2947 (name "pelican")
11f97c27 2948 (version "3.6.3")
b8050e71
CAW
2949 (source
2950 (origin
2951 (method url-fetch)
11f97c27 2952 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2953 (sha256
2954 (base32
11f97c27 2955 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2956 (build-system python-build-system)
d9f2dece 2957 (inputs
b8050e71
CAW
2958 `(("python-feedgenerator" ,python-feedgenerator)
2959 ("python-jinja2" ,python-jinja2)
2960 ("python-pygments" ,python-pygments)
2961 ("python-docutils" ,python-docutils)
2962 ("python-pytz" ,python-pytz)
2963 ("python-blinker" ,python-blinker)
2964 ("python-unidecode" ,python-unidecode)
2965 ("python-six" ,python-six)
2966 ("python-dateutil-2" ,python-dateutil-2)))
2967 (home-page "http://getpelican.com/")
2968 (arguments
2969 `(;; XXX Requires a lot more packages to do unit tests :P
2970 #:tests? #f
2971 #:phases (modify-phases %standard-phases
2972 (add-before
2973 'install 'adjust-requires
2974 ;; Since feedgenerator is installed from git, it doesn't
2975 ;; conform to the version requirements.
2976 ;;
2977 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2978 ;; version requirement so setuptools doesn't get confused.
2979 (lambda _
2980 (substitute* "setup.py"
2981 (("['\"]feedgenerator.*?['\"]")
2982 "'feedgenerator'")))))))
2983 (synopsis "Python-based static site publishing system")
2984 (description
2985 "Pelican is a tool to generate a static blog from reStructuredText,
2986Markdown input files, and more. Pelican uses Jinja2 for templating
2987and is very extensible.")
3f641af0 2988 (license license:agpl3+)))
b8050e71 2989
240ca4aa
RW
2990(define-public python-scikit-learn
2991 (package
2992 (name "python-scikit-learn")
be0a4c26 2993 (version "0.16.1")
240ca4aa
RW
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (string-append
2998 "https://github.com/scikit-learn/scikit-learn/archive/"
2999 version ".tar.gz"))
7e21b9fb 3000 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3001 (sha256
3002 (base32
be0a4c26 3003 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3004 (build-system python-build-system)
3005 (arguments
3006 `(#:phases
3007 (alist-cons-before
2f6b3d2e
RW
3008 'check 'set-HOME
3009 ;; some tests require access to "$HOME"
3010 (lambda _ (setenv "HOME" "/tmp"))
3011 ;; Tests can only be run after the library has been installed and not
3012 ;; within the source directory.
3013 (alist-cons-after
3014 'install 'check
3015 (lambda _
3016 (with-directory-excursion "/tmp"
3017 ;; With Python 3 one test of 3334 fails
3018 ;; (sklearn.tests.test_common.test_transformers); see
3019 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3020 (system* "nosetests" "-v" "sklearn")))
3021 (alist-delete 'check %standard-phases)))))
240ca4aa 3022 (inputs
2f6b3d2e 3023 `(("openblas" ,openblas)
240ca4aa
RW
3024 ("python-nose" ,python-nose)))
3025 (propagated-inputs
3026 `(("python-numpy" ,python-numpy)
3027 ("python-scipy" ,python-scipy)))
3028 (home-page "http://scikit-learn.org/")
3029 (synopsis "Machine Learning in Python")
3030 (description
3031 "Scikit-learn provides simple and efficient tools for data
3032mining and data analysis.")
25a2f81f
EF
3033 (license license:bsd-3)
3034 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3035
3036(define-public python2-scikit-learn
25a2f81f 3037 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3038
12f8f9bb
RW
3039(define-public python-scikit-image
3040 (package
3041 (name "python-scikit-image")
3042 (version "0.11.3")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (string-append
3047 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3048 version ".tar.gz"))
3049 (sha256
3050 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3051 (build-system python-build-system)
3052 (propagated-inputs
3053 `(("python-matplotlib" ,python-matplotlib)
3054 ("python-networkx" ,python-networkx)
3055 ("python-numpy" ,python-numpy)
3056 ("python-scipy" ,python-scipy)
3057 ("python-six" ,python-six)
3058 ("python-pillow" ,python-pillow)))
3059 (native-inputs
3060 `(("python-cython" ,python-cython)
3061 ("python-setuptools" ,python-setuptools)))
3062 (home-page "http://scikit-image.org/")
3063 (synopsis "Image processing in Python")
3064 (description
e881752c 3065 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3066 (license license:bsd-3)
3067 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3068
3069(define-public python2-scikit-image
2b031d3f
EF
3070 (let ((scikit-image (package-with-python2
3071 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3072 (package (inherit scikit-image)
3073 (native-inputs
3074 `(("python2-mock" ,python2-mock)
3075 ,@(package-native-inputs scikit-image)))
3076 (propagated-inputs
3077 `(("python2-pytz" ,python2-pytz)
2b031d3f 3078 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3079
5394a6a6
RW
3080(define-public python-redis
3081 (package
3082 (name "python-redis")
3083 (version "2.10.3")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (string-append
3088 "https://pypi.python.org/packages/source/r/redis/redis-"
3089 version ".tar.gz"))
3090 (sha256
3091 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3092 (build-system python-build-system)
3093 ;; Tests require a running Redis server
3094 (arguments '(#:tests? #f))
3095 (native-inputs
3096 `(("python-setuptools" ,python-setuptools)
3097 ("python-pytest" ,python-pytest)))
3098 (home-page "https://github.com/andymccurdy/redis-py")
3099 (synopsis "Redis Python client")
3100 (description
3101 "This package provides a Python interface to the Redis key-value store.")
3102 (license license:expat)))
3103
3104(define-public python2-redis
3105 (package-with-python2 python-redis))
3106
748cef5b
RW
3107(define-public python-rq
3108 (package
3109 (name "python-rq")
3110 (version "0.5.2")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (string-append
3115 "https://pypi.python.org/packages/source/r/rq/rq-"
3116 version ".tar.gz"))
3117 (sha256
3118 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3119 (build-system python-build-system)
3120 (propagated-inputs
3121 `(("python-click" ,python-click)
3122 ("python-redis" ,python-redis)))
3123 (native-inputs
3124 `(("python-setuptools" ,python-setuptools)))
3125 (home-page "http://python-rq.org/")
3126 (synopsis "Simple job queues for Python")
3127 (description
3128 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3129processing them in the background with workers. It is backed by Redis and it
3130is designed to have a low barrier to entry.")
3f641af0 3131 (license license:bsd-2)))
748cef5b
RW
3132
3133(define-public python2-rq
3134 (package-with-python2 python-rq))
3135
6888830b
FB
3136(define-public python-cython
3137 (package
3138 (name "python-cython")
dd22efef 3139 (version "0.24.1")
6888830b
FB
3140 (source
3141 (origin
3142 (method url-fetch)
56918e26 3143 (uri (pypi-uri "Cython" version))
6888830b
FB
3144 (sha256
3145 (base32
dd22efef 3146 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3147 (build-system python-build-system)
3148 ;; we need the full python package and not just the python-wrapper
3149 ;; because we need libpython3.3m.so
3150 (inputs
3151 `(("python" ,python)))
3152 (arguments
3153 `(#:phases
b92f651b
EF
3154 (modify-phases %standard-phases
3155 (add-before 'check 'set-HOME
3156 ;; some tests require access to "$HOME/.cython"
3157 (lambda _ (setenv "HOME" "/tmp")))
3158 (replace 'check
3159 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3160 (home-page "http://cython.org/")
3161 (synopsis "C extensions for Python")
3162 (description "Cython is an optimising static compiler for both the Python
3163programming language and the extended Cython programming language. It makes
3164writing C extensions for Python as easy as Python itself.")
3f641af0 3165 (license license:asl2.0)
48b311b1 3166 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3167
3168(define-public python2-cython
48b311b1
LC
3169 (package (inherit (package-with-python2
3170 (strip-python2-variant python-cython)))
6888830b
FB
3171 (name "python2-cython")
3172 (inputs
3173 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
3174
3175;; This version of numpy is missing the documentation and is only used to
3176;; build matplotlib which is required to build numpy's documentation.
3177(define python-numpy-bootstrap
3178 (package
3179 (name "python-numpy-bootstrap")
ef9b4c04 3180 (version "1.10.4")
0da98533
FB
3181 (source
3182 (origin
3183 (method url-fetch)
de67e922 3184 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3185 "/numpy-" version ".tar.gz"))
3186 (sha256
3187 (base32
ef9b4c04 3188 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3189 (build-system python-build-system)
3190 (inputs
3191 `(("python-nose" ,python-nose)
cba256f8
RW
3192 ("openblas" ,openblas)
3193 ("lapack" ,lapack)))
0da98533 3194 (native-inputs
19afbea1 3195 `(("gfortran" ,gfortran)))
0da98533
FB
3196 (arguments
3197 `(#:phases
3198 (alist-cons-before
3199 'build 'set-environment-variables
3200 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3201 (call-with-output-file "site.cfg"
3202 (lambda (port)
cba256f8
RW
3203 (format port
3204 "[openblas]
dbdfe515
RW
3205libraries = openblas
3206library_dirs = ~a/lib
3207include_dirs = ~a/include
cba256f8
RW
3208
3209[lapack]
3210lapack_libs = lapack
3211library_dirs = ~a/lib
3212include_dirs = ~a/include
3213"
3214 (assoc-ref inputs "openblas")
3215 (assoc-ref inputs "openblas")
3216 (assoc-ref inputs "lapack")
3217 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3218 ;; Use "gcc" executable, not "cc".
3219 (substitute* "numpy/distutils/system_info.py"
3220 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3221 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3222 #t)
6a843168
FB
3223 ;; Tests can only be run after the library has been installed and not
3224 ;; within the source directory.
3225 (alist-cons-after
3226 'install 'check
89b5c60e 3227 (lambda _
6a843168 3228 (with-directory-excursion "/tmp"
89b5c60e 3229 (zero? (system* "python" "-c"
6a843168 3230 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3231 (alist-delete
3232 'check
6a843168 3233 %standard-phases)))))
0da98533
FB
3234 (home-page "http://www.numpy.org/")
3235 (synopsis "Fundamental package for scientific computing with Python")
3236 (description "NumPy is the fundamental package for scientific computing
e881752c 3237with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3238object, sophisticated (broadcasting) functions, tools for integrating C/C++
3239and Fortran code, useful linear algebra, Fourier transform, and random number
3240capabilities.")
3f641af0 3241 (license license:bsd-3)))
0da98533
FB
3242
3243(define python2-numpy-bootstrap
3244 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3245
3a1bfe18
RW
3246(define-public python2-fastlmm
3247 (package
3248 (name "python2-fastlmm")
b074e7d4 3249 (version "0.2.21")
3a1bfe18
RW
3250 (source
3251 (origin
3252 (method url-fetch)
b074e7d4 3253 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3254 (sha256
3255 (base32
b074e7d4 3256 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3257 (build-system python-build-system)
3258 (arguments
3259 `(#:python ,python-2)) ; only Python 2.7 is supported
3260 (propagated-inputs
3261 `(("python2-numpy" ,python2-numpy)
3262 ("python2-scipy" ,python2-scipy)
3263 ("python2-matplotlib" ,python2-matplotlib)
3264 ("python2-pandas" ,python2-pandas)
3265 ("python2-scikit-learn" ,python2-scikit-learn)
3266 ("python2-cython" ,python2-cython)
3267 ("python2-pysnptools" ,python2-pysnptools)))
3268 (native-inputs
3269 `(("unzip" ,unzip)
3270 ("python2-mock" ,python2-mock)
3271 ("python2-setuptools" ,python2-setuptools)))
3272 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3273 (synopsis "Perform genome-wide association studies on large data sets")
3274 (description
3275 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3276Models, is a program for performing both single-SNP and SNP-set genome-wide
3277association studies (GWAS) on extremely large data sets.")
3f641af0 3278 (license license:asl2.0)))
3a1bfe18 3279
2ee8869a
FB
3280(define-public python-numpy
3281 (package (inherit python-numpy-bootstrap)
3282 (name "python-numpy")
3283 (outputs '("out" "doc"))
89b5c60e 3284 (inputs
2ee8869a
FB
3285 `(("which" ,which)
3286 ("python-setuptools" ,python-setuptools)
3287 ("python-matplotlib" ,python-matplotlib)
3288 ("python-sphinx" ,python-sphinx)
3289 ("python-pyparsing" ,python-pyparsing)
3290 ("python-numpydoc" ,python-numpydoc)
3291 ,@(package-inputs python-numpy-bootstrap)))
3292 (native-inputs
3293 `(("pkg-config" ,pkg-config)
3294 ("texlive" ,texlive)
3295 ("texinfo" ,texinfo)
3296 ("perl" ,perl)
3297 ,@(package-native-inputs python-numpy-bootstrap)))
3298 (arguments
89b5c60e 3299 `(,@(substitute-keyword-arguments
2ee8869a
FB
3300 (package-arguments python-numpy-bootstrap)
3301 ((#:phases phases)
3302 `(alist-cons-after
3303 'install 'install-doc
3304 (lambda* (#:key outputs #:allow-other-keys)
3305 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3306 (doc (string-append
3307 data "/doc/" ,name "-"
2ee8869a
FB
3308 ,(package-version python-numpy-bootstrap)))
3309 (info (string-append data "/info"))
3310 (html (string-append doc "/html"))
3311 (pyver ,(string-append "PYVER=")))
3312 (with-directory-excursion "doc"
3313 (mkdir-p html)
3314 (system* "make" "html" pyver)
3315 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3316 (system* "make" "-C" "build/latex"
2ee8869a
FB
3317 "all-pdf" "PAPER=a4" pyver)
3318 ;; FIXME: Generation of the info file fails.
3319 ;; (system* "make" "info" pyver)
3320 ;; (mkdir-p info)
3321 ;; (copy-file "build/texinfo/numpy.info"
3322 ;; (string-append info "/numpy.info"))
3323 (for-each (lambda (file)
3324 (copy-file (string-append "build/latex" file)
3325 (string-append doc file)))
3326 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3327 (with-directory-excursion "build/html"
3328 (for-each (lambda (file)
3329 (let* ((dir (dirname file))
3330 (tgt-dir (string-append html "/" dir)))
3331 (unless (equal? "." dir)
3332 (mkdir-p tgt-dir))
96c46210 3333 (install-file file html)))
2ee8869a
FB
3334 (find-files "." ".*"))))))
3335 ,phases)))))))
3336
764c077b 3337(define-public python2-numpy
57b7b8cd 3338 (package-with-python2 python-numpy))
2ee8869a 3339
15bfe6d6
FB
3340(define-public python-pyparsing
3341 (package
3342 (name "python-pyparsing")
e0669289 3343 (version "2.0.3")
15bfe6d6
FB
3344 (source
3345 (origin
3346 (method url-fetch)
de67e922
LF
3347 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3348 "/pyparsing-" version
15bfe6d6
FB
3349 "/pyparsing-" version ".tar.gz"))
3350 (sha256
3351 (base32
e0669289 3352 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3353 (build-system python-build-system)
3354 (outputs '("out" "doc"))
3355 (arguments
3356 `(#:tests? #f ; no test target
3357 #:modules ((guix build python-build-system)
3358 (guix build utils))
3359 #:phases
3360 (alist-cons-after
3361 'install 'install-doc
3362 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3363 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3364 "/share/doc/" ,name "-" ,version))
3365 (html-doc (string-append doc "/html"))
3366 (examples (string-append doc "/examples")))
3367 (mkdir-p html-doc)
3368 (mkdir-p examples)
89b5c60e 3369 (for-each
15bfe6d6 3370 (lambda (dir tgt)
89b5c60e 3371 (map (lambda (file)
96c46210 3372 (install-file file tgt))
15bfe6d6
FB
3373 (find-files dir ".*")))
3374 (list "docs" "htmldoc" "examples")
3375 (list doc html-doc examples))))
3376 %standard-phases)))
3377 (home-page "http://pyparsing.wikispaces.com")
3378 (synopsis "Python parsing class library")
3379 (description
3380 "The pyparsing module is an alternative approach to creating and
3381executing simple grammars, vs. the traditional lex/yacc approach, or the use
3382of regular expressions. The pyparsing module provides a library of classes
3383that client code uses to construct the grammar directly in Python code.")
bd3fa666 3384 (license license:expat)))
15bfe6d6
FB
3385
3386(define-public python2-pyparsing
3387 (package-with-python2 python-pyparsing))
3388
ec00de35
FB
3389(define-public python-numpydoc
3390 (package
3391 (name "python-numpydoc")
3392 (version "0.5")
3393 (source
3394 (origin
3395 (method url-fetch)
89b5c60e 3396 (uri (string-append
ec00de35
FB
3397 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3398 version ".tar.gz"))
3399 (sha256
3400 (base32
5e4d8f67
AE
3401 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3402 (modules '((guix build utils)))
3403 (snippet
3404 '(begin
3405 ;; Drop a test requiring matplotlib, which we cannot add as an
3406 ;; input since it would create a circular dependency: Extend the
3407 ;; test for Python 3, where it is already dropped, to Python 2.
3408 (substitute* "numpydoc/tests/test_plot_directive.py"
3409 (("3") "2"))))))
ec00de35
FB
3410 (build-system python-build-system)
3411 (inputs
3412 `(("python-setuptools" ,python-setuptools)
3413 ("python-docutils" ,python-docutils)
3414 ("python-sphinx" ,python-sphinx)
3415 ("python-nose" ,python-nose)))
3416 (home-page "https://pypi.python.org/pypi/numpydoc")
3417 (synopsis
3418 "Numpy's Sphinx extensions")
3419 (description
3420 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3421 (license license:bsd-2)))
ec00de35
FB
3422
3423(define-public python2-numpydoc
5e4d8f67 3424 (package-with-python2 python-numpydoc))
1c65314c 3425
1e656049
RW
3426(define-public python-numexpr
3427 (package
3428 (name "python-numexpr")
26112c0a 3429 (version "2.6.0")
1e656049
RW
3430 (source
3431 (origin
3432 (method url-fetch)
26112c0a 3433 (uri (pypi-uri "numexpr" version))
1e656049
RW
3434 (sha256
3435 (base32
26112c0a 3436 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3437 (build-system python-build-system)
3438 (arguments `(#:tests? #f)) ; no tests included
3439 (propagated-inputs
3440 `(("python-numpy" ,python-numpy)))
3441 (home-page "https://github.com/pydata/numexpr")
3442 (synopsis "Fast numerical expression evaluator for NumPy")
3443 (description
3444 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3445expressions that operate on arrays are accelerated and use less memory than
3446doing the same calculation in Python. In addition, its multi-threaded
3447capabilities can make use of all your cores, which may accelerate
3448computations, most specially if they are not memory-bounded (e.g. those using
3449transcendental functions).")
fc1a170e
EF
3450 (license license:expat)
3451 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3452
3453(define-public python2-numexpr
fc1a170e 3454 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3455
1c65314c
FB
3456(define-public python-matplotlib
3457 (package
3458 (name "python-matplotlib")
1bbc659f 3459 (version "1.4.3")
1c65314c
FB
3460 (source
3461 (origin
3462 (method url-fetch)
de67e922
LF
3463 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3464 "/matplotlib-" version
1c65314c
FB
3465 "/matplotlib-" version ".tar.gz"))
3466 (sha256
3467 (base32
1bbc659f 3468 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3469 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3470 (build-system python-build-system)
3471 (outputs '("out" "doc"))
25f9a068
FB
3472 (propagated-inputs ; the following packages are all needed at run time
3473 `(("python-pyparsing" ,python-pyparsing)
3474 ("python-pygobject" ,python-pygobject)
3475 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3476 ("python-tkinter" ,python "tk")
25f9a068
FB
3477 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3478 ;; from 'gtk+') provides the required 'typelib' files used by
3479 ;; 'gobject-introspection'. The location of these files is set with the
3480 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3481 ;; is done automatically by a 'native-search-path' procedure. However,
3482 ;; at run-time the user must set this variable as follows:
3483 ;;
3484 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3485 ("gtk+" ,gtk+)
3486 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3487 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3488 ;; object. For this reason we need to import both libraries.
3489 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3490 ("python-pycairo" ,python-pycairo)
3491 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3492 (inputs
3493 `(("python-setuptools" ,python-setuptools)
3494 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3495 ("python-six" ,python-six)
3496 ("python-pytz" ,python-pytz)
3497 ("python-numpy" ,python-numpy-bootstrap)
3498 ("python-sphinx" ,python-sphinx)
3499 ("python-numpydoc" ,python-numpydoc)
3500 ("python-nose" ,python-nose)
3501 ("python-mock" ,python-mock)
3502 ("libpng" ,libpng)
3503 ("imagemagick" ,imagemagick)
3504 ("freetype" ,freetype)
25f9a068
FB
3505 ("cairo" ,cairo)
3506 ("glib" ,glib)
4e7a137a 3507 ("python-pillow" ,python-pillow)
1c65314c 3508 ;; FIXME: Add backends when available.
1c65314c
FB
3509 ;("python-wxpython" ,python-wxpython)
3510 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3511 ("tcl" ,tcl)
3512 ("tk" ,tk)))
1c65314c
FB
3513 (native-inputs
3514 `(("pkg-config" ,pkg-config)
3515 ("texlive" ,texlive)
3516 ("texinfo" ,texinfo)))
3517 (arguments
3518 `(#:phases
25f9a068
FB
3519 (alist-cons-before
3520 'build 'configure-environment
3521 (lambda* (#:key outputs inputs #:allow-other-keys)
3522 (let ((cairo (assoc-ref inputs "cairo"))
3523 (gtk+ (assoc-ref inputs "gtk+")))
3524 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3525 ;; has not effect.
25f9a068
FB
3526 (setenv "LD_LIBRARY_PATH"
3527 (string-append cairo "/lib:" gtk+ "/lib"))
3528 (setenv "HOME" (getcwd))
3529 (call-with-output-file "setup.cfg"
3530 (lambda (port)
1bbc659f
FB
3531 (format port "[directories]~%
3532basedirlist = ~a,~a~%
57b7b8cd 3533 [rc_options]~%
1bbc659f
FB
3534backend = TkAgg~%"
3535 (assoc-ref inputs "tcl")
3536 (assoc-ref inputs "tk"))))))
25f9a068
FB
3537 (alist-cons-after
3538 'install 'install-doc
3539 (lambda* (#:key outputs #:allow-other-keys)
3540 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3541 (doc (string-append data "/doc/" ,name "-" ,version))
3542 (info (string-append data "/info"))
3543 (html (string-append doc "/html")))
3544 (with-directory-excursion "doc"
25f9a068
FB
3545 ;; Produce pdf in 'A4' format.
3546 (substitute* (find-files "." "conf\\.py")
3547 (("latex_paper_size = 'letter'")
3548 "latex_paper_size = 'a4'"))
3549 (mkdir-p html)
3550 (mkdir-p info)
3551 ;; The doc recommends to run the 'html' target twice.
3552 (system* "python" "make.py" "html")
3553 (system* "python" "make.py" "html")
18b31516 3554 (copy-recursively "build/html" html)
25f9a068
FB
3555 (system* "python" "make.py" "latex")
3556 (system* "python" "make.py" "texinfo")
18b31516
FB
3557 (symlink (string-append html "/_images")
3558 (string-append info "/matplotlib-figures"))
3559 (with-directory-excursion "build/texinfo"
3560 (substitute* "matplotlib.texi"
3561 (("@image\\{([^,]*)" all file)
3562 (string-append "@image{matplotlib-figures/" file)))
3563 (symlink (string-append html "/_images")
3564 "./matplotlib-figures")
3565 (system* "makeinfo" "--no-split"
3566 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3567 (copy-file "build/texinfo/matplotlib.info"
3568 (string-append info "/matplotlib.info"))
3569 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3570 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3571 %standard-phases))))
1c65314c
FB
3572 (home-page "http://matplotlib.org")
3573 (synopsis "2D plotting library for Python")
3574 (description
3575 "Matplotlib is a Python 2D plotting library which produces publication
3576quality figures in a variety of hardcopy formats and interactive environments
3577across platforms. Matplotlib can be used in Python scripts, the python and
3578ipython shell, web application servers, and six graphical user interface
3579toolkits.")
3f641af0 3580 (license license:psfl)
57b7b8cd 3581 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3582
764c077b 3583(define-public python2-matplotlib
57b7b8cd
LC
3584 (let ((matplotlib (package-with-python2
3585 (strip-python2-variant python-matplotlib))))
764c077b 3586 (package (inherit matplotlib)
88c26834
AE
3587 ;; Make sure to use special packages for Python 2 instead
3588 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3589 (propagated-inputs
7ca0dbc3 3590 `(("python2-pycairo" ,python2-pycairo)
764c077b 3591 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3592 ("python2-tkinter" ,python-2 "tk")
3593 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3594 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3595
0dde6232
RW
3596(define-public python2-pysnptools
3597 (package
3598 (name "python2-pysnptools")
a800018e 3599 (version "0.3.9")
0dde6232
RW
3600 (source
3601 (origin
3602 (method url-fetch)
3f2e9675 3603 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3604 (sha256
3605 (base32
a800018e 3606 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3607 (build-system python-build-system)
3608 (arguments
3609 `(#:python ,python-2)) ; only Python 2.7 is supported
3610 (propagated-inputs
3611 `(("python2-numpy" ,python2-numpy)
3612 ("python2-scipy" ,python2-scipy)
a800018e 3613 ("python2-pytz" ,python2-pytz)
0dde6232 3614 ("python2-cython" ,python2-cython)))
a800018e
EF
3615 (inputs
3616 `(("python2-dateutil-2" ,python2-dateutil-2)
3617 ("python2-pandas" ,python2-pandas)
3618 ("python2-six" ,python2-six)))
0dde6232
RW
3619 (native-inputs
3620 `(("unzip" ,unzip)
3621 ("python2-setuptools" ,python2-setuptools)))
3622 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3623 (synopsis "Library for reading and manipulating genetic data")
3624 (description
3625 "PySnpTools is a library for reading and manipulating genetic data. It
3626can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3627those files. It can also efficiently manipulate ranges of integers using set
3628operators such as union, intersection, and difference.")
3f641af0 3629 (license license:asl2.0)))
0dde6232 3630
c9b1b4f9
RW
3631(define-public python-rpy2
3632 (package
3633 (name "python-rpy2")
ec3bcbc7 3634 (version "2.7.6")
c9b1b4f9
RW
3635 (source
3636 (origin
3637 (method url-fetch)
ec3bcbc7 3638 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3639 (sha256
3640 (base32
ec3bcbc7 3641 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3642 (build-system python-build-system)
3643 (inputs
3644 `(("python-six" ,python-six)
3645 ("readline" ,readline)
3646 ("icu4c" ,icu4c)
3647 ("pcre" ,pcre)
3648 ("r" ,r)))
3649 (native-inputs
5ff6575b
RW
3650 `(("python-setuptools" ,python-setuptools)
3651 ("zlib" ,zlib)))
c9b1b4f9
RW
3652 (home-page "http://rpy.sourceforge.net/")
3653 (synopsis "Python interface to the R language")
3654 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3655low-level interface to R from Python, a proposed high-level interface,
3656including wrappers to graphical libraries, as well as R-like structures and
3657functions.")
3f641af0 3658 (license license:gpl3+)))
c9b1b4f9
RW
3659
3660(define-public python2-rpy2
3661 (let ((rpy2 (package-with-python2 python-rpy2)))
3662 (package (inherit rpy2)
3663 (native-inputs
3664 `(("python2-singledispatch" ,python2-singledispatch)
3665 ,@(package-native-inputs rpy2))))))
3666
bb986599
FB
3667(define-public python-scipy
3668 (package
3669 (name "python-scipy")
ba8a0824 3670 (version "0.16.0")
bb986599
FB
3671 (source
3672 (origin
3673 (method url-fetch)
de67e922
LF
3674; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3675 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3676 "/scipy-" version ".tar.xz"))
bb986599
FB
3677 (sha256
3678 (base32
ba8a0824 3679 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3680 (build-system python-build-system)
dd86c0d1 3681 (propagated-inputs
bb986599
FB
3682 `(("python-numpy" ,python-numpy)
3683 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3684 ("python-pyparsing" ,python-pyparsing)))
3685 (inputs
3686 `(("lapack" ,lapack)
719b01c1 3687 ("openblas" ,openblas)))
bb986599 3688 (native-inputs
dd86c0d1
RW
3689 `(("python-nose" ,python-nose)
3690 ("python-sphinx" ,python-sphinx)
5248d49e 3691 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3692 ("gfortran" ,gfortran)
bb986599
FB
3693 ("texlive" ,texlive)
3694 ("perl" ,perl)))
3695 (outputs '("out" "doc"))
3696 (arguments
3697 `(#:phases
3698 (alist-cons-before
719b01c1 3699 'build 'configure-openblas
bb986599 3700 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3701 (call-with-output-file "site.cfg"
3702 (lambda (port)
3703 (format port
3704 "[blas]
3705libraries = openblas
3706library_dirs = ~a/lib
3707include_dirs = ~a/include
3708[atlas]
3709library_dirs = ~a/lib
3710atlas_libs = openblas
3711"
3712 (assoc-ref inputs "openblas")
3713 (assoc-ref inputs "openblas")
3714 (assoc-ref inputs "openblas"))))
3715 #t)
bb986599
FB
3716 (alist-cons-after
3717 'install 'install-doc
3718 (lambda* (#:key outputs #:allow-other-keys)
3719 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3720 (doc (string-append data "/doc/" ,name "-" ,version))
3721 (html (string-append doc "/html"))
3722 (pyver ,(string-append "PYVER=")))
3723 (with-directory-excursion "doc"
bb986599
FB
3724 ;; Fix generation of images for mathematical expressions.
3725 (substitute* (find-files "source" "conf\\.py")
3726 (("pngmath_use_preview = True")
3727 "pngmath_use_preview = False"))
3728 (mkdir-p html)
3729 (system* "make" "html" pyver)
3730 (system* "make" "latex" "PAPER=a4" pyver)
3731 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3732 (copy-file "build/latex/scipy-ref.pdf"
3733 (string-append doc "/scipy-ref.pdf"))
3734 (with-directory-excursion "build/html"
3735 (for-each (lambda (file)
3736 (let* ((dir (dirname file))
3737 (tgt-dir (string-append html "/" dir)))
96c46210 3738 (install-file file html)))
bb986599
FB
3739 (find-files "." ".*"))))))
3740 ;; Tests can only be run after the library has been installed and not
3741 ;; within the source directory.
3742 (alist-cons-after
3743 'install 'check
89b5c60e 3744 (lambda _
bb986599
FB
3745 (with-directory-excursion "/tmp"
3746 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3747 (alist-delete
3748 'check
4f9ff21e
RW
3749 (alist-cons-after
3750 'unpack 'fix-tests
3751 (lambda _
3752 (substitute* "scipy/integrate/tests/test_quadpack.py"
3753 (("libm.so") "libm.so.6"))
3754 #t)
3755 %standard-phases)))))))
bb986599
FB
3756 (home-page "http://www.scipy.org/")
3757 (synopsis "The Scipy library provides efficient numerical routines")
3758 (description "The SciPy library is one of the core packages that make up
3759the SciPy stack. It provides many user-friendly and efficient numerical
3760routines such as routines for numerical integration and optimization.")
3f641af0 3761 (license license:bsd-3)))
bb986599 3762
764c077b 3763(define-public python2-scipy
57b7b8cd 3764 (package-with-python2 python-scipy))
bb986599 3765
73acc193 3766(define-public python-socksipy-branch
3767 (package
3768 (name "python-socksipy-branch")
3769 (version "1.01")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "SocksiPy-branch" version))
3774 (sha256
3775 (base32
3776 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3777 (build-system python-build-system)
3778 (arguments
3779 `(#:tests? #f)) ; There are no tests
3780 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3781 (synopsis "Python SOCKS module")
3782 (description
3783 "SocksiPy - A Python SOCKS client module. It provides a
3784socket-like interface that supports connections to any TCP
3785service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3786The original version was developed by Dan Haim, this is a
3787branch created by Mario Vilas to address some open issues,
3788as the original project seems to have been abandoned circa 2007.")
3789 (license license:bsd-3)))
3790
3791(define-public python2-socksipy-branch
3792 (package-with-python2 python-socksipy-branch))
3793
94914805
EB
3794(define-public python-sqlalchemy
3795 (package
3796 (name "python-sqlalchemy")
a4ba286b 3797 (version "1.0.12")
94914805
EB
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (string-append "https://pypi.python.org/packages/source/S/"
3802 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3803 (sha256
3804 (base32
a4ba286b 3805 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3806 (build-system python-build-system)
3807 (native-inputs
3808 `(("python-cython" ,python-cython) ;for c extensions
3809 ("python-pytest" ,python-pytest)
3810 ("python-mock" ,python-mock))) ;for tests
3811 (arguments
3812 `(#:phases (alist-replace
3813 'check
3814 (lambda _ (zero? (system* "py.test")))
3815 %standard-phases)))
3816 (home-page "http://www.sqlalchemy.org")
3817 (synopsis "Database abstraction library")
3818 (description
3819 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3820gives application developers the full power and flexibility of SQL. It
3821provides a full suite of well known enterprise-level persistence patterns,
3822designed for efficient and high-performing database access, adapted into a
3823simple and Pythonic domain language.")
3f641af0 3824 (license license:x11)))
94914805
EB
3825
3826(define-public python2-sqlalchemy
3827 (package-with-python2 python-sqlalchemy))
c937562e 3828
de2966cf
EF
3829(define-public python-sqlalchemy-utils
3830 (package
3831 (name "python-sqlalchemy-utils")
3832 (version "0.32.9")
3833 (source
3834 (origin
3835 (method url-fetch)
3836 (uri (pypi-uri "SQLAlchemy-Utils" version))
3837 (sha256
3838 (base32
3839 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3840 (build-system python-build-system)
3841 (inputs
3842 `(("python-six" ,python-six)
3843 ("python-sqlalchemy" ,python-sqlalchemy)))
3844 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3845 (synopsis "Various utility functions for SQLAlchemy")
3846 (description
3847 "SQLAlchemy-utils provides various utility functions and custom data types
3848for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3849 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3850 (license license:bsd-3)))
3851
3852(define-public python2-sqlalchemy-utils
3853 (let ((base (package-with-python2
3854 (strip-python2-variant python-sqlalchemy-utils))))
3855 (package (inherit base)
3856 (native-inputs
3857 `(("python2-setuptools" ,python2-setuptools)
3858 ,@(package-native-inputs base))))))
3859
af5a4602
CAW
3860(define-public python-alembic
3861 (package
3862 (name "python-alembic")
bb484529 3863 (version "0.8.7")
af5a4602
CAW
3864 (source
3865 (origin
3866 (method url-fetch)
3867 (uri (pypi-uri "alembic" version))
3868 (sha256
3869 (base32
bb484529 3870 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3871 (build-system python-build-system)
3872 (native-inputs
3873 `(("python-mock" ,python-mock)
3874 ("python-pytest-cov" ,python-pytest-cov)))
3875 (propagated-inputs
3876 `(("python-sqlalchemy" ,python-sqlalchemy)
3877 ("python-mako" ,python-mako)
3878 ("python-editor" ,python-editor)))
3879 (home-page "http://bitbucket.org/zzzeek/alembic")
3880 (synopsis
3881 "Database migration tool for SQLAlchemy")
3882 (description
3883 "Alembic is a lightweight database migration tool for usage with the
3884SQLAlchemy Database Toolkit for Python.")
3885 (license license:expat)
3886 (properties `((python2-variant . ,(delay python2-alembic))))))
3887
3888(define-public python2-alembic
3889 (let ((alembic (package-with-python2
3890 (strip-python2-variant python-alembic))))
3891 (package
3892 (inherit alembic)
3893 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3894 ,@(package-native-inputs alembic))))))
3895
1671c07c
EB
3896(define-public python-distutils-extra
3897 (package
3898 (name "python-distutils-extra")
3899 (version "2.38")
3900 (source
3901 (origin
3902 (method url-fetch)
3903 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3904 version "/+download/python-distutils-extra-"
3905 version ".tar.gz"))
3906 (sha256
3907 (base32
3908 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3909 (build-system python-build-system)
3910 (native-inputs
3911 `(("python-setuptools" ,python-setuptools)))
3912 (home-page "https://launchpad.net/python-distutils-extra/")
3913 (synopsis "Enhancements to Python's distutils")
3914 (description
3915 "The python-distutils-extra module enables you to easily integrate
3916gettext support, themed icons, and scrollkeeper-based documentation into
3917Python's distutils.")
3f641af0 3918 (license license:gpl2)))
1671c07c
EB
3919
3920(define-public python2-distutils-extra
3921 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3922
3923(define-public python2-elib.intl
3924 (package
3925 (name "python2-elib.intl")
3926 (version "0.0.3")
3927 (source
3928 (origin
3929 ;; This project doesn't tag releases or publish tarballs, so we take
3930 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3931 (method git-fetch)
3932 (uri (git-reference
3933 (url "https://github.com/dieterv/elib.intl.git")
3934 (commit "d09997cfef")))
3935 (sha256
3936 (base32
3937 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3938 (build-system python-build-system)
3939 (native-inputs
3940 `(("python2-setuptools" ,python2-setuptools)))
3941 (arguments
3942 ;; incompatible with Python 3 (exception syntax)
3943 `(#:python ,python-2
3944 #:tests? #f
3945 ;; With standard flags, the install phase attempts to create a zip'd
3946 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3947 ;; before 1980'
3948 #:configure-flags '("--single-version-externally-managed"
3949 "--record=elib.txt")))
3950 (home-page "https://github.com/dieterv/elib.intl")
3951 (synopsis "Enhanced internationalization for Python")
3952 (description
3953 "The elib.intl module provides enhanced internationalization (I18N)
3954services for your Python modules and applications.")
3f641af0 3955 (license license:lgpl3+)))
ea5456c8 3956
c937562e
EB
3957(define-public python-pillow
3958 (package
3959 (name "python-pillow")
debf4179 3960 (version "3.3.1")
c937562e
EB
3961 (source
3962 (origin
3963 (method url-fetch)
f1d9231d 3964 (uri (pypi-uri "Pillow" version))
c937562e
EB
3965 (sha256
3966 (base32
debf4179 3967 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
3968 (build-system python-build-system)
3969 (native-inputs
3970 `(("python-setuptools" ,python-setuptools)
3971 ("python-nose" ,python-nose)))
3972 (inputs
5ff408d9
SB
3973 `(("freetype" ,freetype)
3974 ("lcms" ,lcms)
c937562e
EB
3975 ("zlib" ,zlib)
3976 ("libjpeg" ,libjpeg)
3977 ("openjpeg" ,openjpeg)
5ff408d9
SB
3978 ("libtiff" ,libtiff)
3979 ("libwebp" ,libwebp)))
c937562e
EB
3980 (propagated-inputs
3981 `(;; Used at runtime for pkg_resources
3982 ("python-setuptools" ,python-setuptools)))
3983 (arguments
e5358a6b
LC
3984 `(#:phases (modify-phases %standard-phases
3985 (add-before
3986 'install 'disable-egg-compression
3987 (lambda _
3988 ;; Leave the .egg uncompressed since compressing it would
3989 ;; prevent the GC from identifying run-time dependencies.
3990 ;; See <http://bugs.gnu.org/20765>.
3991 (let ((port (open-file "setup.cfg" "a")))
3992 (display "\n[easy_install]\nzip_ok = 0\n"
3993 port)
3994 (close-port port)
3995 #t)))
3996 (add-after
3997 'install 'check-installed
3998 (lambda _
3999 (begin
4000 (setenv "HOME" (getcwd))
4001 (and (zero? (system* "python" "selftest.py"
4002 "--installed"))
4003 (zero? (system* "python" "test-installed.py"))))))
4004 (delete 'check))))
c937562e
EB
4005 (home-page "https://pypi.python.org/pypi/Pillow")
4006 (synopsis "Fork of the Python Imaging Library")
4007 (description
4008 "The Python Imaging Library adds image processing capabilities to your
4009Python interpreter. This library provides extensive file format support, an
4010efficient internal representation, and fairly powerful image processing
4011capabilities. The core image library is designed for fast access to data
4012stored in a few basic pixel formats. It should provide a solid foundation for
4013a general image processing tool.")
3f641af0 4014 (license (license:x11-style
c937562e
EB
4015 "http://www.pythonware.com/products/pil/license.htm"
4016 "The PIL Software License"))))
4017
4018(define-public python2-pillow
4019 (package-with-python2 python-pillow))
bb986599 4020
a415f036
FB
4021(define-public python-pycparser
4022 (package
4023 (name "python-pycparser")
38eb6919 4024 (version "2.14")
a415f036
FB
4025 (source
4026 (origin
4027 (method url-fetch)
38eb6919 4028 (uri (pypi-uri "pycparser" version))
a415f036
FB
4029 (sha256
4030 (base32
38eb6919 4031 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4032 (outputs '("out" "doc"))
4033 (build-system python-build-system)
4034 (native-inputs
4035 `(("pkg-config" ,pkg-config)
4036 ("python-setuptools" ,python-setuptools)))
4037 (arguments
89b5c60e 4038 `(#:phases
a415f036
FB
4039 (alist-replace
4040 'check
4041 (lambda _
4042 (with-directory-excursion "tests"
4043 (zero? (system* "python" "all_tests.py"))))
4044 (alist-cons-after
4045 'install 'install-doc
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4048 (doc (string-append data "/doc/" ,name "-" ,version))
4049 (examples (string-append doc "/examples")))
4050 (mkdir-p examples)
4051 (for-each (lambda (file)
4052 (copy-file (string-append "." file)
4053 (string-append doc file)))
4054 '("/README.rst" "/CHANGES" "/LICENSE"))
4055 (copy-recursively "examples" examples)))
4056 %standard-phases))))
4057 (home-page "https://github.com/eliben/pycparser")
4058 (synopsis "C parser in Python")
4059 (description
4060 "Pycparser is a complete parser of the C language, written in pure Python
4061using the PLY parsing library. It parses C code into an AST and can serve as
4062a front-end for C compilers or analysis tools.")
3f641af0 4063 (license license:bsd-3)))
a415f036
FB
4064
4065(define-public python2-pycparser
4066 (package-with-python2 python-pycparser))
57c3f716
FB
4067
4068(define-public python-cffi
4069 (package
4070 (name "python-cffi")
2d3a437c 4071 (version "1.4.2")
57c3f716
FB
4072 (source
4073 (origin
4074 (method url-fetch)
2d3a437c 4075 (uri (pypi-uri "cffi" version))
89b5c60e 4076 (sha256
2d3a437c 4077 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4078 (build-system python-build-system)
4079 (outputs '("out" "doc"))
4080 (inputs
4081 `(("libffi" ,libffi)))
4082 (propagated-inputs ; required at run-time
4083 `(("python-pycparser" ,python-pycparser)))
4084 (native-inputs
4085 `(("pkg-config" ,pkg-config)
4086 ("python-sphinx" ,python-sphinx)
4179f952 4087 ("python-pytest" ,python-pytest)
57c3f716
FB
4088 ("python-setuptools" ,python-setuptools)))
4089 (arguments
4179f952 4090 `(#:phases
57c3f716
FB
4091 (alist-cons-after
4092 'install 'install-doc
4093 (lambda* (#:key outputs #:allow-other-keys)
4094 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4095 (doc (string-append data "/doc/" ,name "-" ,version))
4096 (html (string-append doc "/html")))
4097 (with-directory-excursion "doc"
4098 (system* "make" "html")
4099 (mkdir-p html)
4100 (copy-recursively "build/html" html))
4101 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4102 %standard-phases)))
4103 (home-page "http://cffi.readthedocs.org")
4104 (synopsis "Foreign function interface for Python")
4105 (description
4106 "Foreign Function Interface for Python calling C code.")
bd3fa666 4107 (license license:expat)))
57c3f716
FB
4108
4109(define-public python2-cffi
4110 (package-with-python2 python-cffi))
6fa14469
FB
4111
4112(define-public python-xcffib
4113 (package
4114 (name "python-xcffib")
4115 (version "0.1.9")
4116 (source
4117 (origin
4118 (method url-fetch)
4119 (uri (string-append "https://pypi.python.org/packages/source/x/"
4120 "xcffib/xcffib-" version ".tar.gz"))
4121 (sha256
4122 (base32
4123 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4124 (build-system python-build-system)
4125 (inputs
4126 `(("libxcb" ,libxcb)
4127 ("python-six" ,python-six)))
4128 (native-inputs
4129 `(("python-setuptools" ,python-setuptools)))
4130 (propagated-inputs
4131 `(("python-cffi" ,python-cffi))) ; used at run time
4132 (arguments
89b5c60e 4133 `(#:phases
6fa14469
FB
4134 (alist-cons-after
4135 'install 'install-doc
4136 (lambda* (#:key outputs #:allow-other-keys)
4137 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4138 "/doc/" ,name "-" ,version)))
4139 (mkdir-p doc)
4140 (copy-file "README.md"
4141 (string-append doc "/README.md"))))
4142 %standard-phases)))
4143 (home-page "https://github.com/tych0/xcffib")
4144 (synopsis "XCB Python bindings")
4145 (description
4146 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4147support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4148 (license license:expat)))
6fa14469
FB
4149
4150(define-public python2-xcffib
4151 (package-with-python2 python-xcffib))
4152
9e099723
FB
4153(define-public python-cairocffi
4154 (package
4155 (name "python-cairocffi")
4156 (version "0.6")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 ;; The archive on pypi is missing the 'utils' directory!
4161 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4162 version ".tar.gz"))
f586c877 4163 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4164 (sha256
4165 (base32
4166 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4167 (build-system python-build-system)
4168 (outputs '("out" "doc"))
4169 (inputs
4170 `(("gdk-pixbuf" ,gdk-pixbuf)
4171 ("cairo" ,cairo)))
4172 (native-inputs
4173 `(("pkg-config" ,pkg-config)
4174 ("python-sphinx" ,python-sphinx)
4175 ("python-docutils" ,python-docutils)
4176 ("python-setuptools" ,python-setuptools)))
4177 (propagated-inputs
4178 `(("python-xcffib" ,python-xcffib))) ; used at run time
4179 (arguments
89b5c60e 4180 `(#:phases
9e099723
FB
4181 (alist-cons-after
4182 'install 'install-doc
4183 (lambda* (#:key inputs outputs #:allow-other-keys)
4184 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4185 (doc (string-append data "/doc/" ,name "-" ,version))
4186 (html (string-append doc "/html")))
89b5c60e 4187 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4188 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4189 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4190 (setenv "LANG" "en_US.UTF-8")
4191 (mkdir-p html)
4192 (for-each (lambda (file)
4193 (copy-file (string-append "." file)
4194 (string-append doc file)))
4195 '("/README.rst" "/CHANGES" "/LICENSE"))
4196 (system* "python" "setup.py" "build_sphinx")
4197 (copy-recursively "docs/_build/html" html)))
4198 %standard-phases)))
4199 (home-page "https://github.com/SimonSapin/cairocffi")
4200 (synopsis "Python bindings and object-oriented API for Cairo")
4201 (description
4202 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4203Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4204graphics library with support for multiple backends including image buffers,
4205PNG, PostScript, PDF, and SVG file output.")
3f641af0 4206 (license license:bsd-3)))
9e099723
FB
4207
4208(define-public python2-cairocffi
4209 (package-with-python2 python-cairocffi))
4210
3cff95cb
RW
4211(define-public python-decorator
4212 (package
4213 (name "python-decorator")
eb6e2e81 4214 (version "4.0.9")
3cff95cb
RW
4215 (source
4216 (origin
4217 (method url-fetch)
e21338be 4218 (uri (pypi-uri "decorator" version))
3cff95cb 4219 (sha256
eb6e2e81 4220 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4221 (build-system python-build-system)
4222 (arguments '(#:tests? #f)) ; no test target
4223 (native-inputs
4224 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4225 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4226 (synopsis "Python module to simplify usage of decorators")
4227 (description
4228 "The aim of the decorator module is to simplify the usage of decorators
4229for the average programmer, and to popularize decorators usage giving examples
4230of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4231etc. The core of this module is a decorator factory.")
4232 (license license:expat)))
4233
4234(define-public python2-decorator
4235 (package-with-python2 python-decorator))
4236
2c0499ad
RW
4237(define-public python-drmaa
4238 (package
4239 (name "python-drmaa")
4240 (version "0.7.6")
4241 (source
4242 (origin
4243 (method url-fetch)
4244 (uri (string-append
4245 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4246 version ".tar.gz"))
4247 (sha256
4248 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4249 (build-system python-build-system)
4250 ;; The test suite requires libdrmaa which is provided by the cluster
4251 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4252 ;; should be set to the path of the libdrmaa library.
4253 (arguments '(#:tests? #f))
4254 (native-inputs
4255 `(("python-nose" ,python-nose)
4256 ("python-setuptools" ,python-setuptools)))
4257 (home-page "https://pypi.python.org/pypi/drmaa")
4258 (synopsis "Python bindings for the DRMAA library")
4259 (description
4260 "A Python package for Distributed Resource Management (DRM) job
4261submission and control. This package is an implementation of the DRMAA 1.0
4262Python language binding specification.")
3f641af0 4263 (license license:bsd-3)))
2c0499ad
RW
4264
4265(define-public python2-drmaa
4266 (package-with-python2 python-drmaa))
4267
d05c6da0
RW
4268(define-public python-gridmap
4269 (package
4270 (name "python-gridmap")
4271 (version "0.13.0")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (string-append
4276 "https://github.com/pygridtools/gridmap/archive/v"
4277 version ".tar.gz"))
4278 (file-name (string-append name "-" version ".tar.gz"))
4279 (sha256
4280 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4281 (build-system python-build-system)
4282 (inputs
4283 `(("python-psutil" ,python-psutil)
4284 ("python-drmaa" ,python-drmaa)
4285 ("python-pyzmq" ,python-pyzmq)))
4286 (native-inputs
4287 `(("python-setuptools" ,python-setuptools)))
4288 (home-page "https://github.com/pygridtools/gridmap")
4289 (synopsis "Create jobs on a cluster directly from Python")
4290 (description
4291 "Gridmap is a Python package to allow you to easily create jobs on the
4292cluster directly from Python. You can directly map Python functions onto the
4293cluster without needing to write any wrapper code yourself.")
3f641af0 4294 (license license:gpl3+)))
d05c6da0
RW
4295
4296(define-public python2-gridmap
4297 (package-with-python2 python-gridmap))
4298
cb6d5c54
RW
4299(define-public python-pexpect
4300 (package
4301 (name "python-pexpect")
4302 (version "3.3")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (string-append "https://pypi.python.org/packages/source/p/"
4307 "pexpect/pexpect-" version ".tar.gz"))
4308 (sha256
4309 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4310 (build-system python-build-system)
4311 (arguments
4312 `(#:phases
4313 (modify-phases %standard-phases
4314 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4315 (native-inputs
4316 `(("python-nose" ,python-nose)))
4317 (home-page "http://pexpect.readthedocs.org/")
4318 (synopsis "Controlling interactive console applications")
4319 (description
4320 "Pexpect is a pure Python module for spawning child applications;
4321controlling them; and responding to expected patterns in their output.
4322Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4323child application and control it as if a human were typing commands.")
3f641af0 4324 (license license:isc)))
cb6d5c54
RW
4325
4326(define-public python2-pexpect
4327 (package-with-python2 python-pexpect))
4328
229ad120
RW
4329(define-public python-setuptools-scm
4330 (package
4331 (name "python-setuptools-scm")
42d6d0d0 4332 (version "1.11.1")
229ad120
RW
4333 (source (origin
4334 (method url-fetch)
383af6b0 4335 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4336 (sha256
4337 (base32
42d6d0d0 4338 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4339 (build-system python-build-system)
383af6b0 4340 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4341 (home-page "https://github.com/pypa/setuptools_scm/")
4342 (synopsis "Manage Python package versions in SCM metadata")
4343 (description
383af6b0 4344 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4345@dfn{software configuration management} (SCM) metadata instead of declaring
4346them as the version argument or in a SCM managed file.")
4347 (license license:expat)))
4348
4349(define-public python2-setuptools-scm
4350 (package-with-python2 python-setuptools-scm))
4351
b74270ee
RW
4352(define-public python-pathpy
4353 (package
4354 (name "python-pathpy")
4355 (version "8.1.1")
4356 (source
4357 (origin
4358 (method url-fetch)
4359 (uri (string-append "https://pypi.python.org/packages/source/p/"
4360 "path.py/path.py-" version ".tar.gz"))
4361 (sha256
4362 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4363 (build-system python-build-system)
4364 (propagated-inputs
4365 `(("python-appdirs" ,python-appdirs)))
4366 (native-inputs
553b709b
EF
4367 `(("python-setuptools" ,python-setuptools)
4368 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4369 ("python-pytest" ,python-pytest)
4370 ("python-pytest-runner" ,python-pytest-runner)))
4371 (home-page "http://github.com/jaraco/path.py")
4372 (synopsis "Python module wrapper for built-in os.path")
4373 (description
4374 "@code{path.py} implements path objects as first-class entities, allowing
4375common operations on files to be invoked on those path objects directly.")
4376 (license license:expat)))
4377
4378(define-public python2-pathpy
4379 (package-with-python2 python-pathpy))
4380
0d34e01b
RW
4381(define-public python-pickleshare
4382 (package
4383 (name "python-pickleshare")
4384 (version "0.5")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (string-append "https://pypi.python.org/packages/source/p/"
4389 "pickleshare/pickleshare-" version ".tar.gz"))
4390 (sha256
4391 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4392 (build-system python-build-system)
4393 (propagated-inputs
4394 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4395 (native-inputs
4396 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4397 (home-page "https://github.com/vivainio/pickleshare")
4398 (synopsis "Tiny key value database with concurrency support")
4399 (description
4400 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4401Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4402shelve, many processes can access the database simultaneously. Changing a
4403value in database is immediately visible to other processes accessing the same
4404database. Concurrency is possible because the values are stored in separate
4405files. Hence the “database” is a directory where all files are governed by
4406PickleShare.")
4407 (license license:expat)))
4408
4409(define-public python2-pickleshare
4410 (package-with-python2 python-pickleshare))
4411
cd6e5189
RW
4412(define-public python-simplegeneric
4413 (package
4414 (name "python-simplegeneric")
4415 (version "0.8.1")
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (string-append "https://pypi.python.org/packages/source/s/"
4420 "simplegeneric/simplegeneric-" version ".zip"))
4421 (sha256
4422 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4423 (build-system python-build-system)
4424 (native-inputs
69b96e5e
RW
4425 `(("python-setuptools" ,python-setuptools)
4426 ("unzip" ,unzip)))
cd6e5189
RW
4427 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4428 (synopsis "Python module for simple generic functions")
4429 (description
4430 "The simplegeneric module lets you define simple single-dispatch generic
4431functions, akin to Python’s built-in generic functions like @code{len()},
4432@code{iter()} and so on. However, instead of using specially-named methods,
4433these generic functions use simple lookup tables, akin to those used by
4434e.g. @code{pickle.dump()} and other generic functions found in the Python
4435standard library.")
3f641af0 4436 (license license:zpl2.1)))
cd6e5189
RW
4437
4438(define-public python2-simplegeneric
4439 (package-with-python2 python-simplegeneric))
4440
ddc7d8ed
RW
4441(define-public python-ipython-genutils
4442 (package
4443 (name "python-ipython-genutils")
4444 (version "0.1.0")
4445 (source
4446 (origin
4447 (method url-fetch)
4448 (uri (string-append "https://pypi.python.org/packages/source/i/"
4449 "ipython_genutils/ipython_genutils-"
4450 version ".tar.gz"))
4451 (sha256
4452 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4453 (build-system python-build-system)
4454 (arguments `(#:tests? #f)) ; no tests
4455 (home-page "http://ipython.org")
4456 (synopsis "Vestigial utilities from IPython")
4457 (description
4458 "This package provides retired utilities from IPython.")
3f641af0 4459 (license license:bsd-3)))
ddc7d8ed
RW
4460
4461(define-public python2-ipython-genutils
4462 (package-with-python2 python-ipython-genutils))
4463
2b10eb48
RW
4464(define-public python-traitlets
4465 (package
4466 (name "python-traitlets")
cc0c4fde 4467 (version "4.1.0")
2b10eb48
RW
4468 (source
4469 (origin
4470 (method url-fetch)
cc0c4fde 4471 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4472 (sha256
4473 (base32
cc0c4fde 4474 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
2b10eb48
RW
4475 (build-system python-build-system)
4476 (arguments
4477 `(#:phases
4478 (modify-phases %standard-phases
4479 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4480 (propagated-inputs
4481 `(("python-ipython-genutils" ,python-ipython-genutils)
4482 ("python-decorator" ,python-decorator)))
4483 (native-inputs
cc0c4fde
EF
4484 `(("python-mock" ,python-mock)
4485 ("python-nose" ,python-nose)))
2b10eb48
RW
4486 (home-page "http://ipython.org")
4487 (synopsis "Configuration system for Python applications")
4488 (description
4489 "Traitlets is a framework that lets Python classes have attributes with
4490type checking, dynamically calculated default values, and ‘on change’
4491callbacks. The package also includes a mechanism to use traitlets for
4492configuration, loading values from files or from command line arguments. This
4493is a distinct layer on top of traitlets, so you can use traitlets in your code
4494without using the configuration machinery.")
3f641af0 4495 (license license:bsd-3)))
2b10eb48
RW
4496
4497(define-public python2-traitlets
4498 (package-with-python2 python-traitlets))
4499
ae1ab9fe
FB
4500(define-public python-ipython
4501 (package
4502 (name "python-ipython")
3a0b1b9a 4503 (version "3.2.1")
ae1ab9fe
FB
4504 (source
4505 (origin
fceac880 4506 (method url-fetch)
fc1adab1 4507 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4508 (uri (string-append "https://pypi.python.org/packages/source/i/"
4509 "ipython/ipython-" version ".tar.gz"))
4510 (sha256
4511 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4512 (build-system python-build-system)
4513 (outputs '("out" "doc"))
3a0b1b9a
FB
4514 (propagated-inputs
4515 `(("python-pyzmq" ,python-pyzmq)
4516 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4517 (inputs
4518 `(("readline" ,readline)
3a0b1b9a 4519 ("which" ,which)
ae1ab9fe 4520 ("python-matplotlib" ,python-matplotlib)
5d26e542 4521 ("python-numpy" ,python-numpy)
ae1ab9fe 4522 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4523 ("python-jinja2" ,python-jinja2)
4524 ("python-mistune" ,python-mistune)
4525 ("python-jsonschema" ,python-jsonschema)
4526 ("python-pygments" ,python-pygments)
4527 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4528 ("python-nose" ,python-nose)))
4529 (native-inputs
4530 `(("pkg-config" ,pkg-config)
4531 ("python-sphinx" ,python-sphinx)
4532 ("texlive" ,texlive)
4533 ("texinfo" ,texinfo)
4534 ("python-setuptools" ,python-setuptools)))
4535 (arguments
89b5c60e 4536 `(#:phases
3a0b1b9a
FB
4537 (modify-phases %standard-phases
4538 (add-after
4539 'install 'install-doc
4540 (lambda* (#:key inputs outputs #:allow-other-keys)
4541 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4542 (doc (string-append data "/doc/" ,name "-" ,version))
4543 (html (string-append doc "/html"))
4544 (man1 (string-append data "/man/man1"))
4545 (info (string-append data "/info"))
4546 (examples (string-append doc "/examples")))
afd3d931 4547 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4548 (with-directory-excursion "docs"
4549 ;; FIXME: html and pdf fail to build
4550 ;; (system* "make" "html")
4551 ;; (system* "make" "pdf" "PAPER=a4")
4552 (system* "make" "info"))
4553 (copy-recursively "docs/man" man1)
4554 (copy-recursively "examples" examples)
4555 ;; (copy-recursively "docs/build/html" html)
4556 ;; (copy-file "docs/build/latex/ipython.pdf"
4557 ;; (string-append doc "/ipython.pdf"))
4558 (mkdir-p info)
4559 (copy-file "docs/build/texinfo/ipython.info"
4560 (string-append info "/ipython.info"))
4561 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4562 ;; Tests can only be run after the library has been installed and not
4563 ;; within the source directory.
4564 (delete 'check)
4565 (add-after
4566 'install 'check
4567 (lambda* (#:key outputs tests? #:allow-other-keys)
4568 (if tests?
4569 (with-directory-excursion "/tmp"
4570 (setenv "HOME" "/tmp/") ;; required by a test
4571 (zero? (system* (string-append (assoc-ref outputs "out")
4572 "/bin/iptest"))))
4573 #t)))
4574 (add-before
4575 'install 'fix-tests
4576 (lambda* (#:key inputs #:allow-other-keys)
4577 (substitute* "./IPython/utils/_process_posix.py"
4578 (("/usr/bin/env', 'which") (which "which")))
4579 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4580 (("#!/usr/bin/env python")
4581 (string-append "#!" (which "python"))))
4582 ;; Disable 1 failing test
4583 (substitute* "./IPython/core/tests/test_magic.py"
4584 (("def test_dirops\\(\\):" all)
4585 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4586 (home-page "http://ipython.org")
4587 (synopsis "IPython is a tool for interactive computing in Python")
4588 (description
4589 "IPython provides a rich architecture for interactive computing with:
4590Powerful interactive shells, a browser-based notebook, support for interactive
4591data visualization, embeddable interpreters and tools for parallel
4592computing.")
135ba811
EF
4593 (license license:bsd-3)
4594 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4595
4596(define-public python2-ipython
135ba811 4597 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4598 (package
4599 (inherit ipython)
4600 ;; FIXME: some tests are failing
4601 (arguments
4602 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4603 ;; FIXME: add pyreadline once available.
89b5c60e 4604 (inputs
135ba811
EF
4605 `(("python2-mock" ,python2-mock)
4606 ,@(package-inputs ipython))))))
03411993
AE
4607
4608(define-public python-isodate
4609 (package
4610 (name "python-isodate")
b6785c2e 4611 (version "0.5.4")
03411993
AE
4612 (source
4613 (origin
4614 (method url-fetch)
b6785c2e 4615 (uri (pypi-uri "isodate" version))
03411993
AE
4616 (sha256
4617 (base32
b6785c2e 4618 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4619 (build-system python-build-system)
4620 (inputs
4621 `(("python-setuptools" ,python-setuptools)))
4622 (home-page
4623 "http://cheeseshop.python.org/pypi/isodate")
4624 (synopsis
4625 "Python date parser and formatter")
4626 (description
4627 "Python-isodate is a python module for parsing and formatting
4628ISO 8601 dates, time and duration.")
3f641af0 4629 (license license:bsd-3)))
03411993
AE
4630
4631(define-public python2-isodate
4632 (package-with-python2 python-isodate))
673ab897
AE
4633
4634(define-public python-html5lib
4635 (package
4636 (name "python-html5lib")
fee04c19 4637 (version "1.0b8")
673ab897
AE
4638 (source
4639 (origin
4640 (method url-fetch)
fee04c19 4641 (uri (pypi-uri "html5lib" version))
673ab897
AE
4642 (sha256
4643 (base32
fee04c19 4644 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4645 (build-system python-build-system)
3dd75476
AE
4646 (propagated-inputs
4647 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4648 (inputs
4649 `(("python-setuptools" ,python-setuptools)))
4650 (arguments
4651 `(#:test-target "check"))
4652 (home-page
4653 "https://github.com/html5lib/html5lib-python")
4654 (synopsis
4655 "Python HTML parser based on the WHATWG HTML specifcation")
4656 (description
4657 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4658and written in Python.")
bd3fa666 4659 (license license:expat)))
673ab897
AE
4660
4661(define-public python2-html5lib
4662 (package-with-python2 python-html5lib))
e99f4211
MW
4663
4664(define-public python-urwid
4665 (package
4666 (name "python-urwid")
51ff41f6 4667 (version "1.3.1")
e99f4211
MW
4668 (source
4669 (origin
4670 (method url-fetch)
b97c1bfd 4671 (uri (pypi-uri "urwid" version))
e99f4211
MW
4672 (sha256
4673 (base32
51ff41f6 4674 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4675 (build-system python-build-system)
b97c1bfd
LF
4676 (arguments
4677 `(#:phases
4678 (modify-phases %standard-phases
4679 ;; Disable failing test. Bug filed upstream:
4680 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4681 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4682 (add-after 'unpack 'disable-failing-test
4683 (lambda _
4684 (substitute* "urwid/tests/test_event_loops.py"
4685 (("test_remove_watch_file")
4686 "disable_remove_watch_file")))))))
e99f4211
MW
4687 (native-inputs `(("python-setuptools" ,python-setuptools)))
4688 (home-page "http://urwid.org")
4689 (synopsis "Console user interface library for Python")
4690 (description
4691 "Urwid is a curses-based UI/widget library for Python. It includes many
4692features useful for text console applications.")
3f641af0 4693 (license license:lgpl2.1+)))
e99f4211
MW
4694
4695(define-public python2-urwid
4696 (package-with-python2 python-urwid))
d95a56c6 4697
47d0b292
TS
4698(define-public python-urwidtrees
4699 (package
4700 (name "python-urwidtrees")
37ec4623 4701 (version "1.0.2")
47d0b292
TS
4702 (source
4703 (origin
4704 (method url-fetch)
37ec4623
TS
4705 ;; package author intends on distributing via github rather than pypi:
4706 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4707 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4708 version ".tar.gz"))
4709 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4710 (sha256
4711 (base32
37ec4623 4712 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4713 (build-system python-build-system)
4714 (arguments
4715 '(#:tests? #f)) ; no tests
4716 (inputs `(("python-urwid" ,python-urwid)))
4717 (home-page "https://github.com/pazz/urwidtrees")
4718 (synopsis "Tree widgets for urwid")
4719 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4720toolkit. Use it to build trees of widgets.")
3f641af0 4721 (license license:gpl3+)))
47d0b292
TS
4722
4723(define-public python2-urwidtrees
4724 (package-with-python2 python-urwidtrees))
4725
d95a56c6
PAR
4726(define-public python-dbus
4727 (package
4728 (name "python-dbus")
4729 (version "1.2.0")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (string-append
5cc3096c 4734 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4735 version ".tar.gz"))
4736 (sha256
4737 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4738 (build-system gnu-build-system)
6717c879
SB
4739 (arguments
4740 '(#:phases
4741 (modify-phases %standard-phases
4742 (add-before
4743 'check 'pre-check
4744 (lambda _
4745 ;; XXX: For the missing '/etc/machine-id'.
4746 (substitute* "test/run-test.sh"
4747 (("DBUS_FATAL_WARNINGS=1")
4748 "DBUS_FATAL_WARNINGS=0"))
4749 #t)))))
d95a56c6
PAR
4750 (native-inputs
4751 `(("pkg-config" ,pkg-config)))
4752 (inputs
4753 `(("python" ,python)
2e88d113 4754 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4755 (synopsis "Python bindings for D-bus")
4756 (description "python-dbus provides bindings for libdbus, the reference
4757implementation of D-Bus.")
4758 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4759 (license license:expat)))
b52af02b
MW
4760
4761(define-public python2-dbus
4762 (package (inherit python-dbus)
4763 (name "python2-dbus")
4764 (inputs `(("python" ,python-2)
4765 ,@(alist-delete "python"
4766 (package-inputs python-dbus)
4767 equal?)))
4768 ;; FIXME: on Python 2, the test_utf8 fails with:
4769 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4770 (arguments `(#:tests? #f))))
a6ac8332
AE
4771
4772(define-public python-apsw
4773 (package
4774 (name "python-apsw")
917708c2 4775 (version "3.9.2-r1")
a6ac8332
AE
4776 (source
4777 (origin
4778 (method url-fetch)
917708c2 4779 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4780 (sha256
4781 (base32
917708c2 4782 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4783 (build-system python-build-system)
4784 (inputs
4785 `(("python-setuptools" ,python-setuptools)
4786 ("sqlite" ,sqlite)))
4787 (arguments
4788 `(#:phases
4789 ;; swap check and install phases
4790 (alist-cons-after
4791 'install 'check
4792 (assoc-ref %standard-phases 'check)
4793 (alist-delete
4794 'check
4795 %standard-phases))))
4796 (home-page "https://github.com/rogerbinns/apsw/")
4797 (synopsis "Another Python SQLite Wrapper")
4798 (description "APSW is a Python wrapper for the SQLite
4799embedded relational database engine. In contrast to other wrappers such as
4800pysqlite it focuses on being a minimal layer over SQLite attempting just to
4801translate the complete SQLite API into Python.")
abde5f37 4802 (license license:zlib)))
a6ac8332
AE
4803
4804(define-public python2-apsw
4805 (package-with-python2 python-apsw))
26b307e2
AE
4806
4807(define-public python-lxml
4808 (package
4809 (name "python-lxml")
d58a3203 4810 (version "3.6.0")
26b307e2
AE
4811 (source
4812 (origin
4813 (method url-fetch)
97bbc480 4814 (uri (pypi-uri "lxml" version))
26b307e2 4815 (sha256
d58a3203
EF
4816 (base32
4817 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4818 (build-system python-build-system)
4819 (inputs
4820 `(("libxml2" ,libxml2)
4821 ("libxslt" ,libxslt)
4822 ("python-setuptools" ,python-setuptools)))
4823 (home-page "http://lxml.de/")
4824 (synopsis
4825 "Python XML processing library")
4826 (description
4827 "The lxml XML toolkit is a Pythonic binding for the C libraries
4828libxml2 and libxslt.")
3f641af0 4829 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4830
4831(define-public python2-lxml
4832 (package-with-python2 python-lxml))
4ed20663 4833
b32a1e47
CAW
4834;; beautifulsoup4 has a totally different namespace than 3.x,
4835;; and pypi seems to put it under its own name, so I guess we should too
4836(define-public python-beautifulsoup4
4837 (package
4838 (name "python-beautifulsoup4")
cfbb3b0d 4839 (version "4.5.0")
b32a1e47
CAW
4840 (source
4841 (origin
4842 (method url-fetch)
4843 (uri (pypi-uri "beautifulsoup4" version))
4844 (sha256
4845 (base32
cfbb3b0d 4846 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
b32a1e47
CAW
4847 (build-system python-build-system)
4848 (home-page
4849 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4850 (synopsis
4851 "Python screen-scraping library")
4852 (description
4853 "Beautiful Soup is a Python library designed for rapidly setting up
4854screen-scraping projects. It offers Pythonic idioms for navigating,
4855searching, and modifying a parse tree, providing a toolkit for
4856dissecting a document and extracting what you need. It automatically
4857converts incoming documents to Unicode and outgoing documents to UTF-8.")
4858 (license license:expat)
4859 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4860
4861(define-public python2-beautifulsoup4
4862 (package
4863 (inherit (package-with-python2
4864 (strip-python2-variant python-beautifulsoup4)))
4865 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4866
092e86f5
AE
4867(define-public python2-cssutils
4868 (package
4869 (name "python2-cssutils")
58d1d816 4870 (version "1.0.1")
092e86f5
AE
4871 (source
4872 (origin
4873 (method url-fetch)
58d1d816 4874 (uri (pypi-uri "cssutils" version))
092e86f5 4875 (sha256
58d1d816
EF
4876 (base32
4877 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
4878 (build-system python-build-system)
4879 (native-inputs
4880 `(("python2-mock" ,python2-mock) ; for the tests
4881 ("unzip" ,unzip))) ; for unpacking the source
4882 (inputs
4883 `(("python2-setuptools" ,python2-setuptools)))
4884 (arguments
4885 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4886 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4887 ))
092e86f5
AE
4888 (home-page "http://cthedot.de/cssutils/")
4889 (synopsis
4890 "CSS Cascading Style Sheets library for Python")
4891 (description
4892 "Cssutils is a Python package for parsing and building CSS
4893Cascading Style Sheets. Currently it provides a DOM only and no rendering
4894options.")
3f641af0 4895 (license license:lgpl3+)))
880ff77c
AE
4896
4897(define-public python-cssselect
4898 (package
4899 (name "python-cssselect")
d5ccd9ab 4900 (version "0.9.2")
880ff77c
AE
4901 (source
4902 (origin
4903 (method url-fetch)
d5ccd9ab 4904 (uri (pypi-uri "cssselect" version))
880ff77c 4905 (sha256
d5ccd9ab
EF
4906 (base32
4907 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
4908 (build-system python-build-system)
4909 (inputs
4910 `(("python-setuptools" ,python-setuptools)))
4911 (arguments
4912 ;; tests fail with message
4913 ;; AttributeError: 'module' object has no attribute 'tests'
4914 `(#:tests? #f))
4915 (home-page
4916 "https://pythonhosted.org/cssselect/")
4917 (synopsis
4918 "CSS3 selector parser and translator to XPath 1.0")
4919 (description
4920 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4921them to XPath 1.0 expressions. Such expressions can be used in lxml or
4922another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 4923 (license license:bsd-3)))
880ff77c
AE
4924
4925(define-public python2-cssselect
4926 (package-with-python2 python-cssselect))
60357f99
AE
4927
4928(define-public python-netifaces
4929 (package
4930 (name "python-netifaces")
4931 (version "0.10.4")
4932 (source
4933 (origin
4934 (method url-fetch)
4935 (uri (string-append
4936 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4937 version
4938 ".tar.gz"))
4939 (sha256
4940 (base32
4941 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4942 (build-system python-build-system)
4943 (inputs
4944 `(("python-setuptools" ,python-setuptools)))
4945 (home-page
4946 "https://bitbucket.org/al45tair/netifaces")
4947 (synopsis
4948 "Python module for portable network interface information")
4949 (description
4950 "Netifaces is a Python module providing information on network
4951interfaces in an easy and portable manner.")
4952 (license license:expat)))
4953
4954(define-public python2-netifaces
4955 (package-with-python2 python-netifaces))
92cb152b 4956
32f77c04
RW
4957(define-public python-networkx
4958 (package
4959 (name "python-networkx")
a4d9609c 4960 (version "1.11")
32f77c04
RW
4961 (source
4962 (origin
4963 (method url-fetch)
a4d9609c 4964 (uri (pypi-uri "networkx" version))
32f77c04 4965 (sha256
a4d9609c 4966 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
4967 (build-system python-build-system)
4968 ;; python-decorator is needed at runtime
4969 (propagated-inputs
4970 `(("python-decorator" ,python-decorator)))
4971 (native-inputs
4972 `(("python-setuptools" ,python-setuptools)
4973 ("python-nose" ,python-nose)))
4974 (home-page "http://networkx.github.io/")
4975 (synopsis "Python module for creating and manipulating graphs and networks")
4976 (description
4977 "NetworkX is a Python package for the creation, manipulation, and study
4978of the structure, dynamics, and functions of complex networks.")
3f641af0 4979 (license license:bsd-3)))
32f77c04
RW
4980
4981(define-public python2-networkx
4982 (package-with-python2 python-networkx))
4983
92cb152b
RW
4984(define-public snakemake
4985 (package
4986 (name "snakemake")
4987 (version "3.2.1")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (string-append
4992 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4993 version ".tar.gz"))
4994 (sha256
4995 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4996 (build-system python-build-system)
4997 (inputs `(("python-setuptools" ,python-setuptools)))
4998 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4999 (synopsis "Python-based execution environment for make-like workflows")
5000 (description
5001 "Snakemake aims to reduce the complexity of creating workflows by
5002providing a clean and modern domain specific specification language (DSL) in
5003Python style, together with a fast and comfortable execution environment.")
5004 (license license:expat)))
a1920bc9 5005
35de1fbd
RW
5006(define-public python-seaborn
5007 (package
5008 (name "python-seaborn")
fc899d4f 5009 (version "0.7.0")
35de1fbd
RW
5010 (source
5011 (origin
5012 (method url-fetch)
fc899d4f 5013 (uri (pypi-uri "seaborn" version))
35de1fbd 5014 (sha256
fc899d4f 5015 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5016 (build-system python-build-system)
5017 (propagated-inputs
5018 `(("python-pandas" ,python-pandas)
5019 ("python-matplotlib" ,python-matplotlib)
5020 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5021 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5022 (synopsis "Statistical data visualization")
5023 (description
5024 "Seaborn is a library for making attractive and informative statistical
5025graphics in Python. It is built on top of matplotlib and tightly integrated
5026with the PyData stack, including support for numpy and pandas data structures
5027and statistical routines from scipy and statsmodels.")
3f641af0 5028 (license license:bsd-3)
fc899d4f 5029 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5030
5031(define-public python2-seaborn
fc899d4f
EF
5032 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5033 (package
5034 (inherit base)
5035 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5036 ,@(package-propagated-inputs base)))
5037 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5038 ,@(package-native-inputs base))))))
35de1fbd 5039
90fc547f
RW
5040(define-public python-sympy
5041 (package
5042 (name "python-sympy")
5043 (version "0.7.6")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (string-append
5048 "https://github.com/sympy/sympy/releases/download/sympy-"
5049 version "/sympy-" version ".tar.gz"))
5050 (sha256
5051 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5052 (build-system python-build-system)
5053 (native-inputs
5054 `(("python-setuptools" ,python-setuptools)))
5055 (home-page "http://www.sympy.org/")
5056 (synopsis "Python library for symbolic mathematics")
5057 (description
5058 "SymPy is a Python library for symbolic mathematics. It aims to become a
5059full-featured computer algebra system (CAS) while keeping the code as simple
5060as possible in order to be comprehensible and easily extensible.")
3f641af0 5061 (license license:bsd-3)))
90fc547f
RW
5062
5063(define-public python2-sympy
5064 (package-with-python2 python-sympy))
5065
e8c9b010
SR
5066(define-public python-q
5067 (package
5068 (name "python-q")
5069 (version "2.6")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (pypi-uri "q" version))
5074 (sha256
5075 (base32
5076 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5077 (build-system python-build-system)
5078 (home-page "https://github.com/zestyping/q")
5079 (synopsis "Quick-and-dirty debugging output for tired programmers")
5080 (description
5081 "q is a Python module for \"print\" style of debugging Python code. It
5082provides convenient short API for print out of values, tracebacks, and
5083falling into the Python interpreter.")
5084 (license license:asl2.0)
5085 (properties `((python2-variant . ,(delay python2-q))))))
5086
5087(define-public python2-q
5088 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5089 (package
5090 (inherit base)
5091 (native-inputs
5092 `(("python2-setuptools" ,python2-setuptools)
5093 ,@(package-native-inputs base))))))
5094
a1920bc9
FB
5095(define-public python-testlib
5096 (package
5097 (name "python-testlib")
5098 (version "0.6.5")
5099 (source
5100 (origin
5101 (method url-fetch)
5102 (uri (string-append
5103 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5104 version ".zip"))
5105 (sha256
5106 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5107 (build-system python-build-system)
5108 (inputs
5109 `(("python-setuptools" ,python-setuptools)))
5110 (native-inputs
5111 `(("unzip" ,unzip)))
5112 (arguments
5113 `(#:phases
5114 (alist-replace
5115 'unpack
5116 (lambda* (#:key inputs outputs #:allow-other-keys)
5117 (let ((unzip (string-append (assoc-ref inputs "unzip")
5118 "/bin/unzip"))
5119 (source (assoc-ref inputs "source")))
5120 (and (zero? (system* unzip source))
5121 (chdir (string-append "testlib-" ,version)))))
5122 %standard-phases)))
5123 (synopsis "Python micro test suite harness")
5124 (description "A micro unittest suite harness for Python.")
5125 (home-page "https://github.com/trentm/testlib")
1cb9c006 5126 (license license:expat)))
a1920bc9
FB
5127
5128(define-public python2-testlib
5129 (package-with-python2 python-testlib))
db62afa5
LC
5130
5131(define-public python2-xlib
5132 (package
5133 (name "python2-xlib")
5134 (version "0.14")
5135 (source (origin
5136 (method url-fetch)
de67e922
LF
5137 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5138 "/" version "/"
db62afa5
LC
5139 "python-xlib-" version ".tar.gz"))
5140 (sha256
5141 (base32
5142 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5143 (build-system python-build-system)
5144 (arguments
5145 `(#:python ,python-2 ;Python 2 only
5146 #:tests? #f)) ;no tests
5147 (inputs
5148 `(("python-setuptools" ,python-setuptools)))
5149 (home-page "http://python-xlib.sourceforge.net/")
5150 (synopsis "Python X11 client library")
5151 (description
5152 "The Python X Library is intended to be a fully functional X client
5153library for Python programs. It is useful to implement low-level X clients.
5154It is written entirely in Python.")
3f641af0 5155 (license license:gpl2+)))
0234ca06
DT
5156
5157(define-public python-singledispatch
5158 (package
5159 (name "python-singledispatch")
5160 (version "3.4.0.3")
5161 (source
5162 (origin
5163 (method url-fetch)
bdb67d84 5164 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5165 (sha256
5166 (base32
5167 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5168 (build-system python-build-system)
5169 (native-inputs
5170 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5171 (inputs
0234ca06
DT
5172 `(("python-six" ,python-six)))
5173 (home-page
5174 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5175 (synopsis "Backport of singledispatch feature from Python 3.4")
5176 (description
5177 "This library brings functools.singledispatch from Python 3.4 to Python
51782.6-3.3.")
5179 (license license:expat)))
5180
5181(define-public python2-singledispatch
5182 (package-with-python2 python-singledispatch))
feaae484 5183
310d218f
RW
5184(define-public python-tornado
5185 (package
5186 (name "python-tornado")
a724924b 5187 (version "4.3")
310d218f
RW
5188 (source
5189 (origin
5190 (method url-fetch)
a724924b 5191 (uri (pypi-uri "tornado" version))
310d218f 5192 (sha256
a724924b 5193 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5194 (build-system python-build-system)
310d218f 5195 (native-inputs
b455439b
EF
5196 `(("python-certifi" ,python-certifi)))
5197 (inputs
5198 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5199 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5200 (synopsis "Python web framework and asynchronous networking library")
5201 (description
5202 "Tornado is a Python web framework and asynchronous networking library,
5203originally developed at FriendFeed. By using non-blocking network I/O,
5204Tornado can scale to tens of thousands of open connections, making it ideal
5205for long polling, WebSockets, and other applications that require a long-lived
5206connection to each user.")
3f641af0 5207 (license license:asl2.0)
b455439b 5208 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5209
5210(define-public python2-tornado
b455439b 5211 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5212 (package (inherit tornado)
5213 (inputs
5214 `(("python2-backport-ssl-match-hostname"
5215 ,python2-backport-ssl-match-hostname)
b455439b
EF
5216 ("python2-singledispatch" ,python2-singledispatch)
5217 ,@(package-inputs tornado)))
5218 (native-inputs
5219 `(("python2-setuptools" ,python2-setuptools)
5220 ,@(package-native-inputs tornado))))))
310d218f 5221
6b59fc10
EF
5222;; the python- version can be removed with python-3.5
5223(define-public python-backports-abc
5224 (package
5225 (name "python-backports-abc")
5226 (version "0.4")
5227 (source
5228 (origin
5229 (method url-fetch)
5230 (uri (pypi-uri "backports_abc" version))
5231 (sha256
5232 (base32
5233 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5234 (build-system python-build-system)
5235 (inputs
5236 `(("python-setuptools" ,python-setuptools)))
5237 (home-page "https://github.com/cython/backports_abc")
66e07664 5238 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5239 (description
5240 "Python-backports-abc provides a backport of additions to the
5241'collections.abc' module in Python-3.5.")
3f641af0 5242 (license license:psfl)))
6b59fc10
EF
5243
5244(define-public python2-backports-abc
5245 (package-with-python2 python-backports-abc))
5246
feaae484
SB
5247(define-public python-waf
5248 (package
5249 (name "python-waf")
f0e8d85e 5250 (version "1.9.1")
feaae484
SB
5251 (source (origin
5252 (method url-fetch)
5253 (uri (string-append "https://waf.io/"
5254 "waf-" version ".tar.bz2"))
5255 (sha256
5256 (base32
f0e8d85e 5257 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
feaae484
SB
5258 (build-system python-build-system)
5259 (arguments
5260 '(#:phases
5261 (modify-phases %standard-phases
5262 (replace 'build
5263 (lambda _
5264 (zero? (begin
5265 (system* "python" "waf-light" "configure")
5266 (system* "python" "waf-light" "build")))))
5267 (replace 'check
5268 (lambda _
5269 (zero? (system* "python" "waf" "--version"))))
5270 (replace 'install
5271 (lambda _
5272 (copy-file "waf" %output))))))
5273 (home-page "https://waf.io/")
5274 (synopsis "Python-based build system")
5275 (description
5276 "Waf is a Python-based framework for configuring, compiling and installing
5277applications.")
3f641af0 5278 (license license:bsd-3)))
feaae484
SB
5279
5280(define-public python2-waf
5281 (package-with-python2 python-waf))
45203542
RW
5282
5283(define-public python-pyzmq
5284 (package
5285 (name "python-pyzmq")
3655ee76 5286 (version "15.1.0")
45203542
RW
5287 (source
5288 (origin
5289 (method url-fetch)
3655ee76 5290 (uri (pypi-uri "pyzmq" version))
45203542 5291 (sha256
3655ee76 5292 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5293 (build-system python-build-system)
5294 (arguments
5295 `(#:configure-flags
5296 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5297 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5298 ;; --inplace' for 'python setup.py test' to work.
5299 #:tests? #f))
5300 (inputs
5301 `(("zeromq" ,zeromq)))
5302 (native-inputs
5303 `(("pkg-config" ,pkg-config)
5304 ("python-nose" ,python-nose)
5305 ("python-setuptools" ,python-setuptools)))
5306 (home-page "http://github.com/zeromq/pyzmq")
5307 (synopsis "Python bindings for 0MQ")
5308 (description
5309 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5310 (license license:bsd-4)))
45203542
RW
5311
5312(define-public python2-pyzmq
5313 (package-with-python2 python-pyzmq))
d889e6c4
CR
5314
5315(define-public python-pep8
5316 (package
5317 (name "python-pep8")
db251311 5318 (version "1.7.0")
d889e6c4
CR
5319 (source
5320 (origin
5321 (method url-fetch)
db251311 5322 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5323 (sha256
5324 (base32
db251311 5325 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5326 (build-system python-build-system)
5327 (inputs
5328 `(("python-setuptools" ,python-setuptools)))
5329 (home-page "http://pep8.readthedocs.org/")
5330 (synopsis "Python style guide checker")
5331 (description
5332 "This tools checks Python code against some of the style conventions in
5333PEP 8.")
5334 (license license:expat)))
5335
5336(define-public python2-pep8
5337 (package-with-python2 python-pep8))
e31d7f44
CR
5338
5339(define-public python-pyflakes
5340 (package
5341 (name "python-pyflakes")
2abc3972 5342 (version "1.0.0")
e31d7f44
CR
5343 (source
5344 (origin
5345 (method url-fetch)
2abc3972 5346 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5347 (sha256
5348 (base32
2abc3972 5349 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5350 (build-system python-build-system)
5351 (inputs
5352 `(("python-setuptools" ,python-setuptools)))
5353 (home-page
5354 "https://github.com/pyflakes/pyflakes")
5355 (synopsis "Passive checker of Python programs")
5356 (description
5357 "Pyflakes statically checks Python source code for common errors.")
5358 (license license:expat)))
a59e017c 5359
7261d9eb
CR
5360(define-public python2-pyflakes
5361 (package-with-python2 python-pyflakes))
5362
a59e017c
CR
5363(define-public python-mccabe
5364 (package
5365 (name "python-mccabe")
c6ebd40d 5366 (version "0.4.0")
a59e017c
CR
5367 (source
5368 (origin
5369 (method url-fetch)
c6ebd40d 5370 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5371 (sha256
5372 (base32
c6ebd40d 5373 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5374 (build-system python-build-system)
5375 (inputs
c6ebd40d
EF
5376 `(("python-pytest" ,python-pytest)
5377 ("python-pytest-runner" ,python-pytest-runner)
5378 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5379 (home-page "https://github.com/flintwork/mccabe")
5380 (synopsis "McCabe checker, plugin for flake8")
5381 (description
5382 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5383complexity of Python source code.")
7362371d 5384 (license license:expat)))
a59e017c
CR
5385
5386(define-public python2-mccabe
5387 (package-with-python2 python-mccabe))
e8df8f47 5388
7477fbb1
CR
5389(define-public python-mccabe-0.2.1
5390 (package (inherit python-mccabe)
5391 (version "0.2.1")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "mccabe" version))
5396 (sha256
5397 (base32
c6ebd40d 5398 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5399 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5400
5401(define-public python2-mccabe-0.2.1
5402 (package-with-python2 python-mccabe-0.2.1))
5403
e8df8f47
CR
5404;; Flake8 2.4.1 requires an older version of pep8.
5405;; This should be removed ASAP.
5406(define-public python-pep8-1.5.7
5407 (package (inherit python-pep8)
5408 (version "1.5.7")
5409 (source
5410 (origin
5411 (method url-fetch)
5412 (uri (string-append
5413 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5414 version
5415 ".tar.gz"))
5416 (sha256
5417 (base32
5418 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5419
5420(define-public python2-pep8-1.5.7
5421 (package-with-python2 python-pep8-1.5.7))
5422
5423;; Flake8 2.4.1 requires an older version of pyflakes.
5424;; This should be removed ASAP.
5425(define-public python-pyflakes-0.8.1
5426 (package (inherit python-pyflakes)
5427 (version "0.8.1")
5428 (source
5429 (origin
5430 (method url-fetch)
5431 (uri (string-append
5432 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5433 version
5434 ".tar.gz"))
5435 (sha256
5436 (base32
5437 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5438
5439(define-public python2-pyflakes-0.8.1
7261d9eb 5440 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5441
5442(define-public python-flake8
5443 (package
5444 (name "python-flake8")
43789136 5445 (version "2.5.4")
e8df8f47
CR
5446 (source
5447 (origin
5448 (method url-fetch)
1b995533 5449 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5450 (sha256
5451 (base32
43789136 5452 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5453 (build-system python-build-system)
5454 (inputs
5455 `(("python-setuptools" ,python-setuptools)
43789136
EF
5456 ("python-pep8" ,python-pep8)
5457 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5458 ("python-mccabe" ,python-mccabe)
5459 ("python-mock" ,python-mock)
5460 ("python-nose" ,python-nose)))
5461 (home-page "https://gitlab.com/pycqa/flake8")
5462 (synopsis
5463 "The modular source code checker: pep8, pyflakes and co")
5464 (description
5465 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5466 (license license:expat)))
5467
5468(define-public python2-flake8
5469 (package-with-python2 python-flake8))
61b9ac53 5470
abf21efc
CR
5471;; This will only be needed by the python-hacking package and will not be
5472;; necessary once python-hacking > 0.10.2 is released.
5473(define-public python-flake8-2.2.4
5474 (package (inherit python-flake8)
5475 (inputs
5476 `(("python-setuptools" ,python-setuptools)
5477 ("python-pep8" ,python-pep8-1.5.7)
5478 ("python-pyflakes" ,python-pyflakes-0.8.1)
5479 ("python-mccabe" ,python-mccabe-0.2.1)
5480 ("python-mock" ,python-mock)
5481 ("python-nose" ,python-nose)))
5482 (version "2.2.4")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (pypi-uri "flake8" version))
5487 (sha256
5488 (base32
5489 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5490
5491(define-public python2-flake8-2.2.4
5492 (package-with-python2 python-flake8-2.2.4))
5493
61b9ac53
FB
5494(define-public python-mistune
5495 (package
5496 (name "python-mistune")
5497 (version "0.7")
5498 (source
5499 (origin
5500 (method url-fetch)
5501 (uri (string-append
5502 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5503 version
5504 ".tar.gz"))
5505 (sha256
5506 (base32
5507 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5508 (build-system python-build-system)
5509 (inputs
5510 `(("python-setuptools" ,python-setuptools)
5511 ("python-nose" ,python-nose)
5512 ("python-cython" ,python-cython)))
5513 (home-page "https://github.com/lepture/mistune")
5514 (synopsis "Markdown parser in pure Python")
5515 (description "This package provides a fast markdown parser in pure
5516Python.")
3f641af0 5517 (license license:bsd-3)))
61b9ac53
FB
5518
5519(define-public python2-mistune
5520 (package-with-python2 python-mistune))
6d992d07 5521
b9893908
EE
5522(define-public python-markdown
5523 (package
5524 (name "python-markdown")
5525 (version "2.6.5")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "Markdown" version))
5530 (sha256
5531 (base32
5532 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5533 (build-system python-build-system)
5534 (arguments
5535 `(#:phases
5536 (modify-phases %standard-phases
5537 (replace 'check
5538 (lambda _
5539 (zero? (system* "python" "run-tests.py")))))))
5540 (native-inputs
5541 `(("python-nose" ,python-nose)
5542 ("python-pyyaml" ,python-pyyaml)))
5543 (home-page "https://pythonhosted.org/Markdown/")
5544 (synopsis "Python implementation of Markdown")
5545 (description
5546 "This package provides a Python implementation of John Gruber's
5547Markdown. The library features international input, various Markdown
5548extensions, and several HTML output formats. A command line wrapper
5549markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5550 (license license:bsd-3)))
b9893908
EE
5551
5552(define-public python2-markdown
5553 (package-with-python2 python-markdown))
5554
6d992d07
FB
5555(define-public python-ptyprocess
5556 (package
5557 (name "python-ptyprocess")
5558 (version "0.5")
5559 (source
5560 (origin
5561 (method url-fetch)
5562 (uri (string-append
5563 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5564 version ".tar.gz"))
5565 (sha256
5566 (base32
5567 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5568 (build-system python-build-system)
5569 (inputs
5570 `(("python-setuptools" ,python-setuptools)
5571 ("python-nose" ,python-nose)))
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 (replace 'check
5576 (lambda _
5577 (zero? (system* "nosetests")))))))
5578 (home-page "https://github.com/pexpect/ptyprocess")
5579 (synopsis "Run a subprocess in a pseudo terminal")
5580 (description
5581 "This package provides a Python library used to launch a subprocess in a
5582pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5583 (license license:isc)))
6d992d07
FB
5584
5585(define-public python2-ptyprocess
5586 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5587
5588(define-public python-terminado
5589 (package
5590 (name "python-terminado")
783fb0a3 5591 (version "0.6")
4aadb1df
FB
5592 (source
5593 (origin
5594 (method url-fetch)
783fb0a3 5595 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5596 (sha256
5597 (base32
783fb0a3 5598 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5599 (build-system python-build-system)
5600 (propagated-inputs
5601 `(("python-tornado" ,python-tornado)
5602 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5603 (native-inputs
5604 `(("python-nose" ,python-nose)))
4aadb1df
FB
5605 (arguments
5606 `(#:phases
5607 (modify-phases %standard-phases
5608 (replace 'check
5609 (lambda _
5610 (zero? (system* "nosetests")))))))
5611 (home-page "https://github.com/takluyver/terminado")
5612 (synopsis "Terminals served to term.js using Tornado websockets")
5613 (description "This package provides a Tornado websocket backend for the
5614term.js Javascript terminal emulator library.")
3f641af0 5615 (license license:bsd-2)
783fb0a3 5616 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5617
5618(define-public python2-terminado
783fb0a3 5619 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5620 (package (inherit terminado)
783fb0a3
EF
5621 (propagated-inputs
5622 `(("python2-backport-ssl-match-hostname"
5623 ,python2-backport-ssl-match-hostname)
5624 ,@(package-propagated-inputs terminado)))
5625 (native-inputs
5626 `(("python2-setuptools" ,python2-setuptools)
5627 ,@(package-native-inputs terminado))))))
5faa5ce4 5628
d582eaac
SB
5629(define-public python-fonttools
5630 (package
5631 (name "python-fonttools")
5632 (version "2.5")
5633 (source (origin
5634 (method url-fetch)
5635 (uri (string-append
5636 "https://pypi.python.org/packages/source/F/FontTools/"
5637 "fonttools-" version ".tar.gz"))
5638 (sha256
5639 (base32
5640 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5641 (build-system python-build-system)
5642 (arguments '(#:test-target "check"))
5643 (propagated-inputs
5644 ;; XXX: module not found if setuptools is not available.
5645 `(("python-setuptools" ,python-setuptools)))
5646 (home-page "http://github.com/behdad/fonttools")
5647 (synopsis "Tools to manipulate font files")
5648 (description
5649 "FontTools/TTX is a library to manipulate font files from Python. It
5650supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5651of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5652also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5653from an XML-based format.")
3f641af0
DC
5654 (license (license:non-copyleft
5655 "file://LICENSE.txt"
5656 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5657
5658(define-public python2-fonttools
5659 (package-with-python2 python-fonttools))
75710da6 5660
5faa5ce4
RW
5661(define-public python-ly
5662 (package
5663 (name "python-ly")
5135354f 5664 (version "0.9.4")
5faa5ce4
RW
5665 (source
5666 (origin
5667 (method url-fetch)
5135354f
RW
5668 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5669 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5670 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5671 (sha256
5672 (base32
5135354f 5673 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5674 (build-system python-build-system)
5675 (native-inputs
5676 `(("python-setuptools" ,python-setuptools)))
5677 (synopsis "Tool and library for manipulating LilyPond files")
5678 (description "This package provides a Python library to parse, manipulate
5679or create documents in LilyPond format. A command line program ly is also
5680provided that can be used to do various manipulations with LilyPond files.")
5681 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5682 (license license:gpl2+)))
7e7b27d9
CR
5683
5684(define-public python-appdirs
5685 (package
5686 (name "python-appdirs")
5687 (version "1.4.0")
5688 (source
5689 (origin
5690 (method url-fetch)
5691 (uri (string-append
5692 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5693 version
5694 ".tar.gz"))
5695 (sha256
5696 (base32
5697 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5698 (build-system python-build-system)
5699 (inputs
5700 `(("python-setuptools" ,python-setuptools)))
5701 (home-page "http://github.com/ActiveState/appdirs")
5702 (synopsis
5703 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5704 (description
5705 "This module provides a portable way of finding out where user data
5706should be stored on various operating systems.")
5707 (license license:expat)))
5708
5709(define-public python2-appdirs
5710 (package-with-python2 python-appdirs))
89b2e0b0
LF
5711
5712(define-public python-llfuse
5713 (package
5714 (name "python-llfuse")
e36ace36 5715 (version "1.1.1")
89b2e0b0
LF
5716 (source (origin
5717 (method url-fetch)
5718 (uri (string-append
5719 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5720 "llfuse-" version ".tar.bz2"))
5721 (sha256
5722 (base32
e36ace36 5723 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5724 (build-system python-build-system)
5725 (inputs
5726 `(("fuse" ,fuse)
5727 ("attr" ,attr)))
5728 (native-inputs
5729 `(("pkg-config" ,pkg-config)
5730 ("python-setuptools" ,python-setuptools)))
5731 (synopsis "Python bindings for FUSE")
5732 (description
5733 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5734 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5735 (license license:lgpl2.0+)
cd0569c4 5736 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5737
5738(define-public python2-llfuse
cd0569c4
LF
5739 (package (inherit (package-with-python2
5740 (strip-python2-variant python-llfuse)))
5741 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5742
5743;; For attic-0.16
5744(define-public python-llfuse-0.41
5745 (package (inherit python-llfuse)
229b3661 5746 (version "0.41.1")
cd0569c4
LF
5747 (source (origin
5748 (method url-fetch)
5749 (uri (string-append
5750 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5751 "llfuse-" version ".tar.bz2"))
5752 (sha256
5753 (base32
229b3661 5754 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5755 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5756 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5757 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5758
5759(define-public python-msgpack
5760 (package
5761 (name "python-msgpack")
aed625bd 5762 (version "0.4.8")
641c9871
LF
5763 (source (origin
5764 (method url-fetch)
ae831df4 5765 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5766 (sha256
5767 (base32
aed625bd 5768 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5769 (build-system python-build-system)
641c9871
LF
5770 (synopsis "MessagePack (de)serializer")
5771 (description "MessagePack is a fast, compact binary serialization format,
5772suitable for similar data to JSON. This package provides CPython bindings for
5773reading and writing MessagePack data.")
5774 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5775 (license license:asl2.0)
bd74be7b
LF
5776 (properties `((python2-variant . ,(delay python2-msgpack))))))
5777
5778(define-public python2-msgpack
5779 (package (inherit (package-with-python2
5780 (strip-python2-variant python-msgpack)))
5781 (native-inputs
5782 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 5783
6e5e39f4
CR
5784(define-public python-netaddr
5785 (package
5786 (name "python-netaddr")
5787 (version "0.7.18")
5788 (source
5789 (origin
5790 (method url-fetch)
5791 (uri (string-append
5792 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5793 version
5794 ".tar.gz"))
5795 (sha256
5796 (base32
5797 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5798 (build-system python-build-system)
5799 (arguments `(#:tests? #f)) ;; No tests.
5800 (inputs
5801 `(("python-setuptools" ,python-setuptools)))
5802 (home-page "https://github.com/drkjam/netaddr/")
5803 (synopsis "Pythonic manipulation of network addresses")
5804 (description
5805 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5806and MAC network addresses.")
3f641af0 5807 (license license:bsd-3)))
6e5e39f4
CR
5808
5809(define-public python2-netaddr
5810 (package-with-python2 python-netaddr))
8c692a52
CR
5811
5812(define-public python-wrapt
5813 (package
5814 (name "python-wrapt")
5815 (version "1.10.5")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (string-append
5820 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5821 version
5822 ".tar.gz"))
5823 (sha256
5824 (base32
5825 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5826 (build-system python-build-system)
5827 (arguments
5828 ;; Tests are not included in the tarball, they are only available in the
5829 ;; git repository.
5830 `(#:tests? #f))
5831 (inputs
5832 `(("python-setuptools" ,python-setuptools)))
5833 (home-page "https://github.com/GrahamDumpleton/wrapt")
5834 (synopsis "Module for decorators, wrappers and monkey patching")
5835 (description
5836 "The aim of the wrapt module is to provide a transparent object proxy for
5837 Python, which can be used as the basis for the construction of function
5838 wrappers and decorator functions.")
3f641af0 5839 (license license:bsd-2)))
8c692a52
CR
5840
5841(define-public python2-wrapt
5842 (package-with-python2 python-wrapt))
b85c85be
CR
5843
5844(define-public python-iso8601
5845 (package
5846 (name "python-iso8601")
fe84bc9a 5847 (version "0.1.11")
b85c85be
CR
5848 (source
5849 (origin
5850 (method url-fetch)
fe84bc9a 5851 (uri (pypi-uri "iso8601" version))
b85c85be 5852 (sha256
fe84bc9a
EF
5853 (base32
5854 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
5855 (build-system python-build-system)
5856 (inputs
5857 `(("python-setuptools" ,python-setuptools)))
5858 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5859 (synopsis "Module to parse ISO 8601 dates")
5860 (description
5861 "This module parses the most common forms of ISO 8601 date strings (e.g.
5862@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5863 (license license:expat)))
5864
5865(define-public python2-iso8601
5866 (package-with-python2 python-iso8601))
5e412b63
CR
5867
5868(define-public python-monotonic
5869 (package
5870 (name "python-monotonic")
5871 (version "0.3")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (string-append
5876 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5877 version
5878 ".tar.gz"))
5879 (sha256
5880 (base32
5881 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5882 (build-system python-build-system)
5883 (inputs
5884 `(("python-setuptools" ,python-setuptools)))
5885 (home-page "https://github.com/atdt/monotonic")
5886 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5887 (description
5888 "This module provides a monotonic() function which returns the value (in
5889fractional seconds) of a clock which never goes backwards.")
3f641af0 5890 (license license:asl2.0)))
5e412b63
CR
5891
5892(define-public python2-monotonic
5893 (package-with-python2 python-monotonic))
de34afac
CR
5894
5895(define-public python-webob
5896 (package
5897 (name "python-webob")
b8834c21 5898 (version "1.5.1")
de34afac
CR
5899 (source
5900 (origin
5901 (method url-fetch)
b8834c21 5902 (uri (pypi-uri "WebOb" version))
de34afac
CR
5903 (sha256
5904 (base32
b8834c21 5905 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5906 (build-system python-build-system)
5907 (inputs
5908 `(("python-nose" ,python-nose)
5909 ("python-setuptools" ,python-setuptools)))
5910 (home-page "http://webob.org/")
5911 (synopsis "WSGI request and response object")
5912 (description
5913 "WebOb provides wrappers around the WSGI request environment, and an
5914object to help create WSGI responses.")
5915 (license license:expat)))
5916
5917(define-public python2-webob
5918 (package-with-python2 python-webob))
350ba0a3 5919
02a8a187
BW
5920(define-public python-xlrd
5921 (package
5922 (name "python-xlrd")
c2ad4d70 5923 (version "1.0.0")
02a8a187
BW
5924 (source (origin
5925 (method url-fetch)
e775f48e 5926 (uri (pypi-uri "xlrd" version))
02a8a187
BW
5927 (sha256
5928 (base32
c2ad4d70 5929 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
5930 (build-system python-build-system)
5931 (arguments
5932 `(#:phases
5933 (modify-phases %standard-phases
c2ad4d70 5934 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
5935 ;; run tests instead for now.
5936 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5937 (native-inputs `(("python-nose" ,python-nose)
5938 ("python-setuptools" ,python-setuptools)))
5939 (home-page "http://www.python-excel.org/")
5940 (synopsis "Library for extracting data from Excel files")
5941 (description "This packages provides a library to extract data from
c598e35c 5942spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
5943@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5944Unicode-aware. It is not intended as an end-user tool.")
3f641af0 5945 (license license:bsd-3)))
02a8a187
BW
5946
5947(define-public python2-xlrd
5948 (package-with-python2 python-xlrd))
5949
350ba0a3
CR
5950(define-public python-prettytable
5951 (package
5952 (name "python-prettytable")
5953 (version "0.7.2")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (string-append
5958 "https://pypi.python.org/packages/source/P/PrettyTable/"
5959 "prettytable-" version ".tar.bz2"))
5960 (sha256
5961 (base32
5962 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5963 (build-system python-build-system)
5964 (inputs
5965 `(("python-setuptools" ,python-setuptools)))
5966 (home-page "http://code.google.com/p/prettytable/")
5967 (synopsis "Display tabular data in an ASCII table format")
5968 (description
5969 "A library designed to represent tabular data in visually appealing ASCII
5970tables. PrettyTable allows for selection of which columns are to be printed,
5971independent alignment of columns (left or right justified or centred) and
5972printing of sub-tables by specifying a row range.")
3f641af0 5973 (license license:bsd-3)))
350ba0a3
CR
5974
5975(define-public python2-prettytable
5976 (package-with-python2 python-prettytable))
7a8ac75a 5977
9f8ee3fe
RW
5978(define-public python-tables
5979 (package
5980 (name "python-tables")
5981 (version "3.2.2")
5982 (source
5983 (origin
5984 (method url-fetch)
5985 (uri (pypi-uri "tables" version))
5986 (sha256
5987 (base32
5988 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5989 (build-system python-build-system)
5990 (arguments
5991 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5992 ;; or "check", so we must override the build and check phases.
5993 #:phases
5994 (modify-phases %standard-phases
5995 (add-after 'unpack 'use-gcc
5996 (lambda _
5997 (substitute* "setup.py"
5998 (("compiler = new_compiler\\(\\)" line)
5999 (string-append line
6000 "\ncompiler.set_executables(compiler='gcc',"
6001 "compiler_so='gcc',"
6002 "linker_exe='gcc',"
6003 "linker_so='gcc -shared')")))
6004 #t))
6005 (replace 'build
6006 (lambda* (#:key inputs #:allow-other-keys)
6007 (zero? (system* "python" "setup.py" "build"
6008 (string-append "--hdf5="
6009 (assoc-ref inputs "hdf5"))))))
6010 (replace 'check
6011 (lambda* (#:key inputs #:allow-other-keys)
6012 (zero? (system* "python" "setup.py" "check"
6013 (string-append "--hdf5="
6014 (assoc-ref inputs "hdf5")))))))))
6015 (propagated-inputs
6016 `(("python-numexpr" ,python-numexpr)
6017 ("python-numpy" ,python-numpy)))
6018 (native-inputs
6019 `(("python-setuptools" ,python-setuptools)
6020 ("python-cython" ,python-cython)
6021 ("pkg-config" ,pkg-config)))
6022 (inputs
6023 `(("hdf5" ,hdf5)
6024 ("bzip2" ,bzip2)
6025 ("zlib" ,zlib)))
6026 (home-page "http://www.pytables.org/")
6027 (synopsis "Hierarchical datasets for Python")
6028 (description "PyTables is a package for managing hierarchical datasets and
6029designed to efficently cope with extremely large amounts of data.")
3f641af0 6030 (license license:bsd-3)))
9f8ee3fe
RW
6031
6032(define-public python2-tables
6033 (package-with-python2 python-tables))
6034
7a8ac75a
RW
6035(define-public python-pyasn1
6036 (package
6037 (name "python-pyasn1")
caa0edb3 6038 (version "0.1.9")
7a8ac75a
RW
6039 (source
6040 (origin
6041 (method url-fetch)
caa0edb3 6042 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6043 (sha256
6044 (base32
caa0edb3 6045 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6046 (build-system python-build-system)
6047 (home-page "http://pyasn1.sourceforge.net/")
6048 (synopsis "ASN.1 types and codecs")
6049 (description
6050 "This is an implementation of ASN.1 types and codecs in Python. It is
6051suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6052 (license license:bsd-2)))
7a8ac75a
RW
6053
6054(define-public python2-pyasn1
6055 (package-with-python2 python-pyasn1))
9a49a535 6056
5988c299
EF
6057(define-public python-pyasn1-modules
6058 (package
6059 (name "python-pyasn1-modules")
6060 (version "0.0.8")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "pyasn1-modules" version))
6065 (sha256
6066 (base32
6067 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6068 (build-system python-build-system)
6069 (native-inputs
6070 `(("python-setuptools" ,python-setuptools)))
6071 (propagated-inputs
6072 `(("python-pyasn1" ,python-pyasn1)))
6073 (home-page "http://sourceforge.net/projects/pyasn1/")
6074 (synopsis "ASN.1 codec implementations")
6075 (description
6076 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6077implementations of ASN.1-based codecs and protocols.")
3f641af0 6078 (license license:bsd-3)))
5988c299
EF
6079
6080(define-public python2-pyasn1-modules
6081 (package-with-python2 python-pyasn1-modules))
6082
520af157 6083(define-public python-ipaddress
9a49a535 6084 (package
520af157
DC
6085 (name "python-ipaddress")
6086 (version "1.0.16")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "ipaddress" version))
6090 (sha256
6091 (base32
6092 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6093 (build-system python-build-system)
9a49a535
RW
6094 (home-page "https://github.com/phihag/ipaddress")
6095 (synopsis "IP address manipulation library")
6096 (description
520af157
DC
6097 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6098 in Python. This library is used to create, poke at, and manipulate IPv4 and
6099 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6100 module to older versions of Python.")
6101 (license license:psfl)
6102 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6103
6104(define-public python2-ipaddress
6105 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6106 (package (inherit base)
6107 (native-inputs
6108 `(("python2-setuptools" ,python2-setuptools)
6109 ,@(package-native-inputs base))))))
3f00e078 6110
4a238186
HG
6111(define-public python2-ipaddr
6112 (package
6113 (name "python2-ipaddr")
6114 (version "2.1.11")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri "ipaddr" version))
6119 (sha256
6120 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6121 (build-system python-build-system)
6122 (arguments
6123 `(#:python ,python-2 ;version 2 only
6124 #:phases
6125 (modify-phases %standard-phases
6126 (replace 'check
6127 (lambda* _
6128 (zero? (system* "python" "ipaddr_test.py")))))))
6129 (home-page "https://github.com/google/ipaddr-py")
6130 (synopsis "IP address manipulation library")
6131 (description
6132 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6133IPv6 addresses and networks.
6134
6135For new implementations you may prefer to use the standard module
6136@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6137versions of Python.")
3f641af0 6138 (license license:asl2.0)))
4a238186 6139
3f00e078
RW
6140(define-public python-idna
6141 (package
6142 (name "python-idna")
6143 (version "2.0")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (string-append "https://pypi.python.org/packages/source/i/"
6148 "idna/idna-" version ".tar.gz"))
6149 (sha256
6150 (base32
6151 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6152 (build-system python-build-system)
6153 (native-inputs
6154 `(("python-setuptools" ,python-setuptools)))
6155 (home-page "https://github.com/kjd/idna")
6156 (synopsis "Internationalized domain names in applications")
6157 (description
6158 "This is a library to support the Internationalised Domain Names in
6159Applications (IDNA) protocol as specified in RFC 5891. This version of the
6160protocol is often referred to as “IDNA2008” and can produce different results
6161from the earlier standard from 2003. The library is also intended to act as a
6162suitable drop-in replacement for the “encodings.idna” module that comes with
6163the Python standard library but currently only supports the older 2003
6164specification.")
3f641af0 6165 (license license:bsd-4)))
3f00e078
RW
6166
6167(define-public python2-idna
6168 (package-with-python2 python-idna))
36ebf972
RW
6169
6170(define-public python-pretend
6171 (package
6172 (name "python-pretend")
6173 (version "1.0.8")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (string-append "https://pypi.python.org/packages/source/p/"
6178 "pretend/pretend-" version ".tar.gz"))
6179 (sha256
6180 (base32
6181 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6182 (build-system python-build-system)
6183 (native-inputs
6184 `(("python-setuptools" ,python-setuptools)))
6185 (home-page "https://github.com/alex/pretend")
6186 (synopsis "Library for stubbing in Python")
6187 (description
6188 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6189technique for writing tests. You may hear the term mixed up with mocks,
6190fakes, or doubles. Basically, a stub is an object that returns pre-canned
6191responses, rather than doing any computation.")
3f641af0 6192 (license license:bsd-3)))
36ebf972
RW
6193
6194(define-public python2-pretend
6195 (package-with-python2 python-pretend))
aa759a51
RW
6196
6197(define-public python-cryptography-vectors
6198 (package
6199 (name "python-cryptography-vectors")
9c509ca9 6200 (version "1.3.4")
aa759a51
RW
6201 (source
6202 (origin
6203 (method url-fetch)
9c509ca9 6204 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6205 (sha256
6206 (base32
9c509ca9 6207 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
6208 (build-system python-build-system)
6209 (native-inputs
6210 `(("python-setuptools" ,python-setuptools)))
6211 (home-page "https://github.com/pyca/cryptography")
66e07664 6212 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6213 (description
6214 "This package contains test vectors for the cryptography package.")
6215 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6216 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6217
6218(define-public python2-cryptography-vectors
6219 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6220
6221(define-public python-cryptography
6222 (package
6223 (name "python-cryptography")
9c509ca9 6224 (version "1.3.4")
88b47cb0
RW
6225 (source
6226 (origin
6227 (method url-fetch)
9c509ca9 6228 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6229 (sha256
6230 (base32
9c509ca9 6231 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0 6232 (build-system python-build-system)
470613f9
LF
6233 (arguments
6234 `(#:phases
6235 (modify-phases %standard-phases
6236 (add-before 'check 'disable-failing-test
6237 (lambda _
6238 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6239 ;; versions of python-cryptography:
6240 ;; https://github.com/pyca/cryptography/issues/3196
6241 ;; TODO: Try re-enabling the test when upgrading
6242 ;; python-cryptography.
6243 (substitute* "tests/hazmat/backends/test_openssl.py"
6244 (("def test_numeric_string_x509_name_entry")
6245 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6246 #t)))))
88b47cb0
RW
6247 (inputs
6248 `(("openssl" ,openssl)))
6249 (propagated-inputs
6250 `(("python-cffi" ,python-cffi)
6251 ("python-six" ,python-six)
6252 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6253 ("python-idna" ,python-idna)
6254 ("python-iso8601" ,python-iso8601)))
6255 (native-inputs
6256 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6257 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6258 ("python-setuptools" ,python-setuptools)
6259 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6260 ("python-pyasn1" ,python-pyasn1)
6261 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6262 ("python-pytest" ,python-pytest)))
6263 (home-page "https://github.com/pyca/cryptography")
6264 (synopsis "Cryptographic recipes and primitives for Python")
6265 (description
6266 "cryptography is a package which provides cryptographic recipes and
6267primitives to Python developers. It aims to be the “cryptographic standard
6268library” for Python. The package includes both high level recipes, and low
6269level interfaces to common cryptographic algorithms such as symmetric ciphers,
6270message digests and key derivation functions.")
6271 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6272 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6273 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6274
6275(define-public python2-cryptography
519e2f4f
LF
6276 (let ((crypto (package-with-python2
6277 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6278 (package (inherit crypto)
6279 (propagated-inputs
6280 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6281 ("python2-backport-ssl-match-hostname"
6282 ,python2-backport-ssl-match-hostname)
68f1cdec 6283 ("python2-enum34" ,python2-enum34)
88b47cb0 6284 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6285
6286(define-public python-pyopenssl
6287 (package
6288 (name "python-pyopenssl")
eb68d268 6289 (version "16.1.0")
5af999b8
RW
6290 (source
6291 (origin
6292 (method url-fetch)
eb68d268 6293 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6294 (sha256
6295 (base32
eb68d268 6296 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6297 (build-system python-build-system)
5af999b8
RW
6298 (propagated-inputs
6299 `(("python-cryptography" ,python-cryptography)
6300 ("python-six" ,python-six)))
6301 (inputs
6302 `(("openssl" ,openssl)))
6303 (native-inputs
6304 `(("python-setuptools" ,python-setuptools)))
6305 (home-page "https://github.com/pyca/pyopenssl")
6306 (synopsis "Python wrapper module around the OpenSSL library")
6307 (description
6308 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6309library.")
3f641af0 6310 (license license:asl2.0)))
5af999b8
RW
6311
6312(define-public python2-pyopenssl
519e2f4f 6313 (package-with-python2 python-pyopenssl))
643725a1
CR
6314
6315(define-public python-pip
6316 (package
6317 (name "python-pip")
6fb54e3b 6318 (version "8.0.2")
643725a1
CR
6319 (source
6320 (origin
6321 (method url-fetch)
6fb54e3b 6322 (uri (pypi-uri "pip" version))
643725a1
CR
6323 (sha256
6324 (base32
6fb54e3b 6325 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6326 (build-system python-build-system)
6327 (inputs
6328 `(("python-setuptools" ,python-setuptools)
6329 ("python-virtualenv" ,python-virtualenv)
6330 ;; Tests
6331 ("python-mock" ,python-mock)
6332 ("python-pytest" ,python-pytest)
6333 ("python-scripttest" ,python-scripttest)))
6334 (home-page "https://pip.pypa.io/")
6335 (synopsis
6336 "Package manager for Python software")
6337 (description
6338 "Pip is a package manager for Python software, that finds packages on the
6339Python Package Index (PyPI).")
6340 (license license:expat)))
6341
6342(define-public python2-pip
6343 (package-with-python2 python-pip))
d8c4998f
LC
6344
6345(define-public python-tlsh
6346 (package
6347 (name "python-tlsh")
99b00dc7 6348 (version "3.4.4")
d8c4998f
LC
6349 (home-page "https://github.com/trendmicro/tlsh")
6350 (source (origin
99b00dc7
EF
6351 (method url-fetch)
6352 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6353 version ".tar.gz"))
d8c4998f
LC
6354 (sha256
6355 (base32
99b00dc7
EF
6356 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6357 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6358 (build-system cmake-build-system)
6359 (arguments
6360 '(#:out-of-source? #f
6361 #:phases (modify-phases %standard-phases
6362 (replace
6363 'install
6364 (lambda* (#:key outputs #:allow-other-keys)
6365 ;; Build and install the Python bindings. The underlying
6366 ;; C++ library is apparently not meant to be installed.
6367 (let ((out (assoc-ref outputs "out")))
6368 (with-directory-excursion "py_ext"
6369 (and (system* "python" "setup.py" "build")
6370 (system* "python" "setup.py" "install"
6371 (string-append "--prefix=" out))))))))))
6372 (inputs `(("python" ,python-wrapper))) ;for the bindings
6373 (synopsis "Fuzzy matching library for Python")
6374 (description
6375 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6376Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6377value which can be used for similarity comparisons. Similar objects have
6378similar hash values, which allows for the detection of similar objects by
6379comparing their hash values. The byte stream should have a sufficient amount
6380of complexity; for example, a byte stream of identical bytes will not generate
6381a hash value.")
3f641af0 6382 (license license:asl2.0)))
d8c4998f
LC
6383
6384(define-public python2-tlsh
6385 (package
6386 (inherit python-tlsh)
6387 (name "python2-tlsh")
6388 (inputs `(("python" ,python-2)))))
d96034ed 6389
67f66812
BW
6390(define-public python-termcolor
6391 (package
6392 (name "python-termcolor")
6393 (version "1.1.0")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "python-termcolor" version))
6398 (sha256
6399 (base32
6400 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6401 (build-system python-build-system)
6402 (arguments
6403 ;; There are no tests.
6404 `(#:tests? #f))
6405 (home-page "http://pypi.python.org/pypi/termcolor")
6406 (synopsis "ANSII Color formatting for terminal output")
6407 (description
6408 "This package provides ANSII Color formatting for output in terminals.")
6409 (license license:expat)))
6410
6411(define-public python2-termcolor
6412 (package-with-python2 python-termcolor))
6413
d96034ed
LC
6414(define-public python-libarchive-c
6415 (package
6416 (name "python-libarchive-c")
03fd001c 6417 (version "2.2")
d96034ed
LC
6418 (source (origin
6419 (method url-fetch)
03fd001c 6420 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6421 (sha256
6422 (base32
03fd001c 6423 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6424 (build-system python-build-system)
6425 (arguments
6426 '(#:phases (modify-phases %standard-phases
6427 (add-before
6428 'build 'reference-libarchive
6429 (lambda* (#:key inputs #:allow-other-keys)
6430 ;; Retain the absolute file name of libarchive.so.
6431 (let ((libarchive (assoc-ref inputs "libarchive")))
6432 (substitute* "libarchive/ffi.py"
6433 (("find_library\\('archive'\\)")
6434 (string-append "'" libarchive
6435 "/lib/libarchive.so'"))))
6436
6437 ;; Do not make a compressed egg (see
6438 ;; <http://bugs.gnu.org/20765>).
6439 (let ((port (open-file "setup.cfg" "a")))
6440 (display "\n[easy_install]\nzip_ok = 0\n"
6441 port)
6442 (close-port port)
6443 #t))))))
6444 (inputs
6445 `(("python-setuptools" ,python-setuptools)
6446 ("libarchive" ,libarchive)))
6447 (home-page "https://github.com/Changaco/python-libarchive-c")
6448 (synopsis "Python interface to libarchive")
6449 (description
6450 "This package provides Python bindings to libarchive, a C library to
6451access possibly compressed archives in many different formats. It uses
6452Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6453 (license license:lgpl2.0+)))
d96034ed
LC
6454
6455(define-public python2-libarchive-c
6456 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6457
6458(define-public python-file
6459 (package
6460 (inherit file)
6461 (name "python-file")
7ffa5d4a
LF
6462 (source (origin
6463 (inherit (package-source file))
6464 ;; This patch should not be applied to python2-file.
6465 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6466 (build-system python-build-system)
6467 (arguments
6468 '(#:tests? #f ;no tests
00bf74be 6469 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6470 #:phases (modify-phases %standard-phases
6471 (add-before 'build 'change-directory
6472 (lambda _
6473 (chdir "python")
6474 #t))
6475 (add-before 'build 'set-library-file-name
6476 (lambda* (#:key inputs #:allow-other-keys)
6477 (let ((file (assoc-ref inputs "file")))
6478 (substitute* "magic.py"
6479 (("find_library\\('magic'\\)")
6480 (string-append "'" file "/lib/libmagic.so'")))
6481 #t))))))
6482 (inputs `(("file" ,file)))
6483 (self-native-input? #f)
daeeea71
CM
6484 (synopsis "Python bindings to the libmagic file type guesser. Note that
6485this module and the python-magic module both provide a \"magic.py\" file;
6486these two modules, which are different and were developed separately, both
2f87a77f
LF
6487serve the same purpose: provide Python bindings for libmagic.")
6488 (properties `((python2-variant . ,(delay python2-file))))))
5e1c9367
LC
6489
6490(define-public python2-file
2f87a77f
LF
6491 (let ((base (package-with-python2 (strip-python2-variant python-file))))
6492 (package
6493 (inherit base)
7ffa5d4a 6494 (source (package-source file))
2f87a77f
LF
6495 (native-inputs
6496 `(("python2-setuptools" ,python2-setuptools)
6497 ,@(package-native-inputs base))))))
85d4aeac
LC
6498
6499(define-public python-debian
6500 (package
6501 (name "python-debian")
6502 (version "0.1.23")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (string-append
6507 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6508 version ".tar.gz"))
6509 (sha256
6510 (base32
6511 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6512 (build-system python-build-system)
6513 (inputs
6514 `(("python-six" ,python-six)))
6515 (native-inputs
6516 `(("python-setuptools" ,python-setuptools)))
6517 (home-page "http://packages.debian.org/sid/python-debian")
6518 (synopsis "Debian package related modules")
6519 (description
5c7bdc9a
LC
6520 ;; XXX: Use @enumerate instead of @itemize to work around
6521 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6522 "This package provides Python modules that abstract many formats of
6523Debian-related files, such as:
6524
5c7bdc9a 6525@enumerate
85d4aeac
LC
6526@item Debtags information;
6527@item @file{debian/changelog} files;
6528@item packages files, pdiffs;
6529@item control files of single or multiple RFC822-style paragraphs---e.g.
6530 @file{debian/control}, @file{.changes}, @file{.dsc};
6531@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6532 contained files and meta-information.
5c7bdc9a 6533@end enumerate\n")
85d4aeac
LC
6534
6535 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6536 (license license:gpl3+)))
85d4aeac
LC
6537
6538(define-public python2-debian
6539 (package-with-python2 python-debian))
816a6538
LC
6540
6541(define-public python-chardet
6542 (package
6543 (name "python-chardet")
6544 (version "2.3.0")
6545 (source
6546 (origin
6547 (method url-fetch)
6548 (uri (string-append
6549 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6550 version
6551 ".tar.gz"))
6552 (sha256
6553 (base32
6554 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6555 (build-system python-build-system)
6556 (native-inputs
6557 `(("python-setuptools" ,python-setuptools)))
6558 (home-page "https://github.com/chardet/chardet")
6559 (synopsis "Universal encoding detector for Python 2 and 3")
6560 (description
6561 "This package provides @code{chardet}, a Python module that can
6562automatically detect a wide range of file encodings.")
3f641af0 6563 (license license:lgpl2.1+)))
816a6538
LC
6564
6565(define-public python2-chardet
6566 (package-with-python2 python-chardet))
2fc5f186 6567
1872f1bb
KM
6568(define-public python-docopt
6569 (package
6570 (name "python-docopt")
6571 (version "0.6.2")
6572 (source
6573 (origin
6574 (method url-fetch)
6575 ;; The release on PyPI does not include tests.
6576 (uri (string-append
6577 "https://github.com/docopt/docopt/archive/"
6578 version ".tar.gz"))
6579 (file-name (string-append name "-" version ".tar.gz"))
6580 (sha256
6581 (base32
6582 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6583 (build-system python-build-system)
6584 (native-inputs
6585 `(("python-pytest" ,python-pytest)
6586 ("python-setuptools" ,python-setuptools)))
6587 (arguments
6588 `(#:phases (alist-replace
6589 'check
6590 (lambda _ (zero? (system* "py.test")))
6591 %standard-phases)))
6592 (home-page "http://docopt.org")
6593 (synopsis "Command-line interface description language for Python")
6594 (description "This library allows the user to define a command-line
6595interface from a program's help message rather than specifying it
6596programatically with command-line parsers like @code{getopt} and
6597@code{argparse}.")
6598 (license license:expat)))
6599
6600(define-public python2-docopt
6601 (package-with-python2 python-docopt))
6602
2fc5f186
LF
6603(define-public python-zope-event
6604 (package
6605 (name "python-zope-event")
6606 (version "4.1.0")
6607 (source
6608 (origin
6609 (method url-fetch)
6610 (uri (string-append "https://pypi.python.org/packages/source/z"
6611 "/zope.event/zope.event-" version ".tar.gz"))
6612 (sha256
6613 (base32
6614 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6615 (build-system python-build-system)
6616 (inputs
6617 `(("python-setuptools" ,python-setuptools)))
6618 (home-page "http://pypi.python.org/pypi/zope.event")
6619 (synopsis "Event publishing system for Python")
6620 (description "Zope.event provides an event publishing API, intended for
6621use by applications which are unaware of any subscribers to their events. It
6622is a simple event-dispatching system on which more sophisticated event
6623dispatching systems can be built.")
3f641af0 6624 (license license:zpl2.1)))
2fc5f186
LF
6625
6626(define-public python2-zope-event
6627 (package-with-python2 python-zope-event))
97abe268
LF
6628
6629(define-public python-zope-interface
6630 (package
6631 (name "python-zope-interface")
6632 (version "4.1.3")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (string-append "https://pypi.python.org/packages/source/z"
6637 "/zope.interface/zope.interface-" version ".tar.gz"))
6638 (sha256
6639 (base32
6640 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6641 (build-system python-build-system)
6642 (propagated-inputs
6643 `(("python-zope-event" ,python-zope-event)))
6644 (home-page "https://github.com/zopefoundation/zope.interface")
6645 (synopsis "Python implementation of the \"design by contract\"
6646methodology")
6647 (description "Zope.interface provides an implementation of \"object
6648interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6649conforming to a given API or contract.")
3f641af0 6650 (license license:zpl2.1)))
97abe268
LF
6651
6652(define-public python2-zope-interface
6653 (package-with-python2 python-zope-interface))
81f2373c
LF
6654
6655(define-public python-zope-exceptions
6656 (package
6657 (name "python-zope-exceptions")
6658 (version "4.0.8")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (string-append "https://pypi.python.org/packages/source/z"
6663 "/zope.exceptions/zope.exceptions-"
6664 version ".tar.gz"))
6665 (sha256
6666 (base32
6667 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6668 (build-system python-build-system)
6669 (arguments
6670 '(#:tests? #f)) ; circular dependency with zope.testrunner
6671 (propagated-inputs
6672 `(("python-zope-interface" ,python-zope-interface)))
6673 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6674 (synopsis "Zope exceptions")
6675 (description "Zope.exceptions provides general-purpose exception types
6676that have uses outside of the Zope framework.")
3f641af0 6677 (license license:zpl2.1)))
81f2373c
LF
6678
6679(define-public python2-zope-exceptions
6680 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6681
6682(define-public python-zope-testing
6683 (package
6684 (name "python-zope-testing")
6685 (version "4.5.0")
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (string-append "https://pypi.python.org/packages/source/z"
6690 "/zope.testing/zope.testing-" version ".tar.gz"))
6691 (sha256
6692 (base32
b02f7a21
HG
6693 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
6694 (modules '((guix build utils)))
6695 (snippet
6696 '(begin
6697 ;; Remove pre-compiled .pyc files backup files from source.
6698 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
6699 #t))))
900e3c0e
LF
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-zope-exceptions" ,python-zope-exceptions)))
6703 (propagated-inputs
6704 `(("python-zope-interface" ,python-zope-interface)))
6705 (home-page "http://pypi.python.org/pypi/zope.testing")
6706 (synopsis "Zope testing helpers")
6707 (description "Zope.testing provides a number of testing utilities for HTML
6708forms, HTTP servers, regular expressions, and more.")
3f641af0 6709 (license license:zpl2.1)))
900e3c0e
LF
6710
6711(define-public python2-zope-testing
6712 (package-with-python2 python-zope-testing))
01614c4f
LF
6713
6714(define-public python-zope-testrunner
6715 (package
6716 (name "python-zope-testrunner")
6717 (version "4.4.9")
6718 (source
6719 (origin
6720 (method url-fetch)
6721 (uri (string-append "https://pypi.python.org/packages/source/z"
6722 "/zope.testrunner/zope.testrunner-"
6723 version ".zip"))
6724 (sha256
6725 (base32
6726 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6727 (build-system python-build-system)
6728 (native-inputs
6729 `(("python-six" ,python-six)
6730 ("python-zope-exceptions" ,python-zope-exceptions)
6731 ("python-zope-testing" ,python-zope-testing)
6732 ("unzip" ,unzip)))
6733 (propagated-inputs
6734 `(("python-zope-interface" ,python-zope-interface)))
6735 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6736 (synopsis "Zope testrunner script")
6737 (description "Zope.testrunner provides a script for running Python
6738tests.")
3f641af0 6739 (license license:zpl2.1)))
01614c4f
LF
6740
6741(define-public python2-zope-testrunner
6742 (let ((base (package-with-python2 python-zope-testrunner)))
6743 (package
6744 (inherit base)
6745 (native-inputs
6746 (append (package-native-inputs base)
6747 `(("python2-subunit" ,python2-subunit)
6748 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6749
6750(define-public python-zope-i18nmessageid
6751 (package
6752 (name "python-zope-i18nmessageid")
6753 (version "4.0.3")
6754 (source
6755 (origin
6756 (method url-fetch)
6757 (uri (string-append
6758 "https://pypi.python.org/packages/source/z"
6759 "/zope.i18nmessageid/zope.i18nmessageid-"
6760 version ".tar.gz"))
6761 (sha256
6762 (base32
6763 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6764 (build-system python-build-system)
6765 (inputs
6766 `(("python-setuptools" ,python-setuptools)))
6767 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6768 (synopsis "Message identifiers for internationalization")
6769 (description "Zope.i18nmessageid provides facilities for declaring
6770internationalized messages within program source text.")
3f641af0 6771 (license license:zpl2.1)))
6a5c710c
LF
6772
6773(define-public python2-zope-i18nmessageid
6774 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6775
6776(define-public python-zope-schema
6777 (package
6778 (name "python-zope-schema")
6779 (version "4.4.2")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (string-append "https://pypi.python.org/packages/source/z"
6784 "/zope.schema/zope.schema-" version ".tar.gz"))
6785 (sha256
6786 (base32
6787 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6788 (build-system python-build-system)
6789 (propagated-inputs
6790 `(("python-zope-event" ,python-zope-event)
6791 ("python-zope-interface" ,python-zope-interface)))
6792 (native-inputs
6793 `(("python-zope-testing" ,python-zope-testing)))
6794 (home-page "http://pypi.python.org/pypi/zope.schema")
6795 (synopsis "Zope data schemas")
6796 (description "Zope.scheme provides extensions to zope.interface for
6797defining data schemas.")
3f641af0 6798 (license license:zpl2.1)))
71fb09f3
LF
6799
6800(define-public python2-zope-schema
6801 (package-with-python2 python-zope-schema))
fbac9b17
LF
6802
6803(define-public python-zope-configuration
6804 (package
6805 (name "python-zope-configuration")
6806 (version "4.0.3")
6807 (source (origin
6808 (method url-fetch)
6809 (uri (string-append "https://pypi.python.org/packages/source/z"
6810 "/zope.configuration/zope.configuration-"
6811 version ".tar.gz"))
6812 (sha256
6813 (base32
6814 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6815 (build-system python-build-system)
6816 (propagated-inputs
6817 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6818 ("python-zope-schema" ,python-zope-schema)))
6819 (home-page "http://pypi.python.org/pypi/zope.configuration")
6820 (synopsis "Zope Configuration Markup Language")
6821 (description "Zope.configuration implements ZCML, the Zope Configuration
6822Markup Language.")
3f641af0 6823 (license license:zpl2.1)))
fbac9b17
LF
6824
6825(define-public python2-zope-configuration
6826 (package-with-python2 python-zope-configuration))
2ad52086
LF
6827
6828(define-public python-zope-proxy
6829 (package
6830 (name "python-zope-proxy")
6831 (version "4.1.6")
6832 (source
6833 (origin
6834 (method url-fetch)
6835 (uri (string-append "https://pypi.python.org/packages/source/z"
6836 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6837 (sha256
6838 (base32
6839 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6840 (build-system python-build-system)
6841 (propagated-inputs
6842 `(("python-zope-interface" ,python-zope-interface)))
6843 (home-page "http://pypi.python.org/pypi/zope.proxy")
6844 (synopsis "Generic, transparent proxies")
6845 (description "Zope.proxy provides generic, transparent proxies for Python.
6846Proxies are special objects which serve as mostly-transparent wrappers around
6847another object, intervening in the apparent behavior of the wrapped object
6848only when necessary to apply the policy (e.g., access checking, location
6849brokering, etc.) for which the proxy is responsible.")
3f641af0 6850 (license license:zpl2.1)))
2ad52086
LF
6851
6852(define-public python2-zope-proxy
6853 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6854
6855(define-public python-zope-location
6856 (package
6857 (name "python-zope-location")
6858 (version "4.0.3")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (string-append "https://pypi.python.org/packages/source/z"
6863 "/zope.location/zope.location-" version ".tar.gz"))
6864 (sha256
6865 (base32
6866 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6867 (build-system python-build-system)
6868 (native-inputs
6869 `(("python-zope-proxy" ,python-zope-proxy)
6870 ("python-zope-schema" ,python-zope-schema)))
6871 (home-page "http://pypi.python.org/pypi/zope.location/")
6872 (synopsis "Zope location library")
6873 (description "Zope.location implements the concept of \"locations\" in
6874Zope3, which are are special objects that have a structural location.")
3f641af0 6875 (license license:zpl2.1)))
f404b5ea
LF
6876
6877(define-public python2-zope-location
6878 (package-with-python2 python-zope-location))
d4b77f36
LF
6879
6880(define-public python-zope-security
6881 (package
6882 (name "python-zope-security")
6883 (version "4.0.3")
6884 (source
6885 (origin
6886 (method url-fetch)
6887 (uri (string-append "https://pypi.python.org/packages/source/z"
6888 "/zope.security/zope.security-" version ".tar.gz"))
6889 (sha256
6890 (base32
6891 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6892 (build-system python-build-system)
6893 (propagated-inputs
6894 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6895 ("python-zope-component" ,python-zope-component)
6896 ("python-zope-location" ,python-zope-location)
6897 ("python-zope-proxy" ,python-zope-proxy)
6898 ("python-zope-schema" ,python-zope-schema)
6899 ("python-zope-testrunner" ,python-zope-testrunner)
6900 ("python-zope-testing" ,python-zope-testing)))
6901 (home-page "http://pypi.python.org/pypi/zope.security")
6902 (synopsis "Zope security framework")
6903 (description "Zope.security provides a generic mechanism to implement
6904security policies on Python objects.")
3f641af0 6905 (license license:zpl2.1)))
d4b77f36
LF
6906
6907(define-public python2-zope-security
04417662
EF
6908 (let ((zope-security (package-with-python2 python-zope-security)))
6909 (package (inherit zope-security)
6910 (propagated-inputs
6911 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6912 ,@(alist-delete
6913 "python-zope-testrunner"
6914 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6915
6916(define-public python-zope-component
6917 (package
6918 (name "python-zope-component")
6919 (version "4.2.2")
6920 (source
6921 (origin
6922 (method url-fetch)
6923 (uri (string-append "https://pypi.python.org/packages/source/z"
6924 "/zope.component/zope.component-" version ".tar.gz"))
6925 (sha256
6926 (base32
6927 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6928 (build-system python-build-system)
6929 (arguments
6930 ;; Skip tests due to circular dependency with python-zope-security.
6931 '(#:tests? #f))
6932 (native-inputs
6933 `(("python-zope-testing" ,python-zope-testing)))
6934 (propagated-inputs
6935 `(("python-zope-event" ,python-zope-event)
6936 ("python-zope-interface" ,python-zope-interface)
6937 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6938 ("python-zope-configuration" ,python-zope-configuration)))
6939 (home-page "https://github.com/zopefoundation/zope.component")
6940 (synopsis "Zope Component Architecture")
6941 (description "Zope.component represents the core of the Zope Component
6942Architecture. Together with the zope.interface package, it provides
6943facilities for defining, registering and looking up components.")
3f641af0 6944 (license license:zpl2.1)))
a6b61b27
LF
6945
6946(define-public python2-zope-component
6947 (package-with-python2 python-zope-component))
3859ac12 6948
1ae44b80 6949(define-public python-pythondialog
b5f218be 6950 (package
1ae44b80 6951 (name "python-pythondialog")
42c4b246 6952 (version "3.4.0")
b5f218be
LF
6953 (source
6954 (origin
6955 (method url-fetch)
1ae44b80 6956 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
6957 (sha256
6958 (base32
1ae44b80 6959 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
6960 (build-system python-build-system)
6961 (arguments
6962 `(#:phases
6963 (modify-phases %standard-phases
6964 (add-after 'unpack 'patch-path
6965 (lambda* (#:key inputs #:allow-other-keys)
6966 (let* ((dialog (assoc-ref inputs "dialog")))
6967 ;; Since this library really wants to grovel the search path, we
6968 ;; must hardcode dialog's store path into it.
6969 (substitute* "dialog.py"
6970 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6971 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6972 #t))))
b5f218be
LF
6973 #:tests? #f)) ; no test suite
6974 (propagated-inputs
6975 `(("dialog" ,dialog)))
6976 (home-page "http://pythondialog.sourceforge.net/")
6977 (synopsis "Python interface to the UNIX dialog utility")
6978 (description "A Python wrapper for the dialog utility. Its purpose is to
6979provide an easy to use, pythonic and comprehensive Python interface to dialog.
6980This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 6981 (license license:lgpl2.1)
1ae44b80
LF
6982 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6983
6984(define-public python2-pythondialog
6985 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6986 (package
6987 (inherit base)
6988 (version (package-version python-pythondialog))
6989 (source (origin
6990 (method url-fetch)
6991 (uri (pypi-uri "python2-pythondialog" version))
6992 (sha256
6993 (base32
6994 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 6995
3859ac12
LF
6996(define-public python-pyrfc3339
6997 (package
6998 (name "python-pyrfc3339")
d9aa097b 6999 (version "1.0")
3859ac12
LF
7000 (source
7001 (origin
7002 (method url-fetch)
d9aa097b 7003 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7004 (sha256
7005 (base32
d9aa097b 7006 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7007 (build-system python-build-system)
7008 (propagated-inputs
7009 `(("python-pytz" ,python-pytz)))
7010 (native-inputs
7011 `(("python-nose" ,python-nose)
7012 ("python-setuptools" ,python-setuptools)))
7013 (home-page "https://github.com/kurtraschke/pyRFC3339")
7014 (synopsis "Python timestamp library")
7015 (description "Python library for generating and parsing RFC 3339-compliant
7016timestamps.")
7017 (license license:expat)))
7018
7019(define-public python2-pyrfc3339
7020 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7021
7022(define-public python-werkzeug
7023 (package
7024 (name "python-werkzeug")
0580e383 7025 (version "0.11.11")
5eea2005
LF
7026 (source
7027 (origin
7028 (method url-fetch)
4b47cbfa 7029 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7030 (sha256
7031 (base32
0580e383 7032 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7033 (build-system python-build-system)
7034 (native-inputs
7035 `(("python-pytest" ,python-pytest)))
7036 (home-page "http://werkzeug.pocoo.org/")
7037 (synopsis "Utilities for WSGI applications")
7038 (description "One of the most advanced WSGI utility modules. It includes a
7039powerful debugger, full-featured request and response objects, HTTP utilities to
7040handle entity tags, cache control headers, HTTP dates, cookie handling, file
7041uploads, a powerful URL routing system and a bunch of community-contributed
7042addon modules.")
3f641af0 7043 (license license:x11)))
5eea2005
LF
7044
7045(define-public python2-werkzeug
7046 (package-with-python2 python-werkzeug))
99fffa8a
LF
7047
7048(define-public python-configobj
7049 (package
7050 (name "python-configobj")
7051 (version "5.0.6")
7052 (source (origin
7053 (method url-fetch)
7054 (uri (string-append
7055 "https://pypi.python.org/packages/source/c/configobj/"
7056 "configobj-" version ".tar.gz"))
7057 (sha256
7058 (base32
7059 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7060 ;; Patch setup.py so it looks for python-setuptools, which is
7061 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7062 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7063 (build-system python-build-system)
7064 (native-inputs
7065 `(("python-setuptools" ,python-setuptools)
7066 ("python-six" ,python-six)))
7067 (synopsis "Config file reading, writing and validation")
7068 (description "ConfigObj is a simple but powerful config file reader and
7069writer: an ini file round tripper. Its main feature is that it is very easy to
7070use, with a straightforward programmer’s interface and a simple syntax for
7071config files.")
7072 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7073 (license license:bsd-3)))
99fffa8a
LF
7074
7075(define-public python2-configobj
7076 (package-with-python2 python-configobj))
79e8a291
LF
7077
7078(define-public python-configargparse
7079 (package
7080 (name "python-configargparse")
7081 (version "0.10.0")
7082 (source (origin
7083 (method url-fetch)
7084 (uri (string-append
7085 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7086 "ConfigArgParse-" version ".tar.gz"))
7087 (sha256
7088 (base32
7089 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7090 (build-system python-build-system)
7091 (arguments
7092 ;; FIXME: Bug in test suite filed upstream:
7093 ;; https://github.com/bw2/ConfigArgParse/issues/32
7094 '(#:tests? #f))
7095 (synopsis "Replacement for argparse")
7096 (description "A drop-in replacement for argparse that allows options to also
7097be set via config files and/or environment variables.")
7098 (home-page "https://github.com/bw2/ConfigArgParse")
7099 (license license:expat)))
7100
7101(define-public python2-configargparse
7102 (package-with-python2 python-configargparse))
ab41f979
LF
7103
7104(define-public python-ndg-httpsclient
7105 (package
7106 (name "python-ndg-httpsclient")
7107 (version "0.4.0")
7108 (source (origin
7109 (method url-fetch)
7110 (uri (string-append
7111 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7112 "ndg_httpsclient-" version ".tar.gz"))
7113 (sha256
7114 (base32
7115 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7116 (build-system python-build-system)
a39cc016
LF
7117 (arguments
7118 '(;; The tests appear to require networking.
7119 #:tests? #f))
ab41f979
LF
7120 (propagated-inputs
7121 `(("python-pyopenssl" ,python-pyopenssl)))
7122 (synopsis "HTTPS support for Python's httplib and urllib2")
7123 (description "This is a HTTPS client implementation for httplib and urllib2
7124based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7125over the default provided with Python and importantly enables full verification
7126of the SSL peer.")
7127 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7128 (license license:bsd-3)))
ab41f979
LF
7129
7130;; python2-openssl requires special care, so package-with-python2 is
7131;; insufficient.
7132(define-public python2-ndg-httpsclient
7133 (package (inherit python-ndg-httpsclient)
7134 (name "python2-ndg-httpsclient")
7135 (arguments `(#:python ,python-2))
7136 (propagated-inputs
7137 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7138
7139(define-public python-contextlib2
7140 (package
7141 (name "python-contextlib2")
7142 (version "0.4.0")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "contextlib2" version))
7147 (sha256
7148 (base32
7149 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7150 (build-system python-build-system)
7151 (arguments
7152 `(#:phases
7153 (modify-phases %standard-phases
7154 (replace 'check
7155 (lambda _ (zero?
7156 (system*
b3546174 7157 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7158 (home-page "http://contextlib2.readthedocs.org/")
7159 (synopsis "Tools for decorators and context managers")
7160 (description "This module is primarily a backport of the Python
71613.2 contextlib to earlier Python versions. Like contextlib, it
7162provides utilities for common tasks involving decorators and context
7163managers. It also contains additional features that are not part of
7164the standard library.")
3f641af0 7165 (license license:psfl)))
03f964a5
CM
7166
7167(define-public python2-contextlib2
7168 (package-with-python2 python-contextlib2))
210bf497
DT
7169
7170(define-public python-texttable
7171 (package
7172 (name "python-texttable")
7173 (version "0.8.4")
7174 (source
7175 (origin
7176 (method url-fetch)
7177 (uri (pypi-uri "texttable" version))
7178 (sha256
7179 (base32
7180 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7181 (build-system python-build-system)
7182 (arguments '(#:tests? #f)) ; no tests
7183 (home-page "https://github.com/foutaise/texttable/")
7184 (synopsis "Python module for creating simple ASCII tables")
7185 (description "Texttable is a Python module for creating simple ASCII
7186tables.")
3f641af0 7187 (license license:lgpl2.1+)))
210bf497
DT
7188
7189(define-public python2-texttable
7190 (package-with-python2 python-texttable))
67c52bb3
DT
7191
7192(define-public python-websocket-client
7193 (package
7194 (name "python-websocket-client")
6b810897 7195 (version "0.37.0")
67c52bb3
DT
7196 (source
7197 (origin
7198 (method url-fetch)
6b810897 7199 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7200 (sha256
7201 (base32
6b810897 7202 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7203 (build-system python-build-system)
7204 (native-inputs
7205 `(("python-six" ,python-six))) ; for tests
7206 (inputs
7207 `(("python-setuptools" ,python-setuptools)))
7208 (home-page "https://github.com/liris/websocket-client")
7209 (synopsis "WebSocket client for Python")
7210 (description "The Websocket-client module provides the low level APIs for
7211WebSocket usage in Python programs.")
3f641af0 7212 (license license:lgpl2.1+)))
67c52bb3
DT
7213
7214(define-public python2-websocket-client
7215 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7216
7217(define-public python-atomicwrites
7218 (package
7219 (name "python-atomicwrites")
4e92d76a 7220 (version "1.1.0")
5c6eea2a
LF
7221 (source (origin
7222 (method url-fetch)
7223 (uri (pypi-uri "atomicwrites" version))
7224 (sha256
7225 (base32
4e92d76a 7226 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7227 (build-system python-build-system)
7228 (synopsis "Atomic file writes in Python")
7229 (description "Library for atomic file writes using platform dependent tools
8f65585b 7230for atomic file system operations.")
5c6eea2a 7231 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7232 (license license:expat)
7233 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7234
7235(define-public python2-atomicwrites
7236 (package (inherit (package-with-python2
7237 (strip-python2-variant python-atomicwrites)))
7238 (native-inputs
7239 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7240
7241(define-public python-requests-toolbelt
7242 (package
7243 (name "python-requests-toolbelt")
c02af1c8 7244 (version "0.6.2")
561bb3cb
LF
7245 (source (origin
7246 (method url-fetch)
c02af1c8
LF
7247 (uri (string-append
7248 "https://pypi.python.org/packages/"
7249 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7250 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7251 (sha256
7252 (base32
c02af1c8 7253 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7254 (build-system python-build-system)
759aadd4
LF
7255 (native-inputs
7256 `(("python-betamax" ,python-betamax)
7257 ("python-mock" ,python-mock)
7258 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7259 (propagated-inputs
7260 `(("python-requests" ,python-requests)))
7261 (synopsis "Extensions to python-requests")
7262 (description "This is a toolbelt of useful classes and functions to be used
7263with python-requests.")
7264 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7265 (license license:asl2.0)))
d1deb90b
LF
7266
7267(define-public python-click-threading
7268 (package
7269 (name "python-click-threading")
3d2e0dbc 7270 (version "0.2.0")
d1deb90b
LF
7271 (source (origin
7272 (method url-fetch)
3d2e0dbc
LF
7273 (uri (string-append
7274 "https://pypi.python.org/packages/"
7275 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7276 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7277 (sha256
7278 (base32
3d2e0dbc 7279 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7280 (build-system python-build-system)
7281 (propagated-inputs
7282 `(("python-click" ,python-click)))
7283 (synopsis "Utilities for multithreading in Click")
7284 (description "This package provides utilities for multithreading in Click
7285applications.")
7286 (home-page "https://github.com/click-contrib/click-threading")
7287 (license license:expat)))
7b17cab9
LF
7288
7289(define-public python-click-log
7290 (package
7291 (name "python-click-log")
a9da8fec 7292 (version "0.1.3")
7b17cab9
LF
7293 (source (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "click-log" version))
7296 (sha256
7297 (base32
a9da8fec 7298 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7299 (build-system python-build-system)
7300 (propagated-inputs
7301 `(("python-click" ,python-click)))
7302 (synopsis "Logging for click applications")
7303 (description "This package provides a Python library for logging Click
7304applications.")
7305 (home-page "https://github.com/click-contrib/click-log")
7306 (license license:expat)))
7b3a4ee4
LF
7307
7308(define-public python-apipkg
7309 (package
7310 (name "python-apipkg")
7311 (version "1.4")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (pypi-uri "apipkg" version))
7315 (sha256
7316 (base32
7317 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7318 (build-system python-build-system)
b43bab3c 7319 (inputs
7b3a4ee4
LF
7320 `(("python-pytest" ,python-pytest)))
7321 (synopsis "Namespace control and lazy-import mechanism")
7322 (description "With apipkg you can control the exported namespace of a Python
7323package and greatly reduce the number of imports for your users. It is a small
7324pure Python module that works on virtually all Python versions.")
7325 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7326 (license license:expat)
7327 (properties `((python2-variant . ,(delay python2-apipkg))))))
7328
7329(define-public python2-apipkg
7330 (package
7331 (inherit (package-with-python2
7332 (strip-python2-variant python-apipkg)))
7333 (native-inputs
7334 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7335
7336(define-public python-execnet
7337 (package
7338 (name "python-execnet")
7339 (version "1.4.1")
7340 (source (origin
7341 (method url-fetch)
7342 (uri (pypi-uri "execnet" version))
7343 (sha256
7344 (base32
7345 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7346 (build-system python-build-system)
ca0eee9d
LF
7347 (arguments
7348 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7349 ;; The two test failures are caused by the lack of an `ssh` executable.
7350 ;; The test suite can be run with pytest after the 'install' phase.
7351 #:tests? #f))
848964fe 7352 (native-inputs
ca0eee9d
LF
7353 `(("python-pytest" ,python-pytest)
7354 ("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7355 (inputs
848964fe
LF
7356 `(("python-apipkg" ,python-apipkg)))
7357 (synopsis "Rapid multi-Python deployment")
7358 (description "Execnet provides a share-nothing model with
7359channel-send/receive communication for distributing execution across many
7360Python interpreters across version, platform and network barriers. It has a
7361minimal and fast API targetting the following uses:
7362@enumerate
7363@item distribute tasks to (many) local or remote CPUs
7364@item write and deploy hybrid multi-process applications
7365@item write scripts to administer multiple environments
7366@end enumerate")
7367 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7368 (license license:expat)
7369 (properties `((python2-variant . ,(delay python2-execnet))))))
7370
7371(define-public python2-execnet
7372 (let ((execnet (package-with-python2
7373 (strip-python2-variant python-execnet))))
7374 (package
7375 (inherit execnet)
7376 (native-inputs
7377 `(("python2-setuptools" ,python2-setuptools)
7378 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7379
7380;;; The software provided by this package was integrated into pytest 2.8.
7381(define-public python-pytest-cache
7382 (package
7383 (name "python-pytest-cache")
7384 (version "1.0")
7385 (source (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "pytest-cache" version))
7388 (sha256
7389 (base32
7390 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7391 (build-system python-build-system)
630d938f
EF
7392 (inputs
7393 `(("python-apipkg" ,python-apipkg)
7394 ("python-execnet" ,python-execnet)
7395 ("python-py" ,python-py)
7396 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7397 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7398 (description "The pytest-cache plugin provides tools to rerun failures from
7399the last py.test invocation.")
7400 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7401 (license license:expat)
7402 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7403
7404(define-public python2-pytest-cache
7405 (let ((pytest-cache (package-with-python2
7406 (strip-python2-variant python-pytest-cache))))
7407 (package
7408 (inherit pytest-cache)
7409 (native-inputs
7410 `(("python2-setuptools" ,python2-setuptools)
7411 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7412
7413(define-public python-pytest-localserver
7414 (package
7415 (name "python-pytest-localserver")
29f20168 7416 (version "0.3.5")
d7e729fe
LF
7417 (source (origin
7418 (method url-fetch)
29f20168 7419 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7420 (sha256
7421 (base32
29f20168 7422 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7423 (build-system python-build-system)
7424 (arguments
7425 `(#:phases (modify-phases %standard-phases
7426 (replace 'check
7427 (lambda _
7428 (zero? (system* "py.test" "--genscript=runtests.py"))
7429 (zero? (system* "py.test")))))))
7430 (native-inputs
d7e729fe
LF
7431 `(("python-pytest" ,python-pytest)
7432 ("python-requests" ,python-requests)
9ba40f05
EF
7433 ("python-six" ,python-six)))
7434 (inputs
7435 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7436 (synopsis "Py.test plugin to test server connections locally")
7437 (description "Pytest-localserver is a plugin for the pytest testing
7438framework which enables you to test server connections locally.")
7439 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7440 (license license:expat)))
28cecbb7
LF
7441
7442(define-public python-wsgi-intercept
7443 (package
7444 (name "python-wsgi-intercept")
909fbd2b 7445 (version "1.2.2")
28cecbb7
LF
7446 (source (origin
7447 (method url-fetch)
909fbd2b
LF
7448 (uri (string-append
7449 "https://pypi.python.org/packages/"
7450 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7451 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7452 (sha256
7453 (base32
909fbd2b 7454 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7455 (build-system python-build-system)
7456 (native-inputs
9d813ec1 7457 `(("python-pytest" ,python-pytest)
8757f050
LF
7458 ("python-six" ,python-six)
7459 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
7460 (propagated-inputs
7461 `(("python-httplib2" ,python-httplib2)
7462 ("python-requests" ,python-requests)))
7463 (synopsis "Puts a WSGI application in place of a real URI for testing")
7464 (description "Wsgi_intercept installs a WSGI application in place of a real
7465URI for testing. Testing a WSGI application normally involves starting a
7466server at a local host and port, then pointing your test code to that address.
7467Instead, this library lets you intercept calls to any specific host/port
7468combination and redirect them into a WSGI application importable by your test
7469program. Thus, you can avoid spawning multiple processes or threads to test
7470your Web app.")
7471 (home-page "https://github.com/cdent/wsgi-intercept")
7472 (license license:expat)))
89b8a551
LF
7473
7474(define-public python-pytest-xprocess
7475 (package
7476 (name "python-pytest-xprocess")
7477 (version "0.9.1")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (pypi-uri "pytest-xprocess" version))
7481 (sha256
7482 (base32
7483 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7484 (build-system python-build-system)
7485 (propagated-inputs
7486 `(("python-pytest" ,python-pytest)
7487 ("python-pytest-cache" ,python-pytest-cache)
7488 ("python-psutil" ,python-psutil)))
7489 (synopsis "Pytest plugin to manage external processes across test runs")
7490 (description "Pytest-xprocess is an experimental py.test plugin for managing
7491processes across test runs.")
7492 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7493 (license license:expat)))
5c299bf0
LF
7494
7495(define-public python-icalendar
7496 (package
7497 (name "python-icalendar")
f2f53353 7498 (version "3.10")
5c299bf0
LF
7499 (source (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "icalendar" version))
7502 (sha256
7503 (base32
f2f53353 7504 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7505 (build-system python-build-system)
7506 (propagated-inputs
7507 `(("python-dateutil-2" ,python-dateutil-2)
7508 ("python-pytz" ,python-pytz)))
7509 (synopsis "Python library for parsing iCalendar files")
7510 (description "The icalendar package is a parser/generator of iCalendar
7511files for use with Python.")
7512 (home-page "https://github.com/collective/icalendar")
3f641af0 7513 (license license:bsd-2)))
6bbbb53e
LF
7514
7515(define-public python-sphinxcontrib-newsfeed
7516 (package
7517 (name "python-sphinxcontrib-newsfeed")
7518 (version "0.1.4")
7519 (source (origin
7520 (method url-fetch)
7521 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7522 (sha256
7523 (base32
7524 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7525 (build-system python-build-system)
7526 (propagated-inputs
7527 `(("python-docutils" ,python-docutils)
7528 ("python-sphinx" ,python-sphinx)))
7529 (synopsis "News Feed extension for Sphinx")
7530 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7531Blog, News or Announcements section to a Sphinx website.")
7532 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7533 (license license:bsd-2)))
2216e15c
SB
7534
7535(define-public python-args
7536 (package
7537 (name "python-args")
7538 (version "0.1.0")
7539 (source (origin
7540 (method url-fetch)
7541 (uri (pypi-uri "args" version))
7542 (sha256
7543 (base32
7544 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7545 (build-system python-build-system)
7546 (inputs
7547 `(("python-setuptools" ,python-setuptools)))
7548 (home-page "https://github.com/kennethreitz/args")
7549 (synopsis "Command-line argument parser")
7550 (description
7551 "This library provides a Python module to parse command-line arguments.")
3f641af0 7552 (license license:bsd-3)))
2216e15c
SB
7553
7554(define-public python2-args
7555 (package-with-python2 python-args))
c06a3de9
SB
7556
7557(define-public python-clint
7558 (package
7559 (name "python-clint")
7560 (version "0.5.1")
7561 (source (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "clint" version))
7564 (sha256
7565 (base32
7566 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7567 (build-system python-build-system)
7568 (inputs
7569 `(("python-args" ,python-args)
7570 ("python-setuptools" ,python-setuptools)))
7571 (home-page "https://github.com/kennethreitz/clint")
7572 (synopsis "Command-line interface tools")
7573 (description
7574 "Clint is a Python module filled with a set of tools for developing
7575command-line applications, including tools for colored and indented
7576output, progress bar display, and pipes.")
3f641af0 7577 (license license:isc)))
c06a3de9
SB
7578
7579(define-public python2-clint
7580 (package-with-python2 python-clint))
4ecdeef8
SB
7581
7582(define-public python-astor
7583 (package
7584 (name "python-astor")
7585 (version "0.5")
7586 (source (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "astor" version))
7589 (sha256
7590 (base32
7591 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7592 (build-system python-build-system)
7593 (inputs
7594 `(("python-setuptools" ,python-setuptools)))
7595 (home-page "https://github.com/berkerpeksag/astor")
7596 (synopsis "Read and write Python ASTs")
7597 (description
7598 "Astor is designed to allow easy manipulation of Python source via the
7599Abstract Syntax Tree.")
3f641af0 7600 (license license:bsd-3)))
4ecdeef8
SB
7601
7602(define-public python2-astor
7603 (package-with-python2 python-astor))
e224b7d0
SB
7604
7605(define-public python-rply
7606 (package
7607 (name "python-rply")
7608 (version "0.7.4")
7609 (source (origin
7610 (method url-fetch)
7611 (uri (pypi-uri "rply" version))
7612 (sha256
7613 (base32
7614 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7615 (build-system python-build-system)
7616 (inputs
7617 `(("python-appdirs" ,python-appdirs)
7618 ("python-setuptools" ,python-setuptools)))
7619 (home-page "https://github.com/alex/rply")
7620 (synopsis "Parser generator for Python")
7621 (description
7622 "This package provides a pure Python based parser generator, that also
7623works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7624with a new public API, and RPython support.")
3f641af0 7625 (license license:bsd-3)))
e224b7d0
SB
7626
7627(define-public python2-rply
7628 (package-with-python2 python-rply))
c3e919d7
SB
7629
7630(define-public python-hy
7631 (package
7632 (name "python-hy")
7633 (version "0.11.1")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "hy" version))
7637 (sha256
7638 (base32
7639 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7640 (build-system python-build-system)
7641 (inputs
7642 `(("python-astor" ,python-astor)
7643 ("python-clint" ,python-clint)
7644 ("python-rply" ,python-rply)
7645 ("python-setuptools" ,python-setuptools)))
7646 (home-page "http://hylang.org/")
7647 (synopsis "Lisp frontend to Python")
7648 (description
7649 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7650its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7651Python at your fingertips, in Lisp form.")
7652 (license license:expat)))
7653
7654(define-public python2-hy
7655 (package-with-python2 python-hy))
7a5b944e 7656
81f7f297
EF
7657(define-public python-rauth
7658 (package
7659 (name "python-rauth")
7660 (version "0.7.2")
7661 (source
7662 (origin
7663 (method url-fetch)
7664 (uri (pypi-uri "rauth" version))
7665 (sha256
7666 (base32
7667 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7668 (build-system python-build-system)
7669 (arguments
7670 `(#:test-target "check"))
0848d8d3 7671 (inputs
81f7f297
EF
7672 `(("python-requests" ,python-requests)))
7673 (home-page "https://github.com/litl/rauth")
7674 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7675 (description
7676 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7677provides service wrappers for convenient connection initialization and
7678authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7679 (license license:expat)
7680 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7681
7682(define-public python2-rauth
0848d8d3
EF
7683 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7684 (package
7685 (inherit base)
7686 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7687 ("python2-unittest2" ,python2-unittest2)
7688 ,@(package-native-inputs base))))))
81f7f297 7689
1abe448d
EF
7690(define-public python2-functools32
7691 (package
7692 (name "python2-functools32")
7693 (version "3.2.3-2")
7694 (source
7695 (origin
7696 (method url-fetch)
7697 (uri (pypi-uri "functools32" version))
7698 (sha256
7699 (base32
7700 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7701 (build-system python-build-system)
7702 (arguments
7703 `(#:python ,python-2
7704 #:tests? #f)) ; no test target
7705 (native-inputs
7706 `(("python2-setuptools" ,python2-setuptools)))
7707 (home-page "https://github.com/MiCHiLU/python-functools32")
7708 (synopsis
7709 "Backport of the functools module from Python 3.2.3")
7710 (description
7711 "This package is a backport of the @code{functools} module from Python
77123.2.3 for use with older versions of Python and PyPy.")
7713 (license license:expat)))
7714
877889f3 7715(define-public python2-futures
7a5b944e 7716 (package
877889f3 7717 (name "python2-futures")
7a5b944e
EF
7718 (version "3.0.3")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "futures" version))
7723 (sha256
7724 (base32
7725 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7726 (build-system python-build-system)
877889f3 7727 (arguments `(#:python ,python-2))
7a5b944e 7728 (native-inputs
877889f3 7729 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7730 (home-page "https://github.com/agronholm/pythonfutures")
7731 (synopsis
7732 "Backport of the concurrent.futures package from Python 3.2")
7733 (description
7734 "The concurrent.futures module provides a high-level interface for
7735asynchronously executing callables. This package backports the
7736concurrent.futures package from Python 3.2")
3f641af0 7737 (license license:bsd-3)))
7a5b944e 7738
5cb2fe44
EF
7739(define-public python-promise
7740 (package
7741 (name "python-promise")
7742 (version "0.4.2")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "promise" version))
7747 (sha256
7748 (base32
7749 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7750 (build-system python-build-system)
7751 ;; Tests wants python-futures, which is a python2 only program, and
7752 ;; can't be found by python-promise at test time.
7753 (arguments `(#:tests? #f))
7754 (home-page "https://github.com/syrusakbary/promise")
7755 (synopsis "Promises/A+ implementation for Python")
7756 (description
7757 "Promises/A+ implementation for Python")
7758 (properties `((python2-variant . ,(delay python2-promise))))
7759 (license license:expat)))
7760
7761(define-public python2-promise
7762 (let ((promise (package-with-python2
7763 (strip-python2-variant python-promise))))
7764 (package (inherit promise)
7765 (arguments (substitute-keyword-arguments (package-arguments promise)
7766 ((#:tests? _) #t)))
7767 (native-inputs
7768 `(("python2-futures" ,python2-futures)
7769 ("python2-pytest" ,python2-pytest)
7770 ("python2-setuptools" ,python2-setuptools)
7771 ,@(package-native-inputs promise))))))
7772
c18f6368
EF
7773(define-public python-urllib3
7774 (package
7775 (name "python-urllib3")
7776 (version "1.13.1")
7777 (source
7778 (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "urllib3" version))
7781 (sha256
7782 (base32
7783 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7784 (build-system python-build-system)
7785 (arguments `(#:tests? #f))
7786 (native-inputs
7787 `(("python-setuptools" ,python-setuptools)
7788 ;; some packages for tests
7789 ("python-nose" ,python-nose)
7790 ("python-mock" ,python-mock)
7791 ("python-tornado" ,python-tornado)))
7792 (propagated-inputs
7793 `(;; packages for https security
7794 ("python-certifi" ,python-certifi)
7795 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7796 ("python-pyasn1" ,python-pyasn1)
7797 ("python-pyopenssl" ,python-pyopenssl)))
7798 (home-page "http://urllib3.readthedocs.org/")
7799 (synopsis "HTTP library with thread-safe connection pooling")
7800 (description
7801 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7802can reuse the same socket connection for multiple requests, it can POST files,
7803supports url redirection and retries, and also gzip and deflate decoding.")
7804 (license license:expat)))
7805
7806(define-public python2-urllib3
7807 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7808
7809(define-public python-colorama
7810 (package
7811 (name "python-colorama")
7812 (version "0.3.3")
7813 (source
7814 (origin
7815 (method url-fetch)
7816 (uri (pypi-uri "colorama" version))
7817 (sha256
7818 (base32
7819 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7820 (build-system python-build-system)
7821 (inputs
7822 `(("python-setuptools" ,python-setuptools)))
7823 (synopsis "colored terminal text rendering for Python")
7824 (description "Colorama is a Python library for rendering colored terminal
7825text.")
7826 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 7827 (license license:bsd-3)))
2b2f2fc1
DT
7828
7829(define-public python2-colorama
7830 (package-with-python2 python-colorama))
f5bcec6e
DT
7831
7832(define-public python-rsa
7833 (package
7834 (name "python-rsa")
ecd68c53 7835 (version "3.4.2")
f5bcec6e
DT
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "rsa" version))
7840 (sha256
7841 (base32
ecd68c53 7842 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
7843 (build-system python-build-system)
7844 (inputs
7845 `(("python-pyasn1" ,python-pyasn1)
7846 ("python-setuptools" ,python-setuptools)))
7847 (synopsis "Pure-Python RSA implementation")
7848 (description "Python-RSA is a pure-Python RSA implementation. It supports
7849encryption and decryption, signing and verifying signatures, and key
7850generation according to PKCS#1 version 1.5. It can be used as a Python
7851library as well as on the command line.")
7852 (home-page "http://stuvel.eu/rsa")
3f641af0 7853 (license license:asl2.0)))
f5bcec6e
DT
7854
7855(define-public python2-rsa
7856 (package-with-python2 python-rsa))
c0aacfa5
DT
7857
7858(define-public python-pluggy
7859 (package
7860 (name "python-pluggy")
7861 (version "0.3.1")
7862 (source
7863 (origin
7864 (method url-fetch)
7865 (uri (pypi-uri "pluggy" version))
7866 (sha256
7867 (base32
7868 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7869 (build-system python-build-system)
7870 (inputs
7871 `(("python-setuptools" ,python-setuptools)))
7872 (synopsis "Plugin and hook calling mechanism for Python")
7873 (description "Pluggy is an extraction of the plugin manager as used by
7874Pytest but stripped of Pytest specific details.")
7875 (home-page "https://pypi.python.org/pypi/pluggy")
7876 (license license:expat)))
7877
7878(define-public python2-pluggy
7879 (package-with-python2 python-pluggy))
a4af21ca
DT
7880
7881(define-public python-tox
7882 (package
7883 (name "python-tox")
7884 (version "2.3.1")
7885 (source
7886 (origin
7887 (method url-fetch)
7888 (uri (pypi-uri "tox" version))
7889 (sha256
7890 (base32
7891 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7892 (build-system python-build-system)
7893 (arguments
7894 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7895 ;; pytest breaks other packages.
7896 '(#:tests? #f))
7897 (inputs
7898 `(("python-setuptools" ,python-setuptools)
7899 ("python-pluggy" ,python-pluggy)
7900 ("python-py" ,python-py)
7901 ("python-virtualenv" ,python-virtualenv)
7902 ("python-pytest" ,python-pytest)))
7903 (home-page "http://tox.testrun.org/")
7904 (synopsis "Virtualenv-based automation of test activities")
7905 (description "Tox is a generic virtualenv management and test command line
7906tool. It can be used to check that a package installs correctly with
7907different Python versions and interpreters, or run tests in each type of
7908supported environment, or act as a frontend to continuous integration
7909servers.")
7910 (license license:expat)))
7911
7912(define-public python2-tox
7913 (package-with-python2 python-tox))
ba9da248
DT
7914
7915(define-public python-jmespath
7916 (package
7917 (name "python-jmespath")
7918 (version "0.9.0")
7919 (source
7920 (origin
7921 (method url-fetch)
7922 (uri (pypi-uri "jmespath" version))
7923 (sha256
7924 (base32
7925 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7926 (build-system python-build-system)
7927 (inputs
7928 `(("python-setuptools" ,python-setuptools)))
7929 (synopsis "JSON Matching Expressions")
7930 (description "JMESPath (pronounced “james path”) is a Python library that
7931allows one to declaratively specify how to extract elements from a JSON
7932document.")
7933 (home-page "https://github.com/jmespath/jmespath.py")
7934 (license license:expat)))
7935
7936(define-public python2-jmespath
7937 (package-with-python2 python-jmespath))
935fcd5c
DT
7938
7939(define-public python-botocore
7940 (package
7941 (name "python-botocore")
e09f952d 7942 (version "1.4.62")
935fcd5c
DT
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "botocore" version))
7947 (sha256
7948 (base32
e09f952d 7949 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
7950 (build-system python-build-system)
7951 (inputs
7952 `(("python-dateutil" ,python-dateutil-2)
7953 ("python-docutils" ,python-docutils)
7954 ("python-mock" ,python-mock)
7955 ("python-nose" ,python-nose)
7956 ("python-setuptools" ,python-setuptools)
7957 ("python-tox" ,python-tox)
7958 ("python-wheel" ,python-wheel)
7959 ("python-jmespath" ,python-jmespath)))
7960 (home-page "https://github.com/boto/botocore")
7961 (synopsis "Low-level interface to AWS")
7962 (description "Botocore is a Python library that provides a low-level
7963interface to the Amazon Web Services (AWS) API.")
3f641af0 7964 (license license:asl2.0)))
935fcd5c
DT
7965
7966(define-public python2-botocore
7967 (package-with-python2 python-botocore))
f861b8b8
DT
7968
7969(define-public awscli
7970 (package
7971 (name "awscli")
d5ccf71e 7972 (version "1.11.5")
f861b8b8
DT
7973 (source
7974 (origin
7975 (method url-fetch)
d5ccf71e 7976 (uri (pypi-uri name version))
f861b8b8
DT
7977 (sha256
7978 (base32
d5ccf71e 7979 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
7980 (build-system python-build-system)
7981 (inputs
7982 `(("python-colorama" ,python-colorama)
7983 ("python-docutils" ,python-docutils)
7984 ("python-mock" ,python-mock)
7985 ("python-nose" ,python-nose)
7986 ("python-rsa" ,python-rsa)
7987 ("python-setuptools" ,python-setuptools)
7988 ("python-sphinx" ,python-sphinx)
7989 ("python-tox" ,python-tox)
7990 ("python-wheel" ,python-wheel)
d5ccf71e
LF
7991 ("python-botocore" ,python-botocore)
7992 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
7993 (home-page "http://aws.amazon.com/cli/")
7994 (synopsis "Command line client for AWS")
7995 (description "AWS CLI provides a unified command line interface to the
7996Amazon Web Services (AWS) API.")
3f641af0 7997 (license license:asl2.0)))
6a44697d
LF
7998
7999(define-public python-hypothesis
8000 (package
8001 (name "python-hypothesis")
bea6d94d 8002 (version "3.1.0")
6a44697d
LF
8003 (source (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "hypothesis" version))
8006 (sha256
8007 (base32
bea6d94d 8008 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8009 (build-system python-build-system)
6a44697d
LF
8010 (propagated-inputs
8011 `(("python-flake8" ,python-flake8)
8012 ("python-pytest" ,python-pytest)))
8013 (synopsis "Library for property based testing")
8014 (description "Hypothesis is a library for testing your Python code against a
8015much larger range of examples than you would ever want to write by hand. It’s
8016based on the Haskell library, Quickcheck, and is designed to integrate
8017seamlessly into your existing Python unit testing work flow.")
8018 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8019 (license license:mpl2.0)
6f068e08 8020 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8021
8022(define-public python2-hypothesis
6f068e08
EF
8023 (let ((hypothesis (package-with-python2
8024 (strip-python2-variant python-hypothesis))))
8025 (package (inherit hypothesis)
8026 (native-inputs
8027 `(("python2-enum34" ,python2-enum34)
8028 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
8029
8030(define-public python-pytest-subtesthack
8031 (package
8032 (name "python-pytest-subtesthack")
8033 (version "0.1.1")
8034 (source (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "pytest-subtesthack" version))
8037 (sha256
8038 (base32
8039 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8040 (build-system python-build-system)
8041 (native-inputs
8042 `(;; setuptools required for python-2 variant
8043 ("python-setuptools" ,python-setuptools)))
8044 (propagated-inputs
8045 `(("python-pytest" ,python-pytest)))
8046 (synopsis "Set-up and tear-down fixtures for unit tests")
8047 (description "This plugin allows you to set up and tear down fixtures within
8048unit test functions that use @code{py.test}. This is useful for using
8049@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8050function multiple times, without setting up or tearing down fixture state as is
8051normally the case.")
8052 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8053 (license license:unlicense)))
7517e73c
LF
8054
8055(define-public python2-pytest-subtesthack
8056 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8057
8058(define-public python2-xdo
8059 (package
8060 (name "python2-xdo")
8061 (version "0.2")
8062 (source (origin
8063 (method url-fetch)
8064 (uri (string-append
8065 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8066 "python-xdo_" version ".orig.tar.gz"))
8067 (sha256
8068 (base32
8069 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8070 (build-system python-build-system)
8071 (arguments
8072 `(#:python ,python-2
8073 #:tests? #f)) ; no tests provided
8074 (inputs
8075 `(("xdotool" ,xdotool)
8076 ("libX11" ,libx11)))
8077 (home-page "https://tracker.debian.org/pkg/python-xdo")
8078 (synopsis "Python library for simulating X11 keyboard/mouse input")
8079 (description "Provides bindings to libxdo for manipulating X11 via simulated
8080input. (Note that this is mostly a legacy library; you may wish to look at
8081python-xdo for newer bindings.)")
3f641af0 8082 (license license:bsd-3)))
0bdc1671 8083
cb34dc6c
CAW
8084(define-public python-wtforms
8085 (package
8086 (name "python-wtforms")
8087 (version "2.1")
8088 (source
8089 (origin
8090 (method url-fetch)
8091 (uri (pypi-uri "WTForms" version ".zip"))
8092 (sha256
8093 (base32
8094 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8095 (build-system python-build-system)
8096 (native-inputs
8097 `(("unzip" ,unzip)))
8098 (home-page "http://wtforms.simplecodes.com/")
8099 (synopsis
8100 "Form validation and rendering library for Python web development")
8101 (description
8102 "WTForms is a flexible forms validation and rendering library
8103for Python web development. It is very similar to the web form API
8104available in Django, but is a standalone package.")
3f641af0 8105 (license license:bsd-3)
cb34dc6c
CAW
8106 (properties `((python2-variant . ,(delay python2-wtforms))))))
8107
8108(define-public python2-wtforms
8109 (package
8110 (inherit (package-with-python2
8111 (strip-python2-variant python-wtforms)))
8112 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8113
8114(define-public python-mako
8115 (package
8116 (name "python-mako")
8117 (version "1.0.3")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "Mako" version))
8122 (sha256
8123 (base32
8124 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8125 (build-system python-build-system)
8126 (native-inputs
8127 `(("python-markupsafe" ,python-markupsafe)
8128 ("python-mock" ,python-mock)
8129 ("python-nose" ,python-nose)))
8130 (home-page "http://www.makotemplates.org/")
8131 (synopsis "Templating language for Python")
8132 (description "Mako is a templating language for Python that compiles
8133templates into Python modules.")
8134 (license license:expat)
8135 (properties `((python2-variant . ,(delay python2-mako))))))
8136
8137(define-public python2-mako
8138 (let ((base (package-with-python2
8139 (strip-python2-variant python-mako))))
8140 (package
8141 (inherit base)
8142 (native-inputs
8143 (cons `("python2-setuptools" ,python2-setuptools)
8144 (package-native-inputs base))))))
ae00a41f
CAW
8145
8146(define-public python-waitress
8147 (package
8148 (name "python-waitress")
8149 (version "0.8.10")
8150 (source
8151 (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "waitress" version))
8154 (sha256
8155 (base32
8156 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8157 (build-system python-build-system)
8158 (home-page "https://github.com/Pylons/waitress")
8159 (synopsis "Waitress WSGI server")
8160 (description "Waitress is meant to be a production-quality pure-Python WSGI
8161server with very acceptable performance.")
3f641af0 8162 (license license:zpl2.1)
ae00a41f
CAW
8163 (properties `((python2-variant . ,(delay python2-waitress))))))
8164
8165(define-public python2-waitress
8166 (package
8167 (inherit (package-with-python2
8168 (strip-python2-variant python-waitress)))
8169 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8170
8171(define-public python-wsgiproxy2
8172 (package
8173 (name "python-wsgiproxy2")
8174 (version "0.4.2")
8175 (source
8176 (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8179 (sha256
8180 (base32
8181 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8182 (build-system python-build-system)
8183 (native-inputs
8184 `(("unzip" ,unzip)
8185 ("python-nose" ,python-nose)
8186 ("python-coverage" ,python-coverage)))
8187 (propagated-inputs
8188 `(("python-six" ,python-six)
8189 ("python-webob" ,python-webob)))
8190 (home-page
8191 "https://github.com/gawel/WSGIProxy2/")
8192 (synopsis "WSGI Proxy with various http client backends")
8193 (description "WSGI turns HTTP requests into WSGI function calls.
8194WSGIProxy turns WSGI function calls into HTTP requests.
8195It also includes code to sign requests and pass private data,
8196and to spawn subprocesses to handle requests.")
8197 (license license:expat)
8198 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8199
8200(define-public python2-wsgiproxy2
8201 (let ((wsgiproxy2 (package-with-python2
8202 (strip-python2-variant python-wsgiproxy2))))
8203 (package
8204 (inherit wsgiproxy2)
8205 (inputs `(("python2-setuptools" ,python2-setuptools)
8206 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8207
8208(define-public python-pastedeploy
8209 (package
8210 (name "python-pastedeploy")
8211 (version "1.5.2")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "PasteDeploy" version))
8216 (sha256
8217 (base32
8218 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8219 (build-system python-build-system)
8220 (native-inputs
8221 `(("python-nose" ,python-nose)))
8222 (propagated-inputs
8223 ;; This package uses pkg_resources, part of setuptools, during runtime,
8224 ;; hence why not a native-input.
8225 `(("python-setuptools" ,python-setuptools)))
8226 (home-page "http://pythonpaste.org/deploy/")
8227 (synopsis
8228 "Load, configure, and compose WSGI applications and servers")
8229 (description
8230 "This tool provides code to load WSGI applications and servers from URIs;
8231these URIs can refer to Python Eggs for INI-style configuration files. Paste
8232Script provides commands to serve applications based on this configuration
8233file.")
8234 (license license:expat)))
8235
8236(define-public python2-pastedeploy
8237 (package-with-python2 python-pastedeploy))
1cf53652 8238
c4a7904c
CAW
8239(define-public python-paste
8240 (package
8241 (name "python-paste")
8242 (version "2.0.2")
8243 (source
8244 (origin
8245 (method url-fetch)
8246 (uri (pypi-uri "Paste" version))
8247 (sha256
8248 (base32
8249 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8250 (patches (search-patches "python-paste-remove-website-test.patch"
8251 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8252 (build-system python-build-system)
8253 (native-inputs
8254 `(("python-nose" ,python-nose)))
8255 (propagated-inputs
8256 `(;; Uses pkg_resources provided by setuptools internally.
8257 ("python-setuptools" ,python-setuptools)
8258 ("python-six" ,python-six)))
8259 (arguments
8260 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8261 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8262 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8263 ;; still... things should be better by the next Paste release.)
8264 #:tests? #f))
8265 (home-page "http://pythonpaste.org")
8266 (synopsis
8267 "Python web development tools, focusing on WSGI")
8268 (description
8269 "Paste provides a variety of web development tools and middleware which
8270can be nested together to build web applications. Paste's design closely
8271follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8272 (license license:expat)
8273 (properties `((python2-variant . ,(delay python2-paste))))))
8274
8275(define-public python2-paste
8276 (let ((paste (package-with-python2
8277 (strip-python2-variant python-paste))))
8278 (package
8279 (inherit paste)
8280 (arguments
8281 ;; Tests are back for Python 2!
8282 `(#:tests? #t
8283 ,@(package-arguments paste))))))
8284
a8f20f63
CAW
8285(define-public python-pastescript
8286 (package
8287 (name "python-pastescript")
8288 (version "2.0.2")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "PasteScript" version))
8293 (sha256
8294 (base32
8295 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8296 (build-system python-build-system)
8297 (native-inputs
8298 `(("python-nose" ,python-nose)))
8299 (propagated-inputs
8300 `(;; Uses pkg_resources provided by setuptools internally.
8301 ("python-setuptools" ,python-setuptools)
8302 ("python-paste" ,python-paste)
8303 ("python-pastedeploy" ,python-pastedeploy)))
8304 (home-page "http://pythonpaste.org/script/")
8305 (arguments
8306 '(;; Unfortunately, this requires the latest unittest2,
8307 ;; but that requires traceback2 which requires linecache2 which requires
8308 ;; unittest2. So we're skipping tests for now.
8309 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8310 ;; so in theory we could get around this situation somehow.)
8311 #:tests? #f))
8312 (synopsis
8313 "Pluggable command line tool for serving web applications and more")
8314 (description
8315 "PasteScript is a plugin-friendly command line tool which provides a
8316variety of features, from launching web applications to bootstrapping project
8317layouts.")
8318 (license license:expat)))
8319
8320(define-public python2-pastescript
8321 (package-with-python2 python-pastescript))
8322
1cf53652
CAW
8323(define-public python-pyquery
8324 (package
8325 (name "python-pyquery")
aab76e80 8326 (version "1.2.13")
1cf53652
CAW
8327 (source
8328 (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "pyquery" version))
8331 (sha256
8332 (base32
aab76e80 8333 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652
CAW
8334 (build-system python-build-system)
8335 (propagated-inputs
8336 `(("python-lxml" ,python-lxml)
8337 ("python-cssselect" ,python-cssselect)))
8338 (home-page "https://github.com/gawel/pyquery")
8339 (synopsis "Make jQuery-like queries on xml documents")
8340 (description "pyquery allows you to make jQuery queries on xml documents.
8341The API is as much as possible the similar to jQuery. pyquery uses lxml for
8342fast xml and html manipulation.")
3f641af0 8343 (license license:bsd-3)
1cf53652
CAW
8344 (properties `((python2-variant . ,(delay python2-pyquery))))))
8345
8346(define-public python2-pyquery
8347 (let ((pyquery (package-with-python2
8348 (strip-python2-variant python-pyquery))))
8349 (package
8350 (inherit pyquery)
8351 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
aa6313d6
CAW
8352
8353(define-public python-webtest
8354 (package
8355 (name "python-webtest")
8356 (version "2.0.20")
8357 (source
8358 (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "WebTest" version))
8361 (sha256
8362 (base32
8363 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8364 (build-system python-build-system)
8365 (arguments
8366 `(;; Unfortunately we have to disable tests!
8367 ;; This release of WebTest is pinned to python-nose < 1.3,
8368 ;; but older versions of python-nose are plagued with the following
8369 ;; bug(s), which rears its ugly head during test execution:
8370 ;; https://github.com/nose-devs/nose/issues/759
8371 ;; https://github.com/nose-devs/nose/pull/811
8372 #:tests? #f))
8373 ;; Commented out code is no good, but in this case, once tests
8374 ;; are ready to be enabled again, we should put the following
8375 ;; in place:
8376 ;; (native-inputs
8377 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8378 ;; ; but see above comment
8379 ;; ("python-coverage" ,python-coverage)
8380 ;; ("python-mock" ,python-mock)
8381 ;; ("python-pastedeploy" ,python-pastedeploy)
8382 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8383 ;; ("python-pyquery" ,python-pyquery)))
8384 (propagated-inputs
8385 `(("python-waitress" ,python-waitress)
8386 ("python-webob" ,python-webob)
8387 ("python-six" ,python-six)
8388 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8389 (home-page "http://webtest.pythonpaste.org/")
8390 (synopsis "Helper to test WSGI applications")
8391 (description "Webtest allows you to test your Python web applications
8392without starting an HTTP server. It supports anything that supports the
8393minimum of WSGI.")
8394 (license license:expat)
8395 (properties `((python2-variant . ,(delay python2-webtest))))))
8396
8397(define-public python2-webtest
8398 (let ((webtest (package-with-python2
8399 (strip-python2-variant python-webtest))))
8400 (package
8401 (inherit webtest)
8402 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8403 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8404
8405(define-public python-anyjson
8406 (package
8407 (name "python-anyjson")
8408 (version "0.3.3")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "anyjson" version))
8413 (sha256
8414 (base32
8415 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8416 (build-system python-build-system)
8417 (arguments
8418 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8419 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8420 ;; whatever) so this transformation needs to be done before the tests
8421 ;; can be run. Maybe we could add a build step to transform beforehand
8422 ;; but it could be annoying/difficult.
8423 ;; We can enable tests for the Python 2 version, though, and do below.
8424 #:tests? #f))
8425 (home-page "http://bitbucket.org/runeh/anyjson/")
8426 (synopsis
8427 "Wraps best available JSON implementation in a common interface")
8428 (description
8429 "Anyjson loads whichever is the fastest JSON module installed
8430and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8431 (license license:bsd-3)
4cb122cd
CAW
8432 (properties `((python2-variant . ,(delay python2-anyjson))))))
8433
8434(define-public python2-anyjson
8435 (let ((anyjson (package-with-python2
8436 (strip-python2-variant python-anyjson))))
8437 (package
8438 (inherit anyjson)
8439 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8440 #:tests? #t
8441 ,@(package-arguments anyjson)))
8442 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8443 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8444
8445(define-public python-amqp
8446 (package
8447 (name "python-amqp")
8448 (version "1.4.9")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "amqp" version))
8453 (sha256
8454 (base32
8455 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8456 (build-system python-build-system)
8457 (native-inputs
8458 `(("python-nose" ,python-nose)
8459 ("python-mock" ,python-mock)))
8460 (home-page "http://github.com/celery/py-amqp")
8461 (synopsis
8462 "Low-level AMQP client for Python (fork of amqplib)")
8463 (description
8464 "This is a fork of amqplib which was originally written by Barry Pederson.
8465It is maintained by the Celery project, and used by kombu as a pure python
8466alternative when librabbitmq is not available.")
3f641af0 8467 (license license:lgpl2.1+)
8dfceab7
CAW
8468 (properties `((python2-variant . ,(delay python2-amqp))))))
8469
8470(define-public python2-amqp
8471 (let ((amqp (package-with-python2
8472 (strip-python2-variant python-amqp))))
8473 (package
8474 (inherit amqp)
8475 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8476 ;; unmaintained. Weirdly, does not do this on the python 3
8477 ;; version?
8478 #:tests? #f
8479 ,@(package-arguments amqp)))
8480 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8481 ,@(package-native-inputs amqp))))))
7d387305
CAW
8482
8483(define-public python-kombu
8484 (package
8485 (name "python-kombu")
0cb59822 8486 (version "3.0.37")
7d387305
CAW
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "kombu" version))
8491 (sha256
8492 (base32
0cb59822 8493 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8494 (build-system python-build-system)
8495 (native-inputs
8496 `(("python-mock" ,python-mock)
8497 ("python-nose" ,python-nose)))
8498 (propagated-inputs
8499 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8500 ("python-amqp" ,python-amqp)
8501 ("python-redis" ,python-redis)))
7d387305
CAW
8502 (home-page "http://kombu.readthedocs.org")
8503 (synopsis "Message passing library for Python")
8504 (description "The aim of Kombu is to make messaging in Python as easy as
8505possible by providing an idiomatic high-level interface for the AMQ protocol,
8506and also provide proven and tested solutions to common messaging problems.
8507AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8508message orientation, queuing, routing, reliability and security, for which the
8509RabbitMQ messaging server is the most popular implementation.")
3f641af0 8510 (license license:bsd-3)
7d387305
CAW
8511 (properties `((python2-variant . ,(delay python2-kombu))))))
8512
8513(define-public python2-kombu
8514 (let ((kombu (package-with-python2
8515 (strip-python2-variant python-kombu))))
8516 (package
8517 (inherit kombu)
8518 (inputs `(("python2-setuptools" ,python2-setuptools)
8519 ("python2-unittest2" ,python2-unittest2)
8520 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8521
8522(define-public python-billiard
8523 (package
8524 (name "python-billiard")
a6bb9e44 8525 (version "3.3.0.23")
b6f0b9fb
CAW
8526 (source
8527 (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "billiard" version))
8530 (sha256
8531 (base32
a6bb9e44 8532 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
8533 (build-system python-build-system)
8534 (native-inputs
8535 `(("python-nose" ,python-nose)))
8536 (home-page "http://github.com/celery/billiard")
8537 (synopsis
8538 "Python multiprocessing fork with improvements and bugfixes")
8539 (description
8540 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8541multiprocessing package itself is a renamed and updated version of R Oudkerk's
8542pyprocessing package. This standalone variant is intended to be compatible with
8543Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8544 (license license:bsd-3)
b6f0b9fb
CAW
8545 (properties `((python2-variant . ,(delay python2-billiard))))))
8546
8547(define-public python2-billiard
8548 (let ((billiard (package-with-python2
8549 (strip-python2-variant python-billiard))))
8550 (package
8551 (inherit billiard)
8552 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8553 ("python2-unittest2" ,python2-unittest2)
8554 ("python2-mock" ,python2-mock)
8555 ,@(package-native-inputs billiard))))))
22df6419
CAW
8556
8557(define-public python-celery
8558 (package
8559 (name "python-celery")
9ebe87fe 8560 (version "3.1.24")
22df6419
CAW
8561 (source
8562 (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "celery" version))
8565 (sha256
8566 (base32
9ebe87fe 8567 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 8568 (build-system python-build-system)
9ebe87fe
LF
8569 (arguments
8570 `(#:phases
8571 (modify-phases %standard-phases
8572 ;; These tests break with Python 3.5:
8573 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8574 (replace 'check
8575 (lambda _
8576 (zero?
8577 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
8578 (native-inputs
8579 `(("python-nose" ,python-nose)))
a64cbb6f 8580 (inputs
22df6419 8581 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8582 ("python-amqp" ,python-amqp)
8583 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8584 ("python-billiard" ,python-billiard)
8585 ("python-kombu" ,python-kombu)))
8586 (home-page "http://celeryproject.org")
8587 (synopsis "Distributed Task Queue")
8588 (description "Celery is an asynchronous task queue/job queue based on
8589distributed message passing. It is focused on real-time operation, but
8590supports scheduling as well. The execution units, called tasks, are executed
8591concurrently on a single or more worker servers using multiprocessing,
8592Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8593synchronously (wait until ready).")
3f641af0 8594 (license license:bsd-3)
22df6419
CAW
8595 (properties `((python2-variant . ,(delay python2-celery))))))
8596
8597(define-public python2-celery
8598 (let ((celery (package-with-python2
8599 (strip-python2-variant python-celery))))
8600 (package
8601 (inherit celery)
8602 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8603 ("python2-unittest2" ,python2-unittest2)
8604 ("python2-mock" ,python2-mock)
8605 ,@(package-native-inputs celery))))))
97e32948
CAW
8606
8607(define-public python-translitcodec
8608 (package
8609 (name "python-translitcodec")
8610 (version "0.4.0")
8611 (source
8612 (origin
8613 (method url-fetch)
8614 (uri (pypi-uri "translitcodec" version))
8615 (sha256
8616 (base32
8617 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8618 (build-system python-build-system)
8619 (arguments
8620 `(#:tests? #f)) ; no tests provided
8621 (home-page
8622 "https://github.com/claudep/translitcodec")
8623 (synopsis
8624 "Unicode to 8-bit charset transliteration codec")
8625 (description
8626 "This package contains codecs for transliterating ISO 10646 texts into
8627best-effort representations using smaller coded character sets (ASCII,
8628ISO 8859, etc.).")
8629 (license license:expat)
8630 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8631
8632(define-public python2-translitcodec
8633 (package
8634 (inherit (package-with-python2
8635 (strip-python2-variant python-translitcodec)))
8636 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8637
8638(define-public python-editor
8639 (package
8640 (name "python-editor")
8641 (version "0.5")
8642 (source
8643 (origin
8644 (method url-fetch)
8645 (uri (pypi-uri "python-editor" version))
8646 (sha256
8647 (base32
8648 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8649 (build-system python-build-system)
8650 (home-page
8651 "https://github.com/fmoo/python-editor")
8652 (synopsis
8653 "Programmatically open an editor, capture the result")
8654 (description
8655 "python-editor is a library that provides the editor module for
8656programmatically interfacing with your system's $EDITOR.")
3f641af0 8657 (license license:asl2.0)
0c3b90d4
CAW
8658 (properties `((python2-variant . ,(delay python2-editor))))))
8659
8660(define-public python2-editor
8661 (package
8662 (inherit (package-with-python2
8663 (strip-python2-variant python-editor)))
8664 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8665
8666(define-public python-sphinxcontrib-programoutput
8667 (package
8668 (name "python-sphinxcontrib-programoutput")
8669 (version "0.8")
8670 (source (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8673 (sha256
8674 (base32
8675 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8676 (build-system python-build-system)
8677 (propagated-inputs
8678 `(("python-docutils" ,python-docutils)
8679 ("python-sphinx" ,python-sphinx)))
8680 (synopsis "Sphinx extension to include program output")
8681 (description "A Sphinx extension to literally insert the output of arbitrary
8682commands into documents, helping you to keep your command examples up to date.")
8683 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8684 (license license:bsd-2)
3276517c
LF
8685 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8686
8687(define-public python2-sphinxcontrib-programoutput
8688 (package
8689 (inherit (package-with-python2
8690 (strip-python2-variant python-sphinxcontrib-programoutput)))
8691 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8692
8693(define-public python-sphinx-repoze-autointerface
8694 (package
8695 (name "python-sphinx-repoze-autointerface")
328ae341 8696 (version "0.8")
548d7165
LF
8697 (source (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8700 (sha256
8701 (base32
328ae341 8702 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8703 (build-system python-build-system)
8704 (propagated-inputs
8705 `(("python-docutils" ,python-docutils)
8706 ("python-sphinx" ,python-sphinx)
8707 ("python-zope-interface" ,python-zope-interface)))
8708 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8709 (description "This package defines an extension for the Sphinx documentation
8710system. The extension allows generation of API documentation by
8711introspection of @code{zope.interface} instances in code.")
8712 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8713 (license license:repoze)))
548d7165
LF
8714
8715(define-public python2-sphinx-repoze-autointerface
8716 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8717
8718(define-public python-psycopg2
8719 (package
8720 (name "python-psycopg2")
8721 (version "2.6.1")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "psycopg2" version))
8726 (sha256
8727 (base32
8728 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8729 (build-system python-build-system)
8730 (arguments
8731 ;; Tests would require a postgresql database "psycopg2_test"
8732 ;; and a running postgresql database management service.
8733 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8734 (inputs
8735 `(("postgresql" ,postgresql))) ; libpq
8736 (home-page "http://initd.org/psycopg/")
8737 (synopsis "Python PostgreSQL adapter")
8738 (description
8739 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 8740 (license license:lgpl3+)
b31fbea5
DM
8741 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8742
8743(define-public python2-psycopg2
8744 (package
8745 (inherit (package-with-python2
8746 (strip-python2-variant python-psycopg2)))
8747 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8748
8749(define-public python-vobject
8750 (package
8751 (name "python-vobject")
9bed9b15 8752 (version "0.9.2")
eed1a61f
LF
8753 (source (origin
8754 (method url-fetch)
8755 (uri (pypi-uri "vobject" version))
8756 (sha256
8757 (base32
9bed9b15 8758 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 8759 (build-system python-build-system)
a9871b7b
LF
8760 (arguments
8761 '(;; The test suite relies on some non-portable Windows interfaces.
8762 #:tests? #f))
eed1a61f
LF
8763 (inputs
8764 `(("python-dateutil-2" ,python-dateutil-2)
8765 ("python-pyicu" ,python-pyicu)))
8766 (synopsis "Parse and generate vCard and vCalendar files")
8767 (description "Vobject is intended to be a full featured Python package for
8768parsing and generating vCard and vCalendar files. Currently, iCalendar files
8769are supported and well tested. vCard 3.0 files are supported, and all data
8770should be imported, but only a few components are understood in a sophisticated
8771way.")
8772 (home-page "http://eventable.github.io/vobject/")
3f641af0 8773 (license license:asl2.0)
eed1a61f
LF
8774 (properties `((python2-variant . ,(delay python2-vobject))))))
8775
8776(define-public python2-vobject
8777 (package
8778 (inherit (package-with-python2
8779 (strip-python2-variant python-vobject)))
8780 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8781
8782(define-public python-munkres
8783 (package
8784 (name "python-munkres")
8785 (version "1.0.7")
8786 (source (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "munkres" version))
8789 (sha256
8790 (base32
8791 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8792 (build-system python-build-system)
8793 (arguments
8794 '(#:tests? #f)) ; no test suite
8795 (home-page "http://software.clapper.org/munkres/")
8796 (synopsis "Implementation of the Munkres algorithm")
8797 (description "The Munkres module provides an implementation of the Munkres
8798algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8799useful for solving the Assignment Problem.")
3f641af0 8800 (license license:bsd-3)))
cedac813
LF
8801
8802(define-public python2-munkres
8803 (package-with-python2 python-munkres))
f3b3d78f
LF
8804
8805(define-public python-flask
8806 (package
8807 (name "python-flask")
8808 (version "0.10.1")
8809 (source (origin
8810 (method url-fetch)
8811 (uri (pypi-uri "Flask" version))
8812 (sha256
8813 (base32
8814 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8815 (build-system python-build-system)
8816 (propagated-inputs
8817 `(("python-itsdangerous" ,python-itsdangerous)
8818 ("python-jinja2" ,python-jinja2)
8819 ("python-werkzeug" ,python-werkzeug)))
8820 (home-page "https://github.com/mitsuhiko/flask/")
8821 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8822 (description "Flask is a micro web framework based on the Werkzeug toolkit
8823and Jinja2 template engine. It is called a micro framework because it does not
8824presume or force a developer to use a particular tool or library.")
3f641af0 8825 (license license:bsd-3)
f3b3d78f
LF
8826 (properties `((python2-variant . ,(delay python2-flask))))))
8827
8828(define-public python2-flask
8829 (package (inherit (package-with-python2
8830 (strip-python2-variant python-flask)))
8831 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8832
8833(define-public python-cookies
8834 (package
8835 (name "python-cookies")
8836 (version "2.2.1")
8837 (source (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "cookies" version))
8840 (sha256
8841 (base32
8842 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8843 (build-system python-build-system)
8844 (arguments
8845 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8846 #:tests? #f))
8847 (native-inputs
8848 `(("python-pytest" ,python2-pytest)))
8849 (synopsis "HTTP cookie parser and renderer")
8850 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8851Python.")
8852 (home-page "https://gitlab.com/sashahart/cookies")
8853 (license license:expat)
8854 (properties `((python2-variant . ,(delay python2-cookies))))))
8855
8856(define-public python2-cookies
8857 (let ((cookies (package-with-python2
8858 (strip-python2-variant python-cookies))))
8859 (package (inherit cookies)
8860 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8861 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8862
8863(define-public python-responses
8864 (package
8865 (name "python-responses")
8866 (version "0.5.1")
8867 (source (origin
8868 (method url-fetch)
8869 (uri (pypi-uri "responses" version))
8870 (sha256
8871 (base32
8872 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8873 (build-system python-build-system)
8874 (arguments
8875 `(;; Test suite is not distributed:
8876 ;; https://github.com/getsentry/responses/issues/38
8877 #:tests? #f))
8878 (native-inputs
8879 `(("python-cookies" ,python-cookies)
8880 ("python-mock" ,python-mock)))
8881 (propagated-inputs
8882 `(("python-requests" ,python-requests)
8883 ("python-six" ,python-six)))
8884 (home-page "https://github.com/getsentry/responses")
8885 (synopsis "Utility for mocking out the `requests` Python library")
8886 (description "A utility library for mocking out the `requests` Python
8887library.")
3f641af0 8888 (license license:asl2.0)
0efde7d6
LF
8889 (properties `((python2-variant . ,(delay python2-responses))))))
8890
8891(define-public python2-responses
8892 (let ((responses (package-with-python2
8893 (strip-python2-variant python-responses))))
8894 (package (inherit responses)
8895 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8896 ,@(package-native-inputs responses))))))
76b94885 8897
b7afd018
RW
8898(define-public python-whoosh
8899 (package
8900 (name "python-whoosh")
8901 (version "2.7.4")
8902 (source
8903 (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "Whoosh" version))
8906 (sha256
8907 (base32
8908 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8909 (build-system python-build-system)
8910 (native-inputs
8911 `(("python-setuptools" ,python-setuptools)
8912 ("python-pytest" ,python-pytest)))
8913 (home-page "http://bitbucket.org/mchaput/whoosh")
8914 (synopsis "Full text indexing, search, and spell checking library")
8915 (description
8916 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8917checking library.")
8918 (license license:bsd-2)))
8919
8920(define-public python2-whoosh
8921 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8922 (package (inherit whoosh)
8923 (propagated-inputs
8924 `(("python2-backport-ssl-match-hostname"
8925 ,python2-backport-ssl-match-hostname)
8926 ,@(package-propagated-inputs whoosh))))))
8927
76b94885
LF
8928(define-public python-pathlib
8929 (package
8930 (name "python-pathlib")
8931 (version "1.0.1")
8932 (source (origin
8933 (method url-fetch)
8934 (uri (pypi-uri "pathlib" version))
8935 (sha256
8936 (base32
8937 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8938 (build-system python-build-system)
92a312dc
RW
8939 ;; The tests depend on the internal "test" module, which does not provide
8940 ;; a stable interface.
8941 (arguments `(#:tests? #f))
76b94885 8942 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
8943 (synopsis "Object-oriented file system paths")
8944 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
8945It offers the following advantages over using string objects:
8946
8947@enumerate
8948@item No more cumbersome use of os and os.path functions. Everything can
8949be done easily through operators, attribute accesses, and method calls.
8950@item Embodies the semantics of different path types. For example,
8951comparing Windows paths ignores casing.
8952@item Well-defined semantics, eliminating any inconsistencies or
8953ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
8954@end enumerate
8955
8956Note: In Python 3.4, pathlib is now part of the standard library. For other
8957Python versions please consider python-pathlib2 instead, which tracks the
8958standard library module. This module (python-pathlib) isn't maintained
8959anymore.")
76b94885
LF
8960 (license license:expat)))
8961
8962(define-public python2-pathlib
8963 (package-with-python2 python-pathlib))
25a7db0a 8964
b7703c81
HG
8965(define-public python2-pathlib2
8966 (package
8967 (name "python2-pathlib2")
8968 (version "2.1.0")
8969 (source (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "pathlib2" version))
8972 (sha256
8973 (base32
8974 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
8975 (build-system python-build-system)
8976 (arguments
8977 `(#:python ,python-2))
8978 (native-inputs
8979 `(("python2-setuptools" ,python2-setuptools)
8980 ("python2-six" ,python2-six)))
8981 (home-page "http://pypi.python.org/pypi/pathlib2/")
8982 (synopsis "Object-oriented file system paths - backport of standard
8983pathlib module")
8984 (description "The goal of pathlib2 is to provide a backport of standard
8985pathlib module which tracks the standard library module, so all the newest
8986features of the standard pathlib can be used also on older Python versions.
8987
8988Pathlib offers a set of classes to handle file system paths. It offers the
8989following advantages over using string objects:
8990
8991@enumerate
8992@item No more cumbersome use of os and os.path functions. Everything can
8993be done easily through operators, attribute accesses, and method calls.
8994@item Embodies the semantics of different path types. For example,
8995comparing Windows paths ignores casing.
8996@item Well-defined semantics, eliminating any inconsistencies or
8997ambiguities (forward vs. backward slashes, etc.).
8998@end enumerate")
8999 (license license:expat)))
9000
25a7db0a
LF
9001(define-public python-jellyfish
9002 (package
9003 (name "python-jellyfish")
9004 (version "0.5.3")
9005 (source (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "jellyfish" version))
9008 (sha256
9009 (base32
9010 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9011 (build-system python-build-system)
9012 (native-inputs
9013 `(("python-pytest" ,python-pytest)))
9014 (home-page "https://github.com/jamesturk/jellyfish")
9015 (synopsis "Approximate and phonetic matching of strings")
9016 (description "Jellyfish uses a variety of string comparison and phonetic
9017encoding algorithms to do fuzzy string matching.")
3f641af0 9018 (license license:bsd-2)
25a7db0a
LF
9019 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9020
9021(define-public python2-jellyfish
9022 (let ((jellyfish (package-with-python2
9023 (strip-python2-variant python-jellyfish))))
9024 (package (inherit jellyfish)
9025 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9026 ("python2-unicodecsv" ,python2-unicodecsv)
9027 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9028
9029(define-public python2-unicodecsv
9030 (package
9031 (name "python2-unicodecsv")
9032 (version "0.14.1")
9033 (source (origin
9034 (method url-fetch)
9035 ;; The test suite is not included in the PyPi release.
9036 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9037 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9038 "archive/" version ".tar.gz"))
9039 (file-name (string-append name "-" version ".tar.gz"))
9040 (sha256
9041 (base32
9042 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9043 (build-system python-build-system)
9044 (arguments
9045 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9046 #:python ,python-2))
9047 (native-inputs
9048 `(("python2-setuptools" ,python2-setuptools)
9049 ("python2-unittest2" ,python2-unittest2)))
9050 (home-page "https://github.com/jdunck/python-unicodecsv")
9051 (synopsis "Unicode CSV module for Python 2")
9052 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9053module, adding support for Unicode strings.")
3f641af0 9054 (license license:bsd-2)))
064503aa
LF
9055
9056(define-public python-rarfile
9057 (package
9058 (name "python-rarfile")
9059 (version "2.7")
9060 (source (origin
9061 (method url-fetch)
9062 (uri (pypi-uri "rarfile" version))
9063 (sha256
9064 (base32
9065 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9066 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9067 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9068 (build-system python-build-system)
9069 (arguments
9070 '(#:phases
9071 (modify-phases %standard-phases
9072 (replace 'check
9073 ;; Many tests fail, but the installation proceeds.
9074 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9075 (native-inputs
9076 `(("which" ,which))) ; required for tests
9077 (propagated-inputs
9078 `(("libarchive" ,libarchive)))
9079 (home-page "https://github.com/markokr/rarfile")
9080 (synopsis "RAR archive reader for Python")
9081 (description "This is Python module for RAR archive reading. The interface
9082is made as zipfile like as possible.")
3f641af0 9083 (license license:isc)))
064503aa
LF
9084
9085(define-public python2-rarfile
9086 (package-with-python2 python-rarfile))
daeeea71
CM
9087
9088(define-public python-magic
9089 (package
9090 (name "python-magic")
9091 (version "0.4.3")
9092 (source
9093 (origin
9094 (method url-fetch)
9095 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9096 version ".tar.gz"))
9097 (sha256
9098 (base32
9099 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9100 (file-name (string-append name "-" version "-checkout"))))
9101 (build-system python-build-system)
9102 (arguments
9103 ;; The tests are unreliable, so don't run them. The tests fail
9104 ;; under Python3 because they were written for Python2 and
9105 ;; contain import statements that do not work in Python3. One of
9106 ;; the tests fails under Python2 because its assertions are
9107 ;; overly stringent; it relies on comparing output strings which
9108 ;; are brittle and can change depending on the version of
9109 ;; libmagic being used and the system on which the test is
9110 ;; running. In my case, under GuixSD 0.10.0, only one test
9111 ;; failed, and it seems to have failed only because the version
9112 ;; of libmagic that is packaged in Guix outputs a slightly
9113 ;; different (but not wrong) string than the one that the test
9114 ;; expected.
9115 '(#:tests? #f
9116 #:phases (modify-phases %standard-phases
9117 ;; Replace a specific method call with a hard-coded
9118 ;; path to the necessary libmagic.so file in the
9119 ;; store. If we don't do this, then the method call
9120 ;; will fail to find the libmagic.so file, which in
9121 ;; turn will cause any application using
9122 ;; python-magic to fail.
9123 (add-before 'build 'hard-code-path-to-libmagic
9124 (lambda* (#:key inputs #:allow-other-keys)
9125 (let ((file (assoc-ref inputs "file")))
9126 (substitute* "magic.py"
9127 (("ctypes.util.find_library\\('magic'\\)")
9128 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9129 #t)))
9130 (add-before 'install 'disable-egg-compression
9131 (lambda _
9132 (let ((port (open-file "setup.cfg" "a")))
9133 (display "\n[easy_install]\nzip_ok = 0\n"
9134 port)
9135 (close-port port)
9136 #t))))))
daeeea71
CM
9137 (native-inputs
9138 `(("python-setuptools" ,python-setuptools)))
9139 (inputs
9140 ;; python-magic needs to be able to find libmagic.so.
9141 `(("file" ,file)))
9142 (home-page "https://github.com/ahupp/python-magic")
9143 (synopsis "File type identification using libmagic")
9144 (description
9145 "This module uses ctypes to access the libmagic file type
9146identification library. It makes use of the local magic database and
9147supports both textual and MIME-type output. Note that this module and
9148the python-file module both provide a \"magic.py\" file; these two
9149modules, which are different and were developed separately, both serve
9150the same purpose: to provide Python bindings for libmagic.")
9151 (license license:expat)))
9152
9153(define-public python2-magic
9154 (package-with-python2 python-magic))
12af303f
CM
9155
9156(define-public python2-s3cmd
9157 (package
9158 (name "python2-s3cmd")
9159 (version "1.6.1")
9160 (source
9161 (origin
9162 (method url-fetch)
de67e922 9163 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9164 "s3cmd-" version ".tar.gz"))
9165 (sha256
9166 (base32
9167 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9168 (build-system python-build-system)
9169 (arguments
9170 ;; s3cmd is written for python2 only and contains no tests.
9171 `(#:python ,python-2
9172 #:tests? #f))
9173 (native-inputs
9174 `(("python2-setuptools" ,python2-setuptools)))
9175 (inputs
9176 `(("python2-dateutil" ,python2-dateutil)
9177 ;; The python-file package also provides a magic.py module.
9178 ;; This is an unfortunate state of affairs; however, s3cmd
9179 ;; fails to install if it cannot find specifically the
9180 ;; python-magic package. Thus we include it, instead of using
9181 ;; python-file. Ironically, s3cmd sometimes works better
9182 ;; without libmagic bindings at all:
9183 ;; https://github.com/s3tools/s3cmd/issues/198
9184 ("python2-magic" ,python2-magic)))
9185 (home-page "http://s3tools.org/s3cmd")
9186 (synopsis "Command line tool for S3-compatible storage services")
9187 (description
9188 "S3cmd is a command line tool for uploading, retrieving and managing data
9189in storage services that are compatible with the Amazon Simple Storage
9190Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9191GnuPG encryption, and more. It also supports management of Amazon's
9192CloudFront content delivery network.")
3f641af0 9193 (license license:gpl2+)))
4323a5f0
AE
9194
9195(define-public python-pkgconfig
9196 (package
9197 (name "python-pkgconfig")
9198 (version "1.1.0")
9199 (source
9200 (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "pkgconfig" version))
9203 (sha256
9204 (base32
9205 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9206 (build-system python-build-system)
9207 (native-inputs
9208 `(("python-nose" ,python-nose)
9209 ("python-setuptools" ,python-setuptools)))
9210 (inputs
9211 `(("pkg-config" ,pkg-config)))
9212 (arguments
9213 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9214 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9215 #:tests? #f
9216 ;; Prevent creation of the egg. This works around
9217 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9218 #:configure-flags '("--single-version-externally-managed" "--root=/")
9219 ;; Hard-code the path to pkg-config.
9220 #:phases
9221 (modify-phases %standard-phases
9222 (add-before
9223 'build 'patch
9224 (lambda _
9225 (substitute* "pkgconfig/pkgconfig.py"
9226 (("cmd = 'pkg-config")
9227 (string-append "cmd = '" (which "pkg-config"))))
9228 #t)))))
9229 (home-page "http://github.com/matze/pkgconfig")
9230 (synopsis "Python interface for pkg-config")
9231 (description "This module provides a Python interface to pkg-config. It
9232can be used to find all pkg-config packages, check if a package exists,
9233check if a package meets certain version requirements, query CFLAGS and
9234LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9235 (license license:expat)))
4323a5f0
AE
9236
9237(define-public python2-pkgconfig
9238 (package-with-python2 python-pkgconfig))
9239
2e697322
BW
9240(define-public python-bz2file
9241 (package
9242 (name "python-bz2file")
9243 (version "0.98")
9244 (source
9245 (origin
9246 (method url-fetch)
9247 (uri (pypi-uri "bz2file" version))
9248 (sha256
9249 (base32
9250 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9251 (build-system python-build-system)
9252 (arguments
124df723 9253 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9254 (home-page "https://github.com/nvawda/bz2file")
9255 (synopsis "Read and write bzip2-compressed files")
9256 (description
9257 "Bz2file is a Python library for reading and writing bzip2-compressed
9258files. It contains a drop-in replacement for the I/O interface in the
9259standard library's @code{bz2} module, including features from the latest
9260development version of CPython that are not available in older releases.")
3f641af0 9261 (license license:asl2.0)
2e697322
BW
9262 (properties `((python2-variant . ,(delay python2-bz2file))))))
9263
9264(define-public python2-bz2file
9265 (let ((base (package-with-python2
9266 (strip-python2-variant python-bz2file))))
9267 (package
9268 (inherit base)
9269 (native-inputs
124df723
BW
9270 `(("python2-setuptools" ,python2-setuptools)))
9271 (arguments
752bb447
BW
9272 `(#:python ,python-2
9273 #:phases
124df723
BW
9274 (modify-phases %standard-phases
9275 ;; 'python setup.py test' does not work as of 0.98.
9276 ;; There is only the one test file, so we run it directly.
9277 (replace 'check
9278 (lambda _ (zero? (system* "python"
9279 "test_bz2file.py"))))))))))
2e697322 9280
da4ac1aa
BW
9281(define-public python-future
9282 (package
9283 (name "python-future")
9284 (version "0.15.2")
9285 (source
9286 (origin
9287 (method url-fetch)
9288 (uri (pypi-uri "future" version))
9289 (sha256
9290 (base32
9291 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9292 (build-system python-build-system)
9293 ;; Many tests connect to the network or are otherwise flawed.
9294 ;; https://github.com/PythonCharmers/python-future/issues/210
9295 (arguments
9296 `(#:tests? #f))
9297 (home-page "http://python-future.org")
9298 (synopsis "Single-source support for Python 3 and 2")
9299 (description
9300 "@code{python-future} is the missing compatibility layer between Python 2 and
9301Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9302to support both Python 2 and Python 3 with minimal overhead.")
9303 (license license:expat)
9304 (properties `((python2-variant . ,(delay python2-future))))))
9305
9306(define-public python2-future
9307 (let ((base (package-with-python2
9308 (strip-python2-variant python-future))))
9309 (package
9310 (inherit base)
9311 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9312
8e451885
AE
9313(define-public python-cysignals
9314 (package
9315 (name "python-cysignals")
9316 (version "1.1.0")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9321 (sha256
9322 (base32
9323 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9324 (build-system python-build-system)
9325 (native-inputs
9326 `(("python-cython" ,python-cython)
9327 ("python-setuptools" ,python-setuptools)
9328 ("python-sphinx" ,python-sphinx)))
9329 (inputs
9330 `(("pari-gp" ,pari-gp)))
9331 (arguments
9332 `(#:modules ((guix build python-build-system)
9333 ((guix build gnu-build-system) #:prefix gnu:)
9334 (guix build utils))
9335 ;; FIXME: Tests are executed after installation and currently fail
9336 ;; when not installing into standard locations; the author is working
9337 ;; on a fix.
9338 #:tests? #f
9339 #:phases
9340 (modify-phases %standard-phases
9341 (add-before
9342 'build 'configure
9343 (assoc-ref gnu:%standard-phases 'configure)))))
9344 (home-page
9345 "https://github.com/sagemath/cysignals")
9346 (synopsis
9347 "Handling of interrupts and signals for Cython")
9348 (description
9349 "The cysignals package provides mechanisms to handle interrupts (and
9350other signals and errors) in Cython code, using two related approaches,
9351for mixed Cython/Python code or external C libraries and pure Cython code,
9352respectively.")
3f641af0 9353 (license license:lgpl3+)))
8e451885
AE
9354
9355(define-public python2-cysignals
9356 (package-with-python2 python-cysignals))
9357
63bcec71
DM
9358(define-public python2-shedskin
9359 (package
9360 (name "python2-shedskin")
9361 (version "0.9.4")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (string-append "https://github.com/shedskin/shedskin/"
9366 "releases/download/v" version
9367 "/shedskin-" version ".tgz"))
9368 (sha256
9369 (base32
9370 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9371 (build-system python-build-system)
9372 (arguments
9373 `(#:python ,python-2
9374 #:phases (modify-phases %standard-phases
9375 (add-after 'unpack 'fix-resulting-include-libs
9376 (lambda* (#:key inputs #:allow-other-keys)
9377 (let ((libgc (assoc-ref inputs "libgc"))
9378 (pcre (assoc-ref inputs "pcre")))
9379 (substitute* "shedskin/makefile.py"
9380 (("variable == 'CCFLAGS':[ ]*")
9381 (string-append "variable == 'CCFLAGS':\n"
9382 " line += ' -I " pcre "/include"
9383 " -I " libgc "/include'"))
9384 (("variable == 'LFLAGS':[ ]*")
9385 (string-append "variable == 'LFLAGS':\n"
9386 " line += ' -L" pcre "/lib"
9387 " -L " libgc "/lib'")))
9388 #t))))))
9389 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9390 (inputs `(("pcre" ,pcre)
9391 ("libgc" ,libgc)))
9392 (home-page "https://shedskin.github.io/")
9393 (synopsis "Experimental Python-2 to C++ Compiler")
9394 (description (string-append "This is an experimental compiler for a subset of
9395Python. It generates C++ code and a Makefile."))
3f641af0 9396 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9397
9398(define-public python2-rope
9399 (package
9400 (name "python2-rope")
9401 (version "0.10.3")
9402 (source
9403 (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "rope" version))
9406 (sha256
9407 (base32
9408 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9409 (arguments
9410 ;; Rope is currently python-2 only.
9411 ;; https://github.com/python-rope/rope/issues/57
9412 `(#:python ,python-2))
9413 (build-system python-build-system)
9414 (native-inputs
9415 `(("python2-unittest2" ,python2-unittest2)
9416 ("python2-setuptools" ,python2-setuptools)))
9417 (home-page "https://github.com/python-rope/rope")
9418 (synopsis "Refactoring library for Python")
9419 (description "Rope is a refactoring library for Python. It facilitates
9420the renaming, moving and extracting of attributes, functions, modules, fields
9421and parameters in Python 2 source code. These refactorings can also be applied
9422to occurences in strings and comments.")
3f641af0 9423 (license license:gpl2)))
6ba8ca17
9424
9425(define-public python-py3status
9426 (package
9427 (name "python-py3status")
d2262d70 9428 (version "3.1")
6ba8ca17
9429 (source
9430 (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "py3status" version))
9433 (sha256
9434 (base32
d2262d70 9435 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
9436 (build-system python-build-system)
9437 (native-inputs
9438 `(("python-setuptools" ,python-setuptools)))
9439 (home-page "https://github.com/ultrabug/py3status")
9440 (synopsis "Extensible i3status wrapper written in Python")
9441 (description "py3status is an i3status wrapper which extends i3status
9442functionality in a modular way, allowing you to extend your panel with your
9443own code, responding to click events and updating clock every second.")
3f641af0 9444 (license license:bsd-3)))
b8fdbca3
HG
9445
9446(define-public python-tblib
9447 (package
9448 (name "python-tblib")
9449 (version "1.3.0")
9450 (source (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "tblib" version))
9453 (sha256 (base32
9454 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9455 (build-system python-build-system)
9456 (arguments
9457 `(#:phases
9458 (modify-phases %standard-phases
9459 (replace 'check
9460 (lambda _
9461 ;; Upstream runs tests after installation and the package itself
9462 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9463 ;; found.
9464 (setenv "PYTHONPATH"
9465 (string-append (getcwd) "/build/lib:"
9466 (getenv "PYTHONPATH")))
9467 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9468 (native-inputs
9469 `(("python-pytest" ,python-pytest)
9470 ("python-setuptools" ,python-setuptools)
9471 ("python-six" ,python-six)))
9472 (home-page "https://github.com/ionelmc/python-tblib")
9473 (synopsis "Traceback serialization library")
9474 (description
9475 "Traceback serialization allows you to:
9476
9477@enumerate
9478@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9479different processes. This allows better error handling when running code over
9480multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9481
9482@item Parse traceback strings and raise with the parsed tracebacks.
9483@end itemize")
3f641af0 9484 (license license:bsd-3)))
b8fdbca3
HG
9485
9486(define-public python2-tblib
9487 (package-with-python2 python-tblib))
1a024de4
HG
9488
9489(define-public python-sqlparse
9490 (package
9491 (name "python-sqlparse")
9492 (version "0.1.19")
9493 (source (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "sqlparse" version))
9496 (sha256
9497 (base32
9498 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9499 (build-system python-build-system)
9500 (arguments
9501 `(#:phases
9502 (modify-phases %standard-phases
9503 (replace 'check
9504 (lambda* _
9505 ;; setup.py-integrated 2to3 only affects the build files, but
9506 ;; py.test is using the source files. So we need to convert them
9507 ;; manually.
9508 (when (zero? (system* "python3"))
9509 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9510 (zero? (system* "py.test")))))))
9511 (native-inputs
9512 `(("python-pytest" ,python-pytest)
9513 ("python-setuptools" ,python-setuptools)))
9514 (home-page "https://github.com/andialbrecht/sqlparse")
9515 (synopsis "Non-validating SQL parser")
9516 (description "Sqlparse is a non-validating SQL parser for Python. It
9517provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9518 (license license:bsd-3)))
1a024de4
HG
9519
9520(define-public python2-sqlparse
9521 (package-with-python2 python-sqlparse))
68b9d242
SB
9522
9523(define-public python-greenlet
9524 (package
9525 (name "python-greenlet")
9526 (version "0.4.9")
9527 (source (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "greenlet" version))
9530 (sha256
9531 (base32
9532 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9533 (build-system python-build-system)
9534 (native-inputs
9535 `(("python-setuptools" ,python-setuptools)))
9536 (home-page "https://greenlet.readthedocs.io/")
9537 (synopsis "Lightweight in-process concurrent programming")
9538 (description
9539 "Greenlet package is a spin-off of Stackless, a version of CPython
9540that supports micro-threads called \"tasklets\". Tasklets run
9541pseudo-concurrently (typically in a single or a few OS-level threads) and
9542are synchronized with data exchanges on \"channels\".")
3f641af0 9543 (license (list license:psfl license:expat))))
68b9d242
SB
9544
9545(define-public python2-greenlet
9546 (package-with-python2 python-greenlet))
d79a343b
SB
9547
9548(define-public python-gevent
9549 (package
9550 (name "python-gevent")
9551 (version "1.1.1")
9552 (source (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "gevent" version))
9555 (sha256
9556 (base32
9557 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9558 (modules '((guix build utils)))
9559 (snippet
9560 '(begin
9561 ;; unbunding libev and c-ares
9562 (for-each delete-file-recursively '("libev" "c-ares"))
9563 ;; fixing testsuite
9564 (call-with-output-file "greentest/__init__.py" noop)
9565 (substitute* "greentest/testrunner.py"
9566 (("import util") "from . import util")
9567 (("from util import log") "from .util import log"))))))
9568 (build-system python-build-system)
9569 (propagated-inputs
9570 `(("python-greenlet" ,python-greenlet)))
9571 (native-inputs
9572 `(("python-setuptools" ,python-setuptools)
9573 ("python-six" ,python-six)))
9574 (inputs
9575 `(("c-ares" ,c-ares)
9576 ("libev" ,libev)))
9577 (home-page "http://www.gevent.org/")
9578 (synopsis "Coroutine-based network library")
9579 (description
9580 "gevent is a coroutine-based Python networking library that uses greenlet
9581to provide a high-level synchronous API on top of the libev event loop.")
9582 (license license:expat)))
9583
9584(define-public python2-gevent
9585 (package-with-python2 python-gevent))
da3aeeb6
SB
9586
9587(define-public python-twisted
9588 (package
9589 (name "python-twisted")
9590 (version "16.2.0")
9591 (source (origin
9592 (method url-fetch)
8ea8e8d3 9593 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9594 (sha256
9595 (base32
9596 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9597 (build-system python-build-system)
9598 (native-inputs
45912170
SB
9599 `(("python-setuptools" ,python-setuptools)))
9600 (propagated-inputs
9601 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9602 (home-page "https://twistedmatrix.com/")
9603 (synopsis "Asynchronous networking framework written in Python")
9604 (description
9605 "Twisted is an extensible framework for Python programming, with special
9606focus on event-based network programming and multiprotocol integration.")
9607 (license license:expat)))
9608
9609(define-public python2-twisted
9610 (package-with-python2 python-twisted))
d0b6fed6 9611
4d3fa5a4
EF
9612(define-public python-pika
9613 (package
9614 (name "python-pika")
9615 (version "0.10.0")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "pika" version))
9620 (sha256
9621 (base32
9622 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9623 (build-system python-build-system)
9624 (native-inputs
9625 `(("python-twisted" ,python-twisted)))
9626 (home-page "https://pika.readthedocs.org")
9627 (synopsis "Pure Python AMQP Client Library")
9628 (description
9629 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9630Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9631network support library.")
9632 (license license:bsd-3)))
9633
9634(define-public python2-pika
9635 (package-with-python2 python-pika))
9636
d0b6fed6
DM
9637(define-public python-ply
9638 (package
9639 (name "python-ply")
9640 (version "3.8")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (string-append
9645 "https://pypi.python.org/packages/"
9646 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9647 "/ply-" version ".tar.gz"))
9648 (sha256
9649 (base32
9650 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9651 (build-system python-build-system)
9652 (home-page "http://www.dabeaz.com/ply/")
9653 (synopsis "Python Lex & Yacc")
9654 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9655It uses LR parsing and does extensive error checking.")
3f641af0 9656 (license license:bsd-3)
d0b6fed6
DM
9657 (properties `((python2-variant . ,(delay python2-ply))))))
9658
9659(define-public python2-ply
9660 (package
9661 (inherit (package-with-python2
9662 (strip-python2-variant python-ply)))
9663 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9664
9665(define-public python-tabulate
9666 (package
9667 (name "python-tabulate")
9668 (version "0.7.5")
9669 (source (origin
9670 (method url-fetch)
9671 (uri (pypi-uri "tabulate" version))
9672 (sha256
9673 (base32
9674 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9675 ;; Fix tests
9676 (modules '((guix build utils)))
9677 (snippet '(substitute* '("test/test_cli.py"
9678 "test/test_input.py"
9679 "test/test_output.py"
9680 "test/test_regression.py")
9681 (("from common") "from nose.tools")))))
9682 (build-system python-build-system)
9683 (native-inputs
9684 `(("python-setuptools" ,python-setuptools)
9685 ;; For testing
9686 ("python-nose" ,python-nose)))
9687 (home-page "https://bitbucket.org/astanin/python-tabulate")
9688 (synopsis "Pretty-print tabular data")
9689 (description
9690 "Tabulate is a library and command-line utility to pretty-print tabular
9691data in Python.")
9692 (license license:expat)))
9693
9694(define-public python2-tabulate
9695 (package-with-python2 python-tabulate))
1c4c8a33
SB
9696
9697(define-public python-kazoo
9698 (package
9699 (name "python-kazoo")
9700 (version "2.2.1")
9701 (source
9702 (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "kazoo" version))
9705 (sha256
9706 (base32
9707 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9708 (build-system python-build-system)
9709 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9710 (native-inputs
c18899e8
SB
9711 `(("python-setuptools" ,python-setuptools)))
9712 (propagated-inputs
9713 `(("python-six" ,python-six)))
1c4c8a33
SB
9714 (home-page "https://kazoo.readthedocs.org")
9715 (synopsis "High-level Zookeeper client library")
9716 (description
9717 "Kazoo is a Python client library for the Apache Zookeeper distributed
9718application service. It is designed to be easy to use and to avoid common
9719programming errors.")
3f641af0 9720 (license license:asl2.0)))
1c4c8a33
SB
9721
9722(define-public python2-kazoo
9723 (package-with-python2 python-kazoo))
45dda35e
SB
9724
9725(define-public python-pykafka
9726 (package
9727 (name "python-pykafka")
9728 (version "2.4.0")
9729 (source (origin
9730 (method url-fetch)
c6bccf71
EF
9731 (uri (string-append
9732 "https://pypi.python.org/packages/8b/3e/"
9733 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9734 "pykafka-" version ".tar.gz"))
45dda35e
SB
9735 (sha256
9736 (base32
9737 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9738 (build-system python-build-system)
9739 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9740 (native-inputs
c8fa3d9b
SB
9741 `(("python-setuptools" ,python-setuptools)))
9742 (propagated-inputs
45dda35e
SB
9743 `(("python-gevent" ,python-gevent)
9744 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9745 ("python-tabulate" ,python-tabulate)))
9746 (inputs
9747 `(("librdkafka" ,librdkafka)))
9748 (home-page "https://pykafka.readthedocs.io/")
9749 (synopsis "Apache Kafka client for Python")
9750 (description
9751 "PyKafka is a client for the Apache Kafka distributed messaging system.
9752It includes Python implementations of Kafka producers and consumers, which
9753are optionally backed by a C extension built on librdkafka.")
3f641af0 9754 (license license:asl2.0)))
45dda35e
SB
9755
9756(define-public python2-pykafka
9757 (package-with-python2 python-pykafka))
a44fd439
DM
9758
9759(define-public python-wcwidth
9760 (package
9761 (name "python-wcwidth")
9762 (version "0.1.6")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (string-append
9767 "https://pypi.python.org/packages/"
9768 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9769 "wcwidth-" version ".tar.gz"))
9770 (sha256
9771 (base32
9772 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9773 (build-system python-build-system)
9774 (home-page "https://github.com/jquast/wcwidth")
66e07664 9775 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9776 (description "Wcwidth measures the number of terminal column cells of
9777wide-character codes. It is useful for those implementing a terminal emulator,
9778or programs that carefully produce output to be interpreted by one. It is a
9779Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9780specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
9781 (license license:expat)
9782 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
9783
9784(define-public python2-wcwidth
9785 (package
9786 (inherit (package-with-python2
9787 (strip-python2-variant python-wcwidth)))
9788 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
9789
9790(define-public python2-jsonrpclib
9791 (package
9792 (name "python2-jsonrpclib")
9793 (version "0.1.7")
9794 (source (origin
9795 (method url-fetch)
9796 (uri (string-append
9797 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9798 "jsonrpclib-" version ".tar.gz"))
9799 (sha256
9800 (base32
9801 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9802 (build-system python-build-system)
9803 (native-inputs
9804 `(("python2-setuptools" ,python2-setuptools)))
9805 (arguments
9806 `(#:tests? #f
9807 #:python ,python-2))
9808 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9809 (synopsis "Implementation of JSON-RPC specification for Python")
9810 (description
9811 "This library is an implementation of the JSON-RPC specification.
9812It supports both the original 1.0 specification, as well as the
9813new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9814etc.")
3f641af0 9815 (license license:asl2.0)))
9250b0f3
SB
9816
9817(define-public python-chai
9818 (package
9819 (name "python-chai")
9820 (version "1.1.1")
9821 (source (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "chai" version))
9824 (sha256
9825 (base32
9826 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9827 (build-system python-build-system)
9828 (native-inputs
9829 `(("python-setuptools" ,python-setuptools)))
9830 (home-page "https://github.com/agoragames/chai")
9831 (synopsis "Mocking framework for Python")
9832 (description
9833 "Chai provides an api for mocking, stubbing and spying your python
9834objects, patterned after the Mocha library for Ruby.")
3f641af0 9835 (license license:bsd-3)))
9250b0f3
SB
9836
9837(define-public python2-chai
9838 (package-with-python2 python-chai))
9839
ae43baa8
SB
9840(define-public python-arrow
9841 (package
9842 (name "python-arrow")
9843 (version "0.8.0")
9844 (source (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "arrow" version))
9847 (sha256
9848 (base32
9849 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9850 (build-system python-build-system)
9851 (native-inputs
9852 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
9853 ;; For testing
9854 ("python-chai" ,python-chai)
9855 ("python-simplejson" ,python-simplejson)))
36aed736
SB
9856 (propagated-inputs
9857 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
9858 (home-page "https://github.com/crsmithdev/arrow/")
9859 (synopsis "Dates and times for Python")
9860 (description
9861 "Arrow is a Python library to creating, manipulating, formatting and
9862converting dates, times, and timestamps. It implements and updates the
9863datetime type.")
3f641af0 9864 (license license:asl2.0)))
ae43baa8
SB
9865
9866(define-public python2-arrow
9867 (package-with-python2 python-arrow))
9868
1f2b62a4
SB
9869(define-public python-inflection
9870 (package
9871 (name "python-inflection")
9872 (version "0.3.1")
9873 (source
9874 (origin (method url-fetch)
9875 (uri (pypi-uri "inflection" version))
9876 (sha256
9877 (base32
9878 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9879 (build-system python-build-system)
9880 (native-inputs
9881 `(("python-setuptools" ,python-setuptools)))
9882 (home-page "http://github.com/jpvanhal/inflection")
9883 (synopsis "Python string transformation library")
9884 (description
9885 "Inflection is a string transformation library. It singularizes
9886and pluralizes English words, and transforms strings from CamelCase to
9887underscored string.")
9888 (license license:expat)))
9889
9890(define-public python2-inflection
9891 (package-with-python2 python-inflection))
9892
18995566
SB
9893(define-public python-pylev
9894 (package
9895 (name "python-pylev")
9896 (version "1.3.0")
9897 (source (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "pylev" version))
9900 (sha256
9901 (base32
9902 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9903 (build-system python-build-system)
9904 (native-inputs
9905 `(("python-setuptools" ,python-setuptools)))
9906 (home-page "http://github.com/toastdriven/pylev")
9907 (synopsis "Levenshtein distance implementation in Python")
9908 (description "Pure Python Levenshtein implementation, based off the
9909Wikipedia code samples at
9910@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 9911 (license license:bsd-3)))
18995566
SB
9912
9913(define-public python2-pylev
9914 (package-with-python2 python-pylev))
9915
f5deff7a
SB
9916(define-public python-cleo
9917 (package
9918 (name "python-cleo")
9919 (version "0.4.1")
9920 (source (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "cleo" version))
9923 (sha256
9924 (base32
9925 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9926 (build-system python-build-system)
9927 (native-inputs
9403150a 9928 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
9929 ;; For testing
9930 ("python-mock" ,python-mock)
9931 ("python-pytest" ,python-pytest)))
9403150a
SB
9932 (propagated-inputs
9933 `(("python-psutil" ,python-psutil)
9934 ("python-pylev" ,python-pylev)))
f5deff7a
SB
9935 (home-page "https://github.com/sdispater/cleo")
9936 (synopsis "Command-line arguments library for Python")
9937 (description
9938 "Cleo allows you to create command-line commands with signature in
9939docstring and colored output.")
9940 (license license:expat)))
9941
9942(define-public python2-cleo
9943 (package-with-python2 python-cleo))
9944
77cadb43
SB
9945(define-public python-lazy-object-proxy
9946 (package
9947 (name "python-lazy-object-proxy")
9948 (version "1.2.2")
9949 (source (origin
9950 (method url-fetch)
9951 (uri (pypi-uri "lazy-object-proxy" version))
9952 (sha256
9953 (base32
9954 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9955 (build-system python-build-system)
9956 (native-inputs
9957 `(("python-setuptools" ,python-setuptools)))
9958 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9959 (synopsis "Lazy object proxy for python")
9960 (description
9961 "Lazy object proxy is an object that wraps a callable but defers the call
9962until the object is actually required, and caches the result of said call.")
3f641af0 9963 (license license:bsd-2)))
77cadb43
SB
9964
9965(define-public python2-lazy-object-proxy
9966 (package-with-python2 python-lazy-object-proxy))
9967
5477e05f
SB
9968(define-public python-dnspython
9969 (package
9970 (name "python-dnspython")
6c514128 9971 (version "1.15.0")
5477e05f
SB
9972 (source (origin
9973 (method url-fetch)
9974 (uri (string-append "http://www.dnspython.org/kits/"
9975 version "/dnspython-" version ".tar.gz"))
9976 (sha256
9977 (base32
6c514128 9978 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
9979 (build-system python-build-system)
9980 (arguments '(#:tests? #f)) ; XXX: requires internet access
9981 (native-inputs
9982 `(("python-setuptools" ,python-setuptools)))
9983 (home-page "http://www.dnspython.org")
9984 (synopsis "DNS toolkit for Python")
9985 (description
9986 "dnspython is a DNS toolkit for Python. It supports almost all record
9987types. It can be used for queries, zone transfers, and dynamic updates.
9988It supports TSIG authenticated messages and EDNS0.")
9989 (license license:expat)))
9990
9991(define-public python2-dnspython
9992 (package-with-python2 python-dnspython))
9993
22711e25
SB
9994(define-public python-email-validator
9995 (package
9996 (name "python-email-validator")
9997 (version "1.0.1")
9998 (source
9999 (origin (method url-fetch)
10000 (uri (pypi-uri "email_validator" version))
10001 (sha256
10002 (base32
10003 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10004 (build-system python-build-system)
10005 (arguments
10006 '(#:phases
10007 (modify-phases %standard-phases
10008 (add-before 'build 'use-dnspython
10009 (lambda _
10010 (substitute* "setup.py"
10011 (("dnspython3") "dnspython"))
10012 #t)))))
10013 (native-inputs
d42560bd
SB
10014 `(("python-setuptools" ,python-setuptools)))
10015 (propagated-inputs
22711e25 10016 `(("python-dnspython" ,python-dnspython)
d42560bd 10017 ("python-idna" ,python-idna)))
22711e25
SB
10018 (home-page "https://github.com/JoshData/python-email-validator")
10019 (synopsis "Email address validation library for Python")
10020 (description
10021 "This library validates email address syntax and deliverability.")
3f641af0 10022 (license license:cc0)))
22711e25
SB
10023
10024(define-public python2-email-validator
10025 (package-with-python2 python-email-validator))
10026
8987d91e
SB
10027(define-public python-ukpostcodeparser
10028 (package
10029 (name "python-ukpostcodeparser")
10030 (version "1.0.3")
10031 (source (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "UkPostcodeParser" version))
10034 (sha256
10035 (base32
10036 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10037 (build-system python-build-system)
10038 (native-inputs
10039 `(("python-setuptools" ,python-setuptools)))
10040 (home-page "https://github.com/hamstah/ukpostcodeparser")
10041 (synopsis "UK Postcode parser for Python")
10042 (description
10043 "This library provides the @code{parse_uk_postcode} function for
10044parsing UK postcodes.")
10045 (license license:expat)))
10046
10047(define-public python2-ukpostcodeparser
10048 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10049
10050(define-public python-fake-factory
10051 (package
10052 (name "python-fake-factory")
7adc698f 10053 (version "0.7.2")
ea92ae01
SB
10054 (source (origin
10055 (method url-fetch)
10056 (uri (pypi-uri "fake-factory" version))
10057 (sha256
10058 (base32
7adc698f 10059 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10060 (build-system python-build-system)
ea92ae01 10061 (native-inputs
bbcd7297 10062 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
10063 ;; For testing
10064 ("python-email-validator" ,python-email-validator)
10065 ("python-mock" ,python-mock)
10066 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10067 (propagated-inputs
10068 `(("python-dateutil" ,python-dateutil-2)
10069 ("python-six" ,python-six)))
7adc698f 10070 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10071 (synopsis "Python package that generates fake data")
10072 (description
10073 "Faker is a Python package that generates fake data such as names,
10074addresses, and phone numbers.")
10075 (license license:expat)
10076 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10077
10078(define-public python2-fake-factory
10079 (let ((base (package-with-python2 (strip-python2-variant
10080 python-fake-factory))))
10081 (package
10082 (inherit base)
24c9aa18 10083 (propagated-inputs
ea92ae01 10084 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10085 ,@(package-propagated-inputs base))))))
ea92ae01 10086
b49504fd
SB
10087(define-public python-pyaml
10088 (package
10089 (name "python-pyaml")
10090 (version "15.8.2")
10091 (source (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "pyaml" version))
10094 (sha256
10095 (base32
10096 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10097 (build-system python-build-system)
10098 (native-inputs
10099 `(("python-setuptools" ,python-setuptools)))
10100 (propagated-inputs
10101 `(("python-pyyaml" ,python-pyyaml)))
10102 (home-page "https://github.com/mk-fg/pretty-yaml")
10103 (synopsis "YAML pretty-print library for Python")
10104 (description
10105 "pyaml is a PyYAML based python module to produce pretty and readable
10106YAML-serialized data.")
3f641af0 10107 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10108
10109(define-public python2-pyaml
10110 (package-with-python2 python-pyaml))
10111
347175a2
SB
10112(define-public python-flexmock
10113 (package
10114 (name "python-flexmock")
10115 (version "0.10.2")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "flexmock" version))
10119 (sha256
10120 (base32
10121 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10122 (build-system python-build-system)
10123 (native-inputs
10124 `(("python-setuptools" ,python-setuptools)))
10125 (home-page "https://flexmock.readthedocs.org")
10126 (synopsis "Testing library for Python")
10127 (description
10128 "flexmock is a testing library for Python that makes it easy to create
10129mocks, stubs and fakes.")
3f641af0 10130 (license license:bsd-3)))
347175a2
SB
10131
10132(define-public python2-flexmock
10133 (package-with-python2 python-flexmock))
10134
5a744191
SB
10135(define-public python-orator
10136 (package
10137 (name "python-orator")
10138 (version "0.8.2")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "orator" version))
10142 (sha256
10143 (base32
10144 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10145 (build-system python-build-system)
10146 (arguments '(#:tests? #f)) ; no tests
10147 (native-inputs
b2676030
SB
10148 `(("python-setuptools" ,python-setuptools)))
10149 (propagated-inputs
5a744191
SB
10150 `(("python-arrow" ,python-arrow)
10151 ("python-blinker" ,python-blinker)
10152 ("python-cleo" ,python-cleo)
10153 ("python-fake-factory" ,python-fake-factory)
10154 ("python-inflection" ,python-inflection)
10155 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10156 ("python-pyaml" ,python-pyaml)
5a744191
SB
10157 ("python-simplejson" ,python-simplejson)
10158 ("python-wrapt" ,python-wrapt)))
10159 (home-page "https://orator-orm.com/")
10160 (synopsis "ActiveRecord ORM for Python")
10161 (description
10162 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10163implementation for Python.")
10164 (license license:expat)
10165 (properties `((python2-variant . ,(delay python2-orator))))))
10166
10167(define-public python2-orator
10168 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10169 (package
10170 (inherit base)
06961617 10171 (propagated-inputs
5a744191 10172 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10173 ,@(package-propagated-inputs base))))))
f4155188
DM
10174
10175(define-public python-prompt-toolkit
10176 (package
10177 (name "python-prompt-toolkit")
d15e2ef0 10178 (version "1.0.7")
f4155188
DM
10179 (source
10180 (origin
10181 (method url-fetch)
d15e2ef0 10182 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10183 (sha256
10184 (base32
d15e2ef0 10185 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188
DM
10186 (build-system python-build-system)
10187 (inputs `(("python-wcwidth" ,python-wcwidth)
10188 ("python-pygments" ,python-pygments)))
10189 (native-inputs `(("python-six" ,python-six)))
10190 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10191 (synopsis "Library for building command line interfaces in Python")
10192 (description
10193 "Prompt-Toolkit is a library for building interactive command line
10194interfaces in Python. It's like GNU Readline but it also features syntax
10195highlighting while typing, out-of-the-box multi-line input editing, advanced
10196code completion, incremental search, support for Chinese double-width
10197characters, mouse support, and auto suggestions.")
3f641af0 10198 (license license:bsd-3)
f4155188
DM
10199 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10200
10201(define-public python2-prompt-toolkit
10202 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10203 (package
10204 (inherit base)
10205 (native-inputs
10206 `(("python2-setuptools" ,python2-setuptools)
10207 ,@(package-native-inputs base))))))
a502dfbf
DM
10208
10209(define-public python-jedi
10210 (package
10211 (name "python-jedi")
10212 (version "0.9.0")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "jedi" version))
10217 (sha256
10218 (base32
10219 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10220 (build-system python-build-system)
10221 (home-page "https://github.com/davidhalter/jedi")
10222 (synopsis
10223 "Autocompletion for Python that can be used for text editors")
10224 (description
10225 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10226 (license license:expat)
10227 (properties `((python2-variant . ,(delay python2-jedi))))))
10228
10229(define-public python2-jedi
10230 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10231 (package
10232 (inherit base)
10233 (native-inputs
10234 `(("python2-setuptools" ,python2-setuptools)
10235 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10236
10237(define-public ptpython
10238 (package
10239 (name "ptpython")
10240 (version "0.34")
10241 (source (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "ptpython" version))
10244 (sha256
10245 (base32
10246 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10247 (build-system python-build-system)
10248 (inputs
10249 `(("python-docopt" ,python-docopt)
10250 ("python-jedi" ,python-jedi)
10251 ("python-prompt-toolkit" ,python-prompt-toolkit)
10252 ("python-pygments" ,python-pygments)
10253 ("python-setuptools" ,python-setuptools)))
10254 (home-page "https://github.com/jonathanslenders/ptpython")
10255 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10256 (description
10257 "ptpython is a Python read-eval-print loop with IDE-like features.
10258It supports syntax highlighting, multiline editing, autocompletion, mouse,
10259color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10260etc.")
3f641af0 10261 (license license:bsd-3)
c2f0dc6e
DM
10262 (properties `((python2-variant . ,(delay ptpython-2))))))
10263
10264(define-public ptpython-2
10265 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10266 (package
10267 (inherit base)
10268 (name "ptpython2"))))
b227f0be 10269
b04a52a6
DJ
10270(define-public python-requests-oauthlib
10271 (package
10272 (name "python-requests-oauthlib")
10273 (version "0.6.2")
10274 (source
10275 (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "requests-oauthlib" version))
10278 (sha256
10279 (base32
10280 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10281 (build-system python-build-system)
10282 (arguments
10283 `(#:phases
10284 (modify-phases %standard-phases
10285 ;; removes tests that require network access
10286 (add-before 'check 'pre-check
10287 (lambda _
10288 (delete-file "tests/test_core.py")
10289 #t)))))
10290 (native-inputs
10291 `(("python-requests-mock" ,python-requests-mock)
10292 ("python-mock" ,python-mock)))
10293 (inputs
10294 `(("python-oauthlib" ,python-oauthlib)
10295 ("python-requests" ,python-requests)))
10296 (home-page
10297 "https://github.com/requests/requests-oauthlib")
10298 (synopsis
10299 "OAuthlib authentication support for Requests")
10300 (description
10301 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10302provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10303 (license license:isc)
10304 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10305
10306(define-public python2-requests-oauthlib
10307 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10308 (package
10309 (inherit base)
10310 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10311 ,@(package-native-inputs base))))))
10312
b227f0be 10313(define-public python-stem
10314 (package
10315 (name "python-stem")
10316 (version "1.4.1b")
10317 (source
10318 (origin
10319 (method url-fetch)
10320 (uri (pypi-uri "stem" version ".tar.bz2"))
10321 (sha256
10322 (base32
10323 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10324 (build-system python-build-system)
10325 (arguments
10326 `(#:phases
10327 (modify-phases %standard-phases
10328 (replace 'check
10329 (lambda _
10330 (zero? (system* "./run_tests.py" "--unit")))))))
10331 (native-inputs
10332 `(("python-mock" ,python-mock)
10333 ("python-pep8" ,python-pep8)
10334 ("python-pyflakes" ,python-pyflakes)))
10335 (inputs
10336 `(("python-pycrypto" ,python-pycrypto)))
10337 (home-page "https://stem.torproject.org/")
10338 (synopsis
10339 "Python controller library that allows applications to interact with Tor")
10340 (description
10341 "Stem is a Python controller library for Tor. With it you can use Tor's
10342control protocol to script against the Tor process and read descriptor data
10343relays publish about themselves.")
3f641af0 10344 (license license:lgpl3)))
b227f0be 10345
10346(define-public python2-stem
10347 (package-with-python2 python-stem))
517a6c0c
DM
10348
10349(define-public python-pyserial
10350 (package
10351 (name "python-pyserial")
10352 (version "3.1.1")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "pyserial" version))
10357 (sha256
10358 (base32
10359 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10360 (build-system python-build-system)
10361 (home-page
10362 "https://github.com/pyserial/pyserial")
10363 (synopsis "Python Serial Port Bindings")
10364 (description "@code{pyserial} provide serial port bindings for Python. It
10365supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10366and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10367 (license license:bsd-3)
517a6c0c
DM
10368 (properties `((python2-variant . ,(delay python2-pyserial))))))
10369
10370(define-public python2-pyserial
10371 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10372 (package
10373 (inherit base)
10374 (native-inputs
10375 `(("python2-setuptools" ,python2-setuptools)
10376 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10377
10378(define-public python-kivy
10379 (package
10380 (name "python-kivy")
10381 (version "1.9.1")
10382 (source
10383 (origin
10384 (method url-fetch)
10385 (uri (pypi-uri "kivy" version))
10386 (file-name (string-append name "-" version ".tar.gz"))
10387 (sha256
10388 (base32
10389 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10390 (build-system python-build-system)
10391 (arguments
10392 `(#:tests? #f ; Tests require many optional packages
10393 #:phases
10394 (modify-phases %standard-phases
10395 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10396 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10397 (lambda* (#:key inputs #:allow-other-keys)
10398 (setenv "KIVY_SDL2_PATH"
10399 (string-append (assoc-ref inputs "sdl-union")
10400 "/include/SDL2"))
10401 #t)))))
10402 (native-inputs
10403 `(("pkg-config" ,pkg-config)))
10404 (inputs
10405 `(("python-cython" ,python-cython)
10406 ("gstreamer" ,gstreamer)
10407 ("mesa" ,mesa)
10408 ("sdl-union"
10409 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10410 (home-page "http://kivy.org")
10411 (synopsis
10412 "Multitouch application framework")
10413 (description
10414 "A software library for rapid development of
10415hardware-accelerated multitouch applications.")
10416 (license license:expat)))
10417
10418(define-public python2-kivy
10419 (package-with-python2 python-kivy))
10420
10421(define-public python-kivy-next
10422 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10423 (revision "1"))
10424 (package (inherit python-kivy)
10425 (name "python-kivy-next")
d80a71eb 10426 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10427 (string-take commit 7)))
10428 (source
10429 (origin
10430 (method git-fetch)
10431 (uri (git-reference
10432 (url "https://github.com/kivy/kivy")
10433 (commit commit)))
10434 (file-name (string-append name "-" version "-checkout"))
10435 (sha256
10436 (base32
10437 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10438
10439(define-public python2-kivy-next
10440 (package-with-python2 python-kivy-next))
8794bd8b
DC
10441
10442(define-public python-binaryornot
10443 (package
10444 (name "python-binaryornot")
10445 (version "0.4.0")
10446 (source (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "binaryornot" version))
10449 (sha256
10450 (base32
10451 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10452 (build-system python-build-system)
10453 (inputs
10454 `(("python-chardet" ,python-chardet)
10455 ("python-hypothesis" ,python-hypothesis)))
10456 (home-page "https://github.com/audreyr/binaryornot")
10457 (synopsis "Package to check if a file is binary or text")
10458 (description "Ultra-lightweight pure Python package to check if a file is
10459binary or text.")
10460 (license license:bsd-3)
10461 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10462
10463(define-public python2-binaryornot
10464 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10465 (package (inherit base)
10466 (native-inputs
10467 `(("python2-setuptools" ,python2-setuptools)
10468 ,@(package-native-inputs base)))
10469 (inputs
10470 `(("python2-enum34" ,python2-enum34)
10471 ,@(package-inputs base))))))
a9ac982a
DC
10472
10473(define-public python-nltk
10474 (package
10475 (name "python-nltk")
10476 (version "3.2.1")
10477 (source (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "nltk" version))
10480 (sha256
10481 (base32
10482 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10483 (build-system python-build-system)
10484 (home-page "http://nltk.org/")
10485 (synopsis "Natural Language Toolkit")
10486 (description "It provides interfaces to over 50 corpora and lexical
10487resources such as WordNet, along with a suite of text processing libraries
10488for classification, tokenization, stemming, tagging, parsing, and semantic
10489reasoning, wrappers for natural language processing libraries.")
10490 (license license:asl2.0)
10491 (properties `((python2-variant . ,(delay python2-nltk))))))
10492
10493(define-public python2-nltk
10494 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10495 (package (inherit base)
10496 (native-inputs
10497 `(("python2-setuptools" ,python2-setuptools)
10498 ,@(package-native-inputs base))))))
691cd90d
DC
10499
10500(define-public python-pymongo
10501 (package
10502 (name "python-pymongo")
10503 (version "3.3.0")
10504 (source (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "pymongo" version))
10507 (sha256
10508 (base32
10509 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10510 (build-system python-build-system)
10511 (inputs
10512 `(("python-certifi" ,python-certifi)))
10513 (home-page "http://github.com/mongodb/mongo-python-driver")
10514 (synopsis "Python driver for MongoDB")
10515 (description "Python driver for MongoDB.")
10516 (license license:asl2.0)
10517 (properties `((python2-variant . ,(delay python2-pymongo))))))
10518
10519(define-public python2-pymongo
10520 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10521 (package (inherit base)
10522 (native-inputs
10523 `(("python2-setuptools" ,python2-setuptools)
10524 ,@(package-native-inputs base))))))
6a6c9d43
DC
10525
10526(define-public python-sh
10527 (package
10528 (name "python-sh")
10529 (version "1.11")
10530 (source (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "sh" version))
10533 (sha256
10534 (base32
10535 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10536 (build-system python-build-system)
10537 (arguments
10538 `(#:tests? #f)) ; no tests
10539 (home-page "https://github.com/amoffat/sh")
10540 (synopsis "Python subprocess interface")
10541 (description "Abstracts process invocation by providing a function
10542interface for programs.")
10543 (license license:expat)
10544 (properties `((python2-variant . ,(delay python2-sh))))))
10545
10546(define-public python2-sh
10547 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10548 (package (inherit base)
10549 (native-inputs
10550 `(("python2-setuptools" ,python2-setuptools)
10551 ,@(package-native-inputs base))))))
05b59190 10552
25702397
EF
10553(define-public python-consul
10554 (package
10555 (name "python-consul")
10556 (version "0.6.1")
10557 (source
10558 (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "python-consul" version))
10561 (sha256
10562 (base32
10563 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10564 (build-system python-build-system)
10565 (native-inputs
10566 `(("python-pytest" ,python-pytest)
10567 ("python-requests" ,python-requests)
10568 ("python-six" ,python-six)))
10569 (home-page "https://github.com/cablehead/python-consul")
10570 (synopsis "Python client for Consul")
10571 (description
10572 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10573discovery, monitoring and configuration.")
10574 (license license:expat)))
10575
10576(define-public python2-consul
10577 (let ((consul (package-with-python2 python-consul)))
10578 (package (inherit consul)
10579 (native-inputs
10580 `(("python2-setuptools" ,python2-setuptools)
10581 ,@(package-native-inputs consul))))))
10582
05b59190
DC
10583(define-public python-schematics
10584 (package
10585 (name "python-schematics")
10586 (version "1.1.1")
10587 (source
10588 (origin
10589 (method url-fetch)
10590 (uri (string-append
10591 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10592 (file-name (string-append name "-" version ".tar.gz"))
10593 (sha256
10594 (base32
10595 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10596 (build-system python-build-system)
10597 (inputs
10598 `(("python-six" ,python-six)))
10599 (arguments
10600 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10601 ; version requirements (eg python-coveralls)
10602 (home-page "https://github.com/schematics/schematics")
10603 (synopsis "Python Data Structures for Humans")
10604 (description "Python Data Structures for Humans.")
10605 (license license:bsd-3)
10606 (properties `((python2-variant . ,(delay python2-schematics))))))
10607
10608(define-public python2-schematics
10609 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10610 (package (inherit base)
10611 (native-inputs
10612 `(("python2-setuptools" ,python2-setuptools)
10613 ,@(package-native-inputs base))))))
d6907ff7
DC
10614
10615(define-public python-publicsuffix
10616 (package
10617 (name "python-publicsuffix")
10618 (version "1.1.0")
10619 (source (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "publicsuffix" version))
10622 (sha256
10623 (base32
10624 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10625 (build-system python-build-system)
10626 (arguments
10627 `(#:tests? #f)) ; tests use the internet
10628 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10629 (synopsis "Get suffix for a domain name")
10630 (description "Get a public suffix for a domain name using the Public Suffix
10631List.")
10632 (license license:expat)
10633 (properties `((python2-variant . ,(delay python2-nltk))))))
10634
10635(define-public python2-publicsuffix
10636 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10637 (package (inherit base)
10638 (native-inputs
10639 `(("python2-setuptools" ,python2-setuptools)
10640 ,@(package-native-inputs base))))))
b2319996
DC
10641
10642(define-public python-publicsuffix2
10643 (package
10644 (name "python-publicsuffix2")
10645 (version "2.20160621")
10646 (source
10647 (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10650 (sha256
10651 (base32
10652 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10653 (build-system python-build-system)
10654 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10655 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10656 (description "Get a public suffix for a domain name using the Public Suffix
10657List. Forked from and using the same API as the publicsuffix package.")
10658 (license (list license:expat license:mpl2.0))
10659 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10660
10661(define-public python2-publicsuffix2
10662 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10663 (package (inherit base)
10664 (native-inputs
10665 `(("python2-setuptools" ,python2-setuptools)
10666 ,@(package-native-inputs base))))))
81f1515d
DC
10667
10668(define-public python-url
10669 (package
10670 (name "python-url")
10671 (version "0.2.0")
10672 (source (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "url" version))
10675 (sha256
10676 (base32
10677 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10678 (build-system python-build-system)
10679 (inputs
10680 `(("python-publicsuffix" ,python-publicsuffix)))
10681 (native-inputs
10682 `(("python-coverage" ,python-coverage)
10683 ("python-nose" ,python-nose)))
10684 (arguments
10685 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10686 (home-page "http://github.com/seomoz/url-py")
10687 (synopsis "URL Parsing")
10688 (description "Library for parsing urls.")
10689 (license license:expat)
10690 (properties `((python2-variant . ,(delay python2-url))))))
10691
10692(define-public python2-url
10693 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10694 (package (inherit base)
10695 (inputs
10696 `(("python2-publicsuffix" ,python2-publicsuffix)))
10697 (native-inputs
10698 `(("python2-setuptools" ,python2-setuptools)
10699 ,@(package-native-inputs base))))))
974ee2c1
TS
10700
10701(define-public python-freezegun
10702 (package
10703 (name "python-freezegun")
10704 (version "0.3.7")
10705 (source
10706 (origin
10707 (method url-fetch)
10708 (uri (pypi-uri "freezegun" version))
10709 (sha256
10710 (base32
10711 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10712 (build-system python-build-system)
10713 (native-inputs
10714 `(("python-mock" ,python-mock)
10715 ("python-nose" ,python-nose)
10716 ("python-coverage" ,python-coverage)
10717 ("python-dateutil-2" ,python-dateutil-2)))
10718 (inputs
10719 `(("python-six" ,python-six)))
10720 (arguments
10721 `(#:phases (modify-phases %standard-phases
10722 ;; The tests are normally executed via `make test`, but the PyPi
10723 ;; package does not include the Makefile.
10724 (replace 'check
10725 (lambda _
10726 (zero? (system* "nosetests" "./tests/")))))))
10727 (home-page "https://github.com/spulec/freezegun")
10728 (synopsis "Test utility for mocking the datetime module")
10729 (description
10730 "FreezeGun is a library that allows your python tests to travel through
10731time by mocking the datetime module.")
10732 (license license:asl2.0)))
10733
10734(define-public python2-freezegun
10735 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10736 (package (inherit base)
10737 (native-inputs
10738 `(("python2-setuptools" ,python2-setuptools)
10739 ,@(package-native-inputs base))))))
dddcb25c
MB
10740
10741(define-public python-odfpy
10742 (package
10743 (name "python-odfpy")
10744 (version "1.3.3")
10745 (source (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "odfpy" version))
10748 (sha256
10749 (base32
10750 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10751 (arguments
10752 `(#:modules ((srfi srfi-1)
10753 (guix build python-build-system)
10754 (guix build utils))
10755 #:phases
10756 (modify-phases %standard-phases
10757 (replace 'check
10758 ;; The test runner invokes python2 and python3 for test*.py.
10759 ;; To avoid having both in inputs, we replicate it here.
10760 (lambda _
10761 (every (lambda (test-file)
10762 (zero? (system* "python" test-file)))
10763 (find-files "tests" "^test.*\\.py$")))))))
10764 (build-system python-build-system)
10765 (home-page "https://github.com/eea/odfpy")
10766 (synopsis "Python API and tools to manipulate OpenDocument files")
10767 (description "Collection of libraries and utility programs written in
10768Python to manipulate OpenDocument 1.2 files.")
10769 (license
10770 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10771 ;; number of files with other licenses.
10772 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10773
10774(define-public python2-odfpy
10775 (package-with-python2 python-odfpy))
b30565bd
MB
10776
10777(define-public python-cachecontrol
10778 (package
10779 (name "python-cachecontrol")
10780 (version "0.11.6")
10781 (source
10782 (origin
10783 (method url-fetch)
10784 ;; Pypi does not have tests.
10785 (uri (string-append
10786 "https://github.com/ionrock/cachecontrol/archive/v"
10787 version ".tar.gz"))
10788 (file-name (string-append name "-" version ".tar.gz"))
10789 (sha256
10790 (base32
10791 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10792 (build-system python-build-system)
10793 (arguments
10794 `(#:phases
10795 (modify-phases %standard-phases
10796 (replace 'check
10797 (lambda _
10798 ;; Drop test that requires internet access.
10799 (delete-file "tests/test_regressions.py")
10800 (setenv "PYTHONPATH"
10801 (string-append (getcwd) "/build/lib:"
10802 (getenv "PYTHONPATH")))
10803 (zero? (system* "py.test" "-vv")))))))
10804 (native-inputs
10805 `(("python-pytest" ,python-pytest)
10806 ("python-redis" ,python-redis)
10807 ("python-webtest" ,python-webtest)
10808 ("python-mock" ,python-mock)))
10809 (propagated-inputs
10810 `(("python-requests" ,python-requests)
10811 ("python-lockfile" ,python-lockfile)))
10812 (home-page "https://github.com/ionrock/cachecontrol")
10813 (synopsis "The httplib2 caching algorithms for use with requests")
10814 (description "CacheControl is a port of the caching algorithms in
10815@code{httplib2} for use with @code{requests} session objects.")
10816 (license license:asl2.0)
dd447621 10817 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
10818
10819(define-public python2-cachecontrol
10820 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10821 (package (inherit base)
10822 (native-inputs
10823 `(("python2-setuptools" ,python2-setuptools)
10824 ,@(package-native-inputs base))))))
243db824
DM
10825
10826(define-public python-lit
10827 (package
10828 (name "python-lit")
10829 (version "0.5.0")
10830 (source
10831 (origin
10832 (method url-fetch)
10833 (uri (pypi-uri "lit" version))
10834 (sha256
10835 (base32
10836 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10837 (build-system python-build-system)
10838 (home-page "http://llvm.org/")
10839 (synopsis "LLVM Software Testing Tool")
10840 (description "@code{lit} is a portable tool for executing LLVM and Clang
10841style test suites, summarizing their results, and providing indication of
10842failures.")
10843 (license license:ncsa)
10844 (properties `((python2-variant . ,(delay python2-lit))))))
10845
10846(define-public python2-lit
10847 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10848 (package
10849 (inherit base)
10850 (native-inputs
10851 `(("python2-setuptools" ,python2-setuptools)
10852 ,@(package-native-inputs base))))))
66f95b20
MB
10853
10854(define-public python-pytest-pep8
10855 (package
10856 (name "python-pytest-pep8")
10857 (version "1.0.6")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "pytest-pep8" version))
10861 (sha256
10862 (base32
10863 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10864 (build-system python-build-system)
10865 (arguments
10866 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10867 ;; Prevent creation of the egg. This works around
10868 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10869 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10870 (native-inputs
10871 `(("python-pytest" ,python-pytest)))
10872 (propagated-inputs
10873 `(("python-pep8" ,python-pep8)))
10874 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10875 (synopsis "Py.test plugin to check PEP8 requirements")
10876 (description "Pytest plugin for checking PEP8 compliance.")
10877 (license license:expat)
10878 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10879
10880(define-public python2-pytest-pep8
10881 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10882 (package (inherit base)
10883 (native-inputs
10884 `(("python2-setuptools" ,python2-setuptools)
10885 ,@(package-native-inputs base))))))
df94a6b5
MB
10886
10887(define-public python-pytest-flakes
10888 (package
10889 (name "python-pytest-flakes")
10890 (version "1.0.1")
10891 (source (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "pytest-flakes" version))
10894 (sha256
10895 (base32
10896 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10897 (build-system python-build-system)
10898 (arguments
10899 `(;; Prevent creation of the egg. This works around
10900 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10901 #:configure-flags '("--single-version-externally-managed" "--root=/")
10902 #:phases
10903 (modify-phases %standard-phases
10904 (delete 'check)
10905 (add-after 'install 'check
10906 (lambda _ ; It's easier to run tests after install.
10907 (zero? (system* "py.test" "-vv")))))))
10908 (native-inputs
10909 `(("python-coverage" ,python-coverage)
10910 ("python-pytest" ,python-pytest)
10911 ("python-pytest-cache" ,python-pytest-cache)
10912 ("python-pytest-pep8" ,python-pytest-pep8)))
10913 (propagated-inputs
10914 `(("python-pyflakes" ,python-pyflakes)))
10915 (home-page "https://github.com/fschulze/pytest-flakes")
10916 (synopsis "Py.test plugin to check source code with pyflakes")
10917 (description "Pytest plugin for checking Python source code with pyflakes.")
10918 (license license:expat)
10919 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10920
10921(define-public python2-pytest-flakes
10922 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10923 (package (inherit base)
10924 (native-inputs
10925 `(("python2-setuptools" ,python2-setuptools)
10926 ,@(package-native-inputs base))))))
5467ea62
MB
10927
10928(define-public python-natsort
10929 (package
10930 (name "python-natsort")
10931 (version "5.0.1")
10932 (source (origin
10933 (method url-fetch)
10934 (uri (pypi-uri "natsort" version))
10935 (sha256
10936 (base32
10937 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10938 (build-system python-build-system)
10939 (arguments
10940 `(#:phases
10941 (modify-phases %standard-phases
10942 (add-before 'check 'set-cachedir
10943 ;; Tests require write access to $HOME by default
10944 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10945 (native-inputs
10946 `(("python-hypothesis" ,python-hypothesis)
10947 ("python-pytest-cache" ,python-pytest-cache)
10948 ("python-pytest-cov" ,python-pytest-cov)
10949 ("python-pytest-flakes" ,python-pytest-flakes)
10950 ("python-pytest-pep8" ,python-pytest-pep8)))
10951 (propagated-inputs ; TODO: Add python-fastnumbers.
10952 `(("python-pyicu" ,python-pyicu)))
10953 (home-page "https://github.com/SethMMorton/natsort")
10954 (synopsis "Natural sorting for python and shell")
10955 (description
10956 "Natsort lets you apply natural sorting on lists instead of
10957lexicographical. If you use the built-in @code{sorted} method in python
10958on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10959returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10960function @code{natsorted} that identifies numbers and sorts them separately
10961from strings. It can also sort version numbers, real numbers, mixed types
10962and more, and comes with a shell command @command{natsort} that exposes this
10963functionality in the command line.")
10964 (license license:expat)
10965 (properties `((python2-variant . ,(delay python2-natsort))))))
10966
10967(define-public python2-natsort
10968 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10969 (package (inherit base)
10970 (native-inputs
10971 `(("python2-setuptools" ,python2-setuptools)
10972 ("python2-pathlib" ,python2-pathlib)
10973 ("python2-mock" ,python2-mock)
10974 ("python2-enum34" ,python2-enum34)
10975 ,@(package-native-inputs base))))))
4efb9c54
SR
10976
10977(define-public python-glances
10978 (package
10979 (name "python-glances")
10980 (version "2.7.1")
10981 (source
10982 (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "Glances" version))
10985 (sha256
10986 (base32
10987 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10988 (build-system python-build-system)
10989 (inputs
10990 `(("python-psutil" ,python-psutil)))
10991 (home-page
10992 "https://github.com/nicolargo/glances")
10993 (synopsis
10994 "A cross-platform curses-based monitoring tool")
10995 (description
10996 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10997Glances uses the PsUtil library to get information from your system. It monitors
10998CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10999 (license license:lgpl3+)
11000 (properties `((python2-variant . ,(delay python2-glances))))))
11001
11002(define-public python2-glances
11003 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11004 (package
11005 (inherit base)
11006 (native-inputs
11007 `(("python2-setuptools" ,python2-setuptools)
11008 ,@(package-native-inputs base))))))
05b7a593
EF
11009
11010(define-public python-graphql-core
11011 (package
11012 (name "python-graphql-core")
11013 (version "0.5.3")
11014 (source
11015 (origin
11016 (method url-fetch)
11017 (uri (pypi-uri "graphql-core" version))
11018 (sha256
11019 (base32
11020 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11021 (build-system python-build-system)
11022 (arguments
11023 `(#:phases
11024 (modify-phases %standard-phases
11025 (add-after 'unpack 'patch-hardcoded-version
11026 (lambda _ (substitute*
11027 "setup.py"
11028 (("'gevent==1.1rc1'") "'gevent'"))
11029 #t)))))
11030 (native-inputs
11031 `(("python-gevent" ,python-gevent)
11032 ("python-mock" ,python-mock)
11033 ("python-pytest-mock" ,python-pytest-mock)))
11034 (inputs
11035 `(("python-promise" ,python-promise)
11036 ("python-six" ,python-six)))
11037 (home-page "https://github.com/graphql-python/graphql-core")
11038 (synopsis "GraphQL implementation for Python")
11039 (description
11040 "GraphQL implementation for Python. GraphQL is a data query language and
11041runtime designed and used to request and deliver data to mobile and web apps.
11042This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11043to Python.")
11044 (properties `((python2-variant . ,(delay python2-graphql-core))))
11045 (license license:expat)))
11046
11047(define-public python2-graphql-core
11048 (let ((base (package-with-python2
11049 (strip-python2-variant python-graphql-core))))
11050 (package (inherit base)
11051 (native-inputs
11052 `(("python2-setuptools" ,python2-setuptools)
11053 ,@(package-native-inputs base))))))
7ee51575
EF
11054
11055(define-public python-graphql-relay
11056 (package
11057 (name "python-graphql-relay")
11058 (version "0.4.4")
11059 (source
11060 (origin
11061 (method url-fetch)
11062 (uri (pypi-uri "graphql-relay" version))
11063 (sha256
11064 (base32
11065 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11066 (build-system python-build-system)
11067 (native-inputs
11068 `(("python-pytest" ,python-pytest)))
11069 (inputs
11070 `(("python-graphql-core" ,python-graphql-core)
11071 ("python-promise" ,python-promise)
11072 ("python-six" ,python-six)))
11073 (home-page "https://github.com/graphql-python/graphql-relay-py")
11074 (synopsis "Relay implementation for Python")
11075 (description
11076 "This is a library to allow the easy creation of Relay-compliant servers
11077using the GraphQL Python reference implementation of a GraphQL server. It
11078should be noted that the code is a exact port of the original
11079@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11080from Facebook.")
11081 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11082 (license license:expat)))
11083
11084(define-public python2-graphql-relay
11085 (let ((base (package-with-python2
11086 (strip-python2-variant python-graphql-relay))))
11087 (package (inherit base)
11088 (native-inputs
11089 `(("python2-setuptools" ,python2-setuptools)
11090 ,@(package-native-inputs base))))))
ddc63a56
EF
11091
11092(define-public python-graphene
11093 (package
11094 (name "python-graphene")
11095 (version "0.10.2")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "graphene" version))
11100 (sha256
11101 (base32
11102 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11103 (build-system python-build-system)
11104 (native-inputs
11105 `(("python-django-filter" ,python-django-filter)
11106 ("python-mock" ,python-mock)
11107 ("python-psycopg2" ,python-psycopg2)
11108 ("python-pytest-django" ,python-pytest-django)
11109 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11110 (inputs
11111 `(("python-graphql-core" ,python-graphql-core)
11112 ("python-graphql-relay" ,python-graphql-relay)
11113 ("python-iso8601" ,python-iso8601)
11114 ("python-promise" ,python-promise)
11115 ("python-six" ,python-six)))
11116 (home-page "http://graphene-python.org/")
11117 (synopsis "GraphQL Framework for Python")
11118 (description
11119 "Graphene is a Python library for building GraphQL schemas/types.
11120A GraphQL schema describes your data model, and provides a GraphQL server
11121with an associated set of resolve methods that know how to fetch data.")
11122 (properties `((python2-variant . ,(delay python2-graphene))))
11123 (license license:expat)))
11124
11125(define-public python2-graphene
11126 (let ((base (package-with-python2
11127 (strip-python2-variant python-graphene))))
11128 (package (inherit base)
11129 (native-inputs
11130 `(("python2-setuptools" ,python2-setuptools)
11131 ("python2-sqlalchemy" ,python2-sqlalchemy)
11132 ,@(package-native-inputs base))))))
d488d5d6
EF
11133
11134(define-public python-nautilus
11135 (package
11136 (name "python-nautilus")
11137 (version "0.4.9")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "nautilus" version))
11142 (sha256
11143 (base32
11144 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11145 (build-system python-build-system)
11146 (arguments `(#:tests? #f)) ; fails to import test modules
11147 (native-inputs
11148 `(("python-setuptools" ,python-setuptools)))
11149 (inputs
11150 `(("python-bcrypt" ,python-bcrypt)
11151 ("python-click" ,python-click)
11152 ("python-consul" ,python-consul)
11153 ("python-graphql-core" ,python-graphql-core)
11154 ("python-graphql-relay" ,python-graphql-relay)
11155 ("python-graphene" ,python-graphene)
11156 ("python-jinja2" ,python-jinja2)
11157 ("python-nose2" ,python-nose2)
11158 ("python-peewee" ,python-peewee)
11159 ("python-pika" ,python-pika)
11160 ("python-pycparser" ,python-pycparser)
11161 ("python-requests" ,python-requests)
11162 ("python-tornado" ,python-tornado)
11163 ("python-wtforms" ,python-wtforms)))
11164 (home-page "https://github.com/AlecAivazis/nautilus")
11165 (synopsis "Library for creating microservice applications")
11166 (description
11167 "Nautilus is a framework for flux based microservices that looks to
11168provide extendible implementations of common aspects of a cloud so that you can
11169focus on building massively scalable web applications.")
11170 (license license:expat)))
66d3f50a
LF
11171
11172(define-public python-betamax
11173 (package
11174 (name "python-betamax")
11175 (version "0.8.0")
11176 (source
11177 (origin
11178 (method url-fetch)
11179 (uri (pypi-uri "betamax" version))
11180 (sha256
11181 (base32
11182 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11183 (build-system python-build-system)
11184 (arguments
11185 '(;; Many tests fail because they require networking.
11186 #:tests? #f))
11187 (inputs
11188 `(("python-requests" ,python-requests)))
11189 (home-page "https://github.com/sigmavirus24/betamax")
11190 (synopsis "Record HTTP interactions with python-requests")
11191 (description "Betamax will record your test suite's HTTP interactions and
11192replay them during future tests. It is designed to work with python-requests.")
11193 (license license:expat)
11194 (properties `((python2-variant . ,(delay python2-betamax))))))
11195
11196(define-public python2-betamax
11197 (let ((base (package-with-python2 (strip-python2-variant python-betamax))))
11198 (package
11199 (inherit base)
11200 (native-inputs
11201 `(("python2-setuptools" ,python2-setuptools)
11202 ,@(package-native-inputs base))))))
ca0635b4 11203
94cffc63
LF
11204(define-public python-s3transfer
11205 (package
11206 (name "python-s3transfer")
11207 (version "0.1.8")
11208 (source (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "s3transfer" version))
11211 (sha256
11212 (base32
11213 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11214 (build-system python-build-system)
11215 (native-inputs
11216 `(("python-docutils" ,python-docutils)))
11217 (inputs
11218 `(("python-botocore" ,python-botocore)))
11219 (synopsis "Amazon S3 Transfer Manager")
11220 (description "S3transfer is a Python library for managing Amazon S3
11221transfers.")
11222 (home-page "https://github.com/boto/s3transfer")
11223 (license license:asl2.0)
11224 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11225
11226(define-public python2-s3transfer
11227 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11228 (package
11229 (inherit base)
11230 (native-inputs
11231 `(("python2-futures" ,python2-futures)
11232 ("python2-setuptools" ,python2-setuptools)
11233 ,@(package-native-inputs base))))))
8ab59181
HG
11234
11235(define-public python-setproctitle
11236(package
11237 (name "python-setproctitle")
11238 (version "1.1.10")
11239 (source
11240 (origin
11241 (method url-fetch)
11242 (uri (pypi-uri "setproctitle" version))
11243 (sha256
11244 (base32
11245 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11246 (build-system python-build-system)
11247 (arguments
11248 '(#:phases
11249 (modify-phases %standard-phases
11250 (add-before 'check 'patch-Makefile
11251 ;; Stricly this is only required for the python2 variant.
11252 ;; But adding a phase in an inherited package seems to be
11253 ;; cumbersum. So we patch even for python3.
11254 (lambda _
11255 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11256 (when nose
11257 (substitute* "Makefile"
11258 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11259 (string-append nose "/bin/nosetests "))))
11260 #t)))
11261 (replace 'check
11262 (lambda _
11263 (setenv "PYTHON" (or (which "python3") (which "python")))
11264 (setenv "PYCONFIG" (or (which "python3-config")
11265 (which "python-config")))
11266 (setenv "CC" "gcc")
11267 ;; No need to extend PYTHONPATH to find the built package, since
11268 ;; the Makefile will build anyway
11269 (zero? (system* "make" "check")))))))
11270 (native-inputs
11271 `(("procps" ,procps))) ; required for tests
11272 (home-page
11273 "https://github.com/dvarrazzo/py-setproctitle")
11274 (synopsis
11275 "Setproctitle implementation for Python to customize the process title")
11276 (description "The library allows a process to change its title (as displayed
11277by system tools such as ps and top).
11278
11279Changing the title is mostly useful in multi-process systems, for
11280example when a master process is forked: changing the children's title
11281allows to identify the task each process is busy with. The technique
11282is used by PostgreSQL and the OpenSSH Server for example.")
11283 (license license:bsd-3)
11284 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11285
11286(define-public python2-setproctitle
11287 (let ((base (package-with-python2
11288 (strip-python2-variant python-setproctitle))))
11289 (package
11290 (inherit base)
11291 (native-inputs `(("python2-nose" ,python2-nose)
11292 ,@(package-native-inputs base))))))
162e42d8
HG
11293
11294(define-public python-validictory
11295 (package
11296 (name "python-validictory")
11297 (version "1.0.1")
11298 (source
11299 (origin
11300 (method url-fetch)
11301 (uri (pypi-uri "validictory" version))
11302 (sha256
11303 (base32
11304 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11305 (build-system python-build-system)
11306 (arguments
11307 '(#:phases
11308 (modify-phases %standard-phases
11309 (add-after 'unpack 'bootstrap
11310 ;; Move the tests out of the package directory to avoid
11311 ;; packaging them.
11312 (lambda* _
11313 (rename-file "validictory/tests" "tests")
11314 (delete-file "tests/__init__.py")))
11315 (replace 'check
11316 (lambda _
11317 ;; Extend PYTHONPATH so the built package will be found.
11318 (setenv "PYTHONPATH"
11319 (string-append (getcwd) "/build/lib:"
11320 (getenv "PYTHONPATH")))
11321 (zero? (system* "py.test" "-vv" )))))))
11322 (native-inputs
11323 `(("python-pytest" ,python-pytest)))
11324 (home-page
11325 "https://github.com/jamesturk/validictory")
11326 (synopsis "General purpose Python data validator")
11327 (description "It allows validation of arbitrary Python data structures.
11328
11329The schema format is based on the JSON Schema
11330proposal (http://json-schema.org), so combined with json the library is also
11331useful as a validator for JSON data.")
7ca68304
EF
11332 (license license:expat)
11333 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
11334
11335(define-public python2-validictory
7ca68304
EF
11336 (let ((base (package-with-python2
11337 (strip-python2-variant python-validictory))))
11338 (package
11339 (inherit base)
11340 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11341 ,@(package-native-inputs base))))))
0990edfe
DM
11342
11343(define-public python-aniso8601
11344 (package
11345 (name "python-aniso8601")
11346 (version "1.1.0")
11347 (source
11348 (origin
11349 (method url-fetch)
11350 (uri (pypi-uri "aniso8601" version))
11351 (sha256
11352 (base32
11353 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11354 (build-system python-build-system)
11355 (propagated-inputs
11356 `(("python-dateutil-2" ,python-dateutil-2)))
11357 (home-page
11358 "https://bitbucket.org/nielsenb/aniso8601")
11359 (synopsis
11360 "Python library for parsing ISO 8601 strings")
11361 (description
11362 "This package contains a library for parsing ISO 8601 datetime strings.")
11363 (license license:bsd-3)))
999d964d
DM
11364
11365(define-public python-flask-restful
11366 (package
11367 (name "python-flask-restful")
11368 (version "0.3.5")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "Flask-RESTful" version))
11373 (sha256
11374 (base32
11375 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11376 (build-system python-build-system)
11377 (propagated-inputs
11378 `(("python-aniso8601" ,python-aniso8601)
11379 ("python-flask" ,python-flask)
11380 ("python-pycrypto" ,python-pycrypto)
11381 ("python-pytz" ,python-pytz)))
11382 (native-inputs
11383 `(;; Optional dependency of Flask. Tests need it.
11384 ("python-blinker" ,python-blinker)
11385 ("python-mock" ,python-mock) ; For tests
11386 ("python-nose" ,python-nose) ; For tests
11387 ("python-sphinx" ,python-sphinx)))
11388 (home-page
11389 "https://www.github.com/flask-restful/flask-restful/")
11390 (synopsis
11391 "Flask module for creating REST APIs")
11392 (description
11393 "This package contains a Flask module for creating REST APIs.")
11394 (license license:bsd-3)))
31288222
DM
11395
11396(define-public python-flask-basicauth
11397 (package
11398 (name "python-flask-basicauth")
11399 (version "0.2.0")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "Flask-BasicAuth" version))
11404 (sha256
11405 (base32
11406 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11407 (build-system python-build-system)
11408 (propagated-inputs
11409 `(("python-flask" ,python-flask)))
11410 (home-page
11411 "https://github.com/jpvanhal/flask-basicauth")
11412 (synopsis
11413 "HTTP basic access authentication for Flask")
11414 (description
11415 "This package provides HTTP basic access authentication for Flask.")
11416 (license license:bsd-3)))
903276d0
DM
11417
11418(define-public python-flask-sqlalchemy
11419 (package
11420 (name "python-flask-sqlalchemy")
11421 (version "2.1")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (pypi-uri "Flask-SQLAlchemy" version))
11426 (sha256
11427 (base32
11428 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11429 (build-system python-build-system)
11430 (propagated-inputs
11431 `(("python-flask" ,python-flask)
11432 ("python-sqlalchemy" ,python-sqlalchemy)))
11433 (home-page
11434 "http://github.com/mitsuhiko/flask-sqlalchemy")
11435 (synopsis
11436 "Module adding SQLAlchemy support to your Flask application")
11437 (description
11438 "This package adds SQLAlchemy support to your Flask application.")
11439 (license license:bsd-3)))