gnu: python-flake8-2.2.4: Remove python byte-code files from source.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
a01b6da7
NK
34;;;
35;;; This file is part of GNU Guix.
36;;;
37;;; GNU Guix is free software; you can redistribute it and/or modify it
38;;; under the terms of the GNU General Public License as published by
39;;; the Free Software Foundation; either version 3 of the License, or (at
40;;; your option) any later version.
41;;;
42;;; GNU Guix is distributed in the hope that it will be useful, but
43;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45;;; GNU General Public License for more details.
46;;;
47;;; You should have received a copy of the GNU General Public License
48;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
1ffa7090 50(define-module (gnu packages python)
3f641af0 51 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 52 #:use-module (gnu packages)
8e451885 53 #:use-module (gnu packages algebra)
d79a343b 54 #:use-module (gnu packages adns)
89b2e0b0 55 #:use-module (gnu packages attr)
d96034ed 56 #:use-module (gnu packages backup)
3969ca54 57 #:use-module (gnu packages bash)
1ffa7090 58 #:use-module (gnu packages compression)
4ed20663 59 #:use-module (gnu packages databases)
ddc63a56 60 #:use-module (gnu packages django)
5e1c9367 61 #:use-module (gnu packages file)
4ed20663 62 #:use-module (gnu packages fontutils)
4ed20663
AE
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
6eb7af2a 65 #:use-module (gnu packages gl)
4ed20663 66 #:use-module (gnu packages glib)
6eb7af2a 67 #:use-module (gnu packages gstreamer)
4ed20663 68 #:use-module (gnu packages gtk)
421a80a2 69 #:use-module (gnu packages icu4c)
c937562e 70 #:use-module (gnu packages image)
4ed20663 71 #:use-module (gnu packages imagemagick)
d79a343b 72 #:use-module (gnu packages libevent)
b10ab723 73 #:use-module (gnu packages libffi)
89b2e0b0 74 #:use-module (gnu packages linux)
0da98533 75 #:use-module (gnu packages maths)
4ed20663 76 #:use-module (gnu packages multiprecision)
45203542 77 #:use-module (gnu packages networking)
be7134bf 78 #:use-module (gnu packages ncurses)
b04a52a6 79 #:use-module (gnu packages openstack)
d488d5d6 80 #:use-module (gnu packages password-utils)
c9b1b4f9 81 #:use-module (gnu packages pcre)
4ed20663 82 #:use-module (gnu packages perl)
b10ab723 83 #:use-module (gnu packages pkg-config)
06ff0837 84 #:use-module (gnu packages protobuf)
4ed20663 85 #:use-module (gnu packages readline)
6eb7af2a 86 #:use-module (gnu packages sdl)
c9b1b4f9 87 #:use-module (gnu packages statistics)
8f9ac901 88 #:use-module (gnu packages tex)
1c65314c 89 #:use-module (gnu packages texinfo)
cc2b77df 90 #:use-module (gnu packages tls)
e25f0174 91 #:use-module (gnu packages version-control)
02f8f804 92 #:use-module (gnu packages video)
8d12be1e 93 #:use-module (gnu packages web)
ce0614dd 94 #:use-module (gnu packages base)
26b307e2 95 #:use-module (gnu packages xml)
6fa14469 96 #:use-module (gnu packages xorg)
0bdc1671 97 #:use-module (gnu packages xdisorg)
4ed20663 98 #:use-module (gnu packages zip)
afa181ff 99 #:use-module (gnu packages tcl)
63bcec71 100 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
101 #:use-module (guix packages)
102 #:use-module (guix download)
ea5456c8 103 #:use-module (guix git-download)
11bb85a1 104 #:use-module (guix utils)
acc26ff1 105 #:use-module (guix build-system gnu)
d8c4998f 106 #:use-module (guix build-system cmake)
898238b9 107 #:use-module (guix build-system python)
1c65314c
FB
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
a01b6da7 110
45848023 111(define-public python-2.7
a01b6da7
NK
112 (package
113 (name "python")
f0499100 114 (version "2.7.12")
a01b6da7
NK
115 (source
116 (origin
117 (method url-fetch)
9b43a0ff 118 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
f0499100 122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
15e57f57 125 "python-2.7-site-prefixes.patch"
c3052d6b 126 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
f0499100 135 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
1bb163b0 140 "Lib/test/test_subprocess.py"))
10a42aa2 141 #t))))
02f0c3b2
LC
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 144 (build-system gnu-build-system)
3fdc99da 145 (arguments
10a42aa2 146 `(;; 356 tests OK.
e7e7a1eb
EF
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
ff6f33cf
ED
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 162 #:test-target "test"
3fdc99da 163 #:configure-flags
6a20289d
LC
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
aaf75c89 166 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
fd982732 169
d2cc9c7c
LC
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
fd982732 172 #:phases
46472ecd
MW
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
dedc8320
LC
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
a665996f 189 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 190 #t))
5b4e2791
LC
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
46472ecd
MW
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
02f0c3b2 224 #t)))
9ffe61b0
LC
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
216c283b
LC
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
02f0c3b2
LC
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
a01b6da7 277 (inputs
3fdc99da
CR
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
b10ab723 280 ("libffi" ,libffi) ; for ctypes
b88e1b0a 281 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 282 ("openssl" ,openssl)
3fdc99da 283 ("readline" ,readline)
afa181ff
LC
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
b10ab723
CR
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
af070955 292 (files '("lib/python2.7/site-packages")))))
f0499100 293 (home-page "https://www.python.org")
afa181ff 294 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297is used in a wide variety of application domains. Some of its key
298distinguishing features include: clear, readable syntax; strong
299introspection capabilities; intuitive object orientation; natural
300expression of procedural code; full modularity, supporting hierarchical
301packages; exception-based error handling; and very high level dynamic
302data types.")
3f641af0 303 (license license:psfl)))
acc26ff1 304
45848023
HG
305;; Current 2.x version.
306(define-public python-2 python-2.7)
307
72df6680 308(define-public python-3.5
b24d1cfc 309 (package (inherit python-2)
72df6680 310 (version "3.5.2")
717003e3
LC
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
fc1adab1
AK
315 (patches (search-patches
316 "python-fix-tests.patch"
72df6680 317 "python-3.5-fix-tests.patch"
fc1adab1
AK
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
717003e3
LC
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
72df6680 323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
1aebc0cb
AE
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
0e05d01e
SB
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
f26a77ff 332
72df6680
LF
333(define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
45848023 350;; Current 3.x version.
72df6680 351(define-public python-3 python-3.5)
45848023
HG
352
353;; Current major version.
354(define-public python python-3)
355
95288fcc
LC
356;; Minimal variants of Python, mostly used to break the cycle between Tk and
357;; Python (Tk -> libxcb -> Python.)
358
359(define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
02f0c3b2 362 (outputs '("out"))
95288fcc
LC
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
367 (inputs '()))) ;none of the optional dependencies
368
369(define-public python-minimal
898238b9 370 (package (inherit python)
95288fcc 371 (name "python-minimal")
02f0c3b2 372 (outputs '("out"))
95288fcc 373
d0b73960 374 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
95288fcc
LC
379 ("zlib" ,zlib)))))
380
64cb064c
LC
381(define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
898238b9 384 (package (inherit python)
95288fcc 385 (name name)
898238b9
AE
386 (source #f)
387 (build-system trivial-build-system)
02f0c3b2 388 (outputs '("out"))
3969ca54 389 (inputs `(("bash" ,bash)))
3c0f2329 390 (propagated-inputs `(("python" ,python)))
898238b9
AE
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
3969ca54
SB
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
0d56e3e1
LC
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420that they can be invoked under their usual name---e.g., @command{python}
421instead of @command{python3}.")))
422
95288fcc
LC
423(define-public python-wrapper (wrap-python3 python))
424(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 425
aaf625b8
RW
426(define-public python-psutil
427 (package
428 (name "python-psutil")
88535a44 429 (version "4.3.0")
aaf625b8
RW
430 (source
431 (origin
432 (method url-fetch)
f56777be 433 (uri (pypi-uri "psutil" version))
aaf625b8
RW
434 (sha256
435 (base32
88535a44 436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 437 (build-system python-build-system)
88535a44 438 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442information on running processes and system utilization (CPU, memory, disks,
443network) in Python. It is useful mainly for system monitoring, profiling and
444limiting process resources and management of running processes. It implements
445many functionalities offered by command line tools such as: ps, top, lsof,
446netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447pidof, tty, taskset, pmap.")
3f641af0 448 (license license:bsd-3)))
aaf625b8
RW
449
450(define-public python2-psutil
451 (package-with-python2 python-psutil))
898238b9 452
f9da1d8a
ED
453(define-public python-passlib
454 (package
455 (name "python-passlib")
690e8c66 456 (version "1.6.5")
f9da1d8a
ED
457 (source
458 (origin
459 (method url-fetch)
690e8c66 460 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
461 (sha256
462 (base32
690e8c66 463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
464 (build-system python-build-system)
465 (native-inputs
f3b98f4f 466 `(("python-nose" ,python-nose)))
f22efa01 467 (propagated-inputs
f9da1d8a
ED
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481cross-platform implementations of over 30 password hashing algorithms, as well
482as a framework for managing existing password hashes. It's designed to be
483useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484to providing full-strength password hashing for multi-user application.")
3f641af0 485 (license license:bsd-3)))
f9da1d8a
ED
486
487(define-public python2-passlib
488 (package-with-python2 python-passlib))
489
feb0d9c3
ED
490(define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
feb0d9c3
ED
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510system hashes passwords using a version of Bruce Schneier's Blowfish block
511cipher with modifications designed to raise the cost of off-line password
512cracking and frustrate fast hardware implementation. The computation cost of
513the algorithm is parametised, so it can be increased as computers get faster.
514The intent is to make a compromise of a password database less likely to
515result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
3f641af0 520 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
521
522(define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
429fdea1
ED
526(define-public python-paramiko
527 (package
528 (name "python-paramiko")
81b9bbbd 529 (version "1.16.0")
429fdea1
ED
530 (source
531 (origin
532 (method url-fetch)
81b9bbbd 533 (uri (pypi-uri "paramiko" version))
429fdea1
ED
534 (sha256
535 (base32
81b9bbbd 536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 537 (build-system python-build-system)
a3fc12da 538 (propagated-inputs
f22efa01
HG
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544providing both client and server functionality. While it leverages a Python C
545extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546Python interface around SSH networking concepts.")
3f641af0 547 (license license:lgpl2.1+)))
429fdea1
ED
548
549(define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
de73dbf6
ED
553(define-public python-httplib2
554 (package
555 (name "python-httplib2")
286f1bac 556 (version "0.9.2")
de73dbf6
ED
557 (source
558 (origin
559 (method url-fetch)
286f1bac 560 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
561 (sha256
562 (base32
286f1bac 563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 564 (build-system python-build-system)
286f1bac 565 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569other HTTP libraries.")
570 (license license:expat)))
571
572(define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
67039875
ED
575(define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
67039875
ED
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598Curve Digital Signature Algorithm), implemented purely in Python. With this
599library, you can quickly create keypairs (signing key and verifying key), sign
600messages, and verify the signatures. The keys and signatures are very short,
601making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604(define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
52323f32
ED
607(define-public python-ccm
608 (package
609 (name "python-ccm")
db5567f7 610 (version "2.1.6")
52323f32
ED
611 (source
612 (origin
613 (method url-fetch)
db5567f7 614 (uri (pypi-uri "ccm" version))
52323f32
ED
615 (sha256
616 (base32
db5567f7 617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 618 (build-system python-build-system)
f22efa01 619 (propagated-inputs
52323f32 620 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
621 ;; Not listed in setup.py, but used in ccmlib/node.py for full
622 ;; functionality
623 ("python-psutil" ,python-psutil)
52323f32
ED
624 ("python-six" ,python-six)))
625 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
626 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
627localhost")
628 (description "Cassandra Cluster Manager is a development tool for testing
629local Cassandra clusters. It creates, launches and removes Cassandra clusters
630on localhost.")
3f641af0 631 (license license:asl2.0)))
52323f32
ED
632
633(define-public python2-ccm
634 (package-with-python2 python-ccm))
635
89114f39 636(define-public python-pytz
acc26ff1 637 (package
89114f39 638 (name "python-pytz")
61c9babb 639 (version "2016.3")
acc26ff1
CR
640 (source
641 (origin
642 (method url-fetch)
61c9babb 643 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
644 (sha256
645 (base32
61c9babb 646 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 647 (build-system python-build-system)
8498b8cf 648 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 649 (home-page "http://pythonhosted.org/pytz")
9e771e3b 650 (synopsis "Python timezone library")
acc26ff1
CR
651 (description
652 "This library allows accurate and cross platform timezone calculations
653using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 654 (license license:expat)))
5ace6e2f 655
89114f39 656(define-public python2-pytz
11bb85a1 657 (package-with-python2 python-pytz))
89114f39 658
fc50e9c6 659
89114f39 660(define-public python-babel
5ace6e2f 661 (package
89114f39 662 (name "python-babel")
3f37db6b 663 (version "2.3.2")
5ace6e2f
CR
664 (source
665 (origin
666 (method url-fetch)
b850a6d8 667 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
668 (sha256
669 (base32
3f37db6b 670 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 671 (build-system python-build-system)
f22efa01 672 (propagated-inputs
f3b98f4f 673 `(("python-pytz" ,python-pytz)))
8498b8cf 674 (arguments `(#:tests? #f)) ; no test target
e1804763 675 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
676 (synopsis
677 "Tools for internationalizing Python applications")
678 (description
679 "Babel is composed of two major parts:
680- tools to build and work with gettext message catalogs
681- a Python interface to the CLDR (Common Locale Data Repository), providing
682access to various locale display names, localized number and date formatting,
683etc. ")
3f641af0 684 (license license:bsd-3)))
89114f39
AE
685
686(define-public python2-babel
11bb85a1 687 (package-with-python2 python-babel))
73adf220 688
ed377cc6
RW
689(define-public python2-backport-ssl-match-hostname
690 (package
691 (name "python2-backport-ssl-match-hostname")
f2d06d46 692 (version "3.5.0.1")
ed377cc6
RW
693 (source
694 (origin
695 (method url-fetch)
696 (uri (string-append
697 "https://pypi.python.org/packages/source/b/"
698 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
699 version ".tar.gz"))
700 (sha256
701 (base32
f2d06d46 702 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 703 (build-system python-build-system)
f2d06d46
EF
704 (arguments
705 `(#:python ,python-2
706 #:tests? #f)) ; no test target
f2d06d46
EF
707 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
708 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
709 (description
710 "This backport brings the ssl.match_hostname() function to users of
711earlier versions of Python. The function checks the hostname in the
712certificate returned by the server to which a connection has been established,
713and verifies that it matches the intended target hostname.")
3f641af0 714 (license license:psfl)))
ed377cc6 715
ef5cbf9b
RW
716(define-public python-h5py
717 (package
718 (name "python-h5py")
fe147c41 719 (version "2.6.0")
ef5cbf9b
RW
720 (source
721 (origin
722 (method url-fetch)
fe147c41 723 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
724 (sha256
725 (base32
fe147c41 726 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 727 (build-system python-build-system)
797e1401
RW
728 (arguments
729 `(#:tests? #f ; no test target
730 #:phases
731 (modify-phases %standard-phases
732 (add-after 'unpack 'fix-hdf5-paths
733 (lambda* (#:key inputs #:allow-other-keys)
734 (let ((prefix (assoc-ref inputs "hdf5")))
735 (substitute* "setup_build.py"
736 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']"))
738 (("'/opt/local/include', '/usr/local/include'")
739 (string-append "'" prefix "/include" "'")))
740 (substitute* "setup_configure.py"
741 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
742 (string-append "['" prefix "/lib" "']")))
743 #t))))))
3c4010b1 744 (propagated-inputs
69866690
HG
745 `(("python-six" ,python-six)
746 ("python-numpy" ,python-numpy)))
ef5cbf9b 747 (inputs
69866690 748 `(("hdf5" ,hdf5)))
ef5cbf9b 749 (native-inputs
fe147c41
EF
750 `(("python-cython" ,python-cython)
751 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
752 (home-page "http://www.h5py.org/")
753 (synopsis "Read and write HDF5 files from Python")
754 (description
755 "The h5py package provides both a high- and low-level interface to the
756HDF5 library from Python. The low-level interface is intended to be a
757complete wrapping of the HDF5 API, while the high-level component supports
758access to HDF5 files, datasets and groups using established Python and NumPy
759concepts.")
9820a028 760 (license license:bsd-3)))
ef5cbf9b
RW
761
762(define-public python2-h5py
9820a028 763 (package-with-python2 python-h5py))
ef5cbf9b 764
c1448c69
EB
765(define-public python-lockfile
766 (package
767 (name "python-lockfile")
692add53 768 (version "0.12.2")
c1448c69
EB
769 (source
770 (origin
771 (method url-fetch)
772 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
773 "lockfile-" version ".tar.gz"))
774 (sha256
775 (base32
692add53 776 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
777 (build-system python-build-system)
778 (arguments '(#:test-target "check"))
692add53
BW
779 (native-inputs
780 `(("python-pbr" ,python-pbr)))
6a8f26a4 781 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
782 (synopsis "Platform-independent file locking module")
783 (description
784 "The lockfile package exports a LockFile class which provides a simple
785API for locking files.")
f210e944 786 (license license:expat)))
c1448c69
EB
787
788(define-public python2-lockfile
f210e944 789 (package-with-python2 python-lockfile))
c1448c69 790
5a1a4bf6
EB
791(define-public python-mock
792 (package
793 (name "python-mock")
794 (version "1.0.1")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
799 "mock-" version ".tar.gz"))
800 (sha256
801 (base32
802 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
803 (build-system python-build-system)
804 (arguments '(#:test-target "check"))
07af3e5e 805 (home-page "http://code.google.com/p/mock/")
9e771e3b 806 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
807 (description
808 "Mock is a library for testing in Python. It allows you to replace parts
809of your system under test with mock objects and make assertions about how they
810have been used.")
bd3fa666 811 (license license:expat)))
5a1a4bf6
EB
812
813(define-public python2-mock
814 (package-with-python2 python-mock))
815
fc50e9c6 816
73adf220
AE
817(define-public python-setuptools
818 (package
819 (name "python-setuptools")
62a9a23b 820 (version "18.3.1")
73adf220
AE
821 (source
822 (origin
823 (method url-fetch)
824 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
825 version ".tar.gz"))
826 (sha256
827 (base32
e0ed4579
HG
828 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))
829 (modules '((guix build utils)))
830 (snippet
831 '(begin
832 ;; Remove included binaries which are used to build self-extracting
833 ;; installers for Windows.
834 ;; TODO: Find some way to build them ourself so we can include them.
835 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
836 #t))))
73adf220 837 (build-system python-build-system)
d3d656c5
AE
838 ;; FIXME: Tests require pytest, which itself relies on setuptools.
839 ;; One could bootstrap with an internal untested setuptools.
73adf220 840 (arguments
824af8ca 841 `(#:tests? #f))
73adf220
AE
842 (home-page "https://pypi.python.org/pypi/setuptools")
843 (synopsis
844 "Library designed to facilitate packaging Python projects")
845 (description
846 "Setuptools is a fully-featured, stable library designed to facilitate
847packaging Python projects, where packaging includes:
848Python package and module definitions,
849distribution package metadata,
850test hooks,
851project installation,
852platform-specific details,
853Python 3 support.")
3f641af0 854 (license license:psfl)))
73adf220
AE
855
856(define-public python2-setuptools
857 (package-with-python2 python-setuptools))
fc50e9c6
AE
858
859
cafc3f5a
EB
860(define-public python-pycrypto
861 (package
862 (name "python-pycrypto")
863 (version "2.6.1")
864 (source
865 (origin
866 (method url-fetch)
867 (uri (string-append "https://pypi.python.org/packages/source/p/"
868 "pycrypto/pycrypto-" version ".tar.gz"))
869 (sha256
870 (base32
871 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
872 (build-system python-build-system)
cafc3f5a
EB
873 (inputs
874 `(("python" ,python)
875 ("gmp" ,gmp)))
876 (arguments
877 `(#:phases
878 (alist-cons-before
879 'build 'set-build-env
880 ;; pycrypto runs an autoconf configure script behind the scenes
881 (lambda _
882 (setenv "CONFIG_SHELL" (which "bash")))
883 %standard-phases)))
884 (home-page "http://www.pycrypto.org/")
885 (synopsis "Cryptographic modules for Python")
886 (description
887 "Pycrypto is a collection of both secure hash functions (such as SHA256
888and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 889etc.). The package is structured to make adding new modules easy.")
3f641af0 890 (license license:public-domain)))
cafc3f5a 891
345f0611 892(define-public python2-pycrypto
1c0059da
EF
893 (let ((pycrypto (package-with-python2 python-pycrypto)))
894 (package (inherit pycrypto)
895 (inputs
896 `(("python" ,python-2)
897 ,@(alist-delete
898 "python"
899 (package-inputs pycrypto)))))))
345f0611 900
cafc3f5a
EB
901(define-public python-keyring
902 (package
903 (name "python-keyring")
13f3ff35 904 (version "8.7")
cafc3f5a
EB
905 (source
906 (origin
907 (method url-fetch)
664e6c3a 908 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
909 (sha256
910 (base32
13f3ff35 911 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
912 (build-system python-build-system)
913 (native-inputs
13f3ff35 914 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 915 (propagated-inputs
cafc3f5a
EB
916 `(("python-pycrypto" ,python-pycrypto)))
917 (arguments
664e6c3a 918 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 919 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
920 (synopsis "Store and access your passwords safely")
921 (description
922 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 923service from python. It can be used in any application that needs safe
cafc3f5a
EB
924password storage.")
925 ;; "MIT" and PSF dual license
f210e944 926 (license license:x11)))
cafc3f5a 927
d7af1069 928(define-public python2-keyring
f210e944 929 (package-with-python2 python-keyring))
d7af1069 930
a480bc41
EB
931(define-public python-six
932 (package
933 (name "python-six")
b6ab89ef 934 (version "1.10.0")
a480bc41
EB
935 (source
936 (origin
937 (method url-fetch)
b6ab89ef 938 (uri (pypi-uri "six" version))
a480bc41
EB
939 (sha256
940 (base32
b6ab89ef 941 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 942 (build-system python-build-system)
a480bc41
EB
943 (home-page "http://pypi.python.org/pypi/six/")
944 (synopsis "Python 2 and 3 compatibility utilities")
945 (description
35b9e423 946 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
947functions for smoothing over the differences between the Python versions with
948the goal of writing Python code that is compatible on both Python versions.
35b9e423 949Six supports every Python version since 2.5. It is contained in only one
a480bc41 950Python file, so it can be easily copied into your project.")
3f641af0 951 (license license:x11)))
a480bc41 952
0c20025c
AE
953(define-public python2-six
954 (package-with-python2 python-six))
955
cafc3f5a
EB
956(define-public python-dateutil-2
957 (package
958 (name "python-dateutil")
394b8060 959 (version "2.5.2")
cafc3f5a
EB
960 (source
961 (origin
962 (method url-fetch)
394b8060 963 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
964 (sha256
965 (base32
394b8060 966 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 967 (build-system python-build-system)
f22efa01 968 (propagated-inputs
394b8060 969 `(("python-six" ,python-six)))
b5a5fb19 970 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
971 (synopsis "Extensions to the standard datetime module")
972 (description
973 "The dateutil module provides powerful extensions to the standard
974datetime module, available in Python 2.3+.")
f210e944 975 (license license:bsd-3)))
cafc3f5a
EB
976
977(define-public python2-dateutil-2
f210e944 978 (package-with-python2 python-dateutil-2))
cafc3f5a 979
fc50e9c6
AE
980(define-public python-dateutil
981 (package
982 (name "python-dateutil")
983 (version "1.5") ; last version for python < 3
984 (source
985 (origin
986 (method url-fetch)
cafc3f5a
EB
987 (uri (string-append "http://labix.org/download/python-dateutil/"
988 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
989 (sha256
990 (base32
991 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
992 (build-system python-build-system)
b5a5fb19 993 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 994 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
995 (description
996 "The dateutil module provides powerful extensions to the standard
997datetime module, available in Python 2.3+.")
3f641af0 998 (license license:psfl)))
fc50e9c6
AE
999
1000(define-public python2-dateutil
1001 (package-with-python2 python-dateutil))
1d08c01f 1002
cafc3f5a
EB
1003(define-public python-parsedatetime
1004 (package
1005 (name "python-parsedatetime")
eebf6f01 1006 (version "2.1")
cafc3f5a
EB
1007 (source
1008 (origin
1009 (method url-fetch)
eebf6f01 1010 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1011 (sha256
1012 (base32
eebf6f01 1013 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1014 (build-system python-build-system)
1015 (native-inputs
eebf6f01
EF
1016 `(("python-nose" ,python-nose)
1017 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1018 (home-page "http://github.com/bear/parsedatetime/")
1019 (synopsis
1020 "Parse human-readable date/time text")
1021 (description
e881752c 1022 "Parse human-readable date/time text.")
f210e944 1023 (license license:asl2.0)))
cafc3f5a 1024
38b8f9b2 1025(define-public python2-parsedatetime
f210e944 1026 (package-with-python2 python-parsedatetime))
38b8f9b2 1027
d072efcb
RW
1028(define-public python-pandas
1029 (package
1030 (name "python-pandas")
7d0c3c8d 1031 (version "0.18.1")
d072efcb
RW
1032 (source
1033 (origin
1b96f069 1034 (method url-fetch)
7d0c3c8d
EF
1035 (uri (string-append
1036 "https://pypi.python.org/packages/11/09/"
1037 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1038 "pandas-" version ".tar.gz"))
1b96f069 1039 (sha256
7d0c3c8d 1040 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1041 (build-system python-build-system)
d072efcb 1042 (propagated-inputs
f22efa01
HG
1043 `(("python-numpy" ,python-numpy)
1044 ("python-pytz" ,python-pytz)
d072efcb
RW
1045 ("python-dateutil" ,python-dateutil-2)))
1046 (native-inputs
abcc7a0e
HG
1047 `(("python-nose" ,python-nose)
1048 ("python-cython" ,python-cython)))
d072efcb
RW
1049 (home-page "http://pandas.pydata.org")
1050 (synopsis "Data structures for data analysis, time series, and statistics")
1051 (description
1052 "Pandas is a Python package providing fast, flexible, and expressive data
1053structures designed to make working with structured (tabular,
1054multidimensional, potentially heterogeneous) and time series data both easy
1055and intuitive. It aims to be the fundamental high-level building block for
1056doing practical, real world data analysis in Python.")
f210e944 1057 (license license:bsd-3)))
d072efcb
RW
1058
1059(define-public python2-pandas
f210e944 1060 (package-with-python2 python-pandas))
d072efcb 1061
cafc3f5a
EB
1062(define-public python-tzlocal
1063 (package
1064 (name "python-tzlocal")
ed80839b 1065 (version "1.2.2")
cafc3f5a
EB
1066 (source
1067 (origin
1068 (method url-fetch)
226d3331 1069 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1070 (sha256
1071 (base32
ed80839b 1072 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1073 (build-system python-build-system)
f22efa01
HG
1074 (propagated-inputs
1075 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1076 (home-page "https://github.com/regebro/tzlocal")
1077 (synopsis
35b9e423 1078 "Local timezone information for Python")
cafc3f5a
EB
1079 (description
1080 "Tzlocal returns a tzinfo object with the local timezone information.
1081This module attempts to fix a glaring hole in pytz, that there is no way to
1082get the local timezone information, unless you know the zoneinfo name, and
1083under several distributions that's hard or impossible to figure out.")
3f641af0 1084 (license license:cc0)))
cafc3f5a 1085
1d08c01f
AE
1086(define-public python2-pysqlite
1087 (package
1088 (name "python2-pysqlite")
fe476868 1089 (version "2.8.1")
1d08c01f
AE
1090 (source
1091 (origin
1092 (method url-fetch)
fe476868 1093 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1094 (sha256
1095 (base32
fe476868 1096 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1097 (build-system python-build-system)
1098 (inputs
1099 `(("sqlite" ,sqlite)))
1100 (arguments
1101 `(#:python ,python-2 ; incompatible with Python 3
1102 #:tests? #f)) ; no test target
fe476868 1103 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1104 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1105 (description
1106 "Pysqlite provides SQLite bindings for Python that comply to the
1107Database API 2.0T.")
ed0cdf83 1108 (license license:zlib)))
1d08c01f 1109
2875caf5
AE
1110
1111(define-public python2-mechanize
1112 (package
1113 (name "python2-mechanize")
1114 (version "0.2.5")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1119 version ".tar.gz"))
1120 (sha256
1121 (base32
1122 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1123 (build-system python-build-system)
2875caf5
AE
1124 (arguments
1125 `(#:python ,python-2 ; apparently incompatible with Python 3
1126 #:tests? #f))
1127 ;; test fails with message
1128 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1129 ;; (python-3.3.2) or
1130 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1131 ;; (python-2.7.5).
1132 ;; The source code is from March 2011 and probably not up-to-date
1133 ;; with respect to python unit tests.
1134 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1135 (synopsis
1136 "Stateful programmatic web browsing in Python")
1137 (description
1138 "Mechanize implements stateful programmatic web browsing in Python,
1139after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1140 (license (license:non-copyleft
1141 "file://COPYING"
1142 "See COPYING in the distribution."))))
2875caf5 1143
0352532e
AE
1144
1145(define-public python-simplejson
1146 (package
1147 (name "python-simplejson")
988d1bad 1148 (version "3.8.2")
0352532e
AE
1149 (source
1150 (origin
1151 (method url-fetch)
988d1bad 1152 (uri (pypi-uri "simplejson" version))
0352532e
AE
1153 (sha256
1154 (base32
988d1bad 1155 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1156 (build-system python-build-system)
1157 (home-page "http://simplejson.readthedocs.org/en/latest/")
1158 (synopsis
1159 "Json library for Python")
1160 (description
e881752c
AK
1161 "JSON (JavaScript Object Notation) is a subset of JavaScript
1162syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1163format.
0352532e
AE
1164
1165Simplejson exposes an API familiar to users of the standard library marshal
1166and pickle modules. It is the externally maintained version of the json
1167library contained in Python 2.6, but maintains compatibility with Python 2.5
1168and (currently) has significant performance advantages, even without using
1169the optional C extension for speedups. Simplejson is also supported on
1170Python 3.3+.")
3f641af0 1171 (license license:x11)))
0352532e
AE
1172
1173(define-public python2-simplejson
1174 (package-with-python2 python-simplejson))
421a80a2
AE
1175
1176
ed07b08d 1177(define-public python-pyicu
421a80a2 1178 (package
ed07b08d 1179 (name "python-pyicu")
d3b29319 1180 (version "1.9.2")
421a80a2
AE
1181 (source
1182 (origin
1183 (method url-fetch)
1184 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1185 version ".tar.gz"))
1186 (sha256
1187 (base32
d3b29319 1188 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1189 (build-system python-build-system)
1190 (inputs
1191 `(("icu4c" ,icu4c)))
421a80a2 1192 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1193 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1194 (description
1195 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1196 (license license:x11)))
ed07b08d
LF
1197
1198(define-public python2-pyicu
f210e944 1199 (package-with-python2 python-pyicu))
cc20a22a
LC
1200
1201(define-public python2-dogtail
1202 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1203 ;; spaces in indentation" with Python 3.
1204 (package
1205 (name "python2-dogtail")
1206 (version "0.8.2")
1207 (source (origin
1208 (method url-fetch)
1209 (uri (string-append
1210 "https://fedorahosted.org/released/dogtail/dogtail-"
1211 version ".tar.gz"))
1212 (sha256
1213 (base32
1214 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1215 (build-system python-build-system)
1216 (arguments `(#:python ,python-2
1217 #:tests? #f)) ; invalid command "test"
1218 (home-page "https://fedorahosted.org/dogtail/")
1219 (synopsis "GUI test tool and automation framework written in ​Python")
1220 (description
35b9e423 1221 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1222It uses Accessibility (a11y) technologies to communicate with desktop
1223applications. dogtail scripts are written in Python and executed like any
1224other Python program.")
3f641af0 1225 (license license:gpl2+)))
515e6878 1226
011b18c3
LC
1227(define-public python2-empy
1228 (package
1229 (name "python2-empy")
1230 (version "3.3")
1231 (source (origin
1232 (method url-fetch)
1233 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1234 version ".tar.gz"))
1235 (sha256
1236 (base32
1237 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1238 (build-system python-build-system)
1239 (arguments
1240 `(#:python ,python-2
1241 #:phases (alist-replace
1242 'check
1243 (lambda _
1244 (zero? (system* "./test.sh")))
1245 %standard-phases)))
1246 (home-page "http://www.alcyone.com/software/empy/")
1247 (synopsis "Templating system for Python")
1248 (description
1249 "EmPy is a system for embedding Python expressions and statements in
1250template text; it takes an EmPy source file, processes it, and produces
1251output. This is accomplished via expansions, which are special signals to the
1cd4027c 1252EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1253EmPy can expand arbitrary Python expressions and statements in this way, as
1254well as a variety of special forms. Textual data not explicitly delimited in
1255this way is sent unaffected to the output, allowing Python to be used in
1256effect as a markup language. Also supported are callbacks via hooks,
1257recording and playback via diversions, and dynamic, chainable filters. The
1258system is highly configurable via command line options and embedded
1259commands.")
3f641af0 1260 (license license:lgpl2.1+)))
011b18c3 1261
8deeda0c
LC
1262(define-public python2-element-tree
1263 (package
1264 (name "python2-element-tree")
1265 (version "1.2.6")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (string-append
1269 "http://effbot.org/media/downloads/elementtree-"
1270 version "-20050316.tar.gz"))
1271 (sha256
1272 (base32
1273 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1274 (build-system python-build-system)
1275 (arguments
1276 `(#:python ,python-2 ; seems to be part of Python 3
1277 #:tests? #f)) ; no 'test' sub-command
1278 (synopsis "Toolkit for XML processing in Python")
1279 (description
1280 "ElementTree is a Python library supporting lightweight XML processing.")
1281 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1282 (license (license:x11-style
1283 "http://docs.python.org/2/license.html"
1284 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1285
1286(define-public python2-pybugz
1287 (package
1288 (name "python2-pybugz")
1289 (version "0.6.11")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append
1293 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1294 version ".tar.gz"))
1295 (sha256
1296 (base32
6f194a1e 1297 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1298 (patches (search-patches "pybugz-stty.patch"
1299 "pybugz-encode-error.patch"))))
8deeda0c
LC
1300 (build-system python-build-system)
1301 (arguments
1302 `(#:python ,python-2 ; SyntaxError with Python 3
1303 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1304 (propagated-inputs
1305 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1306 (synopsis "Python and command-line interface to Bugzilla")
1307 (description
1308 "PyBugz is a Python library and command-line tool to query the Bugzilla
1309bug tracking system. It is meant as an aid to speed up interaction with the
1310bug tracker.")
1311 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1312 (license license:gpl2)))
8deeda0c 1313
a480bc41
EB
1314(define-public python-enum34
1315 (package
1316 (name "python-enum34")
d39ae1e5 1317 (version "1.1.0")
a480bc41
EB
1318 (source
1319 (origin
1320 (method url-fetch)
d39ae1e5 1321 (uri (pypi-uri "enum34" version))
a480bc41
EB
1322 (sha256
1323 (base32
d39ae1e5 1324 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1325 (build-system python-build-system)
a480bc41
EB
1326 (arguments
1327 `(#:phases
1328 (alist-replace
1329 'check
1330 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1331 %standard-phases)))
1332 (home-page "https://pypi.python.org/pypi/enum34")
1333 (synopsis "Backported Python 3.4 Enum")
1334 (description
1335 "Enum34 is the new Python stdlib enum module available in Python 3.4
1336backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1337 (license license:bsd-3)))
a480bc41 1338
820acd1b
LF
1339(define-public python2-enum34
1340 (package-with-python2 python-enum34))
1341
a480bc41
EB
1342(define-public python-parse-type
1343 (package
1344 (name "python-parse-type")
1345 (version "0.3.4")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (string-append "https://pypi.python.org/packages/source/p/"
1350 "parse_type/parse_type-" version ".tar.gz"))
1351 (sha256
1352 (base32
1353 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1354 (build-system python-build-system)
f22efa01 1355 (propagated-inputs
f3b98f4f 1356 `(("python-six" ,python-six)
68f1cdec 1357 ("python-parse" ,python-parse)))
a480bc41
EB
1358 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1359 (home-page "https://github.com/jenisys/parse_type")
1360 (synopsis "Extended parse module")
1361 (description
1362 "Parse_type extends the python parse module.")
3f641af0 1363 (license license:bsd-3)))
a480bc41
EB
1364
1365(define-public python-parse
1366 (package
1367 (name "python-parse")
eb3d3503 1368 (version "1.6.6")
a480bc41
EB
1369 (source
1370 (origin
1371 (method url-fetch)
eb3d3503 1372 (uri (pypi-uri "parse" version))
a480bc41
EB
1373 (sha256
1374 (base32
aa6c09ed
EF
1375 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1376 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:phases
f9a65318
EF
1380 (modify-phases %standard-phases
1381 (replace 'check
1382 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1383 (home-page "https://github.com/r1chardj0n3s/parse")
1384 (synopsis "Parse strings")
1385 (description
1386 "Parse strings using a specification based on the Python format()
1387syntax.")
3f641af0 1388 (license license:x11)))
a480bc41
EB
1389
1390
515e6878
LC
1391(define-public scons
1392 (package
1393 (name "scons")
a3f61425 1394 (version "2.3.4")
515e6878
LC
1395 (source (origin
1396 (method url-fetch)
de67e922
LF
1397 (uri (string-append "mirror://sourceforge/scons/scons/" version
1398 "/scons-" version ".tar.gz"))
515e6878
LC
1399 (sha256
1400 (base32
a3f61425 1401 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1402 (build-system python-build-system)
1403 (arguments
1404 ;; With Python 3.x, fails to build with a syntax error.
1405 `(#:python ,python-2
b3e8b4bd 1406 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1407 #:tests? #f)) ; no 'python setup.py test' command
1408 (home-page "http://scons.org/")
1409 (synopsis "Software construction tool written in Python")
1410 (description
1411 "SCons is a software construction tool. Think of SCons as an improved,
1412cross-platform substitute for the classic Make utility with integrated
1413functionality similar to autoconf/automake and compiler caches such as ccache.
1414In short, SCons is an easier, more reliable and faster way to build
1415software.")
3f641af0 1416 (license license:x11)))
011b18c3 1417
c15a5c0e
DT
1418(define-public python-extras
1419 (package
1420 (name "python-extras")
1421 (version "0.0.3")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "https://pypi.python.org/packages/source/e/extras/extras-"
1427 version ".tar.gz"))
1428 (sha256
1429 (base32
1430 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1431 (build-system python-build-system)
c15a5c0e
DT
1432 (arguments
1433 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1434 '(#:tests? #f))
1435 (home-page "https://github.com/testing-cabal/extras")
1436 (synopsis "Useful extensions to the Python standard library")
1437 (description
1438 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1439 (license license:expat)))
c15a5c0e
DT
1440
1441(define-public python2-extras
1442 (package-with-python2 python-extras))
1443
56ea0efd
DT
1444(define-public python-mimeparse
1445 (package
1446 (name "python-mimeparse")
1447 (version "0.1.4")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (string-append
1452 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1453 version ".tar.gz"))
1454 (sha256
1455 (base32
1456 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1457 (build-system python-build-system)
56ea0efd
DT
1458 (arguments
1459 '(#:tests? #f)) ; no setup.py test command
1460 (home-page
1461 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1462 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1463 (description
1464 "Mimeparse provides basic functions for parsing MIME type names and
1465matching them against a list of media-ranges.")
bd3fa666 1466 (license license:expat)))
56ea0efd
DT
1467
1468(define-public python2-mimeparse
1469 (package-with-python2 python-mimeparse))
1470
4435427e
DT
1471(define-public python-nose
1472 (package
1473 (name "python-nose")
f7cb9841 1474 (version "1.3.7")
4435427e
DT
1475 (source
1476 (origin
1477 (method url-fetch)
f7cb9841 1478 (uri (pypi-uri "nose" version))
4435427e
DT
1479 (sha256
1480 (base32
f7cb9841 1481 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1482 (build-system python-build-system)
4435427e
DT
1483 (arguments
1484 '(#:tests? #f)) ; FIXME: test suite fails
1485 (home-page "http://readthedocs.org/docs/nose/")
1486 (synopsis "Python testing library")
1487 (description
1488 "Nose extends the unittest library to make testing easier.")
3f641af0 1489 (license license:lgpl2.0+)))
4435427e
DT
1490
1491(define-public python2-nose
1492 (package-with-python2 python-nose))
1493
0aea283a
EF
1494(define-public python-nose2
1495 (package
1496 (name "python-nose2")
1497 (version "0.6.5")
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (pypi-uri "nose2" version))
1502 (sha256
1503 (base32
1504 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1505 (build-system python-build-system)
1506 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1507 (propagated-inputs
0aea283a
EF
1508 `(("python-cov-core" ,python-cov-core)
1509 ("python-pytest-cov" ,python-pytest-cov)
1510 ("python-six" ,python-six)))
1511 (home-page "https://github.com/nose-devs/nose2")
1512 (synopsis "Next generation of nicer testing for Python")
1513 (description
1514 "Nose2 is the next generation of nicer testing for Python, based on the
1515plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1516better plugin api, being easier for users to configure, and simplifying internal
1517interfaces and processes.")
1518 (license license:bsd-2)))
1519
1520(define-public python2-nose2
1521 (package-with-python2 python-nose2))
1522
6cd9c356
DT
1523(define-public python-unittest2
1524 (package
1525 (name "python-unittest2")
1526 (version "0.5.1")
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (string-append
1531 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1532 version ".tar.gz"))
1533 (sha256
1534 (base32
1535 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1536 (build-system python-build-system)
6cd9c356
DT
1537 (home-page "http://pypi.python.org/pypi/unittest2")
1538 (synopsis "Python unit testing library")
1539 (description
1540 "Unittest2 is a replacement for the unittest module in the Python
1541standard library.")
3f641af0 1542 (license license:psfl)))
6cd9c356
DT
1543
1544(define-public python2-unittest2
1545 (package (inherit python-unittest2)
1546 (name "python2-unittest2")
1547 (version "0.5.1")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1557 (arguments
1558 `(#:python ,python-2
1559 #:tests? #f)))) ; no setup.py test command
1560
02f8f804 1561(define-public python-pafy
1562 (package
1563 (name "python-pafy")
1564 (version "0.5.2")
1565 (source
1566 (origin
1567 (method url-fetch)
1568 (uri (pypi-uri "pafy" version))
1569 (sha256
1570 (base32
1571 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1572 (build-system python-build-system)
1573 (propagated-inputs
1574 ;; Youtube-dl is a python package which is imported in the file
1575 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1576 `(("youtube-dl" ,youtube-dl)))
1577 (home-page "https://np1.github.io/pafy/")
1578 (synopsis "Retrieve YouTube content and metadata")
1579 (description
1580 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1581 (license license:lgpl3+)))
1582
542ad60f
DT
1583(define-public python-py
1584 (package
1585 (name "python-py")
71c8a804 1586 (version "1.4.31")
542ad60f
DT
1587 (source
1588 (origin
1589 (method url-fetch)
71c8a804 1590 (uri (pypi-uri "py" version))
542ad60f
DT
1591 (sha256
1592 (base32
71c8a804 1593 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1594 (build-system python-build-system)
542ad60f
DT
1595 (home-page "http://pylib.readthedocs.org/")
1596 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1597 (description
1598 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1599code introspection, and logging.")
bd3fa666 1600 (license license:expat)))
542ad60f
DT
1601
1602(define-public python2-py
1603 (package-with-python2 python-py))
1604
855d4761
DT
1605(define-public python-pytest
1606 (package
1607 (name "python-pytest")
61a4332d 1608 (version "2.7.3")
855d4761
DT
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (string-append
1613 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1614 version ".tar.gz"))
1615 (sha256
1616 (base32
61a4332d 1617 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1618 (modules '((guix build utils)))
1619 (snippet
1620 ;; One of the tests involves the /usr directory, so it fails.
1621 '(substitute* "testing/test_argcomplete.py"
1622 (("def test_remove_dir_prefix\\(self\\):")
1623 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1624 (build-system python-build-system)
482d9591
HG
1625 (propagated-inputs
1626 `(("python-py" ,python-py)))
e7881f3d 1627 (native-inputs
482d9591 1628 `(("python-nose" ,python-nose)
855d4761
DT
1629 ("python-mock" ,python-mock)))
1630 (home-page "http://pytest.org")
1631 (synopsis "Python testing library")
1632 (description
1633 "Pytest is a testing tool that provides auto-discovery of test modules
1634and functions, detailed info on failing assert statements, modular fixtures,
1635and many external plugins.")
bd3fa666 1636 (license license:expat)))
855d4761
DT
1637
1638(define-public python2-pytest
1639 (package-with-python2 python-pytest))
1640
fca4ff35
LF
1641;; This package is used by Borg until we can upgrade all our Python packages to
1642;; use a more recent pytest.
1643(define-public python-pytest-2.9.2
1644 (package
1645 (inherit python-pytest)
1646 (name "python-pytest")
1647 (version "2.9.2")
1648 (source (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "pytest" version))
1651 (sha256
1652 (base32
1653 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1654 (arguments
1655 `(#:phases
1656 (modify-phases %standard-phases
1657 (add-before 'check 'disable-invalid-test
1658 (lambda _
1659 (substitute* "testing/test_argcomplete.py"
1660 (("def test_remove_dir_prefix" line)
1661 (string-append "@pytest.mark.skip"
1662 "(reason=\"Assumes that /usr exists.\")\n "
1663 line)))
1664 #t)))))))
1665
358c3d61
EF
1666(define-public python-pytest-cov
1667 (package
1668 (name "python-pytest-cov")
545f4a1c 1669 (version "2.2.1")
358c3d61
EF
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "pytest-cov" version))
1674 (sha256
545f4a1c
EF
1675 (base32
1676 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1677 (build-system python-build-system)
ce40b383
HG
1678 (arguments
1679 `(#:phases
1680 (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 ;; options taken from tox.ini
1684 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1685 ;; with "Duplicate implicit target name"
1686 (zero? (system* "python" "./setup.py" "check"
1687 "--strict" "--metadata")))))))
f22efa01 1688 (propagated-inputs
10468636
EF
1689 `(("python-coverage" ,python-coverage)
1690 ("python-pytest" ,python-pytest)))
10468636
EF
1691 (home-page "https://github.com/pytest-dev/pytest-cov")
1692 (synopsis "Pytest plugin for measuring coverage")
1693 (description
1694 "Pytest-cov produces coverage reports. It supports centralised testing and
1695distributed testing in both @code{load} and @code{each} modes. It also
1696supports coverage of subprocesses.")
f210e944 1697 (license license:expat)))
358c3d61
EF
1698
1699(define-public python2-pytest-cov
f210e944 1700 (package-with-python2 python-pytest-cov))
358c3d61 1701
6784f2e3
RW
1702(define-public python-pytest-runner
1703 (package
1704 (name "python-pytest-runner")
1705 (version "2.6.2")
1706 (source
1707 (origin
1708 (method url-fetch)
54cd239b 1709 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1710 (sha256
1711 (base32
1712 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1713 (build-system python-build-system)
1714 (arguments
1715 `(#:phases
1716 (modify-phases %standard-phases
1717 ;; The fancy way of setting the version with setuptools_scm does not
1718 ;; seem to work here.
1719 (add-after 'unpack 'set-version
1720 (lambda _
1721 (substitute* "docs/conf.py"
1722 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1723 (string-append "version = \"" ,version "\"")))
1724 #t)))))
1725 (native-inputs
1726 `(("python-pytest" ,python-pytest)
1727 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1728 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1729 (synopsis "Invoke py.test as a distutils command")
1730 (description
1731 "This package provides a @command{pytest-runner} command that
1732@file{setup.py} files can use to run tests.")
f210e944 1733 (license license:expat)))
54cd239b
EF
1734
1735(define-public python2-pytest-runner
f210e944 1736 (package-with-python2 python-pytest-runner))
6784f2e3 1737
44547e51
EF
1738(define-public python-pytest-mock
1739 (package
1740 (name "python-pytest-mock")
1741 (version "1.2")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "pytest-mock" version ".zip"))
1746 (sha256
1747 (base32
1748 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1749 (build-system python-build-system)
1750 (native-inputs
1751 `(("unzip" ,unzip)))
f22efa01 1752 (propagated-inputs
d5e41cf2 1753 `(("python-pytest" ,python-pytest)))
44547e51
EF
1754 (home-page "https://github.com/pytest-dev/pytest-mock/")
1755 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1756 (description
1757 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1758around the patching API provided by the @code{mock} package, but with the
1759benefit of not having to worry about undoing patches at the end of a test.
1760The mocker fixture has the same API as @code{mock.patch}, supporting the
1761same arguments.")
1762 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1763 (license license:expat)))
1764
1765(define-public python2-pytest-mock
1766 (let ((base (package-with-python2
1767 (strip-python2-variant python-pytest-mock))))
1768 (package (inherit base)
f22efa01 1769 (propagated-inputs
44547e51 1770 `(("python2-mock" ,python2-mock)
f22efa01 1771 ,@(package-propagated-inputs base))))))
44547e51 1772
8fa58fc9
CAW
1773(define-public python-pytest-xdist
1774 (package
1775 (name "python-pytest-xdist")
1776 (version "1.14")
1777 (source
1778 (origin
1779 (method url-fetch)
1780 (uri (pypi-uri "pytest-xdist" version ".zip"))
1781 (sha256
1782 (base32
de585a7e
HG
1783 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1784 (modules '((guix build utils)))
1785 (snippet
1786 '(begin
1787 ;; Remove pre-compiled .pyc files from source.
1788 (for-each delete-file-recursively
1789 (find-files "." "__pycache__" #:directories? #t))
1790 (for-each delete-file (find-files "." "\\.pyc$"))
1791 #t))))
8fa58fc9
CAW
1792 (build-system python-build-system)
1793 (native-inputs
1794 `(("unzip" ,unzip)
8fa58fc9 1795 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1796 (propagated-inputs
c4516ad2 1797 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1798 ("python-pytest" ,python-pytest)
1799 ("python-py" ,python-py)))
1800 (home-page
1801 "https://github.com/pytest-dev/pytest-xdist")
1802 (synopsis
1803 "Plugin for py.test with distributed testing and loop-on-failing modes")
1804 (description
1805 "The pytest-xdist plugin extends py.test with some unique test execution
1806modes: parallelization, running tests in boxed subprocesses, the ability
1807to run tests repeatedly when failed, and the ability to run tests on multiple
1808Python interpreters or platforms. It uses rsync to copy the existing
1809program code to a remote location, executes there, and then syncs the
1810result back.")
f210e944 1811 (license license:expat)))
8fa58fc9
CAW
1812
1813(define-public python2-pytest-xdist
f210e944 1814 (package-with-python2 python-pytest-xdist))
8fa58fc9 1815
84d24017
DT
1816(define-public python-scripttest
1817 (package
1818 (name "python-scripttest")
1819 (version "1.3")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (string-append
1824 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1825 version ".tar.gz"))
1826 (sha256
1827 (base32
1828 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1829 (build-system python-build-system)
521b7772 1830 (native-inputs
f3b98f4f 1831 `(("python-pytest" ,python-pytest)))
84d24017
DT
1832 (home-page "http://pythonpaste.org/scripttest/")
1833 (synopsis "Python library to test command-line scripts")
1834 (description "Scripttest is a Python helper library for testing
1835interactive command-line applications. With it you can run a script in a
1836subprocess and see the output as well as any file modifications.")
bd3fa666 1837 (license license:expat)))
84d24017
DT
1838
1839(define-public python2-scripttest
1840 (package-with-python2 python-scripttest))
1841
d8fa80e1
DT
1842(define-public python-testtools
1843 (package
1844 (name "python-testtools")
1845 (version "1.0.0")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (string-append
1850 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1851 version ".tar.gz"))
1852 (sha256
1853 (base32
1854 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1855 (build-system python-build-system)
0e88cbf8 1856 (propagated-inputs
f22efa01
HG
1857 `(("python-mimeparse" ,python-mimeparse)
1858 ("python-extras" ,python-extras)))
d8fa80e1
DT
1859 (home-page "https://github.com/testing-cabal/testtools")
1860 (synopsis
1861 "Extensions to the Python standard library unit testing framework")
1862 (description
1863 "Testtools extends the Python standard library unit testing framework to
1864provide matchers, more debugging information, and cross-Python
1865compatibility.")
3f641af0 1866 (license license:psfl)))
d8fa80e1
DT
1867
1868(define-public python2-testtools
1869 (package-with-python2 python-testtools))
1870
5bf3afea
DT
1871(define-public python-testscenarios
1872 (package
1873 (name "python-testscenarios")
1874 (version "0.4")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (string-append
1879 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1880 version ".tar.gz"))
1881 (sha256
1882 (base32
1883 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1884 (build-system python-build-system)
f22efa01 1885 (propagated-inputs
8e73d3ba 1886 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1887 (home-page "https://launchpad.net/testscenarios")
1888 (synopsis "Pyunit extension for dependency injection")
1889 (description
1890 "Testscenarios provides clean dependency injection for Python unittest
1891style tests.")
3f641af0 1892 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1893
1894(define-public python2-testscenarios
1895 (package-with-python2 python-testscenarios))
1896
dac79ecc
DT
1897(define-public python-testresources
1898 (package
1899 (name "python-testresources")
1900 (version "0.2.7")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (string-append
1905 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1906 version ".tar.gz"))
1907 (sha256
1908 (base32
1909 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1910 (build-system python-build-system)
dac79ecc
DT
1911 (home-page "https://launchpad.net/testresources")
1912 (synopsis
1913 "Pyunit extension for managing test resources")
1914 (description
1915 "Testresources is an extension to Python's unittest to allow declarative
1916use of resources by test cases.")
3f641af0 1917 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1918
1919(define-public python2-testresources
1920 (package-with-python2 python-testresources))
1921
070ab058
DT
1922(define-public python-subunit
1923 (package
1924 (name "python-subunit")
1925 (version "0.0.21")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (string-append
1930 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1931 version ".tar.gz"))
1932 (sha256
1933 (base32
1934 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1935 (build-system python-build-system)
f22efa01 1936 (propagated-inputs
b52ad371
HG
1937 `(("python-extras" ,python-extras)
1938 ("python-mimeparse" ,python-mimeparse)))
1939 (native-inputs
1940 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1941 (home-page "http://launchpad.net/subunit")
1942 (synopsis "Python implementation of the subunit protocol")
1943 (description
1944 "Python-subunit is a Python implementation of the subunit test streaming
1945protocol.")
3f641af0 1946 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1947
1948(define-public python2-subunit
1949 (package-with-python2 python-subunit))
1950
d2a8db92
HG
1951;; Recent versions of python-fixtures and python-testrepository need
1952;; python-pbr for packaging, which itself needs these two packages for
1953;; testing.
1954;; To fix this circular dependency, we use a build of python-pbr, based on the
1955;; same source, just without any test dependencies and with tests disabled.
1956;; python-pbr-minmal is then used to package python-fixtures and
1957;; python-testrepository.
1958;; Strictly speaking we currently could remove the test-requirements from the
1959;; normal python-pbr package (and save this package) since test are disabled
1960;; there anyway. But this may change in future.
1961(define python-pbr-minimal
cd49454b 1962 (package
d2a8db92
HG
1963 (name "python-pbr-minimal")
1964 (version "1.8.1")
7787ef76
CR
1965 (source
1966 (origin
1967 (method url-fetch)
d2a8db92 1968 (uri (pypi-uri "pbr" version))
7787ef76
CR
1969 (sha256
1970 (base32
d2a8db92 1971 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
1972 (build-system python-build-system)
1973 (arguments
d2a8db92
HG
1974 `(#:tests? #f))
1975 (home-page "http://docs.openstack.org/developer/pbr/")
1976 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 1977 (description
d2a8db92 1978 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 1979 (license license:asl2.0)))
7787ef76 1980
d2a8db92
HG
1981(define python2-pbr-minimal
1982 (package-with-python2 python-pbr-minimal))
7787ef76 1983
1ef09c0c 1984(define-public python-pbr
e25f0174 1985 (package
d2a8db92 1986 (inherit python-pbr-minimal)
e25f0174 1987 (name "python-pbr")
e25f0174
BW
1988 (arguments
1989 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1990 (propagated-inputs
d2a8db92
HG
1991 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1992 (native-inputs
e25f0174 1993 `(("python-fixtures" ,python-fixtures)
d2a8db92 1994 ;; discover, coverage, hacking, subunit
e25f0174 1995 ("python-mock" ,python-mock)
d2a8db92 1996 ("python-six" ,python-six)
e25f0174
BW
1997 ("python-sphinx" ,python-sphinx)
1998 ("python-testrepository" ,python-testrepository)
1999 ("python-testresources" ,python-testresources)
2000 ("python-testscenarios" ,python-testscenarios)
2001 ("python-testtools" ,python-testtools)
2002 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2003 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2004 (description
2005 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2006and sensible default behaviors into your setuptools run. It will set
2007versions, process requirements files and generate AUTHORS and ChangeLog file
2008from git information.
2009")))
1ef09c0c
BW
2010
2011(define-public python2-pbr
e25f0174 2012 (package-with-python2 python-pbr))
1ef09c0c 2013
7787ef76
CR
2014(define-public python-fixtures
2015 (package
2016 (name "python-fixtures")
13fcc6df 2017 (version "1.4.0")
7787ef76
CR
2018 (source
2019 (origin
2020 (method url-fetch)
13fcc6df 2021 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2022 (sha256
2023 (base32
13fcc6df 2024 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2025 (build-system python-build-system)
2026 (propagated-inputs
ae92cadd 2027 `(("python-six" ,python-six)))
e7881f3d 2028 (native-inputs
d2a8db92 2029 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2030 ("python-testtools" ,python-testtools)))
7787ef76
CR
2031 (home-page "https://launchpad.net/python-fixtures")
2032 (synopsis "Python test fixture library")
2033 (description
2034 "Fixtures provides a way to create reusable state, useful when writing
2035Python tests.")
3f641af0 2036 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2037
cd49454b
DT
2038(define-public python2-fixtures
2039 (package-with-python2 python-fixtures))
2040
b24a0c00
DT
2041(define-public python-testrepository
2042 (package
2043 (name "python-testrepository")
2044 (version "0.0.20")
2045 (source
2046 (origin
2047 (method url-fetch)
2048 (uri (string-append
2049 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2050 version ".tar.gz"))
2051 (sha256
2052 (base32
2053 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2054 (build-system python-build-system)
05de40c5 2055 (propagated-inputs
b2e66edf
HG
2056 `(("python-fixtures" ,python-fixtures)
2057 ("python-subunit" ,python-subunit)
b52ad371
HG
2058 ("python-testtools" ,python-testtools)))
2059 (native-inputs
2060 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2061 ("python-mimeparse" ,python-mimeparse)))
2062 (home-page "https://launchpad.net/testrepository")
2063 (synopsis "Database for Python test results")
2064 (description "Testrepository provides a database of test results which can
2065be used as part of a developer's workflow to check things such as what tests
2066have failed since the last commit or what tests are currently failing.")
3f641af0 2067 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2068
2069(define-public python2-testrepository
2070 (package-with-python2 python-testrepository))
2071
243a009a
DT
2072(define-public python-coverage
2073 (package
2074 (name "python-coverage")
4d4cf3dd 2075 (version "4.1")
243a009a
DT
2076 (source
2077 (origin
2078 (method url-fetch)
82a3c582 2079 (uri (pypi-uri "coverage" version))
243a009a
DT
2080 (sha256
2081 (base32
4d4cf3dd 2082 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2083 (build-system python-build-system)
243a009a
DT
2084 (home-page "http://nedbatchelder.com/code/coverage")
2085 (synopsis "Code coverage measurement for Python")
2086 (description
2087 "Coverage measures code coverage, typically during test execution. It
2088uses the code analysis tools and tracing hooks provided in the Python standard
2089library to determine which lines are executable, and which have been
2090executed.")
3f641af0 2091 (license license:bsd-3)))
243a009a
DT
2092
2093(define-public python2-coverage
2094 (package-with-python2 python-coverage))
2095
12f839fd
EF
2096(define-public python-cov-core
2097 (package
2098 (name "python-cov-core")
2099 (version "1.15.0")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "cov-core" version))
2104 (sha256
2105 (base32
2106 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2107 (build-system python-build-system)
f78e1c27 2108 (propagated-inputs
12f839fd
EF
2109 `(("python-coverage" ,python-coverage)))
2110 (home-page "https://github.com/schlamar/cov-core")
2111 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2112 (description
2113 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2114It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2115 (license license:expat)))
12f839fd
EF
2116
2117(define-public python2-cov-core
f210e944 2118 (package-with-python2 python-cov-core))
12f839fd 2119
041358fb
DT
2120(define-public python-discover
2121 (package
2122 (name "python-discover")
2123 (version "0.4.0")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (string-append
2128 "https://pypi.python.org/packages/source/d/discover/discover-"
2129 version ".tar.gz"))
2130 (sha256
2131 (base32
2132 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2133 (build-system python-build-system)
041358fb
DT
2134 (home-page "http://pypi.python.org/pypi/discover/")
2135 (synopsis
2136 "Python test discovery for unittest")
2137 (description
2138 "Discover provides test discovery for unittest, a feature that has been
e881752c 2139backported from Python 2.7 for Python 2.4+.")
3f641af0 2140 (license license:bsd-3)))
041358fb
DT
2141
2142(define-public python2-discover
2143 (package-with-python2 python-discover))
2144
a480bc41
EB
2145(define-public behave
2146 (package
2147 (name "behave")
287cfd1a 2148 (version "1.2.5")
a480bc41
EB
2149 (source (origin
2150 (method url-fetch)
287cfd1a 2151 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2152 (sha256
2153 (base32
287cfd1a 2154 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2155 (build-system python-build-system)
f22efa01 2156 (propagated-inputs
f3b98f4f 2157 `(("python-six" ,python-six)
a480bc41
EB
2158 ("python-parse" ,python-parse)
2159 ("python-parse-type" ,python-parse-type)))
2160 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2161 ;PyHamcrest>=1.8
2162 (home-page "http://github.com/behave/behave")
2163 (synopsis "Python behavior-driven development")
2164 (description
2165 "Behave is a tool for behavior-driven development in python.
2166Behavior-driven development (or BDD) is an agile software development
2167technique that encourages collaboration between developers, QA and
2168non-technical or business participants in a software project. Behave uses
2169tests written in a natural language style, backed up by Python code.")
3f641af0 2170 (license license:x11)))
c7303d3c
DT
2171
2172(define-public python-exif-read
2173 (package
2174 (name "python-exif-read")
2a2d0981 2175 (version "2.1.2")
c7303d3c
DT
2176 (source (origin
2177 (method url-fetch)
2a2d0981 2178 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2179 (sha256
2180 (base32
2a2d0981 2181 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2182 (build-system python-build-system)
c7303d3c
DT
2183 (arguments `(#:tests? #f)) ; no tests
2184 (home-page "https://github.com/ianare/exif-py")
2185 (synopsis "Python library to extract EXIF data from image files")
2186 (description
2187 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2188files.")
3f641af0 2189 (license license:bsd-3)))
c7303d3c
DT
2190
2191(define-public python2-exif-read
2192 (package-with-python2 python-exif-read))
d5f89b22
DT
2193
2194(define-public python-pyld
2195 (package
2196 (name "python-pyld")
af1ab773 2197 (version "0.6.8")
d5f89b22
DT
2198 (source (origin
2199 (method url-fetch)
af1ab773 2200 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2201 (sha256
2202 (base32
af1ab773 2203 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22 2204 (build-system python-build-system)
d5f89b22
DT
2205 (arguments `(#:tests? #f)) ; no tests
2206 (home-page "http://github.com/digitalbazaar/pyld")
2207 (synopsis "Python implementation of the JSON-LD specification")
2208 (description
2209 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2210 (license license:bsd-3)))
d5f89b22
DT
2211
2212(define-public python2-pyld
2213 (package-with-python2 python-pyld))
3a1f9a68
DT
2214
2215(define-public python-certifi
2216 (package
2217 (name "python-certifi")
b2a2232c 2218 (version "2016.8.31")
3a1f9a68
DT
2219 (source (origin
2220 (method url-fetch)
9a41f443 2221 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2222 (sha256
2223 (base32
b2a2232c 2224 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2225 (build-system python-build-system)
3a1f9a68
DT
2226 (arguments `(#:tests? #f)) ; no tests
2227 (home-page "http://python-requests.org/")
2228 (synopsis "Python CA certificate bundle")
2229 (description
2230 "Certifi is a Python library that contains a CA certificate bundle, which
2231is used by the Requests library to verify HTTPS requests.")
3f641af0 2232 (license license:asl2.0)))
3a1f9a68
DT
2233
2234(define-public python2-certifi
2235 (package-with-python2 python-certifi))
e6cfbd36 2236
12c270dd
RW
2237(define-public python-click
2238 (package
2239 (name "python-click")
43accb58 2240 (version "6.6")
12c270dd
RW
2241 (source
2242 (origin
2243 (method url-fetch)
375f224b 2244 (uri (pypi-uri "click" version))
12c270dd 2245 (sha256
43accb58
LF
2246 (base32
2247 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2248 (build-system python-build-system)
e2ab5a09
BW
2249 (arguments
2250 `(#:phases
2251 (modify-phases %standard-phases
2252 (add-after 'unpack 'fix-paths
2253 (lambda* (#:key inputs #:allow-other-keys)
2254 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2255 "cross-libc" "libc"))))
2256 (substitute* "click/_unicodefun.py"
2257 (("'locale'")
2258 (string-append "'" glibc "/bin/locale'"))))
2259 #t)))))
12c270dd
RW
2260 (home-page "http://click.pocoo.org")
2261 (synopsis "Command line library for Python")
2262 (description
2263 "Click is a Python package for creating command line interfaces in a
2264composable way with as little code as necessary. Its name stands for
2265\"Command Line Interface Creation Kit\". It's highly configurable but comes
2266with sensible defaults out of the box.")
3f641af0 2267 (license license:bsd-3)))
12c270dd
RW
2268
2269(define-public python2-click
2270 (package-with-python2 python-click))
2271
addc808d
EF
2272(define-public python-wheel
2273 (package
2274 (name "python-wheel")
40981b5c 2275 (version "0.29.0")
e1ba0749
EF
2276 (source
2277 (origin
2278 (method url-fetch)
2279 (uri (pypi-uri "wheel" version))
2280 (sha256
2281 (base32
40981b5c 2282 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2283 (build-system python-build-system)
2284 (native-inputs
f3b98f4f 2285 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2286 ("python-pytest-cov" ,python-pytest-cov)))
2287 (home-page "https://bitbucket.org/pypa/wheel/")
2288 (synopsis "Format for built Python packages")
2289 (description
2290 "A wheel is a ZIP-format archive with a specially formatted filename and
2291the @code{.whl} extension. It is designed to contain all the files for a PEP
2292376 compatible install in a way that is very close to the on-disk format. Many
2293packages will be properly installed with only the @code{Unpack} step and the
2294unpacked archive preserves enough information to @code{Spread} (copy data and
2295scripts to their final locations) at any later time. Wheel files can be
2296installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2297 (license license:expat)
2298 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2299
2300(define-public python2-wheel
8ad4ae20
LF
2301 (let ((wheel (package-with-python2
2302 (strip-python2-variant python-wheel))))
264ae686 2303 (package (inherit wheel)
8ad4ae20
LF
2304 (native-inputs `(("python2-functools32" ,python2-functools32)
2305 ,@(package-native-inputs wheel))))))
2306
addc808d 2307
ae641128 2308(define-public python-requests
e6cfbd36 2309 (package
ae641128 2310 (name "python-requests")
74a066f9 2311 (version "2.9.1")
e6cfbd36
DT
2312 (source (origin
2313 (method url-fetch)
5d691657 2314 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2315 (sha256
2316 (base32
74a066f9 2317 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2318 (build-system python-build-system)
5d691657 2319 (native-inputs
f3b98f4f 2320 `(("python-py" ,python-py)
5d691657
EF
2321 ("python-pytest" ,python-pytest)
2322 ("python-pytest-cov" ,python-pytest-cov)
2323 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2324 (home-page "http://python-requests.org/")
2325 (synopsis "Python HTTP library")
2326 (description
2327 "Requests is a Python HTTP client library. It aims to be easier to use
2328than Python’s urllib2 library.")
3f641af0 2329 (license license:asl2.0)))
864b5211 2330
e9005180
DT
2331;; Some software requires an older version of Requests, notably Docker
2332;; Compose.
2333(define-public python-requests-2.7
2334 (package (inherit python-requests)
2335 (version "2.7.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "requests" version))
2339 (sha256
2340 (base32
2341 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2342
ae641128 2343(define-public python2-requests
8ad4ae20 2344 (package-with-python2 python-requests))
ae641128 2345
ea521b42
DT
2346(define-public python-vcversioner
2347 (package
2348 (name "python-vcversioner")
538fe019 2349 (version "2.16.0.0")
ea521b42
DT
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "vcversioner" version))
2354 (sha256
2355 (base32
538fe019 2356 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2357 (build-system python-build-system)
ea521b42
DT
2358 (synopsis "Python library for version number discovery")
2359 (description "Vcversioner is a Python library that inspects tagging
2360information in a variety of version control systems in order to discover
2361version numbers.")
2362 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2363 (license license:isc)))
ea521b42
DT
2364
2365(define-public python2-vcversioner
f210e944 2366 (package-with-python2 python-vcversioner))
ae641128 2367
864b5211
DT
2368(define-public python-jsonschema
2369 (package
2370 (name "python-jsonschema")
b3667afb 2371 (version "2.5.1")
864b5211
DT
2372 (source (origin
2373 (method url-fetch)
2374 (uri
2375 (string-append
2376 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2377 version ".tar.gz"))
2378 (sha256
2379 (base32
b3667afb 2380 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2381 (build-system python-build-system)
8bcd6b91
EF
2382 (arguments
2383 '(#:phases
2384 (modify-phases %standard-phases
2385 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2386 (native-inputs
8bcd6b91
EF
2387 `(("python-nose" ,python-nose)
2388 ("python-vcversioner" ,python-vcversioner)))
2389 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2390 (synopsis "Implementation of JSON Schema for Python")
2391 (description
2392 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2393 (license license:expat)
2394 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2395
2396(define-public python2-jsonschema
a14600ec
LF
2397 (let ((jsonschema (package-with-python2
2398 (strip-python2-variant python-jsonschema))))
264ae686 2399 (package (inherit jsonschema)
eaba9d66 2400 (native-inputs
8bcd6b91 2401 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2402 ,@(package-native-inputs jsonschema)))
2403 (propagated-inputs
2404 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2405
2406(define-public python-unidecode
2407 (package
2408 (name "python-unidecode")
8925d4f3 2409 (version "0.04.18")
850189b8
DT
2410 (source (origin
2411 (method url-fetch)
8925d4f3 2412 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2413 (sha256
2414 (base32
8925d4f3 2415 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2416 (build-system python-build-system)
850189b8
DT
2417 (home-page "https://pypi.python.org/pypi/Unidecode")
2418 (synopsis "ASCII transliterations of Unicode text")
2419 (description
2420 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2421useful when integrating with legacy code that doesn't support Unicode, or for
2422ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2423machine identifiers from human-readable Unicode strings that should still be
2424somewhat intelligeble.")
3f641af0 2425 (license license:gpl2+)))
850189b8
DT
2426
2427(define-public python2-unidecode
2428 (package-with-python2 python-unidecode))
6d45fef4
DT
2429
2430(define-public python-pyjwt
2431 (package
2432 (name "python-pyjwt")
eb31d4b4 2433 (version "1.4.0")
6d45fef4
DT
2434 (source
2435 (origin
2436 (method url-fetch)
eb31d4b4 2437 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2438 (sha256
2439 (base32
eb31d4b4 2440 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2441 (build-system python-build-system)
eb31d4b4 2442 (native-inputs
130fe994
HG
2443 `(("python-pytest" ,python-pytest)
2444 ("python-pytest-cov" ,python-pytest-cov)
2445 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2446 (home-page "http://github.com/progrium/pyjwt")
2447 (synopsis "JSON Web Token implementation in Python")
2448 (description
2449 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2450 (license license:expat)))
6d45fef4
DT
2451
2452(define-public python2-pyjwt
2453 (package-with-python2 python-pyjwt))
2454
2cec1f6f
DT
2455(define-public python-oauthlib
2456 (package
2457 (name "python-oauthlib")
bde2171d 2458 (version "1.0.3")
2cec1f6f
DT
2459 (source (origin
2460 (method url-fetch)
bde2171d 2461 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2462 (sha256
2463 (base32
bde2171d 2464 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2465 (build-system python-build-system)
bde2171d 2466 (native-inputs
bb06aa34 2467 `(("python-nose" ,python-nose)
bde2171d 2468 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2469 ("python-pyjwt" ,python-pyjwt)
2470 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2471 (home-page "https://github.com/idan/oauthlib")
2472 (synopsis "OAuth implementation for Python")
2473 (description
2474 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2475OAuth request-signing logic.")
3f641af0 2476 (license license:bsd-3)
59f151ec 2477 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2478
2479(define-public python2-oauthlib
59f151ec 2480 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2481 (package
2482 (inherit base)
00e10c6e 2483 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2484 ("python2-mock" ,python2-mock)
59f151ec 2485 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2486
2487(define-public python-itsdangerous
2488 (package
2489 (name "python-itsdangerous")
2490 (version "0.24")
2491 (source
2492 (origin
2493 (method url-fetch)
2494 (uri (string-append
2495 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2496 version ".tar.gz"))
2497 (sha256
2498 (base32
2499 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2500 (build-system python-build-system)
ec5dbb5c
DT
2501 (home-page "http://github.com/mitsuhiko/itsdangerous")
2502 (synopsis "Python library for passing data to/from untrusted environments")
2503 (description
2504 "Itsdangerous provides various helpers to pass trusted data to untrusted
2505environments and back.")
f210e944 2506 (license license:bsd-3)))
ec5dbb5c
DT
2507
2508(define-public python2-itsdangerous
f210e944 2509 (package-with-python2 python-itsdangerous))
5731cae3 2510
8d12be1e
RW
2511(define-public python-pyyaml
2512 (package
2513 (name "python-pyyaml")
2514 (version "3.11")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (string-append
2519 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2520 version ".tar.gz"))
2521 (sha256
2522 (base32
2523 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2524 (build-system python-build-system)
2525 (inputs
2526 `(("libyaml" ,libyaml)))
8d12be1e
RW
2527 (home-page "http://pyyaml.org/wiki/PyYAML")
2528 (synopsis "YAML parser and emitter for Python")
2529 (description
2530 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2531complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2532API, and sensible error messages. PyYAML supports standard YAML tags and
2533provides Python-specific tags that allow to represent an arbitrary Python
2534object.")
2535 (license license:expat)))
2536
2537(define-public python2-pyyaml
2538 (package-with-python2 python-pyyaml))
2539
5731cae3
DT
2540(define-public python-virtualenv
2541 (package
2542 (name "python-virtualenv")
58d04dba 2543 (version "15.0.3")
5731cae3
DT
2544 (source
2545 (origin
2546 (method url-fetch)
17804240 2547 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2548 (sha256
2549 (base32
58d04dba 2550 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2551 (build-system python-build-system)
17804240
EF
2552 (arguments
2553 `(#:phases
2554 (modify-phases %standard-phases
58d04dba
RW
2555 (replace 'check
2556 (lambda _
2557 ;; Disable failing test. See upstream bug report
2558 ;; https://github.com/pypa/virtualenv/issues/957
2559 (substitute* "tests/test_virtualenv.py"
2560 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2561 (zero? (system* "py.test")))))))
e7881f3d 2562 (native-inputs
f3b98f4f 2563 `(("python-mock" ,python-mock)
17804240 2564 ("python-pytest" ,python-pytest)))
5731cae3
DT
2565 (home-page "https://virtualenv.pypa.io/")
2566 (synopsis "Virtual Python environment builder")
2567 (description
2568 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2569 (license license:expat)))
5731cae3
DT
2570
2571(define-public python2-virtualenv
2572 (package-with-python2 python-virtualenv))
8176d4d5
DT
2573
2574(define-public python-markupsafe
2575 (package
2576 (name "python-markupsafe")
2577 (version "0.23")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (string-append
2582 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2583 version ".tar.gz"))
2584 (sha256
2585 (base32
2586 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2587 (build-system python-build-system)
8176d4d5
DT
2588 (home-page "http://github.com/mitsuhiko/markupsafe")
2589 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2590 (description
2591 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2592for Python.")
3f641af0 2593 (license license:bsd-3)))
8176d4d5
DT
2594
2595(define-public python2-markupsafe
2596 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2597
2598(define-public python-jinja2
2599 (package
2600 (name "python-jinja2")
e98149b3 2601 (version "2.8")
fe34f0d1
DT
2602 (source
2603 (origin
2604 (method url-fetch)
e98149b3 2605 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2606 (sha256
2607 (base32
e98149b3 2608 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2609 (build-system python-build-system)
f22efa01 2610 (propagated-inputs
f3b98f4f 2611 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2612 (home-page "http://jinja.pocoo.org/")
2613 (synopsis "Python template engine")
2614 (description
2615 "Jinja2 is a small but fast and easy to use stand-alone template engine
2616written in pure Python.")
3f641af0 2617 (license license:bsd-3)))
fe34f0d1
DT
2618
2619(define-public python2-jinja2
2620 (package-with-python2 python-jinja2))
3580ab8b 2621
f7d17ac7
EE
2622(define-public python-pystache
2623 (package
2624 (name "python-pystache")
2625 (version "0.5.4")
2626 (source (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "pystache" version))
2629 (sha256
2630 (base32
2631 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2632 (build-system python-build-system)
f7d17ac7
EE
2633 (home-page "http://defunkt.io/pystache/")
2634 (synopsis "Python logic-less template engine")
2635 (description
2636 "Pystache is a Python implementation of the framework agnostic,
2637logic-free templating system Mustache.")
2638 (license license:expat)))
2639
2640(define-public python2-pystache
2641 (package-with-python2 python-pystache))
2642
1285119b
RW
2643(define-public python-joblib
2644 (package
2645 (name "python-joblib")
f34ef331 2646 (version "0.10.3")
1285119b
RW
2647 (source (origin
2648 (method url-fetch)
f34ef331 2649 (uri (pypi-uri "joblib" version))
1285119b
RW
2650 (sha256
2651 (base32
6aa5f1ca
HG
2652 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2653 (modules '((guix build utils)))
2654 (snippet
2655 '(begin
2656 ;; Remove pre-compiled .pyc files from source.
2657 (for-each delete-file-recursively
2658 (find-files "." "__pycache__" #:directories? #t))
2659 (for-each delete-file (find-files "." "\\.pyc$"))
2660 #t))))
1285119b 2661 (build-system python-build-system)
a8dd960a
RW
2662 (arguments
2663 `(#:phases
2664 (modify-phases %standard-phases
2665 (add-before 'check 'disable-failing-tests
2666 (lambda _
2667 ;; This numpydoc tests fails for unknown reasons
2668 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2669 ;; This numpydoc test depends on matplotlib, which is not a
2670 ;; required input.
2671 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2672 ;; These tests fail to execute sys.executable
2673 (substitute* "joblib/test/test_parallel.py"
2674 (("import nose" line)
2675 (string-append "from nose.plugins.skip import SkipTest\n" line))
2676 (("def test_nested_parallel_warnings" line)
2677 (string-append "@SkipTest\n" line))
2678 (("def test_parallel_with_interactively_defined_functions" line)
2679 (string-append "@SkipTest\n" line)))
2680 #t)))))
f052ec9a 2681 ;; Provide nose to enable tests command
1285119b 2682 (native-inputs
f3b98f4f 2683 `(("python-nose" ,python-nose)
f34ef331
RW
2684 ("python-sphinx" ,python-sphinx)
2685 ("python-docutils" ,python-docutils)
2686 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2687 (home-page "http://pythonhosted.org/joblib/")
2688 (synopsis "Using Python functions as pipeline jobs")
2689 (description
2690 "Joblib is a set of tools to provide lightweight pipelining in Python.
2691In particular, joblib offers: transparent disk-caching of the output values
2692and lazy re-evaluation (memoize pattern), easy simple parallel computing
2693logging and tracing of the execution.")
3f641af0 2694 (license license:bsd-3)))
1285119b
RW
2695
2696(define-public python2-joblib
2697 (package-with-python2 python-joblib))
2698
3580ab8b
DT
2699(define-public python-docutils
2700 (package
2701 (name "python-docutils")
2702 (version "0.12")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (string-append
2707 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2708 version ".tar.gz"))
2709 (sha256
2710 (base32
2711 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2712 (build-system python-build-system)
3580ab8b
DT
2713 (arguments
2714 '(#:tests? #f)) ; no setup.py test command
2715 (home-page "http://docutils.sourceforge.net/")
2716 (synopsis "Python Documentation Utilities")
2717 (description
2718 "Docutils is a modular system for processing documentation into useful
2719formats, such as HTML, XML, and LaTeX. For input Docutils supports
2720reStructuredText.")
2721 ;; Most of the source code is public domain, but some source files are
2722 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2723 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2724
2725(define-public python2-docutils
2726 (package-with-python2 python-docutils))
fb35b7c0
DT
2727
2728(define-public python-pygments
2729 (package
2730 (name "python-pygments")
9f442285 2731 (version "2.0.2")
fb35b7c0
DT
2732 (source
2733 (origin
2734 (method url-fetch)
9f442285 2735 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2736 (sha256
2737 (base32
9f442285 2738 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2739 (build-system python-build-system)
fb35b7c0
DT
2740 (home-page "http://pygments.org/")
2741 (synopsis "Syntax highlighting")
2742 (description
2743 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2744 (license license:bsd-2)))
fb35b7c0
DT
2745
2746(define-public python2-pygments
2747 (package-with-python2 python-pygments))
9dd6078d
DT
2748
2749(define-public python-sphinx
2750 (package
2751 (name "python-sphinx")
2752 (version "1.2.3")
2753 (source
2754 (origin
2755 (method url-fetch)
2756 (uri (string-append
2757 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2758 version ".tar.gz"))
2759 (sha256
2760 (base32
2761 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2762 (build-system python-build-system)
f22efa01 2763 (propagated-inputs
f3b98f4f 2764 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2765 ("python-docutils" ,python-docutils)
2766 ("python-pygments" ,python-pygments)))
2767 (home-page "http://sphinx-doc.org/")
2768 (synopsis "Python documentation generator")
2769 (description "Sphinx is a tool that makes it easy to create documentation
2770for Python projects or other documents consisting of multiple reStructuredText
2771sources.")
3f641af0 2772 (license license:bsd-3)))
9dd6078d
DT
2773
2774(define-public python2-sphinx
2775 (package-with-python2 python-sphinx))
6888830b 2776
ad320b20
RW
2777(define-public python-sphinx-rtd-theme
2778 (package
2779 (name "python-sphinx-rtd-theme")
2780 (version "0.1.6")
2781 (source
2782 (origin
2783 (method url-fetch)
2784 (uri (string-append "https://pypi.python.org/packages/source/s/"
2785 "sphinx_rtd_theme/sphinx_rtd_theme-"
2786 version ".tar.gz"))
2787 (sha256
2788 (base32
2789 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2790 (build-system python-build-system)
ad320b20
RW
2791 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2792 (synopsis "ReadTheDocs.org theme for Sphinx")
2793 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2794 (license license:expat)))
ad320b20
RW
2795
2796(define-public python2-sphinx-rtd-theme
2797 (package-with-python2 python-sphinx-rtd-theme))
2798
fe94cf0c
HG
2799(define-public python-rst.linker
2800 (package
2801 (name "python-rst.linker")
2802 (version "1.7")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "rst.linker" version))
2807 (sha256
2808 (base32
2809 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2810 (build-system python-build-system)
2811 (propagated-inputs
2812 `(("python-dateutil" ,python-dateutil-2)
2813 ("python-six" ,python-six)))
2814 (native-inputs
2815 `(("python-setuptools-scm" ,python-setuptools-scm)))
2816 ;; Test would require path.py, which would introduce a cyclic dependence.
2817 (arguments `(#:tests? #f))
2818 ;; Note: As of version 1.7 the documentation is not worth building.
2819 (home-page "https://github.com/jaraco/rst.linker")
2820 (synopsis "Sphinx plugin to add links and timestamps")
2821 (description "rst.linker allows to automatically replace text by a
2822reStructuredText external reference or timestamps. It's primary purpose is to
2823augment the changelog, but it can be used for other documents, too.")
2824 (license license:expat)))
2825
2826(define-public python2-rst.linker
2827 (package-with-python2 python-rst.linker))
2828
f4de5b3b
CAW
2829(define-public python-feedgenerator
2830 (package
2831 (name "python-feedgenerator")
f0412aa2 2832 (version "1.8")
f4de5b3b 2833 (source
f4de5b3b 2834 (origin
f0412aa2
EF
2835 (method url-fetch)
2836 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2837 (sha256
2838 (base32
7c88bcf4
HG
2839 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2840 (modules '((guix build utils)))
2841 (snippet
2842 '(begin
2843 ;; Remove pre-compiled .pyc files from source.
2844 (for-each delete-file-recursively
2845 (find-files "." "__pycache__" #:directories? #t))
2846 (for-each delete-file (find-files "." "\\.pyc$"))
2847 #t))))
f4de5b3b 2848 (build-system python-build-system)
dae73d9b 2849 (propagated-inputs
f3b98f4f 2850 `(("python-pytz" ,python-pytz)
f4de5b3b 2851 ("python-six" ,python-six)))
f0412aa2 2852 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2853 (synopsis
2854 "Standalone version of Django's Atom/RSS feed generator")
2855 (description
2856 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2857which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2858 (license license:bsd-3)))
f4de5b3b
CAW
2859
2860(define-public python2-feedgenerator
2861 (package-with-python2 python-feedgenerator))
2862
59ad30e3
CAW
2863(define-public python-blinker
2864 (package
2865 (name "python-blinker")
7fb9ff4d 2866 (version "1.4")
59ad30e3
CAW
2867 (source
2868 (origin
2869 (method url-fetch)
7fb9ff4d 2870 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2871 (sha256
2872 (base32
7fb9ff4d 2873 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2874 (build-system python-build-system)
59ad30e3
CAW
2875 (home-page "http://pythonhosted.org/blinker/")
2876 (synopsis "Fast, simple object-to-object and broadcast signaling")
2877 (description
2878 "Blinker provides a fast dispatching system that allows any number of
2879interested parties to subscribe to events, or \"signals\".")
2880 (license license:expat)))
2881
2882(define-public python2-blinker
2883 (package-with-python2 python-blinker))
2884
b8050e71
CAW
2885(define-public pelican
2886 (package
2887 (name "pelican")
11f97c27 2888 (version "3.6.3")
b8050e71
CAW
2889 (source
2890 (origin
2891 (method url-fetch)
11f97c27 2892 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2893 (sha256
2894 (base32
11f97c27 2895 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2896 (build-system python-build-system)
f22efa01 2897 (propagated-inputs
b8050e71
CAW
2898 `(("python-feedgenerator" ,python-feedgenerator)
2899 ("python-jinja2" ,python-jinja2)
2900 ("python-pygments" ,python-pygments)
2901 ("python-docutils" ,python-docutils)
2902 ("python-pytz" ,python-pytz)
2903 ("python-blinker" ,python-blinker)
2904 ("python-unidecode" ,python-unidecode)
2905 ("python-six" ,python-six)
2906 ("python-dateutil-2" ,python-dateutil-2)))
2907 (home-page "http://getpelican.com/")
2908 (arguments
2909 `(;; XXX Requires a lot more packages to do unit tests :P
2910 #:tests? #f
2911 #:phases (modify-phases %standard-phases
2912 (add-before
2913 'install 'adjust-requires
2914 ;; Since feedgenerator is installed from git, it doesn't
2915 ;; conform to the version requirements.
2916 ;;
2917 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2918 ;; version requirement so setuptools doesn't get confused.
2919 (lambda _
2920 (substitute* "setup.py"
2921 (("['\"]feedgenerator.*?['\"]")
2922 "'feedgenerator'")))))))
2923 (synopsis "Python-based static site publishing system")
2924 (description
2925 "Pelican is a tool to generate a static blog from reStructuredText,
2926Markdown input files, and more. Pelican uses Jinja2 for templating
2927and is very extensible.")
3f641af0 2928 (license license:agpl3+)))
b8050e71 2929
240ca4aa
RW
2930(define-public python-scikit-learn
2931 (package
2932 (name "python-scikit-learn")
be0a4c26 2933 (version "0.16.1")
240ca4aa
RW
2934 (source
2935 (origin
2936 (method url-fetch)
2937 (uri (string-append
2938 "https://github.com/scikit-learn/scikit-learn/archive/"
2939 version ".tar.gz"))
7e21b9fb 2940 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2941 (sha256
2942 (base32
be0a4c26 2943 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2944 (build-system python-build-system)
2945 (arguments
2946 `(#:phases
2947 (alist-cons-before
2f6b3d2e
RW
2948 'check 'set-HOME
2949 ;; some tests require access to "$HOME"
2950 (lambda _ (setenv "HOME" "/tmp"))
2951 ;; Tests can only be run after the library has been installed and not
2952 ;; within the source directory.
2953 (alist-cons-after
2954 'install 'check
2955 (lambda _
2956 (with-directory-excursion "/tmp"
2957 ;; With Python 3 one test of 3334 fails
2958 ;; (sklearn.tests.test_common.test_transformers); see
2959 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2960 (system* "nosetests" "-v" "sklearn")))
2961 (alist-delete 'check %standard-phases)))))
240ca4aa 2962 (inputs
328bb95d
HG
2963 `(("openblas" ,openblas)))
2964 (native-inputs
2965 `(("python-nose" ,python-nose)))
240ca4aa
RW
2966 (propagated-inputs
2967 `(("python-numpy" ,python-numpy)
2968 ("python-scipy" ,python-scipy)))
2969 (home-page "http://scikit-learn.org/")
2970 (synopsis "Machine Learning in Python")
2971 (description
2972 "Scikit-learn provides simple and efficient tools for data
2973mining and data analysis.")
25a2f81f
EF
2974 (license license:bsd-3)
2975 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
2976
2977(define-public python2-scikit-learn
25a2f81f 2978 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 2979
12f8f9bb
RW
2980(define-public python-scikit-image
2981 (package
2982 (name "python-scikit-image")
2983 (version "0.11.3")
2984 (source
2985 (origin
2986 (method url-fetch)
2987 (uri (string-append
2988 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2989 version ".tar.gz"))
2990 (sha256
2991 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2992 (build-system python-build-system)
b83e2333 2993 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
2994 (propagated-inputs
2995 `(("python-matplotlib" ,python-matplotlib)
2996 ("python-networkx" ,python-networkx)
12f8f9bb 2997 ("python-scipy" ,python-scipy)
12f8f9bb
RW
2998 ("python-pillow" ,python-pillow)))
2999 (native-inputs
b83e2333
HG
3000 `(("python-numpy" ,python-numpy)
3001 ("python-cython" ,python-cython)
3002 ("python-six" ,python-six)))
12f8f9bb
RW
3003 (home-page "http://scikit-image.org/")
3004 (synopsis "Image processing in Python")
3005 (description
e881752c 3006 "Scikit-image is a collection of algorithms for image processing.")
12733594 3007 (license license:bsd-3)))
12f8f9bb
RW
3008
3009(define-public python2-scikit-image
12733594 3010 (package-with-python2 python-scikit-image))
12f8f9bb 3011
5394a6a6
RW
3012(define-public python-redis
3013 (package
3014 (name "python-redis")
3015 (version "2.10.3")
3016 (source
3017 (origin
3018 (method url-fetch)
3019 (uri (string-append
3020 "https://pypi.python.org/packages/source/r/redis/redis-"
3021 version ".tar.gz"))
3022 (sha256
3023 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3024 (build-system python-build-system)
3025 ;; Tests require a running Redis server
3026 (arguments '(#:tests? #f))
cf8124b0
HG
3027 ;; As long as we are not running test, we do not need this input :-)
3028 ;;(native-inputs
3029 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3030 (home-page "https://github.com/andymccurdy/redis-py")
3031 (synopsis "Redis Python client")
3032 (description
3033 "This package provides a Python interface to the Redis key-value store.")
3034 (license license:expat)))
3035
3036(define-public python2-redis
3037 (package-with-python2 python-redis))
3038
748cef5b
RW
3039(define-public python-rq
3040 (package
3041 (name "python-rq")
3042 (version "0.5.2")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (string-append
3047 "https://pypi.python.org/packages/source/r/rq/rq-"
3048 version ".tar.gz"))
3049 (sha256
3050 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3051 (build-system python-build-system)
3052 (propagated-inputs
3053 `(("python-click" ,python-click)
3054 ("python-redis" ,python-redis)))
748cef5b
RW
3055 (home-page "http://python-rq.org/")
3056 (synopsis "Simple job queues for Python")
3057 (description
3058 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3059processing them in the background with workers. It is backed by Redis and it
3060is designed to have a low barrier to entry.")
3f641af0 3061 (license license:bsd-2)))
748cef5b
RW
3062
3063(define-public python2-rq
3064 (package-with-python2 python-rq))
3065
6888830b
FB
3066(define-public python-cython
3067 (package
3068 (name "python-cython")
dd22efef 3069 (version "0.24.1")
6888830b
FB
3070 (source
3071 (origin
3072 (method url-fetch)
56918e26 3073 (uri (pypi-uri "Cython" version))
6888830b
FB
3074 (sha256
3075 (base32
dd22efef 3076 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3077 (build-system python-build-system)
3078 ;; we need the full python package and not just the python-wrapper
3079 ;; because we need libpython3.3m.so
3080 (inputs
3081 `(("python" ,python)))
3082 (arguments
3083 `(#:phases
b92f651b
EF
3084 (modify-phases %standard-phases
3085 (add-before 'check 'set-HOME
3086 ;; some tests require access to "$HOME/.cython"
3087 (lambda _ (setenv "HOME" "/tmp")))
3088 (replace 'check
3089 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3090 (home-page "http://cython.org/")
3091 (synopsis "C extensions for Python")
3092 (description "Cython is an optimising static compiler for both the Python
3093programming language and the extended Cython programming language. It makes
3094writing C extensions for Python as easy as Python itself.")
3f641af0 3095 (license license:asl2.0)
48b311b1 3096 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3097
3098(define-public python2-cython
48b311b1
LC
3099 (package (inherit (package-with-python2
3100 (strip-python2-variant python-cython)))
6888830b
FB
3101 (name "python2-cython")
3102 (inputs
3103 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3104
ee5fb7ee
AV
3105;; The RPython toolchain currently does not support Python 3.
3106(define-public python2-rpython
3107 (package
3108 (name "python2-rpython")
3109 (version "0.1.4")
3110 (source
3111 (origin
3112 (method url-fetch)
3113 (uri (pypi-uri "rpython" version))
3114 (sha256
3115 (base32
3116 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3117 (build-system python-build-system)
3118 (arguments `(#:python ,python-2))
3119 (native-inputs
f3b98f4f 3120 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3121 (home-page "https://rpython.readthedocs.org")
3122 (synopsis "Framework for implementing interpreters and virtual machines")
3123 (description "RPython is a translation and support framework for
3124producing implementations of dynamic languages, emphasizing a clean separation
3125between language specification and implementation aspects.")
3126 (license license:expat)))
3127
0da98533
FB
3128;; This version of numpy is missing the documentation and is only used to
3129;; build matplotlib which is required to build numpy's documentation.
3130(define python-numpy-bootstrap
3131 (package
3132 (name "python-numpy-bootstrap")
ef9b4c04 3133 (version "1.10.4")
0da98533
FB
3134 (source
3135 (origin
3136 (method url-fetch)
de67e922 3137 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3138 "/numpy-" version ".tar.gz"))
3139 (sha256
3140 (base32
ef9b4c04 3141 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3142 (build-system python-build-system)
3143 (inputs
328bb95d 3144 `(("openblas" ,openblas)
cba256f8 3145 ("lapack" ,lapack)))
0da98533 3146 (native-inputs
2efabc55
HG
3147 `(("python-nose" ,python-nose)
3148 ("gfortran" ,gfortran)))
0da98533
FB
3149 (arguments
3150 `(#:phases
2efabc55
HG
3151 (modify-phases %standard-phases
3152 (add-before 'build 'set-environment-variables
3153 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3154 (call-with-output-file "site.cfg"
3155 (lambda (port)
cba256f8
RW
3156 (format port
3157 "[openblas]
dbdfe515
RW
3158libraries = openblas
3159library_dirs = ~a/lib
3160include_dirs = ~a/include
cba256f8 3161
2efabc55
HG
3162# backslash-n to make emacs happy
3163\n[lapack]
cba256f8
RW
3164lapack_libs = lapack
3165library_dirs = ~a/lib
3166include_dirs = ~a/include
3167"
3168 (assoc-ref inputs "openblas")
3169 (assoc-ref inputs "openblas")
3170 (assoc-ref inputs "lapack")
3171 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3172 ;; Use "gcc" executable, not "cc".
3173 (substitute* "numpy/distutils/system_info.py"
3174 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3175 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3176 #t))
6a843168
FB
3177 ;; Tests can only be run after the library has been installed and not
3178 ;; within the source directory.
2efabc55
HG
3179 (delete 'check)
3180 (add-after 'install 'check
3181 (lambda* (#:key outputs inputs #:allow-other-keys)
3182 ;; Make installed package available for running the tests
3183 (add-installed-pythonpath inputs outputs)
6a843168 3184 (with-directory-excursion "/tmp"
89b5c60e 3185 (zero? (system* "python" "-c"
2efabc55 3186 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3187 (home-page "http://www.numpy.org/")
3188 (synopsis "Fundamental package for scientific computing with Python")
3189 (description "NumPy is the fundamental package for scientific computing
e881752c 3190with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3191object, sophisticated (broadcasting) functions, tools for integrating C/C++
3192and Fortran code, useful linear algebra, Fourier transform, and random number
3193capabilities.")
3f641af0 3194 (license license:bsd-3)))
0da98533
FB
3195
3196(define python2-numpy-bootstrap
3197 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3198
3a1bfe18
RW
3199(define-public python2-fastlmm
3200 (package
3201 (name "python2-fastlmm")
b074e7d4 3202 (version "0.2.21")
3a1bfe18
RW
3203 (source
3204 (origin
3205 (method url-fetch)
b074e7d4 3206 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3207 (sha256
3208 (base32
b074e7d4 3209 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3210 (build-system python-build-system)
3211 (arguments
3212 `(#:python ,python-2)) ; only Python 2.7 is supported
3213 (propagated-inputs
3214 `(("python2-numpy" ,python2-numpy)
3215 ("python2-scipy" ,python2-scipy)
3216 ("python2-matplotlib" ,python2-matplotlib)
3217 ("python2-pandas" ,python2-pandas)
3218 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3219 ("python2-pysnptools" ,python2-pysnptools)))
3220 (native-inputs
3221 `(("unzip" ,unzip)
2efabc55 3222 ("python2-cython" ,python2-cython)
f3b98f4f 3223 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3224 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3225 (synopsis "Perform genome-wide association studies on large data sets")
3226 (description
3227 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3228Models, is a program for performing both single-SNP and SNP-set genome-wide
3229association studies (GWAS) on extremely large data sets.")
3f641af0 3230 (license license:asl2.0)))
3a1bfe18 3231
2ee8869a
FB
3232(define-public python-numpy
3233 (package (inherit python-numpy-bootstrap)
3234 (name "python-numpy")
3235 (outputs '("out" "doc"))
89b5c60e 3236 (inputs
2efabc55
HG
3237 `(("which" ,which)))
3238 (propagated-inputs
3239 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3240 ("python-pyparsing" ,python-pyparsing)
2ee8869a
FB
3241 ,@(package-inputs python-numpy-bootstrap)))
3242 (native-inputs
3243 `(("pkg-config" ,pkg-config)
2efabc55
HG
3244 ("python-sphinx" ,python-sphinx)
3245 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3246 ("texlive" ,texlive)
3247 ("texinfo" ,texinfo)
3248 ("perl" ,perl)
3249 ,@(package-native-inputs python-numpy-bootstrap)))
3250 (arguments
89b5c60e 3251 `(,@(substitute-keyword-arguments
2ee8869a
FB
3252 (package-arguments python-numpy-bootstrap)
3253 ((#:phases phases)
3254 `(alist-cons-after
3255 'install 'install-doc
2efabc55
HG
3256 (lambda* (#:key inputs outputs #:allow-other-keys)
3257 ;; Make installed package available for building the
3258 ;; documentation
3259 (add-installed-pythonpath inputs outputs)
2ee8869a 3260 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3261 (doc (string-append
3262 data "/doc/" ,name "-"
2ee8869a
FB
3263 ,(package-version python-numpy-bootstrap)))
3264 (info (string-append data "/info"))
3265 (html (string-append doc "/html"))
3266 (pyver ,(string-append "PYVER=")))
3267 (with-directory-excursion "doc"
3268 (mkdir-p html)
3269 (system* "make" "html" pyver)
3270 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3271 (system* "make" "-C" "build/latex"
2ee8869a
FB
3272 "all-pdf" "PAPER=a4" pyver)
3273 ;; FIXME: Generation of the info file fails.
3274 ;; (system* "make" "info" pyver)
3275 ;; (mkdir-p info)
3276 ;; (copy-file "build/texinfo/numpy.info"
3277 ;; (string-append info "/numpy.info"))
3278 (for-each (lambda (file)
3279 (copy-file (string-append "build/latex" file)
3280 (string-append doc file)))
3281 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3282 (with-directory-excursion "build/html"
3283 (for-each (lambda (file)
3284 (let* ((dir (dirname file))
3285 (tgt-dir (string-append html "/" dir)))
3286 (unless (equal? "." dir)
3287 (mkdir-p tgt-dir))
96c46210 3288 (install-file file html)))
2ee8869a
FB
3289 (find-files "." ".*"))))))
3290 ,phases)))))))
3291
764c077b 3292(define-public python2-numpy
57b7b8cd 3293 (package-with-python2 python-numpy))
2ee8869a 3294
15bfe6d6
FB
3295(define-public python-pyparsing
3296 (package
3297 (name "python-pyparsing")
e0669289 3298 (version "2.0.3")
15bfe6d6
FB
3299 (source
3300 (origin
3301 (method url-fetch)
de67e922
LF
3302 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3303 "/pyparsing-" version
15bfe6d6
FB
3304 "/pyparsing-" version ".tar.gz"))
3305 (sha256
3306 (base32
e0669289 3307 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3308 (build-system python-build-system)
3309 (outputs '("out" "doc"))
3310 (arguments
3311 `(#:tests? #f ; no test target
3312 #:modules ((guix build python-build-system)
3313 (guix build utils))
3314 #:phases
3315 (alist-cons-after
3316 'install 'install-doc
3317 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3318 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3319 "/share/doc/" ,name "-" ,version))
3320 (html-doc (string-append doc "/html"))
3321 (examples (string-append doc "/examples")))
3322 (mkdir-p html-doc)
3323 (mkdir-p examples)
89b5c60e 3324 (for-each
15bfe6d6 3325 (lambda (dir tgt)
89b5c60e 3326 (map (lambda (file)
96c46210 3327 (install-file file tgt))
15bfe6d6
FB
3328 (find-files dir ".*")))
3329 (list "docs" "htmldoc" "examples")
3330 (list doc html-doc examples))))
3331 %standard-phases)))
3332 (home-page "http://pyparsing.wikispaces.com")
3333 (synopsis "Python parsing class library")
3334 (description
3335 "The pyparsing module is an alternative approach to creating and
3336executing simple grammars, vs. the traditional lex/yacc approach, or the use
3337of regular expressions. The pyparsing module provides a library of classes
3338that client code uses to construct the grammar directly in Python code.")
bd3fa666 3339 (license license:expat)))
15bfe6d6
FB
3340
3341(define-public python2-pyparsing
3342 (package-with-python2 python-pyparsing))
3343
ec00de35
FB
3344(define-public python-numpydoc
3345 (package
3346 (name "python-numpydoc")
3347 (version "0.5")
3348 (source
3349 (origin
3350 (method url-fetch)
89b5c60e 3351 (uri (string-append
ec00de35
FB
3352 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3353 version ".tar.gz"))
3354 (sha256
3355 (base32
5e4d8f67
AE
3356 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3357 (modules '((guix build utils)))
3358 (snippet
3359 '(begin
3360 ;; Drop a test requiring matplotlib, which we cannot add as an
3361 ;; input since it would create a circular dependency: Extend the
3362 ;; test for Python 3, where it is already dropped, to Python 2.
3363 (substitute* "numpydoc/tests/test_plot_directive.py"
3364 (("3") "2"))))))
ec00de35 3365 (build-system python-build-system)
328bb95d 3366 (native-inputs
213d1745
HG
3367 `(("python-sphinx" ,python-sphinx)))
3368 (native-inputs
3369 `(("python-nose" ,python-nose)))
ec00de35
FB
3370 (home-page "https://pypi.python.org/pypi/numpydoc")
3371 (synopsis
3372 "Numpy's Sphinx extensions")
3373 (description
3374 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3375 (license license:bsd-2)))
ec00de35
FB
3376
3377(define-public python2-numpydoc
5e4d8f67 3378 (package-with-python2 python-numpydoc))
1c65314c 3379
1e656049
RW
3380(define-public python-numexpr
3381 (package
3382 (name "python-numexpr")
26112c0a 3383 (version "2.6.0")
1e656049
RW
3384 (source
3385 (origin
3386 (method url-fetch)
26112c0a 3387 (uri (pypi-uri "numexpr" version))
1e656049
RW
3388 (sha256
3389 (base32
26112c0a 3390 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3391 (build-system python-build-system)
3392 (arguments `(#:tests? #f)) ; no tests included
3393 (propagated-inputs
3394 `(("python-numpy" ,python-numpy)))
3395 (home-page "https://github.com/pydata/numexpr")
3396 (synopsis "Fast numerical expression evaluator for NumPy")
3397 (description
3398 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3399expressions that operate on arrays are accelerated and use less memory than
3400doing the same calculation in Python. In addition, its multi-threaded
3401capabilities can make use of all your cores, which may accelerate
3402computations, most specially if they are not memory-bounded (e.g. those using
3403transcendental functions).")
f210e944 3404 (license license:expat)))
1e656049
RW
3405
3406(define-public python2-numexpr
f210e944 3407 (package-with-python2 python-numexpr))
1e656049 3408
1c65314c
FB
3409(define-public python-matplotlib
3410 (package
3411 (name "python-matplotlib")
1bbc659f 3412 (version "1.4.3")
1c65314c
FB
3413 (source
3414 (origin
3415 (method url-fetch)
de67e922
LF
3416 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3417 "/matplotlib-" version
1c65314c
FB
3418 "/matplotlib-" version ".tar.gz"))
3419 (sha256
3420 (base32
1bbc659f 3421 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3422 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3423 (build-system python-build-system)
3424 (outputs '("out" "doc"))
25f9a068
FB
3425 (propagated-inputs ; the following packages are all needed at run time
3426 `(("python-pyparsing" ,python-pyparsing)
3427 ("python-pygobject" ,python-pygobject)
3428 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3429 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3430 ("python-dateutil" ,python-dateutil-2)
3431 ("python-numpy" ,python-numpy-bootstrap)
3432 ("python-pillow" ,python-pillow)
3433 ("python-pytz" ,python-pytz)
3434 ("python-six" ,python-six)
25f9a068
FB
3435 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3436 ;; from 'gtk+') provides the required 'typelib' files used by
3437 ;; 'gobject-introspection'. The location of these files is set with the
3438 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3439 ;; is done automatically by a 'native-search-path' procedure. However,
3440 ;; at run-time the user must set this variable as follows:
3441 ;;
3442 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3443 ("gtk+" ,gtk+)
3444 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3445 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3446 ;; object. For this reason we need to import both libraries.
3447 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3448 ("python-pycairo" ,python-pycairo)
3449 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3450 (inputs
ca33a3ad 3451 `(("libpng" ,libpng)
1c65314c
FB
3452 ("imagemagick" ,imagemagick)
3453 ("freetype" ,freetype)
25f9a068
FB
3454 ("cairo" ,cairo)
3455 ("glib" ,glib)
1c65314c 3456 ;; FIXME: Add backends when available.
1c65314c
FB
3457 ;("python-wxpython" ,python-wxpython)
3458 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3459 ("tcl" ,tcl)
3460 ("tk" ,tk)))
1c65314c
FB
3461 (native-inputs
3462 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3463 ("python-sphinx" ,python-sphinx)
3464 ("python-numpydoc" ,python-numpydoc)
3465 ("python-nose" ,python-nose)
3466 ("python-mock" ,python-mock)
1c65314c
FB
3467 ("texlive" ,texlive)
3468 ("texinfo" ,texinfo)))
3469 (arguments
3470 `(#:phases
25f9a068
FB
3471 (alist-cons-before
3472 'build 'configure-environment
3473 (lambda* (#:key outputs inputs #:allow-other-keys)
3474 (let ((cairo (assoc-ref inputs "cairo"))
3475 (gtk+ (assoc-ref inputs "gtk+")))
3476 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3477 ;; has not effect.
25f9a068
FB
3478 (setenv "LD_LIBRARY_PATH"
3479 (string-append cairo "/lib:" gtk+ "/lib"))
3480 (setenv "HOME" (getcwd))
3481 (call-with-output-file "setup.cfg"
3482 (lambda (port)
1bbc659f
FB
3483 (format port "[directories]~%
3484basedirlist = ~a,~a~%
57b7b8cd 3485 [rc_options]~%
1bbc659f
FB
3486backend = TkAgg~%"
3487 (assoc-ref inputs "tcl")
3488 (assoc-ref inputs "tk"))))))
25f9a068
FB
3489 (alist-cons-after
3490 'install 'install-doc
ca33a3ad 3491 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3492 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3493 (doc (string-append data "/doc/" ,name "-" ,version))
3494 (info (string-append data "/info"))
3495 (html (string-append doc "/html")))
ca33a3ad
HG
3496 ;; Make installed package available for building the
3497 ;; documentation
3498 (add-installed-pythonpath inputs outputs)
25f9a068 3499 (with-directory-excursion "doc"
25f9a068
FB
3500 ;; Produce pdf in 'A4' format.
3501 (substitute* (find-files "." "conf\\.py")
3502 (("latex_paper_size = 'letter'")
3503 "latex_paper_size = 'a4'"))
3504 (mkdir-p html)
3505 (mkdir-p info)
3506 ;; The doc recommends to run the 'html' target twice.
3507 (system* "python" "make.py" "html")
3508 (system* "python" "make.py" "html")
18b31516 3509 (copy-recursively "build/html" html)
25f9a068
FB
3510 (system* "python" "make.py" "latex")
3511 (system* "python" "make.py" "texinfo")
18b31516
FB
3512 (symlink (string-append html "/_images")
3513 (string-append info "/matplotlib-figures"))
3514 (with-directory-excursion "build/texinfo"
3515 (substitute* "matplotlib.texi"
3516 (("@image\\{([^,]*)" all file)
3517 (string-append "@image{matplotlib-figures/" file)))
3518 (symlink (string-append html "/_images")
3519 "./matplotlib-figures")
3520 (system* "makeinfo" "--no-split"
3521 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3522 (copy-file "build/texinfo/matplotlib.info"
3523 (string-append info "/matplotlib.info"))
3524 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3525 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3526 %standard-phases))))
1c65314c
FB
3527 (home-page "http://matplotlib.org")
3528 (synopsis "2D plotting library for Python")
3529 (description
3530 "Matplotlib is a Python 2D plotting library which produces publication
3531quality figures in a variety of hardcopy formats and interactive environments
3532across platforms. Matplotlib can be used in Python scripts, the python and
3533ipython shell, web application servers, and six graphical user interface
3534toolkits.")
3f641af0 3535 (license license:psfl)
57b7b8cd 3536 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3537
764c077b 3538(define-public python2-matplotlib
57b7b8cd
LC
3539 (let ((matplotlib (package-with-python2
3540 (strip-python2-variant python-matplotlib))))
764c077b 3541 (package (inherit matplotlib)
88c26834
AE
3542 ;; Make sure to use special packages for Python 2 instead
3543 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3544 (propagated-inputs
7ca0dbc3 3545 `(("python2-pycairo" ,python2-pycairo)
764c077b 3546 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3547 ("python2-tkinter" ,python-2 "tk")
3548 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3549 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3550
0dde6232
RW
3551(define-public python2-pysnptools
3552 (package
3553 (name "python2-pysnptools")
a800018e 3554 (version "0.3.9")
0dde6232
RW
3555 (source
3556 (origin
3557 (method url-fetch)
3f2e9675 3558 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3559 (sha256
3560 (base32
a800018e 3561 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3562 (build-system python-build-system)
3563 (arguments
3564 `(#:python ,python-2)) ; only Python 2.7 is supported
3565 (propagated-inputs
3566 `(("python2-numpy" ,python2-numpy)
3567 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3568 ("python2-pandas" ,python2-pandas)))
3569 (native-inputs
3570 `(("python2-cython" ,python2-cython)))
0dde6232 3571 (native-inputs
f3b98f4f 3572 `(("unzip" ,unzip)))
0dde6232
RW
3573 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3574 (synopsis "Library for reading and manipulating genetic data")
3575 (description
3576 "PySnpTools is a library for reading and manipulating genetic data. It
3577can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3578those files. It can also efficiently manipulate ranges of integers using set
3579operators such as union, intersection, and difference.")
3f641af0 3580 (license license:asl2.0)))
0dde6232 3581
c9b1b4f9
RW
3582(define-public python-rpy2
3583 (package
3584 (name "python-rpy2")
ec3bcbc7 3585 (version "2.7.6")
c9b1b4f9
RW
3586 (source
3587 (origin
3588 (method url-fetch)
ec3bcbc7 3589 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3590 (sha256
3591 (base32
ec3bcbc7 3592 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3593 (build-system python-build-system)
482d9591
HG
3594 (propagated-inputs
3595 `(("python-six" ,python-six)))
c9b1b4f9 3596 (inputs
482d9591 3597 `(("readline" ,readline)
c9b1b4f9
RW
3598 ("icu4c" ,icu4c)
3599 ("pcre" ,pcre)
3600 ("r" ,r)))
3601 (native-inputs
f3b98f4f 3602 `(("zlib" ,zlib)))
c9b1b4f9
RW
3603 (home-page "http://rpy.sourceforge.net/")
3604 (synopsis "Python interface to the R language")
3605 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3606low-level interface to R from Python, a proposed high-level interface,
3607including wrappers to graphical libraries, as well as R-like structures and
3608functions.")
3f641af0 3609 (license license:gpl3+)))
c9b1b4f9
RW
3610
3611(define-public python2-rpy2
3612 (let ((rpy2 (package-with-python2 python-rpy2)))
3613 (package (inherit rpy2)
3614 (native-inputs
3615 `(("python2-singledispatch" ,python2-singledispatch)
3616 ,@(package-native-inputs rpy2))))))
3617
bb986599
FB
3618(define-public python-scipy
3619 (package
3620 (name "python-scipy")
ba8a0824 3621 (version "0.16.0")
bb986599
FB
3622 (source
3623 (origin
3624 (method url-fetch)
de67e922
LF
3625; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3626 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3627 "/scipy-" version ".tar.xz"))
bb986599
FB
3628 (sha256
3629 (base32
ba8a0824 3630 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3631 (build-system python-build-system)
dd86c0d1 3632 (propagated-inputs
bb986599
FB
3633 `(("python-numpy" ,python-numpy)
3634 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3635 ("python-pyparsing" ,python-pyparsing)))
3636 (inputs
3637 `(("lapack" ,lapack)
719b01c1 3638 ("openblas" ,openblas)))
bb986599 3639 (native-inputs
dd86c0d1
RW
3640 `(("python-nose" ,python-nose)
3641 ("python-sphinx" ,python-sphinx)
5248d49e 3642 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3643 ("gfortran" ,gfortran)
bb986599
FB
3644 ("texlive" ,texlive)
3645 ("perl" ,perl)))
3646 (outputs '("out" "doc"))
3647 (arguments
3648 `(#:phases
3649 (alist-cons-before
719b01c1 3650 'build 'configure-openblas
bb986599 3651 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3652 (call-with-output-file "site.cfg"
3653 (lambda (port)
3654 (format port
3655 "[blas]
3656libraries = openblas
3657library_dirs = ~a/lib
3658include_dirs = ~a/include
d548e6aa
HG
3659
3660# backslash-n to make emacs happy
3661\n[atlas]
719b01c1
RW
3662library_dirs = ~a/lib
3663atlas_libs = openblas
3664"
3665 (assoc-ref inputs "openblas")
3666 (assoc-ref inputs "openblas")
3667 (assoc-ref inputs "openblas"))))
3668 #t)
bb986599
FB
3669 (alist-cons-after
3670 'install 'install-doc
d548e6aa 3671 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3672 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3673 (doc (string-append data "/doc/" ,name "-" ,version))
3674 (html (string-append doc "/html"))
3675 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3676 ;; Make installed package available for building the
3677 ;; documentation
3678 (add-installed-pythonpath inputs outputs)
bb986599 3679 (with-directory-excursion "doc"
bb986599
FB
3680 ;; Fix generation of images for mathematical expressions.
3681 (substitute* (find-files "source" "conf\\.py")
3682 (("pngmath_use_preview = True")
3683 "pngmath_use_preview = False"))
3684 (mkdir-p html)
3685 (system* "make" "html" pyver)
3686 (system* "make" "latex" "PAPER=a4" pyver)
3687 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3688 (copy-file "build/latex/scipy-ref.pdf"
3689 (string-append doc "/scipy-ref.pdf"))
3690 (with-directory-excursion "build/html"
3691 (for-each (lambda (file)
3692 (let* ((dir (dirname file))
3693 (tgt-dir (string-append html "/" dir)))
96c46210 3694 (install-file file html)))
bb986599
FB
3695 (find-files "." ".*"))))))
3696 ;; Tests can only be run after the library has been installed and not
3697 ;; within the source directory.
3698 (alist-cons-after
3699 'install 'check
89b5c60e 3700 (lambda _
bb986599
FB
3701 (with-directory-excursion "/tmp"
3702 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3703 (alist-delete
3704 'check
4f9ff21e
RW
3705 (alist-cons-after
3706 'unpack 'fix-tests
3707 (lambda _
3708 (substitute* "scipy/integrate/tests/test_quadpack.py"
3709 (("libm.so") "libm.so.6"))
3710 #t)
3711 %standard-phases)))))))
bb986599
FB
3712 (home-page "http://www.scipy.org/")
3713 (synopsis "The Scipy library provides efficient numerical routines")
3714 (description "The SciPy library is one of the core packages that make up
3715the SciPy stack. It provides many user-friendly and efficient numerical
3716routines such as routines for numerical integration and optimization.")
3f641af0 3717 (license license:bsd-3)))
bb986599 3718
764c077b 3719(define-public python2-scipy
57b7b8cd 3720 (package-with-python2 python-scipy))
bb986599 3721
73acc193 3722(define-public python-socksipy-branch
3723 (package
3724 (name "python-socksipy-branch")
3725 (version "1.01")
3726 (source
3727 (origin
3728 (method url-fetch)
3729 (uri (pypi-uri "SocksiPy-branch" version))
3730 (sha256
3731 (base32
3732 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3733 (build-system python-build-system)
3734 (arguments
3735 `(#:tests? #f)) ; There are no tests
3736 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3737 (synopsis "Python SOCKS module")
3738 (description
3739 "SocksiPy - A Python SOCKS client module. It provides a
3740socket-like interface that supports connections to any TCP
3741service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3742The original version was developed by Dan Haim, this is a
3743branch created by Mario Vilas to address some open issues,
3744as the original project seems to have been abandoned circa 2007.")
3745 (license license:bsd-3)))
3746
3747(define-public python2-socksipy-branch
3748 (package-with-python2 python-socksipy-branch))
3749
94914805
EB
3750(define-public python-sqlalchemy
3751 (package
3752 (name "python-sqlalchemy")
a4ba286b 3753 (version "1.0.12")
94914805
EB
3754 (source
3755 (origin
3756 (method url-fetch)
3757 (uri (string-append "https://pypi.python.org/packages/source/S/"
3758 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3759 (sha256
3760 (base32
a4ba286b 3761 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3762 (build-system python-build-system)
3763 (native-inputs
3764 `(("python-cython" ,python-cython) ;for c extensions
3765 ("python-pytest" ,python-pytest)
3766 ("python-mock" ,python-mock))) ;for tests
3767 (arguments
3768 `(#:phases (alist-replace
3769 'check
3770 (lambda _ (zero? (system* "py.test")))
3771 %standard-phases)))
3772 (home-page "http://www.sqlalchemy.org")
3773 (synopsis "Database abstraction library")
3774 (description
3775 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3776gives application developers the full power and flexibility of SQL. It
3777provides a full suite of well known enterprise-level persistence patterns,
3778designed for efficient and high-performing database access, adapted into a
3779simple and Pythonic domain language.")
3f641af0 3780 (license license:x11)))
94914805
EB
3781
3782(define-public python2-sqlalchemy
3783 (package-with-python2 python-sqlalchemy))
c937562e 3784
4a093330
DM
3785(define-public python-pycodestyle
3786 (package
3787 (name "python-pycodestyle")
3788 (version "2.0.0")
3789 (source
3790 (origin
3791 (method url-fetch)
3792 (uri (pypi-uri "pycodestyle" version))
3793 (sha256
3794 (base32
3795 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3796 (build-system python-build-system)
3797 (home-page "https://pycodestyle.readthedocs.io/")
3798 (synopsis "Python style guide checker")
3799 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3800Python code against some of the style conventions in
3801@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3802 (license license:expat)))
4a093330
DM
3803
3804(define-public python2-pycodestyle
f210e944 3805 (package-with-python2 python-pycodestyle))
b91912c4
DM
3806
3807(define-public python-orderedmultidict
3808 (package
3809 (name "python-orderedmultidict")
3810 (version "0.7.10")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "orderedmultidict" version))
3815 (sha256
3816 (base32
3817 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3818 (build-system python-build-system)
3819 (arguments
3820 `(#:phases
3821 (modify-phases %standard-phases
3822 (add-after 'unpack 'fix-tests
3823 (lambda _
3824 ;; The package uses nosetest for running the tests.
3825 ;; Adding this initfile allows to run the test suite
3826 ;; without requiring nosetest.
3827 (zero? (system* "touch" "tests/__init__.py")))))))
3828 (propagated-inputs
3829 `(("python-six" ,python-six)))
3830 (native-inputs
3831 `(("python-pycodestyle" ,python-pycodestyle)))
3832 (home-page "https://github.com/gruns/orderedmultidict")
3833 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3834 (description "This package contains a library for ordered multivalue
3835dictionaries. A multivalue dictionary is a dictionary that can store
3836multiple values for the same key. An ordered multivalue dictionary is a
3837multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3838 (license license:unlicense)))
b91912c4
DM
3839
3840(define-public python2-orderedmultidict
f210e944 3841 (package-with-python2 python-orderedmultidict))
9dede065
DM
3842
3843(define-public python-furl
3844 (package
3845 (name "python-furl")
3846 (version "0.5.6")
3847 (source
3848 (origin
3849 (method url-fetch)
3850 (uri (pypi-uri "furl" version))
3851 (sha256
3852 (base32
3853 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3854 (build-system python-build-system)
3855 (propagated-inputs
3856 `(("python-six" ,python-six)
3857 ("python-orderedmultidict" ,python-orderedmultidict)))
3858 (native-inputs
3859 `(("python-pycodestyle" ,python-pycodestyle)))
3860 (home-page "https://github.com/gruns/furl")
3861 (synopsis "URL manipulation in Python")
3862 (description "Furl provides an easy-to-use alternative to the
3863@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3864 (license license:unlicense)))
9dede065
DM
3865
3866(define-public python2-furl
f210e944 3867 (package-with-python2 python-furl))
462bf271
DM
3868
3869(define-public python-flask-babel
3870 (package
3871 (name "python-flask-babel")
3872 (version "0.11.1")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "Flask-Babel" version))
3877 (sha256
3878 (base32
3879 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3880 (build-system python-build-system)
3881 (propagated-inputs
3882 `(("python-flask" ,python-flask)
3883 ("python-babel" ,python-babel)
3884 ("python-jinja2" ,python-jinja2)
3885 ("python-pytz" ,python-pytz)))
3886 (home-page "https://github.com/python-babel/flask-babel")
3887 (synopsis "Add i18n/l10n support to Flask applications")
3888 (description "This package implements internationalization and localization
3889support for Flask. This is based on the Python babel module as well as pytz -
3890both of which are installed automatically if you install this library.")
f210e944 3891 (license license:bsd-3)))
462bf271
DM
3892
3893(define-public python2-flask-babel
f210e944 3894 (package-with-python2 python-flask-babel))
4a093330 3895
de2966cf
EF
3896(define-public python-sqlalchemy-utils
3897 (package
3898 (name "python-sqlalchemy-utils")
3899 (version "0.32.9")
3900 (source
3901 (origin
3902 (method url-fetch)
3903 (uri (pypi-uri "SQLAlchemy-Utils" version))
3904 (sha256
3905 (base32
3906 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3907 (build-system python-build-system)
c22b4f87 3908 (propagated-inputs
de2966cf
EF
3909 `(("python-six" ,python-six)
3910 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3911 (native-inputs
3912 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3913 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3914 (synopsis "Various utility functions for SQLAlchemy")
3915 (description
3916 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
3917for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3918
3919You might also want to install the following optional dependencies:
3920@enumerate
3921@item @code{python-passlib}
3922@item @code{python-babel}
3923@item @code{python-cryptography}
3924@item @code{python-pytz}
3925@item @code{python-psycopg2}
3926@item @code{python-furl}
3927@item @code{python-flask-babel}
3928@end enumerate
3929")
de2966cf
EF
3930 (license license:bsd-3)))
3931
3932(define-public python2-sqlalchemy-utils
f210e944 3933 (package-with-python2 python-sqlalchemy-utils))
de2966cf 3934
af5a4602
CAW
3935(define-public python-alembic
3936 (package
3937 (name "python-alembic")
bb484529 3938 (version "0.8.7")
af5a4602
CAW
3939 (source
3940 (origin
3941 (method url-fetch)
3942 (uri (pypi-uri "alembic" version))
3943 (sha256
3944 (base32
bb484529 3945 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3946 (build-system python-build-system)
3947 (native-inputs
3948 `(("python-mock" ,python-mock)
3949 ("python-pytest-cov" ,python-pytest-cov)))
3950 (propagated-inputs
3951 `(("python-sqlalchemy" ,python-sqlalchemy)
3952 ("python-mako" ,python-mako)
3953 ("python-editor" ,python-editor)))
3954 (home-page "http://bitbucket.org/zzzeek/alembic")
3955 (synopsis
3956 "Database migration tool for SQLAlchemy")
3957 (description
3958 "Alembic is a lightweight database migration tool for usage with the
3959SQLAlchemy Database Toolkit for Python.")
f210e944 3960 (license license:expat)))
af5a4602
CAW
3961
3962(define-public python2-alembic
f210e944 3963 (package-with-python2 python-alembic))
af5a4602 3964
1671c07c
EB
3965(define-public python-distutils-extra
3966 (package
3967 (name "python-distutils-extra")
3968 (version "2.38")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3973 version "/+download/python-distutils-extra-"
3974 version ".tar.gz"))
3975 (sha256
3976 (base32
3977 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3978 (build-system python-build-system)
1671c07c
EB
3979 (home-page "https://launchpad.net/python-distutils-extra/")
3980 (synopsis "Enhancements to Python's distutils")
3981 (description
3982 "The python-distutils-extra module enables you to easily integrate
3983gettext support, themed icons, and scrollkeeper-based documentation into
3984Python's distutils.")
3f641af0 3985 (license license:gpl2)))
1671c07c
EB
3986
3987(define-public python2-distutils-extra
3988 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3989
3990(define-public python2-elib.intl
3991 (package
3992 (name "python2-elib.intl")
3993 (version "0.0.3")
3994 (source
3995 (origin
3996 ;; This project doesn't tag releases or publish tarballs, so we take
3997 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3998 (method git-fetch)
3999 (uri (git-reference
4000 (url "https://github.com/dieterv/elib.intl.git")
4001 (commit "d09997cfef")))
4002 (sha256
4003 (base32
4004 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4005 (build-system python-build-system)
ea5456c8
EB
4006 (arguments
4007 ;; incompatible with Python 3 (exception syntax)
4008 `(#:python ,python-2
b41a05ce 4009 #:tests? #f))
ea5456c8
EB
4010 (home-page "https://github.com/dieterv/elib.intl")
4011 (synopsis "Enhanced internationalization for Python")
4012 (description
4013 "The elib.intl module provides enhanced internationalization (I18N)
4014services for your Python modules and applications.")
3f641af0 4015 (license license:lgpl3+)))
ea5456c8 4016
c937562e
EB
4017(define-public python-pillow
4018 (package
4019 (name "python-pillow")
aba5182c 4020 (version "3.3.3")
c937562e
EB
4021 (source
4022 (origin
4023 (method url-fetch)
f1d9231d 4024 (uri (pypi-uri "Pillow" version))
c937562e
EB
4025 (sha256
4026 (base32
aba5182c 4027 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4028 (build-system python-build-system)
4029 (native-inputs
f3b98f4f 4030 `(("python-nose" ,python-nose)))
c937562e 4031 (inputs
5ff408d9
SB
4032 `(("freetype" ,freetype)
4033 ("lcms" ,lcms)
c937562e
EB
4034 ("zlib" ,zlib)
4035 ("libjpeg" ,libjpeg)
4036 ("openjpeg" ,openjpeg)
5ff408d9
SB
4037 ("libtiff" ,libtiff)
4038 ("libwebp" ,libwebp)))
c937562e 4039 (arguments
e5358a6b 4040 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4041 (add-after
4042 'install 'check-installed
6151120a 4043 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4044 (begin
4045 (setenv "HOME" (getcwd))
6151120a
HG
4046 ;; Make installed package available for running the
4047 ;; tests
4048 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4049 (and (zero? (system* "python" "selftest.py"
4050 "--installed"))
4051 (zero? (system* "python" "test-installed.py"))))))
4052 (delete 'check))))
c937562e
EB
4053 (home-page "https://pypi.python.org/pypi/Pillow")
4054 (synopsis "Fork of the Python Imaging Library")
4055 (description
4056 "The Python Imaging Library adds image processing capabilities to your
4057Python interpreter. This library provides extensive file format support, an
4058efficient internal representation, and fairly powerful image processing
4059capabilities. The core image library is designed for fast access to data
4060stored in a few basic pixel formats. It should provide a solid foundation for
4061a general image processing tool.")
3f641af0 4062 (license (license:x11-style
c937562e
EB
4063 "http://www.pythonware.com/products/pil/license.htm"
4064 "The PIL Software License"))))
4065
4066(define-public python2-pillow
4067 (package-with-python2 python-pillow))
bb986599 4068
a415f036
FB
4069(define-public python-pycparser
4070 (package
4071 (name "python-pycparser")
38eb6919 4072 (version "2.14")
a415f036
FB
4073 (source
4074 (origin
4075 (method url-fetch)
38eb6919 4076 (uri (pypi-uri "pycparser" version))
a415f036
FB
4077 (sha256
4078 (base32
38eb6919 4079 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4080 (outputs '("out" "doc"))
4081 (build-system python-build-system)
4082 (native-inputs
f3b98f4f 4083 `(("pkg-config" ,pkg-config)))
a415f036 4084 (arguments
89b5c60e 4085 `(#:phases
a415f036
FB
4086 (alist-replace
4087 'check
4088 (lambda _
4089 (with-directory-excursion "tests"
4090 (zero? (system* "python" "all_tests.py"))))
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 (examples (string-append doc "/examples")))
4097 (mkdir-p examples)
4098 (for-each (lambda (file)
4099 (copy-file (string-append "." file)
4100 (string-append doc file)))
4101 '("/README.rst" "/CHANGES" "/LICENSE"))
4102 (copy-recursively "examples" examples)))
4103 %standard-phases))))
4104 (home-page "https://github.com/eliben/pycparser")
4105 (synopsis "C parser in Python")
4106 (description
4107 "Pycparser is a complete parser of the C language, written in pure Python
4108using the PLY parsing library. It parses C code into an AST and can serve as
4109a front-end for C compilers or analysis tools.")
3f641af0 4110 (license license:bsd-3)))
a415f036
FB
4111
4112(define-public python2-pycparser
4113 (package-with-python2 python-pycparser))
57c3f716
FB
4114
4115(define-public python-cffi
4116 (package
4117 (name "python-cffi")
2d3a437c 4118 (version "1.4.2")
57c3f716
FB
4119 (source
4120 (origin
4121 (method url-fetch)
2d3a437c 4122 (uri (pypi-uri "cffi" version))
89b5c60e 4123 (sha256
2d3a437c 4124 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4125 (build-system python-build-system)
4126 (outputs '("out" "doc"))
4127 (inputs
4128 `(("libffi" ,libffi)))
4129 (propagated-inputs ; required at run-time
4130 `(("python-pycparser" ,python-pycparser)))
4131 (native-inputs
4132 `(("pkg-config" ,pkg-config)
4133 ("python-sphinx" ,python-sphinx)
f3b98f4f 4134 ("python-pytest" ,python-pytest)))
57c3f716 4135 (arguments
4179f952 4136 `(#:phases
57c3f716
FB
4137 (alist-cons-after
4138 'install 'install-doc
4139 (lambda* (#:key outputs #:allow-other-keys)
4140 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4141 (doc (string-append data "/doc/" ,name "-" ,version))
4142 (html (string-append doc "/html")))
4143 (with-directory-excursion "doc"
4144 (system* "make" "html")
4145 (mkdir-p html)
4146 (copy-recursively "build/html" html))
4147 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4148 %standard-phases)))
4149 (home-page "http://cffi.readthedocs.org")
4150 (synopsis "Foreign function interface for Python")
4151 (description
4152 "Foreign Function Interface for Python calling C code.")
bd3fa666 4153 (license license:expat)))
57c3f716
FB
4154
4155(define-public python2-cffi
4156 (package-with-python2 python-cffi))
6fa14469
FB
4157
4158(define-public python-xcffib
4159 (package
4160 (name "python-xcffib")
4161 (version "0.1.9")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (string-append "https://pypi.python.org/packages/source/x/"
4166 "xcffib/xcffib-" version ".tar.gz"))
4167 (sha256
4168 (base32
4169 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4170 (build-system python-build-system)
4171 (inputs
482d9591 4172 `(("libxcb" ,libxcb)))
6fa14469 4173 (propagated-inputs
482d9591
HG
4174 `(("python-cffi" ,python-cffi) ; used at run time
4175 ("python-six" ,python-six)))
6fa14469 4176 (arguments
89b5c60e 4177 `(#:phases
6fa14469
FB
4178 (alist-cons-after
4179 'install 'install-doc
4180 (lambda* (#:key outputs #:allow-other-keys)
4181 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4182 "/doc/" ,name "-" ,version)))
4183 (mkdir-p doc)
4184 (copy-file "README.md"
4185 (string-append doc "/README.md"))))
4186 %standard-phases)))
4187 (home-page "https://github.com/tych0/xcffib")
4188 (synopsis "XCB Python bindings")
4189 (description
4190 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4191support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4192 (license license:expat)))
6fa14469
FB
4193
4194(define-public python2-xcffib
4195 (package-with-python2 python-xcffib))
4196
9e099723
FB
4197(define-public python-cairocffi
4198 (package
4199 (name "python-cairocffi")
4200 (version "0.6")
4201 (source
4202 (origin
4203 (method url-fetch)
4204 ;; The archive on pypi is missing the 'utils' directory!
4205 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4206 version ".tar.gz"))
f586c877 4207 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4208 (sha256
4209 (base32
4210 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4211 (build-system python-build-system)
4212 (outputs '("out" "doc"))
4213 (inputs
4214 `(("gdk-pixbuf" ,gdk-pixbuf)
4215 ("cairo" ,cairo)))
4216 (native-inputs
4217 `(("pkg-config" ,pkg-config)
4218 ("python-sphinx" ,python-sphinx)
f3b98f4f 4219 ("python-docutils" ,python-docutils)))
9e099723
FB
4220 (propagated-inputs
4221 `(("python-xcffib" ,python-xcffib))) ; used at run time
4222 (arguments
89b5c60e 4223 `(#:phases
9e099723
FB
4224 (alist-cons-after
4225 'install 'install-doc
4226 (lambda* (#:key inputs outputs #:allow-other-keys)
4227 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4228 (doc (string-append data "/doc/" ,name "-" ,version))
4229 (html (string-append doc "/html")))
89b5c60e 4230 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4231 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4232 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4233 (setenv "LANG" "en_US.UTF-8")
4234 (mkdir-p html)
4235 (for-each (lambda (file)
4236 (copy-file (string-append "." file)
4237 (string-append doc file)))
4238 '("/README.rst" "/CHANGES" "/LICENSE"))
4239 (system* "python" "setup.py" "build_sphinx")
4240 (copy-recursively "docs/_build/html" html)))
4241 %standard-phases)))
4242 (home-page "https://github.com/SimonSapin/cairocffi")
4243 (synopsis "Python bindings and object-oriented API for Cairo")
4244 (description
4245 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4246Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4247graphics library with support for multiple backends including image buffers,
4248PNG, PostScript, PDF, and SVG file output.")
3f641af0 4249 (license license:bsd-3)))
9e099723
FB
4250
4251(define-public python2-cairocffi
4252 (package-with-python2 python-cairocffi))
4253
3cff95cb
RW
4254(define-public python-decorator
4255 (package
4256 (name "python-decorator")
eb6e2e81 4257 (version "4.0.9")
3cff95cb
RW
4258 (source
4259 (origin
4260 (method url-fetch)
e21338be 4261 (uri (pypi-uri "decorator" version))
3cff95cb 4262 (sha256
eb6e2e81 4263 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4264 (build-system python-build-system)
4265 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4266 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4267 (synopsis "Python module to simplify usage of decorators")
4268 (description
4269 "The aim of the decorator module is to simplify the usage of decorators
4270for the average programmer, and to popularize decorators usage giving examples
4271of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4272etc. The core of this module is a decorator factory.")
4273 (license license:expat)))
4274
4275(define-public python2-decorator
4276 (package-with-python2 python-decorator))
4277
2c0499ad
RW
4278(define-public python-drmaa
4279 (package
4280 (name "python-drmaa")
4281 (version "0.7.6")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (string-append
4286 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4287 version ".tar.gz"))
4288 (sha256
4289 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4290 (build-system python-build-system)
4291 ;; The test suite requires libdrmaa which is provided by the cluster
4292 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4293 ;; should be set to the path of the libdrmaa library.
4294 (arguments '(#:tests? #f))
4295 (native-inputs
f3b98f4f 4296 `(("python-nose" ,python-nose)))
2c0499ad
RW
4297 (home-page "https://pypi.python.org/pypi/drmaa")
4298 (synopsis "Python bindings for the DRMAA library")
4299 (description
4300 "A Python package for Distributed Resource Management (DRM) job
4301submission and control. This package is an implementation of the DRMAA 1.0
4302Python language binding specification.")
3f641af0 4303 (license license:bsd-3)))
2c0499ad
RW
4304
4305(define-public python2-drmaa
4306 (package-with-python2 python-drmaa))
4307
d05c6da0
RW
4308(define-public python-gridmap
4309 (package
4310 (name "python-gridmap")
4311 (version "0.13.0")
4312 (source
4313 (origin
4314 (method url-fetch)
4315 (uri (string-append
4316 "https://github.com/pygridtools/gridmap/archive/v"
4317 version ".tar.gz"))
4318 (file-name (string-append name "-" version ".tar.gz"))
4319 (sha256
4320 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4321 (build-system python-build-system)
f22efa01 4322 (propagated-inputs
d05c6da0
RW
4323 `(("python-psutil" ,python-psutil)
4324 ("python-drmaa" ,python-drmaa)
4325 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4326 (home-page "https://github.com/pygridtools/gridmap")
4327 (synopsis "Create jobs on a cluster directly from Python")
4328 (description
4329 "Gridmap is a Python package to allow you to easily create jobs on the
4330cluster directly from Python. You can directly map Python functions onto the
4331cluster without needing to write any wrapper code yourself.")
3f641af0 4332 (license license:gpl3+)))
d05c6da0
RW
4333
4334(define-public python2-gridmap
4335 (package-with-python2 python-gridmap))
4336
cb6d5c54
RW
4337(define-public python-pexpect
4338 (package
4339 (name "python-pexpect")
4340 (version "3.3")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (string-append "https://pypi.python.org/packages/source/p/"
4345 "pexpect/pexpect-" version ".tar.gz"))
4346 (sha256
4347 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4348 (build-system python-build-system)
4349 (arguments
4350 `(#:phases
4351 (modify-phases %standard-phases
4352 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4353 (native-inputs
4354 `(("python-nose" ,python-nose)))
4355 (home-page "http://pexpect.readthedocs.org/")
4356 (synopsis "Controlling interactive console applications")
4357 (description
4358 "Pexpect is a pure Python module for spawning child applications;
4359controlling them; and responding to expected patterns in their output.
4360Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4361child application and control it as if a human were typing commands.")
3f641af0 4362 (license license:isc)))
cb6d5c54
RW
4363
4364(define-public python2-pexpect
4365 (package-with-python2 python-pexpect))
4366
229ad120
RW
4367(define-public python-setuptools-scm
4368 (package
4369 (name "python-setuptools-scm")
42d6d0d0 4370 (version "1.11.1")
229ad120
RW
4371 (source (origin
4372 (method url-fetch)
383af6b0 4373 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4374 (sha256
4375 (base32
42d6d0d0 4376 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4377 (build-system python-build-system)
4378 (home-page "https://github.com/pypa/setuptools_scm/")
4379 (synopsis "Manage Python package versions in SCM metadata")
4380 (description
383af6b0 4381 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4382@dfn{software configuration management} (SCM) metadata instead of declaring
4383them as the version argument or in a SCM managed file.")
4384 (license license:expat)))
4385
4386(define-public python2-setuptools-scm
4387 (package-with-python2 python-setuptools-scm))
4388
b74270ee
RW
4389(define-public python-pathpy
4390 (package
4391 (name "python-pathpy")
4392 (version "8.1.1")
4393 (source
4394 (origin
4395 (method url-fetch)
4396 (uri (string-append "https://pypi.python.org/packages/source/p/"
4397 "path.py/path.py-" version ".tar.gz"))
4398 (sha256
4399 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4400 (outputs '("out" "doc"))
b74270ee
RW
4401 (build-system python-build-system)
4402 (propagated-inputs
4403 `(("python-appdirs" ,python-appdirs)))
4404 (native-inputs
f3b98f4f 4405 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4406 ("python-sphinx" ,python-sphinx)
4407 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4408 ("python-pytest" ,python-pytest)
4409 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4410 (arguments
4411 `(#:phases
4412 (modify-phases %standard-phases
4413 (add-after 'build 'build-doc
4414 (lambda _
4415 (setenv "LANG" "en_US.UTF-8")
4416 (zero? (system* "python" "setup.py" "build_sphinx"))))
4417 (add-after 'install 'install-doc
4418 (lambda* (#:key outputs #:allow-other-keys)
4419 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4420 (doc (string-append data "/doc/" ,name "-" ,version))
4421 (html (string-append doc "/html")))
4422 (mkdir-p html)
4423 (for-each (lambda (file)
4424 (copy-file file (string-append doc "/" file)))
4425 '("README.rst" "CHANGES.rst"))
4426 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4427 (home-page "http://github.com/jaraco/path.py")
4428 (synopsis "Python module wrapper for built-in os.path")
4429 (description
4430 "@code{path.py} implements path objects as first-class entities, allowing
4431common operations on files to be invoked on those path objects directly.")
4432 (license license:expat)))
4433
4434(define-public python2-pathpy
4435 (package-with-python2 python-pathpy))
4436
0d34e01b
RW
4437(define-public python-pickleshare
4438 (package
4439 (name "python-pickleshare")
4440 (version "0.5")
4441 (source
4442 (origin
4443 (method url-fetch)
4444 (uri (string-append "https://pypi.python.org/packages/source/p/"
4445 "pickleshare/pickleshare-" version ".tar.gz"))
4446 (sha256
4447 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4448 (build-system python-build-system)
4449 (propagated-inputs
4450 `(("python-pathpy" ,python-pathpy)))
4451 (home-page "https://github.com/vivainio/pickleshare")
4452 (synopsis "Tiny key value database with concurrency support")
4453 (description
4454 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4455Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4456shelve, many processes can access the database simultaneously. Changing a
4457value in database is immediately visible to other processes accessing the same
4458database. Concurrency is possible because the values are stored in separate
4459files. Hence the “database” is a directory where all files are governed by
4460PickleShare.")
4461 (license license:expat)))
4462
4463(define-public python2-pickleshare
4464 (package-with-python2 python-pickleshare))
4465
cd6e5189
RW
4466(define-public python-simplegeneric
4467 (package
4468 (name "python-simplegeneric")
4469 (version "0.8.1")
4470 (source
4471 (origin
4472 (method url-fetch)
4473 (uri (string-append "https://pypi.python.org/packages/source/s/"
4474 "simplegeneric/simplegeneric-" version ".zip"))
4475 (sha256
4476 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4477 (build-system python-build-system)
4478 (native-inputs
f3b98f4f 4479 `(("unzip" ,unzip)))
cd6e5189
RW
4480 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4481 (synopsis "Python module for simple generic functions")
4482 (description
4483 "The simplegeneric module lets you define simple single-dispatch generic
4484functions, akin to Python’s built-in generic functions like @code{len()},
4485@code{iter()} and so on. However, instead of using specially-named methods,
4486these generic functions use simple lookup tables, akin to those used by
4487e.g. @code{pickle.dump()} and other generic functions found in the Python
4488standard library.")
3f641af0 4489 (license license:zpl2.1)))
cd6e5189
RW
4490
4491(define-public python2-simplegeneric
4492 (package-with-python2 python-simplegeneric))
4493
ddc7d8ed
RW
4494(define-public python-ipython-genutils
4495 (package
4496 (name "python-ipython-genutils")
4497 (version "0.1.0")
4498 (source
4499 (origin
4500 (method url-fetch)
4501 (uri (string-append "https://pypi.python.org/packages/source/i/"
4502 "ipython_genutils/ipython_genutils-"
4503 version ".tar.gz"))
4504 (sha256
4505 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4506 (build-system python-build-system)
4507 (arguments `(#:tests? #f)) ; no tests
4508 (home-page "http://ipython.org")
4509 (synopsis "Vestigial utilities from IPython")
4510 (description
4511 "This package provides retired utilities from IPython.")
3f641af0 4512 (license license:bsd-3)))
ddc7d8ed
RW
4513
4514(define-public python2-ipython-genutils
4515 (package-with-python2 python-ipython-genutils))
4516
2b10eb48
RW
4517(define-public python-traitlets
4518 (package
4519 (name "python-traitlets")
a5ba1481 4520 (version "4.2.0")
2b10eb48
RW
4521 (source
4522 (origin
4523 (method url-fetch)
cc0c4fde 4524 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4525 (sha256
4526 (base32
a5ba1481 4527 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4528 (build-system python-build-system)
4529 (arguments
4530 `(#:phases
4531 (modify-phases %standard-phases
4532 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4533 (propagated-inputs
4534 `(("python-ipython-genutils" ,python-ipython-genutils)
4535 ("python-decorator" ,python-decorator)))
4536 (native-inputs
cc0c4fde
EF
4537 `(("python-mock" ,python-mock)
4538 ("python-nose" ,python-nose)))
2b10eb48
RW
4539 (home-page "http://ipython.org")
4540 (synopsis "Configuration system for Python applications")
4541 (description
4542 "Traitlets is a framework that lets Python classes have attributes with
4543type checking, dynamically calculated default values, and ‘on change’
4544callbacks. The package also includes a mechanism to use traitlets for
4545configuration, loading values from files or from command line arguments. This
4546is a distinct layer on top of traitlets, so you can use traitlets in your code
4547without using the configuration machinery.")
3f641af0 4548 (license license:bsd-3)))
2b10eb48
RW
4549
4550(define-public python2-traitlets
4551 (package-with-python2 python-traitlets))
4552
4263b06f
RW
4553(define-public python-jupyter-core
4554 (package
4555 (name "python-jupyter-core")
4556 (version "4.2.0")
4557 (source
4558 (origin
4559 (method url-fetch)
4560 (uri (string-append (pypi-uri "jupyter_core" version)))
4561 (sha256
4562 (base32
4563 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4564 (build-system python-build-system)
4565 ;; FIXME: not sure how to run the tests
4566 (arguments `(#:tests? #f))
4567 (propagated-inputs
4568 `(("python-traitlets" ,python-traitlets)))
4569 (home-page "http://jupyter.org/")
4570 (synopsis "Jupyter base package")
4571 (description
4572 "Jupyter core is the base package on which Jupyter projects rely.")
4573 (license license:bsd-3)))
4574
4575(define-public python2-jupyter-core
4576 (package-with-python2 python-jupyter-core))
4577
9ff01f2d
RW
4578(define-public python-jupyter-client
4579 (package
4580 (name "python-jupyter-client")
4581 (version "4.4.0")
4582 (source
4583 (origin
4584 (method url-fetch)
4585 (uri (pypi-uri "jupyter_client" version))
4586 (sha256
4587 (base32
4588 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4589 (build-system python-build-system)
4590 ;; Tests fail because of missing native python kernel which I assume is
4591 ;; provided by the ipython package, which we cannot use because it would
4592 ;; cause a dependency cycle.
4593 (arguments `(#:tests? #f))
4594 (propagated-inputs
4595 `(("python-pyzmq" ,python-pyzmq)
4596 ("python-traitlets" ,python-traitlets)
4597 ("python-jupyter-core" ,python-jupyter-core)))
4598 (home-page "http://jupyter.org/")
4599 (synopsis "Jupyter protocol implementation and client libraries")
4600 (description
4601 "The @code{jupyter_client} package contains the reference implementation
4602of the Jupyter protocol. It also provides client and kernel management APIs
4603for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4604installing @code{kernelspec}s for use with Jupyter frontends.")
4605 (license license:bsd-3)))
4606
4607(define-public python2-jupyter-client
4608 (package-with-python2 python-jupyter-client))
4609
ab526102
RW
4610(define-public python-ipykernel
4611 (package
4612 (name "python-ipykernel")
4613 (version "4.5.0")
4614 (source
4615 (origin
4616 (method url-fetch)
4617 (uri (pypi-uri "ipykernel" version))
4618 (sha256
4619 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4620 (build-system python-build-system)
4621 ;; The tests load a submodule of IPython. However, IPython itself depends
4622 ;; on ipykernel.
4623 (arguments `(#:tests? #f))
4624 (propagated-inputs
4625 ;; imported at runtime during connect
4626 `(("python-jupyter-client" ,python-jupyter-client)))
4627 (home-page "http://ipython.org")
4628 (synopsis "IPython Kernel for Jupyter")
4629 (description
4630 "This package provides the IPython kernel for Jupyter.")
4631 (license license:bsd-3)))
4632
4633(define-public python2-ipykernel
4634 (package-with-python2 python-ipykernel))
4635
5ff6effc
RW
4636(define-public python-testpath
4637 (package
4638 (name "python-testpath")
4639 (version "0.2")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4644 version ".tar.gz"))
4645 (file-name (string-append name "-" version ".tar.gz"))
4646 (sha256
4647 (base32
4648 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4649 (build-system python-build-system)
4650 (arguments
4651 `(#:tests? #f ; this package does not even have a setup.py
4652 #:phases
4653 (modify-phases %standard-phases
4654 (delete 'install)
4655 (replace 'build
4656 (lambda* (#:key inputs outputs #:allow-other-keys)
4657 (let ((dir (string-append
4658 (assoc-ref outputs "out")
4659 "/lib/python"
4660 (string-take (string-take-right
4661 (assoc-ref inputs "python") 5) 3)
4662 "/site-packages/testpath")))
4663 (mkdir-p dir)
4664 (copy-recursively "testpath" dir))
4665 #t)))))
4666 (home-page "https://github.com/takluyver/testpath")
4667 (synopsis "Test utilities for code working with files and commands")
4668 (description
4669 "Testpath is a collection of utilities for Python code working with files
4670and commands. It contains functions to check things on the filesystem, and
4671tools for mocking system commands and recording calls to those.")
4672 (license license:expat)))
4673
4674(define-public python2-testpath
4675 (package-with-python2 python-testpath))
4676
ae1ab9fe
FB
4677(define-public python-ipython
4678 (package
4679 (name "python-ipython")
accd5f99 4680 (version "4.0.0")
ae1ab9fe
FB
4681 (source
4682 (origin
fceac880 4683 (method url-fetch)
accd5f99 4684 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4685 (sha256
accd5f99 4686 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
ae1ab9fe
FB
4687 (build-system python-build-system)
4688 (outputs '("out" "doc"))
3a0b1b9a
FB
4689 (propagated-inputs
4690 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4691 ("python-terminado" ,python-terminado)
ae1ab9fe 4692 ("python-matplotlib" ,python-matplotlib)
5d26e542 4693 ("python-numpy" ,python-numpy)
ae1ab9fe 4694 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4695 ("python-jinja2" ,python-jinja2)
4696 ("python-mistune" ,python-mistune)
accd5f99
RW
4697 ("python-pexpect" ,python-pexpect)
4698 ("python-pickleshare" ,python-pickleshare)
4699 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4700 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4701 ("python-traitlets" ,python-traitlets)
4702 ("python-ipykernel" ,python-ipykernel)
4703 ("python-pygments" ,python-pygments)))
4704 (inputs
4705 `(("readline" ,readline)
4706 ("which" ,which)))
ae1ab9fe
FB
4707 (native-inputs
4708 `(("pkg-config" ,pkg-config)
accd5f99
RW
4709 ("python-requests" ,python-requests) ;; for tests
4710 ("python-testpath" ,python-testpath)
4711 ("python-nose" ,python-nose)
ae1ab9fe
FB
4712 ("python-sphinx" ,python-sphinx)
4713 ("texlive" ,texlive)
f3b98f4f 4714 ("texinfo" ,texinfo)))
ae1ab9fe 4715 (arguments
89b5c60e 4716 `(#:phases
3a0b1b9a
FB
4717 (modify-phases %standard-phases
4718 (add-after
4719 'install 'install-doc
4720 (lambda* (#:key inputs outputs #:allow-other-keys)
4721 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4722 (doc (string-append data "/doc/" ,name "-" ,version))
4723 (html (string-append doc "/html"))
4724 (man1 (string-append data "/man/man1"))
4725 (info (string-append data "/info"))
4726 (examples (string-append doc "/examples")))
afd3d931 4727 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4728 ;; Make installed package available for running the tests
4729 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4730 (with-directory-excursion "docs"
accd5f99
RW
4731 ;; FIXME: pdf fails to build
4732 ;;(system* "make" "pdf" "PAPER=a4")
4733 (system* "make" "html")
3a0b1b9a
FB
4734 (system* "make" "info"))
4735 (copy-recursively "docs/man" man1)
4736 (copy-recursively "examples" examples)
accd5f99 4737 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4738 ;; (copy-file "docs/build/latex/ipython.pdf"
4739 ;; (string-append doc "/ipython.pdf"))
4740 (mkdir-p info)
4741 (copy-file "docs/build/texinfo/ipython.info"
4742 (string-append info "/ipython.info"))
4743 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4744 ;; Tests can only be run after the library has been installed and not
4745 ;; within the source directory.
4746 (delete 'check)
4747 (add-after
4748 'install 'check
eee5cd04 4749 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4750 (if tests?
4751 (with-directory-excursion "/tmp"
eee5cd04
HG
4752 ;; Make installed package available for running the tests
4753 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4754 (setenv "HOME" "/tmp/") ;; required by a test
4755 (zero? (system* (string-append (assoc-ref outputs "out")
4756 "/bin/iptest"))))
4757 #t)))
4758 (add-before
4759 'install 'fix-tests
4760 (lambda* (#:key inputs #:allow-other-keys)
4761 (substitute* "./IPython/utils/_process_posix.py"
4762 (("/usr/bin/env', 'which") (which "which")))
4763 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4764 (("#!/usr/bin/env python")
4765 (string-append "#!" (which "python"))))
4766 ;; Disable 1 failing test
4767 (substitute* "./IPython/core/tests/test_magic.py"
4768 (("def test_dirops\\(\\):" all)
4769 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4770 (home-page "http://ipython.org")
4771 (synopsis "IPython is a tool for interactive computing in Python")
4772 (description
4773 "IPython provides a rich architecture for interactive computing with:
4774Powerful interactive shells, a browser-based notebook, support for interactive
4775data visualization, embeddable interpreters and tools for parallel
4776computing.")
135ba811
EF
4777 (license license:bsd-3)
4778 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4779
4780(define-public python2-ipython
135ba811 4781 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4782 (package
4783 (inherit ipython)
4784 ;; FIXME: some tests are failing
4785 (arguments
4786 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4787 ;; FIXME: add pyreadline once available.
89b5c60e 4788 (inputs
135ba811
EF
4789 `(("python2-mock" ,python2-mock)
4790 ,@(package-inputs ipython))))))
03411993
AE
4791
4792(define-public python-isodate
4793 (package
4794 (name "python-isodate")
b6785c2e 4795 (version "0.5.4")
03411993
AE
4796 (source
4797 (origin
4798 (method url-fetch)
b6785c2e 4799 (uri (pypi-uri "isodate" version))
03411993
AE
4800 (sha256
4801 (base32
b6785c2e 4802 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4803 (build-system python-build-system)
03411993
AE
4804 (home-page
4805 "http://cheeseshop.python.org/pypi/isodate")
4806 (synopsis
4807 "Python date parser and formatter")
4808 (description
4809 "Python-isodate is a python module for parsing and formatting
4810ISO 8601 dates, time and duration.")
3f641af0 4811 (license license:bsd-3)))
03411993
AE
4812
4813(define-public python2-isodate
4814 (package-with-python2 python-isodate))
673ab897
AE
4815
4816(define-public python-html5lib
4817 (package
4818 (name "python-html5lib")
fee04c19 4819 (version "1.0b8")
673ab897
AE
4820 (source
4821 (origin
4822 (method url-fetch)
fee04c19 4823 (uri (pypi-uri "html5lib" version))
673ab897
AE
4824 (sha256
4825 (base32
fee04c19 4826 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4827 (build-system python-build-system)
3dd75476
AE
4828 (propagated-inputs
4829 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4830 (arguments
4831 `(#:test-target "check"))
4832 (home-page
4833 "https://github.com/html5lib/html5lib-python")
4834 (synopsis
4835 "Python HTML parser based on the WHATWG HTML specifcation")
4836 (description
4837 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4838and written in Python.")
bd3fa666 4839 (license license:expat)))
673ab897
AE
4840
4841(define-public python2-html5lib
4842 (package-with-python2 python-html5lib))
e99f4211 4843
8ee62c97
RW
4844;; Needed for python-bleach, a dependency of python-notebook
4845(define-public python-html5lib-0.9
4846 (package
4847 (inherit python-html5lib)
4848 (version "0.999")
4849 (source
4850 (origin
4851 (method url-fetch)
4852 (uri (pypi-uri "html5lib" version))
4853 (sha256
4854 (base32
4855 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4856
4857(define-public python2-html5lib-0.9
4858 (package-with-python2 python-html5lib-0.9))
4859
e99f4211
MW
4860(define-public python-urwid
4861 (package
4862 (name "python-urwid")
51ff41f6 4863 (version "1.3.1")
e99f4211
MW
4864 (source
4865 (origin
4866 (method url-fetch)
b97c1bfd 4867 (uri (pypi-uri "urwid" version))
e99f4211
MW
4868 (sha256
4869 (base32
51ff41f6 4870 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4871 (build-system python-build-system)
b97c1bfd
LF
4872 (arguments
4873 `(#:phases
4874 (modify-phases %standard-phases
4875 ;; Disable failing test. Bug filed upstream:
4876 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4877 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4878 (add-after 'unpack 'disable-failing-test
4879 (lambda _
4880 (substitute* "urwid/tests/test_event_loops.py"
4881 (("test_remove_watch_file")
4882 "disable_remove_watch_file")))))))
e99f4211
MW
4883 (home-page "http://urwid.org")
4884 (synopsis "Console user interface library for Python")
4885 (description
4886 "Urwid is a curses-based UI/widget library for Python. It includes many
4887features useful for text console applications.")
3f641af0 4888 (license license:lgpl2.1+)))
e99f4211
MW
4889
4890(define-public python2-urwid
4891 (package-with-python2 python-urwid))
d95a56c6 4892
47d0b292
TS
4893(define-public python-urwidtrees
4894 (package
4895 (name "python-urwidtrees")
37ec4623 4896 (version "1.0.2")
47d0b292
TS
4897 (source
4898 (origin
4899 (method url-fetch)
37ec4623
TS
4900 ;; package author intends on distributing via github rather than pypi:
4901 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4902 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4903 version ".tar.gz"))
4904 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4905 (sha256
4906 (base32
37ec4623 4907 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4908 (build-system python-build-system)
4909 (arguments
4910 '(#:tests? #f)) ; no tests
f22efa01 4911 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
4912 (home-page "https://github.com/pazz/urwidtrees")
4913 (synopsis "Tree widgets for urwid")
4914 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4915toolkit. Use it to build trees of widgets.")
3f641af0 4916 (license license:gpl3+)))
47d0b292
TS
4917
4918(define-public python2-urwidtrees
4919 (package-with-python2 python-urwidtrees))
4920
d95a56c6
PAR
4921(define-public python-dbus
4922 (package
4923 (name "python-dbus")
4924 (version "1.2.0")
4925 (source
4926 (origin
4927 (method url-fetch)
4928 (uri (string-append
5cc3096c 4929 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4930 version ".tar.gz"))
4931 (sha256
4932 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4933 (build-system gnu-build-system)
6717c879
SB
4934 (arguments
4935 '(#:phases
4936 (modify-phases %standard-phases
4937 (add-before
4938 'check 'pre-check
4939 (lambda _
4940 ;; XXX: For the missing '/etc/machine-id'.
4941 (substitute* "test/run-test.sh"
4942 (("DBUS_FATAL_WARNINGS=1")
4943 "DBUS_FATAL_WARNINGS=0"))
4944 #t)))))
d95a56c6
PAR
4945 (native-inputs
4946 `(("pkg-config" ,pkg-config)))
4947 (inputs
4948 `(("python" ,python)
2e88d113 4949 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4950 (synopsis "Python bindings for D-bus")
4951 (description "python-dbus provides bindings for libdbus, the reference
4952implementation of D-Bus.")
4953 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4954 (license license:expat)))
b52af02b
MW
4955
4956(define-public python2-dbus
4957 (package (inherit python-dbus)
4958 (name "python2-dbus")
4959 (inputs `(("python" ,python-2)
4960 ,@(alist-delete "python"
4961 (package-inputs python-dbus)
4962 equal?)))
4963 ;; FIXME: on Python 2, the test_utf8 fails with:
4964 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4965 (arguments `(#:tests? #f))))
a6ac8332
AE
4966
4967(define-public python-apsw
4968 (package
4969 (name "python-apsw")
917708c2 4970 (version "3.9.2-r1")
a6ac8332
AE
4971 (source
4972 (origin
4973 (method url-fetch)
917708c2 4974 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4975 (sha256
4976 (base32
917708c2 4977 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4978 (build-system python-build-system)
4979 (inputs
f3b98f4f 4980 `(("sqlite" ,sqlite)))
a6ac8332
AE
4981 (arguments
4982 `(#:phases
4983 ;; swap check and install phases
4984 (alist-cons-after
4985 'install 'check
4986 (assoc-ref %standard-phases 'check)
4987 (alist-delete
4988 'check
4989 %standard-phases))))
4990 (home-page "https://github.com/rogerbinns/apsw/")
4991 (synopsis "Another Python SQLite Wrapper")
4992 (description "APSW is a Python wrapper for the SQLite
4993embedded relational database engine. In contrast to other wrappers such as
4994pysqlite it focuses on being a minimal layer over SQLite attempting just to
4995translate the complete SQLite API into Python.")
abde5f37 4996 (license license:zlib)))
a6ac8332
AE
4997
4998(define-public python2-apsw
4999 (package-with-python2 python-apsw))
26b307e2
AE
5000
5001(define-public python-lxml
5002 (package
5003 (name "python-lxml")
d58a3203 5004 (version "3.6.0")
26b307e2
AE
5005 (source
5006 (origin
5007 (method url-fetch)
97bbc480 5008 (uri (pypi-uri "lxml" version))
26b307e2 5009 (sha256
d58a3203
EF
5010 (base32
5011 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5012 (build-system python-build-system)
5013 (inputs
5014 `(("libxml2" ,libxml2)
f3b98f4f 5015 ("libxslt" ,libxslt)))
26b307e2
AE
5016 (home-page "http://lxml.de/")
5017 (synopsis
5018 "Python XML processing library")
5019 (description
5020 "The lxml XML toolkit is a Pythonic binding for the C libraries
5021libxml2 and libxslt.")
3f641af0 5022 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5023
5024(define-public python2-lxml
5025 (package-with-python2 python-lxml))
4ed20663 5026
b32a1e47
CAW
5027;; beautifulsoup4 has a totally different namespace than 3.x,
5028;; and pypi seems to put it under its own name, so I guess we should too
5029(define-public python-beautifulsoup4
5030 (package
5031 (name "python-beautifulsoup4")
67fd4a12 5032 (version "4.5.1")
b32a1e47
CAW
5033 (source
5034 (origin
5035 (method url-fetch)
5036 (uri (pypi-uri "beautifulsoup4" version))
5037 (sha256
5038 (base32
67fd4a12 5039 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5040 (build-system python-build-system)
5f37f0b6
LF
5041 (arguments
5042 `(#:phases
5043 (modify-phases %standard-phases
5044 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5045 ;; must use this conversion script when building with Python 3. The
5046 ;; conversion script also runs the tests.
5047 ;; For more information, see the file 'convert-py3k' in the source
5048 ;; distribution.
5049 (replace 'check
5050 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5051 (home-page
5052 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5053 (synopsis
5054 "Python screen-scraping library")
5055 (description
5056 "Beautiful Soup is a Python library designed for rapidly setting up
5057screen-scraping projects. It offers Pythonic idioms for navigating,
5058searching, and modifying a parse tree, providing a toolkit for
5059dissecting a document and extracting what you need. It automatically
5060converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5061 (license license:expat)))
b32a1e47
CAW
5062
5063(define-public python2-beautifulsoup4
5064 (package
5065 (inherit (package-with-python2
5066 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5067 (arguments `(#:python ,python-2))))
b32a1e47 5068
092e86f5
AE
5069(define-public python2-cssutils
5070 (package
5071 (name "python2-cssutils")
58d1d816 5072 (version "1.0.1")
092e86f5
AE
5073 (source
5074 (origin
5075 (method url-fetch)
58d1d816 5076 (uri (pypi-uri "cssutils" version))
092e86f5 5077 (sha256
58d1d816
EF
5078 (base32
5079 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5080 (build-system python-build-system)
5081 (native-inputs
5082 `(("python2-mock" ,python2-mock) ; for the tests
5083 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5084 (arguments
5085 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5086 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5087 ))
092e86f5
AE
5088 (home-page "http://cthedot.de/cssutils/")
5089 (synopsis
5090 "CSS Cascading Style Sheets library for Python")
5091 (description
5092 "Cssutils is a Python package for parsing and building CSS
5093Cascading Style Sheets. Currently it provides a DOM only and no rendering
5094options.")
3f641af0 5095 (license license:lgpl3+)))
880ff77c
AE
5096
5097(define-public python-cssselect
5098 (package
5099 (name "python-cssselect")
d5ccd9ab 5100 (version "0.9.2")
880ff77c
AE
5101 (source
5102 (origin
5103 (method url-fetch)
d5ccd9ab 5104 (uri (pypi-uri "cssselect" version))
880ff77c 5105 (sha256
d5ccd9ab
EF
5106 (base32
5107 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5108 (build-system python-build-system)
880ff77c
AE
5109 (arguments
5110 ;; tests fail with message
5111 ;; AttributeError: 'module' object has no attribute 'tests'
5112 `(#:tests? #f))
5113 (home-page
5114 "https://pythonhosted.org/cssselect/")
5115 (synopsis
5116 "CSS3 selector parser and translator to XPath 1.0")
5117 (description
5118 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5119them to XPath 1.0 expressions. Such expressions can be used in lxml or
5120another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5121 (license license:bsd-3)))
880ff77c
AE
5122
5123(define-public python2-cssselect
5124 (package-with-python2 python-cssselect))
60357f99
AE
5125
5126(define-public python-netifaces
5127 (package
5128 (name "python-netifaces")
5129 (version "0.10.4")
5130 (source
5131 (origin
5132 (method url-fetch)
5133 (uri (string-append
5134 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5135 version
5136 ".tar.gz"))
5137 (sha256
5138 (base32
5139 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5140 (build-system python-build-system)
60357f99
AE
5141 (home-page
5142 "https://bitbucket.org/al45tair/netifaces")
5143 (synopsis
5144 "Python module for portable network interface information")
5145 (description
5146 "Netifaces is a Python module providing information on network
5147interfaces in an easy and portable manner.")
5148 (license license:expat)))
5149
5150(define-public python2-netifaces
5151 (package-with-python2 python-netifaces))
92cb152b 5152
32f77c04
RW
5153(define-public python-networkx
5154 (package
5155 (name "python-networkx")
a4d9609c 5156 (version "1.11")
32f77c04
RW
5157 (source
5158 (origin
5159 (method url-fetch)
a4d9609c 5160 (uri (pypi-uri "networkx" version))
32f77c04 5161 (sha256
a4d9609c 5162 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5163 (build-system python-build-system)
5164 ;; python-decorator is needed at runtime
5165 (propagated-inputs
5166 `(("python-decorator" ,python-decorator)))
5167 (native-inputs
f3b98f4f 5168 `(("python-nose" ,python-nose)))
32f77c04
RW
5169 (home-page "http://networkx.github.io/")
5170 (synopsis "Python module for creating and manipulating graphs and networks")
5171 (description
5172 "NetworkX is a Python package for the creation, manipulation, and study
5173of the structure, dynamics, and functions of complex networks.")
3f641af0 5174 (license license:bsd-3)))
32f77c04
RW
5175
5176(define-public python2-networkx
5177 (package-with-python2 python-networkx))
5178
92cb152b
RW
5179(define-public snakemake
5180 (package
5181 (name "snakemake")
5182 (version "3.2.1")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (string-append
5187 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5188 version ".tar.gz"))
5189 (sha256
5190 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5191 (build-system python-build-system)
92cb152b
RW
5192 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5193 (synopsis "Python-based execution environment for make-like workflows")
5194 (description
5195 "Snakemake aims to reduce the complexity of creating workflows by
5196providing a clean and modern domain specific specification language (DSL) in
5197Python style, together with a fast and comfortable execution environment.")
5198 (license license:expat)))
a1920bc9 5199
35de1fbd
RW
5200(define-public python-seaborn
5201 (package
5202 (name "python-seaborn")
fc899d4f 5203 (version "0.7.0")
35de1fbd
RW
5204 (source
5205 (origin
5206 (method url-fetch)
fc899d4f 5207 (uri (pypi-uri "seaborn" version))
35de1fbd 5208 (sha256
fc899d4f 5209 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5210 (build-system python-build-system)
5211 (propagated-inputs
5212 `(("python-pandas" ,python-pandas)
5213 ("python-matplotlib" ,python-matplotlib)
5214 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5215 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5216 (synopsis "Statistical data visualization")
5217 (description
5218 "Seaborn is a library for making attractive and informative statistical
5219graphics in Python. It is built on top of matplotlib and tightly integrated
5220with the PyData stack, including support for numpy and pandas data structures
5221and statistical routines from scipy and statsmodels.")
3f641af0 5222 (license license:bsd-3)
fc899d4f 5223 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5224
5225(define-public python2-seaborn
fc899d4f
EF
5226 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5227 (package
5228 (inherit base)
5229 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5230 ,@(package-propagated-inputs base))))))
35de1fbd 5231
90fc547f
RW
5232(define-public python-sympy
5233 (package
5234 (name "python-sympy")
5235 (version "0.7.6")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (string-append
5240 "https://github.com/sympy/sympy/releases/download/sympy-"
5241 version "/sympy-" version ".tar.gz"))
5242 (sha256
5243 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5244 (build-system python-build-system)
90fc547f
RW
5245 (home-page "http://www.sympy.org/")
5246 (synopsis "Python library for symbolic mathematics")
5247 (description
5248 "SymPy is a Python library for symbolic mathematics. It aims to become a
5249full-featured computer algebra system (CAS) while keeping the code as simple
5250as possible in order to be comprehensible and easily extensible.")
3f641af0 5251 (license license:bsd-3)))
90fc547f
RW
5252
5253(define-public python2-sympy
5254 (package-with-python2 python-sympy))
5255
e8c9b010
SR
5256(define-public python-q
5257 (package
5258 (name "python-q")
5259 (version "2.6")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "q" version))
5264 (sha256
5265 (base32
5266 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5267 (build-system python-build-system)
5268 (home-page "https://github.com/zestyping/q")
5269 (synopsis "Quick-and-dirty debugging output for tired programmers")
5270 (description
5271 "q is a Python module for \"print\" style of debugging Python code. It
5272provides convenient short API for print out of values, tracebacks, and
5273falling into the Python interpreter.")
f210e944 5274 (license license:asl2.0)))
e8c9b010
SR
5275
5276(define-public python2-q
f210e944 5277 (package-with-python2 python-q))
e8c9b010 5278
a1920bc9
FB
5279(define-public python-testlib
5280 (package
5281 (name "python-testlib")
5282 (version "0.6.5")
5283 (source
5284 (origin
5285 (method url-fetch)
5286 (uri (string-append
5287 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5288 version ".zip"))
5289 (sha256
5290 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5291 (build-system python-build-system)
a1920bc9 5292 (native-inputs
632735f2 5293 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5294 (synopsis "Python micro test suite harness")
5295 (description "A micro unittest suite harness for Python.")
5296 (home-page "https://github.com/trentm/testlib")
1cb9c006 5297 (license license:expat)))
a1920bc9
FB
5298
5299(define-public python2-testlib
5300 (package-with-python2 python-testlib))
db62afa5
LC
5301
5302(define-public python2-xlib
5303 (package
5304 (name "python2-xlib")
5305 (version "0.14")
5306 (source (origin
5307 (method url-fetch)
de67e922
LF
5308 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5309 "/" version "/"
db62afa5
LC
5310 "python-xlib-" version ".tar.gz"))
5311 (sha256
5312 (base32
5313 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5314 (build-system python-build-system)
5315 (arguments
5316 `(#:python ,python-2 ;Python 2 only
5317 #:tests? #f)) ;no tests
db62afa5
LC
5318 (home-page "http://python-xlib.sourceforge.net/")
5319 (synopsis "Python X11 client library")
5320 (description
5321 "The Python X Library is intended to be a fully functional X client
5322library for Python programs. It is useful to implement low-level X clients.
5323It is written entirely in Python.")
3f641af0 5324 (license license:gpl2+)))
0234ca06
DT
5325
5326(define-public python-singledispatch
5327 (package
5328 (name "python-singledispatch")
5329 (version "3.4.0.3")
5330 (source
5331 (origin
5332 (method url-fetch)
bdb67d84 5333 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5334 (sha256
5335 (base32
5336 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5337 (build-system python-build-system)
5e1c9d24
HG
5338 (native-inputs
5339 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5340 (home-page
5341 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5342 (synopsis "Backport of singledispatch feature from Python 3.4")
5343 (description
5344 "This library brings functools.singledispatch from Python 3.4 to Python
53452.6-3.3.")
5346 (license license:expat)))
5347
5348(define-public python2-singledispatch
5349 (package-with-python2 python-singledispatch))
feaae484 5350
310d218f
RW
5351(define-public python-tornado
5352 (package
5353 (name "python-tornado")
a724924b 5354 (version "4.3")
310d218f
RW
5355 (source
5356 (origin
5357 (method url-fetch)
a724924b 5358 (uri (pypi-uri "tornado" version))
310d218f 5359 (sha256
a724924b 5360 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5361 (build-system python-build-system)
310d218f 5362 (native-inputs
b455439b 5363 `(("python-certifi" ,python-certifi)))
f22efa01 5364 (propagated-inputs
b455439b 5365 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5366 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5367 (synopsis "Python web framework and asynchronous networking library")
5368 (description
5369 "Tornado is a Python web framework and asynchronous networking library,
5370originally developed at FriendFeed. By using non-blocking network I/O,
5371Tornado can scale to tens of thousands of open connections, making it ideal
5372for long polling, WebSockets, and other applications that require a long-lived
5373connection to each user.")
3f641af0 5374 (license license:asl2.0)
b455439b 5375 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5376
5377(define-public python2-tornado
b455439b 5378 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5379 (package (inherit tornado)
f22efa01 5380 (propagated-inputs
310d218f
RW
5381 `(("python2-backport-ssl-match-hostname"
5382 ,python2-backport-ssl-match-hostname)
b455439b 5383 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5384 ,@(package-propagated-inputs tornado))))))
310d218f 5385
6b59fc10
EF
5386;; the python- version can be removed with python-3.5
5387(define-public python-backports-abc
5388 (package
5389 (name "python-backports-abc")
5390 (version "0.4")
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "backports_abc" version))
5395 (sha256
5396 (base32
5397 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5398 (build-system python-build-system)
6b59fc10 5399 (home-page "https://github.com/cython/backports_abc")
66e07664 5400 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5401 (description
5402 "Python-backports-abc provides a backport of additions to the
5403'collections.abc' module in Python-3.5.")
3f641af0 5404 (license license:psfl)))
6b59fc10
EF
5405
5406(define-public python2-backports-abc
5407 (package-with-python2 python-backports-abc))
5408
feaae484
SB
5409(define-public python-waf
5410 (package
5411 (name "python-waf")
7dd55dfe 5412 (version "1.9.5")
feaae484
SB
5413 (source (origin
5414 (method url-fetch)
bae67829 5415 (uri (string-append "https://waf.io/"
feaae484
SB
5416 "waf-" version ".tar.bz2"))
5417 (sha256
5418 (base32
7dd55dfe 5419 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5420 (build-system python-build-system)
5421 (arguments
5422 '(#:phases
5423 (modify-phases %standard-phases
5424 (replace 'build
7dd55dfe
EF
5425 (lambda _
5426 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5427 (replace 'check
7dd55dfe
EF
5428 (lambda _
5429 (zero? (system* "python" "waf" "--version"))))
feaae484 5430 (replace 'install
7dd55dfe
EF
5431 (lambda _
5432 (copy-file "waf" %output))))))
5433 (home-page "http://waf.io/")
feaae484
SB
5434 (synopsis "Python-based build system")
5435 (description
5436 "Waf is a Python-based framework for configuring, compiling and installing
5437applications.")
3f641af0 5438 (license license:bsd-3)))
feaae484
SB
5439
5440(define-public python2-waf
5441 (package-with-python2 python-waf))
45203542
RW
5442
5443(define-public python-pyzmq
5444 (package
5445 (name "python-pyzmq")
3655ee76 5446 (version "15.1.0")
45203542
RW
5447 (source
5448 (origin
5449 (method url-fetch)
3655ee76 5450 (uri (pypi-uri "pyzmq" version))
45203542 5451 (sha256
3655ee76 5452 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5453 (build-system python-build-system)
5454 (arguments
5455 `(#:configure-flags
5456 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5457 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5458 ;; --inplace' for 'python setup.py test' to work.
5459 #:tests? #f))
5460 (inputs
5461 `(("zeromq" ,zeromq)))
5462 (native-inputs
5463 `(("pkg-config" ,pkg-config)
f3b98f4f 5464 ("python-nose" ,python-nose)))
45203542
RW
5465 (home-page "http://github.com/zeromq/pyzmq")
5466 (synopsis "Python bindings for 0MQ")
5467 (description
5468 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5469 (license license:bsd-4)))
45203542
RW
5470
5471(define-public python2-pyzmq
5472 (package-with-python2 python-pyzmq))
d889e6c4
CR
5473
5474(define-public python-pep8
5475 (package
5476 (name "python-pep8")
db251311 5477 (version "1.7.0")
d889e6c4
CR
5478 (source
5479 (origin
5480 (method url-fetch)
db251311 5481 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5482 (sha256
5483 (base32
db251311 5484 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5485 (build-system python-build-system)
d889e6c4
CR
5486 (home-page "http://pep8.readthedocs.org/")
5487 (synopsis "Python style guide checker")
5488 (description
5489 "This tools checks Python code against some of the style conventions in
5490PEP 8.")
5491 (license license:expat)))
5492
5493(define-public python2-pep8
5494 (package-with-python2 python-pep8))
e31d7f44
CR
5495
5496(define-public python-pyflakes
5497 (package
5498 (name "python-pyflakes")
2abc3972 5499 (version "1.0.0")
e31d7f44
CR
5500 (source
5501 (origin
5502 (method url-fetch)
2abc3972 5503 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5504 (sha256
5505 (base32
2abc3972 5506 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5507 (build-system python-build-system)
e31d7f44
CR
5508 (home-page
5509 "https://github.com/pyflakes/pyflakes")
5510 (synopsis "Passive checker of Python programs")
5511 (description
5512 "Pyflakes statically checks Python source code for common errors.")
5513 (license license:expat)))
a59e017c 5514
7261d9eb
CR
5515(define-public python2-pyflakes
5516 (package-with-python2 python-pyflakes))
5517
a59e017c
CR
5518(define-public python-mccabe
5519 (package
5520 (name "python-mccabe")
c6ebd40d 5521 (version "0.4.0")
a59e017c
CR
5522 (source
5523 (origin
5524 (method url-fetch)
c6ebd40d 5525 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5526 (sha256
5527 (base32
c6ebd40d 5528 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5529 (build-system python-build-system)
328bb95d 5530 (native-inputs
c6ebd40d 5531 `(("python-pytest" ,python-pytest)
f3b98f4f 5532 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5533 (home-page "https://github.com/flintwork/mccabe")
5534 (synopsis "McCabe checker, plugin for flake8")
5535 (description
5536 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5537complexity of Python source code.")
7362371d 5538 (license license:expat)))
a59e017c
CR
5539
5540(define-public python2-mccabe
5541 (package-with-python2 python-mccabe))
e8df8f47 5542
7477fbb1
CR
5543(define-public python-mccabe-0.2.1
5544 (package (inherit python-mccabe)
5545 (version "0.2.1")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (pypi-uri "mccabe" version))
5550 (sha256
5551 (base32
f3b98f4f 5552 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5553
5554(define-public python2-mccabe-0.2.1
5555 (package-with-python2 python-mccabe-0.2.1))
5556
e8df8f47
CR
5557;; Flake8 2.4.1 requires an older version of pep8.
5558;; This should be removed ASAP.
5559(define-public python-pep8-1.5.7
5560 (package (inherit python-pep8)
5561 (version "1.5.7")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (string-append
5566 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5567 version
5568 ".tar.gz"))
5569 (sha256
5570 (base32
5571 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5572
5573(define-public python2-pep8-1.5.7
5574 (package-with-python2 python-pep8-1.5.7))
5575
5576;; Flake8 2.4.1 requires an older version of pyflakes.
5577;; This should be removed ASAP.
5578(define-public python-pyflakes-0.8.1
5579 (package (inherit python-pyflakes)
5580 (version "0.8.1")
5581 (source
5582 (origin
5583 (method url-fetch)
5584 (uri (string-append
5585 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5586 version
5587 ".tar.gz"))
5588 (sha256
5589 (base32
5590 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5591
5592(define-public python2-pyflakes-0.8.1
7261d9eb 5593 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5594
5595(define-public python-flake8
5596 (package
5597 (name "python-flake8")
43789136 5598 (version "2.5.4")
e8df8f47
CR
5599 (source
5600 (origin
5601 (method url-fetch)
1b995533 5602 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5603 (sha256
5604 (base32
011271c7
HG
5605 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5606 (modules '((guix build utils)))
5607 (snippet
5608 '(begin
5609 ;; Remove pre-compiled .pyc files from source.
5610 (for-each delete-file-recursively
5611 (find-files "." "__pycache__" #:directories? #t))
5612 (for-each delete-file (find-files "." "\\.pyc$"))
5613 #t))))
e8df8f47 5614 (build-system python-build-system)
482d9591 5615 (propagated-inputs
f3b98f4f 5616 `(("python-pep8" ,python-pep8)
43789136 5617 ("python-pyflakes" ,python-pyflakes)
482d9591 5618 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5619 (native-inputs
5620 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5621 ("python-nose" ,python-nose)))
5622 (home-page "https://gitlab.com/pycqa/flake8")
5623 (synopsis
5624 "The modular source code checker: pep8, pyflakes and co")
5625 (description
5626 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5627 (license license:expat)))
5628
5629(define-public python2-flake8
5630 (package-with-python2 python-flake8))
61b9ac53 5631
abf21efc
CR
5632;; This will only be needed by the python-hacking package and will not be
5633;; necessary once python-hacking > 0.10.2 is released.
5634(define-public python-flake8-2.2.4
5635 (package (inherit python-flake8)
482d9591 5636 (propagated-inputs
f3b98f4f 5637 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5638 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5639 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5640 (native-inputs
482d9591 5641 `(("python-mock" ,python-mock)
abf21efc
CR
5642 ("python-nose" ,python-nose)))
5643 (version "2.2.4")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (pypi-uri "flake8" version))
5648 (sha256
5649 (base32
b9c8ccce
HG
5650 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5651 (modules '((guix build utils)))
5652 (snippet
5653 '(begin
5654 ;; Remove pre-compiled .pyc files from source.
5655 (for-each delete-file-recursively
5656 (find-files "." "__pycache__" #:directories? #t))
5657 (for-each delete-file (find-files "." "\\.pyc$"))
5658 #t))))))
abf21efc
CR
5659
5660(define-public python2-flake8-2.2.4
5661 (package-with-python2 python-flake8-2.2.4))
5662
61b9ac53
FB
5663(define-public python-mistune
5664 (package
5665 (name "python-mistune")
5666 (version "0.7")
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (string-append
5671 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5672 version
5673 ".tar.gz"))
5674 (sha256
5675 (base32
5676 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5677 (build-system python-build-system)
328bb95d 5678 (native-inputs
f3b98f4f 5679 `(("python-nose" ,python-nose)
61b9ac53
FB
5680 ("python-cython" ,python-cython)))
5681 (home-page "https://github.com/lepture/mistune")
5682 (synopsis "Markdown parser in pure Python")
5683 (description "This package provides a fast markdown parser in pure
5684Python.")
3f641af0 5685 (license license:bsd-3)))
61b9ac53
FB
5686
5687(define-public python2-mistune
5688 (package-with-python2 python-mistune))
6d992d07 5689
b9893908
EE
5690(define-public python-markdown
5691 (package
5692 (name "python-markdown")
5693 (version "2.6.5")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "Markdown" version))
5698 (sha256
5699 (base32
5700 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5701 (build-system python-build-system)
5702 (arguments
5703 `(#:phases
5704 (modify-phases %standard-phases
5705 (replace 'check
5706 (lambda _
5707 (zero? (system* "python" "run-tests.py")))))))
5708 (native-inputs
5709 `(("python-nose" ,python-nose)
5710 ("python-pyyaml" ,python-pyyaml)))
5711 (home-page "https://pythonhosted.org/Markdown/")
5712 (synopsis "Python implementation of Markdown")
5713 (description
5714 "This package provides a Python implementation of John Gruber's
5715Markdown. The library features international input, various Markdown
5716extensions, and several HTML output formats. A command line wrapper
5717markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5718 (license license:bsd-3)))
b9893908
EE
5719
5720(define-public python2-markdown
5721 (package-with-python2 python-markdown))
5722
6d992d07
FB
5723(define-public python-ptyprocess
5724 (package
5725 (name "python-ptyprocess")
5726 (version "0.5")
5727 (source
5728 (origin
5729 (method url-fetch)
5730 (uri (string-append
5731 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5732 version ".tar.gz"))
5733 (sha256
5734 (base32
5735 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5736 (build-system python-build-system)
328bb95d 5737 (native-inputs
f3b98f4f 5738 `(("python-nose" ,python-nose)))
6d992d07
FB
5739 (arguments
5740 `(#:phases
5741 (modify-phases %standard-phases
5742 (replace 'check
5743 (lambda _
5744 (zero? (system* "nosetests")))))))
5745 (home-page "https://github.com/pexpect/ptyprocess")
5746 (synopsis "Run a subprocess in a pseudo terminal")
5747 (description
5748 "This package provides a Python library used to launch a subprocess in a
5749pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5750 (license license:isc)))
6d992d07
FB
5751
5752(define-public python2-ptyprocess
5753 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5754
5755(define-public python-terminado
5756 (package
5757 (name "python-terminado")
783fb0a3 5758 (version "0.6")
4aadb1df
FB
5759 (source
5760 (origin
5761 (method url-fetch)
783fb0a3 5762 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5763 (sha256
5764 (base32
783fb0a3 5765 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5766 (build-system python-build-system)
5767 (propagated-inputs
5768 `(("python-tornado" ,python-tornado)
5769 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5770 (native-inputs
5771 `(("python-nose" ,python-nose)))
4aadb1df
FB
5772 (arguments
5773 `(#:phases
5774 (modify-phases %standard-phases
5775 (replace 'check
5776 (lambda _
5777 (zero? (system* "nosetests")))))))
5778 (home-page "https://github.com/takluyver/terminado")
5779 (synopsis "Terminals served to term.js using Tornado websockets")
5780 (description "This package provides a Tornado websocket backend for the
5781term.js Javascript terminal emulator library.")
3f641af0 5782 (license license:bsd-2)
783fb0a3 5783 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5784
5785(define-public python2-terminado
783fb0a3 5786 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5787 (package (inherit terminado)
783fb0a3
EF
5788 (propagated-inputs
5789 `(("python2-backport-ssl-match-hostname"
5790 ,python2-backport-ssl-match-hostname)
00e10c6e 5791 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5792
d582eaac
SB
5793(define-public python-fonttools
5794 (package
5795 (name "python-fonttools")
5796 (version "2.5")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (string-append
5800 "https://pypi.python.org/packages/source/F/FontTools/"
5801 "fonttools-" version ".tar.gz"))
5802 (sha256
5803 (base32
5804 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5805 (build-system python-build-system)
9e8c6a37
HG
5806 (arguments
5807 '(#:test-target "check"
5808 #:phases
5809 (modify-phases %standard-phases
5810 (add-after 'unpack 'patch-setuppy
5811 ;; Remove the undocumented "extra_path" argument, which adds an
5812 ;; intervening directories between site-packages and the package
5813 ;; directory.
5814 (lambda _
5815 (substitute* "setup.py"
5816 (("^[ \t]*extra_path *= *'FontTools',") ""))
5817 #t)))))
d582eaac
SB
5818 (home-page "http://github.com/behdad/fonttools")
5819 (synopsis "Tools to manipulate font files")
5820 (description
5821 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5822supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5823of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5824also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5825from an XML-based format.")
3f641af0
DC
5826 (license (license:non-copyleft
5827 "file://LICENSE.txt"
5828 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5829
5830(define-public python2-fonttools
5831 (package-with-python2 python-fonttools))
75710da6 5832
5faa5ce4
RW
5833(define-public python-ly
5834 (package
5835 (name "python-ly")
5135354f 5836 (version "0.9.4")
5faa5ce4
RW
5837 (source
5838 (origin
5839 (method url-fetch)
5135354f
RW
5840 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5841 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5842 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5843 (sha256
5844 (base32
5135354f 5845 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 5846 (build-system python-build-system)
5faa5ce4
RW
5847 (synopsis "Tool and library for manipulating LilyPond files")
5848 (description "This package provides a Python library to parse, manipulate
5849or create documents in LilyPond format. A command line program ly is also
5850provided that can be used to do various manipulations with LilyPond files.")
5851 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5852 (license license:gpl2+)))
7e7b27d9
CR
5853
5854(define-public python-appdirs
5855 (package
5856 (name "python-appdirs")
5857 (version "1.4.0")
5858 (source
5859 (origin
5860 (method url-fetch)
5861 (uri (string-append
5862 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5863 version
5864 ".tar.gz"))
5865 (sha256
5866 (base32
5867 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5868 (build-system python-build-system)
7e7b27d9
CR
5869 (home-page "http://github.com/ActiveState/appdirs")
5870 (synopsis
5871 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5872 (description
5873 "This module provides a portable way of finding out where user data
5874should be stored on various operating systems.")
5875 (license license:expat)))
5876
5877(define-public python2-appdirs
5878 (package-with-python2 python-appdirs))
89b2e0b0
LF
5879
5880(define-public python-llfuse
5881 (package
5882 (name "python-llfuse")
e36ace36 5883 (version "1.1.1")
89b2e0b0
LF
5884 (source (origin
5885 (method url-fetch)
5886 (uri (string-append
5887 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5888 "llfuse-" version ".tar.bz2"))
5889 (sha256
5890 (base32
e36ace36 5891 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5892 (build-system python-build-system)
5893 (inputs
5894 `(("fuse" ,fuse)
5895 ("attr" ,attr)))
5896 (native-inputs
f3b98f4f 5897 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
5898 (synopsis "Python bindings for FUSE")
5899 (description
5900 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5901 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5902 (license license:lgpl2.0+)
cd0569c4 5903 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5904
5905(define-public python2-llfuse
cd0569c4
LF
5906 (package (inherit (package-with-python2
5907 (strip-python2-variant python-llfuse)))
5908 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5909
5910;; For attic-0.16
5911(define-public python-llfuse-0.41
5912 (package (inherit python-llfuse)
229b3661 5913 (version "0.41.1")
cd0569c4
LF
5914 (source (origin
5915 (method url-fetch)
5916 (uri (string-append
5917 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5918 "llfuse-" version ".tar.bz2"))
5919 (sha256
5920 (base32
229b3661 5921 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5922 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5923 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5924 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5925
5926(define-public python-msgpack
5927 (package
5928 (name "python-msgpack")
aed625bd 5929 (version "0.4.8")
641c9871
LF
5930 (source (origin
5931 (method url-fetch)
ae831df4 5932 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5933 (sha256
5934 (base32
aed625bd 5935 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5936 (build-system python-build-system)
641c9871
LF
5937 (synopsis "MessagePack (de)serializer")
5938 (description "MessagePack is a fast, compact binary serialization format,
5939suitable for similar data to JSON. This package provides CPython bindings for
5940reading and writing MessagePack data.")
5941 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 5942 (license license:asl2.0)))
bd74be7b
LF
5943
5944(define-public python2-msgpack
f210e944 5945 (package-with-python2 python-msgpack))
641c9871 5946
6e5e39f4
CR
5947(define-public python-netaddr
5948 (package
5949 (name "python-netaddr")
5950 (version "0.7.18")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (string-append
5955 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5956 version
5957 ".tar.gz"))
5958 (sha256
5959 (base32
5960 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5961 (build-system python-build-system)
5962 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
5963 (home-page "https://github.com/drkjam/netaddr/")
5964 (synopsis "Pythonic manipulation of network addresses")
5965 (description
5966 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5967and MAC network addresses.")
3f641af0 5968 (license license:bsd-3)))
6e5e39f4
CR
5969
5970(define-public python2-netaddr
5971 (package-with-python2 python-netaddr))
8c692a52
CR
5972
5973(define-public python-wrapt
5974 (package
5975 (name "python-wrapt")
5976 (version "1.10.5")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (string-append
5981 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5982 version
5983 ".tar.gz"))
5984 (sha256
5985 (base32
5986 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5987 (build-system python-build-system)
5988 (arguments
5989 ;; Tests are not included in the tarball, they are only available in the
5990 ;; git repository.
5991 `(#:tests? #f))
8c692a52
CR
5992 (home-page "https://github.com/GrahamDumpleton/wrapt")
5993 (synopsis "Module for decorators, wrappers and monkey patching")
5994 (description
5995 "The aim of the wrapt module is to provide a transparent object proxy for
5996 Python, which can be used as the basis for the construction of function
5997 wrappers and decorator functions.")
3f641af0 5998 (license license:bsd-2)))
8c692a52
CR
5999
6000(define-public python2-wrapt
6001 (package-with-python2 python-wrapt))
b85c85be
CR
6002
6003(define-public python-iso8601
6004 (package
6005 (name "python-iso8601")
fe84bc9a 6006 (version "0.1.11")
b85c85be
CR
6007 (source
6008 (origin
6009 (method url-fetch)
fe84bc9a 6010 (uri (pypi-uri "iso8601" version))
b85c85be 6011 (sha256
fe84bc9a
EF
6012 (base32
6013 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6014 (build-system python-build-system)
b85c85be
CR
6015 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6016 (synopsis "Module to parse ISO 8601 dates")
6017 (description
6018 "This module parses the most common forms of ISO 8601 date strings (e.g.
6019@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6020 (license license:expat)))
6021
6022(define-public python2-iso8601
6023 (package-with-python2 python-iso8601))
5e412b63
CR
6024
6025(define-public python-monotonic
6026 (package
6027 (name "python-monotonic")
6028 (version "0.3")
6029 (source
6030 (origin
6031 (method url-fetch)
6032 (uri (string-append
6033 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6034 version
6035 ".tar.gz"))
6036 (sha256
6037 (base32
6038 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6039 (build-system python-build-system)
5e412b63
CR
6040 (home-page "https://github.com/atdt/monotonic")
6041 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6042 (description
6043 "This module provides a monotonic() function which returns the value (in
6044fractional seconds) of a clock which never goes backwards.")
3f641af0 6045 (license license:asl2.0)))
5e412b63
CR
6046
6047(define-public python2-monotonic
6048 (package-with-python2 python-monotonic))
de34afac
CR
6049
6050(define-public python-webob
6051 (package
6052 (name "python-webob")
b8834c21 6053 (version "1.5.1")
de34afac
CR
6054 (source
6055 (origin
6056 (method url-fetch)
b8834c21 6057 (uri (pypi-uri "WebOb" version))
de34afac
CR
6058 (sha256
6059 (base32
b8834c21 6060 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6061 (build-system python-build-system)
328bb95d 6062 (native-inputs
f3b98f4f 6063 `(("python-nose" ,python-nose)))
de34afac
CR
6064 (home-page "http://webob.org/")
6065 (synopsis "WSGI request and response object")
6066 (description
6067 "WebOb provides wrappers around the WSGI request environment, and an
6068object to help create WSGI responses.")
6069 (license license:expat)))
6070
6071(define-public python2-webob
6072 (package-with-python2 python-webob))
350ba0a3 6073
02a8a187
BW
6074(define-public python-xlrd
6075 (package
6076 (name "python-xlrd")
c2ad4d70 6077 (version "1.0.0")
02a8a187
BW
6078 (source (origin
6079 (method url-fetch)
e775f48e 6080 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6081 (sha256
6082 (base32
c2ad4d70 6083 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6084 (build-system python-build-system)
6085 (arguments
6086 `(#:phases
6087 (modify-phases %standard-phases
c2ad4d70 6088 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6089 ;; run tests instead for now.
6090 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6091 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6092 (home-page "http://www.python-excel.org/")
6093 (synopsis "Library for extracting data from Excel files")
6094 (description "This packages provides a library to extract data from
c598e35c 6095spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6096@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6097Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6098 (license license:bsd-3)))
02a8a187
BW
6099
6100(define-public python2-xlrd
6101 (package-with-python2 python-xlrd))
6102
350ba0a3
CR
6103(define-public python-prettytable
6104 (package
6105 (name "python-prettytable")
6106 (version "0.7.2")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (string-append
6111 "https://pypi.python.org/packages/source/P/PrettyTable/"
6112 "prettytable-" version ".tar.bz2"))
6113 (sha256
6114 (base32
6115 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6116 (build-system python-build-system)
350ba0a3
CR
6117 (home-page "http://code.google.com/p/prettytable/")
6118 (synopsis "Display tabular data in an ASCII table format")
6119 (description
6120 "A library designed to represent tabular data in visually appealing ASCII
6121tables. PrettyTable allows for selection of which columns are to be printed,
6122independent alignment of columns (left or right justified or centred) and
6123printing of sub-tables by specifying a row range.")
3f641af0 6124 (license license:bsd-3)))
350ba0a3
CR
6125
6126(define-public python2-prettytable
6127 (package-with-python2 python-prettytable))
7a8ac75a 6128
9f8ee3fe
RW
6129(define-public python-tables
6130 (package
6131 (name "python-tables")
6132 (version "3.2.2")
6133 (source
6134 (origin
6135 (method url-fetch)
6136 (uri (pypi-uri "tables" version))
6137 (sha256
6138 (base32
6139 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6140 (build-system python-build-system)
6141 (arguments
6142 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6143 ;; or "check", so we must override the build and check phases.
6144 #:phases
6145 (modify-phases %standard-phases
6146 (add-after 'unpack 'use-gcc
6147 (lambda _
6148 (substitute* "setup.py"
6149 (("compiler = new_compiler\\(\\)" line)
6150 (string-append line
6151 "\ncompiler.set_executables(compiler='gcc',"
6152 "compiler_so='gcc',"
6153 "linker_exe='gcc',"
6154 "linker_so='gcc -shared')")))
6155 #t))
6156 (replace 'build
6157 (lambda* (#:key inputs #:allow-other-keys)
6158 (zero? (system* "python" "setup.py" "build"
6159 (string-append "--hdf5="
6160 (assoc-ref inputs "hdf5"))))))
6161 (replace 'check
6162 (lambda* (#:key inputs #:allow-other-keys)
6163 (zero? (system* "python" "setup.py" "check"
6164 (string-append "--hdf5="
6165 (assoc-ref inputs "hdf5")))))))))
6166 (propagated-inputs
6167 `(("python-numexpr" ,python-numexpr)
6168 ("python-numpy" ,python-numpy)))
6169 (native-inputs
f3b98f4f 6170 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6171 ("pkg-config" ,pkg-config)))
6172 (inputs
6173 `(("hdf5" ,hdf5)
6174 ("bzip2" ,bzip2)
6175 ("zlib" ,zlib)))
6176 (home-page "http://www.pytables.org/")
6177 (synopsis "Hierarchical datasets for Python")
6178 (description "PyTables is a package for managing hierarchical datasets and
6179designed to efficently cope with extremely large amounts of data.")
3f641af0 6180 (license license:bsd-3)))
9f8ee3fe
RW
6181
6182(define-public python2-tables
6183 (package-with-python2 python-tables))
6184
7a8ac75a
RW
6185(define-public python-pyasn1
6186 (package
6187 (name "python-pyasn1")
caa0edb3 6188 (version "0.1.9")
7a8ac75a
RW
6189 (source
6190 (origin
6191 (method url-fetch)
caa0edb3 6192 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6193 (sha256
6194 (base32
caa0edb3 6195 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6196 (build-system python-build-system)
6197 (home-page "http://pyasn1.sourceforge.net/")
6198 (synopsis "ASN.1 types and codecs")
6199 (description
6200 "This is an implementation of ASN.1 types and codecs in Python. It is
6201suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6202 (license license:bsd-2)))
7a8ac75a
RW
6203
6204(define-public python2-pyasn1
6205 (package-with-python2 python-pyasn1))
9a49a535 6206
5988c299
EF
6207(define-public python-pyasn1-modules
6208 (package
6209 (name "python-pyasn1-modules")
6210 (version "0.0.8")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (pypi-uri "pyasn1-modules" version))
6215 (sha256
6216 (base32
6217 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6218 (build-system python-build-system)
5988c299
EF
6219 (propagated-inputs
6220 `(("python-pyasn1" ,python-pyasn1)))
6221 (home-page "http://sourceforge.net/projects/pyasn1/")
6222 (synopsis "ASN.1 codec implementations")
6223 (description
6224 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6225implementations of ASN.1-based codecs and protocols.")
3f641af0 6226 (license license:bsd-3)))
5988c299
EF
6227
6228(define-public python2-pyasn1-modules
6229 (package-with-python2 python-pyasn1-modules))
6230
520af157 6231(define-public python-ipaddress
9a49a535 6232 (package
520af157
DC
6233 (name "python-ipaddress")
6234 (version "1.0.16")
6235 (source (origin
6236 (method url-fetch)
6237 (uri (pypi-uri "ipaddress" version))
6238 (sha256
6239 (base32
6240 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6241 (build-system python-build-system)
9a49a535
RW
6242 (home-page "https://github.com/phihag/ipaddress")
6243 (synopsis "IP address manipulation library")
6244 (description
520af157
DC
6245 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6246 in Python. This library is used to create, poke at, and manipulate IPv4 and
6247 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6248 module to older versions of Python.")
f210e944 6249 (license license:psfl)))
520af157
DC
6250
6251(define-public python2-ipaddress
f210e944 6252 (package-with-python2 python-ipaddress))
3f00e078 6253
4a238186
HG
6254(define-public python2-ipaddr
6255 (package
6256 (name "python2-ipaddr")
6257 (version "2.1.11")
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (pypi-uri "ipaddr" version))
6262 (sha256
6263 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6264 (build-system python-build-system)
6265 (arguments
6266 `(#:python ,python-2 ;version 2 only
6267 #:phases
6268 (modify-phases %standard-phases
6269 (replace 'check
6270 (lambda* _
6271 (zero? (system* "python" "ipaddr_test.py")))))))
6272 (home-page "https://github.com/google/ipaddr-py")
6273 (synopsis "IP address manipulation library")
6274 (description
6275 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6276IPv6 addresses and networks.
6277
6278For new implementations you may prefer to use the standard module
6279@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6280versions of Python.")
3f641af0 6281 (license license:asl2.0)))
4a238186 6282
3f00e078
RW
6283(define-public python-idna
6284 (package
6285 (name "python-idna")
6286 (version "2.0")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (string-append "https://pypi.python.org/packages/source/i/"
6291 "idna/idna-" version ".tar.gz"))
6292 (sha256
6293 (base32
6294 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6295 (build-system python-build-system)
3f00e078
RW
6296 (home-page "https://github.com/kjd/idna")
6297 (synopsis "Internationalized domain names in applications")
6298 (description
6299 "This is a library to support the Internationalised Domain Names in
6300Applications (IDNA) protocol as specified in RFC 5891. This version of the
6301protocol is often referred to as “IDNA2008” and can produce different results
6302from the earlier standard from 2003. The library is also intended to act as a
6303suitable drop-in replacement for the “encodings.idna” module that comes with
6304the Python standard library but currently only supports the older 2003
6305specification.")
3f641af0 6306 (license license:bsd-4)))
3f00e078
RW
6307
6308(define-public python2-idna
6309 (package-with-python2 python-idna))
36ebf972
RW
6310
6311(define-public python-pretend
6312 (package
6313 (name "python-pretend")
6314 (version "1.0.8")
6315 (source
6316 (origin
6317 (method url-fetch)
6318 (uri (string-append "https://pypi.python.org/packages/source/p/"
6319 "pretend/pretend-" version ".tar.gz"))
6320 (sha256
6321 (base32
6322 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6323 (build-system python-build-system)
36ebf972
RW
6324 (home-page "https://github.com/alex/pretend")
6325 (synopsis "Library for stubbing in Python")
6326 (description
6327 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6328technique for writing tests. You may hear the term mixed up with mocks,
6329fakes, or doubles. Basically, a stub is an object that returns pre-canned
6330responses, rather than doing any computation.")
3f641af0 6331 (license license:bsd-3)))
36ebf972
RW
6332
6333(define-public python2-pretend
6334 (package-with-python2 python-pretend))
aa759a51
RW
6335
6336(define-public python-cryptography-vectors
6337 (package
6338 (name "python-cryptography-vectors")
912dcbad 6339 (version "1.5.3")
aa759a51
RW
6340 (source
6341 (origin
6342 (method url-fetch)
9c509ca9 6343 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6344 (sha256
6345 (base32
912dcbad 6346 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
aa759a51 6347 (build-system python-build-system)
aa759a51 6348 (home-page "https://github.com/pyca/cryptography")
66e07664 6349 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6350 (description
6351 "This package contains test vectors for the cryptography package.")
6352 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6353 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6354
6355(define-public python2-cryptography-vectors
6356 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6357
6358(define-public python-cryptography
6359 (package
6360 (name "python-cryptography")
912dcbad 6361 (version "1.5.3")
88b47cb0
RW
6362 (source
6363 (origin
6364 (method url-fetch)
9c509ca9 6365 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6366 (sha256
6367 (base32
912dcbad 6368 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
88b47cb0 6369 (build-system python-build-system)
470613f9
LF
6370 (arguments
6371 `(#:phases
6372 (modify-phases %standard-phases
6373 (add-before 'check 'disable-failing-test
6374 (lambda _
6375 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6376 ;; versions of python-cryptography:
6377 ;; https://github.com/pyca/cryptography/issues/3196
6378 ;; TODO: Try re-enabling the test when upgrading
6379 ;; python-cryptography.
6380 (substitute* "tests/hazmat/backends/test_openssl.py"
6381 (("def test_numeric_string_x509_name_entry")
6382 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6383 #t)))))
88b47cb0
RW
6384 (inputs
6385 `(("openssl" ,openssl)))
6386 (propagated-inputs
6387 `(("python-cffi" ,python-cffi)
6388 ("python-six" ,python-six)
6389 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6390 ("python-idna" ,python-idna)
6391 ("python-iso8601" ,python-iso8601)))
6392 (native-inputs
6393 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6394 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6395 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6396 ("python-pyasn1" ,python-pyasn1)
6397 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6398 ("python-pytz" ,python-pytz)
6399 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6400 (home-page "https://github.com/pyca/cryptography")
6401 (synopsis "Cryptographic recipes and primitives for Python")
6402 (description
6403 "cryptography is a package which provides cryptographic recipes and
6404primitives to Python developers. It aims to be the “cryptographic standard
6405library” for Python. The package includes both high level recipes, and low
6406level interfaces to common cryptographic algorithms such as symmetric ciphers,
6407message digests and key derivation functions.")
6408 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6409 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6410 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6411
6412(define-public python2-cryptography
519e2f4f
LF
6413 (let ((crypto (package-with-python2
6414 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6415 (package (inherit crypto)
6416 (propagated-inputs
6417 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6418 ("python2-backport-ssl-match-hostname"
6419 ,python2-backport-ssl-match-hostname)
68f1cdec 6420 ("python2-enum34" ,python2-enum34)
88b47cb0 6421 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6422
6423(define-public python-pyopenssl
6424 (package
6425 (name "python-pyopenssl")
eb68d268 6426 (version "16.1.0")
5af999b8
RW
6427 (source
6428 (origin
6429 (method url-fetch)
eb68d268 6430 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6431 (sha256
6432 (base32
eb68d268 6433 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6434 (build-system python-build-system)
5af999b8
RW
6435 (propagated-inputs
6436 `(("python-cryptography" ,python-cryptography)
6437 ("python-six" ,python-six)))
6438 (inputs
6439 `(("openssl" ,openssl)))
5af999b8
RW
6440 (home-page "https://github.com/pyca/pyopenssl")
6441 (synopsis "Python wrapper module around the OpenSSL library")
6442 (description
6443 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6444library.")
3f641af0 6445 (license license:asl2.0)))
5af999b8
RW
6446
6447(define-public python2-pyopenssl
519e2f4f 6448 (package-with-python2 python-pyopenssl))
643725a1
CR
6449
6450(define-public python-pip
6451 (package
6452 (name "python-pip")
6fb54e3b 6453 (version "8.0.2")
643725a1
CR
6454 (source
6455 (origin
6456 (method url-fetch)
6fb54e3b 6457 (uri (pypi-uri "pip" version))
643725a1
CR
6458 (sha256
6459 (base32
6fb54e3b 6460 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6461 (build-system python-build-system)
6462 (inputs
f3b98f4f 6463 `(("python-virtualenv" ,python-virtualenv)
643725a1
CR
6464 ;; Tests
6465 ("python-mock" ,python-mock)
6466 ("python-pytest" ,python-pytest)
6467 ("python-scripttest" ,python-scripttest)))
6468 (home-page "https://pip.pypa.io/")
6469 (synopsis
6470 "Package manager for Python software")
6471 (description
6472 "Pip is a package manager for Python software, that finds packages on the
6473Python Package Index (PyPI).")
6474 (license license:expat)))
6475
6476(define-public python2-pip
6477 (package-with-python2 python-pip))
d8c4998f
LC
6478
6479(define-public python-tlsh
6480 (package
6481 (name "python-tlsh")
99b00dc7 6482 (version "3.4.4")
d8c4998f
LC
6483 (home-page "https://github.com/trendmicro/tlsh")
6484 (source (origin
99b00dc7
EF
6485 (method url-fetch)
6486 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6487 version ".tar.gz"))
d8c4998f
LC
6488 (sha256
6489 (base32
99b00dc7
EF
6490 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6491 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6492 (build-system cmake-build-system)
6493 (arguments
6494 '(#:out-of-source? #f
6495 #:phases (modify-phases %standard-phases
6496 (replace
6497 'install
6498 (lambda* (#:key outputs #:allow-other-keys)
6499 ;; Build and install the Python bindings. The underlying
6500 ;; C++ library is apparently not meant to be installed.
6501 (let ((out (assoc-ref outputs "out")))
6502 (with-directory-excursion "py_ext"
6503 (and (system* "python" "setup.py" "build")
6504 (system* "python" "setup.py" "install"
6505 (string-append "--prefix=" out))))))))))
6506 (inputs `(("python" ,python-wrapper))) ;for the bindings
6507 (synopsis "Fuzzy matching library for Python")
6508 (description
6509 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6510Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6511value which can be used for similarity comparisons. Similar objects have
6512similar hash values, which allows for the detection of similar objects by
6513comparing their hash values. The byte stream should have a sufficient amount
6514of complexity; for example, a byte stream of identical bytes will not generate
6515a hash value.")
3f641af0 6516 (license license:asl2.0)))
d8c4998f
LC
6517
6518(define-public python2-tlsh
6519 (package
6520 (inherit python-tlsh)
6521 (name "python2-tlsh")
6522 (inputs `(("python" ,python-2)))))
d96034ed 6523
67f66812
BW
6524(define-public python-termcolor
6525 (package
6526 (name "python-termcolor")
6527 (version "1.1.0")
6528 (source
6529 (origin
6530 (method url-fetch)
6531 (uri (pypi-uri "python-termcolor" version))
6532 (sha256
6533 (base32
6534 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6535 (build-system python-build-system)
6536 (arguments
6537 ;; There are no tests.
6538 `(#:tests? #f))
6539 (home-page "http://pypi.python.org/pypi/termcolor")
6540 (synopsis "ANSII Color formatting for terminal output")
6541 (description
6542 "This package provides ANSII Color formatting for output in terminals.")
6543 (license license:expat)))
6544
6545(define-public python2-termcolor
6546 (package-with-python2 python-termcolor))
6547
d96034ed
LC
6548(define-public python-libarchive-c
6549 (package
6550 (name "python-libarchive-c")
03fd001c 6551 (version "2.2")
d96034ed
LC
6552 (source (origin
6553 (method url-fetch)
03fd001c 6554 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6555 (sha256
6556 (base32
03fd001c 6557 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6558 (build-system python-build-system)
6559 (arguments
6560 '(#:phases (modify-phases %standard-phases
6561 (add-before
6562 'build 'reference-libarchive
6563 (lambda* (#:key inputs #:allow-other-keys)
6564 ;; Retain the absolute file name of libarchive.so.
6565 (let ((libarchive (assoc-ref inputs "libarchive")))
6566 (substitute* "libarchive/ffi.py"
6567 (("find_library\\('archive'\\)")
6568 (string-append "'" libarchive
b41a05ce 6569 "/lib/libarchive.so'")))))))))
d96034ed 6570 (inputs
f3b98f4f 6571 `(("libarchive" ,libarchive)))
d96034ed
LC
6572 (home-page "https://github.com/Changaco/python-libarchive-c")
6573 (synopsis "Python interface to libarchive")
6574 (description
6575 "This package provides Python bindings to libarchive, a C library to
6576access possibly compressed archives in many different formats. It uses
6577Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6578 (license license:lgpl2.0+)))
d96034ed
LC
6579
6580(define-public python2-libarchive-c
6581 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6582
6583(define-public python-file
6584 (package
6585 (inherit file)
6586 (name "python-file")
7ffa5d4a
LF
6587 (source (origin
6588 (inherit (package-source file))
6589 ;; This patch should not be applied to python2-file.
6590 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6591 (build-system python-build-system)
6592 (arguments
6593 '(#:tests? #f ;no tests
00bf74be 6594 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6595 #:phases (modify-phases %standard-phases
6596 (add-before 'build 'change-directory
6597 (lambda _
6598 (chdir "python")
6599 #t))
6600 (add-before 'build 'set-library-file-name
6601 (lambda* (#:key inputs #:allow-other-keys)
6602 (let ((file (assoc-ref inputs "file")))
6603 (substitute* "magic.py"
6604 (("find_library\\('magic'\\)")
6605 (string-append "'" file "/lib/libmagic.so'")))
6606 #t))))))
6607 (inputs `(("file" ,file)))
6608 (self-native-input? #f)
daeeea71
CM
6609 (synopsis "Python bindings to the libmagic file type guesser. Note that
6610this module and the python-magic module both provide a \"magic.py\" file;
6611these two modules, which are different and were developed separately, both
f210e944 6612serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6613
6614(define-public python2-file
f210e944 6615 (package-with-python2 python-file))
85d4aeac
LC
6616
6617(define-public python-debian
6618 (package
6619 (name "python-debian")
6620 (version "0.1.23")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (string-append
6625 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6626 version ".tar.gz"))
6627 (sha256
6628 (base32
6629 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6630 (build-system python-build-system)
f22efa01 6631 (propagated-inputs
85d4aeac 6632 `(("python-six" ,python-six)))
85d4aeac
LC
6633 (home-page "http://packages.debian.org/sid/python-debian")
6634 (synopsis "Debian package related modules")
6635 (description
5c7bdc9a
LC
6636 ;; XXX: Use @enumerate instead of @itemize to work around
6637 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6638 "This package provides Python modules that abstract many formats of
6639Debian-related files, such as:
6640
5c7bdc9a 6641@enumerate
85d4aeac
LC
6642@item Debtags information;
6643@item @file{debian/changelog} files;
6644@item packages files, pdiffs;
6645@item control files of single or multiple RFC822-style paragraphs---e.g.
6646 @file{debian/control}, @file{.changes}, @file{.dsc};
6647@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6648 contained files and meta-information.
5c7bdc9a 6649@end enumerate\n")
85d4aeac
LC
6650
6651 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6652 (license license:gpl3+)))
85d4aeac
LC
6653
6654(define-public python2-debian
6655 (package-with-python2 python-debian))
816a6538 6656
2d321bb2
RW
6657(define-public python-nbformat
6658 (package
6659 (name "python-nbformat")
6660 (version "4.1.0")
6661 (source
6662 (origin
6663 (method url-fetch)
6664 (uri (pypi-uri "nbformat" version))
6665 (sha256
6666 (base32
6667 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6668 (build-system python-build-system)
6669 (arguments `(#:tests? #f)) ; no test target
6670 (propagated-inputs
6671 `(("python-ipython-genutils" ,python-ipython-genutils)
6672 ("python-jsonschema" ,python-jsonschema)
6673 ("python-jupyter-core" ,python-jupyter-core)
6674 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6675 (home-page "http://jupyter.org")
6676 (synopsis "Jupyter Notebook format")
6677 (description "This package provides the reference implementation of the
6678Jupyter Notebook format and Python APIs for working with notebooks.")
6679 (license license:bsd-3)))
6680
6681(define-public python2-nbformat
6682 (package-with-python2 python-nbformat))
6683
55436048
RW
6684(define-public python-bleach
6685 (package
6686 (name "python-bleach")
6687 (version "1.4.3")
6688 (source
6689 (origin
6690 (method url-fetch)
6691 (uri (pypi-uri "bleach" version))
6692 (sha256
6693 (base32
6694 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6695 (build-system python-build-system)
6696 (propagated-inputs
6697 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6698 ("python-six" ,python-six)))
6699 (native-inputs
6700 `(("python-nose" ,python-nose)))
6701 (home-page "http://github.com/jsocol/bleach")
6702 (synopsis "Whitelist-based HTML-sanitizing tool")
6703 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6704 (license license:asl2.0)))
6705
6706(define-public python2-bleach
6707 (package-with-python2 python-bleach))
6708
60590a3a
RW
6709(define-public python-entrypoints
6710 (package
6711 (name "python-entrypoints")
6712 (version "0.2.2")
6713 (source
6714 (origin
6715 (method url-fetch)
6716 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6717 version ".tar.gz"))
6718 (file-name (string-append name "-" version ".tar.gz"))
6719 (sha256
6720 (base32
6721 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6722 (build-system python-build-system)
6723 ;; The package does not come with a setup.py file, so we have to generate
6724 ;; one ourselves.
6725 (arguments
6726 `(#:tests? #f
6727 #:phases
6728 (modify-phases %standard-phases
6729 (add-after 'unpack 'create-setup.py
6730 (lambda _
6731 (call-with-output-file "setup.py"
6732 (lambda (port)
6733 (format port "\
6734from setuptools import setup
6735setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6736" ,version))))))))
6737 (home-page "https://github.com/takluyver/entrypoints")
6738 (synopsis "Discover and load entry points from installed Python packages")
6739 (description "Entry points are a way for Python packages to advertise
6740objects with some common interface. The most common examples are
6741@code{console_scripts} entry points, which define shell commands by
6742identifying a Python function to run. The @code{entrypoints} module contains
6743functions to find and load entry points.")
6744 (license license:expat)))
6745
6746(define-public python2-entrypoints
6747 (package-with-python2 python-entrypoints))
6748
c60898a8
RW
6749(define-public python-nbconvert
6750 (package
6751 (name "python-nbconvert")
6752 (version "5.0.0b1")
6753 (source
6754 (origin
6755 (method url-fetch)
6756 (uri (pypi-uri "nbconvert" version))
6757 (sha256
6758 (base32
6759 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6760 (build-system python-build-system)
6761 ;; The "bdist_egg" target is disabled by default, causing the installation
6762 ;; to fail.
6763 (arguments `(#:configure-flags (list "bdist_egg")))
6764 (propagated-inputs
6765 `(("python-bleach" ,python-bleach)
6766 ("python-entrypoints" ,python-entrypoints)
6767 ("python-jinja2" ,python-jinja2)
6768 ("python-jupyter-core" ,python-jupyter-core)
6769 ("python-mistune" ,python-mistune)
6770 ("python-nbformat" ,python-nbformat)
6771 ("python-pygments" ,python-pygments)
c60898a8
RW
6772 ("python-traitlets" ,python-traitlets)))
6773 (home-page "http://jupyter.org")
6774 (synopsis "Converting Jupyter Notebooks")
6775 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6776notebooks to various other formats via Jinja templates. It allows you to
6777convert an @code{.ipynb} notebook file into various static formats including:
6778
6779@enumerate
6780@item HTML
6781@item LaTeX
6782@item PDF
6783@item Reveal JS
6784@item Markdown (md)
6785@item ReStructured Text (rst)
6786@item executable script
6787@end enumerate\n")
6788 (license license:bsd-3)))
6789
6790(define-public python2-nbconvert
6791 (package-with-python2 python-nbconvert))
6792
a0d62280
RW
6793(define-public python-notebook
6794 (package
6795 (name "python-notebook")
6796 (version "4.2.3")
6797 (source (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "notebook" version))
6800 (sha256
6801 (base32
6802 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6803 (build-system python-build-system)
6804 (arguments
6805 `(#:phases
6806 (modify-phases %standard-phases
6807 (replace 'check
6808 (lambda _
6809 ;; HOME must be set for tests
6810 (setenv "HOME" "/tmp")
6811 (zero? (system* "nosetests")))))))
6812 (propagated-inputs
6813 `(("python-jupyter-core" ,python-jupyter-core)
6814 ("python-nbformat" ,python-nbformat)
6815 ("python-nbconvert" ,python-nbconvert)
6816 ("python-ipython" ,python-ipython)))
6817 (native-inputs
6818 `(("python-nose" ,python-nose)
6819 ("python-sphinx" ,python-sphinx)
6820 ("python-requests" ,python-requests)))
6821 (home-page "http://jupyter.org/")
6822 (synopsis "Web-based notebook environment for interactive computing")
6823 (description
6824 "The Jupyter HTML notebook is a web-based notebook environment for
6825interactive computing.")
6826 (license license:bsd-3)))
6827
6828(define-public python2-notebook
6829 (package-with-python2 python-notebook))
6830
d55724ed
RW
6831(define-public python-widgetsnbextension
6832 (package
6833 (name "python-widgetsnbextension")
6834 (version "1.2.6")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "widgetsnbextension" version))
6839 (sha256
6840 (base32
6841 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6842 (build-system python-build-system)
6843 (propagated-inputs
6844 `(("python-notebook" ,python-notebook)))
6845 (native-inputs
f3b98f4f 6846 `(("python-nose" ,python-nose)))
d55724ed
RW
6847 (home-page "http://ipython.org")
6848 (synopsis "IPython HTML widgets for Jupyter")
6849 (description "This package provides interactive HTML widgets for Jupyter
6850notebooks.")
6851 (license license:bsd-3)))
6852
6853(define-public python2-widgetsnbextension
6854 (package-with-python2 python-widgetsnbextension))
6855
4fe2e344
RW
6856(define-public python-ipywidgets
6857 (package
6858 (name "python-ipywidgets")
6859 (version "5.2.2")
6860 (source
6861 (origin
6862 (method url-fetch)
6863 (uri (pypi-uri "ipywidgets" version))
6864 (sha256
6865 (base32
6866 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6867 (build-system python-build-system)
6868 ;; FIXME: it's not clear how to run the tests.
6869 (arguments `(#:tests? #f))
6870 (propagated-inputs
6871 `(("python-ipykernel" ,python-ipykernel)
6872 ("python-ipython" ,python-ipython)
4fe2e344
RW
6873 ("python-traitlets" ,python-traitlets)
6874 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6875 (home-page "http://ipython.org")
6876 (synopsis "IPython HTML widgets for Jupyter")
6877 (description "Ipywidgets are interactive HTML widgets for Jupyter
6878notebooks and the IPython kernel. Notebooks come alive when interactive
6879widgets are used. Users gain control of their data and can visualize changes
6880in the data.")
6881 (license license:bsd-3)))
6882
6883(define-public python2-ipywidgets
6884 (package-with-python2 python-ipywidgets))
6885
8ceebf8f
RW
6886(define-public python-jupyter-console
6887 (package
6888 (name "python-jupyter-console")
6889 (version "5.0.0")
6890 (source
6891 (origin
6892 (method url-fetch)
6893 (uri (pypi-uri "jupyter_console" version))
6894 (sha256
6895 (base32
6896 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6897 (build-system python-build-system)
6898 ;; FIXME: it's not clear how to run the tests.
6899 (arguments `(#:tests? #f))
6900 (propagated-inputs
6901 `(("python-ipykernel" ,python-ipykernel)
6902 ("python-ipython" ,python-ipython)
6903 ("python-jupyter-client" ,python-jupyter-client)
6904 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 6905 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
6906 (home-page "https://jupyter.org")
6907 (synopsis "Jupyter terminal console")
6908 (description "This package provides a terminal-based console frontend for
6909Jupyter kernels. It also allows for console-based interaction with non-Python
6910Jupyter kernels such as IJulia and IRKernel.")
6911 (license license:bsd-3)))
6912
6913(define-public python2-jupyter-console
6914 (package-with-python2 python-jupyter-console))
6915
c27ae827
RW
6916(define-public jupyter
6917 (package
6918 (name "jupyter")
6919 (version "1.0.0")
6920 (source
6921 (origin
6922 (method url-fetch)
6923 (uri (pypi-uri "jupyter" version))
6924 (sha256
6925 (base32
6926 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6927 (build-system python-build-system)
6928 ;; FIXME: it's not clear how to run the tests.
6929 (arguments `(#:tests? #f))
6930 (propagated-inputs
6931 `(("python-ipykernel" ,python-ipykernel)
6932 ("python-ipywidgets" ,python-ipywidgets)
6933 ("python-jupyter-console" ,python-jupyter-console)
6934 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 6935 ("python-notebook" ,python-notebook)))
c27ae827
RW
6936 (home-page "http://jupyter.org")
6937 (synopsis "Web application for interactive documents")
6938 (description
6939 "The Jupyter Notebook is a web application that allows you to create and
6940share documents that contain live code, equations, visualizations and
6941explanatory text. Uses include: data cleaning and transformation, numerical
6942simulation, statistical modeling, machine learning and much more.")
6943 (license license:bsd-3)))
6944
816a6538
LC
6945(define-public python-chardet
6946 (package
6947 (name "python-chardet")
6948 (version "2.3.0")
6949 (source
6950 (origin
6951 (method url-fetch)
6952 (uri (string-append
6953 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6954 version
6955 ".tar.gz"))
6956 (sha256
6957 (base32
6958 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6959 (build-system python-build-system)
816a6538
LC
6960 (home-page "https://github.com/chardet/chardet")
6961 (synopsis "Universal encoding detector for Python 2 and 3")
6962 (description
6963 "This package provides @code{chardet}, a Python module that can
6964automatically detect a wide range of file encodings.")
3f641af0 6965 (license license:lgpl2.1+)))
816a6538
LC
6966
6967(define-public python2-chardet
6968 (package-with-python2 python-chardet))
2fc5f186 6969
1872f1bb
KM
6970(define-public python-docopt
6971 (package
6972 (name "python-docopt")
6973 (version "0.6.2")
6974 (source
6975 (origin
6976 (method url-fetch)
6977 ;; The release on PyPI does not include tests.
6978 (uri (string-append
6979 "https://github.com/docopt/docopt/archive/"
6980 version ".tar.gz"))
6981 (file-name (string-append name "-" version ".tar.gz"))
6982 (sha256
6983 (base32
6984 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6985 (build-system python-build-system)
6986 (native-inputs
f3b98f4f 6987 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
6988 (arguments
6989 `(#:phases (alist-replace
6990 'check
6991 (lambda _ (zero? (system* "py.test")))
6992 %standard-phases)))
6993 (home-page "http://docopt.org")
6994 (synopsis "Command-line interface description language for Python")
6995 (description "This library allows the user to define a command-line
6996interface from a program's help message rather than specifying it
6997programatically with command-line parsers like @code{getopt} and
6998@code{argparse}.")
6999 (license license:expat)))
7000
7001(define-public python2-docopt
7002 (package-with-python2 python-docopt))
7003
2fc5f186
LF
7004(define-public python-zope-event
7005 (package
7006 (name "python-zope-event")
7007 (version "4.1.0")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (string-append "https://pypi.python.org/packages/source/z"
7012 "/zope.event/zope.event-" version ".tar.gz"))
7013 (sha256
7014 (base32
7015 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7016 (build-system python-build-system)
2fc5f186
LF
7017 (home-page "http://pypi.python.org/pypi/zope.event")
7018 (synopsis "Event publishing system for Python")
7019 (description "Zope.event provides an event publishing API, intended for
7020use by applications which are unaware of any subscribers to their events. It
7021is a simple event-dispatching system on which more sophisticated event
7022dispatching systems can be built.")
3f641af0 7023 (license license:zpl2.1)))
2fc5f186
LF
7024
7025(define-public python2-zope-event
7026 (package-with-python2 python-zope-event))
97abe268
LF
7027
7028(define-public python-zope-interface
7029 (package
7030 (name "python-zope-interface")
7031 (version "4.1.3")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 (uri (string-append "https://pypi.python.org/packages/source/z"
7036 "/zope.interface/zope.interface-" version ".tar.gz"))
7037 (sha256
7038 (base32
7039 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7040 (build-system python-build-system)
38d480a8 7041 (native-inputs
97abe268
LF
7042 `(("python-zope-event" ,python-zope-event)))
7043 (home-page "https://github.com/zopefoundation/zope.interface")
7044 (synopsis "Python implementation of the \"design by contract\"
7045methodology")
7046 (description "Zope.interface provides an implementation of \"object
7047interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7048conforming to a given API or contract.")
3f641af0 7049 (license license:zpl2.1)))
97abe268
LF
7050
7051(define-public python2-zope-interface
7052 (package-with-python2 python-zope-interface))
81f2373c
LF
7053
7054(define-public python-zope-exceptions
7055 (package
7056 (name "python-zope-exceptions")
7057 (version "4.0.8")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (string-append "https://pypi.python.org/packages/source/z"
7062 "/zope.exceptions/zope.exceptions-"
7063 version ".tar.gz"))
7064 (sha256
7065 (base32
7066 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7067 (build-system python-build-system)
7068 (arguments
7069 '(#:tests? #f)) ; circular dependency with zope.testrunner
7070 (propagated-inputs
7071 `(("python-zope-interface" ,python-zope-interface)))
7072 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7073 (synopsis "Zope exceptions")
7074 (description "Zope.exceptions provides general-purpose exception types
7075that have uses outside of the Zope framework.")
3f641af0 7076 (license license:zpl2.1)))
81f2373c
LF
7077
7078(define-public python2-zope-exceptions
7079 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7080
7081(define-public python-zope-testing
7082 (package
7083 (name "python-zope-testing")
7084 (version "4.5.0")
7085 (source
7086 (origin
7087 (method url-fetch)
7088 (uri (string-append "https://pypi.python.org/packages/source/z"
7089 "/zope.testing/zope.testing-" version ".tar.gz"))
7090 (sha256
7091 (base32
b02f7a21
HG
7092 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7093 (modules '((guix build utils)))
7094 (snippet
7095 '(begin
7096 ;; Remove pre-compiled .pyc files backup files from source.
7097 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7098 #t))))
900e3c0e
LF
7099 (build-system python-build-system)
7100 (native-inputs
7101 `(("python-zope-exceptions" ,python-zope-exceptions)))
7102 (propagated-inputs
7103 `(("python-zope-interface" ,python-zope-interface)))
7104 (home-page "http://pypi.python.org/pypi/zope.testing")
7105 (synopsis "Zope testing helpers")
7106 (description "Zope.testing provides a number of testing utilities for HTML
7107forms, HTTP servers, regular expressions, and more.")
3f641af0 7108 (license license:zpl2.1)))
900e3c0e
LF
7109
7110(define-public python2-zope-testing
7111 (package-with-python2 python-zope-testing))
01614c4f
LF
7112
7113(define-public python-zope-testrunner
7114 (package
7115 (name "python-zope-testrunner")
7116 (version "4.4.9")
7117 (source
7118 (origin
7119 (method url-fetch)
7120 (uri (string-append "https://pypi.python.org/packages/source/z"
7121 "/zope.testrunner/zope.testrunner-"
7122 version ".zip"))
7123 (sha256
7124 (base32
7125 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7126 (build-system python-build-system)
7127 (native-inputs
7128 `(("python-six" ,python-six)
e408ffc3 7129 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7130 ("python-zope-exceptions" ,python-zope-exceptions)
7131 ("python-zope-testing" ,python-zope-testing)
7132 ("unzip" ,unzip)))
7133 (propagated-inputs
7134 `(("python-zope-interface" ,python-zope-interface)))
7135 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7136 (synopsis "Zope testrunner script")
7137 (description "Zope.testrunner provides a script for running Python
7138tests.")
3f641af0 7139 (license license:zpl2.1)))
01614c4f
LF
7140
7141(define-public python2-zope-testrunner
7142 (let ((base (package-with-python2 python-zope-testrunner)))
7143 (package
7144 (inherit base)
7145 (native-inputs
7146 (append (package-native-inputs base)
7147 `(("python2-subunit" ,python2-subunit)
7148 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7149
7150(define-public python-zope-i18nmessageid
7151 (package
7152 (name "python-zope-i18nmessageid")
7153 (version "4.0.3")
7154 (source
7155 (origin
7156 (method url-fetch)
7157 (uri (string-append
7158 "https://pypi.python.org/packages/source/z"
7159 "/zope.i18nmessageid/zope.i18nmessageid-"
7160 version ".tar.gz"))
7161 (sha256
7162 (base32
7163 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7164 (build-system python-build-system)
6a5c710c
LF
7165 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7166 (synopsis "Message identifiers for internationalization")
7167 (description "Zope.i18nmessageid provides facilities for declaring
7168internationalized messages within program source text.")
3f641af0 7169 (license license:zpl2.1)))
6a5c710c
LF
7170
7171(define-public python2-zope-i18nmessageid
7172 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7173
7174(define-public python-zope-schema
7175 (package
7176 (name "python-zope-schema")
7177 (version "4.4.2")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (string-append "https://pypi.python.org/packages/source/z"
7182 "/zope.schema/zope.schema-" version ".tar.gz"))
7183 (sha256
7184 (base32
7185 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7186 (build-system python-build-system)
7187 (propagated-inputs
7188 `(("python-zope-event" ,python-zope-event)
7189 ("python-zope-interface" ,python-zope-interface)))
7190 (native-inputs
47f77210
HG
7191 `(("python-zope-testing" ,python-zope-testing)
7192 ("python-coverage" ,python-coverage)
7193 ("python-nose" ,python-nose)))
71fb09f3
LF
7194 (home-page "http://pypi.python.org/pypi/zope.schema")
7195 (synopsis "Zope data schemas")
7196 (description "Zope.scheme provides extensions to zope.interface for
7197defining data schemas.")
3f641af0 7198 (license license:zpl2.1)))
71fb09f3
LF
7199
7200(define-public python2-zope-schema
7201 (package-with-python2 python-zope-schema))
fbac9b17
LF
7202
7203(define-public python-zope-configuration
7204 (package
7205 (name "python-zope-configuration")
7206 (version "4.0.3")
7207 (source (origin
7208 (method url-fetch)
7209 (uri (string-append "https://pypi.python.org/packages/source/z"
7210 "/zope.configuration/zope.configuration-"
7211 version ".tar.gz"))
7212 (sha256
7213 (base32
7214 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7215 (build-system python-build-system)
7216 (propagated-inputs
7217 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7218 ("python-zope-schema" ,python-zope-schema)))
7219 (home-page "http://pypi.python.org/pypi/zope.configuration")
7220 (synopsis "Zope Configuration Markup Language")
7221 (description "Zope.configuration implements ZCML, the Zope Configuration
7222Markup Language.")
3f641af0 7223 (license license:zpl2.1)))
fbac9b17
LF
7224
7225(define-public python2-zope-configuration
7226 (package-with-python2 python-zope-configuration))
2ad52086
LF
7227
7228(define-public python-zope-proxy
7229 (package
7230 (name "python-zope-proxy")
7231 (version "4.1.6")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (string-append "https://pypi.python.org/packages/source/z"
7236 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7237 (sha256
7238 (base32
7239 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7240 (build-system python-build-system)
7241 (propagated-inputs
7242 `(("python-zope-interface" ,python-zope-interface)))
7243 (home-page "http://pypi.python.org/pypi/zope.proxy")
7244 (synopsis "Generic, transparent proxies")
7245 (description "Zope.proxy provides generic, transparent proxies for Python.
7246Proxies are special objects which serve as mostly-transparent wrappers around
7247another object, intervening in the apparent behavior of the wrapped object
7248only when necessary to apply the policy (e.g., access checking, location
7249brokering, etc.) for which the proxy is responsible.")
3f641af0 7250 (license license:zpl2.1)))
2ad52086
LF
7251
7252(define-public python2-zope-proxy
7253 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7254
7255(define-public python-zope-location
7256 (package
7257 (name "python-zope-location")
7258 (version "4.0.3")
7259 (source
7260 (origin
7261 (method url-fetch)
7262 (uri (string-append "https://pypi.python.org/packages/source/z"
7263 "/zope.location/zope.location-" version ".tar.gz"))
7264 (sha256
7265 (base32
7266 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7267 (build-system python-build-system)
d27f176a 7268 (propagated-inputs
f404b5ea
LF
7269 `(("python-zope-proxy" ,python-zope-proxy)
7270 ("python-zope-schema" ,python-zope-schema)))
7271 (home-page "http://pypi.python.org/pypi/zope.location/")
7272 (synopsis "Zope location library")
7273 (description "Zope.location implements the concept of \"locations\" in
7274Zope3, which are are special objects that have a structural location.")
3f641af0 7275 (license license:zpl2.1)))
f404b5ea
LF
7276
7277(define-public python2-zope-location
7278 (package-with-python2 python-zope-location))
d4b77f36
LF
7279
7280(define-public python-zope-security
7281 (package
7282 (name "python-zope-security")
7283 (version "4.0.3")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (string-append "https://pypi.python.org/packages/source/z"
7288 "/zope.security/zope.security-" version ".tar.gz"))
7289 (sha256
7290 (base32
7291 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7292 (build-system python-build-system)
7293 (propagated-inputs
7294 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7295 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7296 ("python-zope-schema" ,python-zope-schema)))
7297 (native-inputs
7298 `(("python-zope-component" ,python-zope-component)
7299 ("python-zope-configuration" ,python-zope-configuration)
7300 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7301 ("python-zope-testrunner" ,python-zope-testrunner)
7302 ("python-zope-testing" ,python-zope-testing)))
7303 (home-page "http://pypi.python.org/pypi/zope.security")
7304 (synopsis "Zope security framework")
7305 (description "Zope.security provides a generic mechanism to implement
7306security policies on Python objects.")
3f641af0 7307 (license license:zpl2.1)))
d4b77f36
LF
7308
7309(define-public python2-zope-security
04417662
EF
7310 (let ((zope-security (package-with-python2 python-zope-security)))
7311 (package (inherit zope-security)
7312 (propagated-inputs
7313 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7314 ,@(alist-delete
7315 "python-zope-testrunner"
7316 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7317
7318(define-public python-zope-component
7319 (package
7320 (name "python-zope-component")
7321 (version "4.2.2")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (string-append "https://pypi.python.org/packages/source/z"
7326 "/zope.component/zope.component-" version ".tar.gz"))
7327 (sha256
7328 (base32
7329 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7330 (build-system python-build-system)
7331 (arguments
7332 ;; Skip tests due to circular dependency with python-zope-security.
7333 '(#:tests? #f))
7334 (native-inputs
7335 `(("python-zope-testing" ,python-zope-testing)))
7336 (propagated-inputs
7337 `(("python-zope-event" ,python-zope-event)
7338 ("python-zope-interface" ,python-zope-interface)
7339 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7340 ("python-zope-configuration" ,python-zope-configuration)))
7341 (home-page "https://github.com/zopefoundation/zope.component")
7342 (synopsis "Zope Component Architecture")
7343 (description "Zope.component represents the core of the Zope Component
7344Architecture. Together with the zope.interface package, it provides
7345facilities for defining, registering and looking up components.")
3f641af0 7346 (license license:zpl2.1)))
a6b61b27
LF
7347
7348(define-public python2-zope-component
7349 (package-with-python2 python-zope-component))
3859ac12 7350
1ae44b80 7351(define-public python-pythondialog
b5f218be 7352 (package
1ae44b80 7353 (name "python-pythondialog")
42c4b246 7354 (version "3.4.0")
b5f218be
LF
7355 (source
7356 (origin
7357 (method url-fetch)
1ae44b80 7358 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7359 (sha256
7360 (base32
1ae44b80 7361 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7362 (build-system python-build-system)
7363 (arguments
7364 `(#:phases
7365 (modify-phases %standard-phases
7366 (add-after 'unpack 'patch-path
7367 (lambda* (#:key inputs #:allow-other-keys)
7368 (let* ((dialog (assoc-ref inputs "dialog")))
7369 ;; Since this library really wants to grovel the search path, we
7370 ;; must hardcode dialog's store path into it.
7371 (substitute* "dialog.py"
7372 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7373 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7374 #t))))
b5f218be
LF
7375 #:tests? #f)) ; no test suite
7376 (propagated-inputs
7377 `(("dialog" ,dialog)))
7378 (home-page "http://pythondialog.sourceforge.net/")
7379 (synopsis "Python interface to the UNIX dialog utility")
7380 (description "A Python wrapper for the dialog utility. Its purpose is to
7381provide an easy to use, pythonic and comprehensive Python interface to dialog.
7382This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7383 (license license:lgpl2.1)
1ae44b80
LF
7384 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7385
7386(define-public python2-pythondialog
7387 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7388 (package
7389 (inherit base)
7390 (version (package-version python-pythondialog))
7391 (source (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "python2-pythondialog" version))
7394 (sha256
7395 (base32
7396 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7397
3859ac12
LF
7398(define-public python-pyrfc3339
7399 (package
7400 (name "python-pyrfc3339")
d9aa097b 7401 (version "1.0")
3859ac12
LF
7402 (source
7403 (origin
7404 (method url-fetch)
d9aa097b 7405 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7406 (sha256
7407 (base32
d9aa097b 7408 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7409 (build-system python-build-system)
7410 (propagated-inputs
7411 `(("python-pytz" ,python-pytz)))
7412 (native-inputs
f3b98f4f 7413 `(("python-nose" ,python-nose)))
3859ac12
LF
7414 (home-page "https://github.com/kurtraschke/pyRFC3339")
7415 (synopsis "Python timestamp library")
7416 (description "Python library for generating and parsing RFC 3339-compliant
7417timestamps.")
7418 (license license:expat)))
7419
7420(define-public python2-pyrfc3339
7421 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7422
7423(define-public python-werkzeug
7424 (package
7425 (name "python-werkzeug")
0580e383 7426 (version "0.11.11")
5eea2005
LF
7427 (source
7428 (origin
7429 (method url-fetch)
4b47cbfa 7430 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7431 (sha256
7432 (base32
0580e383 7433 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7434 (build-system python-build-system)
7435 (native-inputs
7436 `(("python-pytest" ,python-pytest)))
7437 (home-page "http://werkzeug.pocoo.org/")
7438 (synopsis "Utilities for WSGI applications")
7439 (description "One of the most advanced WSGI utility modules. It includes a
7440powerful debugger, full-featured request and response objects, HTTP utilities to
7441handle entity tags, cache control headers, HTTP dates, cookie handling, file
7442uploads, a powerful URL routing system and a bunch of community-contributed
7443addon modules.")
3f641af0 7444 (license license:x11)))
5eea2005
LF
7445
7446(define-public python2-werkzeug
7447 (package-with-python2 python-werkzeug))
99fffa8a
LF
7448
7449(define-public python-configobj
7450 (package
7451 (name "python-configobj")
7452 (version "5.0.6")
7453 (source (origin
7454 (method url-fetch)
7455 (uri (string-append
7456 "https://pypi.python.org/packages/source/c/configobj/"
7457 "configobj-" version ".tar.gz"))
7458 (sha256
7459 (base32
7460 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7461 ;; Patch setup.py so it looks for python-setuptools, which is
7462 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7463 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7464 (build-system python-build-system)
861f70c9 7465 (propagated-inputs
f3b98f4f 7466 `(("python-six" ,python-six)))
99fffa8a
LF
7467 (synopsis "Config file reading, writing and validation")
7468 (description "ConfigObj is a simple but powerful config file reader and
7469writer: an ini file round tripper. Its main feature is that it is very easy to
7470use, with a straightforward programmer’s interface and a simple syntax for
7471config files.")
7472 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7473 (license license:bsd-3)))
99fffa8a
LF
7474
7475(define-public python2-configobj
7476 (package-with-python2 python-configobj))
79e8a291
LF
7477
7478(define-public python-configargparse
7479 (package
7480 (name "python-configargparse")
7481 (version "0.10.0")
7482 (source (origin
7483 (method url-fetch)
7484 (uri (string-append
7485 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7486 "ConfigArgParse-" version ".tar.gz"))
7487 (sha256
7488 (base32
7489 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7490 (build-system python-build-system)
7491 (arguments
7492 ;; FIXME: Bug in test suite filed upstream:
7493 ;; https://github.com/bw2/ConfigArgParse/issues/32
7494 '(#:tests? #f))
7495 (synopsis "Replacement for argparse")
7496 (description "A drop-in replacement for argparse that allows options to also
7497be set via config files and/or environment variables.")
7498 (home-page "https://github.com/bw2/ConfigArgParse")
7499 (license license:expat)))
7500
7501(define-public python2-configargparse
7502 (package-with-python2 python-configargparse))
ab41f979
LF
7503
7504(define-public python-ndg-httpsclient
7505 (package
7506 (name "python-ndg-httpsclient")
7507 (version "0.4.0")
7508 (source (origin
7509 (method url-fetch)
7510 (uri (string-append
7511 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7512 "ndg_httpsclient-" version ".tar.gz"))
7513 (sha256
7514 (base32
7515 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7516 (build-system python-build-system)
a39cc016
LF
7517 (arguments
7518 '(;; The tests appear to require networking.
7519 #:tests? #f))
ab41f979
LF
7520 (propagated-inputs
7521 `(("python-pyopenssl" ,python-pyopenssl)))
7522 (synopsis "HTTPS support for Python's httplib and urllib2")
7523 (description "This is a HTTPS client implementation for httplib and urllib2
7524based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7525over the default provided with Python and importantly enables full verification
7526of the SSL peer.")
7527 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7528 (license license:bsd-3)))
ab41f979
LF
7529
7530;; python2-openssl requires special care, so package-with-python2 is
7531;; insufficient.
7532(define-public python2-ndg-httpsclient
7533 (package (inherit python-ndg-httpsclient)
7534 (name "python2-ndg-httpsclient")
7535 (arguments `(#:python ,python-2))
7536 (propagated-inputs
7537 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7538
7539(define-public python-contextlib2
7540 (package
7541 (name "python-contextlib2")
7542 (version "0.4.0")
7543 (source
7544 (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "contextlib2" version))
7547 (sha256
7548 (base32
7549 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7550 (build-system python-build-system)
7551 (arguments
7552 `(#:phases
7553 (modify-phases %standard-phases
7554 (replace 'check
7555 (lambda _ (zero?
7556 (system*
b3546174 7557 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7558 (home-page "http://contextlib2.readthedocs.org/")
7559 (synopsis "Tools for decorators and context managers")
7560 (description "This module is primarily a backport of the Python
75613.2 contextlib to earlier Python versions. Like contextlib, it
7562provides utilities for common tasks involving decorators and context
7563managers. It also contains additional features that are not part of
7564the standard library.")
3f641af0 7565 (license license:psfl)))
03f964a5
CM
7566
7567(define-public python2-contextlib2
7568 (package-with-python2 python-contextlib2))
210bf497
DT
7569
7570(define-public python-texttable
7571 (package
7572 (name "python-texttable")
7573 (version "0.8.4")
7574 (source
7575 (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "texttable" version))
7578 (sha256
7579 (base32
7580 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7581 (build-system python-build-system)
7582 (arguments '(#:tests? #f)) ; no tests
7583 (home-page "https://github.com/foutaise/texttable/")
7584 (synopsis "Python module for creating simple ASCII tables")
7585 (description "Texttable is a Python module for creating simple ASCII
7586tables.")
3f641af0 7587 (license license:lgpl2.1+)))
210bf497
DT
7588
7589(define-public python2-texttable
7590 (package-with-python2 python-texttable))
67c52bb3
DT
7591
7592(define-public python-websocket-client
7593 (package
7594 (name "python-websocket-client")
6b810897 7595 (version "0.37.0")
67c52bb3
DT
7596 (source
7597 (origin
7598 (method url-fetch)
6b810897 7599 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7600 (sha256
7601 (base32
6b810897 7602 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7603 (build-system python-build-system)
a5333f7c
HG
7604 (propagated-inputs
7605 `(("python-six" ,python-six)))
67c52bb3
DT
7606 (home-page "https://github.com/liris/websocket-client")
7607 (synopsis "WebSocket client for Python")
7608 (description "The Websocket-client module provides the low level APIs for
7609WebSocket usage in Python programs.")
3f641af0 7610 (license license:lgpl2.1+)))
67c52bb3
DT
7611
7612(define-public python2-websocket-client
7613 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7614
7615(define-public python-atomicwrites
7616 (package
7617 (name "python-atomicwrites")
4e92d76a 7618 (version "1.1.0")
5c6eea2a
LF
7619 (source (origin
7620 (method url-fetch)
7621 (uri (pypi-uri "atomicwrites" version))
7622 (sha256
7623 (base32
4e92d76a 7624 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7625 (build-system python-build-system)
7626 (synopsis "Atomic file writes in Python")
7627 (description "Library for atomic file writes using platform dependent tools
8f65585b 7628for atomic file system operations.")
5c6eea2a 7629 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7630 (license license:expat)))
9bb6d184
LF
7631
7632(define-public python2-atomicwrites
f210e944 7633 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7634
7635(define-public python-requests-toolbelt
7636 (package
7637 (name "python-requests-toolbelt")
c02af1c8 7638 (version "0.6.2")
561bb3cb
LF
7639 (source (origin
7640 (method url-fetch)
c02af1c8
LF
7641 (uri (string-append
7642 "https://pypi.python.org/packages/"
7643 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7644 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7645 (sha256
7646 (base32
c02af1c8 7647 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7648 (build-system python-build-system)
759aadd4
LF
7649 (native-inputs
7650 `(("python-betamax" ,python-betamax)
7651 ("python-mock" ,python-mock)
7652 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7653 (propagated-inputs
7654 `(("python-requests" ,python-requests)))
7655 (synopsis "Extensions to python-requests")
7656 (description "This is a toolbelt of useful classes and functions to be used
7657with python-requests.")
7658 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7659 (license license:asl2.0)))
d1deb90b
LF
7660
7661(define-public python-click-threading
7662 (package
7663 (name "python-click-threading")
3d2e0dbc 7664 (version "0.2.0")
d1deb90b
LF
7665 (source (origin
7666 (method url-fetch)
3d2e0dbc
LF
7667 (uri (string-append
7668 "https://pypi.python.org/packages/"
7669 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7670 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7671 (sha256
7672 (base32
3d2e0dbc 7673 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7674 (build-system python-build-system)
7675 (propagated-inputs
7676 `(("python-click" ,python-click)))
7677 (synopsis "Utilities for multithreading in Click")
7678 (description "This package provides utilities for multithreading in Click
7679applications.")
7680 (home-page "https://github.com/click-contrib/click-threading")
7681 (license license:expat)))
7b17cab9
LF
7682
7683(define-public python-click-log
7684 (package
7685 (name "python-click-log")
a9da8fec 7686 (version "0.1.3")
7b17cab9
LF
7687 (source (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "click-log" version))
7690 (sha256
7691 (base32
a9da8fec 7692 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7693 (build-system python-build-system)
7694 (propagated-inputs
7695 `(("python-click" ,python-click)))
7696 (synopsis "Logging for click applications")
7697 (description "This package provides a Python library for logging Click
7698applications.")
7699 (home-page "https://github.com/click-contrib/click-log")
7700 (license license:expat)))
7b3a4ee4
LF
7701
7702(define-public python-apipkg
7703 (package
7704 (name "python-apipkg")
7705 (version "1.4")
7706 (source (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "apipkg" version))
7709 (sha256
7710 (base32
7711 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7712 (build-system python-build-system)
328bb95d 7713 (native-inputs
7b3a4ee4
LF
7714 `(("python-pytest" ,python-pytest)))
7715 (synopsis "Namespace control and lazy-import mechanism")
7716 (description "With apipkg you can control the exported namespace of a Python
7717package and greatly reduce the number of imports for your users. It is a small
7718pure Python module that works on virtually all Python versions.")
7719 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7720 (license license:expat)))
e08739c3
CAW
7721
7722(define-public python2-apipkg
f210e944 7723 (package-with-python2 python-apipkg))
848964fe
LF
7724
7725(define-public python-execnet
7726 (package
7727 (name "python-execnet")
7728 (version "1.4.1")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "execnet" version))
7732 (sha256
7733 (base32
7734 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7735 (build-system python-build-system)
ca0eee9d
LF
7736 (arguments
7737 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7738 ;; The two test failures are caused by the lack of an `ssh` executable.
7739 ;; The test suite can be run with pytest after the 'install' phase.
7740 #:tests? #f))
848964fe 7741 (native-inputs
ca0eee9d
LF
7742 `(("python-pytest" ,python-pytest)
7743 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7744 (propagated-inputs
848964fe
LF
7745 `(("python-apipkg" ,python-apipkg)))
7746 (synopsis "Rapid multi-Python deployment")
7747 (description "Execnet provides a share-nothing model with
7748channel-send/receive communication for distributing execution across many
7749Python interpreters across version, platform and network barriers. It has a
7750minimal and fast API targetting the following uses:
7751@enumerate
7752@item distribute tasks to (many) local or remote CPUs
7753@item write and deploy hybrid multi-process applications
7754@item write scripts to administer multiple environments
7755@end enumerate")
7756 (home-page "http://codespeak.net/execnet/")
f210e944 7757 (license license:expat)))
16c84f90
CAW
7758
7759(define-public python2-execnet
f210e944 7760 (package-with-python2 python-execnet))
6720dbb4
LF
7761
7762;;; The software provided by this package was integrated into pytest 2.8.
7763(define-public python-pytest-cache
7764 (package
7765 (name "python-pytest-cache")
7766 (version "1.0")
7767 (source (origin
7768 (method url-fetch)
7769 (uri (pypi-uri "pytest-cache" version))
7770 (sha256
7771 (base32
7772 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7773 (build-system python-build-system)
f22efa01 7774 (propagated-inputs
630d938f
EF
7775 `(("python-apipkg" ,python-apipkg)
7776 ("python-execnet" ,python-execnet)
7777 ("python-py" ,python-py)
7778 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7779 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7780 (description "The pytest-cache plugin provides tools to rerun failures from
7781the last py.test invocation.")
7782 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7783 (license license:expat)))
0adc21c2
EF
7784
7785(define-public python2-pytest-cache
f210e944 7786 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7787
7788(define-public python-pytest-localserver
7789 (package
7790 (name "python-pytest-localserver")
29f20168 7791 (version "0.3.5")
d7e729fe
LF
7792 (source (origin
7793 (method url-fetch)
29f20168 7794 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7795 (sha256
7796 (base32
29f20168 7797 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7798 (build-system python-build-system)
7799 (arguments
7800 `(#:phases (modify-phases %standard-phases
7801 (replace 'check
7802 (lambda _
7803 (zero? (system* "py.test" "--genscript=runtests.py"))
7804 (zero? (system* "py.test")))))))
7805 (native-inputs
d7e729fe
LF
7806 `(("python-pytest" ,python-pytest)
7807 ("python-requests" ,python-requests)
9ba40f05 7808 ("python-six" ,python-six)))
f22efa01 7809 (propagated-inputs
9ba40f05 7810 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7811 (synopsis "Py.test plugin to test server connections locally")
7812 (description "Pytest-localserver is a plugin for the pytest testing
7813framework which enables you to test server connections locally.")
7814 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7815 (license license:expat)))
28cecbb7
LF
7816
7817(define-public python-wsgi-intercept
7818 (package
7819 (name "python-wsgi-intercept")
909fbd2b 7820 (version "1.2.2")
28cecbb7
LF
7821 (source (origin
7822 (method url-fetch)
909fbd2b
LF
7823 (uri (string-append
7824 "https://pypi.python.org/packages/"
7825 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7826 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7827 (sha256
7828 (base32
909fbd2b 7829 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 7830 (build-system python-build-system)
b9fc496f
HG
7831 (propagated-inputs
7832 `(("python-six" ,python-six)))
28cecbb7 7833 (native-inputs
9d813ec1 7834 `(("python-pytest" ,python-pytest)
b9fc496f
HG
7835 ("python-httplib2" ,python-httplib2)
7836 ("python-requests" ,python-requests)
8757f050 7837 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
7838 (synopsis "Puts a WSGI application in place of a real URI for testing")
7839 (description "Wsgi_intercept installs a WSGI application in place of a real
7840URI for testing. Testing a WSGI application normally involves starting a
7841server at a local host and port, then pointing your test code to that address.
7842Instead, this library lets you intercept calls to any specific host/port
7843combination and redirect them into a WSGI application importable by your test
7844program. Thus, you can avoid spawning multiple processes or threads to test
7845your Web app.")
7846 (home-page "https://github.com/cdent/wsgi-intercept")
7847 (license license:expat)))
89b8a551
LF
7848
7849(define-public python-pytest-xprocess
7850 (package
7851 (name "python-pytest-xprocess")
7852 (version "0.9.1")
7853 (source (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "pytest-xprocess" version))
7856 (sha256
7857 (base32
7858 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7859 (build-system python-build-system)
7860 (propagated-inputs
7861 `(("python-pytest" ,python-pytest)
7862 ("python-pytest-cache" ,python-pytest-cache)
7863 ("python-psutil" ,python-psutil)))
7864 (synopsis "Pytest plugin to manage external processes across test runs")
7865 (description "Pytest-xprocess is an experimental py.test plugin for managing
7866processes across test runs.")
7867 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7868 (license license:expat)))
5c299bf0
LF
7869
7870(define-public python-icalendar
7871 (package
7872 (name "python-icalendar")
f2f53353 7873 (version "3.10")
5c299bf0
LF
7874 (source (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "icalendar" version))
7877 (sha256
7878 (base32
f2f53353 7879 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7880 (build-system python-build-system)
7881 (propagated-inputs
7882 `(("python-dateutil-2" ,python-dateutil-2)
7883 ("python-pytz" ,python-pytz)))
7884 (synopsis "Python library for parsing iCalendar files")
7885 (description "The icalendar package is a parser/generator of iCalendar
7886files for use with Python.")
7887 (home-page "https://github.com/collective/icalendar")
3f641af0 7888 (license license:bsd-2)))
6bbbb53e
LF
7889
7890(define-public python-sphinxcontrib-newsfeed
7891 (package
7892 (name "python-sphinxcontrib-newsfeed")
7893 (version "0.1.4")
7894 (source (origin
7895 (method url-fetch)
7896 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7897 (sha256
7898 (base32
7899 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7900 (build-system python-build-system)
7901 (propagated-inputs
251ed7f2 7902 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
7903 (synopsis "News Feed extension for Sphinx")
7904 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7905Blog, News or Announcements section to a Sphinx website.")
7906 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7907 (license license:bsd-2)))
2216e15c
SB
7908
7909(define-public python-args
7910 (package
7911 (name "python-args")
7912 (version "0.1.0")
7913 (source (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "args" version))
7916 (sha256
7917 (base32
7918 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7919 (build-system python-build-system)
2216e15c
SB
7920 (home-page "https://github.com/kennethreitz/args")
7921 (synopsis "Command-line argument parser")
7922 (description
7923 "This library provides a Python module to parse command-line arguments.")
3f641af0 7924 (license license:bsd-3)))
2216e15c
SB
7925
7926(define-public python2-args
7927 (package-with-python2 python-args))
c06a3de9
SB
7928
7929(define-public python-clint
7930 (package
7931 (name "python-clint")
7932 (version "0.5.1")
7933 (source (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "clint" version))
7936 (sha256
7937 (base32
7938 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7939 (build-system python-build-system)
f22efa01 7940 (propagated-inputs
f3b98f4f 7941 `(("python-args" ,python-args)))
c06a3de9
SB
7942 (home-page "https://github.com/kennethreitz/clint")
7943 (synopsis "Command-line interface tools")
7944 (description
7945 "Clint is a Python module filled with a set of tools for developing
7946command-line applications, including tools for colored and indented
7947output, progress bar display, and pipes.")
3f641af0 7948 (license license:isc)))
c06a3de9
SB
7949
7950(define-public python2-clint
7951 (package-with-python2 python-clint))
4ecdeef8
SB
7952
7953(define-public python-astor
7954 (package
7955 (name "python-astor")
7956 (version "0.5")
7957 (source (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "astor" version))
7960 (sha256
7961 (base32
7962 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7963 (build-system python-build-system)
4ecdeef8
SB
7964 (home-page "https://github.com/berkerpeksag/astor")
7965 (synopsis "Read and write Python ASTs")
7966 (description
7967 "Astor is designed to allow easy manipulation of Python source via the
7968Abstract Syntax Tree.")
3f641af0 7969 (license license:bsd-3)))
4ecdeef8
SB
7970
7971(define-public python2-astor
7972 (package-with-python2 python-astor))
e224b7d0
SB
7973
7974(define-public python-rply
7975 (package
7976 (name "python-rply")
7977 (version "0.7.4")
7978 (source (origin
7979 (method url-fetch)
7980 (uri (pypi-uri "rply" version))
7981 (sha256
7982 (base32
7983 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7984 (build-system python-build-system)
f22efa01 7985 (propagated-inputs
f3b98f4f 7986 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
7987 (home-page "https://github.com/alex/rply")
7988 (synopsis "Parser generator for Python")
7989 (description
7990 "This package provides a pure Python based parser generator, that also
7991works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7992with a new public API, and RPython support.")
3f641af0 7993 (license license:bsd-3)))
e224b7d0
SB
7994
7995(define-public python2-rply
7996 (package-with-python2 python-rply))
c3e919d7
SB
7997
7998(define-public python-hy
7999 (package
8000 (name "python-hy")
8001 (version "0.11.1")
8002 (source (origin
8003 (method url-fetch)
8004 (uri (pypi-uri "hy" version))
8005 (sha256
8006 (base32
8007 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8008 (build-system python-build-system)
f22efa01 8009 (propagated-inputs
c3e919d7
SB
8010 `(("python-astor" ,python-astor)
8011 ("python-clint" ,python-clint)
f3b98f4f 8012 ("python-rply" ,python-rply)))
c3e919d7
SB
8013 (home-page "http://hylang.org/")
8014 (synopsis "Lisp frontend to Python")
8015 (description
8016 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8017its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8018Python at your fingertips, in Lisp form.")
8019 (license license:expat)))
8020
8021(define-public python2-hy
8022 (package-with-python2 python-hy))
7a5b944e 8023
81f7f297
EF
8024(define-public python-rauth
8025 (package
8026 (name "python-rauth")
8027 (version "0.7.2")
8028 (source
8029 (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "rauth" version))
8032 (sha256
8033 (base32
8034 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8035 (build-system python-build-system)
8036 (arguments
8037 `(#:test-target "check"))
f22efa01 8038 (propagated-inputs
81f7f297
EF
8039 `(("python-requests" ,python-requests)))
8040 (home-page "https://github.com/litl/rauth")
8041 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8042 (description
8043 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8044provides service wrappers for convenient connection initialization and
8045authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8046 (license license:expat)
8047 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8048
8049(define-public python2-rauth
0848d8d3
EF
8050 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8051 (package
8052 (inherit base)
00e10c6e 8053 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8054 ,@(package-native-inputs base))))))
81f7f297 8055
1abe448d
EF
8056(define-public python2-functools32
8057 (package
8058 (name "python2-functools32")
8059 (version "3.2.3-2")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "functools32" version))
8064 (sha256
8065 (base32
8066 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8067 (build-system python-build-system)
8068 (arguments
8069 `(#:python ,python-2
8070 #:tests? #f)) ; no test target
1abe448d
EF
8071 (home-page "https://github.com/MiCHiLU/python-functools32")
8072 (synopsis
8073 "Backport of the functools module from Python 3.2.3")
8074 (description
8075 "This package is a backport of the @code{functools} module from Python
80763.2.3 for use with older versions of Python and PyPy.")
8077 (license license:expat)))
8078
877889f3 8079(define-public python2-futures
7a5b944e 8080 (package
877889f3 8081 (name "python2-futures")
7a5b944e
EF
8082 (version "3.0.3")
8083 (source
8084 (origin
8085 (method url-fetch)
8086 (uri (pypi-uri "futures" version))
8087 (sha256
8088 (base32
8089 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8090 (build-system python-build-system)
877889f3 8091 (arguments `(#:python ,python-2))
7a5b944e
EF
8092 (home-page "https://github.com/agronholm/pythonfutures")
8093 (synopsis
8094 "Backport of the concurrent.futures package from Python 3.2")
8095 (description
8096 "The concurrent.futures module provides a high-level interface for
8097asynchronously executing callables. This package backports the
8098concurrent.futures package from Python 3.2")
3f641af0 8099 (license license:bsd-3)))
7a5b944e 8100
5cb2fe44
EF
8101(define-public python-promise
8102 (package
8103 (name "python-promise")
8104 (version "0.4.2")
8105 (source
8106 (origin
8107 (method url-fetch)
8108 (uri (pypi-uri "promise" version))
8109 (sha256
8110 (base32
8111 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8112 (build-system python-build-system)
8113 ;; Tests wants python-futures, which is a python2 only program, and
8114 ;; can't be found by python-promise at test time.
8115 (arguments `(#:tests? #f))
8116 (home-page "https://github.com/syrusakbary/promise")
8117 (synopsis "Promises/A+ implementation for Python")
8118 (description
8119 "Promises/A+ implementation for Python")
8120 (properties `((python2-variant . ,(delay python2-promise))))
8121 (license license:expat)))
8122
8123(define-public python2-promise
8124 (let ((promise (package-with-python2
8125 (strip-python2-variant python-promise))))
8126 (package (inherit promise)
8127 (arguments (substitute-keyword-arguments (package-arguments promise)
8128 ((#:tests? _) #t)))
8129 (native-inputs
8130 `(("python2-futures" ,python2-futures)
8131 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8132 ,@(package-native-inputs promise))))))
8133
c18f6368
EF
8134(define-public python-urllib3
8135 (package
8136 (name "python-urllib3")
6178274d 8137 (version "1.18.1")
c18f6368
EF
8138 (source
8139 (origin
8140 (method url-fetch)
8141 (uri (pypi-uri "urllib3" version))
8142 (sha256
8143 (base32
6178274d 8144 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8145 (build-system python-build-system)
8146 (arguments `(#:tests? #f))
8147 (native-inputs
f3b98f4f 8148 `(;; some packages for tests
c18f6368
EF
8149 ("python-nose" ,python-nose)
8150 ("python-mock" ,python-mock)
8151 ("python-tornado" ,python-tornado)))
8152 (propagated-inputs
8322749a 8153 `(;; extra packages for https security
c18f6368
EF
8154 ("python-certifi" ,python-certifi)
8155 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8156 ("python-pyasn1" ,python-pyasn1)
8157 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8158 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8159 (synopsis "HTTP library with thread-safe connection pooling")
8160 (description
8161 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8162can reuse the same socket connection for multiple requests, it can POST files,
8163supports url redirection and retries, and also gzip and deflate decoding.")
8164 (license license:expat)))
8165
8166(define-public python2-urllib3
8167 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8168
8169(define-public python-colorama
8170 (package
8171 (name "python-colorama")
8172 (version "0.3.3")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "colorama" version))
8177 (sha256
8178 (base32
8179 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8180 (build-system python-build-system)
2b2f2fc1
DT
8181 (synopsis "colored terminal text rendering for Python")
8182 (description "Colorama is a Python library for rendering colored terminal
8183text.")
8184 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8185 (license license:bsd-3)))
2b2f2fc1
DT
8186
8187(define-public python2-colorama
8188 (package-with-python2 python-colorama))
f5bcec6e
DT
8189
8190(define-public python-rsa
8191 (package
8192 (name "python-rsa")
ecd68c53 8193 (version "3.4.2")
f5bcec6e
DT
8194 (source
8195 (origin
8196 (method url-fetch)
8197 (uri (pypi-uri "rsa" version))
8198 (sha256
8199 (base32
ecd68c53 8200 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8201 (build-system python-build-system)
f22efa01 8202 (propagated-inputs
f3b98f4f 8203 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8204 (synopsis "Pure-Python RSA implementation")
8205 (description "Python-RSA is a pure-Python RSA implementation. It supports
8206encryption and decryption, signing and verifying signatures, and key
8207generation according to PKCS#1 version 1.5. It can be used as a Python
8208library as well as on the command line.")
8209 (home-page "http://stuvel.eu/rsa")
3f641af0 8210 (license license:asl2.0)))
f5bcec6e
DT
8211
8212(define-public python2-rsa
8213 (package-with-python2 python-rsa))
c0aacfa5
DT
8214
8215(define-public python-pluggy
8216 (package
8217 (name "python-pluggy")
8218 (version "0.3.1")
8219 (source
8220 (origin
8221 (method url-fetch)
8222 (uri (pypi-uri "pluggy" version))
8223 (sha256
8224 (base32
8225 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8226 (build-system python-build-system)
c0aacfa5
DT
8227 (synopsis "Plugin and hook calling mechanism for Python")
8228 (description "Pluggy is an extraction of the plugin manager as used by
8229Pytest but stripped of Pytest specific details.")
8230 (home-page "https://pypi.python.org/pypi/pluggy")
8231 (license license:expat)))
8232
8233(define-public python2-pluggy
8234 (package-with-python2 python-pluggy))
a4af21ca
DT
8235
8236(define-public python-tox
8237 (package
8238 (name "python-tox")
8239 (version "2.3.1")
8240 (source
8241 (origin
8242 (method url-fetch)
8243 (uri (pypi-uri "tox" version))
8244 (sha256
8245 (base32
8246 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8247 (build-system python-build-system)
8248 (arguments
7ba07edf
HG
8249 ;; FIXME: Tests require pytest-timeout, which itself requires
8250 ;; pytest>=2.8.0 for installation.
a4af21ca 8251 '(#:tests? #f))
482d9591
HG
8252 (propagated-inputs
8253 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8254 ("python-py" ,python-py)
482d9591 8255 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8256 (native-inputs
7ba07edf
HG
8257 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8258 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8259 (home-page "http://tox.testrun.org/")
8260 (synopsis "Virtualenv-based automation of test activities")
8261 (description "Tox is a generic virtualenv management and test command line
8262tool. It can be used to check that a package installs correctly with
8263different Python versions and interpreters, or run tests in each type of
8264supported environment, or act as a frontend to continuous integration
8265servers.")
8266 (license license:expat)))
8267
8268(define-public python2-tox
8269 (package-with-python2 python-tox))
ba9da248
DT
8270
8271(define-public python-jmespath
8272 (package
8273 (name "python-jmespath")
8274 (version "0.9.0")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "jmespath" version))
8279 (sha256
8280 (base32
8281 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8282 (build-system python-build-system)
ba9da248
DT
8283 (synopsis "JSON Matching Expressions")
8284 (description "JMESPath (pronounced “james path”) is a Python library that
8285allows one to declaratively specify how to extract elements from a JSON
8286document.")
8287 (home-page "https://github.com/jmespath/jmespath.py")
8288 (license license:expat)))
8289
8290(define-public python2-jmespath
8291 (package-with-python2 python-jmespath))
935fcd5c
DT
8292
8293(define-public python-botocore
8294 (package
8295 (name "python-botocore")
e09f952d 8296 (version "1.4.62")
935fcd5c
DT
8297 (source
8298 (origin
8299 (method url-fetch)
8300 (uri (pypi-uri "botocore" version))
8301 (sha256
8302 (base32
e09f952d 8303 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8304 (build-system python-build-system)
482d9591 8305 (propagated-inputs
935fcd5c
DT
8306 `(("python-dateutil" ,python-dateutil-2)
8307 ("python-docutils" ,python-docutils)
482d9591
HG
8308 ("python-jmespath" ,python-jmespath)))
8309 (inputs
8310 `(("python-mock" ,python-mock)
935fcd5c 8311 ("python-nose" ,python-nose)
482d9591 8312 ("behave" ,behave)
935fcd5c 8313 ("python-tox" ,python-tox)
482d9591 8314 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8315 (home-page "https://github.com/boto/botocore")
8316 (synopsis "Low-level interface to AWS")
8317 (description "Botocore is a Python library that provides a low-level
8318interface to the Amazon Web Services (AWS) API.")
3f641af0 8319 (license license:asl2.0)))
935fcd5c
DT
8320
8321(define-public python2-botocore
8322 (package-with-python2 python-botocore))
f861b8b8
DT
8323
8324(define-public awscli
8325 (package
8326 (name "awscli")
d5ccf71e 8327 (version "1.11.5")
f861b8b8
DT
8328 (source
8329 (origin
8330 (method url-fetch)
d5ccf71e 8331 (uri (pypi-uri name version))
f861b8b8
DT
8332 (sha256
8333 (base32
d5ccf71e 8334 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8335 (build-system python-build-system)
482d9591 8336 (propagated-inputs
f861b8b8 8337 `(("python-colorama" ,python-colorama)
482d9591
HG
8338 ("python-botocore" ,python-botocore)
8339 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8340 ("python-docutils" ,python-docutils)
482d9591
HG
8341 ("python-rsa" ,python-rsa)))
8342 (inputs
8343 `(("python-mock" ,python-mock)
f861b8b8 8344 ("python-nose" ,python-nose)
f861b8b8
DT
8345 ("python-sphinx" ,python-sphinx)
8346 ("python-tox" ,python-tox)
482d9591 8347 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8348 (home-page "http://aws.amazon.com/cli/")
8349 (synopsis "Command line client for AWS")
8350 (description "AWS CLI provides a unified command line interface to the
8351Amazon Web Services (AWS) API.")
3f641af0 8352 (license license:asl2.0)))
6a44697d
LF
8353
8354(define-public python-hypothesis
8355 (package
8356 (name "python-hypothesis")
bea6d94d 8357 (version "3.1.0")
6a44697d
LF
8358 (source (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "hypothesis" version))
8361 (sha256
8362 (base32
bea6d94d 8363 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8364 (build-system python-build-system)
6a44697d
LF
8365 (propagated-inputs
8366 `(("python-flake8" ,python-flake8)
8367 ("python-pytest" ,python-pytest)))
8368 (synopsis "Library for property based testing")
8369 (description "Hypothesis is a library for testing your Python code against a
8370much larger range of examples than you would ever want to write by hand. It’s
8371based on the Haskell library, Quickcheck, and is designed to integrate
8372seamlessly into your existing Python unit testing work flow.")
8373 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8374 (license license:mpl2.0)
6f068e08 8375 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8376
8377(define-public python2-hypothesis
6f068e08
EF
8378 (let ((hypothesis (package-with-python2
8379 (strip-python2-variant python-hypothesis))))
8380 (package (inherit hypothesis)
8381 (native-inputs
f3b98f4f 8382 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8383
8384(define-public python-pytest-subtesthack
8385 (package
8386 (name "python-pytest-subtesthack")
8387 (version "0.1.1")
8388 (source (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "pytest-subtesthack" version))
8391 (sha256
8392 (base32
8393 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8394 (build-system python-build-system)
7517e73c
LF
8395 (propagated-inputs
8396 `(("python-pytest" ,python-pytest)))
8397 (synopsis "Set-up and tear-down fixtures for unit tests")
8398 (description "This plugin allows you to set up and tear down fixtures within
8399unit test functions that use @code{py.test}. This is useful for using
8400@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8401function multiple times, without setting up or tearing down fixture state as is
8402normally the case.")
8403 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8404 (license license:unlicense)))
7517e73c
LF
8405
8406(define-public python2-pytest-subtesthack
8407 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8408
8409(define-public python2-xdo
8410 (package
8411 (name "python2-xdo")
8412 (version "0.2")
8413 (source (origin
8414 (method url-fetch)
8415 (uri (string-append
8416 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8417 "python-xdo_" version ".orig.tar.gz"))
8418 (sha256
8419 (base32
8420 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8421 (build-system python-build-system)
8422 (arguments
8423 `(#:python ,python-2
8424 #:tests? #f)) ; no tests provided
8425 (inputs
8426 `(("xdotool" ,xdotool)
8427 ("libX11" ,libx11)))
8428 (home-page "https://tracker.debian.org/pkg/python-xdo")
8429 (synopsis "Python library for simulating X11 keyboard/mouse input")
8430 (description "Provides bindings to libxdo for manipulating X11 via simulated
8431input. (Note that this is mostly a legacy library; you may wish to look at
8432python-xdo for newer bindings.)")
3f641af0 8433 (license license:bsd-3)))
0bdc1671 8434
cb34dc6c
CAW
8435(define-public python-wtforms
8436 (package
8437 (name "python-wtforms")
8438 (version "2.1")
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "WTForms" version ".zip"))
8443 (sha256
8444 (base32
8445 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8446 (build-system python-build-system)
13c4d874
EF
8447 (arguments
8448 '(#:phases
8449 (modify-phases %standard-phases
8450 (add-after 'unpack 'remove-django-test
8451 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8452 (lambda _
8453 (substitute*
8454 "tests/runtests.py"
8455 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8456 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8457 #t)))))
cb34dc6c
CAW
8458 (native-inputs
8459 `(("unzip" ,unzip)))
8460 (home-page "http://wtforms.simplecodes.com/")
8461 (synopsis
8462 "Form validation and rendering library for Python web development")
8463 (description
8464 "WTForms is a flexible forms validation and rendering library
8465for Python web development. It is very similar to the web form API
8466available in Django, but is a standalone package.")
f210e944 8467 (license license:bsd-3)))
cb34dc6c
CAW
8468
8469(define-public python2-wtforms
f210e944 8470 (package-with-python2 python-wtforms))
50aaec25
DT
8471
8472(define-public python-mako
8473 (package
8474 (name "python-mako")
8475 (version "1.0.3")
8476 (source
8477 (origin
8478 (method url-fetch)
8479 (uri (pypi-uri "Mako" version))
8480 (sha256
8481 (base32
8482 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8483 (build-system python-build-system)
482d9591
HG
8484 (propagated-inputs
8485 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8486 (native-inputs
482d9591 8487 `(("python-mock" ,python-mock)
50aaec25
DT
8488 ("python-nose" ,python-nose)))
8489 (home-page "http://www.makotemplates.org/")
8490 (synopsis "Templating language for Python")
8491 (description "Mako is a templating language for Python that compiles
8492templates into Python modules.")
f210e944 8493 (license license:expat)))
50aaec25
DT
8494
8495(define-public python2-mako
f210e944 8496 (package-with-python2 python-mako))
ae00a41f
CAW
8497
8498(define-public python-waitress
8499 (package
8500 (name "python-waitress")
8501 (version "0.8.10")
8502 (source
8503 (origin
8504 (method url-fetch)
8505 (uri (pypi-uri "waitress" version))
8506 (sha256
8507 (base32
8508 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8509 (build-system python-build-system)
8510 (home-page "https://github.com/Pylons/waitress")
8511 (synopsis "Waitress WSGI server")
8512 (description "Waitress is meant to be a production-quality pure-Python WSGI
8513server with very acceptable performance.")
f210e944 8514 (license license:zpl2.1)))
ae00a41f
CAW
8515
8516(define-public python2-waitress
f210e944 8517 (package-with-python2 python-waitress))
778a284b
CAW
8518
8519(define-public python-wsgiproxy2
8520 (package
8521 (name "python-wsgiproxy2")
8522 (version "0.4.2")
8523 (source
8524 (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8527 (sha256
8528 (base32
8529 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8530 (build-system python-build-system)
e359b31a
LF
8531 (arguments
8532 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8533 ;; support Python 3:
8534 ;; https://github.com/benoitc/restkit/issues/140
8535 #:tests? #f))
778a284b
CAW
8536 (native-inputs
8537 `(("unzip" ,unzip)
8538 ("python-nose" ,python-nose)
8539 ("python-coverage" ,python-coverage)))
8540 (propagated-inputs
8541 `(("python-six" ,python-six)
8542 ("python-webob" ,python-webob)))
8543 (home-page
8544 "https://github.com/gawel/WSGIProxy2/")
8545 (synopsis "WSGI Proxy with various http client backends")
8546 (description "WSGI turns HTTP requests into WSGI function calls.
8547WSGIProxy turns WSGI function calls into HTTP requests.
8548It also includes code to sign requests and pass private data,
8549and to spawn subprocesses to handle requests.")
f210e944 8550 (license license:expat)))
778a284b
CAW
8551
8552(define-public python2-wsgiproxy2
f210e944 8553 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8554
8555(define-public python-pastedeploy
8556 (package
8557 (name "python-pastedeploy")
8558 (version "1.5.2")
8559 (source
8560 (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "PasteDeploy" version))
8563 (sha256
8564 (base32
8565 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8566 (build-system python-build-system)
8567 (native-inputs
8568 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8569 (home-page "http://pythonpaste.org/deploy/")
8570 (synopsis
8571 "Load, configure, and compose WSGI applications and servers")
8572 (description
8573 "This tool provides code to load WSGI applications and servers from URIs;
8574these URIs can refer to Python Eggs for INI-style configuration files. Paste
8575Script provides commands to serve applications based on this configuration
8576file.")
8577 (license license:expat)))
8578
8579(define-public python2-pastedeploy
8580 (package-with-python2 python-pastedeploy))
1cf53652 8581
c4a7904c
CAW
8582(define-public python-paste
8583 (package
8584 (name "python-paste")
8585 (version "2.0.2")
8586 (source
8587 (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "Paste" version))
8590 (sha256
8591 (base32
8592 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8593 (patches (search-patches "python-paste-remove-website-test.patch"
8594 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8595 (build-system python-build-system)
8596 (native-inputs
8597 `(("python-nose" ,python-nose)))
8598 (propagated-inputs
f3b98f4f 8599 `(("python-six" ,python-six)))
c4a7904c
CAW
8600 (arguments
8601 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8602 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8603 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8604 ;; still... things should be better by the next Paste release.)
8605 #:tests? #f))
8606 (home-page "http://pythonpaste.org")
8607 (synopsis
8608 "Python web development tools, focusing on WSGI")
8609 (description
8610 "Paste provides a variety of web development tools and middleware which
8611can be nested together to build web applications. Paste's design closely
8612follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8613 (license license:expat)
8614 (properties `((python2-variant . ,(delay python2-paste))))))
8615
8616(define-public python2-paste
8617 (let ((paste (package-with-python2
8618 (strip-python2-variant python-paste))))
8619 (package
8620 (inherit paste)
8621 (arguments
8622 ;; Tests are back for Python 2!
8623 `(#:tests? #t
8624 ,@(package-arguments paste))))))
8625
a8f20f63
CAW
8626(define-public python-pastescript
8627 (package
8628 (name "python-pastescript")
8629 (version "2.0.2")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "PasteScript" version))
8634 (sha256
8635 (base32
8636 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8637 (build-system python-build-system)
8638 (native-inputs
8639 `(("python-nose" ,python-nose)))
8640 (propagated-inputs
f3b98f4f 8641 `(("python-paste" ,python-paste)
a8f20f63
CAW
8642 ("python-pastedeploy" ,python-pastedeploy)))
8643 (home-page "http://pythonpaste.org/script/")
8644 (arguments
8645 '(;; Unfortunately, this requires the latest unittest2,
8646 ;; but that requires traceback2 which requires linecache2 which requires
8647 ;; unittest2. So we're skipping tests for now.
8648 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8649 ;; so in theory we could get around this situation somehow.)
8650 #:tests? #f))
8651 (synopsis
8652 "Pluggable command line tool for serving web applications and more")
8653 (description
8654 "PasteScript is a plugin-friendly command line tool which provides a
8655variety of features, from launching web applications to bootstrapping project
8656layouts.")
8657 (license license:expat)))
8658
8659(define-public python2-pastescript
8660 (package-with-python2 python-pastescript))
8661
1cf53652
CAW
8662(define-public python-pyquery
8663 (package
8664 (name "python-pyquery")
aab76e80 8665 (version "1.2.13")
1cf53652
CAW
8666 (source
8667 (origin
8668 (method url-fetch)
8669 (uri (pypi-uri "pyquery" version))
8670 (sha256
8671 (base32
aab76e80 8672 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8673 (build-system python-build-system)
2ddbfa8c
LF
8674 (native-inputs
8675 `(("python-webob" ,python-webob)
8676 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8677 (propagated-inputs
8678 `(("python-lxml" ,python-lxml)
8679 ("python-cssselect" ,python-cssselect)))
8680 (home-page "https://github.com/gawel/pyquery")
8681 (synopsis "Make jQuery-like queries on xml documents")
8682 (description "pyquery allows you to make jQuery queries on xml documents.
8683The API is as much as possible the similar to jQuery. pyquery uses lxml for
8684fast xml and html manipulation.")
f210e944 8685 (license license:bsd-3)))
1cf53652
CAW
8686
8687(define-public python2-pyquery
f210e944 8688 (package-with-python2 python-pyquery))
aa6313d6
CAW
8689
8690(define-public python-webtest
8691 (package
8692 (name "python-webtest")
8693 (version "2.0.20")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (pypi-uri "WebTest" version))
8698 (sha256
8699 (base32
8700 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8701 (build-system python-build-system)
8702 (arguments
8703 `(;; Unfortunately we have to disable tests!
8704 ;; This release of WebTest is pinned to python-nose < 1.3,
8705 ;; but older versions of python-nose are plagued with the following
8706 ;; bug(s), which rears its ugly head during test execution:
8707 ;; https://github.com/nose-devs/nose/issues/759
8708 ;; https://github.com/nose-devs/nose/pull/811
8709 #:tests? #f))
8710 ;; Commented out code is no good, but in this case, once tests
8711 ;; are ready to be enabled again, we should put the following
8712 ;; in place:
8713 ;; (native-inputs
8714 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8715 ;; ; but see above comment
8716 ;; ("python-coverage" ,python-coverage)
8717 ;; ("python-mock" ,python-mock)
8718 ;; ("python-pastedeploy" ,python-pastedeploy)
8719 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8720 ;; ("python-pyquery" ,python-pyquery)))
8721 (propagated-inputs
8722 `(("python-waitress" ,python-waitress)
8723 ("python-webob" ,python-webob)
8724 ("python-six" ,python-six)
8725 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8726 (home-page "http://webtest.pythonpaste.org/")
8727 (synopsis "Helper to test WSGI applications")
8728 (description "Webtest allows you to test your Python web applications
8729without starting an HTTP server. It supports anything that supports the
8730minimum of WSGI.")
f210e944 8731 (license license:expat)))
aa6313d6
CAW
8732
8733(define-public python2-webtest
f210e944 8734 (package-with-python2 python-webtest))
4cb122cd
CAW
8735
8736(define-public python-anyjson
8737 (package
8738 (name "python-anyjson")
8739 (version "0.3.3")
8740 (source
8741 (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "anyjson" version))
8744 (sha256
8745 (base32
8746 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8747 (build-system python-build-system)
8748 (arguments
8749 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8750 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8751 ;; whatever) so this transformation needs to be done before the tests
8752 ;; can be run. Maybe we could add a build step to transform beforehand
8753 ;; but it could be annoying/difficult.
8754 ;; We can enable tests for the Python 2 version, though, and do below.
8755 #:tests? #f))
8756 (home-page "http://bitbucket.org/runeh/anyjson/")
8757 (synopsis
8758 "Wraps best available JSON implementation in a common interface")
8759 (description
8760 "Anyjson loads whichever is the fastest JSON module installed
8761and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8762 (license license:bsd-3)
4cb122cd
CAW
8763 (properties `((python2-variant . ,(delay python2-anyjson))))))
8764
8765(define-public python2-anyjson
8766 (let ((anyjson (package-with-python2
8767 (strip-python2-variant python-anyjson))))
8768 (package
8769 (inherit anyjson)
8770 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8771 #:tests? #t
8772 ,@(package-arguments anyjson)))
00e10c6e 8773 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8774
8775(define-public python-amqp
8776 (package
8777 (name "python-amqp")
8778 (version "1.4.9")
8779 (source
8780 (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "amqp" version))
8783 (sha256
8784 (base32
8785 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8786 (build-system python-build-system)
8787 (native-inputs
8788 `(("python-nose" ,python-nose)
8789 ("python-mock" ,python-mock)))
8790 (home-page "http://github.com/celery/py-amqp")
8791 (synopsis
8792 "Low-level AMQP client for Python (fork of amqplib)")
8793 (description
8794 "This is a fork of amqplib which was originally written by Barry Pederson.
8795It is maintained by the Celery project, and used by kombu as a pure python
8796alternative when librabbitmq is not available.")
3f641af0 8797 (license license:lgpl2.1+)
8dfceab7
CAW
8798 (properties `((python2-variant . ,(delay python2-amqp))))))
8799
8800(define-public python2-amqp
8801 (let ((amqp (package-with-python2
8802 (strip-python2-variant python-amqp))))
8803 (package
8804 (inherit amqp)
8805 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8806 ;; unmaintained. Weirdly, does not do this on the python 3
8807 ;; version?
8808 #:tests? #f
00e10c6e 8809 ,@(package-arguments amqp))))))
7d387305
CAW
8810
8811(define-public python-kombu
8812 (package
8813 (name "python-kombu")
0cb59822 8814 (version "3.0.37")
7d387305
CAW
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "kombu" version))
8819 (sha256
8820 (base32
0cb59822 8821 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8822 (build-system python-build-system)
8823 (native-inputs
8824 `(("python-mock" ,python-mock)
8825 ("python-nose" ,python-nose)))
8826 (propagated-inputs
8827 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8828 ("python-amqp" ,python-amqp)
8829 ("python-redis" ,python-redis)))
7d387305
CAW
8830 (home-page "http://kombu.readthedocs.org")
8831 (synopsis "Message passing library for Python")
8832 (description "The aim of Kombu is to make messaging in Python as easy as
8833possible by providing an idiomatic high-level interface for the AMQ protocol,
8834and also provide proven and tested solutions to common messaging problems.
8835AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8836message orientation, queuing, routing, reliability and security, for which the
8837RabbitMQ messaging server is the most popular implementation.")
3f641af0 8838 (license license:bsd-3)
7d387305
CAW
8839 (properties `((python2-variant . ,(delay python2-kombu))))))
8840
8841(define-public python2-kombu
8842 (let ((kombu (package-with-python2
8843 (strip-python2-variant python-kombu))))
8844 (package
8845 (inherit kombu)
328bb95d
HG
8846 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8847 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
8848
8849(define-public python-billiard
8850 (package
8851 (name "python-billiard")
a6bb9e44 8852 (version "3.3.0.23")
b6f0b9fb
CAW
8853 (source
8854 (origin
8855 (method url-fetch)
8856 (uri (pypi-uri "billiard" version))
8857 (sha256
8858 (base32
a6bb9e44 8859 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
8860 (build-system python-build-system)
8861 (native-inputs
8862 `(("python-nose" ,python-nose)))
8863 (home-page "http://github.com/celery/billiard")
8864 (synopsis
8865 "Python multiprocessing fork with improvements and bugfixes")
8866 (description
8867 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8868multiprocessing package itself is a renamed and updated version of R Oudkerk's
8869pyprocessing package. This standalone variant is intended to be compatible with
8870Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8871 (license license:bsd-3)
b6f0b9fb
CAW
8872 (properties `((python2-variant . ,(delay python2-billiard))))))
8873
8874(define-public python2-billiard
8875 (let ((billiard (package-with-python2
8876 (strip-python2-variant python-billiard))))
8877 (package
8878 (inherit billiard)
00e10c6e 8879 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
8880 ("python2-mock" ,python2-mock)
8881 ,@(package-native-inputs billiard))))))
22df6419
CAW
8882
8883(define-public python-celery
8884 (package
8885 (name "python-celery")
9ebe87fe 8886 (version "3.1.24")
22df6419
CAW
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "celery" version))
8891 (sha256
8892 (base32
9ebe87fe 8893 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 8894 (build-system python-build-system)
9ebe87fe
LF
8895 (arguments
8896 `(#:phases
8897 (modify-phases %standard-phases
8898 ;; These tests break with Python 3.5:
8899 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8900 (replace 'check
8901 (lambda _
8902 (zero?
8903 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
8904 (native-inputs
8905 `(("python-nose" ,python-nose)))
f22efa01 8906 (propagated-inputs
22df6419
CAW
8907 `(("python-pytz" ,python-pytz)
8908 ("python-billiard" ,python-billiard)
8909 ("python-kombu" ,python-kombu)))
8910 (home-page "http://celeryproject.org")
8911 (synopsis "Distributed Task Queue")
8912 (description "Celery is an asynchronous task queue/job queue based on
8913distributed message passing. It is focused on real-time operation, but
8914supports scheduling as well. The execution units, called tasks, are executed
8915concurrently on a single or more worker servers using multiprocessing,
8916Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8917synchronously (wait until ready).")
3f641af0 8918 (license license:bsd-3)
22df6419
CAW
8919 (properties `((python2-variant . ,(delay python2-celery))))))
8920
8921(define-public python2-celery
8922 (let ((celery (package-with-python2
8923 (strip-python2-variant python-celery))))
8924 (package
8925 (inherit celery)
00e10c6e 8926 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
8927 ("python2-mock" ,python2-mock)
8928 ,@(package-native-inputs celery))))))
97e32948
CAW
8929
8930(define-public python-translitcodec
8931 (package
8932 (name "python-translitcodec")
8933 (version "0.4.0")
8934 (source
8935 (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "translitcodec" version))
8938 (sha256
8939 (base32
8940 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8941 (build-system python-build-system)
8942 (arguments
8943 `(#:tests? #f)) ; no tests provided
8944 (home-page
8945 "https://github.com/claudep/translitcodec")
8946 (synopsis
8947 "Unicode to 8-bit charset transliteration codec")
8948 (description
8949 "This package contains codecs for transliterating ISO 10646 texts into
8950best-effort representations using smaller coded character sets (ASCII,
8951ISO 8859, etc.).")
f210e944 8952 (license license:expat)))
97e32948
CAW
8953
8954(define-public python2-translitcodec
f210e944 8955 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
8956
8957(define-public python-editor
8958 (package
8959 (name "python-editor")
8960 (version "0.5")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "python-editor" version))
8965 (sha256
8966 (base32
8967 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8968 (build-system python-build-system)
8969 (home-page
8970 "https://github.com/fmoo/python-editor")
8971 (synopsis
8972 "Programmatically open an editor, capture the result")
8973 (description
8974 "python-editor is a library that provides the editor module for
8975programmatically interfacing with your system's $EDITOR.")
f210e944 8976 (license license:asl2.0)))
0c3b90d4
CAW
8977
8978(define-public python2-editor
f210e944 8979 (package-with-python2 python-editor))
3276517c
LF
8980
8981(define-public python-sphinxcontrib-programoutput
8982 (package
8983 (name "python-sphinxcontrib-programoutput")
8984 (version "0.8")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8988 (sha256
8989 (base32
8990 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8991 (build-system python-build-system)
8992 (propagated-inputs
a0a09859 8993 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
8994 (synopsis "Sphinx extension to include program output")
8995 (description "A Sphinx extension to literally insert the output of arbitrary
8996commands into documents, helping you to keep your command examples up to date.")
8997 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 8998 (license license:bsd-2)))
3276517c
LF
8999
9000(define-public python2-sphinxcontrib-programoutput
f210e944 9001 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9002
9003(define-public python-sphinx-repoze-autointerface
9004 (package
9005 (name "python-sphinx-repoze-autointerface")
328ae341 9006 (version "0.8")
548d7165
LF
9007 (source (origin
9008 (method url-fetch)
9009 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9010 (sha256
9011 (base32
328ae341 9012 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9013 (build-system python-build-system)
9014 (propagated-inputs
47c7dc4a 9015 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9016 ("python-zope-interface" ,python-zope-interface)))
9017 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9018 (description "This package defines an extension for the Sphinx documentation
9019system. The extension allows generation of API documentation by
9020introspection of @code{zope.interface} instances in code.")
9021 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9022 (license license:repoze)))
548d7165
LF
9023
9024(define-public python2-sphinx-repoze-autointerface
9025 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9026
9027(define-public python-psycopg2
9028 (package
9029 (name "python-psycopg2")
9030 (version "2.6.1")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "psycopg2" version))
9035 (sha256
9036 (base32
9037 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9038 (build-system python-build-system)
9039 (arguments
9040 ;; Tests would require a postgresql database "psycopg2_test"
9041 ;; and a running postgresql database management service.
9042 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9043 (inputs
9044 `(("postgresql" ,postgresql))) ; libpq
9045 (home-page "http://initd.org/psycopg/")
9046 (synopsis "Python PostgreSQL adapter")
9047 (description
9048 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9049 (license license:lgpl3+)))
b31fbea5
DM
9050
9051(define-public python2-psycopg2
f210e944 9052 (package-with-python2 python-psycopg2))
eed1a61f
LF
9053
9054(define-public python-vobject
9055 (package
9056 (name "python-vobject")
9bed9b15 9057 (version "0.9.2")
eed1a61f
LF
9058 (source (origin
9059 (method url-fetch)
9060 (uri (pypi-uri "vobject" version))
9061 (sha256
9062 (base32
9bed9b15 9063 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9064 (build-system python-build-system)
a9871b7b
LF
9065 (arguments
9066 '(;; The test suite relies on some non-portable Windows interfaces.
9067 #:tests? #f))
f22efa01 9068 (propagated-inputs
eed1a61f
LF
9069 `(("python-dateutil-2" ,python-dateutil-2)
9070 ("python-pyicu" ,python-pyicu)))
9071 (synopsis "Parse and generate vCard and vCalendar files")
9072 (description "Vobject is intended to be a full featured Python package for
9073parsing and generating vCard and vCalendar files. Currently, iCalendar files
9074are supported and well tested. vCard 3.0 files are supported, and all data
9075should be imported, but only a few components are understood in a sophisticated
9076way.")
9077 (home-page "http://eventable.github.io/vobject/")
f210e944 9078 (license license:asl2.0)))
eed1a61f
LF
9079
9080(define-public python2-vobject
f210e944 9081 (package-with-python2 python-vobject))
cedac813
LF
9082
9083(define-public python-munkres
9084 (package
9085 (name "python-munkres")
9086 (version "1.0.7")
9087 (source (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "munkres" version))
9090 (sha256
9091 (base32
9092 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9093 (build-system python-build-system)
9094 (arguments
9095 '(#:tests? #f)) ; no test suite
9096 (home-page "http://software.clapper.org/munkres/")
9097 (synopsis "Implementation of the Munkres algorithm")
9098 (description "The Munkres module provides an implementation of the Munkres
9099algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9100useful for solving the Assignment Problem.")
3f641af0 9101 (license license:bsd-3)))
cedac813
LF
9102
9103(define-public python2-munkres
9104 (package-with-python2 python-munkres))
f3b3d78f
LF
9105
9106(define-public python-flask
9107 (package
9108 (name "python-flask")
9109 (version "0.10.1")
9110 (source (origin
9111 (method url-fetch)
9112 (uri (pypi-uri "Flask" version))
9113 (sha256
9114 (base32
9115 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9116 (build-system python-build-system)
9117 (propagated-inputs
9118 `(("python-itsdangerous" ,python-itsdangerous)
9119 ("python-jinja2" ,python-jinja2)
9120 ("python-werkzeug" ,python-werkzeug)))
9121 (home-page "https://github.com/mitsuhiko/flask/")
9122 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9123 (description "Flask is a micro web framework based on the Werkzeug toolkit
9124and Jinja2 template engine. It is called a micro framework because it does not
9125presume or force a developer to use a particular tool or library.")
f210e944 9126 (license license:bsd-3)))
f3b3d78f
LF
9127
9128(define-public python2-flask
f210e944 9129 (package-with-python2 python-flask))
603d665b
LF
9130
9131(define-public python-cookies
9132 (package
9133 (name "python-cookies")
9134 (version "2.2.1")
9135 (source (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "cookies" version))
9138 (sha256
9139 (base32
9140 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9141 (build-system python-build-system)
9142 (arguments
9143 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9144 #:tests? #f))
9145 (native-inputs
9146 `(("python-pytest" ,python2-pytest)))
9147 (synopsis "HTTP cookie parser and renderer")
9148 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9149Python.")
9150 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9151 (license license:expat)))
603d665b
LF
9152
9153(define-public python2-cookies
f210e944 9154 (package-with-python2 python-cookies))
0efde7d6
LF
9155
9156(define-public python-responses
9157 (package
9158 (name "python-responses")
9159 (version "0.5.1")
9160 (source (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "responses" version))
9163 (sha256
9164 (base32
9165 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9166 (build-system python-build-system)
9167 (arguments
9168 `(;; Test suite is not distributed:
9169 ;; https://github.com/getsentry/responses/issues/38
9170 #:tests? #f))
9171 (native-inputs
d8ea5f2f 9172 `(("python-mock" ,python-mock)))
0efde7d6
LF
9173 (propagated-inputs
9174 `(("python-requests" ,python-requests)
d8ea5f2f 9175 ("python-cookies" ,python-cookies)
0efde7d6
LF
9176 ("python-six" ,python-six)))
9177 (home-page "https://github.com/getsentry/responses")
9178 (synopsis "Utility for mocking out the `requests` Python library")
9179 (description "A utility library for mocking out the `requests` Python
9180library.")
f210e944 9181 (license license:asl2.0)))
0efde7d6
LF
9182
9183(define-public python2-responses
f210e944 9184 (package-with-python2 python-responses))
76b94885 9185
b7afd018
RW
9186(define-public python-whoosh
9187 (package
9188 (name "python-whoosh")
9189 (version "2.7.4")
9190 (source
9191 (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "Whoosh" version))
9194 (sha256
9195 (base32
9196 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9197 (build-system python-build-system)
9198 (native-inputs
f3b98f4f 9199 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9200 (home-page "http://bitbucket.org/mchaput/whoosh")
9201 (synopsis "Full text indexing, search, and spell checking library")
9202 (description
9203 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9204checking library.")
9205 (license license:bsd-2)))
9206
9207(define-public python2-whoosh
9208 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9209 (package (inherit whoosh)
9210 (propagated-inputs
9211 `(("python2-backport-ssl-match-hostname"
9212 ,python2-backport-ssl-match-hostname)
9213 ,@(package-propagated-inputs whoosh))))))
9214
76b94885
LF
9215(define-public python-pathlib
9216 (package
9217 (name "python-pathlib")
9218 (version "1.0.1")
9219 (source (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "pathlib" version))
9222 (sha256
9223 (base32
9224 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9225 (build-system python-build-system)
92a312dc
RW
9226 ;; The tests depend on the internal "test" module, which does not provide
9227 ;; a stable interface.
9228 (arguments `(#:tests? #f))
76b94885 9229 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9230 (synopsis "Object-oriented file system paths")
9231 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9232It offers the following advantages over using string objects:
9233
9234@enumerate
9235@item No more cumbersome use of os and os.path functions. Everything can
9236be done easily through operators, attribute accesses, and method calls.
9237@item Embodies the semantics of different path types. For example,
9238comparing Windows paths ignores casing.
9239@item Well-defined semantics, eliminating any inconsistencies or
9240ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9241@end enumerate
9242
9243Note: In Python 3.4, pathlib is now part of the standard library. For other
9244Python versions please consider python-pathlib2 instead, which tracks the
9245standard library module. This module (python-pathlib) isn't maintained
9246anymore.")
76b94885
LF
9247 (license license:expat)))
9248
9249(define-public python2-pathlib
9250 (package-with-python2 python-pathlib))
25a7db0a 9251
b7703c81
HG
9252(define-public python2-pathlib2
9253 (package
9254 (name "python2-pathlib2")
9255 (version "2.1.0")
9256 (source (origin
9257 (method url-fetch)
9258 (uri (pypi-uri "pathlib2" version))
9259 (sha256
9260 (base32
9261 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9262 (build-system python-build-system)
49a531f5
HG
9263 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9264 ;; version is 3.4 which already includes this package as part of the
9265 ;; standard library.
b7703c81
HG
9266 (arguments
9267 `(#:python ,python-2))
9268 (native-inputs
f3b98f4f 9269 `(("python2-six" ,python2-six)))
b7703c81
HG
9270 (home-page "http://pypi.python.org/pypi/pathlib2/")
9271 (synopsis "Object-oriented file system paths - backport of standard
9272pathlib module")
9273 (description "The goal of pathlib2 is to provide a backport of standard
9274pathlib module which tracks the standard library module, so all the newest
9275features of the standard pathlib can be used also on older Python versions.
9276
9277Pathlib offers a set of classes to handle file system paths. It offers the
9278following advantages over using string objects:
9279
9280@enumerate
9281@item No more cumbersome use of os and os.path functions. Everything can
9282be done easily through operators, attribute accesses, and method calls.
9283@item Embodies the semantics of different path types. For example,
9284comparing Windows paths ignores casing.
9285@item Well-defined semantics, eliminating any inconsistencies or
9286ambiguities (forward vs. backward slashes, etc.).
9287@end enumerate")
9288 (license license:expat)))
9289
25a7db0a
LF
9290(define-public python-jellyfish
9291 (package
9292 (name "python-jellyfish")
9293 (version "0.5.3")
9294 (source (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "jellyfish" version))
9297 (sha256
9298 (base32
9299 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9300 (build-system python-build-system)
9301 (native-inputs
9302 `(("python-pytest" ,python-pytest)))
9303 (home-page "https://github.com/jamesturk/jellyfish")
9304 (synopsis "Approximate and phonetic matching of strings")
9305 (description "Jellyfish uses a variety of string comparison and phonetic
9306encoding algorithms to do fuzzy string matching.")
3f641af0 9307 (license license:bsd-2)
25a7db0a
LF
9308 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9309
9310(define-public python2-jellyfish
9311 (let ((jellyfish (package-with-python2
9312 (strip-python2-variant python-jellyfish))))
9313 (package (inherit jellyfish)
00e10c6e 9314 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9315 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9316
9317(define-public python2-unicodecsv
9318 (package
9319 (name "python2-unicodecsv")
9320 (version "0.14.1")
9321 (source (origin
9322 (method url-fetch)
9323 ;; The test suite is not included in the PyPi release.
9324 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9325 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9326 "archive/" version ".tar.gz"))
9327 (file-name (string-append name "-" version ".tar.gz"))
9328 (sha256
9329 (base32
9330 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9331 (build-system python-build-system)
9332 (arguments
9333 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9334 #:python ,python-2))
9335 (native-inputs
f3b98f4f 9336 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9337 (home-page "https://github.com/jdunck/python-unicodecsv")
9338 (synopsis "Unicode CSV module for Python 2")
9339 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9340module, adding support for Unicode strings.")
3f641af0 9341 (license license:bsd-2)))
064503aa
LF
9342
9343(define-public python-rarfile
9344 (package
9345 (name "python-rarfile")
9346 (version "2.7")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "rarfile" version))
9350 (sha256
9351 (base32
9352 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9353 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9354 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9355 (build-system python-build-system)
9356 (arguments
9357 '(#:phases
9358 (modify-phases %standard-phases
9359 (replace 'check
9360 ;; Many tests fail, but the installation proceeds.
9361 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9362 (native-inputs
9363 `(("which" ,which))) ; required for tests
9364 (propagated-inputs
9365 `(("libarchive" ,libarchive)))
9366 (home-page "https://github.com/markokr/rarfile")
9367 (synopsis "RAR archive reader for Python")
9368 (description "This is Python module for RAR archive reading. The interface
9369is made as zipfile like as possible.")
3f641af0 9370 (license license:isc)))
064503aa
LF
9371
9372(define-public python2-rarfile
9373 (package-with-python2 python-rarfile))
daeeea71
CM
9374
9375(define-public python-magic
9376 (package
9377 (name "python-magic")
9378 (version "0.4.3")
9379 (source
9380 (origin
9381 (method url-fetch)
9382 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9383 version ".tar.gz"))
9384 (sha256
9385 (base32
9386 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9387 (file-name (string-append name "-" version "-checkout"))))
9388 (build-system python-build-system)
9389 (arguments
9390 ;; The tests are unreliable, so don't run them. The tests fail
9391 ;; under Python3 because they were written for Python2 and
9392 ;; contain import statements that do not work in Python3. One of
9393 ;; the tests fails under Python2 because its assertions are
9394 ;; overly stringent; it relies on comparing output strings which
9395 ;; are brittle and can change depending on the version of
9396 ;; libmagic being used and the system on which the test is
9397 ;; running. In my case, under GuixSD 0.10.0, only one test
9398 ;; failed, and it seems to have failed only because the version
9399 ;; of libmagic that is packaged in Guix outputs a slightly
9400 ;; different (but not wrong) string than the one that the test
9401 ;; expected.
9402 '(#:tests? #f
9403 #:phases (modify-phases %standard-phases
9404 ;; Replace a specific method call with a hard-coded
9405 ;; path to the necessary libmagic.so file in the
9406 ;; store. If we don't do this, then the method call
9407 ;; will fail to find the libmagic.so file, which in
9408 ;; turn will cause any application using
9409 ;; python-magic to fail.
9410 (add-before 'build 'hard-code-path-to-libmagic
9411 (lambda* (#:key inputs #:allow-other-keys)
9412 (let ((file (assoc-ref inputs "file")))
9413 (substitute* "magic.py"
9414 (("ctypes.util.find_library\\('magic'\\)")
9415 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9416 #t)))
9417 (add-before 'install 'disable-egg-compression
9418 (lambda _
9419 (let ((port (open-file "setup.cfg" "a")))
9420 (display "\n[easy_install]\nzip_ok = 0\n"
9421 port)
9422 (close-port port)
9423 #t))))))
daeeea71
CM
9424 (inputs
9425 ;; python-magic needs to be able to find libmagic.so.
9426 `(("file" ,file)))
9427 (home-page "https://github.com/ahupp/python-magic")
9428 (synopsis "File type identification using libmagic")
9429 (description
9430 "This module uses ctypes to access the libmagic file type
9431identification library. It makes use of the local magic database and
9432supports both textual and MIME-type output. Note that this module and
9433the python-file module both provide a \"magic.py\" file; these two
9434modules, which are different and were developed separately, both serve
9435the same purpose: to provide Python bindings for libmagic.")
9436 (license license:expat)))
9437
9438(define-public python2-magic
9439 (package-with-python2 python-magic))
12af303f
CM
9440
9441(define-public python2-s3cmd
9442 (package
9443 (name "python2-s3cmd")
9444 (version "1.6.1")
9445 (source
9446 (origin
9447 (method url-fetch)
de67e922 9448 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9449 "s3cmd-" version ".tar.gz"))
9450 (sha256
9451 (base32
9452 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9453 (build-system python-build-system)
9454 (arguments
9455 ;; s3cmd is written for python2 only and contains no tests.
9456 `(#:python ,python-2
9457 #:tests? #f))
f22efa01 9458 (propagated-inputs
12af303f
CM
9459 `(("python2-dateutil" ,python2-dateutil)
9460 ;; The python-file package also provides a magic.py module.
9461 ;; This is an unfortunate state of affairs; however, s3cmd
9462 ;; fails to install if it cannot find specifically the
9463 ;; python-magic package. Thus we include it, instead of using
9464 ;; python-file. Ironically, s3cmd sometimes works better
9465 ;; without libmagic bindings at all:
9466 ;; https://github.com/s3tools/s3cmd/issues/198
9467 ("python2-magic" ,python2-magic)))
9468 (home-page "http://s3tools.org/s3cmd")
9469 (synopsis "Command line tool for S3-compatible storage services")
9470 (description
9471 "S3cmd is a command line tool for uploading, retrieving and managing data
9472in storage services that are compatible with the Amazon Simple Storage
9473Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9474GnuPG encryption, and more. It also supports management of Amazon's
9475CloudFront content delivery network.")
3f641af0 9476 (license license:gpl2+)))
4323a5f0
AE
9477
9478(define-public python-pkgconfig
9479 (package
9480 (name "python-pkgconfig")
9481 (version "1.1.0")
9482 (source
9483 (origin
9484 (method url-fetch)
9485 (uri (pypi-uri "pkgconfig" version))
9486 (sha256
9487 (base32
9488 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9489 (build-system python-build-system)
9490 (native-inputs
f3b98f4f 9491 `(("python-nose" ,python-nose)))
4323a5f0
AE
9492 (inputs
9493 `(("pkg-config" ,pkg-config)))
9494 (arguments
9495 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9496 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9497 #:tests? #f
4323a5f0
AE
9498 ;; Hard-code the path to pkg-config.
9499 #:phases
9500 (modify-phases %standard-phases
9501 (add-before
9502 'build 'patch
9503 (lambda _
9504 (substitute* "pkgconfig/pkgconfig.py"
9505 (("cmd = 'pkg-config")
9506 (string-append "cmd = '" (which "pkg-config"))))
9507 #t)))))
9508 (home-page "http://github.com/matze/pkgconfig")
9509 (synopsis "Python interface for pkg-config")
9510 (description "This module provides a Python interface to pkg-config. It
9511can be used to find all pkg-config packages, check if a package exists,
9512check if a package meets certain version requirements, query CFLAGS and
9513LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9514 (license license:expat)))
4323a5f0
AE
9515
9516(define-public python2-pkgconfig
9517 (package-with-python2 python-pkgconfig))
9518
2e697322
BW
9519(define-public python-bz2file
9520 (package
9521 (name "python-bz2file")
9522 (version "0.98")
9523 (source
9524 (origin
9525 (method url-fetch)
9526 (uri (pypi-uri "bz2file" version))
9527 (sha256
9528 (base32
9529 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9530 (build-system python-build-system)
9531 (arguments
124df723 9532 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9533 (home-page "https://github.com/nvawda/bz2file")
9534 (synopsis "Read and write bzip2-compressed files")
9535 (description
9536 "Bz2file is a Python library for reading and writing bzip2-compressed
9537files. It contains a drop-in replacement for the I/O interface in the
9538standard library's @code{bz2} module, including features from the latest
9539development version of CPython that are not available in older releases.")
3f641af0 9540 (license license:asl2.0)
2e697322
BW
9541 (properties `((python2-variant . ,(delay python2-bz2file))))))
9542
9543(define-public python2-bz2file
9544 (let ((base (package-with-python2
9545 (strip-python2-variant python-bz2file))))
9546 (package
9547 (inherit base)
124df723 9548 (arguments
752bb447
BW
9549 `(#:python ,python-2
9550 #:phases
124df723
BW
9551 (modify-phases %standard-phases
9552 ;; 'python setup.py test' does not work as of 0.98.
9553 ;; There is only the one test file, so we run it directly.
9554 (replace 'check
9555 (lambda _ (zero? (system* "python"
9556 "test_bz2file.py"))))))))))
2e697322 9557
da4ac1aa
BW
9558(define-public python-future
9559 (package
9560 (name "python-future")
9561 (version "0.15.2")
9562 (source
9563 (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "future" version))
9566 (sha256
9567 (base32
9568 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9569 (build-system python-build-system)
9570 ;; Many tests connect to the network or are otherwise flawed.
9571 ;; https://github.com/PythonCharmers/python-future/issues/210
9572 (arguments
9573 `(#:tests? #f))
9574 (home-page "http://python-future.org")
9575 (synopsis "Single-source support for Python 3 and 2")
9576 (description
9577 "@code{python-future} is the missing compatibility layer between Python 2 and
9578Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9579to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9580 (license license:expat)))
da4ac1aa
BW
9581
9582(define-public python2-future
f210e944 9583 (package-with-python2 python-future))
da4ac1aa 9584
8e451885
AE
9585(define-public python-cysignals
9586 (package
9587 (name "python-cysignals")
9588 (version "1.1.0")
9589 (source
9590 (origin
9591 (method url-fetch)
9592 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9593 (sha256
9594 (base32
9595 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9596 (build-system python-build-system)
9597 (native-inputs
9598 `(("python-cython" ,python-cython)
8e451885
AE
9599 ("python-sphinx" ,python-sphinx)))
9600 (inputs
9601 `(("pari-gp" ,pari-gp)))
9602 (arguments
9603 `(#:modules ((guix build python-build-system)
9604 ((guix build gnu-build-system) #:prefix gnu:)
9605 (guix build utils))
9606 ;; FIXME: Tests are executed after installation and currently fail
9607 ;; when not installing into standard locations; the author is working
9608 ;; on a fix.
9609 #:tests? #f
9610 #:phases
9611 (modify-phases %standard-phases
9612 (add-before
9613 'build 'configure
9614 (assoc-ref gnu:%standard-phases 'configure)))))
9615 (home-page
9616 "https://github.com/sagemath/cysignals")
9617 (synopsis
9618 "Handling of interrupts and signals for Cython")
9619 (description
9620 "The cysignals package provides mechanisms to handle interrupts (and
9621other signals and errors) in Cython code, using two related approaches,
9622for mixed Cython/Python code or external C libraries and pure Cython code,
9623respectively.")
3f641af0 9624 (license license:lgpl3+)))
8e451885
AE
9625
9626(define-public python2-cysignals
9627 (package-with-python2 python-cysignals))
9628
63bcec71
DM
9629(define-public python2-shedskin
9630 (package
9631 (name "python2-shedskin")
9632 (version "0.9.4")
9633 (source
9634 (origin
9635 (method url-fetch)
9636 (uri (string-append "https://github.com/shedskin/shedskin/"
9637 "releases/download/v" version
9638 "/shedskin-" version ".tgz"))
9639 (sha256
9640 (base32
9641 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9642 (build-system python-build-system)
9643 (arguments
9644 `(#:python ,python-2
9645 #:phases (modify-phases %standard-phases
9646 (add-after 'unpack 'fix-resulting-include-libs
9647 (lambda* (#:key inputs #:allow-other-keys)
9648 (let ((libgc (assoc-ref inputs "libgc"))
9649 (pcre (assoc-ref inputs "pcre")))
9650 (substitute* "shedskin/makefile.py"
9651 (("variable == 'CCFLAGS':[ ]*")
9652 (string-append "variable == 'CCFLAGS':\n"
9653 " line += ' -I " pcre "/include"
9654 " -I " libgc "/include'"))
9655 (("variable == 'LFLAGS':[ ]*")
9656 (string-append "variable == 'LFLAGS':\n"
9657 " line += ' -L" pcre "/lib"
9658 " -L " libgc "/lib'")))
9659 #t))))))
63bcec71
DM
9660 (inputs `(("pcre" ,pcre)
9661 ("libgc" ,libgc)))
9662 (home-page "https://shedskin.github.io/")
9663 (synopsis "Experimental Python-2 to C++ Compiler")
9664 (description (string-append "This is an experimental compiler for a subset of
9665Python. It generates C++ code and a Makefile."))
3f641af0 9666 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9667
9668(define-public python2-rope
9669 (package
9670 (name "python2-rope")
9671 (version "0.10.3")
9672 (source
9673 (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "rope" version))
9676 (sha256
9677 (base32
9678 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9679 (arguments
9680 ;; Rope is currently python-2 only.
9681 ;; https://github.com/python-rope/rope/issues/57
9682 `(#:python ,python-2))
9683 (build-system python-build-system)
9684 (native-inputs
f3b98f4f 9685 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9686 (home-page "https://github.com/python-rope/rope")
9687 (synopsis "Refactoring library for Python")
9688 (description "Rope is a refactoring library for Python. It facilitates
9689the renaming, moving and extracting of attributes, functions, modules, fields
9690and parameters in Python 2 source code. These refactorings can also be applied
9691to occurences in strings and comments.")
3f641af0 9692 (license license:gpl2)))
6ba8ca17
9693
9694(define-public python-py3status
9695 (package
9696 (name "python-py3status")
d2262d70 9697 (version "3.1")
6ba8ca17
9698 (source
9699 (origin
9700 (method url-fetch)
9701 (uri (pypi-uri "py3status" version))
9702 (sha256
9703 (base32
d2262d70 9704 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9705 (build-system python-build-system)
6ba8ca17
9706 (home-page "https://github.com/ultrabug/py3status")
9707 (synopsis "Extensible i3status wrapper written in Python")
9708 (description "py3status is an i3status wrapper which extends i3status
9709functionality in a modular way, allowing you to extend your panel with your
9710own code, responding to click events and updating clock every second.")
3f641af0 9711 (license license:bsd-3)))
b8fdbca3
HG
9712
9713(define-public python-tblib
9714 (package
9715 (name "python-tblib")
9716 (version "1.3.0")
9717 (source (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "tblib" version))
9720 (sha256 (base32
9721 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9722 (build-system python-build-system)
9723 (arguments
9724 `(#:phases
9725 (modify-phases %standard-phases
9726 (replace 'check
9727 (lambda _
9728 ;; Upstream runs tests after installation and the package itself
9729 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9730 ;; found.
9731 (setenv "PYTHONPATH"
9732 (string-append (getcwd) "/build/lib:"
9733 (getenv "PYTHONPATH")))
9734 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9735 (native-inputs
9736 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9737 ("python-six" ,python-six)))
9738 (home-page "https://github.com/ionelmc/python-tblib")
9739 (synopsis "Traceback serialization library")
9740 (description
9741 "Traceback serialization allows you to:
9742
9743@enumerate
9744@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9745different processes. This allows better error handling when running code over
9746multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9747
9748@item Parse traceback strings and raise with the parsed tracebacks.
9749@end itemize")
3f641af0 9750 (license license:bsd-3)))
b8fdbca3
HG
9751
9752(define-public python2-tblib
9753 (package-with-python2 python-tblib))
1a024de4
HG
9754
9755(define-public python-sqlparse
9756 (package
9757 (name "python-sqlparse")
9758 (version "0.1.19")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "sqlparse" version))
9762 (sha256
9763 (base32
9764 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9765 (build-system python-build-system)
9766 (arguments
9767 `(#:phases
9768 (modify-phases %standard-phases
9769 (replace 'check
9770 (lambda* _
9771 ;; setup.py-integrated 2to3 only affects the build files, but
9772 ;; py.test is using the source files. So we need to convert them
9773 ;; manually.
9774 (when (zero? (system* "python3"))
9775 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9776 (zero? (system* "py.test")))))))
9777 (native-inputs
f3b98f4f 9778 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9779 (home-page "https://github.com/andialbrecht/sqlparse")
9780 (synopsis "Non-validating SQL parser")
9781 (description "Sqlparse is a non-validating SQL parser for Python. It
9782provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9783 (license license:bsd-3)))
1a024de4
HG
9784
9785(define-public python2-sqlparse
9786 (package-with-python2 python-sqlparse))
68b9d242
SB
9787
9788(define-public python-greenlet
9789 (package
9790 (name "python-greenlet")
9791 (version "0.4.9")
9792 (source (origin
9793 (method url-fetch)
9794 (uri (pypi-uri "greenlet" version))
9795 (sha256
9796 (base32
9797 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9798 (build-system python-build-system)
68b9d242
SB
9799 (home-page "https://greenlet.readthedocs.io/")
9800 (synopsis "Lightweight in-process concurrent programming")
9801 (description
9802 "Greenlet package is a spin-off of Stackless, a version of CPython
9803that supports micro-threads called \"tasklets\". Tasklets run
9804pseudo-concurrently (typically in a single or a few OS-level threads) and
9805are synchronized with data exchanges on \"channels\".")
3f641af0 9806 (license (list license:psfl license:expat))))
68b9d242
SB
9807
9808(define-public python2-greenlet
9809 (package-with-python2 python-greenlet))
d79a343b
SB
9810
9811(define-public python-gevent
9812 (package
9813 (name "python-gevent")
9814 (version "1.1.1")
9815 (source (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "gevent" version))
9818 (sha256
9819 (base32
9820 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9821 (modules '((guix build utils)))
9822 (snippet
9823 '(begin
9824 ;; unbunding libev and c-ares
9825 (for-each delete-file-recursively '("libev" "c-ares"))
9826 ;; fixing testsuite
9827 (call-with-output-file "greentest/__init__.py" noop)
9828 (substitute* "greentest/testrunner.py"
9829 (("import util") "from . import util")
9830 (("from util import log") "from .util import log"))))))
9831 (build-system python-build-system)
9832 (propagated-inputs
9833 `(("python-greenlet" ,python-greenlet)))
9834 (native-inputs
f3b98f4f 9835 `(("python-six" ,python-six)))
d79a343b
SB
9836 (inputs
9837 `(("c-ares" ,c-ares)
9838 ("libev" ,libev)))
9839 (home-page "http://www.gevent.org/")
9840 (synopsis "Coroutine-based network library")
9841 (description
9842 "gevent is a coroutine-based Python networking library that uses greenlet
9843to provide a high-level synchronous API on top of the libev event loop.")
9844 (license license:expat)))
9845
9846(define-public python2-gevent
9847 (package-with-python2 python-gevent))
da3aeeb6
SB
9848
9849(define-public python-twisted
9850 (package
9851 (name "python-twisted")
9852 (version "16.2.0")
9853 (source (origin
9854 (method url-fetch)
8ea8e8d3 9855 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9856 (sha256
9857 (base32
9858 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9859 (build-system python-build-system)
45912170
SB
9860 (propagated-inputs
9861 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9862 (home-page "https://twistedmatrix.com/")
9863 (synopsis "Asynchronous networking framework written in Python")
9864 (description
9865 "Twisted is an extensible framework for Python programming, with special
9866focus on event-based network programming and multiprotocol integration.")
9867 (license license:expat)))
9868
9869(define-public python2-twisted
9870 (package-with-python2 python-twisted))
d0b6fed6 9871
4d3fa5a4
EF
9872(define-public python-pika
9873 (package
9874 (name "python-pika")
9875 (version "0.10.0")
9876 (source
9877 (origin
9878 (method url-fetch)
9879 (uri (pypi-uri "pika" version))
9880 (sha256
9881 (base32
9882 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9883 (build-system python-build-system)
9884 (native-inputs
269d9172
LF
9885 `(("python-pyev" ,python-pyev)
9886 ("python-tornado" ,python-tornado)
9887 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
9888 (home-page "https://pika.readthedocs.org")
9889 (synopsis "Pure Python AMQP Client Library")
9890 (description
9891 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9892Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9893network support library.")
9894 (license license:bsd-3)))
9895
9896(define-public python2-pika
9897 (package-with-python2 python-pika))
9898
d0b6fed6
DM
9899(define-public python-ply
9900 (package
9901 (name "python-ply")
9902 (version "3.8")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (string-append
9907 "https://pypi.python.org/packages/"
9908 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9909 "/ply-" version ".tar.gz"))
9910 (sha256
9911 (base32
9912 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9913 (build-system python-build-system)
9914 (home-page "http://www.dabeaz.com/ply/")
9915 (synopsis "Python Lex & Yacc")
9916 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9917It uses LR parsing and does extensive error checking.")
f210e944 9918 (license license:bsd-3)))
d0b6fed6
DM
9919
9920(define-public python2-ply
f210e944 9921 (package-with-python2 python-ply))
d951bd54
SB
9922
9923(define-public python-tabulate
9924 (package
9925 (name "python-tabulate")
9926 (version "0.7.5")
9927 (source (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "tabulate" version))
9930 (sha256
9931 (base32
9932 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9933 ;; Fix tests
9934 (modules '((guix build utils)))
9935 (snippet '(substitute* '("test/test_cli.py"
9936 "test/test_input.py"
9937 "test/test_output.py"
9938 "test/test_regression.py")
9939 (("from common") "from nose.tools")))))
9940 (build-system python-build-system)
9941 (native-inputs
f3b98f4f 9942 `(;; For testing
d951bd54
SB
9943 ("python-nose" ,python-nose)))
9944 (home-page "https://bitbucket.org/astanin/python-tabulate")
9945 (synopsis "Pretty-print tabular data")
9946 (description
9947 "Tabulate is a library and command-line utility to pretty-print tabular
9948data in Python.")
9949 (license license:expat)))
9950
9951(define-public python2-tabulate
9952 (package-with-python2 python-tabulate))
1c4c8a33
SB
9953
9954(define-public python-kazoo
9955 (package
9956 (name "python-kazoo")
9957 (version "2.2.1")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "kazoo" version))
9962 (sha256
9963 (base32
9964 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9965 (build-system python-build-system)
9966 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
9967 (propagated-inputs
9968 `(("python-six" ,python-six)))
1c4c8a33
SB
9969 (home-page "https://kazoo.readthedocs.org")
9970 (synopsis "High-level Zookeeper client library")
9971 (description
9972 "Kazoo is a Python client library for the Apache Zookeeper distributed
9973application service. It is designed to be easy to use and to avoid common
9974programming errors.")
3f641af0 9975 (license license:asl2.0)))
1c4c8a33
SB
9976
9977(define-public python2-kazoo
9978 (package-with-python2 python-kazoo))
45dda35e
SB
9979
9980(define-public python-pykafka
9981 (package
9982 (name "python-pykafka")
9983 (version "2.4.0")
9984 (source (origin
9985 (method url-fetch)
c6bccf71
EF
9986 (uri (string-append
9987 "https://pypi.python.org/packages/8b/3e/"
9988 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9989 "pykafka-" version ".tar.gz"))
45dda35e
SB
9990 (sha256
9991 (base32
9992 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9993 (build-system python-build-system)
9994 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 9995 (propagated-inputs
45dda35e
SB
9996 `(("python-gevent" ,python-gevent)
9997 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9998 ("python-tabulate" ,python-tabulate)))
9999 (inputs
10000 `(("librdkafka" ,librdkafka)))
10001 (home-page "https://pykafka.readthedocs.io/")
10002 (synopsis "Apache Kafka client for Python")
10003 (description
10004 "PyKafka is a client for the Apache Kafka distributed messaging system.
10005It includes Python implementations of Kafka producers and consumers, which
10006are optionally backed by a C extension built on librdkafka.")
3f641af0 10007 (license license:asl2.0)))
45dda35e
SB
10008
10009(define-public python2-pykafka
10010 (package-with-python2 python-pykafka))
a44fd439
DM
10011
10012(define-public python-wcwidth
10013 (package
10014 (name "python-wcwidth")
10015 (version "0.1.6")
10016 (source
10017 (origin
10018 (method url-fetch)
10019 (uri (string-append
10020 "https://pypi.python.org/packages/"
10021 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10022 "wcwidth-" version ".tar.gz"))
10023 (sha256
10024 (base32
10025 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10026 (build-system python-build-system)
10027 (home-page "https://github.com/jquast/wcwidth")
66e07664 10028 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10029 (description "Wcwidth measures the number of terminal column cells of
10030wide-character codes. It is useful for those implementing a terminal emulator,
10031or programs that carefully produce output to be interpreted by one. It is a
10032Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10033specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10034 (license license:expat)))
a44fd439
DM
10035
10036(define-public python2-wcwidth
f210e944 10037 (package-with-python2 python-wcwidth))
0de78c95
DP
10038
10039(define-public python2-jsonrpclib
10040 (package
10041 (name "python2-jsonrpclib")
10042 (version "0.1.7")
10043 (source (origin
10044 (method url-fetch)
10045 (uri (string-append
10046 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10047 "jsonrpclib-" version ".tar.gz"))
10048 (sha256
10049 (base32
10050 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10051 (build-system python-build-system)
0de78c95
DP
10052 (arguments
10053 `(#:tests? #f
10054 #:python ,python-2))
10055 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10056 (synopsis "Implementation of JSON-RPC specification for Python")
10057 (description
10058 "This library is an implementation of the JSON-RPC specification.
10059It supports both the original 1.0 specification, as well as the
10060new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10061etc.")
3f641af0 10062 (license license:asl2.0)))
9250b0f3
SB
10063
10064(define-public python-chai
10065 (package
10066 (name "python-chai")
10067 (version "1.1.1")
10068 (source (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "chai" version))
10071 (sha256
10072 (base32
10073 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10074 (build-system python-build-system)
9250b0f3
SB
10075 (home-page "https://github.com/agoragames/chai")
10076 (synopsis "Mocking framework for Python")
10077 (description
10078 "Chai provides an api for mocking, stubbing and spying your python
10079objects, patterned after the Mocha library for Ruby.")
3f641af0 10080 (license license:bsd-3)))
9250b0f3
SB
10081
10082(define-public python2-chai
10083 (package-with-python2 python-chai))
10084
ae43baa8
SB
10085(define-public python-arrow
10086 (package
10087 (name "python-arrow")
10088 (version "0.8.0")
10089 (source (origin
10090 (method url-fetch)
10091 (uri (pypi-uri "arrow" version))
10092 (sha256
10093 (base32
10094 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10095 (build-system python-build-system)
10096 (native-inputs
f3b98f4f 10097 `(;; For testing
ae43baa8
SB
10098 ("python-chai" ,python-chai)
10099 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10100 (propagated-inputs
10101 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10102 (home-page "https://github.com/crsmithdev/arrow/")
10103 (synopsis "Dates and times for Python")
10104 (description
10105 "Arrow is a Python library to creating, manipulating, formatting and
10106converting dates, times, and timestamps. It implements and updates the
10107datetime type.")
3f641af0 10108 (license license:asl2.0)))
ae43baa8
SB
10109
10110(define-public python2-arrow
10111 (package-with-python2 python-arrow))
10112
1f2b62a4
SB
10113(define-public python-inflection
10114 (package
10115 (name "python-inflection")
10116 (version "0.3.1")
10117 (source
10118 (origin (method url-fetch)
10119 (uri (pypi-uri "inflection" version))
10120 (sha256
10121 (base32
10122 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10123 (build-system python-build-system)
1f2b62a4
SB
10124 (home-page "http://github.com/jpvanhal/inflection")
10125 (synopsis "Python string transformation library")
10126 (description
10127 "Inflection is a string transformation library. It singularizes
10128and pluralizes English words, and transforms strings from CamelCase to
10129underscored string.")
10130 (license license:expat)))
10131
10132(define-public python2-inflection
10133 (package-with-python2 python-inflection))
10134
18995566
SB
10135(define-public python-pylev
10136 (package
10137 (name "python-pylev")
10138 (version "1.3.0")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "pylev" version))
10142 (sha256
10143 (base32
10144 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10145 (build-system python-build-system)
18995566
SB
10146 (home-page "http://github.com/toastdriven/pylev")
10147 (synopsis "Levenshtein distance implementation in Python")
10148 (description "Pure Python Levenshtein implementation, based off the
10149Wikipedia code samples at
10150@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10151 (license license:bsd-3)))
18995566
SB
10152
10153(define-public python2-pylev
10154 (package-with-python2 python-pylev))
10155
f5deff7a
SB
10156(define-public python-cleo
10157 (package
10158 (name "python-cleo")
10159 (version "0.4.1")
10160 (source (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "cleo" version))
10163 (sha256
10164 (base32
10165 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10166 (build-system python-build-system)
10167 (native-inputs
f3b98f4f 10168 `(;; For testing
f5deff7a
SB
10169 ("python-mock" ,python-mock)
10170 ("python-pytest" ,python-pytest)))
9403150a
SB
10171 (propagated-inputs
10172 `(("python-psutil" ,python-psutil)
10173 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10174 (home-page "https://github.com/sdispater/cleo")
10175 (synopsis "Command-line arguments library for Python")
10176 (description
10177 "Cleo allows you to create command-line commands with signature in
10178docstring and colored output.")
10179 (license license:expat)))
10180
10181(define-public python2-cleo
10182 (package-with-python2 python-cleo))
10183
77cadb43
SB
10184(define-public python-lazy-object-proxy
10185 (package
10186 (name "python-lazy-object-proxy")
10187 (version "1.2.2")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (pypi-uri "lazy-object-proxy" version))
10191 (sha256
10192 (base32
10193 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10194 (build-system python-build-system)
77cadb43
SB
10195 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10196 (synopsis "Lazy object proxy for python")
10197 (description
10198 "Lazy object proxy is an object that wraps a callable but defers the call
10199until the object is actually required, and caches the result of said call.")
3f641af0 10200 (license license:bsd-2)))
77cadb43
SB
10201
10202(define-public python2-lazy-object-proxy
10203 (package-with-python2 python-lazy-object-proxy))
10204
5477e05f
SB
10205(define-public python-dnspython
10206 (package
10207 (name "python-dnspython")
6c514128 10208 (version "1.15.0")
5477e05f
SB
10209 (source (origin
10210 (method url-fetch)
10211 (uri (string-append "http://www.dnspython.org/kits/"
10212 version "/dnspython-" version ".tar.gz"))
10213 (sha256
10214 (base32
6c514128 10215 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10216 (build-system python-build-system)
10217 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10218 (home-page "http://www.dnspython.org")
10219 (synopsis "DNS toolkit for Python")
10220 (description
10221 "dnspython is a DNS toolkit for Python. It supports almost all record
10222types. It can be used for queries, zone transfers, and dynamic updates.
10223It supports TSIG authenticated messages and EDNS0.")
10224 (license license:expat)))
10225
10226(define-public python2-dnspython
10227 (package-with-python2 python-dnspython))
10228
22711e25
SB
10229(define-public python-email-validator
10230 (package
10231 (name "python-email-validator")
10232 (version "1.0.1")
10233 (source
10234 (origin (method url-fetch)
10235 (uri (pypi-uri "email_validator" version))
10236 (sha256
10237 (base32
10238 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10239 (build-system python-build-system)
10240 (arguments
10241 '(#:phases
10242 (modify-phases %standard-phases
10243 (add-before 'build 'use-dnspython
10244 (lambda _
10245 (substitute* "setup.py"
10246 (("dnspython3") "dnspython"))
10247 #t)))))
d42560bd 10248 (propagated-inputs
22711e25 10249 `(("python-dnspython" ,python-dnspython)
d42560bd 10250 ("python-idna" ,python-idna)))
22711e25
SB
10251 (home-page "https://github.com/JoshData/python-email-validator")
10252 (synopsis "Email address validation library for Python")
10253 (description
10254 "This library validates email address syntax and deliverability.")
3f641af0 10255 (license license:cc0)))
22711e25
SB
10256
10257(define-public python2-email-validator
10258 (package-with-python2 python-email-validator))
10259
8987d91e
SB
10260(define-public python-ukpostcodeparser
10261 (package
10262 (name "python-ukpostcodeparser")
10263 (version "1.0.3")
10264 (source (origin
10265 (method url-fetch)
10266 (uri (pypi-uri "UkPostcodeParser" version))
10267 (sha256
10268 (base32
10269 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10270 (build-system python-build-system)
8987d91e
SB
10271 (home-page "https://github.com/hamstah/ukpostcodeparser")
10272 (synopsis "UK Postcode parser for Python")
10273 (description
10274 "This library provides the @code{parse_uk_postcode} function for
10275parsing UK postcodes.")
10276 (license license:expat)))
10277
10278(define-public python2-ukpostcodeparser
10279 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10280
10281(define-public python-fake-factory
10282 (package
10283 (name "python-fake-factory")
7adc698f 10284 (version "0.7.2")
ea92ae01
SB
10285 (source (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "fake-factory" version))
10288 (sha256
10289 (base32
7adc698f 10290 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10291 (build-system python-build-system)
ea92ae01 10292 (native-inputs
f3b98f4f 10293 `(;; For testing
ea92ae01
SB
10294 ("python-email-validator" ,python-email-validator)
10295 ("python-mock" ,python-mock)
10296 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10297 (propagated-inputs
10298 `(("python-dateutil" ,python-dateutil-2)
10299 ("python-six" ,python-six)))
7adc698f 10300 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10301 (synopsis "Python package that generates fake data")
10302 (description
10303 "Faker is a Python package that generates fake data such as names,
10304addresses, and phone numbers.")
10305 (license license:expat)
10306 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10307
10308(define-public python2-fake-factory
10309 (let ((base (package-with-python2 (strip-python2-variant
10310 python-fake-factory))))
10311 (package
10312 (inherit base)
24c9aa18 10313 (propagated-inputs
ea92ae01 10314 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10315 ,@(package-propagated-inputs base))))))
ea92ae01 10316
b49504fd
SB
10317(define-public python-pyaml
10318 (package
10319 (name "python-pyaml")
10320 (version "15.8.2")
10321 (source (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "pyaml" version))
10324 (sha256
10325 (base32
10326 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10327 (build-system python-build-system)
b49504fd
SB
10328 (propagated-inputs
10329 `(("python-pyyaml" ,python-pyyaml)))
10330 (home-page "https://github.com/mk-fg/pretty-yaml")
10331 (synopsis "YAML pretty-print library for Python")
10332 (description
10333 "pyaml is a PyYAML based python module to produce pretty and readable
10334YAML-serialized data.")
3f641af0 10335 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10336
10337(define-public python2-pyaml
10338 (package-with-python2 python-pyaml))
10339
347175a2
SB
10340(define-public python-flexmock
10341 (package
10342 (name "python-flexmock")
10343 (version "0.10.2")
10344 (source (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "flexmock" version))
10347 (sha256
10348 (base32
10349 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10350 (build-system python-build-system)
347175a2
SB
10351 (home-page "https://flexmock.readthedocs.org")
10352 (synopsis "Testing library for Python")
10353 (description
10354 "flexmock is a testing library for Python that makes it easy to create
10355mocks, stubs and fakes.")
3f641af0 10356 (license license:bsd-3)))
347175a2
SB
10357
10358(define-public python2-flexmock
10359 (package-with-python2 python-flexmock))
10360
5a744191
SB
10361(define-public python-orator
10362 (package
10363 (name "python-orator")
10364 (version "0.8.2")
10365 (source (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "orator" version))
10368 (sha256
10369 (base32
10370 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10371 (build-system python-build-system)
10372 (arguments '(#:tests? #f)) ; no tests
b2676030 10373 (propagated-inputs
5a744191
SB
10374 `(("python-arrow" ,python-arrow)
10375 ("python-blinker" ,python-blinker)
10376 ("python-cleo" ,python-cleo)
10377 ("python-fake-factory" ,python-fake-factory)
10378 ("python-inflection" ,python-inflection)
10379 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10380 ("python-pyaml" ,python-pyaml)
5a744191
SB
10381 ("python-simplejson" ,python-simplejson)
10382 ("python-wrapt" ,python-wrapt)))
10383 (home-page "https://orator-orm.com/")
10384 (synopsis "ActiveRecord ORM for Python")
10385 (description
10386 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10387implementation for Python.")
10388 (license license:expat)
10389 (properties `((python2-variant . ,(delay python2-orator))))))
10390
10391(define-public python2-orator
10392 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10393 (package
10394 (inherit base)
06961617 10395 (propagated-inputs
5a744191 10396 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10397 ,@(package-propagated-inputs base))))))
f4155188
DM
10398
10399(define-public python-prompt-toolkit
10400 (package
10401 (name "python-prompt-toolkit")
d15e2ef0 10402 (version "1.0.7")
f4155188
DM
10403 (source
10404 (origin
10405 (method url-fetch)
d15e2ef0 10406 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10407 (sha256
10408 (base32
d15e2ef0 10409 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10410 (build-system python-build-system)
bae18710
LF
10411 (arguments
10412 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10413 (propagated-inputs
10414 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10415 ("python-six" ,python-six)
f22efa01 10416 ("python-pygments" ,python-pygments)))
f4155188
DM
10417 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10418 (synopsis "Library for building command line interfaces in Python")
10419 (description
10420 "Prompt-Toolkit is a library for building interactive command line
10421interfaces in Python. It's like GNU Readline but it also features syntax
10422highlighting while typing, out-of-the-box multi-line input editing, advanced
10423code completion, incremental search, support for Chinese double-width
10424characters, mouse support, and auto suggestions.")
f210e944 10425 (license license:bsd-3)))
f4155188
DM
10426
10427(define-public python2-prompt-toolkit
f210e944 10428 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10429
10430(define-public python-jedi
10431 (package
10432 (name "python-jedi")
10433 (version "0.9.0")
10434 (source
10435 (origin
10436 (method url-fetch)
10437 (uri (pypi-uri "jedi" version))
10438 (sha256
10439 (base32
10440 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10441 (build-system python-build-system)
10442 (home-page "https://github.com/davidhalter/jedi")
10443 (synopsis
10444 "Autocompletion for Python that can be used for text editors")
10445 (description
10446 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10447 (license license:expat)))
a502dfbf
DM
10448
10449(define-public python2-jedi
f210e944 10450 (package-with-python2 python-jedi))
c2f0dc6e
DM
10451
10452(define-public ptpython
10453 (package
10454 (name "ptpython")
10455 (version "0.34")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "ptpython" version))
10459 (sha256
10460 (base32
10461 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10462 (build-system python-build-system)
f22efa01 10463 (propagated-inputs
c2f0dc6e
DM
10464 `(("python-docopt" ,python-docopt)
10465 ("python-jedi" ,python-jedi)
10466 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10467 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10468 (home-page "https://github.com/jonathanslenders/ptpython")
10469 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10470 (description
10471 "ptpython is a Python read-eval-print loop with IDE-like features.
10472It supports syntax highlighting, multiline editing, autocompletion, mouse,
10473color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10474etc.")
3f641af0 10475 (license license:bsd-3)
c2f0dc6e
DM
10476 (properties `((python2-variant . ,(delay ptpython-2))))))
10477
10478(define-public ptpython-2
10479 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10480 (package
10481 (inherit base)
10482 (name "ptpython2"))))
b227f0be 10483
b04a52a6
DJ
10484(define-public python-requests-oauthlib
10485 (package
10486 (name "python-requests-oauthlib")
10487 (version "0.6.2")
10488 (source
10489 (origin
10490 (method url-fetch)
10491 (uri (pypi-uri "requests-oauthlib" version))
10492 (sha256
10493 (base32
10494 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10495 (build-system python-build-system)
10496 (arguments
10497 `(#:phases
10498 (modify-phases %standard-phases
10499 ;; removes tests that require network access
10500 (add-before 'check 'pre-check
10501 (lambda _
10502 (delete-file "tests/test_core.py")
10503 #t)))))
10504 (native-inputs
10505 `(("python-requests-mock" ,python-requests-mock)
10506 ("python-mock" ,python-mock)))
f22efa01 10507 (propagated-inputs
b04a52a6
DJ
10508 `(("python-oauthlib" ,python-oauthlib)
10509 ("python-requests" ,python-requests)))
10510 (home-page
10511 "https://github.com/requests/requests-oauthlib")
10512 (synopsis
10513 "OAuthlib authentication support for Requests")
10514 (description
10515 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10516provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10517 (license license:isc)))
b04a52a6
DJ
10518
10519(define-public python2-requests-oauthlib
f210e944 10520 (package-with-python2 python-requests-oauthlib))
b04a52a6 10521
b227f0be 10522(define-public python-stem
10523 (package
10524 (name "python-stem")
10525 (version "1.4.1b")
10526 (source
10527 (origin
10528 (method url-fetch)
10529 (uri (pypi-uri "stem" version ".tar.bz2"))
10530 (sha256
10531 (base32
10532 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10533 (build-system python-build-system)
10534 (arguments
10535 `(#:phases
10536 (modify-phases %standard-phases
10537 (replace 'check
10538 (lambda _
10539 (zero? (system* "./run_tests.py" "--unit")))))))
10540 (native-inputs
10541 `(("python-mock" ,python-mock)
10542 ("python-pep8" ,python-pep8)
10543 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10544 (propagated-inputs
b227f0be 10545 `(("python-pycrypto" ,python-pycrypto)))
10546 (home-page "https://stem.torproject.org/")
10547 (synopsis
10548 "Python controller library that allows applications to interact with Tor")
10549 (description
10550 "Stem is a Python controller library for Tor. With it you can use Tor's
10551control protocol to script against the Tor process and read descriptor data
10552relays publish about themselves.")
3f641af0 10553 (license license:lgpl3)))
b227f0be 10554
10555(define-public python2-stem
10556 (package-with-python2 python-stem))
517a6c0c
DM
10557
10558(define-public python-pyserial
10559 (package
10560 (name "python-pyserial")
10561 (version "3.1.1")
10562 (source
10563 (origin
10564 (method url-fetch)
10565 (uri (pypi-uri "pyserial" version))
10566 (sha256
10567 (base32
10568 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10569 (build-system python-build-system)
10570 (home-page
10571 "https://github.com/pyserial/pyserial")
10572 (synopsis "Python Serial Port Bindings")
10573 (description "@code{pyserial} provide serial port bindings for Python. It
10574supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10575and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10576 (license license:bsd-3)))
517a6c0c
DM
10577
10578(define-public python2-pyserial
f210e944 10579 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10580
10581(define-public python-kivy
10582 (package
10583 (name "python-kivy")
10584 (version "1.9.1")
10585 (source
10586 (origin
10587 (method url-fetch)
10588 (uri (pypi-uri "kivy" version))
10589 (file-name (string-append name "-" version ".tar.gz"))
10590 (sha256
10591 (base32
10592 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10593 (build-system python-build-system)
10594 (arguments
10595 `(#:tests? #f ; Tests require many optional packages
10596 #:phases
10597 (modify-phases %standard-phases
10598 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10599 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10600 (lambda* (#:key inputs #:allow-other-keys)
10601 (setenv "KIVY_SDL2_PATH"
10602 (string-append (assoc-ref inputs "sdl-union")
10603 "/include/SDL2"))
10604 #t)))))
10605 (native-inputs
f2516de2
HG
10606 `(("pkg-config" ,pkg-config)
10607 ("python-cython" ,python-cython)))
6eb7af2a 10608 (inputs
f2516de2 10609 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10610 ("mesa" ,mesa)
10611 ("sdl-union"
10612 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10613 (home-page "http://kivy.org")
10614 (synopsis
10615 "Multitouch application framework")
10616 (description
10617 "A software library for rapid development of
10618hardware-accelerated multitouch applications.")
10619 (license license:expat)))
10620
10621(define-public python2-kivy
10622 (package-with-python2 python-kivy))
10623
10624(define-public python-kivy-next
10625 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10626 (revision "1"))
10627 (package (inherit python-kivy)
10628 (name "python-kivy-next")
d80a71eb 10629 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10630 (string-take commit 7)))
10631 (source
10632 (origin
10633 (method git-fetch)
10634 (uri (git-reference
10635 (url "https://github.com/kivy/kivy")
10636 (commit commit)))
10637 (file-name (string-append name "-" version "-checkout"))
10638 (sha256
10639 (base32
10640 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10641
10642(define-public python2-kivy-next
10643 (package-with-python2 python-kivy-next))
8794bd8b
DC
10644
10645(define-public python-binaryornot
10646 (package
10647 (name "python-binaryornot")
10648 (version "0.4.0")
10649 (source (origin
10650 (method url-fetch)
10651 (uri (pypi-uri "binaryornot" version))
10652 (sha256
10653 (base32
10654 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10655 (build-system python-build-system)
f22efa01 10656 (propagated-inputs
8794bd8b
DC
10657 `(("python-chardet" ,python-chardet)
10658 ("python-hypothesis" ,python-hypothesis)))
10659 (home-page "https://github.com/audreyr/binaryornot")
10660 (synopsis "Package to check if a file is binary or text")
10661 (description "Ultra-lightweight pure Python package to check if a file is
10662binary or text.")
10663 (license license:bsd-3)
10664 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10665
10666(define-public python2-binaryornot
10667 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10668 (package (inherit base)
f22efa01 10669 (propagated-inputs
8794bd8b 10670 `(("python2-enum34" ,python2-enum34)
f22efa01 10671 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10672
10673(define-public python-nltk
10674 (package
10675 (name "python-nltk")
10676 (version "3.2.1")
10677 (source (origin
10678 (method url-fetch)
10679 (uri (pypi-uri "nltk" version))
10680 (sha256
10681 (base32
10682 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10683 (build-system python-build-system)
59f12985
LF
10684 (arguments
10685 '(;; The tests require some extra resources to be downloaded.
10686 ;; TODO Try packaging these resources.
10687 #:tests? #f))
a9ac982a
DC
10688 (home-page "http://nltk.org/")
10689 (synopsis "Natural Language Toolkit")
10690 (description "It provides interfaces to over 50 corpora and lexical
10691resources such as WordNet, along with a suite of text processing libraries
10692for classification, tokenization, stemming, tagging, parsing, and semantic
10693reasoning, wrappers for natural language processing libraries.")
f210e944 10694 (license license:asl2.0)))
a9ac982a
DC
10695
10696(define-public python2-nltk
f210e944 10697 (package-with-python2 python-nltk))
691cd90d
DC
10698
10699(define-public python-pymongo
10700 (package
10701 (name "python-pymongo")
10702 (version "3.3.0")
10703 (source (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "pymongo" version))
10706 (sha256
10707 (base32
10708 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10709 (build-system python-build-system)
f22efa01 10710 (propagated-inputs
691cd90d
DC
10711 `(("python-certifi" ,python-certifi)))
10712 (home-page "http://github.com/mongodb/mongo-python-driver")
10713 (synopsis "Python driver for MongoDB")
10714 (description "Python driver for MongoDB.")
f210e944 10715 (license license:asl2.0)))
691cd90d
DC
10716
10717(define-public python2-pymongo
f210e944 10718 (package-with-python2 python-pymongo))
6a6c9d43
DC
10719
10720(define-public python-sh
10721 (package
10722 (name "python-sh")
10723 (version "1.11")
10724 (source (origin
10725 (method url-fetch)
10726 (uri (pypi-uri "sh" version))
10727 (sha256
10728 (base32
10729 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10730 (build-system python-build-system)
10731 (arguments
10732 `(#:tests? #f)) ; no tests
10733 (home-page "https://github.com/amoffat/sh")
10734 (synopsis "Python subprocess interface")
10735 (description "Abstracts process invocation by providing a function
10736interface for programs.")
f210e944 10737 (license license:expat)))
6a6c9d43
DC
10738
10739(define-public python2-sh
f210e944 10740 (package-with-python2 python-sh))
05b59190 10741
25702397
EF
10742(define-public python-consul
10743 (package
10744 (name "python-consul")
10745 (version "0.6.1")
10746 (source
10747 (origin
10748 (method url-fetch)
10749 (uri (pypi-uri "python-consul" version))
10750 (sha256
10751 (base32
10752 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10753 (build-system python-build-system)
10754 (native-inputs
fd1d6de7
HG
10755 `(("python-pytest" ,python-pytest)))
10756 (propagated-inputs
10757 `(("python-requests" ,python-requests)
25702397
EF
10758 ("python-six" ,python-six)))
10759 (home-page "https://github.com/cablehead/python-consul")
10760 (synopsis "Python client for Consul")
10761 (description
10762 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10763discovery, monitoring and configuration.")
10764 (license license:expat)))
10765
10766(define-public python2-consul
f210e944 10767 (package-with-python2 python-consul))
25702397 10768
05b59190
DC
10769(define-public python-schematics
10770 (package
10771 (name "python-schematics")
10772 (version "1.1.1")
10773 (source
10774 (origin
10775 (method url-fetch)
10776 (uri (string-append
10777 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10778 (file-name (string-append name "-" version ".tar.gz"))
10779 (sha256
10780 (base32
10781 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10782 (build-system python-build-system)
f22efa01 10783 (propagated-inputs
05b59190
DC
10784 `(("python-six" ,python-six)))
10785 (arguments
10786 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10787 ; version requirements (eg python-coveralls)
10788 (home-page "https://github.com/schematics/schematics")
10789 (synopsis "Python Data Structures for Humans")
10790 (description "Python Data Structures for Humans.")
f210e944 10791 (license license:bsd-3)))
05b59190
DC
10792
10793(define-public python2-schematics
f210e944 10794 (package-with-python2 python-schematics))
d6907ff7
DC
10795
10796(define-public python-publicsuffix
10797 (package
10798 (name "python-publicsuffix")
10799 (version "1.1.0")
10800 (source (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "publicsuffix" version))
10803 (sha256
10804 (base32
10805 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10806 (build-system python-build-system)
10807 (arguments
10808 `(#:tests? #f)) ; tests use the internet
10809 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10810 (synopsis "Get suffix for a domain name")
10811 (description "Get a public suffix for a domain name using the Public Suffix
10812List.")
f210e944 10813 (license license:expat)))
d6907ff7
DC
10814
10815(define-public python2-publicsuffix
f210e944 10816 (package-with-python2 python-publicsuffix))
b2319996
DC
10817
10818(define-public python-publicsuffix2
10819 (package
10820 (name "python-publicsuffix2")
10821 (version "2.20160621")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10826 (sha256
10827 (base32
10828 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10829 (build-system python-build-system)
10797a0a
LF
10830 (arguments
10831 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10832 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10833 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10834 (description "Get a public suffix for a domain name using the Public Suffix
10835List. Forked from and using the same API as the publicsuffix package.")
f210e944 10836 (license (list license:expat license:mpl2.0))))
b2319996
DC
10837
10838(define-public python2-publicsuffix2
f210e944 10839 (package-with-python2 python-publicsuffix2))
81f1515d
DC
10840
10841(define-public python-url
10842 (package
10843 (name "python-url")
10844 (version "0.2.0")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "url" version))
10848 (sha256
10849 (base32
10850 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10851 (build-system python-build-system)
f22efa01 10852 (propagated-inputs
81f1515d
DC
10853 `(("python-publicsuffix" ,python-publicsuffix)))
10854 (native-inputs
10855 `(("python-coverage" ,python-coverage)
10856 ("python-nose" ,python-nose)))
10857 (arguments
10858 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10859 (home-page "http://github.com/seomoz/url-py")
10860 (synopsis "URL Parsing")
10861 (description "Library for parsing urls.")
10862 (license license:expat)
10863 (properties `((python2-variant . ,(delay python2-url))))))
10864
10865(define-public python2-url
10866 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10867 (package (inherit base)
f22efa01 10868 (propagated-inputs
f210e944 10869 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
10870
10871(define-public python-freezegun
10872 (package
10873 (name "python-freezegun")
10874 (version "0.3.7")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "freezegun" version))
10879 (sha256
10880 (base32
10881 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10882 (build-system python-build-system)
10883 (native-inputs
10884 `(("python-mock" ,python-mock)
10885 ("python-nose" ,python-nose)
4e096968 10886 ("python-coverage" ,python-coverage)))
f22efa01 10887 (propagated-inputs
4e096968
HG
10888 `(("python-six" ,python-six)
10889 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
10890 (arguments
10891 `(#:phases (modify-phases %standard-phases
10892 ;; The tests are normally executed via `make test`, but the PyPi
10893 ;; package does not include the Makefile.
10894 (replace 'check
10895 (lambda _
10896 (zero? (system* "nosetests" "./tests/")))))))
10897 (home-page "https://github.com/spulec/freezegun")
10898 (synopsis "Test utility for mocking the datetime module")
10899 (description
10900 "FreezeGun is a library that allows your python tests to travel through
10901time by mocking the datetime module.")
10902 (license license:asl2.0)))
10903
10904(define-public python2-freezegun
f210e944
HG
10905 (package-with-python2 python-freezegun))
10906
dddcb25c
MB
10907
10908(define-public python-odfpy
10909 (package
10910 (name "python-odfpy")
10911 (version "1.3.3")
10912 (source (origin
10913 (method url-fetch)
10914 (uri (pypi-uri "odfpy" version))
10915 (sha256
10916 (base32
10917 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10918 (arguments
10919 `(#:modules ((srfi srfi-1)
10920 (guix build python-build-system)
10921 (guix build utils))
10922 #:phases
10923 (modify-phases %standard-phases
10924 (replace 'check
10925 ;; The test runner invokes python2 and python3 for test*.py.
10926 ;; To avoid having both in inputs, we replicate it here.
10927 (lambda _
10928 (every (lambda (test-file)
10929 (zero? (system* "python" test-file)))
10930 (find-files "tests" "^test.*\\.py$")))))))
10931 (build-system python-build-system)
10932 (home-page "https://github.com/eea/odfpy")
10933 (synopsis "Python API and tools to manipulate OpenDocument files")
10934 (description "Collection of libraries and utility programs written in
10935Python to manipulate OpenDocument 1.2 files.")
10936 (license
10937 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10938 ;; number of files with other licenses.
10939 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10940
10941(define-public python2-odfpy
10942 (package-with-python2 python-odfpy))
b30565bd
MB
10943
10944(define-public python-cachecontrol
10945 (package
10946 (name "python-cachecontrol")
10947 (version "0.11.6")
10948 (source
10949 (origin
10950 (method url-fetch)
10951 ;; Pypi does not have tests.
10952 (uri (string-append
10953 "https://github.com/ionrock/cachecontrol/archive/v"
10954 version ".tar.gz"))
10955 (file-name (string-append name "-" version ".tar.gz"))
10956 (sha256
10957 (base32
10958 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10959 (build-system python-build-system)
10960 (arguments
10961 `(#:phases
10962 (modify-phases %standard-phases
10963 (replace 'check
10964 (lambda _
10965 ;; Drop test that requires internet access.
10966 (delete-file "tests/test_regressions.py")
10967 (setenv "PYTHONPATH"
10968 (string-append (getcwd) "/build/lib:"
10969 (getenv "PYTHONPATH")))
10970 (zero? (system* "py.test" "-vv")))))))
10971 (native-inputs
10972 `(("python-pytest" ,python-pytest)
10973 ("python-redis" ,python-redis)
10974 ("python-webtest" ,python-webtest)
10975 ("python-mock" ,python-mock)))
10976 (propagated-inputs
10977 `(("python-requests" ,python-requests)
10978 ("python-lockfile" ,python-lockfile)))
10979 (home-page "https://github.com/ionrock/cachecontrol")
10980 (synopsis "The httplib2 caching algorithms for use with requests")
10981 (description "CacheControl is a port of the caching algorithms in
10982@code{httplib2} for use with @code{requests} session objects.")
f210e944 10983 (license license:asl2.0)))
b30565bd
MB
10984
10985(define-public python2-cachecontrol
f210e944 10986 (package-with-python2 python-cachecontrol))
243db824
DM
10987
10988(define-public python-lit
10989 (package
10990 (name "python-lit")
10991 (version "0.5.0")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "lit" version))
10996 (sha256
10997 (base32
10998 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10999 (build-system python-build-system)
11000 (home-page "http://llvm.org/")
11001 (synopsis "LLVM Software Testing Tool")
11002 (description "@code{lit} is a portable tool for executing LLVM and Clang
11003style test suites, summarizing their results, and providing indication of
11004failures.")
f210e944 11005 (license license:ncsa)))
243db824
DM
11006
11007(define-public python2-lit
f210e944 11008 (package-with-python2 python-lit))
66f95b20
MB
11009
11010(define-public python-pytest-pep8
11011 (package
11012 (name "python-pytest-pep8")
11013 (version "1.0.6")
11014 (source (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "pytest-pep8" version))
11017 (sha256
11018 (base32
11019 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11020 (build-system python-build-system)
11021 (arguments
b41a05ce 11022 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11023 (native-inputs
11024 `(("python-pytest" ,python-pytest)))
11025 (propagated-inputs
11026 `(("python-pep8" ,python-pep8)))
11027 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11028 (synopsis "Py.test plugin to check PEP8 requirements")
11029 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11030 (license license:expat)))
66f95b20
MB
11031
11032(define-public python2-pytest-pep8
f210e944 11033 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11034
11035(define-public python-pytest-flakes
11036 (package
11037 (name "python-pytest-flakes")
11038 (version "1.0.1")
11039 (source (origin
11040 (method url-fetch)
11041 (uri (pypi-uri "pytest-flakes" version))
11042 (sha256
11043 (base32
11044 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11045 (build-system python-build-system)
11046 (arguments
b41a05ce 11047 `(#:phases
df94a6b5
MB
11048 (modify-phases %standard-phases
11049 (delete 'check)
11050 (add-after 'install 'check
05c2fd36
HG
11051 (lambda* (#:key outputs inputs #:allow-other-keys)
11052 ;; It's easier to run tests after install.
11053 ;; Make installed package available for running the tests
11054 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11055 (zero? (system* "py.test" "-vv")))))))
11056 (native-inputs
11057 `(("python-coverage" ,python-coverage)
11058 ("python-pytest" ,python-pytest)
11059 ("python-pytest-cache" ,python-pytest-cache)
11060 ("python-pytest-pep8" ,python-pytest-pep8)))
11061 (propagated-inputs
11062 `(("python-pyflakes" ,python-pyflakes)))
11063 (home-page "https://github.com/fschulze/pytest-flakes")
11064 (synopsis "Py.test plugin to check source code with pyflakes")
11065 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11066 (license license:expat)))
df94a6b5
MB
11067
11068(define-public python2-pytest-flakes
f210e944 11069 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11070
11071(define-public python-natsort
11072 (package
11073 (name "python-natsort")
11074 (version "5.0.1")
11075 (source (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "natsort" version))
11078 (sha256
11079 (base32
11080 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11081 (build-system python-build-system)
11082 (arguments
11083 `(#:phases
11084 (modify-phases %standard-phases
11085 (add-before 'check 'set-cachedir
11086 ;; Tests require write access to $HOME by default
11087 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11088 (native-inputs
11089 `(("python-hypothesis" ,python-hypothesis)
11090 ("python-pytest-cache" ,python-pytest-cache)
11091 ("python-pytest-cov" ,python-pytest-cov)
11092 ("python-pytest-flakes" ,python-pytest-flakes)
11093 ("python-pytest-pep8" ,python-pytest-pep8)))
11094 (propagated-inputs ; TODO: Add python-fastnumbers.
11095 `(("python-pyicu" ,python-pyicu)))
11096 (home-page "https://github.com/SethMMorton/natsort")
11097 (synopsis "Natural sorting for python and shell")
11098 (description
11099 "Natsort lets you apply natural sorting on lists instead of
11100lexicographical. If you use the built-in @code{sorted} method in python
11101on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11102returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11103function @code{natsorted} that identifies numbers and sorts them separately
11104from strings. It can also sort version numbers, real numbers, mixed types
11105and more, and comes with a shell command @command{natsort} that exposes this
11106functionality in the command line.")
11107 (license license:expat)
11108 (properties `((python2-variant . ,(delay python2-natsort))))))
11109
11110(define-public python2-natsort
11111 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11112 (package (inherit base)
11113 (native-inputs
00e10c6e 11114 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11115 ("python2-mock" ,python2-mock)
11116 ("python2-enum34" ,python2-enum34)
11117 ,@(package-native-inputs base))))))
4efb9c54
SR
11118
11119(define-public python-glances
11120 (package
11121 (name "python-glances")
11122 (version "2.7.1")
11123 (source
11124 (origin
11125 (method url-fetch)
11126 (uri (pypi-uri "Glances" version))
11127 (sha256
11128 (base32
11129 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11130 (build-system python-build-system)
f22efa01 11131 (propagated-inputs
4efb9c54
SR
11132 `(("python-psutil" ,python-psutil)))
11133 (home-page
11134 "https://github.com/nicolargo/glances")
11135 (synopsis
11136 "A cross-platform curses-based monitoring tool")
11137 (description
11138 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11139Glances uses the PsUtil library to get information from your system. It monitors
11140CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11141 (license license:lgpl3+)))
4efb9c54
SR
11142
11143(define-public python2-glances
f210e944 11144 (package-with-python2 python-glances))
05b7a593
EF
11145
11146(define-public python-graphql-core
11147 (package
11148 (name "python-graphql-core")
11149 (version "0.5.3")
11150 (source
11151 (origin
11152 (method url-fetch)
11153 (uri (pypi-uri "graphql-core" version))
11154 (sha256
11155 (base32
11156 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11157 (build-system python-build-system)
11158 (arguments
326f8285
LF
11159 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11160 #:phases
05b7a593
EF
11161 (modify-phases %standard-phases
11162 (add-after 'unpack 'patch-hardcoded-version
11163 (lambda _ (substitute*
11164 "setup.py"
11165 (("'gevent==1.1rc1'") "'gevent'"))
11166 #t)))))
11167 (native-inputs
11168 `(("python-gevent" ,python-gevent)
11169 ("python-mock" ,python-mock)
11170 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11171 (propagated-inputs
05b7a593
EF
11172 `(("python-promise" ,python-promise)
11173 ("python-six" ,python-six)))
11174 (home-page "https://github.com/graphql-python/graphql-core")
11175 (synopsis "GraphQL implementation for Python")
11176 (description
11177 "GraphQL implementation for Python. GraphQL is a data query language and
11178runtime designed and used to request and deliver data to mobile and web apps.
11179This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11180to Python.")
05b7a593
EF
11181 (license license:expat)))
11182
11183(define-public python2-graphql-core
f210e944 11184 (package-with-python2 python-graphql-core))
7ee51575
EF
11185
11186(define-public python-graphql-relay
11187 (package
11188 (name "python-graphql-relay")
11189 (version "0.4.4")
11190 (source
11191 (origin
11192 (method url-fetch)
11193 (uri (pypi-uri "graphql-relay" version))
11194 (sha256
11195 (base32
11196 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11197 (build-system python-build-system)
11198 (native-inputs
11199 `(("python-pytest" ,python-pytest)))
f22efa01 11200 (propagated-inputs
7ee51575
EF
11201 `(("python-graphql-core" ,python-graphql-core)
11202 ("python-promise" ,python-promise)
11203 ("python-six" ,python-six)))
11204 (home-page "https://github.com/graphql-python/graphql-relay-py")
11205 (synopsis "Relay implementation for Python")
11206 (description
11207 "This is a library to allow the easy creation of Relay-compliant servers
11208using the GraphQL Python reference implementation of a GraphQL server. It
11209should be noted that the code is a exact port of the original
11210@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11211from Facebook.")
7ee51575
EF
11212 (license license:expat)))
11213
11214(define-public python2-graphql-relay
f210e944 11215 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11216
11217(define-public python-graphene
11218 (package
11219 (name "python-graphene")
11220 (version "0.10.2")
11221 (source
11222 (origin
11223 (method url-fetch)
11224 (uri (pypi-uri "graphene" version))
11225 (sha256
11226 (base32
11227 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11228 (build-system python-build-system)
11229 (native-inputs
11230 `(("python-django-filter" ,python-django-filter)
11231 ("python-mock" ,python-mock)
11232 ("python-psycopg2" ,python-psycopg2)
11233 ("python-pytest-django" ,python-pytest-django)
11234 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11235 (propagated-inputs
ddc63a56
EF
11236 `(("python-graphql-core" ,python-graphql-core)
11237 ("python-graphql-relay" ,python-graphql-relay)
11238 ("python-iso8601" ,python-iso8601)
11239 ("python-promise" ,python-promise)
11240 ("python-six" ,python-six)))
11241 (home-page "http://graphene-python.org/")
11242 (synopsis "GraphQL Framework for Python")
11243 (description
11244 "Graphene is a Python library for building GraphQL schemas/types.
11245A GraphQL schema describes your data model, and provides a GraphQL server
11246with an associated set of resolve methods that know how to fetch data.")
11247 (properties `((python2-variant . ,(delay python2-graphene))))
11248 (license license:expat)))
11249
11250(define-public python2-graphene
11251 (let ((base (package-with-python2
11252 (strip-python2-variant python-graphene))))
11253 (package (inherit base)
11254 (native-inputs
00e10c6e 11255 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11256 ,@(package-native-inputs base))))))
d488d5d6
EF
11257
11258(define-public python-nautilus
11259 (package
11260 (name "python-nautilus")
11261 (version "0.4.9")
11262 (source
11263 (origin
11264 (method url-fetch)
11265 (uri (pypi-uri "nautilus" version))
11266 (sha256
11267 (base32
11268 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11269 (build-system python-build-system)
11270 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11271 (propagated-inputs
d488d5d6
EF
11272 `(("python-bcrypt" ,python-bcrypt)
11273 ("python-click" ,python-click)
11274 ("python-consul" ,python-consul)
d488d5d6
EF
11275 ("python-graphene" ,python-graphene)
11276 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11277 ("python-peewee" ,python-peewee)
11278 ("python-pika" ,python-pika)
d488d5d6
EF
11279 ("python-tornado" ,python-tornado)
11280 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11281 (native-inputs
11282 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11283 (home-page "https://github.com/AlecAivazis/nautilus")
11284 (synopsis "Library for creating microservice applications")
11285 (description
11286 "Nautilus is a framework for flux based microservices that looks to
11287provide extendible implementations of common aspects of a cloud so that you can
11288focus on building massively scalable web applications.")
11289 (license license:expat)))
94cffc63 11290
66d3f50a
LF
11291(define-public python-betamax
11292 (package
11293 (name "python-betamax")
11294 (version "0.8.0")
11295 (source
11296 (origin
11297 (method url-fetch)
11298 (uri (pypi-uri "betamax" version))
11299 (sha256
11300 (base32
11301 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11302 (build-system python-build-system)
11303 (arguments
11304 '(;; Many tests fail because they require networking.
11305 #:tests? #f))
11306 (inputs
11307 `(("python-requests" ,python-requests)))
11308 (home-page "https://github.com/sigmavirus24/betamax")
11309 (synopsis "Record HTTP interactions with python-requests")
11310 (description "Betamax will record your test suite's HTTP interactions and
11311replay them during future tests. It is designed to work with python-requests.")
f210e944 11312 (license license:expat)))
66d3f50a
LF
11313
11314(define-public python2-betamax
f210e944 11315 (package-with-python2 python-betamax))
ca0635b4 11316
94cffc63
LF
11317(define-public python-s3transfer
11318 (package
11319 (name "python-s3transfer")
11320 (version "0.1.8")
11321 (source (origin
11322 (method url-fetch)
11323 (uri (pypi-uri "s3transfer" version))
11324 (sha256
11325 (base32
11326 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11327 (build-system python-build-system)
fad8bf97
LF
11328 (arguments
11329 `(#:phases
11330 (modify-phases %standard-phases
11331 (replace 'check
11332 (lambda _
11333 ;; 7 of the 'integration' tests require network access or login
11334 ;; credentials.
11335 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11336 (native-inputs
fad8bf97
LF
11337 `(("python-docutils" ,python-docutils)
11338 ("python-mock" ,python-mock)
11339 ("python-nose" ,python-nose)))
f22efa01 11340 (propagated-inputs
94cffc63
LF
11341 `(("python-botocore" ,python-botocore)))
11342 (synopsis "Amazon S3 Transfer Manager")
11343 (description "S3transfer is a Python library for managing Amazon S3
11344transfers.")
11345 (home-page "https://github.com/boto/s3transfer")
11346 (license license:asl2.0)
11347 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11348
11349(define-public python2-s3transfer
11350 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11351 (package
11352 (inherit base)
11353 (native-inputs
11354 `(("python2-futures" ,python2-futures)
94cffc63 11355 ,@(package-native-inputs base))))))
8ab59181
HG
11356
11357(define-public python-setproctitle
11358(package
11359 (name "python-setproctitle")
11360 (version "1.1.10")
11361 (source
11362 (origin
11363 (method url-fetch)
11364 (uri (pypi-uri "setproctitle" version))
11365 (sha256
11366 (base32
11367 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11368 (build-system python-build-system)
11369 (arguments
11370 '(#:phases
11371 (modify-phases %standard-phases
11372 (add-before 'check 'patch-Makefile
11373 ;; Stricly this is only required for the python2 variant.
11374 ;; But adding a phase in an inherited package seems to be
11375 ;; cumbersum. So we patch even for python3.
11376 (lambda _
11377 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11378 (when nose
11379 (substitute* "Makefile"
11380 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11381 (string-append nose "/bin/nosetests "))))
11382 #t)))
11383 (replace 'check
11384 (lambda _
11385 (setenv "PYTHON" (or (which "python3") (which "python")))
11386 (setenv "PYCONFIG" (or (which "python3-config")
11387 (which "python-config")))
11388 (setenv "CC" "gcc")
11389 ;; No need to extend PYTHONPATH to find the built package, since
11390 ;; the Makefile will build anyway
11391 (zero? (system* "make" "check")))))))
11392 (native-inputs
11393 `(("procps" ,procps))) ; required for tests
11394 (home-page
11395 "https://github.com/dvarrazzo/py-setproctitle")
11396 (synopsis
11397 "Setproctitle implementation for Python to customize the process title")
11398 (description "The library allows a process to change its title (as displayed
11399by system tools such as ps and top).
11400
11401Changing the title is mostly useful in multi-process systems, for
11402example when a master process is forked: changing the children's title
11403allows to identify the task each process is busy with. The technique
11404is used by PostgreSQL and the OpenSSH Server for example.")
11405 (license license:bsd-3)
11406 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11407
11408(define-public python2-setproctitle
11409 (let ((base (package-with-python2
11410 (strip-python2-variant python-setproctitle))))
11411 (package
11412 (inherit base)
11413 (native-inputs `(("python2-nose" ,python2-nose)
11414 ,@(package-native-inputs base))))))
162e42d8
HG
11415
11416(define-public python-validictory
11417 (package
11418 (name "python-validictory")
11419 (version "1.0.1")
11420 (source
11421 (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "validictory" version))
11424 (sha256
11425 (base32
11426 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11427 (build-system python-build-system)
11428 (arguments
11429 '(#:phases
11430 (modify-phases %standard-phases
11431 (add-after 'unpack 'bootstrap
11432 ;; Move the tests out of the package directory to avoid
11433 ;; packaging them.
11434 (lambda* _
11435 (rename-file "validictory/tests" "tests")
11436 (delete-file "tests/__init__.py")))
11437 (replace 'check
11438 (lambda _
11439 ;; Extend PYTHONPATH so the built package will be found.
11440 (setenv "PYTHONPATH"
11441 (string-append (getcwd) "/build/lib:"
11442 (getenv "PYTHONPATH")))
11443 (zero? (system* "py.test" "-vv" )))))))
11444 (native-inputs
11445 `(("python-pytest" ,python-pytest)))
11446 (home-page
11447 "https://github.com/jamesturk/validictory")
11448 (synopsis "General purpose Python data validator")
11449 (description "It allows validation of arbitrary Python data structures.
11450
11451The schema format is based on the JSON Schema
11452proposal (http://json-schema.org), so combined with json the library is also
11453useful as a validator for JSON data.")
f210e944 11454 (license license:expat)))
162e42d8
HG
11455
11456(define-public python2-validictory
f210e944 11457 (package-with-python2 python-validictory))
0990edfe
DM
11458
11459(define-public python-aniso8601
11460 (package
11461 (name "python-aniso8601")
11462 (version "1.1.0")
11463 (source
11464 (origin
11465 (method url-fetch)
11466 (uri (pypi-uri "aniso8601" version))
11467 (sha256
11468 (base32
11469 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11470 (build-system python-build-system)
11471 (propagated-inputs
11472 `(("python-dateutil-2" ,python-dateutil-2)))
11473 (home-page
11474 "https://bitbucket.org/nielsenb/aniso8601")
11475 (synopsis
11476 "Python library for parsing ISO 8601 strings")
11477 (description
11478 "This package contains a library for parsing ISO 8601 datetime strings.")
11479 (license license:bsd-3)))
999d964d
DM
11480
11481(define-public python-flask-restful
11482 (package
11483 (name "python-flask-restful")
11484 (version "0.3.5")
11485 (source
11486 (origin
11487 (method url-fetch)
11488 (uri (pypi-uri "Flask-RESTful" version))
11489 (sha256
11490 (base32
11491 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11492 (build-system python-build-system)
11493 (propagated-inputs
11494 `(("python-aniso8601" ,python-aniso8601)
11495 ("python-flask" ,python-flask)
11496 ("python-pycrypto" ,python-pycrypto)
11497 ("python-pytz" ,python-pytz)))
11498 (native-inputs
11499 `(;; Optional dependency of Flask. Tests need it.
11500 ("python-blinker" ,python-blinker)
11501 ("python-mock" ,python-mock) ; For tests
11502 ("python-nose" ,python-nose) ; For tests
11503 ("python-sphinx" ,python-sphinx)))
11504 (home-page
11505 "https://www.github.com/flask-restful/flask-restful/")
11506 (synopsis
11507 "Flask module for creating REST APIs")
11508 (description
11509 "This package contains a Flask module for creating REST APIs.")
11510 (license license:bsd-3)))
31288222
DM
11511
11512(define-public python-flask-basicauth
11513 (package
11514 (name "python-flask-basicauth")
11515 (version "0.2.0")
11516 (source
11517 (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "Flask-BasicAuth" version))
11520 (sha256
11521 (base32
11522 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11523 (build-system python-build-system)
11524 (propagated-inputs
11525 `(("python-flask" ,python-flask)))
11526 (home-page
11527 "https://github.com/jpvanhal/flask-basicauth")
11528 (synopsis
11529 "HTTP basic access authentication for Flask")
11530 (description
11531 "This package provides HTTP basic access authentication for Flask.")
11532 (license license:bsd-3)))
903276d0
DM
11533
11534(define-public python-flask-sqlalchemy
11535 (package
11536 (name "python-flask-sqlalchemy")
11537 (version "2.1")
11538 (source
11539 (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "Flask-SQLAlchemy" version))
11542 (sha256
11543 (base32
11544 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11545 (build-system python-build-system)
11546 (propagated-inputs
11547 `(("python-flask" ,python-flask)
11548 ("python-sqlalchemy" ,python-sqlalchemy)))
11549 (home-page
11550 "http://github.com/mitsuhiko/flask-sqlalchemy")
11551 (synopsis
11552 "Module adding SQLAlchemy support to your Flask application")
11553 (description
11554 "This package adds SQLAlchemy support to your Flask application.")
11555 (license license:bsd-3)))
329b4b3b
LF
11556
11557(define-public python-pyev
11558 (package
11559 (name "python-pyev")
11560 (version "0.9.0")
11561 (source
11562 (origin
11563 (method url-fetch)
11564 (uri (pypi-uri "pyev" version))
11565 (sha256
11566 (base32
11567 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11568 (build-system python-build-system)
11569 (arguments
11570 `(#:tests? #f ; no test suite
11571 #:phases
11572 (modify-phases %standard-phases
11573 (add-after 'unpack 'patch
11574 (lambda* (#:key inputs #:allow-other-keys)
11575 (let ((libev (string-append (assoc-ref inputs "libev")
11576 "/lib/libev.so.4")))
11577 (substitute* "setup.py"
11578 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11579 (string-append "libev_dll_name = \"" libev "\"")))))))))
11580 (inputs
11581 `(("libev" ,libev)))
11582 (home-page "http://pythonhosted.org/pyev/")
11583 (synopsis "Python libev interface")
11584 (description "Pyev provides a Python interface to libev.")
11585 (license license:gpl3)))
11586
11587(define-public python2-pyev
11588 (package-with-python2 python-pyev))
45b4f127
DM
11589
11590(define-public python-imagesize
11591 (package
11592 (name "python-imagesize")
11593 (version "0.7.1")
11594 (source
11595 (origin
11596 (method url-fetch)
11597 (uri (pypi-uri "imagesize" version))
11598 (sha256
11599 (base32
11600 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11601 (build-system python-build-system)
9422c98a
LF
11602 (arguments
11603 '(;; Test files are not distributed on PyPi:
11604 ;; https://github.com/shibukawa/imagesize_py/issues/7
11605 #:tests? #f))
45b4f127
DM
11606 (home-page "https://github.com/shibukawa/imagesize_py")
11607 (synopsis "Gets image size of files in variaous formats in Python")
11608 (description
11609 "This package allows determination of image size from
11610PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11611 (license license:expat)))
45b4f127
DM
11612
11613(define-public python2-imagesize
f210e944 11614 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11615
11616(define-public python-axolotl-curve25519
11617 (package
11618 (name "python-axolotl-curve25519")
11619 (version "0.1")
11620 (source
11621 (origin
11622 (method git-fetch)
11623 (uri (git-reference
11624 (url "git://github.com/tgalal/python-axolotl-curve25519")
11625 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11626 (file-name (string-append name "-" version "-checkout"))
11627 (sha256
11628 (base32
11629 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11630 (build-system python-build-system)
11631 (arguments
11632 `(;; Prevent creation of the egg. This works around
11633 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11634 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11635 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11636 (synopsis "Python wrapper for curve25519 library")
11637 (description "This is a python wrapper for the curve25519 library
11638with ed25519 signatures. The C code was pulled from
11639libaxolotl-android. At the moment this wrapper is meant for use by
11640python-axolotl.")
11641 (license (list license:gpl3 ; Most files
683cdbf5 11642 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11643
11644(define-public python2-axolotl-curve25519
11645 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11646
11647(define-public python-axolotl
11648 (package
11649 (name "python-axolotl")
11650 (version "0.1.35")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (string-append
11655 "https://github.com/tgalal/python-axolotl/archive/"
11656 version ".tar.gz"))
11657 (file-name (string-append name "-" version ".tar.gz"))
11658 (sha256
11659 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11660 (build-system python-build-system)
11661 (arguments
11662 `(#:phases
11663 (modify-phases %standard-phases
11664 ;; Don't install tests
11665 (add-before 'install 'remove-tests
11666 (lambda _
11667 (for-each delete-file-recursively
11668 '("axolotl/tests" "build/lib/axolotl/tests"))
11669 #t)))
11670 ;; Prevent creation of the egg. This works around
11671 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11672 #:configure-flags '("--root=/")))
06ff0837
AI
11673 (propagated-inputs
11674 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11675 ("python-dateutil" ,python-dateutil)
11676 ("python-protobuf" ,python-protobuf)
11677 ("python-pycrypto" ,python-pycrypto)))
11678 (home-page "https://github.com/tgalal/python-axolotl")
11679 (synopsis "Python port of libaxolotl-android")
11680 (description "This is a python port of libaxolotl-android. This
11681is a ratcheting forward secrecy protocol that works in synchronous and
11682asynchronous messaging environments.")
11683 (license license:gpl3)))
11684
11685(define-public python2-axolotl
11686 (package-with-python2 python-axolotl))
e2fca490
DM
11687
11688(define-public python-termstyle
11689 (package
11690 (name "python-termstyle")
11691 (version "0.1.11")
11692 (source
11693 (origin
11694 (method url-fetch)
11695 (uri (pypi-uri "termstyle" version))
11696 (sha256
11697 (base32
11698 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11699 (build-system python-build-system)
11700 (home-page "http://github.com/gfxmonk/termstyle")
11701 (synopsis "Console text coloring for Python")
11702 (description "This package provides console text coloring for Python.")
11703 (license license:bsd-3)))
1e6112d8
DM
11704
11705(define-public python-rednose
11706 (package
11707 (name "python-rednose")
11708 (version "1.2.1")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "rednose" version))
11713 (sha256
11714 (base32
11715 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11716 (build-system python-build-system)
11717 (arguments
11718 `(#:phases
11719 (modify-phases %standard-phases
11720 (add-after 'unpack 'fix-deps
11721 (lambda _
11722 ;; See <https://github.com/JBKahn/rednose/issues/12>
11723 (substitute* "setup.py"
11724 (("python-termstyle") "termstyle"))
11725 #t)))))
11726 (propagated-inputs
11727 `(("python-colorama" ,python-colorama)
11728 ("python-termstyle" ,python-termstyle)))
11729 (native-inputs
11730 `(("python-six" ,python-six)
11731 ("python-nose" ,python-nose)))
11732 (home-page "https://github.com/JBKahn/rednose")
11733 (synopsis "Colored output for Python nosetests")
11734 (description "This package provides colored output for the
11735@command{nosetests} command of the Python Nose unit test framework.")
11736 (license license:bsd-3)))
0a7f17f0
DM
11737
11738(define-public python-flask-restplus
11739 (package
11740 (name "python-flask-restplus")
11741 (version "0.9.2")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "flask-restplus" version))
11746 (sha256
11747 (base32
11748 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11749 (build-system python-build-system)
11750 (propagated-inputs
11751 `(("python-aniso8601" ,python-aniso8601)
11752 ("python-flask" ,python-flask)
11753 ("python-jsonschema" ,python-jsonschema)
11754 ("python-pytz" ,python-pytz)
11755 ("python-six" ,python-six)))
11756 (native-inputs
11757 `(("python-tzlocal" ,python-tzlocal)
11758 ("python-blinker" ,python-blinker)
11759 ("python-nose" ,python-nose)
11760 ("python-rednose" ,python-rednose)))
11761 (home-page "https://github.com/noirbizarre/flask-restplus")
11762 (synopsis "Framework for documented API development with Flask")
11763 (description "This package provides a framework for API development with
11764the Flask web framework in Python. It is similar to package
11765@code{python-flask-restful} but supports the @code{python-swagger}
11766documentation builder.")
11767 (license license:expat)))