gnu: python-ipaddress: Update to 1.0.18.
[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>
28958b64 3;;; Copyright © 2013, 2014, 2015, 2016, 2017 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>
4dcb135e 6;;; Copyright © 2014, 2017 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>
7637de23 14;;; Copyright © 2015, 2016, 2017 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>
6bd9ad69 26;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
df893a38 29;;; Copyright © 2016, 2017 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>
33e9490c 33;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
5220022a 34;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
819939cb 35;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
ec074213 36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
916aafa4 37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
1a917fc9 38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
35db2d3c 39;;; Copyright © 2017 humanitiesNerd <catonano@gmail.com>
a01b6da7
NK
40;;;
41;;; This file is part of GNU Guix.
42;;;
43;;; GNU Guix is free software; you can redistribute it and/or modify it
44;;; under the terms of the GNU General Public License as published by
45;;; the Free Software Foundation; either version 3 of the License, or (at
46;;; your option) any later version.
47;;;
48;;; GNU Guix is distributed in the hope that it will be useful, but
49;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51;;; GNU General Public License for more details.
52;;;
53;;; You should have received a copy of the GNU General Public License
54;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
1ffa7090 56(define-module (gnu packages python)
3f641af0 57 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 58 #:use-module (gnu packages)
8e451885 59 #:use-module (gnu packages algebra)
d79a343b 60 #:use-module (gnu packages adns)
89b2e0b0 61 #:use-module (gnu packages attr)
d96034ed 62 #:use-module (gnu packages backup)
3969ca54 63 #:use-module (gnu packages bash)
1ffa7090 64 #:use-module (gnu packages compression)
4ed20663 65 #:use-module (gnu packages databases)
ddc63a56 66 #:use-module (gnu packages django)
5e1c9367 67 #:use-module (gnu packages file)
4ed20663 68 #:use-module (gnu packages fontutils)
4ed20663
AE
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages ghostscript)
6eb7af2a 71 #:use-module (gnu packages gl)
4ed20663 72 #:use-module (gnu packages glib)
c227458a 73 #:use-module (gnu packages graphviz)
6eb7af2a 74 #:use-module (gnu packages gstreamer)
4ed20663 75 #:use-module (gnu packages gtk)
421a80a2 76 #:use-module (gnu packages icu4c)
c937562e 77 #:use-module (gnu packages image)
4ed20663 78 #:use-module (gnu packages imagemagick)
d79a343b 79 #:use-module (gnu packages libevent)
b10ab723 80 #:use-module (gnu packages libffi)
89b2e0b0 81 #:use-module (gnu packages linux)
ed118043 82 #:use-module (gnu packages man)
0da98533 83 #:use-module (gnu packages maths)
4ed20663 84 #:use-module (gnu packages multiprecision)
45203542 85 #:use-module (gnu packages networking)
be7134bf 86 #:use-module (gnu packages ncurses)
b04a52a6 87 #:use-module (gnu packages openstack)
d488d5d6 88 #:use-module (gnu packages password-utils)
c9b1b4f9 89 #:use-module (gnu packages pcre)
4ed20663 90 #:use-module (gnu packages perl)
b10ab723 91 #:use-module (gnu packages pkg-config)
06ff0837 92 #:use-module (gnu packages protobuf)
4535a93a 93 #:use-module (gnu packages qt)
4ed20663 94 #:use-module (gnu packages readline)
6eb7af2a 95 #:use-module (gnu packages sdl)
80ce42bd 96 #:use-module (gnu packages shells)
c9b1b4f9 97 #:use-module (gnu packages statistics)
8f9ac901 98 #:use-module (gnu packages tex)
1c65314c 99 #:use-module (gnu packages texinfo)
cc2b77df 100 #:use-module (gnu packages tls)
e25f0174 101 #:use-module (gnu packages version-control)
02f8f804 102 #:use-module (gnu packages video)
8d12be1e 103 #:use-module (gnu packages web)
ce0614dd 104 #:use-module (gnu packages base)
26b307e2 105 #:use-module (gnu packages xml)
6fa14469 106 #:use-module (gnu packages xorg)
0bdc1671 107 #:use-module (gnu packages xdisorg)
4ed20663 108 #:use-module (gnu packages zip)
afa181ff 109 #:use-module (gnu packages tcl)
63bcec71 110 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
111 #:use-module (guix packages)
112 #:use-module (guix download)
ea5456c8 113 #:use-module (guix git-download)
11bb85a1 114 #:use-module (guix utils)
acc26ff1 115 #:use-module (guix build-system gnu)
d8c4998f 116 #:use-module (guix build-system cmake)
898238b9 117 #:use-module (guix build-system python)
1c65314c
FB
118 #:use-module (guix build-system trivial)
119 #:use-module (srfi srfi-1))
a01b6da7 120
45848023 121(define-public python-2.7
a01b6da7
NK
122 (package
123 (name "python")
f0499100 124 (version "2.7.12")
a01b6da7
NK
125 (source
126 (origin
127 (method url-fetch)
9b43a0ff 128 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
129 version "/Python-" version ".tar.xz"))
130 (sha256
131 (base32
f0499100 132 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
133 (patches (search-patches "python-2.7-search-paths.patch"
134 "python-2-deterministic-build-info.patch"
15e57f57 135 "python-2.7-site-prefixes.patch"
c3052d6b 136 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
137 (modules '((guix build utils)))
138 ;; suboptimal to delete failing tests here, but if we delete them in the
139 ;; arguments then we need to make sure to strip out that phase when it
140 ;; gets inherited by python and python-minimal.
141 (snippet
142 '(begin
143 (for-each delete-file
144 '("Lib/test/test_compileall.py"
f0499100 145 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
146 "Lib/test/test_distutils.py"
147 "Lib/test/test_import.py"
148 "Lib/test/test_shutil.py"
149 "Lib/test/test_socket.py"
1bb163b0 150 "Lib/test/test_subprocess.py"))
10a42aa2 151 #t))))
02f0c3b2
LC
152 (outputs '("out"
153 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 154 (build-system gnu-build-system)
3fdc99da 155 (arguments
10a42aa2 156 `(;; 356 tests OK.
e7e7a1eb
EF
157 ;; 6 tests failed:
158 ;; test_compileall test_distutils test_import test_shutil test_socket
159 ;; test_subprocess
160 ;; 39 tests skipped:
ff6f33cf
ED
161 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
162 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
163 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
164 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
165 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
166 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
167 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
168 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
169 ;; test_winreg test_winsound test_zipfile64
170 ;; 4 skips unexpected on linux2:
171 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 172 #:test-target "test"
3fdc99da 173 #:configure-flags
6a20289d
LC
174 (list "--enable-shared" ;allow embedding
175 "--with-system-ffi" ;build ctypes
aaf75c89 176 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
177 (string-append "LDFLAGS=-Wl,-rpath="
178 (assoc-ref %outputs "out") "/lib"))
fd982732 179
d2cc9c7c
LC
180 #:modules ((ice-9 ftw) (ice-9 match)
181 (guix build utils) (guix build gnu-build-system))
fd982732 182 #:phases
46472ecd
MW
183 (modify-phases %standard-phases
184 (add-before
185 'configure 'patch-lib-shells
186 (lambda _
187 ;; Filter for existing files, since some may not exist in all
188 ;; versions of python that are built with this recipe.
189 (substitute* (filter file-exists?
190 '("Lib/subprocess.py"
191 "Lib/popen2.py"
192 "Lib/distutils/tests/test_spawn.py"
193 "Lib/test/test_subprocess.py"))
194 (("/bin/sh") (which "sh")))
dedc8320
LC
195
196 ;; Use zero as the timestamp in .pyc files so that builds are
197 ;; deterministic. TODO: Remove it when this variable is set in
198 ;; gnu-build-system.scm.
a665996f 199 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 200 #t))
5b4e2791
LC
201 (add-before 'configure 'do-not-record-configure-flags
202 (lambda* (#:key configure-flags #:allow-other-keys)
203 ;; Remove configure flags from the installed '_sysconfigdata.py'
204 ;; and 'Makefile' so we don't end up keeping references to the
205 ;; build tools.
206 ;;
207 ;; Preserve at least '--with-system-ffi' since otherwise the
208 ;; thing tries to build libffi, fails, and we end up with a
209 ;; Python that lacks ctypes.
210 (substitute* "configure"
211 (("^CONFIG_ARGS=.*$")
212 (format #f "CONFIG_ARGS='~a'\n"
213 (if (member "--with-system-ffi" configure-flags)
214 "--with-system-ffi"
215 ""))))
216 #t))
46472ecd
MW
217 (add-before
218 'check 'pre-check
219 (lambda _
220 ;; 'Lib/test/test_site.py' needs a valid $HOME
221 (setenv "HOME" (getcwd))
222 #t))
223 (add-after
224 'unpack 'set-source-file-times-to-1980
225 ;; XXX One of the tests uses a ZIP library to pack up some of the
226 ;; source tree, and fails with "ZIP does not support timestamps
227 ;; before 1980". Work around this by setting the file times in the
228 ;; source tree to sometime in early 1980.
229 (lambda _
230 (let ((circa-1980 (* 10 366 24 60 60)))
231 (ftw "." (lambda (file stat flag)
232 (utime file circa-1980 circa-1980)
233 #t))
02f0c3b2 234 #t)))
9ffe61b0
LC
235 (add-after 'install 'remove-tests
236 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
237 ;; because these files are used by some libraries out there.
238 (lambda* (#:key outputs #:allow-other-keys)
239 (let ((out (assoc-ref outputs "out")))
240 (match (scandir (string-append out "/lib")
241 (lambda (name)
242 (string-prefix? "python" name)))
243 ((pythonX.Y)
244 (let ((testdir (string-append out "/lib/" pythonX.Y
245 "/test")))
246 (with-directory-excursion testdir
247 (for-each delete-file-recursively
248 (scandir testdir
249 (match-lambda
250 ((or "." "..") #f)
251 (file
252 (not
253 (string-prefix? "test_support."
254 file))))))
255 (call-with-output-file "__init__.py" (const #t))
256 #t)))))))
216c283b
LC
257 (add-before 'strip 'make-libraries-writable
258 (lambda* (#:key outputs #:allow-other-keys)
259 ;; Make .so files writable so they can be stripped.
260 (let ((out (assoc-ref outputs "out")))
261 (for-each (lambda (file)
262 (chmod file #o755))
263 (find-files (string-append out "/lib")
264 "\\.so"))
265 #t)))
02f0c3b2
LC
266 (add-after 'install 'move-tk-inter
267 (lambda* (#:key outputs #:allow-other-keys)
268 ;; When Tkinter support is built move it to a separate output so
269 ;; that the main output doesn't contain a reference to Tcl/Tk.
270 (let ((out (assoc-ref outputs "out"))
271 (tk (assoc-ref outputs "tk")))
272 (when tk
273 (match (find-files out "tkinter.*\\.so")
274 ((tkinter.so)
275 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
276 ;; want it under TK/lib/pythonX.Y/site-packages.
277 (let* ((len (string-length out))
278 (target (string-append
279 tk "/"
280 (string-drop
281 (dirname (dirname tkinter.so))
282 len)
283 "/site-packages")))
284 (install-file tkinter.so target)
285 (delete-file tkinter.so)))))
286 #t))))))
a01b6da7 287 (inputs
3fdc99da
CR
288 `(("bzip2" ,bzip2)
289 ("gdbm" ,gdbm)
b10ab723 290 ("libffi" ,libffi) ; for ctypes
b88e1b0a 291 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 292 ("openssl" ,openssl)
3fdc99da 293 ("readline" ,readline)
afa181ff
LC
294 ("zlib" ,zlib)
295 ("tcl" ,tcl)
296 ("tk" ,tk))) ; for tkinter
b10ab723
CR
297 (native-inputs
298 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
299 (native-search-paths
300 (list (search-path-specification
301 (variable "PYTHONPATH")
af070955 302 (files '("lib/python2.7/site-packages")))))
f0499100 303 (home-page "https://www.python.org")
afa181ff 304 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
305 (description
306 "Python is a remarkably powerful dynamic programming language that
307is used in a wide variety of application domains. Some of its key
308distinguishing features include: clear, readable syntax; strong
309introspection capabilities; intuitive object orientation; natural
310expression of procedural code; full modularity, supporting hierarchical
311packages; exception-based error handling; and very high level dynamic
312data types.")
3f641af0 313 (license license:psfl)))
acc26ff1 314
45848023
HG
315;; Current 2.x version.
316(define-public python-2 python-2.7)
317
72df6680 318(define-public python-3.5
b24d1cfc 319 (package (inherit python-2)
72df6680 320 (version "3.5.2")
717003e3
LC
321 (source (origin
322 (method url-fetch)
323 (uri (string-append "https://www.python.org/ftp/python/"
324 version "/Python-" version ".tar.xz"))
fc1adab1
AK
325 (patches (search-patches
326 "python-fix-tests.patch"
72df6680 327 "python-3.5-fix-tests.patch"
fc1adab1
AK
328 "python-3-deterministic-build-info.patch"
329 "python-3-search-paths.patch"))
717003e3
LC
330 (patch-flags '("-p0"))
331 (sha256
332 (base32
72df6680 333 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
334 (arguments (substitute-keyword-arguments (package-arguments python-2)
335 ((#:tests? _) #t)))
1aebc0cb
AE
336 (native-search-paths
337 (list (search-path-specification
338 (variable "PYTHONPATH")
0e05d01e
SB
339 (files (list (string-append "lib/python"
340 (version-major+minor version)
341 "/site-packages"))))))))
f26a77ff 342
72df6680
LF
343(define-public python-3.4
344 (package (inherit python-3.5)
345 (version "3.4.5")
346 (source (origin
347 (method url-fetch)
348 (uri (string-append "https://www.python.org/ftp/python/"
349 version "/Python-" version ".tar.xz"))
350 (patches (search-patches
351 "python-fix-tests.patch"
352 "python-3.4-fix-tests.patch"
353 "python-3-deterministic-build-info.patch"
354 "python-3-search-paths.patch"))
355 (patch-flags '("-p0"))
356 (sha256
357 (base32
358 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
359
45848023 360;; Current 3.x version.
72df6680 361(define-public python-3 python-3.5)
45848023
HG
362
363;; Current major version.
364(define-public python python-3)
365
95288fcc
LC
366;; Minimal variants of Python, mostly used to break the cycle between Tk and
367;; Python (Tk -> libxcb -> Python.)
368
369(define-public python2-minimal
370 (package (inherit python-2)
371 (name "python-minimal")
02f0c3b2 372 (outputs '("out"))
95288fcc
LC
373 (arguments
374 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
375 ((#:configure-flags cf)
376 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
377 (inputs '()))) ;none of the optional dependencies
378
379(define-public python-minimal
898238b9 380 (package (inherit python)
95288fcc 381 (name "python-minimal")
02f0c3b2 382 (outputs '("out"))
95288fcc 383
d0b73960 384 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
385 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
386 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
387 (inputs `(("libffi" ,libffi)
388 ("openssl" ,openssl)
95288fcc
LC
389 ("zlib" ,zlib)))))
390
64cb064c
LC
391(define* (wrap-python3 python
392 #:optional
393 (name (string-append (package-name python) "-wrapper")))
898238b9 394 (package (inherit python)
95288fcc 395 (name name)
898238b9
AE
396 (source #f)
397 (build-system trivial-build-system)
02f0c3b2 398 (outputs '("out"))
3969ca54 399 (inputs `(("bash" ,bash)))
3c0f2329 400 (propagated-inputs `(("python" ,python)))
898238b9
AE
401 (arguments
402 `(#:modules ((guix build utils))
403 #:builder
404 (begin
405 (use-modules (guix build utils))
406 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
407 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
408 (mkdir-p bin)
409 (for-each
410 (lambda (old new)
411 (symlink (string-append python old)
412 (string-append bin "/" new)))
3969ca54
SB
413 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
414 `("python" ,"pydoc" ,"idle" ,"pip"))
415 ;; python-config outputs search paths based upon its location,
416 ;; use a bash wrapper to avoid changing its outputs.
417 (let ((bash (string-append (assoc-ref %build-inputs "bash")
418 "/bin/bash"))
419 (old (string-append python "python3-config"))
420 (new (string-append bin "/python-config")))
421 (with-output-to-file new
422 (lambda ()
423 (format #t "#!~a~%" bash)
424 (format #t "exec \"~a\" \"$@\"~%" old)
425 (chmod new #o755)
426 #t)))))))
0d56e3e1
LC
427 (synopsis "Wrapper for the Python 3 commands")
428 (description
429 "This package provides wrappers for the commands of Python@tie{}3.x such
430that they can be invoked under their usual name---e.g., @command{python}
431instead of @command{python3}.")))
432
95288fcc
LC
433(define-public python-wrapper (wrap-python3 python))
434(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 435
aaf625b8
RW
436(define-public python-psutil
437 (package
438 (name "python-psutil")
88535a44 439 (version "4.3.0")
aaf625b8
RW
440 (source
441 (origin
442 (method url-fetch)
f56777be 443 (uri (pypi-uri "psutil" version))
aaf625b8
RW
444 (sha256
445 (base32
88535a44 446 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 447 (build-system python-build-system)
fb08c4fe
MB
448 (arguments
449 ;; FIXME: some tests does not return and times out.
450 '(#:tests? #f))
88535a44 451 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
452 (synopsis "Library for retrieving information on running processes")
453 (description
454 "psutil (Python system and process utilities) is a library for retrieving
455information on running processes and system utilization (CPU, memory, disks,
456network) in Python. It is useful mainly for system monitoring, profiling and
457limiting process resources and management of running processes. It implements
458many functionalities offered by command line tools such as: ps, top, lsof,
459netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
460pidof, tty, taskset, pmap.")
3f641af0 461 (license license:bsd-3)))
aaf625b8
RW
462
463(define-public python2-psutil
464 (package-with-python2 python-psutil))
898238b9 465
f9da1d8a
ED
466(define-public python-passlib
467 (package
468 (name "python-passlib")
3b86a385 469 (version "1.7.1")
f9da1d8a
ED
470 (source
471 (origin
472 (method url-fetch)
690e8c66 473 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
474 (sha256
475 (base32
3b86a385 476 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
477 (build-system python-build-system)
478 (native-inputs
f3b98f4f 479 `(("python-nose" ,python-nose)))
f22efa01 480 (propagated-inputs
f9da1d8a
ED
481 `(("python-py-bcrypt" ,python-py-bcrypt)))
482 (arguments
483 `(#:phases
484 (alist-cons-before
485 'check 'set-PYTHON_EGG_CACHE
486 ;; some tests require access to "$HOME/.cython"
487 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
488 %standard-phases)))
489 (home-page "https://bitbucket.org/ecollins/passlib")
490 (synopsis
491 "Comprehensive password hashing framework")
492 (description
493 "Passlib is a password hashing library for Python 2 & 3, which provides
494cross-platform implementations of over 30 password hashing algorithms, as well
495as a framework for managing existing password hashes. It's designed to be
496useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
497to providing full-strength password hashing for multi-user application.")
3f641af0 498 (license license:bsd-3)))
f9da1d8a
ED
499
500(define-public python2-passlib
501 (package-with-python2 python-passlib))
502
feb0d9c3
ED
503(define-public python-py-bcrypt
504 (package
505 (name "python-py-bcrypt")
506 (version "0.4")
507 (source
508 (origin
509 (method url-fetch)
510 (uri (string-append
511 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
512 version
513 ".tar.gz"))
514 (sha256
515 (base32
516 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
517 (build-system python-build-system)
feb0d9c3
ED
518 (home-page "https://code.google.com/p/py-bcrypt")
519 (synopsis
520 "Bcrypt password hashing and key derivation")
521 (description
522 "A python wrapper of OpenBSD's Blowfish password hashing code. This
523system hashes passwords using a version of Bruce Schneier's Blowfish block
524cipher with modifications designed to raise the cost of off-line password
525cracking and frustrate fast hardware implementation. The computation cost of
526the algorithm is parametised, so it can be increased as computers get faster.
527The intent is to make a compromise of a password database less likely to
528result in an attacker gaining knowledge of the plaintext passwords (e.g. using
529John the Ripper).")
530 ;; "sha2.c" is under BSD-3;
531 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
532 ;; the rest is under ISC.
3f641af0 533 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
534
535(define-public python2-py-bcrypt
536 (package-with-python2 python-py-bcrypt))
537
538
429fdea1
ED
539(define-public python-paramiko
540 (package
541 (name "python-paramiko")
81b9bbbd 542 (version "1.16.0")
429fdea1
ED
543 (source
544 (origin
545 (method url-fetch)
81b9bbbd 546 (uri (pypi-uri "paramiko" version))
429fdea1
ED
547 (sha256
548 (base32
81b9bbbd 549 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 550 (build-system python-build-system)
49910e6a
MB
551 (arguments
552 '(;; FIXME: One test fails with "EOFError not raised by connect".
553 #:tests? #f))
554 ;; #:phases
555 ;; (modify-phases %standard-phases
556 ;; (replace 'check
557 ;; (lambda _
558 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 559 (propagated-inputs
f22efa01
HG
560 `(("python-pycrypto" ,python-pycrypto)
561 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
562 (home-page "http://www.paramiko.org/")
563 (synopsis "SSHv2 protocol library")
564 (description "Paramiko is a python implementation of the SSHv2 protocol,
565providing both client and server functionality. While it leverages a Python C
566extension for low level cryptography (PyCrypto), Paramiko itself is a pure
567Python interface around SSH networking concepts.")
3f641af0 568 (license license:lgpl2.1+)))
429fdea1
ED
569
570(define-public python2-paramiko
571 (package-with-python2 python-paramiko))
572
573
de73dbf6
ED
574(define-public python-httplib2
575 (package
576 (name "python-httplib2")
286f1bac 577 (version "0.9.2")
de73dbf6
ED
578 (source
579 (origin
580 (method url-fetch)
286f1bac 581 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
582 (sha256
583 (base32
286f1bac 584 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 585 (build-system python-build-system)
286f1bac 586 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
587 (synopsis "Comprehensive HTTP client library")
588 (description
589 "A comprehensive HTTP client library supporting many features left out of
590other HTTP libraries.")
591 (license license:expat)))
592
593(define-public python2-httplib2
594 (package-with-python2 python-httplib2))
595
67039875
ED
596(define-public python-ecdsa
597 (package
598 (name "python-ecdsa")
599 (version "0.13")
600 (source
601 (origin
602 (method url-fetch)
603 (uri (string-append
604 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
605 version
606 ".tar.gz"))
607 (sha256
608 (base32
609 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
610 (build-system python-build-system)
67039875
ED
611 (inputs
612 `(("openssl" ,openssl)))
613 (home-page
614 "http://github.com/warner/python-ecdsa")
615 (synopsis
616 "ECDSA cryptographic signature library (pure python)")
617 (description
618 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
619Curve Digital Signature Algorithm), implemented purely in Python. With this
620library, you can quickly create keypairs (signing key and verifying key), sign
621messages, and verify the signatures. The keys and signatures are very short,
622making them easy to handle and incorporate into other protocols.")
623 (license license:expat)))
624
625(define-public python2-ecdsa
626 (package-with-python2 python-ecdsa))
627
52323f32
ED
628(define-public python-ccm
629 (package
630 (name "python-ccm")
db5567f7 631 (version "2.1.6")
52323f32
ED
632 (source
633 (origin
634 (method url-fetch)
db5567f7 635 (uri (pypi-uri "ccm" version))
52323f32
ED
636 (sha256
637 (base32
db5567f7 638 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 639 (build-system python-build-system)
f22efa01 640 (propagated-inputs
52323f32 641 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
642 ;; Not listed in setup.py, but used in ccmlib/node.py for full
643 ;; functionality
644 ("python-psutil" ,python-psutil)
52323f32
ED
645 ("python-six" ,python-six)))
646 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
647 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
648localhost")
649 (description "Cassandra Cluster Manager is a development tool for testing
650local Cassandra clusters. It creates, launches and removes Cassandra clusters
651on localhost.")
3f641af0 652 (license license:asl2.0)))
52323f32
ED
653
654(define-public python2-ccm
655 (package-with-python2 python-ccm))
656
89114f39 657(define-public python-pytz
acc26ff1 658 (package
89114f39 659 (name "python-pytz")
a5f92ca0 660 (version "2016.10")
acc26ff1
CR
661 (source
662 (origin
663 (method url-fetch)
61c9babb 664 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
665 (sha256
666 (base32
a5f92ca0 667 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 668 (build-system python-build-system)
8498b8cf 669 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 670 (home-page "http://pythonhosted.org/pytz")
9e771e3b 671 (synopsis "Python timezone library")
acc26ff1
CR
672 (description
673 "This library allows accurate and cross platform timezone calculations
674using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 675 (license license:expat)))
5ace6e2f 676
89114f39 677(define-public python2-pytz
11bb85a1 678 (package-with-python2 python-pytz))
89114f39 679
fc50e9c6 680
89114f39 681(define-public python-babel
5ace6e2f 682 (package
89114f39 683 (name "python-babel")
ffb1e98d 684 (version "2.3.4")
5ace6e2f
CR
685 (source
686 (origin
687 (method url-fetch)
b850a6d8 688 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
689 (sha256
690 (base32
ffb1e98d 691 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 692 (build-system python-build-system)
f22efa01 693 (propagated-inputs
f3b98f4f 694 `(("python-pytz" ,python-pytz)))
8498b8cf 695 (arguments `(#:tests? #f)) ; no test target
e1804763 696 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
697 (synopsis
698 "Tools for internationalizing Python applications")
699 (description
700 "Babel is composed of two major parts:
701- tools to build and work with gettext message catalogs
702- a Python interface to the CLDR (Common Locale Data Repository), providing
703access to various locale display names, localized number and date formatting,
704etc. ")
3f641af0 705 (license license:bsd-3)))
89114f39
AE
706
707(define-public python2-babel
11bb85a1 708 (package-with-python2 python-babel))
73adf220 709
ed377cc6
RW
710(define-public python2-backport-ssl-match-hostname
711 (package
712 (name "python2-backport-ssl-match-hostname")
f2d06d46 713 (version "3.5.0.1")
ed377cc6
RW
714 (source
715 (origin
716 (method url-fetch)
717 (uri (string-append
718 "https://pypi.python.org/packages/source/b/"
719 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
720 version ".tar.gz"))
721 (sha256
722 (base32
f2d06d46 723 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 724 (build-system python-build-system)
f2d06d46
EF
725 (arguments
726 `(#:python ,python-2
727 #:tests? #f)) ; no test target
f2d06d46
EF
728 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
729 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
730 (description
731 "This backport brings the ssl.match_hostname() function to users of
732earlier versions of Python. The function checks the hostname in the
733certificate returned by the server to which a connection has been established,
734and verifies that it matches the intended target hostname.")
3f641af0 735 (license license:psfl)))
ed377cc6 736
d205f895
TD
737(define-public python-hdf4
738 (package
739 (name "python-hdf4")
740 (version "0.9")
741 (source
742 (origin
743 (method url-fetch)
744 (uri (pypi-uri name version))
745 (sha256
746 (base32
747 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
748 (build-system python-build-system)
749 (native-inputs `(("nose" ,python-nose)))
750 (propagated-inputs `(("numpy" ,python-numpy)))
751 (inputs
752 `(("hdf4" ,hdf4)
753 ("libjpeg" ,libjpeg)
754 ("zlib" ,zlib)))
755 (arguments
756 `(#:phases
757 (modify-phases %standard-phases
758 (replace 'check
759 (lambda _
760 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
761 ;; on to import numpy. Somehow this works on their CI system.
762 ;; Let's just manage PYTHONPATH here instead.
763 (substitute* "runexamples.sh"
764 (("export PYTHONPATH=.*") ""))
765 (setenv "PYTHONPATH"
766 (string-append (getcwd) ":"
767 (getenv "PYTHONPATH")))
768 (and (zero? (system* "./runexamples.sh"))
769 (zero? (system* "nosetests" "-v"))))))))
770 (home-page "https://github.com/fhs/python-hdf4")
771 (synopsis "Python interface to the NCSA HDF4 library")
772 (description
773 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
774which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
775NetCDF files can also be read and modified. Python-HDF4 is a fork of
776@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
777 (license license:expat)))
778
779(define-public python2-hdf4
780 (package-with-python2 python-hdf4))
781
ef5cbf9b
RW
782(define-public python-h5py
783 (package
784 (name "python-h5py")
fe147c41 785 (version "2.6.0")
ef5cbf9b
RW
786 (source
787 (origin
788 (method url-fetch)
fe147c41 789 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
790 (sha256
791 (base32
fe147c41 792 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 793 (build-system python-build-system)
797e1401
RW
794 (arguments
795 `(#:tests? #f ; no test target
796 #:phases
797 (modify-phases %standard-phases
798 (add-after 'unpack 'fix-hdf5-paths
799 (lambda* (#:key inputs #:allow-other-keys)
800 (let ((prefix (assoc-ref inputs "hdf5")))
801 (substitute* "setup_build.py"
802 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']"))
804 (("'/opt/local/include', '/usr/local/include'")
805 (string-append "'" prefix "/include" "'")))
806 (substitute* "setup_configure.py"
807 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
808 (string-append "['" prefix "/lib" "']")))
809 #t))))))
3c4010b1 810 (propagated-inputs
69866690
HG
811 `(("python-six" ,python-six)
812 ("python-numpy" ,python-numpy)))
ef5cbf9b 813 (inputs
69866690 814 `(("hdf5" ,hdf5)))
ef5cbf9b 815 (native-inputs
fe147c41
EF
816 `(("python-cython" ,python-cython)
817 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
818 (home-page "http://www.h5py.org/")
819 (synopsis "Read and write HDF5 files from Python")
820 (description
821 "The h5py package provides both a high- and low-level interface to the
822HDF5 library from Python. The low-level interface is intended to be a
823complete wrapping of the HDF5 API, while the high-level component supports
824access to HDF5 files, datasets and groups using established Python and NumPy
825concepts.")
9820a028 826 (license license:bsd-3)))
ef5cbf9b
RW
827
828(define-public python2-h5py
9820a028 829 (package-with-python2 python-h5py))
ef5cbf9b 830
ea8450c8
TD
831(define-public python-netcdf4
832 (package
833 (name "python-netcdf4")
d5a97839 834 (version "1.2.7")
ea8450c8
TD
835 (source
836 (origin
837 (method url-fetch)
838 (uri (pypi-uri "netCDF4" version))
839 (sha256
840 (base32
d5a97839 841 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
842 (build-system python-build-system)
843 (native-inputs
844 `(("python-cython" ,python-cython)))
845 (propagated-inputs
846 `(("python-numpy" ,python-numpy)))
847 (inputs
848 `(("netcdf" ,netcdf)
849 ("hdf4" ,hdf4)
850 ("hdf5" ,hdf5)))
851 (arguments
852 '(#:phases
853 (modify-phases %standard-phases
854 (replace 'check
855 (lambda _
856 (setenv "NO_NET" "1") ; disable opendap tests
857 (with-directory-excursion "test"
858 (setenv "PYTHONPATH" ; find and add the library we just built
859 (string-append
860 (car (find-files "../build" "lib.*"
861 #:directories? #:t
862 #:fail-on-error? #:t))
863 ":" (getenv "PYTHONPATH")))
864 (zero? (system* "python" "run_all.py"))))))))
865 (home-page
866 "https://github.com/Unidata/netcdf4-python")
867 (synopsis "Python/numpy interface to the netCDF library")
868 (description "Netcdf4-python is a Python interface to the netCDF C
869library. netCDF version 4 has many features not found in earlier
870versions of the library and is implemented on top of HDF5. This module
871can read and write files in both the new netCDF 4 and the old netCDF 3
872format, and can create files that are readable by HDF5 clients. The
873API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
874to users of that module.")
875 ;; The software is mainly ISC, but includes some files covered
876 ;; by the Expat license.
877 (license (list license:isc license:expat))))
878
879(define-public python2-netcdf4
880 (package-with-python2 python-netcdf4))
881
c1448c69
EB
882(define-public python-lockfile
883 (package
884 (name "python-lockfile")
692add53 885 (version "0.12.2")
c1448c69
EB
886 (source
887 (origin
888 (method url-fetch)
889 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
890 "lockfile-" version ".tar.gz"))
891 (sha256
892 (base32
692add53 893 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
894 (build-system python-build-system)
895 (arguments '(#:test-target "check"))
692add53
BW
896 (native-inputs
897 `(("python-pbr" ,python-pbr)))
6a8f26a4 898 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
899 (synopsis "Platform-independent file locking module")
900 (description
901 "The lockfile package exports a LockFile class which provides a simple
902API for locking files.")
f210e944 903 (license license:expat)))
c1448c69
EB
904
905(define-public python2-lockfile
f210e944 906 (package-with-python2 python-lockfile))
c1448c69 907
5a1a4bf6
EB
908(define-public python-mock
909 (package
910 (name "python-mock")
911 (version "1.0.1")
912 (source
913 (origin
914 (method url-fetch)
6b7877e1 915 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
916 (sha256
917 (base32
918 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
919 (build-system python-build-system)
920 (arguments '(#:test-target "check"))
6b7877e1 921 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 922 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
923 (description
924 "Mock is a library for testing in Python. It allows you to replace parts
925of your system under test with mock objects and make assertions about how they
926have been used.")
bd3fa666 927 (license license:expat)))
5a1a4bf6
EB
928
929(define-public python2-mock
930 (package-with-python2 python-mock))
931
fc50e9c6 932
73adf220
AE
933(define-public python-setuptools
934 (package
935 (name "python-setuptools")
d660f7be 936 (version "31.0.0")
73adf220
AE
937 (source
938 (origin
939 (method url-fetch)
d660f7be 940 (uri (pypi-uri "setuptools" version))
73adf220
AE
941 (sha256
942 (base32
d660f7be 943 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
944 (modules '((guix build utils)))
945 (snippet
946 '(begin
947 ;; Remove included binaries which are used to build self-extracting
948 ;; installers for Windows.
949 ;; TODO: Find some way to build them ourself so we can include them.
950 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
951 #t))))
73adf220 952 (build-system python-build-system)
d3d656c5
AE
953 ;; FIXME: Tests require pytest, which itself relies on setuptools.
954 ;; One could bootstrap with an internal untested setuptools.
73adf220 955 (arguments
824af8ca 956 `(#:tests? #f))
73adf220
AE
957 (home-page "https://pypi.python.org/pypi/setuptools")
958 (synopsis
959 "Library designed to facilitate packaging Python projects")
960 (description
961 "Setuptools is a fully-featured, stable library designed to facilitate
962packaging Python projects, where packaging includes:
963Python package and module definitions,
964distribution package metadata,
965test hooks,
966project installation,
967platform-specific details,
968Python 3 support.")
d660f7be
MB
969 ;; TODO: setuptools now bundles the following libraries:
970 ;; packaging, pyparsing, six and appdirs. How to unbundle?
971 (license (list license:psfl ; setuptools itself
972 license:expat ; six, appdirs, pyparsing
973 license:asl2.0 ; packaging is dual ASL2/BSD-2
974 license:bsd-2))))
73adf220
AE
975
976(define-public python2-setuptools
977 (package-with-python2 python-setuptools))
fc50e9c6 978
aa21c764 979;;; Pycrypto is abandoned upstream:
1194575b 980;;;
aa21c764 981;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 982;;;
aa21c764 983;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
984(define-public python-pycrypto
985 (package
986 (name "python-pycrypto")
987 (version "2.6.1")
988 (source
989 (origin
990 (method url-fetch)
aa21c764
LF
991 (uri (pypi-uri "pycrypto" version))
992 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
993 (sha256
994 (base32
995 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
996 (build-system python-build-system)
cafc3f5a
EB
997 (inputs
998 `(("python" ,python)
999 ("gmp" ,gmp)))
1000 (arguments
1001 `(#:phases
1002 (alist-cons-before
1003 'build 'set-build-env
1004 ;; pycrypto runs an autoconf configure script behind the scenes
1005 (lambda _
1006 (setenv "CONFIG_SHELL" (which "bash")))
1007 %standard-phases)))
1008 (home-page "http://www.pycrypto.org/")
1009 (synopsis "Cryptographic modules for Python")
1010 (description
1011 "Pycrypto is a collection of both secure hash functions (such as SHA256
1012and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1013etc.). The package is structured to make adding new modules easy.")
3f641af0 1014 (license license:public-domain)))
cafc3f5a 1015
345f0611 1016(define-public python2-pycrypto
1c0059da
EF
1017 (let ((pycrypto (package-with-python2 python-pycrypto)))
1018 (package (inherit pycrypto)
1019 (inputs
1020 `(("python" ,python-2)
1021 ,@(alist-delete
1022 "python"
1023 (package-inputs pycrypto)))))))
345f0611 1024
de959250 1025(define-public python-eventlet
1026 (package
1027 (name "python-eventlet")
1028 (version "0.20.1")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "eventlet" version))
1033 (sha256
1034 (base32
1035 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1036 (build-system python-build-system)
1037 (propagated-inputs
1038 `(("python-greenlet" ,python-greenlet)))
1039 (home-page "http://eventlet.net")
1040 (synopsis "Concurrent networking library for Python")
1041 (description
1042 "Eventlet is a concurrent networking library for Python that
1043allows you to change how you run your code, not how you write it.
1044It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1045Coroutines ensure that the developer uses a blocking style of programming
1046that is similar to threading, but provide the benefits of non-blocking I/O.
1047The event dispatch is implicit, which means you can easily use @code{Eventlet}
1048from the Python interpreter, or as a small part of a larger application.")
1049 (license license:expat)))
1050
1051(define-public python2-eventlet
1052 (let ((base (package-with-python2
1053 (strip-python2-variant python-eventlet))))
1054 (package (inherit base)
1055 (propagated-inputs
1056 `(("python2-enum34" ,python2-enum34)
1057 ,@(package-propagated-inputs base))))))
1058
cafc3f5a
EB
1059(define-public python-keyring
1060 (package
1061 (name "python-keyring")
13f3ff35 1062 (version "8.7")
cafc3f5a
EB
1063 (source
1064 (origin
1065 (method url-fetch)
664e6c3a 1066 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1067 (sha256
1068 (base32
13f3ff35 1069 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1070 (build-system python-build-system)
1071 (native-inputs
13f3ff35 1072 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1073 (propagated-inputs
cafc3f5a
EB
1074 `(("python-pycrypto" ,python-pycrypto)))
1075 (arguments
664e6c3a 1076 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1077 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1078 (synopsis "Store and access your passwords safely")
1079 (description
1080 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1081service from python. It can be used in any application that needs safe
cafc3f5a
EB
1082password storage.")
1083 ;; "MIT" and PSF dual license
f210e944 1084 (license license:x11)))
cafc3f5a 1085
d7af1069 1086(define-public python2-keyring
f210e944 1087 (package-with-python2 python-keyring))
d7af1069 1088
a480bc41
EB
1089(define-public python-six
1090 (package
1091 (name "python-six")
b6ab89ef 1092 (version "1.10.0")
a480bc41
EB
1093 (source
1094 (origin
1095 (method url-fetch)
b6ab89ef 1096 (uri (pypi-uri "six" version))
a480bc41
EB
1097 (sha256
1098 (base32
b6ab89ef 1099 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1100 (build-system python-build-system)
4fd129ee
MB
1101 (native-inputs
1102 `(("python-py" ,python-py)
1103 ("python-pytest" ,python-pytest)))
a480bc41
EB
1104 (home-page "http://pypi.python.org/pypi/six/")
1105 (synopsis "Python 2 and 3 compatibility utilities")
1106 (description
35b9e423 1107 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1108functions for smoothing over the differences between the Python versions with
1109the goal of writing Python code that is compatible on both Python versions.
35b9e423 1110Six supports every Python version since 2.5. It is contained in only one
a480bc41 1111Python file, so it can be easily copied into your project.")
3f641af0 1112 (license license:x11)))
a480bc41 1113
0c20025c
AE
1114(define-public python2-six
1115 (package-with-python2 python-six))
1116
22d7360b 1117(define-public python-dateutil
cafc3f5a
EB
1118 (package
1119 (name "python-dateutil")
6bd9ad69 1120 (version "2.5.3")
cafc3f5a
EB
1121 (source
1122 (origin
1123 (method url-fetch)
394b8060 1124 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1125 (sha256
1126 (base32
6bd9ad69 1127 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
cafc3f5a 1128 (build-system python-build-system)
f22efa01 1129 (propagated-inputs
394b8060 1130 `(("python-six" ,python-six)))
b5a5fb19 1131 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1132 (synopsis "Extensions to the standard datetime module")
1133 (description
1134 "The dateutil module provides powerful extensions to the standard
1135datetime module, available in Python 2.3+.")
f210e944 1136 (license license:bsd-3)))
cafc3f5a 1137
fc50e9c6
AE
1138(define-public python2-dateutil
1139 (package-with-python2 python-dateutil))
1d08c01f 1140
cafc3f5a
EB
1141(define-public python-parsedatetime
1142 (package
1143 (name "python-parsedatetime")
28958b64 1144 (version "2.3")
cafc3f5a
EB
1145 (source
1146 (origin
1147 (method url-fetch)
eebf6f01 1148 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1149 (sha256
1150 (base32
28958b64 1151 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
cafc3f5a
EB
1152 (build-system python-build-system)
1153 (native-inputs
eebf6f01 1154 `(("python-nose" ,python-nose)
28958b64
LC
1155 ("python-pyicu" ,python-pyicu)
1156 ("python-pytest" ,python-pytest)
1157 ("python-pytest-runner" ,python-pytest-runner)))
1158 (propagated-inputs
1159 `(("python-future" ,python-future)))
cafc3f5a
EB
1160 (home-page "http://github.com/bear/parsedatetime/")
1161 (synopsis
1162 "Parse human-readable date/time text")
1163 (description
e881752c 1164 "Parse human-readable date/time text.")
f210e944 1165 (license license:asl2.0)))
cafc3f5a 1166
38b8f9b2 1167(define-public python2-parsedatetime
f210e944 1168 (package-with-python2 python-parsedatetime))
38b8f9b2 1169
d072efcb
RW
1170(define-public python-pandas
1171 (package
1172 (name "python-pandas")
8e086048 1173 (version "0.19.2")
d072efcb
RW
1174 (source
1175 (origin
1b96f069 1176 (method url-fetch)
8e086048 1177 (uri (pypi-uri "pandas" version))
1b96f069 1178 (sha256
b03ee02f
MB
1179 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1180 (patches
1181 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1182 (build-system python-build-system)
d072efcb 1183 (propagated-inputs
f22efa01
HG
1184 `(("python-numpy" ,python-numpy)
1185 ("python-pytz" ,python-pytz)
22d7360b 1186 ("python-dateutil" ,python-dateutil)))
d072efcb 1187 (native-inputs
abcc7a0e
HG
1188 `(("python-nose" ,python-nose)
1189 ("python-cython" ,python-cython)))
d072efcb
RW
1190 (home-page "http://pandas.pydata.org")
1191 (synopsis "Data structures for data analysis, time series, and statistics")
1192 (description
1193 "Pandas is a Python package providing fast, flexible, and expressive data
1194structures designed to make working with structured (tabular,
1195multidimensional, potentially heterogeneous) and time series data both easy
1196and intuitive. It aims to be the fundamental high-level building block for
1197doing practical, real world data analysis in Python.")
f210e944 1198 (license license:bsd-3)))
d072efcb
RW
1199
1200(define-public python2-pandas
f210e944 1201 (package-with-python2 python-pandas))
d072efcb 1202
cafc3f5a
EB
1203(define-public python-tzlocal
1204 (package
1205 (name "python-tzlocal")
ed80839b 1206 (version "1.2.2")
cafc3f5a
EB
1207 (source
1208 (origin
1209 (method url-fetch)
226d3331 1210 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1211 (sha256
1212 (base32
ed80839b 1213 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1214 (build-system python-build-system)
f22efa01
HG
1215 (propagated-inputs
1216 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1217 (home-page "https://github.com/regebro/tzlocal")
1218 (synopsis
35b9e423 1219 "Local timezone information for Python")
cafc3f5a
EB
1220 (description
1221 "Tzlocal returns a tzinfo object with the local timezone information.
1222This module attempts to fix a glaring hole in pytz, that there is no way to
1223get the local timezone information, unless you know the zoneinfo name, and
1224under several distributions that's hard or impossible to figure out.")
3f641af0 1225 (license license:cc0)))
cafc3f5a 1226
1d08c01f
AE
1227(define-public python2-pysqlite
1228 (package
1229 (name "python2-pysqlite")
e80aaeb4 1230 (version "2.8.3")
1d08c01f
AE
1231 (source
1232 (origin
1233 (method url-fetch)
fe476868 1234 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1235 (sha256
1236 (base32
e80aaeb4 1237 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1238 (build-system python-build-system)
1239 (inputs
1240 `(("sqlite" ,sqlite)))
1241 (arguments
1242 `(#:python ,python-2 ; incompatible with Python 3
1243 #:tests? #f)) ; no test target
fe476868 1244 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1245 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1246 (description
1247 "Pysqlite provides SQLite bindings for Python that comply to the
1248Database API 2.0T.")
ed0cdf83 1249 (license license:zlib)))
1d08c01f 1250
2875caf5
AE
1251
1252(define-public python2-mechanize
1253 (package
1254 (name "python2-mechanize")
1255 (version "0.2.5")
1256 (source
1257 (origin
1258 (method url-fetch)
1259 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1260 version ".tar.gz"))
1261 (sha256
1262 (base32
1263 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1264 (build-system python-build-system)
2875caf5
AE
1265 (arguments
1266 `(#:python ,python-2 ; apparently incompatible with Python 3
1267 #:tests? #f))
1268 ;; test fails with message
1269 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1270 ;; (python-3.3.2) or
1271 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1272 ;; (python-2.7.5).
1273 ;; The source code is from March 2011 and probably not up-to-date
1274 ;; with respect to python unit tests.
1275 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1276 (synopsis
1277 "Stateful programmatic web browsing in Python")
1278 (description
1279 "Mechanize implements stateful programmatic web browsing in Python,
1280after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1281 (license (license:non-copyleft
1282 "file://COPYING"
1283 "See COPYING in the distribution."))))
2875caf5 1284
0352532e
AE
1285
1286(define-public python-simplejson
1287 (package
1288 (name "python-simplejson")
b2e6e150 1289 (version "3.10.0")
0352532e
AE
1290 (source
1291 (origin
1292 (method url-fetch)
988d1bad 1293 (uri (pypi-uri "simplejson" version))
0352532e
AE
1294 (sha256
1295 (base32
b2e6e150 1296 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1297 (build-system python-build-system)
1298 (home-page "http://simplejson.readthedocs.org/en/latest/")
1299 (synopsis
1300 "Json library for Python")
1301 (description
e881752c
AK
1302 "JSON (JavaScript Object Notation) is a subset of JavaScript
1303syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1304format.
0352532e
AE
1305
1306Simplejson exposes an API familiar to users of the standard library marshal
1307and pickle modules. It is the externally maintained version of the json
1308library contained in Python 2.6, but maintains compatibility with Python 2.5
1309and (currently) has significant performance advantages, even without using
1310the optional C extension for speedups. Simplejson is also supported on
1311Python 3.3+.")
3f641af0 1312 (license license:x11)))
0352532e
AE
1313
1314(define-public python2-simplejson
1315 (package-with-python2 python-simplejson))
421a80a2
AE
1316
1317
ed07b08d 1318(define-public python-pyicu
421a80a2 1319 (package
ed07b08d 1320 (name "python-pyicu")
2e161eaf 1321 (version "1.9.5")
421a80a2
AE
1322 (source
1323 (origin
1324 (method url-fetch)
2e161eaf 1325 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1326 (sha256
1327 (base32
2e161eaf 1328 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1329 (build-system python-build-system)
dc027d40
MB
1330 (arguments
1331 '(#:phases
1332 (modify-phases %standard-phases
1333 (add-before 'check 'delete-failing-test
1334 (lambda _
1335 ;; XXX: These tests require locales that are unavailable
1336 ;; in the build environment.
1337 (delete-file "test/test_DateTimeParserGenerator.py")
1338 #t)))))
421a80a2
AE
1339 (inputs
1340 `(("icu4c" ,icu4c)))
421a80a2 1341 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1342 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1343 (description
1344 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1345 (license license:x11)))
ed07b08d
LF
1346
1347(define-public python2-pyicu
f210e944 1348 (package-with-python2 python-pyicu))
cc20a22a
LC
1349
1350(define-public python2-dogtail
1351 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1352 ;; spaces in indentation" with Python 3.
1353 (package
1354 (name "python2-dogtail")
1355 (version "0.8.2")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "https://fedorahosted.org/released/dogtail/dogtail-"
1360 version ".tar.gz"))
1361 (sha256
1362 (base32
1363 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1364 (build-system python-build-system)
1365 (arguments `(#:python ,python-2
1366 #:tests? #f)) ; invalid command "test"
1367 (home-page "https://fedorahosted.org/dogtail/")
1003fbcf 1368 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1369 (description
35b9e423 1370 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1371It uses Accessibility (a11y) technologies to communicate with desktop
1372applications. dogtail scripts are written in Python and executed like any
1373other Python program.")
3f641af0 1374 (license license:gpl2+)))
515e6878 1375
011b18c3
LC
1376(define-public python2-empy
1377 (package
1378 (name "python2-empy")
1379 (version "3.3")
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1383 version ".tar.gz"))
1384 (sha256
1385 (base32
1386 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1387 (build-system python-build-system)
1388 (arguments
1389 `(#:python ,python-2
1390 #:phases (alist-replace
1391 'check
1392 (lambda _
1393 (zero? (system* "./test.sh")))
1394 %standard-phases)))
1395 (home-page "http://www.alcyone.com/software/empy/")
1396 (synopsis "Templating system for Python")
1397 (description
1398 "EmPy is a system for embedding Python expressions and statements in
1399template text; it takes an EmPy source file, processes it, and produces
1400output. This is accomplished via expansions, which are special signals to the
1cd4027c 1401EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1402EmPy can expand arbitrary Python expressions and statements in this way, as
1403well as a variety of special forms. Textual data not explicitly delimited in
1404this way is sent unaffected to the output, allowing Python to be used in
1405effect as a markup language. Also supported are callbacks via hooks,
1406recording and playback via diversions, and dynamic, chainable filters. The
1407system is highly configurable via command line options and embedded
1408commands.")
3f641af0 1409 (license license:lgpl2.1+)))
011b18c3 1410
8deeda0c
LC
1411(define-public python2-element-tree
1412 (package
1413 (name "python2-element-tree")
1414 (version "1.2.6")
1415 (source (origin
1416 (method url-fetch)
1417 (uri (string-append
1418 "http://effbot.org/media/downloads/elementtree-"
1419 version "-20050316.tar.gz"))
1420 (sha256
1421 (base32
1422 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1423 (build-system python-build-system)
1424 (arguments
1425 `(#:python ,python-2 ; seems to be part of Python 3
1426 #:tests? #f)) ; no 'test' sub-command
1427 (synopsis "Toolkit for XML processing in Python")
1428 (description
1429 "ElementTree is a Python library supporting lightweight XML processing.")
1430 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1431 (license (license:x11-style
1432 "http://docs.python.org/2/license.html"
1433 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1434
1435(define-public python2-pybugz
1436 (package
1437 (name "python2-pybugz")
1438 (version "0.6.11")
1439 (source (origin
1440 (method url-fetch)
1441 (uri (string-append
1442 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1443 version ".tar.gz"))
1444 (sha256
1445 (base32
6f194a1e 1446 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1447 (patches (search-patches "pybugz-stty.patch"
1448 "pybugz-encode-error.patch"))))
8deeda0c
LC
1449 (build-system python-build-system)
1450 (arguments
1451 `(#:python ,python-2 ; SyntaxError with Python 3
1452 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1453 (propagated-inputs
1454 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1455 (synopsis "Python and command-line interface to Bugzilla")
1456 (description
1457 "PyBugz is a Python library and command-line tool to query the Bugzilla
1458bug tracking system. It is meant as an aid to speed up interaction with the
1459bug tracker.")
1460 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1461 (license license:gpl2)))
8deeda0c 1462
a480bc41
EB
1463(define-public python-enum34
1464 (package
1465 (name "python-enum34")
d39ae1e5 1466 (version "1.1.0")
a480bc41
EB
1467 (source
1468 (origin
1469 (method url-fetch)
d39ae1e5 1470 (uri (pypi-uri "enum34" version))
a480bc41
EB
1471 (sha256
1472 (base32
d39ae1e5 1473 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1474 (build-system python-build-system)
a480bc41
EB
1475 (arguments
1476 `(#:phases
1477 (alist-replace
1478 'check
1479 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1480 %standard-phases)))
1481 (home-page "https://pypi.python.org/pypi/enum34")
1482 (synopsis "Backported Python 3.4 Enum")
1483 (description
1484 "Enum34 is the new Python stdlib enum module available in Python 3.4
1485backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1486 (license license:bsd-3)))
a480bc41 1487
820acd1b
LF
1488(define-public python2-enum34
1489 (package-with-python2 python-enum34))
1490
a480bc41
EB
1491(define-public python-parse-type
1492 (package
1493 (name "python-parse-type")
1494 (version "0.3.4")
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (string-append "https://pypi.python.org/packages/source/p/"
1499 "parse_type/parse_type-" version ".tar.gz"))
1500 (sha256
1501 (base32
1502 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1503 (build-system python-build-system)
f22efa01 1504 (propagated-inputs
f3b98f4f 1505 `(("python-six" ,python-six)
68f1cdec 1506 ("python-parse" ,python-parse)))
a480bc41
EB
1507 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1508 (home-page "https://github.com/jenisys/parse_type")
1509 (synopsis "Extended parse module")
1510 (description
1511 "Parse_type extends the python parse module.")
3f641af0 1512 (license license:bsd-3)))
a480bc41
EB
1513
1514(define-public python-parse
1515 (package
1516 (name "python-parse")
eb3d3503 1517 (version "1.6.6")
a480bc41
EB
1518 (source
1519 (origin
1520 (method url-fetch)
eb3d3503 1521 (uri (pypi-uri "parse" version))
a480bc41
EB
1522 (sha256
1523 (base32
aa6c09ed
EF
1524 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1525 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:phases
f9a65318
EF
1529 (modify-phases %standard-phases
1530 (replace 'check
1531 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1532 (home-page "https://github.com/r1chardj0n3s/parse")
1533 (synopsis "Parse strings")
1534 (description
1535 "Parse strings using a specification based on the Python format()
1536syntax.")
3f641af0 1537 (license license:x11)))
a480bc41 1538
d3eff97a
JL
1539(define-public python-polib
1540 (package
1541 (name "python-polib")
1542 (version "1.0.8")
1543 (source (origin
1544 (method url-fetch)
1545 (uri (pypi-uri "polib" version))
1546 (sha256
1547 (base32
1548 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1549 (build-system python-build-system)
1550 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1551 (synopsis "Manipulate, create and modify gettext files")
1552 (description "Polib can manipulate any gettext format (po, pot and mo)
1553files. It can be used to create po files from scratch or to modify
1554existing ones.")
1555 (license license:expat)))
1556
1557(define-public python2-polib
1558 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1559 (package
1560 (inherit base)
1561 (arguments `(,@(package-arguments base)
1562 ;; Tests don't work with python2.
1563 #:tests? #f)))))
a480bc41 1564
515e6878
LC
1565(define-public scons
1566 (package
1567 (name "scons")
a3f61425 1568 (version "2.3.4")
515e6878
LC
1569 (source (origin
1570 (method url-fetch)
de67e922
LF
1571 (uri (string-append "mirror://sourceforge/scons/scons/" version
1572 "/scons-" version ".tar.gz"))
515e6878
LC
1573 (sha256
1574 (base32
a3f61425 1575 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1576 (build-system python-build-system)
1577 (arguments
1578 ;; With Python 3.x, fails to build with a syntax error.
1579 `(#:python ,python-2
b3e8b4bd 1580 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1581 #:tests? #f)) ; no 'python setup.py test' command
1582 (home-page "http://scons.org/")
1583 (synopsis "Software construction tool written in Python")
1584 (description
1585 "SCons is a software construction tool. Think of SCons as an improved,
1586cross-platform substitute for the classic Make utility with integrated
1587functionality similar to autoconf/automake and compiler caches such as ccache.
1588In short, SCons is an easier, more reliable and faster way to build
1589software.")
3f641af0 1590 (license license:x11)))
011b18c3 1591
c15a5c0e
DT
1592(define-public python-extras
1593 (package
1594 (name "python-extras")
1595 (version "0.0.3")
1596 (source
1597 (origin
1598 (method url-fetch)
1599 (uri (string-append
1600 "https://pypi.python.org/packages/source/e/extras/extras-"
1601 version ".tar.gz"))
1602 (sha256
1603 (base32
1604 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1605 (build-system python-build-system)
c15a5c0e
DT
1606 (arguments
1607 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1608 '(#:tests? #f))
1609 (home-page "https://github.com/testing-cabal/extras")
1610 (synopsis "Useful extensions to the Python standard library")
1611 (description
1612 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1613 (license license:expat)))
c15a5c0e
DT
1614
1615(define-public python2-extras
1616 (package-with-python2 python-extras))
1617
56ea0efd
DT
1618(define-public python-mimeparse
1619 (package
1620 (name "python-mimeparse")
1621 (version "0.1.4")
1622 (source
1623 (origin
1624 (method url-fetch)
1625 (uri (string-append
1626 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1627 version ".tar.gz"))
1628 (sha256
1629 (base32
1630 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1631 (build-system python-build-system)
56ea0efd
DT
1632 (arguments
1633 '(#:tests? #f)) ; no setup.py test command
1634 (home-page
1635 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1636 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1637 (description
1638 "Mimeparse provides basic functions for parsing MIME type names and
1639matching them against a list of media-ranges.")
bd3fa666 1640 (license license:expat)))
56ea0efd
DT
1641
1642(define-public python2-mimeparse
1643 (package-with-python2 python-mimeparse))
1644
4435427e
DT
1645(define-public python-nose
1646 (package
1647 (name "python-nose")
f7cb9841 1648 (version "1.3.7")
4435427e
DT
1649 (source
1650 (origin
1651 (method url-fetch)
f7cb9841 1652 (uri (pypi-uri "nose" version))
4435427e
DT
1653 (sha256
1654 (base32
f7cb9841 1655 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1656 (build-system python-build-system)
4435427e
DT
1657 (arguments
1658 '(#:tests? #f)) ; FIXME: test suite fails
1659 (home-page "http://readthedocs.org/docs/nose/")
1660 (synopsis "Python testing library")
1661 (description
1662 "Nose extends the unittest library to make testing easier.")
3f641af0 1663 (license license:lgpl2.0+)))
4435427e
DT
1664
1665(define-public python2-nose
1666 (package-with-python2 python-nose))
1667
0aea283a
EF
1668(define-public python-nose2
1669 (package
1670 (name "python-nose2")
1671 (version "0.6.5")
1672 (source
1673 (origin
1674 (method url-fetch)
1675 (uri (pypi-uri "nose2" version))
1676 (sha256
1677 (base32
1678 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1679 (build-system python-build-system)
1680 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1681 (propagated-inputs
0aea283a
EF
1682 `(("python-cov-core" ,python-cov-core)
1683 ("python-pytest-cov" ,python-pytest-cov)
1684 ("python-six" ,python-six)))
1685 (home-page "https://github.com/nose-devs/nose2")
1686 (synopsis "Next generation of nicer testing for Python")
1687 (description
1688 "Nose2 is the next generation of nicer testing for Python, based on the
1689plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1690better plugin api, being easier for users to configure, and simplifying internal
1691interfaces and processes.")
1692 (license license:bsd-2)))
1693
1694(define-public python2-nose2
1695 (package-with-python2 python-nose2))
1696
6cd9c356
DT
1697(define-public python-unittest2
1698 (package
1699 (name "python-unittest2")
1700 (version "0.5.1")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1706 version ".tar.gz"))
1707 (sha256
1708 (base32
1709 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1710 (build-system python-build-system)
6cd9c356
DT
1711 (home-page "http://pypi.python.org/pypi/unittest2")
1712 (synopsis "Python unit testing library")
1713 (description
1714 "Unittest2 is a replacement for the unittest module in the Python
1715standard library.")
3f641af0 1716 (license license:psfl)))
6cd9c356
DT
1717
1718(define-public python2-unittest2
1719 (package (inherit python-unittest2)
1720 (name "python2-unittest2")
1721 (version "0.5.1")
1722 (source
1723 (origin
1724 (method url-fetch)
1725 (uri (string-append
1726 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1727 version ".tar.gz"))
1728 (sha256
1729 (base32
1730 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1731 (arguments
1732 `(#:python ,python-2
1733 #:tests? #f)))) ; no setup.py test command
1734
02f8f804 1735(define-public python-pafy
1736 (package
1737 (name "python-pafy")
745d85b7 1738 (version "0.5.3.1")
02f8f804 1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "pafy" version))
1743 (sha256
1744 (base32
745d85b7 1745 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1746 (build-system python-build-system)
ed3fee5f 1747 (arguments
1748 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1749 (propagated-inputs
1750 ;; Youtube-dl is a python package which is imported in the file
1751 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1752 `(("youtube-dl" ,youtube-dl)))
1753 (home-page "https://np1.github.io/pafy/")
1754 (synopsis "Retrieve YouTube content and metadata")
1755 (description
1756 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1757 (license license:lgpl3+)))
1758
542ad60f
DT
1759(define-public python-py
1760 (package
1761 (name "python-py")
b9463fdb 1762 (version "1.4.32")
542ad60f
DT
1763 (source
1764 (origin
1765 (method url-fetch)
71c8a804 1766 (uri (pypi-uri "py" version))
542ad60f
DT
1767 (sha256
1768 (base32
b9463fdb 1769 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1770 (build-system python-build-system)
dcb0da7b
MB
1771 (arguments
1772 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1773 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1774 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1775 ;; Is this module globally installed?"
1776 '(#:tests? #f))
542ad60f
DT
1777 (home-page "http://pylib.readthedocs.org/")
1778 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1779 (description
1780 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1781code introspection, and logging.")
bd3fa666 1782 (license license:expat)))
542ad60f
DT
1783
1784(define-public python2-py
1785 (package-with-python2 python-py))
1786
855d4761
DT
1787(define-public python-pytest
1788 (package
1789 (name "python-pytest")
61a4332d 1790 (version "2.7.3")
855d4761
DT
1791 (source
1792 (origin
1793 (method url-fetch)
1794 (uri (string-append
1795 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1796 version ".tar.gz"))
1797 (sha256
1798 (base32
61a4332d 1799 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1800 (modules '((guix build utils)))
1801 (snippet
1802 ;; One of the tests involves the /usr directory, so it fails.
1803 '(substitute* "testing/test_argcomplete.py"
1804 (("def test_remove_dir_prefix\\(self\\):")
1805 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1806 (build-system python-build-system)
482d9591
HG
1807 (propagated-inputs
1808 `(("python-py" ,python-py)))
e7881f3d 1809 (native-inputs
482d9591 1810 `(("python-nose" ,python-nose)
855d4761
DT
1811 ("python-mock" ,python-mock)))
1812 (home-page "http://pytest.org")
1813 (synopsis "Python testing library")
1814 (description
1815 "Pytest is a testing tool that provides auto-discovery of test modules
1816and functions, detailed info on failing assert statements, modular fixtures,
1817and many external plugins.")
bd3fa666 1818 (license license:expat)))
855d4761
DT
1819
1820(define-public python2-pytest
1821 (package-with-python2 python-pytest))
1822
fca4ff35
LF
1823;; This package is used by Borg until we can upgrade all our Python packages to
1824;; use a more recent pytest.
1825(define-public python-pytest-2.9.2
1826 (package
1827 (inherit python-pytest)
1828 (name "python-pytest")
1829 (version "2.9.2")
1830 (source (origin
1831 (method url-fetch)
1832 (uri (pypi-uri "pytest" version))
1833 (sha256
1834 (base32
1835 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1836 (arguments
1837 `(#:phases
1838 (modify-phases %standard-phases
1839 (add-before 'check 'disable-invalid-test
1840 (lambda _
1841 (substitute* "testing/test_argcomplete.py"
1842 (("def test_remove_dir_prefix" line)
1843 (string-append "@pytest.mark.skip"
1844 "(reason=\"Assumes that /usr exists.\")\n "
1845 line)))
1846 #t)))))))
1847
358c3d61
EF
1848(define-public python-pytest-cov
1849 (package
1850 (name "python-pytest-cov")
545f4a1c 1851 (version "2.2.1")
358c3d61
EF
1852 (source
1853 (origin
1854 (method url-fetch)
1855 (uri (pypi-uri "pytest-cov" version))
1856 (sha256
545f4a1c
EF
1857 (base32
1858 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1859 (build-system python-build-system)
ce40b383
HG
1860 (arguments
1861 `(#:phases
1862 (modify-phases %standard-phases
1863 (replace 'check
1864 (lambda _
1865 ;; options taken from tox.ini
1866 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1867 ;; with "Duplicate implicit target name"
1868 (zero? (system* "python" "./setup.py" "check"
1869 "--strict" "--metadata")))))))
f22efa01 1870 (propagated-inputs
10468636
EF
1871 `(("python-coverage" ,python-coverage)
1872 ("python-pytest" ,python-pytest)))
10468636
EF
1873 (home-page "https://github.com/pytest-dev/pytest-cov")
1874 (synopsis "Pytest plugin for measuring coverage")
1875 (description
1876 "Pytest-cov produces coverage reports. It supports centralised testing and
1877distributed testing in both @code{load} and @code{each} modes. It also
1878supports coverage of subprocesses.")
f210e944 1879 (license license:expat)))
358c3d61
EF
1880
1881(define-public python2-pytest-cov
f210e944 1882 (package-with-python2 python-pytest-cov))
358c3d61 1883
6784f2e3
RW
1884(define-public python-pytest-runner
1885 (package
1886 (name "python-pytest-runner")
1887 (version "2.6.2")
1888 (source
1889 (origin
1890 (method url-fetch)
54cd239b 1891 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1892 (sha256
1893 (base32
1894 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1895 (build-system python-build-system)
1896 (arguments
1897 `(#:phases
1898 (modify-phases %standard-phases
1899 ;; The fancy way of setting the version with setuptools_scm does not
1900 ;; seem to work here.
1901 (add-after 'unpack 'set-version
1902 (lambda _
1903 (substitute* "docs/conf.py"
1904 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1905 (string-append "version = \"" ,version "\"")))
1906 #t)))))
1907 (native-inputs
1908 `(("python-pytest" ,python-pytest)
1909 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1910 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1911 (synopsis "Invoke py.test as a distutils command")
1912 (description
1913 "This package provides a @command{pytest-runner} command that
1914@file{setup.py} files can use to run tests.")
f210e944 1915 (license license:expat)))
54cd239b
EF
1916
1917(define-public python2-pytest-runner
f210e944 1918 (package-with-python2 python-pytest-runner))
6784f2e3 1919
44547e51
EF
1920(define-public python-pytest-mock
1921 (package
1922 (name "python-pytest-mock")
1923 (version "1.2")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (pypi-uri "pytest-mock" version ".zip"))
1928 (sha256
1929 (base32
1930 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1931 (build-system python-build-system)
1932 (native-inputs
1933 `(("unzip" ,unzip)))
f22efa01 1934 (propagated-inputs
d5e41cf2 1935 `(("python-pytest" ,python-pytest)))
44547e51
EF
1936 (home-page "https://github.com/pytest-dev/pytest-mock/")
1937 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1938 (description
1939 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1940around the patching API provided by the @code{mock} package, but with the
1941benefit of not having to worry about undoing patches at the end of a test.
1942The mocker fixture has the same API as @code{mock.patch}, supporting the
1943same arguments.")
1944 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1945 (license license:expat)))
1946
1947(define-public python2-pytest-mock
1948 (let ((base (package-with-python2
1949 (strip-python2-variant python-pytest-mock))))
1950 (package (inherit base)
f22efa01 1951 (propagated-inputs
44547e51 1952 `(("python2-mock" ,python2-mock)
f22efa01 1953 ,@(package-propagated-inputs base))))))
44547e51 1954
8fa58fc9
CAW
1955(define-public python-pytest-xdist
1956 (package
1957 (name "python-pytest-xdist")
1958 (version "1.14")
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (pypi-uri "pytest-xdist" version ".zip"))
1963 (sha256
1964 (base32
de585a7e
HG
1965 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1966 (modules '((guix build utils)))
1967 (snippet
1968 '(begin
1969 ;; Remove pre-compiled .pyc files from source.
1970 (for-each delete-file-recursively
1971 (find-files "." "__pycache__" #:directories? #t))
1972 (for-each delete-file (find-files "." "\\.pyc$"))
1973 #t))))
8fa58fc9 1974 (build-system python-build-system)
4eb385fb
MB
1975 (arguments
1976 '(#:tests? #f)) ;FIXME: Some tests are failing.
1977 ;; #:phases
1978 ;; (modify-phases %standard-phases
1979 ;; (delete 'check)
1980 ;; (add-after 'install 'check
1981 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1982 ;; (add-installed-pythonpath inputs outputs)
1983 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1984 (native-inputs
1985 `(("unzip" ,unzip)
8fa58fc9 1986 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1987 (propagated-inputs
c4516ad2 1988 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1989 ("python-pytest" ,python-pytest)
1990 ("python-py" ,python-py)))
1991 (home-page
1992 "https://github.com/pytest-dev/pytest-xdist")
1993 (synopsis
1994 "Plugin for py.test with distributed testing and loop-on-failing modes")
1995 (description
1996 "The pytest-xdist plugin extends py.test with some unique test execution
1997modes: parallelization, running tests in boxed subprocesses, the ability
1998to run tests repeatedly when failed, and the ability to run tests on multiple
1999Python interpreters or platforms. It uses rsync to copy the existing
2000program code to a remote location, executes there, and then syncs the
2001result back.")
f210e944 2002 (license license:expat)))
8fa58fc9
CAW
2003
2004(define-public python2-pytest-xdist
f210e944 2005 (package-with-python2 python-pytest-xdist))
8fa58fc9 2006
84d24017
DT
2007(define-public python-scripttest
2008 (package
2009 (name "python-scripttest")
2010 (version "1.3")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append
2015 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2016 version ".tar.gz"))
2017 (sha256
2018 (base32
2019 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2020 (build-system python-build-system)
521b7772 2021 (native-inputs
f3b98f4f 2022 `(("python-pytest" ,python-pytest)))
84d24017
DT
2023 (home-page "http://pythonpaste.org/scripttest/")
2024 (synopsis "Python library to test command-line scripts")
2025 (description "Scripttest is a Python helper library for testing
2026interactive command-line applications. With it you can run a script in a
2027subprocess and see the output as well as any file modifications.")
bd3fa666 2028 (license license:expat)))
84d24017
DT
2029
2030(define-public python2-scripttest
2031 (package-with-python2 python-scripttest))
2032
d8fa80e1
DT
2033(define-public python-testtools
2034 (package
2035 (name "python-testtools")
7adb9031 2036 (version "1.4.0")
d8fa80e1
DT
2037 (source
2038 (origin
2039 (method url-fetch)
7adb9031 2040 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2041 (sha256
2042 (base32
7adb9031 2043 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2044 (build-system python-build-system)
7adb9031
DM
2045 (arguments
2046 `(#:phases
2047 (modify-phases %standard-phases
2048 (add-after 'unpack 'fix-module-imports
2049 (lambda _
2050 (substitute* "setup.py"
2051 (("'unittest2>=0.8.0',") ""))
2052 (substitute* '("testtools/testcase.py"
2053 "testtools/testsuite.py"
2054 "testtools/run.py"
2055 "testtools/tests/test_run.py"
2056 "testtools/tests/test_testsuite.py"
2057 "testtools/tests/test_deferredruntest.py")
2058 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2059 (("import unittest2 as unittest") "import unittest")
2060 (("import unittest2") "import unittest as unittest2")
2061 (("from unittest2 import") "from unittest import"))
2062 (substitute* "testtools/tests/test_testresult.py"
2063 ;; NUL in source code is not allowed (raises ValueError).
2064 (("\\x00\\x04") "\\x04"))
2065 #t)))))
0e88cbf8 2066 (propagated-inputs
f22efa01
HG
2067 `(("python-mimeparse" ,python-mimeparse)
2068 ("python-extras" ,python-extras)))
d8fa80e1
DT
2069 (home-page "https://github.com/testing-cabal/testtools")
2070 (synopsis
2071 "Extensions to the Python standard library unit testing framework")
2072 (description
2073 "Testtools extends the Python standard library unit testing framework to
2074provide matchers, more debugging information, and cross-Python
2075compatibility.")
3f641af0 2076 (license license:psfl)))
d8fa80e1
DT
2077
2078(define-public python2-testtools
2079 (package-with-python2 python-testtools))
2080
5bf3afea
DT
2081(define-public python-testscenarios
2082 (package
2083 (name "python-testscenarios")
2084 (version "0.4")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (string-append
2089 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2090 version ".tar.gz"))
2091 (sha256
2092 (base32
2093 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2094 (build-system python-build-system)
f22efa01 2095 (propagated-inputs
8e73d3ba 2096 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2097 (home-page "https://launchpad.net/testscenarios")
2098 (synopsis "Pyunit extension for dependency injection")
2099 (description
2100 "Testscenarios provides clean dependency injection for Python unittest
2101style tests.")
3f641af0 2102 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2103
2104(define-public python2-testscenarios
2105 (package-with-python2 python-testscenarios))
2106
dac79ecc
DT
2107(define-public python-testresources
2108 (package
2109 (name "python-testresources")
2110 (version "0.2.7")
2111 (source
2112 (origin
2113 (method url-fetch)
2114 (uri (string-append
2115 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2116 version ".tar.gz"))
2117 (sha256
2118 (base32
2119 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2120 (build-system python-build-system)
dac79ecc
DT
2121 (home-page "https://launchpad.net/testresources")
2122 (synopsis
2123 "Pyunit extension for managing test resources")
2124 (description
2125 "Testresources is an extension to Python's unittest to allow declarative
2126use of resources by test cases.")
3f641af0 2127 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2128
2129(define-public python2-testresources
2130 (package-with-python2 python-testresources))
2131
070ab058
DT
2132(define-public python-subunit
2133 (package
2134 (name "python-subunit")
2135 (version "0.0.21")
2136 (source
2137 (origin
2138 (method url-fetch)
2139 (uri (string-append
2140 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2141 version ".tar.gz"))
2142 (sha256
2143 (base32
2144 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2145 (build-system python-build-system)
f22efa01 2146 (propagated-inputs
b52ad371
HG
2147 `(("python-extras" ,python-extras)
2148 ("python-mimeparse" ,python-mimeparse)))
2149 (native-inputs
2150 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2151 (home-page "http://launchpad.net/subunit")
2152 (synopsis "Python implementation of the subunit protocol")
2153 (description
2154 "Python-subunit is a Python implementation of the subunit test streaming
2155protocol.")
3f641af0 2156 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2157
2158(define-public python2-subunit
2159 (package-with-python2 python-subunit))
2160
d2a8db92
HG
2161;; Recent versions of python-fixtures and python-testrepository need
2162;; python-pbr for packaging, which itself needs these two packages for
2163;; testing.
2164;; To fix this circular dependency, we use a build of python-pbr, based on the
2165;; same source, just without any test dependencies and with tests disabled.
2166;; python-pbr-minmal is then used to package python-fixtures and
2167;; python-testrepository.
2168;; Strictly speaking we currently could remove the test-requirements from the
2169;; normal python-pbr package (and save this package) since test are disabled
2170;; there anyway. But this may change in future.
2171(define python-pbr-minimal
cd49454b 2172 (package
d2a8db92 2173 (name "python-pbr-minimal")
5bbb2249 2174 (version "1.10.0")
7787ef76
CR
2175 (source
2176 (origin
2177 (method url-fetch)
d2a8db92 2178 (uri (pypi-uri "pbr" version))
7787ef76
CR
2179 (sha256
2180 (base32
a1e3ed6e
DM
2181 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2182 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2183 (build-system python-build-system)
2184 (arguments
d2a8db92
HG
2185 `(#:tests? #f))
2186 (home-page "http://docs.openstack.org/developer/pbr/")
2187 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2188 (description
d2a8db92 2189 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2190 (license license:asl2.0)))
7787ef76 2191
d2a8db92
HG
2192(define python2-pbr-minimal
2193 (package-with-python2 python-pbr-minimal))
7787ef76 2194
1ef09c0c 2195(define-public python-pbr
e25f0174 2196 (package
d2a8db92 2197 (inherit python-pbr-minimal)
e25f0174 2198 (name "python-pbr")
e25f0174
BW
2199 (arguments
2200 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2201 (propagated-inputs
d2a8db92
HG
2202 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2203 (native-inputs
e25f0174 2204 `(("python-fixtures" ,python-fixtures)
d2a8db92 2205 ;; discover, coverage, hacking, subunit
e25f0174 2206 ("python-mock" ,python-mock)
d2a8db92 2207 ("python-six" ,python-six)
e25f0174
BW
2208 ("python-sphinx" ,python-sphinx)
2209 ("python-testrepository" ,python-testrepository)
2210 ("python-testresources" ,python-testresources)
2211 ("python-testscenarios" ,python-testscenarios)
2212 ("python-testtools" ,python-testtools)
2213 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2214 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2215 (description
2216 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2217and sensible default behaviors into your setuptools run. It will set
2218versions, process requirements files and generate AUTHORS and ChangeLog file
2219from git information.
2220")))
1ef09c0c
BW
2221
2222(define-public python2-pbr
e25f0174 2223 (package-with-python2 python-pbr))
1ef09c0c 2224
7787ef76
CR
2225(define-public python-fixtures
2226 (package
2227 (name "python-fixtures")
13fcc6df 2228 (version "1.4.0")
7787ef76
CR
2229 (source
2230 (origin
2231 (method url-fetch)
13fcc6df 2232 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2233 (sha256
2234 (base32
13fcc6df 2235 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2236 (build-system python-build-system)
f6c1ef18
MB
2237 (arguments
2238 '(#:phases
2239 (modify-phases %standard-phases
2240 (replace 'check
2241 (lambda _
2242 (zero? (system* "python" "-m" "testtools.run"
2243 "fixtures.test_suite")))))))
7787ef76 2244 (propagated-inputs
ae92cadd 2245 `(("python-six" ,python-six)))
e7881f3d 2246 (native-inputs
f6c1ef18
MB
2247 `(("python-mock" ,python-mock)
2248 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2249 ("python-testtools" ,python-testtools)))
7787ef76
CR
2250 (home-page "https://launchpad.net/python-fixtures")
2251 (synopsis "Python test fixture library")
2252 (description
2253 "Fixtures provides a way to create reusable state, useful when writing
2254Python tests.")
3f641af0 2255 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2256
cd49454b
DT
2257(define-public python2-fixtures
2258 (package-with-python2 python-fixtures))
2259
b24a0c00
DT
2260(define-public python-testrepository
2261 (package
2262 (name "python-testrepository")
2263 (version "0.0.20")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (string-append
2268 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2269 version ".tar.gz"))
2270 (sha256
2271 (base32
2272 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2273 (build-system python-build-system)
90110ef9
MB
2274 (arguments
2275 ;; FIXME: Many tests are failing.
2276 '(#:tests? #f))
05de40c5 2277 (propagated-inputs
b2e66edf
HG
2278 `(("python-fixtures" ,python-fixtures)
2279 ("python-subunit" ,python-subunit)
b52ad371
HG
2280 ("python-testtools" ,python-testtools)))
2281 (native-inputs
2282 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2283 ("python-mimeparse" ,python-mimeparse)))
2284 (home-page "https://launchpad.net/testrepository")
2285 (synopsis "Database for Python test results")
2286 (description "Testrepository provides a database of test results which can
2287be used as part of a developer's workflow to check things such as what tests
2288have failed since the last commit or what tests are currently failing.")
3f641af0 2289 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2290
2291(define-public python2-testrepository
2292 (package-with-python2 python-testrepository))
2293
243a009a
DT
2294(define-public python-coverage
2295 (package
2296 (name "python-coverage")
4d4cf3dd 2297 (version "4.1")
243a009a
DT
2298 (source
2299 (origin
2300 (method url-fetch)
82a3c582 2301 (uri (pypi-uri "coverage" version))
243a009a
DT
2302 (sha256
2303 (base32
4d4cf3dd 2304 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2305 (build-system python-build-system)
bd10e677
MB
2306 (arguments
2307 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2308 '(#:tests? #f))
243a009a
DT
2309 (home-page "http://nedbatchelder.com/code/coverage")
2310 (synopsis "Code coverage measurement for Python")
2311 (description
2312 "Coverage measures code coverage, typically during test execution. It
2313uses the code analysis tools and tracing hooks provided in the Python standard
2314library to determine which lines are executable, and which have been
2315executed.")
3f641af0 2316 (license license:bsd-3)))
243a009a
DT
2317
2318(define-public python2-coverage
2319 (package-with-python2 python-coverage))
2320
12f839fd
EF
2321(define-public python-cov-core
2322 (package
2323 (name "python-cov-core")
2324 (version "1.15.0")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (pypi-uri "cov-core" version))
2329 (sha256
2330 (base32
2331 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2332 (build-system python-build-system)
f78e1c27 2333 (propagated-inputs
12f839fd
EF
2334 `(("python-coverage" ,python-coverage)))
2335 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2336 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2337 (description
49d5e338
TGR
2338 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2339and @code{nose2-cov}. It is useful for developing coverage plugins for these
2340testing frameworks.")
f210e944 2341 (license license:expat)))
12f839fd
EF
2342
2343(define-public python2-cov-core
f210e944 2344 (package-with-python2 python-cov-core))
12f839fd 2345
041358fb
DT
2346(define-public python-discover
2347 (package
2348 (name "python-discover")
2349 (version "0.4.0")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (string-append
2354 "https://pypi.python.org/packages/source/d/discover/discover-"
2355 version ".tar.gz"))
2356 (sha256
2357 (base32
2358 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2359 (build-system python-build-system)
041358fb
DT
2360 (home-page "http://pypi.python.org/pypi/discover/")
2361 (synopsis
2362 "Python test discovery for unittest")
2363 (description
2364 "Discover provides test discovery for unittest, a feature that has been
e881752c 2365backported from Python 2.7 for Python 2.4+.")
3f641af0 2366 (license license:bsd-3)))
041358fb
DT
2367
2368(define-public python2-discover
2369 (package-with-python2 python-discover))
2370
a480bc41
EB
2371(define-public behave
2372 (package
2373 (name "behave")
287cfd1a 2374 (version "1.2.5")
a480bc41
EB
2375 (source (origin
2376 (method url-fetch)
287cfd1a 2377 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2378 (sha256
2379 (base32
287cfd1a 2380 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2381 (build-system python-build-system)
f22efa01 2382 (propagated-inputs
f3b98f4f 2383 `(("python-six" ,python-six)
a480bc41
EB
2384 ("python-parse" ,python-parse)
2385 ("python-parse-type" ,python-parse-type)))
2386 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2387 ;PyHamcrest>=1.8
2388 (home-page "http://github.com/behave/behave")
2389 (synopsis "Python behavior-driven development")
2390 (description
2391 "Behave is a tool for behavior-driven development in python.
2392Behavior-driven development (or BDD) is an agile software development
2393technique that encourages collaboration between developers, QA and
2394non-technical or business participants in a software project. Behave uses
2395tests written in a natural language style, backed up by Python code.")
3f641af0 2396 (license license:x11)))
c7303d3c
DT
2397
2398(define-public python-exif-read
2399 (package
2400 (name "python-exif-read")
2a2d0981 2401 (version "2.1.2")
c7303d3c
DT
2402 (source (origin
2403 (method url-fetch)
2a2d0981 2404 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2405 (sha256
2406 (base32
2a2d0981 2407 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2408 (build-system python-build-system)
c7303d3c
DT
2409 (arguments `(#:tests? #f)) ; no tests
2410 (home-page "https://github.com/ianare/exif-py")
2411 (synopsis "Python library to extract EXIF data from image files")
2412 (description
2413 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2414files.")
3f641af0 2415 (license license:bsd-3)))
c7303d3c
DT
2416
2417(define-public python2-exif-read
2418 (package-with-python2 python-exif-read))
d5f89b22
DT
2419
2420(define-public python-pyld
2421 (package
2422 (name "python-pyld")
8957af32 2423 (version "0.7.1")
d5f89b22
DT
2424 (source (origin
2425 (method url-fetch)
af1ab773 2426 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2427 (sha256
2428 (base32
8957af32 2429 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2430 (build-system python-build-system)
d5f89b22
DT
2431 (arguments `(#:tests? #f)) ; no tests
2432 (home-page "http://github.com/digitalbazaar/pyld")
2433 (synopsis "Python implementation of the JSON-LD specification")
2434 (description
2435 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2436 (license license:bsd-3)))
d5f89b22
DT
2437
2438(define-public python2-pyld
2439 (package-with-python2 python-pyld))
3a1f9a68
DT
2440
2441(define-public python-certifi
2442 (package
2443 (name "python-certifi")
28576403 2444 (version "2017.1.23")
3a1f9a68
DT
2445 (source (origin
2446 (method url-fetch)
9a41f443 2447 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2448 (sha256
2449 (base32
28576403 2450 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2451 (build-system python-build-system)
28576403 2452 (home-page "https://certifi.io/")
3a1f9a68
DT
2453 (synopsis "Python CA certificate bundle")
2454 (description
2455 "Certifi is a Python library that contains a CA certificate bundle, which
2456is used by the Requests library to verify HTTPS requests.")
3f641af0 2457 (license license:asl2.0)))
3a1f9a68
DT
2458
2459(define-public python2-certifi
2460 (package-with-python2 python-certifi))
e6cfbd36 2461
12c270dd
RW
2462(define-public python-click
2463 (package
2464 (name "python-click")
d4acb6db 2465 (version "6.7")
12c270dd
RW
2466 (source
2467 (origin
2468 (method url-fetch)
375f224b 2469 (uri (pypi-uri "click" version))
12c270dd 2470 (sha256
43accb58 2471 (base32
d4acb6db 2472 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2473 (build-system python-build-system)
e2ab5a09
BW
2474 (arguments
2475 `(#:phases
2476 (modify-phases %standard-phases
2477 (add-after 'unpack 'fix-paths
2478 (lambda* (#:key inputs #:allow-other-keys)
2479 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2480 "cross-libc" "libc"))))
2481 (substitute* "click/_unicodefun.py"
2482 (("'locale'")
2483 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2484 #t))
2485 (replace 'check
2486 (lambda _
2487 (zero? (system* "make" "test")))))))
2488 (native-inputs
2489 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2490 (home-page "http://click.pocoo.org")
2491 (synopsis "Command line library for Python")
2492 (description
2493 "Click is a Python package for creating command line interfaces in a
2494composable way with as little code as necessary. Its name stands for
2495\"Command Line Interface Creation Kit\". It's highly configurable but comes
2496with sensible defaults out of the box.")
3f641af0 2497 (license license:bsd-3)))
12c270dd
RW
2498
2499(define-public python2-click
2500 (package-with-python2 python-click))
2501
addc808d
EF
2502(define-public python-wheel
2503 (package
2504 (name "python-wheel")
0e6df70b 2505 (version "0.30.0a0")
e1ba0749
EF
2506 (source
2507 (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "wheel" version))
2510 (sha256
2511 (base32
0e6df70b 2512 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2513 (build-system python-build-system)
2514 (native-inputs
f3b98f4f 2515 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2516 ("python-pytest-cov" ,python-pytest-cov)))
2517 (home-page "https://bitbucket.org/pypa/wheel/")
2518 (synopsis "Format for built Python packages")
2519 (description
2520 "A wheel is a ZIP-format archive with a specially formatted filename and
2521the @code{.whl} extension. It is designed to contain all the files for a PEP
2522376 compatible install in a way that is very close to the on-disk format. Many
2523packages will be properly installed with only the @code{Unpack} step and the
2524unpacked archive preserves enough information to @code{Spread} (copy data and
2525scripts to their final locations) at any later time. Wheel files can be
2526installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2527 (license license:expat)
2528 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2529
2530(define-public python2-wheel
8ad4ae20
LF
2531 (let ((wheel (package-with-python2
2532 (strip-python2-variant python-wheel))))
264ae686 2533 (package (inherit wheel)
8ad4ae20
LF
2534 (native-inputs `(("python2-functools32" ,python2-functools32)
2535 ,@(package-native-inputs wheel))))))
2536
addc808d 2537
ae641128 2538(define-public python-requests
e6cfbd36 2539 (package
ae641128 2540 (name "python-requests")
da5db988 2541 (version "2.13.0")
e6cfbd36
DT
2542 (source (origin
2543 (method url-fetch)
5d691657 2544 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2545 (sha256
2546 (base32
da5db988 2547 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2548 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2549 (build-system python-build-system)
cff0ccf9
MB
2550 (arguments
2551 ;; FIXME: Some tests require network access.
2552 '(#:tests? #f))
e6cfbd36
DT
2553 (home-page "http://python-requests.org/")
2554 (synopsis "Python HTTP library")
2555 (description
2556 "Requests is a Python HTTP client library. It aims to be easier to use
2557than Python’s urllib2 library.")
3f641af0 2558 (license license:asl2.0)))
864b5211 2559
e9005180
DT
2560;; Some software requires an older version of Requests, notably Docker
2561;; Compose.
2562(define-public python-requests-2.7
2563 (package (inherit python-requests)
2564 (version "2.7.0")
2565 (source (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "requests" version))
2568 (sha256
2569 (base32
2570 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2571
ae641128 2572(define-public python2-requests
8ad4ae20 2573 (package-with-python2 python-requests))
ae641128 2574
ea521b42
DT
2575(define-public python-vcversioner
2576 (package
2577 (name "python-vcversioner")
538fe019 2578 (version "2.16.0.0")
ea521b42
DT
2579 (source
2580 (origin
2581 (method url-fetch)
2582 (uri (pypi-uri "vcversioner" version))
2583 (sha256
2584 (base32
538fe019 2585 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2586 (build-system python-build-system)
ea521b42
DT
2587 (synopsis "Python library for version number discovery")
2588 (description "Vcversioner is a Python library that inspects tagging
2589information in a variety of version control systems in order to discover
2590version numbers.")
2591 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2592 (license license:isc)))
ea521b42
DT
2593
2594(define-public python2-vcversioner
f210e944 2595 (package-with-python2 python-vcversioner))
ae641128 2596
864b5211
DT
2597(define-public python-jsonschema
2598 (package
2599 (name "python-jsonschema")
b3667afb 2600 (version "2.5.1")
864b5211
DT
2601 (source (origin
2602 (method url-fetch)
2603 (uri
2604 (string-append
2605 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2606 version ".tar.gz"))
2607 (sha256
2608 (base32
b3667afb 2609 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2610 (build-system python-build-system)
8bcd6b91
EF
2611 (arguments
2612 '(#:phases
2613 (modify-phases %standard-phases
2614 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2615 (native-inputs
8bcd6b91
EF
2616 `(("python-nose" ,python-nose)
2617 ("python-vcversioner" ,python-vcversioner)))
2618 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2619 (synopsis "Implementation of JSON Schema for Python")
2620 (description
2621 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2622 (license license:expat)
2623 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2624
2625(define-public python2-jsonschema
a14600ec
LF
2626 (let ((jsonschema (package-with-python2
2627 (strip-python2-variant python-jsonschema))))
264ae686 2628 (package (inherit jsonschema)
eaba9d66 2629 (native-inputs
8bcd6b91 2630 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2631 ,@(package-native-inputs jsonschema)))
2632 (propagated-inputs
2633 `(("python2-functools32" ,python2-functools32))))))
850189b8 2634
9f21414d 2635(define-public python-kitchen
2636 (package
2637 (name "python-kitchen")
2638 (version "1.2.4")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "kitchen" version))
2643 (sha256
2644 (base32
2645 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2646 (build-system python-build-system)
2647 (propagated-inputs
2648 `(("python-chardet" ,python-chardet)))
2649 (home-page "https://fedorahosted.org/kitchen")
2650 (synopsis "Python API for snippets")
2651 (description "@code{kitchen} module provides a python API for all sorts of
2652little useful snippets of code that everybody ends up writing for their projects
2653but never seem big enough to build an independent release. Use kitchen and stop
2654cutting and pasting that code over and over.")
2655 (license (list license:lgpl2.1+
2656 ;; subprocess.py, test_subprocess.py,
2657 ;; kitchen/pycompat25/defaultdict.py:
2658 license:psfl))))
2659
2660(define-public python2-kitchen
2661 (package-with-python2 python-kitchen))
2662
850189b8
DT
2663(define-public python-unidecode
2664 (package
2665 (name "python-unidecode")
5754fe95 2666 (version "0.04.20")
850189b8
DT
2667 (source (origin
2668 (method url-fetch)
8925d4f3 2669 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2670 (sha256
2671 (base32
5754fe95 2672 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2673 (build-system python-build-system)
850189b8
DT
2674 (home-page "https://pypi.python.org/pypi/Unidecode")
2675 (synopsis "ASCII transliterations of Unicode text")
2676 (description
2677 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2678useful when integrating with legacy code that doesn't support Unicode, or for
2679ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2680machine identifiers from human-readable Unicode strings that should still be
2681somewhat intelligeble.")
3f641af0 2682 (license license:gpl2+)))
850189b8
DT
2683
2684(define-public python2-unidecode
2685 (package-with-python2 python-unidecode))
6d45fef4
DT
2686
2687(define-public python-pyjwt
2688 (package
2689 (name "python-pyjwt")
eb31d4b4 2690 (version "1.4.0")
6d45fef4
DT
2691 (source
2692 (origin
2693 (method url-fetch)
eb31d4b4 2694 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2695 (sha256
2696 (base32
eb31d4b4 2697 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2698 (build-system python-build-system)
eb31d4b4 2699 (native-inputs
130fe994
HG
2700 `(("python-pytest" ,python-pytest)
2701 ("python-pytest-cov" ,python-pytest-cov)
2702 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2703 (home-page "http://github.com/progrium/pyjwt")
2704 (synopsis "JSON Web Token implementation in Python")
2705 (description
2706 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2707 (license license:expat)))
6d45fef4
DT
2708
2709(define-public python2-pyjwt
2710 (package-with-python2 python-pyjwt))
2711
a80488c2 2712(define-public python-pykka
2713 (package
2714 (name "python-pykka")
2715 (version "1.2.1")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "Pykka" version))
2720 (sha256
2721 (base32
2722 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2723 (build-system python-build-system)
2724 (native-inputs
2725 `(("python-mock" ,python-mock)
2726 ("python-nose" ,python-nose)
2727 ("python-gevent" ,python-gevent)
2728 ("python-eventlet" ,python-eventlet)))
2729 (home-page "https://www.pykka.org/")
2730 (synopsis "Pykka is a Python implementation of the actor model")
2731 (description
2732 "Pykka is a Python implementation of the actor model.
2733The actor model introduces some simple rules to control the sharing
2734of state and cooperation between execution units, which makes it
2735easier to build concurrent applications.")
2736 (license license:asl2.0)))
2737
2738(define-public python2-pykka
2739 (package-with-python2 python-pykka))
2740
2cec1f6f
DT
2741(define-public python-oauthlib
2742 (package
2743 (name "python-oauthlib")
bde2171d 2744 (version "1.0.3")
2cec1f6f
DT
2745 (source (origin
2746 (method url-fetch)
bde2171d 2747 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2748 (sha256
2749 (base32
bde2171d 2750 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2751 (build-system python-build-system)
bde2171d 2752 (native-inputs
bb06aa34 2753 `(("python-nose" ,python-nose)
c616b5d3 2754 ("python-mock" ,python-mock)
bde2171d 2755 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2756 ("python-pyjwt" ,python-pyjwt)
2757 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2758 (home-page "https://github.com/idan/oauthlib")
2759 (synopsis "OAuth implementation for Python")
2760 (description
2761 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2762OAuth request-signing logic.")
3f641af0 2763 (license license:bsd-3)
59f151ec 2764 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2765
2766(define-public python2-oauthlib
59f151ec 2767 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2768 (package
2769 (inherit base)
00e10c6e 2770 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2771 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2772
2773(define-public python-itsdangerous
2774 (package
2775 (name "python-itsdangerous")
2776 (version "0.24")
2777 (source
2778 (origin
2779 (method url-fetch)
2780 (uri (string-append
2781 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2782 version ".tar.gz"))
2783 (sha256
2784 (base32
2785 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2786 (build-system python-build-system)
ec5dbb5c
DT
2787 (home-page "http://github.com/mitsuhiko/itsdangerous")
2788 (synopsis "Python library for passing data to/from untrusted environments")
2789 (description
2790 "Itsdangerous provides various helpers to pass trusted data to untrusted
2791environments and back.")
f210e944 2792 (license license:bsd-3)))
ec5dbb5c
DT
2793
2794(define-public python2-itsdangerous
f210e944 2795 (package-with-python2 python-itsdangerous))
5731cae3 2796
8d12be1e
RW
2797(define-public python-pyyaml
2798 (package
2799 (name "python-pyyaml")
bf5e4bc4 2800 (version "3.12")
8d12be1e
RW
2801 (source
2802 (origin
2803 (method url-fetch)
bf5e4bc4 2804 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2805 (sha256
2806 (base32
bf5e4bc4 2807 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2808 (build-system python-build-system)
2809 (inputs
2810 `(("libyaml" ,libyaml)))
8d12be1e
RW
2811 (home-page "http://pyyaml.org/wiki/PyYAML")
2812 (synopsis "YAML parser and emitter for Python")
2813 (description
2814 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2815complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2816API, and sensible error messages. PyYAML supports standard YAML tags and
2817provides Python-specific tags that allow to represent an arbitrary Python
2818object.")
2819 (license license:expat)))
2820
2821(define-public python2-pyyaml
2822 (package-with-python2 python-pyyaml))
2823
5731cae3
DT
2824(define-public python-virtualenv
2825 (package
2826 (name "python-virtualenv")
58d04dba 2827 (version "15.0.3")
5731cae3
DT
2828 (source
2829 (origin
2830 (method url-fetch)
17804240 2831 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2832 (sha256
2833 (base32
58d04dba 2834 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2835 (build-system python-build-system)
17804240
EF
2836 (arguments
2837 `(#:phases
2838 (modify-phases %standard-phases
58d04dba
RW
2839 (replace 'check
2840 (lambda _
2841 ;; Disable failing test. See upstream bug report
2842 ;; https://github.com/pypa/virtualenv/issues/957
2843 (substitute* "tests/test_virtualenv.py"
2844 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2845 (zero? (system* "py.test")))))))
e7881f3d 2846 (native-inputs
f3b98f4f 2847 `(("python-mock" ,python-mock)
17804240 2848 ("python-pytest" ,python-pytest)))
5731cae3
DT
2849 (home-page "https://virtualenv.pypa.io/")
2850 (synopsis "Virtual Python environment builder")
2851 (description
2852 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2853 (license license:expat)))
5731cae3
DT
2854
2855(define-public python2-virtualenv
2856 (package-with-python2 python-virtualenv))
8176d4d5
DT
2857
2858(define-public python-markupsafe
2859 (package
2860 (name "python-markupsafe")
2861 (version "0.23")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (string-append
2866 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2867 version ".tar.gz"))
2868 (sha256
2869 (base32
2870 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2871 (build-system python-build-system)
8176d4d5
DT
2872 (home-page "http://github.com/mitsuhiko/markupsafe")
2873 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2874 (description
2875 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2876for Python.")
3f641af0 2877 (license license:bsd-3)))
8176d4d5
DT
2878
2879(define-public python2-markupsafe
2880 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2881
2882(define-public python-jinja2
2883 (package
2884 (name "python-jinja2")
e98149b3 2885 (version "2.8")
fe34f0d1
DT
2886 (source
2887 (origin
2888 (method url-fetch)
e98149b3 2889 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2890 (sha256
2891 (base32
e98149b3 2892 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2893 (build-system python-build-system)
f22efa01 2894 (propagated-inputs
f3b98f4f 2895 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2896 (home-page "http://jinja.pocoo.org/")
2897 (synopsis "Python template engine")
2898 (description
2899 "Jinja2 is a small but fast and easy to use stand-alone template engine
2900written in pure Python.")
3f641af0 2901 (license license:bsd-3)))
fe34f0d1
DT
2902
2903(define-public python2-jinja2
2904 (package-with-python2 python-jinja2))
3580ab8b 2905
f7d17ac7
EE
2906(define-public python-pystache
2907 (package
2908 (name "python-pystache")
2909 (version "0.5.4")
2910 (source (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "pystache" version))
2913 (sha256
2914 (base32
2915 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2916 (build-system python-build-system)
8bd5164b
MB
2917 (arguments
2918 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2919 (home-page "http://defunkt.io/pystache/")
2920 (synopsis "Python logic-less template engine")
2921 (description
2922 "Pystache is a Python implementation of the framework agnostic,
2923logic-free templating system Mustache.")
8bd5164b
MB
2924 (license license:expat)
2925 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2926
2927(define-public python2-pystache
8bd5164b
MB
2928 (package (inherit (package-with-python2
2929 (strip-python2-variant python-pystache)))
2930 (arguments
2931 `(#:python ,python-2
2932 #:phases
2933 (modify-phases %standard-phases
2934 (replace 'check
2935 (lambda _
2936 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2937
1285119b
RW
2938(define-public python-joblib
2939 (package
2940 (name "python-joblib")
f34ef331 2941 (version "0.10.3")
1285119b
RW
2942 (source (origin
2943 (method url-fetch)
f34ef331 2944 (uri (pypi-uri "joblib" version))
1285119b
RW
2945 (sha256
2946 (base32
6aa5f1ca
HG
2947 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2948 (modules '((guix build utils)))
2949 (snippet
2950 '(begin
2951 ;; Remove pre-compiled .pyc files from source.
2952 (for-each delete-file-recursively
2953 (find-files "." "__pycache__" #:directories? #t))
2954 (for-each delete-file (find-files "." "\\.pyc$"))
2955 #t))))
1285119b 2956 (build-system python-build-system)
a8dd960a
RW
2957 (arguments
2958 `(#:phases
2959 (modify-phases %standard-phases
2960 (add-before 'check 'disable-failing-tests
2961 (lambda _
2962 ;; This numpydoc tests fails for unknown reasons
2963 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2964 ;; This numpydoc test depends on matplotlib, which is not a
2965 ;; required input.
2966 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2967 ;; These tests fail to execute sys.executable
2968 (substitute* "joblib/test/test_parallel.py"
2969 (("import nose" line)
2970 (string-append "from nose.plugins.skip import SkipTest\n" line))
2971 (("def test_nested_parallel_warnings" line)
2972 (string-append "@SkipTest\n" line))
2973 (("def test_parallel_with_interactively_defined_functions" line)
2974 (string-append "@SkipTest\n" line)))
2975 #t)))))
f052ec9a 2976 ;; Provide nose to enable tests command
1285119b 2977 (native-inputs
f3b98f4f 2978 `(("python-nose" ,python-nose)
f34ef331
RW
2979 ("python-sphinx" ,python-sphinx)
2980 ("python-docutils" ,python-docutils)
2981 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2982 (home-page "http://pythonhosted.org/joblib/")
2983 (synopsis "Using Python functions as pipeline jobs")
2984 (description
2985 "Joblib is a set of tools to provide lightweight pipelining in Python.
2986In particular, joblib offers: transparent disk-caching of the output values
2987and lazy re-evaluation (memoize pattern), easy simple parallel computing
2988logging and tracing of the execution.")
3f641af0 2989 (license license:bsd-3)))
1285119b
RW
2990
2991(define-public python2-joblib
2992 (package-with-python2 python-joblib))
2993
3580ab8b
DT
2994(define-public python-docutils
2995 (package
2996 (name "python-docutils")
00e0ca7c 2997 (version "0.13.1")
3580ab8b
DT
2998 (source
2999 (origin
3000 (method url-fetch)
00e0ca7c 3001 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3002 (sha256
3003 (base32
00e0ca7c 3004 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3005 (build-system python-build-system)
3580ab8b
DT
3006 (arguments
3007 '(#:tests? #f)) ; no setup.py test command
3008 (home-page "http://docutils.sourceforge.net/")
3009 (synopsis "Python Documentation Utilities")
3010 (description
3011 "Docutils is a modular system for processing documentation into useful
3012formats, such as HTML, XML, and LaTeX. For input Docutils supports
3013reStructuredText.")
3014 ;; Most of the source code is public domain, but some source files are
3015 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3016 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3017
3018(define-public python2-docutils
3019 (package-with-python2 python-docutils))
fb35b7c0
DT
3020
3021(define-public python-pygments
3022 (package
3023 (name "python-pygments")
7d2e758d 3024 (version "2.1.3")
fb35b7c0
DT
3025 (source
3026 (origin
3027 (method url-fetch)
9f442285 3028 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3029 (sha256
3030 (base32
7d2e758d 3031 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3032 (build-system python-build-system)
995cb99e
MB
3033 (arguments
3034 ;; FIXME: Tests require sphinx, which depends on this.
3035 '(#:tests? #f))
fb35b7c0
DT
3036 (home-page "http://pygments.org/")
3037 (synopsis "Syntax highlighting")
3038 (description
3039 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3040 (license license:bsd-2)))
fb35b7c0
DT
3041
3042(define-public python2-pygments
3043 (package-with-python2 python-pygments))
9dd6078d
DT
3044
3045(define-public python-sphinx
3046 (package
3047 (name "python-sphinx")
c227458a 3048 (version "1.5.1")
9dd6078d
DT
3049 (source
3050 (origin
3051 (method url-fetch)
9a8acd00 3052 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3053 (sha256
3054 (base32
c227458a 3055 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3056 (build-system python-build-system)
03cb5f9e 3057 (arguments
c227458a
DM
3058 `(#:phases
3059 (modify-phases %standard-phases
3060 (replace 'check
3061 (lambda _
3062 ;; Requires Internet access.
3063 (delete-file "tests/test_build_linkcheck.py")
3064 (zero? (system* "make" "test")))))))
f22efa01 3065 (propagated-inputs
9a8acd00
DM
3066 `(("python-imagesize" ,python-imagesize)
3067 ("python-sphinx-alabaster-theme"
3068 ,python-sphinx-alabaster-theme)
3069 ("python-babel" ,python-babel)
3070 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3071 ("python-docutils" ,python-docutils)
9a8acd00
DM
3072 ("python-jinja2" ,python-jinja2)
3073 ("python-pygments" ,python-pygments)
a10b9810 3074 ("python-requests" ,python-requests)
9a8acd00 3075 ("python-six" ,python-six)))
c227458a
DM
3076 (native-inputs
3077 `(("graphviz" ,graphviz)
3078 ("python-html5lib" ,python-html5lib)
3079 ("python-mock" ,python-mock)
a10b9810 3080 ("python-nose" ,python-nose)))
9dd6078d
DT
3081 (home-page "http://sphinx-doc.org/")
3082 (synopsis "Python documentation generator")
3083 (description "Sphinx is a tool that makes it easy to create documentation
3084for Python projects or other documents consisting of multiple reStructuredText
3085sources.")
9a8acd00
DM
3086 (license license:bsd-3)
3087 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d
DT
3088
3089(define-public python2-sphinx
9a8acd00
DM
3090 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3091 (package
3092 (inherit base)
3093 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3094 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3095 ,@(package-native-inputs base)))
3096 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3097 ,@(package-propagated-inputs base))))))
6888830b 3098
ad320b20
RW
3099(define-public python-sphinx-rtd-theme
3100 (package
3101 (name "python-sphinx-rtd-theme")
3102 (version "0.1.6")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (string-append "https://pypi.python.org/packages/source/s/"
3107 "sphinx_rtd_theme/sphinx_rtd_theme-"
3108 version ".tar.gz"))
3109 (sha256
3110 (base32
3111 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3112 (build-system python-build-system)
9893cff3 3113 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3114 (propagated-inputs
3115 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3116 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3117 (synopsis "ReadTheDocs.org theme for Sphinx")
3118 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3119 (license license:expat)))
ad320b20
RW
3120
3121(define-public python2-sphinx-rtd-theme
3122 (package-with-python2 python-sphinx-rtd-theme))
3123
fe94cf0c
HG
3124(define-public python-rst.linker
3125 (package
3126 (name "python-rst.linker")
3127 (version "1.7")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "rst.linker" version))
3132 (sha256
3133 (base32
3134 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3135 (build-system python-build-system)
3136 (propagated-inputs
22d7360b 3137 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3138 ("python-six" ,python-six)))
3139 (native-inputs
3140 `(("python-setuptools-scm" ,python-setuptools-scm)))
3141 ;; Test would require path.py, which would introduce a cyclic dependence.
3142 (arguments `(#:tests? #f))
3143 ;; Note: As of version 1.7 the documentation is not worth building.
3144 (home-page "https://github.com/jaraco/rst.linker")
3145 (synopsis "Sphinx plugin to add links and timestamps")
3146 (description "rst.linker allows to automatically replace text by a
3147reStructuredText external reference or timestamps. It's primary purpose is to
3148augment the changelog, but it can be used for other documents, too.")
3149 (license license:expat)))
3150
3151(define-public python2-rst.linker
3152 (package-with-python2 python-rst.linker))
3153
f4de5b3b
CAW
3154(define-public python-feedgenerator
3155 (package
3156 (name "python-feedgenerator")
d5c183d1 3157 (version "1.9")
f4de5b3b 3158 (source
f4de5b3b 3159 (origin
f0412aa2
EF
3160 (method url-fetch)
3161 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3162 (sha256
3163 (base32
d5c183d1 3164 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3165 (modules '((guix build utils)))
3166 (snippet
3167 '(begin
3168 ;; Remove pre-compiled .pyc files from source.
3169 (for-each delete-file-recursively
3170 (find-files "." "__pycache__" #:directories? #t))
3171 (for-each delete-file (find-files "." "\\.pyc$"))
3172 #t))))
f4de5b3b 3173 (build-system python-build-system)
dae73d9b 3174 (propagated-inputs
f3b98f4f 3175 `(("python-pytz" ,python-pytz)
f4de5b3b 3176 ("python-six" ,python-six)))
f0412aa2 3177 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3178 (synopsis
3179 "Standalone version of Django's Atom/RSS feed generator")
3180 (description
3181 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3182which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3183 (license license:bsd-3)))
f4de5b3b
CAW
3184
3185(define-public python2-feedgenerator
3186 (package-with-python2 python-feedgenerator))
3187
59ad30e3
CAW
3188(define-public python-blinker
3189 (package
3190 (name "python-blinker")
7fb9ff4d 3191 (version "1.4")
59ad30e3
CAW
3192 (source
3193 (origin
3194 (method url-fetch)
7fb9ff4d 3195 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3196 (sha256
3197 (base32
7fb9ff4d 3198 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3199 (build-system python-build-system)
59ad30e3
CAW
3200 (home-page "http://pythonhosted.org/blinker/")
3201 (synopsis "Fast, simple object-to-object and broadcast signaling")
3202 (description
3203 "Blinker provides a fast dispatching system that allows any number of
3204interested parties to subscribe to events, or \"signals\".")
3205 (license license:expat)))
3206
3207(define-public python2-blinker
3208 (package-with-python2 python-blinker))
3209
b8050e71
CAW
3210(define-public pelican
3211 (package
3212 (name "pelican")
11f97c27 3213 (version "3.6.3")
b8050e71
CAW
3214 (source
3215 (origin
3216 (method url-fetch)
11f97c27 3217 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3218 (sha256
3219 (base32
11f97c27 3220 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3221 (build-system python-build-system)
f22efa01 3222 (propagated-inputs
b8050e71
CAW
3223 `(("python-feedgenerator" ,python-feedgenerator)
3224 ("python-jinja2" ,python-jinja2)
3225 ("python-pygments" ,python-pygments)
3226 ("python-docutils" ,python-docutils)
3227 ("python-pytz" ,python-pytz)
3228 ("python-blinker" ,python-blinker)
3229 ("python-unidecode" ,python-unidecode)
3230 ("python-six" ,python-six)
22d7360b 3231 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3232 (home-page "http://getpelican.com/")
3233 (arguments
3234 `(;; XXX Requires a lot more packages to do unit tests :P
3235 #:tests? #f
3236 #:phases (modify-phases %standard-phases
3237 (add-before
3238 'install 'adjust-requires
3239 ;; Since feedgenerator is installed from git, it doesn't
3240 ;; conform to the version requirements.
3241 ;;
3242 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3243 ;; version requirement so setuptools doesn't get confused.
3244 (lambda _
3245 (substitute* "setup.py"
3246 (("['\"]feedgenerator.*?['\"]")
3247 "'feedgenerator'")))))))
3248 (synopsis "Python-based static site publishing system")
3249 (description
3250 "Pelican is a tool to generate a static blog from reStructuredText,
3251Markdown input files, and more. Pelican uses Jinja2 for templating
3252and is very extensible.")
3f641af0 3253 (license license:agpl3+)))
b8050e71 3254
240ca4aa
RW
3255(define-public python-scikit-learn
3256 (package
3257 (name "python-scikit-learn")
8e401ab6 3258 (version "0.18.1")
240ca4aa
RW
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (string-append
3263 "https://github.com/scikit-learn/scikit-learn/archive/"
3264 version ".tar.gz"))
7e21b9fb 3265 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3266 (sha256
3267 (base32
8e401ab6 3268 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3269 (build-system python-build-system)
3270 (arguments
3271 `(#:phases
4d25c486
MB
3272 (modify-phases %standard-phases
3273 (delete 'check)
3274 (add-after 'install 'check
3275 ;; Running tests from the source directory requires
3276 ;; an "inplace" build with paths relative to CWD.
3277 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3278 ;; Use the installed version instead.
3279 (lambda* (#:key inputs outputs #:allow-other-keys)
3280 (add-installed-pythonpath inputs outputs)
3281 ;; some tests require access to "$HOME"
3282 (setenv "HOME" "/tmp")
3283 ;; Step out of the source directory just to be sure.
3284 (chdir "..")
3285 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3286 (inputs
328bb95d
HG
3287 `(("openblas" ,openblas)))
3288 (native-inputs
8e401ab6
RW
3289 `(("python-nose" ,python-nose)
3290 ("python-cython" ,python-cython)))
240ca4aa
RW
3291 (propagated-inputs
3292 `(("python-numpy" ,python-numpy)
3293 ("python-scipy" ,python-scipy)))
3294 (home-page "http://scikit-learn.org/")
3295 (synopsis "Machine Learning in Python")
3296 (description
3297 "Scikit-learn provides simple and efficient tools for data
3298mining and data analysis.")
1b5241c5 3299 (license license:bsd-3)))
240ca4aa
RW
3300
3301(define-public python2-scikit-learn
1b5241c5 3302 (package-with-python2 python-scikit-learn))
240ca4aa 3303
12f8f9bb
RW
3304(define-public python-scikit-image
3305 (package
3306 (name "python-scikit-image")
3307 (version "0.11.3")
3308 (source
3309 (origin
3310 (method url-fetch)
3311 (uri (string-append
3312 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3313 version ".tar.gz"))
3314 (sha256
3315 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3316 (build-system python-build-system)
9026e689
MB
3317 (arguments
3318 ;; TODO: Some tests require running X11 server. Disable them?
3319 '(#:tests? #f))
b83e2333 3320 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3321 (propagated-inputs
3322 `(("python-matplotlib" ,python-matplotlib)
3323 ("python-networkx" ,python-networkx)
12f8f9bb 3324 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3325 ("python-pillow" ,python-pillow)))
3326 (native-inputs
b83e2333
HG
3327 `(("python-numpy" ,python-numpy)
3328 ("python-cython" ,python-cython)
3329 ("python-six" ,python-six)))
12f8f9bb
RW
3330 (home-page "http://scikit-image.org/")
3331 (synopsis "Image processing in Python")
3332 (description
e881752c 3333 "Scikit-image is a collection of algorithms for image processing.")
12733594 3334 (license license:bsd-3)))
12f8f9bb
RW
3335
3336(define-public python2-scikit-image
12733594 3337 (package-with-python2 python-scikit-image))
12f8f9bb 3338
5394a6a6
RW
3339(define-public python-redis
3340 (package
3341 (name "python-redis")
911a8faf 3342 (version "2.10.5")
5394a6a6
RW
3343 (source
3344 (origin
3345 (method url-fetch)
911a8faf 3346 (uri (pypi-uri "redis" version))
5394a6a6 3347 (sha256
911a8faf 3348 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3349 (build-system python-build-system)
3350 ;; Tests require a running Redis server
3351 (arguments '(#:tests? #f))
cf8124b0
HG
3352 ;; As long as we are not running test, we do not need this input :-)
3353 ;;(native-inputs
3354 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3355 (home-page "https://github.com/andymccurdy/redis-py")
3356 (synopsis "Redis Python client")
3357 (description
3358 "This package provides a Python interface to the Redis key-value store.")
3359 (license license:expat)))
3360
3361(define-public python2-redis
3362 (package-with-python2 python-redis))
3363
748cef5b
RW
3364(define-public python-rq
3365 (package
3366 (name "python-rq")
3367 (version "0.5.2")
3368 (source
3369 (origin
3370 (method url-fetch)
3371 (uri (string-append
3372 "https://pypi.python.org/packages/source/r/rq/rq-"
3373 version ".tar.gz"))
3374 (sha256
3375 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3376 (build-system python-build-system)
3377 (propagated-inputs
3378 `(("python-click" ,python-click)
3379 ("python-redis" ,python-redis)))
748cef5b
RW
3380 (home-page "http://python-rq.org/")
3381 (synopsis "Simple job queues for Python")
3382 (description
3383 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3384processing them in the background with workers. It is backed by Redis and it
3385is designed to have a low barrier to entry.")
3f641af0 3386 (license license:bsd-2)))
748cef5b
RW
3387
3388(define-public python2-rq
3389 (package-with-python2 python-rq))
3390
6888830b
FB
3391(define-public python-cython
3392 (package
3393 (name "python-cython")
dd22efef 3394 (version "0.24.1")
6888830b
FB
3395 (source
3396 (origin
3397 (method url-fetch)
56918e26 3398 (uri (pypi-uri "Cython" version))
6888830b
FB
3399 (sha256
3400 (base32
dd22efef 3401 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3402 (build-system python-build-system)
3403 ;; we need the full python package and not just the python-wrapper
3404 ;; because we need libpython3.3m.so
3405 (inputs
3406 `(("python" ,python)))
3407 (arguments
3408 `(#:phases
b92f651b
EF
3409 (modify-phases %standard-phases
3410 (add-before 'check 'set-HOME
3411 ;; some tests require access to "$HOME/.cython"
3412 (lambda _ (setenv "HOME" "/tmp")))
3413 (replace 'check
3414 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3415 (home-page "http://cython.org/")
3416 (synopsis "C extensions for Python")
3417 (description "Cython is an optimising static compiler for both the Python
3418programming language and the extended Cython programming language. It makes
3419writing C extensions for Python as easy as Python itself.")
3f641af0 3420 (license license:asl2.0)
48b311b1 3421 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3422
3423(define-public python2-cython
48b311b1
LC
3424 (package (inherit (package-with-python2
3425 (strip-python2-variant python-cython)))
6888830b
FB
3426 (name "python2-cython")
3427 (inputs
3428 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3429
ee5fb7ee
AV
3430;; The RPython toolchain currently does not support Python 3.
3431(define-public python2-rpython
3432 (package
3433 (name "python2-rpython")
3434 (version "0.1.4")
3435 (source
3436 (origin
3437 (method url-fetch)
3438 (uri (pypi-uri "rpython" version))
3439 (sha256
3440 (base32
3441 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3442 (build-system python-build-system)
3443 (arguments `(#:python ,python-2))
3444 (native-inputs
f3b98f4f 3445 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3446 (home-page "https://rpython.readthedocs.org")
3447 (synopsis "Framework for implementing interpreters and virtual machines")
3448 (description "RPython is a translation and support framework for
3449producing implementations of dynamic languages, emphasizing a clean separation
3450between language specification and implementation aspects.")
3451 (license license:expat)))
3452
7ccb71e0 3453(define-public python-numpy
0da98533 3454 (package
7ccb71e0
TD
3455 (name "python-numpy")
3456 (version "1.12.0")
0da98533
FB
3457 (source
3458 (origin
3459 (method url-fetch)
7ccb71e0
TD
3460 (uri (string-append
3461 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3462 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3463 (sha256
3464 (base32
7ccb71e0 3465 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3466 (build-system python-build-system)
3467 (inputs
328bb95d 3468 `(("openblas" ,openblas)
cba256f8 3469 ("lapack" ,lapack)))
0da98533 3470 (native-inputs
7ccb71e0
TD
3471 `(("python-cython" ,python-cython)
3472 ("python-nose" ,python-nose)
2efabc55 3473 ("gfortran" ,gfortran)))
0da98533
FB
3474 (arguments
3475 `(#:phases
2efabc55
HG
3476 (modify-phases %standard-phases
3477 (add-before 'build 'set-environment-variables
3478 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3479 (call-with-output-file "site.cfg"
3480 (lambda (port)
cba256f8
RW
3481 (format port
3482 "[openblas]
dbdfe515
RW
3483libraries = openblas
3484library_dirs = ~a/lib
3485include_dirs = ~a/include
cba256f8 3486
2efabc55
HG
3487# backslash-n to make emacs happy
3488\n[lapack]
cba256f8
RW
3489lapack_libs = lapack
3490library_dirs = ~a/lib
3491include_dirs = ~a/include
3492"
3493 (assoc-ref inputs "openblas")
3494 (assoc-ref inputs "openblas")
3495 (assoc-ref inputs "lapack")
3496 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3497 ;; Use "gcc" executable, not "cc".
3498 (substitute* "numpy/distutils/system_info.py"
3499 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3500 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3501 #t))
6a843168
FB
3502 ;; Tests can only be run after the library has been installed and not
3503 ;; within the source directory.
2efabc55
HG
3504 (delete 'check)
3505 (add-after 'install 'check
3506 (lambda* (#:key outputs inputs #:allow-other-keys)
3507 ;; Make installed package available for running the tests
3508 (add-installed-pythonpath inputs outputs)
6a843168 3509 (with-directory-excursion "/tmp"
89b5c60e 3510 (zero? (system* "python" "-c"
2efabc55 3511 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3512 (home-page "http://www.numpy.org/")
3513 (synopsis "Fundamental package for scientific computing with Python")
3514 (description "NumPy is the fundamental package for scientific computing
e881752c 3515with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3516object, sophisticated (broadcasting) functions, tools for integrating C/C++
3517and Fortran code, useful linear algebra, Fourier transform, and random number
3518capabilities.")
3f641af0 3519 (license license:bsd-3)))
0da98533 3520
7ccb71e0
TD
3521(define-public python2-numpy
3522 (package-with-python2 python-numpy))
15bfe6d6 3523
460fccd4 3524(define-public python-munch
3525 (package
3526 (name "python-munch")
3527 (version "2.0.4")
3528 (source
3529 (origin
3530 (method url-fetch)
3531 (uri (pypi-uri "munch" version))
3532 (sha256
3533 (base32
3534 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3535 (build-system python-build-system)
3536 (home-page "https://github.com/Infinidat/munch")
3537 (synopsis "Dot-accessible dictionary")
3538 (description "Munch is a dot-accessible dictionary similar to JavaScript
3539objects.")
3540 (license license:expat)))
3541
3542(define-public python2-munch
3543 (package-with-python2 python-munch))
3544
3a1bfe18
RW
3545(define-public python2-fastlmm
3546 (package
3547 (name "python2-fastlmm")
154d0016 3548 (version "0.2.21")
3a1bfe18
RW
3549 (source
3550 (origin
3551 (method url-fetch)
b074e7d4 3552 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3553 (sha256
3554 (base32
154d0016 3555 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3556 (build-system python-build-system)
3557 (arguments
3558 `(#:python ,python-2)) ; only Python 2.7 is supported
3559 (propagated-inputs
3560 `(("python2-numpy" ,python2-numpy)
3561 ("python2-scipy" ,python2-scipy)
3562 ("python2-matplotlib" ,python2-matplotlib)
3563 ("python2-pandas" ,python2-pandas)
3564 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3565 ("python2-pysnptools" ,python2-pysnptools)))
3566 (native-inputs
3567 `(("unzip" ,unzip)
2efabc55 3568 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3569 ("python2-mock" ,python2-mock)
3570 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3571 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3572 (synopsis "Perform genome-wide association studies on large data sets")
3573 (description
3574 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3575Models, is a program for performing both single-SNP and SNP-set genome-wide
3576association studies (GWAS) on extremely large data sets.")
3f641af0 3577 (license license:asl2.0)))
3a1bfe18 3578
7ccb71e0
TD
3579(define-public python-numpy-documentation
3580 (package
3581 (name "python-numpy-documentation")
3582 (version (package-version python-numpy))
3583 (source (package-source python-numpy))
3584 (build-system python-build-system)
2ee8869a 3585 (native-inputs
7ccb71e0
TD
3586 `(("python-matplotlib" ,python-matplotlib)
3587 ("python-numpy" ,python-numpy)
3588 ("pkg-config" ,pkg-config)
2efabc55
HG
3589 ("python-sphinx" ,python-sphinx)
3590 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3591 ("texlive" ,texlive)
3592 ("texinfo" ,texinfo)
3593 ("perl" ,perl)
7ccb71e0
TD
3594 ("scipy-sphinx-theme"
3595 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3596 (method git-fetch)
3597 (uri (git-reference
3598 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3599 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3600 (sha256
3601 (base32
67416769 3602 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3603 ,@(package-native-inputs python-numpy)))
2ee8869a 3604 (arguments
7ccb71e0
TD
3605 `(#:tests? #f ; we're only generating the documentation
3606 #:phases
3607 (modify-phases %standard-phases
3608 (delete 'build)
3609 (replace 'install
3610 (lambda* (#:key inputs outputs #:allow-other-keys)
3611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3612 (doc (string-append
3613 data "/doc/" ,name "-"
3614 ,(package-version python-numpy)))
3615 (info-reader (string-append data "/info"))
3616 (html (string-append doc "/html"))
3617 (scipy-sphinx-theme "scipy-sphinx-theme")
3618 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3619 (pyver ,(string-append "PYVER=")))
3620 (with-directory-excursion "doc"
3621 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3622 (mkdir-p html)
3623 (system* "make" "html" pyver)
3624 (system* "make" "latex" "PAPER=a4" pyver)
3625 (system* "make" "-C" "build/latex"
3626 "all-pdf" "PAPER=a4" pyver)
3627 ;; FIXME: Generation of the info file fails.
3628 ;; (system* "make" "info" pyver)
3629 ;; (mkdir-p info)
3630 ;; (copy-file "build/texinfo/numpy.info"
3631 ;; (string-append info "/numpy.info"))
3632 (for-each (lambda (file)
3633 (copy-file (string-append "build/latex" file)
3634 (string-append doc file)))
3635 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3636 (with-directory-excursion "build/html"
3637 (for-each (lambda (file)
3638 (let* ((dir (dirname file))
3639 (tgt-dir (string-append html "/" dir)))
3640 (unless (equal? "." dir)
3641 (mkdir-p tgt-dir))
3642 (install-file file html)))
3643 (find-files "." ".*")))))
3644 #t)))))
3645 (home-page (package-home-page python-numpy))
3646 (synopsis "Documentation for the python-numpy package")
3647 (description (package-description python-numpy))
3648 (license (package-license python-numpy))))
2ee8869a 3649
7ccb71e0
TD
3650(define-public python2-numpy-documentation
3651 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3652 (package
3653 (inherit numpy-documentation)
3654 (native-inputs `(("python2-functools32" ,python2-functools32)
3655 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3656
0151a8df 3657(define-public python-pygit2
3658 (package
3659 (name "python-pygit2")
022c9772 3660 (version "0.25.0")
0151a8df 3661 (source
3662 (origin
3663 (method url-fetch)
3664 (uri (pypi-uri "pygit2" version))
3665 (sha256
3666 (base32
bb6043fe
MB
3667 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3668 (patches
3669 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3670 (build-system python-build-system)
3671 (propagated-inputs
3672 `(("python-six" ,python-six)
3673 ("python-cffi" ,python-cffi)
3674 ("libgit2" ,libgit2)
3675 ("python-tox" ,python-tox)))
3676 (home-page "https://github.com/libgit2/pygit2")
3677 (synopsis "Python bindings for libgit2")
3678 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3679library, libgit2 implements Git plumbing.")
3680 ;; GPL2.0 only, with linking exception.
3681 (license license:gpl2)))
3682
3683(define-public python2-pygit2
3684 (package-with-python2 python-pygit2))
3685
15bfe6d6
FB
3686(define-public python-pyparsing
3687 (package
3688 (name "python-pyparsing")
e0669289 3689 (version "2.0.3")
15bfe6d6
FB
3690 (source
3691 (origin
3692 (method url-fetch)
de67e922
LF
3693 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3694 "/pyparsing-" version
15bfe6d6
FB
3695 "/pyparsing-" version ".tar.gz"))
3696 (sha256
3697 (base32
e0669289 3698 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3699 (build-system python-build-system)
3700 (outputs '("out" "doc"))
3701 (arguments
3702 `(#:tests? #f ; no test target
3703 #:modules ((guix build python-build-system)
3704 (guix build utils))
3705 #:phases
3706 (alist-cons-after
3707 'install 'install-doc
3708 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3709 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3710 "/share/doc/" ,name "-" ,version))
3711 (html-doc (string-append doc "/html"))
3712 (examples (string-append doc "/examples")))
3713 (mkdir-p html-doc)
3714 (mkdir-p examples)
89b5c60e 3715 (for-each
15bfe6d6 3716 (lambda (dir tgt)
89b5c60e 3717 (map (lambda (file)
96c46210 3718 (install-file file tgt))
15bfe6d6
FB
3719 (find-files dir ".*")))
3720 (list "docs" "htmldoc" "examples")
3721 (list doc html-doc examples))))
3722 %standard-phases)))
3723 (home-page "http://pyparsing.wikispaces.com")
3724 (synopsis "Python parsing class library")
3725 (description
3726 "The pyparsing module is an alternative approach to creating and
3727executing simple grammars, vs. the traditional lex/yacc approach, or the use
3728of regular expressions. The pyparsing module provides a library of classes
3729that client code uses to construct the grammar directly in Python code.")
bd3fa666 3730 (license license:expat)))
15bfe6d6
FB
3731
3732(define-public python2-pyparsing
3733 (package-with-python2 python-pyparsing))
3734
ec00de35
FB
3735(define-public python-numpydoc
3736 (package
3737 (name "python-numpydoc")
3738 (version "0.5")
3739 (source
3740 (origin
3741 (method url-fetch)
89b5c60e 3742 (uri (string-append
ec00de35
FB
3743 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3744 version ".tar.gz"))
3745 (sha256
3746 (base32
5e4d8f67
AE
3747 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3748 (modules '((guix build utils)))
3749 (snippet
3750 '(begin
3751 ;; Drop a test requiring matplotlib, which we cannot add as an
3752 ;; input since it would create a circular dependency: Extend the
3753 ;; test for Python 3, where it is already dropped, to Python 2.
3754 (substitute* "numpydoc/tests/test_plot_directive.py"
3755 (("3") "2"))))))
ec00de35 3756 (build-system python-build-system)
fe4a8da4 3757 (propagated-inputs
213d1745
HG
3758 `(("python-sphinx" ,python-sphinx)))
3759 (native-inputs
3760 `(("python-nose" ,python-nose)))
ec00de35
FB
3761 (home-page "https://pypi.python.org/pypi/numpydoc")
3762 (synopsis
3763 "Numpy's Sphinx extensions")
3764 (description
3765 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3766 (license license:bsd-2)))
ec00de35
FB
3767
3768(define-public python2-numpydoc
5e4d8f67 3769 (package-with-python2 python-numpydoc))
1c65314c 3770
1e656049
RW
3771(define-public python-numexpr
3772 (package
3773 (name "python-numexpr")
2ee57340 3774 (version "2.6.1")
1e656049
RW
3775 (source
3776 (origin
3777 (method url-fetch)
26112c0a 3778 (uri (pypi-uri "numexpr" version))
1e656049
RW
3779 (sha256
3780 (base32
2ee57340 3781 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3782 (build-system python-build-system)
3783 (arguments `(#:tests? #f)) ; no tests included
3784 (propagated-inputs
3785 `(("python-numpy" ,python-numpy)))
3786 (home-page "https://github.com/pydata/numexpr")
3787 (synopsis "Fast numerical expression evaluator for NumPy")
3788 (description
3789 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3790expressions that operate on arrays are accelerated and use less memory than
3791doing the same calculation in Python. In addition, its multi-threaded
3792capabilities can make use of all your cores, which may accelerate
3793computations, most specially if they are not memory-bounded (e.g. those using
3794transcendental functions).")
f210e944 3795 (license license:expat)))
1e656049
RW
3796
3797(define-public python2-numexpr
f210e944 3798 (package-with-python2 python-numexpr))
1e656049 3799
361d982c
MB
3800(define-public python-cycler
3801 (package
3802 (name "python-cycler")
3803 (version "0.10.0")
3804 (source (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "cycler" version))
3807 (sha256
3808 (base32
3809 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3810 (build-system python-build-system)
3811 (arguments
3812 ;; XXX: The current version requires 'coveralls' which we don't have.
3813 ;; Enable this for the next release which uses 'python-pytest'.
3814 '(#:tests? #f))
3815 (propagated-inputs
3816 `(("python-six" ,python-six)))
3817 (home-page "http://matplotlib.org/cycler/")
3818 (synopsis "Composable keyword argument iterator")
3819 (description
3820 "When using @code{matplotlib} and plotting more than one line, it is
3821common to want to be able to want to be able to cycle over one or more artist
3822styles; but the plotting logic can quickly become involved.
3823To address this and enable easy cycling over arbitrary @code{kwargs}, the
3824@code{Cycler} class was developed.")
3825 (license license:bsd-3)))
3826
3827(define-public python2-cycler
3828 (package-with-python2 python-cycler))
3829
2aa6d3ae
TD
3830(define-public python-colorspacious
3831 (package
3832 (name "python-colorspacious")
3833 (version "1.1.0")
3834 (source
3835 (origin
3836 (method url-fetch)
3837 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3838 version ".tar.gz"))
3839 (file-name (string-append name "-" version))
3840 (sha256
3841 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3842 (build-system python-build-system)
3843 (propagated-inputs
3844 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
3845 (native-inputs
3846 `(("python-nose" ,python-nose)))
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (replace 'check
3851 (lambda _
3852 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
3853 (home-page "https://github.com/njsmith/colorspacious")
3854 (synopsis "Python library for colorspace conversions")
3855 (description "@code{colorspacious} is a Python library that lets you
3856convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3857 (license license:expat)))
3858
3859(define-public python2-colorspacious
3860 (package-with-python2 python-colorspacious))
3861
1c65314c
FB
3862(define-public python-matplotlib
3863 (package
3864 (name "python-matplotlib")
4535a93a 3865 (version "2.0.0")
1c65314c
FB
3866 (source
3867 (origin
3868 (method url-fetch)
4535a93a
TD
3869 (uri (string-append
3870 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3871 (file-name (string-append name "-" version ".tar.gz"))
1c65314c
FB
3872 (sha256
3873 (base32
4535a93a 3874 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
1c65314c 3875 (build-system python-build-system)
25f9a068 3876 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
3877 `(("python-cycler" ,python-cycler)
3878 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
3879 ("python-pygobject" ,python-pygobject)
3880 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3881 ("python-tkinter" ,python "tk")
22d7360b 3882 ("python-dateutil" ,python-dateutil)
7ccb71e0 3883 ("python-numpy" ,python-numpy)
ca33a3ad
HG
3884 ("python-pillow" ,python-pillow)
3885 ("python-pytz" ,python-pytz)
3886 ("python-six" ,python-six)
25f9a068
FB
3887 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3888 ;; from 'gtk+') provides the required 'typelib' files used by
3889 ;; 'gobject-introspection'. The location of these files is set with the
3890 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3891 ;; is done automatically by a 'native-search-path' procedure. However,
3892 ;; at run-time the user must set this variable as follows:
3893 ;;
3894 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3895 ("gtk+" ,gtk+)
3896 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3897 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3898 ;; object. For this reason we need to import both libraries.
3899 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3900 ("python-pycairo" ,python-pycairo)
3901 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3902 (inputs
ca33a3ad 3903 `(("libpng" ,libpng)
1c65314c
FB
3904 ("imagemagick" ,imagemagick)
3905 ("freetype" ,freetype)
25f9a068
FB
3906 ("cairo" ,cairo)
3907 ("glib" ,glib)
1c65314c 3908 ;; FIXME: Add backends when available.
1c65314c 3909 ;("python-wxpython" ,python-wxpython)
4535a93a 3910 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
3911 ("tcl" ,tcl)
3912 ("tk" ,tk)))
1c65314c
FB
3913 (native-inputs
3914 `(("pkg-config" ,pkg-config)
ca33a3ad 3915 ("python-nose" ,python-nose)
4535a93a 3916 ("python-mock" ,python-mock)))
1c65314c
FB
3917 (arguments
3918 `(#:phases
42b7009a
DM
3919 (modify-phases %standard-phases
3920 (add-before 'build 'configure-environment
3921 (lambda* (#:key outputs inputs #:allow-other-keys)
3922 (let ((cairo (assoc-ref inputs "cairo"))
3923 (gtk+ (assoc-ref inputs "gtk+")))
3924 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3925 ;; has not effect.
3926 (setenv "LD_LIBRARY_PATH"
3927 (string-append cairo "/lib:" gtk+ "/lib"))
3928 (setenv "HOME" (getcwd))
3929 (call-with-output-file "setup.cfg"
3930 (lambda (port)
3931 (format port "[directories]~%
1bbc659f 3932basedirlist = ~a,~a~%
57b7b8cd 3933 [rc_options]~%
1bbc659f 3934backend = TkAgg~%"
4535a93a
TD
3935 (assoc-ref inputs "tcl")
3936 (assoc-ref inputs "tk")))))
3937 #t)))))
3938 (home-page "http://matplotlib.org")
3939 (synopsis "2D plotting library for Python")
3940 (description
3941 "Matplotlib is a Python 2D plotting library which produces publication
3942quality figures in a variety of hardcopy formats and interactive environments
3943across platforms. Matplotlib can be used in Python scripts, the python and
3944ipython shell, web application servers, and six graphical user interface
3945toolkits.")
3946 (license license:psfl)
3947 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3948
3949(define-public python2-matplotlib
3950 (let ((matplotlib (package-with-python2
3951 (strip-python2-variant python-matplotlib))))
3952 (package (inherit matplotlib)
3953 ;; Make sure to use special packages for Python 2 instead
3954 ;; of those automatically rewritten by package-with-python2.
3955 (propagated-inputs
3956 `(("python2-pycairo" ,python2-pycairo)
3957 ("python2-functools32" ,python2-functools32)
3958 ("python2-pygobject-2" ,python2-pygobject-2)
3959 ("python2-subprocess32" ,python2-subprocess32)
3960 ("python2-tkinter" ,python-2 "tk")
3961 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3962 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3963
3964(define-public python-matplotlib-documentation
3965 (package
3966 (name "python-matplotlib-documentation")
3967 (version (package-version python-matplotlib))
3968 (source (package-source python-matplotlib))
3969 (build-system python-build-system)
3970 (native-inputs
3971 `(("python-matplotlib" ,python-matplotlib)
3972 ("python-colorspacious" ,python-colorspacious)
3973 ("python-sphinx" ,python-sphinx)
3974 ("python-numpydoc" ,python-numpydoc)
3975 ("python-ipython" ,python-ipython)
1eaaea41
TD
3976 ("python-mock" ,python-mock)
3977 ("graphviz" ,graphviz)
4535a93a
TD
3978 ("texlive" ,texlive)
3979 ("texinfo" ,texinfo)
3980 ,@(package-native-inputs python-matplotlib)))
3981 (arguments
3982 `(#:tests? #f ; we're only generating documentation
3983 #:phases
3984 (modify-phases %standard-phases
1eaaea41
TD
3985 (replace 'build
3986 (lambda _
3987 (chdir "doc")
3988 ;; Produce pdf in 'A4' format.
3989 (substitute* "conf.py"
3990 (("latex_paper_size = 'letter'") "")
3991 ;; latex_paper_size is deprecated -> set paper size using
3992 ;; latex_elements
3993 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3994 ;; insert at a point where latex_elements{} is defined:
3995 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3996 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 3997 (replace 'install
42b7009a 3998 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 3999 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4000 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4001 (info (string-append data "/info"))
4002 (html (string-append doc "/html")))
1eaaea41
TD
4003 (mkdir-p html)
4004 (mkdir-p info)
4005 (copy-recursively "build/html" html)
4006 (symlink (string-append html "/_images")
4007 (string-append info "/matplotlib-figures"))
4008 (with-directory-excursion "build/texinfo"
4009 (substitute* "matplotlib.texi"
4010 (("@image\\{([^,]*)" all file)
4011 (string-append "@image{matplotlib-figures/" file)))
18b31516 4012 (symlink (string-append html "/_images")
1eaaea41
TD
4013 "./matplotlib-figures")
4014 (system* "makeinfo" "--no-split"
4015 "-o" "matplotlib.info" "matplotlib.texi"))
4016 (copy-file "build/texinfo/matplotlib.info"
4017 (string-append info "/matplotlib.info"))
4018 (copy-file "build/latex/Matplotlib.pdf"
4019 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4020 #t)))))
4021 (home-page (package-home-page python-matplotlib))
4022 (synopsis "Documentation for the python-matplotlib package")
4023 (description (package-description python-matplotlib))
4024 (license (package-license python-matplotlib))))
1c65314c 4025
4535a93a
TD
4026(define-public python2-matplotlib-documentation
4027 (package-with-python2 python-matplotlib-documentation))
94914805 4028
0dde6232
RW
4029(define-public python2-pysnptools
4030 (package
4031 (name "python2-pysnptools")
a800018e 4032 (version "0.3.9")
0dde6232
RW
4033 (source
4034 (origin
4035 (method url-fetch)
3f2e9675 4036 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4037 (sha256
4038 (base32
a800018e 4039 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4040 (build-system python-build-system)
4041 (arguments
4042 `(#:python ,python-2)) ; only Python 2.7 is supported
4043 (propagated-inputs
4044 `(("python2-numpy" ,python2-numpy)
4045 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4046 ("python2-pandas" ,python2-pandas)))
4047 (native-inputs
4048 `(("python2-cython" ,python2-cython)))
0dde6232 4049 (native-inputs
f3b98f4f 4050 `(("unzip" ,unzip)))
0dde6232
RW
4051 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4052 (synopsis "Library for reading and manipulating genetic data")
4053 (description
4054 "PySnpTools is a library for reading and manipulating genetic data. It
4055can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4056those files. It can also efficiently manipulate ranges of integers using set
4057operators such as union, intersection, and difference.")
3f641af0 4058 (license license:asl2.0)))
0dde6232 4059
c9b1b4f9
RW
4060(define-public python-rpy2
4061 (package
4062 (name "python-rpy2")
ec3bcbc7 4063 (version "2.7.6")
c9b1b4f9
RW
4064 (source
4065 (origin
4066 (method url-fetch)
ec3bcbc7 4067 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4068 (sha256
4069 (base32
ec3bcbc7 4070 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4071 (build-system python-build-system)
444464ec
MB
4072 (arguments
4073 '(#:phases
4074 (modify-phases %standard-phases
4075 (delete 'check)
4076 (add-after 'install 'check
4077 (lambda* (#:key outputs inputs #:allow-other-keys)
4078 ;; It's easier to run tests after install.
4079 ;; Make installed package available for running the tests
4080 (add-installed-pythonpath inputs outputs)
4081 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4082 (propagated-inputs
4083 `(("python-six" ,python-six)))
c9b1b4f9 4084 (inputs
482d9591 4085 `(("readline" ,readline)
c9b1b4f9
RW
4086 ("icu4c" ,icu4c)
4087 ("pcre" ,pcre)
2d7c4ae3 4088 ("r-minimal" ,r-minimal)
aeb64f3c 4089 ("r-survival" ,r-survival)))
c9b1b4f9 4090 (native-inputs
f3b98f4f 4091 `(("zlib" ,zlib)))
c9b1b4f9
RW
4092 (home-page "http://rpy.sourceforge.net/")
4093 (synopsis "Python interface to the R language")
4094 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4095low-level interface to R from Python, a proposed high-level interface,
4096including wrappers to graphical libraries, as well as R-like structures and
4097functions.")
3f641af0 4098 (license license:gpl3+)))
c9b1b4f9
RW
4099
4100(define-public python2-rpy2
4101 (let ((rpy2 (package-with-python2 python-rpy2)))
4102 (package (inherit rpy2)
d6abd094 4103 (propagated-inputs
c9b1b4f9 4104 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4105 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4106
bb986599
FB
4107(define-public python-scipy
4108 (package
4109 (name "python-scipy")
35093253 4110 (version "0.18.1")
bb986599
FB
4111 (source
4112 (origin
4113 (method url-fetch)
35093253
TD
4114 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4115 version ".tar.gz"))
4116 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4117 (sha256
4118 (base32
35093253 4119 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4120 (build-system python-build-system)
dd86c0d1 4121 (propagated-inputs
bb986599
FB
4122 `(("python-numpy" ,python-numpy)
4123 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4124 ("python-pyparsing" ,python-pyparsing)))
4125 (inputs
4126 `(("lapack" ,lapack)
719b01c1 4127 ("openblas" ,openblas)))
bb986599 4128 (native-inputs
35093253
TD
4129 `(("python-cython" ,python-cython)
4130 ("python-nose" ,python-nose)
4131 ("python-sphinx" ,python-sphinx)
5248d49e 4132 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4133 ("gfortran" ,gfortran)
bb986599
FB
4134 ("perl" ,perl)))
4135 (outputs '("out" "doc"))
4136 (arguments
4137 `(#:phases
16ca6aaa 4138 (modify-phases %standard-phases
16ca6aaa
MB
4139 (add-before 'build 'configure-openblas
4140 (lambda* (#:key inputs #:allow-other-keys)
4141 (call-with-output-file "site.cfg"
4142 (lambda (port)
4143 (format port
4144 "[blas]
719b01c1
RW
4145libraries = openblas
4146library_dirs = ~a/lib
4147include_dirs = ~a/include
d548e6aa
HG
4148
4149# backslash-n to make emacs happy
4150\n[atlas]
719b01c1
RW
4151library_dirs = ~a/lib
4152atlas_libs = openblas
4153"
16ca6aaa
MB
4154 (assoc-ref inputs "openblas")
4155 (assoc-ref inputs "openblas")
4156 (assoc-ref inputs "openblas"))))
db967b64 4157 #t))
35093253
TD
4158 (add-after 'install 'install-doc
4159 (lambda* (#:key inputs outputs #:allow-other-keys)
4160 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4161 (doc (string-append data "/doc/" ,name "-" ,version))
4162 (html (string-append doc "/html"))
4163 (pyver ,(string-append "PYVER=")))
4164 ;; Make installed package available for building the
4165 ;; documentation
4166 (add-installed-pythonpath inputs outputs)
4167 (with-directory-excursion "doc"
4168 ;; Fix generation of images for mathematical expressions.
4169 (substitute* (find-files "source" "conf\\.py")
4170 (("pngmath_use_preview = True")
4171 "pngmath_use_preview = False"))
4172 (mkdir-p html)
4173 (system* "make" "html" pyver)
4174 (with-directory-excursion "build/html"
4175 (for-each (lambda (file)
4176 (let* ((dir (dirname file))
4177 (tgt-dir (string-append html "/" dir)))
4178 (install-file file html)))
4179 (find-files "." ".*")))))
4180 #t))
4181 (add-after 'unpack 'fix-tests
4182 (lambda _
4183 (substitute* "scipy/integrate/tests/test_quadpack.py"
4184 (("libm.so") "libm.so.6"))
4185 #t))
4186 ;; Tests can only be run after the library has been installed and not
4187 ;; within the source directory.
4188 (delete 'check)
4189 (add-after 'install 'check
4190 (lambda* (#:key inputs outputs #:allow-other-keys)
4191 (add-installed-pythonpath inputs outputs)
4192 (with-directory-excursion "/tmp"
4193 (zero? (system* "python" "-c"
4194 "import scipy; scipy.test('full')")))
4195 #t)))))
bb986599
FB
4196 (home-page "http://www.scipy.org/")
4197 (synopsis "The Scipy library provides efficient numerical routines")
4198 (description "The SciPy library is one of the core packages that make up
4199the SciPy stack. It provides many user-friendly and efficient numerical
4200routines such as routines for numerical integration and optimization.")
9200fe14 4201 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4202 (license license:bsd-3)))
bb986599 4203
764c077b 4204(define-public python2-scipy
35093253
TD
4205 (package-with-python2
4206 (strip-python2-variant python-scipy)))
bb986599 4207
73acc193 4208(define-public python-socksipy-branch
4209 (package
4210 (name "python-socksipy-branch")
4211 (version "1.01")
4212 (source
4213 (origin
4214 (method url-fetch)
4215 (uri (pypi-uri "SocksiPy-branch" version))
4216 (sha256
4217 (base32
4218 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4219 (build-system python-build-system)
4220 (arguments
4221 `(#:tests? #f)) ; There are no tests
4222 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4223 (synopsis "Python SOCKS module")
4224 (description
4225 "SocksiPy - A Python SOCKS client module. It provides a
4226socket-like interface that supports connections to any TCP
4227service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4228The original version was developed by Dan Haim, this is a
4229branch created by Mario Vilas to address some open issues,
4230as the original project seems to have been abandoned circa 2007.")
4231 (license license:bsd-3)))
4232
4233(define-public python2-socksipy-branch
4234 (package-with-python2 python-socksipy-branch))
4235
94914805
EB
4236(define-public python-sqlalchemy
4237 (package
4238 (name "python-sqlalchemy")
a4ba286b 4239 (version "1.0.12")
94914805
EB
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (string-append "https://pypi.python.org/packages/source/S/"
4244 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4245 (sha256
4246 (base32
a4ba286b 4247 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4248 (build-system python-build-system)
4249 (native-inputs
4250 `(("python-cython" ,python-cython) ;for c extensions
4251 ("python-pytest" ,python-pytest)
4252 ("python-mock" ,python-mock))) ;for tests
4253 (arguments
4254 `(#:phases (alist-replace
4255 'check
4256 (lambda _ (zero? (system* "py.test")))
4257 %standard-phases)))
4258 (home-page "http://www.sqlalchemy.org")
4259 (synopsis "Database abstraction library")
4260 (description
4261 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4262gives application developers the full power and flexibility of SQL. It
4263provides a full suite of well known enterprise-level persistence patterns,
4264designed for efficient and high-performing database access, adapted into a
4265simple and Pythonic domain language.")
3f641af0 4266 (license license:x11)))
94914805
EB
4267
4268(define-public python2-sqlalchemy
4269 (package-with-python2 python-sqlalchemy))
c937562e 4270
4a093330
DM
4271(define-public python-pycodestyle
4272 (package
4273 (name "python-pycodestyle")
4274 (version "2.0.0")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (pypi-uri "pycodestyle" version))
4279 (sha256
4280 (base32
4281 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4282 (build-system python-build-system)
4283 (home-page "https://pycodestyle.readthedocs.io/")
4284 (synopsis "Python style guide checker")
4285 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4286Python code against some of the style conventions in
4287@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4288 (license license:expat)))
4a093330
DM
4289
4290(define-public python2-pycodestyle
f210e944 4291 (package-with-python2 python-pycodestyle))
b91912c4
DM
4292
4293(define-public python-orderedmultidict
4294 (package
4295 (name "python-orderedmultidict")
9e2802cb 4296 (version "0.7.11")
b91912c4
DM
4297 (source
4298 (origin
4299 (method url-fetch)
4300 (uri (pypi-uri "orderedmultidict" version))
4301 (sha256
4302 (base32
9e2802cb 4303 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4304 (build-system python-build-system)
4305 (arguments
4306 `(#:phases
4307 (modify-phases %standard-phases
4308 (add-after 'unpack 'fix-tests
4309 (lambda _
4310 ;; The package uses nosetest for running the tests.
4311 ;; Adding this initfile allows to run the test suite
4312 ;; without requiring nosetest.
4313 (zero? (system* "touch" "tests/__init__.py")))))))
4314 (propagated-inputs
4315 `(("python-six" ,python-six)))
4316 (native-inputs
4317 `(("python-pycodestyle" ,python-pycodestyle)))
4318 (home-page "https://github.com/gruns/orderedmultidict")
4319 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4320 (description "This package contains a library for ordered multivalue
4321dictionaries. A multivalue dictionary is a dictionary that can store
4322multiple values for the same key. An ordered multivalue dictionary is a
4323multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4324 (license license:unlicense)))
b91912c4
DM
4325
4326(define-public python2-orderedmultidict
f210e944 4327 (package-with-python2 python-orderedmultidict))
9dede065
DM
4328
4329(define-public python-furl
4330 (package
4331 (name "python-furl")
4332 (version "0.5.6")
4333 (source
4334 (origin
4335 (method url-fetch)
4336 (uri (pypi-uri "furl" version))
4337 (sha256
4338 (base32
4339 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4340 (build-system python-build-system)
4341 (propagated-inputs
4342 `(("python-six" ,python-six)
4343 ("python-orderedmultidict" ,python-orderedmultidict)))
4344 (native-inputs
4345 `(("python-pycodestyle" ,python-pycodestyle)))
4346 (home-page "https://github.com/gruns/furl")
4347 (synopsis "URL manipulation in Python")
4348 (description "Furl provides an easy-to-use alternative to the
4349@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4350 (license license:unlicense)))
9dede065
DM
4351
4352(define-public python2-furl
f210e944 4353 (package-with-python2 python-furl))
462bf271
DM
4354
4355(define-public python-flask-babel
4356 (package
4357 (name "python-flask-babel")
4358 (version "0.11.1")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (pypi-uri "Flask-Babel" version))
4363 (sha256
4364 (base32
4365 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4366 (build-system python-build-system)
4367 (propagated-inputs
4368 `(("python-flask" ,python-flask)
4369 ("python-babel" ,python-babel)
4370 ("python-jinja2" ,python-jinja2)
4371 ("python-pytz" ,python-pytz)))
4372 (home-page "https://github.com/python-babel/flask-babel")
4373 (synopsis "Add i18n/l10n support to Flask applications")
4374 (description "This package implements internationalization and localization
4375support for Flask. This is based on the Python babel module as well as pytz -
4376both of which are installed automatically if you install this library.")
f210e944 4377 (license license:bsd-3)))
462bf271
DM
4378
4379(define-public python2-flask-babel
f210e944 4380 (package-with-python2 python-flask-babel))
4a093330 4381
de2966cf
EF
4382(define-public python-sqlalchemy-utils
4383 (package
4384 (name "python-sqlalchemy-utils")
fd2662e9 4385 (version "0.32.13")
de2966cf
EF
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (pypi-uri "SQLAlchemy-Utils" version))
4390 (sha256
4391 (base32
fd2662e9 4392 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4393 (build-system python-build-system)
35d56b7b
MB
4394 (arguments
4395 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4396 ;; #:phases
4397 ;; (modify-phases %standard-phases
4398 ;; (replace 'check
4399 ;; (lambda _
4400 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4401 (propagated-inputs
de2966cf
EF
4402 `(("python-six" ,python-six)
4403 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4404 (native-inputs
22d7360b 4405 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4406 ("python-flexmock" ,python-flexmock)
4407 ("python-psycopg2" ,python-psycopg2)
4408 ("python-pytest" ,python-pytest)
4409 ("python-pytz" ,python-pytz)))
de2966cf
EF
4410 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4411 (synopsis "Various utility functions for SQLAlchemy")
4412 (description
4413 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4414for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4415
4416You might also want to install the following optional dependencies:
4417@enumerate
4418@item @code{python-passlib}
4419@item @code{python-babel}
4420@item @code{python-cryptography}
4421@item @code{python-pytz}
4422@item @code{python-psycopg2}
4423@item @code{python-furl}
4424@item @code{python-flask-babel}
4425@end enumerate
4426")
de2966cf
EF
4427 (license license:bsd-3)))
4428
4429(define-public python2-sqlalchemy-utils
f210e944 4430 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4431
af5a4602
CAW
4432(define-public python-alembic
4433 (package
4434 (name "python-alembic")
4418990d 4435 (version "0.8.10")
af5a4602
CAW
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (pypi-uri "alembic" version))
4440 (sha256
4441 (base32
4418990d 4442 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4443 (build-system python-build-system)
4444 (native-inputs
4445 `(("python-mock" ,python-mock)
4446 ("python-pytest-cov" ,python-pytest-cov)))
4447 (propagated-inputs
4448 `(("python-sqlalchemy" ,python-sqlalchemy)
4449 ("python-mako" ,python-mako)
4450 ("python-editor" ,python-editor)))
4451 (home-page "http://bitbucket.org/zzzeek/alembic")
4452 (synopsis
4453 "Database migration tool for SQLAlchemy")
4454 (description
4455 "Alembic is a lightweight database migration tool for usage with the
4456SQLAlchemy Database Toolkit for Python.")
f210e944 4457 (license license:expat)))
af5a4602
CAW
4458
4459(define-public python2-alembic
f210e944 4460 (package-with-python2 python-alembic))
af5a4602 4461
138adbbe
TD
4462(define-public python-autopep8
4463 (package
4464 (name "python-autopep8")
4465 (version "1.2.4")
4466 (source
4467 (origin
4468 (method url-fetch)
4469 (uri (pypi-uri "autopep8" version))
4470 (sha256
4471 (base32
4472 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4473 (build-system python-build-system)
4474 (propagated-inputs
4475 `(("python-pep8" ,python-pep8)))
4476 (home-page "https://github.com/hhatto/autopep8")
4477 (synopsis "Format Python code according to the PEP 8 style guide")
4478 (description
4479 "@code{autopep8} automatically formats Python code to conform to
4480the PEP 8 style guide. It uses the pycodestyle utility to determine
4481what parts of the code needs to be formatted. @code{autopep8} is
4482capable of fixing most of the formatting issues that can be reported
4483by pycodestyle.")
4484 (license (license:non-copyleft
4485 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4486
4487(define-public python2-autopep8
4488 (package-with-python2 python-autopep8))
4489
1671c07c
EB
4490(define-public python-distutils-extra
4491 (package
4492 (name "python-distutils-extra")
4493 (version "2.38")
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4498 version "/+download/python-distutils-extra-"
4499 version ".tar.gz"))
4500 (sha256
4501 (base32
4502 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4503 (build-system python-build-system)
1671c07c
EB
4504 (home-page "https://launchpad.net/python-distutils-extra/")
4505 (synopsis "Enhancements to Python's distutils")
4506 (description
4507 "The python-distutils-extra module enables you to easily integrate
4508gettext support, themed icons, and scrollkeeper-based documentation into
4509Python's distutils.")
3f641af0 4510 (license license:gpl2)))
1671c07c
EB
4511
4512(define-public python2-distutils-extra
4513 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4514
4515(define-public python2-elib.intl
4516 (package
4517 (name "python2-elib.intl")
4518 (version "0.0.3")
4519 (source
4520 (origin
4521 ;; This project doesn't tag releases or publish tarballs, so we take
4522 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4523 (method git-fetch)
4524 (uri (git-reference
4525 (url "https://github.com/dieterv/elib.intl.git")
4526 (commit "d09997cfef")))
4527 (sha256
4528 (base32
4529 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4530 (build-system python-build-system)
ea5456c8
EB
4531 (arguments
4532 ;; incompatible with Python 3 (exception syntax)
4533 `(#:python ,python-2
b41a05ce 4534 #:tests? #f))
ea5456c8
EB
4535 (home-page "https://github.com/dieterv/elib.intl")
4536 (synopsis "Enhanced internationalization for Python")
4537 (description
4538 "The elib.intl module provides enhanced internationalization (I18N)
4539services for your Python modules and applications.")
3f641af0 4540 (license license:lgpl3+)))
ea5456c8 4541
c937562e
EB
4542(define-public python-pillow
4543 (package
4544 (name "python-pillow")
aba5182c 4545 (version "3.3.3")
c937562e
EB
4546 (source
4547 (origin
4548 (method url-fetch)
f1d9231d 4549 (uri (pypi-uri "Pillow" version))
c937562e
EB
4550 (sha256
4551 (base32
aba5182c 4552 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4553 (build-system python-build-system)
4554 (native-inputs
f3b98f4f 4555 `(("python-nose" ,python-nose)))
c937562e 4556 (inputs
5ff408d9
SB
4557 `(("freetype" ,freetype)
4558 ("lcms" ,lcms)
c937562e
EB
4559 ("zlib" ,zlib)
4560 ("libjpeg" ,libjpeg)
4561 ("openjpeg" ,openjpeg)
5ff408d9
SB
4562 ("libtiff" ,libtiff)
4563 ("libwebp" ,libwebp)))
c937562e 4564 (arguments
e5358a6b 4565 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4566 (add-after
4567 'install 'check-installed
6151120a 4568 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4569 (begin
4570 (setenv "HOME" (getcwd))
6151120a
HG
4571 ;; Make installed package available for running the
4572 ;; tests
4573 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4574 (and (zero? (system* "python" "selftest.py"
4575 "--installed"))
4576 (zero? (system* "python" "test-installed.py"))))))
4577 (delete 'check))))
c937562e
EB
4578 (home-page "https://pypi.python.org/pypi/Pillow")
4579 (synopsis "Fork of the Python Imaging Library")
4580 (description
4581 "The Python Imaging Library adds image processing capabilities to your
4582Python interpreter. This library provides extensive file format support, an
4583efficient internal representation, and fairly powerful image processing
4584capabilities. The core image library is designed for fast access to data
4585stored in a few basic pixel formats. It should provide a solid foundation for
4586a general image processing tool.")
3f641af0 4587 (license (license:x11-style
c937562e
EB
4588 "http://www.pythonware.com/products/pil/license.htm"
4589 "The PIL Software License"))))
4590
4591(define-public python2-pillow
4592 (package-with-python2 python-pillow))
bb986599 4593
a415f036
FB
4594(define-public python-pycparser
4595 (package
4596 (name "python-pycparser")
5043b20d 4597 (version "2.17")
a415f036
FB
4598 (source
4599 (origin
4600 (method url-fetch)
38eb6919 4601 (uri (pypi-uri "pycparser" version))
a415f036
FB
4602 (sha256
4603 (base32
5043b20d 4604 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4605 (outputs '("out" "doc"))
4606 (build-system python-build-system)
4607 (native-inputs
f3b98f4f 4608 `(("pkg-config" ,pkg-config)))
a415f036 4609 (arguments
89b5c60e 4610 `(#:phases
819939cb
TGR
4611 (modify-phases %standard-phases
4612 (replace 'check
4613 (lambda _
4614 (with-directory-excursion "tests"
4615 (zero? (system* "python" "all_tests.py")))))
4616 (add-after 'install 'install-doc
4617 (lambda* (#:key outputs #:allow-other-keys)
4618 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4619 (doc (string-append data "/doc/" ,name "-" ,version))
4620 (examples (string-append doc "/examples")))
4621 (mkdir-p examples)
4622 (for-each (lambda (file)
4623 (copy-file (string-append "." file)
4624 (string-append doc file)))
4625 '("/README.rst" "/CHANGES" "/LICENSE"))
4626 (copy-recursively "examples" examples)))))))
a415f036
FB
4627 (home-page "https://github.com/eliben/pycparser")
4628 (synopsis "C parser in Python")
4629 (description
4630 "Pycparser is a complete parser of the C language, written in pure Python
4631using the PLY parsing library. It parses C code into an AST and can serve as
4632a front-end for C compilers or analysis tools.")
3f641af0 4633 (license license:bsd-3)))
a415f036
FB
4634
4635(define-public python2-pycparser
4636 (package-with-python2 python-pycparser))
57c3f716
FB
4637
4638(define-public python-cffi
4639 (package
4640 (name "python-cffi")
2d3a437c 4641 (version "1.4.2")
57c3f716
FB
4642 (source
4643 (origin
4644 (method url-fetch)
2d3a437c 4645 (uri (pypi-uri "cffi" version))
89b5c60e 4646 (sha256
2d3a437c 4647 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4648 (build-system python-build-system)
4649 (outputs '("out" "doc"))
4650 (inputs
4651 `(("libffi" ,libffi)))
4652 (propagated-inputs ; required at run-time
4653 `(("python-pycparser" ,python-pycparser)))
4654 (native-inputs
4655 `(("pkg-config" ,pkg-config)
4656 ("python-sphinx" ,python-sphinx)
f3b98f4f 4657 ("python-pytest" ,python-pytest)))
57c3f716 4658 (arguments
4179f952 4659 `(#:phases
57c3f716
FB
4660 (alist-cons-after
4661 'install 'install-doc
4662 (lambda* (#:key outputs #:allow-other-keys)
4663 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4664 (doc (string-append data "/doc/" ,name "-" ,version))
4665 (html (string-append doc "/html")))
4666 (with-directory-excursion "doc"
4667 (system* "make" "html")
4668 (mkdir-p html)
4669 (copy-recursively "build/html" html))
4670 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4671 %standard-phases)))
4672 (home-page "http://cffi.readthedocs.org")
4673 (synopsis "Foreign function interface for Python")
4674 (description
4675 "Foreign Function Interface for Python calling C code.")
bd3fa666 4676 (license license:expat)))
57c3f716
FB
4677
4678(define-public python2-cffi
4679 (package-with-python2 python-cffi))
6fa14469
FB
4680
4681(define-public python-xcffib
4682 (package
4683 (name "python-xcffib")
4684 (version "0.1.9")
4685 (source
4686 (origin
4687 (method url-fetch)
4688 (uri (string-append "https://pypi.python.org/packages/source/x/"
4689 "xcffib/xcffib-" version ".tar.gz"))
4690 (sha256
4691 (base32
4692 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4693 (build-system python-build-system)
4694 (inputs
482d9591 4695 `(("libxcb" ,libxcb)))
6fa14469 4696 (propagated-inputs
482d9591
HG
4697 `(("python-cffi" ,python-cffi) ; used at run time
4698 ("python-six" ,python-six)))
6fa14469 4699 (arguments
e2816ac7
MB
4700 `(;; FIXME: Tests cannot load libxcb.so.1
4701 #:tests? #f
4702 #:phases
c8cd850c
MB
4703 (modify-phases %standard-phases
4704 (add-after 'install 'install-doc
4705 (lambda* (#:key outputs #:allow-other-keys)
4706 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4707 "/doc/" ,name "-" ,version)))
4708 (mkdir-p doc)
4709 (copy-file "README.md"
4710 (string-append doc "/README.md"))
4711 #t))))))
6fa14469
FB
4712 (home-page "https://github.com/tych0/xcffib")
4713 (synopsis "XCB Python bindings")
4714 (description
4715 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4716support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4717 (license license:expat)))
6fa14469
FB
4718
4719(define-public python2-xcffib
4720 (package-with-python2 python-xcffib))
4721
9e099723
FB
4722(define-public python-cairocffi
4723 (package
4724 (name "python-cairocffi")
4725 (version "0.6")
4726 (source
4727 (origin
4728 (method url-fetch)
4729 ;; The archive on pypi is missing the 'utils' directory!
4730 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4731 version ".tar.gz"))
f586c877 4732 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4733 (sha256
4734 (base32
4735 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4736 (build-system python-build-system)
4737 (outputs '("out" "doc"))
4738 (inputs
4739 `(("gdk-pixbuf" ,gdk-pixbuf)
4740 ("cairo" ,cairo)))
4741 (native-inputs
4742 `(("pkg-config" ,pkg-config)
4743 ("python-sphinx" ,python-sphinx)
f3b98f4f 4744 ("python-docutils" ,python-docutils)))
9e099723
FB
4745 (propagated-inputs
4746 `(("python-xcffib" ,python-xcffib))) ; used at run time
4747 (arguments
a792e1aa
MB
4748 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4749 #:tests? #f
4750 #:phases
6734c7ba
MB
4751 (modify-phases %standard-phases
4752 (add-after 'install 'install-doc
4753 (lambda* (#:key inputs outputs #:allow-other-keys)
4754 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4755 (doc (string-append data "/doc/" ,name "-" ,version))
4756 (html (string-append doc "/html")))
4757 (setenv "LD_LIBRARY_PATH"
4758 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4759 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4760 (setenv "LANG" "en_US.UTF-8")
4761 (mkdir-p html)
4762 (for-each (lambda (file)
4763 (copy-file (string-append "." file)
4764 (string-append doc file)))
4765 '("/README.rst" "/CHANGES" "/LICENSE"))
4766 (system* "python" "setup.py" "build_sphinx")
4767 (copy-recursively "docs/_build/html" html)
4768 #t))))))
9e099723
FB
4769 (home-page "https://github.com/SimonSapin/cairocffi")
4770 (synopsis "Python bindings and object-oriented API for Cairo")
4771 (description
4772 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4773Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4774graphics library with support for multiple backends including image buffers,
4775PNG, PostScript, PDF, and SVG file output.")
3f641af0 4776 (license license:bsd-3)))
9e099723
FB
4777
4778(define-public python2-cairocffi
4779 (package-with-python2 python-cairocffi))
4780
3cff95cb
RW
4781(define-public python-decorator
4782 (package
4783 (name "python-decorator")
d79fa7da 4784 (version "4.0.10")
3cff95cb
RW
4785 (source
4786 (origin
4787 (method url-fetch)
e21338be 4788 (uri (pypi-uri "decorator" version))
3cff95cb 4789 (sha256
d79fa7da 4790 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4791 (build-system python-build-system)
4792 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4793 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4794 (synopsis "Python module to simplify usage of decorators")
4795 (description
4796 "The aim of the decorator module is to simplify the usage of decorators
4797for the average programmer, and to popularize decorators usage giving examples
4798of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4799etc. The core of this module is a decorator factory.")
4800 (license license:expat)))
4801
4802(define-public python2-decorator
4803 (package-with-python2 python-decorator))
4804
2c0499ad
RW
4805(define-public python-drmaa
4806 (package
4807 (name "python-drmaa")
7c427932 4808 (version "0.7.7")
2c0499ad
RW
4809 (source
4810 (origin
4811 (method url-fetch)
4812 (uri (string-append
4813 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4814 version ".tar.gz"))
4815 (sha256
7c427932 4816 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
4817 (build-system python-build-system)
4818 ;; The test suite requires libdrmaa which is provided by the cluster
4819 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4820 ;; should be set to the path of the libdrmaa library.
4821 (arguments '(#:tests? #f))
4822 (native-inputs
f3b98f4f 4823 `(("python-nose" ,python-nose)))
2c0499ad
RW
4824 (home-page "https://pypi.python.org/pypi/drmaa")
4825 (synopsis "Python bindings for the DRMAA library")
4826 (description
4827 "A Python package for Distributed Resource Management (DRM) job
4828submission and control. This package is an implementation of the DRMAA 1.0
4829Python language binding specification.")
3f641af0 4830 (license license:bsd-3)))
2c0499ad
RW
4831
4832(define-public python2-drmaa
4833 (package-with-python2 python-drmaa))
4834
d05c6da0
RW
4835(define-public python-gridmap
4836 (package
4837 (name "python-gridmap")
4838 (version "0.13.0")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (string-append
4843 "https://github.com/pygridtools/gridmap/archive/v"
4844 version ".tar.gz"))
4845 (file-name (string-append name "-" version ".tar.gz"))
4846 (sha256
4847 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4848 (build-system python-build-system)
ad348f9f
MB
4849 (arguments
4850 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4851 (propagated-inputs
d05c6da0
RW
4852 `(("python-psutil" ,python-psutil)
4853 ("python-drmaa" ,python-drmaa)
4854 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4855 (home-page "https://github.com/pygridtools/gridmap")
4856 (synopsis "Create jobs on a cluster directly from Python")
4857 (description
4858 "Gridmap is a Python package to allow you to easily create jobs on the
4859cluster directly from Python. You can directly map Python functions onto the
4860cluster without needing to write any wrapper code yourself.")
3f641af0 4861 (license license:gpl3+)))
d05c6da0
RW
4862
4863(define-public python2-gridmap
4864 (package-with-python2 python-gridmap))
4865
cb6d5c54
RW
4866(define-public python-pexpect
4867 (package
4868 (name "python-pexpect")
ed118043 4869 (version "4.2.1")
cb6d5c54
RW
4870 (source
4871 (origin
4872 (method url-fetch)
ed118043 4873 (uri (pypi-uri "pexpect" version))
cb6d5c54 4874 (sha256
ed118043 4875 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4876 (build-system python-build-system)
4877 (arguments
4878 `(#:phases
4879 (modify-phases %standard-phases
ed118043
MB
4880 (add-before 'check 'prepare-tests
4881 (lambda _
4882 (substitute* (find-files "tests")
4883 (("/bin/ls") (which "ls"))
4884 (("/bin/echo") (which "echo"))
4885 (("/bin/which") (which "which"))
4886 ;; Many tests try to use the /bin directory which
4887 ;; is not present in the build environment.
4888 ;; Use one that's non-empty and unlikely to change.
4889 (("/bin'") "/dev'"))
4890 ;; XXX: Socket connection test gets "Connection reset by peer".
4891 ;; Why does it not work? Delete for now.
4892 (delete-file "tests/test_socket.py")
4893 #t))
cb6d5c54
RW
4894 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4895 (native-inputs
ed118043
MB
4896 `(("python-nose" ,python-nose)
4897 ("python-pytest" ,python-pytest)
4898 ("man-db" ,man-db)
4899 ("which" ,which)))
4900 (propagated-inputs
4901 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4902 (home-page "http://pexpect.readthedocs.org/")
4903 (synopsis "Controlling interactive console applications")
4904 (description
4905 "Pexpect is a pure Python module for spawning child applications;
4906controlling them; and responding to expected patterns in their output.
4907Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4908child application and control it as if a human were typing commands.")
3f641af0 4909 (license license:isc)))
cb6d5c54
RW
4910
4911(define-public python2-pexpect
4912 (package-with-python2 python-pexpect))
4913
229ad120
RW
4914(define-public python-setuptools-scm
4915 (package
4916 (name "python-setuptools-scm")
5b1f31ff 4917 (version "1.15.0")
229ad120
RW
4918 (source (origin
4919 (method url-fetch)
383af6b0 4920 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4921 (sha256
4922 (base32
5b1f31ff 4923 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
4924 (build-system python-build-system)
4925 (home-page "https://github.com/pypa/setuptools_scm/")
4926 (synopsis "Manage Python package versions in SCM metadata")
4927 (description
383af6b0 4928 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4929@dfn{software configuration management} (SCM) metadata instead of declaring
4930them as the version argument or in a SCM managed file.")
4931 (license license:expat)))
4932
4933(define-public python2-setuptools-scm
4934 (package-with-python2 python-setuptools-scm))
4935
b74270ee
RW
4936(define-public python-pathpy
4937 (package
4938 (name "python-pathpy")
4939 (version "8.1.1")
4940 (source
4941 (origin
4942 (method url-fetch)
4943 (uri (string-append "https://pypi.python.org/packages/source/p/"
4944 "path.py/path.py-" version ".tar.gz"))
4945 (sha256
4946 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4947 (outputs '("out" "doc"))
b74270ee
RW
4948 (build-system python-build-system)
4949 (propagated-inputs
4950 `(("python-appdirs" ,python-appdirs)))
4951 (native-inputs
f3b98f4f 4952 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4953 ("python-sphinx" ,python-sphinx)
4954 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4955 ("python-pytest" ,python-pytest)
4956 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4957 (arguments
4958 `(#:phases
4959 (modify-phases %standard-phases
4960 (add-after 'build 'build-doc
4961 (lambda _
4962 (setenv "LANG" "en_US.UTF-8")
4963 (zero? (system* "python" "setup.py" "build_sphinx"))))
4964 (add-after 'install 'install-doc
4965 (lambda* (#:key outputs #:allow-other-keys)
4966 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4967 (doc (string-append data "/doc/" ,name "-" ,version))
4968 (html (string-append doc "/html")))
4969 (mkdir-p html)
4970 (for-each (lambda (file)
4971 (copy-file file (string-append doc "/" file)))
4972 '("README.rst" "CHANGES.rst"))
4973 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4974 (home-page "http://github.com/jaraco/path.py")
4975 (synopsis "Python module wrapper for built-in os.path")
4976 (description
4977 "@code{path.py} implements path objects as first-class entities, allowing
4978common operations on files to be invoked on those path objects directly.")
4979 (license license:expat)))
4980
4981(define-public python2-pathpy
4982 (package-with-python2 python-pathpy))
4983
0d34e01b
RW
4984(define-public python-pickleshare
4985 (package
4986 (name "python-pickleshare")
4987 (version "0.5")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (string-append "https://pypi.python.org/packages/source/p/"
4992 "pickleshare/pickleshare-" version ".tar.gz"))
4993 (sha256
4994 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4995 (build-system python-build-system)
4996 (propagated-inputs
4997 `(("python-pathpy" ,python-pathpy)))
4998 (home-page "https://github.com/vivainio/pickleshare")
4999 (synopsis "Tiny key value database with concurrency support")
5000 (description
5001 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5002Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5003shelve, many processes can access the database simultaneously. Changing a
5004value in database is immediately visible to other processes accessing the same
5005database. Concurrency is possible because the values are stored in separate
5006files. Hence the “database” is a directory where all files are governed by
5007PickleShare.")
5008 (license license:expat)))
5009
5010(define-public python2-pickleshare
5011 (package-with-python2 python-pickleshare))
5012
cd6e5189
RW
5013(define-public python-simplegeneric
5014 (package
5015 (name "python-simplegeneric")
5016 (version "0.8.1")
5017 (source
5018 (origin
5019 (method url-fetch)
5020 (uri (string-append "https://pypi.python.org/packages/source/s/"
5021 "simplegeneric/simplegeneric-" version ".zip"))
5022 (sha256
5023 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5024 (build-system python-build-system)
5025 (native-inputs
f3b98f4f 5026 `(("unzip" ,unzip)))
cd6e5189
RW
5027 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5028 (synopsis "Python module for simple generic functions")
5029 (description
5030 "The simplegeneric module lets you define simple single-dispatch generic
5031functions, akin to Python’s built-in generic functions like @code{len()},
5032@code{iter()} and so on. However, instead of using specially-named methods,
5033these generic functions use simple lookup tables, akin to those used by
5034e.g. @code{pickle.dump()} and other generic functions found in the Python
5035standard library.")
3f641af0 5036 (license license:zpl2.1)))
cd6e5189
RW
5037
5038(define-public python2-simplegeneric
5039 (package-with-python2 python-simplegeneric))
5040
ddc7d8ed 5041(define-public python-ipython-genutils
c4abbac3 5042 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5043 (package
5044 (name "python-ipython-genutils")
5045 (version "0.1.0")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (string-append "https://pypi.python.org/packages/source/i/"
5050 "ipython_genutils/ipython_genutils-"
5051 version ".tar.gz"))
5052 (sha256
5053 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5054 (build-system python-build-system)
5055 (arguments `(#:tests? #f)) ; no tests
5056 (home-page "http://ipython.org")
5057 (synopsis "Vestigial utilities from IPython")
5058 (description
c4abbac3
HG
5059 "This package provides retired utilities from IPython. No packages
5060outside IPython/Jupyter should depend on it.
5061
5062This package shouldn't exist. It contains some common utilities shared by
5063Jupyter and IPython projects during The Big Split. As soon as possible, those
5064packages will remove their dependency on this, and this package will go
5065away.")
3f641af0 5066 (license license:bsd-3)))
ddc7d8ed
RW
5067
5068(define-public python2-ipython-genutils
5069 (package-with-python2 python-ipython-genutils))
5070
2b10eb48
RW
5071(define-public python-traitlets
5072 (package
5073 (name "python-traitlets")
a5ba1481 5074 (version "4.2.0")
2b10eb48
RW
5075 (source
5076 (origin
5077 (method url-fetch)
cc0c4fde 5078 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5079 (sha256
5080 (base32
a5ba1481 5081 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5082 (build-system python-build-system)
5083 (arguments
5084 `(#:phases
5085 (modify-phases %standard-phases
5086 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5087 (propagated-inputs
5088 `(("python-ipython-genutils" ,python-ipython-genutils)
5089 ("python-decorator" ,python-decorator)))
5090 (native-inputs
cc0c4fde
EF
5091 `(("python-mock" ,python-mock)
5092 ("python-nose" ,python-nose)))
2b10eb48
RW
5093 (home-page "http://ipython.org")
5094 (synopsis "Configuration system for Python applications")
5095 (description
5096 "Traitlets is a framework that lets Python classes have attributes with
5097type checking, dynamically calculated default values, and ‘on change’
5098callbacks. The package also includes a mechanism to use traitlets for
5099configuration, loading values from files or from command line arguments. This
5100is a distinct layer on top of traitlets, so you can use traitlets in your code
5101without using the configuration machinery.")
3f641af0 5102 (license license:bsd-3)))
2b10eb48
RW
5103
5104(define-public python2-traitlets
5105 (package-with-python2 python-traitlets))
5106
4263b06f
RW
5107(define-public python-jupyter-core
5108 (package
5109 (name "python-jupyter-core")
45cc957c 5110 (version "4.2.1")
4263b06f
RW
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (string-append (pypi-uri "jupyter_core" version)))
5115 (sha256
5116 (base32
45cc957c 5117 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5118 (build-system python-build-system)
5119 ;; FIXME: not sure how to run the tests
5120 (arguments `(#:tests? #f))
5121 (propagated-inputs
5122 `(("python-traitlets" ,python-traitlets)))
5123 (home-page "http://jupyter.org/")
5124 (synopsis "Jupyter base package")
5125 (description
5126 "Jupyter core is the base package on which Jupyter projects rely.")
5127 (license license:bsd-3)))
5128
5129(define-public python2-jupyter-core
5130 (package-with-python2 python-jupyter-core))
5131
9ff01f2d
RW
5132(define-public python-jupyter-client
5133 (package
5134 (name "python-jupyter-client")
5135 (version "4.4.0")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (pypi-uri "jupyter_client" version))
5140 (sha256
5141 (base32
5142 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5143 (build-system python-build-system)
5144 ;; Tests fail because of missing native python kernel which I assume is
5145 ;; provided by the ipython package, which we cannot use because it would
5146 ;; cause a dependency cycle.
5147 (arguments `(#:tests? #f))
5148 (propagated-inputs
5149 `(("python-pyzmq" ,python-pyzmq)
5150 ("python-traitlets" ,python-traitlets)
5151 ("python-jupyter-core" ,python-jupyter-core)))
5152 (home-page "http://jupyter.org/")
5153 (synopsis "Jupyter protocol implementation and client libraries")
5154 (description
5155 "The @code{jupyter_client} package contains the reference implementation
5156of the Jupyter protocol. It also provides client and kernel management APIs
5157for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5158installing @code{kernelspec}s for use with Jupyter frontends.")
5159 (license license:bsd-3)))
5160
5161(define-public python2-jupyter-client
5162 (package-with-python2 python-jupyter-client))
5163
ab526102
RW
5164(define-public python-ipykernel
5165 (package
5166 (name "python-ipykernel")
f165648e 5167 (version "4.5.2")
ab526102
RW
5168 (source
5169 (origin
5170 (method url-fetch)
5171 (uri (pypi-uri "ipykernel" version))
5172 (sha256
f165648e 5173 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5174 (build-system python-build-system)
5175 ;; The tests load a submodule of IPython. However, IPython itself depends
5176 ;; on ipykernel.
5177 (arguments `(#:tests? #f))
5178 (propagated-inputs
5179 ;; imported at runtime during connect
5180 `(("python-jupyter-client" ,python-jupyter-client)))
5181 (home-page "http://ipython.org")
5182 (synopsis "IPython Kernel for Jupyter")
5183 (description
5184 "This package provides the IPython kernel for Jupyter.")
5185 (license license:bsd-3)))
5186
5187(define-public python2-ipykernel
5188 (package-with-python2 python-ipykernel))
5189
5ff6effc
RW
5190(define-public python-testpath
5191 (package
5192 (name "python-testpath")
5193 (version "0.2")
5194 (source
5195 (origin
5196 (method url-fetch)
5197 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5198 version ".tar.gz"))
5199 (file-name (string-append name "-" version ".tar.gz"))
5200 (sha256
5201 (base32
5202 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5203 (build-system python-build-system)
5204 (arguments
5205 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5206 #:modules ((guix build python-build-system)
5207 (guix build utils)
5208 (srfi srfi-1))
5209 #:imported-modules (,@%python-build-system-modules
5210 (srfi srfi-1))
5ff6effc
RW
5211 #:phases
5212 (modify-phases %standard-phases
5213 (delete 'install)
5214 (replace 'build
b320f7bf
TD
5215 (lambda* (#:key inputs outputs #:allow-other-keys)
5216 (let* ((version (last
5217 (string-split (assoc-ref inputs "python") #\-)))
5218 (x.y (string-join (take (string-split version #\.) 2)
5219 "."))
5220 (dir (string-append
5221 (assoc-ref outputs "out")
5222 "/lib/python" x.y "/site-packages/testpath")))
5223 (mkdir-p dir)
5224 (copy-recursively "testpath" dir))
5225 #t)))))
5ff6effc
RW
5226 (home-page "https://github.com/takluyver/testpath")
5227 (synopsis "Test utilities for code working with files and commands")
5228 (description
5229 "Testpath is a collection of utilities for Python code working with files
5230and commands. It contains functions to check things on the filesystem, and
5231tools for mocking system commands and recording calls to those.")
5232 (license license:expat)))
5233
5234(define-public python2-testpath
5235 (package-with-python2 python-testpath))
5236
ae1ab9fe
FB
5237(define-public python-ipython
5238 (package
5239 (name "python-ipython")
fb25d348 5240 (version "5.2.2")
ae1ab9fe
FB
5241 (source
5242 (origin
fceac880 5243 (method url-fetch)
accd5f99 5244 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5245 (sha256
fb25d348 5246 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5247 (build-system python-build-system)
5248 (outputs '("out" "doc"))
3a0b1b9a
FB
5249 (propagated-inputs
5250 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5251 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5252 ("python-terminado" ,python-terminado)
ae1ab9fe 5253 ("python-matplotlib" ,python-matplotlib)
5d26e542 5254 ("python-numpy" ,python-numpy)
ae1ab9fe 5255 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5256 ("python-jinja2" ,python-jinja2)
5257 ("python-mistune" ,python-mistune)
accd5f99
RW
5258 ("python-pexpect" ,python-pexpect)
5259 ("python-pickleshare" ,python-pickleshare)
5260 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5261 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5262 ("python-traitlets" ,python-traitlets)
5263 ("python-ipykernel" ,python-ipykernel)
fb25d348 5264 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5265 ("python-pygments" ,python-pygments)))
5266 (inputs
5267 `(("readline" ,readline)
5268 ("which" ,which)))
ae1ab9fe 5269 (native-inputs
fb25d348
TD
5270 `(("graphviz" ,graphviz)
5271 ("pkg-config" ,pkg-config)
accd5f99
RW
5272 ("python-requests" ,python-requests) ;; for tests
5273 ("python-testpath" ,python-testpath)
5274 ("python-nose" ,python-nose)
ae1ab9fe 5275 ("python-sphinx" ,python-sphinx)
fb25d348 5276 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5277 ("texlive" ,texlive)
f3b98f4f 5278 ("texinfo" ,texinfo)))
ae1ab9fe 5279 (arguments
89b5c60e 5280 `(#:phases
3a0b1b9a
FB
5281 (modify-phases %standard-phases
5282 (add-after
5283 'install 'install-doc
5284 (lambda* (#:key inputs outputs #:allow-other-keys)
5285 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5286 (doc (string-append data "/doc/" ,name "-" ,version))
5287 (html (string-append doc "/html"))
5288 (man1 (string-append data "/man/man1"))
5289 (info (string-append data "/info"))
fb25d348
TD
5290 (examples (string-append doc "/examples"))
5291 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5292 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5293 ;; Make installed package available for running the tests
5294 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5295 (with-directory-excursion "docs"
accd5f99
RW
5296 ;; FIXME: pdf fails to build
5297 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5298 (system* "make" python-arg "html")
5299 (system* "make" python-arg "info"))
3a0b1b9a
FB
5300 (copy-recursively "docs/man" man1)
5301 (copy-recursively "examples" examples)
accd5f99 5302 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5303 ;; (copy-file "docs/build/latex/ipython.pdf"
5304 ;; (string-append doc "/ipython.pdf"))
5305 (mkdir-p info)
5306 (copy-file "docs/build/texinfo/ipython.info"
5307 (string-append info "/ipython.info"))
5308 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5309 ;; Tests can only be run after the library has been installed and not
5310 ;; within the source directory.
5311 (delete 'check)
5312 (add-after
5313 'install 'check
eee5cd04 5314 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5315 (if tests?
5316 (with-directory-excursion "/tmp"
eee5cd04
HG
5317 ;; Make installed package available for running the tests
5318 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5319 (setenv "HOME" "/tmp/") ;; required by a test
5320 (zero? (system* (string-append (assoc-ref outputs "out")
5321 "/bin/iptest"))))
5322 #t)))
5323 (add-before
5324 'install 'fix-tests
5325 (lambda* (#:key inputs #:allow-other-keys)
5326 (substitute* "./IPython/utils/_process_posix.py"
5327 (("/usr/bin/env', 'which") (which "which")))
5328 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5329 (("#!/usr/bin/env python")
5330 (string-append "#!" (which "python"))))
5331 ;; Disable 1 failing test
5332 (substitute* "./IPython/core/tests/test_magic.py"
5333 (("def test_dirops\\(\\):" all)
5334 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5335 (home-page "http://ipython.org")
5336 (synopsis "IPython is a tool for interactive computing in Python")
5337 (description
5338 "IPython provides a rich architecture for interactive computing with:
5339Powerful interactive shells, a browser-based notebook, support for interactive
5340data visualization, embeddable interpreters and tools for parallel
5341computing.")
135ba811
EF
5342 (license license:bsd-3)
5343 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5344
5345(define-public python2-ipython
135ba811 5346 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5347 (package
5348 (inherit ipython)
3a0b1b9a 5349 ;; FIXME: add pyreadline once available.
fb25d348
TD
5350 (propagated-inputs
5351 `(("python2-backports-shutil-get-terminal-size"
5352 ,python2-backports-shutil-get-terminal-size)
5353 ("python2-pathlib2" ,python2-pathlib2)
5354 ,@(package-propagated-inputs ipython)))
e62600fe 5355 (native-inputs
135ba811 5356 `(("python2-mock" ,python2-mock)
77a6932a 5357 ,@(package-native-inputs ipython))))))
03411993
AE
5358
5359(define-public python-isodate
5360 (package
5361 (name "python-isodate")
b6785c2e 5362 (version "0.5.4")
03411993
AE
5363 (source
5364 (origin
5365 (method url-fetch)
b6785c2e 5366 (uri (pypi-uri "isodate" version))
03411993
AE
5367 (sha256
5368 (base32
b6785c2e 5369 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5370 (build-system python-build-system)
03411993
AE
5371 (home-page
5372 "http://cheeseshop.python.org/pypi/isodate")
5373 (synopsis
5374 "Python date parser and formatter")
5375 (description
5376 "Python-isodate is a python module for parsing and formatting
5377ISO 8601 dates, time and duration.")
3f641af0 5378 (license license:bsd-3)))
03411993
AE
5379
5380(define-public python2-isodate
5381 (package-with-python2 python-isodate))
673ab897
AE
5382
5383(define-public python-html5lib
5384 (package
5385 (name "python-html5lib")
a14061aa 5386 (version "1.0b10")
673ab897
AE
5387 (source
5388 (origin
5389 (method url-fetch)
fee04c19 5390 (uri (pypi-uri "html5lib" version))
673ab897
AE
5391 (sha256
5392 (base32
a14061aa 5393 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5394 (build-system python-build-system)
3dd75476 5395 (propagated-inputs
4eb6ed28
MB
5396 `(("python-six" ,python-six)
5397 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5398 (arguments
5399 `(#:test-target "check"))
5400 (home-page
5401 "https://github.com/html5lib/html5lib-python")
5402 (synopsis
5403 "Python HTML parser based on the WHATWG HTML specifcation")
5404 (description
5405 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5406and written in Python.")
bd3fa666 5407 (license license:expat)))
673ab897
AE
5408
5409(define-public python2-html5lib
5410 (package-with-python2 python-html5lib))
e99f4211 5411
8ee62c97
RW
5412;; Needed for python-bleach, a dependency of python-notebook
5413(define-public python-html5lib-0.9
5414 (package
5415 (inherit python-html5lib)
5416 (version "0.999")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "html5lib" version))
5421 (sha256
5422 (base32
5423 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5424
5425(define-public python2-html5lib-0.9
5426 (package-with-python2 python-html5lib-0.9))
5427
adbca19e
MB
5428(define-public python-webencodings
5429 (package
5430 (name "python-webencodings")
5431 (version "0.5")
5432 (source (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "webencodings" version))
5435 (sha256
5436 (base32
5437 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5438 (build-system python-build-system)
5439 (arguments
5440 '(#:phases
5441 (modify-phases %standard-phases
5442 (replace 'check
5443 (lambda _
5444 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5445 (native-inputs
5446 `(("python-pytest" ,python-pytest)))
5447 (home-page "https://github.com/SimonSapin/python-webencodings")
5448 (synopsis "Character encoding aliases for legacy web content")
5449 (description
5450 "In order to be compatible with legacy web content when interpreting
5451something like @code{Content-Type: text/html; charset=latin1}, tools need
5452to use a particular set of aliases for encoding labels as well as some
5453overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5454the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5455or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5456The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5457defines all such details so that implementations do not have to
5458reverse-engineer each other.
5459
5460This module implements the Encoding standard and has encoding labels and
5461BOM detection, but the actual implementation for encoders and decoders
5462is Python’s.")
5463 (license license:bsd-3)))
5464
5465(define-public python2-webencodings
5466 (package-with-python2 python-webencodings))
5467
e99f4211
MW
5468(define-public python-urwid
5469 (package
5470 (name "python-urwid")
51ff41f6 5471 (version "1.3.1")
e99f4211
MW
5472 (source
5473 (origin
5474 (method url-fetch)
b97c1bfd 5475 (uri (pypi-uri "urwid" version))
e99f4211
MW
5476 (sha256
5477 (base32
51ff41f6 5478 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5479 (build-system python-build-system)
b97c1bfd
LF
5480 (arguments
5481 `(#:phases
5482 (modify-phases %standard-phases
5483 ;; Disable failing test. Bug filed upstream:
5484 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5485 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5486 (add-after 'unpack 'disable-failing-test
5487 (lambda _
5488 (substitute* "urwid/tests/test_event_loops.py"
5489 (("test_remove_watch_file")
5490 "disable_remove_watch_file")))))))
e99f4211
MW
5491 (home-page "http://urwid.org")
5492 (synopsis "Console user interface library for Python")
5493 (description
5494 "Urwid is a curses-based UI/widget library for Python. It includes many
5495features useful for text console applications.")
3f641af0 5496 (license license:lgpl2.1+)))
e99f4211
MW
5497
5498(define-public python2-urwid
5499 (package-with-python2 python-urwid))
d95a56c6 5500
5220022a
JL
5501(define-public python-openid
5502 (package
5503 (name "python-openid")
5504 (version "3.0.10")
5505 (source
5506 (origin
5507 (method url-fetch)
5508 (uri (pypi-uri "python3-openid" version))
5509 (sha256
5510 (base32
5511 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5512 (build-system python-build-system)
5513 (home-page "https://github.com/necaris/python3-openid")
5514 (synopsis "OpenID support for servers and consumers")
5515 (description "This library provides OpenID authentication for Python, both
5516for clients and servers.")
5517 (license license:asl2.0)))
5518
3ef00f56 5519(define-public python2-openid
5520 (package
5521 (name "python2-openid")
5522 (version "2.2.5")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "python-openid" version))
5527 (sha256
5528 (base32
5529 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5530 (build-system python-build-system)
5531 (arguments
5532 ;; Python 3 support is in `python3-openid`, a separate package.
5533 `(#:python ,python-2))
5534 (home-page "https://github.com/openid/python-openid")
5535 (synopsis "OpenID support for servers and consumers")
5536 (description "This library provides OpenID authentication for Python, both
5537for clients and servers.")
5538 (license license:asl2.0)))
5539
47d0b292
TS
5540(define-public python-urwidtrees
5541 (package
5542 (name "python-urwidtrees")
37ec4623 5543 (version "1.0.2")
47d0b292
TS
5544 (source
5545 (origin
5546 (method url-fetch)
37ec4623
TS
5547 ;; package author intends on distributing via github rather than pypi:
5548 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5549 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5550 version ".tar.gz"))
5551 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5552 (sha256
5553 (base32
37ec4623 5554 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5555 (build-system python-build-system)
5556 (arguments
5557 '(#:tests? #f)) ; no tests
f22efa01 5558 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5559 (home-page "https://github.com/pazz/urwidtrees")
5560 (synopsis "Tree widgets for urwid")
5561 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5562toolkit. Use it to build trees of widgets.")
3f641af0 5563 (license license:gpl3+)))
47d0b292
TS
5564
5565(define-public python2-urwidtrees
5566 (package-with-python2 python-urwidtrees))
5567
d95a56c6
PAR
5568(define-public python-dbus
5569 (package
5570 (name "python-dbus")
5571 (version "1.2.0")
5572 (source
5573 (origin
5574 (method url-fetch)
5575 (uri (string-append
5cc3096c 5576 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5577 version ".tar.gz"))
5578 (sha256
5579 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5580 (build-system gnu-build-system)
6717c879
SB
5581 (arguments
5582 '(#:phases
5583 (modify-phases %standard-phases
5584 (add-before
5585 'check 'pre-check
5586 (lambda _
5587 ;; XXX: For the missing '/etc/machine-id'.
5588 (substitute* "test/run-test.sh"
5589 (("DBUS_FATAL_WARNINGS=1")
5590 "DBUS_FATAL_WARNINGS=0"))
5591 #t)))))
d95a56c6
PAR
5592 (native-inputs
5593 `(("pkg-config" ,pkg-config)))
5594 (inputs
5595 `(("python" ,python)
2e88d113 5596 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5597 (synopsis "Python bindings for D-bus")
5598 (description "python-dbus provides bindings for libdbus, the reference
5599implementation of D-Bus.")
5600 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5601 (license license:expat)))
b52af02b
MW
5602
5603(define-public python2-dbus
5604 (package (inherit python-dbus)
5605 (name "python2-dbus")
5606 (inputs `(("python" ,python-2)
5607 ,@(alist-delete "python"
5608 (package-inputs python-dbus)
5609 equal?)))
5610 ;; FIXME: on Python 2, the test_utf8 fails with:
5611 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5612 (arguments `(#:tests? #f))))
a6ac8332
AE
5613
5614(define-public python-apsw
5615 (package
5616 (name "python-apsw")
917708c2 5617 (version "3.9.2-r1")
a6ac8332
AE
5618 (source
5619 (origin
5620 (method url-fetch)
917708c2 5621 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5622 (sha256
5623 (base32
917708c2 5624 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5625 (build-system python-build-system)
5626 (inputs
f3b98f4f 5627 `(("sqlite" ,sqlite)))
a6ac8332
AE
5628 (arguments
5629 `(#:phases
154d207c
MB
5630 (modify-phases %standard-phases
5631 (delete 'check)
5632 (add-after 'install 'check
5633 (lambda* (#:key inputs outputs #:allow-other-keys)
5634 (add-installed-pythonpath inputs outputs)
5635 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5636 (home-page "https://github.com/rogerbinns/apsw/")
5637 (synopsis "Another Python SQLite Wrapper")
5638 (description "APSW is a Python wrapper for the SQLite
5639embedded relational database engine. In contrast to other wrappers such as
5640pysqlite it focuses on being a minimal layer over SQLite attempting just to
5641translate the complete SQLite API into Python.")
abde5f37 5642 (license license:zlib)))
a6ac8332
AE
5643
5644(define-public python2-apsw
5645 (package-with-python2 python-apsw))
26b307e2
AE
5646
5647(define-public python-lxml
5648 (package
5649 (name "python-lxml")
d58a3203 5650 (version "3.6.0")
26b307e2
AE
5651 (source
5652 (origin
5653 (method url-fetch)
97bbc480 5654 (uri (pypi-uri "lxml" version))
26b307e2 5655 (sha256
d58a3203
EF
5656 (base32
5657 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5658 (build-system python-build-system)
5659 (inputs
5660 `(("libxml2" ,libxml2)
f3b98f4f 5661 ("libxslt" ,libxslt)))
26b307e2
AE
5662 (home-page "http://lxml.de/")
5663 (synopsis
5664 "Python XML processing library")
5665 (description
5666 "The lxml XML toolkit is a Pythonic binding for the C libraries
5667libxml2 and libxslt.")
3f641af0 5668 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5669
5670(define-public python2-lxml
5671 (package-with-python2 python-lxml))
4ed20663 5672
b32a1e47
CAW
5673;; beautifulsoup4 has a totally different namespace than 3.x,
5674;; and pypi seems to put it under its own name, so I guess we should too
5675(define-public python-beautifulsoup4
5676 (package
5677 (name "python-beautifulsoup4")
80e8d851 5678 (version "4.5.3")
b32a1e47
CAW
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (pypi-uri "beautifulsoup4" version))
5683 (sha256
5684 (base32
80e8d851 5685 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 5686 (build-system python-build-system)
5f37f0b6
LF
5687 (arguments
5688 `(#:phases
5689 (modify-phases %standard-phases
5690 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5691 ;; must use this conversion script when building with Python 3. The
5692 ;; conversion script also runs the tests.
5693 ;; For more information, see the file 'convert-py3k' in the source
5694 ;; distribution.
5695 (replace 'check
5696 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5697 (home-page
5698 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5699 (synopsis
5700 "Python screen-scraping library")
5701 (description
5702 "Beautiful Soup is a Python library designed for rapidly setting up
5703screen-scraping projects. It offers Pythonic idioms for navigating,
5704searching, and modifying a parse tree, providing a toolkit for
5705dissecting a document and extracting what you need. It automatically
5706converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5707 (license license:expat)
5708 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5709
5710(define-public python2-beautifulsoup4
5711 (package
5712 (inherit (package-with-python2
5713 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5714 (arguments `(#:python ,python-2))))
b32a1e47 5715
4dcb135e 5716(define-public python-cssutils
092e86f5 5717 (package
4dcb135e 5718 (name "python-cssutils")
58d1d816 5719 (version "1.0.1")
092e86f5
AE
5720 (source
5721 (origin
5722 (method url-fetch)
58d1d816 5723 (uri (pypi-uri "cssutils" version))
092e86f5 5724 (sha256
58d1d816
EF
5725 (base32
5726 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5727 (build-system python-build-system)
5728 (native-inputs
4dcb135e 5729 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5730 (arguments
4dcb135e 5731 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5732 (home-page "http://cthedot.de/cssutils/")
5733 (synopsis
5734 "CSS Cascading Style Sheets library for Python")
5735 (description
5736 "Cssutils is a Python package for parsing and building CSS
5737Cascading Style Sheets. Currently it provides a DOM only and no rendering
5738options.")
3f641af0 5739 (license license:lgpl3+)))
880ff77c 5740
4dcb135e
EB
5741(define-public python2-cssutils
5742 (package-with-python2 python-cssutils))
5743
880ff77c
AE
5744(define-public python-cssselect
5745 (package
5746 (name "python-cssselect")
d5ccd9ab 5747 (version "0.9.2")
880ff77c
AE
5748 (source
5749 (origin
5750 (method url-fetch)
d5ccd9ab 5751 (uri (pypi-uri "cssselect" version))
880ff77c 5752 (sha256
d5ccd9ab
EF
5753 (base32
5754 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5755 (build-system python-build-system)
880ff77c
AE
5756 (arguments
5757 ;; tests fail with message
5758 ;; AttributeError: 'module' object has no attribute 'tests'
5759 `(#:tests? #f))
5760 (home-page
5761 "https://pythonhosted.org/cssselect/")
5762 (synopsis
5763 "CSS3 selector parser and translator to XPath 1.0")
5764 (description
5765 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5766them to XPath 1.0 expressions. Such expressions can be used in lxml or
5767another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5768 (license license:bsd-3)))
880ff77c
AE
5769
5770(define-public python2-cssselect
5771 (package-with-python2 python-cssselect))
60357f99 5772
03702173 5773(define-public python-openid-cla
5774 (package
5775 (name "python-openid-cla")
5776 (version "1.2")
5777 (source
5778 (origin
5779 (method url-fetch)
5780 (uri (pypi-uri "python-openid-cla" version))
5781 (sha256
5782 (base32
5783 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5784 (build-system python-build-system)
019ccdb6 5785 (arguments '(#:tests? #f)) ; No tests.
03702173 5786 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5787 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5788 (description "@code{openid-cla} is an implementation of the OpenID
5789contributor license agreement extension for python-openid.")
5790 (license license:bsd-3)))
5791
5792(define-public python2-openid-cla
5793 (package-with-python2 python-openid-cla))
5794
a0e41de4 5795(define-public python-openid-teams
5796 (package
5797 (name "python-openid-teams")
5798 (version "1.1")
5799 (source
5800 (origin
5801 (method url-fetch)
5802 (uri (pypi-uri "python-openid-teams" version))
5803 (sha256
5804 (base32
5805 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5806 (build-system python-build-system)
ac72d3d2 5807 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5808 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5809 (synopsis "Implementation of the OpenID teams extension for python-openid")
5810 (description
5811 "@code{openid-teams} is an implementation of the OpenID
5812teams extension for python-openid.")
5813 (license license:bsd-3)))
5814
5815(define-public python2-openid-teams
5816 (package-with-python2 python-openid-teams))
5817
60357f99
AE
5818(define-public python-netifaces
5819 (package
5820 (name "python-netifaces")
5821 (version "0.10.4")
5822 (source
5823 (origin
5824 (method url-fetch)
5825 (uri (string-append
5826 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5827 version
5828 ".tar.gz"))
5829 (sha256
5830 (base32
5831 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5832 (build-system python-build-system)
60357f99
AE
5833 (home-page
5834 "https://bitbucket.org/al45tair/netifaces")
5835 (synopsis
5836 "Python module for portable network interface information")
5837 (description
5838 "Netifaces is a Python module providing information on network
5839interfaces in an easy and portable manner.")
5840 (license license:expat)))
5841
5842(define-public python2-netifaces
5843 (package-with-python2 python-netifaces))
92cb152b 5844
32f77c04
RW
5845(define-public python-networkx
5846 (package
5847 (name "python-networkx")
a4d9609c 5848 (version "1.11")
32f77c04
RW
5849 (source
5850 (origin
5851 (method url-fetch)
a4d9609c 5852 (uri (pypi-uri "networkx" version))
32f77c04 5853 (sha256
a4d9609c 5854 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5855 (build-system python-build-system)
5856 ;; python-decorator is needed at runtime
5857 (propagated-inputs
5858 `(("python-decorator" ,python-decorator)))
5859 (native-inputs
f3b98f4f 5860 `(("python-nose" ,python-nose)))
32f77c04
RW
5861 (home-page "http://networkx.github.io/")
5862 (synopsis "Python module for creating and manipulating graphs and networks")
5863 (description
5864 "NetworkX is a Python package for the creation, manipulation, and study
5865of the structure, dynamics, and functions of complex networks.")
3f641af0 5866 (license license:bsd-3)))
32f77c04
RW
5867
5868(define-public python2-networkx
5869 (package-with-python2 python-networkx))
5870
92cb152b
RW
5871(define-public snakemake
5872 (package
5873 (name "snakemake")
ef71ed8f 5874 (version "3.11.2")
92cb152b
RW
5875 (source
5876 (origin
5877 (method url-fetch)
7b93d866 5878 (uri (pypi-uri "snakemake" version))
92cb152b 5879 (sha256
ef71ed8f 5880 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
92cb152b 5881 (build-system python-build-system)
7b93d866
MB
5882 (arguments
5883 ;; TODO: Package missing test dependencies.
5884 '(#:tests? #f))
4f9998c6
RW
5885 (propagated-inputs
5886 `(("python-wrapt" ,python-wrapt)
5887 ("python-requests" ,python-requests)))
7b93d866 5888 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5889 (synopsis "Python-based execution environment for make-like workflows")
5890 (description
5891 "Snakemake aims to reduce the complexity of creating workflows by
5892providing a clean and modern domain specific specification language (DSL) in
5893Python style, together with a fast and comfortable execution environment.")
5894 (license license:expat)))
a1920bc9 5895
35de1fbd
RW
5896(define-public python-seaborn
5897 (package
5898 (name "python-seaborn")
ccc18762 5899 (version "0.7.1")
35de1fbd
RW
5900 (source
5901 (origin
5902 (method url-fetch)
fc899d4f 5903 (uri (pypi-uri "seaborn" version))
35de1fbd 5904 (sha256
ccc18762 5905 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5906 (build-system python-build-system)
6f976df6
MB
5907 (arguments
5908 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5909 (propagated-inputs
5910 `(("python-pandas" ,python-pandas)
5911 ("python-matplotlib" ,python-matplotlib)
5912 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5913 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5914 (synopsis "Statistical data visualization")
5915 (description
5916 "Seaborn is a library for making attractive and informative statistical
5917graphics in Python. It is built on top of matplotlib and tightly integrated
5918with the PyData stack, including support for numpy and pandas data structures
5919and statistical routines from scipy and statsmodels.")
3f641af0 5920 (license license:bsd-3)
fc899d4f 5921 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5922
5923(define-public python2-seaborn
fc899d4f
EF
5924 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5925 (package
5926 (inherit base)
5927 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5928 ,@(package-propagated-inputs base))))))
35de1fbd 5929
58a35665
MB
5930(define-public python-mpmath
5931 (package
5932 (name "python-mpmath")
5933 (version "0.19")
5934 (source (origin
5935 (method url-fetch)
5936 (uri (string-append "http://mpmath.org/files/mpmath-"
5937 version ".tar.gz"))
5938 (sha256
5939 (base32
5940 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5941 (build-system python-build-system)
5942 (arguments
5943 '(#:phases
5944 (modify-phases %standard-phases
5945 (replace 'check
5946 (lambda _
5947 (zero?
5948 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5949 (home-page "http://mpmath.org")
5950 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5951 (description
5952 "@code{mpmath} can be used as an arbitrary-precision substitute for
5953Python's float/complex types and math/cmath modules, but also does much
5954more advanced mathematics.")
5955 (license license:bsd-3)))
5956
5957(define-public python2-mpmath
5958 (package-with-python2 python-mpmath))
5959
90fc547f
RW
5960(define-public python-sympy
5961 (package
5962 (name "python-sympy")
52f622ef 5963 (version "1.0")
90fc547f
RW
5964 (source
5965 (origin
5966 (method url-fetch)
5967 (uri (string-append
5968 "https://github.com/sympy/sympy/releases/download/sympy-"
5969 version "/sympy-" version ".tar.gz"))
5970 (sha256
52f622ef 5971 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5972 (build-system python-build-system)
52f622ef
MB
5973 (propagated-inputs
5974 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5975 (home-page "http://www.sympy.org/")
5976 (synopsis "Python library for symbolic mathematics")
5977 (description
5978 "SymPy is a Python library for symbolic mathematics. It aims to become a
5979full-featured computer algebra system (CAS) while keeping the code as simple
5980as possible in order to be comprehensible and easily extensible.")
3f641af0 5981 (license license:bsd-3)))
90fc547f
RW
5982
5983(define-public python2-sympy
5984 (package-with-python2 python-sympy))
5985
e8c9b010
SR
5986(define-public python-q
5987 (package
5988 (name "python-q")
5989 (version "2.6")
5990 (source
5991 (origin
5992 (method url-fetch)
5993 (uri (pypi-uri "q" version))
5994 (sha256
5995 (base32
5996 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5997 (build-system python-build-system)
5998 (home-page "https://github.com/zestyping/q")
5999 (synopsis "Quick-and-dirty debugging output for tired programmers")
6000 (description
6001 "q is a Python module for \"print\" style of debugging Python code. It
6002provides convenient short API for print out of values, tracebacks, and
6003falling into the Python interpreter.")
f210e944 6004 (license license:asl2.0)))
e8c9b010
SR
6005
6006(define-public python2-q
f210e944 6007 (package-with-python2 python-q))
e8c9b010 6008
a1920bc9
FB
6009(define-public python-testlib
6010 (package
6011 (name "python-testlib")
6012 (version "0.6.5")
6013 (source
6014 (origin
6015 (method url-fetch)
6016 (uri (string-append
6017 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6018 version ".zip"))
6019 (sha256
6020 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6021 (build-system python-build-system)
a1920bc9 6022 (native-inputs
632735f2 6023 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6024 (synopsis "Python micro test suite harness")
6025 (description "A micro unittest suite harness for Python.")
6026 (home-page "https://github.com/trentm/testlib")
1cb9c006 6027 (license license:expat)))
a1920bc9
FB
6028
6029(define-public python2-testlib
6030 (package-with-python2 python-testlib))
db62afa5
LC
6031
6032(define-public python2-xlib
6033 (package
6034 (name "python2-xlib")
6035 (version "0.14")
6036 (source (origin
6037 (method url-fetch)
de67e922
LF
6038 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6039 "/" version "/"
db62afa5
LC
6040 "python-xlib-" version ".tar.gz"))
6041 (sha256
6042 (base32
6043 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6044 (build-system python-build-system)
6045 (arguments
6046 `(#:python ,python-2 ;Python 2 only
6047 #:tests? #f)) ;no tests
db62afa5
LC
6048 (home-page "http://python-xlib.sourceforge.net/")
6049 (synopsis "Python X11 client library")
6050 (description
6051 "The Python X Library is intended to be a fully functional X client
6052library for Python programs. It is useful to implement low-level X clients.
6053It is written entirely in Python.")
3f641af0 6054 (license license:gpl2+)))
0234ca06
DT
6055
6056(define-public python-singledispatch
6057 (package
6058 (name "python-singledispatch")
6059 (version "3.4.0.3")
6060 (source
6061 (origin
6062 (method url-fetch)
bdb67d84 6063 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6064 (sha256
6065 (base32
6066 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6067 (build-system python-build-system)
5e1c9d24
HG
6068 (native-inputs
6069 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6070 (home-page
6071 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6072 (synopsis "Backport of singledispatch feature from Python 3.4")
6073 (description
6074 "This library brings functools.singledispatch from Python 3.4 to Python
60752.6-3.3.")
6076 (license license:expat)))
6077
6078(define-public python2-singledispatch
6079 (package-with-python2 python-singledispatch))
feaae484 6080
310d218f
RW
6081(define-public python-tornado
6082 (package
6083 (name "python-tornado")
a724924b 6084 (version "4.3")
310d218f
RW
6085 (source
6086 (origin
6087 (method url-fetch)
a724924b 6088 (uri (pypi-uri "tornado" version))
310d218f 6089 (sha256
a724924b 6090 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 6091 (build-system python-build-system)
3fe2c209
MB
6092 (arguments
6093 '(;; FIXME: Two tests error out with:
6094 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6095 ;; #:phases
6096 ;; (modify-phases %standard-phases
6097 ;; (replace 'check
6098 ;; (lambda _
6099 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6100 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6101 ;; (zero? (system* "python" "-m" "tornado.test")))))
6102 #:tests? #f))
310d218f 6103 (native-inputs
b455439b 6104 `(("python-certifi" ,python-certifi)))
f22efa01 6105 (propagated-inputs
b455439b 6106 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6107 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6108 (synopsis "Python web framework and asynchronous networking library")
6109 (description
6110 "Tornado is a Python web framework and asynchronous networking library,
6111originally developed at FriendFeed. By using non-blocking network I/O,
6112Tornado can scale to tens of thousands of open connections, making it ideal
6113for long polling, WebSockets, and other applications that require a long-lived
6114connection to each user.")
3f641af0 6115 (license license:asl2.0)
b455439b 6116 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6117
6118(define-public python2-tornado
b455439b 6119 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6120 (package (inherit tornado)
f22efa01 6121 (propagated-inputs
310d218f
RW
6122 `(("python2-backport-ssl-match-hostname"
6123 ,python2-backport-ssl-match-hostname)
b455439b 6124 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6125 ,@(package-propagated-inputs tornado))))))
310d218f 6126
6b59fc10
EF
6127;; the python- version can be removed with python-3.5
6128(define-public python-backports-abc
6129 (package
6130 (name "python-backports-abc")
27f9148e 6131 (version "0.5")
6b59fc10
EF
6132 (source
6133 (origin
6134 (method url-fetch)
6135 (uri (pypi-uri "backports_abc" version))
6136 (sha256
6137 (base32
27f9148e 6138 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6139 (build-system python-build-system)
6b59fc10 6140 (home-page "https://github.com/cython/backports_abc")
66e07664 6141 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6142 (description
6143 "Python-backports-abc provides a backport of additions to the
6144'collections.abc' module in Python-3.5.")
3f641af0 6145 (license license:psfl)))
6b59fc10
EF
6146
6147(define-public python2-backports-abc
6148 (package-with-python2 python-backports-abc))
6149
ec074213
TD
6150(define-public python2-backports-shutil-get-terminal-size
6151 (package
6152 (name "python2-backports-shutil-get-terminal-size")
6153 (version "1.0.0")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6158 (sha256
6159 (base32
6160 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6161 (build-system python-build-system)
6162 (arguments
c0446791
MB
6163 `(#:python ,python-2
6164 #:phases
6165 (modify-phases %standard-phases
6166 (replace 'check
6167 (lambda _
6168 (zero? (system* "py.test" "-v")))))))
6169 (native-inputs
6170 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6171 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6172 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6173 (description
6174 "This package provides a backport of the @code{get_terminal_size
6175function} from Python 3.3's @code{shutil}.
6176Unlike the original version it is written in pure Python rather than C,
6177so it might be a tiny bit slower.")
6178 (license license:expat)))
6179
feaae484
SB
6180(define-public python-waf
6181 (package
6182 (name "python-waf")
27bf00e6 6183 (version "1.9.8")
feaae484
SB
6184 (source (origin
6185 (method url-fetch)
bae67829 6186 (uri (string-append "https://waf.io/"
feaae484
SB
6187 "waf-" version ".tar.bz2"))
6188 (sha256
6189 (base32
27bf00e6 6190 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6191 (build-system python-build-system)
6192 (arguments
6193 '(#:phases
6194 (modify-phases %standard-phases
6195 (replace 'build
7dd55dfe
EF
6196 (lambda _
6197 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6198 (replace 'check
7dd55dfe
EF
6199 (lambda _
6200 (zero? (system* "python" "waf" "--version"))))
feaae484 6201 (replace 'install
7dd55dfe
EF
6202 (lambda _
6203 (copy-file "waf" %output))))))
27bf00e6 6204 (home-page "https://waf.io/")
feaae484
SB
6205 (synopsis "Python-based build system")
6206 (description
6207 "Waf is a Python-based framework for configuring, compiling and installing
6208applications.")
3f641af0 6209 (license license:bsd-3)))
feaae484
SB
6210
6211(define-public python2-waf
6212 (package-with-python2 python-waf))
45203542
RW
6213
6214(define-public python-pyzmq
6215 (package
6216 (name "python-pyzmq")
3655ee76 6217 (version "15.1.0")
45203542
RW
6218 (source
6219 (origin
6220 (method url-fetch)
3655ee76 6221 (uri (pypi-uri "pyzmq" version))
45203542 6222 (sha256
3655ee76 6223 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6224 (build-system python-build-system)
6225 (arguments
6226 `(#:configure-flags
6227 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6228 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6229 ;; --inplace' for 'python setup.py test' to work.
6230 #:tests? #f))
6231 (inputs
6232 `(("zeromq" ,zeromq)))
6233 (native-inputs
6234 `(("pkg-config" ,pkg-config)
f3b98f4f 6235 ("python-nose" ,python-nose)))
45203542
RW
6236 (home-page "http://github.com/zeromq/pyzmq")
6237 (synopsis "Python bindings for 0MQ")
6238 (description
6239 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6240 (license license:bsd-4)))
45203542
RW
6241
6242(define-public python2-pyzmq
6243 (package-with-python2 python-pyzmq))
d889e6c4
CR
6244
6245(define-public python-pep8
6246 (package
6247 (name "python-pep8")
db251311 6248 (version "1.7.0")
d889e6c4
CR
6249 (source
6250 (origin
6251 (method url-fetch)
db251311 6252 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6253 (sha256
6254 (base32
db251311 6255 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6256 (build-system python-build-system)
d889e6c4
CR
6257 (home-page "http://pep8.readthedocs.org/")
6258 (synopsis "Python style guide checker")
6259 (description
6260 "This tools checks Python code against some of the style conventions in
6261PEP 8.")
6262 (license license:expat)))
6263
6264(define-public python2-pep8
6265 (package-with-python2 python-pep8))
e31d7f44
CR
6266
6267(define-public python-pyflakes
6268 (package
6269 (name "python-pyflakes")
2abc3972 6270 (version "1.0.0")
e31d7f44
CR
6271 (source
6272 (origin
6273 (method url-fetch)
2abc3972 6274 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6275 (sha256
6276 (base32
2abc3972 6277 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6278 (build-system python-build-system)
e31d7f44
CR
6279 (home-page
6280 "https://github.com/pyflakes/pyflakes")
6281 (synopsis "Passive checker of Python programs")
6282 (description
6283 "Pyflakes statically checks Python source code for common errors.")
6284 (license license:expat)))
a59e017c 6285
7261d9eb
CR
6286(define-public python2-pyflakes
6287 (package-with-python2 python-pyflakes))
6288
a59e017c
CR
6289(define-public python-mccabe
6290 (package
6291 (name "python-mccabe")
c6ebd40d 6292 (version "0.4.0")
a59e017c
CR
6293 (source
6294 (origin
6295 (method url-fetch)
c6ebd40d 6296 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6297 (sha256
6298 (base32
c6ebd40d 6299 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6300 (build-system python-build-system)
328bb95d 6301 (native-inputs
c6ebd40d 6302 `(("python-pytest" ,python-pytest)
f3b98f4f 6303 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6304 (home-page "https://github.com/flintwork/mccabe")
6305 (synopsis "McCabe checker, plugin for flake8")
6306 (description
6307 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6308complexity of Python source code.")
7362371d 6309 (license license:expat)))
a59e017c
CR
6310
6311(define-public python2-mccabe
6312 (package-with-python2 python-mccabe))
e8df8f47 6313
7477fbb1
CR
6314(define-public python-mccabe-0.2.1
6315 (package (inherit python-mccabe)
6316 (version "0.2.1")
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (pypi-uri "mccabe" version))
6321 (sha256
6322 (base32
f3b98f4f 6323 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6324
6325(define-public python2-mccabe-0.2.1
6326 (package-with-python2 python-mccabe-0.2.1))
6327
e8df8f47
CR
6328;; Flake8 2.4.1 requires an older version of pep8.
6329;; This should be removed ASAP.
6330(define-public python-pep8-1.5.7
6331 (package (inherit python-pep8)
6332 (version "1.5.7")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (string-append
6337 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6338 version
6339 ".tar.gz"))
6340 (sha256
6341 (base32
73e3060d
MB
6342 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6343 (arguments
6344 ;; XXX Tests not compatible with Python 3.5.
6345 '(#:tests? #f))))
e8df8f47
CR
6346
6347(define-public python2-pep8-1.5.7
6348 (package-with-python2 python-pep8-1.5.7))
6349
6350;; Flake8 2.4.1 requires an older version of pyflakes.
6351;; This should be removed ASAP.
6352(define-public python-pyflakes-0.8.1
6353 (package (inherit python-pyflakes)
6354 (version "0.8.1")
6355 (source
6356 (origin
6357 (method url-fetch)
6358 (uri (string-append
6359 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6360 version
6361 ".tar.gz"))
6362 (sha256
6363 (base32
0d84e1ef
MB
6364 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6365 (arguments
6366 ;; XXX Tests not compatible with Python 3.5.
6367 '(#:tests? #f))))
e8df8f47
CR
6368
6369(define-public python2-pyflakes-0.8.1
7261d9eb 6370 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6371
6372(define-public python-flake8
6373 (package
6374 (name "python-flake8")
43789136 6375 (version "2.5.4")
e8df8f47
CR
6376 (source
6377 (origin
6378 (method url-fetch)
1b995533 6379 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6380 (sha256
6381 (base32
011271c7
HG
6382 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6383 (modules '((guix build utils)))
6384 (snippet
6385 '(begin
6386 ;; Remove pre-compiled .pyc files from source.
6387 (for-each delete-file-recursively
6388 (find-files "." "__pycache__" #:directories? #t))
6389 (for-each delete-file (find-files "." "\\.pyc$"))
6390 #t))))
e8df8f47 6391 (build-system python-build-system)
482d9591 6392 (propagated-inputs
f3b98f4f 6393 `(("python-pep8" ,python-pep8)
43789136 6394 ("python-pyflakes" ,python-pyflakes)
482d9591 6395 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6396 (native-inputs
6397 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6398 ("python-nose" ,python-nose)))
6399 (home-page "https://gitlab.com/pycqa/flake8")
6400 (synopsis
6401 "The modular source code checker: pep8, pyflakes and co")
6402 (description
6403 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6404 (license license:expat)))
6405
6406(define-public python2-flake8
6407 (package-with-python2 python-flake8))
61b9ac53 6408
abf21efc
CR
6409;; This will only be needed by the python-hacking package and will not be
6410;; necessary once python-hacking > 0.10.2 is released.
6411(define-public python-flake8-2.2.4
6412 (package (inherit python-flake8)
482d9591 6413 (propagated-inputs
f3b98f4f 6414 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6415 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6416 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6417 (native-inputs
482d9591 6418 `(("python-mock" ,python-mock)
abf21efc
CR
6419 ("python-nose" ,python-nose)))
6420 (version "2.2.4")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "flake8" version))
6425 (sha256
6426 (base32
b9c8ccce
HG
6427 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6428 (modules '((guix build utils)))
6429 (snippet
6430 '(begin
6431 ;; Remove pre-compiled .pyc files from source.
6432 (for-each delete-file-recursively
6433 (find-files "." "__pycache__" #:directories? #t))
6434 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6435 #t))))
6436 (arguments
6437 ;; XXX Fails with Python 3.5.
6438 '(#:tests? #f))))
abf21efc
CR
6439
6440(define-public python2-flake8-2.2.4
6441 (package-with-python2 python-flake8-2.2.4))
6442
1f42d824
MFM
6443(define-public python-flake8-polyfill
6444 (package
6445 (name "python-flake8-polyfill")
6446 (version "1.0.1")
6447 (source
6448 (origin
6449 (method url-fetch)
6450 (uri (pypi-uri "flake8-polyfill" version))
6451 (sha256
6452 (base32
6453 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6454 (build-system python-build-system)
2c1cad7a
MB
6455 (arguments
6456 '(#:phases
6457 (modify-phases %standard-phases
6458 (replace 'check
6459 (lambda _
6460 (setenv "PYTHONPATH"
6461 (string-append (getcwd) "/build/lib:"
6462 (getenv "PYTHONPATH")))
6463 (zero? (system* "py.test" "-v")))))))
6464 (native-inputs
6465 `(("python-flake8" ,python-flake8)
6466 ("python-mock" ,python-mock)
6467 ("python-pycodestyle" ,python-pycodestyle)
6468 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6469 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6470 (synopsis "Polyfill package for Flake8 plugins")
6471 (description
6472 "This package that provides some compatibility helpers for Flake8
6473plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6474 (license license:expat)))
6475
6476(define-public python2-flake8-polyfill
6477 (package-with-python2 python-flake8-polyfill))
6478
61b9ac53
FB
6479(define-public python-mistune
6480 (package
6481 (name "python-mistune")
08b81336 6482 (version "0.7.3")
61b9ac53
FB
6483 (source
6484 (origin
6485 (method url-fetch)
eff8d773 6486 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6487 (sha256
6488 (base32
08b81336 6489 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6490 (build-system python-build-system)
328bb95d 6491 (native-inputs
f3b98f4f 6492 `(("python-nose" ,python-nose)
61b9ac53
FB
6493 ("python-cython" ,python-cython)))
6494 (home-page "https://github.com/lepture/mistune")
6495 (synopsis "Markdown parser in pure Python")
6496 (description "This package provides a fast markdown parser in pure
6497Python.")
3f641af0 6498 (license license:bsd-3)))
61b9ac53
FB
6499
6500(define-public python2-mistune
6501 (package-with-python2 python-mistune))
6d992d07 6502
b9893908
EE
6503(define-public python-markdown
6504 (package
6505 (name "python-markdown")
4ffbe8c6 6506 (version "2.6.8")
b9893908
EE
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "Markdown" version))
6511 (sha256
6512 (base32
4ffbe8c6 6513 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6514 (build-system python-build-system)
6515 (arguments
6516 `(#:phases
6517 (modify-phases %standard-phases
6518 (replace 'check
6519 (lambda _
6520 (zero? (system* "python" "run-tests.py")))))))
6521 (native-inputs
6522 `(("python-nose" ,python-nose)
6523 ("python-pyyaml" ,python-pyyaml)))
6524 (home-page "https://pythonhosted.org/Markdown/")
6525 (synopsis "Python implementation of Markdown")
6526 (description
6527 "This package provides a Python implementation of John Gruber's
6528Markdown. The library features international input, various Markdown
6529extensions, and several HTML output formats. A command line wrapper
6530markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6531 (license license:bsd-3)))
b9893908
EE
6532
6533(define-public python2-markdown
6534 (package-with-python2 python-markdown))
6535
6d992d07
FB
6536(define-public python-ptyprocess
6537 (package
6538 (name "python-ptyprocess")
70fc93cb 6539 (version "0.5.1")
6d992d07
FB
6540 (source
6541 (origin
6542 (method url-fetch)
6543 (uri (string-append
6544 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6545 version ".tar.gz"))
6546 (sha256
6547 (base32
70fc93cb 6548 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6549 (build-system python-build-system)
328bb95d 6550 (native-inputs
f3b98f4f 6551 `(("python-nose" ,python-nose)))
6d992d07
FB
6552 (arguments
6553 `(#:phases
6554 (modify-phases %standard-phases
6555 (replace 'check
6556 (lambda _
6557 (zero? (system* "nosetests")))))))
6558 (home-page "https://github.com/pexpect/ptyprocess")
6559 (synopsis "Run a subprocess in a pseudo terminal")
6560 (description
6561 "This package provides a Python library used to launch a subprocess in a
6562pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6563 (license license:isc)))
6d992d07
FB
6564
6565(define-public python2-ptyprocess
6566 (package-with-python2 python-ptyprocess))
4aadb1df 6567
df893a38
MB
6568(define-public python-cram
6569 (package
6570 (name "python-cram")
6571 (version "0.7")
6572 (home-page "https://bitheap.org/cram/")
6573 (source (origin
6574 (method url-fetch)
6575 (uri (list (string-append home-page "cram-"
6576 version ".tar.gz")
6577 (pypi-uri "cram" version)))
6578 (sha256
6579 (base32
6580 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6581 (arguments
6582 '(#:phases
6583 (modify-phases %standard-phases
6584 (add-after 'unpack 'patch-source
6585 (lambda _
6586 (substitute* (find-files "cram" ".*\\.py$")
6587 ;; Replace default shell path.
6588 (("/bin/sh") (which "sh")))
6589 (substitute* (find-files "tests" ".*\\.t$")
6590 (("md5") "md5sum")
6591 (("/bin/bash") (which "bash"))
6592 (("/bin/sh") (which "sh")))
6593 (substitute* "cram/_test.py"
6594 ;; This hack works around a bug triggered by substituting
6595 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6596 ;; "cram -h", which breaks the output at 80 characters. This
6597 ;; causes the line showing the default shell to break into two
6598 ;; lines, but the test expects a single line...
6599 (("env\\['COLUMNS'\\] = '80'")
6600 "env['COLUMNS'] = '160'"))
6601 #t))
6602 (delete 'check)
6603 (add-after 'install 'check
6604 ;; The test phase uses the built library and executable.
6605 ;; It's easier to run it after install since the build
6606 ;; directory contains version-specific PATH.
6607 (lambda* (#:key inputs outputs #:allow-other-keys)
6608 (add-installed-pythonpath inputs outputs)
6609 (setenv "PATH" (string-append (getenv "PATH") ":"
6610 (assoc-ref outputs "out") "/bin"))
6611 (zero? (system* "make" "test")))))))
6612 (build-system python-build-system)
6613 (native-inputs
6614 `(("python-coverage" ,python-coverage)
6615 ("which" ,which)))
6616 (synopsis "Simple testing framework for command line applications")
6617 (description
6618 "Cram is a functional testing framework for command line applications.
6619Cram tests look like snippets of interactive shell sessions. Cram runs each
6620command and compares the command output in the test with the command’s actual
6621output.")
6622 (license license:gpl2+)))
6623
6624(define-public python2-cram
6625 (package-with-python2 python-cram))
6626
4aadb1df
FB
6627(define-public python-terminado
6628 (package
6629 (name "python-terminado")
783fb0a3 6630 (version "0.6")
4aadb1df
FB
6631 (source
6632 (origin
6633 (method url-fetch)
783fb0a3 6634 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6635 (sha256
6636 (base32
783fb0a3 6637 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6638 (build-system python-build-system)
6639 (propagated-inputs
6640 `(("python-tornado" ,python-tornado)
6641 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6642 (native-inputs
6643 `(("python-nose" ,python-nose)))
4aadb1df
FB
6644 (arguments
6645 `(#:phases
6646 (modify-phases %standard-phases
6647 (replace 'check
6648 (lambda _
6649 (zero? (system* "nosetests")))))))
6650 (home-page "https://github.com/takluyver/terminado")
6651 (synopsis "Terminals served to term.js using Tornado websockets")
6652 (description "This package provides a Tornado websocket backend for the
6653term.js Javascript terminal emulator library.")
3f641af0 6654 (license license:bsd-2)
783fb0a3 6655 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6656
6657(define-public python2-terminado
783fb0a3 6658 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6659 (package (inherit terminado)
783fb0a3
EF
6660 (propagated-inputs
6661 `(("python2-backport-ssl-match-hostname"
6662 ,python2-backport-ssl-match-hostname)
00e10c6e 6663 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6664
789de5e2 6665(define-public python-straight-plugin
6666 (package
6667 (name "python-straight-plugin")
6668 (version "1.4.1")
6669 (source
6670 (origin
6671 (method url-fetch)
6672 (uri (pypi-uri "straight.plugin" version))
6673 (sha256
6674 (base32
6675 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6676 (build-system python-build-system)
6677 (home-page "https://github.com/ironfroggy/straight.plugin")
6678 (synopsis "Simple namespaced plugin facility")
6679 (description "Straight Plugin provides a type of plugin you can create from
6680almost any existing Python modules, and an easy way for outside developers to
6681add functionality and customization to your projects with their own plugins.")
6682 (license license:expat)))
6683
6684(define-public python2-straight-plugin
6685 (package-with-python2 python-straight-plugin))
6686
d582eaac
SB
6687(define-public python-fonttools
6688 (package
6689 (name "python-fonttools")
6690 (version "2.5")
6691 (source (origin
6692 (method url-fetch)
6693 (uri (string-append
6694 "https://pypi.python.org/packages/source/F/FontTools/"
6695 "fonttools-" version ".tar.gz"))
6696 (sha256
6697 (base32
6698 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6699 (build-system python-build-system)
9e8c6a37
HG
6700 (arguments
6701 '(#:test-target "check"
6702 #:phases
6703 (modify-phases %standard-phases
6704 (add-after 'unpack 'patch-setuppy
6705 ;; Remove the undocumented "extra_path" argument, which adds an
6706 ;; intervening directories between site-packages and the package
6707 ;; directory.
6708 (lambda _
6709 (substitute* "setup.py"
6710 (("^[ \t]*extra_path *= *'FontTools',") ""))
6711 #t)))))
d582eaac
SB
6712 (home-page "http://github.com/behdad/fonttools")
6713 (synopsis "Tools to manipulate font files")
6714 (description
6715 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6716supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6717of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6718also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6719from an XML-based format.")
3f641af0
DC
6720 (license (license:non-copyleft
6721 "file://LICENSE.txt"
6722 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6723
6724(define-public python2-fonttools
6725 (package-with-python2 python-fonttools))
75710da6 6726
5faa5ce4
RW
6727(define-public python-ly
6728 (package
6729 (name "python-ly")
5135354f 6730 (version "0.9.4")
5faa5ce4
RW
6731 (source
6732 (origin
6733 (method url-fetch)
5135354f
RW
6734 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6735 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6736 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6737 (sha256
6738 (base32
5135354f 6739 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6740 (build-system python-build-system)
972cf9be
MB
6741 (arguments
6742 ;; FIXME: Some tests need network access.
6743 '(#:tests? #f))
5faa5ce4
RW
6744 (synopsis "Tool and library for manipulating LilyPond files")
6745 (description "This package provides a Python library to parse, manipulate
6746or create documents in LilyPond format. A command line program ly is also
6747provided that can be used to do various manipulations with LilyPond files.")
6748 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6749 (license license:gpl2+)))
7e7b27d9
CR
6750
6751(define-public python-appdirs
6752 (package
6753 (name "python-appdirs")
543782e1 6754 (version "1.4.3")
7e7b27d9
CR
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (string-append
6759 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6760 version
6761 ".tar.gz"))
6762 (sha256
6763 (base32
543782e1 6764 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 6765 (build-system python-build-system)
7e7b27d9
CR
6766 (home-page "http://github.com/ActiveState/appdirs")
6767 (synopsis
6768 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6769 (description
6770 "This module provides a portable way of finding out where user data
6771should be stored on various operating systems.")
6772 (license license:expat)))
6773
6774(define-public python2-appdirs
6775 (package-with-python2 python-appdirs))
89b2e0b0
LF
6776
6777(define-public python-llfuse
6778 (package
6779 (name "python-llfuse")
e36ace36 6780 (version "1.1.1")
89b2e0b0
LF
6781 (source (origin
6782 (method url-fetch)
6783 (uri (string-append
6784 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6785 "llfuse-" version ".tar.bz2"))
6786 (sha256
6787 (base32
e36ace36 6788 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6789 (build-system python-build-system)
6790 (inputs
6791 `(("fuse" ,fuse)
6792 ("attr" ,attr)))
6793 (native-inputs
f3b98f4f 6794 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6795 (synopsis "Python bindings for FUSE")
6796 (description
6797 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6798 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6799 (license license:lgpl2.0+)
cd0569c4 6800 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6801
6802(define-public python2-llfuse
cd0569c4
LF
6803 (package (inherit (package-with-python2
6804 (strip-python2-variant python-llfuse)))
6805 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6806
6807;; For attic-0.16
6808(define-public python-llfuse-0.41
6809 (package (inherit python-llfuse)
229b3661 6810 (version "0.41.1")
cd0569c4
LF
6811 (source (origin
6812 (method url-fetch)
6813 (uri (string-append
6814 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6815 "llfuse-" version ".tar.bz2"))
6816 (sha256
6817 (base32
229b3661 6818 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6819 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6820 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6821 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6822
6823(define-public python-msgpack
6824 (package
6825 (name "python-msgpack")
aed625bd 6826 (version "0.4.8")
641c9871
LF
6827 (source (origin
6828 (method url-fetch)
ae831df4 6829 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6830 (sha256
6831 (base32
aed625bd 6832 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6833 (build-system python-build-system)
641c9871
LF
6834 (synopsis "MessagePack (de)serializer")
6835 (description "MessagePack is a fast, compact binary serialization format,
6836suitable for similar data to JSON. This package provides CPython bindings for
6837reading and writing MessagePack data.")
6838 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6839 (license license:asl2.0)))
bd74be7b
LF
6840
6841(define-public python2-msgpack
f210e944 6842 (package-with-python2 python-msgpack))
641c9871 6843
6e5e39f4
CR
6844(define-public python-netaddr
6845 (package
6846 (name "python-netaddr")
6847 (version "0.7.18")
6848 (source
6849 (origin
6850 (method url-fetch)
6851 (uri (string-append
6852 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6853 version
6854 ".tar.gz"))
6855 (sha256
6856 (base32
6857 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6858 (build-system python-build-system)
6859 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6860 (home-page "https://github.com/drkjam/netaddr/")
6861 (synopsis "Pythonic manipulation of network addresses")
6862 (description
6863 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6864and MAC network addresses.")
3f641af0 6865 (license license:bsd-3)))
6e5e39f4
CR
6866
6867(define-public python2-netaddr
6868 (package-with-python2 python-netaddr))
8c692a52
CR
6869
6870(define-public python-wrapt
6871 (package
6872 (name "python-wrapt")
d25bee26 6873 (version "1.10.8")
8c692a52
CR
6874 (source
6875 (origin
6876 (method url-fetch)
d25bee26 6877 (uri (pypi-uri "wrapt" version))
8c692a52
CR
6878 (sha256
6879 (base32
d25bee26 6880 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
6881 (build-system python-build-system)
6882 (arguments
6883 ;; Tests are not included in the tarball, they are only available in the
6884 ;; git repository.
6885 `(#:tests? #f))
8c692a52
CR
6886 (home-page "https://github.com/GrahamDumpleton/wrapt")
6887 (synopsis "Module for decorators, wrappers and monkey patching")
6888 (description
6889 "The aim of the wrapt module is to provide a transparent object proxy for
6890 Python, which can be used as the basis for the construction of function
6891 wrappers and decorator functions.")
3f641af0 6892 (license license:bsd-2)))
8c692a52
CR
6893
6894(define-public python2-wrapt
6895 (package-with-python2 python-wrapt))
b85c85be
CR
6896
6897(define-public python-iso8601
6898 (package
6899 (name "python-iso8601")
fe84bc9a 6900 (version "0.1.11")
b85c85be
CR
6901 (source
6902 (origin
6903 (method url-fetch)
fe84bc9a 6904 (uri (pypi-uri "iso8601" version))
b85c85be 6905 (sha256
fe84bc9a
EF
6906 (base32
6907 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6908 (build-system python-build-system)
63b02364
MB
6909 (native-inputs
6910 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6911 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6912 (synopsis "Module to parse ISO 8601 dates")
6913 (description
6914 "This module parses the most common forms of ISO 8601 date strings (e.g.
6915@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6916 (license license:expat)))
6917
6918(define-public python2-iso8601
6919 (package-with-python2 python-iso8601))
5e412b63
CR
6920
6921(define-public python-monotonic
6922 (package
6923 (name "python-monotonic")
6924 (version "0.3")
6925 (source
6926 (origin
6927 (method url-fetch)
6928 (uri (string-append
6929 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6930 version
6931 ".tar.gz"))
6932 (sha256
6933 (base32
6934 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6935 (build-system python-build-system)
5e412b63
CR
6936 (home-page "https://github.com/atdt/monotonic")
6937 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6938 (description
6939 "This module provides a monotonic() function which returns the value (in
6940fractional seconds) of a clock which never goes backwards.")
3f641af0 6941 (license license:asl2.0)))
5e412b63
CR
6942
6943(define-public python2-monotonic
6944 (package-with-python2 python-monotonic))
de34afac
CR
6945
6946(define-public python-webob
6947 (package
6948 (name "python-webob")
b8834c21 6949 (version "1.5.1")
de34afac
CR
6950 (source
6951 (origin
6952 (method url-fetch)
b8834c21 6953 (uri (pypi-uri "WebOb" version))
de34afac
CR
6954 (sha256
6955 (base32
b8834c21 6956 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6957 (build-system python-build-system)
328bb95d 6958 (native-inputs
f3b98f4f 6959 `(("python-nose" ,python-nose)))
de34afac
CR
6960 (home-page "http://webob.org/")
6961 (synopsis "WSGI request and response object")
6962 (description
6963 "WebOb provides wrappers around the WSGI request environment, and an
6964object to help create WSGI responses.")
6965 (license license:expat)))
6966
6967(define-public python2-webob
6968 (package-with-python2 python-webob))
350ba0a3 6969
02a8a187
BW
6970(define-public python-xlrd
6971 (package
6972 (name "python-xlrd")
c2ad4d70 6973 (version "1.0.0")
02a8a187
BW
6974 (source (origin
6975 (method url-fetch)
e775f48e 6976 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6977 (sha256
6978 (base32
c2ad4d70 6979 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6980 (build-system python-build-system)
6981 (arguments
6982 `(#:phases
6983 (modify-phases %standard-phases
c2ad4d70 6984 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6985 ;; run tests instead for now.
6986 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6987 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6988 (home-page "http://www.python-excel.org/")
6989 (synopsis "Library for extracting data from Excel files")
6990 (description "This packages provides a library to extract data from
c598e35c 6991spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6992@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6993Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6994 (license license:bsd-3)))
02a8a187
BW
6995
6996(define-public python2-xlrd
6997 (package-with-python2 python-xlrd))
6998
350ba0a3
CR
6999(define-public python-prettytable
7000 (package
7001 (name "python-prettytable")
7002 (version "0.7.2")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (string-append
7007 "https://pypi.python.org/packages/source/P/PrettyTable/"
7008 "prettytable-" version ".tar.bz2"))
7009 (sha256
7010 (base32
7011 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7012 (build-system python-build-system)
350ba0a3
CR
7013 (home-page "http://code.google.com/p/prettytable/")
7014 (synopsis "Display tabular data in an ASCII table format")
7015 (description
7016 "A library designed to represent tabular data in visually appealing ASCII
7017tables. PrettyTable allows for selection of which columns are to be printed,
7018independent alignment of columns (left or right justified or centred) and
7019printing of sub-tables by specifying a row range.")
3f641af0 7020 (license license:bsd-3)))
350ba0a3
CR
7021
7022(define-public python2-prettytable
7023 (package-with-python2 python-prettytable))
7a8ac75a 7024
9f8ee3fe
RW
7025(define-public python-tables
7026 (package
7027 (name "python-tables")
7028 (version "3.2.2")
7029 (source
7030 (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "tables" version))
7033 (sha256
7034 (base32
bac23672
HG
7035 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7036 (modules '((guix build utils)))
7037 (snippet
7038 '(begin
7039 ;; Remove pre-compiled .pyc files from source.
7040 (for-each delete-file-recursively
7041 (find-files "." "__pycache__" #:directories? #t))
7042 (for-each delete-file (find-files "." "\\.pyc$"))
7043 #t))))
9f8ee3fe
RW
7044 (build-system python-build-system)
7045 (arguments
7046 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7047 ;; or "check", so we must override the build and check phases.
7048 #:phases
7049 (modify-phases %standard-phases
7050 (add-after 'unpack 'use-gcc
7051 (lambda _
7052 (substitute* "setup.py"
7053 (("compiler = new_compiler\\(\\)" line)
7054 (string-append line
7055 "\ncompiler.set_executables(compiler='gcc',"
7056 "compiler_so='gcc',"
7057 "linker_exe='gcc',"
7058 "linker_so='gcc -shared')")))
7059 #t))
7060 (replace 'build
7061 (lambda* (#:key inputs #:allow-other-keys)
7062 (zero? (system* "python" "setup.py" "build"
7063 (string-append "--hdf5="
7064 (assoc-ref inputs "hdf5"))))))
7065 (replace 'check
7066 (lambda* (#:key inputs #:allow-other-keys)
7067 (zero? (system* "python" "setup.py" "check"
7068 (string-append "--hdf5="
7069 (assoc-ref inputs "hdf5")))))))))
7070 (propagated-inputs
7071 `(("python-numexpr" ,python-numexpr)
7072 ("python-numpy" ,python-numpy)))
7073 (native-inputs
f3b98f4f 7074 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7075 ("pkg-config" ,pkg-config)))
7076 (inputs
7077 `(("hdf5" ,hdf5)
7078 ("bzip2" ,bzip2)
7079 ("zlib" ,zlib)))
7080 (home-page "http://www.pytables.org/")
7081 (synopsis "Hierarchical datasets for Python")
7082 (description "PyTables is a package for managing hierarchical datasets and
7083designed to efficently cope with extremely large amounts of data.")
3f641af0 7084 (license license:bsd-3)))
9f8ee3fe
RW
7085
7086(define-public python2-tables
7087 (package-with-python2 python-tables))
7088
7a8ac75a
RW
7089(define-public python-pyasn1
7090 (package
7091 (name "python-pyasn1")
caa0edb3 7092 (version "0.1.9")
7a8ac75a
RW
7093 (source
7094 (origin
7095 (method url-fetch)
caa0edb3 7096 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7097 (sha256
7098 (base32
caa0edb3 7099 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
7100 (build-system python-build-system)
7101 (home-page "http://pyasn1.sourceforge.net/")
7102 (synopsis "ASN.1 types and codecs")
7103 (description
7104 "This is an implementation of ASN.1 types and codecs in Python. It is
7105suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7106 (license license:bsd-2)))
7a8ac75a
RW
7107
7108(define-public python2-pyasn1
7109 (package-with-python2 python-pyasn1))
9a49a535 7110
5988c299
EF
7111(define-public python-pyasn1-modules
7112 (package
7113 (name "python-pyasn1-modules")
7114 (version "0.0.8")
7115 (source
7116 (origin
7117 (method url-fetch)
7118 (uri (pypi-uri "pyasn1-modules" version))
7119 (sha256
7120 (base32
7121 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7122 (build-system python-build-system)
5988c299
EF
7123 (propagated-inputs
7124 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7125 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7126 (synopsis "ASN.1 codec implementations")
7127 (description
7128 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7129implementations of ASN.1-based codecs and protocols.")
3f641af0 7130 (license license:bsd-3)))
5988c299
EF
7131
7132(define-public python2-pyasn1-modules
7133 (package-with-python2 python-pyasn1-modules))
7134
520af157 7135(define-public python-ipaddress
9a49a535 7136 (package
520af157 7137 (name "python-ipaddress")
36e0d9db 7138 (version "1.0.18")
520af157
DC
7139 (source (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "ipaddress" version))
7142 (sha256
7143 (base32
36e0d9db 7144 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7145 (build-system python-build-system)
9a49a535
RW
7146 (home-page "https://github.com/phihag/ipaddress")
7147 (synopsis "IP address manipulation library")
7148 (description
520af157
DC
7149 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7150 in Python. This library is used to create, poke at, and manipulate IPv4 and
7151 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7152 module to older versions of Python.")
f210e944 7153 (license license:psfl)))
520af157
DC
7154
7155(define-public python2-ipaddress
f210e944 7156 (package-with-python2 python-ipaddress))
3f00e078 7157
4a238186
HG
7158(define-public python2-ipaddr
7159 (package
7160 (name "python2-ipaddr")
7161 (version "2.1.11")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "ipaddr" version))
7166 (sha256
7167 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7168 (build-system python-build-system)
7169 (arguments
7170 `(#:python ,python-2 ;version 2 only
7171 #:phases
7172 (modify-phases %standard-phases
7173 (replace 'check
7174 (lambda* _
7175 (zero? (system* "python" "ipaddr_test.py")))))))
7176 (home-page "https://github.com/google/ipaddr-py")
7177 (synopsis "IP address manipulation library")
7178 (description
7179 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7180IPv6 addresses and networks.
7181
7182For new implementations you may prefer to use the standard module
7183@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7184versions of Python.")
3f641af0 7185 (license license:asl2.0)))
4a238186 7186
3f00e078
RW
7187(define-public python-idna
7188 (package
7189 (name "python-idna")
7190 (version "2.0")
7191 (source
7192 (origin
7193 (method url-fetch)
7194 (uri (string-append "https://pypi.python.org/packages/source/i/"
7195 "idna/idna-" version ".tar.gz"))
7196 (sha256
7197 (base32
7198 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7199 (build-system python-build-system)
3f00e078
RW
7200 (home-page "https://github.com/kjd/idna")
7201 (synopsis "Internationalized domain names in applications")
7202 (description
7203 "This is a library to support the Internationalised Domain Names in
7204Applications (IDNA) protocol as specified in RFC 5891. This version of the
7205protocol is often referred to as “IDNA2008” and can produce different results
7206from the earlier standard from 2003. The library is also intended to act as a
7207suitable drop-in replacement for the “encodings.idna” module that comes with
7208the Python standard library but currently only supports the older 2003
7209specification.")
3f641af0 7210 (license license:bsd-4)))
3f00e078
RW
7211
7212(define-public python2-idna
7213 (package-with-python2 python-idna))
36ebf972
RW
7214
7215(define-public python-pretend
7216 (package
7217 (name "python-pretend")
7218 (version "1.0.8")
7219 (source
7220 (origin
7221 (method url-fetch)
7222 (uri (string-append "https://pypi.python.org/packages/source/p/"
7223 "pretend/pretend-" version ".tar.gz"))
7224 (sha256
7225 (base32
7226 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7227 (build-system python-build-system)
36ebf972
RW
7228 (home-page "https://github.com/alex/pretend")
7229 (synopsis "Library for stubbing in Python")
7230 (description
7231 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7232technique for writing tests. You may hear the term mixed up with mocks,
7233fakes, or doubles. Basically, a stub is an object that returns pre-canned
7234responses, rather than doing any computation.")
3f641af0 7235 (license license:bsd-3)))
36ebf972
RW
7236
7237(define-public python2-pretend
7238 (package-with-python2 python-pretend))
aa759a51
RW
7239
7240(define-public python-cryptography-vectors
7241 (package
7242 (name "python-cryptography-vectors")
27fab2bf 7243 (version "1.7.1")
aa759a51
RW
7244 (source
7245 (origin
7246 (method url-fetch)
9c509ca9 7247 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7248 (sha256
7249 (base32
27fab2bf 7250 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7251 (build-system python-build-system)
aa759a51 7252 (home-page "https://github.com/pyca/cryptography")
66e07664 7253 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7254 (description
7255 "This package contains test vectors for the cryptography package.")
7256 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7257 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7258
7259(define-public python2-cryptography-vectors
7260 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7261
7262(define-public python-cryptography
7263 (package
7264 (name "python-cryptography")
27fab2bf 7265 (version "1.7.1")
88b47cb0
RW
7266 (source
7267 (origin
7268 (method url-fetch)
9c509ca9 7269 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7270 (sha256
7271 (base32
27fab2bf 7272 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7273 (build-system python-build-system)
7274 (inputs
7275 `(("openssl" ,openssl)))
7276 (propagated-inputs
7277 `(("python-cffi" ,python-cffi)
7278 ("python-six" ,python-six)
7279 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7280 ("python-idna" ,python-idna)
7281 ("python-iso8601" ,python-iso8601)))
7282 (native-inputs
7283 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7284 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7285 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7286 ("python-pyasn1" ,python-pyasn1)
7287 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
7288 ("python-pytz" ,python-pytz)
7289 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
7290 (home-page "https://github.com/pyca/cryptography")
7291 (synopsis "Cryptographic recipes and primitives for Python")
7292 (description
7293 "cryptography is a package which provides cryptographic recipes and
7294primitives to Python developers. It aims to be the “cryptographic standard
7295library” for Python. The package includes both high level recipes, and low
7296level interfaces to common cryptographic algorithms such as symmetric ciphers,
7297message digests and key derivation functions.")
7298 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7299 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7300 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7301
7302(define-public python2-cryptography
519e2f4f
LF
7303 (let ((crypto (package-with-python2
7304 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7305 (package (inherit crypto)
7306 (propagated-inputs
7307 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7308 ("python2-backport-ssl-match-hostname"
7309 ,python2-backport-ssl-match-hostname)
68f1cdec 7310 ("python2-enum34" ,python2-enum34)
88b47cb0 7311 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7312
7313(define-public python-pyopenssl
7314 (package
7315 (name "python-pyopenssl")
61684de2 7316 (version "16.2.0")
5af999b8
RW
7317 (source
7318 (origin
7319 (method url-fetch)
eb68d268 7320 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7321 (sha256
7322 (base32
7c6bf660
MB
7323 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7324 (patches
7325 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7326 (build-system python-build-system)
30e0229a 7327 (arguments
7c6bf660
MB
7328 '(#:phases
7329 (modify-phases %standard-phases
7330 (delete 'check)
7331 (add-after 'install 'check
7332 (lambda* (#:key inputs outputs #:allow-other-keys)
7333 (add-installed-pythonpath inputs outputs)
7334 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7335 (propagated-inputs
7336 `(("python-cryptography" ,python-cryptography)
7337 ("python-six" ,python-six)))
7338 (inputs
7339 `(("openssl" ,openssl)))
30e0229a
MB
7340 (native-inputs
7341 `(("python-pytest" ,python-pytest)))
5af999b8
RW
7342 (home-page "https://github.com/pyca/pyopenssl")
7343 (synopsis "Python wrapper module around the OpenSSL library")
7344 (description
7345 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7346library.")
3f641af0 7347 (license license:asl2.0)))
5af999b8
RW
7348
7349(define-public python2-pyopenssl
519e2f4f 7350 (package-with-python2 python-pyopenssl))
643725a1
CR
7351
7352(define-public python-pip
7353 (package
7354 (name "python-pip")
392c26b0 7355 (version "9.0.1")
643725a1
CR
7356 (source
7357 (origin
7358 (method url-fetch)
6fb54e3b 7359 (uri (pypi-uri "pip" version))
643725a1
CR
7360 (sha256
7361 (base32
392c26b0 7362 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7363 (build-system python-build-system)
392c26b0
MC
7364 (arguments
7365 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7366 (home-page "https://pip.pypa.io/")
392c26b0 7367 (synopsis "Package manager for Python software")
643725a1 7368 (description
392c26b0 7369 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7370Python Package Index (PyPI).")
7371 (license license:expat)))
7372
7373(define-public python2-pip
7374 (package-with-python2 python-pip))
d8c4998f
LC
7375
7376(define-public python-tlsh
7377 (package
7378 (name "python-tlsh")
99b00dc7 7379 (version "3.4.4")
d8c4998f
LC
7380 (home-page "https://github.com/trendmicro/tlsh")
7381 (source (origin
99b00dc7
EF
7382 (method url-fetch)
7383 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7384 version ".tar.gz"))
d8c4998f
LC
7385 (sha256
7386 (base32
99b00dc7
EF
7387 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7388 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7389 (build-system cmake-build-system)
7390 (arguments
7391 '(#:out-of-source? #f
7392 #:phases (modify-phases %standard-phases
7393 (replace
7394 'install
7395 (lambda* (#:key outputs #:allow-other-keys)
7396 ;; Build and install the Python bindings. The underlying
7397 ;; C++ library is apparently not meant to be installed.
7398 (let ((out (assoc-ref outputs "out")))
7399 (with-directory-excursion "py_ext"
7400 (and (system* "python" "setup.py" "build")
7401 (system* "python" "setup.py" "install"
7402 (string-append "--prefix=" out))))))))))
7403 (inputs `(("python" ,python-wrapper))) ;for the bindings
7404 (synopsis "Fuzzy matching library for Python")
7405 (description
7406 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7407Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7408value which can be used for similarity comparisons. Similar objects have
7409similar hash values, which allows for the detection of similar objects by
7410comparing their hash values. The byte stream should have a sufficient amount
7411of complexity; for example, a byte stream of identical bytes will not generate
7412a hash value.")
3f641af0 7413 (license license:asl2.0)))
d8c4998f
LC
7414
7415(define-public python2-tlsh
7416 (package
7417 (inherit python-tlsh)
7418 (name "python2-tlsh")
7419 (inputs `(("python" ,python-2)))))
d96034ed 7420
67f66812
BW
7421(define-public python-termcolor
7422 (package
7423 (name "python-termcolor")
7424 (version "1.1.0")
7425 (source
7426 (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "python-termcolor" version))
7429 (sha256
7430 (base32
7431 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7432 (build-system python-build-system)
7433 (arguments
7434 ;; There are no tests.
7435 `(#:tests? #f))
7436 (home-page "http://pypi.python.org/pypi/termcolor")
7437 (synopsis "ANSII Color formatting for terminal output")
7438 (description
7439 "This package provides ANSII Color formatting for output in terminals.")
7440 (license license:expat)))
7441
7442(define-public python2-termcolor
7443 (package-with-python2 python-termcolor))
7444
d96034ed
LC
7445(define-public python-libarchive-c
7446 (package
7447 (name "python-libarchive-c")
03fd001c 7448 (version "2.2")
d96034ed
LC
7449 (source (origin
7450 (method url-fetch)
03fd001c 7451 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7452 (sha256
7453 (base32
03fd001c 7454 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7455 (build-system python-build-system)
7456 (arguments
7457 '(#:phases (modify-phases %standard-phases
7458 (add-before
7459 'build 'reference-libarchive
7460 (lambda* (#:key inputs #:allow-other-keys)
7461 ;; Retain the absolute file name of libarchive.so.
7462 (let ((libarchive (assoc-ref inputs "libarchive")))
7463 (substitute* "libarchive/ffi.py"
7464 (("find_library\\('archive'\\)")
7465 (string-append "'" libarchive
b41a05ce 7466 "/lib/libarchive.so'")))))))))
d96034ed 7467 (inputs
f3b98f4f 7468 `(("libarchive" ,libarchive)))
d96034ed
LC
7469 (home-page "https://github.com/Changaco/python-libarchive-c")
7470 (synopsis "Python interface to libarchive")
7471 (description
7472 "This package provides Python bindings to libarchive, a C library to
7473access possibly compressed archives in many different formats. It uses
7474Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7475 (license license:lgpl2.0+)))
d96034ed
LC
7476
7477(define-public python2-libarchive-c
7478 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7479
7480(define-public python-file
7481 (package
7482 (inherit file)
7483 (name "python-file")
7ffa5d4a
LF
7484 (source (origin
7485 (inherit (package-source file))
7486 ;; This patch should not be applied to python2-file.
7487 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7488 (build-system python-build-system)
7489 (arguments
7490 '(#:tests? #f ;no tests
00bf74be 7491 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7492 #:phases (modify-phases %standard-phases
7493 (add-before 'build 'change-directory
7494 (lambda _
7495 (chdir "python")
7496 #t))
7497 (add-before 'build 'set-library-file-name
7498 (lambda* (#:key inputs #:allow-other-keys)
7499 (let ((file (assoc-ref inputs "file")))
7500 (substitute* "magic.py"
7501 (("find_library\\('magic'\\)")
7502 (string-append "'" file "/lib/libmagic.so'")))
7503 #t))))))
7504 (inputs `(("file" ,file)))
7505 (self-native-input? #f)
daeeea71
CM
7506 (synopsis "Python bindings to the libmagic file type guesser. Note that
7507this module and the python-magic module both provide a \"magic.py\" file;
7508these two modules, which are different and were developed separately, both
f210e944 7509serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7510
7511(define-public python2-file
f210e944 7512 (package-with-python2 python-file))
85d4aeac
LC
7513
7514(define-public python-debian
7515 (package
7516 (name "python-debian")
02d7f337 7517 (version "0.1.28")
85d4aeac
LC
7518 (source
7519 (origin
7520 (method url-fetch)
5e217a8b 7521 (uri (pypi-uri name version))
85d4aeac
LC
7522 (sha256
7523 (base32
02d7f337 7524 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7525 (build-system python-build-system)
f22efa01 7526 (propagated-inputs
85d4aeac 7527 `(("python-six" ,python-six)))
85d4aeac
LC
7528 (home-page "http://packages.debian.org/sid/python-debian")
7529 (synopsis "Debian package related modules")
7530 (description
5c7bdc9a
LC
7531 ;; XXX: Use @enumerate instead of @itemize to work around
7532 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7533 "This package provides Python modules that abstract many formats of
7534Debian-related files, such as:
7535
5c7bdc9a 7536@enumerate
85d4aeac
LC
7537@item Debtags information;
7538@item @file{debian/changelog} files;
7539@item packages files, pdiffs;
7540@item control files of single or multiple RFC822-style paragraphs---e.g.
7541 @file{debian/control}, @file{.changes}, @file{.dsc};
7542@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7543 contained files and meta-information.
5c7bdc9a 7544@end enumerate\n")
85d4aeac
LC
7545
7546 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7547 (license license:gpl3+)))
85d4aeac
LC
7548
7549(define-public python2-debian
7550 (package-with-python2 python-debian))
816a6538 7551
2d321bb2
RW
7552(define-public python-nbformat
7553 (package
7554 (name "python-nbformat")
7555 (version "4.1.0")
7556 (source
7557 (origin
7558 (method url-fetch)
7559 (uri (pypi-uri "nbformat" version))
7560 (sha256
7561 (base32
7562 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7563 (build-system python-build-system)
7564 (arguments `(#:tests? #f)) ; no test target
7565 (propagated-inputs
7566 `(("python-ipython-genutils" ,python-ipython-genutils)
7567 ("python-jsonschema" ,python-jsonschema)
7568 ("python-jupyter-core" ,python-jupyter-core)
7569 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7570 (home-page "http://jupyter.org")
7571 (synopsis "Jupyter Notebook format")
7572 (description "This package provides the reference implementation of the
7573Jupyter Notebook format and Python APIs for working with notebooks.")
7574 (license license:bsd-3)))
7575
7576(define-public python2-nbformat
7577 (package-with-python2 python-nbformat))
7578
55436048
RW
7579(define-public python-bleach
7580 (package
7581 (name "python-bleach")
7582 (version "1.4.3")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "bleach" version))
7587 (sha256
7588 (base32
7589 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7590 (build-system python-build-system)
7591 (propagated-inputs
7592 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7593 ("python-six" ,python-six)))
7594 (native-inputs
7595 `(("python-nose" ,python-nose)))
7596 (home-page "http://github.com/jsocol/bleach")
7597 (synopsis "Whitelist-based HTML-sanitizing tool")
7598 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7599 (license license:asl2.0)))
7600
7601(define-public python2-bleach
7602 (package-with-python2 python-bleach))
7603
60590a3a
RW
7604(define-public python-entrypoints
7605 (package
7606 (name "python-entrypoints")
7607 (version "0.2.2")
7608 (source
7609 (origin
7610 (method url-fetch)
7611 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7612 version ".tar.gz"))
7613 (file-name (string-append name "-" version ".tar.gz"))
7614 (sha256
7615 (base32
7616 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7617 (build-system python-build-system)
7618 ;; The package does not come with a setup.py file, so we have to generate
7619 ;; one ourselves.
7620 (arguments
7621 `(#:tests? #f
7622 #:phases
7623 (modify-phases %standard-phases
7624 (add-after 'unpack 'create-setup.py
7625 (lambda _
7626 (call-with-output-file "setup.py"
7627 (lambda (port)
7628 (format port "\
7629from setuptools import setup
7630setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7631" ,version))))))))
7632 (home-page "https://github.com/takluyver/entrypoints")
7633 (synopsis "Discover and load entry points from installed Python packages")
7634 (description "Entry points are a way for Python packages to advertise
7635objects with some common interface. The most common examples are
7636@code{console_scripts} entry points, which define shell commands by
7637identifying a Python function to run. The @code{entrypoints} module contains
7638functions to find and load entry points.")
7639 (license license:expat)))
7640
7641(define-public python2-entrypoints
7642 (package-with-python2 python-entrypoints))
7643
c60898a8
RW
7644(define-public python-nbconvert
7645 (package
7646 (name "python-nbconvert")
7647 (version "5.0.0b1")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "nbconvert" version))
7652 (sha256
7653 (base32
7654 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7655 (build-system python-build-system)
497355dc
MB
7656 (arguments
7657 `(;; The "bdist_egg" target is disabled by default, causing the installation
7658 ;; to fail.
7659 #:configure-flags (list "bdist_egg")
7660 ;; FIXME: 5 failures, 40 errors.
7661 #:tests? #f))
7662 ;; #:phases
7663 ;; (modify-phases %standard-phases
7664 ;; (replace 'check
7665 ;; (lambda _
7666 ;; (zero? (system* "py.test" "-v")))))
7667 (native-inputs
7668 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7669 (propagated-inputs
7670 `(("python-bleach" ,python-bleach)
7671 ("python-entrypoints" ,python-entrypoints)
7672 ("python-jinja2" ,python-jinja2)
7673 ("python-jupyter-core" ,python-jupyter-core)
7674 ("python-mistune" ,python-mistune)
7675 ("python-nbformat" ,python-nbformat)
7676 ("python-pygments" ,python-pygments)
c60898a8
RW
7677 ("python-traitlets" ,python-traitlets)))
7678 (home-page "http://jupyter.org")
7679 (synopsis "Converting Jupyter Notebooks")
7680 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7681notebooks to various other formats via Jinja templates. It allows you to
7682convert an @code{.ipynb} notebook file into various static formats including:
7683
7684@enumerate
7685@item HTML
7686@item LaTeX
7687@item PDF
7688@item Reveal JS
7689@item Markdown (md)
7690@item ReStructured Text (rst)
7691@item executable script
7692@end enumerate\n")
7693 (license license:bsd-3)))
7694
7695(define-public python2-nbconvert
7696 (package-with-python2 python-nbconvert))
7697
a0d62280
RW
7698(define-public python-notebook
7699 (package
7700 (name "python-notebook")
7701 (version "4.2.3")
7702 (source (origin
7703 (method url-fetch)
7704 (uri (pypi-uri "notebook" version))
7705 (sha256
7706 (base32
7707 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7708 (build-system python-build-system)
7709 (arguments
7710 `(#:phases
7711 (modify-phases %standard-phases
7712 (replace 'check
7713 (lambda _
7714 ;; HOME must be set for tests
7715 (setenv "HOME" "/tmp")
7716 (zero? (system* "nosetests")))))))
7717 (propagated-inputs
7718 `(("python-jupyter-core" ,python-jupyter-core)
7719 ("python-nbformat" ,python-nbformat)
7720 ("python-nbconvert" ,python-nbconvert)
7721 ("python-ipython" ,python-ipython)))
7722 (native-inputs
7723 `(("python-nose" ,python-nose)
7724 ("python-sphinx" ,python-sphinx)
7725 ("python-requests" ,python-requests)))
7726 (home-page "http://jupyter.org/")
7727 (synopsis "Web-based notebook environment for interactive computing")
7728 (description
7729 "The Jupyter HTML notebook is a web-based notebook environment for
7730interactive computing.")
3a735ecf 7731 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7732 (license license:bsd-3)))
7733
7734(define-public python2-notebook
3a735ecf
HG
7735 (let ((base (package-with-python2
7736 (strip-python2-variant python-notebook))))
7737 (package (inherit base)
7738 (native-inputs
7739 `(("python2-mock" ,python2-mock)
7740 ,@(package-native-inputs base)))
7741 (arguments
7742 (substitute-keyword-arguments (package-arguments base)
7743 ((#:phases phases)
7744 `(modify-phases ,phases
7745 (add-before 'check 'disable-test-case
7746 ;; The test requires network access to localhost. Curiously it
7747 ;; fails with Python 2 only. Simply make the test-case return
7748 ;; immediately.
7749 (lambda _
7750 (substitute*
7751 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7752 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7753
d55724ed
RW
7754(define-public python-widgetsnbextension
7755 (package
7756 (name "python-widgetsnbextension")
7757 (version "1.2.6")
7758 (source
7759 (origin
7760 (method url-fetch)
7761 (uri (pypi-uri "widgetsnbextension" version))
7762 (sha256
7763 (base32
7764 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7765 (build-system python-build-system)
7766 (propagated-inputs
7767 `(("python-notebook" ,python-notebook)))
7768 (native-inputs
58f5fae7
MB
7769 `(("python-certifi" ,python-certifi)
7770 ("python-nose" ,python-nose)))
d55724ed
RW
7771 (home-page "http://ipython.org")
7772 (synopsis "IPython HTML widgets for Jupyter")
7773 (description "This package provides interactive HTML widgets for Jupyter
7774notebooks.")
7775 (license license:bsd-3)))
7776
7777(define-public python2-widgetsnbextension
7778 (package-with-python2 python-widgetsnbextension))
7779
4fe2e344
RW
7780(define-public python-ipywidgets
7781 (package
7782 (name "python-ipywidgets")
7783 (version "5.2.2")
7784 (source
7785 (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "ipywidgets" version))
7788 (sha256
7789 (base32
7790 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7791 (build-system python-build-system)
7792 ;; FIXME: it's not clear how to run the tests.
7793 (arguments `(#:tests? #f))
7794 (propagated-inputs
7795 `(("python-ipykernel" ,python-ipykernel)
7796 ("python-ipython" ,python-ipython)
4fe2e344
RW
7797 ("python-traitlets" ,python-traitlets)
7798 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7799 (home-page "http://ipython.org")
7800 (synopsis "IPython HTML widgets for Jupyter")
7801 (description "Ipywidgets are interactive HTML widgets for Jupyter
7802notebooks and the IPython kernel. Notebooks come alive when interactive
7803widgets are used. Users gain control of their data and can visualize changes
7804in the data.")
7805 (license license:bsd-3)))
7806
7807(define-public python2-ipywidgets
7808 (package-with-python2 python-ipywidgets))
7809
8ceebf8f
RW
7810(define-public python-jupyter-console
7811 (package
7812 (name "python-jupyter-console")
7813 (version "5.0.0")
7814 (source
7815 (origin
7816 (method url-fetch)
7817 (uri (pypi-uri "jupyter_console" version))
7818 (sha256
7819 (base32
7820 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7821 (build-system python-build-system)
7822 ;; FIXME: it's not clear how to run the tests.
7823 (arguments `(#:tests? #f))
7824 (propagated-inputs
7825 `(("python-ipykernel" ,python-ipykernel)
7826 ("python-ipython" ,python-ipython)
7827 ("python-jupyter-client" ,python-jupyter-client)
7828 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7829 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7830 (home-page "https://jupyter.org")
7831 (synopsis "Jupyter terminal console")
7832 (description "This package provides a terminal-based console frontend for
7833Jupyter kernels. It also allows for console-based interaction with non-Python
7834Jupyter kernels such as IJulia and IRKernel.")
7835 (license license:bsd-3)))
7836
7837(define-public python2-jupyter-console
7838 (package-with-python2 python-jupyter-console))
7839
c27ae827
RW
7840(define-public jupyter
7841 (package
7842 (name "jupyter")
7843 (version "1.0.0")
7844 (source
7845 (origin
7846 (method url-fetch)
7847 (uri (pypi-uri "jupyter" version))
7848 (sha256
7849 (base32
7850 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7851 (build-system python-build-system)
7852 ;; FIXME: it's not clear how to run the tests.
7853 (arguments `(#:tests? #f))
7854 (propagated-inputs
7855 `(("python-ipykernel" ,python-ipykernel)
7856 ("python-ipywidgets" ,python-ipywidgets)
7857 ("python-jupyter-console" ,python-jupyter-console)
7858 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7859 ("python-notebook" ,python-notebook)))
c27ae827
RW
7860 (home-page "http://jupyter.org")
7861 (synopsis "Web application for interactive documents")
7862 (description
7863 "The Jupyter Notebook is a web application that allows you to create and
7864share documents that contain live code, equations, visualizations and
7865explanatory text. Uses include: data cleaning and transformation, numerical
7866simulation, statistical modeling, machine learning and much more.")
7867 (license license:bsd-3)))
7868
816a6538
LC
7869(define-public python-chardet
7870 (package
7871 (name "python-chardet")
7872 (version "2.3.0")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (string-append
7877 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7878 version
7879 ".tar.gz"))
7880 (sha256
7881 (base32
7882 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7883 (build-system python-build-system)
816a6538
LC
7884 (home-page "https://github.com/chardet/chardet")
7885 (synopsis "Universal encoding detector for Python 2 and 3")
7886 (description
7887 "This package provides @code{chardet}, a Python module that can
7888automatically detect a wide range of file encodings.")
3f641af0 7889 (license license:lgpl2.1+)))
816a6538
LC
7890
7891(define-public python2-chardet
7892 (package-with-python2 python-chardet))
2fc5f186 7893
1872f1bb
KM
7894(define-public python-docopt
7895 (package
7896 (name "python-docopt")
7897 (version "0.6.2")
7898 (source
7899 (origin
7900 (method url-fetch)
7901 ;; The release on PyPI does not include tests.
7902 (uri (string-append
7903 "https://github.com/docopt/docopt/archive/"
7904 version ".tar.gz"))
7905 (file-name (string-append name "-" version ".tar.gz"))
7906 (sha256
7907 (base32
7908 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7909 (build-system python-build-system)
7910 (native-inputs
f3b98f4f 7911 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7912 (arguments
7913 `(#:phases (alist-replace
7914 'check
7915 (lambda _ (zero? (system* "py.test")))
7916 %standard-phases)))
7917 (home-page "http://docopt.org")
7918 (synopsis "Command-line interface description language for Python")
7919 (description "This library allows the user to define a command-line
7920interface from a program's help message rather than specifying it
7921programatically with command-line parsers like @code{getopt} and
7922@code{argparse}.")
7923 (license license:expat)))
7924
7925(define-public python2-docopt
7926 (package-with-python2 python-docopt))
7927
2fc5f186
LF
7928(define-public python-zope-event
7929 (package
7930 (name "python-zope-event")
7931 (version "4.1.0")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (string-append "https://pypi.python.org/packages/source/z"
7936 "/zope.event/zope.event-" version ".tar.gz"))
7937 (sha256
7938 (base32
7939 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7940 (build-system python-build-system)
2fc5f186
LF
7941 (home-page "http://pypi.python.org/pypi/zope.event")
7942 (synopsis "Event publishing system for Python")
7943 (description "Zope.event provides an event publishing API, intended for
7944use by applications which are unaware of any subscribers to their events. It
7945is a simple event-dispatching system on which more sophisticated event
7946dispatching systems can be built.")
3f641af0 7947 (license license:zpl2.1)))
2fc5f186
LF
7948
7949(define-public python2-zope-event
7950 (package-with-python2 python-zope-event))
97abe268
LF
7951
7952(define-public python-zope-interface
7953 (package
7954 (name "python-zope-interface")
7955 (version "4.1.3")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (string-append "https://pypi.python.org/packages/source/z"
7960 "/zope.interface/zope.interface-" version ".tar.gz"))
7961 (sha256
7962 (base32
7963 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7964 (build-system python-build-system)
38d480a8 7965 (native-inputs
97abe268
LF
7966 `(("python-zope-event" ,python-zope-event)))
7967 (home-page "https://github.com/zopefoundation/zope.interface")
7968 (synopsis "Python implementation of the \"design by contract\"
7969methodology")
7970 (description "Zope.interface provides an implementation of \"object
7971interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7972conforming to a given API or contract.")
3f641af0 7973 (license license:zpl2.1)))
97abe268
LF
7974
7975(define-public python2-zope-interface
7976 (package-with-python2 python-zope-interface))
81f2373c
LF
7977
7978(define-public python-zope-exceptions
7979 (package
7980 (name "python-zope-exceptions")
7981 (version "4.0.8")
7982 (source
7983 (origin
7984 (method url-fetch)
7985 (uri (string-append "https://pypi.python.org/packages/source/z"
7986 "/zope.exceptions/zope.exceptions-"
7987 version ".tar.gz"))
7988 (sha256
7989 (base32
7990 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7991 (build-system python-build-system)
7992 (arguments
7993 '(#:tests? #f)) ; circular dependency with zope.testrunner
7994 (propagated-inputs
7995 `(("python-zope-interface" ,python-zope-interface)))
7996 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7997 (synopsis "Zope exceptions")
7998 (description "Zope.exceptions provides general-purpose exception types
7999that have uses outside of the Zope framework.")
3f641af0 8000 (license license:zpl2.1)))
81f2373c
LF
8001
8002(define-public python2-zope-exceptions
8003 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8004
8005(define-public python-zope-testing
8006 (package
8007 (name "python-zope-testing")
8008 (version "4.5.0")
8009 (source
8010 (origin
8011 (method url-fetch)
8012 (uri (string-append "https://pypi.python.org/packages/source/z"
8013 "/zope.testing/zope.testing-" version ".tar.gz"))
8014 (sha256
8015 (base32
b02f7a21
HG
8016 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8017 (modules '((guix build utils)))
8018 (snippet
8019 '(begin
8020 ;; Remove pre-compiled .pyc files backup files from source.
8021 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8022 #t))))
900e3c0e
LF
8023 (build-system python-build-system)
8024 (native-inputs
8025 `(("python-zope-exceptions" ,python-zope-exceptions)))
8026 (propagated-inputs
8027 `(("python-zope-interface" ,python-zope-interface)))
8028 (home-page "http://pypi.python.org/pypi/zope.testing")
8029 (synopsis "Zope testing helpers")
8030 (description "Zope.testing provides a number of testing utilities for HTML
8031forms, HTTP servers, regular expressions, and more.")
3f641af0 8032 (license license:zpl2.1)))
900e3c0e
LF
8033
8034(define-public python2-zope-testing
8035 (package-with-python2 python-zope-testing))
01614c4f
LF
8036
8037(define-public python-zope-testrunner
8038 (package
8039 (name "python-zope-testrunner")
8040 (version "4.4.9")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (string-append "https://pypi.python.org/packages/source/z"
8045 "/zope.testrunner/zope.testrunner-"
8046 version ".zip"))
8047 (sha256
8048 (base32
8049 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8050 (build-system python-build-system)
385871e5
MB
8051 (arguments
8052 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8053 (native-inputs
8054 `(("python-six" ,python-six)
e408ffc3 8055 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8056 ("python-zope-exceptions" ,python-zope-exceptions)
8057 ("python-zope-testing" ,python-zope-testing)
8058 ("unzip" ,unzip)))
8059 (propagated-inputs
8060 `(("python-zope-interface" ,python-zope-interface)))
8061 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8062 (synopsis "Zope testrunner script")
8063 (description "Zope.testrunner provides a script for running Python
8064tests.")
3f641af0 8065 (license license:zpl2.1)))
01614c4f
LF
8066
8067(define-public python2-zope-testrunner
8068 (let ((base (package-with-python2 python-zope-testrunner)))
8069 (package
8070 (inherit base)
8071 (native-inputs
8072 (append (package-native-inputs base)
8073 `(("python2-subunit" ,python2-subunit)
8074 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8075
8076(define-public python-zope-i18nmessageid
8077 (package
8078 (name "python-zope-i18nmessageid")
8079 (version "4.0.3")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 (uri (string-append
8084 "https://pypi.python.org/packages/source/z"
8085 "/zope.i18nmessageid/zope.i18nmessageid-"
8086 version ".tar.gz"))
8087 (sha256
8088 (base32
8089 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8090 (build-system python-build-system)
6a5c710c
LF
8091 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8092 (synopsis "Message identifiers for internationalization")
8093 (description "Zope.i18nmessageid provides facilities for declaring
8094internationalized messages within program source text.")
3f641af0 8095 (license license:zpl2.1)))
6a5c710c
LF
8096
8097(define-public python2-zope-i18nmessageid
8098 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8099
8100(define-public python-zope-schema
8101 (package
8102 (name "python-zope-schema")
8103 (version "4.4.2")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (string-append "https://pypi.python.org/packages/source/z"
8108 "/zope.schema/zope.schema-" version ".tar.gz"))
8109 (sha256
8110 (base32
8111 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8112 (build-system python-build-system)
22dba2ef
MB
8113 (arguments
8114 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8115 (propagated-inputs
8116 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8117 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8118 ("python-zope-interface" ,python-zope-interface)))
8119 (native-inputs
47f77210
HG
8120 `(("python-zope-testing" ,python-zope-testing)
8121 ("python-coverage" ,python-coverage)
8122 ("python-nose" ,python-nose)))
71fb09f3
LF
8123 (home-page "http://pypi.python.org/pypi/zope.schema")
8124 (synopsis "Zope data schemas")
8125 (description "Zope.scheme provides extensions to zope.interface for
8126defining data schemas.")
3f641af0 8127 (license license:zpl2.1)))
71fb09f3
LF
8128
8129(define-public python2-zope-schema
8130 (package-with-python2 python-zope-schema))
fbac9b17
LF
8131
8132(define-public python-zope-configuration
8133 (package
8134 (name "python-zope-configuration")
8135 (version "4.0.3")
8136 (source (origin
8137 (method url-fetch)
8138 (uri (string-append "https://pypi.python.org/packages/source/z"
8139 "/zope.configuration/zope.configuration-"
8140 version ".tar.gz"))
8141 (sha256
8142 (base32
8143 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8144 (build-system python-build-system)
7e8b1bfa
MB
8145 (arguments
8146 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8147 (propagated-inputs
8148 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8149 ("python-zope-schema" ,python-zope-schema)))
8150 (home-page "http://pypi.python.org/pypi/zope.configuration")
8151 (synopsis "Zope Configuration Markup Language")
8152 (description "Zope.configuration implements ZCML, the Zope Configuration
8153Markup Language.")
3f641af0 8154 (license license:zpl2.1)))
fbac9b17
LF
8155
8156(define-public python2-zope-configuration
8157 (package-with-python2 python-zope-configuration))
2ad52086
LF
8158
8159(define-public python-zope-proxy
8160 (package
8161 (name "python-zope-proxy")
8162 (version "4.1.6")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (string-append "https://pypi.python.org/packages/source/z"
8167 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8168 (sha256
8169 (base32
8170 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8171 (build-system python-build-system)
66b3aadb
MB
8172 (arguments
8173 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8174 (propagated-inputs
8175 `(("python-zope-interface" ,python-zope-interface)))
8176 (home-page "http://pypi.python.org/pypi/zope.proxy")
8177 (synopsis "Generic, transparent proxies")
8178 (description "Zope.proxy provides generic, transparent proxies for Python.
8179Proxies are special objects which serve as mostly-transparent wrappers around
8180another object, intervening in the apparent behavior of the wrapped object
8181only when necessary to apply the policy (e.g., access checking, location
8182brokering, etc.) for which the proxy is responsible.")
3f641af0 8183 (license license:zpl2.1)))
2ad52086
LF
8184
8185(define-public python2-zope-proxy
8186 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8187
8188(define-public python-zope-location
8189 (package
8190 (name "python-zope-location")
8191 (version "4.0.3")
8192 (source
8193 (origin
8194 (method url-fetch)
8195 (uri (string-append "https://pypi.python.org/packages/source/z"
8196 "/zope.location/zope.location-" version ".tar.gz"))
8197 (sha256
8198 (base32
8199 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8200 (build-system python-build-system)
40bb8e07
MB
8201 (arguments
8202 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8203 (propagated-inputs
f404b5ea
LF
8204 `(("python-zope-proxy" ,python-zope-proxy)
8205 ("python-zope-schema" ,python-zope-schema)))
8206 (home-page "http://pypi.python.org/pypi/zope.location/")
8207 (synopsis "Zope location library")
8208 (description "Zope.location implements the concept of \"locations\" in
8209Zope3, which are are special objects that have a structural location.")
3f641af0 8210 (license license:zpl2.1)))
f404b5ea
LF
8211
8212(define-public python2-zope-location
8213 (package-with-python2 python-zope-location))
d4b77f36
LF
8214
8215(define-public python-zope-security
8216 (package
8217 (name "python-zope-security")
8218 (version "4.0.3")
8219 (source
8220 (origin
8221 (method url-fetch)
8222 (uri (string-append "https://pypi.python.org/packages/source/z"
8223 "/zope.security/zope.security-" version ".tar.gz"))
8224 (sha256
8225 (base32
8226 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8227 (build-system python-build-system)
a74f9b12
MB
8228 (arguments
8229 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8230 (propagated-inputs
8231 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8232 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8233 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8234 (native-inputs
8235 `(("python-six" ,python-six)
8236 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8237 ("python-zope-configuration" ,python-zope-configuration)
8238 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8239 ("python-zope-testrunner" ,python-zope-testrunner)
8240 ("python-zope-testing" ,python-zope-testing)))
8241 (home-page "http://pypi.python.org/pypi/zope.security")
8242 (synopsis "Zope security framework")
8243 (description "Zope.security provides a generic mechanism to implement
8244security policies on Python objects.")
3f641af0 8245 (license license:zpl2.1)))
d4b77f36
LF
8246
8247(define-public python2-zope-security
04417662
EF
8248 (let ((zope-security (package-with-python2 python-zope-security)))
8249 (package (inherit zope-security)
8250 (propagated-inputs
8251 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8252 ,@(alist-delete
8253 "python-zope-testrunner"
8254 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8255
8256(define-public python-zope-component
8257 (package
8258 (name "python-zope-component")
35e1a0f1 8259 (version "4.3.0")
a6b61b27
LF
8260 (source
8261 (origin
8262 (method url-fetch)
35e1a0f1 8263 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8264 (sha256
8265 (base32
35e1a0f1 8266 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8267 (build-system python-build-system)
8268 (arguments
8269 ;; Skip tests due to circular dependency with python-zope-security.
8270 '(#:tests? #f))
8271 (native-inputs
8272 `(("python-zope-testing" ,python-zope-testing)))
8273 (propagated-inputs
8274 `(("python-zope-event" ,python-zope-event)
8275 ("python-zope-interface" ,python-zope-interface)
8276 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8277 ("python-zope-configuration" ,python-zope-configuration)))
8278 (home-page "https://github.com/zopefoundation/zope.component")
8279 (synopsis "Zope Component Architecture")
8280 (description "Zope.component represents the core of the Zope Component
8281Architecture. Together with the zope.interface package, it provides
8282facilities for defining, registering and looking up components.")
3f641af0 8283 (license license:zpl2.1)))
a6b61b27
LF
8284
8285(define-public python2-zope-component
8286 (package-with-python2 python-zope-component))
3859ac12 8287
1ae44b80 8288(define-public python-pythondialog
b5f218be 8289 (package
1ae44b80 8290 (name "python-pythondialog")
42c4b246 8291 (version "3.4.0")
b5f218be
LF
8292 (source
8293 (origin
8294 (method url-fetch)
1ae44b80 8295 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8296 (sha256
8297 (base32
1ae44b80 8298 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8299 (build-system python-build-system)
8300 (arguments
8301 `(#:phases
8302 (modify-phases %standard-phases
8303 (add-after 'unpack 'patch-path
8304 (lambda* (#:key inputs #:allow-other-keys)
8305 (let* ((dialog (assoc-ref inputs "dialog")))
8306 ;; Since this library really wants to grovel the search path, we
8307 ;; must hardcode dialog's store path into it.
8308 (substitute* "dialog.py"
8309 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8310 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8311 #t))))
b5f218be
LF
8312 #:tests? #f)) ; no test suite
8313 (propagated-inputs
8314 `(("dialog" ,dialog)))
8315 (home-page "http://pythondialog.sourceforge.net/")
8316 (synopsis "Python interface to the UNIX dialog utility")
8317 (description "A Python wrapper for the dialog utility. Its purpose is to
8318provide an easy to use, pythonic and comprehensive Python interface to dialog.
8319This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8320 (license license:lgpl2.1)
1ae44b80
LF
8321 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8322
8323(define-public python2-pythondialog
8324 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8325 (package
8326 (inherit base)
8327 (version (package-version python-pythondialog))
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "python2-pythondialog" version))
8331 (sha256
8332 (base32
8333 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8334
3859ac12
LF
8335(define-public python-pyrfc3339
8336 (package
8337 (name "python-pyrfc3339")
d9aa097b 8338 (version "1.0")
3859ac12
LF
8339 (source
8340 (origin
8341 (method url-fetch)
d9aa097b 8342 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8343 (sha256
8344 (base32
d9aa097b 8345 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8346 (build-system python-build-system)
8347 (propagated-inputs
8348 `(("python-pytz" ,python-pytz)))
8349 (native-inputs
f3b98f4f 8350 `(("python-nose" ,python-nose)))
3859ac12
LF
8351 (home-page "https://github.com/kurtraschke/pyRFC3339")
8352 (synopsis "Python timestamp library")
8353 (description "Python library for generating and parsing RFC 3339-compliant
8354timestamps.")
8355 (license license:expat)))
8356
8357(define-public python2-pyrfc3339
8358 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8359
8360(define-public python-werkzeug
8361 (package
8362 (name "python-werkzeug")
bbb99d6b 8363 (version "0.11.15")
5eea2005
LF
8364 (source
8365 (origin
8366 (method url-fetch)
4b47cbfa 8367 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8368 (sha256
8369 (base32
bbb99d6b 8370 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8371 (build-system python-build-system)
8372 (native-inputs
8373 `(("python-pytest" ,python-pytest)))
8374 (home-page "http://werkzeug.pocoo.org/")
8375 (synopsis "Utilities for WSGI applications")
8376 (description "One of the most advanced WSGI utility modules. It includes a
8377powerful debugger, full-featured request and response objects, HTTP utilities to
8378handle entity tags, cache control headers, HTTP dates, cookie handling, file
8379uploads, a powerful URL routing system and a bunch of community-contributed
8380addon modules.")
3f641af0 8381 (license license:x11)))
5eea2005
LF
8382
8383(define-public python2-werkzeug
8384 (package-with-python2 python-werkzeug))
99fffa8a
LF
8385
8386(define-public python-configobj
8387 (package
8388 (name "python-configobj")
8389 (version "5.0.6")
8390 (source (origin
8391 (method url-fetch)
8392 (uri (string-append
8393 "https://pypi.python.org/packages/source/c/configobj/"
8394 "configobj-" version ".tar.gz"))
8395 (sha256
8396 (base32
8397 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8398 ;; Patch setup.py so it looks for python-setuptools, which is
8399 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8400 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8401 (build-system python-build-system)
861f70c9 8402 (propagated-inputs
f3b98f4f 8403 `(("python-six" ,python-six)))
99fffa8a
LF
8404 (synopsis "Config file reading, writing and validation")
8405 (description "ConfigObj is a simple but powerful config file reader and
8406writer: an ini file round tripper. Its main feature is that it is very easy to
8407use, with a straightforward programmer’s interface and a simple syntax for
8408config files.")
8409 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8410 (license license:bsd-3)))
99fffa8a
LF
8411
8412(define-public python2-configobj
8413 (package-with-python2 python-configobj))
79e8a291
LF
8414
8415(define-public python-configargparse
8416 (package
8417 (name "python-configargparse")
8418 (version "0.10.0")
8419 (source (origin
8420 (method url-fetch)
8421 (uri (string-append
8422 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8423 "ConfigArgParse-" version ".tar.gz"))
8424 (sha256
8425 (base32
8426 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8427 (build-system python-build-system)
8428 (arguments
8429 ;; FIXME: Bug in test suite filed upstream:
8430 ;; https://github.com/bw2/ConfigArgParse/issues/32
8431 '(#:tests? #f))
8432 (synopsis "Replacement for argparse")
8433 (description "A drop-in replacement for argparse that allows options to also
8434be set via config files and/or environment variables.")
8435 (home-page "https://github.com/bw2/ConfigArgParse")
8436 (license license:expat)))
8437
8438(define-public python2-configargparse
8439 (package-with-python2 python-configargparse))
ab41f979
LF
8440
8441(define-public python-ndg-httpsclient
8442 (package
8443 (name "python-ndg-httpsclient")
ae476d01 8444 (version "0.4.2")
ab41f979
LF
8445 (source (origin
8446 (method url-fetch)
7be13d00 8447 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8448 (sha256
8449 (base32
ae476d01 8450 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8451 (build-system python-build-system)
a39cc016
LF
8452 (arguments
8453 '(;; The tests appear to require networking.
8454 #:tests? #f))
ab41f979
LF
8455 (propagated-inputs
8456 `(("python-pyopenssl" ,python-pyopenssl)))
8457 (synopsis "HTTPS support for Python's httplib and urllib2")
8458 (description "This is a HTTPS client implementation for httplib and urllib2
8459based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8460over the default provided with Python and importantly enables full verification
8461of the SSL peer.")
8462 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8463 (license license:bsd-3)))
ab41f979
LF
8464
8465;; python2-openssl requires special care, so package-with-python2 is
8466;; insufficient.
8467(define-public python2-ndg-httpsclient
8468 (package (inherit python-ndg-httpsclient)
8469 (name "python2-ndg-httpsclient")
8470 (arguments `(#:python ,python-2))
8471 (propagated-inputs
8472 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8473
8474(define-public python-contextlib2
8475 (package
8476 (name "python-contextlib2")
8477 (version "0.4.0")
8478 (source
8479 (origin
8480 (method url-fetch)
8481 (uri (pypi-uri "contextlib2" version))
8482 (sha256
8483 (base32
8484 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8485 (build-system python-build-system)
8486 (arguments
8487 `(#:phases
8488 (modify-phases %standard-phases
8489 (replace 'check
8490 (lambda _ (zero?
8491 (system*
b3546174 8492 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8493 (home-page "http://contextlib2.readthedocs.org/")
8494 (synopsis "Tools for decorators and context managers")
8495 (description "This module is primarily a backport of the Python
84963.2 contextlib to earlier Python versions. Like contextlib, it
8497provides utilities for common tasks involving decorators and context
8498managers. It also contains additional features that are not part of
8499the standard library.")
3f641af0 8500 (license license:psfl)))
03f964a5
CM
8501
8502(define-public python2-contextlib2
8503 (package-with-python2 python-contextlib2))
210bf497
DT
8504
8505(define-public python-texttable
8506 (package
8507 (name "python-texttable")
4c4d4df3 8508 (version "0.8.7")
210bf497
DT
8509 (source
8510 (origin
8511 (method url-fetch)
8512 (uri (pypi-uri "texttable" version))
8513 (sha256
8514 (base32
4c4d4df3 8515 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8516 (build-system python-build-system)
8517 (arguments '(#:tests? #f)) ; no tests
8518 (home-page "https://github.com/foutaise/texttable/")
8519 (synopsis "Python module for creating simple ASCII tables")
8520 (description "Texttable is a Python module for creating simple ASCII
8521tables.")
3f641af0 8522 (license license:lgpl2.1+)))
210bf497
DT
8523
8524(define-public python2-texttable
8525 (package-with-python2 python-texttable))
67c52bb3
DT
8526
8527(define-public python-websocket-client
8528 (package
8529 (name "python-websocket-client")
6b810897 8530 (version "0.37.0")
67c52bb3
DT
8531 (source
8532 (origin
8533 (method url-fetch)
6b810897 8534 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8535 (sha256
8536 (base32
6b810897 8537 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8538 (build-system python-build-system)
a5333f7c
HG
8539 (propagated-inputs
8540 `(("python-six" ,python-six)))
67c52bb3
DT
8541 (home-page "https://github.com/liris/websocket-client")
8542 (synopsis "WebSocket client for Python")
8543 (description "The Websocket-client module provides the low level APIs for
8544WebSocket usage in Python programs.")
3f641af0 8545 (license license:lgpl2.1+)))
67c52bb3
DT
8546
8547(define-public python2-websocket-client
8548 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8549
8550(define-public python-atomicwrites
8551 (package
8552 (name "python-atomicwrites")
c56ad5e2 8553 (version "1.1.5")
5c6eea2a
LF
8554 (source (origin
8555 (method url-fetch)
8556 (uri (pypi-uri "atomicwrites" version))
8557 (sha256
8558 (base32
c56ad5e2 8559 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8560 (build-system python-build-system)
8561 (synopsis "Atomic file writes in Python")
8562 (description "Library for atomic file writes using platform dependent tools
8f65585b 8563for atomic file system operations.")
5c6eea2a 8564 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8565 (license license:expat)))
9bb6d184
LF
8566
8567(define-public python2-atomicwrites
f210e944 8568 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8569
8570(define-public python-requests-toolbelt
8571 (package
8572 (name "python-requests-toolbelt")
c02af1c8 8573 (version "0.6.2")
561bb3cb
LF
8574 (source (origin
8575 (method url-fetch)
c02af1c8
LF
8576 (uri (string-append
8577 "https://pypi.python.org/packages/"
8578 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8579 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8580 (sha256
8581 (base32
c02af1c8 8582 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8583 (build-system python-build-system)
759aadd4
LF
8584 (native-inputs
8585 `(("python-betamax" ,python-betamax)
8586 ("python-mock" ,python-mock)
8587 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8588 (propagated-inputs
8589 `(("python-requests" ,python-requests)))
8590 (synopsis "Extensions to python-requests")
8591 (description "This is a toolbelt of useful classes and functions to be used
8592with python-requests.")
8593 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8594 (license license:asl2.0)))
d1deb90b
LF
8595
8596(define-public python-click-threading
8597 (package
8598 (name "python-click-threading")
3d2e0dbc 8599 (version "0.2.0")
d1deb90b
LF
8600 (source (origin
8601 (method url-fetch)
3d2e0dbc
LF
8602 (uri (string-append
8603 "https://pypi.python.org/packages/"
8604 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8605 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8606 (sha256
8607 (base32
3d2e0dbc 8608 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8609 (build-system python-build-system)
8610 (propagated-inputs
8611 `(("python-click" ,python-click)))
8612 (synopsis "Utilities for multithreading in Click")
8613 (description "This package provides utilities for multithreading in Click
8614applications.")
8615 (home-page "https://github.com/click-contrib/click-threading")
8616 (license license:expat)))
7b17cab9
LF
8617
8618(define-public python-click-log
8619 (package
8620 (name "python-click-log")
42734b9a 8621 (version "0.1.8")
7b17cab9
LF
8622 (source (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "click-log" version))
8625 (sha256
8626 (base32
42734b9a 8627 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8628 (build-system python-build-system)
8629 (propagated-inputs
8630 `(("python-click" ,python-click)))
8631 (synopsis "Logging for click applications")
8632 (description "This package provides a Python library for logging Click
8633applications.")
8634 (home-page "https://github.com/click-contrib/click-log")
8635 (license license:expat)))
7b3a4ee4
LF
8636
8637(define-public python-apipkg
8638 (package
8639 (name "python-apipkg")
8640 (version "1.4")
8641 (source (origin
8642 (method url-fetch)
8643 (uri (pypi-uri "apipkg" version))
8644 (sha256
8645 (base32
8646 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8647 (build-system python-build-system)
328bb95d 8648 (native-inputs
7b3a4ee4
LF
8649 `(("python-pytest" ,python-pytest)))
8650 (synopsis "Namespace control and lazy-import mechanism")
8651 (description "With apipkg you can control the exported namespace of a Python
8652package and greatly reduce the number of imports for your users. It is a small
8653pure Python module that works on virtually all Python versions.")
8654 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8655 (license license:expat)))
e08739c3
CAW
8656
8657(define-public python2-apipkg
f210e944 8658 (package-with-python2 python-apipkg))
848964fe
LF
8659
8660(define-public python-execnet
8661 (package
8662 (name "python-execnet")
8663 (version "1.4.1")
8664 (source (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "execnet" version))
8667 (sha256
8668 (base32
8669 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8670 (build-system python-build-system)
ca0eee9d
LF
8671 (arguments
8672 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8673 ;; The two test failures are caused by the lack of an `ssh` executable.
8674 ;; The test suite can be run with pytest after the 'install' phase.
8675 #:tests? #f))
848964fe 8676 (native-inputs
ca0eee9d
LF
8677 `(("python-pytest" ,python-pytest)
8678 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8679 (propagated-inputs
848964fe
LF
8680 `(("python-apipkg" ,python-apipkg)))
8681 (synopsis "Rapid multi-Python deployment")
8682 (description "Execnet provides a share-nothing model with
8683channel-send/receive communication for distributing execution across many
8684Python interpreters across version, platform and network barriers. It has a
8685minimal and fast API targetting the following uses:
8686@enumerate
8687@item distribute tasks to (many) local or remote CPUs
8688@item write and deploy hybrid multi-process applications
8689@item write scripts to administer multiple environments
8690@end enumerate")
8691 (home-page "http://codespeak.net/execnet/")
f210e944 8692 (license license:expat)))
16c84f90
CAW
8693
8694(define-public python2-execnet
f210e944 8695 (package-with-python2 python-execnet))
6720dbb4 8696
d5bbf806 8697(define-public python-trollius-redis
8698 (package
8699 (name "python-trollius-redis")
8700 (version "0.1.4")
8701 (source
8702 (origin
8703 (method url-fetch)
8704 (uri (pypi-uri "trollius_redis" version))
8705 (sha256
8706 (base32
8707 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8708 (build-system python-build-system)
97b62eb0
MB
8709 ;; TODO: Tests require packaging 'hiredis'.
8710 (arguments '(#:tests? #f))
d5bbf806 8711 (home-page "https://github.com/benjolitz/trollius-redis")
8712 (synopsis "Port of asyncio-redis to trollius")
8713 (description "@code{trollius-redis} is a Redis client for Python
8714 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8715 Redis protocol.")
8716 (license license:bsd-2)))
8717
8718(define-public python2-trollius-redis
8719 (package-with-python2 python-trollius-redis))
8720
6720dbb4
LF
8721;;; The software provided by this package was integrated into pytest 2.8.
8722(define-public python-pytest-cache
8723 (package
8724 (name "python-pytest-cache")
8725 (version "1.0")
8726 (source (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "pytest-cache" version))
8729 (sha256
8730 (base32
8731 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8732 (build-system python-build-system)
f22efa01 8733 (propagated-inputs
630d938f
EF
8734 `(("python-apipkg" ,python-apipkg)
8735 ("python-execnet" ,python-execnet)
8736 ("python-py" ,python-py)
8737 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8738 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8739 (description "The pytest-cache plugin provides tools to rerun failures from
8740the last py.test invocation.")
8741 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8742 (license license:expat)))
0adc21c2
EF
8743
8744(define-public python2-pytest-cache
f210e944 8745 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8746
8747(define-public python-pytest-localserver
8748 (package
8749 (name "python-pytest-localserver")
29f20168 8750 (version "0.3.5")
d7e729fe
LF
8751 (source (origin
8752 (method url-fetch)
29f20168 8753 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8754 (sha256
8755 (base32
29f20168 8756 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8757 (build-system python-build-system)
8758 (arguments
8759 `(#:phases (modify-phases %standard-phases
8760 (replace 'check
8761 (lambda _
8762 (zero? (system* "py.test" "--genscript=runtests.py"))
8763 (zero? (system* "py.test")))))))
8764 (native-inputs
d7e729fe
LF
8765 `(("python-pytest" ,python-pytest)
8766 ("python-requests" ,python-requests)
9ba40f05 8767 ("python-six" ,python-six)))
f22efa01 8768 (propagated-inputs
9ba40f05 8769 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8770 (synopsis "Py.test plugin to test server connections locally")
8771 (description "Pytest-localserver is a plugin for the pytest testing
8772framework which enables you to test server connections locally.")
8773 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8774 (license license:expat)))
28cecbb7
LF
8775
8776(define-public python-wsgi-intercept
8777 (package
8778 (name "python-wsgi-intercept")
909fbd2b 8779 (version "1.2.2")
28cecbb7
LF
8780 (source (origin
8781 (method url-fetch)
909fbd2b
LF
8782 (uri (string-append
8783 "https://pypi.python.org/packages/"
8784 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8785 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8786 (sha256
8787 (base32
909fbd2b 8788 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8789 (build-system python-build-system)
b9fc496f
HG
8790 (propagated-inputs
8791 `(("python-six" ,python-six)))
28cecbb7 8792 (native-inputs
9d813ec1 8793 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8794 ("python-httplib2" ,python-httplib2)
8795 ("python-requests" ,python-requests)
8757f050 8796 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8797 (synopsis "Puts a WSGI application in place of a real URI for testing")
8798 (description "Wsgi_intercept installs a WSGI application in place of a real
8799URI for testing. Testing a WSGI application normally involves starting a
8800server at a local host and port, then pointing your test code to that address.
8801Instead, this library lets you intercept calls to any specific host/port
8802combination and redirect them into a WSGI application importable by your test
8803program. Thus, you can avoid spawning multiple processes or threads to test
8804your Web app.")
8805 (home-page "https://github.com/cdent/wsgi-intercept")
8806 (license license:expat)))
89b8a551
LF
8807
8808(define-public python-pytest-xprocess
8809 (package
8810 (name "python-pytest-xprocess")
8811 (version "0.9.1")
8812 (source (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "pytest-xprocess" version))
8815 (sha256
8816 (base32
8817 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8818 (build-system python-build-system)
8819 (propagated-inputs
8820 `(("python-pytest" ,python-pytest)
8821 ("python-pytest-cache" ,python-pytest-cache)
8822 ("python-psutil" ,python-psutil)))
8823 (synopsis "Pytest plugin to manage external processes across test runs")
8824 (description "Pytest-xprocess is an experimental py.test plugin for managing
8825processes across test runs.")
8826 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8827 (license license:expat)))
5c299bf0
LF
8828
8829(define-public python-icalendar
8830 (package
8831 (name "python-icalendar")
b611d018 8832 (version "3.11.3")
5c299bf0
LF
8833 (source (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "icalendar" version))
8836 (sha256
8837 (base32
b611d018 8838 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
5c299bf0
LF
8839 (build-system python-build-system)
8840 (propagated-inputs
22d7360b 8841 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8842 ("python-pytz" ,python-pytz)))
8843 (synopsis "Python library for parsing iCalendar files")
8844 (description "The icalendar package is a parser/generator of iCalendar
8845files for use with Python.")
8846 (home-page "https://github.com/collective/icalendar")
3f641af0 8847 (license license:bsd-2)))
6bbbb53e
LF
8848
8849(define-public python-sphinxcontrib-newsfeed
8850 (package
8851 (name "python-sphinxcontrib-newsfeed")
8852 (version "0.1.4")
8853 (source (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8856 (sha256
8857 (base32
8858 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8859 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8860 (build-system python-build-system)
8861 (propagated-inputs
251ed7f2 8862 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8863 (synopsis "News Feed extension for Sphinx")
8864 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8865Blog, News or Announcements section to a Sphinx website.")
8866 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8867 (license license:bsd-2)))
2216e15c
SB
8868
8869(define-public python-args
8870 (package
8871 (name "python-args")
8872 (version "0.1.0")
8873 (source (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "args" version))
8876 (sha256
8877 (base32
8878 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8879 (build-system python-build-system)
2216e15c
SB
8880 (home-page "https://github.com/kennethreitz/args")
8881 (synopsis "Command-line argument parser")
8882 (description
8883 "This library provides a Python module to parse command-line arguments.")
3f641af0 8884 (license license:bsd-3)))
2216e15c
SB
8885
8886(define-public python2-args
8887 (package-with-python2 python-args))
c06a3de9
SB
8888
8889(define-public python-clint
8890 (package
8891 (name "python-clint")
8892 (version "0.5.1")
8893 (source (origin
8894 (method url-fetch)
8895 (uri (pypi-uri "clint" version))
8896 (sha256
8897 (base32
8898 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8899 (build-system python-build-system)
6145b604
MB
8900 (arguments
8901 '(#:phases
8902 (modify-phases %standard-phases
8903 (replace 'check
8904 (lambda _
8905 (zero? (system* "py.test" "-v")))))))
8906 (native-inputs
8907 `(("python-pytest" ,python-pytest)))
f22efa01 8908 (propagated-inputs
f3b98f4f 8909 `(("python-args" ,python-args)))
c06a3de9
SB
8910 (home-page "https://github.com/kennethreitz/clint")
8911 (synopsis "Command-line interface tools")
8912 (description
8913 "Clint is a Python module filled with a set of tools for developing
8914command-line applications, including tools for colored and indented
8915output, progress bar display, and pipes.")
3f641af0 8916 (license license:isc)))
c06a3de9
SB
8917
8918(define-public python2-clint
8919 (package-with-python2 python-clint))
4ecdeef8
SB
8920
8921(define-public python-astor
8922 (package
8923 (name "python-astor")
8924 (version "0.5")
8925 (source (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "astor" version))
8928 (sha256
8929 (base32
8930 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8931 (build-system python-build-system)
4ecdeef8
SB
8932 (home-page "https://github.com/berkerpeksag/astor")
8933 (synopsis "Read and write Python ASTs")
8934 (description
8935 "Astor is designed to allow easy manipulation of Python source via the
8936Abstract Syntax Tree.")
3f641af0 8937 (license license:bsd-3)))
4ecdeef8
SB
8938
8939(define-public python2-astor
8940 (package-with-python2 python-astor))
e224b7d0
SB
8941
8942(define-public python-rply
8943 (package
8944 (name "python-rply")
8945 (version "0.7.4")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "rply" version))
8949 (sha256
8950 (base32
8951 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8952 (build-system python-build-system)
f22efa01 8953 (propagated-inputs
f3b98f4f 8954 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8955 (home-page "https://github.com/alex/rply")
8956 (synopsis "Parser generator for Python")
8957 (description
8958 "This package provides a pure Python based parser generator, that also
8959works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8960with a new public API, and RPython support.")
3f641af0 8961 (license license:bsd-3)))
e224b7d0
SB
8962
8963(define-public python2-rply
8964 (package-with-python2 python-rply))
c3e919d7
SB
8965
8966(define-public python-hy
8967 (package
8968 (name "python-hy")
8969 (version "0.11.1")
8970 (source (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "hy" version))
8973 (sha256
8974 (base32
8975 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8976 (build-system python-build-system)
15c37077
MB
8977 (arguments
8978 '(#:phases
8979 (modify-phases %standard-phases
8980 (replace 'check
8981 (lambda _
8982 ;; Tests require write access to HOME.
8983 (setenv "HOME" "/tmp")
8984 (zero? (system* "nosetests")))))))
8985 (native-inputs
8986 `(("python-coverage" ,python-coverage)
8987 ("python-nose" ,python-nose)))
f22efa01 8988 (propagated-inputs
c3e919d7
SB
8989 `(("python-astor" ,python-astor)
8990 ("python-clint" ,python-clint)
f3b98f4f 8991 ("python-rply" ,python-rply)))
c3e919d7
SB
8992 (home-page "http://hylang.org/")
8993 (synopsis "Lisp frontend to Python")
8994 (description
8995 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8996its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8997Python at your fingertips, in Lisp form.")
8998 (license license:expat)))
8999
9000(define-public python2-hy
9001 (package-with-python2 python-hy))
7a5b944e 9002
81f7f297
EF
9003(define-public python-rauth
9004 (package
9005 (name "python-rauth")
9006 (version "0.7.2")
9007 (source
9008 (origin
9009 (method url-fetch)
9010 (uri (pypi-uri "rauth" version))
9011 (sha256
9012 (base32
9013 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9014 (build-system python-build-system)
9015 (arguments
9016 `(#:test-target "check"))
f22efa01 9017 (propagated-inputs
81f7f297
EF
9018 `(("python-requests" ,python-requests)))
9019 (home-page "https://github.com/litl/rauth")
9020 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9021 (description
9022 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9023provides service wrappers for convenient connection initialization and
9024authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9025 (license license:expat)
9026 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9027
9028(define-public python2-rauth
0848d8d3
EF
9029 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9030 (package
9031 (inherit base)
00e10c6e 9032 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9033 ,@(package-native-inputs base))))))
81f7f297 9034
1abe448d
EF
9035(define-public python2-functools32
9036 (package
9037 (name "python2-functools32")
9038 (version "3.2.3-2")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "functools32" version))
9043 (sha256
9044 (base32
9045 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9046 (build-system python-build-system)
9047 (arguments
9048 `(#:python ,python-2
9049 #:tests? #f)) ; no test target
1abe448d
EF
9050 (home-page "https://github.com/MiCHiLU/python-functools32")
9051 (synopsis
9052 "Backport of the functools module from Python 3.2.3")
9053 (description
9054 "This package is a backport of the @code{functools} module from Python
90553.2.3 for use with older versions of Python and PyPy.")
9056 (license license:expat)))
9057
550bd98b
MB
9058(define-public python2-subprocess32
9059 (package
9060 (name "python2-subprocess32")
9061 (version "3.2.7")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "subprocess32" version))
9065 (sha256
9066 (base32
9067 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9068 (patches
9069 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9070 (build-system python-build-system)
9071 (arguments
9072 `(#:python ,python-2
9073 #:phases
9074 (modify-phases %standard-phases
9075 (add-after 'unpack 'patch-/bin/sh
9076 (lambda _
9077 (substitute* '("subprocess32.py"
9078 "test_subprocess32.py")
9079 (("/bin/sh") (which "sh")))
9080 #t))
9081 (delete 'check)
9082 (add-after 'install 'check
9083 (lambda* (#:key inputs outputs #:allow-other-keys)
9084 ;; For some reason this package fails to import
9085 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9086 ;; directory. Running tests after install is easier.
9087 (add-installed-pythonpath inputs outputs)
9088 (zero? (system* "python" "test_subprocess32.py")))))))
9089 (home-page "https://github.com/google/python-subprocess32")
9090 (synopsis "Backport of the subprocess module from Python 3.2")
9091 (description
9092 "This is a backport of the @code{subprocess} standard library module
9093from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9094new features. On POSIX systems it is guaranteed to be reliable when used
9095in threaded applications. It includes timeout support from Python 3.3 but
9096otherwise matches 3.2’s API.")
9097 (license license:psfl)))
9098
877889f3 9099(define-public python2-futures
7a5b944e 9100 (package
877889f3 9101 (name "python2-futures")
7a5b944e
EF
9102 (version "3.0.3")
9103 (source
9104 (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "futures" version))
9107 (sha256
9108 (base32
9109 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9110 (build-system python-build-system)
877889f3 9111 (arguments `(#:python ,python-2))
7a5b944e
EF
9112 (home-page "https://github.com/agronholm/pythonfutures")
9113 (synopsis
9114 "Backport of the concurrent.futures package from Python 3.2")
9115 (description
9116 "The concurrent.futures module provides a high-level interface for
9117asynchronously executing callables. This package backports the
9118concurrent.futures package from Python 3.2")
3f641af0 9119 (license license:bsd-3)))
7a5b944e 9120
5cb2fe44
EF
9121(define-public python-promise
9122 (package
9123 (name "python-promise")
9124 (version "0.4.2")
9125 (source
9126 (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "promise" version))
9129 (sha256
9130 (base32
9131 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9132 (build-system python-build-system)
9133 ;; Tests wants python-futures, which is a python2 only program, and
9134 ;; can't be found by python-promise at test time.
9135 (arguments `(#:tests? #f))
9136 (home-page "https://github.com/syrusakbary/promise")
9137 (synopsis "Promises/A+ implementation for Python")
9138 (description
9139 "Promises/A+ implementation for Python")
9140 (properties `((python2-variant . ,(delay python2-promise))))
9141 (license license:expat)))
9142
9143(define-public python2-promise
9144 (let ((promise (package-with-python2
9145 (strip-python2-variant python-promise))))
9146 (package (inherit promise)
9147 (arguments (substitute-keyword-arguments (package-arguments promise)
9148 ((#:tests? _) #t)))
9149 (native-inputs
9150 `(("python2-futures" ,python2-futures)
9151 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9152 ,@(package-native-inputs promise))))))
9153
c18f6368
EF
9154(define-public python-urllib3
9155 (package
9156 (name "python-urllib3")
6178274d 9157 (version "1.18.1")
c18f6368
EF
9158 (source
9159 (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "urllib3" version))
9162 (sha256
9163 (base32
6178274d 9164 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9165 (build-system python-build-system)
9166 (arguments `(#:tests? #f))
9167 (native-inputs
f3b98f4f 9168 `(;; some packages for tests
c18f6368
EF
9169 ("python-nose" ,python-nose)
9170 ("python-mock" ,python-mock)
9171 ("python-tornado" ,python-tornado)))
9172 (propagated-inputs
8322749a 9173 `(;; extra packages for https security
c18f6368
EF
9174 ("python-certifi" ,python-certifi)
9175 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9176 ("python-pyasn1" ,python-pyasn1)
9177 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9178 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9179 (synopsis "HTTP library with thread-safe connection pooling")
9180 (description
9181 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9182can reuse the same socket connection for multiple requests, it can POST files,
9183supports url redirection and retries, and also gzip and deflate decoding.")
9184 (license license:expat)))
9185
9186(define-public python2-urllib3
9187 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9188
9189(define-public python-colorama
9190 (package
9191 (name "python-colorama")
f92576f9 9192 (version "0.3.7")
2b2f2fc1
DT
9193 (source
9194 (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "colorama" version))
9197 (sha256
9198 (base32
f92576f9 9199 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9200 (build-system python-build-system)
46e110cc 9201 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9202 (description "Colorama is a Python library for rendering colored terminal
9203text.")
9204 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9205 (license license:bsd-3)))
2b2f2fc1
DT
9206
9207(define-public python2-colorama
9208 (package-with-python2 python-colorama))
f5bcec6e
DT
9209
9210(define-public python-rsa
9211 (package
9212 (name "python-rsa")
ecd68c53 9213 (version "3.4.2")
f5bcec6e
DT
9214 (source
9215 (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "rsa" version))
9218 (sha256
9219 (base32
ecd68c53 9220 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9221 (build-system python-build-system)
f22efa01 9222 (propagated-inputs
f3b98f4f 9223 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9224 (synopsis "Pure-Python RSA implementation")
9225 (description "Python-RSA is a pure-Python RSA implementation. It supports
9226encryption and decryption, signing and verifying signatures, and key
9227generation according to PKCS#1 version 1.5. It can be used as a Python
9228library as well as on the command line.")
9229 (home-page "http://stuvel.eu/rsa")
3f641af0 9230 (license license:asl2.0)))
f5bcec6e
DT
9231
9232(define-public python2-rsa
9233 (package-with-python2 python-rsa))
c0aacfa5
DT
9234
9235(define-public python-pluggy
9236 (package
9237 (name "python-pluggy")
9238 (version "0.3.1")
9239 (source
9240 (origin
9241 (method url-fetch)
9242 (uri (pypi-uri "pluggy" version))
9243 (sha256
9244 (base32
9245 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9246 (build-system python-build-system)
c0aacfa5
DT
9247 (synopsis "Plugin and hook calling mechanism for Python")
9248 (description "Pluggy is an extraction of the plugin manager as used by
9249Pytest but stripped of Pytest specific details.")
9250 (home-page "https://pypi.python.org/pypi/pluggy")
9251 (license license:expat)))
9252
9253(define-public python2-pluggy
9254 (package-with-python2 python-pluggy))
a4af21ca
DT
9255
9256(define-public python-tox
9257 (package
9258 (name "python-tox")
9259 (version "2.3.1")
9260 (source
9261 (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "tox" version))
9264 (sha256
9265 (base32
9266 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9267 (build-system python-build-system)
9268 (arguments
7ba07edf
HG
9269 ;; FIXME: Tests require pytest-timeout, which itself requires
9270 ;; pytest>=2.8.0 for installation.
a4af21ca 9271 '(#:tests? #f))
482d9591
HG
9272 (propagated-inputs
9273 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9274 ("python-py" ,python-py)
482d9591 9275 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9276 (native-inputs
7ba07edf
HG
9277 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9278 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9279 (home-page "http://tox.testrun.org/")
9280 (synopsis "Virtualenv-based automation of test activities")
9281 (description "Tox is a generic virtualenv management and test command line
9282tool. It can be used to check that a package installs correctly with
9283different Python versions and interpreters, or run tests in each type of
9284supported environment, or act as a frontend to continuous integration
9285servers.")
9286 (license license:expat)))
9287
9288(define-public python2-tox
9289 (package-with-python2 python-tox))
ba9da248
DT
9290
9291(define-public python-jmespath
9292 (package
9293 (name "python-jmespath")
9294 (version "0.9.0")
9295 (source
9296 (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "jmespath" version))
9299 (sha256
9300 (base32
9301 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9302 (build-system python-build-system)
52a75a83
MB
9303 (native-inputs
9304 `(("python-nose" ,python-nose)))
ba9da248
DT
9305 (synopsis "JSON Matching Expressions")
9306 (description "JMESPath (pronounced “james path”) is a Python library that
9307allows one to declaratively specify how to extract elements from a JSON
9308document.")
9309 (home-page "https://github.com/jmespath/jmespath.py")
9310 (license license:expat)))
9311
9312(define-public python2-jmespath
9313 (package-with-python2 python-jmespath))
935fcd5c
DT
9314
9315(define-public python-botocore
9316 (package
9317 (name "python-botocore")
d93985fe 9318 (version "1.5.26")
935fcd5c
DT
9319 (source
9320 (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "botocore" version))
9323 (sha256
9324 (base32
d93985fe 9325 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9326 (build-system python-build-system)
877fdac9
MB
9327 (arguments
9328 ;; FIXME: Many tests are failing.
9329 '(#:tests? #f))
482d9591 9330 (propagated-inputs
22d7360b 9331 `(("python-dateutil" ,python-dateutil)
935fcd5c 9332 ("python-docutils" ,python-docutils)
482d9591 9333 ("python-jmespath" ,python-jmespath)))
8fa6890b 9334 (native-inputs
482d9591 9335 `(("python-mock" ,python-mock)
935fcd5c 9336 ("python-nose" ,python-nose)
482d9591 9337 ("behave" ,behave)
935fcd5c 9338 ("python-tox" ,python-tox)
482d9591 9339 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9340 (home-page "https://github.com/boto/botocore")
9341 (synopsis "Low-level interface to AWS")
9342 (description "Botocore is a Python library that provides a low-level
9343interface to the Amazon Web Services (AWS) API.")
3f641af0 9344 (license license:asl2.0)))
935fcd5c
DT
9345
9346(define-public python2-botocore
9347 (package-with-python2 python-botocore))
f861b8b8
DT
9348
9349(define-public awscli
9350 (package
9351 (name "awscli")
192b887a 9352 (version "1.11.63")
f861b8b8
DT
9353 (source
9354 (origin
9355 (method url-fetch)
d5ccf71e 9356 (uri (pypi-uri name version))
f861b8b8
DT
9357 (sha256
9358 (base32
192b887a 9359 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9360 (build-system python-build-system)
482d9591 9361 (propagated-inputs
f861b8b8 9362 `(("python-colorama" ,python-colorama)
482d9591
HG
9363 ("python-botocore" ,python-botocore)
9364 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9365 ("python-docutils" ,python-docutils)
482d9591 9366 ("python-rsa" ,python-rsa)))
619bfd81
MB
9367 (arguments
9368 ;; FIXME: The 'pypi' release does not contain tests.
9369 '(#:tests? #f))
60a8be3a 9370 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9371 (synopsis "Command line client for AWS")
9372 (description "AWS CLI provides a unified command line interface to the
9373Amazon Web Services (AWS) API.")
3f641af0 9374 (license license:asl2.0)))
6a44697d
LF
9375
9376(define-public python-hypothesis
9377 (package
9378 (name "python-hypothesis")
bea6d94d 9379 (version "3.1.0")
6a44697d
LF
9380 (source (origin
9381 (method url-fetch)
9382 (uri (pypi-uri "hypothesis" version))
9383 (sha256
9384 (base32
bea6d94d 9385 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9386 (build-system python-build-system)
bd100c71 9387 (native-inputs
6a44697d
LF
9388 `(("python-flake8" ,python-flake8)
9389 ("python-pytest" ,python-pytest)))
9390 (synopsis "Library for property based testing")
9391 (description "Hypothesis is a library for testing your Python code against a
9392much larger range of examples than you would ever want to write by hand. It’s
9393based on the Haskell library, Quickcheck, and is designed to integrate
9394seamlessly into your existing Python unit testing work flow.")
9395 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9396 (license license:mpl2.0)
6f068e08 9397 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9398
9399(define-public python2-hypothesis
6f068e08
EF
9400 (let ((hypothesis (package-with-python2
9401 (strip-python2-variant python-hypothesis))))
9402 (package (inherit hypothesis)
9403 (native-inputs
bd100c71
MB
9404 `(("python2-enum34" ,python2-enum34)
9405 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9406
9407(define-public python-pytest-subtesthack
9408 (package
9409 (name "python-pytest-subtesthack")
9410 (version "0.1.1")
9411 (source (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "pytest-subtesthack" version))
9414 (sha256
9415 (base32
9416 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9417 (build-system python-build-system)
7517e73c
LF
9418 (propagated-inputs
9419 `(("python-pytest" ,python-pytest)))
9420 (synopsis "Set-up and tear-down fixtures for unit tests")
9421 (description "This plugin allows you to set up and tear down fixtures within
9422unit test functions that use @code{py.test}. This is useful for using
9423@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9424function multiple times, without setting up or tearing down fixture state as is
9425normally the case.")
9426 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9427 (license license:unlicense)))
7517e73c
LF
9428
9429(define-public python2-pytest-subtesthack
9430 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9431
7637de23 9432(define-public python-xdo
0bdc1671 9433 (package
7637de23 9434 (name "python-xdo")
e871c332 9435 (version "0.3")
0bdc1671
CAW
9436 (source (origin
9437 (method url-fetch)
9438 (uri (string-append
9439 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9440 "python-xdo_" version ".orig.tar.gz"))
9441 (sha256
9442 (base32
e871c332 9443 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9444 (build-system python-build-system)
9445 (arguments
736cfc10
SB
9446 '(#:phases
9447 (modify-phases %standard-phases
9448 (add-before 'install 'patch-libxdo-path
9449 ;; Hardcode the path of dynamically loaded libxdo library.
9450 (lambda* (#:key inputs #:allow-other-keys)
9451 (let ((libxdo (string-append
9452 (assoc-ref inputs "xdotool")
9453 "/lib/libxdo.so")))
9454 (substitute* "xdo/_xdo.py"
9455 (("find_library\\(\"xdo\"\\)")
9456 (simple-format #f "\"~a\"" libxdo)))
9457 #t))))
9458 #:tests? #f)) ; no tests provided
0b5e0863
SB
9459 (propagated-inputs
9460 `(("python-six" ,python-six)))
0bdc1671
CAW
9461 (inputs
9462 `(("xdotool" ,xdotool)
9463 ("libX11" ,libx11)))
9464 (home-page "https://tracker.debian.org/pkg/python-xdo")
9465 (synopsis "Python library for simulating X11 keyboard/mouse input")
9466 (description "Provides bindings to libxdo for manipulating X11 via simulated
9467input. (Note that this is mostly a legacy library; you may wish to look at
9468python-xdo for newer bindings.)")
3f641af0 9469 (license license:bsd-3)))
0bdc1671 9470
7637de23
LF
9471(define-public python2-xdo
9472 (package-with-python2 python-xdo))
9473
cb34dc6c
CAW
9474(define-public python-wtforms
9475 (package
9476 (name "python-wtforms")
9477 (version "2.1")
9478 (source
9479 (origin
9480 (method url-fetch)
9481 (uri (pypi-uri "WTForms" version ".zip"))
9482 (sha256
9483 (base32
9484 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9485 (build-system python-build-system)
13c4d874
EF
9486 (arguments
9487 '(#:phases
9488 (modify-phases %standard-phases
9489 (add-after 'unpack 'remove-django-test
9490 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9491 (lambda _
9492 (substitute*
9493 "tests/runtests.py"
9494 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9495 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9496 #t)))))
cb34dc6c
CAW
9497 (native-inputs
9498 `(("unzip" ,unzip)))
9499 (home-page "http://wtforms.simplecodes.com/")
9500 (synopsis
9501 "Form validation and rendering library for Python web development")
9502 (description
9503 "WTForms is a flexible forms validation and rendering library
9504for Python web development. It is very similar to the web form API
9505available in Django, but is a standalone package.")
f210e944 9506 (license license:bsd-3)))
cb34dc6c
CAW
9507
9508(define-public python2-wtforms
f210e944 9509 (package-with-python2 python-wtforms))
50aaec25
DT
9510
9511(define-public python-mako
9512 (package
9513 (name "python-mako")
3753f2e6 9514 (version "1.0.6")
50aaec25
DT
9515 (source
9516 (origin
9517 (method url-fetch)
9518 (uri (pypi-uri "Mako" version))
9519 (sha256
9520 (base32
3753f2e6 9521 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9522 (build-system python-build-system)
482d9591
HG
9523 (propagated-inputs
9524 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9525 (native-inputs
482d9591 9526 `(("python-mock" ,python-mock)
e435af5c
MB
9527 ("python-nose" ,python-nose)
9528 ("python-pytest" ,python-pytest)))
50aaec25
DT
9529 (home-page "http://www.makotemplates.org/")
9530 (synopsis "Templating language for Python")
9531 (description "Mako is a templating language for Python that compiles
9532templates into Python modules.")
f210e944 9533 (license license:expat)))
50aaec25
DT
9534
9535(define-public python2-mako
f210e944 9536 (package-with-python2 python-mako))
ae00a41f
CAW
9537
9538(define-public python-waitress
9539 (package
9540 (name "python-waitress")
9541 (version "0.8.10")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "waitress" version))
9546 (sha256
9547 (base32
9548 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9549 (build-system python-build-system)
9550 (home-page "https://github.com/Pylons/waitress")
9551 (synopsis "Waitress WSGI server")
9552 (description "Waitress is meant to be a production-quality pure-Python WSGI
9553server with very acceptable performance.")
f210e944 9554 (license license:zpl2.1)))
ae00a41f
CAW
9555
9556(define-public python2-waitress
f210e944 9557 (package-with-python2 python-waitress))
778a284b
CAW
9558
9559(define-public python-wsgiproxy2
9560 (package
9561 (name "python-wsgiproxy2")
9562 (version "0.4.2")
9563 (source
9564 (origin
9565 (method url-fetch)
9566 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9567 (sha256
9568 (base32
9569 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9570 (build-system python-build-system)
e359b31a
LF
9571 (arguments
9572 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9573 ;; support Python 3:
9574 ;; https://github.com/benoitc/restkit/issues/140
9575 #:tests? #f))
778a284b
CAW
9576 (native-inputs
9577 `(("unzip" ,unzip)
9578 ("python-nose" ,python-nose)
9579 ("python-coverage" ,python-coverage)))
9580 (propagated-inputs
9581 `(("python-six" ,python-six)
9582 ("python-webob" ,python-webob)))
9583 (home-page
9584 "https://github.com/gawel/WSGIProxy2/")
9585 (synopsis "WSGI Proxy with various http client backends")
9586 (description "WSGI turns HTTP requests into WSGI function calls.
9587WSGIProxy turns WSGI function calls into HTTP requests.
9588It also includes code to sign requests and pass private data,
9589and to spawn subprocesses to handle requests.")
f210e944 9590 (license license:expat)))
778a284b
CAW
9591
9592(define-public python2-wsgiproxy2
f210e944 9593 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9594
9595(define-public python-pastedeploy
9596 (package
9597 (name "python-pastedeploy")
9598 (version "1.5.2")
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "PasteDeploy" version))
9603 (sha256
9604 (base32
9605 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9606 (build-system python-build-system)
9607 (native-inputs
9608 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9609 (home-page "http://pythonpaste.org/deploy/")
9610 (synopsis
9611 "Load, configure, and compose WSGI applications and servers")
9612 (description
9613 "This tool provides code to load WSGI applications and servers from URIs;
9614these URIs can refer to Python Eggs for INI-style configuration files. Paste
9615Script provides commands to serve applications based on this configuration
9616file.")
9617 (license license:expat)))
9618
9619(define-public python2-pastedeploy
9620 (package-with-python2 python-pastedeploy))
1cf53652 9621
c4a7904c
CAW
9622(define-public python-paste
9623 (package
9624 (name "python-paste")
ba1731da 9625 (version "2.0.3")
c4a7904c
CAW
9626 (source
9627 (origin
9628 (method url-fetch)
9629 (uri (pypi-uri "Paste" version))
9630 (sha256
9631 (base32
ba1731da 9632 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9633 (patches (search-patches "python-paste-remove-website-test.patch"
9634 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9635 (build-system python-build-system)
9636 (native-inputs
9637 `(("python-nose" ,python-nose)))
9638 (propagated-inputs
f3b98f4f 9639 `(("python-six" ,python-six)))
c4a7904c
CAW
9640 (home-page "http://pythonpaste.org")
9641 (synopsis
9642 "Python web development tools, focusing on WSGI")
9643 (description
9644 "Paste provides a variety of web development tools and middleware which
9645can be nested together to build web applications. Paste's design closely
9646follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9647 (license license:expat)))
c4a7904c
CAW
9648
9649(define-public python2-paste
ba1731da 9650 (package-with-python2 python-paste))
c4a7904c 9651
a8f20f63
CAW
9652(define-public python-pastescript
9653 (package
9654 (name "python-pastescript")
9655 (version "2.0.2")
9656 (source
9657 (origin
9658 (method url-fetch)
9659 (uri (pypi-uri "PasteScript" version))
9660 (sha256
9661 (base32
9662 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9663 (build-system python-build-system)
9664 (native-inputs
9665 `(("python-nose" ,python-nose)))
9666 (propagated-inputs
f3b98f4f 9667 `(("python-paste" ,python-paste)
a8f20f63
CAW
9668 ("python-pastedeploy" ,python-pastedeploy)))
9669 (home-page "http://pythonpaste.org/script/")
9670 (arguments
9671 '(;; Unfortunately, this requires the latest unittest2,
9672 ;; but that requires traceback2 which requires linecache2 which requires
9673 ;; unittest2. So we're skipping tests for now.
9674 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9675 ;; so in theory we could get around this situation somehow.)
9676 #:tests? #f))
9677 (synopsis
9678 "Pluggable command line tool for serving web applications and more")
9679 (description
9680 "PasteScript is a plugin-friendly command line tool which provides a
9681variety of features, from launching web applications to bootstrapping project
9682layouts.")
9683 (license license:expat)))
9684
9685(define-public python2-pastescript
9686 (package-with-python2 python-pastescript))
9687
1cf53652
CAW
9688(define-public python-pyquery
9689 (package
9690 (name "python-pyquery")
ab0c3429 9691 (version "1.2.17")
1cf53652
CAW
9692 (source
9693 (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "pyquery" version))
9696 (sha256
9697 (base32
ab0c3429 9698 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9699 (build-system python-build-system)
2ddbfa8c
LF
9700 (native-inputs
9701 `(("python-webob" ,python-webob)
9702 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9703 (propagated-inputs
9704 `(("python-lxml" ,python-lxml)
9705 ("python-cssselect" ,python-cssselect)))
9706 (home-page "https://github.com/gawel/pyquery")
9707 (synopsis "Make jQuery-like queries on xml documents")
9708 (description "pyquery allows you to make jQuery queries on xml documents.
9709The API is as much as possible the similar to jQuery. pyquery uses lxml for
9710fast xml and html manipulation.")
f210e944 9711 (license license:bsd-3)))
1cf53652
CAW
9712
9713(define-public python2-pyquery
f210e944 9714 (package-with-python2 python-pyquery))
aa6313d6
CAW
9715
9716(define-public python-webtest
9717 (package
9718 (name "python-webtest")
9719 (version "2.0.20")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "WebTest" version))
9724 (sha256
9725 (base32
9726 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9727 (build-system python-build-system)
9728 (arguments
9729 `(;; Unfortunately we have to disable tests!
9730 ;; This release of WebTest is pinned to python-nose < 1.3,
9731 ;; but older versions of python-nose are plagued with the following
9732 ;; bug(s), which rears its ugly head during test execution:
9733 ;; https://github.com/nose-devs/nose/issues/759
9734 ;; https://github.com/nose-devs/nose/pull/811
9735 #:tests? #f))
9736 ;; Commented out code is no good, but in this case, once tests
9737 ;; are ready to be enabled again, we should put the following
9738 ;; in place:
9739 ;; (native-inputs
9740 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9741 ;; ; but see above comment
9742 ;; ("python-coverage" ,python-coverage)
9743 ;; ("python-mock" ,python-mock)
9744 ;; ("python-pastedeploy" ,python-pastedeploy)
9745 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9746 ;; ("python-pyquery" ,python-pyquery)))
9747 (propagated-inputs
9748 `(("python-waitress" ,python-waitress)
9749 ("python-webob" ,python-webob)
9750 ("python-six" ,python-six)
9751 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9752 (home-page "http://webtest.pythonpaste.org/")
9753 (synopsis "Helper to test WSGI applications")
9754 (description "Webtest allows you to test your Python web applications
9755without starting an HTTP server. It supports anything that supports the
9756minimum of WSGI.")
f210e944 9757 (license license:expat)))
aa6313d6
CAW
9758
9759(define-public python2-webtest
f210e944 9760 (package-with-python2 python-webtest))
4cb122cd
CAW
9761
9762(define-public python-anyjson
9763 (package
9764 (name "python-anyjson")
9765 (version "0.3.3")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "anyjson" version))
9770 (sha256
9771 (base32
9772 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9773 (build-system python-build-system)
9774 (arguments
9775 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9776 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9777 ;; whatever) so this transformation needs to be done before the tests
9778 ;; can be run. Maybe we could add a build step to transform beforehand
9779 ;; but it could be annoying/difficult.
9780 ;; We can enable tests for the Python 2 version, though, and do below.
9781 #:tests? #f))
9782 (home-page "http://bitbucket.org/runeh/anyjson/")
9783 (synopsis
9784 "Wraps best available JSON implementation in a common interface")
9785 (description
9786 "Anyjson loads whichever is the fastest JSON module installed
9787and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9788 (license license:bsd-3)
4cb122cd
CAW
9789 (properties `((python2-variant . ,(delay python2-anyjson))))))
9790
9791(define-public python2-anyjson
9792 (let ((anyjson (package-with-python2
9793 (strip-python2-variant python-anyjson))))
9794 (package
9795 (inherit anyjson)
9796 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9797 #:tests? #t
9798 ,@(package-arguments anyjson)))
00e10c6e 9799 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9800
9801(define-public python-amqp
9802 (package
9803 (name "python-amqp")
9804 (version "1.4.9")
9805 (source
9806 (origin
9807 (method url-fetch)
9808 (uri (pypi-uri "amqp" version))
9809 (sha256
9810 (base32
9811 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9812 (build-system python-build-system)
9813 (native-inputs
9814 `(("python-nose" ,python-nose)
9815 ("python-mock" ,python-mock)))
9816 (home-page "http://github.com/celery/py-amqp")
9817 (synopsis
9818 "Low-level AMQP client for Python (fork of amqplib)")
9819 (description
9820 "This is a fork of amqplib which was originally written by Barry Pederson.
9821It is maintained by the Celery project, and used by kombu as a pure python
9822alternative when librabbitmq is not available.")
3f641af0 9823 (license license:lgpl2.1+)
8dfceab7
CAW
9824 (properties `((python2-variant . ,(delay python2-amqp))))))
9825
9826(define-public python2-amqp
9827 (let ((amqp (package-with-python2
9828 (strip-python2-variant python-amqp))))
9829 (package
9830 (inherit amqp)
9831 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9832 ;; unmaintained. Weirdly, does not do this on the python 3
9833 ;; version?
9834 #:tests? #f
00e10c6e 9835 ,@(package-arguments amqp))))))
7d387305
CAW
9836
9837(define-public python-kombu
9838 (package
9839 (name "python-kombu")
0cb59822 9840 (version "3.0.37")
7d387305
CAW
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "kombu" version))
9845 (sha256
9846 (base32
0cb59822 9847 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9848 (build-system python-build-system)
9849 (native-inputs
9850 `(("python-mock" ,python-mock)
9851 ("python-nose" ,python-nose)))
9852 (propagated-inputs
9853 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9854 ("python-amqp" ,python-amqp)
9855 ("python-redis" ,python-redis)))
7d387305
CAW
9856 (home-page "http://kombu.readthedocs.org")
9857 (synopsis "Message passing library for Python")
9858 (description "The aim of Kombu is to make messaging in Python as easy as
9859possible by providing an idiomatic high-level interface for the AMQ protocol,
9860and also provide proven and tested solutions to common messaging problems.
9861AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9862message orientation, queuing, routing, reliability and security, for which the
9863RabbitMQ messaging server is the most popular implementation.")
3f641af0 9864 (license license:bsd-3)
7d387305
CAW
9865 (properties `((python2-variant . ,(delay python2-kombu))))))
9866
9867(define-public python2-kombu
9868 (let ((kombu (package-with-python2
9869 (strip-python2-variant python-kombu))))
9870 (package
9871 (inherit kombu)
752eb9e0
MB
9872 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9873 ;; It works fine on the python3 variant.
9874 #:tests? #f
9875 ,@(package-arguments kombu)))
328bb95d
HG
9876 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9877 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9878
9879(define-public python-billiard
9880 (package
9881 (name "python-billiard")
a6bb9e44 9882 (version "3.3.0.23")
b6f0b9fb
CAW
9883 (source
9884 (origin
9885 (method url-fetch)
9886 (uri (pypi-uri "billiard" version))
9887 (sha256
9888 (base32
a6bb9e44 9889 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9890 (build-system python-build-system)
9891 (native-inputs
9892 `(("python-nose" ,python-nose)))
9893 (home-page "http://github.com/celery/billiard")
9894 (synopsis
9895 "Python multiprocessing fork with improvements and bugfixes")
9896 (description
9897 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9898multiprocessing package itself is a renamed and updated version of R Oudkerk's
9899pyprocessing package. This standalone variant is intended to be compatible with
9900Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9901 (license license:bsd-3)
b6f0b9fb
CAW
9902 (properties `((python2-variant . ,(delay python2-billiard))))))
9903
9904(define-public python2-billiard
9905 (let ((billiard (package-with-python2
9906 (strip-python2-variant python-billiard))))
9907 (package
9908 (inherit billiard)
00e10c6e 9909 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9910 ("python2-mock" ,python2-mock)
9911 ,@(package-native-inputs billiard))))))
22df6419
CAW
9912
9913(define-public python-celery
9914 (package
9915 (name "python-celery")
9ebe87fe 9916 (version "3.1.24")
22df6419
CAW
9917 (source
9918 (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "celery" version))
9921 (sha256
9922 (base32
9ebe87fe 9923 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9924 (build-system python-build-system)
9ebe87fe
LF
9925 (arguments
9926 `(#:phases
9927 (modify-phases %standard-phases
9928 ;; These tests break with Python 3.5:
9929 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9930 (replace 'check
9931 (lambda _
9932 (zero?
9933 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9934 (native-inputs
9935 `(("python-nose" ,python-nose)))
f22efa01 9936 (propagated-inputs
22df6419
CAW
9937 `(("python-pytz" ,python-pytz)
9938 ("python-billiard" ,python-billiard)
9939 ("python-kombu" ,python-kombu)))
9940 (home-page "http://celeryproject.org")
9941 (synopsis "Distributed Task Queue")
9942 (description "Celery is an asynchronous task queue/job queue based on
9943distributed message passing. It is focused on real-time operation, but
9944supports scheduling as well. The execution units, called tasks, are executed
9945concurrently on a single or more worker servers using multiprocessing,
9946Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9947synchronously (wait until ready).")
3f641af0 9948 (license license:bsd-3)
22df6419
CAW
9949 (properties `((python2-variant . ,(delay python2-celery))))))
9950
9951(define-public python2-celery
9952 (let ((celery (package-with-python2
9953 (strip-python2-variant python-celery))))
9954 (package
9955 (inherit celery)
00e10c6e 9956 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9957 ("python2-mock" ,python2-mock)
9958 ,@(package-native-inputs celery))))))
97e32948
CAW
9959
9960(define-public python-translitcodec
9961 (package
9962 (name "python-translitcodec")
9963 (version "0.4.0")
9964 (source
9965 (origin
9966 (method url-fetch)
9967 (uri (pypi-uri "translitcodec" version))
9968 (sha256
9969 (base32
9970 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9971 (build-system python-build-system)
9972 (arguments
9973 `(#:tests? #f)) ; no tests provided
9974 (home-page
9975 "https://github.com/claudep/translitcodec")
9976 (synopsis
9977 "Unicode to 8-bit charset transliteration codec")
9978 (description
9979 "This package contains codecs for transliterating ISO 10646 texts into
9980best-effort representations using smaller coded character sets (ASCII,
9981ISO 8859, etc.).")
f210e944 9982 (license license:expat)))
97e32948
CAW
9983
9984(define-public python2-translitcodec
f210e944 9985 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9986
9987(define-public python-editor
9988 (package
9989 (name "python-editor")
9990 (version "0.5")
9991 (source
9992 (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "python-editor" version))
9995 (sha256
9996 (base32
9997 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9998 (build-system python-build-system)
9999 (home-page
10000 "https://github.com/fmoo/python-editor")
10001 (synopsis
10002 "Programmatically open an editor, capture the result")
10003 (description
10004 "python-editor is a library that provides the editor module for
10005programmatically interfacing with your system's $EDITOR.")
f210e944 10006 (license license:asl2.0)))
0c3b90d4
CAW
10007
10008(define-public python2-editor
f210e944 10009 (package-with-python2 python-editor))
3276517c
LF
10010
10011(define-public python-sphinxcontrib-programoutput
10012 (package
10013 (name "python-sphinxcontrib-programoutput")
10014 (version "0.8")
10015 (source (origin
10016 (method url-fetch)
10017 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10018 (sha256
10019 (base32
10020 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10021 (build-system python-build-system)
e2cb140e
MB
10022 (arguments
10023 ;; FIXME: Many tests are failing and the upstream is gone.
10024 '(#:tests? #f))
3276517c 10025 (propagated-inputs
a0a09859 10026 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10027 (synopsis "Sphinx extension to include program output")
10028 (description "A Sphinx extension to literally insert the output of arbitrary
10029commands into documents, helping you to keep your command examples up to date.")
10030 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10031 (license license:bsd-2)))
3276517c
LF
10032
10033(define-public python2-sphinxcontrib-programoutput
f210e944 10034 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10035
10036(define-public python-sphinx-repoze-autointerface
10037 (package
10038 (name "python-sphinx-repoze-autointerface")
328ae341 10039 (version "0.8")
548d7165
LF
10040 (source (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10043 (sha256
10044 (base32
328ae341 10045 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10046 (build-system python-build-system)
5b3c3d4b 10047 (arguments '(#:tests? #f)) ; No tests.
548d7165 10048 (propagated-inputs
47c7dc4a 10049 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10050 ("python-zope-interface" ,python-zope-interface)))
10051 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10052 (description "This package defines an extension for the Sphinx documentation
10053system. The extension allows generation of API documentation by
10054introspection of @code{zope.interface} instances in code.")
10055 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10056 (license license:repoze)))
548d7165
LF
10057
10058(define-public python2-sphinx-repoze-autointerface
10059 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10060
10061(define-public python-psycopg2
10062 (package
10063 (name "python-psycopg2")
8e718963 10064 (version "2.6.2")
b31fbea5
DM
10065 (source
10066 (origin
10067 (method url-fetch)
10068 (uri (pypi-uri "psycopg2" version))
10069 (sha256
10070 (base32
8e718963 10071 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10072 (build-system python-build-system)
10073 (arguments
10074 ;; Tests would require a postgresql database "psycopg2_test"
10075 ;; and a running postgresql database management service.
10076 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10077 (inputs
10078 `(("postgresql" ,postgresql))) ; libpq
10079 (home-page "http://initd.org/psycopg/")
10080 (synopsis "Python PostgreSQL adapter")
10081 (description
10082 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10083 (license license:lgpl3+)))
b31fbea5
DM
10084
10085(define-public python2-psycopg2
f210e944 10086 (package-with-python2 python-psycopg2))
eed1a61f
LF
10087
10088(define-public python-vobject
10089 (package
10090 (name "python-vobject")
9bed9b15 10091 (version "0.9.2")
eed1a61f
LF
10092 (source (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "vobject" version))
10095 (sha256
10096 (base32
9bed9b15 10097 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 10098 (build-system python-build-system)
a9871b7b
LF
10099 (arguments
10100 '(;; The test suite relies on some non-portable Windows interfaces.
10101 #:tests? #f))
f22efa01 10102 (propagated-inputs
22d7360b 10103 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10104 ("python-pyicu" ,python-pyicu)))
10105 (synopsis "Parse and generate vCard and vCalendar files")
10106 (description "Vobject is intended to be a full featured Python package for
10107parsing and generating vCard and vCalendar files. Currently, iCalendar files
10108are supported and well tested. vCard 3.0 files are supported, and all data
10109should be imported, but only a few components are understood in a sophisticated
10110way.")
10111 (home-page "http://eventable.github.io/vobject/")
f210e944 10112 (license license:asl2.0)))
eed1a61f
LF
10113
10114(define-public python2-vobject
f210e944 10115 (package-with-python2 python-vobject))
cedac813
LF
10116
10117(define-public python-munkres
10118 (package
10119 (name "python-munkres")
38e81a2c 10120 (version "1.0.8")
cedac813
LF
10121 (source (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "munkres" version))
10124 (sha256
10125 (base32
38e81a2c 10126 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10127 (build-system python-build-system)
10128 (arguments
10129 '(#:tests? #f)) ; no test suite
10130 (home-page "http://software.clapper.org/munkres/")
10131 (synopsis "Implementation of the Munkres algorithm")
10132 (description "The Munkres module provides an implementation of the Munkres
10133algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10134useful for solving the Assignment Problem.")
3f641af0 10135 (license license:bsd-3)))
cedac813
LF
10136
10137(define-public python2-munkres
10138 (package-with-python2 python-munkres))
f3b3d78f
LF
10139
10140(define-public python-flask
10141 (package
10142 (name "python-flask")
c6c80104 10143 (version "0.11.1")
f3b3d78f
LF
10144 (source (origin
10145 (method url-fetch)
10146 (uri (pypi-uri "Flask" version))
10147 (sha256
10148 (base32
c6c80104 10149 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10150 (build-system python-build-system)
10151 (propagated-inputs
10152 `(("python-itsdangerous" ,python-itsdangerous)
10153 ("python-jinja2" ,python-jinja2)
8f35c030 10154 ("python-click" ,python-click)
f3b3d78f
LF
10155 ("python-werkzeug" ,python-werkzeug)))
10156 (home-page "https://github.com/mitsuhiko/flask/")
10157 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10158 (description "Flask is a micro web framework based on the Werkzeug toolkit
10159and Jinja2 template engine. It is called a micro framework because it does not
10160presume or force a developer to use a particular tool or library.")
f210e944 10161 (license license:bsd-3)))
f3b3d78f
LF
10162
10163(define-public python2-flask
f210e944 10164 (package-with-python2 python-flask))
603d665b 10165
a7ad802b 10166(define-public python-flask-wtf
10167 (package
10168 (name "python-flask-wtf")
10169 (version "0.13.1")
10170 (source
10171 (origin
10172 (method url-fetch)
10173 (uri (pypi-uri "Flask-WTF" version))
10174 (sha256
10175 (base32
10176 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10177 (build-system python-build-system)
d296d300
MB
10178 (arguments
10179 '(#:phases
10180 (modify-phases %standard-phases
10181 (add-before 'check 'drop-failing-test
10182 (lambda _
10183 ;; FIXME: This file tries resolving an external server, which
10184 ;; fails. Try to patch out the offending section instead of
10185 ;; deleting the whole thing.
10186 (delete-file "tests/test_recaptcha.py")
10187 #t)))))
a7ad802b 10188 (propagated-inputs
10189 `(("python-flask-babel" ,python-flask-babel)
10190 ("python-babel" ,python-babel)
10191 ("python-wtforms" ,python-wtforms)))
10192 (native-inputs
10193 `(("python-nose" ,python-nose)))
10194 (home-page "https://github.com/lepture/flask-wtf")
10195 (synopsis "Simple integration of Flask and WTForms")
10196 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10197upload, and reCAPTCHA.")
10198 (license license:bsd-3)))
10199
10200(define-public python2-flask-wtf
10201 (package-with-python2 python-flask-wtf))
10202
a2c7d88e 10203(define-public python-flask-multistatic
10204 (package
10205 (name "python-flask-multistatic")
10206 (version "1.0")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "flask-multistatic" version))
10211 (sha256
10212 (base32
10213 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10214 (build-system python-build-system)
10215 (propagated-inputs
10216 `(("python-flask" ,python-flask)))
10217 (home-page "https://pagure.io/flask-multistatic")
10218 (synopsis "Flask plugin to allow overriding static files")
10219 (description "@code{flask-multistatic} is a flask plugin that adds support
10220for overriding static files.")
10221 (license license:gpl3+)))
10222
10223(define-public python2-flask-multistatic
10224 (package-with-python2 python-flask-multistatic))
10225
603d665b
LF
10226(define-public python-cookies
10227 (package
10228 (name "python-cookies")
10229 (version "2.2.1")
10230 (source (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "cookies" version))
10233 (sha256
10234 (base32
10235 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10236 (build-system python-build-system)
10237 (arguments
10238 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10239 #:tests? #f))
10240 (native-inputs
10241 `(("python-pytest" ,python2-pytest)))
10242 (synopsis "HTTP cookie parser and renderer")
10243 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10244Python.")
10245 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10246 (license license:expat)))
603d665b
LF
10247
10248(define-public python2-cookies
f210e944 10249 (package-with-python2 python-cookies))
0efde7d6
LF
10250
10251(define-public python-responses
10252 (package
10253 (name "python-responses")
10254 (version "0.5.1")
10255 (source (origin
10256 (method url-fetch)
10257 (uri (pypi-uri "responses" version))
10258 (sha256
10259 (base32
10260 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10261 (build-system python-build-system)
10262 (arguments
10263 `(;; Test suite is not distributed:
10264 ;; https://github.com/getsentry/responses/issues/38
10265 #:tests? #f))
10266 (native-inputs
d8ea5f2f 10267 `(("python-mock" ,python-mock)))
0efde7d6
LF
10268 (propagated-inputs
10269 `(("python-requests" ,python-requests)
d8ea5f2f 10270 ("python-cookies" ,python-cookies)
0efde7d6
LF
10271 ("python-six" ,python-six)))
10272 (home-page "https://github.com/getsentry/responses")
10273 (synopsis "Utility for mocking out the `requests` Python library")
10274 (description "A utility library for mocking out the `requests` Python
10275library.")
f210e944 10276 (license license:asl2.0)))
0efde7d6
LF
10277
10278(define-public python2-responses
f210e944 10279 (package-with-python2 python-responses))
76b94885 10280
b7afd018
RW
10281(define-public python-whoosh
10282 (package
10283 (name "python-whoosh")
10284 (version "2.7.4")
10285 (source
10286 (origin
10287 (method url-fetch)
10288 (uri (pypi-uri "Whoosh" version))
10289 (sha256
10290 (base32
10291 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10292 (build-system python-build-system)
10293 (native-inputs
f3b98f4f 10294 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10295 (home-page "http://bitbucket.org/mchaput/whoosh")
10296 (synopsis "Full text indexing, search, and spell checking library")
10297 (description
10298 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10299checking library.")
10300 (license license:bsd-2)))
10301
10302(define-public python2-whoosh
10303 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10304 (package (inherit whoosh)
10305 (propagated-inputs
10306 `(("python2-backport-ssl-match-hostname"
10307 ,python2-backport-ssl-match-hostname)
10308 ,@(package-propagated-inputs whoosh))))))
10309
76b94885
LF
10310(define-public python-pathlib
10311 (package
10312 (name "python-pathlib")
10313 (version "1.0.1")
10314 (source (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "pathlib" version))
10317 (sha256
10318 (base32
10319 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10320 (build-system python-build-system)
92a312dc
RW
10321 ;; The tests depend on the internal "test" module, which does not provide
10322 ;; a stable interface.
10323 (arguments `(#:tests? #f))
76b94885 10324 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10325 (synopsis "Object-oriented file system paths")
10326 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10327It offers the following advantages over using string objects:
10328
10329@enumerate
10330@item No more cumbersome use of os and os.path functions. Everything can
10331be done easily through operators, attribute accesses, and method calls.
10332@item Embodies the semantics of different path types. For example,
10333comparing Windows paths ignores casing.
10334@item Well-defined semantics, eliminating any inconsistencies or
10335ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10336@end enumerate
10337
10338Note: In Python 3.4, pathlib is now part of the standard library. For other
10339Python versions please consider python-pathlib2 instead, which tracks the
10340standard library module. This module (python-pathlib) isn't maintained
10341anymore.")
76b94885
LF
10342 (license license:expat)))
10343
10344(define-public python2-pathlib
10345 (package-with-python2 python-pathlib))
25a7db0a 10346
b7703c81
HG
10347(define-public python2-pathlib2
10348 (package
10349 (name "python2-pathlib2")
10350 (version "2.1.0")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "pathlib2" version))
10354 (sha256
10355 (base32
10356 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10357 (build-system python-build-system)
49a531f5
HG
10358 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10359 ;; version is 3.4 which already includes this package as part of the
10360 ;; standard library.
b7703c81
HG
10361 (arguments
10362 `(#:python ,python-2))
10363 (native-inputs
f3b98f4f 10364 `(("python2-six" ,python2-six)))
b7703c81
HG
10365 (home-page "http://pypi.python.org/pypi/pathlib2/")
10366 (synopsis "Object-oriented file system paths - backport of standard
10367pathlib module")
10368 (description "The goal of pathlib2 is to provide a backport of standard
10369pathlib module which tracks the standard library module, so all the newest
10370features of the standard pathlib can be used also on older Python versions.
10371
10372Pathlib offers a set of classes to handle file system paths. It offers the
10373following advantages over using string objects:
10374
10375@enumerate
10376@item No more cumbersome use of os and os.path functions. Everything can
10377be done easily through operators, attribute accesses, and method calls.
10378@item Embodies the semantics of different path types. For example,
10379comparing Windows paths ignores casing.
10380@item Well-defined semantics, eliminating any inconsistencies or
10381ambiguities (forward vs. backward slashes, etc.).
10382@end enumerate")
10383 (license license:expat)))
10384
25a7db0a
LF
10385(define-public python-jellyfish
10386 (package
10387 (name "python-jellyfish")
8c4964dd 10388 (version "0.5.6")
25a7db0a
LF
10389 (source (origin
10390 (method url-fetch)
10391 (uri (pypi-uri "jellyfish" version))
10392 (sha256
10393 (base32
8c4964dd 10394 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10395 (build-system python-build-system)
10396 (native-inputs
10397 `(("python-pytest" ,python-pytest)))
10398 (home-page "https://github.com/jamesturk/jellyfish")
10399 (synopsis "Approximate and phonetic matching of strings")
10400 (description "Jellyfish uses a variety of string comparison and phonetic
10401encoding algorithms to do fuzzy string matching.")
3f641af0 10402 (license license:bsd-2)
25a7db0a
LF
10403 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10404
10405(define-public python2-jellyfish
10406 (let ((jellyfish (package-with-python2
10407 (strip-python2-variant python-jellyfish))))
10408 (package (inherit jellyfish)
00e10c6e 10409 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10410 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10411
10412(define-public python2-unicodecsv
10413 (package
10414 (name "python2-unicodecsv")
10415 (version "0.14.1")
10416 (source (origin
10417 (method url-fetch)
10418 ;; The test suite is not included in the PyPi release.
10419 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10420 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10421 "archive/" version ".tar.gz"))
10422 (file-name (string-append name "-" version ".tar.gz"))
10423 (sha256
10424 (base32
10425 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10426 (build-system python-build-system)
10427 (arguments
10428 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10429 #:python ,python-2))
10430 (native-inputs
f3b98f4f 10431 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10432 (home-page "https://github.com/jdunck/python-unicodecsv")
10433 (synopsis "Unicode CSV module for Python 2")
10434 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10435module, adding support for Unicode strings.")
3f641af0 10436 (license license:bsd-2)))
064503aa
LF
10437
10438(define-public python-rarfile
10439 (package
10440 (name "python-rarfile")
67824447 10441 (version "2.8")
064503aa
LF
10442 (source (origin
10443 (method url-fetch)
10444 (uri (pypi-uri "rarfile" version))
10445 (sha256
10446 (base32
67824447 10447 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10448 (build-system python-build-system)
10449 (arguments
10450 '(#:phases
10451 (modify-phases %standard-phases
10452 (replace 'check
10453 ;; Many tests fail, but the installation proceeds.
10454 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10455 (native-inputs
10456 `(("which" ,which))) ; required for tests
10457 (propagated-inputs
10458 `(("libarchive" ,libarchive)))
10459 (home-page "https://github.com/markokr/rarfile")
10460 (synopsis "RAR archive reader for Python")
10461 (description "This is Python module for RAR archive reading. The interface
10462is made as zipfile like as possible.")
3f641af0 10463 (license license:isc)))
064503aa
LF
10464
10465(define-public python2-rarfile
10466 (package-with-python2 python-rarfile))
daeeea71
CM
10467
10468(define-public python-magic
10469 (package
10470 (name "python-magic")
10471 (version "0.4.3")
10472 (source
10473 (origin
10474 (method url-fetch)
10475 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10476 version ".tar.gz"))
10477 (sha256
10478 (base32
10479 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10480 (file-name (string-append name "-" version "-checkout"))))
10481 (build-system python-build-system)
10482 (arguments
10483 ;; The tests are unreliable, so don't run them. The tests fail
10484 ;; under Python3 because they were written for Python2 and
10485 ;; contain import statements that do not work in Python3. One of
10486 ;; the tests fails under Python2 because its assertions are
10487 ;; overly stringent; it relies on comparing output strings which
10488 ;; are brittle and can change depending on the version of
10489 ;; libmagic being used and the system on which the test is
10490 ;; running. In my case, under GuixSD 0.10.0, only one test
10491 ;; failed, and it seems to have failed only because the version
10492 ;; of libmagic that is packaged in Guix outputs a slightly
10493 ;; different (but not wrong) string than the one that the test
10494 ;; expected.
10495 '(#:tests? #f
10496 #:phases (modify-phases %standard-phases
10497 ;; Replace a specific method call with a hard-coded
10498 ;; path to the necessary libmagic.so file in the
10499 ;; store. If we don't do this, then the method call
10500 ;; will fail to find the libmagic.so file, which in
10501 ;; turn will cause any application using
10502 ;; python-magic to fail.
10503 (add-before 'build 'hard-code-path-to-libmagic
10504 (lambda* (#:key inputs #:allow-other-keys)
10505 (let ((file (assoc-ref inputs "file")))
10506 (substitute* "magic.py"
10507 (("ctypes.util.find_library\\('magic'\\)")
10508 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10509 #t)))
10510 (add-before 'install 'disable-egg-compression
10511 (lambda _
10512 (let ((port (open-file "setup.cfg" "a")))
10513 (display "\n[easy_install]\nzip_ok = 0\n"
10514 port)
10515 (close-port port)
10516 #t))))))
daeeea71
CM
10517 (inputs
10518 ;; python-magic needs to be able to find libmagic.so.
10519 `(("file" ,file)))
10520 (home-page "https://github.com/ahupp/python-magic")
10521 (synopsis "File type identification using libmagic")
10522 (description
10523 "This module uses ctypes to access the libmagic file type
10524identification library. It makes use of the local magic database and
10525supports both textual and MIME-type output. Note that this module and
10526the python-file module both provide a \"magic.py\" file; these two
10527modules, which are different and were developed separately, both serve
10528the same purpose: to provide Python bindings for libmagic.")
10529 (license license:expat)))
10530
10531(define-public python2-magic
10532 (package-with-python2 python-magic))
12af303f
CM
10533
10534(define-public python2-s3cmd
10535 (package
10536 (name "python2-s3cmd")
10537 (version "1.6.1")
10538 (source
10539 (origin
10540 (method url-fetch)
de67e922 10541 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10542 "s3cmd-" version ".tar.gz"))
10543 (sha256
10544 (base32
10545 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10546 (build-system python-build-system)
10547 (arguments
10548 ;; s3cmd is written for python2 only and contains no tests.
10549 `(#:python ,python-2
10550 #:tests? #f))
f22efa01 10551 (propagated-inputs
12af303f
CM
10552 `(("python2-dateutil" ,python2-dateutil)
10553 ;; The python-file package also provides a magic.py module.
10554 ;; This is an unfortunate state of affairs; however, s3cmd
10555 ;; fails to install if it cannot find specifically the
10556 ;; python-magic package. Thus we include it, instead of using
10557 ;; python-file. Ironically, s3cmd sometimes works better
10558 ;; without libmagic bindings at all:
10559 ;; https://github.com/s3tools/s3cmd/issues/198
10560 ("python2-magic" ,python2-magic)))
10561 (home-page "http://s3tools.org/s3cmd")
10562 (synopsis "Command line tool for S3-compatible storage services")
10563 (description
10564 "S3cmd is a command line tool for uploading, retrieving and managing data
10565in storage services that are compatible with the Amazon Simple Storage
10566Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10567GnuPG encryption, and more. It also supports management of Amazon's
10568CloudFront content delivery network.")
3f641af0 10569 (license license:gpl2+)))
4323a5f0
AE
10570
10571(define-public python-pkgconfig
10572 (package
10573 (name "python-pkgconfig")
10574 (version "1.1.0")
10575 (source
10576 (origin
10577 (method url-fetch)
10578 (uri (pypi-uri "pkgconfig" version))
10579 (sha256
10580 (base32
10581 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10582 (build-system python-build-system)
10583 (native-inputs
f3b98f4f 10584 `(("python-nose" ,python-nose)))
4323a5f0
AE
10585 (inputs
10586 `(("pkg-config" ,pkg-config)))
10587 (arguments
10588 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10589 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10590 #:tests? #f
4323a5f0
AE
10591 ;; Hard-code the path to pkg-config.
10592 #:phases
10593 (modify-phases %standard-phases
10594 (add-before
10595 'build 'patch
10596 (lambda _
10597 (substitute* "pkgconfig/pkgconfig.py"
10598 (("cmd = 'pkg-config")
10599 (string-append "cmd = '" (which "pkg-config"))))
10600 #t)))))
10601 (home-page "http://github.com/matze/pkgconfig")
10602 (synopsis "Python interface for pkg-config")
10603 (description "This module provides a Python interface to pkg-config. It
10604can be used to find all pkg-config packages, check if a package exists,
10605check if a package meets certain version requirements, query CFLAGS and
10606LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10607 (license license:expat)))
4323a5f0
AE
10608
10609(define-public python2-pkgconfig
10610 (package-with-python2 python-pkgconfig))
10611
2e697322
BW
10612(define-public python-bz2file
10613 (package
10614 (name "python-bz2file")
10615 (version "0.98")
10616 (source
10617 (origin
10618 (method url-fetch)
10619 (uri (pypi-uri "bz2file" version))
10620 (sha256
10621 (base32
10622 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10623 (build-system python-build-system)
10624 (arguments
124df723 10625 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10626 (home-page "https://github.com/nvawda/bz2file")
10627 (synopsis "Read and write bzip2-compressed files")
10628 (description
10629 "Bz2file is a Python library for reading and writing bzip2-compressed
10630files. It contains a drop-in replacement for the I/O interface in the
10631standard library's @code{bz2} module, including features from the latest
10632development version of CPython that are not available in older releases.")
3f641af0 10633 (license license:asl2.0)
2e697322
BW
10634 (properties `((python2-variant . ,(delay python2-bz2file))))))
10635
10636(define-public python2-bz2file
10637 (let ((base (package-with-python2
10638 (strip-python2-variant python-bz2file))))
10639 (package
10640 (inherit base)
124df723 10641 (arguments
752bb447
BW
10642 `(#:python ,python-2
10643 #:phases
124df723
BW
10644 (modify-phases %standard-phases
10645 ;; 'python setup.py test' does not work as of 0.98.
10646 ;; There is only the one test file, so we run it directly.
10647 (replace 'check
10648 (lambda _ (zero? (system* "python"
10649 "test_bz2file.py"))))))))))
2e697322 10650
da4ac1aa
BW
10651(define-public python-future
10652 (package
10653 (name "python-future")
10654 (version "0.15.2")
10655 (source
10656 (origin
10657 (method url-fetch)
10658 (uri (pypi-uri "future" version))
10659 (sha256
10660 (base32
10661 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10662 (build-system python-build-system)
10663 ;; Many tests connect to the network or are otherwise flawed.
10664 ;; https://github.com/PythonCharmers/python-future/issues/210
10665 (arguments
10666 `(#:tests? #f))
10667 (home-page "http://python-future.org")
10668 (synopsis "Single-source support for Python 3 and 2")
10669 (description
10670 "@code{python-future} is the missing compatibility layer between Python 2 and
10671Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10672to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10673 (license license:expat)))
da4ac1aa
BW
10674
10675(define-public python2-future
f210e944 10676 (package-with-python2 python-future))
da4ac1aa 10677
8e451885
AE
10678(define-public python-cysignals
10679 (package
10680 (name "python-cysignals")
10681 (version "1.1.0")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10686 (sha256
10687 (base32
10688 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10689 (build-system python-build-system)
10690 (native-inputs
10691 `(("python-cython" ,python-cython)
8e451885
AE
10692 ("python-sphinx" ,python-sphinx)))
10693 (inputs
10694 `(("pari-gp" ,pari-gp)))
10695 (arguments
10696 `(#:modules ((guix build python-build-system)
10697 ((guix build gnu-build-system) #:prefix gnu:)
10698 (guix build utils))
10699 ;; FIXME: Tests are executed after installation and currently fail
10700 ;; when not installing into standard locations; the author is working
10701 ;; on a fix.
10702 #:tests? #f
10703 #:phases
10704 (modify-phases %standard-phases
10705 (add-before
10706 'build 'configure
10707 (assoc-ref gnu:%standard-phases 'configure)))))
10708 (home-page
10709 "https://github.com/sagemath/cysignals")
10710 (synopsis
10711 "Handling of interrupts and signals for Cython")
10712 (description
10713 "The cysignals package provides mechanisms to handle interrupts (and
10714other signals and errors) in Cython code, using two related approaches,
10715for mixed Cython/Python code or external C libraries and pure Cython code,
10716respectively.")
3f641af0 10717 (license license:lgpl3+)))
8e451885
AE
10718
10719(define-public python2-cysignals
10720 (package-with-python2 python-cysignals))
10721
63bcec71
DM
10722(define-public python2-shedskin
10723 (package
10724 (name "python2-shedskin")
10725 (version "0.9.4")
10726 (source
10727 (origin
10728 (method url-fetch)
10729 (uri (string-append "https://github.com/shedskin/shedskin/"
10730 "releases/download/v" version
10731 "/shedskin-" version ".tgz"))
10732 (sha256
10733 (base32
10734 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10735 (build-system python-build-system)
10736 (arguments
10737 `(#:python ,python-2
10738 #:phases (modify-phases %standard-phases
10739 (add-after 'unpack 'fix-resulting-include-libs
10740 (lambda* (#:key inputs #:allow-other-keys)
10741 (let ((libgc (assoc-ref inputs "libgc"))
10742 (pcre (assoc-ref inputs "pcre")))
10743 (substitute* "shedskin/makefile.py"
10744 (("variable == 'CCFLAGS':[ ]*")
10745 (string-append "variable == 'CCFLAGS':\n"
10746 " line += ' -I " pcre "/include"
10747 " -I " libgc "/include'"))
10748 (("variable == 'LFLAGS':[ ]*")
10749 (string-append "variable == 'LFLAGS':\n"
10750 " line += ' -L" pcre "/lib"
10751 " -L " libgc "/lib'")))
10752 #t))))))
63bcec71
DM
10753 (inputs `(("pcre" ,pcre)
10754 ("libgc" ,libgc)))
10755 (home-page "https://shedskin.github.io/")
10756 (synopsis "Experimental Python-2 to C++ Compiler")
10757 (description (string-append "This is an experimental compiler for a subset of
10758Python. It generates C++ code and a Makefile."))
3f641af0 10759 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10760
10761(define-public python2-rope
10762 (package
10763 (name "python2-rope")
10764 (version "0.10.3")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "rope" version))
10769 (sha256
10770 (base32
10771 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10772 (arguments
10773 ;; Rope is currently python-2 only.
10774 ;; https://github.com/python-rope/rope/issues/57
10775 `(#:python ,python-2))
10776 (build-system python-build-system)
10777 (native-inputs
f3b98f4f 10778 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10779 (home-page "https://github.com/python-rope/rope")
10780 (synopsis "Refactoring library for Python")
10781 (description "Rope is a refactoring library for Python. It facilitates
10782the renaming, moving and extracting of attributes, functions, modules, fields
10783and parameters in Python 2 source code. These refactorings can also be applied
10784to occurences in strings and comments.")
3f641af0 10785 (license license:gpl2)))
6ba8ca17
10786
10787(define-public python-py3status
10788 (package
10789 (name "python-py3status")
d2262d70 10790 (version "3.1")
6ba8ca17
10791 (source
10792 (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "py3status" version))
10795 (sha256
10796 (base32
d2262d70 10797 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10798 (build-system python-build-system)
8653c1d5
MB
10799 (arguments
10800 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10801 (home-page "https://github.com/ultrabug/py3status")
10802 (synopsis "Extensible i3status wrapper written in Python")
10803 (description "py3status is an i3status wrapper which extends i3status
10804functionality in a modular way, allowing you to extend your panel with your
10805own code, responding to click events and updating clock every second.")
3f641af0 10806 (license license:bsd-3)))
b8fdbca3
HG
10807
10808(define-public python-tblib
10809 (package
10810 (name "python-tblib")
10811 (version "1.3.0")
10812 (source (origin
10813 (method url-fetch)
10814 (uri (pypi-uri "tblib" version))
10815 (sha256 (base32
10816 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10817 (build-system python-build-system)
10818 (arguments
10819 `(#:phases
10820 (modify-phases %standard-phases
10821 (replace 'check
10822 (lambda _
10823 ;; Upstream runs tests after installation and the package itself
10824 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10825 ;; found.
10826 (setenv "PYTHONPATH"
10827 (string-append (getcwd) "/build/lib:"
10828 (getenv "PYTHONPATH")))
10829 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10830 (native-inputs
10831 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10832 ("python-six" ,python-six)))
10833 (home-page "https://github.com/ionelmc/python-tblib")
10834 (synopsis "Traceback serialization library")
10835 (description
10836 "Traceback serialization allows you to:
10837
10838@enumerate
10839@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10840different processes. This allows better error handling when running code over
10841multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10842
10843@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10844@end enumerate\n")
3f641af0 10845 (license license:bsd-3)))
b8fdbca3
HG
10846
10847(define-public python2-tblib
10848 (package-with-python2 python-tblib))
1a024de4
HG
10849
10850(define-public python-sqlparse
10851 (package
10852 (name "python-sqlparse")
10853 (version "0.1.19")
10854 (source (origin
10855 (method url-fetch)
10856 (uri (pypi-uri "sqlparse" version))
10857 (sha256
10858 (base32
10859 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10860 (build-system python-build-system)
10861 (arguments
10862 `(#:phases
10863 (modify-phases %standard-phases
10864 (replace 'check
10865 (lambda* _
10866 ;; setup.py-integrated 2to3 only affects the build files, but
10867 ;; py.test is using the source files. So we need to convert them
10868 ;; manually.
10869 (when (zero? (system* "python3"))
10870 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10871 (zero? (system* "py.test")))))))
10872 (native-inputs
f3b98f4f 10873 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10874 (home-page "https://github.com/andialbrecht/sqlparse")
10875 (synopsis "Non-validating SQL parser")
10876 (description "Sqlparse is a non-validating SQL parser for Python. It
10877provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10878 (license license:bsd-3)))
1a024de4
HG
10879
10880(define-public python2-sqlparse
10881 (package-with-python2 python-sqlparse))
68b9d242
SB
10882
10883(define-public python-greenlet
10884 (package
10885 (name "python-greenlet")
1f89fb16 10886 (version "0.4.11")
68b9d242
SB
10887 (source (origin
10888 (method url-fetch)
10889 (uri (pypi-uri "greenlet" version))
10890 (sha256
10891 (base32
1f89fb16 10892 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10893 (build-system python-build-system)
68b9d242
SB
10894 (home-page "https://greenlet.readthedocs.io/")
10895 (synopsis "Lightweight in-process concurrent programming")
10896 (description
10897 "Greenlet package is a spin-off of Stackless, a version of CPython
10898that supports micro-threads called \"tasklets\". Tasklets run
10899pseudo-concurrently (typically in a single or a few OS-level threads) and
10900are synchronized with data exchanges on \"channels\".")
3f641af0 10901 (license (list license:psfl license:expat))))
68b9d242
SB
10902
10903(define-public python2-greenlet
10904 (package-with-python2 python-greenlet))
d79a343b
SB
10905
10906(define-public python-gevent
10907 (package
10908 (name "python-gevent")
10909 (version "1.1.1")
10910 (source (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "gevent" version))
10913 (sha256
10914 (base32
10915 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10916 (modules '((guix build utils)))
10917 (snippet
10918 '(begin
10919 ;; unbunding libev and c-ares
10920 (for-each delete-file-recursively '("libev" "c-ares"))
10921 ;; fixing testsuite
10922 (call-with-output-file "greentest/__init__.py" noop)
10923 (substitute* "greentest/testrunner.py"
10924 (("import util") "from . import util")
10925 (("from util import log") "from .util import log"))))))
10926 (build-system python-build-system)
10927 (propagated-inputs
10928 `(("python-greenlet" ,python-greenlet)))
10929 (native-inputs
f3b98f4f 10930 `(("python-six" ,python-six)))
d79a343b
SB
10931 (inputs
10932 `(("c-ares" ,c-ares)
10933 ("libev" ,libev)))
10934 (home-page "http://www.gevent.org/")
10935 (synopsis "Coroutine-based network library")
10936 (description
10937 "gevent is a coroutine-based Python networking library that uses greenlet
10938to provide a high-level synchronous API on top of the libev event loop.")
10939 (license license:expat)))
10940
10941(define-public python2-gevent
10942 (package-with-python2 python-gevent))
da3aeeb6 10943
c9a18125
MB
10944(define-public python-geventhttpclient
10945 (package
10946 (name "python-geventhttpclient")
10947 (version "1.3.1")
10948 (source (origin
10949 (method url-fetch)
10950 (uri (pypi-uri "geventhttpclient" version))
10951 (sha256
10952 (base32
10953 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10954 (modules '((guix build utils)))
10955 (snippet
10956 '(begin
10957 ;; Delete pre-compiled files.
10958 (for-each delete-file (find-files "src/geventhttpclient"
10959 ".*\\.pyc"))
10960 #t))))
10961 (build-system python-build-system)
10962 (arguments
10963 '(#:phases
10964 (modify-phases %standard-phases
10965 (add-after 'unpack 'delete-network-tests
10966 (lambda _
10967 (delete-file "src/geventhttpclient/tests/test_client.py")
10968 #t))
10969 (delete 'check)
10970 (add-after 'install 'check
10971 (lambda* (#:key inputs outputs #:allow-other-keys)
10972 (add-installed-pythonpath inputs outputs)
10973 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10974 (native-inputs
10975 `(("python-pytest" ,python-pytest)))
10976 (propagated-inputs
10977 `(("python-certifi" ,python-certifi)
10978 ("python-gevent" ,python-gevent)
10979 ("python-six" ,python-six)))
10980 (home-page "https://github.com/gwik/geventhttpclient")
10981 (synopsis "HTTP client library for gevent")
10982 (description "@code{python-geventhttpclient} is a high performance,
10983concurrent HTTP client library for python using @code{gevent}.")
10984 (license license:expat)))
10985
10986(define-public python2-geventhttpclient
10987 (package-with-python2 python-geventhttpclient))
10988
b585e361
DM
10989(define-public python-fastimport
10990 (package
10991 (name "python-fastimport")
10992 (version "0.9.6")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "fastimport" version))
10997 (sha256
10998 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10999 (build-system python-build-system)
11000 (home-page "https://github.com/jelmer/python-fastimport")
11001 (synopsis "VCS fastimport parser and generator in Python")
11002 (description "This package provides a parser for and generator of the Git
11003@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11004format.")
11005 (license license:gpl2+)))
11006
11007(define-public python2-fastimport
11008 (package-with-python2 python-fastimport))
11009
da3aeeb6
SB
11010(define-public python-twisted
11011 (package
11012 (name "python-twisted")
11013 (version "16.2.0")
11014 (source (origin
11015 (method url-fetch)
8ea8e8d3 11016 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11017 (sha256
11018 (base32
11019 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11020 (build-system python-build-system)
a960e73f
MB
11021 (arguments
11022 '(#:tests? #f)) ; FIXME: Some tests are failing.
11023 ;; #:phases
11024 ;; (modify-phases %standard-phases
11025 ;; (replace 'check
11026 ;; (lambda _
11027 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11028 (propagated-inputs
11029 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11030 (home-page "https://twistedmatrix.com/")
11031 (synopsis "Asynchronous networking framework written in Python")
11032 (description
11033 "Twisted is an extensible framework for Python programming, with special
11034focus on event-based network programming and multiprotocol integration.")
11035 (license license:expat)))
11036
11037(define-public python2-twisted
11038 (package-with-python2 python-twisted))
d0b6fed6 11039
4d3fa5a4
EF
11040(define-public python-pika
11041 (package
11042 (name "python-pika")
11043 (version "0.10.0")
11044 (source
11045 (origin
11046 (method url-fetch)
11047 (uri (pypi-uri "pika" version))
11048 (sha256
11049 (base32
11050 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11051 (build-system python-build-system)
11052 (native-inputs
269d9172
LF
11053 `(("python-pyev" ,python-pyev)
11054 ("python-tornado" ,python-tornado)
11055 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11056 (home-page "https://pika.readthedocs.org")
11057 (synopsis "Pure Python AMQP Client Library")
11058 (description
11059 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11060Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11061network support library.")
11062 (license license:bsd-3)))
11063
11064(define-public python2-pika
11065 (package-with-python2 python-pika))
11066
d0b6fed6
DM
11067(define-public python-ply
11068 (package
11069 (name "python-ply")
234ade2d 11070 (version "3.9")
d0b6fed6
DM
11071 (source
11072 (origin
11073 (method url-fetch)
234ade2d 11074 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11075 (sha256
11076 (base32
234ade2d 11077 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11078 (build-system python-build-system)
11079 (home-page "http://www.dabeaz.com/ply/")
11080 (synopsis "Python Lex & Yacc")
11081 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11082It uses LR parsing and does extensive error checking.")
f210e944 11083 (license license:bsd-3)))
d0b6fed6
DM
11084
11085(define-public python2-ply
f210e944 11086 (package-with-python2 python-ply))
d951bd54
SB
11087
11088(define-public python-tabulate
11089 (package
11090 (name "python-tabulate")
e6ace98d 11091 (version "0.7.7")
d951bd54
SB
11092 (source (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "tabulate" version))
11095 (sha256
11096 (base32
fe2ba3a8 11097 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11098 (build-system python-build-system)
fe2ba3a8
MB
11099 (arguments
11100 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11101 ;; and the latest release is not tagged in the upstream repository.
11102 '(#:tests? #f))
d951bd54
SB
11103 (home-page "https://bitbucket.org/astanin/python-tabulate")
11104 (synopsis "Pretty-print tabular data")
11105 (description
11106 "Tabulate is a library and command-line utility to pretty-print tabular
11107data in Python.")
11108 (license license:expat)))
11109
11110(define-public python2-tabulate
11111 (package-with-python2 python-tabulate))
1c4c8a33
SB
11112
11113(define-public python-kazoo
11114 (package
11115 (name "python-kazoo")
11116 (version "2.2.1")
11117 (source
11118 (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "kazoo" version))
11121 (sha256
11122 (base32
11123 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11124 (build-system python-build-system)
11125 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11126 (propagated-inputs
11127 `(("python-six" ,python-six)))
1c4c8a33
SB
11128 (home-page "https://kazoo.readthedocs.org")
11129 (synopsis "High-level Zookeeper client library")
11130 (description
11131 "Kazoo is a Python client library for the Apache Zookeeper distributed
11132application service. It is designed to be easy to use and to avoid common
11133programming errors.")
3f641af0 11134 (license license:asl2.0)))
1c4c8a33
SB
11135
11136(define-public python2-kazoo
11137 (package-with-python2 python-kazoo))
45dda35e
SB
11138
11139(define-public python-pykafka
11140 (package
11141 (name "python-pykafka")
11142 (version "2.4.0")
11143 (source (origin
11144 (method url-fetch)
c6bccf71
EF
11145 (uri (string-append
11146 "https://pypi.python.org/packages/8b/3e/"
11147 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11148 "pykafka-" version ".tar.gz"))
45dda35e
SB
11149 (sha256
11150 (base32
11151 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11152 (build-system python-build-system)
11153 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11154 (propagated-inputs
45dda35e
SB
11155 `(("python-gevent" ,python-gevent)
11156 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11157 ("python-tabulate" ,python-tabulate)))
11158 (inputs
11159 `(("librdkafka" ,librdkafka)))
11160 (home-page "https://pykafka.readthedocs.io/")
11161 (synopsis "Apache Kafka client for Python")
11162 (description
11163 "PyKafka is a client for the Apache Kafka distributed messaging system.
11164It includes Python implementations of Kafka producers and consumers, which
11165are optionally backed by a C extension built on librdkafka.")
3f641af0 11166 (license license:asl2.0)))
45dda35e
SB
11167
11168(define-public python2-pykafka
11169 (package-with-python2 python-pykafka))
a44fd439
DM
11170
11171(define-public python-wcwidth
11172 (package
11173 (name "python-wcwidth")
9e59478f 11174 (version "0.1.7")
a44fd439
DM
11175 (source
11176 (origin
11177 (method url-fetch)
9e59478f 11178 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11179 (sha256
11180 (base32
9e59478f 11181 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11182 (build-system python-build-system)
11183 (home-page "https://github.com/jquast/wcwidth")
66e07664 11184 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11185 (description "Wcwidth measures the number of terminal column cells of
11186wide-character codes. It is useful for those implementing a terminal emulator,
11187or programs that carefully produce output to be interpreted by one. It is a
11188Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11189specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11190 (license license:expat)))
a44fd439
DM
11191
11192(define-public python2-wcwidth
f210e944 11193 (package-with-python2 python-wcwidth))
0de78c95
DP
11194
11195(define-public python2-jsonrpclib
11196 (package
11197 (name "python2-jsonrpclib")
11198 (version "0.1.7")
11199 (source (origin
11200 (method url-fetch)
11201 (uri (string-append
11202 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11203 "jsonrpclib-" version ".tar.gz"))
11204 (sha256
11205 (base32
11206 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11207 (build-system python-build-system)
0de78c95
DP
11208 (arguments
11209 `(#:tests? #f
11210 #:python ,python-2))
11211 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11212 (synopsis "Implementation of JSON-RPC specification for Python")
11213 (description
11214 "This library is an implementation of the JSON-RPC specification.
11215It supports both the original 1.0 specification, as well as the
11216new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11217etc.")
3f641af0 11218 (license license:asl2.0)))
9250b0f3
SB
11219
11220(define-public python-chai
11221 (package
11222 (name "python-chai")
11223 (version "1.1.1")
11224 (source (origin
11225 (method url-fetch)
11226 (uri (pypi-uri "chai" version))
11227 (sha256
11228 (base32
11229 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11230 (build-system python-build-system)
9250b0f3
SB
11231 (home-page "https://github.com/agoragames/chai")
11232 (synopsis "Mocking framework for Python")
11233 (description
11234 "Chai provides an api for mocking, stubbing and spying your python
11235objects, patterned after the Mocha library for Ruby.")
3f641af0 11236 (license license:bsd-3)))
9250b0f3
SB
11237
11238(define-public python2-chai
11239 (package-with-python2 python-chai))
11240
ae43baa8
SB
11241(define-public python-arrow
11242 (package
11243 (name "python-arrow")
11244 (version "0.8.0")
11245 (source (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "arrow" version))
11248 (sha256
11249 (base32
11250 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11251 (build-system python-build-system)
11252 (native-inputs
f3b98f4f 11253 `(;; For testing
ae43baa8
SB
11254 ("python-chai" ,python-chai)
11255 ("python-simplejson" ,python-simplejson)))
36aed736 11256 (propagated-inputs
22d7360b 11257 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11258 (home-page "https://github.com/crsmithdev/arrow/")
11259 (synopsis "Dates and times for Python")
11260 (description
11261 "Arrow is a Python library to creating, manipulating, formatting and
11262converting dates, times, and timestamps. It implements and updates the
11263datetime type.")
3f641af0 11264 (license license:asl2.0)))
ae43baa8
SB
11265
11266(define-public python2-arrow
11267 (package-with-python2 python-arrow))
11268
1f2b62a4
SB
11269(define-public python-inflection
11270 (package
11271 (name "python-inflection")
11272 (version "0.3.1")
11273 (source
11274 (origin (method url-fetch)
11275 (uri (pypi-uri "inflection" version))
11276 (sha256
11277 (base32
11278 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11279 (build-system python-build-system)
e9127525
MB
11280 (native-inputs
11281 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
11282 (home-page "http://github.com/jpvanhal/inflection")
11283 (synopsis "Python string transformation library")
11284 (description
11285 "Inflection is a string transformation library. It singularizes
11286and pluralizes English words, and transforms strings from CamelCase to
11287underscored string.")
11288 (license license:expat)))
11289
11290(define-public python2-inflection
11291 (package-with-python2 python-inflection))
11292
18995566
SB
11293(define-public python-pylev
11294 (package
11295 (name "python-pylev")
11296 (version "1.3.0")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "pylev" version))
11300 (sha256
11301 (base32
11302 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11303 (build-system python-build-system)
18995566
SB
11304 (home-page "http://github.com/toastdriven/pylev")
11305 (synopsis "Levenshtein distance implementation in Python")
11306 (description "Pure Python Levenshtein implementation, based off the
11307Wikipedia code samples at
11308@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11309 (license license:bsd-3)))
18995566
SB
11310
11311(define-public python2-pylev
11312 (package-with-python2 python-pylev))
11313
f5deff7a
SB
11314(define-public python-cleo
11315 (package
11316 (name "python-cleo")
11317 (version "0.4.1")
11318 (source (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "cleo" version))
11321 (sha256
11322 (base32
11323 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11324 (build-system python-build-system)
11325 (native-inputs
f3b98f4f 11326 `(;; For testing
f5deff7a
SB
11327 ("python-mock" ,python-mock)
11328 ("python-pytest" ,python-pytest)))
9403150a
SB
11329 (propagated-inputs
11330 `(("python-psutil" ,python-psutil)
11331 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11332 (home-page "https://github.com/sdispater/cleo")
11333 (synopsis "Command-line arguments library for Python")
11334 (description
11335 "Cleo allows you to create command-line commands with signature in
11336docstring and colored output.")
11337 (license license:expat)))
11338
11339(define-public python2-cleo
11340 (package-with-python2 python-cleo))
11341
77cadb43
SB
11342(define-public python-lazy-object-proxy
11343 (package
11344 (name "python-lazy-object-proxy")
11345 (version "1.2.2")
11346 (source (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "lazy-object-proxy" version))
11349 (sha256
11350 (base32
11351 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11352 (build-system python-build-system)
77cadb43
SB
11353 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11354 (synopsis "Lazy object proxy for python")
11355 (description
11356 "Lazy object proxy is an object that wraps a callable but defers the call
11357until the object is actually required, and caches the result of said call.")
3f641af0 11358 (license license:bsd-2)))
77cadb43
SB
11359
11360(define-public python2-lazy-object-proxy
11361 (package-with-python2 python-lazy-object-proxy))
11362
5477e05f
SB
11363(define-public python-dnspython
11364 (package
11365 (name "python-dnspython")
6c514128 11366 (version "1.15.0")
5477e05f
SB
11367 (source (origin
11368 (method url-fetch)
11369 (uri (string-append "http://www.dnspython.org/kits/"
11370 version "/dnspython-" version ".tar.gz"))
11371 (sha256
11372 (base32
6c514128 11373 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11374 (build-system python-build-system)
11375 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11376 (home-page "http://www.dnspython.org")
11377 (synopsis "DNS toolkit for Python")
11378 (description
11379 "dnspython is a DNS toolkit for Python. It supports almost all record
11380types. It can be used for queries, zone transfers, and dynamic updates.
11381It supports TSIG authenticated messages and EDNS0.")
11382 (license license:expat)))
11383
11384(define-public python2-dnspython
11385 (package-with-python2 python-dnspython))
11386
22711e25
SB
11387(define-public python-email-validator
11388 (package
11389 (name "python-email-validator")
b165c215 11390 (version "1.0.2")
22711e25
SB
11391 (source
11392 (origin (method url-fetch)
11393 (uri (pypi-uri "email_validator" version))
11394 (sha256
11395 (base32
b165c215 11396 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11397 (build-system python-build-system)
11398 (arguments
11399 '(#:phases
11400 (modify-phases %standard-phases
11401 (add-before 'build 'use-dnspython
11402 (lambda _
11403 (substitute* "setup.py"
11404 (("dnspython3") "dnspython"))
11405 #t)))))
d42560bd 11406 (propagated-inputs
22711e25 11407 `(("python-dnspython" ,python-dnspython)
d42560bd 11408 ("python-idna" ,python-idna)))
22711e25
SB
11409 (home-page "https://github.com/JoshData/python-email-validator")
11410 (synopsis "Email address validation library for Python")
11411 (description
11412 "This library validates email address syntax and deliverability.")
3f641af0 11413 (license license:cc0)))
22711e25
SB
11414
11415(define-public python2-email-validator
11416 (package-with-python2 python-email-validator))
11417
8987d91e
SB
11418(define-public python-ukpostcodeparser
11419 (package
11420 (name "python-ukpostcodeparser")
11421 (version "1.0.3")
11422 (source (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "UkPostcodeParser" version))
11425 (sha256
11426 (base32
11427 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11428 (build-system python-build-system)
8987d91e
SB
11429 (home-page "https://github.com/hamstah/ukpostcodeparser")
11430 (synopsis "UK Postcode parser for Python")
11431 (description
11432 "This library provides the @code{parse_uk_postcode} function for
11433parsing UK postcodes.")
11434 (license license:expat)))
11435
11436(define-public python2-ukpostcodeparser
11437 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11438
ce7911dd
MB
11439(define-public python-faker
11440 (package
11441 (name "python-faker")
11442 (version "0.7.9")
11443 (source (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "Faker" version))
11446 (sha256
11447 (base32
11448 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11449 (patches
11450 (search-patches "python-faker-fix-build-32bit.patch"))
11451 (modules '((guix build utils)))
11452 (snippet
11453 '(begin
11454 (for-each delete-file (find-files "." "\\.pyc$"))
11455 #t))))
11456 (build-system python-build-system)
11457 (arguments
11458 '(#:phases
11459 (modify-phases %standard-phases
11460 (replace 'check
11461 (lambda _
11462 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11463 (native-inputs
11464 `(;; For testing
11465 ("python-email-validator" ,python-email-validator)
11466 ("python-mock" ,python-mock)
11467 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11468 (propagated-inputs
11469 `(("python-dateutil" ,python-dateutil)
11470 ("python-six" ,python-six)))
11471 (home-page "https://github.com/joke2k/faker")
11472 (synopsis "Python package that generates fake data")
11473 (description
11474 "Faker is a Python package that generates fake data such as names,
11475addresses, and phone numbers.")
11476 (license license:expat)
11477 (properties `((python2-variant . ,(delay python2-faker))))))
11478
11479(define-public python2-faker
11480 (let ((base (package-with-python2 (strip-python2-variant
11481 python-faker))))
11482 (package
11483 (inherit base)
11484 (propagated-inputs
11485 `(("python2-ipaddress" ,python2-ipaddress)
11486 ,@(package-propagated-inputs base))))))
11487
ea92ae01
SB
11488(define-public python-fake-factory
11489 (package
11490 (name "python-fake-factory")
7adc698f 11491 (version "0.7.2")
ea92ae01
SB
11492 (source (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "fake-factory" version))
11495 (sha256
11496 (base32
42945fb5
MB
11497 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11498 (patches
11499 (search-patches
11500 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11501 (build-system python-build-system)
b7f3ea95
MB
11502 (arguments
11503 '(#:phases
11504 (modify-phases %standard-phases
11505 (replace 'check
11506 (lambda _
11507 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11508 (native-inputs
f3b98f4f 11509 `(;; For testing
ea92ae01
SB
11510 ("python-email-validator" ,python-email-validator)
11511 ("python-mock" ,python-mock)
11512 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11513 (propagated-inputs
22d7360b 11514 `(("python-dateutil" ,python-dateutil)
bbcd7297 11515 ("python-six" ,python-six)))
7adc698f 11516 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11517 (synopsis "Python package that generates fake data")
11518 (description
11519 "Faker is a Python package that generates fake data such as names,
11520addresses, and phone numbers.")
11521 (license license:expat)
ce7911dd
MB
11522 (properties `((python2-variant . ,(delay python2-fake-factory))
11523 (superseded . ,python-faker)))))
ea92ae01
SB
11524
11525(define-public python2-fake-factory
11526 (let ((base (package-with-python2 (strip-python2-variant
11527 python-fake-factory))))
11528 (package
11529 (inherit base)
ce7911dd 11530 (properties `((superseded . ,python2-faker)))
24c9aa18 11531 (propagated-inputs
ea92ae01 11532 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11533 ,@(package-propagated-inputs base))))))
ea92ae01 11534
b49504fd
SB
11535(define-public python-pyaml
11536 (package
11537 (name "python-pyaml")
11538 (version "15.8.2")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "pyaml" version))
11542 (sha256
11543 (base32
11544 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11545 (build-system python-build-system)
f620311a
MB
11546 (native-inputs
11547 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11548 (propagated-inputs
11549 `(("python-pyyaml" ,python-pyyaml)))
11550 (home-page "https://github.com/mk-fg/pretty-yaml")
11551 (synopsis "YAML pretty-print library for Python")
11552 (description
11553 "pyaml is a PyYAML based python module to produce pretty and readable
11554YAML-serialized data.")
3f641af0 11555 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11556
11557(define-public python2-pyaml
11558 (package-with-python2 python-pyaml))
11559
347175a2
SB
11560(define-public python-flexmock
11561 (package
11562 (name "python-flexmock")
11563 (version "0.10.2")
11564 (source (origin
11565 (method url-fetch)
11566 (uri (pypi-uri "flexmock" version))
11567 (sha256
11568 (base32
11569 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11570 (build-system python-build-system)
347175a2
SB
11571 (home-page "https://flexmock.readthedocs.org")
11572 (synopsis "Testing library for Python")
11573 (description
11574 "flexmock is a testing library for Python that makes it easy to create
11575mocks, stubs and fakes.")
3f641af0 11576 (license license:bsd-3)))
347175a2
SB
11577
11578(define-public python2-flexmock
11579 (package-with-python2 python-flexmock))
11580
5a744191
SB
11581(define-public python-orator
11582 (package
11583 (name "python-orator")
11584 (version "0.8.2")
11585 (source (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "orator" version))
11588 (sha256
11589 (base32
11590 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11591 (build-system python-build-system)
11592 (arguments '(#:tests? #f)) ; no tests
b2676030 11593 (propagated-inputs
5a744191
SB
11594 `(("python-arrow" ,python-arrow)
11595 ("python-blinker" ,python-blinker)
11596 ("python-cleo" ,python-cleo)
ce7911dd 11597 ("python-faker" ,python-faker)
5a744191
SB
11598 ("python-inflection" ,python-inflection)
11599 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11600 ("python-pyaml" ,python-pyaml)
5a744191
SB
11601 ("python-simplejson" ,python-simplejson)
11602 ("python-wrapt" ,python-wrapt)))
11603 (home-page "https://orator-orm.com/")
11604 (synopsis "ActiveRecord ORM for Python")
11605 (description
11606 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11607implementation for Python.")
11608 (license license:expat)
11609 (properties `((python2-variant . ,(delay python2-orator))))))
11610
11611(define-public python2-orator
11612 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11613 (package
11614 (inherit base)
06961617 11615 (propagated-inputs
5a744191 11616 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11617 ,@(package-propagated-inputs base))))))
f4155188
DM
11618
11619(define-public python-prompt-toolkit
11620 (package
11621 (name "python-prompt-toolkit")
6a34f4cc 11622 (version "1.0.9")
f4155188
DM
11623 (source
11624 (origin
11625 (method url-fetch)
d15e2ef0 11626 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11627 (sha256
11628 (base32
6a34f4cc 11629 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11630 (build-system python-build-system)
bae18710
LF
11631 (arguments
11632 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11633 (propagated-inputs
11634 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11635 ("python-six" ,python-six)
f22efa01 11636 ("python-pygments" ,python-pygments)))
f4155188
DM
11637 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11638 (synopsis "Library for building command line interfaces in Python")
11639 (description
11640 "Prompt-Toolkit is a library for building interactive command line
11641interfaces in Python. It's like GNU Readline but it also features syntax
11642highlighting while typing, out-of-the-box multi-line input editing, advanced
11643code completion, incremental search, support for Chinese double-width
11644characters, mouse support, and auto suggestions.")
f210e944 11645 (license license:bsd-3)))
f4155188
DM
11646
11647(define-public python2-prompt-toolkit
f210e944 11648 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11649
11650(define-public python-jedi
11651 (package
11652 (name "python-jedi")
11653 (version "0.9.0")
11654 (source
11655 (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "jedi" version))
11658 (sha256
11659 (base32
11660 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11661 (build-system python-build-system)
bfce8a34
MB
11662 (arguments
11663 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11664 '(#:tests? #f))
11665 (native-inputs
11666 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11667 (home-page "https://github.com/davidhalter/jedi")
11668 (synopsis
11669 "Autocompletion for Python that can be used for text editors")
11670 (description
11671 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11672 (license license:expat)))
a502dfbf
DM
11673
11674(define-public python2-jedi
f210e944 11675 (package-with-python2 python-jedi))
c2f0dc6e
DM
11676
11677(define-public ptpython
11678 (package
11679 (name "ptpython")
11680 (version "0.34")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "ptpython" version))
11684 (sha256
11685 (base32
11686 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11687 (build-system python-build-system)
32955348
MB
11688 (arguments
11689 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11690 (propagated-inputs
c2f0dc6e
DM
11691 `(("python-docopt" ,python-docopt)
11692 ("python-jedi" ,python-jedi)
11693 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11694 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11695 (home-page "https://github.com/jonathanslenders/ptpython")
11696 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11697 (description
11698 "ptpython is a Python read-eval-print loop with IDE-like features.
11699It supports syntax highlighting, multiline editing, autocompletion, mouse,
11700color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11701etc.")
3f641af0 11702 (license license:bsd-3)
c2f0dc6e
DM
11703 (properties `((python2-variant . ,(delay ptpython-2))))))
11704
11705(define-public ptpython-2
11706 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11707 (package
11708 (inherit base)
11709 (name "ptpython2"))))
b227f0be 11710
b04a52a6
DJ
11711(define-public python-requests-oauthlib
11712 (package
11713 (name "python-requests-oauthlib")
11714 (version "0.6.2")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "requests-oauthlib" version))
11719 (sha256
11720 (base32
11721 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11722 (build-system python-build-system)
11723 (arguments
11724 `(#:phases
11725 (modify-phases %standard-phases
11726 ;; removes tests that require network access
11727 (add-before 'check 'pre-check
11728 (lambda _
11729 (delete-file "tests/test_core.py")
11730 #t)))))
11731 (native-inputs
11732 `(("python-requests-mock" ,python-requests-mock)
11733 ("python-mock" ,python-mock)))
f22efa01 11734 (propagated-inputs
b04a52a6
DJ
11735 `(("python-oauthlib" ,python-oauthlib)
11736 ("python-requests" ,python-requests)))
11737 (home-page
11738 "https://github.com/requests/requests-oauthlib")
11739 (synopsis
11740 "OAuthlib authentication support for Requests")
11741 (description
11742 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11743provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11744 (license license:isc)))
b04a52a6
DJ
11745
11746(define-public python2-requests-oauthlib
f210e944 11747 (package-with-python2 python-requests-oauthlib))
b04a52a6 11748
b227f0be 11749(define-public python-stem
11750 (package
11751 (name "python-stem")
0bb1c35a 11752 (version "1.5.4")
b227f0be 11753 (source
11754 (origin
11755 (method url-fetch)
c976b319 11756 (uri (pypi-uri "stem" version))
b227f0be 11757 (sha256
11758 (base32
0bb1c35a 11759 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11760 (build-system python-build-system)
11761 (arguments
11762 `(#:phases
11763 (modify-phases %standard-phases
11764 (replace 'check
11765 (lambda _
11766 (zero? (system* "./run_tests.py" "--unit")))))))
11767 (native-inputs
11768 `(("python-mock" ,python-mock)
11769 ("python-pep8" ,python-pep8)
11770 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11771 (home-page "https://stem.torproject.org/")
11772 (synopsis
11773 "Python controller library that allows applications to interact with Tor")
11774 (description
11775 "Stem is a Python controller library for Tor. With it you can use Tor's
11776control protocol to script against the Tor process and read descriptor data
11777relays publish about themselves.")
3f641af0 11778 (license license:lgpl3)))
b227f0be 11779
11780(define-public python2-stem
11781 (package-with-python2 python-stem))
517a6c0c
DM
11782
11783(define-public python-pyserial
11784 (package
11785 (name "python-pyserial")
11786 (version "3.1.1")
11787 (source
11788 (origin
11789 (method url-fetch)
11790 (uri (pypi-uri "pyserial" version))
11791 (sha256
11792 (base32
11793 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11794 (build-system python-build-system)
0a702009
MB
11795 (arguments
11796 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11797 ;; #:phases
11798 ;; (modify-phases %standard-phases
11799 ;; (replace 'check
11800 ;; (lambda _
11801 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11802 (home-page
11803 "https://github.com/pyserial/pyserial")
11804 (synopsis "Python Serial Port Bindings")
11805 (description "@code{pyserial} provide serial port bindings for Python. It
11806supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11807and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11808 (license license:bsd-3)))
517a6c0c
DM
11809
11810(define-public python2-pyserial
f210e944 11811 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11812
11813(define-public python-kivy
11814 (package
11815 (name "python-kivy")
11816 (version "1.9.1")
11817 (source
11818 (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "kivy" version))
11821 (file-name (string-append name "-" version ".tar.gz"))
11822 (sha256
11823 (base32
11824 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11825 (build-system python-build-system)
11826 (arguments
11827 `(#:tests? #f ; Tests require many optional packages
11828 #:phases
11829 (modify-phases %standard-phases
11830 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11831 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11832 (lambda* (#:key inputs #:allow-other-keys)
11833 (setenv "KIVY_SDL2_PATH"
11834 (string-append (assoc-ref inputs "sdl-union")
11835 "/include/SDL2"))
11836 #t)))))
11837 (native-inputs
f2516de2
HG
11838 `(("pkg-config" ,pkg-config)
11839 ("python-cython" ,python-cython)))
6eb7af2a 11840 (inputs
f2516de2 11841 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11842 ("mesa" ,mesa)
11843 ("sdl-union"
11844 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11845 (home-page "http://kivy.org")
11846 (synopsis
11847 "Multitouch application framework")
11848 (description
11849 "A software library for rapid development of
11850hardware-accelerated multitouch applications.")
11851 (license license:expat)))
11852
11853(define-public python2-kivy
11854 (package-with-python2 python-kivy))
11855
11856(define-public python-kivy-next
11857 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11858 (revision "1"))
11859 (package (inherit python-kivy)
11860 (name "python-kivy-next")
d80a71eb 11861 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11862 (string-take commit 7)))
11863 (source
11864 (origin
11865 (method git-fetch)
11866 (uri (git-reference
11867 (url "https://github.com/kivy/kivy")
11868 (commit commit)))
11869 (file-name (string-append name "-" version "-checkout"))
11870 (sha256
11871 (base32
11872 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11873
11874(define-public python2-kivy-next
11875 (package-with-python2 python-kivy-next))
8794bd8b
DC
11876
11877(define-public python-binaryornot
11878 (package
11879 (name "python-binaryornot")
11880 (version "0.4.0")
11881 (source (origin
11882 (method url-fetch)
11883 (uri (pypi-uri "binaryornot" version))
11884 (sha256
11885 (base32
11886 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11887 (build-system python-build-system)
f22efa01 11888 (propagated-inputs
8794bd8b
DC
11889 `(("python-chardet" ,python-chardet)
11890 ("python-hypothesis" ,python-hypothesis)))
11891 (home-page "https://github.com/audreyr/binaryornot")
11892 (synopsis "Package to check if a file is binary or text")
11893 (description "Ultra-lightweight pure Python package to check if a file is
11894binary or text.")
11895 (license license:bsd-3)
11896 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11897
11898(define-public python2-binaryornot
11899 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11900 (package (inherit base)
f22efa01 11901 (propagated-inputs
8794bd8b 11902 `(("python2-enum34" ,python2-enum34)
f22efa01 11903 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11904
11905(define-public python-nltk
11906 (package
11907 (name "python-nltk")
11908 (version "3.2.1")
11909 (source (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "nltk" version))
11912 (sha256
11913 (base32
11914 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11915 (build-system python-build-system)
59f12985
LF
11916 (arguments
11917 '(;; The tests require some extra resources to be downloaded.
11918 ;; TODO Try packaging these resources.
11919 #:tests? #f))
a9ac982a
DC
11920 (home-page "http://nltk.org/")
11921 (synopsis "Natural Language Toolkit")
11922 (description "It provides interfaces to over 50 corpora and lexical
11923resources such as WordNet, along with a suite of text processing libraries
11924for classification, tokenization, stemming, tagging, parsing, and semantic
11925reasoning, wrappers for natural language processing libraries.")
f210e944 11926 (license license:asl2.0)))
a9ac982a
DC
11927
11928(define-public python2-nltk
f210e944 11929 (package-with-python2 python-nltk))
691cd90d
DC
11930
11931(define-public python-pymongo
11932 (package
11933 (name "python-pymongo")
11934 (version "3.3.0")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "pymongo" version))
11938 (sha256
11939 (base32
11940 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11941 (build-system python-build-system)
f22efa01 11942 (propagated-inputs
691cd90d
DC
11943 `(("python-certifi" ,python-certifi)))
11944 (home-page "http://github.com/mongodb/mongo-python-driver")
11945 (synopsis "Python driver for MongoDB")
11946 (description "Python driver for MongoDB.")
f210e944 11947 (license license:asl2.0)))
691cd90d
DC
11948
11949(define-public python2-pymongo
f210e944 11950 (package-with-python2 python-pymongo))
6a6c9d43
DC
11951
11952(define-public python-sh
11953 (package
11954 (name "python-sh")
11955 (version "1.11")
11956 (source (origin
11957 (method url-fetch)
11958 (uri (pypi-uri "sh" version))
11959 (sha256
11960 (base32
11961 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11962 (build-system python-build-system)
11963 (arguments
11964 `(#:tests? #f)) ; no tests
11965 (home-page "https://github.com/amoffat/sh")
11966 (synopsis "Python subprocess interface")
11967 (description "Abstracts process invocation by providing a function
11968interface for programs.")
f210e944 11969 (license license:expat)))
6a6c9d43
DC
11970
11971(define-public python2-sh
f210e944 11972 (package-with-python2 python-sh))
05b59190 11973
25702397
EF
11974(define-public python-consul
11975 (package
11976 (name "python-consul")
11977 (version "0.6.1")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "python-consul" version))
11982 (sha256
11983 (base32
11984 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11985 (build-system python-build-system)
11986 (native-inputs
fd1d6de7
HG
11987 `(("python-pytest" ,python-pytest)))
11988 (propagated-inputs
11989 `(("python-requests" ,python-requests)
25702397
EF
11990 ("python-six" ,python-six)))
11991 (home-page "https://github.com/cablehead/python-consul")
11992 (synopsis "Python client for Consul")
11993 (description
11994 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11995discovery, monitoring and configuration.")
11996 (license license:expat)))
11997
11998(define-public python2-consul
f210e944 11999 (package-with-python2 python-consul))
25702397 12000
05b59190
DC
12001(define-public python-schematics
12002 (package
12003 (name "python-schematics")
12004 (version "1.1.1")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (string-append
12009 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12010 (file-name (string-append name "-" version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12014 (build-system python-build-system)
f22efa01 12015 (propagated-inputs
05b59190
DC
12016 `(("python-six" ,python-six)))
12017 (arguments
12018 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12019 ; version requirements (eg python-coveralls)
12020 (home-page "https://github.com/schematics/schematics")
12021 (synopsis "Python Data Structures for Humans")
12022 (description "Python Data Structures for Humans.")
f210e944 12023 (license license:bsd-3)))
05b59190
DC
12024
12025(define-public python2-schematics
f210e944 12026 (package-with-python2 python-schematics))
d6907ff7
DC
12027
12028(define-public python-publicsuffix
12029 (package
12030 (name "python-publicsuffix")
12031 (version "1.1.0")
12032 (source (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "publicsuffix" version))
12035 (sha256
12036 (base32
12037 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12038 (build-system python-build-system)
12039 (arguments
12040 `(#:tests? #f)) ; tests use the internet
12041 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12042 (synopsis "Get suffix for a domain name")
12043 (description "Get a public suffix for a domain name using the Public Suffix
12044List.")
f210e944 12045 (license license:expat)))
d6907ff7
DC
12046
12047(define-public python2-publicsuffix
f210e944 12048 (package-with-python2 python-publicsuffix))
b2319996
DC
12049
12050(define-public python-publicsuffix2
12051 (package
12052 (name "python-publicsuffix2")
91862162 12053 (version "2.20160818")
b2319996
DC
12054 (source
12055 (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12058 (sha256
12059 (base32
91862162 12060 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12061 (build-system python-build-system)
10797a0a
LF
12062 (arguments
12063 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12064 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12065 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12066 (description "Get a public suffix for a domain name using the Public Suffix
12067List. Forked from and using the same API as the publicsuffix package.")
f210e944 12068 (license (list license:expat license:mpl2.0))))
b2319996
DC
12069
12070(define-public python2-publicsuffix2
f210e944 12071 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12072
12073(define-public python-url
12074 (package
12075 (name "python-url")
12076 (version "0.2.0")
12077 (source (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "url" version))
12080 (sha256
12081 (base32
12082 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12083 (build-system python-build-system)
f22efa01 12084 (propagated-inputs
81f1515d
DC
12085 `(("python-publicsuffix" ,python-publicsuffix)))
12086 (native-inputs
12087 `(("python-coverage" ,python-coverage)
12088 ("python-nose" ,python-nose)))
12089 (arguments
12090 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12091 (home-page "http://github.com/seomoz/url-py")
12092 (synopsis "URL Parsing")
12093 (description "Library for parsing urls.")
12094 (license license:expat)
12095 (properties `((python2-variant . ,(delay python2-url))))))
12096
12097(define-public python2-url
12098 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12099 (package (inherit base)
f22efa01 12100 (propagated-inputs
f210e944 12101 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12102
12103(define-public python-freezegun
12104 (package
12105 (name "python-freezegun")
0c315fb3 12106 (version "0.3.8")
974ee2c1
TS
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "freezegun" version))
12111 (sha256
12112 (base32
0c315fb3 12113 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12114 (build-system python-build-system)
12115 (native-inputs
12116 `(("python-mock" ,python-mock)
12117 ("python-nose" ,python-nose)
4e096968 12118 ("python-coverage" ,python-coverage)))
f22efa01 12119 (propagated-inputs
4e096968 12120 `(("python-six" ,python-six)
22d7360b 12121 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12122 (arguments
12123 `(#:phases (modify-phases %standard-phases
12124 ;; The tests are normally executed via `make test`, but the PyPi
12125 ;; package does not include the Makefile.
12126 (replace 'check
12127 (lambda _
12128 (zero? (system* "nosetests" "./tests/")))))))
12129 (home-page "https://github.com/spulec/freezegun")
12130 (synopsis "Test utility for mocking the datetime module")
12131 (description
12132 "FreezeGun is a library that allows your python tests to travel through
12133time by mocking the datetime module.")
12134 (license license:asl2.0)))
12135
12136(define-public python2-freezegun
f210e944
HG
12137 (package-with-python2 python-freezegun))
12138
dddcb25c
MB
12139
12140(define-public python-odfpy
12141 (package
12142 (name "python-odfpy")
12143 (version "1.3.3")
12144 (source (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "odfpy" version))
12147 (sha256
12148 (base32
12149 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12150 (arguments
12151 `(#:modules ((srfi srfi-1)
12152 (guix build python-build-system)
12153 (guix build utils))
12154 #:phases
12155 (modify-phases %standard-phases
12156 (replace 'check
12157 ;; The test runner invokes python2 and python3 for test*.py.
12158 ;; To avoid having both in inputs, we replicate it here.
12159 (lambda _
12160 (every (lambda (test-file)
12161 (zero? (system* "python" test-file)))
12162 (find-files "tests" "^test.*\\.py$")))))))
12163 (build-system python-build-system)
12164 (home-page "https://github.com/eea/odfpy")
12165 (synopsis "Python API and tools to manipulate OpenDocument files")
12166 (description "Collection of libraries and utility programs written in
12167Python to manipulate OpenDocument 1.2 files.")
12168 (license
12169 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12170 ;; number of files with other licenses.
12171 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12172
12173(define-public python2-odfpy
12174 (package-with-python2 python-odfpy))
b30565bd
MB
12175
12176(define-public python-cachecontrol
12177 (package
12178 (name "python-cachecontrol")
12179 (version "0.11.6")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 ;; Pypi does not have tests.
12184 (uri (string-append
12185 "https://github.com/ionrock/cachecontrol/archive/v"
12186 version ".tar.gz"))
12187 (file-name (string-append name "-" version ".tar.gz"))
12188 (sha256
12189 (base32
12190 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12191 (build-system python-build-system)
12192 (arguments
12193 `(#:phases
12194 (modify-phases %standard-phases
12195 (replace 'check
12196 (lambda _
12197 ;; Drop test that requires internet access.
12198 (delete-file "tests/test_regressions.py")
12199 (setenv "PYTHONPATH"
12200 (string-append (getcwd) "/build/lib:"
12201 (getenv "PYTHONPATH")))
12202 (zero? (system* "py.test" "-vv")))))))
12203 (native-inputs
12204 `(("python-pytest" ,python-pytest)
12205 ("python-redis" ,python-redis)
12206 ("python-webtest" ,python-webtest)
12207 ("python-mock" ,python-mock)))
12208 (propagated-inputs
12209 `(("python-requests" ,python-requests)
12210 ("python-lockfile" ,python-lockfile)))
12211 (home-page "https://github.com/ionrock/cachecontrol")
12212 (synopsis "The httplib2 caching algorithms for use with requests")
12213 (description "CacheControl is a port of the caching algorithms in
12214@code{httplib2} for use with @code{requests} session objects.")
f210e944 12215 (license license:asl2.0)))
b30565bd
MB
12216
12217(define-public python2-cachecontrol
f210e944 12218 (package-with-python2 python-cachecontrol))
243db824
DM
12219
12220(define-public python-lit
12221 (package
12222 (name "python-lit")
12223 (version "0.5.0")
12224 (source
12225 (origin
12226 (method url-fetch)
12227 (uri (pypi-uri "lit" version))
12228 (sha256
12229 (base32
12230 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12231 (build-system python-build-system)
12232 (home-page "http://llvm.org/")
12233 (synopsis "LLVM Software Testing Tool")
12234 (description "@code{lit} is a portable tool for executing LLVM and Clang
12235style test suites, summarizing their results, and providing indication of
12236failures.")
f210e944 12237 (license license:ncsa)))
243db824
DM
12238
12239(define-public python2-lit
f210e944 12240 (package-with-python2 python-lit))
66f95b20
MB
12241
12242(define-public python-pytest-pep8
12243 (package
12244 (name "python-pytest-pep8")
12245 (version "1.0.6")
12246 (source (origin
12247 (method url-fetch)
12248 (uri (pypi-uri "pytest-pep8" version))
12249 (sha256
12250 (base32
12251 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12252 (build-system python-build-system)
12253 (arguments
b41a05ce 12254 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12255 (native-inputs
12256 `(("python-pytest" ,python-pytest)))
12257 (propagated-inputs
12258 `(("python-pep8" ,python-pep8)))
12259 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12260 (synopsis "Py.test plugin to check PEP8 requirements")
12261 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12262 (license license:expat)))
66f95b20
MB
12263
12264(define-public python2-pytest-pep8
f210e944 12265 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12266
12267(define-public python-pytest-flakes
12268 (package
12269 (name "python-pytest-flakes")
12270 (version "1.0.1")
12271 (source (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "pytest-flakes" version))
12274 (sha256
12275 (base32
12276 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12277 (build-system python-build-system)
12278 (arguments
b41a05ce 12279 `(#:phases
df94a6b5
MB
12280 (modify-phases %standard-phases
12281 (delete 'check)
12282 (add-after 'install 'check
05c2fd36
HG
12283 (lambda* (#:key outputs inputs #:allow-other-keys)
12284 ;; It's easier to run tests after install.
12285 ;; Make installed package available for running the tests
12286 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12287 (zero? (system* "py.test" "-vv")))))))
12288 (native-inputs
12289 `(("python-coverage" ,python-coverage)
12290 ("python-pytest" ,python-pytest)
12291 ("python-pytest-cache" ,python-pytest-cache)
12292 ("python-pytest-pep8" ,python-pytest-pep8)))
12293 (propagated-inputs
12294 `(("python-pyflakes" ,python-pyflakes)))
12295 (home-page "https://github.com/fschulze/pytest-flakes")
12296 (synopsis "Py.test plugin to check source code with pyflakes")
12297 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12298 (license license:expat)))
df94a6b5
MB
12299
12300(define-public python2-pytest-flakes
f210e944 12301 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12302
12303(define-public python-natsort
12304 (package
12305 (name "python-natsort")
12306 (version "5.0.1")
12307 (source (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "natsort" version))
12310 (sha256
12311 (base32
12312 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12313 (build-system python-build-system)
12314 (arguments
12315 `(#:phases
12316 (modify-phases %standard-phases
12317 (add-before 'check 'set-cachedir
12318 ;; Tests require write access to $HOME by default
12319 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12320 (native-inputs
12321 `(("python-hypothesis" ,python-hypothesis)
12322 ("python-pytest-cache" ,python-pytest-cache)
12323 ("python-pytest-cov" ,python-pytest-cov)
12324 ("python-pytest-flakes" ,python-pytest-flakes)
12325 ("python-pytest-pep8" ,python-pytest-pep8)))
12326 (propagated-inputs ; TODO: Add python-fastnumbers.
12327 `(("python-pyicu" ,python-pyicu)))
12328 (home-page "https://github.com/SethMMorton/natsort")
12329 (synopsis "Natural sorting for python and shell")
12330 (description
12331 "Natsort lets you apply natural sorting on lists instead of
12332lexicographical. If you use the built-in @code{sorted} method in python
12333on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12334returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12335function @code{natsorted} that identifies numbers and sorts them separately
12336from strings. It can also sort version numbers, real numbers, mixed types
12337and more, and comes with a shell command @command{natsort} that exposes this
12338functionality in the command line.")
12339 (license license:expat)
12340 (properties `((python2-variant . ,(delay python2-natsort))))))
12341
12342(define-public python2-natsort
12343 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12344 (package (inherit base)
12345 (native-inputs
00e10c6e 12346 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12347 ("python2-mock" ,python2-mock)
12348 ("python2-enum34" ,python2-enum34)
12349 ,@(package-native-inputs base))))))
4efb9c54
SR
12350
12351(define-public python-glances
12352 (package
12353 (name "python-glances")
12354 (version "2.7.1")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "Glances" version))
12359 (sha256
12360 (base32
12361 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12362 (build-system python-build-system)
f22efa01 12363 (propagated-inputs
4efb9c54
SR
12364 `(("python-psutil" ,python-psutil)))
12365 (home-page
12366 "https://github.com/nicolargo/glances")
12367 (synopsis
12368 "A cross-platform curses-based monitoring tool")
12369 (description
12370 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12371Glances uses the PsUtil library to get information from your system. It monitors
12372CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12373 (license license:lgpl3+)))
4efb9c54
SR
12374
12375(define-public python2-glances
f210e944 12376 (package-with-python2 python-glances))
05b7a593
EF
12377
12378(define-public python-graphql-core
12379 (package
12380 (name "python-graphql-core")
12381 (version "0.5.3")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "graphql-core" version))
12386 (sha256
12387 (base32
12388 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12389 (build-system python-build-system)
12390 (arguments
326f8285
LF
12391 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12392 #:phases
05b7a593
EF
12393 (modify-phases %standard-phases
12394 (add-after 'unpack 'patch-hardcoded-version
12395 (lambda _ (substitute*
12396 "setup.py"
12397 (("'gevent==1.1rc1'") "'gevent'"))
12398 #t)))))
12399 (native-inputs
12400 `(("python-gevent" ,python-gevent)
12401 ("python-mock" ,python-mock)
12402 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12403 (propagated-inputs
05b7a593
EF
12404 `(("python-promise" ,python-promise)
12405 ("python-six" ,python-six)))
12406 (home-page "https://github.com/graphql-python/graphql-core")
12407 (synopsis "GraphQL implementation for Python")
12408 (description
12409 "GraphQL implementation for Python. GraphQL is a data query language and
12410runtime designed and used to request and deliver data to mobile and web apps.
12411This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12412to Python.")
05b7a593
EF
12413 (license license:expat)))
12414
12415(define-public python2-graphql-core
f210e944 12416 (package-with-python2 python-graphql-core))
7ee51575
EF
12417
12418(define-public python-graphql-relay
12419 (package
12420 (name "python-graphql-relay")
b13a5b4d 12421 (version "0.4.5")
7ee51575
EF
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "graphql-relay" version))
12426 (sha256
12427 (base32
b13a5b4d 12428 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12429 (build-system python-build-system)
12430 (native-inputs
12431 `(("python-pytest" ,python-pytest)))
f22efa01 12432 (propagated-inputs
7ee51575
EF
12433 `(("python-graphql-core" ,python-graphql-core)
12434 ("python-promise" ,python-promise)
12435 ("python-six" ,python-six)))
12436 (home-page "https://github.com/graphql-python/graphql-relay-py")
12437 (synopsis "Relay implementation for Python")
12438 (description
12439 "This is a library to allow the easy creation of Relay-compliant servers
12440using the GraphQL Python reference implementation of a GraphQL server. It
12441should be noted that the code is a exact port of the original
12442@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12443from Facebook.")
7ee51575
EF
12444 (license license:expat)))
12445
12446(define-public python2-graphql-relay
f210e944 12447 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12448
12449(define-public python-graphene
12450 (package
12451 (name "python-graphene")
12452 (version "0.10.2")
12453 (source
12454 (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "graphene" version))
12457 (sha256
12458 (base32
12459 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12460 (build-system python-build-system)
12461 (native-inputs
12462 `(("python-django-filter" ,python-django-filter)
12463 ("python-mock" ,python-mock)
12464 ("python-psycopg2" ,python-psycopg2)
12465 ("python-pytest-django" ,python-pytest-django)
12466 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12467 (propagated-inputs
ddc63a56
EF
12468 `(("python-graphql-core" ,python-graphql-core)
12469 ("python-graphql-relay" ,python-graphql-relay)
12470 ("python-iso8601" ,python-iso8601)
12471 ("python-promise" ,python-promise)
12472 ("python-six" ,python-six)))
12473 (home-page "http://graphene-python.org/")
12474 (synopsis "GraphQL Framework for Python")
12475 (description
12476 "Graphene is a Python library for building GraphQL schemas/types.
12477A GraphQL schema describes your data model, and provides a GraphQL server
12478with an associated set of resolve methods that know how to fetch data.")
12479 (properties `((python2-variant . ,(delay python2-graphene))))
12480 (license license:expat)))
12481
12482(define-public python2-graphene
12483 (let ((base (package-with-python2
12484 (strip-python2-variant python-graphene))))
12485 (package (inherit base)
12486 (native-inputs
00e10c6e 12487 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12488 ,@(package-native-inputs base))))))
d488d5d6
EF
12489
12490(define-public python-nautilus
12491 (package
12492 (name "python-nautilus")
12493 (version "0.4.9")
12494 (source
12495 (origin
12496 (method url-fetch)
12497 (uri (pypi-uri "nautilus" version))
12498 (sha256
12499 (base32
12500 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12501 (build-system python-build-system)
12502 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12503 (propagated-inputs
d488d5d6
EF
12504 `(("python-bcrypt" ,python-bcrypt)
12505 ("python-click" ,python-click)
12506 ("python-consul" ,python-consul)
d488d5d6
EF
12507 ("python-graphene" ,python-graphene)
12508 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12509 ("python-peewee" ,python-peewee)
12510 ("python-pika" ,python-pika)
d488d5d6
EF
12511 ("python-tornado" ,python-tornado)
12512 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12513 (native-inputs
12514 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12515 (home-page "https://github.com/AlecAivazis/nautilus")
12516 (synopsis "Library for creating microservice applications")
12517 (description
12518 "Nautilus is a framework for flux based microservices that looks to
12519provide extendible implementations of common aspects of a cloud so that you can
12520focus on building massively scalable web applications.")
12521 (license license:expat)))
94cffc63 12522
89cd988b
DM
12523(define-public python-snowballstemmer
12524 (package
12525 (name "python-snowballstemmer")
12526 (version "1.2.1")
12527 (source (origin
1bd858cc
MB
12528 (method url-fetch)
12529 (uri (pypi-uri "snowballstemmer" version))
12530 (sha256
12531 (base32
12532 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12533 (build-system python-build-system)
12534 (arguments
12535 `(;; No tests exist
12536 #:tests? #f))
12537 (home-page "https://github.com/shibukawa/snowball_py")
12538 (synopsis "Snowball stemming library collection for Python")
12539 (description "This package provides 16 word stemmer algorithms generated
12540from Snowball algorithms. It includes the 15 original ones plus the Poerter
12541English stemmer.")
12542 (license license:bsd-3)))
12543
12544(define-public python2-snowballstemmer
12545 (package-with-python2 python-snowballstemmer))
12546
754bfd70
DM
12547(define-public python-sphinx-cloud-sptheme
12548 (package
12549 (name "python-sphinx-cloud-sptheme")
5095bc7d 12550 (version "1.8.0")
754bfd70 12551 (source (origin
1bd858cc
MB
12552 (method url-fetch)
12553 (uri (pypi-uri "cloud_sptheme" version))
12554 (sha256
12555 (base32
5095bc7d 12556 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12557 (build-system python-build-system)
a31e2f1a
MB
12558 ;; FIXME: The 'pypi' release archive does not contain tests.
12559 (arguments '(#:tests? #f))
1bd858cc
MB
12560 (native-inputs
12561 `(("python-sphinx" ,python-sphinx)))
12562 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12563 (synopsis "'Cloud' theme for Sphinx documenter")
12564 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12565related extensions.")
1bd858cc 12566 (license license:bsd-3)))
754bfd70
DM
12567
12568(define-public python2-sphinx-cloud-sptheme
12569 (package-with-python2 python-sphinx-cloud-sptheme))
12570
807a5b32
DM
12571(define-public python-sphinx-alabaster-theme
12572 (package
12573 (name "python-sphinx-alabaster-theme")
12574 (version "0.7.9")
1bd858cc
MB
12575 (source (origin
12576 (method url-fetch)
12577 (uri (pypi-uri "alabaster" version))
12578 (sha256
12579 (base32
12580 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12581 (build-system python-build-system)
12582 (propagated-inputs
12583 `(("python-pygments" ,python-pygments)))
12584 (home-page "https://alabaster.readthedocs.io/")
12585 (synopsis "Configurable sidebar-enabled Sphinx theme")
12586 (description "Alabaster is a visually (c)lean, responsive, configurable
12587theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12588 (license license:bsd-3)))
12589
12590(define-public python2-sphinx-alabaster-theme
12591 (package-with-python2 python-sphinx-alabaster-theme))
12592
66d3f50a
LF
12593(define-public python-betamax
12594 (package
12595 (name "python-betamax")
12596 (version "0.8.0")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "betamax" version))
12601 (sha256
12602 (base32
12603 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12604 (build-system python-build-system)
12605 (arguments
12606 '(;; Many tests fail because they require networking.
12607 #:tests? #f))
c415f763 12608 (propagated-inputs
66d3f50a
LF
12609 `(("python-requests" ,python-requests)))
12610 (home-page "https://github.com/sigmavirus24/betamax")
12611 (synopsis "Record HTTP interactions with python-requests")
12612 (description "Betamax will record your test suite's HTTP interactions and
12613replay them during future tests. It is designed to work with python-requests.")
f210e944 12614 (license license:expat)))
66d3f50a
LF
12615
12616(define-public python2-betamax
f210e944 12617 (package-with-python2 python-betamax))
ca0635b4 12618
94cffc63
LF
12619(define-public python-s3transfer
12620 (package
12621 (name "python-s3transfer")
1b5ea092 12622 (version "0.1.10")
94cffc63
LF
12623 (source (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "s3transfer" version))
12626 (sha256
12627 (base32
1b5ea092 12628 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12629 (build-system python-build-system)
fad8bf97
LF
12630 (arguments
12631 `(#:phases
12632 (modify-phases %standard-phases
12633 (replace 'check
12634 (lambda _
12635 ;; 7 of the 'integration' tests require network access or login
12636 ;; credentials.
12637 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12638 (native-inputs
fad8bf97
LF
12639 `(("python-docutils" ,python-docutils)
12640 ("python-mock" ,python-mock)
12641 ("python-nose" ,python-nose)))
f22efa01 12642 (propagated-inputs
94cffc63
LF
12643 `(("python-botocore" ,python-botocore)))
12644 (synopsis "Amazon S3 Transfer Manager")
12645 (description "S3transfer is a Python library for managing Amazon S3
12646transfers.")
12647 (home-page "https://github.com/boto/s3transfer")
12648 (license license:asl2.0)
12649 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12650
12651(define-public python2-s3transfer
12652 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12653 (package
12654 (inherit base)
12655 (native-inputs
12656 `(("python2-futures" ,python2-futures)
94cffc63 12657 ,@(package-native-inputs base))))))
8ab59181
HG
12658
12659(define-public python-setproctitle
12660(package
12661 (name "python-setproctitle")
12662 (version "1.1.10")
12663 (source
12664 (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "setproctitle" version))
12667 (sha256
12668 (base32
12669 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12670 (build-system python-build-system)
12671 (arguments
12672 '(#:phases
12673 (modify-phases %standard-phases
12674 (add-before 'check 'patch-Makefile
12675 ;; Stricly this is only required for the python2 variant.
12676 ;; But adding a phase in an inherited package seems to be
12677 ;; cumbersum. So we patch even for python3.
12678 (lambda _
12679 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12680 (when nose
12681 (substitute* "Makefile"
12682 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12683 (string-append nose "/bin/nosetests "))))
12684 #t)))
12685 (replace 'check
12686 (lambda _
12687 (setenv "PYTHON" (or (which "python3") (which "python")))
12688 (setenv "PYCONFIG" (or (which "python3-config")
12689 (which "python-config")))
12690 (setenv "CC" "gcc")
12691 ;; No need to extend PYTHONPATH to find the built package, since
12692 ;; the Makefile will build anyway
12693 (zero? (system* "make" "check")))))))
12694 (native-inputs
12695 `(("procps" ,procps))) ; required for tests
12696 (home-page
12697 "https://github.com/dvarrazzo/py-setproctitle")
12698 (synopsis
12699 "Setproctitle implementation for Python to customize the process title")
12700 (description "The library allows a process to change its title (as displayed
12701by system tools such as ps and top).
12702
12703Changing the title is mostly useful in multi-process systems, for
12704example when a master process is forked: changing the children's title
12705allows to identify the task each process is busy with. The technique
12706is used by PostgreSQL and the OpenSSH Server for example.")
12707 (license license:bsd-3)
12708 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12709
12710(define-public python2-setproctitle
12711 (let ((base (package-with-python2
12712 (strip-python2-variant python-setproctitle))))
12713 (package
12714 (inherit base)
12715 (native-inputs `(("python2-nose" ,python2-nose)
12716 ,@(package-native-inputs base))))))
162e42d8
HG
12717
12718(define-public python-validictory
12719 (package
12720 (name "python-validictory")
12721 (version "1.0.1")
12722 (source
12723 (origin
12724 (method url-fetch)
12725 (uri (pypi-uri "validictory" version))
12726 (sha256
12727 (base32
12728 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12729 (build-system python-build-system)
12730 (arguments
12731 '(#:phases
12732 (modify-phases %standard-phases
12733 (add-after 'unpack 'bootstrap
12734 ;; Move the tests out of the package directory to avoid
12735 ;; packaging them.
12736 (lambda* _
12737 (rename-file "validictory/tests" "tests")
12738 (delete-file "tests/__init__.py")))
12739 (replace 'check
12740 (lambda _
12741 ;; Extend PYTHONPATH so the built package will be found.
12742 (setenv "PYTHONPATH"
12743 (string-append (getcwd) "/build/lib:"
12744 (getenv "PYTHONPATH")))
12745 (zero? (system* "py.test" "-vv" )))))))
12746 (native-inputs
12747 `(("python-pytest" ,python-pytest)))
12748 (home-page
12749 "https://github.com/jamesturk/validictory")
12750 (synopsis "General purpose Python data validator")
12751 (description "It allows validation of arbitrary Python data structures.
12752
12753The schema format is based on the JSON Schema
12754proposal (http://json-schema.org), so combined with json the library is also
12755useful as a validator for JSON data.")
f210e944 12756 (license license:expat)))
162e42d8
HG
12757
12758(define-public python2-validictory
f210e944 12759 (package-with-python2 python-validictory))
0990edfe
DM
12760
12761(define-public python-aniso8601
12762 (package
12763 (name "python-aniso8601")
12764 (version "1.1.0")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "aniso8601" version))
12769 (sha256
12770 (base32
12771 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12772 (build-system python-build-system)
12773 (propagated-inputs
22d7360b 12774 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12775 (home-page
12776 "https://bitbucket.org/nielsenb/aniso8601")
12777 (synopsis
12778 "Python library for parsing ISO 8601 strings")
12779 (description
12780 "This package contains a library for parsing ISO 8601 datetime strings.")
12781 (license license:bsd-3)))
999d964d
DM
12782
12783(define-public python-flask-restful
12784 (package
12785 (name "python-flask-restful")
12786 (version "0.3.5")
12787 (source
12788 (origin
12789 (method url-fetch)
12790 (uri (pypi-uri "Flask-RESTful" version))
12791 (sha256
12792 (base32
12793 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12794 (build-system python-build-system)
12795 (propagated-inputs
12796 `(("python-aniso8601" ,python-aniso8601)
12797 ("python-flask" ,python-flask)
12798 ("python-pycrypto" ,python-pycrypto)
12799 ("python-pytz" ,python-pytz)))
12800 (native-inputs
12801 `(;; Optional dependency of Flask. Tests need it.
12802 ("python-blinker" ,python-blinker)
12803 ("python-mock" ,python-mock) ; For tests
12804 ("python-nose" ,python-nose) ; For tests
12805 ("python-sphinx" ,python-sphinx)))
12806 (home-page
12807 "https://www.github.com/flask-restful/flask-restful/")
12808 (synopsis
12809 "Flask module for creating REST APIs")
12810 (description
12811 "This package contains a Flask module for creating REST APIs.")
12812 (license license:bsd-3)))
31288222
DM
12813
12814(define-public python-flask-basicauth
12815 (package
12816 (name "python-flask-basicauth")
12817 (version "0.2.0")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "Flask-BasicAuth" version))
12822 (sha256
12823 (base32
12824 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12825 (build-system python-build-system)
12826 (propagated-inputs
12827 `(("python-flask" ,python-flask)))
12828 (home-page
12829 "https://github.com/jpvanhal/flask-basicauth")
12830 (synopsis
12831 "HTTP basic access authentication for Flask")
12832 (description
12833 "This package provides HTTP basic access authentication for Flask.")
12834 (license license:bsd-3)))
903276d0
DM
12835
12836(define-public python-flask-sqlalchemy
12837 (package
12838 (name "python-flask-sqlalchemy")
12839 (version "2.1")
12840 (source
12841 (origin
12842 (method url-fetch)
12843 (uri (pypi-uri "Flask-SQLAlchemy" version))
12844 (sha256
12845 (base32
12846 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12847 (build-system python-build-system)
12848 (propagated-inputs
12849 `(("python-flask" ,python-flask)
12850 ("python-sqlalchemy" ,python-sqlalchemy)))
12851 (home-page
12852 "http://github.com/mitsuhiko/flask-sqlalchemy")
12853 (synopsis
12854 "Module adding SQLAlchemy support to your Flask application")
12855 (description
12856 "This package adds SQLAlchemy support to your Flask application.")
12857 (license license:bsd-3)))
329b4b3b
LF
12858
12859(define-public python-pyev
12860 (package
12861 (name "python-pyev")
12862 (version "0.9.0")
12863 (source
12864 (origin
12865 (method url-fetch)
12866 (uri (pypi-uri "pyev" version))
12867 (sha256
12868 (base32
12869 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12870 (build-system python-build-system)
12871 (arguments
12872 `(#:tests? #f ; no test suite
12873 #:phases
12874 (modify-phases %standard-phases
12875 (add-after 'unpack 'patch
12876 (lambda* (#:key inputs #:allow-other-keys)
12877 (let ((libev (string-append (assoc-ref inputs "libev")
12878 "/lib/libev.so.4")))
12879 (substitute* "setup.py"
12880 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12881 (string-append "libev_dll_name = \"" libev "\"")))))))))
12882 (inputs
12883 `(("libev" ,libev)))
12884 (home-page "http://pythonhosted.org/pyev/")
12885 (synopsis "Python libev interface")
12886 (description "Pyev provides a Python interface to libev.")
12887 (license license:gpl3)))
12888
12889(define-public python2-pyev
12890 (package-with-python2 python-pyev))
45b4f127
DM
12891
12892(define-public python-imagesize
12893 (package
12894 (name "python-imagesize")
12895 (version "0.7.1")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "imagesize" version))
12900 (sha256
12901 (base32
12902 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12903 (build-system python-build-system)
9422c98a
LF
12904 (arguments
12905 '(;; Test files are not distributed on PyPi:
12906 ;; https://github.com/shibukawa/imagesize_py/issues/7
12907 #:tests? #f))
45b4f127
DM
12908 (home-page "https://github.com/shibukawa/imagesize_py")
12909 (synopsis "Gets image size of files in variaous formats in Python")
12910 (description
12911 "This package allows determination of image size from
12912PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12913 (license license:expat)))
45b4f127
DM
12914
12915(define-public python2-imagesize
f210e944 12916 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12917
12918(define-public python-axolotl-curve25519
12919 (package
12920 (name "python-axolotl-curve25519")
12921 (version "0.1")
12922 (source
12923 (origin
12924 (method git-fetch)
12925 (uri (git-reference
12926 (url "git://github.com/tgalal/python-axolotl-curve25519")
12927 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12928 (file-name (string-append name "-" version "-checkout"))
12929 (sha256
12930 (base32
12931 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12932 (build-system python-build-system)
12933 (arguments
12934 `(;; Prevent creation of the egg. This works around
12935 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12936 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12937 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12938 (synopsis "Python wrapper for curve25519 library")
12939 (description "This is a python wrapper for the curve25519 library
12940with ed25519 signatures. The C code was pulled from
12941libaxolotl-android. At the moment this wrapper is meant for use by
12942python-axolotl.")
12943 (license (list license:gpl3 ; Most files
683cdbf5 12944 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12945
12946(define-public python2-axolotl-curve25519
12947 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12948
12949(define-public python-axolotl
12950 (package
12951 (name "python-axolotl")
12952 (version "0.1.35")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (string-append
12957 "https://github.com/tgalal/python-axolotl/archive/"
12958 version ".tar.gz"))
12959 (file-name (string-append name "-" version ".tar.gz"))
12960 (sha256
12961 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12962 (build-system python-build-system)
12963 (arguments
12964 `(#:phases
12965 (modify-phases %standard-phases
12966 ;; Don't install tests
12967 (add-before 'install 'remove-tests
12968 (lambda _
12969 (for-each delete-file-recursively
12970 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 12971 #t)))))
06ff0837
AI
12972 (propagated-inputs
12973 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12974 ("python-dateutil" ,python-dateutil)
12975 ("python-protobuf" ,python-protobuf)
12976 ("python-pycrypto" ,python-pycrypto)))
12977 (home-page "https://github.com/tgalal/python-axolotl")
12978 (synopsis "Python port of libaxolotl-android")
12979 (description "This is a python port of libaxolotl-android. This
12980is a ratcheting forward secrecy protocol that works in synchronous and
12981asynchronous messaging environments.")
12982 (license license:gpl3)))
12983
12984(define-public python2-axolotl
12985 (package-with-python2 python-axolotl))
e2fca490
DM
12986
12987(define-public python-termstyle
12988 (package
12989 (name "python-termstyle")
12990 (version "0.1.11")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "termstyle" version))
12995 (sha256
12996 (base32
12997 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12998 (build-system python-build-system)
7917a135
MB
12999 (arguments
13000 '(#:phases
13001 (modify-phases %standard-phases
13002 (replace 'check
13003 (lambda _
13004 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
13005 (home-page "http://github.com/gfxmonk/termstyle")
13006 (synopsis "Console text coloring for Python")
13007 (description "This package provides console text coloring for Python.")
13008 (license license:bsd-3)))
1e6112d8
DM
13009
13010(define-public python-rednose
13011 (package
13012 (name "python-rednose")
13013 (version "1.2.1")
13014 (source
13015 (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "rednose" version))
13018 (sha256
13019 (base32
13020 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13021 (build-system python-build-system)
13022 (arguments
13023 `(#:phases
13024 (modify-phases %standard-phases
13025 (add-after 'unpack 'fix-deps
13026 (lambda _
13027 ;; See <https://github.com/JBKahn/rednose/issues/12>
13028 (substitute* "setup.py"
13029 (("python-termstyle") "termstyle"))
13030 #t)))))
13031 (propagated-inputs
13032 `(("python-colorama" ,python-colorama)
13033 ("python-termstyle" ,python-termstyle)))
13034 (native-inputs
13035 `(("python-six" ,python-six)
13036 ("python-nose" ,python-nose)))
13037 (home-page "https://github.com/JBKahn/rednose")
13038 (synopsis "Colored output for Python nosetests")
13039 (description "This package provides colored output for the
13040@command{nosetests} command of the Python Nose unit test framework.")
13041 (license license:bsd-3)))
0a7f17f0
DM
13042
13043(define-public python-flask-restplus
13044 (package
13045 (name "python-flask-restplus")
13046 (version "0.9.2")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (pypi-uri "flask-restplus" version))
13051 (sha256
13052 (base32
13053 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13054 (build-system python-build-system)
59f74825
MB
13055 (arguments
13056 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13057 ;; #:phases
13058 ;; (modify-phases %standard-phases
13059 ;; (replace 'check
13060 ;; (lambda _
13061 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13062 (propagated-inputs
13063 `(("python-aniso8601" ,python-aniso8601)
13064 ("python-flask" ,python-flask)
13065 ("python-jsonschema" ,python-jsonschema)
13066 ("python-pytz" ,python-pytz)
13067 ("python-six" ,python-six)))
13068 (native-inputs
13069 `(("python-tzlocal" ,python-tzlocal)
13070 ("python-blinker" ,python-blinker)
13071 ("python-nose" ,python-nose)
13072 ("python-rednose" ,python-rednose)))
13073 (home-page "https://github.com/noirbizarre/flask-restplus")
13074 (synopsis "Framework for documented API development with Flask")
13075 (description "This package provides a framework for API development with
13076the Flask web framework in Python. It is similar to package
13077@code{python-flask-restful} but supports the @code{python-swagger}
13078documentation builder.")
13079 (license license:expat)))
1ed21519
DM
13080
13081(define-public python-sadisplay
13082 (package
13083 (name "python-sadisplay")
13084 (version "0.4.6")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "sadisplay" version))
13089 (sha256
13090 (base32
13091 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13092 (build-system python-build-system)
13093 (propagated-inputs
13094 `(("python-sqlalchemy" ,python-sqlalchemy)))
13095 (native-inputs
13096 `(("python-nose" ,python-nose)))
13097 (home-page "https://bitbucket.org/estin/sadisplay")
13098 (synopsis "SQLAlchemy schema displayer")
13099 (description "This package provides a program to build Entity
13100Relationship diagrams from a SQLAlchemy model (or directly from the
13101database).")
13102 (license license:bsd-3)))
13103
13104(define-public python2-sadisplay
13105 (package-with-python2 python-sadisplay))
444a79b6
DM
13106
13107(define-public python-flask-restful-swagger
13108 (package
13109 (name "python-flask-restful-swagger")
13110 (version "0.19")
13111 (source
13112 (origin
13113 (method url-fetch)
13114 (uri (pypi-uri "flask-restful-swagger" version))
13115 (sha256
13116 (base32
13117 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13118 (build-system python-build-system)
13119 (propagated-inputs
13120 `(("python-flask-restful" ,python-flask-restful)))
13121 (home-page "https://github.com/rantav/flask-restful-swagger")
13122 (synopsis "Extract Swagger specs from Flask-Restful projects")
13123 (description "This package lets you extract Swagger API documentation
13124specs from your Flask-Restful projects.")
13125 (license license:expat)))
13126
13127(define-public python2-flask-restful-swagger
13128 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13129
13130(define-public python-argcomplete
13131 (package
13132 (name "python-argcomplete")
13133 (version "1.7.0")
13134 (source
13135 (origin
13136 (method url-fetch)
13137 (uri (pypi-uri "argcomplete" version))
13138 (sha256
13139 (base32
13140 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13141 (build-system python-build-system)
80ce42bd
MB
13142 (native-inputs
13143 `(("python-pexpect" ,python-pexpect)
13144 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13145 (home-page "https://github.com/kislyuk/argcomplete")
13146 (synopsis "Shell tab completion for Python argparse")
13147 (description "argcomplete provides extensible command line tab completion
13148of arguments and options for Python scripts using @code{argparse}. It's
13149particularly useful for programs with many options or sub-parsers that can
13150dynamically suggest completions; for example, when browsing resources over the
13151network.")
13152 (license license:asl2.0)))
13153
13154(define-public python2-argcomplete
13155 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13156
13157(define-public python-xopen
13158 (package
13159 (name "python-xopen")
13160 (version "0.1.1")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "xopen" version))
13165 (sha256
13166 (base32
13167 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13168 (file-name (string-append name "-" version ".tar.gz"))))
13169 (build-system python-build-system)
13170 (home-page "https://github.com/marcelm/xopen/")
13171 (synopsis "Open compressed files transparently")
13172 (description "This module provides an @code{xopen} function that works like
13173Python's built-in @code{open} function, but can also deal with compressed files.
13174Supported compression formats are gzip, bzip2 and, xz, and are automatically
13175recognized by their file extensions. The focus is on being as efficient as
13176possible on all supported Python versions.")
13177 (license license:expat)))
13178
13179(define-public python2-xopen
13180 (package-with-python2 python-xopen))
8d67610b
DM
13181
13182(define-public python2-cheetah
13183 (package
13184 (name "python2-cheetah")
13185 (version "2.4.4")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "Cheetah" version))
13190 (sha256
13191 (base32
13192 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13193 (build-system python-build-system)
13194 (arguments
13195 `(#:python ,python-2))
13196 (propagated-inputs
13197 `(("python2-markdown" ,python2-markdown)))
13198 (home-page "https://pythonhosted.org/Cheetah/")
13199 (synopsis "Template engine")
13200 (description "Cheetah is a text-based template engine and Python code
13201generator.
13202
13203Cheetah can be used as a standalone templating utility or referenced as
13204a library from other Python applications. It has many potential uses,
13205but web developers looking for a viable alternative to ASP, JSP, PHP and
13206PSP are expected to be its principle user group.
13207
13208Features:
13209@enumerate
13210@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13211 text-based format.
13212@item Cleanly separates content, graphic design, and program code.
13213@item Blends the power and flexibility of Python with a simple template language
13214 that non-programmers can understand.
13215@item Gives template writers full access to any Python data structure, module,
13216 function, object, or method in their templates.
13217@item Makes code reuse easy by providing an object-orientated interface to
13218 templates that is accessible from Python code or other Cheetah templates.
13219 One template can subclass another and selectively reimplement sections of it.
13220@item Provides a simple, yet powerful, caching mechanism that can dramatically
13221 improve the performance of a dynamic website.
13222@item Compiles templates into optimized, yet readable, Python code.
13223@end enumerate")
13224 (license (license:x11-style "file://LICENSE"))))
916aafa4 13225
d83d8722
DM
13226(define-public python-dulwich
13227 (package
13228 (name "python-dulwich")
13229 (version "0.16.3")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (list (string-append "https://www.dulwich.io/releases/"
13234 "dulwich-" version ".tar.gz")
13235 (pypi-uri "dulwich" version)))
13236 (sha256
13237 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13238 (build-system python-build-system)
13239 (arguments
13240 `(#:phases
13241 (modify-phases %standard-phases
13242 (add-before 'check 'fix-tests
13243 (lambda* (#:key inputs #:allow-other-keys)
13244 ;; The tests use Popen with a custom environment which doesn't
13245 ;; include PATH.
13246 (substitute* "dulwich/tests/compat/utils.py"
13247 (("'git'") (string-append "'"
13248 (which "git")
13249 "'")))
13250 (substitute* '("dulwich/tests/test_repository.py"
13251 "dulwich/tests/test_hooks.py")
13252 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13253 (setenv "TEST_RUNNER" "unittest")
13254 (setenv "PYTHONHASHSEED" "random")
13255 #t)))))
13256 (propagated-inputs
13257 `(("python-fastimport" ,python-fastimport)))
13258 (native-inputs
13259 `(("python-mock" ,python-mock)
13260 ("python-geventhttpclient" ,python-geventhttpclient)
13261 ("git" ,git)))
13262 (home-page "https://www.dulwich.io/")
13263 (synopsis "Git implementation in Python")
13264 (description "Dulwich is an implementation of the Git file formats and
13265protocols written in pure Python.")
13266 ;; Can be used with either license.
13267 (license (list license:asl2.0 license:gpl2+))))
13268
13269(define-public python2-dulwich
13270 (package-with-python2 python-dulwich))
424b1ae7 13271
916aafa4
CZ
13272(define-public python-pbkdf2
13273 (package
13274 (name "python-pbkdf2")
13275 (version "1.3")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "pbkdf2" version))
13280 (sha256
13281 (base32
13282 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13283 (build-system python-build-system)
fffcd8b8
MB
13284 (arguments
13285 '(#:phases
13286 (modify-phases %standard-phases
13287 (replace 'check
13288 (lambda _
13289 (setenv "PYTHONPATH"
13290 (string-append (getcwd) "/build/lib:"
13291 (getenv "PYTHONPATH")))
13292 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13293 (propagated-inputs
13294 `(("python-pycrypto" ,python-pycrypto))) ; optional
13295 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13296 (synopsis "Password-based key derivation")
13297 (description "This module implements the password-based key derivation
13298function, PBKDF2, specified in RSA PKCS#5 v2.0.
13299
13300PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13301is part of the RSA Public Key Cryptography Standards series. The provided
13302implementation takes a password or a passphrase and a salt value (and
13303optionally a iteration count, a digest module, and a MAC module) and provides
13304a file-like object from which an arbitrarly-sized key can be read.")
13305 (license license:expat)))
13306
13307(define-public python2-pbkdf2
13308 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13309
13310(define-public python-qrcode
13311 (package
13312 (name "python-qrcode")
13313 (version "5.3")
13314 (source
13315 (origin
13316 (method url-fetch)
13317 (uri (pypi-uri "qrcode" version))
13318 (sha256
13319 (base32
13320 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13321 (build-system python-build-system)
6925cd78
MB
13322 (arguments
13323 ;; FIXME: Tests require packaging 'pymaging'.
13324 '(#:tests? #f))
cba84a38
CZ
13325 (propagated-inputs
13326 `(("python-lxml" ,python-lxml) ; for SVG output
13327 ("python-pillow" ,python-pillow) ; for PNG output
13328 ("python-six" ,python-six)))
13329 (home-page "https://github.com/lincolnloop/python-qrcode")
13330 (synopsis "QR Code image generator")
13331 (description "This package provides a pure Python QR Code generator
13332module. It uses the Python Imaging Library (PIL) to allow for the generation
13333of QR Codes.
13334
13335In addition this package provides a command line tool to generate QR codes and
13336either write these QR codes to a file or do the output as ascii art at the
13337console.")
13338 (license license:bsd-3)))
13339
13340(define-public python2-qrcode
13341 (package-with-python2 python-qrcode))
af7caada
CZ
13342
13343;; SlowAES isn't compatible with Python 3.
13344(define-public python2-slowaes
13345 (package
13346 (name "python2-slowaes")
13347 (version "0.1a1")
13348 (source
13349 (origin
13350 (method url-fetch)
13351 (uri (pypi-uri "slowaes" version))
13352 (sha256
13353 (base32
13354 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13355 (build-system python-build-system)
13356 (arguments `(#:python ,python-2))
13357 (home-page "http://code.google.com/p/slowaes/")
13358 (synopsis "Implementation of AES in Python")
13359 (description "This package contains an implementation of AES in Python.
13360This implementation is slow (hence the project name) but still useful when
13361faster ones are not available.")
13362 (license license:asl2.0)))
1a917fc9
MFM
13363
13364(define-public python-rst2ansi
13365 (package
13366 (name "python-rst2ansi")
13367 (version "0.1.5")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "rst2ansi" version))
13372 (sha256
13373 (base32
13374 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13375 (build-system python-build-system)
13376 (propagated-inputs
13377 `(("python-docutils" ,python-docutils)))
13378 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13379 (synopsis "Convert RST to ANSI-decorated console output")
13380 (description
13381 "Python module dedicated to rendering RST (reStructuredText) documents
13382to ansi-escaped strings suitable for display in a terminal.")
13383 (license license:expat)))
2f4623db
MFM
13384
13385(define-public python-ddt
13386 (package
13387 (name "python-ddt")
13388 (version "1.1.1")
13389 (source
13390 (origin
13391 (method url-fetch)
13392 (uri (pypi-uri "ddt" version))
13393 (sha256
13394 (base32
13395 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13396 (build-system python-build-system)
13397 (native-inputs
13398 `(("python-mock" ,python-mock)
13399 ("python-nose" ,python-nose)))
13400 (propagated-inputs
13401 `(("python-six" ,python-six)
13402 ("python-pyyaml" ,python-pyyaml)))
13403 (home-page "https://github.com/txels/ddt")
13404 (synopsis "Data-Driven Tests")
13405 (description
13406 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13407it with different test data, and make it appear as multiple test cases.")
13408 (license license:expat)))
13409
13410(define-public python2-ddt
13411 (package-with-python2 python-ddt))
2299b137
MFM
13412
13413(define-public python-pycosat
13414 (package
13415 (name "python-pycosat")
13416 (version "0.6.1")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "pycosat" version))
13421 (sha256
13422 (base32
13423 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13424 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13425 (build-system python-build-system)
13426 (home-page "https://github.com/ContinuumIO/pycosat")
13427 (synopsis "Bindings to picosat (a SAT solver)")
13428 (description
13429 "This package provides efficient Python bindings to @code{picosat} on
13430the C level. When importing pycosat, the @code{picosat} solver becomes part
13431of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13432Problem} (SAT) solver.")
13433 (license license:expat)))
13434
13435(define-public python2-pycosat
13436 (package-with-python2 python-pycosat))
8fd68504
MFM
13437
13438(define-public python2-ruamel.ordereddict
13439 (package
13440 (name "python2-ruamel.ordereddict")
13441 (version "0.4.9")
13442 (source
13443 (origin
13444 (method url-fetch)
13445 (uri (pypi-uri "ruamel.ordereddict" version))
13446 (sha256
13447 (base32
13448 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13449 (build-system python-build-system)
13450 (arguments
13451 `(#:python ,python-2
13452 #:phases
13453 (modify-phases %standard-phases
13454 (delete 'check)
13455 (add-after 'install 'check
13456 (lambda* (#:key inputs outputs #:allow-other-keys)
13457 (add-installed-pythonpath inputs outputs)
13458 (zero? (system* "python" "test/testordereddict.py")))))))
13459 (home-page "https://bitbucket.org/ruamel/ordereddict")
13460 (synopsis "Version of dict that keeps keys in insertion order")
13461 (description
13462 "This is an implementation of an ordered dictionary with @dfn{Key
13463Insertion Order} (KIO: updates of values do not affect the position of the
13464key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13465removed and put at the back). The standard library module @code{OrderedDict},
13466implemented later, implements a subset of @code{ordereddict} functionality.
13467Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13468Order} (KSO, no sorting function can be specified, but a transform can be
13469specified to apply on the key before comparison (e.g. @code{string.lower})).")
13470 (license license:expat)))
d8768e31
EB
13471
13472(define-public python-pypeg2
13473 (package
13474 (name "python-pypeg2")
13475 (version "2.15.2")
13476 (source
13477 (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "pyPEG2" version))
13480 (sha256
13481 (base32
13482 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13483 (build-system python-build-system)
13484 (propagated-inputs `(("python-lxml" ,python-lxml)))
13485 (arguments
13486 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13487 '(#:tests? #f))
13488 (home-page "https://fdik.org/pyPEG/")
13489 (synopsis "Parsering Expression Grammars in Python")
13490 (description "PyPEG is an intrinsic parser interpreter framework for
13491Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13492parse many formal languages.")
13493 (license license:gpl2)))
33e9490c
AI
13494
13495(define-public python2-cliapp
13496 (package
13497 (name "python2-cliapp")
13498 (version "1.20160724")
13499 (source
13500 (origin
13501 (method url-fetch)
13502 (uri (string-append
13503 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13504 version ".tar.gz"))
13505 (sha256
13506 (base32
13507 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13508 (build-system python-build-system)
13509 (arguments
13510 `(#:python ,python-2))
13511 (propagated-inputs
13512 `(("python2-pyaml" ,python2-pyaml)))
13513 (home-page "https://liw.fi/cliapp/")
13514 (synopsis "Python framework for command line programs")
13515 (description "@code{python2-cliapp} is a python framework for
13516command line programs. It contains the typical stuff such programs
13517need to do, such as parsing the command line for options, and
13518iterating over input files.")
13519 (license license:gpl2+)))
13520
77e99411
AI
13521(define-public python2-ttystatus
13522 (package
13523 (name "python2-ttystatus")
13524 (version "0.32")
13525 (source
13526 (origin
13527 (method url-fetch)
13528 (uri (string-append
13529 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13530 version ".tar.gz"))
13531 (sha256
13532 (base32
13533 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13534 (build-system python-build-system)
13535 (arguments
13536 `(#:python ,python-2))
13537 (home-page "https://liw.fi/ttystatus/")
13538 (synopsis "Python library for showing progress reporting and
13539status updates on terminals")
13540 (description "@code{python2-ttystatus} is a python library for
13541showing progress reporting and status updates on terminals, for
13542command line programs. Output is automatically adapted to the width
13543of the terminal: truncated if it does not fit, and resized if the
13544terminal size changes.")
13545 (license license:gpl3+)))
c220f0b4
AI
13546
13547(define-public python2-tracing
13548 (package
13549 (name "python2-tracing")
13550 (version "0.10")
13551 (source
13552 (origin
13553 (method url-fetch)
13554 (uri (string-append
13555 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13556 version ".tar.gz"))
13557 (sha256
13558 (base32
13559 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13560 (build-system python-build-system)
13561 (arguments
13562 `(#:python ,python-2))
13563 (home-page "https://liw.fi/tracing/")
13564 (synopsis "Python debug logging helper")
13565 (description "@code{python2-tracing} is a python library for
13566logging debug messages. It provides a way to turn debugging messages
13567on and off, based on the filename they occur in. It is much faster
13568than using @code{logging.Filter} to accomplish the same thing, which
13569matters when code is run in production mode. The actual logging still
13570happens using the @code{logging} library.")
13571 (license license:gpl3+)))
b6b2ca5d
AI
13572
13573(define-public python2-larch
13574 (package
13575 (name "python2-larch")
13576 (version "1.20151025")
13577 (source
13578 (origin
13579 (method url-fetch)
13580 (uri (string-append
13581 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13582 version ".tar.gz"))
13583 (sha256
13584 (base32
13585 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13586 (build-system python-build-system)
13587 (arguments
13588 `(#:python ,python-2))
13589 (propagated-inputs
13590 `(("python2-tracing" ,python2-tracing)))
13591 (home-page "https://liw.fi/larch/")
13592 (synopsis "Python copy-on-write B-tree library")
13593 (description "@code{python2-larch} is an implementation of
13594particular kind of B-tree, based on research by Ohad Rodeh. See
13595@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13596on the data structure.
13597
13598The distinctive feature of this B-tree is that a node is never
13599(conceptually) modified. Instead, all updates are done by
13600copy-on-write. This makes it easy to clone a tree, and modify only the
13601clone, while other processes access the original tree.")
13602 (license license:gpl3+)))
35db2d3c
AP
13603
13604(define-public python-htmlmin
13605 (package
13606 (name "python-htmlmin")
13607 (version "0.1.10")
13608 (source
13609 (origin
13610 (method url-fetch)
13611 (uri (pypi-uri "htmlmin" version))
13612 (sha256
13613 (base32
13614 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13615 (arguments
13616 `(#:tests? #f)) ;htmlmin has no tests
13617 (build-system python-build-system)
13618 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13619 (synopsis "HTML minifier")
13620 (description "@code{htmlmin} is an HTML minifier that just works.
13621It comes with safe defaults and easily configurable options.")
13622 (license license:bsd-3)))
13623
13624(define-public python2-htmlmin
13625 (package-with-python2 python-htmlmin))
78c55663
AP
13626
13627(define-public python-flask-htmlmin
13628 (package
13629 (name "python-flask-htmlmin")
13630 (version "1.2")
13631 (source
13632 (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "Flask-HTMLmin" version))
13635 (sha256
13636 (base32
13637 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13638 (propagated-inputs
13639 `(("python-flask" ,python-flask)
13640 ("python-htmlmin" ,python-htmlmin)))
13641 (build-system python-build-system)
13642 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13643 (synopsis "HTML response minifier for Flask")
13644 (description
13645 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13646 (license license:bsd-3)))
13647
13648(define-public python2-flask-htmlmin
13649 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
13650
13651(define-public python-flask-login
13652 (package
13653 (name "python-flask-login")
13654 (version "0.4.0")
13655 (source
13656 (origin
13657 (method url-fetch)
13658 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13659 version ".tar.gz"))
13660 (file-name (string-append name "-" version ".tar.gz"))
13661 (sha256
13662 (base32
13663 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13664 (arguments
13665 ;; Tests fail PEP8 compliance. See:
13666 ;; https://github.com/maxcountryman/flask-login/issues/340
13667 `(#:tests? #f))
13668 (build-system python-build-system)
13669 (home-page "https://github.com/maxcountryman/flask-login")
13670 (synopsis "User session management for Flask")
13671 (description
13672 "@code{Flask-Login} provides user session management for Flask. It
13673handles the common tasks of logging in, logging out, and remembering your
13674users' sessions over extended periods of time.")
13675 (license license:expat)))
13676
13677(define-public python2-flask-login
13678 (package-with-python2 python-flask-login))
d5ef113c
AI
13679
13680(define-public python-astroid
13681 (package
13682 (name "python-astroid")
13683 (version "1.4.9")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (string-append
13688 "https://github.com/PyCQA/astroid/archive/astroid-"
13689 version ".tar.gz"))
13690 (sha256
13691 (base32
13692 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13693 (build-system python-build-system)
13694 (propagated-inputs
13695 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13696 ("python-six" ,python-six)
13697 ("python-wrapt" ,python-wrapt)))
13698 (arguments
13699 `(#:phases
13700 (modify-phases %standard-phases
13701 (replace 'check
13702 (lambda _
13703 (zero? (system* "python" "-m" "unittest" "discover"
13704 "-p" "unittest*.py")))))))
13705 (home-page "https://github.com/PyCQA/astroid")
13706 (synopsis "Common base representation of python source code for pylint and
13707other projects")
13708 (description "@code{python-astroid} provides a common base representation
13709of python source code for projects such as pychecker, pyreverse, pylint, etc.
13710
13711It provides a compatible representation which comes from the _ast module. It
13712rebuilds the tree generated by the builtin _ast module by recursively walking
13713down the AST and building an extended ast. The new node classes have
13714additional methods and attributes for different usages. They include some
13715support for static inference and local name scopes. Furthermore, astroid
13716builds partial trees by inspecting living objects.")
13717 (license license:lgpl2.1+)))
13718
13719(define-public python2-astroid
13720 (package-with-python2 python-astroid))
6ba0af79
AI
13721
13722(define-public python-isort
13723 (package
13724 (name "python-isort")
13725 (version "4.2.5")
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (string-append
13730 "https://github.com/timothycrosley/isort/archive/"
13731 version ".tar.gz"))
13732 (file-name (string-append name "-" version ".tar.gz"))
13733 (sha256
13734 (base32
13735 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13736 (build-system python-build-system)
13737 (native-inputs
13738 `(("python-mock" ,python-mock)
13739 ("python-pytest" ,python-pytest)))
13740 (home-page "https://github.com/timothycrosley/isort")
13741 (synopsis "Python utility/library to sort python imports")
13742 (description "@code{python-isort} is a python utility/library to sort
13743imports alphabetically, and automatically separated into sections. It
13744provides a command line utility, a python library and plugins for various
13745editors.")
13746 (license license:expat)))
13747
13748(define-public python2-isort
13749 (package-with-python2 python-isort))
965a083e
AI
13750
13751(define-public python2-backports-functools-lru-cache
13752 (package
13753 (name "python2-backports-functools-lru-cache")
13754 (version "1.3")
13755 (source
13756 (origin
13757 (method url-fetch)
13758 ;; only the pypi tarballs contain the necessary metadata
13759 (uri (pypi-uri "backports.functools_lru_cache" version))
13760 (sha256
13761 (base32
13762 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13763 (build-system python-build-system)
13764 (native-inputs
13765 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13766 (arguments
13767 `(#:python ,python-2))
13768 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13769 (synopsis "Backport of functools.lru_cache from Python 3.3")
13770 (description "@code{python2-backports-functools-lru-cache} is a backport
13771of @code{functools.lru_cache} from python 3.3.")
13772 (license license:expat)))
23db3fc6
AI
13773
13774(define-public python-configparser
13775 (package
13776 (name "python-configparser")
13777 (version "3.5.0")
13778 (source
13779 (origin
13780 (method url-fetch)
13781 (uri (string-append
13782 "https://bitbucket.org/ambv/configparser/get/"
13783 version ".tar.bz2"))
13784 (file-name (string-append name "-" version ".tar.gz"))
13785 (sha256
13786 (base32
13787 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13788 (build-system python-build-system)
13789 (home-page "http://docs.python.org/py3k/library/configparser.html")
13790 (synopsis "Backport of configparser from python 3.5")
13791 (description "@code{python-configparser} is a backport of
13792@code{configparser} from Python 3.5 so that it can be used directly
13793in other versions.")
13794 (license license:expat)))
13795
13796(define-public python2-configparser
13797 (package-with-python2 python-configparser))
61550ded
AI
13798
13799(define-public python2-coverage-test-runner
13800 (package
13801 (name "python2-coverage-test-runner")
13802 (version "1.11")
13803 (source
13804 (origin
13805 (method url-fetch)
13806 (uri (string-append
13807 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13808 "coverage-test-runner/snapshot/coverage-test-runner-"
13809 version ".tar.gz"))
13810 (sha256
13811 (base32
13812 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13813 (build-system python-build-system)
13814 (arguments
13815 `(#:python ,python-2
13816 #:phases
13817 (modify-phases %standard-phases
13818 (replace 'check
13819 (lambda _
13820 (zero? (system* "./testrun")))))))
13821 (propagated-inputs
13822 `(("python2-coverage" ,python2-coverage)))
13823 (home-page "https://liw.fi/coverage-test-runner/")
13824 (synopsis "Python module for running unit tests")
13825 (description "@code{CoverageTestRunner} is a python module for running
13826unit tests and failing them if the unit test module does not excercise all
13827statements in the module it tests.")
13828 (license license:gpl3+)))
315944a3
AI
13829
13830(define-public python-pylint
13831 (package
13832 (name "python-pylint")
13833 (version "1.6.5")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (string-append
13838 "https://github.com/PyCQA/pylint/archive/pylint-"
13839 version ".tar.gz"))
13840 (sha256
13841 (base32
13842 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13843 (build-system python-build-system)
13844 (native-inputs
13845 `(("python-tox" ,python-tox)))
13846 (propagated-inputs
13847 `(("python-astroid" ,python-astroid)
13848 ("python-isort" ,python-isort)
13849 ("python-mccabe" ,python-mccabe)
13850 ("python-six" ,python-six)))
13851 (arguments
13852 `(#:phases
13853 (modify-phases %standard-phases
13854 (replace 'check
13855 (lambda _
13856 ;; Somehow, tests for python2-pylint
13857 ;; fail if run from the build directory
13858 (let ((work "/tmp/work"))
13859 (mkdir-p work)
13860 (setenv "PYTHONPATH"
13861 (string-append (getenv "PYTHONPATH") ":" work))
13862 (copy-recursively "." work)
13863 (with-directory-excursion "/tmp"
13864 (zero? (system* "python" "-m" "unittest" "discover"
13865 "-s" (string-append work "/pylint/test")
13866 "-p" "*test_*.py")))))))))
13867 (home-page "https://github.com/PyCQA/pylint")
13868 (synopsis "Python source code analyzer which looks for coding standard
13869errors")
13870 (description "Pylint is a Python source code analyzer which looks
13871for programming errors, helps enforcing a coding standard and sniffs
13872for some code smells (as defined in Martin Fowler's Refactoring book).
13873
13874Pylint has many rules enabled by default, way too much to silence them
13875all on a minimally sized program. It's highly configurable and handle
13876pragmas to control it from within your code. Additionally, it is
13877possible to write plugins to add your own checks.")
13878 (license license:gpl2+)))
13879
13880(define-public python2-pylint
13881 (let ((pylint (package-with-python2 python-pylint)))
13882 (package (inherit pylint)
13883 (propagated-inputs
13884 `(("python2-backports-functools-lru-cache"
13885 ,python2-backports-functools-lru-cache)
13886 ("python2-configparser" ,python2-configparser)
13887 ,@(package-propagated-inputs pylint))))))