gnu: Add python-django-overextends.
[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>
c5be3467 17;;; Copyright © 2015, 2016, 2017 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>
f9f67fcb 39;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
16fe516e 40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a01b6da7
NK
41;;;
42;;; This file is part of GNU Guix.
43;;;
44;;; GNU Guix is free software; you can redistribute it and/or modify it
45;;; under the terms of the GNU General Public License as published by
46;;; the Free Software Foundation; either version 3 of the License, or (at
47;;; your option) any later version.
48;;;
49;;; GNU Guix is distributed in the hope that it will be useful, but
50;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52;;; GNU General Public License for more details.
53;;;
54;;; You should have received a copy of the GNU General Public License
55;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56
1ffa7090 57(define-module (gnu packages python)
3f641af0 58 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 59 #:use-module (gnu packages)
8e451885 60 #:use-module (gnu packages algebra)
d79a343b 61 #:use-module (gnu packages adns)
89b2e0b0 62 #:use-module (gnu packages attr)
d96034ed 63 #:use-module (gnu packages backup)
3969ca54 64 #:use-module (gnu packages bash)
1ffa7090 65 #:use-module (gnu packages compression)
4ed20663 66 #:use-module (gnu packages databases)
ddc63a56 67 #:use-module (gnu packages django)
5e1c9367 68 #:use-module (gnu packages file)
4ed20663 69 #:use-module (gnu packages fontutils)
4ed20663
AE
70 #:use-module (gnu packages gcc)
71 #:use-module (gnu packages ghostscript)
6eb7af2a 72 #:use-module (gnu packages gl)
4ed20663 73 #:use-module (gnu packages glib)
c227458a 74 #:use-module (gnu packages graphviz)
6eb7af2a 75 #:use-module (gnu packages gstreamer)
4ed20663 76 #:use-module (gnu packages gtk)
421a80a2 77 #:use-module (gnu packages icu4c)
c937562e 78 #:use-module (gnu packages image)
4ed20663 79 #:use-module (gnu packages imagemagick)
d79a343b 80 #:use-module (gnu packages libevent)
b10ab723 81 #:use-module (gnu packages libffi)
89b2e0b0 82 #:use-module (gnu packages linux)
ed118043 83 #:use-module (gnu packages man)
0da98533 84 #:use-module (gnu packages maths)
4ed20663 85 #:use-module (gnu packages multiprecision)
45203542 86 #:use-module (gnu packages networking)
be7134bf 87 #:use-module (gnu packages ncurses)
b04a52a6 88 #:use-module (gnu packages openstack)
d488d5d6 89 #:use-module (gnu packages password-utils)
c9b1b4f9 90 #:use-module (gnu packages pcre)
4ed20663 91 #:use-module (gnu packages perl)
b10ab723 92 #:use-module (gnu packages pkg-config)
06ff0837 93 #:use-module (gnu packages protobuf)
4535a93a 94 #:use-module (gnu packages qt)
4ed20663 95 #:use-module (gnu packages readline)
6eb7af2a 96 #:use-module (gnu packages sdl)
80ce42bd 97 #:use-module (gnu packages shells)
c9b1b4f9 98 #:use-module (gnu packages statistics)
8f9ac901 99 #:use-module (gnu packages tex)
1c65314c 100 #:use-module (gnu packages texinfo)
cc2b77df 101 #:use-module (gnu packages tls)
e25f0174 102 #:use-module (gnu packages version-control)
02f8f804 103 #:use-module (gnu packages video)
8d12be1e 104 #:use-module (gnu packages web)
ce0614dd 105 #:use-module (gnu packages base)
26b307e2 106 #:use-module (gnu packages xml)
6fa14469 107 #:use-module (gnu packages xorg)
0bdc1671 108 #:use-module (gnu packages xdisorg)
4ed20663 109 #:use-module (gnu packages zip)
afa181ff 110 #:use-module (gnu packages tcl)
63bcec71 111 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
112 #:use-module (guix packages)
113 #:use-module (guix download)
ea5456c8 114 #:use-module (guix git-download)
11bb85a1 115 #:use-module (guix utils)
acc26ff1 116 #:use-module (guix build-system gnu)
d8c4998f 117 #:use-module (guix build-system cmake)
898238b9 118 #:use-module (guix build-system python)
1c65314c
FB
119 #:use-module (guix build-system trivial)
120 #:use-module (srfi srfi-1))
a01b6da7 121
45848023 122(define-public python-2.7
a01b6da7
NK
123 (package
124 (name "python")
49c2a46e 125 (version "2.7.13")
a01b6da7
NK
126 (source
127 (origin
128 (method url-fetch)
9b43a0ff 129 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
130 version "/Python-" version ".tar.xz"))
131 (sha256
132 (base32
49c2a46e 133 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
c3052d6b
ML
134 (patches (search-patches "python-2.7-search-paths.patch"
135 "python-2-deterministic-build-info.patch"
15e57f57 136 "python-2.7-site-prefixes.patch"
dc5cec21
LF
137 "python-2.7-source-date-epoch.patch"
138 "python-2.7-getentropy-on-old-kernels.patch"))
10a42aa2
EF
139 (modules '((guix build utils)))
140 ;; suboptimal to delete failing tests here, but if we delete them in the
141 ;; arguments then we need to make sure to strip out that phase when it
142 ;; gets inherited by python and python-minimal.
143 (snippet
144 '(begin
145 (for-each delete-file
146 '("Lib/test/test_compileall.py"
f0499100 147 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
148 "Lib/test/test_distutils.py"
149 "Lib/test/test_import.py"
150 "Lib/test/test_shutil.py"
151 "Lib/test/test_socket.py"
1bb163b0 152 "Lib/test/test_subprocess.py"))
10a42aa2 153 #t))))
02f0c3b2
LC
154 (outputs '("out"
155 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 156 (build-system gnu-build-system)
3fdc99da 157 (arguments
10a42aa2 158 `(;; 356 tests OK.
e7e7a1eb
EF
159 ;; 6 tests failed:
160 ;; test_compileall test_distutils test_import test_shutil test_socket
161 ;; test_subprocess
162 ;; 39 tests skipped:
ff6f33cf
ED
163 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
164 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
165 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
166 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
167 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
168 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
169 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
170 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
171 ;; test_winreg test_winsound test_zipfile64
172 ;; 4 skips unexpected on linux2:
173 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 174 #:test-target "test"
3fdc99da 175 #:configure-flags
6a20289d
LC
176 (list "--enable-shared" ;allow embedding
177 "--with-system-ffi" ;build ctypes
aaf75c89 178 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 179 "--enable-unicode=ucs4"
6a20289d
LC
180 (string-append "LDFLAGS=-Wl,-rpath="
181 (assoc-ref %outputs "out") "/lib"))
fd982732 182
d2cc9c7c
LC
183 #:modules ((ice-9 ftw) (ice-9 match)
184 (guix build utils) (guix build gnu-build-system))
fd982732 185 #:phases
46472ecd
MW
186 (modify-phases %standard-phases
187 (add-before
188 'configure 'patch-lib-shells
189 (lambda _
190 ;; Filter for existing files, since some may not exist in all
191 ;; versions of python that are built with this recipe.
192 (substitute* (filter file-exists?
193 '("Lib/subprocess.py"
194 "Lib/popen2.py"
195 "Lib/distutils/tests/test_spawn.py"
196 "Lib/test/test_subprocess.py"))
197 (("/bin/sh") (which "sh")))
dedc8320
LC
198
199 ;; Use zero as the timestamp in .pyc files so that builds are
200 ;; deterministic. TODO: Remove it when this variable is set in
201 ;; gnu-build-system.scm.
a665996f 202 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 203 #t))
5b4e2791
LC
204 (add-before 'configure 'do-not-record-configure-flags
205 (lambda* (#:key configure-flags #:allow-other-keys)
206 ;; Remove configure flags from the installed '_sysconfigdata.py'
207 ;; and 'Makefile' so we don't end up keeping references to the
208 ;; build tools.
209 ;;
210 ;; Preserve at least '--with-system-ffi' since otherwise the
211 ;; thing tries to build libffi, fails, and we end up with a
212 ;; Python that lacks ctypes.
213 (substitute* "configure"
214 (("^CONFIG_ARGS=.*$")
215 (format #f "CONFIG_ARGS='~a'\n"
216 (if (member "--with-system-ffi" configure-flags)
217 "--with-system-ffi"
218 ""))))
219 #t))
46472ecd
MW
220 (add-before
221 'check 'pre-check
222 (lambda _
223 ;; 'Lib/test/test_site.py' needs a valid $HOME
224 (setenv "HOME" (getcwd))
225 #t))
226 (add-after
227 'unpack 'set-source-file-times-to-1980
228 ;; XXX One of the tests uses a ZIP library to pack up some of the
229 ;; source tree, and fails with "ZIP does not support timestamps
230 ;; before 1980". Work around this by setting the file times in the
231 ;; source tree to sometime in early 1980.
232 (lambda _
233 (let ((circa-1980 (* 10 366 24 60 60)))
234 (ftw "." (lambda (file stat flag)
235 (utime file circa-1980 circa-1980)
236 #t))
02f0c3b2 237 #t)))
9ffe61b0
LC
238 (add-after 'install 'remove-tests
239 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
240 ;; because these files are used by some libraries out there.
241 (lambda* (#:key outputs #:allow-other-keys)
242 (let ((out (assoc-ref outputs "out")))
243 (match (scandir (string-append out "/lib")
244 (lambda (name)
245 (string-prefix? "python" name)))
246 ((pythonX.Y)
247 (let ((testdir (string-append out "/lib/" pythonX.Y
248 "/test")))
249 (with-directory-excursion testdir
250 (for-each delete-file-recursively
251 (scandir testdir
252 (match-lambda
253 ((or "." "..") #f)
254 (file
255 (not
256 (string-prefix? "test_support."
257 file))))))
258 (call-with-output-file "__init__.py" (const #t))
259 #t)))))))
216c283b
LC
260 (add-before 'strip 'make-libraries-writable
261 (lambda* (#:key outputs #:allow-other-keys)
262 ;; Make .so files writable so they can be stripped.
263 (let ((out (assoc-ref outputs "out")))
264 (for-each (lambda (file)
265 (chmod file #o755))
266 (find-files (string-append out "/lib")
267 "\\.so"))
268 #t)))
02f0c3b2
LC
269 (add-after 'install 'move-tk-inter
270 (lambda* (#:key outputs #:allow-other-keys)
271 ;; When Tkinter support is built move it to a separate output so
272 ;; that the main output doesn't contain a reference to Tcl/Tk.
273 (let ((out (assoc-ref outputs "out"))
274 (tk (assoc-ref outputs "tk")))
275 (when tk
276 (match (find-files out "tkinter.*\\.so")
277 ((tkinter.so)
278 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
279 ;; want it under TK/lib/pythonX.Y/site-packages.
280 (let* ((len (string-length out))
281 (target (string-append
282 tk "/"
283 (string-drop
284 (dirname (dirname tkinter.so))
285 len)
286 "/site-packages")))
287 (install-file tkinter.so target)
288 (delete-file tkinter.so)))))
289 #t))))))
a01b6da7 290 (inputs
3fdc99da
CR
291 `(("bzip2" ,bzip2)
292 ("gdbm" ,gdbm)
b10ab723 293 ("libffi" ,libffi) ; for ctypes
b88e1b0a 294 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 295 ("openssl" ,openssl)
3fdc99da 296 ("readline" ,readline)
afa181ff
LC
297 ("zlib" ,zlib)
298 ("tcl" ,tcl)
299 ("tk" ,tk))) ; for tkinter
b10ab723
CR
300 (native-inputs
301 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
302 (native-search-paths
303 (list (search-path-specification
304 (variable "PYTHONPATH")
af070955 305 (files '("lib/python2.7/site-packages")))))
f0499100 306 (home-page "https://www.python.org")
afa181ff 307 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
308 (description
309 "Python is a remarkably powerful dynamic programming language that
310is used in a wide variety of application domains. Some of its key
311distinguishing features include: clear, readable syntax; strong
312introspection capabilities; intuitive object orientation; natural
313expression of procedural code; full modularity, supporting hierarchical
314packages; exception-based error handling; and very high level dynamic
315data types.")
3f641af0 316 (license license:psfl)))
acc26ff1 317
45848023
HG
318;; Current 2.x version.
319(define-public python-2 python-2.7)
320
72df6680 321(define-public python-3.5
b24d1cfc 322 (package (inherit python-2)
343cee8a 323 (version "3.5.3")
717003e3
LC
324 (source (origin
325 (method url-fetch)
326 (uri (string-append "https://www.python.org/ftp/python/"
327 version "/Python-" version ".tar.xz"))
fc1adab1
AK
328 (patches (search-patches
329 "python-fix-tests.patch"
72df6680 330 "python-3.5-fix-tests.patch"
e4d34cd0 331 "python-3.5-getentropy-on-old-kernels.patch"
fc1adab1
AK
332 "python-3-deterministic-build-info.patch"
333 "python-3-search-paths.patch"))
717003e3
LC
334 (patch-flags '("-p0"))
335 (sha256
336 (base32
343cee8a 337 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
fd615918
EF
338 (snippet
339 '(delete-file
340 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
1f434457
MW
341 (arguments (substitute-keyword-arguments (package-arguments python-2)
342 ((#:tests? _) #t)))
1aebc0cb
AE
343 (native-search-paths
344 (list (search-path-specification
345 (variable "PYTHONPATH")
0e05d01e
SB
346 (files (list (string-append "lib/python"
347 (version-major+minor version)
348 "/site-packages"))))))))
f26a77ff 349
45848023 350;; Current 3.x version.
72df6680 351(define-public python-3 python-3.5)
45848023
HG
352
353;; Current major version.
354(define-public python python-3)
355
95288fcc
LC
356;; Minimal variants of Python, mostly used to break the cycle between Tk and
357;; Python (Tk -> libxcb -> Python.)
358
359(define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
02f0c3b2 362 (outputs '("out"))
5927a843
LC
363
364 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
365 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
366 ;; libffi.
367 (inputs `(("libffi" ,libffi)
368 ("zlib" ,zlib)))))
95288fcc
LC
369
370(define-public python-minimal
898238b9 371 (package (inherit python)
95288fcc 372 (name "python-minimal")
02f0c3b2 373 (outputs '("out"))
95288fcc 374
d0b73960 375 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
376 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
377 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
378 (inputs `(("libffi" ,libffi)
379 ("openssl" ,openssl)
95288fcc
LC
380 ("zlib" ,zlib)))))
381
64cb064c
LC
382(define* (wrap-python3 python
383 #:optional
384 (name (string-append (package-name python) "-wrapper")))
898238b9 385 (package (inherit python)
95288fcc 386 (name name)
898238b9
AE
387 (source #f)
388 (build-system trivial-build-system)
02f0c3b2 389 (outputs '("out"))
3969ca54 390 (inputs `(("bash" ,bash)))
3c0f2329 391 (propagated-inputs `(("python" ,python)))
898238b9
AE
392 (arguments
393 `(#:modules ((guix build utils))
394 #:builder
395 (begin
396 (use-modules (guix build utils))
397 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
398 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
399 (mkdir-p bin)
400 (for-each
401 (lambda (old new)
402 (symlink (string-append python old)
403 (string-append bin "/" new)))
3969ca54
SB
404 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
405 `("python" ,"pydoc" ,"idle" ,"pip"))
406 ;; python-config outputs search paths based upon its location,
407 ;; use a bash wrapper to avoid changing its outputs.
408 (let ((bash (string-append (assoc-ref %build-inputs "bash")
409 "/bin/bash"))
410 (old (string-append python "python3-config"))
411 (new (string-append bin "/python-config")))
412 (with-output-to-file new
413 (lambda ()
414 (format #t "#!~a~%" bash)
415 (format #t "exec \"~a\" \"$@\"~%" old)
416 (chmod new #o755)
417 #t)))))))
0d56e3e1
LC
418 (synopsis "Wrapper for the Python 3 commands")
419 (description
420 "This package provides wrappers for the commands of Python@tie{}3.x such
421that they can be invoked under their usual name---e.g., @command{python}
422instead of @command{python3}.")))
423
95288fcc
LC
424(define-public python-wrapper (wrap-python3 python))
425(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 426
aaf625b8
RW
427(define-public python-psutil
428 (package
429 (name "python-psutil")
88535a44 430 (version "4.3.0")
aaf625b8
RW
431 (source
432 (origin
433 (method url-fetch)
f56777be 434 (uri (pypi-uri "psutil" version))
aaf625b8
RW
435 (sha256
436 (base32
88535a44 437 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 438 (build-system python-build-system)
fb08c4fe
MB
439 (arguments
440 ;; FIXME: some tests does not return and times out.
441 '(#:tests? #f))
88535a44 442 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
443 (synopsis "Library for retrieving information on running processes")
444 (description
445 "psutil (Python system and process utilities) is a library for retrieving
446information on running processes and system utilization (CPU, memory, disks,
447network) in Python. It is useful mainly for system monitoring, profiling and
448limiting process resources and management of running processes. It implements
449many functionalities offered by command line tools such as: ps, top, lsof,
450netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
451pidof, tty, taskset, pmap.")
3f641af0 452 (license license:bsd-3)))
aaf625b8
RW
453
454(define-public python2-psutil
455 (package-with-python2 python-psutil))
898238b9 456
f9da1d8a
ED
457(define-public python-passlib
458 (package
459 (name "python-passlib")
3b86a385 460 (version "1.7.1")
f9da1d8a
ED
461 (source
462 (origin
463 (method url-fetch)
690e8c66 464 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
465 (sha256
466 (base32
3b86a385 467 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
468 (build-system python-build-system)
469 (native-inputs
f3b98f4f 470 `(("python-nose" ,python-nose)))
f22efa01 471 (propagated-inputs
f9da1d8a
ED
472 `(("python-py-bcrypt" ,python-py-bcrypt)))
473 (arguments
474 `(#:phases
475 (alist-cons-before
476 'check 'set-PYTHON_EGG_CACHE
477 ;; some tests require access to "$HOME/.cython"
478 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
479 %standard-phases)))
480 (home-page "https://bitbucket.org/ecollins/passlib")
481 (synopsis
482 "Comprehensive password hashing framework")
483 (description
484 "Passlib is a password hashing library for Python 2 & 3, which provides
485cross-platform implementations of over 30 password hashing algorithms, as well
486as a framework for managing existing password hashes. It's designed to be
487useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
488to providing full-strength password hashing for multi-user application.")
3f641af0 489 (license license:bsd-3)))
f9da1d8a
ED
490
491(define-public python2-passlib
492 (package-with-python2 python-passlib))
493
feb0d9c3
ED
494(define-public python-py-bcrypt
495 (package
496 (name "python-py-bcrypt")
497 (version "0.4")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (string-append
502 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
503 version
504 ".tar.gz"))
505 (sha256
506 (base32
507 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
508 (build-system python-build-system)
feb0d9c3
ED
509 (home-page "https://code.google.com/p/py-bcrypt")
510 (synopsis
511 "Bcrypt password hashing and key derivation")
512 (description
513 "A python wrapper of OpenBSD's Blowfish password hashing code. This
514system hashes passwords using a version of Bruce Schneier's Blowfish block
515cipher with modifications designed to raise the cost of off-line password
516cracking and frustrate fast hardware implementation. The computation cost of
517the algorithm is parametised, so it can be increased as computers get faster.
518The intent is to make a compromise of a password database less likely to
519result in an attacker gaining knowledge of the plaintext passwords (e.g. using
520John the Ripper).")
521 ;; "sha2.c" is under BSD-3;
522 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
523 ;; the rest is under ISC.
3f641af0 524 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
525
526(define-public python2-py-bcrypt
527 (package-with-python2 python-py-bcrypt))
528
529
429fdea1
ED
530(define-public python-paramiko
531 (package
532 (name "python-paramiko")
c1aba1a7 533 (version "1.17.4")
429fdea1
ED
534 (source
535 (origin
536 (method url-fetch)
81b9bbbd 537 (uri (pypi-uri "paramiko" version))
429fdea1
ED
538 (sha256
539 (base32
c1aba1a7 540 "1rs2qcmskcmq66q6g5al08wa41l9am0fad5r719m8wf91msyylqw"))))
429fdea1 541 (build-system python-build-system)
49910e6a
MB
542 (arguments
543 '(;; FIXME: One test fails with "EOFError not raised by connect".
544 #:tests? #f))
545 ;; #:phases
546 ;; (modify-phases %standard-phases
547 ;; (replace 'check
548 ;; (lambda _
549 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 550 (propagated-inputs
f22efa01
HG
551 `(("python-pycrypto" ,python-pycrypto)
552 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
553 (home-page "http://www.paramiko.org/")
554 (synopsis "SSHv2 protocol library")
555 (description "Paramiko is a python implementation of the SSHv2 protocol,
556providing both client and server functionality. While it leverages a Python C
557extension for low level cryptography (PyCrypto), Paramiko itself is a pure
558Python interface around SSH networking concepts.")
3f641af0 559 (license license:lgpl2.1+)))
429fdea1
ED
560
561(define-public python2-paramiko
562 (package-with-python2 python-paramiko))
563
564
de73dbf6
ED
565(define-public python-httplib2
566 (package
567 (name "python-httplib2")
286f1bac 568 (version "0.9.2")
de73dbf6
ED
569 (source
570 (origin
571 (method url-fetch)
286f1bac 572 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
573 (sha256
574 (base32
286f1bac 575 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 576 (build-system python-build-system)
286f1bac 577 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
578 (synopsis "Comprehensive HTTP client library")
579 (description
580 "A comprehensive HTTP client library supporting many features left out of
581other HTTP libraries.")
582 (license license:expat)))
583
584(define-public python2-httplib2
585 (package-with-python2 python-httplib2))
586
67039875
ED
587(define-public python-ecdsa
588 (package
589 (name "python-ecdsa")
590 (version "0.13")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (string-append
595 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
596 version
597 ".tar.gz"))
598 (sha256
599 (base32
600 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
601 (build-system python-build-system)
67039875
ED
602 (inputs
603 `(("openssl" ,openssl)))
604 (home-page
7bf837fd 605 "https://github.com/warner/python-ecdsa")
67039875
ED
606 (synopsis
607 "ECDSA cryptographic signature library (pure python)")
608 (description
609 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
610Curve Digital Signature Algorithm), implemented purely in Python. With this
611library, you can quickly create keypairs (signing key and verifying key), sign
612messages, and verify the signatures. The keys and signatures are very short,
613making them easy to handle and incorporate into other protocols.")
614 (license license:expat)))
615
616(define-public python2-ecdsa
617 (package-with-python2 python-ecdsa))
618
52323f32
ED
619(define-public python-ccm
620 (package
621 (name "python-ccm")
db5567f7 622 (version "2.1.6")
52323f32
ED
623 (source
624 (origin
625 (method url-fetch)
db5567f7 626 (uri (pypi-uri "ccm" version))
52323f32
ED
627 (sha256
628 (base32
db5567f7 629 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 630 (build-system python-build-system)
f22efa01 631 (propagated-inputs
52323f32 632 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
633 ;; Not listed in setup.py, but used in ccmlib/node.py for full
634 ;; functionality
635 ("python-psutil" ,python-psutil)
52323f32
ED
636 ("python-six" ,python-six)))
637 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
638 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
639localhost")
640 (description "Cassandra Cluster Manager is a development tool for testing
641local Cassandra clusters. It creates, launches and removes Cassandra clusters
642on localhost.")
3f641af0 643 (license license:asl2.0)))
52323f32
ED
644
645(define-public python2-ccm
646 (package-with-python2 python-ccm))
647
89114f39 648(define-public python-pytz
acc26ff1 649 (package
89114f39 650 (name "python-pytz")
a5f92ca0 651 (version "2016.10")
acc26ff1
CR
652 (source
653 (origin
654 (method url-fetch)
61c9babb 655 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
656 (sha256
657 (base32
a5f92ca0 658 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 659 (build-system python-build-system)
8498b8cf 660 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 661 (home-page "http://pythonhosted.org/pytz")
9e771e3b 662 (synopsis "Python timezone library")
acc26ff1
CR
663 (description
664 "This library allows accurate and cross platform timezone calculations
665using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 666 (license license:expat)))
5ace6e2f 667
89114f39 668(define-public python2-pytz
11bb85a1 669 (package-with-python2 python-pytz))
89114f39 670
fc50e9c6 671
89114f39 672(define-public python-babel
5ace6e2f 673 (package
89114f39 674 (name "python-babel")
ffb1e98d 675 (version "2.3.4")
5ace6e2f
CR
676 (source
677 (origin
678 (method url-fetch)
b850a6d8 679 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
680 (sha256
681 (base32
ffb1e98d 682 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 683 (build-system python-build-system)
f22efa01 684 (propagated-inputs
f3b98f4f 685 `(("python-pytz" ,python-pytz)))
8498b8cf 686 (arguments `(#:tests? #f)) ; no test target
e1804763 687 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
688 (synopsis
689 "Tools for internationalizing Python applications")
690 (description
691 "Babel is composed of two major parts:
692- tools to build and work with gettext message catalogs
693- a Python interface to the CLDR (Common Locale Data Repository), providing
694access to various locale display names, localized number and date formatting,
695etc. ")
3f641af0 696 (license license:bsd-3)))
89114f39
AE
697
698(define-public python2-babel
11bb85a1 699 (package-with-python2 python-babel))
73adf220 700
ed377cc6
RW
701(define-public python2-backport-ssl-match-hostname
702 (package
703 (name "python2-backport-ssl-match-hostname")
f2d06d46 704 (version "3.5.0.1")
ed377cc6
RW
705 (source
706 (origin
707 (method url-fetch)
708 (uri (string-append
709 "https://pypi.python.org/packages/source/b/"
710 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
711 version ".tar.gz"))
712 (sha256
713 (base32
f2d06d46 714 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 715 (build-system python-build-system)
f2d06d46
EF
716 (arguments
717 `(#:python ,python-2
718 #:tests? #f)) ; no test target
f2d06d46
EF
719 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
720 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
721 (description
722 "This backport brings the ssl.match_hostname() function to users of
723earlier versions of Python. The function checks the hostname in the
724certificate returned by the server to which a connection has been established,
725and verifies that it matches the intended target hostname.")
3f641af0 726 (license license:psfl)))
ed377cc6 727
d205f895
TD
728(define-public python-hdf4
729 (package
730 (name "python-hdf4")
731 (version "0.9")
732 (source
733 (origin
734 (method url-fetch)
735 (uri (pypi-uri name version))
736 (sha256
737 (base32
738 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
739 (build-system python-build-system)
740 (native-inputs `(("nose" ,python-nose)))
741 (propagated-inputs `(("numpy" ,python-numpy)))
742 (inputs
743 `(("hdf4" ,hdf4)
744 ("libjpeg" ,libjpeg)
745 ("zlib" ,zlib)))
746 (arguments
747 `(#:phases
748 (modify-phases %standard-phases
749 (replace 'check
750 (lambda _
751 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
752 ;; on to import numpy. Somehow this works on their CI system.
753 ;; Let's just manage PYTHONPATH here instead.
754 (substitute* "runexamples.sh"
755 (("export PYTHONPATH=.*") ""))
756 (setenv "PYTHONPATH"
757 (string-append (getcwd) ":"
758 (getenv "PYTHONPATH")))
759 (and (zero? (system* "./runexamples.sh"))
760 (zero? (system* "nosetests" "-v"))))))))
761 (home-page "https://github.com/fhs/python-hdf4")
762 (synopsis "Python interface to the NCSA HDF4 library")
763 (description
764 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
765which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
766NetCDF files can also be read and modified. Python-HDF4 is a fork of
767@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
768 (license license:expat)))
769
770(define-public python2-hdf4
771 (package-with-python2 python-hdf4))
772
ef5cbf9b
RW
773(define-public python-h5py
774 (package
775 (name "python-h5py")
fe147c41 776 (version "2.6.0")
ef5cbf9b
RW
777 (source
778 (origin
779 (method url-fetch)
fe147c41 780 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
781 (sha256
782 (base32
fe147c41 783 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 784 (build-system python-build-system)
797e1401
RW
785 (arguments
786 `(#:tests? #f ; no test target
787 #:phases
788 (modify-phases %standard-phases
789 (add-after 'unpack 'fix-hdf5-paths
790 (lambda* (#:key inputs #:allow-other-keys)
791 (let ((prefix (assoc-ref inputs "hdf5")))
792 (substitute* "setup_build.py"
793 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
794 (string-append "['" prefix "/lib" "']"))
795 (("'/opt/local/include', '/usr/local/include'")
796 (string-append "'" prefix "/include" "'")))
797 (substitute* "setup_configure.py"
798 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
799 (string-append "['" prefix "/lib" "']")))
800 #t))))))
3c4010b1 801 (propagated-inputs
69866690
HG
802 `(("python-six" ,python-six)
803 ("python-numpy" ,python-numpy)))
ef5cbf9b 804 (inputs
69866690 805 `(("hdf5" ,hdf5)))
ef5cbf9b 806 (native-inputs
fe147c41
EF
807 `(("python-cython" ,python-cython)
808 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
809 (home-page "http://www.h5py.org/")
810 (synopsis "Read and write HDF5 files from Python")
811 (description
812 "The h5py package provides both a high- and low-level interface to the
813HDF5 library from Python. The low-level interface is intended to be a
814complete wrapping of the HDF5 API, while the high-level component supports
815access to HDF5 files, datasets and groups using established Python and NumPy
816concepts.")
9820a028 817 (license license:bsd-3)))
ef5cbf9b
RW
818
819(define-public python2-h5py
9820a028 820 (package-with-python2 python-h5py))
ef5cbf9b 821
ea8450c8
TD
822(define-public python-netcdf4
823 (package
824 (name "python-netcdf4")
d5a97839 825 (version "1.2.7")
ea8450c8
TD
826 (source
827 (origin
828 (method url-fetch)
829 (uri (pypi-uri "netCDF4" version))
830 (sha256
831 (base32
d5a97839 832 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
833 (build-system python-build-system)
834 (native-inputs
835 `(("python-cython" ,python-cython)))
836 (propagated-inputs
837 `(("python-numpy" ,python-numpy)))
838 (inputs
839 `(("netcdf" ,netcdf)
840 ("hdf4" ,hdf4)
841 ("hdf5" ,hdf5)))
842 (arguments
843 '(#:phases
844 (modify-phases %standard-phases
845 (replace 'check
846 (lambda _
847 (setenv "NO_NET" "1") ; disable opendap tests
848 (with-directory-excursion "test"
849 (setenv "PYTHONPATH" ; find and add the library we just built
850 (string-append
851 (car (find-files "../build" "lib.*"
852 #:directories? #:t
853 #:fail-on-error? #:t))
854 ":" (getenv "PYTHONPATH")))
855 (zero? (system* "python" "run_all.py"))))))))
856 (home-page
857 "https://github.com/Unidata/netcdf4-python")
858 (synopsis "Python/numpy interface to the netCDF library")
859 (description "Netcdf4-python is a Python interface to the netCDF C
860library. netCDF version 4 has many features not found in earlier
861versions of the library and is implemented on top of HDF5. This module
862can read and write files in both the new netCDF 4 and the old netCDF 3
863format, and can create files that are readable by HDF5 clients. The
864API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
865to users of that module.")
866 ;; The software is mainly ISC, but includes some files covered
867 ;; by the Expat license.
868 (license (list license:isc license:expat))))
869
870(define-public python2-netcdf4
871 (package-with-python2 python-netcdf4))
872
c1448c69
EB
873(define-public python-lockfile
874 (package
875 (name "python-lockfile")
692add53 876 (version "0.12.2")
c1448c69
EB
877 (source
878 (origin
879 (method url-fetch)
880 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
881 "lockfile-" version ".tar.gz"))
882 (sha256
883 (base32
692add53 884 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
885 (build-system python-build-system)
886 (arguments '(#:test-target "check"))
692add53
BW
887 (native-inputs
888 `(("python-pbr" ,python-pbr)))
6a8f26a4 889 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
890 (synopsis "Platform-independent file locking module")
891 (description
892 "The lockfile package exports a LockFile class which provides a simple
893API for locking files.")
f210e944 894 (license license:expat)))
c1448c69
EB
895
896(define-public python2-lockfile
f210e944 897 (package-with-python2 python-lockfile))
c1448c69 898
5a1a4bf6
EB
899(define-public python-mock
900 (package
901 (name "python-mock")
902 (version "1.0.1")
903 (source
904 (origin
905 (method url-fetch)
6b7877e1 906 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
907 (sha256
908 (base32
909 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
910 (build-system python-build-system)
911 (arguments '(#:test-target "check"))
6b7877e1 912 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 913 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
914 (description
915 "Mock is a library for testing in Python. It allows you to replace parts
916of your system under test with mock objects and make assertions about how they
917have been used.")
bd3fa666 918 (license license:expat)))
5a1a4bf6
EB
919
920(define-public python2-mock
921 (package-with-python2 python-mock))
922
fc50e9c6 923
73adf220
AE
924(define-public python-setuptools
925 (package
926 (name "python-setuptools")
d660f7be 927 (version "31.0.0")
73adf220
AE
928 (source
929 (origin
930 (method url-fetch)
d660f7be 931 (uri (pypi-uri "setuptools" version))
73adf220
AE
932 (sha256
933 (base32
d660f7be 934 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
935 (modules '((guix build utils)))
936 (snippet
937 '(begin
938 ;; Remove included binaries which are used to build self-extracting
939 ;; installers for Windows.
940 ;; TODO: Find some way to build them ourself so we can include them.
941 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
942 #t))))
73adf220 943 (build-system python-build-system)
d3d656c5
AE
944 ;; FIXME: Tests require pytest, which itself relies on setuptools.
945 ;; One could bootstrap with an internal untested setuptools.
73adf220 946 (arguments
824af8ca 947 `(#:tests? #f))
73adf220
AE
948 (home-page "https://pypi.python.org/pypi/setuptools")
949 (synopsis
950 "Library designed to facilitate packaging Python projects")
951 (description
952 "Setuptools is a fully-featured, stable library designed to facilitate
953packaging Python projects, where packaging includes:
954Python package and module definitions,
955distribution package metadata,
956test hooks,
957project installation,
958platform-specific details,
959Python 3 support.")
d660f7be
MB
960 ;; TODO: setuptools now bundles the following libraries:
961 ;; packaging, pyparsing, six and appdirs. How to unbundle?
962 (license (list license:psfl ; setuptools itself
963 license:expat ; six, appdirs, pyparsing
964 license:asl2.0 ; packaging is dual ASL2/BSD-2
965 license:bsd-2))))
73adf220
AE
966
967(define-public python2-setuptools
968 (package-with-python2 python-setuptools))
fc50e9c6 969
aa21c764 970;;; Pycrypto is abandoned upstream:
1194575b 971;;;
aa21c764 972;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 973;;;
aa21c764 974;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
975(define-public python-pycrypto
976 (package
977 (name "python-pycrypto")
978 (version "2.6.1")
979 (source
980 (origin
981 (method url-fetch)
aa21c764
LF
982 (uri (pypi-uri "pycrypto" version))
983 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
984 (sha256
985 (base32
986 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
987 (build-system python-build-system)
cafc3f5a
EB
988 (inputs
989 `(("python" ,python)
990 ("gmp" ,gmp)))
991 (arguments
992 `(#:phases
993 (alist-cons-before
994 'build 'set-build-env
995 ;; pycrypto runs an autoconf configure script behind the scenes
996 (lambda _
997 (setenv "CONFIG_SHELL" (which "bash")))
998 %standard-phases)))
999 (home-page "http://www.pycrypto.org/")
1000 (synopsis "Cryptographic modules for Python")
1001 (description
1002 "Pycrypto is a collection of both secure hash functions (such as SHA256
1003and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1004etc.). The package is structured to make adding new modules easy.")
3f641af0 1005 (license license:public-domain)))
cafc3f5a 1006
345f0611 1007(define-public python2-pycrypto
1c0059da
EF
1008 (let ((pycrypto (package-with-python2 python-pycrypto)))
1009 (package (inherit pycrypto)
1010 (inputs
1011 `(("python" ,python-2)
1012 ,@(alist-delete
1013 "python"
1014 (package-inputs pycrypto)))))))
345f0611 1015
de959250 1016(define-public python-eventlet
1017 (package
1018 (name "python-eventlet")
1019 (version "0.20.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "eventlet" version))
1024 (sha256
1025 (base32
1026 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1027 (build-system python-build-system)
1028 (propagated-inputs
1029 `(("python-greenlet" ,python-greenlet)))
1030 (home-page "http://eventlet.net")
1031 (synopsis "Concurrent networking library for Python")
1032 (description
1033 "Eventlet is a concurrent networking library for Python that
1034allows you to change how you run your code, not how you write it.
1035It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1036Coroutines ensure that the developer uses a blocking style of programming
1037that is similar to threading, but provide the benefits of non-blocking I/O.
1038The event dispatch is implicit, which means you can easily use @code{Eventlet}
1039from the Python interpreter, or as a small part of a larger application.")
1040 (license license:expat)))
1041
1042(define-public python2-eventlet
1043 (let ((base (package-with-python2
1044 (strip-python2-variant python-eventlet))))
1045 (package (inherit base)
1046 (propagated-inputs
1047 `(("python2-enum34" ,python2-enum34)
1048 ,@(package-propagated-inputs base))))))
1049
cafc3f5a
EB
1050(define-public python-keyring
1051 (package
1052 (name "python-keyring")
13f3ff35 1053 (version "8.7")
cafc3f5a
EB
1054 (source
1055 (origin
1056 (method url-fetch)
664e6c3a 1057 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1058 (sha256
1059 (base32
13f3ff35 1060 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1061 (build-system python-build-system)
1062 (native-inputs
13f3ff35 1063 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1064 (propagated-inputs
cafc3f5a
EB
1065 `(("python-pycrypto" ,python-pycrypto)))
1066 (arguments
664e6c3a 1067 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1068 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1069 (synopsis "Store and access your passwords safely")
1070 (description
1071 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1072service from python. It can be used in any application that needs safe
cafc3f5a
EB
1073password storage.")
1074 ;; "MIT" and PSF dual license
f210e944 1075 (license license:x11)))
cafc3f5a 1076
d7af1069 1077(define-public python2-keyring
f210e944 1078 (package-with-python2 python-keyring))
d7af1069 1079
a480bc41
EB
1080(define-public python-six
1081 (package
1082 (name "python-six")
b6ab89ef 1083 (version "1.10.0")
a480bc41
EB
1084 (source
1085 (origin
1086 (method url-fetch)
b6ab89ef 1087 (uri (pypi-uri "six" version))
a480bc41
EB
1088 (sha256
1089 (base32
b6ab89ef 1090 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1091 (build-system python-build-system)
4fd129ee
MB
1092 (native-inputs
1093 `(("python-py" ,python-py)
1094 ("python-pytest" ,python-pytest)))
a480bc41
EB
1095 (home-page "http://pypi.python.org/pypi/six/")
1096 (synopsis "Python 2 and 3 compatibility utilities")
1097 (description
35b9e423 1098 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1099functions for smoothing over the differences between the Python versions with
1100the goal of writing Python code that is compatible on both Python versions.
35b9e423 1101Six supports every Python version since 2.5. It is contained in only one
a480bc41 1102Python file, so it can be easily copied into your project.")
3f641af0 1103 (license license:x11)))
a480bc41 1104
0c20025c
AE
1105(define-public python2-six
1106 (package-with-python2 python-six))
1107
22d7360b 1108(define-public python-dateutil
cafc3f5a
EB
1109 (package
1110 (name "python-dateutil")
e139c7a7 1111 (version "2.6.0")
cafc3f5a
EB
1112 (source
1113 (origin
1114 (method url-fetch)
394b8060 1115 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1116 (sha256
1117 (base32
e139c7a7 1118 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1119 (build-system python-build-system)
f22efa01 1120 (propagated-inputs
394b8060 1121 `(("python-six" ,python-six)))
b5a5fb19 1122 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1123 (synopsis "Extensions to the standard datetime module")
1124 (description
1125 "The dateutil module provides powerful extensions to the standard
1126datetime module, available in Python 2.3+.")
f210e944 1127 (license license:bsd-3)))
cafc3f5a 1128
fc50e9c6
AE
1129(define-public python2-dateutil
1130 (package-with-python2 python-dateutil))
1d08c01f 1131
cafc3f5a
EB
1132(define-public python-parsedatetime
1133 (package
1134 (name "python-parsedatetime")
28958b64 1135 (version "2.3")
cafc3f5a
EB
1136 (source
1137 (origin
1138 (method url-fetch)
eebf6f01 1139 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1140 (sha256
1141 (base32
28958b64 1142 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
cafc3f5a
EB
1143 (build-system python-build-system)
1144 (native-inputs
eebf6f01 1145 `(("python-nose" ,python-nose)
28958b64
LC
1146 ("python-pyicu" ,python-pyicu)
1147 ("python-pytest" ,python-pytest)
1148 ("python-pytest-runner" ,python-pytest-runner)))
1149 (propagated-inputs
1150 `(("python-future" ,python-future)))
7bf837fd 1151 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1152 (synopsis
1153 "Parse human-readable date/time text")
1154 (description
e881752c 1155 "Parse human-readable date/time text.")
f210e944 1156 (license license:asl2.0)))
cafc3f5a 1157
38b8f9b2 1158(define-public python2-parsedatetime
f210e944 1159 (package-with-python2 python-parsedatetime))
38b8f9b2 1160
d072efcb
RW
1161(define-public python-pandas
1162 (package
1163 (name "python-pandas")
8e086048 1164 (version "0.19.2")
d072efcb
RW
1165 (source
1166 (origin
1b96f069 1167 (method url-fetch)
8e086048 1168 (uri (pypi-uri "pandas" version))
1b96f069 1169 (sha256
b03ee02f
MB
1170 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1171 (patches
1172 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1173 (build-system python-build-system)
d072efcb 1174 (propagated-inputs
f22efa01
HG
1175 `(("python-numpy" ,python-numpy)
1176 ("python-pytz" ,python-pytz)
22d7360b 1177 ("python-dateutil" ,python-dateutil)))
d072efcb 1178 (native-inputs
abcc7a0e
HG
1179 `(("python-nose" ,python-nose)
1180 ("python-cython" ,python-cython)))
d072efcb
RW
1181 (home-page "http://pandas.pydata.org")
1182 (synopsis "Data structures for data analysis, time series, and statistics")
1183 (description
1184 "Pandas is a Python package providing fast, flexible, and expressive data
1185structures designed to make working with structured (tabular,
1186multidimensional, potentially heterogeneous) and time series data both easy
1187and intuitive. It aims to be the fundamental high-level building block for
1188doing practical, real world data analysis in Python.")
f210e944 1189 (license license:bsd-3)))
d072efcb
RW
1190
1191(define-public python2-pandas
f210e944 1192 (package-with-python2 python-pandas))
d072efcb 1193
cafc3f5a
EB
1194(define-public python-tzlocal
1195 (package
1196 (name "python-tzlocal")
ed80839b 1197 (version "1.2.2")
cafc3f5a
EB
1198 (source
1199 (origin
1200 (method url-fetch)
226d3331 1201 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1202 (sha256
1203 (base32
ed80839b 1204 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1205 (build-system python-build-system)
f22efa01
HG
1206 (propagated-inputs
1207 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1208 (home-page "https://github.com/regebro/tzlocal")
1209 (synopsis
35b9e423 1210 "Local timezone information for Python")
cafc3f5a
EB
1211 (description
1212 "Tzlocal returns a tzinfo object with the local timezone information.
1213This module attempts to fix a glaring hole in pytz, that there is no way to
1214get the local timezone information, unless you know the zoneinfo name, and
1215under several distributions that's hard or impossible to figure out.")
3f641af0 1216 (license license:cc0)))
cafc3f5a 1217
1d08c01f
AE
1218(define-public python2-pysqlite
1219 (package
1220 (name "python2-pysqlite")
e80aaeb4 1221 (version "2.8.3")
1d08c01f
AE
1222 (source
1223 (origin
1224 (method url-fetch)
fe476868 1225 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1226 (sha256
1227 (base32
e80aaeb4 1228 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1229 (build-system python-build-system)
1230 (inputs
1231 `(("sqlite" ,sqlite)))
1232 (arguments
1233 `(#:python ,python-2 ; incompatible with Python 3
1234 #:tests? #f)) ; no test target
7bf837fd 1235 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1236 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1237 (description
1238 "Pysqlite provides SQLite bindings for Python that comply to the
1239Database API 2.0T.")
ed0cdf83 1240 (license license:zlib)))
1d08c01f 1241
2875caf5
AE
1242
1243(define-public python2-mechanize
1244 (package
1245 (name "python2-mechanize")
1246 (version "0.2.5")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1251 version ".tar.gz"))
1252 (sha256
1253 (base32
1254 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1255 (build-system python-build-system)
2875caf5
AE
1256 (arguments
1257 `(#:python ,python-2 ; apparently incompatible with Python 3
1258 #:tests? #f))
1259 ;; test fails with message
1260 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1261 ;; (python-3.3.2) or
1262 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1263 ;; (python-2.7.5).
1264 ;; The source code is from March 2011 and probably not up-to-date
1265 ;; with respect to python unit tests.
1266 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1267 (synopsis
1268 "Stateful programmatic web browsing in Python")
1269 (description
1270 "Mechanize implements stateful programmatic web browsing in Python,
1271after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1272 (license (license:non-copyleft
1273 "file://COPYING"
1274 "See COPYING in the distribution."))))
2875caf5 1275
0352532e
AE
1276
1277(define-public python-simplejson
1278 (package
1279 (name "python-simplejson")
b2e6e150 1280 (version "3.10.0")
0352532e
AE
1281 (source
1282 (origin
1283 (method url-fetch)
988d1bad 1284 (uri (pypi-uri "simplejson" version))
0352532e
AE
1285 (sha256
1286 (base32
b2e6e150 1287 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1288 (build-system python-build-system)
1289 (home-page "http://simplejson.readthedocs.org/en/latest/")
1290 (synopsis
1291 "Json library for Python")
1292 (description
e881752c
AK
1293 "JSON (JavaScript Object Notation) is a subset of JavaScript
1294syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1295format.
0352532e
AE
1296
1297Simplejson exposes an API familiar to users of the standard library marshal
1298and pickle modules. It is the externally maintained version of the json
1299library contained in Python 2.6, but maintains compatibility with Python 2.5
1300and (currently) has significant performance advantages, even without using
1301the optional C extension for speedups. Simplejson is also supported on
1302Python 3.3+.")
3f641af0 1303 (license license:x11)))
0352532e
AE
1304
1305(define-public python2-simplejson
1306 (package-with-python2 python-simplejson))
421a80a2
AE
1307
1308
ed07b08d 1309(define-public python-pyicu
421a80a2 1310 (package
ed07b08d 1311 (name "python-pyicu")
2e161eaf 1312 (version "1.9.5")
421a80a2
AE
1313 (source
1314 (origin
1315 (method url-fetch)
2e161eaf 1316 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1317 (sha256
1318 (base32
2e161eaf 1319 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1320 (build-system python-build-system)
dc027d40
MB
1321 (arguments
1322 '(#:phases
1323 (modify-phases %standard-phases
1324 (add-before 'check 'delete-failing-test
1325 (lambda _
1326 ;; XXX: These tests require locales that are unavailable
1327 ;; in the build environment.
1328 (delete-file "test/test_DateTimeParserGenerator.py")
1329 #t)))))
421a80a2
AE
1330 (inputs
1331 `(("icu4c" ,icu4c)))
421a80a2 1332 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1333 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1334 (description
1335 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1336 (license license:x11)))
ed07b08d
LF
1337
1338(define-public python2-pyicu
f210e944 1339 (package-with-python2 python-pyicu))
cc20a22a
LC
1340
1341(define-public python2-dogtail
1342 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1343 ;; spaces in indentation" with Python 3.
1344 (package
1345 (name "python2-dogtail")
c5be3467 1346 (version "0.9.9")
cc20a22a
LC
1347 (source (origin
1348 (method url-fetch)
c5be3467 1349 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1350 (sha256
1351 (base32
c5be3467 1352 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1353 (build-system python-build-system)
1354 (arguments `(#:python ,python-2
1355 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1356 ;; Currently no offical homepage.
1357 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1358 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1359 (description
35b9e423 1360 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1361It uses Accessibility (a11y) technologies to communicate with desktop
1362applications. dogtail scripts are written in Python and executed like any
1363other Python program.")
3f641af0 1364 (license license:gpl2+)))
515e6878 1365
011b18c3
LC
1366(define-public python2-empy
1367 (package
1368 (name "python2-empy")
1369 (version "3.3")
1370 (source (origin
1371 (method url-fetch)
1372 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1373 version ".tar.gz"))
1374 (sha256
1375 (base32
1376 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:python ,python-2
1380 #:phases (alist-replace
1381 'check
1382 (lambda _
1383 (zero? (system* "./test.sh")))
1384 %standard-phases)))
1385 (home-page "http://www.alcyone.com/software/empy/")
1386 (synopsis "Templating system for Python")
1387 (description
1388 "EmPy is a system for embedding Python expressions and statements in
1389template text; it takes an EmPy source file, processes it, and produces
1390output. This is accomplished via expansions, which are special signals to the
1cd4027c 1391EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1392EmPy can expand arbitrary Python expressions and statements in this way, as
1393well as a variety of special forms. Textual data not explicitly delimited in
1394this way is sent unaffected to the output, allowing Python to be used in
1395effect as a markup language. Also supported are callbacks via hooks,
1396recording and playback via diversions, and dynamic, chainable filters. The
1397system is highly configurable via command line options and embedded
1398commands.")
3f641af0 1399 (license license:lgpl2.1+)))
011b18c3 1400
8deeda0c
LC
1401(define-public python2-element-tree
1402 (package
1403 (name "python2-element-tree")
1404 (version "1.2.6")
1405 (source (origin
1406 (method url-fetch)
1407 (uri (string-append
1408 "http://effbot.org/media/downloads/elementtree-"
1409 version "-20050316.tar.gz"))
1410 (sha256
1411 (base32
1412 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1413 (build-system python-build-system)
1414 (arguments
1415 `(#:python ,python-2 ; seems to be part of Python 3
1416 #:tests? #f)) ; no 'test' sub-command
1417 (synopsis "Toolkit for XML processing in Python")
1418 (description
1419 "ElementTree is a Python library supporting lightweight XML processing.")
1420 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1421 (license (license:x11-style
1422 "http://docs.python.org/2/license.html"
1423 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1424
1425(define-public python2-pybugz
1426 (package
1427 (name "python2-pybugz")
1428 (version "0.6.11")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append
1432 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1433 version ".tar.gz"))
1434 (sha256
1435 (base32
6f194a1e 1436 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1437 (patches (search-patches "pybugz-stty.patch"
1438 "pybugz-encode-error.patch"))))
8deeda0c
LC
1439 (build-system python-build-system)
1440 (arguments
1441 `(#:python ,python-2 ; SyntaxError with Python 3
1442 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1443 (propagated-inputs
1444 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1445 (synopsis "Python and command-line interface to Bugzilla")
1446 (description
1447 "PyBugz is a Python library and command-line tool to query the Bugzilla
1448bug tracking system. It is meant as an aid to speed up interaction with the
1449bug tracker.")
1450 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1451 (license license:gpl2)))
8deeda0c 1452
a480bc41
EB
1453(define-public python-enum34
1454 (package
1455 (name "python-enum34")
5e923414 1456 (version "1.1.6")
a480bc41
EB
1457 (source
1458 (origin
1459 (method url-fetch)
d39ae1e5 1460 (uri (pypi-uri "enum34" version))
a480bc41
EB
1461 (sha256
1462 (base32
5e923414 1463 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1464 (build-system python-build-system)
a480bc41
EB
1465 (home-page "https://pypi.python.org/pypi/enum34")
1466 (synopsis "Backported Python 3.4 Enum")
1467 (description
1468 "Enum34 is the new Python stdlib enum module available in Python 3.4
1469backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1470 (license license:bsd-3)))
a480bc41 1471
820acd1b
LF
1472(define-public python2-enum34
1473 (package-with-python2 python-enum34))
1474
a480bc41
EB
1475(define-public python-parse-type
1476 (package
1477 (name "python-parse-type")
1478 (version "0.3.4")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (string-append "https://pypi.python.org/packages/source/p/"
1483 "parse_type/parse_type-" version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1487 (build-system python-build-system)
f22efa01 1488 (propagated-inputs
f3b98f4f 1489 `(("python-six" ,python-six)
68f1cdec 1490 ("python-parse" ,python-parse)))
a480bc41
EB
1491 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1492 (home-page "https://github.com/jenisys/parse_type")
1493 (synopsis "Extended parse module")
1494 (description
1495 "Parse_type extends the python parse module.")
3f641af0 1496 (license license:bsd-3)))
a480bc41
EB
1497
1498(define-public python-parse
1499 (package
1500 (name "python-parse")
eb3d3503 1501 (version "1.6.6")
a480bc41
EB
1502 (source
1503 (origin
1504 (method url-fetch)
eb3d3503 1505 (uri (pypi-uri "parse" version))
a480bc41
EB
1506 (sha256
1507 (base32
aa6c09ed
EF
1508 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1509 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1510 (build-system python-build-system)
1511 (arguments
1512 `(#:phases
f9a65318
EF
1513 (modify-phases %standard-phases
1514 (replace 'check
1515 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1516 (home-page "https://github.com/r1chardj0n3s/parse")
1517 (synopsis "Parse strings")
1518 (description
1519 "Parse strings using a specification based on the Python format()
1520syntax.")
3f641af0 1521 (license license:x11)))
a480bc41 1522
d3eff97a
JL
1523(define-public python-polib
1524 (package
1525 (name "python-polib")
1526 (version "1.0.8")
1527 (source (origin
1528 (method url-fetch)
1529 (uri (pypi-uri "polib" version))
1530 (sha256
1531 (base32
1532 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1533 (build-system python-build-system)
1534 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1535 (synopsis "Manipulate, create and modify gettext files")
1536 (description "Polib can manipulate any gettext format (po, pot and mo)
1537files. It can be used to create po files from scratch or to modify
1538existing ones.")
1539 (license license:expat)))
1540
1541(define-public python2-polib
1542 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1543 (package
1544 (inherit base)
1545 (arguments `(,@(package-arguments base)
1546 ;; Tests don't work with python2.
1547 #:tests? #f)))))
a480bc41 1548
515e6878
LC
1549(define-public scons
1550 (package
1551 (name "scons")
a3f61425 1552 (version "2.3.4")
515e6878
LC
1553 (source (origin
1554 (method url-fetch)
de67e922
LF
1555 (uri (string-append "mirror://sourceforge/scons/scons/" version
1556 "/scons-" version ".tar.gz"))
515e6878
LC
1557 (sha256
1558 (base32
a3f61425 1559 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1560 (build-system python-build-system)
1561 (arguments
1562 ;; With Python 3.x, fails to build with a syntax error.
1563 `(#:python ,python-2
b3e8b4bd 1564 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1565 #:tests? #f)) ; no 'python setup.py test' command
1566 (home-page "http://scons.org/")
1567 (synopsis "Software construction tool written in Python")
1568 (description
1569 "SCons is a software construction tool. Think of SCons as an improved,
1570cross-platform substitute for the classic Make utility with integrated
1571functionality similar to autoconf/automake and compiler caches such as ccache.
1572In short, SCons is an easier, more reliable and faster way to build
1573software.")
3f641af0 1574 (license license:x11)))
011b18c3 1575
c15a5c0e
DT
1576(define-public python-extras
1577 (package
1578 (name "python-extras")
1579 (version "0.0.3")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (string-append
1584 "https://pypi.python.org/packages/source/e/extras/extras-"
1585 version ".tar.gz"))
1586 (sha256
1587 (base32
1588 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1589 (build-system python-build-system)
c15a5c0e
DT
1590 (arguments
1591 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1592 '(#:tests? #f))
1593 (home-page "https://github.com/testing-cabal/extras")
1594 (synopsis "Useful extensions to the Python standard library")
1595 (description
1596 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1597 (license license:expat)))
c15a5c0e
DT
1598
1599(define-public python2-extras
1600 (package-with-python2 python-extras))
1601
56ea0efd
DT
1602(define-public python-mimeparse
1603 (package
1604 (name "python-mimeparse")
1605 (version "0.1.4")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (string-append
1610 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1611 version ".tar.gz"))
1612 (sha256
1613 (base32
1614 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1615 (build-system python-build-system)
56ea0efd
DT
1616 (arguments
1617 '(#:tests? #f)) ; no setup.py test command
1618 (home-page
1619 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1620 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1621 (description
1622 "Mimeparse provides basic functions for parsing MIME type names and
1623matching them against a list of media-ranges.")
bd3fa666 1624 (license license:expat)))
56ea0efd
DT
1625
1626(define-public python2-mimeparse
1627 (package-with-python2 python-mimeparse))
1628
4435427e
DT
1629(define-public python-nose
1630 (package
1631 (name "python-nose")
f7cb9841 1632 (version "1.3.7")
4435427e
DT
1633 (source
1634 (origin
1635 (method url-fetch)
f7cb9841 1636 (uri (pypi-uri "nose" version))
4435427e
DT
1637 (sha256
1638 (base32
f7cb9841 1639 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1640 (build-system python-build-system)
4435427e
DT
1641 (arguments
1642 '(#:tests? #f)) ; FIXME: test suite fails
1643 (home-page "http://readthedocs.org/docs/nose/")
1644 (synopsis "Python testing library")
1645 (description
1646 "Nose extends the unittest library to make testing easier.")
3f641af0 1647 (license license:lgpl2.0+)))
4435427e
DT
1648
1649(define-public python2-nose
1650 (package-with-python2 python-nose))
1651
0aea283a
EF
1652(define-public python-nose2
1653 (package
1654 (name "python-nose2")
1655 (version "0.6.5")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (pypi-uri "nose2" version))
1660 (sha256
1661 (base32
1662 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1663 (build-system python-build-system)
1664 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1665 (propagated-inputs
0aea283a
EF
1666 `(("python-cov-core" ,python-cov-core)
1667 ("python-pytest-cov" ,python-pytest-cov)
1668 ("python-six" ,python-six)))
1669 (home-page "https://github.com/nose-devs/nose2")
1670 (synopsis "Next generation of nicer testing for Python")
1671 (description
1672 "Nose2 is the next generation of nicer testing for Python, based on the
1673plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1674better plugin api, being easier for users to configure, and simplifying internal
1675interfaces and processes.")
1676 (license license:bsd-2)))
1677
1678(define-public python2-nose2
1679 (package-with-python2 python-nose2))
1680
6cd9c356
DT
1681(define-public python-unittest2
1682 (package
1683 (name "python-unittest2")
1684 (version "0.5.1")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (string-append
1689 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1690 version ".tar.gz"))
1691 (sha256
1692 (base32
1693 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1694 (build-system python-build-system)
6cd9c356
DT
1695 (home-page "http://pypi.python.org/pypi/unittest2")
1696 (synopsis "Python unit testing library")
1697 (description
1698 "Unittest2 is a replacement for the unittest module in the Python
1699standard library.")
3f641af0 1700 (license license:psfl)))
6cd9c356
DT
1701
1702(define-public python2-unittest2
1703 (package (inherit python-unittest2)
1704 (name "python2-unittest2")
1705 (version "0.5.1")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (string-append
1710 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1711 version ".tar.gz"))
1712 (sha256
1713 (base32
1714 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1715 (arguments
1716 `(#:python ,python-2
1717 #:tests? #f)))) ; no setup.py test command
1718
02f8f804 1719(define-public python-pafy
1720 (package
1721 (name "python-pafy")
745d85b7 1722 (version "0.5.3.1")
02f8f804 1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pafy" version))
1727 (sha256
1728 (base32
745d85b7 1729 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1730 (build-system python-build-system)
ed3fee5f 1731 (arguments
1732 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1733 (propagated-inputs
1734 ;; Youtube-dl is a python package which is imported in the file
1735 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1736 `(("youtube-dl" ,youtube-dl)))
1737 (home-page "https://np1.github.io/pafy/")
1738 (synopsis "Retrieve YouTube content and metadata")
1739 (description
1740 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1741 (license license:lgpl3+)))
1742
542ad60f
DT
1743(define-public python-py
1744 (package
1745 (name "python-py")
b9463fdb 1746 (version "1.4.32")
542ad60f
DT
1747 (source
1748 (origin
1749 (method url-fetch)
71c8a804 1750 (uri (pypi-uri "py" version))
542ad60f
DT
1751 (sha256
1752 (base32
b9463fdb 1753 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1754 (build-system python-build-system)
dcb0da7b
MB
1755 (arguments
1756 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1757 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1758 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1759 ;; Is this module globally installed?"
1760 '(#:tests? #f))
542ad60f
DT
1761 (home-page "http://pylib.readthedocs.org/")
1762 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1763 (description
1764 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1765code introspection, and logging.")
bd3fa666 1766 (license license:expat)))
542ad60f
DT
1767
1768(define-public python2-py
1769 (package-with-python2 python-py))
1770
855d4761
DT
1771(define-public python-pytest
1772 (package
1773 (name "python-pytest")
61a4332d 1774 (version "2.7.3")
855d4761
DT
1775 (source
1776 (origin
1777 (method url-fetch)
1778 (uri (string-append
1779 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1780 version ".tar.gz"))
1781 (sha256
1782 (base32
61a4332d 1783 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1784 (modules '((guix build utils)))
1785 (snippet
1786 ;; One of the tests involves the /usr directory, so it fails.
1787 '(substitute* "testing/test_argcomplete.py"
1788 (("def test_remove_dir_prefix\\(self\\):")
1789 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1790 (build-system python-build-system)
482d9591
HG
1791 (propagated-inputs
1792 `(("python-py" ,python-py)))
e7881f3d 1793 (native-inputs
482d9591 1794 `(("python-nose" ,python-nose)
855d4761
DT
1795 ("python-mock" ,python-mock)))
1796 (home-page "http://pytest.org")
1797 (synopsis "Python testing library")
1798 (description
1799 "Pytest is a testing tool that provides auto-discovery of test modules
1800and functions, detailed info on failing assert statements, modular fixtures,
1801and many external plugins.")
bd3fa666 1802 (license license:expat)))
855d4761
DT
1803
1804(define-public python2-pytest
1805 (package-with-python2 python-pytest))
1806
23b9168d
LF
1807;; Some packages require a newer pytest.
1808(define-public python-pytest-3.0
fca4ff35
LF
1809 (package
1810 (inherit python-pytest)
1811 (name "python-pytest")
23b9168d 1812 (version "3.0.7")
fca4ff35
LF
1813 (source (origin
1814 (method url-fetch)
1815 (uri (pypi-uri "pytest" version))
1816 (sha256
1817 (base32
23b9168d 1818 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
fca4ff35
LF
1819 (arguments
1820 `(#:phases
1821 (modify-phases %standard-phases
1822 (add-before 'check 'disable-invalid-test
1823 (lambda _
1824 (substitute* "testing/test_argcomplete.py"
1825 (("def test_remove_dir_prefix" line)
1826 (string-append "@pytest.mark.skip"
1827 "(reason=\"Assumes that /usr exists.\")\n "
1828 line)))
23b9168d 1829 #t)))))
7f71e257
MFM
1830 (native-inputs
1831 `(("python-nose" ,python-nose)
1832 ("python-mock" ,python-mock)
23b9168d
LF
1833 ("python-hypothesis" ,python-hypothesis)))
1834 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1835
1836(define-public python2-pytest-3.0
1837 (let ((base (package-with-python2
1838 (strip-python2-variant python-pytest-3.0))))
1839 (package (inherit base)
1840 (native-inputs
1841 `(("python2-enum34" ,python2-enum34)
1842 ,@(package-native-inputs base))))))
fca4ff35 1843
358c3d61
EF
1844(define-public python-pytest-cov
1845 (package
1846 (name "python-pytest-cov")
1aecfe17 1847 (version "2.4.0")
358c3d61
EF
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "pytest-cov" version))
1852 (sha256
545f4a1c 1853 (base32
1aecfe17 1854 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 1855 (build-system python-build-system)
ce40b383
HG
1856 (arguments
1857 `(#:phases
1858 (modify-phases %standard-phases
1859 (replace 'check
1860 (lambda _
1861 ;; options taken from tox.ini
1862 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1863 ;; with "Duplicate implicit target name"
1864 (zero? (system* "python" "./setup.py" "check"
1865 "--strict" "--metadata")))))))
f22efa01 1866 (propagated-inputs
10468636
EF
1867 `(("python-coverage" ,python-coverage)
1868 ("python-pytest" ,python-pytest)))
10468636
EF
1869 (home-page "https://github.com/pytest-dev/pytest-cov")
1870 (synopsis "Pytest plugin for measuring coverage")
1871 (description
1872 "Pytest-cov produces coverage reports. It supports centralised testing and
1873distributed testing in both @code{load} and @code{each} modes. It also
1874supports coverage of subprocesses.")
f210e944 1875 (license license:expat)))
358c3d61
EF
1876
1877(define-public python2-pytest-cov
f210e944 1878 (package-with-python2 python-pytest-cov))
358c3d61 1879
6784f2e3
RW
1880(define-public python-pytest-runner
1881 (package
1882 (name "python-pytest-runner")
047160f2 1883 (version "2.11.1")
6784f2e3
RW
1884 (source
1885 (origin
1886 (method url-fetch)
54cd239b 1887 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1888 (sha256
1889 (base32
047160f2 1890 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
1891 (build-system python-build-system)
1892 (arguments
1893 `(#:phases
1894 (modify-phases %standard-phases
1895 ;; The fancy way of setting the version with setuptools_scm does not
1896 ;; seem to work here.
1897 (add-after 'unpack 'set-version
1898 (lambda _
1899 (substitute* "docs/conf.py"
1900 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1901 (string-append "version = \"" ,version "\"")))
1902 #t)))))
1903 (native-inputs
1904 `(("python-pytest" ,python-pytest)
1905 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1906 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1907 (synopsis "Invoke py.test as a distutils command")
1908 (description
1909 "This package provides a @command{pytest-runner} command that
1910@file{setup.py} files can use to run tests.")
f210e944 1911 (license license:expat)))
54cd239b
EF
1912
1913(define-public python2-pytest-runner
f210e944 1914 (package-with-python2 python-pytest-runner))
6784f2e3 1915
44547e51
EF
1916(define-public python-pytest-mock
1917 (package
1918 (name "python-pytest-mock")
1919 (version "1.2")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (pypi-uri "pytest-mock" version ".zip"))
1924 (sha256
1925 (base32
1926 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1927 (build-system python-build-system)
1928 (native-inputs
1929 `(("unzip" ,unzip)))
f22efa01 1930 (propagated-inputs
d5e41cf2 1931 `(("python-pytest" ,python-pytest)))
44547e51
EF
1932 (home-page "https://github.com/pytest-dev/pytest-mock/")
1933 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1934 (description
1935 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1936around the patching API provided by the @code{mock} package, but with the
1937benefit of not having to worry about undoing patches at the end of a test.
1938The mocker fixture has the same API as @code{mock.patch}, supporting the
1939same arguments.")
1940 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1941 (license license:expat)))
1942
1943(define-public python2-pytest-mock
1944 (let ((base (package-with-python2
1945 (strip-python2-variant python-pytest-mock))))
1946 (package (inherit base)
f22efa01 1947 (propagated-inputs
44547e51 1948 `(("python2-mock" ,python2-mock)
f22efa01 1949 ,@(package-propagated-inputs base))))))
44547e51 1950
8fa58fc9
CAW
1951(define-public python-pytest-xdist
1952 (package
1953 (name "python-pytest-xdist")
1954 (version "1.14")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (pypi-uri "pytest-xdist" version ".zip"))
1959 (sha256
1960 (base32
de585a7e
HG
1961 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1962 (modules '((guix build utils)))
1963 (snippet
1964 '(begin
1965 ;; Remove pre-compiled .pyc files from source.
1966 (for-each delete-file-recursively
1967 (find-files "." "__pycache__" #:directories? #t))
1968 (for-each delete-file (find-files "." "\\.pyc$"))
1969 #t))))
8fa58fc9 1970 (build-system python-build-system)
4eb385fb
MB
1971 (arguments
1972 '(#:tests? #f)) ;FIXME: Some tests are failing.
1973 ;; #:phases
1974 ;; (modify-phases %standard-phases
1975 ;; (delete 'check)
1976 ;; (add-after 'install 'check
1977 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1978 ;; (add-installed-pythonpath inputs outputs)
1979 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1980 (native-inputs
1981 `(("unzip" ,unzip)
8fa58fc9 1982 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1983 (propagated-inputs
c4516ad2 1984 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1985 ("python-pytest" ,python-pytest)
1986 ("python-py" ,python-py)))
1987 (home-page
1988 "https://github.com/pytest-dev/pytest-xdist")
1989 (synopsis
1990 "Plugin for py.test with distributed testing and loop-on-failing modes")
1991 (description
1992 "The pytest-xdist plugin extends py.test with some unique test execution
1993modes: parallelization, running tests in boxed subprocesses, the ability
1994to run tests repeatedly when failed, and the ability to run tests on multiple
1995Python interpreters or platforms. It uses rsync to copy the existing
1996program code to a remote location, executes there, and then syncs the
1997result back.")
f210e944 1998 (license license:expat)))
8fa58fc9
CAW
1999
2000(define-public python2-pytest-xdist
f210e944 2001 (package-with-python2 python-pytest-xdist))
8fa58fc9 2002
84d24017
DT
2003(define-public python-scripttest
2004 (package
2005 (name "python-scripttest")
2006 (version "1.3")
2007 (source
2008 (origin
2009 (method url-fetch)
2010 (uri (string-append
2011 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2012 version ".tar.gz"))
2013 (sha256
2014 (base32
2015 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2016 (build-system python-build-system)
521b7772 2017 (native-inputs
f3b98f4f 2018 `(("python-pytest" ,python-pytest)))
84d24017
DT
2019 (home-page "http://pythonpaste.org/scripttest/")
2020 (synopsis "Python library to test command-line scripts")
2021 (description "Scripttest is a Python helper library for testing
2022interactive command-line applications. With it you can run a script in a
2023subprocess and see the output as well as any file modifications.")
bd3fa666 2024 (license license:expat)))
84d24017
DT
2025
2026(define-public python2-scripttest
2027 (package-with-python2 python-scripttest))
2028
d8fa80e1
DT
2029(define-public python-testtools
2030 (package
2031 (name "python-testtools")
7adb9031 2032 (version "1.4.0")
d8fa80e1
DT
2033 (source
2034 (origin
2035 (method url-fetch)
7adb9031 2036 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2037 (sha256
2038 (base32
7adb9031 2039 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2040 (build-system python-build-system)
7adb9031
DM
2041 (arguments
2042 `(#:phases
2043 (modify-phases %standard-phases
2044 (add-after 'unpack 'fix-module-imports
2045 (lambda _
2046 (substitute* "setup.py"
2047 (("'unittest2>=0.8.0',") ""))
2048 (substitute* '("testtools/testcase.py"
2049 "testtools/testsuite.py"
2050 "testtools/run.py"
2051 "testtools/tests/test_run.py"
2052 "testtools/tests/test_testsuite.py"
2053 "testtools/tests/test_deferredruntest.py")
2054 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2055 (("import unittest2 as unittest") "import unittest")
2056 (("import unittest2") "import unittest as unittest2")
2057 (("from unittest2 import") "from unittest import"))
2058 (substitute* "testtools/tests/test_testresult.py"
2059 ;; NUL in source code is not allowed (raises ValueError).
2060 (("\\x00\\x04") "\\x04"))
2061 #t)))))
0e88cbf8 2062 (propagated-inputs
f22efa01
HG
2063 `(("python-mimeparse" ,python-mimeparse)
2064 ("python-extras" ,python-extras)))
d8fa80e1
DT
2065 (home-page "https://github.com/testing-cabal/testtools")
2066 (synopsis
2067 "Extensions to the Python standard library unit testing framework")
2068 (description
2069 "Testtools extends the Python standard library unit testing framework to
2070provide matchers, more debugging information, and cross-Python
2071compatibility.")
3f641af0 2072 (license license:psfl)))
d8fa80e1
DT
2073
2074(define-public python2-testtools
2075 (package-with-python2 python-testtools))
2076
5bf3afea
DT
2077(define-public python-testscenarios
2078 (package
2079 (name "python-testscenarios")
2080 (version "0.4")
2081 (source
2082 (origin
2083 (method url-fetch)
2084 (uri (string-append
2085 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2086 version ".tar.gz"))
2087 (sha256
2088 (base32
2089 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2090 (build-system python-build-system)
f22efa01 2091 (propagated-inputs
8e73d3ba 2092 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2093 (home-page "https://launchpad.net/testscenarios")
2094 (synopsis "Pyunit extension for dependency injection")
2095 (description
2096 "Testscenarios provides clean dependency injection for Python unittest
2097style tests.")
3f641af0 2098 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2099
2100(define-public python2-testscenarios
2101 (package-with-python2 python-testscenarios))
2102
dac79ecc
DT
2103(define-public python-testresources
2104 (package
2105 (name "python-testresources")
2106 (version "0.2.7")
2107 (source
2108 (origin
2109 (method url-fetch)
2110 (uri (string-append
2111 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2112 version ".tar.gz"))
2113 (sha256
2114 (base32
2115 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2116 (build-system python-build-system)
dac79ecc
DT
2117 (home-page "https://launchpad.net/testresources")
2118 (synopsis
2119 "Pyunit extension for managing test resources")
2120 (description
2121 "Testresources is an extension to Python's unittest to allow declarative
2122use of resources by test cases.")
3f641af0 2123 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2124
2125(define-public python2-testresources
2126 (package-with-python2 python-testresources))
2127
070ab058
DT
2128(define-public python-subunit
2129 (package
2130 (name "python-subunit")
2131 (version "0.0.21")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (string-append
2136 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2137 version ".tar.gz"))
2138 (sha256
2139 (base32
2140 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2141 (build-system python-build-system)
f22efa01 2142 (propagated-inputs
b52ad371
HG
2143 `(("python-extras" ,python-extras)
2144 ("python-mimeparse" ,python-mimeparse)))
2145 (native-inputs
2146 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2147 (home-page "http://launchpad.net/subunit")
2148 (synopsis "Python implementation of the subunit protocol")
2149 (description
2150 "Python-subunit is a Python implementation of the subunit test streaming
2151protocol.")
3f641af0 2152 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2153
2154(define-public python2-subunit
2155 (package-with-python2 python-subunit))
2156
d2a8db92
HG
2157;; Recent versions of python-fixtures and python-testrepository need
2158;; python-pbr for packaging, which itself needs these two packages for
2159;; testing.
2160;; To fix this circular dependency, we use a build of python-pbr, based on the
2161;; same source, just without any test dependencies and with tests disabled.
2162;; python-pbr-minmal is then used to package python-fixtures and
2163;; python-testrepository.
2164;; Strictly speaking we currently could remove the test-requirements from the
2165;; normal python-pbr package (and save this package) since test are disabled
2166;; there anyway. But this may change in future.
2167(define python-pbr-minimal
cd49454b 2168 (package
d2a8db92 2169 (name "python-pbr-minimal")
5bbb2249 2170 (version "1.10.0")
7787ef76
CR
2171 (source
2172 (origin
2173 (method url-fetch)
d2a8db92 2174 (uri (pypi-uri "pbr" version))
7787ef76
CR
2175 (sha256
2176 (base32
a1e3ed6e
DM
2177 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2178 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2179 (build-system python-build-system)
2180 (arguments
d2a8db92
HG
2181 `(#:tests? #f))
2182 (home-page "http://docs.openstack.org/developer/pbr/")
2183 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2184 (description
d2a8db92 2185 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2186 (license license:asl2.0)))
7787ef76 2187
d2a8db92
HG
2188(define python2-pbr-minimal
2189 (package-with-python2 python-pbr-minimal))
7787ef76 2190
1ef09c0c 2191(define-public python-pbr
e25f0174 2192 (package
d2a8db92 2193 (inherit python-pbr-minimal)
e25f0174 2194 (name "python-pbr")
e25f0174
BW
2195 (arguments
2196 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2197 (propagated-inputs
d2a8db92
HG
2198 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2199 (native-inputs
e25f0174 2200 `(("python-fixtures" ,python-fixtures)
d2a8db92 2201 ;; discover, coverage, hacking, subunit
e25f0174 2202 ("python-mock" ,python-mock)
d2a8db92 2203 ("python-six" ,python-six)
e25f0174
BW
2204 ("python-sphinx" ,python-sphinx)
2205 ("python-testrepository" ,python-testrepository)
2206 ("python-testresources" ,python-testresources)
2207 ("python-testscenarios" ,python-testscenarios)
2208 ("python-testtools" ,python-testtools)
2209 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2210 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2211 (description
2212 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2213and sensible default behaviors into your setuptools run. It will set
2214versions, process requirements files and generate AUTHORS and ChangeLog file
2215from git information.
2216")))
1ef09c0c
BW
2217
2218(define-public python2-pbr
e25f0174 2219 (package-with-python2 python-pbr))
1ef09c0c 2220
7787ef76
CR
2221(define-public python-fixtures
2222 (package
2223 (name "python-fixtures")
13fcc6df 2224 (version "1.4.0")
7787ef76
CR
2225 (source
2226 (origin
2227 (method url-fetch)
13fcc6df 2228 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2229 (sha256
2230 (base32
13fcc6df 2231 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2232 (build-system python-build-system)
f6c1ef18
MB
2233 (arguments
2234 '(#:phases
2235 (modify-phases %standard-phases
2236 (replace 'check
2237 (lambda _
2238 (zero? (system* "python" "-m" "testtools.run"
2239 "fixtures.test_suite")))))))
7787ef76 2240 (propagated-inputs
ae92cadd 2241 `(("python-six" ,python-six)))
e7881f3d 2242 (native-inputs
f6c1ef18
MB
2243 `(("python-mock" ,python-mock)
2244 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2245 ("python-testtools" ,python-testtools)))
7787ef76
CR
2246 (home-page "https://launchpad.net/python-fixtures")
2247 (synopsis "Python test fixture library")
2248 (description
2249 "Fixtures provides a way to create reusable state, useful when writing
2250Python tests.")
3f641af0 2251 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2252
cd49454b
DT
2253(define-public python2-fixtures
2254 (package-with-python2 python-fixtures))
2255
b24a0c00
DT
2256(define-public python-testrepository
2257 (package
2258 (name "python-testrepository")
2259 (version "0.0.20")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (string-append
2264 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2265 version ".tar.gz"))
2266 (sha256
2267 (base32
2268 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2269 (build-system python-build-system)
90110ef9
MB
2270 (arguments
2271 ;; FIXME: Many tests are failing.
2272 '(#:tests? #f))
05de40c5 2273 (propagated-inputs
b2e66edf
HG
2274 `(("python-fixtures" ,python-fixtures)
2275 ("python-subunit" ,python-subunit)
b52ad371
HG
2276 ("python-testtools" ,python-testtools)))
2277 (native-inputs
2278 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2279 ("python-mimeparse" ,python-mimeparse)))
2280 (home-page "https://launchpad.net/testrepository")
2281 (synopsis "Database for Python test results")
2282 (description "Testrepository provides a database of test results which can
2283be used as part of a developer's workflow to check things such as what tests
2284have failed since the last commit or what tests are currently failing.")
3f641af0 2285 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2286
2287(define-public python2-testrepository
2288 (package-with-python2 python-testrepository))
2289
243a009a
DT
2290(define-public python-coverage
2291 (package
2292 (name "python-coverage")
4d4cf3dd 2293 (version "4.1")
243a009a
DT
2294 (source
2295 (origin
2296 (method url-fetch)
82a3c582 2297 (uri (pypi-uri "coverage" version))
243a009a
DT
2298 (sha256
2299 (base32
4d4cf3dd 2300 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2301 (build-system python-build-system)
bd10e677
MB
2302 (arguments
2303 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2304 '(#:tests? #f))
243a009a
DT
2305 (home-page "http://nedbatchelder.com/code/coverage")
2306 (synopsis "Code coverage measurement for Python")
2307 (description
2308 "Coverage measures code coverage, typically during test execution. It
2309uses the code analysis tools and tracing hooks provided in the Python standard
2310library to determine which lines are executable, and which have been
2311executed.")
3f641af0 2312 (license license:bsd-3)))
243a009a
DT
2313
2314(define-public python2-coverage
2315 (package-with-python2 python-coverage))
2316
12f839fd
EF
2317(define-public python-cov-core
2318 (package
2319 (name "python-cov-core")
2320 (version "1.15.0")
2321 (source
2322 (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "cov-core" version))
2325 (sha256
2326 (base32
2327 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2328 (build-system python-build-system)
f78e1c27 2329 (propagated-inputs
12f839fd
EF
2330 `(("python-coverage" ,python-coverage)))
2331 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2332 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2333 (description
49d5e338
TGR
2334 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2335and @code{nose2-cov}. It is useful for developing coverage plugins for these
2336testing frameworks.")
f210e944 2337 (license license:expat)))
12f839fd
EF
2338
2339(define-public python2-cov-core
f210e944 2340 (package-with-python2 python-cov-core))
12f839fd 2341
041358fb
DT
2342(define-public python-discover
2343 (package
2344 (name "python-discover")
2345 (version "0.4.0")
2346 (source
2347 (origin
2348 (method url-fetch)
2349 (uri (string-append
2350 "https://pypi.python.org/packages/source/d/discover/discover-"
2351 version ".tar.gz"))
2352 (sha256
2353 (base32
2354 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2355 (build-system python-build-system)
041358fb
DT
2356 (home-page "http://pypi.python.org/pypi/discover/")
2357 (synopsis
2358 "Python test discovery for unittest")
2359 (description
2360 "Discover provides test discovery for unittest, a feature that has been
e881752c 2361backported from Python 2.7 for Python 2.4+.")
3f641af0 2362 (license license:bsd-3)))
041358fb
DT
2363
2364(define-public python2-discover
2365 (package-with-python2 python-discover))
2366
a480bc41
EB
2367(define-public behave
2368 (package
2369 (name "behave")
287cfd1a 2370 (version "1.2.5")
a480bc41
EB
2371 (source (origin
2372 (method url-fetch)
287cfd1a 2373 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2374 (sha256
2375 (base32
287cfd1a 2376 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2377 (build-system python-build-system)
f22efa01 2378 (propagated-inputs
f3b98f4f 2379 `(("python-six" ,python-six)
a480bc41
EB
2380 ("python-parse" ,python-parse)
2381 ("python-parse-type" ,python-parse-type)))
2382 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2383 ;PyHamcrest>=1.8
7bf837fd 2384 (home-page "https://github.com/behave/behave")
a480bc41
EB
2385 (synopsis "Python behavior-driven development")
2386 (description
2387 "Behave is a tool for behavior-driven development in python.
2388Behavior-driven development (or BDD) is an agile software development
2389technique that encourages collaboration between developers, QA and
2390non-technical or business participants in a software project. Behave uses
2391tests written in a natural language style, backed up by Python code.")
3f641af0 2392 (license license:x11)))
c7303d3c
DT
2393
2394(define-public python-exif-read
2395 (package
2396 (name "python-exif-read")
2a2d0981 2397 (version "2.1.2")
c7303d3c
DT
2398 (source (origin
2399 (method url-fetch)
2a2d0981 2400 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2401 (sha256
2402 (base32
2a2d0981 2403 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2404 (build-system python-build-system)
c7303d3c
DT
2405 (arguments `(#:tests? #f)) ; no tests
2406 (home-page "https://github.com/ianare/exif-py")
2407 (synopsis "Python library to extract EXIF data from image files")
2408 (description
2409 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2410files.")
3f641af0 2411 (license license:bsd-3)))
c7303d3c
DT
2412
2413(define-public python2-exif-read
2414 (package-with-python2 python-exif-read))
d5f89b22
DT
2415
2416(define-public python-pyld
2417 (package
2418 (name "python-pyld")
8957af32 2419 (version "0.7.1")
d5f89b22
DT
2420 (source (origin
2421 (method url-fetch)
af1ab773 2422 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2423 (sha256
2424 (base32
8957af32 2425 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2426 (build-system python-build-system)
d5f89b22 2427 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2428 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2429 (synopsis "Python implementation of the JSON-LD specification")
2430 (description
2431 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2432 (license license:bsd-3)))
d5f89b22
DT
2433
2434(define-public python2-pyld
2435 (package-with-python2 python-pyld))
3a1f9a68
DT
2436
2437(define-public python-certifi
2438 (package
2439 (name "python-certifi")
28576403 2440 (version "2017.1.23")
3a1f9a68
DT
2441 (source (origin
2442 (method url-fetch)
9a41f443 2443 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2444 (sha256
2445 (base32
28576403 2446 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2447 (build-system python-build-system)
28576403 2448 (home-page "https://certifi.io/")
3a1f9a68
DT
2449 (synopsis "Python CA certificate bundle")
2450 (description
2451 "Certifi is a Python library that contains a CA certificate bundle, which
2452is used by the Requests library to verify HTTPS requests.")
3f641af0 2453 (license license:asl2.0)))
3a1f9a68
DT
2454
2455(define-public python2-certifi
2456 (package-with-python2 python-certifi))
e6cfbd36 2457
12c270dd
RW
2458(define-public python-click
2459 (package
2460 (name "python-click")
d4acb6db 2461 (version "6.7")
12c270dd
RW
2462 (source
2463 (origin
2464 (method url-fetch)
375f224b 2465 (uri (pypi-uri "click" version))
12c270dd 2466 (sha256
43accb58 2467 (base32
d4acb6db 2468 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2469 (build-system python-build-system)
e2ab5a09
BW
2470 (arguments
2471 `(#:phases
2472 (modify-phases %standard-phases
2473 (add-after 'unpack 'fix-paths
2474 (lambda* (#:key inputs #:allow-other-keys)
2475 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2476 "cross-libc" "libc"))))
2477 (substitute* "click/_unicodefun.py"
2478 (("'locale'")
2479 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2480 #t))
2481 (replace 'check
2482 (lambda _
2483 (zero? (system* "make" "test")))))))
2484 (native-inputs
2485 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2486 (home-page "http://click.pocoo.org")
2487 (synopsis "Command line library for Python")
2488 (description
2489 "Click is a Python package for creating command line interfaces in a
2490composable way with as little code as necessary. Its name stands for
2491\"Command Line Interface Creation Kit\". It's highly configurable but comes
2492with sensible defaults out of the box.")
3f641af0 2493 (license license:bsd-3)))
12c270dd
RW
2494
2495(define-public python2-click
2496 (package-with-python2 python-click))
2497
addc808d
EF
2498(define-public python-wheel
2499 (package
2500 (name "python-wheel")
0e6df70b 2501 (version "0.30.0a0")
e1ba0749
EF
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "wheel" version))
2506 (sha256
2507 (base32
0e6df70b 2508 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2509 (build-system python-build-system)
2510 (native-inputs
f3b98f4f 2511 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2512 ("python-pytest-cov" ,python-pytest-cov)))
2513 (home-page "https://bitbucket.org/pypa/wheel/")
2514 (synopsis "Format for built Python packages")
2515 (description
2516 "A wheel is a ZIP-format archive with a specially formatted filename and
2517the @code{.whl} extension. It is designed to contain all the files for a PEP
2518376 compatible install in a way that is very close to the on-disk format. Many
2519packages will be properly installed with only the @code{Unpack} step and the
2520unpacked archive preserves enough information to @code{Spread} (copy data and
2521scripts to their final locations) at any later time. Wheel files can be
2522installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2523 (license license:expat)
2524 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2525
2526(define-public python2-wheel
8ad4ae20
LF
2527 (let ((wheel (package-with-python2
2528 (strip-python2-variant python-wheel))))
264ae686 2529 (package (inherit wheel)
8ad4ae20
LF
2530 (native-inputs `(("python2-functools32" ,python2-functools32)
2531 ,@(package-native-inputs wheel))))))
2532
addc808d 2533
ae641128 2534(define-public python-requests
e6cfbd36 2535 (package
ae641128 2536 (name "python-requests")
da5db988 2537 (version "2.13.0")
e6cfbd36
DT
2538 (source (origin
2539 (method url-fetch)
5d691657 2540 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2541 (sha256
2542 (base32
da5db988 2543 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2544 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2545 (build-system python-build-system)
cff0ccf9
MB
2546 (arguments
2547 ;; FIXME: Some tests require network access.
2548 '(#:tests? #f))
e6cfbd36
DT
2549 (home-page "http://python-requests.org/")
2550 (synopsis "Python HTTP library")
2551 (description
2552 "Requests is a Python HTTP client library. It aims to be easier to use
2553than Python’s urllib2 library.")
3f641af0 2554 (license license:asl2.0)))
864b5211 2555
e9005180
DT
2556;; Some software requires an older version of Requests, notably Docker
2557;; Compose.
2558(define-public python-requests-2.7
2559 (package (inherit python-requests)
2560 (version "2.7.0")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "requests" version))
2564 (sha256
2565 (base32
2566 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2567
ae641128 2568(define-public python2-requests
8ad4ae20 2569 (package-with-python2 python-requests))
ae641128 2570
ea521b42
DT
2571(define-public python-vcversioner
2572 (package
2573 (name "python-vcversioner")
538fe019 2574 (version "2.16.0.0")
ea521b42
DT
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "vcversioner" version))
2579 (sha256
2580 (base32
538fe019 2581 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2582 (build-system python-build-system)
ea521b42
DT
2583 (synopsis "Python library for version number discovery")
2584 (description "Vcversioner is a Python library that inspects tagging
2585information in a variety of version control systems in order to discover
2586version numbers.")
2587 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2588 (license license:isc)))
ea521b42
DT
2589
2590(define-public python2-vcversioner
f210e944 2591 (package-with-python2 python-vcversioner))
ae641128 2592
864b5211
DT
2593(define-public python-jsonschema
2594 (package
2595 (name "python-jsonschema")
b3667afb 2596 (version "2.5.1")
864b5211
DT
2597 (source (origin
2598 (method url-fetch)
2599 (uri
2600 (string-append
2601 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2602 version ".tar.gz"))
2603 (sha256
2604 (base32
b3667afb 2605 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2606 (build-system python-build-system)
8bcd6b91
EF
2607 (arguments
2608 '(#:phases
2609 (modify-phases %standard-phases
2610 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2611 (native-inputs
8bcd6b91
EF
2612 `(("python-nose" ,python-nose)
2613 ("python-vcversioner" ,python-vcversioner)))
2614 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2615 (synopsis "Implementation of JSON Schema for Python")
2616 (description
2617 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2618 (license license:expat)
2619 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2620
2621(define-public python2-jsonschema
a14600ec
LF
2622 (let ((jsonschema (package-with-python2
2623 (strip-python2-variant python-jsonschema))))
264ae686 2624 (package (inherit jsonschema)
eaba9d66 2625 (native-inputs
8bcd6b91 2626 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2627 ,@(package-native-inputs jsonschema)))
2628 (propagated-inputs
2629 `(("python2-functools32" ,python2-functools32))))))
850189b8 2630
9f21414d 2631(define-public python-kitchen
2632 (package
2633 (name "python-kitchen")
2634 (version "1.2.4")
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (pypi-uri "kitchen" version))
2639 (sha256
2640 (base32
2641 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2642 (build-system python-build-system)
2643 (propagated-inputs
2644 `(("python-chardet" ,python-chardet)))
cb542830 2645 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2646 (synopsis "Python API for snippets")
2647 (description "@code{kitchen} module provides a python API for all sorts of
2648little useful snippets of code that everybody ends up writing for their projects
2649but never seem big enough to build an independent release. Use kitchen and stop
2650cutting and pasting that code over and over.")
2651 (license (list license:lgpl2.1+
2652 ;; subprocess.py, test_subprocess.py,
2653 ;; kitchen/pycompat25/defaultdict.py:
2654 license:psfl))))
2655
2656(define-public python2-kitchen
2657 (package-with-python2 python-kitchen))
2658
850189b8
DT
2659(define-public python-unidecode
2660 (package
2661 (name "python-unidecode")
5754fe95 2662 (version "0.04.20")
850189b8
DT
2663 (source (origin
2664 (method url-fetch)
8925d4f3 2665 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2666 (sha256
2667 (base32
5754fe95 2668 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2669 (build-system python-build-system)
850189b8
DT
2670 (home-page "https://pypi.python.org/pypi/Unidecode")
2671 (synopsis "ASCII transliterations of Unicode text")
2672 (description
2673 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2674useful when integrating with legacy code that doesn't support Unicode, or for
2675ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2676machine identifiers from human-readable Unicode strings that should still be
2677somewhat intelligeble.")
3f641af0 2678 (license license:gpl2+)))
850189b8
DT
2679
2680(define-public python2-unidecode
2681 (package-with-python2 python-unidecode))
6d45fef4
DT
2682
2683(define-public python-pyjwt
2684 (package
2685 (name "python-pyjwt")
eb31d4b4 2686 (version "1.4.0")
6d45fef4
DT
2687 (source
2688 (origin
2689 (method url-fetch)
eb31d4b4 2690 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2691 (sha256
2692 (base32
eb31d4b4 2693 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2694 (build-system python-build-system)
eb31d4b4 2695 (native-inputs
130fe994
HG
2696 `(("python-pytest" ,python-pytest)
2697 ("python-pytest-cov" ,python-pytest-cov)
2698 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 2699 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
2700 (synopsis "JSON Web Token implementation in Python")
2701 (description
2702 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2703 (license license:expat)))
6d45fef4
DT
2704
2705(define-public python2-pyjwt
2706 (package-with-python2 python-pyjwt))
2707
a80488c2 2708(define-public python-pykka
2709 (package
2710 (name "python-pykka")
2711 (version "1.2.1")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "Pykka" version))
2716 (sha256
2717 (base32
2718 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2719 (build-system python-build-system)
2720 (native-inputs
2721 `(("python-mock" ,python-mock)
2722 ("python-nose" ,python-nose)
2723 ("python-gevent" ,python-gevent)
2724 ("python-eventlet" ,python-eventlet)))
2725 (home-page "https://www.pykka.org/")
2726 (synopsis "Pykka is a Python implementation of the actor model")
2727 (description
2728 "Pykka is a Python implementation of the actor model.
2729The actor model introduces some simple rules to control the sharing
2730of state and cooperation between execution units, which makes it
2731easier to build concurrent applications.")
2732 (license license:asl2.0)))
2733
2734(define-public python2-pykka
2735 (package-with-python2 python-pykka))
2736
2cec1f6f
DT
2737(define-public python-oauthlib
2738 (package
2739 (name "python-oauthlib")
bde2171d 2740 (version "1.0.3")
2cec1f6f
DT
2741 (source (origin
2742 (method url-fetch)
bde2171d 2743 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2744 (sha256
2745 (base32
bde2171d 2746 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2747 (build-system python-build-system)
bde2171d 2748 (native-inputs
bb06aa34 2749 `(("python-nose" ,python-nose)
c616b5d3 2750 ("python-mock" ,python-mock)
bde2171d 2751 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2752 ("python-pyjwt" ,python-pyjwt)
2753 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2754 (home-page "https://github.com/idan/oauthlib")
2755 (synopsis "OAuth implementation for Python")
2756 (description
2757 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2758OAuth request-signing logic.")
3f641af0 2759 (license license:bsd-3)
59f151ec 2760 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2761
2762(define-public python2-oauthlib
59f151ec 2763 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2764 (package
2765 (inherit base)
00e10c6e 2766 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2767 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2768
2769(define-public python-itsdangerous
2770 (package
2771 (name "python-itsdangerous")
2772 (version "0.24")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (string-append
2777 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2778 version ".tar.gz"))
2779 (sha256
2780 (base32
2781 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2782 (build-system python-build-system)
7bf837fd 2783 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
2784 (synopsis "Python library for passing data to/from untrusted environments")
2785 (description
2786 "Itsdangerous provides various helpers to pass trusted data to untrusted
2787environments and back.")
f210e944 2788 (license license:bsd-3)))
ec5dbb5c
DT
2789
2790(define-public python2-itsdangerous
f210e944 2791 (package-with-python2 python-itsdangerous))
5731cae3 2792
8d12be1e
RW
2793(define-public python-pyyaml
2794 (package
2795 (name "python-pyyaml")
bf5e4bc4 2796 (version "3.12")
8d12be1e
RW
2797 (source
2798 (origin
2799 (method url-fetch)
bf5e4bc4 2800 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2801 (sha256
2802 (base32
bf5e4bc4 2803 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2804 (build-system python-build-system)
2805 (inputs
2806 `(("libyaml" ,libyaml)))
8d12be1e
RW
2807 (home-page "http://pyyaml.org/wiki/PyYAML")
2808 (synopsis "YAML parser and emitter for Python")
2809 (description
2810 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2811complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2812API, and sensible error messages. PyYAML supports standard YAML tags and
2813provides Python-specific tags that allow to represent an arbitrary Python
2814object.")
2815 (license license:expat)))
2816
2817(define-public python2-pyyaml
2818 (package-with-python2 python-pyyaml))
2819
5731cae3
DT
2820(define-public python-virtualenv
2821 (package
2822 (name "python-virtualenv")
58d04dba 2823 (version "15.0.3")
5731cae3
DT
2824 (source
2825 (origin
2826 (method url-fetch)
17804240 2827 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2828 (sha256
2829 (base32
58d04dba 2830 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2831 (build-system python-build-system)
17804240
EF
2832 (arguments
2833 `(#:phases
2834 (modify-phases %standard-phases
58d04dba
RW
2835 (replace 'check
2836 (lambda _
2837 ;; Disable failing test. See upstream bug report
2838 ;; https://github.com/pypa/virtualenv/issues/957
2839 (substitute* "tests/test_virtualenv.py"
2840 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2841 (zero? (system* "py.test")))))))
e7881f3d 2842 (native-inputs
f3b98f4f 2843 `(("python-mock" ,python-mock)
17804240 2844 ("python-pytest" ,python-pytest)))
5731cae3
DT
2845 (home-page "https://virtualenv.pypa.io/")
2846 (synopsis "Virtual Python environment builder")
2847 (description
2848 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2849 (license license:expat)))
5731cae3
DT
2850
2851(define-public python2-virtualenv
2852 (package-with-python2 python-virtualenv))
8176d4d5
DT
2853
2854(define-public python-markupsafe
2855 (package
2856 (name "python-markupsafe")
2857 (version "0.23")
2858 (source
2859 (origin
2860 (method url-fetch)
2861 (uri (string-append
2862 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2863 version ".tar.gz"))
2864 (sha256
2865 (base32
2866 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2867 (build-system python-build-system)
7bf837fd 2868 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
2869 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2870 (description
2871 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2872for Python.")
3f641af0 2873 (license license:bsd-3)))
8176d4d5
DT
2874
2875(define-public python2-markupsafe
2876 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2877
2878(define-public python-jinja2
2879 (package
2880 (name "python-jinja2")
e98149b3 2881 (version "2.8")
fe34f0d1
DT
2882 (source
2883 (origin
2884 (method url-fetch)
e98149b3 2885 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2886 (sha256
2887 (base32
e98149b3 2888 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2889 (build-system python-build-system)
f22efa01 2890 (propagated-inputs
f3b98f4f 2891 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2892 (home-page "http://jinja.pocoo.org/")
2893 (synopsis "Python template engine")
2894 (description
2895 "Jinja2 is a small but fast and easy to use stand-alone template engine
2896written in pure Python.")
3f641af0 2897 (license license:bsd-3)))
fe34f0d1
DT
2898
2899(define-public python2-jinja2
2900 (package-with-python2 python-jinja2))
3580ab8b 2901
f7d17ac7
EE
2902(define-public python-pystache
2903 (package
2904 (name "python-pystache")
2905 (version "0.5.4")
2906 (source (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "pystache" version))
2909 (sha256
2910 (base32
2911 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2912 (build-system python-build-system)
8bd5164b
MB
2913 (arguments
2914 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2915 (home-page "http://defunkt.io/pystache/")
2916 (synopsis "Python logic-less template engine")
2917 (description
2918 "Pystache is a Python implementation of the framework agnostic,
2919logic-free templating system Mustache.")
8bd5164b
MB
2920 (license license:expat)
2921 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2922
2923(define-public python2-pystache
8bd5164b
MB
2924 (package (inherit (package-with-python2
2925 (strip-python2-variant python-pystache)))
2926 (arguments
2927 `(#:python ,python-2
2928 #:phases
2929 (modify-phases %standard-phases
2930 (replace 'check
2931 (lambda _
2932 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2933
1285119b
RW
2934(define-public python-joblib
2935 (package
2936 (name "python-joblib")
f34ef331 2937 (version "0.10.3")
1285119b
RW
2938 (source (origin
2939 (method url-fetch)
f34ef331 2940 (uri (pypi-uri "joblib" version))
1285119b
RW
2941 (sha256
2942 (base32
6aa5f1ca
HG
2943 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2944 (modules '((guix build utils)))
2945 (snippet
2946 '(begin
2947 ;; Remove pre-compiled .pyc files from source.
2948 (for-each delete-file-recursively
2949 (find-files "." "__pycache__" #:directories? #t))
2950 (for-each delete-file (find-files "." "\\.pyc$"))
2951 #t))))
1285119b 2952 (build-system python-build-system)
a8dd960a
RW
2953 (arguments
2954 `(#:phases
2955 (modify-phases %standard-phases
2956 (add-before 'check 'disable-failing-tests
2957 (lambda _
2958 ;; This numpydoc tests fails for unknown reasons
2959 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2960 ;; This numpydoc test depends on matplotlib, which is not a
2961 ;; required input.
2962 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2963 ;; These tests fail to execute sys.executable
2964 (substitute* "joblib/test/test_parallel.py"
2965 (("import nose" line)
2966 (string-append "from nose.plugins.skip import SkipTest\n" line))
2967 (("def test_nested_parallel_warnings" line)
2968 (string-append "@SkipTest\n" line))
2969 (("def test_parallel_with_interactively_defined_functions" line)
2970 (string-append "@SkipTest\n" line)))
2971 #t)))))
f052ec9a 2972 ;; Provide nose to enable tests command
1285119b 2973 (native-inputs
f3b98f4f 2974 `(("python-nose" ,python-nose)
f34ef331
RW
2975 ("python-sphinx" ,python-sphinx)
2976 ("python-docutils" ,python-docutils)
2977 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2978 (home-page "http://pythonhosted.org/joblib/")
2979 (synopsis "Using Python functions as pipeline jobs")
2980 (description
2981 "Joblib is a set of tools to provide lightweight pipelining in Python.
2982In particular, joblib offers: transparent disk-caching of the output values
2983and lazy re-evaluation (memoize pattern), easy simple parallel computing
2984logging and tracing of the execution.")
3f641af0 2985 (license license:bsd-3)))
1285119b
RW
2986
2987(define-public python2-joblib
2988 (package-with-python2 python-joblib))
2989
3580ab8b
DT
2990(define-public python-docutils
2991 (package
2992 (name "python-docutils")
00e0ca7c 2993 (version "0.13.1")
3580ab8b
DT
2994 (source
2995 (origin
2996 (method url-fetch)
00e0ca7c 2997 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2998 (sha256
2999 (base32
00e0ca7c 3000 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3001 (build-system python-build-system)
3580ab8b
DT
3002 (arguments
3003 '(#:tests? #f)) ; no setup.py test command
3004 (home-page "http://docutils.sourceforge.net/")
3005 (synopsis "Python Documentation Utilities")
3006 (description
3007 "Docutils is a modular system for processing documentation into useful
3008formats, such as HTML, XML, and LaTeX. For input Docutils supports
3009reStructuredText.")
3010 ;; Most of the source code is public domain, but some source files are
3011 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3012 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3013
3014(define-public python2-docutils
3015 (package-with-python2 python-docutils))
fb35b7c0
DT
3016
3017(define-public python-pygments
3018 (package
3019 (name "python-pygments")
7d2e758d 3020 (version "2.1.3")
fb35b7c0
DT
3021 (source
3022 (origin
3023 (method url-fetch)
9f442285 3024 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3025 (sha256
3026 (base32
7d2e758d 3027 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3028 (build-system python-build-system)
995cb99e
MB
3029 (arguments
3030 ;; FIXME: Tests require sphinx, which depends on this.
3031 '(#:tests? #f))
fb35b7c0
DT
3032 (home-page "http://pygments.org/")
3033 (synopsis "Syntax highlighting")
3034 (description
3035 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3036 (license license:bsd-2)))
fb35b7c0
DT
3037
3038(define-public python2-pygments
3039 (package-with-python2 python-pygments))
9dd6078d
DT
3040
3041(define-public python-sphinx
3042 (package
3043 (name "python-sphinx")
c227458a 3044 (version "1.5.1")
9dd6078d
DT
3045 (source
3046 (origin
3047 (method url-fetch)
9a8acd00 3048 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3049 (sha256
3050 (base32
c227458a 3051 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3052 (build-system python-build-system)
03cb5f9e 3053 (arguments
c227458a
DM
3054 `(#:phases
3055 (modify-phases %standard-phases
3056 (replace 'check
3057 (lambda _
3058 ;; Requires Internet access.
3059 (delete-file "tests/test_build_linkcheck.py")
3060 (zero? (system* "make" "test")))))))
f22efa01 3061 (propagated-inputs
9a8acd00
DM
3062 `(("python-imagesize" ,python-imagesize)
3063 ("python-sphinx-alabaster-theme"
3064 ,python-sphinx-alabaster-theme)
3065 ("python-babel" ,python-babel)
3066 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3067 ("python-docutils" ,python-docutils)
9a8acd00
DM
3068 ("python-jinja2" ,python-jinja2)
3069 ("python-pygments" ,python-pygments)
a10b9810 3070 ("python-requests" ,python-requests)
9a8acd00 3071 ("python-six" ,python-six)))
c227458a
DM
3072 (native-inputs
3073 `(("graphviz" ,graphviz)
3074 ("python-html5lib" ,python-html5lib)
3075 ("python-mock" ,python-mock)
a10b9810 3076 ("python-nose" ,python-nose)))
9dd6078d
DT
3077 (home-page "http://sphinx-doc.org/")
3078 (synopsis "Python documentation generator")
3079 (description "Sphinx is a tool that makes it easy to create documentation
3080for Python projects or other documents consisting of multiple reStructuredText
3081sources.")
9a8acd00
DM
3082 (license license:bsd-3)
3083 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3084
3061b331
MFM
3085(define-public python-sphinx-1.5.3
3086 (package
3087 (inherit python-sphinx)
3088 (name "python-sphinx")
3089 (version "1.5.3")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (pypi-uri "Sphinx" version))
3094 (sha256
3095 (base32
3096 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3097 (native-inputs
23b9168d 3098 `(("python-pytest" ,python-pytest-3.0)
3061b331
MFM
3099 ,@(package-native-inputs python-sphinx)))))
3100
9dd6078d 3101(define-public python2-sphinx
9a8acd00
DM
3102 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3103 (package
3104 (inherit base)
3105 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3106 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3107 ,@(package-native-inputs base)))
3108 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3109 ,@(package-propagated-inputs base))))))
6888830b 3110
ad320b20
RW
3111(define-public python-sphinx-rtd-theme
3112 (package
3113 (name "python-sphinx-rtd-theme")
3114 (version "0.1.6")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (string-append "https://pypi.python.org/packages/source/s/"
3119 "sphinx_rtd_theme/sphinx_rtd_theme-"
3120 version ".tar.gz"))
3121 (sha256
3122 (base32
3123 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3124 (build-system python-build-system)
9893cff3 3125 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3126 (propagated-inputs
3127 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3128 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3129 (synopsis "ReadTheDocs.org theme for Sphinx")
3130 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3131 (license license:expat)))
ad320b20
RW
3132
3133(define-public python2-sphinx-rtd-theme
3134 (package-with-python2 python-sphinx-rtd-theme))
3135
fe94cf0c
HG
3136(define-public python-rst.linker
3137 (package
3138 (name "python-rst.linker")
3139 (version "1.7")
3140 (source
3141 (origin
3142 (method url-fetch)
3143 (uri (pypi-uri "rst.linker" version))
3144 (sha256
3145 (base32
3146 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3147 (build-system python-build-system)
3148 (propagated-inputs
22d7360b 3149 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3150 ("python-six" ,python-six)))
3151 (native-inputs
3152 `(("python-setuptools-scm" ,python-setuptools-scm)))
3153 ;; Test would require path.py, which would introduce a cyclic dependence.
3154 (arguments `(#:tests? #f))
3155 ;; Note: As of version 1.7 the documentation is not worth building.
3156 (home-page "https://github.com/jaraco/rst.linker")
3157 (synopsis "Sphinx plugin to add links and timestamps")
3158 (description "rst.linker allows to automatically replace text by a
3159reStructuredText external reference or timestamps. It's primary purpose is to
3160augment the changelog, but it can be used for other documents, too.")
3161 (license license:expat)))
3162
3163(define-public python2-rst.linker
3164 (package-with-python2 python-rst.linker))
3165
f4de5b3b
CAW
3166(define-public python-feedgenerator
3167 (package
3168 (name "python-feedgenerator")
d5c183d1 3169 (version "1.9")
f4de5b3b 3170 (source
f4de5b3b 3171 (origin
f0412aa2
EF
3172 (method url-fetch)
3173 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3174 (sha256
3175 (base32
d5c183d1 3176 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3177 (modules '((guix build utils)))
3178 (snippet
3179 '(begin
3180 ;; Remove pre-compiled .pyc files from source.
3181 (for-each delete-file-recursively
3182 (find-files "." "__pycache__" #:directories? #t))
3183 (for-each delete-file (find-files "." "\\.pyc$"))
3184 #t))))
f4de5b3b 3185 (build-system python-build-system)
dae73d9b 3186 (propagated-inputs
f3b98f4f 3187 `(("python-pytz" ,python-pytz)
f4de5b3b 3188 ("python-six" ,python-six)))
f0412aa2 3189 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3190 (synopsis
3191 "Standalone version of Django's Atom/RSS feed generator")
3192 (description
3193 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3194which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3195 (license license:bsd-3)))
f4de5b3b
CAW
3196
3197(define-public python2-feedgenerator
3198 (package-with-python2 python-feedgenerator))
3199
59ad30e3
CAW
3200(define-public python-blinker
3201 (package
3202 (name "python-blinker")
7fb9ff4d 3203 (version "1.4")
59ad30e3
CAW
3204 (source
3205 (origin
3206 (method url-fetch)
7fb9ff4d 3207 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3208 (sha256
3209 (base32
7fb9ff4d 3210 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3211 (build-system python-build-system)
59ad30e3
CAW
3212 (home-page "http://pythonhosted.org/blinker/")
3213 (synopsis "Fast, simple object-to-object and broadcast signaling")
3214 (description
3215 "Blinker provides a fast dispatching system that allows any number of
3216interested parties to subscribe to events, or \"signals\".")
3217 (license license:expat)))
3218
3219(define-public python2-blinker
3220 (package-with-python2 python-blinker))
3221
b8050e71
CAW
3222(define-public pelican
3223 (package
3224 (name "pelican")
11f97c27 3225 (version "3.6.3")
b8050e71
CAW
3226 (source
3227 (origin
3228 (method url-fetch)
11f97c27 3229 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3230 (sha256
3231 (base32
11f97c27 3232 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3233 (build-system python-build-system)
f22efa01 3234 (propagated-inputs
b8050e71
CAW
3235 `(("python-feedgenerator" ,python-feedgenerator)
3236 ("python-jinja2" ,python-jinja2)
3237 ("python-pygments" ,python-pygments)
3238 ("python-docutils" ,python-docutils)
3239 ("python-pytz" ,python-pytz)
3240 ("python-blinker" ,python-blinker)
3241 ("python-unidecode" ,python-unidecode)
3242 ("python-six" ,python-six)
22d7360b 3243 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3244 (home-page "http://getpelican.com/")
3245 (arguments
3246 `(;; XXX Requires a lot more packages to do unit tests :P
3247 #:tests? #f
3248 #:phases (modify-phases %standard-phases
3249 (add-before
3250 'install 'adjust-requires
3251 ;; Since feedgenerator is installed from git, it doesn't
3252 ;; conform to the version requirements.
3253 ;;
3254 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3255 ;; version requirement so setuptools doesn't get confused.
3256 (lambda _
3257 (substitute* "setup.py"
3258 (("['\"]feedgenerator.*?['\"]")
3259 "'feedgenerator'")))))))
3260 (synopsis "Python-based static site publishing system")
3261 (description
3262 "Pelican is a tool to generate a static blog from reStructuredText,
3263Markdown input files, and more. Pelican uses Jinja2 for templating
3264and is very extensible.")
3f641af0 3265 (license license:agpl3+)))
b8050e71 3266
240ca4aa
RW
3267(define-public python-scikit-learn
3268 (package
3269 (name "python-scikit-learn")
8e401ab6 3270 (version "0.18.1")
240ca4aa
RW
3271 (source
3272 (origin
3273 (method url-fetch)
3274 (uri (string-append
3275 "https://github.com/scikit-learn/scikit-learn/archive/"
3276 version ".tar.gz"))
7e21b9fb 3277 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3278 (sha256
3279 (base32
8e401ab6 3280 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3281 (build-system python-build-system)
3282 (arguments
3283 `(#:phases
4d25c486
MB
3284 (modify-phases %standard-phases
3285 (delete 'check)
3286 (add-after 'install 'check
3287 ;; Running tests from the source directory requires
3288 ;; an "inplace" build with paths relative to CWD.
3289 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3290 ;; Use the installed version instead.
3291 (lambda* (#:key inputs outputs #:allow-other-keys)
3292 (add-installed-pythonpath inputs outputs)
3293 ;; some tests require access to "$HOME"
3294 (setenv "HOME" "/tmp")
3295 ;; Step out of the source directory just to be sure.
3296 (chdir "..")
3297 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3298 (inputs
328bb95d
HG
3299 `(("openblas" ,openblas)))
3300 (native-inputs
8e401ab6
RW
3301 `(("python-nose" ,python-nose)
3302 ("python-cython" ,python-cython)))
240ca4aa
RW
3303 (propagated-inputs
3304 `(("python-numpy" ,python-numpy)
3305 ("python-scipy" ,python-scipy)))
3306 (home-page "http://scikit-learn.org/")
3307 (synopsis "Machine Learning in Python")
3308 (description
3309 "Scikit-learn provides simple and efficient tools for data
3310mining and data analysis.")
1b5241c5 3311 (license license:bsd-3)))
240ca4aa
RW
3312
3313(define-public python2-scikit-learn
1b5241c5 3314 (package-with-python2 python-scikit-learn))
240ca4aa 3315
12f8f9bb
RW
3316(define-public python-scikit-image
3317 (package
3318 (name "python-scikit-image")
3319 (version "0.11.3")
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (string-append
3324 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3325 version ".tar.gz"))
3326 (sha256
3327 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3328 (build-system python-build-system)
9026e689
MB
3329 (arguments
3330 ;; TODO: Some tests require running X11 server. Disable them?
3331 '(#:tests? #f))
b83e2333 3332 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3333 (propagated-inputs
3334 `(("python-matplotlib" ,python-matplotlib)
3335 ("python-networkx" ,python-networkx)
12f8f9bb 3336 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3337 ("python-pillow" ,python-pillow)))
3338 (native-inputs
b83e2333
HG
3339 `(("python-numpy" ,python-numpy)
3340 ("python-cython" ,python-cython)
3341 ("python-six" ,python-six)))
12f8f9bb
RW
3342 (home-page "http://scikit-image.org/")
3343 (synopsis "Image processing in Python")
3344 (description
e881752c 3345 "Scikit-image is a collection of algorithms for image processing.")
12733594 3346 (license license:bsd-3)))
12f8f9bb
RW
3347
3348(define-public python2-scikit-image
12733594 3349 (package-with-python2 python-scikit-image))
12f8f9bb 3350
5394a6a6
RW
3351(define-public python-redis
3352 (package
3353 (name "python-redis")
911a8faf 3354 (version "2.10.5")
5394a6a6
RW
3355 (source
3356 (origin
3357 (method url-fetch)
911a8faf 3358 (uri (pypi-uri "redis" version))
5394a6a6 3359 (sha256
911a8faf 3360 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3361 (build-system python-build-system)
3362 ;; Tests require a running Redis server
3363 (arguments '(#:tests? #f))
cf8124b0
HG
3364 ;; As long as we are not running test, we do not need this input :-)
3365 ;;(native-inputs
3366 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3367 (home-page "https://github.com/andymccurdy/redis-py")
3368 (synopsis "Redis Python client")
3369 (description
3370 "This package provides a Python interface to the Redis key-value store.")
3371 (license license:expat)))
3372
3373(define-public python2-redis
3374 (package-with-python2 python-redis))
3375
748cef5b
RW
3376(define-public python-rq
3377 (package
3378 (name "python-rq")
eed206cb 3379 (version "0.7.1")
748cef5b
RW
3380 (source
3381 (origin
3382 (method url-fetch)
eed206cb 3383 (uri (pypi-uri "rq" version))
748cef5b 3384 (sha256
eed206cb 3385 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3386 (build-system python-build-system)
3387 (propagated-inputs
3388 `(("python-click" ,python-click)
3389 ("python-redis" ,python-redis)))
748cef5b
RW
3390 (home-page "http://python-rq.org/")
3391 (synopsis "Simple job queues for Python")
3392 (description
3393 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3394processing them in the background with workers. It is backed by Redis and it
3395is designed to have a low barrier to entry.")
3f641af0 3396 (license license:bsd-2)))
748cef5b
RW
3397
3398(define-public python2-rq
3399 (package-with-python2 python-rq))
3400
6888830b
FB
3401(define-public python-cython
3402 (package
3403 (name "python-cython")
cd158a2b 3404 (version "0.25.2")
6888830b
FB
3405 (source
3406 (origin
3407 (method url-fetch)
56918e26 3408 (uri (pypi-uri "Cython" version))
a3dea991 3409 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
6888830b
FB
3410 (sha256
3411 (base32
cd158a2b 3412 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
6888830b
FB
3413 (build-system python-build-system)
3414 ;; we need the full python package and not just the python-wrapper
3415 ;; because we need libpython3.3m.so
3416 (inputs
3417 `(("python" ,python)))
3418 (arguments
3419 `(#:phases
b92f651b
EF
3420 (modify-phases %standard-phases
3421 (add-before 'check 'set-HOME
3422 ;; some tests require access to "$HOME/.cython"
3423 (lambda _ (setenv "HOME" "/tmp")))
3424 (replace 'check
3425 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3426 (home-page "http://cython.org/")
3427 (synopsis "C extensions for Python")
3428 (description "Cython is an optimising static compiler for both the Python
3429programming language and the extended Cython programming language. It makes
3430writing C extensions for Python as easy as Python itself.")
3f641af0 3431 (license license:asl2.0)
48b311b1 3432 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3433
3434(define-public python2-cython
48b311b1
LC
3435 (package (inherit (package-with-python2
3436 (strip-python2-variant python-cython)))
6888830b
FB
3437 (name "python2-cython")
3438 (inputs
3439 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3440
ee5fb7ee
AV
3441;; The RPython toolchain currently does not support Python 3.
3442(define-public python2-rpython
3443 (package
3444 (name "python2-rpython")
3445 (version "0.1.4")
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (pypi-uri "rpython" version))
3450 (sha256
3451 (base32
3452 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3453 (build-system python-build-system)
3454 (arguments `(#:python ,python-2))
3455 (native-inputs
f3b98f4f 3456 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3457 (home-page "https://rpython.readthedocs.org")
3458 (synopsis "Framework for implementing interpreters and virtual machines")
3459 (description "RPython is a translation and support framework for
3460producing implementations of dynamic languages, emphasizing a clean separation
3461between language specification and implementation aspects.")
3462 (license license:expat)))
3463
7ccb71e0 3464(define-public python-numpy
0da98533 3465 (package
7ccb71e0
TD
3466 (name "python-numpy")
3467 (version "1.12.0")
0da98533
FB
3468 (source
3469 (origin
3470 (method url-fetch)
7ccb71e0
TD
3471 (uri (string-append
3472 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3473 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3474 (sha256
3475 (base32
7ccb71e0 3476 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3477 (build-system python-build-system)
3478 (inputs
328bb95d 3479 `(("openblas" ,openblas)
cba256f8 3480 ("lapack" ,lapack)))
0da98533 3481 (native-inputs
7ccb71e0
TD
3482 `(("python-cython" ,python-cython)
3483 ("python-nose" ,python-nose)
2efabc55 3484 ("gfortran" ,gfortran)))
0da98533
FB
3485 (arguments
3486 `(#:phases
2efabc55
HG
3487 (modify-phases %standard-phases
3488 (add-before 'build 'set-environment-variables
3489 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3490 (call-with-output-file "site.cfg"
3491 (lambda (port)
cba256f8
RW
3492 (format port
3493 "[openblas]
dbdfe515
RW
3494libraries = openblas
3495library_dirs = ~a/lib
3496include_dirs = ~a/include
cba256f8 3497
2efabc55
HG
3498# backslash-n to make emacs happy
3499\n[lapack]
cba256f8
RW
3500lapack_libs = lapack
3501library_dirs = ~a/lib
3502include_dirs = ~a/include
3503"
3504 (assoc-ref inputs "openblas")
3505 (assoc-ref inputs "openblas")
3506 (assoc-ref inputs "lapack")
3507 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3508 ;; Use "gcc" executable, not "cc".
3509 (substitute* "numpy/distutils/system_info.py"
3510 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3511 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3512 #t))
6a843168
FB
3513 ;; Tests can only be run after the library has been installed and not
3514 ;; within the source directory.
2efabc55
HG
3515 (delete 'check)
3516 (add-after 'install 'check
3517 (lambda* (#:key outputs inputs #:allow-other-keys)
3518 ;; Make installed package available for running the tests
3519 (add-installed-pythonpath inputs outputs)
6a843168 3520 (with-directory-excursion "/tmp"
89b5c60e 3521 (zero? (system* "python" "-c"
2efabc55 3522 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3523 (home-page "http://www.numpy.org/")
3524 (synopsis "Fundamental package for scientific computing with Python")
3525 (description "NumPy is the fundamental package for scientific computing
e881752c 3526with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3527object, sophisticated (broadcasting) functions, tools for integrating C/C++
3528and Fortran code, useful linear algebra, Fourier transform, and random number
3529capabilities.")
3f641af0 3530 (license license:bsd-3)))
0da98533 3531
7ccb71e0
TD
3532(define-public python2-numpy
3533 (package-with-python2 python-numpy))
15bfe6d6 3534
460fccd4 3535(define-public python-munch
3536 (package
3537 (name "python-munch")
3538 (version "2.0.4")
3539 (source
3540 (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "munch" version))
3543 (sha256
3544 (base32
3545 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3546 (build-system python-build-system)
3547 (home-page "https://github.com/Infinidat/munch")
3548 (synopsis "Dot-accessible dictionary")
3549 (description "Munch is a dot-accessible dictionary similar to JavaScript
3550objects.")
3551 (license license:expat)))
3552
3553(define-public python2-munch
3554 (package-with-python2 python-munch))
3555
3a1bfe18
RW
3556(define-public python2-fastlmm
3557 (package
3558 (name "python2-fastlmm")
154d0016 3559 (version "0.2.21")
3a1bfe18
RW
3560 (source
3561 (origin
3562 (method url-fetch)
b074e7d4 3563 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3564 (sha256
3565 (base32
154d0016 3566 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3567 (build-system python-build-system)
3568 (arguments
3569 `(#:python ,python-2)) ; only Python 2.7 is supported
3570 (propagated-inputs
3571 `(("python2-numpy" ,python2-numpy)
3572 ("python2-scipy" ,python2-scipy)
3573 ("python2-matplotlib" ,python2-matplotlib)
3574 ("python2-pandas" ,python2-pandas)
3575 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3576 ("python2-pysnptools" ,python2-pysnptools)))
3577 (native-inputs
3578 `(("unzip" ,unzip)
2efabc55 3579 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3580 ("python2-mock" ,python2-mock)
3581 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3582 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3583 (synopsis "Perform genome-wide association studies on large data sets")
3584 (description
3585 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3586Models, is a program for performing both single-SNP and SNP-set genome-wide
3587association studies (GWAS) on extremely large data sets.")
3f641af0 3588 (license license:asl2.0)))
3a1bfe18 3589
7ccb71e0
TD
3590(define-public python-numpy-documentation
3591 (package
3592 (name "python-numpy-documentation")
3593 (version (package-version python-numpy))
3594 (source (package-source python-numpy))
3595 (build-system python-build-system)
2ee8869a 3596 (native-inputs
7ccb71e0
TD
3597 `(("python-matplotlib" ,python-matplotlib)
3598 ("python-numpy" ,python-numpy)
3599 ("pkg-config" ,pkg-config)
2efabc55
HG
3600 ("python-sphinx" ,python-sphinx)
3601 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3602 ("texlive" ,texlive)
3603 ("texinfo" ,texinfo)
3604 ("perl" ,perl)
7ccb71e0
TD
3605 ("scipy-sphinx-theme"
3606 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3607 (method git-fetch)
3608 (uri (git-reference
3609 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3610 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3611 (sha256
3612 (base32
67416769 3613 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3614 ,@(package-native-inputs python-numpy)))
2ee8869a 3615 (arguments
7ccb71e0
TD
3616 `(#:tests? #f ; we're only generating the documentation
3617 #:phases
3618 (modify-phases %standard-phases
3619 (delete 'build)
3620 (replace 'install
3621 (lambda* (#:key inputs outputs #:allow-other-keys)
3622 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3623 (doc (string-append
3624 data "/doc/" ,name "-"
3625 ,(package-version python-numpy)))
3626 (info-reader (string-append data "/info"))
3627 (html (string-append doc "/html"))
3628 (scipy-sphinx-theme "scipy-sphinx-theme")
3629 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3630 (pyver ,(string-append "PYVER=")))
3631 (with-directory-excursion "doc"
3632 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3633 (mkdir-p html)
3634 (system* "make" "html" pyver)
3635 (system* "make" "latex" "PAPER=a4" pyver)
3636 (system* "make" "-C" "build/latex"
3637 "all-pdf" "PAPER=a4" pyver)
3638 ;; FIXME: Generation of the info file fails.
3639 ;; (system* "make" "info" pyver)
3640 ;; (mkdir-p info)
3641 ;; (copy-file "build/texinfo/numpy.info"
3642 ;; (string-append info "/numpy.info"))
3643 (for-each (lambda (file)
3644 (copy-file (string-append "build/latex" file)
3645 (string-append doc file)))
3646 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3647 (with-directory-excursion "build/html"
3648 (for-each (lambda (file)
3649 (let* ((dir (dirname file))
3650 (tgt-dir (string-append html "/" dir)))
3651 (unless (equal? "." dir)
3652 (mkdir-p tgt-dir))
3653 (install-file file html)))
3654 (find-files "." ".*")))))
3655 #t)))))
3656 (home-page (package-home-page python-numpy))
3657 (synopsis "Documentation for the python-numpy package")
3658 (description (package-description python-numpy))
3659 (license (package-license python-numpy))))
2ee8869a 3660
7ccb71e0
TD
3661(define-public python2-numpy-documentation
3662 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3663 (package
3664 (inherit numpy-documentation)
3665 (native-inputs `(("python2-functools32" ,python2-functools32)
3666 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3667
0151a8df 3668(define-public python-pygit2
3669 (package
3670 (name "python-pygit2")
022c9772 3671 (version "0.25.0")
0151a8df 3672 (source
3673 (origin
3674 (method url-fetch)
3675 (uri (pypi-uri "pygit2" version))
3676 (sha256
3677 (base32
bb6043fe
MB
3678 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3679 (patches
3680 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3681 (build-system python-build-system)
3682 (propagated-inputs
3683 `(("python-six" ,python-six)
3684 ("python-cffi" ,python-cffi)
3685 ("libgit2" ,libgit2)
3686 ("python-tox" ,python-tox)))
3687 (home-page "https://github.com/libgit2/pygit2")
3688 (synopsis "Python bindings for libgit2")
3689 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3690library, libgit2 implements Git plumbing.")
3691 ;; GPL2.0 only, with linking exception.
3692 (license license:gpl2)))
3693
3694(define-public python2-pygit2
3695 (package-with-python2 python-pygit2))
3696
15bfe6d6
FB
3697(define-public python-pyparsing
3698 (package
3699 (name "python-pyparsing")
e0669289 3700 (version "2.0.3")
15bfe6d6
FB
3701 (source
3702 (origin
3703 (method url-fetch)
de67e922
LF
3704 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3705 "/pyparsing-" version
15bfe6d6
FB
3706 "/pyparsing-" version ".tar.gz"))
3707 (sha256
3708 (base32
e0669289 3709 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3710 (build-system python-build-system)
3711 (outputs '("out" "doc"))
3712 (arguments
3713 `(#:tests? #f ; no test target
3714 #:modules ((guix build python-build-system)
3715 (guix build utils))
3716 #:phases
3717 (alist-cons-after
3718 'install 'install-doc
3719 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3720 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3721 "/share/doc/" ,name "-" ,version))
3722 (html-doc (string-append doc "/html"))
3723 (examples (string-append doc "/examples")))
3724 (mkdir-p html-doc)
3725 (mkdir-p examples)
89b5c60e 3726 (for-each
15bfe6d6 3727 (lambda (dir tgt)
89b5c60e 3728 (map (lambda (file)
96c46210 3729 (install-file file tgt))
15bfe6d6
FB
3730 (find-files dir ".*")))
3731 (list "docs" "htmldoc" "examples")
3732 (list doc html-doc examples))))
3733 %standard-phases)))
3734 (home-page "http://pyparsing.wikispaces.com")
3735 (synopsis "Python parsing class library")
3736 (description
3737 "The pyparsing module is an alternative approach to creating and
3738executing simple grammars, vs. the traditional lex/yacc approach, or the use
3739of regular expressions. The pyparsing module provides a library of classes
3740that client code uses to construct the grammar directly in Python code.")
bd3fa666 3741 (license license:expat)))
15bfe6d6
FB
3742
3743(define-public python2-pyparsing
3744 (package-with-python2 python-pyparsing))
3745
ec00de35
FB
3746(define-public python-numpydoc
3747 (package
3748 (name "python-numpydoc")
3749 (version "0.5")
3750 (source
3751 (origin
3752 (method url-fetch)
89b5c60e 3753 (uri (string-append
ec00de35
FB
3754 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3755 version ".tar.gz"))
3756 (sha256
3757 (base32
5e4d8f67
AE
3758 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3759 (modules '((guix build utils)))
3760 (snippet
3761 '(begin
3762 ;; Drop a test requiring matplotlib, which we cannot add as an
3763 ;; input since it would create a circular dependency: Extend the
3764 ;; test for Python 3, where it is already dropped, to Python 2.
3765 (substitute* "numpydoc/tests/test_plot_directive.py"
3766 (("3") "2"))))))
ec00de35 3767 (build-system python-build-system)
fe4a8da4 3768 (propagated-inputs
213d1745
HG
3769 `(("python-sphinx" ,python-sphinx)))
3770 (native-inputs
3771 `(("python-nose" ,python-nose)))
ec00de35
FB
3772 (home-page "https://pypi.python.org/pypi/numpydoc")
3773 (synopsis
3774 "Numpy's Sphinx extensions")
3775 (description
3776 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3777 (license license:bsd-2)))
ec00de35
FB
3778
3779(define-public python2-numpydoc
5e4d8f67 3780 (package-with-python2 python-numpydoc))
1c65314c 3781
1e656049
RW
3782(define-public python-numexpr
3783 (package
3784 (name "python-numexpr")
2ee57340 3785 (version "2.6.1")
1e656049
RW
3786 (source
3787 (origin
3788 (method url-fetch)
26112c0a 3789 (uri (pypi-uri "numexpr" version))
1e656049
RW
3790 (sha256
3791 (base32
2ee57340 3792 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3793 (build-system python-build-system)
3794 (arguments `(#:tests? #f)) ; no tests included
3795 (propagated-inputs
3796 `(("python-numpy" ,python-numpy)))
3797 (home-page "https://github.com/pydata/numexpr")
3798 (synopsis "Fast numerical expression evaluator for NumPy")
3799 (description
3800 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3801expressions that operate on arrays are accelerated and use less memory than
3802doing the same calculation in Python. In addition, its multi-threaded
3803capabilities can make use of all your cores, which may accelerate
3804computations, most specially if they are not memory-bounded (e.g. those using
3805transcendental functions).")
f210e944 3806 (license license:expat)))
1e656049
RW
3807
3808(define-public python2-numexpr
f210e944 3809 (package-with-python2 python-numexpr))
1e656049 3810
361d982c
MB
3811(define-public python-cycler
3812 (package
3813 (name "python-cycler")
3814 (version "0.10.0")
3815 (source (origin
3816 (method url-fetch)
3817 (uri (pypi-uri "cycler" version))
3818 (sha256
3819 (base32
3820 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3821 (build-system python-build-system)
3822 (arguments
3823 ;; XXX: The current version requires 'coveralls' which we don't have.
3824 ;; Enable this for the next release which uses 'python-pytest'.
3825 '(#:tests? #f))
3826 (propagated-inputs
3827 `(("python-six" ,python-six)))
3828 (home-page "http://matplotlib.org/cycler/")
3829 (synopsis "Composable keyword argument iterator")
3830 (description
3831 "When using @code{matplotlib} and plotting more than one line, it is
3832common to want to be able to want to be able to cycle over one or more artist
3833styles; but the plotting logic can quickly become involved.
3834To address this and enable easy cycling over arbitrary @code{kwargs}, the
3835@code{Cycler} class was developed.")
3836 (license license:bsd-3)))
3837
3838(define-public python2-cycler
3839 (package-with-python2 python-cycler))
3840
2aa6d3ae
TD
3841(define-public python-colorspacious
3842 (package
3843 (name "python-colorspacious")
3844 (version "1.1.0")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3849 version ".tar.gz"))
3850 (file-name (string-append name "-" version))
3851 (sha256
3852 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3853 (build-system python-build-system)
3854 (propagated-inputs
3855 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
3856 (native-inputs
3857 `(("python-nose" ,python-nose)))
3858 (arguments
3859 `(#:phases
3860 (modify-phases %standard-phases
3861 (replace 'check
3862 (lambda _
3863 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
3864 (home-page "https://github.com/njsmith/colorspacious")
3865 (synopsis "Python library for colorspace conversions")
3866 (description "@code{colorspacious} is a Python library that lets you
3867convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3868 (license license:expat)))
3869
3870(define-public python2-colorspacious
3871 (package-with-python2 python-colorspacious))
3872
1c65314c
FB
3873(define-public python-matplotlib
3874 (package
3875 (name "python-matplotlib")
4535a93a 3876 (version "2.0.0")
1c65314c
FB
3877 (source
3878 (origin
3879 (method url-fetch)
4535a93a
TD
3880 (uri (string-append
3881 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3882 (file-name (string-append name "-" version ".tar.gz"))
1c65314c
FB
3883 (sha256
3884 (base32
4535a93a 3885 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
1c65314c 3886 (build-system python-build-system)
25f9a068 3887 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
3888 `(("python-cycler" ,python-cycler)
3889 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
3890 ("python-pygobject" ,python-pygobject)
3891 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3892 ("python-tkinter" ,python "tk")
22d7360b 3893 ("python-dateutil" ,python-dateutil)
7ccb71e0 3894 ("python-numpy" ,python-numpy)
ca33a3ad
HG
3895 ("python-pillow" ,python-pillow)
3896 ("python-pytz" ,python-pytz)
3897 ("python-six" ,python-six)
25f9a068
FB
3898 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3899 ;; from 'gtk+') provides the required 'typelib' files used by
3900 ;; 'gobject-introspection'. The location of these files is set with the
3901 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3902 ;; is done automatically by a 'native-search-path' procedure. However,
3903 ;; at run-time the user must set this variable as follows:
3904 ;;
3905 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3906 ("gtk+" ,gtk+)
3907 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3908 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3909 ;; object. For this reason we need to import both libraries.
3910 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3911 ("python-pycairo" ,python-pycairo)
3912 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3913 (inputs
ca33a3ad 3914 `(("libpng" ,libpng)
1c65314c
FB
3915 ("imagemagick" ,imagemagick)
3916 ("freetype" ,freetype)
25f9a068
FB
3917 ("cairo" ,cairo)
3918 ("glib" ,glib)
1c65314c 3919 ;; FIXME: Add backends when available.
1c65314c 3920 ;("python-wxpython" ,python-wxpython)
4535a93a 3921 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
3922 ("tcl" ,tcl)
3923 ("tk" ,tk)))
1c65314c
FB
3924 (native-inputs
3925 `(("pkg-config" ,pkg-config)
ca33a3ad 3926 ("python-nose" ,python-nose)
4535a93a 3927 ("python-mock" ,python-mock)))
1c65314c
FB
3928 (arguments
3929 `(#:phases
42b7009a
DM
3930 (modify-phases %standard-phases
3931 (add-before 'build 'configure-environment
3932 (lambda* (#:key outputs inputs #:allow-other-keys)
3933 (let ((cairo (assoc-ref inputs "cairo"))
3934 (gtk+ (assoc-ref inputs "gtk+")))
3935 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3936 ;; has not effect.
3937 (setenv "LD_LIBRARY_PATH"
3938 (string-append cairo "/lib:" gtk+ "/lib"))
3939 (setenv "HOME" (getcwd))
3940 (call-with-output-file "setup.cfg"
3941 (lambda (port)
3942 (format port "[directories]~%
1bbc659f 3943basedirlist = ~a,~a~%
57b7b8cd 3944 [rc_options]~%
1bbc659f
FB
3945backend = TkAgg~%"
3946 (assoc-ref inputs "tcl")
4535a93a
TD
3947 (assoc-ref inputs "tk")))))
3948 #t)))))
1c65314c
FB
3949 (home-page "http://matplotlib.org")
3950 (synopsis "2D plotting library for Python")
3951 (description
3952 "Matplotlib is a Python 2D plotting library which produces publication
3953quality figures in a variety of hardcopy formats and interactive environments
3954across platforms. Matplotlib can be used in Python scripts, the python and
3955ipython shell, web application servers, and six graphical user interface
3956toolkits.")
3f641af0 3957 (license license:psfl)
57b7b8cd 3958 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3959
764c077b 3960(define-public python2-matplotlib
57b7b8cd
LC
3961 (let ((matplotlib (package-with-python2
3962 (strip-python2-variant python-matplotlib))))
764c077b 3963 (package (inherit matplotlib)
88c26834
AE
3964 ;; Make sure to use special packages for Python 2 instead
3965 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3966 (propagated-inputs
7ca0dbc3 3967 `(("python2-pycairo" ,python2-pycairo)
4535a93a 3968 ("python2-functools32" ,python2-functools32)
764c077b 3969 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 3970 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
3971 ("python2-tkinter" ,python-2 "tk")
3972 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3973 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3974
4535a93a
TD
3975(define-public python-matplotlib-documentation
3976 (package
3977 (name "python-matplotlib-documentation")
3978 (version (package-version python-matplotlib))
3979 (source (package-source python-matplotlib))
3980 (build-system python-build-system)
3981 (native-inputs
3982 `(("python-matplotlib" ,python-matplotlib)
3983 ("python-colorspacious" ,python-colorspacious)
3984 ("python-sphinx" ,python-sphinx)
3985 ("python-numpydoc" ,python-numpydoc)
3986 ("python-ipython" ,python-ipython)
1eaaea41
TD
3987 ("python-mock" ,python-mock)
3988 ("graphviz" ,graphviz)
4535a93a
TD
3989 ("texlive" ,texlive)
3990 ("texinfo" ,texinfo)
3991 ,@(package-native-inputs python-matplotlib)))
3992 (arguments
3993 `(#:tests? #f ; we're only generating documentation
3994 #:phases
3995 (modify-phases %standard-phases
1eaaea41
TD
3996 (replace 'build
3997 (lambda _
3998 (chdir "doc")
3999 ;; Produce pdf in 'A4' format.
4000 (substitute* "conf.py"
4001 (("latex_paper_size = 'letter'") "")
4002 ;; latex_paper_size is deprecated -> set paper size using
4003 ;; latex_elements
4004 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4005 ;; insert at a point where latex_elements{} is defined:
4006 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4007 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4008 (replace 'install
42b7009a 4009 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4010 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4011 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4012 (info (string-append data "/info"))
4013 (html (string-append doc "/html")))
1eaaea41
TD
4014 (mkdir-p html)
4015 (mkdir-p info)
4016 (copy-recursively "build/html" html)
4017 (symlink (string-append html "/_images")
4018 (string-append info "/matplotlib-figures"))
4019 (with-directory-excursion "build/texinfo"
4020 (substitute* "matplotlib.texi"
4021 (("@image\\{([^,]*)" all file)
4022 (string-append "@image{matplotlib-figures/" file)))
18b31516 4023 (symlink (string-append html "/_images")
1eaaea41
TD
4024 "./matplotlib-figures")
4025 (system* "makeinfo" "--no-split"
4026 "-o" "matplotlib.info" "matplotlib.texi"))
4027 (copy-file "build/texinfo/matplotlib.info"
4028 (string-append info "/matplotlib.info"))
4029 (copy-file "build/latex/Matplotlib.pdf"
4030 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4031 #t)))))
4032 (home-page (package-home-page python-matplotlib))
4033 (synopsis "Documentation for the python-matplotlib package")
4034 (description (package-description python-matplotlib))
4035 (license (package-license python-matplotlib))))
1c65314c 4036
4535a93a
TD
4037(define-public python2-matplotlib-documentation
4038 (package-with-python2 python-matplotlib-documentation))
94914805 4039
0dde6232
RW
4040(define-public python2-pysnptools
4041 (package
4042 (name "python2-pysnptools")
a800018e 4043 (version "0.3.9")
0dde6232
RW
4044 (source
4045 (origin
4046 (method url-fetch)
3f2e9675 4047 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4048 (sha256
4049 (base32
a800018e 4050 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4051 (build-system python-build-system)
4052 (arguments
4053 `(#:python ,python-2)) ; only Python 2.7 is supported
4054 (propagated-inputs
4055 `(("python2-numpy" ,python2-numpy)
4056 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4057 ("python2-pandas" ,python2-pandas)))
4058 (native-inputs
4059 `(("python2-cython" ,python2-cython)))
0dde6232 4060 (native-inputs
f3b98f4f 4061 `(("unzip" ,unzip)))
0dde6232
RW
4062 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4063 (synopsis "Library for reading and manipulating genetic data")
4064 (description
4065 "PySnpTools is a library for reading and manipulating genetic data. It
4066can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4067those files. It can also efficiently manipulate ranges of integers using set
4068operators such as union, intersection, and difference.")
3f641af0 4069 (license license:asl2.0)))
0dde6232 4070
c9b1b4f9
RW
4071(define-public python-rpy2
4072 (package
4073 (name "python-rpy2")
ec3bcbc7 4074 (version "2.7.6")
c9b1b4f9
RW
4075 (source
4076 (origin
4077 (method url-fetch)
ec3bcbc7 4078 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4079 (sha256
4080 (base32
ec3bcbc7 4081 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4082 (build-system python-build-system)
444464ec
MB
4083 (arguments
4084 '(#:phases
4085 (modify-phases %standard-phases
4086 (delete 'check)
4087 (add-after 'install 'check
4088 (lambda* (#:key outputs inputs #:allow-other-keys)
4089 ;; It's easier to run tests after install.
4090 ;; Make installed package available for running the tests
4091 (add-installed-pythonpath inputs outputs)
4092 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4093 (propagated-inputs
4094 `(("python-six" ,python-six)))
c9b1b4f9 4095 (inputs
482d9591 4096 `(("readline" ,readline)
c9b1b4f9
RW
4097 ("icu4c" ,icu4c)
4098 ("pcre" ,pcre)
2d7c4ae3 4099 ("r-minimal" ,r-minimal)
aeb64f3c 4100 ("r-survival" ,r-survival)))
c9b1b4f9 4101 (native-inputs
f3b98f4f 4102 `(("zlib" ,zlib)))
c9b1b4f9
RW
4103 (home-page "http://rpy.sourceforge.net/")
4104 (synopsis "Python interface to the R language")
4105 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4106low-level interface to R from Python, a proposed high-level interface,
4107including wrappers to graphical libraries, as well as R-like structures and
4108functions.")
3f641af0 4109 (license license:gpl3+)))
c9b1b4f9
RW
4110
4111(define-public python2-rpy2
4112 (let ((rpy2 (package-with-python2 python-rpy2)))
4113 (package (inherit rpy2)
d6abd094 4114 (propagated-inputs
c9b1b4f9 4115 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4116 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4117
bb986599
FB
4118(define-public python-scipy
4119 (package
4120 (name "python-scipy")
35093253 4121 (version "0.18.1")
bb986599
FB
4122 (source
4123 (origin
4124 (method url-fetch)
35093253
TD
4125 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4126 version ".tar.gz"))
4127 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4128 (sha256
4129 (base32
35093253 4130 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4131 (build-system python-build-system)
dd86c0d1 4132 (propagated-inputs
bb986599
FB
4133 `(("python-numpy" ,python-numpy)
4134 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4135 ("python-pyparsing" ,python-pyparsing)))
4136 (inputs
4137 `(("lapack" ,lapack)
719b01c1 4138 ("openblas" ,openblas)))
bb986599 4139 (native-inputs
35093253
TD
4140 `(("python-cython" ,python-cython)
4141 ("python-nose" ,python-nose)
dd86c0d1 4142 ("python-sphinx" ,python-sphinx)
5248d49e 4143 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4144 ("gfortran" ,gfortran)
bb986599
FB
4145 ("perl" ,perl)))
4146 (outputs '("out" "doc"))
4147 (arguments
4148 `(#:phases
16ca6aaa 4149 (modify-phases %standard-phases
16ca6aaa
MB
4150 (add-before 'build 'configure-openblas
4151 (lambda* (#:key inputs #:allow-other-keys)
4152 (call-with-output-file "site.cfg"
4153 (lambda (port)
4154 (format port
4155 "[blas]
719b01c1
RW
4156libraries = openblas
4157library_dirs = ~a/lib
4158include_dirs = ~a/include
d548e6aa
HG
4159
4160# backslash-n to make emacs happy
4161\n[atlas]
719b01c1
RW
4162library_dirs = ~a/lib
4163atlas_libs = openblas
4164"
16ca6aaa
MB
4165 (assoc-ref inputs "openblas")
4166 (assoc-ref inputs "openblas")
4167 (assoc-ref inputs "openblas"))))
db967b64 4168 #t))
35093253
TD
4169 (add-after 'install 'install-doc
4170 (lambda* (#:key inputs outputs #:allow-other-keys)
4171 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4172 (doc (string-append data "/doc/" ,name "-" ,version))
4173 (html (string-append doc "/html"))
4174 (pyver ,(string-append "PYVER=")))
4175 ;; Make installed package available for building the
4176 ;; documentation
4177 (add-installed-pythonpath inputs outputs)
4178 (with-directory-excursion "doc"
4179 ;; Fix generation of images for mathematical expressions.
4180 (substitute* (find-files "source" "conf\\.py")
4181 (("pngmath_use_preview = True")
4182 "pngmath_use_preview = False"))
4183 (mkdir-p html)
4184 (system* "make" "html" pyver)
4185 (with-directory-excursion "build/html"
4186 (for-each (lambda (file)
4187 (let* ((dir (dirname file))
4188 (tgt-dir (string-append html "/" dir)))
4189 (install-file file html)))
4190 (find-files "." ".*")))))
4191 #t))
4192 (add-after 'unpack 'fix-tests
4193 (lambda _
4194 (substitute* "scipy/integrate/tests/test_quadpack.py"
4195 (("libm.so") "libm.so.6"))
4196 #t))
4197 ;; Tests can only be run after the library has been installed and not
4198 ;; within the source directory.
4199 (delete 'check)
4200 (add-after 'install 'check
4201 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4202 (add-installed-pythonpath inputs outputs)
35093253
TD
4203 (with-directory-excursion "/tmp"
4204 (zero? (system* "python" "-c"
4205 "import scipy; scipy.test('full')")))
4206 #t)))))
bb986599
FB
4207 (home-page "http://www.scipy.org/")
4208 (synopsis "The Scipy library provides efficient numerical routines")
4209 (description "The SciPy library is one of the core packages that make up
4210the SciPy stack. It provides many user-friendly and efficient numerical
4211routines such as routines for numerical integration and optimization.")
9200fe14 4212 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4213 (license license:bsd-3)))
bb986599 4214
764c077b 4215(define-public python2-scipy
35093253
TD
4216 (package-with-python2
4217 (strip-python2-variant python-scipy)))
bb986599 4218
e537c917
CB
4219(define-public python-sockjs-tornado
4220 (package
4221 (name "python-sockjs-tornado")
4222 (version "1.0.3")
4223 (source
4224 (origin
4225 (method url-fetch)
4226 (uri (pypi-uri "sockjs-tornado" version))
4227 (sha256
4228 (base32
4229 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4230 (build-system python-build-system)
4231 (arguments
4232 `(;; There are no tests, and running the test phase requires missing
4233 ;; dependencies
4234 #:tests? #f))
4235 (propagated-inputs
4236 `(("python-tornado" ,python-tornado)))
4237 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4238 (synopsis
4239 "SockJS python server implementation on top of Tornado framework")
4240 (description
4241 "SockJS-tornado provides the server side counterpart to a SockJS client
4242library, through the Tornado framework.
4243
4244SockJS provides a low latency, full duplex, cross-domain communication channel
4245between a web browser and web server.")
4246 (license license:expat)))
4247
4248(define-public python2-sockjs-tornado
4249 (package-with-python2 python-sockjs-tornado))
4250
73acc193 4251(define-public python-socksipy-branch
4252 (package
4253 (name "python-socksipy-branch")
4254 (version "1.01")
4255 (source
4256 (origin
4257 (method url-fetch)
4258 (uri (pypi-uri "SocksiPy-branch" version))
4259 (sha256
4260 (base32
4261 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4262 (build-system python-build-system)
4263 (arguments
4264 `(#:tests? #f)) ; There are no tests
4265 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4266 (synopsis "Python SOCKS module")
4267 (description
4268 "SocksiPy - A Python SOCKS client module. It provides a
4269socket-like interface that supports connections to any TCP
4270service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4271The original version was developed by Dan Haim, this is a
4272branch created by Mario Vilas to address some open issues,
4273as the original project seems to have been abandoned circa 2007.")
4274 (license license:bsd-3)))
4275
4276(define-public python2-socksipy-branch
4277 (package-with-python2 python-socksipy-branch))
4278
94914805
EB
4279(define-public python-sqlalchemy
4280 (package
4281 (name "python-sqlalchemy")
a4ba286b 4282 (version "1.0.12")
94914805
EB
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (string-append "https://pypi.python.org/packages/source/S/"
4287 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4288 (sha256
4289 (base32
a4ba286b 4290 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4291 (build-system python-build-system)
4292 (native-inputs
4293 `(("python-cython" ,python-cython) ;for c extensions
4294 ("python-pytest" ,python-pytest)
4295 ("python-mock" ,python-mock))) ;for tests
4296 (arguments
4297 `(#:phases (alist-replace
4298 'check
4299 (lambda _ (zero? (system* "py.test")))
4300 %standard-phases)))
4301 (home-page "http://www.sqlalchemy.org")
4302 (synopsis "Database abstraction library")
4303 (description
4304 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4305gives application developers the full power and flexibility of SQL. It
4306provides a full suite of well known enterprise-level persistence patterns,
4307designed for efficient and high-performing database access, adapted into a
4308simple and Pythonic domain language.")
3f641af0 4309 (license license:x11)))
94914805
EB
4310
4311(define-public python2-sqlalchemy
4312 (package-with-python2 python-sqlalchemy))
c937562e 4313
4a093330
DM
4314(define-public python-pycodestyle
4315 (package
4316 (name "python-pycodestyle")
4317 (version "2.0.0")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (pypi-uri "pycodestyle" version))
4322 (sha256
4323 (base32
4324 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4325 (build-system python-build-system)
4326 (home-page "https://pycodestyle.readthedocs.io/")
4327 (synopsis "Python style guide checker")
4328 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4329Python code against some of the style conventions in
4330@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4331 (license license:expat)))
4a093330
DM
4332
4333(define-public python2-pycodestyle
f210e944 4334 (package-with-python2 python-pycodestyle))
b91912c4
DM
4335
4336(define-public python-orderedmultidict
4337 (package
4338 (name "python-orderedmultidict")
9e2802cb 4339 (version "0.7.11")
b91912c4
DM
4340 (source
4341 (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "orderedmultidict" version))
4344 (sha256
4345 (base32
9e2802cb 4346 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4347 (build-system python-build-system)
4348 (arguments
4349 `(#:phases
4350 (modify-phases %standard-phases
4351 (add-after 'unpack 'fix-tests
4352 (lambda _
4353 ;; The package uses nosetest for running the tests.
4354 ;; Adding this initfile allows to run the test suite
4355 ;; without requiring nosetest.
4356 (zero? (system* "touch" "tests/__init__.py")))))))
4357 (propagated-inputs
4358 `(("python-six" ,python-six)))
4359 (native-inputs
4360 `(("python-pycodestyle" ,python-pycodestyle)))
4361 (home-page "https://github.com/gruns/orderedmultidict")
4362 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4363 (description "This package contains a library for ordered multivalue
4364dictionaries. A multivalue dictionary is a dictionary that can store
4365multiple values for the same key. An ordered multivalue dictionary is a
4366multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4367 (license license:unlicense)))
b91912c4
DM
4368
4369(define-public python2-orderedmultidict
f210e944 4370 (package-with-python2 python-orderedmultidict))
9dede065
DM
4371
4372(define-public python-furl
4373 (package
4374 (name "python-furl")
4375 (version "0.5.6")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (pypi-uri "furl" version))
4380 (sha256
4381 (base32
4382 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4383 (build-system python-build-system)
4384 (propagated-inputs
4385 `(("python-six" ,python-six)
4386 ("python-orderedmultidict" ,python-orderedmultidict)))
4387 (native-inputs
4388 `(("python-pycodestyle" ,python-pycodestyle)))
4389 (home-page "https://github.com/gruns/furl")
4390 (synopsis "URL manipulation in Python")
4391 (description "Furl provides an easy-to-use alternative to the
4392@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4393 (license license:unlicense)))
9dede065
DM
4394
4395(define-public python2-furl
f210e944 4396 (package-with-python2 python-furl))
462bf271
DM
4397
4398(define-public python-flask-babel
4399 (package
4400 (name "python-flask-babel")
4401 (version "0.11.1")
4402 (source
4403 (origin
4404 (method url-fetch)
4405 (uri (pypi-uri "Flask-Babel" version))
4406 (sha256
4407 (base32
4408 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4409 (build-system python-build-system)
4410 (propagated-inputs
4411 `(("python-flask" ,python-flask)
4412 ("python-babel" ,python-babel)
4413 ("python-jinja2" ,python-jinja2)
4414 ("python-pytz" ,python-pytz)))
4415 (home-page "https://github.com/python-babel/flask-babel")
4416 (synopsis "Add i18n/l10n support to Flask applications")
4417 (description "This package implements internationalization and localization
4418support for Flask. This is based on the Python babel module as well as pytz -
4419both of which are installed automatically if you install this library.")
f210e944 4420 (license license:bsd-3)))
462bf271
DM
4421
4422(define-public python2-flask-babel
f210e944 4423 (package-with-python2 python-flask-babel))
4a093330 4424
de2966cf
EF
4425(define-public python-sqlalchemy-utils
4426 (package
4427 (name "python-sqlalchemy-utils")
fd2662e9 4428 (version "0.32.13")
de2966cf
EF
4429 (source
4430 (origin
4431 (method url-fetch)
4432 (uri (pypi-uri "SQLAlchemy-Utils" version))
4433 (sha256
4434 (base32
fd2662e9 4435 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4436 (build-system python-build-system)
35d56b7b
MB
4437 (arguments
4438 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4439 ;; #:phases
4440 ;; (modify-phases %standard-phases
4441 ;; (replace 'check
4442 ;; (lambda _
4443 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4444 (propagated-inputs
de2966cf
EF
4445 `(("python-six" ,python-six)
4446 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4447 (native-inputs
22d7360b 4448 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4449 ("python-flexmock" ,python-flexmock)
4450 ("python-psycopg2" ,python-psycopg2)
4451 ("python-pytest" ,python-pytest)
4452 ("python-pytz" ,python-pytz)))
de2966cf
EF
4453 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4454 (synopsis "Various utility functions for SQLAlchemy")
4455 (description
4456 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4457for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4458
4459You might also want to install the following optional dependencies:
4460@enumerate
4461@item @code{python-passlib}
4462@item @code{python-babel}
4463@item @code{python-cryptography}
4464@item @code{python-pytz}
4465@item @code{python-psycopg2}
4466@item @code{python-furl}
4467@item @code{python-flask-babel}
4468@end enumerate
4469")
de2966cf
EF
4470 (license license:bsd-3)))
4471
4472(define-public python2-sqlalchemy-utils
f210e944 4473 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4474
af5a4602
CAW
4475(define-public python-alembic
4476 (package
4477 (name "python-alembic")
4418990d 4478 (version "0.8.10")
af5a4602
CAW
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (pypi-uri "alembic" version))
4483 (sha256
4484 (base32
4418990d 4485 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4486 (build-system python-build-system)
4487 (native-inputs
4488 `(("python-mock" ,python-mock)
4489 ("python-pytest-cov" ,python-pytest-cov)))
4490 (propagated-inputs
4491 `(("python-sqlalchemy" ,python-sqlalchemy)
4492 ("python-mako" ,python-mako)
4493 ("python-editor" ,python-editor)))
4494 (home-page "http://bitbucket.org/zzzeek/alembic")
4495 (synopsis
4496 "Database migration tool for SQLAlchemy")
4497 (description
4498 "Alembic is a lightweight database migration tool for usage with the
4499SQLAlchemy Database Toolkit for Python.")
f210e944 4500 (license license:expat)))
af5a4602
CAW
4501
4502(define-public python2-alembic
f210e944 4503 (package-with-python2 python-alembic))
af5a4602 4504
138adbbe
TD
4505(define-public python-autopep8
4506 (package
4507 (name "python-autopep8")
4508 (version "1.2.4")
4509 (source
4510 (origin
4511 (method url-fetch)
4512 (uri (pypi-uri "autopep8" version))
4513 (sha256
4514 (base32
4515 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4516 (build-system python-build-system)
4517 (propagated-inputs
4518 `(("python-pep8" ,python-pep8)))
4519 (home-page "https://github.com/hhatto/autopep8")
4520 (synopsis "Format Python code according to the PEP 8 style guide")
4521 (description
4522 "@code{autopep8} automatically formats Python code to conform to
4523the PEP 8 style guide. It uses the pycodestyle utility to determine
4524what parts of the code needs to be formatted. @code{autopep8} is
4525capable of fixing most of the formatting issues that can be reported
4526by pycodestyle.")
4527 (license (license:non-copyleft
4528 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4529
4530(define-public python2-autopep8
4531 (package-with-python2 python-autopep8))
4532
1671c07c
EB
4533(define-public python-distutils-extra
4534 (package
4535 (name "python-distutils-extra")
4536 (version "2.38")
4537 (source
4538 (origin
4539 (method url-fetch)
4540 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4541 version "/+download/python-distutils-extra-"
4542 version ".tar.gz"))
4543 (sha256
4544 (base32
4545 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4546 (build-system python-build-system)
1671c07c
EB
4547 (home-page "https://launchpad.net/python-distutils-extra/")
4548 (synopsis "Enhancements to Python's distutils")
4549 (description
4550 "The python-distutils-extra module enables you to easily integrate
4551gettext support, themed icons, and scrollkeeper-based documentation into
4552Python's distutils.")
3f641af0 4553 (license license:gpl2)))
1671c07c
EB
4554
4555(define-public python2-distutils-extra
4556 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4557
4558(define-public python2-elib.intl
4559 (package
4560 (name "python2-elib.intl")
4561 (version "0.0.3")
4562 (source
4563 (origin
4564 ;; This project doesn't tag releases or publish tarballs, so we take
4565 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4566 (method git-fetch)
4567 (uri (git-reference
4568 (url "https://github.com/dieterv/elib.intl.git")
4569 (commit "d09997cfef")))
4570 (sha256
4571 (base32
4572 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4573 (build-system python-build-system)
ea5456c8
EB
4574 (arguments
4575 ;; incompatible with Python 3 (exception syntax)
4576 `(#:python ,python-2
b41a05ce 4577 #:tests? #f))
ea5456c8
EB
4578 (home-page "https://github.com/dieterv/elib.intl")
4579 (synopsis "Enhanced internationalization for Python")
4580 (description
4581 "The elib.intl module provides enhanced internationalization (I18N)
4582services for your Python modules and applications.")
3f641af0 4583 (license license:lgpl3+)))
ea5456c8 4584
c937562e
EB
4585(define-public python-pillow
4586 (package
4587 (name "python-pillow")
aba5182c 4588 (version "3.3.3")
c937562e
EB
4589 (source
4590 (origin
4591 (method url-fetch)
f1d9231d 4592 (uri (pypi-uri "Pillow" version))
a9681c74 4593 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4594 (sha256
4595 (base32
aba5182c 4596 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4597 (build-system python-build-system)
4598 (native-inputs
f3b98f4f 4599 `(("python-nose" ,python-nose)))
c937562e 4600 (inputs
5ff408d9
SB
4601 `(("freetype" ,freetype)
4602 ("lcms" ,lcms)
c937562e
EB
4603 ("zlib" ,zlib)
4604 ("libjpeg" ,libjpeg)
4605 ("openjpeg" ,openjpeg)
5ff408d9
SB
4606 ("libtiff" ,libtiff)
4607 ("libwebp" ,libwebp)))
c937562e 4608 (arguments
e5358a6b 4609 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4610 (add-after
4611 'install 'check-installed
6151120a 4612 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4613 (begin
4614 (setenv "HOME" (getcwd))
6151120a
HG
4615 ;; Make installed package available for running the
4616 ;; tests
4617 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4618 (and (zero? (system* "python" "selftest.py"
4619 "--installed"))
4620 (zero? (system* "python" "test-installed.py"))))))
4621 (delete 'check))))
c937562e
EB
4622 (home-page "https://pypi.python.org/pypi/Pillow")
4623 (synopsis "Fork of the Python Imaging Library")
4624 (description
4625 "The Python Imaging Library adds image processing capabilities to your
4626Python interpreter. This library provides extensive file format support, an
4627efficient internal representation, and fairly powerful image processing
4628capabilities. The core image library is designed for fast access to data
4629stored in a few basic pixel formats. It should provide a solid foundation for
4630a general image processing tool.")
3f641af0 4631 (license (license:x11-style
c937562e
EB
4632 "http://www.pythonware.com/products/pil/license.htm"
4633 "The PIL Software License"))))
4634
4635(define-public python2-pillow
4636 (package-with-python2 python-pillow))
bb986599 4637
a415f036
FB
4638(define-public python-pycparser
4639 (package
4640 (name "python-pycparser")
5043b20d 4641 (version "2.17")
a415f036
FB
4642 (source
4643 (origin
4644 (method url-fetch)
38eb6919 4645 (uri (pypi-uri "pycparser" version))
a415f036
FB
4646 (sha256
4647 (base32
5043b20d 4648 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4649 (outputs '("out" "doc"))
4650 (build-system python-build-system)
4651 (native-inputs
f3b98f4f 4652 `(("pkg-config" ,pkg-config)))
a415f036 4653 (arguments
89b5c60e 4654 `(#:phases
819939cb
TGR
4655 (modify-phases %standard-phases
4656 (replace 'check
4657 (lambda _
4658 (with-directory-excursion "tests"
4659 (zero? (system* "python" "all_tests.py")))))
4660 (add-after 'install 'install-doc
4661 (lambda* (#:key outputs #:allow-other-keys)
4662 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4663 (doc (string-append data "/doc/" ,name "-" ,version))
4664 (examples (string-append doc "/examples")))
4665 (mkdir-p examples)
4666 (for-each (lambda (file)
4667 (copy-file (string-append "." file)
4668 (string-append doc file)))
4669 '("/README.rst" "/CHANGES" "/LICENSE"))
4670 (copy-recursively "examples" examples)))))))
a415f036
FB
4671 (home-page "https://github.com/eliben/pycparser")
4672 (synopsis "C parser in Python")
4673 (description
4674 "Pycparser is a complete parser of the C language, written in pure Python
4675using the PLY parsing library. It parses C code into an AST and can serve as
4676a front-end for C compilers or analysis tools.")
3f641af0 4677 (license license:bsd-3)))
a415f036
FB
4678
4679(define-public python2-pycparser
4680 (package-with-python2 python-pycparser))
57c3f716
FB
4681
4682(define-public python-cffi
4683 (package
4684 (name "python-cffi")
2d3a437c 4685 (version "1.4.2")
57c3f716
FB
4686 (source
4687 (origin
4688 (method url-fetch)
2d3a437c 4689 (uri (pypi-uri "cffi" version))
89b5c60e 4690 (sha256
2d3a437c 4691 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4692 (build-system python-build-system)
4693 (outputs '("out" "doc"))
4694 (inputs
4695 `(("libffi" ,libffi)))
4696 (propagated-inputs ; required at run-time
4697 `(("python-pycparser" ,python-pycparser)))
4698 (native-inputs
4699 `(("pkg-config" ,pkg-config)
4700 ("python-sphinx" ,python-sphinx)
f3b98f4f 4701 ("python-pytest" ,python-pytest)))
57c3f716 4702 (arguments
4179f952 4703 `(#:phases
57c3f716
FB
4704 (alist-cons-after
4705 'install 'install-doc
4706 (lambda* (#:key outputs #:allow-other-keys)
4707 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4708 (doc (string-append data "/doc/" ,name "-" ,version))
4709 (html (string-append doc "/html")))
4710 (with-directory-excursion "doc"
4711 (system* "make" "html")
4712 (mkdir-p html)
4713 (copy-recursively "build/html" html))
4714 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4715 %standard-phases)))
4716 (home-page "http://cffi.readthedocs.org")
4717 (synopsis "Foreign function interface for Python")
4718 (description
4719 "Foreign Function Interface for Python calling C code.")
bd3fa666 4720 (license license:expat)))
57c3f716
FB
4721
4722(define-public python2-cffi
4723 (package-with-python2 python-cffi))
6fa14469
FB
4724
4725(define-public python-xcffib
4726 (package
4727 (name "python-xcffib")
4728 (version "0.1.9")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (string-append "https://pypi.python.org/packages/source/x/"
4733 "xcffib/xcffib-" version ".tar.gz"))
4734 (sha256
4735 (base32
4736 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4737 (build-system python-build-system)
4738 (inputs
482d9591 4739 `(("libxcb" ,libxcb)))
6fa14469 4740 (propagated-inputs
482d9591
HG
4741 `(("python-cffi" ,python-cffi) ; used at run time
4742 ("python-six" ,python-six)))
6fa14469 4743 (arguments
e2816ac7
MB
4744 `(;; FIXME: Tests cannot load libxcb.so.1
4745 #:tests? #f
4746 #:phases
c8cd850c
MB
4747 (modify-phases %standard-phases
4748 (add-after 'install 'install-doc
4749 (lambda* (#:key outputs #:allow-other-keys)
4750 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4751 "/doc/" ,name "-" ,version)))
4752 (mkdir-p doc)
4753 (copy-file "README.md"
4754 (string-append doc "/README.md"))
4755 #t))))))
6fa14469
FB
4756 (home-page "https://github.com/tych0/xcffib")
4757 (synopsis "XCB Python bindings")
4758 (description
4759 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4760support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4761 (license license:expat)))
6fa14469
FB
4762
4763(define-public python2-xcffib
4764 (package-with-python2 python-xcffib))
4765
9e099723
FB
4766(define-public python-cairocffi
4767 (package
4768 (name "python-cairocffi")
4769 (version "0.6")
4770 (source
4771 (origin
4772 (method url-fetch)
4773 ;; The archive on pypi is missing the 'utils' directory!
4774 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4775 version ".tar.gz"))
f586c877 4776 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4777 (sha256
4778 (base32
4779 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4780 (build-system python-build-system)
4781 (outputs '("out" "doc"))
4782 (inputs
4783 `(("gdk-pixbuf" ,gdk-pixbuf)
4784 ("cairo" ,cairo)))
4785 (native-inputs
4786 `(("pkg-config" ,pkg-config)
4787 ("python-sphinx" ,python-sphinx)
f3b98f4f 4788 ("python-docutils" ,python-docutils)))
9e099723
FB
4789 (propagated-inputs
4790 `(("python-xcffib" ,python-xcffib))) ; used at run time
4791 (arguments
a792e1aa
MB
4792 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4793 #:tests? #f
4794 #:phases
6734c7ba
MB
4795 (modify-phases %standard-phases
4796 (add-after 'install 'install-doc
4797 (lambda* (#:key inputs outputs #:allow-other-keys)
4798 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4799 (doc (string-append data "/doc/" ,name "-" ,version))
4800 (html (string-append doc "/html")))
4801 (setenv "LD_LIBRARY_PATH"
4802 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4803 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4804 (setenv "LANG" "en_US.UTF-8")
4805 (mkdir-p html)
4806 (for-each (lambda (file)
4807 (copy-file (string-append "." file)
4808 (string-append doc file)))
4809 '("/README.rst" "/CHANGES" "/LICENSE"))
4810 (system* "python" "setup.py" "build_sphinx")
4811 (copy-recursively "docs/_build/html" html)
4812 #t))))))
9e099723
FB
4813 (home-page "https://github.com/SimonSapin/cairocffi")
4814 (synopsis "Python bindings and object-oriented API for Cairo")
4815 (description
4816 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4817Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4818graphics library with support for multiple backends including image buffers,
4819PNG, PostScript, PDF, and SVG file output.")
3f641af0 4820 (license license:bsd-3)))
9e099723
FB
4821
4822(define-public python2-cairocffi
4823 (package-with-python2 python-cairocffi))
4824
3cff95cb
RW
4825(define-public python-decorator
4826 (package
4827 (name "python-decorator")
d79fa7da 4828 (version "4.0.10")
3cff95cb
RW
4829 (source
4830 (origin
4831 (method url-fetch)
e21338be 4832 (uri (pypi-uri "decorator" version))
3cff95cb 4833 (sha256
d79fa7da 4834 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4835 (build-system python-build-system)
4836 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4837 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4838 (synopsis "Python module to simplify usage of decorators")
4839 (description
4840 "The aim of the decorator module is to simplify the usage of decorators
4841for the average programmer, and to popularize decorators usage giving examples
4842of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4843etc. The core of this module is a decorator factory.")
4844 (license license:expat)))
4845
4846(define-public python2-decorator
4847 (package-with-python2 python-decorator))
4848
2c0499ad
RW
4849(define-public python-drmaa
4850 (package
4851 (name "python-drmaa")
7c427932 4852 (version "0.7.7")
2c0499ad
RW
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (string-append
4857 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4858 version ".tar.gz"))
4859 (sha256
7c427932 4860 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
4861 (build-system python-build-system)
4862 ;; The test suite requires libdrmaa which is provided by the cluster
4863 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4864 ;; should be set to the path of the libdrmaa library.
4865 (arguments '(#:tests? #f))
4866 (native-inputs
f3b98f4f 4867 `(("python-nose" ,python-nose)))
2c0499ad
RW
4868 (home-page "https://pypi.python.org/pypi/drmaa")
4869 (synopsis "Python bindings for the DRMAA library")
4870 (description
4871 "A Python package for Distributed Resource Management (DRM) job
4872submission and control. This package is an implementation of the DRMAA 1.0
4873Python language binding specification.")
3f641af0 4874 (license license:bsd-3)))
2c0499ad
RW
4875
4876(define-public python2-drmaa
4877 (package-with-python2 python-drmaa))
4878
d05c6da0
RW
4879(define-public python-gridmap
4880 (package
4881 (name "python-gridmap")
4882 (version "0.13.0")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (string-append
4887 "https://github.com/pygridtools/gridmap/archive/v"
4888 version ".tar.gz"))
4889 (file-name (string-append name "-" version ".tar.gz"))
4890 (sha256
4891 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4892 (build-system python-build-system)
ad348f9f
MB
4893 (arguments
4894 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4895 (propagated-inputs
d05c6da0
RW
4896 `(("python-psutil" ,python-psutil)
4897 ("python-drmaa" ,python-drmaa)
4898 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4899 (home-page "https://github.com/pygridtools/gridmap")
4900 (synopsis "Create jobs on a cluster directly from Python")
4901 (description
4902 "Gridmap is a Python package to allow you to easily create jobs on the
4903cluster directly from Python. You can directly map Python functions onto the
4904cluster without needing to write any wrapper code yourself.")
3f641af0 4905 (license license:gpl3+)))
d05c6da0
RW
4906
4907(define-public python2-gridmap
4908 (package-with-python2 python-gridmap))
4909
cb6d5c54
RW
4910(define-public python-pexpect
4911 (package
4912 (name "python-pexpect")
ed118043 4913 (version "4.2.1")
cb6d5c54
RW
4914 (source
4915 (origin
4916 (method url-fetch)
ed118043 4917 (uri (pypi-uri "pexpect" version))
cb6d5c54 4918 (sha256
ed118043 4919 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4920 (build-system python-build-system)
4921 (arguments
4922 `(#:phases
4923 (modify-phases %standard-phases
ed118043
MB
4924 (add-before 'check 'prepare-tests
4925 (lambda _
4926 (substitute* (find-files "tests")
4927 (("/bin/ls") (which "ls"))
4928 (("/bin/echo") (which "echo"))
4929 (("/bin/which") (which "which"))
4930 ;; Many tests try to use the /bin directory which
4931 ;; is not present in the build environment.
4932 ;; Use one that's non-empty and unlikely to change.
4933 (("/bin'") "/dev'"))
4934 ;; XXX: Socket connection test gets "Connection reset by peer".
4935 ;; Why does it not work? Delete for now.
4936 (delete-file "tests/test_socket.py")
4937 #t))
3ee9355e 4938 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 4939 (native-inputs
ed118043 4940 `(("python-nose" ,python-nose)
350a3084 4941 ("python-pytest" ,python-pytest-3.0)
ed118043
MB
4942 ("man-db" ,man-db)
4943 ("which" ,which)))
4944 (propagated-inputs
4945 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4946 (home-page "http://pexpect.readthedocs.org/")
4947 (synopsis "Controlling interactive console applications")
4948 (description
4949 "Pexpect is a pure Python module for spawning child applications;
4950controlling them; and responding to expected patterns in their output.
4951Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4952child application and control it as if a human were typing commands.")
3f641af0 4953 (license license:isc)))
cb6d5c54
RW
4954
4955(define-public python2-pexpect
4956 (package-with-python2 python-pexpect))
4957
229ad120
RW
4958(define-public python-setuptools-scm
4959 (package
4960 (name "python-setuptools-scm")
5b1f31ff 4961 (version "1.15.0")
229ad120
RW
4962 (source (origin
4963 (method url-fetch)
383af6b0 4964 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4965 (sha256
4966 (base32
5b1f31ff 4967 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
4968 (build-system python-build-system)
4969 (home-page "https://github.com/pypa/setuptools_scm/")
4970 (synopsis "Manage Python package versions in SCM metadata")
4971 (description
383af6b0 4972 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4973@dfn{software configuration management} (SCM) metadata instead of declaring
4974them as the version argument or in a SCM managed file.")
4975 (license license:expat)))
4976
4977(define-public python2-setuptools-scm
4978 (package-with-python2 python-setuptools-scm))
4979
b74270ee
RW
4980(define-public python-pathpy
4981 (package
4982 (name "python-pathpy")
4983 (version "8.1.1")
4984 (source
4985 (origin
4986 (method url-fetch)
4987 (uri (string-append "https://pypi.python.org/packages/source/p/"
4988 "path.py/path.py-" version ".tar.gz"))
4989 (sha256
4990 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4991 (outputs '("out" "doc"))
b74270ee
RW
4992 (build-system python-build-system)
4993 (propagated-inputs
4994 `(("python-appdirs" ,python-appdirs)))
4995 (native-inputs
f3b98f4f 4996 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4997 ("python-sphinx" ,python-sphinx)
4998 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4999 ("python-pytest" ,python-pytest)
5000 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5001 (arguments
5002 `(#:phases
5003 (modify-phases %standard-phases
5004 (add-after 'build 'build-doc
5005 (lambda _
5006 (setenv "LANG" "en_US.UTF-8")
5007 (zero? (system* "python" "setup.py" "build_sphinx"))))
5008 (add-after 'install 'install-doc
5009 (lambda* (#:key outputs #:allow-other-keys)
5010 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5011 (doc (string-append data "/doc/" ,name "-" ,version))
5012 (html (string-append doc "/html")))
5013 (mkdir-p html)
5014 (for-each (lambda (file)
5015 (copy-file file (string-append doc "/" file)))
5016 '("README.rst" "CHANGES.rst"))
5017 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5018 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5019 (synopsis "Python module wrapper for built-in os.path")
5020 (description
5021 "@code{path.py} implements path objects as first-class entities, allowing
5022common operations on files to be invoked on those path objects directly.")
5023 (license license:expat)))
5024
5025(define-public python2-pathpy
5026 (package-with-python2 python-pathpy))
5027
0d34e01b
RW
5028(define-public python-pickleshare
5029 (package
5030 (name "python-pickleshare")
5031 (version "0.5")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (string-append "https://pypi.python.org/packages/source/p/"
5036 "pickleshare/pickleshare-" version ".tar.gz"))
5037 (sha256
5038 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5039 (build-system python-build-system)
5040 (propagated-inputs
5041 `(("python-pathpy" ,python-pathpy)))
5042 (home-page "https://github.com/vivainio/pickleshare")
5043 (synopsis "Tiny key value database with concurrency support")
5044 (description
5045 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5046Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5047shelve, many processes can access the database simultaneously. Changing a
5048value in database is immediately visible to other processes accessing the same
5049database. Concurrency is possible because the values are stored in separate
5050files. Hence the “database” is a directory where all files are governed by
5051PickleShare.")
5052 (license license:expat)))
5053
5054(define-public python2-pickleshare
5055 (package-with-python2 python-pickleshare))
5056
cd6e5189
RW
5057(define-public python-simplegeneric
5058 (package
5059 (name "python-simplegeneric")
5060 (version "0.8.1")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (string-append "https://pypi.python.org/packages/source/s/"
5065 "simplegeneric/simplegeneric-" version ".zip"))
5066 (sha256
5067 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5068 (build-system python-build-system)
5069 (native-inputs
f3b98f4f 5070 `(("unzip" ,unzip)))
cd6e5189
RW
5071 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5072 (synopsis "Python module for simple generic functions")
5073 (description
5074 "The simplegeneric module lets you define simple single-dispatch generic
5075functions, akin to Python’s built-in generic functions like @code{len()},
5076@code{iter()} and so on. However, instead of using specially-named methods,
5077these generic functions use simple lookup tables, akin to those used by
5078e.g. @code{pickle.dump()} and other generic functions found in the Python
5079standard library.")
3f641af0 5080 (license license:zpl2.1)))
cd6e5189
RW
5081
5082(define-public python2-simplegeneric
5083 (package-with-python2 python-simplegeneric))
5084
ddc7d8ed 5085(define-public python-ipython-genutils
c4abbac3 5086 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5087 (package
5088 (name "python-ipython-genutils")
5089 (version "0.1.0")
5090 (source
5091 (origin
5092 (method url-fetch)
5093 (uri (string-append "https://pypi.python.org/packages/source/i/"
5094 "ipython_genutils/ipython_genutils-"
5095 version ".tar.gz"))
5096 (sha256
5097 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5098 (build-system python-build-system)
5099 (arguments `(#:tests? #f)) ; no tests
5100 (home-page "http://ipython.org")
5101 (synopsis "Vestigial utilities from IPython")
5102 (description
c4abbac3
HG
5103 "This package provides retired utilities from IPython. No packages
5104outside IPython/Jupyter should depend on it.
5105
5106This package shouldn't exist. It contains some common utilities shared by
5107Jupyter and IPython projects during The Big Split. As soon as possible, those
5108packages will remove their dependency on this, and this package will go
5109away.")
3f641af0 5110 (license license:bsd-3)))
ddc7d8ed
RW
5111
5112(define-public python2-ipython-genutils
5113 (package-with-python2 python-ipython-genutils))
5114
2b10eb48
RW
5115(define-public python-traitlets
5116 (package
5117 (name "python-traitlets")
a5ba1481 5118 (version "4.2.0")
2b10eb48
RW
5119 (source
5120 (origin
5121 (method url-fetch)
cc0c4fde 5122 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5123 (sha256
5124 (base32
a5ba1481 5125 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5126 (build-system python-build-system)
5127 (arguments
5128 `(#:phases
5129 (modify-phases %standard-phases
5130 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5131 (propagated-inputs
5132 `(("python-ipython-genutils" ,python-ipython-genutils)
5133 ("python-decorator" ,python-decorator)))
5134 (native-inputs
cc0c4fde
EF
5135 `(("python-mock" ,python-mock)
5136 ("python-nose" ,python-nose)))
2b10eb48
RW
5137 (home-page "http://ipython.org")
5138 (synopsis "Configuration system for Python applications")
5139 (description
5140 "Traitlets is a framework that lets Python classes have attributes with
5141type checking, dynamically calculated default values, and ‘on change’
5142callbacks. The package also includes a mechanism to use traitlets for
5143configuration, loading values from files or from command line arguments. This
5144is a distinct layer on top of traitlets, so you can use traitlets in your code
5145without using the configuration machinery.")
3f641af0 5146 (license license:bsd-3)))
2b10eb48
RW
5147
5148(define-public python2-traitlets
5149 (package-with-python2 python-traitlets))
5150
4263b06f
RW
5151(define-public python-jupyter-core
5152 (package
5153 (name "python-jupyter-core")
45cc957c 5154 (version "4.2.1")
4263b06f
RW
5155 (source
5156 (origin
5157 (method url-fetch)
5158 (uri (string-append (pypi-uri "jupyter_core" version)))
5159 (sha256
5160 (base32
45cc957c 5161 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5162 (build-system python-build-system)
5163 ;; FIXME: not sure how to run the tests
5164 (arguments `(#:tests? #f))
5165 (propagated-inputs
5166 `(("python-traitlets" ,python-traitlets)))
5167 (home-page "http://jupyter.org/")
5168 (synopsis "Jupyter base package")
5169 (description
5170 "Jupyter core is the base package on which Jupyter projects rely.")
5171 (license license:bsd-3)))
5172
5173(define-public python2-jupyter-core
5174 (package-with-python2 python-jupyter-core))
5175
9ff01f2d
RW
5176(define-public python-jupyter-client
5177 (package
5178 (name "python-jupyter-client")
5179 (version "4.4.0")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (pypi-uri "jupyter_client" version))
5184 (sha256
5185 (base32
5186 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5187 (build-system python-build-system)
5188 ;; Tests fail because of missing native python kernel which I assume is
5189 ;; provided by the ipython package, which we cannot use because it would
5190 ;; cause a dependency cycle.
5191 (arguments `(#:tests? #f))
5192 (propagated-inputs
5193 `(("python-pyzmq" ,python-pyzmq)
5194 ("python-traitlets" ,python-traitlets)
5195 ("python-jupyter-core" ,python-jupyter-core)))
5196 (home-page "http://jupyter.org/")
5197 (synopsis "Jupyter protocol implementation and client libraries")
5198 (description
5199 "The @code{jupyter_client} package contains the reference implementation
5200of the Jupyter protocol. It also provides client and kernel management APIs
5201for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5202installing @code{kernelspec}s for use with Jupyter frontends.")
5203 (license license:bsd-3)))
5204
5205(define-public python2-jupyter-client
5206 (package-with-python2 python-jupyter-client))
5207
ab526102
RW
5208(define-public python-ipykernel
5209 (package
5210 (name "python-ipykernel")
f165648e 5211 (version "4.5.2")
ab526102
RW
5212 (source
5213 (origin
5214 (method url-fetch)
5215 (uri (pypi-uri "ipykernel" version))
5216 (sha256
f165648e 5217 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5218 (build-system python-build-system)
5219 ;; The tests load a submodule of IPython. However, IPython itself depends
5220 ;; on ipykernel.
5221 (arguments `(#:tests? #f))
5222 (propagated-inputs
5223 ;; imported at runtime during connect
5224 `(("python-jupyter-client" ,python-jupyter-client)))
5225 (home-page "http://ipython.org")
5226 (synopsis "IPython Kernel for Jupyter")
5227 (description
5228 "This package provides the IPython kernel for Jupyter.")
5229 (license license:bsd-3)))
5230
5231(define-public python2-ipykernel
5232 (package-with-python2 python-ipykernel))
5233
5ff6effc
RW
5234(define-public python-testpath
5235 (package
5236 (name "python-testpath")
5237 (version "0.2")
5238 (source
5239 (origin
5240 (method url-fetch)
5241 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5242 version ".tar.gz"))
5243 (file-name (string-append name "-" version ".tar.gz"))
5244 (sha256
5245 (base32
5246 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5247 (build-system python-build-system)
5248 (arguments
5249 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5250 #:modules ((guix build python-build-system)
5251 (guix build utils)
5252 (srfi srfi-1))
5253 #:imported-modules (,@%python-build-system-modules
5254 (srfi srfi-1))
5ff6effc
RW
5255 #:phases
5256 (modify-phases %standard-phases
5257 (delete 'install)
5258 (replace 'build
b320f7bf
TD
5259 (lambda* (#:key inputs outputs #:allow-other-keys)
5260 (let* ((version (last
5261 (string-split (assoc-ref inputs "python") #\-)))
5262 (x.y (string-join (take (string-split version #\.) 2)
5263 "."))
5264 (dir (string-append
5265 (assoc-ref outputs "out")
5266 "/lib/python" x.y "/site-packages/testpath")))
5267 (mkdir-p dir)
5268 (copy-recursively "testpath" dir))
5269 #t)))))
5ff6effc
RW
5270 (home-page "https://github.com/takluyver/testpath")
5271 (synopsis "Test utilities for code working with files and commands")
5272 (description
5273 "Testpath is a collection of utilities for Python code working with files
5274and commands. It contains functions to check things on the filesystem, and
5275tools for mocking system commands and recording calls to those.")
5276 (license license:expat)))
5277
5278(define-public python2-testpath
5279 (package-with-python2 python-testpath))
5280
ae1ab9fe
FB
5281(define-public python-ipython
5282 (package
5283 (name "python-ipython")
fb25d348 5284 (version "5.2.2")
ae1ab9fe
FB
5285 (source
5286 (origin
fceac880 5287 (method url-fetch)
accd5f99 5288 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5289 (sha256
fb25d348 5290 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5291 (build-system python-build-system)
5292 (outputs '("out" "doc"))
3a0b1b9a
FB
5293 (propagated-inputs
5294 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5295 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5296 ("python-terminado" ,python-terminado)
ae1ab9fe 5297 ("python-matplotlib" ,python-matplotlib)
5d26e542 5298 ("python-numpy" ,python-numpy)
ae1ab9fe 5299 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5300 ("python-jinja2" ,python-jinja2)
5301 ("python-mistune" ,python-mistune)
accd5f99
RW
5302 ("python-pexpect" ,python-pexpect)
5303 ("python-pickleshare" ,python-pickleshare)
5304 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5305 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5306 ("python-traitlets" ,python-traitlets)
5307 ("python-ipykernel" ,python-ipykernel)
fb25d348 5308 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5309 ("python-pygments" ,python-pygments)))
5310 (inputs
5311 `(("readline" ,readline)
5312 ("which" ,which)))
ae1ab9fe 5313 (native-inputs
fb25d348
TD
5314 `(("graphviz" ,graphviz)
5315 ("pkg-config" ,pkg-config)
accd5f99
RW
5316 ("python-requests" ,python-requests) ;; for tests
5317 ("python-testpath" ,python-testpath)
5318 ("python-nose" ,python-nose)
ae1ab9fe 5319 ("python-sphinx" ,python-sphinx)
fb25d348 5320 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5321 ("texlive" ,texlive)
f3b98f4f 5322 ("texinfo" ,texinfo)))
ae1ab9fe 5323 (arguments
89b5c60e 5324 `(#:phases
3a0b1b9a
FB
5325 (modify-phases %standard-phases
5326 (add-after
5327 'install 'install-doc
5328 (lambda* (#:key inputs outputs #:allow-other-keys)
5329 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5330 (doc (string-append data "/doc/" ,name "-" ,version))
5331 (html (string-append doc "/html"))
5332 (man1 (string-append data "/man/man1"))
5333 (info (string-append data "/info"))
fb25d348
TD
5334 (examples (string-append doc "/examples"))
5335 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5336 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5337 ;; Make installed package available for running the tests
5338 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5339 (with-directory-excursion "docs"
accd5f99
RW
5340 ;; FIXME: pdf fails to build
5341 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5342 (system* "make" python-arg "html")
5343 (system* "make" python-arg "info"))
3a0b1b9a
FB
5344 (copy-recursively "docs/man" man1)
5345 (copy-recursively "examples" examples)
accd5f99 5346 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5347 ;; (copy-file "docs/build/latex/ipython.pdf"
5348 ;; (string-append doc "/ipython.pdf"))
5349 (mkdir-p info)
5350 (copy-file "docs/build/texinfo/ipython.info"
5351 (string-append info "/ipython.info"))
5352 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5353 ;; Tests can only be run after the library has been installed and not
5354 ;; within the source directory.
5355 (delete 'check)
5356 (add-after
5357 'install 'check
eee5cd04 5358 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5359 (if tests?
5360 (with-directory-excursion "/tmp"
eee5cd04
HG
5361 ;; Make installed package available for running the tests
5362 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5363 (setenv "HOME" "/tmp/") ;; required by a test
5364 (zero? (system* (string-append (assoc-ref outputs "out")
5365 "/bin/iptest"))))
5366 #t)))
5367 (add-before
5368 'install 'fix-tests
5369 (lambda* (#:key inputs #:allow-other-keys)
5370 (substitute* "./IPython/utils/_process_posix.py"
5371 (("/usr/bin/env', 'which") (which "which")))
5372 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5373 (("#!/usr/bin/env python")
5374 (string-append "#!" (which "python"))))
5375 ;; Disable 1 failing test
5376 (substitute* "./IPython/core/tests/test_magic.py"
5377 (("def test_dirops\\(\\):" all)
5378 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5379 (home-page "http://ipython.org")
5380 (synopsis "IPython is a tool for interactive computing in Python")
5381 (description
5382 "IPython provides a rich architecture for interactive computing with:
5383Powerful interactive shells, a browser-based notebook, support for interactive
5384data visualization, embeddable interpreters and tools for parallel
5385computing.")
135ba811
EF
5386 (license license:bsd-3)
5387 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5388
5389(define-public python2-ipython
135ba811 5390 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5391 (package
5392 (inherit ipython)
3a0b1b9a 5393 ;; FIXME: add pyreadline once available.
fb25d348
TD
5394 (propagated-inputs
5395 `(("python2-backports-shutil-get-terminal-size"
5396 ,python2-backports-shutil-get-terminal-size)
5397 ("python2-pathlib2" ,python2-pathlib2)
5398 ,@(package-propagated-inputs ipython)))
e62600fe 5399 (native-inputs
135ba811 5400 `(("python2-mock" ,python2-mock)
77a6932a 5401 ,@(package-native-inputs ipython))))))
03411993
AE
5402
5403(define-public python-isodate
5404 (package
5405 (name "python-isodate")
b6785c2e 5406 (version "0.5.4")
03411993
AE
5407 (source
5408 (origin
5409 (method url-fetch)
b6785c2e 5410 (uri (pypi-uri "isodate" version))
03411993
AE
5411 (sha256
5412 (base32
b6785c2e 5413 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5414 (build-system python-build-system)
03411993
AE
5415 (home-page
5416 "http://cheeseshop.python.org/pypi/isodate")
5417 (synopsis
5418 "Python date parser and formatter")
5419 (description
5420 "Python-isodate is a python module for parsing and formatting
5421ISO 8601 dates, time and duration.")
3f641af0 5422 (license license:bsd-3)))
03411993
AE
5423
5424(define-public python2-isodate
5425 (package-with-python2 python-isodate))
673ab897
AE
5426
5427(define-public python-html5lib
5428 (package
5429 (name "python-html5lib")
a14061aa 5430 (version "1.0b10")
673ab897
AE
5431 (source
5432 (origin
5433 (method url-fetch)
fee04c19 5434 (uri (pypi-uri "html5lib" version))
673ab897
AE
5435 (sha256
5436 (base32
a14061aa 5437 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5438 (build-system python-build-system)
3dd75476 5439 (propagated-inputs
4eb6ed28
MB
5440 `(("python-six" ,python-six)
5441 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5442 (arguments
5443 `(#:test-target "check"))
5444 (home-page
5445 "https://github.com/html5lib/html5lib-python")
5446 (synopsis
5447 "Python HTML parser based on the WHATWG HTML specifcation")
5448 (description
5449 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5450and written in Python.")
bd3fa666 5451 (license license:expat)))
673ab897
AE
5452
5453(define-public python2-html5lib
5454 (package-with-python2 python-html5lib))
e99f4211 5455
8ee62c97
RW
5456;; Needed for python-bleach, a dependency of python-notebook
5457(define-public python-html5lib-0.9
5458 (package
5459 (inherit python-html5lib)
5460 (version "0.999")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "html5lib" version))
5465 (sha256
5466 (base32
5467 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5468
5469(define-public python2-html5lib-0.9
5470 (package-with-python2 python-html5lib-0.9))
5471
adbca19e
MB
5472(define-public python-webencodings
5473 (package
5474 (name "python-webencodings")
5475 (version "0.5")
5476 (source (origin
5477 (method url-fetch)
5478 (uri (pypi-uri "webencodings" version))
5479 (sha256
5480 (base32
5481 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5482 (build-system python-build-system)
5483 (arguments
5484 '(#:phases
5485 (modify-phases %standard-phases
5486 (replace 'check
5487 (lambda _
5488 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5489 (native-inputs
5490 `(("python-pytest" ,python-pytest)))
5491 (home-page "https://github.com/SimonSapin/python-webencodings")
5492 (synopsis "Character encoding aliases for legacy web content")
5493 (description
5494 "In order to be compatible with legacy web content when interpreting
5495something like @code{Content-Type: text/html; charset=latin1}, tools need
5496to use a particular set of aliases for encoding labels as well as some
5497overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5498the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5499or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5500The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5501defines all such details so that implementations do not have to
5502reverse-engineer each other.
5503
5504This module implements the Encoding standard and has encoding labels and
5505BOM detection, but the actual implementation for encoders and decoders
5506is Python’s.")
5507 (license license:bsd-3)))
5508
5509(define-public python2-webencodings
5510 (package-with-python2 python-webencodings))
5511
e99f4211
MW
5512(define-public python-urwid
5513 (package
5514 (name "python-urwid")
51ff41f6 5515 (version "1.3.1")
e99f4211
MW
5516 (source
5517 (origin
5518 (method url-fetch)
b97c1bfd 5519 (uri (pypi-uri "urwid" version))
e99f4211
MW
5520 (sha256
5521 (base32
51ff41f6 5522 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5523 (build-system python-build-system)
b97c1bfd
LF
5524 (arguments
5525 `(#:phases
5526 (modify-phases %standard-phases
5527 ;; Disable failing test. Bug filed upstream:
5528 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5529 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5530 (add-after 'unpack 'disable-failing-test
5531 (lambda _
5532 (substitute* "urwid/tests/test_event_loops.py"
5533 (("test_remove_watch_file")
5534 "disable_remove_watch_file")))))))
e99f4211
MW
5535 (home-page "http://urwid.org")
5536 (synopsis "Console user interface library for Python")
5537 (description
5538 "Urwid is a curses-based UI/widget library for Python. It includes many
5539features useful for text console applications.")
3f641af0 5540 (license license:lgpl2.1+)))
e99f4211
MW
5541
5542(define-public python2-urwid
e9379305
MC
5543 (let ((python2-urwid (package-with-python2 python-urwid)))
5544 (package
5545 (inherit python2-urwid)
5546 (arguments
5547 (append
5548 '(#:phases
5549 (modify-phases %standard-phases
5550 ;; Disable the vterm tests because of non-deterministic failures
5551 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5552 (add-after 'unpack 'delete-test_vterm.py
5553 (delete-file "urwid/tests/test_vterm.py"))))
5554 (package-arguments python-urwid))))))
d95a56c6 5555
5220022a
JL
5556(define-public python-openid
5557 (package
5558 (name "python-openid")
5559 (version "3.0.10")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (pypi-uri "python3-openid" version))
5564 (sha256
5565 (base32
5566 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5567 (build-system python-build-system)
0660d327
DM
5568 (arguments
5569 `(#:phases
5570 (modify-phases %standard-phases
5571 (replace 'check
5572 (lambda _
5573 (zero? (system* "./admin/runtests")))))))
5574 (propagated-inputs
5575 `(("python-defusedxml" ,python-defusedxml)))
5576 (native-inputs
5577 `(("python-psycopg2" ,python-psycopg2)
5578 ("python-django" ,python-django)))
5220022a
JL
5579 (home-page "https://github.com/necaris/python3-openid")
5580 (synopsis "OpenID support for servers and consumers")
5581 (description "This library provides OpenID authentication for Python, both
5582for clients and servers.")
5583 (license license:asl2.0)))
5584
3ef00f56 5585(define-public python2-openid
5586 (package
5587 (name "python2-openid")
5588 (version "2.2.5")
5589 (source
5590 (origin
5591 (method url-fetch)
5592 (uri (pypi-uri "python-openid" version))
5593 (sha256
5594 (base32
5595 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5596 (build-system python-build-system)
5597 (arguments
5598 ;; Python 3 support is in `python3-openid`, a separate package.
5599 `(#:python ,python-2))
5600 (home-page "https://github.com/openid/python-openid")
5601 (synopsis "OpenID support for servers and consumers")
5602 (description "This library provides OpenID authentication for Python, both
5603for clients and servers.")
5604 (license license:asl2.0)))
5605
47d0b292
TS
5606(define-public python-urwidtrees
5607 (package
5608 (name "python-urwidtrees")
37ec4623 5609 (version "1.0.2")
47d0b292
TS
5610 (source
5611 (origin
5612 (method url-fetch)
37ec4623
TS
5613 ;; package author intends on distributing via github rather than pypi:
5614 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5615 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5616 version ".tar.gz"))
5617 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5618 (sha256
5619 (base32
37ec4623 5620 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5621 (build-system python-build-system)
5622 (arguments
5623 '(#:tests? #f)) ; no tests
f22efa01 5624 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5625 (home-page "https://github.com/pazz/urwidtrees")
5626 (synopsis "Tree widgets for urwid")
5627 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5628toolkit. Use it to build trees of widgets.")
3f641af0 5629 (license license:gpl3+)))
47d0b292
TS
5630
5631(define-public python2-urwidtrees
5632 (package-with-python2 python-urwidtrees))
5633
d95a56c6
PAR
5634(define-public python-dbus
5635 (package
5636 (name "python-dbus")
5637 (version "1.2.0")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 (uri (string-append
5cc3096c 5642 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5643 version ".tar.gz"))
5644 (sha256
5645 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5646 (build-system gnu-build-system)
6717c879
SB
5647 (arguments
5648 '(#:phases
5649 (modify-phases %standard-phases
5650 (add-before
5651 'check 'pre-check
5652 (lambda _
5653 ;; XXX: For the missing '/etc/machine-id'.
5654 (substitute* "test/run-test.sh"
5655 (("DBUS_FATAL_WARNINGS=1")
5656 "DBUS_FATAL_WARNINGS=0"))
5657 #t)))))
d95a56c6
PAR
5658 (native-inputs
5659 `(("pkg-config" ,pkg-config)))
5660 (inputs
5661 `(("python" ,python)
2e88d113 5662 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5663 (synopsis "Python bindings for D-bus")
5664 (description "python-dbus provides bindings for libdbus, the reference
5665implementation of D-Bus.")
5666 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5667 (license license:expat)))
b52af02b
MW
5668
5669(define-public python2-dbus
5670 (package (inherit python-dbus)
5671 (name "python2-dbus")
5672 (inputs `(("python" ,python-2)
5673 ,@(alist-delete "python"
5674 (package-inputs python-dbus)
5675 equal?)))
5676 ;; FIXME: on Python 2, the test_utf8 fails with:
5677 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5678 (arguments `(#:tests? #f))))
a6ac8332
AE
5679
5680(define-public python-apsw
5681 (package
5682 (name "python-apsw")
917708c2 5683 (version "3.9.2-r1")
a6ac8332
AE
5684 (source
5685 (origin
5686 (method url-fetch)
917708c2 5687 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5688 (sha256
5689 (base32
917708c2 5690 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5691 (build-system python-build-system)
5692 (inputs
f3b98f4f 5693 `(("sqlite" ,sqlite)))
a6ac8332
AE
5694 (arguments
5695 `(#:phases
154d207c
MB
5696 (modify-phases %standard-phases
5697 (delete 'check)
5698 (add-after 'install 'check
5699 (lambda* (#:key inputs outputs #:allow-other-keys)
5700 (add-installed-pythonpath inputs outputs)
5701 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5702 (home-page "https://github.com/rogerbinns/apsw/")
5703 (synopsis "Another Python SQLite Wrapper")
5704 (description "APSW is a Python wrapper for the SQLite
5705embedded relational database engine. In contrast to other wrappers such as
5706pysqlite it focuses on being a minimal layer over SQLite attempting just to
5707translate the complete SQLite API into Python.")
abde5f37 5708 (license license:zlib)))
a6ac8332
AE
5709
5710(define-public python2-apsw
5711 (package-with-python2 python-apsw))
26b307e2
AE
5712
5713(define-public python-lxml
5714 (package
5715 (name "python-lxml")
d58a3203 5716 (version "3.6.0")
26b307e2
AE
5717 (source
5718 (origin
5719 (method url-fetch)
97bbc480 5720 (uri (pypi-uri "lxml" version))
26b307e2 5721 (sha256
d58a3203
EF
5722 (base32
5723 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5724 (build-system python-build-system)
5725 (inputs
5726 `(("libxml2" ,libxml2)
f3b98f4f 5727 ("libxslt" ,libxslt)))
26b307e2
AE
5728 (home-page "http://lxml.de/")
5729 (synopsis
5730 "Python XML processing library")
5731 (description
5732 "The lxml XML toolkit is a Pythonic binding for the C libraries
5733libxml2 and libxslt.")
3f641af0 5734 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5735
5736(define-public python2-lxml
5737 (package-with-python2 python-lxml))
4ed20663 5738
b32a1e47
CAW
5739;; beautifulsoup4 has a totally different namespace than 3.x,
5740;; and pypi seems to put it under its own name, so I guess we should too
5741(define-public python-beautifulsoup4
5742 (package
5743 (name "python-beautifulsoup4")
80e8d851 5744 (version "4.5.3")
b32a1e47
CAW
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "beautifulsoup4" version))
5749 (sha256
5750 (base32
80e8d851 5751 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 5752 (build-system python-build-system)
5f37f0b6
LF
5753 (arguments
5754 `(#:phases
5755 (modify-phases %standard-phases
5756 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5757 ;; must use this conversion script when building with Python 3. The
5758 ;; conversion script also runs the tests.
5759 ;; For more information, see the file 'convert-py3k' in the source
5760 ;; distribution.
5761 (replace 'check
5762 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5763 (home-page
5764 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5765 (synopsis
5766 "Python screen-scraping library")
5767 (description
5768 "Beautiful Soup is a Python library designed for rapidly setting up
5769screen-scraping projects. It offers Pythonic idioms for navigating,
5770searching, and modifying a parse tree, providing a toolkit for
5771dissecting a document and extracting what you need. It automatically
5772converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5773 (license license:expat)
5774 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5775
5776(define-public python2-beautifulsoup4
5777 (package
5778 (inherit (package-with-python2
5779 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5780 (arguments `(#:python ,python-2))))
b32a1e47 5781
4dcb135e 5782(define-public python-cssutils
092e86f5 5783 (package
4dcb135e 5784 (name "python-cssutils")
58d1d816 5785 (version "1.0.1")
092e86f5
AE
5786 (source
5787 (origin
5788 (method url-fetch)
58d1d816 5789 (uri (pypi-uri "cssutils" version))
092e86f5 5790 (sha256
58d1d816
EF
5791 (base32
5792 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5793 (build-system python-build-system)
5794 (native-inputs
4dcb135e 5795 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5796 (arguments
4dcb135e 5797 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5798 (home-page "http://cthedot.de/cssutils/")
5799 (synopsis
5800 "CSS Cascading Style Sheets library for Python")
5801 (description
5802 "Cssutils is a Python package for parsing and building CSS
5803Cascading Style Sheets. Currently it provides a DOM only and no rendering
5804options.")
3f641af0 5805 (license license:lgpl3+)))
880ff77c 5806
4dcb135e
EB
5807(define-public python2-cssutils
5808 (package-with-python2 python-cssutils))
5809
880ff77c
AE
5810(define-public python-cssselect
5811 (package
5812 (name "python-cssselect")
d5ccd9ab 5813 (version "0.9.2")
880ff77c
AE
5814 (source
5815 (origin
5816 (method url-fetch)
d5ccd9ab 5817 (uri (pypi-uri "cssselect" version))
880ff77c 5818 (sha256
d5ccd9ab
EF
5819 (base32
5820 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5821 (build-system python-build-system)
880ff77c
AE
5822 (arguments
5823 ;; tests fail with message
5824 ;; AttributeError: 'module' object has no attribute 'tests'
5825 `(#:tests? #f))
5826 (home-page
5827 "https://pythonhosted.org/cssselect/")
5828 (synopsis
5829 "CSS3 selector parser and translator to XPath 1.0")
5830 (description
5831 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5832them to XPath 1.0 expressions. Such expressions can be used in lxml or
5833another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5834 (license license:bsd-3)))
880ff77c
AE
5835
5836(define-public python2-cssselect
5837 (package-with-python2 python-cssselect))
60357f99 5838
03702173 5839(define-public python-openid-cla
5840 (package
5841 (name "python-openid-cla")
5842 (version "1.2")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "python-openid-cla" version))
5847 (sha256
5848 (base32
5849 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5850 (build-system python-build-system)
019ccdb6 5851 (arguments '(#:tests? #f)) ; No tests.
03702173 5852 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5853 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5854 (description "@code{openid-cla} is an implementation of the OpenID
5855contributor license agreement extension for python-openid.")
5856 (license license:bsd-3)))
5857
5858(define-public python2-openid-cla
5859 (package-with-python2 python-openid-cla))
5860
a0e41de4 5861(define-public python-openid-teams
5862 (package
5863 (name "python-openid-teams")
5864 (version "1.1")
5865 (source
5866 (origin
5867 (method url-fetch)
5868 (uri (pypi-uri "python-openid-teams" version))
5869 (sha256
5870 (base32
5871 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5872 (build-system python-build-system)
ac72d3d2 5873 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5874 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5875 (synopsis "Implementation of the OpenID teams extension for python-openid")
5876 (description
5877 "@code{openid-teams} is an implementation of the OpenID
5878teams extension for python-openid.")
5879 (license license:bsd-3)))
5880
5881(define-public python2-openid-teams
5882 (package-with-python2 python-openid-teams))
5883
60357f99
AE
5884(define-public python-netifaces
5885 (package
5886 (name "python-netifaces")
5887 (version "0.10.4")
5888 (source
5889 (origin
5890 (method url-fetch)
5891 (uri (string-append
5892 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5893 version
5894 ".tar.gz"))
5895 (sha256
5896 (base32
5897 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5898 (build-system python-build-system)
60357f99
AE
5899 (home-page
5900 "https://bitbucket.org/al45tair/netifaces")
5901 (synopsis
5902 "Python module for portable network interface information")
5903 (description
5904 "Netifaces is a Python module providing information on network
5905interfaces in an easy and portable manner.")
5906 (license license:expat)))
5907
5908(define-public python2-netifaces
5909 (package-with-python2 python-netifaces))
92cb152b 5910
32f77c04
RW
5911(define-public python-networkx
5912 (package
5913 (name "python-networkx")
a4d9609c 5914 (version "1.11")
32f77c04
RW
5915 (source
5916 (origin
5917 (method url-fetch)
a4d9609c 5918 (uri (pypi-uri "networkx" version))
32f77c04 5919 (sha256
a4d9609c 5920 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5921 (build-system python-build-system)
5922 ;; python-decorator is needed at runtime
5923 (propagated-inputs
5924 `(("python-decorator" ,python-decorator)))
5925 (native-inputs
f3b98f4f 5926 `(("python-nose" ,python-nose)))
32f77c04
RW
5927 (home-page "http://networkx.github.io/")
5928 (synopsis "Python module for creating and manipulating graphs and networks")
5929 (description
5930 "NetworkX is a Python package for the creation, manipulation, and study
5931of the structure, dynamics, and functions of complex networks.")
3f641af0 5932 (license license:bsd-3)))
32f77c04
RW
5933
5934(define-public python2-networkx
5935 (package-with-python2 python-networkx))
5936
92cb152b
RW
5937(define-public snakemake
5938 (package
5939 (name "snakemake")
ef71ed8f 5940 (version "3.11.2")
92cb152b
RW
5941 (source
5942 (origin
5943 (method url-fetch)
7b93d866 5944 (uri (pypi-uri "snakemake" version))
92cb152b 5945 (sha256
ef71ed8f 5946 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
92cb152b 5947 (build-system python-build-system)
7b93d866
MB
5948 (arguments
5949 ;; TODO: Package missing test dependencies.
5950 '(#:tests? #f))
4f9998c6
RW
5951 (propagated-inputs
5952 `(("python-wrapt" ,python-wrapt)
5953 ("python-requests" ,python-requests)))
7b93d866 5954 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5955 (synopsis "Python-based execution environment for make-like workflows")
5956 (description
5957 "Snakemake aims to reduce the complexity of creating workflows by
5958providing a clean and modern domain specific specification language (DSL) in
5959Python style, together with a fast and comfortable execution environment.")
5960 (license license:expat)))
a1920bc9 5961
35de1fbd
RW
5962(define-public python-seaborn
5963 (package
5964 (name "python-seaborn")
ccc18762 5965 (version "0.7.1")
35de1fbd
RW
5966 (source
5967 (origin
5968 (method url-fetch)
fc899d4f 5969 (uri (pypi-uri "seaborn" version))
35de1fbd 5970 (sha256
ccc18762 5971 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5972 (build-system python-build-system)
6f976df6
MB
5973 (arguments
5974 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5975 (propagated-inputs
5976 `(("python-pandas" ,python-pandas)
5977 ("python-matplotlib" ,python-matplotlib)
5978 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5979 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5980 (synopsis "Statistical data visualization")
5981 (description
5982 "Seaborn is a library for making attractive and informative statistical
5983graphics in Python. It is built on top of matplotlib and tightly integrated
5984with the PyData stack, including support for numpy and pandas data structures
5985and statistical routines from scipy and statsmodels.")
3f641af0 5986 (license license:bsd-3)
fc899d4f 5987 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5988
5989(define-public python2-seaborn
fc899d4f
EF
5990 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5991 (package
5992 (inherit base)
5993 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5994 ,@(package-propagated-inputs base))))))
35de1fbd 5995
58a35665
MB
5996(define-public python-mpmath
5997 (package
5998 (name "python-mpmath")
5999 (version "0.19")
6000 (source (origin
6001 (method url-fetch)
6002 (uri (string-append "http://mpmath.org/files/mpmath-"
6003 version ".tar.gz"))
6004 (sha256
6005 (base32
6006 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6007 (build-system python-build-system)
6008 (arguments
6009 '(#:phases
6010 (modify-phases %standard-phases
6011 (replace 'check
6012 (lambda _
6013 (zero?
6014 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6015 (home-page "http://mpmath.org")
6016 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6017 (description
6018 "@code{mpmath} can be used as an arbitrary-precision substitute for
6019Python's float/complex types and math/cmath modules, but also does much
6020more advanced mathematics.")
6021 (license license:bsd-3)))
6022
6023(define-public python2-mpmath
6024 (package-with-python2 python-mpmath))
35de1fbd 6025
90fc547f
RW
6026(define-public python-sympy
6027 (package
6028 (name "python-sympy")
52f622ef 6029 (version "1.0")
90fc547f
RW
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (string-append
6034 "https://github.com/sympy/sympy/releases/download/sympy-"
6035 version "/sympy-" version ".tar.gz"))
6036 (sha256
52f622ef 6037 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6038 (build-system python-build-system)
52f622ef
MB
6039 (propagated-inputs
6040 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6041 (home-page "http://www.sympy.org/")
6042 (synopsis "Python library for symbolic mathematics")
6043 (description
6044 "SymPy is a Python library for symbolic mathematics. It aims to become a
6045full-featured computer algebra system (CAS) while keeping the code as simple
6046as possible in order to be comprehensible and easily extensible.")
3f641af0 6047 (license license:bsd-3)))
90fc547f
RW
6048
6049(define-public python2-sympy
6050 (package-with-python2 python-sympy))
6051
e8c9b010
SR
6052(define-public python-q
6053 (package
6054 (name "python-q")
6055 (version "2.6")
6056 (source
6057 (origin
6058 (method url-fetch)
6059 (uri (pypi-uri "q" version))
6060 (sha256
6061 (base32
6062 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6063 (build-system python-build-system)
6064 (home-page "https://github.com/zestyping/q")
6065 (synopsis "Quick-and-dirty debugging output for tired programmers")
6066 (description
6067 "q is a Python module for \"print\" style of debugging Python code. It
6068provides convenient short API for print out of values, tracebacks, and
6069falling into the Python interpreter.")
f210e944 6070 (license license:asl2.0)))
e8c9b010
SR
6071
6072(define-public python2-q
f210e944 6073 (package-with-python2 python-q))
e8c9b010 6074
a1920bc9
FB
6075(define-public python-testlib
6076 (package
6077 (name "python-testlib")
6078 (version "0.6.5")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (string-append
6083 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6084 version ".zip"))
6085 (sha256
6086 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6087 (build-system python-build-system)
a1920bc9 6088 (native-inputs
632735f2 6089 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6090 (synopsis "Python micro test suite harness")
6091 (description "A micro unittest suite harness for Python.")
6092 (home-page "https://github.com/trentm/testlib")
1cb9c006 6093 (license license:expat)))
a1920bc9
FB
6094
6095(define-public python2-testlib
6096 (package-with-python2 python-testlib))
db62afa5
LC
6097
6098(define-public python2-xlib
6099 (package
6100 (name "python2-xlib")
6101 (version "0.14")
6102 (source (origin
6103 (method url-fetch)
de67e922
LF
6104 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6105 "/" version "/"
db62afa5
LC
6106 "python-xlib-" version ".tar.gz"))
6107 (sha256
6108 (base32
6109 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6110 (build-system python-build-system)
6111 (arguments
6112 `(#:python ,python-2 ;Python 2 only
6113 #:tests? #f)) ;no tests
db62afa5
LC
6114 (home-page "http://python-xlib.sourceforge.net/")
6115 (synopsis "Python X11 client library")
6116 (description
6117 "The Python X Library is intended to be a fully functional X client
6118library for Python programs. It is useful to implement low-level X clients.
6119It is written entirely in Python.")
3f641af0 6120 (license license:gpl2+)))
0234ca06
DT
6121
6122(define-public python-singledispatch
6123 (package
6124 (name "python-singledispatch")
6125 (version "3.4.0.3")
6126 (source
6127 (origin
6128 (method url-fetch)
bdb67d84 6129 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6130 (sha256
6131 (base32
6132 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6133 (build-system python-build-system)
5e1c9d24
HG
6134 (native-inputs
6135 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6136 (home-page
6137 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6138 (synopsis "Backport of singledispatch feature from Python 3.4")
6139 (description
6140 "This library brings functools.singledispatch from Python 3.4 to Python
61412.6-3.3.")
6142 (license license:expat)))
6143
6144(define-public python2-singledispatch
6145 (package-with-python2 python-singledispatch))
feaae484 6146
310d218f
RW
6147(define-public python-tornado
6148 (package
6149 (name "python-tornado")
6fdeb324 6150 (version "4.5.1")
310d218f
RW
6151 (source
6152 (origin
6153 (method url-fetch)
a724924b 6154 (uri (pypi-uri "tornado" version))
310d218f 6155 (sha256
6fdeb324 6156 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6157 (build-system python-build-system)
3fe2c209
MB
6158 (arguments
6159 '(;; FIXME: Two tests error out with:
6160 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6161 ;; #:phases
6162 ;; (modify-phases %standard-phases
6163 ;; (replace 'check
6164 ;; (lambda _
6165 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6166 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6167 ;; (zero? (system* "python" "-m" "tornado.test")))))
6168 #:tests? #f))
310d218f 6169 (native-inputs
b455439b 6170 `(("python-certifi" ,python-certifi)))
f22efa01 6171 (propagated-inputs
b455439b 6172 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6173 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6174 (synopsis "Python web framework and asynchronous networking library")
6175 (description
6176 "Tornado is a Python web framework and asynchronous networking library,
6177originally developed at FriendFeed. By using non-blocking network I/O,
6178Tornado can scale to tens of thousands of open connections, making it ideal
6179for long polling, WebSockets, and other applications that require a long-lived
6180connection to each user.")
3f641af0 6181 (license license:asl2.0)
b455439b 6182 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6183
6184(define-public python2-tornado
b455439b 6185 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6186 (package (inherit tornado)
f22efa01 6187 (propagated-inputs
310d218f
RW
6188 `(("python2-backport-ssl-match-hostname"
6189 ,python2-backport-ssl-match-hostname)
b455439b 6190 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6191 ,@(package-propagated-inputs tornado))))))
310d218f 6192
6b59fc10
EF
6193;; the python- version can be removed with python-3.5
6194(define-public python-backports-abc
6195 (package
6196 (name "python-backports-abc")
27f9148e 6197 (version "0.5")
6b59fc10
EF
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (pypi-uri "backports_abc" version))
6202 (sha256
6203 (base32
27f9148e 6204 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6205 (build-system python-build-system)
6b59fc10 6206 (home-page "https://github.com/cython/backports_abc")
66e07664 6207 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6208 (description
6209 "Python-backports-abc provides a backport of additions to the
6210'collections.abc' module in Python-3.5.")
3f641af0 6211 (license license:psfl)))
6b59fc10
EF
6212
6213(define-public python2-backports-abc
6214 (package-with-python2 python-backports-abc))
6215
ec074213
TD
6216(define-public python2-backports-shutil-get-terminal-size
6217 (package
6218 (name "python2-backports-shutil-get-terminal-size")
6219 (version "1.0.0")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6224 (sha256
6225 (base32
6226 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6227 (build-system python-build-system)
6228 (arguments
c0446791
MB
6229 `(#:python ,python-2
6230 #:phases
6231 (modify-phases %standard-phases
6232 (replace 'check
6233 (lambda _
6234 (zero? (system* "py.test" "-v")))))))
6235 (native-inputs
6236 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6237 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6238 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6239 (description
6240 "This package provides a backport of the @code{get_terminal_size
6241function} from Python 3.3's @code{shutil}.
6242Unlike the original version it is written in pure Python rather than C,
6243so it might be a tiny bit slower.")
6244 (license license:expat)))
6245
feaae484
SB
6246(define-public python-waf
6247 (package
6248 (name "python-waf")
27bf00e6 6249 (version "1.9.8")
feaae484
SB
6250 (source (origin
6251 (method url-fetch)
bae67829 6252 (uri (string-append "https://waf.io/"
feaae484
SB
6253 "waf-" version ".tar.bz2"))
6254 (sha256
6255 (base32
27bf00e6 6256 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6257 (build-system python-build-system)
6258 (arguments
6259 '(#:phases
6260 (modify-phases %standard-phases
6261 (replace 'build
7dd55dfe
EF
6262 (lambda _
6263 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6264 (replace 'check
7dd55dfe
EF
6265 (lambda _
6266 (zero? (system* "python" "waf" "--version"))))
feaae484 6267 (replace 'install
7dd55dfe
EF
6268 (lambda _
6269 (copy-file "waf" %output))))))
27bf00e6 6270 (home-page "https://waf.io/")
feaae484
SB
6271 (synopsis "Python-based build system")
6272 (description
6273 "Waf is a Python-based framework for configuring, compiling and installing
6274applications.")
3f641af0 6275 (license license:bsd-3)))
feaae484
SB
6276
6277(define-public python2-waf
6278 (package-with-python2 python-waf))
45203542
RW
6279
6280(define-public python-pyzmq
6281 (package
6282 (name "python-pyzmq")
3655ee76 6283 (version "15.1.0")
45203542
RW
6284 (source
6285 (origin
6286 (method url-fetch)
3655ee76 6287 (uri (pypi-uri "pyzmq" version))
45203542 6288 (sha256
3655ee76 6289 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6290 (build-system python-build-system)
6291 (arguments
6292 `(#:configure-flags
6293 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6294 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6295 ;; --inplace' for 'python setup.py test' to work.
6296 #:tests? #f))
6297 (inputs
6298 `(("zeromq" ,zeromq)))
6299 (native-inputs
6300 `(("pkg-config" ,pkg-config)
f3b98f4f 6301 ("python-nose" ,python-nose)))
7bf837fd 6302 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6303 (synopsis "Python bindings for 0MQ")
6304 (description
6305 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6306 (license license:bsd-4)))
45203542
RW
6307
6308(define-public python2-pyzmq
6309 (package-with-python2 python-pyzmq))
d889e6c4
CR
6310
6311(define-public python-pep8
6312 (package
6313 (name "python-pep8")
db251311 6314 (version "1.7.0")
d889e6c4
CR
6315 (source
6316 (origin
6317 (method url-fetch)
db251311 6318 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6319 (sha256
6320 (base32
db251311 6321 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6322 (build-system python-build-system)
d889e6c4
CR
6323 (home-page "http://pep8.readthedocs.org/")
6324 (synopsis "Python style guide checker")
6325 (description
6326 "This tools checks Python code against some of the style conventions in
6327PEP 8.")
6328 (license license:expat)))
6329
6330(define-public python2-pep8
6331 (package-with-python2 python-pep8))
e31d7f44
CR
6332
6333(define-public python-pyflakes
6334 (package
6335 (name "python-pyflakes")
2abc3972 6336 (version "1.0.0")
e31d7f44
CR
6337 (source
6338 (origin
6339 (method url-fetch)
2abc3972 6340 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6341 (sha256
6342 (base32
2abc3972 6343 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6344 (build-system python-build-system)
e31d7f44
CR
6345 (home-page
6346 "https://github.com/pyflakes/pyflakes")
6347 (synopsis "Passive checker of Python programs")
6348 (description
6349 "Pyflakes statically checks Python source code for common errors.")
6350 (license license:expat)))
a59e017c 6351
7261d9eb
CR
6352(define-public python2-pyflakes
6353 (package-with-python2 python-pyflakes))
6354
a59e017c
CR
6355(define-public python-mccabe
6356 (package
6357 (name "python-mccabe")
c6ebd40d 6358 (version "0.4.0")
a59e017c
CR
6359 (source
6360 (origin
6361 (method url-fetch)
c6ebd40d 6362 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6363 (sha256
6364 (base32
c6ebd40d 6365 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6366 (build-system python-build-system)
328bb95d 6367 (native-inputs
c6ebd40d 6368 `(("python-pytest" ,python-pytest)
f3b98f4f 6369 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6370 (home-page "https://github.com/flintwork/mccabe")
6371 (synopsis "McCabe checker, plugin for flake8")
6372 (description
6373 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6374complexity of Python source code.")
7362371d 6375 (license license:expat)))
a59e017c
CR
6376
6377(define-public python2-mccabe
6378 (package-with-python2 python-mccabe))
e8df8f47 6379
7477fbb1
CR
6380(define-public python-mccabe-0.2.1
6381 (package (inherit python-mccabe)
6382 (version "0.2.1")
6383 (source
6384 (origin
6385 (method url-fetch)
6386 (uri (pypi-uri "mccabe" version))
6387 (sha256
6388 (base32
f3b98f4f 6389 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6390
6391(define-public python2-mccabe-0.2.1
6392 (package-with-python2 python-mccabe-0.2.1))
6393
e8df8f47
CR
6394;; Flake8 2.4.1 requires an older version of pep8.
6395;; This should be removed ASAP.
6396(define-public python-pep8-1.5.7
6397 (package (inherit python-pep8)
6398 (version "1.5.7")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (string-append
6403 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6404 version
6405 ".tar.gz"))
6406 (sha256
6407 (base32
73e3060d
MB
6408 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6409 (arguments
6410 ;; XXX Tests not compatible with Python 3.5.
6411 '(#:tests? #f))))
e8df8f47
CR
6412
6413(define-public python2-pep8-1.5.7
6414 (package-with-python2 python-pep8-1.5.7))
6415
6416;; Flake8 2.4.1 requires an older version of pyflakes.
6417;; This should be removed ASAP.
6418(define-public python-pyflakes-0.8.1
6419 (package (inherit python-pyflakes)
6420 (version "0.8.1")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (string-append
6425 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6426 version
6427 ".tar.gz"))
6428 (sha256
6429 (base32
0d84e1ef
MB
6430 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6431 (arguments
6432 ;; XXX Tests not compatible with Python 3.5.
6433 '(#:tests? #f))))
e8df8f47
CR
6434
6435(define-public python2-pyflakes-0.8.1
7261d9eb 6436 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6437
6438(define-public python-flake8
6439 (package
6440 (name "python-flake8")
43789136 6441 (version "2.5.4")
e8df8f47
CR
6442 (source
6443 (origin
6444 (method url-fetch)
1b995533 6445 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6446 (sha256
6447 (base32
011271c7
HG
6448 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6449 (modules '((guix build utils)))
6450 (snippet
6451 '(begin
6452 ;; Remove pre-compiled .pyc files from source.
6453 (for-each delete-file-recursively
6454 (find-files "." "__pycache__" #:directories? #t))
6455 (for-each delete-file (find-files "." "\\.pyc$"))
6456 #t))))
e8df8f47 6457 (build-system python-build-system)
482d9591 6458 (propagated-inputs
f3b98f4f 6459 `(("python-pep8" ,python-pep8)
43789136 6460 ("python-pyflakes" ,python-pyflakes)
482d9591 6461 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6462 (native-inputs
6463 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6464 ("python-nose" ,python-nose)))
6465 (home-page "https://gitlab.com/pycqa/flake8")
6466 (synopsis
6467 "The modular source code checker: pep8, pyflakes and co")
6468 (description
6469 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6470 (license license:expat)))
6471
6472(define-public python2-flake8
6473 (package-with-python2 python-flake8))
61b9ac53 6474
abf21efc
CR
6475;; This will only be needed by the python-hacking package and will not be
6476;; necessary once python-hacking > 0.10.2 is released.
6477(define-public python-flake8-2.2.4
6478 (package (inherit python-flake8)
482d9591 6479 (propagated-inputs
f3b98f4f 6480 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6481 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6482 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6483 (native-inputs
482d9591 6484 `(("python-mock" ,python-mock)
abf21efc
CR
6485 ("python-nose" ,python-nose)))
6486 (version "2.2.4")
6487 (source
6488 (origin
6489 (method url-fetch)
6490 (uri (pypi-uri "flake8" version))
6491 (sha256
6492 (base32
b9c8ccce
HG
6493 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6494 (modules '((guix build utils)))
6495 (snippet
6496 '(begin
6497 ;; Remove pre-compiled .pyc files from source.
6498 (for-each delete-file-recursively
6499 (find-files "." "__pycache__" #:directories? #t))
6500 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6501 #t))))
6502 (arguments
6503 ;; XXX Fails with Python 3.5.
6504 '(#:tests? #f))))
abf21efc
CR
6505
6506(define-public python2-flake8-2.2.4
6507 (package-with-python2 python-flake8-2.2.4))
6508
1f42d824
MFM
6509(define-public python-flake8-polyfill
6510 (package
6511 (name "python-flake8-polyfill")
6512 (version "1.0.1")
6513 (source
6514 (origin
6515 (method url-fetch)
6516 (uri (pypi-uri "flake8-polyfill" version))
6517 (sha256
6518 (base32
6519 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6520 (build-system python-build-system)
2c1cad7a
MB
6521 (arguments
6522 '(#:phases
6523 (modify-phases %standard-phases
6524 (replace 'check
6525 (lambda _
6526 (setenv "PYTHONPATH"
6527 (string-append (getcwd) "/build/lib:"
6528 (getenv "PYTHONPATH")))
6529 (zero? (system* "py.test" "-v")))))))
6530 (native-inputs
6531 `(("python-flake8" ,python-flake8)
6532 ("python-mock" ,python-mock)
6533 ("python-pycodestyle" ,python-pycodestyle)
6534 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6535 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6536 (synopsis "Polyfill package for Flake8 plugins")
6537 (description
6538 "This package that provides some compatibility helpers for Flake8
6539plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6540 (license license:expat)))
6541
6542(define-public python2-flake8-polyfill
6543 (package-with-python2 python-flake8-polyfill))
6544
61b9ac53
FB
6545(define-public python-mistune
6546 (package
6547 (name "python-mistune")
08b81336 6548 (version "0.7.3")
61b9ac53
FB
6549 (source
6550 (origin
6551 (method url-fetch)
eff8d773 6552 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6553 (sha256
6554 (base32
08b81336 6555 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6556 (build-system python-build-system)
328bb95d 6557 (native-inputs
f3b98f4f 6558 `(("python-nose" ,python-nose)
61b9ac53
FB
6559 ("python-cython" ,python-cython)))
6560 (home-page "https://github.com/lepture/mistune")
6561 (synopsis "Markdown parser in pure Python")
6562 (description "This package provides a fast markdown parser in pure
6563Python.")
3f641af0 6564 (license license:bsd-3)))
61b9ac53
FB
6565
6566(define-public python2-mistune
6567 (package-with-python2 python-mistune))
6d992d07 6568
b9893908
EE
6569(define-public python-markdown
6570 (package
6571 (name "python-markdown")
4ffbe8c6 6572 (version "2.6.8")
b9893908
EE
6573 (source
6574 (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "Markdown" version))
6577 (sha256
6578 (base32
4ffbe8c6 6579 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6580 (build-system python-build-system)
6581 (arguments
6582 `(#:phases
6583 (modify-phases %standard-phases
6584 (replace 'check
6585 (lambda _
6586 (zero? (system* "python" "run-tests.py")))))))
6587 (native-inputs
6588 `(("python-nose" ,python-nose)
6589 ("python-pyyaml" ,python-pyyaml)))
6590 (home-page "https://pythonhosted.org/Markdown/")
6591 (synopsis "Python implementation of Markdown")
6592 (description
6593 "This package provides a Python implementation of John Gruber's
6594Markdown. The library features international input, various Markdown
6595extensions, and several HTML output formats. A command line wrapper
6596markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6597 (license license:bsd-3)))
b9893908
EE
6598
6599(define-public python2-markdown
6600 (package-with-python2 python-markdown))
6601
6d992d07
FB
6602(define-public python-ptyprocess
6603 (package
6604 (name "python-ptyprocess")
70fc93cb 6605 (version "0.5.1")
6d992d07
FB
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (string-append
6610 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6611 version ".tar.gz"))
6612 (sha256
6613 (base32
70fc93cb 6614 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6615 (build-system python-build-system)
328bb95d 6616 (native-inputs
f3b98f4f 6617 `(("python-nose" ,python-nose)))
6d992d07
FB
6618 (arguments
6619 `(#:phases
6620 (modify-phases %standard-phases
6621 (replace 'check
6622 (lambda _
6623 (zero? (system* "nosetests")))))))
6624 (home-page "https://github.com/pexpect/ptyprocess")
6625 (synopsis "Run a subprocess in a pseudo terminal")
6626 (description
6627 "This package provides a Python library used to launch a subprocess in a
6628pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6629 (license license:isc)))
6d992d07
FB
6630
6631(define-public python2-ptyprocess
6632 (package-with-python2 python-ptyprocess))
4aadb1df 6633
df893a38
MB
6634(define-public python-cram
6635 (package
6636 (name "python-cram")
6637 (version "0.7")
6638 (home-page "https://bitheap.org/cram/")
6639 (source (origin
6640 (method url-fetch)
6641 (uri (list (string-append home-page "cram-"
6642 version ".tar.gz")
6643 (pypi-uri "cram" version)))
6644 (sha256
6645 (base32
6646 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6647 (arguments
6648 '(#:phases
6649 (modify-phases %standard-phases
6650 (add-after 'unpack 'patch-source
6651 (lambda _
6652 (substitute* (find-files "cram" ".*\\.py$")
6653 ;; Replace default shell path.
6654 (("/bin/sh") (which "sh")))
6655 (substitute* (find-files "tests" ".*\\.t$")
6656 (("md5") "md5sum")
6657 (("/bin/bash") (which "bash"))
6658 (("/bin/sh") (which "sh")))
6659 (substitute* "cram/_test.py"
6660 ;; This hack works around a bug triggered by substituting
6661 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6662 ;; "cram -h", which breaks the output at 80 characters. This
6663 ;; causes the line showing the default shell to break into two
6664 ;; lines, but the test expects a single line...
6665 (("env\\['COLUMNS'\\] = '80'")
6666 "env['COLUMNS'] = '160'"))
6667 #t))
6668 (delete 'check)
6669 (add-after 'install 'check
6670 ;; The test phase uses the built library and executable.
6671 ;; It's easier to run it after install since the build
6672 ;; directory contains version-specific PATH.
6673 (lambda* (#:key inputs outputs #:allow-other-keys)
6674 (add-installed-pythonpath inputs outputs)
6675 (setenv "PATH" (string-append (getenv "PATH") ":"
6676 (assoc-ref outputs "out") "/bin"))
6677 (zero? (system* "make" "test")))))))
6678 (build-system python-build-system)
6679 (native-inputs
6680 `(("python-coverage" ,python-coverage)
6681 ("which" ,which)))
6682 (synopsis "Simple testing framework for command line applications")
6683 (description
6684 "Cram is a functional testing framework for command line applications.
6685Cram tests look like snippets of interactive shell sessions. Cram runs each
6686command and compares the command output in the test with the command’s actual
6687output.")
6688 (license license:gpl2+)))
6689
6690(define-public python2-cram
6691 (package-with-python2 python-cram))
6692
4aadb1df
FB
6693(define-public python-terminado
6694 (package
6695 (name "python-terminado")
783fb0a3 6696 (version "0.6")
4aadb1df
FB
6697 (source
6698 (origin
6699 (method url-fetch)
783fb0a3 6700 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6701 (sha256
6702 (base32
783fb0a3 6703 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6704 (build-system python-build-system)
6705 (propagated-inputs
6706 `(("python-tornado" ,python-tornado)
6707 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6708 (native-inputs
6709 `(("python-nose" ,python-nose)))
4aadb1df
FB
6710 (arguments
6711 `(#:phases
6712 (modify-phases %standard-phases
6713 (replace 'check
6714 (lambda _
6715 (zero? (system* "nosetests")))))))
6716 (home-page "https://github.com/takluyver/terminado")
6717 (synopsis "Terminals served to term.js using Tornado websockets")
6718 (description "This package provides a Tornado websocket backend for the
6719term.js Javascript terminal emulator library.")
3f641af0 6720 (license license:bsd-2)
783fb0a3 6721 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6722
6723(define-public python2-terminado
783fb0a3 6724 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6725 (package (inherit terminado)
783fb0a3
EF
6726 (propagated-inputs
6727 `(("python2-backport-ssl-match-hostname"
6728 ,python2-backport-ssl-match-hostname)
00e10c6e 6729 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6730
789de5e2 6731(define-public python-straight-plugin
6732 (package
6733 (name "python-straight-plugin")
6734 (version "1.4.1")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "straight.plugin" version))
6739 (sha256
6740 (base32
6741 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6742 (build-system python-build-system)
6743 (home-page "https://github.com/ironfroggy/straight.plugin")
6744 (synopsis "Simple namespaced plugin facility")
6745 (description "Straight Plugin provides a type of plugin you can create from
6746almost any existing Python modules, and an easy way for outside developers to
6747add functionality and customization to your projects with their own plugins.")
6748 (license license:expat)))
6749
6750(define-public python2-straight-plugin
6751 (package-with-python2 python-straight-plugin))
6752
d582eaac
SB
6753(define-public python-fonttools
6754 (package
6755 (name "python-fonttools")
6756 (version "2.5")
6757 (source (origin
6758 (method url-fetch)
6759 (uri (string-append
6760 "https://pypi.python.org/packages/source/F/FontTools/"
6761 "fonttools-" version ".tar.gz"))
6762 (sha256
6763 (base32
6764 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6765 (build-system python-build-system)
9e8c6a37
HG
6766 (arguments
6767 '(#:test-target "check"
6768 #:phases
6769 (modify-phases %standard-phases
6770 (add-after 'unpack 'patch-setuppy
6771 ;; Remove the undocumented "extra_path" argument, which adds an
6772 ;; intervening directories between site-packages and the package
6773 ;; directory.
6774 (lambda _
6775 (substitute* "setup.py"
6776 (("^[ \t]*extra_path *= *'FontTools',") ""))
6777 #t)))))
7bf837fd 6778 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
6779 (synopsis "Tools to manipulate font files")
6780 (description
6781 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6782supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6783of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6784also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6785from an XML-based format.")
3f641af0
DC
6786 (license (license:non-copyleft
6787 "file://LICENSE.txt"
6788 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6789
6790(define-public python2-fonttools
6791 (package-with-python2 python-fonttools))
75710da6 6792
5faa5ce4
RW
6793(define-public python-ly
6794 (package
6795 (name "python-ly")
5135354f 6796 (version "0.9.4")
5faa5ce4
RW
6797 (source
6798 (origin
6799 (method url-fetch)
5135354f
RW
6800 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6801 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6802 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6803 (sha256
6804 (base32
5135354f 6805 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6806 (build-system python-build-system)
972cf9be
MB
6807 (arguments
6808 ;; FIXME: Some tests need network access.
6809 '(#:tests? #f))
5faa5ce4
RW
6810 (synopsis "Tool and library for manipulating LilyPond files")
6811 (description "This package provides a Python library to parse, manipulate
6812or create documents in LilyPond format. A command line program ly is also
6813provided that can be used to do various manipulations with LilyPond files.")
6814 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6815 (license license:gpl2+)))
7e7b27d9
CR
6816
6817(define-public python-appdirs
6818 (package
6819 (name "python-appdirs")
543782e1 6820 (version "1.4.3")
7e7b27d9
CR
6821 (source
6822 (origin
6823 (method url-fetch)
26b16fd9 6824 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
6825 (sha256
6826 (base32
543782e1 6827 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 6828 (build-system python-build-system)
7bf837fd 6829 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
6830 (synopsis
6831 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6832 (description
6833 "This module provides a portable way of finding out where user data
6834should be stored on various operating systems.")
6835 (license license:expat)))
6836
6837(define-public python2-appdirs
6838 (package-with-python2 python-appdirs))
89b2e0b0
LF
6839
6840(define-public python-llfuse
6841 (package
6842 (name "python-llfuse")
4d31d143 6843 (version "1.2")
89b2e0b0
LF
6844 (source (origin
6845 (method url-fetch)
6846 (uri (string-append
6847 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6848 "llfuse-" version ".tar.bz2"))
6849 (sha256
6850 (base32
4d31d143 6851 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
6852 (build-system python-build-system)
6853 (inputs
6854 `(("fuse" ,fuse)
6855 ("attr" ,attr)))
6856 (native-inputs
f3b98f4f 6857 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6858 (synopsis "Python bindings for FUSE")
6859 (description
6860 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6861 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6862 (license license:lgpl2.0+)
cd0569c4 6863 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6864
6865(define-public python2-llfuse
cd0569c4
LF
6866 (package (inherit (package-with-python2
6867 (strip-python2-variant python-llfuse)))
6868 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6869
6870;; For attic-0.16
6871(define-public python-llfuse-0.41
6872 (package (inherit python-llfuse)
229b3661 6873 (version "0.41.1")
cd0569c4
LF
6874 (source (origin
6875 (method url-fetch)
6876 (uri (string-append
6877 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6878 "llfuse-" version ".tar.bz2"))
6879 (sha256
6880 (base32
229b3661 6881 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6882 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6883 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6884 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6885
6886(define-public python-msgpack
6887 (package
6888 (name "python-msgpack")
aed625bd 6889 (version "0.4.8")
641c9871
LF
6890 (source (origin
6891 (method url-fetch)
ae831df4 6892 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6893 (sha256
6894 (base32
aed625bd 6895 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6896 (build-system python-build-system)
641c9871
LF
6897 (synopsis "MessagePack (de)serializer")
6898 (description "MessagePack is a fast, compact binary serialization format,
6899suitable for similar data to JSON. This package provides CPython bindings for
6900reading and writing MessagePack data.")
6901 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6902 (license license:asl2.0)))
bd74be7b
LF
6903
6904(define-public python2-msgpack
f210e944 6905 (package-with-python2 python-msgpack))
641c9871 6906
6e5e39f4
CR
6907(define-public python-netaddr
6908 (package
6909 (name "python-netaddr")
6910 (version "0.7.18")
6911 (source
6912 (origin
6913 (method url-fetch)
6914 (uri (string-append
6915 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6916 version
6917 ".tar.gz"))
6918 (sha256
6919 (base32
6920 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6921 (build-system python-build-system)
6922 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6923 (home-page "https://github.com/drkjam/netaddr/")
6924 (synopsis "Pythonic manipulation of network addresses")
6925 (description
6926 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6927and MAC network addresses.")
3f641af0 6928 (license license:bsd-3)))
6e5e39f4
CR
6929
6930(define-public python2-netaddr
6931 (package-with-python2 python-netaddr))
8c692a52
CR
6932
6933(define-public python-wrapt
6934 (package
6935 (name "python-wrapt")
d25bee26 6936 (version "1.10.8")
8c692a52
CR
6937 (source
6938 (origin
6939 (method url-fetch)
d25bee26 6940 (uri (pypi-uri "wrapt" version))
8c692a52
CR
6941 (sha256
6942 (base32
d25bee26 6943 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
6944 (build-system python-build-system)
6945 (arguments
6946 ;; Tests are not included in the tarball, they are only available in the
6947 ;; git repository.
6948 `(#:tests? #f))
8c692a52
CR
6949 (home-page "https://github.com/GrahamDumpleton/wrapt")
6950 (synopsis "Module for decorators, wrappers and monkey patching")
6951 (description
6952 "The aim of the wrapt module is to provide a transparent object proxy for
6953 Python, which can be used as the basis for the construction of function
6954 wrappers and decorator functions.")
3f641af0 6955 (license license:bsd-2)))
8c692a52
CR
6956
6957(define-public python2-wrapt
6958 (package-with-python2 python-wrapt))
b85c85be
CR
6959
6960(define-public python-iso8601
6961 (package
6962 (name "python-iso8601")
fe84bc9a 6963 (version "0.1.11")
b85c85be
CR
6964 (source
6965 (origin
6966 (method url-fetch)
fe84bc9a 6967 (uri (pypi-uri "iso8601" version))
b85c85be 6968 (sha256
fe84bc9a
EF
6969 (base32
6970 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6971 (build-system python-build-system)
63b02364
MB
6972 (native-inputs
6973 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6974 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6975 (synopsis "Module to parse ISO 8601 dates")
6976 (description
6977 "This module parses the most common forms of ISO 8601 date strings (e.g.
6978@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6979 (license license:expat)))
6980
6981(define-public python2-iso8601
6982 (package-with-python2 python-iso8601))
5e412b63
CR
6983
6984(define-public python-monotonic
6985 (package
6986 (name "python-monotonic")
6987 (version "0.3")
6988 (source
6989 (origin
6990 (method url-fetch)
6991 (uri (string-append
6992 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6993 version
6994 ".tar.gz"))
6995 (sha256
6996 (base32
6997 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6998 (build-system python-build-system)
5e412b63
CR
6999 (home-page "https://github.com/atdt/monotonic")
7000 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7001 (description
7002 "This module provides a monotonic() function which returns the value (in
7003fractional seconds) of a clock which never goes backwards.")
3f641af0 7004 (license license:asl2.0)))
5e412b63
CR
7005
7006(define-public python2-monotonic
7007 (package-with-python2 python-monotonic))
de34afac
CR
7008
7009(define-public python-webob
7010 (package
7011 (name "python-webob")
b8834c21 7012 (version "1.5.1")
de34afac
CR
7013 (source
7014 (origin
7015 (method url-fetch)
b8834c21 7016 (uri (pypi-uri "WebOb" version))
de34afac
CR
7017 (sha256
7018 (base32
b8834c21 7019 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7020 (build-system python-build-system)
328bb95d 7021 (native-inputs
f3b98f4f 7022 `(("python-nose" ,python-nose)))
de34afac
CR
7023 (home-page "http://webob.org/")
7024 (synopsis "WSGI request and response object")
7025 (description
7026 "WebOb provides wrappers around the WSGI request environment, and an
7027object to help create WSGI responses.")
7028 (license license:expat)))
7029
7030(define-public python2-webob
7031 (package-with-python2 python-webob))
350ba0a3 7032
02a8a187
BW
7033(define-public python-xlrd
7034 (package
7035 (name "python-xlrd")
c2ad4d70 7036 (version "1.0.0")
02a8a187
BW
7037 (source (origin
7038 (method url-fetch)
e775f48e 7039 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7040 (sha256
7041 (base32
c2ad4d70 7042 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7043 (build-system python-build-system)
7044 (arguments
7045 `(#:phases
7046 (modify-phases %standard-phases
c2ad4d70 7047 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7048 ;; run tests instead for now.
7049 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7050 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7051 (home-page "http://www.python-excel.org/")
7052 (synopsis "Library for extracting data from Excel files")
7053 (description "This packages provides a library to extract data from
c598e35c 7054spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7055@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7056Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7057 (license license:bsd-3)))
02a8a187
BW
7058
7059(define-public python2-xlrd
7060 (package-with-python2 python-xlrd))
7061
350ba0a3
CR
7062(define-public python-prettytable
7063 (package
7064 (name "python-prettytable")
7065 (version "0.7.2")
7066 (source
7067 (origin
7068 (method url-fetch)
7069 (uri (string-append
7070 "https://pypi.python.org/packages/source/P/PrettyTable/"
7071 "prettytable-" version ".tar.bz2"))
7072 (sha256
7073 (base32
7074 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7075 (build-system python-build-system)
350ba0a3
CR
7076 (home-page "http://code.google.com/p/prettytable/")
7077 (synopsis "Display tabular data in an ASCII table format")
7078 (description
7079 "A library designed to represent tabular data in visually appealing ASCII
7080tables. PrettyTable allows for selection of which columns are to be printed,
7081independent alignment of columns (left or right justified or centred) and
7082printing of sub-tables by specifying a row range.")
3f641af0 7083 (license license:bsd-3)))
350ba0a3
CR
7084
7085(define-public python2-prettytable
7086 (package-with-python2 python-prettytable))
7a8ac75a 7087
9f8ee3fe
RW
7088(define-public python-tables
7089 (package
7090 (name "python-tables")
7091 (version "3.2.2")
7092 (source
7093 (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "tables" version))
7096 (sha256
7097 (base32
bac23672
HG
7098 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7099 (modules '((guix build utils)))
7100 (snippet
7101 '(begin
7102 ;; Remove pre-compiled .pyc files from source.
7103 (for-each delete-file-recursively
7104 (find-files "." "__pycache__" #:directories? #t))
7105 (for-each delete-file (find-files "." "\\.pyc$"))
7106 #t))))
9f8ee3fe
RW
7107 (build-system python-build-system)
7108 (arguments
7109 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7110 ;; or "check", so we must override the build and check phases.
7111 #:phases
7112 (modify-phases %standard-phases
7113 (add-after 'unpack 'use-gcc
7114 (lambda _
7115 (substitute* "setup.py"
7116 (("compiler = new_compiler\\(\\)" line)
7117 (string-append line
7118 "\ncompiler.set_executables(compiler='gcc',"
7119 "compiler_so='gcc',"
7120 "linker_exe='gcc',"
7121 "linker_so='gcc -shared')")))
7122 #t))
7123 (replace 'build
7124 (lambda* (#:key inputs #:allow-other-keys)
7125 (zero? (system* "python" "setup.py" "build"
7126 (string-append "--hdf5="
7127 (assoc-ref inputs "hdf5"))))))
7128 (replace 'check
7129 (lambda* (#:key inputs #:allow-other-keys)
7130 (zero? (system* "python" "setup.py" "check"
7131 (string-append "--hdf5="
7132 (assoc-ref inputs "hdf5")))))))))
7133 (propagated-inputs
7134 `(("python-numexpr" ,python-numexpr)
7135 ("python-numpy" ,python-numpy)))
7136 (native-inputs
f3b98f4f 7137 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7138 ("pkg-config" ,pkg-config)))
7139 (inputs
7140 `(("hdf5" ,hdf5)
7141 ("bzip2" ,bzip2)
7142 ("zlib" ,zlib)))
7143 (home-page "http://www.pytables.org/")
7144 (synopsis "Hierarchical datasets for Python")
7145 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7146designed to efficiently cope with extremely large amounts of data.")
3f641af0 7147 (license license:bsd-3)))
9f8ee3fe
RW
7148
7149(define-public python2-tables
7150 (package-with-python2 python-tables))
7151
7a8ac75a
RW
7152(define-public python-pyasn1
7153 (package
7154 (name "python-pyasn1")
caa0edb3 7155 (version "0.1.9")
7a8ac75a
RW
7156 (source
7157 (origin
7158 (method url-fetch)
caa0edb3 7159 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7160 (sha256
7161 (base32
caa0edb3 7162 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
7163 (build-system python-build-system)
7164 (home-page "http://pyasn1.sourceforge.net/")
7165 (synopsis "ASN.1 types and codecs")
7166 (description
7167 "This is an implementation of ASN.1 types and codecs in Python. It is
7168suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7169 (license license:bsd-2)))
7a8ac75a
RW
7170
7171(define-public python2-pyasn1
7172 (package-with-python2 python-pyasn1))
9a49a535 7173
5988c299
EF
7174(define-public python-pyasn1-modules
7175 (package
7176 (name "python-pyasn1-modules")
7177 (version "0.0.8")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "pyasn1-modules" version))
7182 (sha256
7183 (base32
7184 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7185 (build-system python-build-system)
5988c299
EF
7186 (propagated-inputs
7187 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7188 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7189 (synopsis "ASN.1 codec implementations")
7190 (description
7191 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7192implementations of ASN.1-based codecs and protocols.")
3f641af0 7193 (license license:bsd-3)))
5988c299
EF
7194
7195(define-public python2-pyasn1-modules
7196 (package-with-python2 python-pyasn1-modules))
7197
520af157 7198(define-public python-ipaddress
9a49a535 7199 (package
520af157 7200 (name "python-ipaddress")
36e0d9db 7201 (version "1.0.18")
520af157
DC
7202 (source (origin
7203 (method url-fetch)
7204 (uri (pypi-uri "ipaddress" version))
7205 (sha256
7206 (base32
36e0d9db 7207 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7208 (build-system python-build-system)
9a49a535
RW
7209 (home-page "https://github.com/phihag/ipaddress")
7210 (synopsis "IP address manipulation library")
7211 (description
520af157
DC
7212 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7213 in Python. This library is used to create, poke at, and manipulate IPv4 and
7214 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7215 module to older versions of Python.")
f210e944 7216 (license license:psfl)))
520af157
DC
7217
7218(define-public python2-ipaddress
f210e944 7219 (package-with-python2 python-ipaddress))
3f00e078 7220
4a238186
HG
7221(define-public python2-ipaddr
7222 (package
7223 (name "python2-ipaddr")
7224 (version "2.1.11")
7225 (source
7226 (origin
7227 (method url-fetch)
7228 (uri (pypi-uri "ipaddr" version))
7229 (sha256
7230 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7231 (build-system python-build-system)
7232 (arguments
7233 `(#:python ,python-2 ;version 2 only
7234 #:phases
7235 (modify-phases %standard-phases
7236 (replace 'check
7237 (lambda* _
7238 (zero? (system* "python" "ipaddr_test.py")))))))
7239 (home-page "https://github.com/google/ipaddr-py")
7240 (synopsis "IP address manipulation library")
7241 (description
7242 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7243IPv6 addresses and networks.
7244
7245For new implementations you may prefer to use the standard module
7246@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7247versions of Python.")
3f641af0 7248 (license license:asl2.0)))
4a238186 7249
3f00e078
RW
7250(define-public python-idna
7251 (package
7252 (name "python-idna")
7253 (version "2.0")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (string-append "https://pypi.python.org/packages/source/i/"
7258 "idna/idna-" version ".tar.gz"))
7259 (sha256
7260 (base32
7261 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7262 (build-system python-build-system)
3f00e078
RW
7263 (home-page "https://github.com/kjd/idna")
7264 (synopsis "Internationalized domain names in applications")
7265 (description
7266 "This is a library to support the Internationalised Domain Names in
7267Applications (IDNA) protocol as specified in RFC 5891. This version of the
7268protocol is often referred to as “IDNA2008” and can produce different results
7269from the earlier standard from 2003. The library is also intended to act as a
7270suitable drop-in replacement for the “encodings.idna” module that comes with
7271the Python standard library but currently only supports the older 2003
7272specification.")
3f641af0 7273 (license license:bsd-4)))
3f00e078
RW
7274
7275(define-public python2-idna
7276 (package-with-python2 python-idna))
36ebf972
RW
7277
7278(define-public python-pretend
7279 (package
7280 (name "python-pretend")
7281 (version "1.0.8")
7282 (source
7283 (origin
7284 (method url-fetch)
7285 (uri (string-append "https://pypi.python.org/packages/source/p/"
7286 "pretend/pretend-" version ".tar.gz"))
7287 (sha256
7288 (base32
7289 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7290 (build-system python-build-system)
36ebf972
RW
7291 (home-page "https://github.com/alex/pretend")
7292 (synopsis "Library for stubbing in Python")
7293 (description
7294 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7295technique for writing tests. You may hear the term mixed up with mocks,
7296fakes, or doubles. Basically, a stub is an object that returns pre-canned
7297responses, rather than doing any computation.")
3f641af0 7298 (license license:bsd-3)))
36ebf972
RW
7299
7300(define-public python2-pretend
7301 (package-with-python2 python-pretend))
aa759a51
RW
7302
7303(define-public python-cryptography-vectors
7304 (package
7305 (name "python-cryptography-vectors")
27fab2bf 7306 (version "1.7.1")
aa759a51
RW
7307 (source
7308 (origin
7309 (method url-fetch)
9c509ca9 7310 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7311 (sha256
7312 (base32
27fab2bf 7313 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7314 (build-system python-build-system)
aa759a51 7315 (home-page "https://github.com/pyca/cryptography")
66e07664 7316 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7317 (description
7318 "This package contains test vectors for the cryptography package.")
7319 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7320 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7321
7322(define-public python2-cryptography-vectors
7323 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7324
7325(define-public python-cryptography
7326 (package
7327 (name "python-cryptography")
27fab2bf 7328 (version "1.7.1")
88b47cb0
RW
7329 (source
7330 (origin
7331 (method url-fetch)
9c509ca9 7332 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7333 (sha256
7334 (base32
27fab2bf 7335 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7336 (build-system python-build-system)
7337 (inputs
7338 `(("openssl" ,openssl)))
7339 (propagated-inputs
7340 `(("python-cffi" ,python-cffi)
7341 ("python-six" ,python-six)
7342 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7343 ("python-idna" ,python-idna)
7344 ("python-iso8601" ,python-iso8601)))
7345 (native-inputs
7346 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7347 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7348 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7349 ("python-pyasn1" ,python-pyasn1)
7350 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad 7351 ("python-pytz" ,python-pytz)
23b9168d 7352 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7353 (home-page "https://github.com/pyca/cryptography")
7354 (synopsis "Cryptographic recipes and primitives for Python")
7355 (description
7356 "cryptography is a package which provides cryptographic recipes and
7357primitives to Python developers. It aims to be the “cryptographic standard
7358library” for Python. The package includes both high level recipes, and low
7359level interfaces to common cryptographic algorithms such as symmetric ciphers,
7360message digests and key derivation functions.")
7361 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7362 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7363 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7364
7365(define-public python2-cryptography
519e2f4f
LF
7366 (let ((crypto (package-with-python2
7367 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7368 (package (inherit crypto)
7369 (propagated-inputs
7370 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7371 ("python2-backport-ssl-match-hostname"
7372 ,python2-backport-ssl-match-hostname)
68f1cdec 7373 ("python2-enum34" ,python2-enum34)
88b47cb0 7374 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7375
7376(define-public python-pyopenssl
7377 (package
7378 (name "python-pyopenssl")
833df99d 7379 (version "17.0.0")
5af999b8
RW
7380 (source
7381 (origin
7382 (method url-fetch)
eb68d268 7383 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7384 (sha256
7385 (base32
833df99d 7386 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7c6bf660
MB
7387 (patches
7388 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7389 (build-system python-build-system)
30e0229a 7390 (arguments
7c6bf660
MB
7391 '(#:phases
7392 (modify-phases %standard-phases
7393 (delete 'check)
7394 (add-after 'install 'check
7395 (lambda* (#:key inputs outputs #:allow-other-keys)
7396 (add-installed-pythonpath inputs outputs)
7397 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7398 (propagated-inputs
7399 `(("python-cryptography" ,python-cryptography)
7400 ("python-six" ,python-six)))
7401 (inputs
7402 `(("openssl" ,openssl)))
30e0229a 7403 (native-inputs
833df99d 7404 `(("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7405 (home-page "https://github.com/pyca/pyopenssl")
7406 (synopsis "Python wrapper module around the OpenSSL library")
7407 (description
7408 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7409library.")
3f641af0 7410 (license license:asl2.0)))
5af999b8
RW
7411
7412(define-public python2-pyopenssl
519e2f4f 7413 (package-with-python2 python-pyopenssl))
643725a1
CR
7414
7415(define-public python-pip
7416 (package
7417 (name "python-pip")
392c26b0 7418 (version "9.0.1")
643725a1
CR
7419 (source
7420 (origin
7421 (method url-fetch)
6fb54e3b 7422 (uri (pypi-uri "pip" version))
643725a1
CR
7423 (sha256
7424 (base32
392c26b0 7425 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7426 (build-system python-build-system)
392c26b0
MC
7427 (arguments
7428 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7429 (home-page "https://pip.pypa.io/")
392c26b0 7430 (synopsis "Package manager for Python software")
643725a1 7431 (description
392c26b0 7432 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7433Python Package Index (PyPI).")
7434 (license license:expat)))
7435
7436(define-public python2-pip
7437 (package-with-python2 python-pip))
d8c4998f
LC
7438
7439(define-public python-tlsh
7440 (package
7441 (name "python-tlsh")
99b00dc7 7442 (version "3.4.4")
d8c4998f
LC
7443 (home-page "https://github.com/trendmicro/tlsh")
7444 (source (origin
99b00dc7
EF
7445 (method url-fetch)
7446 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7447 version ".tar.gz"))
d8c4998f
LC
7448 (sha256
7449 (base32
99b00dc7
EF
7450 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7451 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7452 (build-system cmake-build-system)
7453 (arguments
7454 '(#:out-of-source? #f
7455 #:phases (modify-phases %standard-phases
7456 (replace
7457 'install
7458 (lambda* (#:key outputs #:allow-other-keys)
7459 ;; Build and install the Python bindings. The underlying
7460 ;; C++ library is apparently not meant to be installed.
7461 (let ((out (assoc-ref outputs "out")))
7462 (with-directory-excursion "py_ext"
7463 (and (system* "python" "setup.py" "build")
7464 (system* "python" "setup.py" "install"
7465 (string-append "--prefix=" out))))))))))
7466 (inputs `(("python" ,python-wrapper))) ;for the bindings
7467 (synopsis "Fuzzy matching library for Python")
7468 (description
7469 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7470Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7471value which can be used for similarity comparisons. Similar objects have
7472similar hash values, which allows for the detection of similar objects by
7473comparing their hash values. The byte stream should have a sufficient amount
7474of complexity; for example, a byte stream of identical bytes will not generate
7475a hash value.")
3f641af0 7476 (license license:asl2.0)))
d8c4998f
LC
7477
7478(define-public python2-tlsh
7479 (package
7480 (inherit python-tlsh)
7481 (name "python2-tlsh")
7482 (inputs `(("python" ,python-2)))))
d96034ed 7483
67f66812
BW
7484(define-public python-termcolor
7485 (package
7486 (name "python-termcolor")
7487 (version "1.1.0")
7488 (source
7489 (origin
7490 (method url-fetch)
7491 (uri (pypi-uri "python-termcolor" version))
7492 (sha256
7493 (base32
7494 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7495 (build-system python-build-system)
7496 (arguments
7497 ;; There are no tests.
7498 `(#:tests? #f))
7499 (home-page "http://pypi.python.org/pypi/termcolor")
7500 (synopsis "ANSII Color formatting for terminal output")
7501 (description
7502 "This package provides ANSII Color formatting for output in terminals.")
7503 (license license:expat)))
7504
7505(define-public python2-termcolor
7506 (package-with-python2 python-termcolor))
7507
d96034ed
LC
7508(define-public python-libarchive-c
7509 (package
7510 (name "python-libarchive-c")
03fd001c 7511 (version "2.2")
d96034ed
LC
7512 (source (origin
7513 (method url-fetch)
03fd001c 7514 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7515 (sha256
7516 (base32
03fd001c 7517 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7518 (build-system python-build-system)
7519 (arguments
7520 '(#:phases (modify-phases %standard-phases
7521 (add-before
7522 'build 'reference-libarchive
7523 (lambda* (#:key inputs #:allow-other-keys)
7524 ;; Retain the absolute file name of libarchive.so.
7525 (let ((libarchive (assoc-ref inputs "libarchive")))
7526 (substitute* "libarchive/ffi.py"
7527 (("find_library\\('archive'\\)")
7528 (string-append "'" libarchive
b41a05ce 7529 "/lib/libarchive.so'")))))))))
d96034ed 7530 (inputs
f3b98f4f 7531 `(("libarchive" ,libarchive)))
d96034ed
LC
7532 (home-page "https://github.com/Changaco/python-libarchive-c")
7533 (synopsis "Python interface to libarchive")
7534 (description
7535 "This package provides Python bindings to libarchive, a C library to
7536access possibly compressed archives in many different formats. It uses
7537Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7538 (license license:lgpl2.0+)))
d96034ed
LC
7539
7540(define-public python2-libarchive-c
7541 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7542
7543(define-public python-file
7544 (package
7545 (inherit file)
7546 (name "python-file")
7ffa5d4a
LF
7547 (source (origin
7548 (inherit (package-source file))
7549 ;; This patch should not be applied to python2-file.
7550 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7551 (build-system python-build-system)
7552 (arguments
7553 '(#:tests? #f ;no tests
00bf74be 7554 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7555 #:phases (modify-phases %standard-phases
7556 (add-before 'build 'change-directory
7557 (lambda _
7558 (chdir "python")
7559 #t))
7560 (add-before 'build 'set-library-file-name
7561 (lambda* (#:key inputs #:allow-other-keys)
7562 (let ((file (assoc-ref inputs "file")))
7563 (substitute* "magic.py"
7564 (("find_library\\('magic'\\)")
7565 (string-append "'" file "/lib/libmagic.so'")))
7566 #t))))))
7567 (inputs `(("file" ,file)))
7568 (self-native-input? #f)
daeeea71
CM
7569 (synopsis "Python bindings to the libmagic file type guesser. Note that
7570this module and the python-magic module both provide a \"magic.py\" file;
7571these two modules, which are different and were developed separately, both
f210e944 7572serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7573
7574(define-public python2-file
f210e944 7575 (package-with-python2 python-file))
85d4aeac
LC
7576
7577(define-public python-debian
7578 (package
7579 (name "python-debian")
02d7f337 7580 (version "0.1.28")
85d4aeac
LC
7581 (source
7582 (origin
7583 (method url-fetch)
5e217a8b 7584 (uri (pypi-uri name version))
85d4aeac
LC
7585 (sha256
7586 (base32
02d7f337 7587 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7588 (build-system python-build-system)
f22efa01 7589 (propagated-inputs
85d4aeac 7590 `(("python-six" ,python-six)))
85d4aeac
LC
7591 (home-page "http://packages.debian.org/sid/python-debian")
7592 (synopsis "Debian package related modules")
7593 (description
5c7bdc9a
LC
7594 ;; XXX: Use @enumerate instead of @itemize to work around
7595 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7596 "This package provides Python modules that abstract many formats of
7597Debian-related files, such as:
7598
5c7bdc9a 7599@enumerate
85d4aeac
LC
7600@item Debtags information;
7601@item @file{debian/changelog} files;
7602@item packages files, pdiffs;
7603@item control files of single or multiple RFC822-style paragraphs---e.g.
7604 @file{debian/control}, @file{.changes}, @file{.dsc};
7605@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7606 contained files and meta-information.
5c7bdc9a 7607@end enumerate\n")
85d4aeac
LC
7608
7609 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7610 (license license:gpl3+)))
85d4aeac
LC
7611
7612(define-public python2-debian
7613 (package-with-python2 python-debian))
816a6538 7614
2d321bb2
RW
7615(define-public python-nbformat
7616 (package
7617 (name "python-nbformat")
7618 (version "4.1.0")
7619 (source
7620 (origin
7621 (method url-fetch)
7622 (uri (pypi-uri "nbformat" version))
7623 (sha256
7624 (base32
7625 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7626 (build-system python-build-system)
7627 (arguments `(#:tests? #f)) ; no test target
7628 (propagated-inputs
7629 `(("python-ipython-genutils" ,python-ipython-genutils)
7630 ("python-jsonschema" ,python-jsonschema)
7631 ("python-jupyter-core" ,python-jupyter-core)
7632 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7633 (home-page "http://jupyter.org")
7634 (synopsis "Jupyter Notebook format")
7635 (description "This package provides the reference implementation of the
7636Jupyter Notebook format and Python APIs for working with notebooks.")
7637 (license license:bsd-3)))
7638
7639(define-public python2-nbformat
7640 (package-with-python2 python-nbformat))
7641
55436048
RW
7642(define-public python-bleach
7643 (package
7644 (name "python-bleach")
7645 (version "1.4.3")
7646 (source
7647 (origin
7648 (method url-fetch)
7649 (uri (pypi-uri "bleach" version))
7650 (sha256
7651 (base32
7652 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7653 (build-system python-build-system)
7654 (propagated-inputs
7655 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7656 ("python-six" ,python-six)))
7657 (native-inputs
7658 `(("python-nose" ,python-nose)))
7bf837fd 7659 (home-page "https://github.com/jsocol/bleach")
55436048
RW
7660 (synopsis "Whitelist-based HTML-sanitizing tool")
7661 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7662 (license license:asl2.0)))
7663
7664(define-public python2-bleach
7665 (package-with-python2 python-bleach))
7666
60590a3a
RW
7667(define-public python-entrypoints
7668 (package
7669 (name "python-entrypoints")
7670 (version "0.2.2")
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7675 version ".tar.gz"))
7676 (file-name (string-append name "-" version ".tar.gz"))
7677 (sha256
7678 (base32
7679 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7680 (build-system python-build-system)
7681 ;; The package does not come with a setup.py file, so we have to generate
7682 ;; one ourselves.
7683 (arguments
7684 `(#:tests? #f
7685 #:phases
7686 (modify-phases %standard-phases
7687 (add-after 'unpack 'create-setup.py
7688 (lambda _
7689 (call-with-output-file "setup.py"
7690 (lambda (port)
7691 (format port "\
7692from setuptools import setup
7693setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7694" ,version))))))))
7695 (home-page "https://github.com/takluyver/entrypoints")
7696 (synopsis "Discover and load entry points from installed Python packages")
7697 (description "Entry points are a way for Python packages to advertise
7698objects with some common interface. The most common examples are
7699@code{console_scripts} entry points, which define shell commands by
7700identifying a Python function to run. The @code{entrypoints} module contains
7701functions to find and load entry points.")
7702 (license license:expat)))
7703
7704(define-public python2-entrypoints
7705 (package-with-python2 python-entrypoints))
7706
c60898a8
RW
7707(define-public python-nbconvert
7708 (package
7709 (name "python-nbconvert")
7710 (version "5.0.0b1")
7711 (source
7712 (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "nbconvert" version))
7715 (sha256
7716 (base32
7717 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7718 (build-system python-build-system)
497355dc
MB
7719 (arguments
7720 `(;; The "bdist_egg" target is disabled by default, causing the installation
7721 ;; to fail.
7722 #:configure-flags (list "bdist_egg")
7723 ;; FIXME: 5 failures, 40 errors.
7724 #:tests? #f))
7725 ;; #:phases
7726 ;; (modify-phases %standard-phases
7727 ;; (replace 'check
7728 ;; (lambda _
7729 ;; (zero? (system* "py.test" "-v")))))
7730 (native-inputs
7731 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7732 (propagated-inputs
7733 `(("python-bleach" ,python-bleach)
7734 ("python-entrypoints" ,python-entrypoints)
7735 ("python-jinja2" ,python-jinja2)
7736 ("python-jupyter-core" ,python-jupyter-core)
7737 ("python-mistune" ,python-mistune)
7738 ("python-nbformat" ,python-nbformat)
7739 ("python-pygments" ,python-pygments)
c60898a8
RW
7740 ("python-traitlets" ,python-traitlets)))
7741 (home-page "http://jupyter.org")
7742 (synopsis "Converting Jupyter Notebooks")
7743 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7744notebooks to various other formats via Jinja templates. It allows you to
7745convert an @code{.ipynb} notebook file into various static formats including:
7746
7747@enumerate
7748@item HTML
7749@item LaTeX
7750@item PDF
7751@item Reveal JS
7752@item Markdown (md)
7753@item ReStructured Text (rst)
7754@item executable script
7755@end enumerate\n")
7756 (license license:bsd-3)))
7757
7758(define-public python2-nbconvert
7759 (package-with-python2 python-nbconvert))
7760
a0d62280
RW
7761(define-public python-notebook
7762 (package
7763 (name "python-notebook")
7764 (version "4.2.3")
7765 (source (origin
7766 (method url-fetch)
7767 (uri (pypi-uri "notebook" version))
7768 (sha256
7769 (base32
7770 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7771 (build-system python-build-system)
7772 (arguments
7773 `(#:phases
7774 (modify-phases %standard-phases
7775 (replace 'check
7776 (lambda _
7777 ;; HOME must be set for tests
7778 (setenv "HOME" "/tmp")
7779 (zero? (system* "nosetests")))))))
7780 (propagated-inputs
7781 `(("python-jupyter-core" ,python-jupyter-core)
7782 ("python-nbformat" ,python-nbformat)
7783 ("python-nbconvert" ,python-nbconvert)
7784 ("python-ipython" ,python-ipython)))
7785 (native-inputs
7786 `(("python-nose" ,python-nose)
7787 ("python-sphinx" ,python-sphinx)
7788 ("python-requests" ,python-requests)))
7789 (home-page "http://jupyter.org/")
7790 (synopsis "Web-based notebook environment for interactive computing")
7791 (description
7792 "The Jupyter HTML notebook is a web-based notebook environment for
7793interactive computing.")
3a735ecf 7794 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7795 (license license:bsd-3)))
7796
7797(define-public python2-notebook
3a735ecf
HG
7798 (let ((base (package-with-python2
7799 (strip-python2-variant python-notebook))))
7800 (package (inherit base)
7801 (native-inputs
7802 `(("python2-mock" ,python2-mock)
7803 ,@(package-native-inputs base)))
7804 (arguments
7805 (substitute-keyword-arguments (package-arguments base)
7806 ((#:phases phases)
7807 `(modify-phases ,phases
7808 (add-before 'check 'disable-test-case
7809 ;; The test requires network access to localhost. Curiously it
7810 ;; fails with Python 2 only. Simply make the test-case return
7811 ;; immediately.
7812 (lambda _
7813 (substitute*
7814 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7815 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7816
d55724ed
RW
7817(define-public python-widgetsnbextension
7818 (package
7819 (name "python-widgetsnbextension")
7820 (version "1.2.6")
7821 (source
7822 (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "widgetsnbextension" version))
7825 (sha256
7826 (base32
7827 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7828 (build-system python-build-system)
7829 (propagated-inputs
7830 `(("python-notebook" ,python-notebook)))
7831 (native-inputs
58f5fae7
MB
7832 `(("python-certifi" ,python-certifi)
7833 ("python-nose" ,python-nose)))
d55724ed
RW
7834 (home-page "http://ipython.org")
7835 (synopsis "IPython HTML widgets for Jupyter")
7836 (description "This package provides interactive HTML widgets for Jupyter
7837notebooks.")
7838 (license license:bsd-3)))
7839
7840(define-public python2-widgetsnbextension
7841 (package-with-python2 python-widgetsnbextension))
7842
4fe2e344
RW
7843(define-public python-ipywidgets
7844 (package
7845 (name "python-ipywidgets")
7846 (version "5.2.2")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "ipywidgets" version))
7851 (sha256
7852 (base32
7853 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7854 (build-system python-build-system)
7855 ;; FIXME: it's not clear how to run the tests.
7856 (arguments `(#:tests? #f))
7857 (propagated-inputs
7858 `(("python-ipykernel" ,python-ipykernel)
7859 ("python-ipython" ,python-ipython)
4fe2e344
RW
7860 ("python-traitlets" ,python-traitlets)
7861 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7862 (home-page "http://ipython.org")
7863 (synopsis "IPython HTML widgets for Jupyter")
7864 (description "Ipywidgets are interactive HTML widgets for Jupyter
7865notebooks and the IPython kernel. Notebooks come alive when interactive
7866widgets are used. Users gain control of their data and can visualize changes
7867in the data.")
7868 (license license:bsd-3)))
7869
7870(define-public python2-ipywidgets
7871 (package-with-python2 python-ipywidgets))
7872
8ceebf8f
RW
7873(define-public python-jupyter-console
7874 (package
7875 (name "python-jupyter-console")
7876 (version "5.0.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "jupyter_console" version))
7881 (sha256
7882 (base32
7883 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7884 (build-system python-build-system)
7885 ;; FIXME: it's not clear how to run the tests.
7886 (arguments `(#:tests? #f))
7887 (propagated-inputs
7888 `(("python-ipykernel" ,python-ipykernel)
7889 ("python-ipython" ,python-ipython)
7890 ("python-jupyter-client" ,python-jupyter-client)
7891 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7892 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7893 (home-page "https://jupyter.org")
7894 (synopsis "Jupyter terminal console")
7895 (description "This package provides a terminal-based console frontend for
7896Jupyter kernels. It also allows for console-based interaction with non-Python
7897Jupyter kernels such as IJulia and IRKernel.")
7898 (license license:bsd-3)))
7899
7900(define-public python2-jupyter-console
7901 (package-with-python2 python-jupyter-console))
7902
c27ae827
RW
7903(define-public jupyter
7904 (package
7905 (name "jupyter")
7906 (version "1.0.0")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "jupyter" version))
7911 (sha256
7912 (base32
7913 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7914 (build-system python-build-system)
7915 ;; FIXME: it's not clear how to run the tests.
7916 (arguments `(#:tests? #f))
7917 (propagated-inputs
7918 `(("python-ipykernel" ,python-ipykernel)
7919 ("python-ipywidgets" ,python-ipywidgets)
7920 ("python-jupyter-console" ,python-jupyter-console)
7921 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7922 ("python-notebook" ,python-notebook)))
c27ae827
RW
7923 (home-page "http://jupyter.org")
7924 (synopsis "Web application for interactive documents")
7925 (description
7926 "The Jupyter Notebook is a web application that allows you to create and
7927share documents that contain live code, equations, visualizations and
7928explanatory text. Uses include: data cleaning and transformation, numerical
7929simulation, statistical modeling, machine learning and much more.")
7930 (license license:bsd-3)))
7931
816a6538
LC
7932(define-public python-chardet
7933 (package
7934 (name "python-chardet")
7935 (version "2.3.0")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (string-append
7940 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7941 version
7942 ".tar.gz"))
7943 (sha256
7944 (base32
7945 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7946 (build-system python-build-system)
816a6538
LC
7947 (home-page "https://github.com/chardet/chardet")
7948 (synopsis "Universal encoding detector for Python 2 and 3")
7949 (description
7950 "This package provides @code{chardet}, a Python module that can
7951automatically detect a wide range of file encodings.")
3f641af0 7952 (license license:lgpl2.1+)))
816a6538
LC
7953
7954(define-public python2-chardet
7955 (package-with-python2 python-chardet))
2fc5f186 7956
1872f1bb
KM
7957(define-public python-docopt
7958 (package
7959 (name "python-docopt")
7960 (version "0.6.2")
7961 (source
7962 (origin
7963 (method url-fetch)
7964 ;; The release on PyPI does not include tests.
7965 (uri (string-append
7966 "https://github.com/docopt/docopt/archive/"
7967 version ".tar.gz"))
7968 (file-name (string-append name "-" version ".tar.gz"))
7969 (sha256
7970 (base32
7971 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7972 (build-system python-build-system)
7973 (native-inputs
f3b98f4f 7974 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7975 (arguments
7976 `(#:phases (alist-replace
7977 'check
7978 (lambda _ (zero? (system* "py.test")))
7979 %standard-phases)))
7980 (home-page "http://docopt.org")
7981 (synopsis "Command-line interface description language for Python")
7982 (description "This library allows the user to define a command-line
7983interface from a program's help message rather than specifying it
7984programatically with command-line parsers like @code{getopt} and
7985@code{argparse}.")
7986 (license license:expat)))
7987
7988(define-public python2-docopt
7989 (package-with-python2 python-docopt))
7990
2fc5f186
LF
7991(define-public python-zope-event
7992 (package
7993 (name "python-zope-event")
7994 (version "4.1.0")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (string-append "https://pypi.python.org/packages/source/z"
7999 "/zope.event/zope.event-" version ".tar.gz"))
8000 (sha256
8001 (base32
8002 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8003 (build-system python-build-system)
2fc5f186
LF
8004 (home-page "http://pypi.python.org/pypi/zope.event")
8005 (synopsis "Event publishing system for Python")
8006 (description "Zope.event provides an event publishing API, intended for
8007use by applications which are unaware of any subscribers to their events. It
8008is a simple event-dispatching system on which more sophisticated event
8009dispatching systems can be built.")
3f641af0 8010 (license license:zpl2.1)))
2fc5f186
LF
8011
8012(define-public python2-zope-event
8013 (package-with-python2 python-zope-event))
97abe268
LF
8014
8015(define-public python-zope-interface
8016 (package
8017 (name "python-zope-interface")
8018 (version "4.1.3")
8019 (source
8020 (origin
8021 (method url-fetch)
8022 (uri (string-append "https://pypi.python.org/packages/source/z"
8023 "/zope.interface/zope.interface-" version ".tar.gz"))
8024 (sha256
8025 (base32
8026 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8027 (build-system python-build-system)
38d480a8 8028 (native-inputs
97abe268
LF
8029 `(("python-zope-event" ,python-zope-event)))
8030 (home-page "https://github.com/zopefoundation/zope.interface")
8031 (synopsis "Python implementation of the \"design by contract\"
8032methodology")
8033 (description "Zope.interface provides an implementation of \"object
8034interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8035conforming to a given API or contract.")
3f641af0 8036 (license license:zpl2.1)))
97abe268
LF
8037
8038(define-public python2-zope-interface
8039 (package-with-python2 python-zope-interface))
81f2373c
LF
8040
8041(define-public python-zope-exceptions
8042 (package
8043 (name "python-zope-exceptions")
8044 (version "4.0.8")
8045 (source
8046 (origin
8047 (method url-fetch)
8048 (uri (string-append "https://pypi.python.org/packages/source/z"
8049 "/zope.exceptions/zope.exceptions-"
8050 version ".tar.gz"))
8051 (sha256
8052 (base32
8053 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8054 (build-system python-build-system)
8055 (arguments
8056 '(#:tests? #f)) ; circular dependency with zope.testrunner
8057 (propagated-inputs
8058 `(("python-zope-interface" ,python-zope-interface)))
8059 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8060 (synopsis "Zope exceptions")
8061 (description "Zope.exceptions provides general-purpose exception types
8062that have uses outside of the Zope framework.")
3f641af0 8063 (license license:zpl2.1)))
81f2373c
LF
8064
8065(define-public python2-zope-exceptions
8066 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8067
8068(define-public python-zope-testing
8069 (package
8070 (name "python-zope-testing")
8071 (version "4.5.0")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (string-append "https://pypi.python.org/packages/source/z"
8076 "/zope.testing/zope.testing-" version ".tar.gz"))
8077 (sha256
8078 (base32
b02f7a21
HG
8079 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8080 (modules '((guix build utils)))
8081 (snippet
8082 '(begin
8083 ;; Remove pre-compiled .pyc files backup files from source.
8084 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8085 #t))))
900e3c0e
LF
8086 (build-system python-build-system)
8087 (native-inputs
8088 `(("python-zope-exceptions" ,python-zope-exceptions)))
8089 (propagated-inputs
8090 `(("python-zope-interface" ,python-zope-interface)))
8091 (home-page "http://pypi.python.org/pypi/zope.testing")
8092 (synopsis "Zope testing helpers")
8093 (description "Zope.testing provides a number of testing utilities for HTML
8094forms, HTTP servers, regular expressions, and more.")
3f641af0 8095 (license license:zpl2.1)))
900e3c0e
LF
8096
8097(define-public python2-zope-testing
8098 (package-with-python2 python-zope-testing))
01614c4f
LF
8099
8100(define-public python-zope-testrunner
8101 (package
8102 (name "python-zope-testrunner")
8103 (version "4.4.9")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (string-append "https://pypi.python.org/packages/source/z"
8108 "/zope.testrunner/zope.testrunner-"
8109 version ".zip"))
8110 (sha256
8111 (base32
8112 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8113 (build-system python-build-system)
385871e5
MB
8114 (arguments
8115 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8116 (native-inputs
8117 `(("python-six" ,python-six)
e408ffc3 8118 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8119 ("python-zope-exceptions" ,python-zope-exceptions)
8120 ("python-zope-testing" ,python-zope-testing)
8121 ("unzip" ,unzip)))
8122 (propagated-inputs
8123 `(("python-zope-interface" ,python-zope-interface)))
8124 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8125 (synopsis "Zope testrunner script")
8126 (description "Zope.testrunner provides a script for running Python
8127tests.")
3f641af0 8128 (license license:zpl2.1)))
01614c4f
LF
8129
8130(define-public python2-zope-testrunner
8131 (let ((base (package-with-python2 python-zope-testrunner)))
8132 (package
8133 (inherit base)
8134 (native-inputs
8135 (append (package-native-inputs base)
8136 `(("python2-subunit" ,python2-subunit)
8137 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8138
8139(define-public python-zope-i18nmessageid
8140 (package
8141 (name "python-zope-i18nmessageid")
8142 (version "4.0.3")
8143 (source
8144 (origin
8145 (method url-fetch)
8146 (uri (string-append
8147 "https://pypi.python.org/packages/source/z"
8148 "/zope.i18nmessageid/zope.i18nmessageid-"
8149 version ".tar.gz"))
8150 (sha256
8151 (base32
8152 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8153 (build-system python-build-system)
6a5c710c
LF
8154 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8155 (synopsis "Message identifiers for internationalization")
8156 (description "Zope.i18nmessageid provides facilities for declaring
8157internationalized messages within program source text.")
3f641af0 8158 (license license:zpl2.1)))
6a5c710c
LF
8159
8160(define-public python2-zope-i18nmessageid
8161 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8162
8163(define-public python-zope-schema
8164 (package
8165 (name "python-zope-schema")
8166 (version "4.4.2")
8167 (source
8168 (origin
8169 (method url-fetch)
8170 (uri (string-append "https://pypi.python.org/packages/source/z"
8171 "/zope.schema/zope.schema-" version ".tar.gz"))
8172 (sha256
8173 (base32
8174 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8175 (build-system python-build-system)
22dba2ef
MB
8176 (arguments
8177 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8178 (propagated-inputs
8179 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8180 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8181 ("python-zope-interface" ,python-zope-interface)))
8182 (native-inputs
47f77210
HG
8183 `(("python-zope-testing" ,python-zope-testing)
8184 ("python-coverage" ,python-coverage)
8185 ("python-nose" ,python-nose)))
71fb09f3
LF
8186 (home-page "http://pypi.python.org/pypi/zope.schema")
8187 (synopsis "Zope data schemas")
8188 (description "Zope.scheme provides extensions to zope.interface for
8189defining data schemas.")
3f641af0 8190 (license license:zpl2.1)))
71fb09f3
LF
8191
8192(define-public python2-zope-schema
8193 (package-with-python2 python-zope-schema))
fbac9b17
LF
8194
8195(define-public python-zope-configuration
8196 (package
8197 (name "python-zope-configuration")
8198 (version "4.0.3")
8199 (source (origin
8200 (method url-fetch)
8201 (uri (string-append "https://pypi.python.org/packages/source/z"
8202 "/zope.configuration/zope.configuration-"
8203 version ".tar.gz"))
8204 (sha256
8205 (base32
8206 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8207 (build-system python-build-system)
7e8b1bfa
MB
8208 (arguments
8209 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8210 (propagated-inputs
8211 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8212 ("python-zope-schema" ,python-zope-schema)))
8213 (home-page "http://pypi.python.org/pypi/zope.configuration")
8214 (synopsis "Zope Configuration Markup Language")
8215 (description "Zope.configuration implements ZCML, the Zope Configuration
8216Markup Language.")
3f641af0 8217 (license license:zpl2.1)))
fbac9b17
LF
8218
8219(define-public python2-zope-configuration
8220 (package-with-python2 python-zope-configuration))
2ad52086
LF
8221
8222(define-public python-zope-proxy
8223 (package
8224 (name "python-zope-proxy")
8225 (version "4.1.6")
8226 (source
8227 (origin
8228 (method url-fetch)
8229 (uri (string-append "https://pypi.python.org/packages/source/z"
8230 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8231 (sha256
8232 (base32
8233 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8234 (build-system python-build-system)
66b3aadb
MB
8235 (arguments
8236 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8237 (propagated-inputs
8238 `(("python-zope-interface" ,python-zope-interface)))
8239 (home-page "http://pypi.python.org/pypi/zope.proxy")
8240 (synopsis "Generic, transparent proxies")
8241 (description "Zope.proxy provides generic, transparent proxies for Python.
8242Proxies are special objects which serve as mostly-transparent wrappers around
8243another object, intervening in the apparent behavior of the wrapped object
8244only when necessary to apply the policy (e.g., access checking, location
8245brokering, etc.) for which the proxy is responsible.")
3f641af0 8246 (license license:zpl2.1)))
2ad52086
LF
8247
8248(define-public python2-zope-proxy
8249 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8250
8251(define-public python-zope-location
8252 (package
8253 (name "python-zope-location")
8254 (version "4.0.3")
8255 (source
8256 (origin
8257 (method url-fetch)
8258 (uri (string-append "https://pypi.python.org/packages/source/z"
8259 "/zope.location/zope.location-" version ".tar.gz"))
8260 (sha256
8261 (base32
8262 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8263 (build-system python-build-system)
40bb8e07
MB
8264 (arguments
8265 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8266 (propagated-inputs
f404b5ea
LF
8267 `(("python-zope-proxy" ,python-zope-proxy)
8268 ("python-zope-schema" ,python-zope-schema)))
8269 (home-page "http://pypi.python.org/pypi/zope.location/")
8270 (synopsis "Zope location library")
8271 (description "Zope.location implements the concept of \"locations\" in
8272Zope3, which are are special objects that have a structural location.")
3f641af0 8273 (license license:zpl2.1)))
f404b5ea
LF
8274
8275(define-public python2-zope-location
8276 (package-with-python2 python-zope-location))
d4b77f36
LF
8277
8278(define-public python-zope-security
8279 (package
8280 (name "python-zope-security")
8281 (version "4.0.3")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (string-append "https://pypi.python.org/packages/source/z"
8286 "/zope.security/zope.security-" version ".tar.gz"))
8287 (sha256
8288 (base32
8289 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8290 (build-system python-build-system)
a74f9b12
MB
8291 (arguments
8292 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8293 (propagated-inputs
8294 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8295 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8296 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8297 (native-inputs
8298 `(("python-six" ,python-six)
8299 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8300 ("python-zope-configuration" ,python-zope-configuration)
8301 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8302 ("python-zope-testrunner" ,python-zope-testrunner)
8303 ("python-zope-testing" ,python-zope-testing)))
8304 (home-page "http://pypi.python.org/pypi/zope.security")
8305 (synopsis "Zope security framework")
8306 (description "Zope.security provides a generic mechanism to implement
8307security policies on Python objects.")
3f641af0 8308 (license license:zpl2.1)))
d4b77f36
LF
8309
8310(define-public python2-zope-security
04417662
EF
8311 (let ((zope-security (package-with-python2 python-zope-security)))
8312 (package (inherit zope-security)
8313 (propagated-inputs
8314 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8315 ,@(alist-delete
8316 "python-zope-testrunner"
8317 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8318
8319(define-public python-zope-component
8320 (package
8321 (name "python-zope-component")
35e1a0f1 8322 (version "4.3.0")
a6b61b27
LF
8323 (source
8324 (origin
8325 (method url-fetch)
35e1a0f1 8326 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8327 (sha256
8328 (base32
35e1a0f1 8329 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8330 (build-system python-build-system)
8331 (arguments
8332 ;; Skip tests due to circular dependency with python-zope-security.
8333 '(#:tests? #f))
8334 (native-inputs
8335 `(("python-zope-testing" ,python-zope-testing)))
8336 (propagated-inputs
8337 `(("python-zope-event" ,python-zope-event)
8338 ("python-zope-interface" ,python-zope-interface)
8339 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8340 ("python-zope-configuration" ,python-zope-configuration)))
8341 (home-page "https://github.com/zopefoundation/zope.component")
8342 (synopsis "Zope Component Architecture")
8343 (description "Zope.component represents the core of the Zope Component
8344Architecture. Together with the zope.interface package, it provides
8345facilities for defining, registering and looking up components.")
3f641af0 8346 (license license:zpl2.1)))
a6b61b27
LF
8347
8348(define-public python2-zope-component
8349 (package-with-python2 python-zope-component))
3859ac12 8350
1ae44b80 8351(define-public python-pythondialog
b5f218be 8352 (package
1ae44b80 8353 (name "python-pythondialog")
42c4b246 8354 (version "3.4.0")
b5f218be
LF
8355 (source
8356 (origin
8357 (method url-fetch)
1ae44b80 8358 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8359 (sha256
8360 (base32
1ae44b80 8361 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8362 (build-system python-build-system)
8363 (arguments
8364 `(#:phases
8365 (modify-phases %standard-phases
8366 (add-after 'unpack 'patch-path
8367 (lambda* (#:key inputs #:allow-other-keys)
8368 (let* ((dialog (assoc-ref inputs "dialog")))
8369 ;; Since this library really wants to grovel the search path, we
8370 ;; must hardcode dialog's store path into it.
8371 (substitute* "dialog.py"
8372 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8373 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8374 #t))))
b5f218be
LF
8375 #:tests? #f)) ; no test suite
8376 (propagated-inputs
8377 `(("dialog" ,dialog)))
8378 (home-page "http://pythondialog.sourceforge.net/")
8379 (synopsis "Python interface to the UNIX dialog utility")
8380 (description "A Python wrapper for the dialog utility. Its purpose is to
8381provide an easy to use, pythonic and comprehensive Python interface to dialog.
8382This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8383 (license license:lgpl2.1)
1ae44b80
LF
8384 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8385
8386(define-public python2-pythondialog
8387 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8388 (package
8389 (inherit base)
8390 (version (package-version python-pythondialog))
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "python2-pythondialog" version))
8394 (sha256
8395 (base32
8396 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8397
3859ac12
LF
8398(define-public python-pyrfc3339
8399 (package
8400 (name "python-pyrfc3339")
d9aa097b 8401 (version "1.0")
3859ac12
LF
8402 (source
8403 (origin
8404 (method url-fetch)
d9aa097b 8405 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8406 (sha256
8407 (base32
d9aa097b 8408 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8409 (build-system python-build-system)
8410 (propagated-inputs
8411 `(("python-pytz" ,python-pytz)))
8412 (native-inputs
f3b98f4f 8413 `(("python-nose" ,python-nose)))
3859ac12
LF
8414 (home-page "https://github.com/kurtraschke/pyRFC3339")
8415 (synopsis "Python timestamp library")
8416 (description "Python library for generating and parsing RFC 3339-compliant
8417timestamps.")
8418 (license license:expat)))
8419
8420(define-public python2-pyrfc3339
8421 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8422
8423(define-public python-werkzeug
8424 (package
8425 (name "python-werkzeug")
bbb99d6b 8426 (version "0.11.15")
5eea2005
LF
8427 (source
8428 (origin
8429 (method url-fetch)
4b47cbfa 8430 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8431 (sha256
8432 (base32
bbb99d6b 8433 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8434 (build-system python-build-system)
8435 (native-inputs
8436 `(("python-pytest" ,python-pytest)))
8437 (home-page "http://werkzeug.pocoo.org/")
8438 (synopsis "Utilities for WSGI applications")
8439 (description "One of the most advanced WSGI utility modules. It includes a
8440powerful debugger, full-featured request and response objects, HTTP utilities to
8441handle entity tags, cache control headers, HTTP dates, cookie handling, file
8442uploads, a powerful URL routing system and a bunch of community-contributed
8443addon modules.")
3f641af0 8444 (license license:x11)))
5eea2005
LF
8445
8446(define-public python2-werkzeug
8447 (package-with-python2 python-werkzeug))
99fffa8a
LF
8448
8449(define-public python-configobj
8450 (package
8451 (name "python-configobj")
8452 (version "5.0.6")
8453 (source (origin
8454 (method url-fetch)
8455 (uri (string-append
8456 "https://pypi.python.org/packages/source/c/configobj/"
8457 "configobj-" version ".tar.gz"))
8458 (sha256
8459 (base32
8460 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8461 ;; Patch setup.py so it looks for python-setuptools, which is
8462 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8463 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8464 (build-system python-build-system)
861f70c9 8465 (propagated-inputs
f3b98f4f 8466 `(("python-six" ,python-six)))
99fffa8a
LF
8467 (synopsis "Config file reading, writing and validation")
8468 (description "ConfigObj is a simple but powerful config file reader and
8469writer: an ini file round tripper. Its main feature is that it is very easy to
8470use, with a straightforward programmer’s interface and a simple syntax for
8471config files.")
8472 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8473 (license license:bsd-3)))
99fffa8a
LF
8474
8475(define-public python2-configobj
8476 (package-with-python2 python-configobj))
79e8a291
LF
8477
8478(define-public python-configargparse
8479 (package
8480 (name "python-configargparse")
8481 (version "0.10.0")
8482 (source (origin
8483 (method url-fetch)
8484 (uri (string-append
8485 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8486 "ConfigArgParse-" version ".tar.gz"))
8487 (sha256
8488 (base32
8489 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8490 (build-system python-build-system)
8491 (arguments
8492 ;; FIXME: Bug in test suite filed upstream:
8493 ;; https://github.com/bw2/ConfigArgParse/issues/32
8494 '(#:tests? #f))
8495 (synopsis "Replacement for argparse")
8496 (description "A drop-in replacement for argparse that allows options to also
8497be set via config files and/or environment variables.")
8498 (home-page "https://github.com/bw2/ConfigArgParse")
8499 (license license:expat)))
8500
8501(define-public python2-configargparse
8502 (package-with-python2 python-configargparse))
ab41f979
LF
8503
8504(define-public python-ndg-httpsclient
8505 (package
8506 (name "python-ndg-httpsclient")
ae476d01 8507 (version "0.4.2")
ab41f979
LF
8508 (source (origin
8509 (method url-fetch)
7be13d00 8510 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8511 (sha256
8512 (base32
ae476d01 8513 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8514 (build-system python-build-system)
a39cc016
LF
8515 (arguments
8516 '(;; The tests appear to require networking.
8517 #:tests? #f))
ab41f979
LF
8518 (propagated-inputs
8519 `(("python-pyopenssl" ,python-pyopenssl)))
8520 (synopsis "HTTPS support for Python's httplib and urllib2")
8521 (description "This is a HTTPS client implementation for httplib and urllib2
8522based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8523over the default provided with Python and importantly enables full verification
8524of the SSL peer.")
8525 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8526 (license license:bsd-3)))
ab41f979
LF
8527
8528;; python2-openssl requires special care, so package-with-python2 is
8529;; insufficient.
8530(define-public python2-ndg-httpsclient
8531 (package (inherit python-ndg-httpsclient)
8532 (name "python2-ndg-httpsclient")
8533 (arguments `(#:python ,python-2))
8534 (propagated-inputs
8535 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8536
8537(define-public python-contextlib2
8538 (package
8539 (name "python-contextlib2")
8540 (version "0.4.0")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "contextlib2" version))
8545 (sha256
8546 (base32
8547 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8548 (build-system python-build-system)
8549 (arguments
8550 `(#:phases
8551 (modify-phases %standard-phases
8552 (replace 'check
8553 (lambda _ (zero?
8554 (system*
b3546174 8555 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8556 (home-page "http://contextlib2.readthedocs.org/")
8557 (synopsis "Tools for decorators and context managers")
8558 (description "This module is primarily a backport of the Python
85593.2 contextlib to earlier Python versions. Like contextlib, it
8560provides utilities for common tasks involving decorators and context
8561managers. It also contains additional features that are not part of
8562the standard library.")
3f641af0 8563 (license license:psfl)))
03f964a5
CM
8564
8565(define-public python2-contextlib2
8566 (package-with-python2 python-contextlib2))
210bf497
DT
8567
8568(define-public python-texttable
8569 (package
8570 (name "python-texttable")
4c4d4df3 8571 (version "0.8.7")
210bf497
DT
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "texttable" version))
8576 (sha256
8577 (base32
4c4d4df3 8578 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8579 (build-system python-build-system)
8580 (arguments '(#:tests? #f)) ; no tests
8581 (home-page "https://github.com/foutaise/texttable/")
8582 (synopsis "Python module for creating simple ASCII tables")
8583 (description "Texttable is a Python module for creating simple ASCII
8584tables.")
3f641af0 8585 (license license:lgpl2.1+)))
210bf497
DT
8586
8587(define-public python2-texttable
8588 (package-with-python2 python-texttable))
67c52bb3
DT
8589
8590(define-public python-websocket-client
8591 (package
8592 (name "python-websocket-client")
6b810897 8593 (version "0.37.0")
67c52bb3
DT
8594 (source
8595 (origin
8596 (method url-fetch)
6b810897 8597 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8598 (sha256
8599 (base32
6b810897 8600 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8601 (build-system python-build-system)
a5333f7c
HG
8602 (propagated-inputs
8603 `(("python-six" ,python-six)))
67c52bb3
DT
8604 (home-page "https://github.com/liris/websocket-client")
8605 (synopsis "WebSocket client for Python")
8606 (description "The Websocket-client module provides the low level APIs for
8607WebSocket usage in Python programs.")
3f641af0 8608 (license license:lgpl2.1+)))
67c52bb3
DT
8609
8610(define-public python2-websocket-client
8611 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8612
8613(define-public python-atomicwrites
8614 (package
8615 (name "python-atomicwrites")
c56ad5e2 8616 (version "1.1.5")
5c6eea2a
LF
8617 (source (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "atomicwrites" version))
8620 (sha256
8621 (base32
c56ad5e2 8622 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8623 (build-system python-build-system)
8624 (synopsis "Atomic file writes in Python")
8625 (description "Library for atomic file writes using platform dependent tools
8f65585b 8626for atomic file system operations.")
5c6eea2a 8627 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8628 (license license:expat)))
9bb6d184
LF
8629
8630(define-public python2-atomicwrites
f210e944 8631 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8632
8633(define-public python-requests-toolbelt
8634 (package
8635 (name "python-requests-toolbelt")
c02af1c8 8636 (version "0.6.2")
561bb3cb
LF
8637 (source (origin
8638 (method url-fetch)
c02af1c8
LF
8639 (uri (string-append
8640 "https://pypi.python.org/packages/"
8641 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8642 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8643 (sha256
8644 (base32
c02af1c8 8645 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8646 (build-system python-build-system)
759aadd4
LF
8647 (native-inputs
8648 `(("python-betamax" ,python-betamax)
8649 ("python-mock" ,python-mock)
8650 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8651 (propagated-inputs
8652 `(("python-requests" ,python-requests)))
8653 (synopsis "Extensions to python-requests")
8654 (description "This is a toolbelt of useful classes and functions to be used
8655with python-requests.")
8656 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8657 (license license:asl2.0)))
d1deb90b
LF
8658
8659(define-public python-click-threading
8660 (package
8661 (name "python-click-threading")
3d2e0dbc 8662 (version "0.2.0")
d1deb90b
LF
8663 (source (origin
8664 (method url-fetch)
3d2e0dbc
LF
8665 (uri (string-append
8666 "https://pypi.python.org/packages/"
8667 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8668 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8669 (sha256
8670 (base32
3d2e0dbc 8671 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8672 (build-system python-build-system)
8673 (propagated-inputs
8674 `(("python-click" ,python-click)))
8675 (synopsis "Utilities for multithreading in Click")
8676 (description "This package provides utilities for multithreading in Click
8677applications.")
8678 (home-page "https://github.com/click-contrib/click-threading")
8679 (license license:expat)))
7b17cab9
LF
8680
8681(define-public python-click-log
8682 (package
8683 (name "python-click-log")
42734b9a 8684 (version "0.1.8")
7b17cab9
LF
8685 (source (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "click-log" version))
8688 (sha256
8689 (base32
42734b9a 8690 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8691 (build-system python-build-system)
8692 (propagated-inputs
8693 `(("python-click" ,python-click)))
8694 (synopsis "Logging for click applications")
8695 (description "This package provides a Python library for logging Click
8696applications.")
8697 (home-page "https://github.com/click-contrib/click-log")
8698 (license license:expat)))
7b3a4ee4
LF
8699
8700(define-public python-apipkg
8701 (package
8702 (name "python-apipkg")
8703 (version "1.4")
8704 (source (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "apipkg" version))
8707 (sha256
8708 (base32
8709 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8710 (build-system python-build-system)
328bb95d 8711 (native-inputs
7b3a4ee4
LF
8712 `(("python-pytest" ,python-pytest)))
8713 (synopsis "Namespace control and lazy-import mechanism")
8714 (description "With apipkg you can control the exported namespace of a Python
8715package and greatly reduce the number of imports for your users. It is a small
8716pure Python module that works on virtually all Python versions.")
8717 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8718 (license license:expat)))
e08739c3
CAW
8719
8720(define-public python2-apipkg
f210e944 8721 (package-with-python2 python-apipkg))
848964fe
LF
8722
8723(define-public python-execnet
8724 (package
8725 (name "python-execnet")
8726 (version "1.4.1")
8727 (source (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "execnet" version))
8730 (sha256
8731 (base32
8732 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8733 (build-system python-build-system)
ca0eee9d
LF
8734 (arguments
8735 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8736 ;; The two test failures are caused by the lack of an `ssh` executable.
8737 ;; The test suite can be run with pytest after the 'install' phase.
8738 #:tests? #f))
848964fe 8739 (native-inputs
ca0eee9d
LF
8740 `(("python-pytest" ,python-pytest)
8741 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8742 (propagated-inputs
848964fe
LF
8743 `(("python-apipkg" ,python-apipkg)))
8744 (synopsis "Rapid multi-Python deployment")
8745 (description "Execnet provides a share-nothing model with
8746channel-send/receive communication for distributing execution across many
8747Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 8748minimal and fast API targeting the following uses:
848964fe
LF
8749@enumerate
8750@item distribute tasks to (many) local or remote CPUs
8751@item write and deploy hybrid multi-process applications
8752@item write scripts to administer multiple environments
8753@end enumerate")
8754 (home-page "http://codespeak.net/execnet/")
f210e944 8755 (license license:expat)))
16c84f90
CAW
8756
8757(define-public python2-execnet
f210e944 8758 (package-with-python2 python-execnet))
6720dbb4 8759
d5bbf806 8760(define-public python-trollius-redis
8761 (package
8762 (name "python-trollius-redis")
8763 (version "0.1.4")
8764 (source
8765 (origin
8766 (method url-fetch)
8767 (uri (pypi-uri "trollius_redis" version))
8768 (sha256
8769 (base32
8770 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8771 (build-system python-build-system)
97b62eb0
MB
8772 ;; TODO: Tests require packaging 'hiredis'.
8773 (arguments '(#:tests? #f))
d5bbf806 8774 (home-page "https://github.com/benjolitz/trollius-redis")
8775 (synopsis "Port of asyncio-redis to trollius")
8776 (description "@code{trollius-redis} is a Redis client for Python
8777 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8778 Redis protocol.")
8779 (license license:bsd-2)))
8780
8781(define-public python2-trollius-redis
8782 (package-with-python2 python-trollius-redis))
8783
6720dbb4
LF
8784;;; The software provided by this package was integrated into pytest 2.8.
8785(define-public python-pytest-cache
8786 (package
8787 (name "python-pytest-cache")
8788 (version "1.0")
8789 (source (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "pytest-cache" version))
8792 (sha256
8793 (base32
8794 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8795 (build-system python-build-system)
f22efa01 8796 (propagated-inputs
630d938f
EF
8797 `(("python-apipkg" ,python-apipkg)
8798 ("python-execnet" ,python-execnet)
8799 ("python-py" ,python-py)
8800 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8801 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8802 (description "The pytest-cache plugin provides tools to rerun failures from
8803the last py.test invocation.")
8804 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8805 (license license:expat)))
0adc21c2
EF
8806
8807(define-public python2-pytest-cache
f210e944 8808 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8809
8810(define-public python-pytest-localserver
8811 (package
8812 (name "python-pytest-localserver")
29f20168 8813 (version "0.3.5")
d7e729fe
LF
8814 (source (origin
8815 (method url-fetch)
29f20168 8816 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8817 (sha256
8818 (base32
29f20168 8819 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8820 (build-system python-build-system)
8821 (arguments
8822 `(#:phases (modify-phases %standard-phases
8823 (replace 'check
8824 (lambda _
8825 (zero? (system* "py.test" "--genscript=runtests.py"))
8826 (zero? (system* "py.test")))))))
8827 (native-inputs
d7e729fe
LF
8828 `(("python-pytest" ,python-pytest)
8829 ("python-requests" ,python-requests)
9ba40f05 8830 ("python-six" ,python-six)))
f22efa01 8831 (propagated-inputs
9ba40f05 8832 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8833 (synopsis "Py.test plugin to test server connections locally")
8834 (description "Pytest-localserver is a plugin for the pytest testing
8835framework which enables you to test server connections locally.")
8836 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8837 (license license:expat)))
28cecbb7
LF
8838
8839(define-public python-wsgi-intercept
8840 (package
8841 (name "python-wsgi-intercept")
909fbd2b 8842 (version "1.2.2")
28cecbb7
LF
8843 (source (origin
8844 (method url-fetch)
909fbd2b
LF
8845 (uri (string-append
8846 "https://pypi.python.org/packages/"
8847 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8848 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8849 (sha256
8850 (base32
909fbd2b 8851 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8852 (build-system python-build-system)
b9fc496f
HG
8853 (propagated-inputs
8854 `(("python-six" ,python-six)))
28cecbb7 8855 (native-inputs
9d813ec1 8856 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8857 ("python-httplib2" ,python-httplib2)
8858 ("python-requests" ,python-requests)
8757f050 8859 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8860 (synopsis "Puts a WSGI application in place of a real URI for testing")
8861 (description "Wsgi_intercept installs a WSGI application in place of a real
8862URI for testing. Testing a WSGI application normally involves starting a
8863server at a local host and port, then pointing your test code to that address.
8864Instead, this library lets you intercept calls to any specific host/port
8865combination and redirect them into a WSGI application importable by your test
8866program. Thus, you can avoid spawning multiple processes or threads to test
8867your Web app.")
8868 (home-page "https://github.com/cdent/wsgi-intercept")
8869 (license license:expat)))
89b8a551
LF
8870
8871(define-public python-pytest-xprocess
8872 (package
8873 (name "python-pytest-xprocess")
8874 (version "0.9.1")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "pytest-xprocess" version))
8878 (sha256
8879 (base32
8880 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8881 (build-system python-build-system)
8882 (propagated-inputs
8883 `(("python-pytest" ,python-pytest)
8884 ("python-pytest-cache" ,python-pytest-cache)
8885 ("python-psutil" ,python-psutil)))
8886 (synopsis "Pytest plugin to manage external processes across test runs")
8887 (description "Pytest-xprocess is an experimental py.test plugin for managing
8888processes across test runs.")
8889 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8890 (license license:expat)))
5c299bf0
LF
8891
8892(define-public python-icalendar
8893 (package
8894 (name "python-icalendar")
68ab3e6c 8895 (version "3.11.4")
5c299bf0
LF
8896 (source (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "icalendar" version))
8899 (sha256
8900 (base32
68ab3e6c 8901 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
5c299bf0
LF
8902 (build-system python-build-system)
8903 (propagated-inputs
22d7360b 8904 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8905 ("python-pytz" ,python-pytz)))
8906 (synopsis "Python library for parsing iCalendar files")
8907 (description "The icalendar package is a parser/generator of iCalendar
8908files for use with Python.")
8909 (home-page "https://github.com/collective/icalendar")
3f641af0 8910 (license license:bsd-2)))
6bbbb53e
LF
8911
8912(define-public python-sphinxcontrib-newsfeed
8913 (package
8914 (name "python-sphinxcontrib-newsfeed")
8915 (version "0.1.4")
8916 (source (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8919 (sha256
8920 (base32
8921 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8922 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8923 (build-system python-build-system)
8924 (propagated-inputs
251ed7f2 8925 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8926 (synopsis "News Feed extension for Sphinx")
8927 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8928Blog, News or Announcements section to a Sphinx website.")
8929 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8930 (license license:bsd-2)))
2216e15c
SB
8931
8932(define-public python-args
8933 (package
8934 (name "python-args")
8935 (version "0.1.0")
8936 (source (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "args" version))
8939 (sha256
8940 (base32
8941 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8942 (build-system python-build-system)
2216e15c
SB
8943 (home-page "https://github.com/kennethreitz/args")
8944 (synopsis "Command-line argument parser")
8945 (description
8946 "This library provides a Python module to parse command-line arguments.")
3f641af0 8947 (license license:bsd-3)))
2216e15c
SB
8948
8949(define-public python2-args
8950 (package-with-python2 python-args))
c06a3de9
SB
8951
8952(define-public python-clint
8953 (package
8954 (name "python-clint")
8955 (version "0.5.1")
8956 (source (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "clint" version))
8959 (sha256
8960 (base32
8961 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8962 (build-system python-build-system)
6145b604
MB
8963 (arguments
8964 '(#:phases
8965 (modify-phases %standard-phases
8966 (replace 'check
8967 (lambda _
8968 (zero? (system* "py.test" "-v")))))))
8969 (native-inputs
8970 `(("python-pytest" ,python-pytest)))
f22efa01 8971 (propagated-inputs
f3b98f4f 8972 `(("python-args" ,python-args)))
c06a3de9
SB
8973 (home-page "https://github.com/kennethreitz/clint")
8974 (synopsis "Command-line interface tools")
8975 (description
8976 "Clint is a Python module filled with a set of tools for developing
8977command-line applications, including tools for colored and indented
8978output, progress bar display, and pipes.")
3f641af0 8979 (license license:isc)))
c06a3de9
SB
8980
8981(define-public python2-clint
8982 (package-with-python2 python-clint))
4ecdeef8
SB
8983
8984(define-public python-astor
8985 (package
8986 (name "python-astor")
8987 (version "0.5")
8988 (source (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "astor" version))
8991 (sha256
8992 (base32
8993 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8994 (build-system python-build-system)
4ecdeef8
SB
8995 (home-page "https://github.com/berkerpeksag/astor")
8996 (synopsis "Read and write Python ASTs")
8997 (description
8998 "Astor is designed to allow easy manipulation of Python source via the
8999Abstract Syntax Tree.")
3f641af0 9000 (license license:bsd-3)))
4ecdeef8
SB
9001
9002(define-public python2-astor
9003 (package-with-python2 python-astor))
e224b7d0
SB
9004
9005(define-public python-rply
9006 (package
9007 (name "python-rply")
9008 (version "0.7.4")
9009 (source (origin
9010 (method url-fetch)
9011 (uri (pypi-uri "rply" version))
9012 (sha256
9013 (base32
9014 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9015 (build-system python-build-system)
f22efa01 9016 (propagated-inputs
f3b98f4f 9017 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9018 (home-page "https://github.com/alex/rply")
9019 (synopsis "Parser generator for Python")
9020 (description
9021 "This package provides a pure Python based parser generator, that also
9022works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9023with a new public API, and RPython support.")
3f641af0 9024 (license license:bsd-3)))
e224b7d0
SB
9025
9026(define-public python2-rply
9027 (package-with-python2 python-rply))
c3e919d7
SB
9028
9029(define-public python-hy
9030 (package
9031 (name "python-hy")
9032 (version "0.11.1")
9033 (source (origin
9034 (method url-fetch)
9035 (uri (pypi-uri "hy" version))
9036 (sha256
9037 (base32
9038 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9039 (build-system python-build-system)
15c37077
MB
9040 (arguments
9041 '(#:phases
9042 (modify-phases %standard-phases
9043 (replace 'check
9044 (lambda _
9045 ;; Tests require write access to HOME.
9046 (setenv "HOME" "/tmp")
9047 (zero? (system* "nosetests")))))))
9048 (native-inputs
9049 `(("python-coverage" ,python-coverage)
9050 ("python-nose" ,python-nose)))
f22efa01 9051 (propagated-inputs
c3e919d7
SB
9052 `(("python-astor" ,python-astor)
9053 ("python-clint" ,python-clint)
f3b98f4f 9054 ("python-rply" ,python-rply)))
c3e919d7
SB
9055 (home-page "http://hylang.org/")
9056 (synopsis "Lisp frontend to Python")
9057 (description
9058 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9059its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9060Python at your fingertips, in Lisp form.")
9061 (license license:expat)))
9062
9063(define-public python2-hy
9064 (package-with-python2 python-hy))
7a5b944e 9065
81f7f297
EF
9066(define-public python-rauth
9067 (package
9068 (name "python-rauth")
06fe79f2 9069 (version "0.7.3")
81f7f297
EF
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "rauth" version))
9074 (sha256
9075 (base32
06fe79f2 9076 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9077 (build-system python-build-system)
9078 (arguments
9079 `(#:test-target "check"))
f22efa01 9080 (propagated-inputs
81f7f297
EF
9081 `(("python-requests" ,python-requests)))
9082 (home-page "https://github.com/litl/rauth")
9083 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9084 (description
9085 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9086provides service wrappers for convenient connection initialization and
9087authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9088 (license license:expat)
9089 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9090
9091(define-public python2-rauth
0848d8d3
EF
9092 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9093 (package
9094 (inherit base)
00e10c6e 9095 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9096 ,@(package-native-inputs base))))))
81f7f297 9097
1abe448d
EF
9098(define-public python2-functools32
9099 (package
9100 (name "python2-functools32")
9101 (version "3.2.3-2")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "functools32" version))
9106 (sha256
9107 (base32
9108 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9109 (build-system python-build-system)
9110 (arguments
9111 `(#:python ,python-2
9112 #:tests? #f)) ; no test target
1abe448d
EF
9113 (home-page "https://github.com/MiCHiLU/python-functools32")
9114 (synopsis
9115 "Backport of the functools module from Python 3.2.3")
9116 (description
9117 "This package is a backport of the @code{functools} module from Python
91183.2.3 for use with older versions of Python and PyPy.")
9119 (license license:expat)))
9120
550bd98b
MB
9121(define-public python2-subprocess32
9122 (package
9123 (name "python2-subprocess32")
9124 (version "3.2.7")
9125 (source (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "subprocess32" version))
9128 (sha256
9129 (base32
9130 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9131 (patches
9132 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9133 (build-system python-build-system)
9134 (arguments
9135 `(#:python ,python-2
9136 #:phases
9137 (modify-phases %standard-phases
9138 (add-after 'unpack 'patch-/bin/sh
9139 (lambda _
9140 (substitute* '("subprocess32.py"
9141 "test_subprocess32.py")
9142 (("/bin/sh") (which "sh")))
9143 #t))
9144 (delete 'check)
9145 (add-after 'install 'check
9146 (lambda* (#:key inputs outputs #:allow-other-keys)
9147 ;; For some reason this package fails to import
9148 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9149 ;; directory. Running tests after install is easier.
9150 (add-installed-pythonpath inputs outputs)
9151 (zero? (system* "python" "test_subprocess32.py")))))))
9152 (home-page "https://github.com/google/python-subprocess32")
9153 (synopsis "Backport of the subprocess module from Python 3.2")
9154 (description
9155 "This is a backport of the @code{subprocess} standard library module
9156from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9157new features. On POSIX systems it is guaranteed to be reliable when used
9158in threaded applications. It includes timeout support from Python 3.3 but
9159otherwise matches 3.2’s API.")
9160 (license license:psfl)))
9161
877889f3 9162(define-public python2-futures
7a5b944e 9163 (package
877889f3 9164 (name "python2-futures")
e17a1248 9165 (version "3.0.5")
7a5b944e
EF
9166 (source
9167 (origin
9168 (method url-fetch)
9169 (uri (pypi-uri "futures" version))
9170 (sha256
9171 (base32
e17a1248 9172 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9173 (build-system python-build-system)
877889f3 9174 (arguments `(#:python ,python-2))
7a5b944e
EF
9175 (home-page "https://github.com/agronholm/pythonfutures")
9176 (synopsis
9177 "Backport of the concurrent.futures package from Python 3.2")
9178 (description
9179 "The concurrent.futures module provides a high-level interface for
9180asynchronously executing callables. This package backports the
9181concurrent.futures package from Python 3.2")
3f641af0 9182 (license license:bsd-3)))
7a5b944e 9183
5cb2fe44
EF
9184(define-public python-promise
9185 (package
9186 (name "python-promise")
9187 (version "0.4.2")
9188 (source
9189 (origin
9190 (method url-fetch)
9191 (uri (pypi-uri "promise" version))
9192 (sha256
9193 (base32
9194 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9195 (build-system python-build-system)
9196 ;; Tests wants python-futures, which is a python2 only program, and
9197 ;; can't be found by python-promise at test time.
9198 (arguments `(#:tests? #f))
9199 (home-page "https://github.com/syrusakbary/promise")
9200 (synopsis "Promises/A+ implementation for Python")
9201 (description
9202 "Promises/A+ implementation for Python")
9203 (properties `((python2-variant . ,(delay python2-promise))))
9204 (license license:expat)))
9205
9206(define-public python2-promise
9207 (let ((promise (package-with-python2
9208 (strip-python2-variant python-promise))))
9209 (package (inherit promise)
9210 (arguments (substitute-keyword-arguments (package-arguments promise)
9211 ((#:tests? _) #t)))
9212 (native-inputs
9213 `(("python2-futures" ,python2-futures)
9214 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9215 ,@(package-native-inputs promise))))))
9216
c18f6368
EF
9217(define-public python-urllib3
9218 (package
9219 (name "python-urllib3")
6178274d 9220 (version "1.18.1")
c18f6368
EF
9221 (source
9222 (origin
9223 (method url-fetch)
9224 (uri (pypi-uri "urllib3" version))
9225 (sha256
9226 (base32
6178274d 9227 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9228 (build-system python-build-system)
9229 (arguments `(#:tests? #f))
9230 (native-inputs
f3b98f4f 9231 `(;; some packages for tests
c18f6368
EF
9232 ("python-nose" ,python-nose)
9233 ("python-mock" ,python-mock)
9234 ("python-tornado" ,python-tornado)))
9235 (propagated-inputs
8322749a 9236 `(;; extra packages for https security
c18f6368
EF
9237 ("python-certifi" ,python-certifi)
9238 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9239 ("python-pyasn1" ,python-pyasn1)
9240 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9241 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9242 (synopsis "HTTP library with thread-safe connection pooling")
9243 (description
9244 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9245can reuse the same socket connection for multiple requests, it can POST files,
9246supports url redirection and retries, and also gzip and deflate decoding.")
9247 (license license:expat)))
9248
9249(define-public python2-urllib3
9250 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9251
9252(define-public python-colorama
9253 (package
9254 (name "python-colorama")
f92576f9 9255 (version "0.3.7")
2b2f2fc1
DT
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "colorama" version))
9260 (sha256
9261 (base32
f92576f9 9262 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9263 (build-system python-build-system)
46e110cc 9264 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9265 (description "Colorama is a Python library for rendering colored terminal
9266text.")
9267 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9268 (license license:bsd-3)))
2b2f2fc1
DT
9269
9270(define-public python2-colorama
9271 (package-with-python2 python-colorama))
f5bcec6e
DT
9272
9273(define-public python-rsa
9274 (package
9275 (name "python-rsa")
ecd68c53 9276 (version "3.4.2")
f5bcec6e
DT
9277 (source
9278 (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "rsa" version))
9281 (sha256
9282 (base32
ecd68c53 9283 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9284 (build-system python-build-system)
f22efa01 9285 (propagated-inputs
f3b98f4f 9286 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9287 (synopsis "Pure-Python RSA implementation")
9288 (description "Python-RSA is a pure-Python RSA implementation. It supports
9289encryption and decryption, signing and verifying signatures, and key
9290generation according to PKCS#1 version 1.5. It can be used as a Python
9291library as well as on the command line.")
9292 (home-page "http://stuvel.eu/rsa")
3f641af0 9293 (license license:asl2.0)))
f5bcec6e
DT
9294
9295(define-public python2-rsa
9296 (package-with-python2 python-rsa))
c0aacfa5
DT
9297
9298(define-public python-pluggy
9299 (package
9300 (name "python-pluggy")
9301 (version "0.3.1")
9302 (source
9303 (origin
9304 (method url-fetch)
9305 (uri (pypi-uri "pluggy" version))
9306 (sha256
9307 (base32
9308 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9309 (build-system python-build-system)
c0aacfa5
DT
9310 (synopsis "Plugin and hook calling mechanism for Python")
9311 (description "Pluggy is an extraction of the plugin manager as used by
9312Pytest but stripped of Pytest specific details.")
9313 (home-page "https://pypi.python.org/pypi/pluggy")
9314 (license license:expat)))
9315
9316(define-public python2-pluggy
9317 (package-with-python2 python-pluggy))
a4af21ca
DT
9318
9319(define-public python-tox
9320 (package
9321 (name "python-tox")
9322 (version "2.3.1")
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "tox" version))
9327 (sha256
9328 (base32
9329 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9330 (build-system python-build-system)
9331 (arguments
7ba07edf
HG
9332 ;; FIXME: Tests require pytest-timeout, which itself requires
9333 ;; pytest>=2.8.0 for installation.
a4af21ca 9334 '(#:tests? #f))
482d9591
HG
9335 (propagated-inputs
9336 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9337 ("python-py" ,python-py)
482d9591 9338 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9339 (native-inputs
7ba07edf
HG
9340 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9341 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9342 (home-page "http://tox.testrun.org/")
9343 (synopsis "Virtualenv-based automation of test activities")
9344 (description "Tox is a generic virtualenv management and test command line
9345tool. It can be used to check that a package installs correctly with
9346different Python versions and interpreters, or run tests in each type of
9347supported environment, or act as a frontend to continuous integration
9348servers.")
9349 (license license:expat)))
9350
9351(define-public python2-tox
9352 (package-with-python2 python-tox))
ba9da248
DT
9353
9354(define-public python-jmespath
9355 (package
9356 (name "python-jmespath")
9357 (version "0.9.0")
9358 (source
9359 (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "jmespath" version))
9362 (sha256
9363 (base32
9364 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9365 (build-system python-build-system)
52a75a83
MB
9366 (native-inputs
9367 `(("python-nose" ,python-nose)))
ba9da248
DT
9368 (synopsis "JSON Matching Expressions")
9369 (description "JMESPath (pronounced “james path”) is a Python library that
9370allows one to declaratively specify how to extract elements from a JSON
9371document.")
9372 (home-page "https://github.com/jmespath/jmespath.py")
9373 (license license:expat)))
9374
9375(define-public python2-jmespath
9376 (package-with-python2 python-jmespath))
935fcd5c
DT
9377
9378(define-public python-botocore
9379 (package
9380 (name "python-botocore")
d93985fe 9381 (version "1.5.26")
935fcd5c
DT
9382 (source
9383 (origin
9384 (method url-fetch)
9385 (uri (pypi-uri "botocore" version))
9386 (sha256
9387 (base32
d93985fe 9388 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9389 (build-system python-build-system)
877fdac9
MB
9390 (arguments
9391 ;; FIXME: Many tests are failing.
9392 '(#:tests? #f))
482d9591 9393 (propagated-inputs
22d7360b 9394 `(("python-dateutil" ,python-dateutil)
935fcd5c 9395 ("python-docutils" ,python-docutils)
482d9591 9396 ("python-jmespath" ,python-jmespath)))
8fa6890b 9397 (native-inputs
482d9591 9398 `(("python-mock" ,python-mock)
935fcd5c 9399 ("python-nose" ,python-nose)
482d9591 9400 ("behave" ,behave)
935fcd5c 9401 ("python-tox" ,python-tox)
482d9591 9402 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9403 (home-page "https://github.com/boto/botocore")
9404 (synopsis "Low-level interface to AWS")
9405 (description "Botocore is a Python library that provides a low-level
9406interface to the Amazon Web Services (AWS) API.")
3f641af0 9407 (license license:asl2.0)))
935fcd5c
DT
9408
9409(define-public python2-botocore
9410 (package-with-python2 python-botocore))
f861b8b8
DT
9411
9412(define-public awscli
9413 (package
9414 (name "awscli")
192b887a 9415 (version "1.11.63")
f861b8b8
DT
9416 (source
9417 (origin
9418 (method url-fetch)
d5ccf71e 9419 (uri (pypi-uri name version))
f861b8b8
DT
9420 (sha256
9421 (base32
192b887a 9422 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9423 (build-system python-build-system)
482d9591 9424 (propagated-inputs
f861b8b8 9425 `(("python-colorama" ,python-colorama)
482d9591
HG
9426 ("python-botocore" ,python-botocore)
9427 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9428 ("python-docutils" ,python-docutils)
0cb9fba3 9429 ("python-pyyaml" ,python-pyyaml)
482d9591 9430 ("python-rsa" ,python-rsa)))
619bfd81
MB
9431 (arguments
9432 ;; FIXME: The 'pypi' release does not contain tests.
9433 '(#:tests? #f))
60a8be3a 9434 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9435 (synopsis "Command line client for AWS")
9436 (description "AWS CLI provides a unified command line interface to the
9437Amazon Web Services (AWS) API.")
3f641af0 9438 (license license:asl2.0)))
6a44697d
LF
9439
9440(define-public python-hypothesis
9441 (package
9442 (name "python-hypothesis")
bea6d94d 9443 (version "3.1.0")
6a44697d
LF
9444 (source (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "hypothesis" version))
9447 (sha256
9448 (base32
bea6d94d 9449 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9450 (build-system python-build-system)
bd100c71 9451 (native-inputs
6a44697d
LF
9452 `(("python-flake8" ,python-flake8)
9453 ("python-pytest" ,python-pytest)))
9454 (synopsis "Library for property based testing")
9455 (description "Hypothesis is a library for testing your Python code against a
9456much larger range of examples than you would ever want to write by hand. It’s
9457based on the Haskell library, Quickcheck, and is designed to integrate
9458seamlessly into your existing Python unit testing work flow.")
9459 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9460 (license license:mpl2.0)
6f068e08 9461 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9462
9463(define-public python2-hypothesis
6f068e08
EF
9464 (let ((hypothesis (package-with-python2
9465 (strip-python2-variant python-hypothesis))))
9466 (package (inherit hypothesis)
9467 (native-inputs
bd100c71
MB
9468 `(("python2-enum34" ,python2-enum34)
9469 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9470
9471(define-public python-pytest-subtesthack
9472 (package
9473 (name "python-pytest-subtesthack")
9474 (version "0.1.1")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "pytest-subtesthack" version))
9478 (sha256
9479 (base32
9480 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9481 (build-system python-build-system)
7517e73c
LF
9482 (propagated-inputs
9483 `(("python-pytest" ,python-pytest)))
9484 (synopsis "Set-up and tear-down fixtures for unit tests")
9485 (description "This plugin allows you to set up and tear down fixtures within
9486unit test functions that use @code{py.test}. This is useful for using
9487@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9488function multiple times, without setting up or tearing down fixture state as is
9489normally the case.")
9490 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9491 (license license:unlicense)))
7517e73c
LF
9492
9493(define-public python2-pytest-subtesthack
9494 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9495
7637de23 9496(define-public python-xdo
0bdc1671 9497 (package
7637de23 9498 (name "python-xdo")
e871c332 9499 (version "0.3")
0bdc1671
CAW
9500 (source (origin
9501 (method url-fetch)
9502 (uri (string-append
9503 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9504 "python-xdo_" version ".orig.tar.gz"))
9505 (sha256
9506 (base32
e871c332 9507 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9508 (build-system python-build-system)
9509 (arguments
736cfc10
SB
9510 '(#:phases
9511 (modify-phases %standard-phases
9512 (add-before 'install 'patch-libxdo-path
9513 ;; Hardcode the path of dynamically loaded libxdo library.
9514 (lambda* (#:key inputs #:allow-other-keys)
9515 (let ((libxdo (string-append
9516 (assoc-ref inputs "xdotool")
9517 "/lib/libxdo.so")))
9518 (substitute* "xdo/_xdo.py"
9519 (("find_library\\(\"xdo\"\\)")
9520 (simple-format #f "\"~a\"" libxdo)))
9521 #t))))
9522 #:tests? #f)) ; no tests provided
0b5e0863
SB
9523 (propagated-inputs
9524 `(("python-six" ,python-six)))
0bdc1671
CAW
9525 (inputs
9526 `(("xdotool" ,xdotool)
9527 ("libX11" ,libx11)))
9528 (home-page "https://tracker.debian.org/pkg/python-xdo")
9529 (synopsis "Python library for simulating X11 keyboard/mouse input")
9530 (description "Provides bindings to libxdo for manipulating X11 via simulated
9531input. (Note that this is mostly a legacy library; you may wish to look at
9532python-xdo for newer bindings.)")
3f641af0 9533 (license license:bsd-3)))
0bdc1671 9534
7637de23
LF
9535(define-public python2-xdo
9536 (package-with-python2 python-xdo))
9537
cb34dc6c
CAW
9538(define-public python-wtforms
9539 (package
9540 (name "python-wtforms")
9541 (version "2.1")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "WTForms" version ".zip"))
9546 (sha256
9547 (base32
9548 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9549 (build-system python-build-system)
13c4d874
EF
9550 (arguments
9551 '(#:phases
9552 (modify-phases %standard-phases
9553 (add-after 'unpack 'remove-django-test
9554 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9555 (lambda _
9556 (substitute*
9557 "tests/runtests.py"
9558 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9559 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9560 #t)))))
cb34dc6c
CAW
9561 (native-inputs
9562 `(("unzip" ,unzip)))
9563 (home-page "http://wtforms.simplecodes.com/")
9564 (synopsis
9565 "Form validation and rendering library for Python web development")
9566 (description
9567 "WTForms is a flexible forms validation and rendering library
9568for Python web development. It is very similar to the web form API
9569available in Django, but is a standalone package.")
f210e944 9570 (license license:bsd-3)))
cb34dc6c
CAW
9571
9572(define-public python2-wtforms
f210e944 9573 (package-with-python2 python-wtforms))
50aaec25
DT
9574
9575(define-public python-mako
9576 (package
9577 (name "python-mako")
3753f2e6 9578 (version "1.0.6")
50aaec25
DT
9579 (source
9580 (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "Mako" version))
9583 (sha256
9584 (base32
3753f2e6 9585 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9586 (build-system python-build-system)
482d9591
HG
9587 (propagated-inputs
9588 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9589 (native-inputs
482d9591 9590 `(("python-mock" ,python-mock)
e435af5c
MB
9591 ("python-nose" ,python-nose)
9592 ("python-pytest" ,python-pytest)))
50aaec25
DT
9593 (home-page "http://www.makotemplates.org/")
9594 (synopsis "Templating language for Python")
9595 (description "Mako is a templating language for Python that compiles
9596templates into Python modules.")
f210e944 9597 (license license:expat)))
50aaec25
DT
9598
9599(define-public python2-mako
f210e944 9600 (package-with-python2 python-mako))
ae00a41f
CAW
9601
9602(define-public python-waitress
9603 (package
9604 (name "python-waitress")
9605 (version "0.8.10")
9606 (source
9607 (origin
9608 (method url-fetch)
9609 (uri (pypi-uri "waitress" version))
9610 (sha256
9611 (base32
9612 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9613 (build-system python-build-system)
9614 (home-page "https://github.com/Pylons/waitress")
9615 (synopsis "Waitress WSGI server")
9616 (description "Waitress is meant to be a production-quality pure-Python WSGI
9617server with very acceptable performance.")
f210e944 9618 (license license:zpl2.1)))
ae00a41f
CAW
9619
9620(define-public python2-waitress
f210e944 9621 (package-with-python2 python-waitress))
778a284b
CAW
9622
9623(define-public python-wsgiproxy2
9624 (package
9625 (name "python-wsgiproxy2")
9626 (version "0.4.2")
9627 (source
9628 (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9631 (sha256
9632 (base32
9633 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9634 (build-system python-build-system)
e359b31a
LF
9635 (arguments
9636 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9637 ;; support Python 3:
9638 ;; https://github.com/benoitc/restkit/issues/140
9639 #:tests? #f))
778a284b
CAW
9640 (native-inputs
9641 `(("unzip" ,unzip)
9642 ("python-nose" ,python-nose)
9643 ("python-coverage" ,python-coverage)))
9644 (propagated-inputs
9645 `(("python-six" ,python-six)
9646 ("python-webob" ,python-webob)))
9647 (home-page
9648 "https://github.com/gawel/WSGIProxy2/")
9649 (synopsis "WSGI Proxy with various http client backends")
9650 (description "WSGI turns HTTP requests into WSGI function calls.
9651WSGIProxy turns WSGI function calls into HTTP requests.
9652It also includes code to sign requests and pass private data,
9653and to spawn subprocesses to handle requests.")
f210e944 9654 (license license:expat)))
778a284b
CAW
9655
9656(define-public python2-wsgiproxy2
f210e944 9657 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9658
9659(define-public python-pastedeploy
9660 (package
9661 (name "python-pastedeploy")
9662 (version "1.5.2")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "PasteDeploy" version))
9667 (sha256
9668 (base32
9669 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9670 (build-system python-build-system)
9671 (native-inputs
9672 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9673 (home-page "http://pythonpaste.org/deploy/")
9674 (synopsis
9675 "Load, configure, and compose WSGI applications and servers")
9676 (description
9677 "This tool provides code to load WSGI applications and servers from URIs;
9678these URIs can refer to Python Eggs for INI-style configuration files. Paste
9679Script provides commands to serve applications based on this configuration
9680file.")
9681 (license license:expat)))
9682
9683(define-public python2-pastedeploy
9684 (package-with-python2 python-pastedeploy))
1cf53652 9685
c4a7904c
CAW
9686(define-public python-paste
9687 (package
9688 (name "python-paste")
ba1731da 9689 (version "2.0.3")
c4a7904c
CAW
9690 (source
9691 (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "Paste" version))
9694 (sha256
9695 (base32
ba1731da 9696 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9697 (patches (search-patches "python-paste-remove-website-test.patch"
9698 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9699 (build-system python-build-system)
9700 (native-inputs
9701 `(("python-nose" ,python-nose)))
9702 (propagated-inputs
f3b98f4f 9703 `(("python-six" ,python-six)))
c4a7904c
CAW
9704 (home-page "http://pythonpaste.org")
9705 (synopsis
9706 "Python web development tools, focusing on WSGI")
9707 (description
9708 "Paste provides a variety of web development tools and middleware which
9709can be nested together to build web applications. Paste's design closely
9710follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9711 (license license:expat)))
c4a7904c
CAW
9712
9713(define-public python2-paste
ba1731da 9714 (package-with-python2 python-paste))
c4a7904c 9715
a8f20f63
CAW
9716(define-public python-pastescript
9717 (package
9718 (name "python-pastescript")
9719 (version "2.0.2")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "PasteScript" version))
9724 (sha256
9725 (base32
9726 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9727 (build-system python-build-system)
9728 (native-inputs
9729 `(("python-nose" ,python-nose)))
9730 (propagated-inputs
f3b98f4f 9731 `(("python-paste" ,python-paste)
a8f20f63
CAW
9732 ("python-pastedeploy" ,python-pastedeploy)))
9733 (home-page "http://pythonpaste.org/script/")
9734 (arguments
9735 '(;; Unfortunately, this requires the latest unittest2,
9736 ;; but that requires traceback2 which requires linecache2 which requires
9737 ;; unittest2. So we're skipping tests for now.
9738 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9739 ;; so in theory we could get around this situation somehow.)
9740 #:tests? #f))
9741 (synopsis
9742 "Pluggable command line tool for serving web applications and more")
9743 (description
9744 "PasteScript is a plugin-friendly command line tool which provides a
9745variety of features, from launching web applications to bootstrapping project
9746layouts.")
9747 (license license:expat)))
9748
9749(define-public python2-pastescript
9750 (package-with-python2 python-pastescript))
9751
1cf53652
CAW
9752(define-public python-pyquery
9753 (package
9754 (name "python-pyquery")
ab0c3429 9755 (version "1.2.17")
1cf53652
CAW
9756 (source
9757 (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "pyquery" version))
9760 (sha256
9761 (base32
ab0c3429 9762 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9763 (build-system python-build-system)
2ddbfa8c
LF
9764 (native-inputs
9765 `(("python-webob" ,python-webob)
9766 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9767 (propagated-inputs
9768 `(("python-lxml" ,python-lxml)
9769 ("python-cssselect" ,python-cssselect)))
9770 (home-page "https://github.com/gawel/pyquery")
9771 (synopsis "Make jQuery-like queries on xml documents")
9772 (description "pyquery allows you to make jQuery queries on xml documents.
9773The API is as much as possible the similar to jQuery. pyquery uses lxml for
9774fast xml and html manipulation.")
f210e944 9775 (license license:bsd-3)))
1cf53652
CAW
9776
9777(define-public python2-pyquery
f210e944 9778 (package-with-python2 python-pyquery))
aa6313d6
CAW
9779
9780(define-public python-webtest
9781 (package
9782 (name "python-webtest")
9783 (version "2.0.20")
9784 (source
9785 (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "WebTest" version))
9788 (sha256
9789 (base32
9790 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9791 (build-system python-build-system)
9792 (arguments
9793 `(;; Unfortunately we have to disable tests!
9794 ;; This release of WebTest is pinned to python-nose < 1.3,
9795 ;; but older versions of python-nose are plagued with the following
9796 ;; bug(s), which rears its ugly head during test execution:
9797 ;; https://github.com/nose-devs/nose/issues/759
9798 ;; https://github.com/nose-devs/nose/pull/811
9799 #:tests? #f))
9800 ;; Commented out code is no good, but in this case, once tests
9801 ;; are ready to be enabled again, we should put the following
9802 ;; in place:
9803 ;; (native-inputs
9804 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9805 ;; ; but see above comment
9806 ;; ("python-coverage" ,python-coverage)
9807 ;; ("python-mock" ,python-mock)
9808 ;; ("python-pastedeploy" ,python-pastedeploy)
9809 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9810 ;; ("python-pyquery" ,python-pyquery)))
9811 (propagated-inputs
9812 `(("python-waitress" ,python-waitress)
9813 ("python-webob" ,python-webob)
9814 ("python-six" ,python-six)
9815 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9816 (home-page "http://webtest.pythonpaste.org/")
9817 (synopsis "Helper to test WSGI applications")
9818 (description "Webtest allows you to test your Python web applications
9819without starting an HTTP server. It supports anything that supports the
9820minimum of WSGI.")
f210e944 9821 (license license:expat)))
aa6313d6
CAW
9822
9823(define-public python2-webtest
f210e944 9824 (package-with-python2 python-webtest))
4cb122cd
CAW
9825
9826(define-public python-anyjson
9827 (package
9828 (name "python-anyjson")
9829 (version "0.3.3")
9830 (source
9831 (origin
9832 (method url-fetch)
9833 (uri (pypi-uri "anyjson" version))
9834 (sha256
9835 (base32
9836 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9837 (build-system python-build-system)
9838 (arguments
9839 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9840 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9841 ;; whatever) so this transformation needs to be done before the tests
9842 ;; can be run. Maybe we could add a build step to transform beforehand
9843 ;; but it could be annoying/difficult.
9844 ;; We can enable tests for the Python 2 version, though, and do below.
9845 #:tests? #f))
9846 (home-page "http://bitbucket.org/runeh/anyjson/")
9847 (synopsis
9848 "Wraps best available JSON implementation in a common interface")
9849 (description
9850 "Anyjson loads whichever is the fastest JSON module installed
9851and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9852 (license license:bsd-3)
4cb122cd
CAW
9853 (properties `((python2-variant . ,(delay python2-anyjson))))))
9854
9855(define-public python2-anyjson
9856 (let ((anyjson (package-with-python2
9857 (strip-python2-variant python-anyjson))))
9858 (package
9859 (inherit anyjson)
9860 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9861 #:tests? #t
9862 ,@(package-arguments anyjson)))
00e10c6e 9863 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9864
9865(define-public python-amqp
9866 (package
9867 (name "python-amqp")
9868 (version "1.4.9")
9869 (source
9870 (origin
9871 (method url-fetch)
9872 (uri (pypi-uri "amqp" version))
9873 (sha256
9874 (base32
9875 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9876 (build-system python-build-system)
9877 (native-inputs
9878 `(("python-nose" ,python-nose)
9879 ("python-mock" ,python-mock)))
7bf837fd 9880 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
9881 (synopsis
9882 "Low-level AMQP client for Python (fork of amqplib)")
9883 (description
9884 "This is a fork of amqplib which was originally written by Barry Pederson.
9885It is maintained by the Celery project, and used by kombu as a pure python
9886alternative when librabbitmq is not available.")
3f641af0 9887 (license license:lgpl2.1+)
8dfceab7
CAW
9888 (properties `((python2-variant . ,(delay python2-amqp))))))
9889
9890(define-public python2-amqp
9891 (let ((amqp (package-with-python2
9892 (strip-python2-variant python-amqp))))
9893 (package
9894 (inherit amqp)
9895 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9896 ;; unmaintained. Weirdly, does not do this on the python 3
9897 ;; version?
9898 #:tests? #f
00e10c6e 9899 ,@(package-arguments amqp))))))
7d387305
CAW
9900
9901(define-public python-kombu
9902 (package
9903 (name "python-kombu")
0cb59822 9904 (version "3.0.37")
7d387305
CAW
9905 (source
9906 (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "kombu" version))
9909 (sha256
9910 (base32
0cb59822 9911 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9912 (build-system python-build-system)
9913 (native-inputs
9914 `(("python-mock" ,python-mock)
9915 ("python-nose" ,python-nose)))
9916 (propagated-inputs
9917 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9918 ("python-amqp" ,python-amqp)
9919 ("python-redis" ,python-redis)))
7d387305
CAW
9920 (home-page "http://kombu.readthedocs.org")
9921 (synopsis "Message passing library for Python")
9922 (description "The aim of Kombu is to make messaging in Python as easy as
9923possible by providing an idiomatic high-level interface for the AMQ protocol,
9924and also provide proven and tested solutions to common messaging problems.
9925AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9926message orientation, queuing, routing, reliability and security, for which the
9927RabbitMQ messaging server is the most popular implementation.")
3f641af0 9928 (license license:bsd-3)
7d387305
CAW
9929 (properties `((python2-variant . ,(delay python2-kombu))))))
9930
9931(define-public python2-kombu
9932 (let ((kombu (package-with-python2
9933 (strip-python2-variant python-kombu))))
9934 (package
9935 (inherit kombu)
752eb9e0
MB
9936 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9937 ;; It works fine on the python3 variant.
9938 #:tests? #f
9939 ,@(package-arguments kombu)))
328bb95d
HG
9940 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9941 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9942
9943(define-public python-billiard
9944 (package
9945 (name "python-billiard")
a6bb9e44 9946 (version "3.3.0.23")
b6f0b9fb
CAW
9947 (source
9948 (origin
9949 (method url-fetch)
9950 (uri (pypi-uri "billiard" version))
9951 (sha256
9952 (base32
a6bb9e44 9953 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9954 (build-system python-build-system)
9955 (native-inputs
9956 `(("python-nose" ,python-nose)))
7bf837fd 9957 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
9958 (synopsis
9959 "Python multiprocessing fork with improvements and bugfixes")
9960 (description
9961 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9962multiprocessing package itself is a renamed and updated version of R Oudkerk's
9963pyprocessing package. This standalone variant is intended to be compatible with
9964Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9965 (license license:bsd-3)
b6f0b9fb
CAW
9966 (properties `((python2-variant . ,(delay python2-billiard))))))
9967
9968(define-public python2-billiard
9969 (let ((billiard (package-with-python2
9970 (strip-python2-variant python-billiard))))
9971 (package
9972 (inherit billiard)
00e10c6e 9973 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9974 ("python2-mock" ,python2-mock)
9975 ,@(package-native-inputs billiard))))))
22df6419
CAW
9976
9977(define-public python-celery
9978 (package
9979 (name "python-celery")
9ebe87fe 9980 (version "3.1.24")
22df6419
CAW
9981 (source
9982 (origin
9983 (method url-fetch)
9984 (uri (pypi-uri "celery" version))
9985 (sha256
9986 (base32
9ebe87fe 9987 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9988 (build-system python-build-system)
9ebe87fe
LF
9989 (arguments
9990 `(#:phases
9991 (modify-phases %standard-phases
9992 ;; These tests break with Python 3.5:
9993 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9994 (replace 'check
9995 (lambda _
9996 (zero?
9997 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9998 (native-inputs
9999 `(("python-nose" ,python-nose)))
f22efa01 10000 (propagated-inputs
22df6419
CAW
10001 `(("python-pytz" ,python-pytz)
10002 ("python-billiard" ,python-billiard)
10003 ("python-kombu" ,python-kombu)))
10004 (home-page "http://celeryproject.org")
10005 (synopsis "Distributed Task Queue")
10006 (description "Celery is an asynchronous task queue/job queue based on
10007distributed message passing. It is focused on real-time operation, but
10008supports scheduling as well. The execution units, called tasks, are executed
10009concurrently on a single or more worker servers using multiprocessing,
10010Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10011synchronously (wait until ready).")
3f641af0 10012 (license license:bsd-3)
22df6419
CAW
10013 (properties `((python2-variant . ,(delay python2-celery))))))
10014
10015(define-public python2-celery
10016 (let ((celery (package-with-python2
10017 (strip-python2-variant python-celery))))
10018 (package
10019 (inherit celery)
00e10c6e 10020 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10021 ("python2-mock" ,python2-mock)
10022 ,@(package-native-inputs celery))))))
97e32948
CAW
10023
10024(define-public python-translitcodec
10025 (package
10026 (name "python-translitcodec")
10027 (version "0.4.0")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "translitcodec" version))
10032 (sha256
10033 (base32
10034 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10035 (build-system python-build-system)
10036 (arguments
10037 `(#:tests? #f)) ; no tests provided
10038 (home-page
10039 "https://github.com/claudep/translitcodec")
10040 (synopsis
10041 "Unicode to 8-bit charset transliteration codec")
10042 (description
10043 "This package contains codecs for transliterating ISO 10646 texts into
10044best-effort representations using smaller coded character sets (ASCII,
10045ISO 8859, etc.).")
f210e944 10046 (license license:expat)))
97e32948
CAW
10047
10048(define-public python2-translitcodec
f210e944 10049 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10050
10051(define-public python-editor
10052 (package
10053 (name "python-editor")
10054 (version "0.5")
10055 (source
10056 (origin
10057 (method url-fetch)
10058 (uri (pypi-uri "python-editor" version))
10059 (sha256
10060 (base32
10061 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10062 (build-system python-build-system)
10063 (home-page
10064 "https://github.com/fmoo/python-editor")
10065 (synopsis
10066 "Programmatically open an editor, capture the result")
10067 (description
10068 "python-editor is a library that provides the editor module for
10069programmatically interfacing with your system's $EDITOR.")
f210e944 10070 (license license:asl2.0)))
0c3b90d4
CAW
10071
10072(define-public python2-editor
f210e944 10073 (package-with-python2 python-editor))
3276517c
LF
10074
10075(define-public python-sphinxcontrib-programoutput
10076 (package
10077 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10078 (version "0.10")
3276517c
LF
10079 (source (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10082 (sha256
10083 (base32
b9ce9eca 10084 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10085 (build-system python-build-system)
e2cb140e
MB
10086 (arguments
10087 ;; FIXME: Many tests are failing and the upstream is gone.
10088 '(#:tests? #f))
3276517c 10089 (propagated-inputs
a0a09859 10090 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10091 (synopsis "Sphinx extension to include program output")
10092 (description "A Sphinx extension to literally insert the output of arbitrary
10093commands into documents, helping you to keep your command examples up to date.")
10094 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10095 (license license:bsd-2)))
3276517c
LF
10096
10097(define-public python2-sphinxcontrib-programoutput
f210e944 10098 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10099
10100(define-public python-sphinx-repoze-autointerface
10101 (package
10102 (name "python-sphinx-repoze-autointerface")
328ae341 10103 (version "0.8")
548d7165
LF
10104 (source (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10107 (sha256
10108 (base32
328ae341 10109 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10110 (build-system python-build-system)
5b3c3d4b 10111 (arguments '(#:tests? #f)) ; No tests.
548d7165 10112 (propagated-inputs
47c7dc4a 10113 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10114 ("python-zope-interface" ,python-zope-interface)))
10115 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10116 (description "This package defines an extension for the Sphinx documentation
10117system. The extension allows generation of API documentation by
10118introspection of @code{zope.interface} instances in code.")
10119 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10120 (license license:repoze)))
548d7165
LF
10121
10122(define-public python2-sphinx-repoze-autointerface
10123 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10124
10125(define-public python-psycopg2
10126 (package
10127 (name "python-psycopg2")
8e718963 10128 (version "2.6.2")
b31fbea5
DM
10129 (source
10130 (origin
10131 (method url-fetch)
10132 (uri (pypi-uri "psycopg2" version))
10133 (sha256
10134 (base32
8e718963 10135 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10136 (build-system python-build-system)
10137 (arguments
10138 ;; Tests would require a postgresql database "psycopg2_test"
10139 ;; and a running postgresql database management service.
10140 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10141 (inputs
10142 `(("postgresql" ,postgresql))) ; libpq
10143 (home-page "http://initd.org/psycopg/")
10144 (synopsis "Python PostgreSQL adapter")
10145 (description
10146 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10147 (license license:lgpl3+)))
b31fbea5
DM
10148
10149(define-public python2-psycopg2
f210e944 10150 (package-with-python2 python-psycopg2))
eed1a61f
LF
10151
10152(define-public python-vobject
10153 (package
10154 (name "python-vobject")
9bed9b15 10155 (version "0.9.2")
eed1a61f
LF
10156 (source (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "vobject" version))
10159 (sha256
10160 (base32
9bed9b15 10161 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 10162 (build-system python-build-system)
a9871b7b
LF
10163 (arguments
10164 '(;; The test suite relies on some non-portable Windows interfaces.
10165 #:tests? #f))
f22efa01 10166 (propagated-inputs
22d7360b 10167 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10168 ("python-pyicu" ,python-pyicu)))
10169 (synopsis "Parse and generate vCard and vCalendar files")
10170 (description "Vobject is intended to be a full featured Python package for
10171parsing and generating vCard and vCalendar files. Currently, iCalendar files
10172are supported and well tested. vCard 3.0 files are supported, and all data
10173should be imported, but only a few components are understood in a sophisticated
10174way.")
10175 (home-page "http://eventable.github.io/vobject/")
f210e944 10176 (license license:asl2.0)))
eed1a61f
LF
10177
10178(define-public python2-vobject
f210e944 10179 (package-with-python2 python-vobject))
cedac813
LF
10180
10181(define-public python-munkres
10182 (package
10183 (name "python-munkres")
38e81a2c 10184 (version "1.0.8")
cedac813
LF
10185 (source (origin
10186 (method url-fetch)
10187 (uri (pypi-uri "munkres" version))
10188 (sha256
10189 (base32
38e81a2c 10190 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10191 (build-system python-build-system)
10192 (arguments
10193 '(#:tests? #f)) ; no test suite
10194 (home-page "http://software.clapper.org/munkres/")
10195 (synopsis "Implementation of the Munkres algorithm")
10196 (description "The Munkres module provides an implementation of the Munkres
10197algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10198useful for solving the Assignment Problem.")
3f641af0 10199 (license license:bsd-3)))
cedac813
LF
10200
10201(define-public python2-munkres
10202 (package-with-python2 python-munkres))
f3b3d78f
LF
10203
10204(define-public python-flask
10205 (package
10206 (name "python-flask")
c6c80104 10207 (version "0.11.1")
f3b3d78f
LF
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "Flask" version))
10211 (sha256
10212 (base32
c6c80104 10213 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10214 (build-system python-build-system)
10215 (propagated-inputs
10216 `(("python-itsdangerous" ,python-itsdangerous)
10217 ("python-jinja2" ,python-jinja2)
8f35c030 10218 ("python-click" ,python-click)
f3b3d78f
LF
10219 ("python-werkzeug" ,python-werkzeug)))
10220 (home-page "https://github.com/mitsuhiko/flask/")
10221 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10222 (description "Flask is a micro web framework based on the Werkzeug toolkit
10223and Jinja2 template engine. It is called a micro framework because it does not
10224presume or force a developer to use a particular tool or library.")
f210e944 10225 (license license:bsd-3)))
f3b3d78f
LF
10226
10227(define-public python2-flask
f210e944 10228 (package-with-python2 python-flask))
603d665b 10229
a7ad802b 10230(define-public python-flask-wtf
10231 (package
10232 (name "python-flask-wtf")
10233 (version "0.13.1")
10234 (source
10235 (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "Flask-WTF" version))
10238 (sha256
10239 (base32
10240 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10241 (build-system python-build-system)
d296d300
MB
10242 (arguments
10243 '(#:phases
10244 (modify-phases %standard-phases
10245 (add-before 'check 'drop-failing-test
10246 (lambda _
10247 ;; FIXME: This file tries resolving an external server, which
10248 ;; fails. Try to patch out the offending section instead of
10249 ;; deleting the whole thing.
10250 (delete-file "tests/test_recaptcha.py")
10251 #t)))))
a7ad802b 10252 (propagated-inputs
10253 `(("python-flask-babel" ,python-flask-babel)
10254 ("python-babel" ,python-babel)
10255 ("python-wtforms" ,python-wtforms)))
10256 (native-inputs
10257 `(("python-nose" ,python-nose)))
10258 (home-page "https://github.com/lepture/flask-wtf")
10259 (synopsis "Simple integration of Flask and WTForms")
10260 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10261upload, and reCAPTCHA.")
10262 (license license:bsd-3)))
10263
10264(define-public python2-flask-wtf
10265 (package-with-python2 python-flask-wtf))
10266
a2c7d88e 10267(define-public python-flask-multistatic
10268 (package
10269 (name "python-flask-multistatic")
10270 (version "1.0")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "flask-multistatic" version))
10275 (sha256
10276 (base32
10277 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10278 (build-system python-build-system)
10279 (propagated-inputs
10280 `(("python-flask" ,python-flask)))
10281 (home-page "https://pagure.io/flask-multistatic")
10282 (synopsis "Flask plugin to allow overriding static files")
10283 (description "@code{flask-multistatic} is a flask plugin that adds support
10284for overriding static files.")
10285 (license license:gpl3+)))
10286
10287(define-public python2-flask-multistatic
10288 (package-with-python2 python-flask-multistatic))
10289
603d665b
LF
10290(define-public python-cookies
10291 (package
10292 (name "python-cookies")
10293 (version "2.2.1")
10294 (source (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "cookies" version))
10297 (sha256
10298 (base32
10299 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10300 (build-system python-build-system)
10301 (arguments
10302 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10303 #:tests? #f))
10304 (native-inputs
10305 `(("python-pytest" ,python2-pytest)))
10306 (synopsis "HTTP cookie parser and renderer")
10307 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10308Python.")
10309 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10310 (license license:expat)))
603d665b
LF
10311
10312(define-public python2-cookies
f210e944 10313 (package-with-python2 python-cookies))
0efde7d6
LF
10314
10315(define-public python-responses
10316 (package
10317 (name "python-responses")
10318 (version "0.5.1")
10319 (source (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "responses" version))
10322 (sha256
10323 (base32
10324 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10325 (build-system python-build-system)
10326 (arguments
10327 `(;; Test suite is not distributed:
10328 ;; https://github.com/getsentry/responses/issues/38
10329 #:tests? #f))
10330 (native-inputs
d8ea5f2f 10331 `(("python-mock" ,python-mock)))
0efde7d6
LF
10332 (propagated-inputs
10333 `(("python-requests" ,python-requests)
d8ea5f2f 10334 ("python-cookies" ,python-cookies)
0efde7d6
LF
10335 ("python-six" ,python-six)))
10336 (home-page "https://github.com/getsentry/responses")
10337 (synopsis "Utility for mocking out the `requests` Python library")
10338 (description "A utility library for mocking out the `requests` Python
10339library.")
f210e944 10340 (license license:asl2.0)))
0efde7d6
LF
10341
10342(define-public python2-responses
f210e944 10343 (package-with-python2 python-responses))
76b94885 10344
b7afd018
RW
10345(define-public python-whoosh
10346 (package
10347 (name "python-whoosh")
10348 (version "2.7.4")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "Whoosh" version))
10353 (sha256
10354 (base32
10355 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10356 (build-system python-build-system)
10357 (native-inputs
f3b98f4f 10358 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10359 (home-page "http://bitbucket.org/mchaput/whoosh")
10360 (synopsis "Full text indexing, search, and spell checking library")
10361 (description
10362 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10363checking library.")
10364 (license license:bsd-2)))
10365
10366(define-public python2-whoosh
10367 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10368 (package (inherit whoosh)
10369 (propagated-inputs
10370 `(("python2-backport-ssl-match-hostname"
10371 ,python2-backport-ssl-match-hostname)
10372 ,@(package-propagated-inputs whoosh))))))
10373
76b94885
LF
10374(define-public python-pathlib
10375 (package
10376 (name "python-pathlib")
10377 (version "1.0.1")
10378 (source (origin
10379 (method url-fetch)
10380 (uri (pypi-uri "pathlib" version))
10381 (sha256
10382 (base32
10383 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10384 (build-system python-build-system)
92a312dc
RW
10385 ;; The tests depend on the internal "test" module, which does not provide
10386 ;; a stable interface.
10387 (arguments `(#:tests? #f))
76b94885 10388 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10389 (synopsis "Object-oriented file system paths")
10390 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10391It offers the following advantages over using string objects:
10392
10393@enumerate
10394@item No more cumbersome use of os and os.path functions. Everything can
10395be done easily through operators, attribute accesses, and method calls.
10396@item Embodies the semantics of different path types. For example,
10397comparing Windows paths ignores casing.
10398@item Well-defined semantics, eliminating any inconsistencies or
10399ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10400@end enumerate
10401
10402Note: In Python 3.4, pathlib is now part of the standard library. For other
10403Python versions please consider python-pathlib2 instead, which tracks the
10404standard library module. This module (python-pathlib) isn't maintained
10405anymore.")
76b94885
LF
10406 (license license:expat)))
10407
10408(define-public python2-pathlib
10409 (package-with-python2 python-pathlib))
25a7db0a 10410
b7703c81
HG
10411(define-public python2-pathlib2
10412 (package
10413 (name "python2-pathlib2")
10414 (version "2.1.0")
10415 (source (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "pathlib2" version))
10418 (sha256
10419 (base32
10420 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10421 (build-system python-build-system)
49a531f5
HG
10422 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10423 ;; version is 3.4 which already includes this package as part of the
10424 ;; standard library.
b7703c81
HG
10425 (arguments
10426 `(#:python ,python-2))
10427 (native-inputs
f3b98f4f 10428 `(("python2-six" ,python2-six)))
b7703c81
HG
10429 (home-page "http://pypi.python.org/pypi/pathlib2/")
10430 (synopsis "Object-oriented file system paths - backport of standard
10431pathlib module")
10432 (description "The goal of pathlib2 is to provide a backport of standard
10433pathlib module which tracks the standard library module, so all the newest
10434features of the standard pathlib can be used also on older Python versions.
10435
10436Pathlib offers a set of classes to handle file system paths. It offers the
10437following advantages over using string objects:
10438
10439@enumerate
10440@item No more cumbersome use of os and os.path functions. Everything can
10441be done easily through operators, attribute accesses, and method calls.
10442@item Embodies the semantics of different path types. For example,
10443comparing Windows paths ignores casing.
10444@item Well-defined semantics, eliminating any inconsistencies or
10445ambiguities (forward vs. backward slashes, etc.).
10446@end enumerate")
10447 (license license:expat)))
10448
25a7db0a
LF
10449(define-public python-jellyfish
10450 (package
10451 (name "python-jellyfish")
8c4964dd 10452 (version "0.5.6")
25a7db0a
LF
10453 (source (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "jellyfish" version))
10456 (sha256
10457 (base32
8c4964dd 10458 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10459 (build-system python-build-system)
10460 (native-inputs
10461 `(("python-pytest" ,python-pytest)))
10462 (home-page "https://github.com/jamesturk/jellyfish")
10463 (synopsis "Approximate and phonetic matching of strings")
10464 (description "Jellyfish uses a variety of string comparison and phonetic
10465encoding algorithms to do fuzzy string matching.")
3f641af0 10466 (license license:bsd-2)
25a7db0a
LF
10467 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10468
10469(define-public python2-jellyfish
10470 (let ((jellyfish (package-with-python2
10471 (strip-python2-variant python-jellyfish))))
10472 (package (inherit jellyfish)
00e10c6e 10473 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10474 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10475
10476(define-public python2-unicodecsv
10477 (package
10478 (name "python2-unicodecsv")
10479 (version "0.14.1")
10480 (source (origin
10481 (method url-fetch)
10482 ;; The test suite is not included in the PyPi release.
10483 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10484 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10485 "archive/" version ".tar.gz"))
10486 (file-name (string-append name "-" version ".tar.gz"))
10487 (sha256
10488 (base32
10489 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10490 (build-system python-build-system)
10491 (arguments
10492 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10493 #:python ,python-2))
10494 (native-inputs
f3b98f4f 10495 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10496 (home-page "https://github.com/jdunck/python-unicodecsv")
10497 (synopsis "Unicode CSV module for Python 2")
10498 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10499module, adding support for Unicode strings.")
3f641af0 10500 (license license:bsd-2)))
064503aa
LF
10501
10502(define-public python-rarfile
10503 (package
10504 (name "python-rarfile")
67824447 10505 (version "2.8")
064503aa
LF
10506 (source (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "rarfile" version))
10509 (sha256
10510 (base32
67824447 10511 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10512 (build-system python-build-system)
10513 (arguments
10514 '(#:phases
10515 (modify-phases %standard-phases
10516 (replace 'check
10517 ;; Many tests fail, but the installation proceeds.
10518 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10519 (native-inputs
10520 `(("which" ,which))) ; required for tests
10521 (propagated-inputs
10522 `(("libarchive" ,libarchive)))
10523 (home-page "https://github.com/markokr/rarfile")
10524 (synopsis "RAR archive reader for Python")
10525 (description "This is Python module for RAR archive reading. The interface
10526is made as zipfile like as possible.")
3f641af0 10527 (license license:isc)))
064503aa
LF
10528
10529(define-public python2-rarfile
10530 (package-with-python2 python-rarfile))
daeeea71
CM
10531
10532(define-public python-magic
10533 (package
10534 (name "python-magic")
10535 (version "0.4.3")
10536 (source
10537 (origin
10538 (method url-fetch)
10539 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10540 version ".tar.gz"))
10541 (sha256
10542 (base32
10543 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10544 (file-name (string-append name "-" version "-checkout"))))
10545 (build-system python-build-system)
10546 (arguments
10547 ;; The tests are unreliable, so don't run them. The tests fail
10548 ;; under Python3 because they were written for Python2 and
10549 ;; contain import statements that do not work in Python3. One of
10550 ;; the tests fails under Python2 because its assertions are
10551 ;; overly stringent; it relies on comparing output strings which
10552 ;; are brittle and can change depending on the version of
10553 ;; libmagic being used and the system on which the test is
10554 ;; running. In my case, under GuixSD 0.10.0, only one test
10555 ;; failed, and it seems to have failed only because the version
10556 ;; of libmagic that is packaged in Guix outputs a slightly
10557 ;; different (but not wrong) string than the one that the test
10558 ;; expected.
10559 '(#:tests? #f
10560 #:phases (modify-phases %standard-phases
10561 ;; Replace a specific method call with a hard-coded
10562 ;; path to the necessary libmagic.so file in the
10563 ;; store. If we don't do this, then the method call
10564 ;; will fail to find the libmagic.so file, which in
10565 ;; turn will cause any application using
10566 ;; python-magic to fail.
10567 (add-before 'build 'hard-code-path-to-libmagic
10568 (lambda* (#:key inputs #:allow-other-keys)
10569 (let ((file (assoc-ref inputs "file")))
10570 (substitute* "magic.py"
10571 (("ctypes.util.find_library\\('magic'\\)")
10572 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10573 #t)))
10574 (add-before 'install 'disable-egg-compression
10575 (lambda _
10576 (let ((port (open-file "setup.cfg" "a")))
10577 (display "\n[easy_install]\nzip_ok = 0\n"
10578 port)
10579 (close-port port)
10580 #t))))))
daeeea71
CM
10581 (inputs
10582 ;; python-magic needs to be able to find libmagic.so.
10583 `(("file" ,file)))
10584 (home-page "https://github.com/ahupp/python-magic")
10585 (synopsis "File type identification using libmagic")
10586 (description
10587 "This module uses ctypes to access the libmagic file type
10588identification library. It makes use of the local magic database and
10589supports both textual and MIME-type output. Note that this module and
10590the python-file module both provide a \"magic.py\" file; these two
10591modules, which are different and were developed separately, both serve
10592the same purpose: to provide Python bindings for libmagic.")
10593 (license license:expat)))
10594
10595(define-public python2-magic
10596 (package-with-python2 python-magic))
12af303f
CM
10597
10598(define-public python2-s3cmd
10599 (package
10600 (name "python2-s3cmd")
10601 (version "1.6.1")
10602 (source
10603 (origin
10604 (method url-fetch)
de67e922 10605 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10606 "s3cmd-" version ".tar.gz"))
10607 (sha256
10608 (base32
10609 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10610 (build-system python-build-system)
10611 (arguments
10612 ;; s3cmd is written for python2 only and contains no tests.
10613 `(#:python ,python-2
10614 #:tests? #f))
f22efa01 10615 (propagated-inputs
12af303f
CM
10616 `(("python2-dateutil" ,python2-dateutil)
10617 ;; The python-file package also provides a magic.py module.
10618 ;; This is an unfortunate state of affairs; however, s3cmd
10619 ;; fails to install if it cannot find specifically the
10620 ;; python-magic package. Thus we include it, instead of using
10621 ;; python-file. Ironically, s3cmd sometimes works better
10622 ;; without libmagic bindings at all:
10623 ;; https://github.com/s3tools/s3cmd/issues/198
10624 ("python2-magic" ,python2-magic)))
10625 (home-page "http://s3tools.org/s3cmd")
10626 (synopsis "Command line tool for S3-compatible storage services")
10627 (description
10628 "S3cmd is a command line tool for uploading, retrieving and managing data
10629in storage services that are compatible with the Amazon Simple Storage
10630Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10631GnuPG encryption, and more. It also supports management of Amazon's
10632CloudFront content delivery network.")
3f641af0 10633 (license license:gpl2+)))
4323a5f0
AE
10634
10635(define-public python-pkgconfig
10636 (package
10637 (name "python-pkgconfig")
10638 (version "1.1.0")
10639 (source
10640 (origin
10641 (method url-fetch)
10642 (uri (pypi-uri "pkgconfig" version))
10643 (sha256
10644 (base32
10645 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10646 (build-system python-build-system)
10647 (native-inputs
f3b98f4f 10648 `(("python-nose" ,python-nose)))
4323a5f0
AE
10649 (inputs
10650 `(("pkg-config" ,pkg-config)))
10651 (arguments
10652 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10653 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10654 #:tests? #f
4323a5f0
AE
10655 ;; Hard-code the path to pkg-config.
10656 #:phases
10657 (modify-phases %standard-phases
10658 (add-before
10659 'build 'patch
10660 (lambda _
10661 (substitute* "pkgconfig/pkgconfig.py"
10662 (("cmd = 'pkg-config")
10663 (string-append "cmd = '" (which "pkg-config"))))
10664 #t)))))
7bf837fd 10665 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
10666 (synopsis "Python interface for pkg-config")
10667 (description "This module provides a Python interface to pkg-config. It
10668can be used to find all pkg-config packages, check if a package exists,
10669check if a package meets certain version requirements, query CFLAGS and
10670LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10671 (license license:expat)))
4323a5f0
AE
10672
10673(define-public python2-pkgconfig
10674 (package-with-python2 python-pkgconfig))
10675
2e697322
BW
10676(define-public python-bz2file
10677 (package
10678 (name "python-bz2file")
10679 (version "0.98")
10680 (source
10681 (origin
10682 (method url-fetch)
10683 (uri (pypi-uri "bz2file" version))
10684 (sha256
10685 (base32
10686 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10687 (build-system python-build-system)
10688 (arguments
124df723 10689 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10690 (home-page "https://github.com/nvawda/bz2file")
10691 (synopsis "Read and write bzip2-compressed files")
10692 (description
10693 "Bz2file is a Python library for reading and writing bzip2-compressed
10694files. It contains a drop-in replacement for the I/O interface in the
10695standard library's @code{bz2} module, including features from the latest
10696development version of CPython that are not available in older releases.")
3f641af0 10697 (license license:asl2.0)
2e697322
BW
10698 (properties `((python2-variant . ,(delay python2-bz2file))))))
10699
10700(define-public python2-bz2file
10701 (let ((base (package-with-python2
10702 (strip-python2-variant python-bz2file))))
10703 (package
10704 (inherit base)
124df723 10705 (arguments
752bb447
BW
10706 `(#:python ,python-2
10707 #:phases
124df723
BW
10708 (modify-phases %standard-phases
10709 ;; 'python setup.py test' does not work as of 0.98.
10710 ;; There is only the one test file, so we run it directly.
10711 (replace 'check
10712 (lambda _ (zero? (system* "python"
10713 "test_bz2file.py"))))))))))
2e697322 10714
da4ac1aa
BW
10715(define-public python-future
10716 (package
10717 (name "python-future")
10718 (version "0.15.2")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "future" version))
10723 (sha256
10724 (base32
10725 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10726 (build-system python-build-system)
10727 ;; Many tests connect to the network or are otherwise flawed.
10728 ;; https://github.com/PythonCharmers/python-future/issues/210
10729 (arguments
10730 `(#:tests? #f))
10731 (home-page "http://python-future.org")
10732 (synopsis "Single-source support for Python 3 and 2")
10733 (description
10734 "@code{python-future} is the missing compatibility layer between Python 2 and
10735Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10736to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10737 (license license:expat)))
da4ac1aa
BW
10738
10739(define-public python2-future
f210e944 10740 (package-with-python2 python-future))
da4ac1aa 10741
8e451885
AE
10742(define-public python-cysignals
10743 (package
10744 (name "python-cysignals")
10745 (version "1.1.0")
10746 (source
10747 (origin
10748 (method url-fetch)
10749 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10750 (sha256
10751 (base32
10752 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10753 (build-system python-build-system)
10754 (native-inputs
10755 `(("python-cython" ,python-cython)
8e451885
AE
10756 ("python-sphinx" ,python-sphinx)))
10757 (inputs
10758 `(("pari-gp" ,pari-gp)))
10759 (arguments
10760 `(#:modules ((guix build python-build-system)
10761 ((guix build gnu-build-system) #:prefix gnu:)
10762 (guix build utils))
10763 ;; FIXME: Tests are executed after installation and currently fail
10764 ;; when not installing into standard locations; the author is working
10765 ;; on a fix.
10766 #:tests? #f
10767 #:phases
10768 (modify-phases %standard-phases
10769 (add-before
10770 'build 'configure
10771 (assoc-ref gnu:%standard-phases 'configure)))))
10772 (home-page
10773 "https://github.com/sagemath/cysignals")
10774 (synopsis
10775 "Handling of interrupts and signals for Cython")
10776 (description
10777 "The cysignals package provides mechanisms to handle interrupts (and
10778other signals and errors) in Cython code, using two related approaches,
10779for mixed Cython/Python code or external C libraries and pure Cython code,
10780respectively.")
3f641af0 10781 (license license:lgpl3+)))
8e451885
AE
10782
10783(define-public python2-cysignals
10784 (package-with-python2 python-cysignals))
10785
63bcec71
DM
10786(define-public python2-shedskin
10787 (package
10788 (name "python2-shedskin")
10789 (version "0.9.4")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (string-append "https://github.com/shedskin/shedskin/"
10794 "releases/download/v" version
10795 "/shedskin-" version ".tgz"))
10796 (sha256
10797 (base32
10798 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10799 (build-system python-build-system)
10800 (arguments
10801 `(#:python ,python-2
10802 #:phases (modify-phases %standard-phases
10803 (add-after 'unpack 'fix-resulting-include-libs
10804 (lambda* (#:key inputs #:allow-other-keys)
10805 (let ((libgc (assoc-ref inputs "libgc"))
10806 (pcre (assoc-ref inputs "pcre")))
10807 (substitute* "shedskin/makefile.py"
10808 (("variable == 'CCFLAGS':[ ]*")
10809 (string-append "variable == 'CCFLAGS':\n"
10810 " line += ' -I " pcre "/include"
10811 " -I " libgc "/include'"))
10812 (("variable == 'LFLAGS':[ ]*")
10813 (string-append "variable == 'LFLAGS':\n"
10814 " line += ' -L" pcre "/lib"
10815 " -L " libgc "/lib'")))
10816 #t))))))
63bcec71
DM
10817 (inputs `(("pcre" ,pcre)
10818 ("libgc" ,libgc)))
10819 (home-page "https://shedskin.github.io/")
10820 (synopsis "Experimental Python-2 to C++ Compiler")
10821 (description (string-append "This is an experimental compiler for a subset of
10822Python. It generates C++ code and a Makefile."))
3f641af0 10823 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10824
10825(define-public python2-rope
10826 (package
10827 (name "python2-rope")
10828 (version "0.10.3")
10829 (source
10830 (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "rope" version))
10833 (sha256
10834 (base32
10835 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10836 (arguments
10837 ;; Rope is currently python-2 only.
10838 ;; https://github.com/python-rope/rope/issues/57
10839 `(#:python ,python-2))
10840 (build-system python-build-system)
10841 (native-inputs
f3b98f4f 10842 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10843 (home-page "https://github.com/python-rope/rope")
10844 (synopsis "Refactoring library for Python")
10845 (description "Rope is a refactoring library for Python. It facilitates
10846the renaming, moving and extracting of attributes, functions, modules, fields
10847and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 10848to occurrences in strings and comments.")
3f641af0 10849 (license license:gpl2)))
6ba8ca17
10850
10851(define-public python-py3status
10852 (package
10853 (name "python-py3status")
d2262d70 10854 (version "3.1")
6ba8ca17
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "py3status" version))
10859 (sha256
10860 (base32
d2262d70 10861 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10862 (build-system python-build-system)
8653c1d5
MB
10863 (arguments
10864 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10865 (home-page "https://github.com/ultrabug/py3status")
10866 (synopsis "Extensible i3status wrapper written in Python")
10867 (description "py3status is an i3status wrapper which extends i3status
10868functionality in a modular way, allowing you to extend your panel with your
10869own code, responding to click events and updating clock every second.")
3f641af0 10870 (license license:bsd-3)))
b8fdbca3
HG
10871
10872(define-public python-tblib
10873 (package
10874 (name "python-tblib")
10875 (version "1.3.0")
10876 (source (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "tblib" version))
10879 (sha256 (base32
10880 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10881 (build-system python-build-system)
10882 (arguments
10883 `(#:phases
10884 (modify-phases %standard-phases
10885 (replace 'check
10886 (lambda _
10887 ;; Upstream runs tests after installation and the package itself
10888 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10889 ;; found.
10890 (setenv "PYTHONPATH"
10891 (string-append (getcwd) "/build/lib:"
10892 (getenv "PYTHONPATH")))
10893 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10894 (native-inputs
10895 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10896 ("python-six" ,python-six)))
10897 (home-page "https://github.com/ionelmc/python-tblib")
10898 (synopsis "Traceback serialization library")
10899 (description
10900 "Traceback serialization allows you to:
10901
10902@enumerate
10903@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10904different processes. This allows better error handling when running code over
10905multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10906
10907@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10908@end enumerate\n")
3f641af0 10909 (license license:bsd-3)))
b8fdbca3
HG
10910
10911(define-public python2-tblib
10912 (package-with-python2 python-tblib))
1a024de4
HG
10913
10914(define-public python-sqlparse
10915 (package
10916 (name "python-sqlparse")
10917 (version "0.1.19")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "sqlparse" version))
10921 (sha256
10922 (base32
10923 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10924 (build-system python-build-system)
10925 (arguments
10926 `(#:phases
10927 (modify-phases %standard-phases
10928 (replace 'check
10929 (lambda* _
10930 ;; setup.py-integrated 2to3 only affects the build files, but
10931 ;; py.test is using the source files. So we need to convert them
10932 ;; manually.
10933 (when (zero? (system* "python3"))
10934 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10935 (zero? (system* "py.test")))))))
10936 (native-inputs
f3b98f4f 10937 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10938 (home-page "https://github.com/andialbrecht/sqlparse")
10939 (synopsis "Non-validating SQL parser")
10940 (description "Sqlparse is a non-validating SQL parser for Python. It
10941provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10942 (license license:bsd-3)))
1a024de4
HG
10943
10944(define-public python2-sqlparse
10945 (package-with-python2 python-sqlparse))
68b9d242
SB
10946
10947(define-public python-greenlet
10948 (package
10949 (name "python-greenlet")
1f89fb16 10950 (version "0.4.11")
68b9d242
SB
10951 (source (origin
10952 (method url-fetch)
10953 (uri (pypi-uri "greenlet" version))
10954 (sha256
10955 (base32
1f89fb16 10956 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10957 (build-system python-build-system)
68b9d242
SB
10958 (home-page "https://greenlet.readthedocs.io/")
10959 (synopsis "Lightweight in-process concurrent programming")
10960 (description
10961 "Greenlet package is a spin-off of Stackless, a version of CPython
10962that supports micro-threads called \"tasklets\". Tasklets run
10963pseudo-concurrently (typically in a single or a few OS-level threads) and
10964are synchronized with data exchanges on \"channels\".")
3f641af0 10965 (license (list license:psfl license:expat))))
68b9d242
SB
10966
10967(define-public python2-greenlet
10968 (package-with-python2 python-greenlet))
d79a343b
SB
10969
10970(define-public python-gevent
10971 (package
10972 (name "python-gevent")
10973 (version "1.1.1")
10974 (source (origin
10975 (method url-fetch)
10976 (uri (pypi-uri "gevent" version))
10977 (sha256
10978 (base32
10979 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10980 (modules '((guix build utils)))
10981 (snippet
10982 '(begin
10983 ;; unbunding libev and c-ares
10984 (for-each delete-file-recursively '("libev" "c-ares"))
10985 ;; fixing testsuite
10986 (call-with-output-file "greentest/__init__.py" noop)
10987 (substitute* "greentest/testrunner.py"
10988 (("import util") "from . import util")
10989 (("from util import log") "from .util import log"))))))
10990 (build-system python-build-system)
10991 (propagated-inputs
10992 `(("python-greenlet" ,python-greenlet)))
10993 (native-inputs
f3b98f4f 10994 `(("python-six" ,python-six)))
d79a343b
SB
10995 (inputs
10996 `(("c-ares" ,c-ares)
10997 ("libev" ,libev)))
10998 (home-page "http://www.gevent.org/")
10999 (synopsis "Coroutine-based network library")
11000 (description
11001 "gevent is a coroutine-based Python networking library that uses greenlet
11002to provide a high-level synchronous API on top of the libev event loop.")
11003 (license license:expat)))
11004
11005(define-public python2-gevent
11006 (package-with-python2 python-gevent))
da3aeeb6 11007
c9a18125
MB
11008(define-public python-geventhttpclient
11009 (package
11010 (name "python-geventhttpclient")
11011 (version "1.3.1")
11012 (source (origin
11013 (method url-fetch)
11014 (uri (pypi-uri "geventhttpclient" version))
11015 (sha256
11016 (base32
11017 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11018 (modules '((guix build utils)))
11019 (snippet
11020 '(begin
11021 ;; Delete pre-compiled files.
11022 (for-each delete-file (find-files "src/geventhttpclient"
11023 ".*\\.pyc"))
11024 #t))))
11025 (build-system python-build-system)
11026 (arguments
11027 '(#:phases
11028 (modify-phases %standard-phases
11029 (add-after 'unpack 'delete-network-tests
11030 (lambda _
11031 (delete-file "src/geventhttpclient/tests/test_client.py")
11032 #t))
11033 (delete 'check)
11034 (add-after 'install 'check
11035 (lambda* (#:key inputs outputs #:allow-other-keys)
11036 (add-installed-pythonpath inputs outputs)
11037 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11038 (native-inputs
11039 `(("python-pytest" ,python-pytest)))
11040 (propagated-inputs
11041 `(("python-certifi" ,python-certifi)
11042 ("python-gevent" ,python-gevent)
11043 ("python-six" ,python-six)))
11044 (home-page "https://github.com/gwik/geventhttpclient")
11045 (synopsis "HTTP client library for gevent")
11046 (description "@code{python-geventhttpclient} is a high performance,
11047concurrent HTTP client library for python using @code{gevent}.")
11048 (license license:expat)))
11049
11050(define-public python2-geventhttpclient
11051 (package-with-python2 python-geventhttpclient))
11052
b585e361
DM
11053(define-public python-fastimport
11054 (package
11055 (name "python-fastimport")
11056 (version "0.9.6")
11057 (source
11058 (origin
11059 (method url-fetch)
11060 (uri (pypi-uri "fastimport" version))
11061 (sha256
11062 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11063 (build-system python-build-system)
11064 (home-page "https://github.com/jelmer/python-fastimport")
11065 (synopsis "VCS fastimport parser and generator in Python")
11066 (description "This package provides a parser for and generator of the Git
11067@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11068format.")
11069 (license license:gpl2+)))
11070
11071(define-public python2-fastimport
11072 (package-with-python2 python-fastimport))
11073
da3aeeb6
SB
11074(define-public python-twisted
11075 (package
11076 (name "python-twisted")
11077 (version "16.2.0")
11078 (source (origin
11079 (method url-fetch)
8ea8e8d3 11080 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11081 (sha256
11082 (base32
11083 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11084 (build-system python-build-system)
a960e73f
MB
11085 (arguments
11086 '(#:tests? #f)) ; FIXME: Some tests are failing.
11087 ;; #:phases
11088 ;; (modify-phases %standard-phases
11089 ;; (replace 'check
11090 ;; (lambda _
11091 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11092 (propagated-inputs
11093 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11094 (home-page "https://twistedmatrix.com/")
11095 (synopsis "Asynchronous networking framework written in Python")
11096 (description
11097 "Twisted is an extensible framework for Python programming, with special
11098focus on event-based network programming and multiprotocol integration.")
11099 (license license:expat)))
11100
11101(define-public python2-twisted
11102 (package-with-python2 python-twisted))
d0b6fed6 11103
4d3fa5a4
EF
11104(define-public python-pika
11105 (package
11106 (name "python-pika")
11107 (version "0.10.0")
11108 (source
11109 (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "pika" version))
11112 (sha256
11113 (base32
11114 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11115 (build-system python-build-system)
11116 (native-inputs
269d9172
LF
11117 `(("python-pyev" ,python-pyev)
11118 ("python-tornado" ,python-tornado)
11119 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11120 (home-page "https://pika.readthedocs.org")
11121 (synopsis "Pure Python AMQP Client Library")
11122 (description
11123 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11124Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11125network support library.")
11126 (license license:bsd-3)))
11127
11128(define-public python2-pika
11129 (package-with-python2 python-pika))
11130
d0b6fed6
DM
11131(define-public python-ply
11132 (package
11133 (name "python-ply")
234ade2d 11134 (version "3.9")
d0b6fed6
DM
11135 (source
11136 (origin
11137 (method url-fetch)
234ade2d 11138 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11139 (sha256
11140 (base32
234ade2d 11141 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11142 (build-system python-build-system)
11143 (home-page "http://www.dabeaz.com/ply/")
11144 (synopsis "Python Lex & Yacc")
11145 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11146It uses LR parsing and does extensive error checking.")
f210e944 11147 (license license:bsd-3)))
d0b6fed6
DM
11148
11149(define-public python2-ply
f210e944 11150 (package-with-python2 python-ply))
d951bd54
SB
11151
11152(define-public python-tabulate
11153 (package
11154 (name "python-tabulate")
e6ace98d 11155 (version "0.7.7")
d951bd54
SB
11156 (source (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "tabulate" version))
11159 (sha256
11160 (base32
fe2ba3a8 11161 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11162 (build-system python-build-system)
fe2ba3a8
MB
11163 (arguments
11164 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11165 ;; and the latest release is not tagged in the upstream repository.
11166 '(#:tests? #f))
d951bd54
SB
11167 (home-page "https://bitbucket.org/astanin/python-tabulate")
11168 (synopsis "Pretty-print tabular data")
11169 (description
11170 "Tabulate is a library and command-line utility to pretty-print tabular
11171data in Python.")
11172 (license license:expat)))
11173
11174(define-public python2-tabulate
11175 (package-with-python2 python-tabulate))
1c4c8a33
SB
11176
11177(define-public python-kazoo
11178 (package
11179 (name "python-kazoo")
11180 (version "2.2.1")
11181 (source
11182 (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "kazoo" version))
11185 (sha256
11186 (base32
11187 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11188 (build-system python-build-system)
11189 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11190 (propagated-inputs
11191 `(("python-six" ,python-six)))
1c4c8a33
SB
11192 (home-page "https://kazoo.readthedocs.org")
11193 (synopsis "High-level Zookeeper client library")
11194 (description
11195 "Kazoo is a Python client library for the Apache Zookeeper distributed
11196application service. It is designed to be easy to use and to avoid common
11197programming errors.")
3f641af0 11198 (license license:asl2.0)))
1c4c8a33
SB
11199
11200(define-public python2-kazoo
11201 (package-with-python2 python-kazoo))
45dda35e
SB
11202
11203(define-public python-pykafka
11204 (package
11205 (name "python-pykafka")
11206 (version "2.4.0")
11207 (source (origin
11208 (method url-fetch)
c6bccf71
EF
11209 (uri (string-append
11210 "https://pypi.python.org/packages/8b/3e/"
11211 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11212 "pykafka-" version ".tar.gz"))
45dda35e
SB
11213 (sha256
11214 (base32
11215 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11216 (build-system python-build-system)
11217 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11218 (propagated-inputs
45dda35e
SB
11219 `(("python-gevent" ,python-gevent)
11220 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11221 ("python-tabulate" ,python-tabulate)))
11222 (inputs
11223 `(("librdkafka" ,librdkafka)))
11224 (home-page "https://pykafka.readthedocs.io/")
11225 (synopsis "Apache Kafka client for Python")
11226 (description
11227 "PyKafka is a client for the Apache Kafka distributed messaging system.
11228It includes Python implementations of Kafka producers and consumers, which
11229are optionally backed by a C extension built on librdkafka.")
3f641af0 11230 (license license:asl2.0)))
45dda35e
SB
11231
11232(define-public python2-pykafka
11233 (package-with-python2 python-pykafka))
a44fd439
DM
11234
11235(define-public python-wcwidth
11236 (package
11237 (name "python-wcwidth")
9e59478f 11238 (version "0.1.7")
a44fd439
DM
11239 (source
11240 (origin
11241 (method url-fetch)
9e59478f 11242 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11243 (sha256
11244 (base32
9e59478f 11245 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11246 (build-system python-build-system)
11247 (home-page "https://github.com/jquast/wcwidth")
66e07664 11248 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11249 (description "Wcwidth measures the number of terminal column cells of
11250wide-character codes. It is useful for those implementing a terminal emulator,
11251or programs that carefully produce output to be interpreted by one. It is a
11252Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11253specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11254 (license license:expat)))
a44fd439
DM
11255
11256(define-public python2-wcwidth
f210e944 11257 (package-with-python2 python-wcwidth))
0de78c95
DP
11258
11259(define-public python2-jsonrpclib
11260 (package
11261 (name "python2-jsonrpclib")
11262 (version "0.1.7")
11263 (source (origin
11264 (method url-fetch)
11265 (uri (string-append
11266 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11267 "jsonrpclib-" version ".tar.gz"))
11268 (sha256
11269 (base32
11270 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11271 (build-system python-build-system)
0de78c95
DP
11272 (arguments
11273 `(#:tests? #f
11274 #:python ,python-2))
11275 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11276 (synopsis "Implementation of JSON-RPC specification for Python")
11277 (description
11278 "This library is an implementation of the JSON-RPC specification.
11279It supports both the original 1.0 specification, as well as the
11280new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11281etc.")
3f641af0 11282 (license license:asl2.0)))
9250b0f3
SB
11283
11284(define-public python-chai
11285 (package
11286 (name "python-chai")
11287 (version "1.1.1")
11288 (source (origin
11289 (method url-fetch)
11290 (uri (pypi-uri "chai" version))
11291 (sha256
11292 (base32
11293 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11294 (build-system python-build-system)
9250b0f3
SB
11295 (home-page "https://github.com/agoragames/chai")
11296 (synopsis "Mocking framework for Python")
11297 (description
11298 "Chai provides an api for mocking, stubbing and spying your python
11299objects, patterned after the Mocha library for Ruby.")
3f641af0 11300 (license license:bsd-3)))
9250b0f3
SB
11301
11302(define-public python2-chai
11303 (package-with-python2 python-chai))
11304
ae43baa8
SB
11305(define-public python-arrow
11306 (package
11307 (name "python-arrow")
11308 (version "0.8.0")
11309 (source (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "arrow" version))
11312 (sha256
11313 (base32
11314 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11315 (build-system python-build-system)
11316 (native-inputs
f3b98f4f 11317 `(;; For testing
ae43baa8
SB
11318 ("python-chai" ,python-chai)
11319 ("python-simplejson" ,python-simplejson)))
36aed736 11320 (propagated-inputs
22d7360b 11321 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11322 (home-page "https://github.com/crsmithdev/arrow/")
11323 (synopsis "Dates and times for Python")
11324 (description
11325 "Arrow is a Python library to creating, manipulating, formatting and
11326converting dates, times, and timestamps. It implements and updates the
11327datetime type.")
3f641af0 11328 (license license:asl2.0)))
ae43baa8
SB
11329
11330(define-public python2-arrow
11331 (package-with-python2 python-arrow))
11332
1f2b62a4
SB
11333(define-public python-inflection
11334 (package
11335 (name "python-inflection")
11336 (version "0.3.1")
11337 (source
11338 (origin (method url-fetch)
11339 (uri (pypi-uri "inflection" version))
11340 (sha256
11341 (base32
11342 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11343 (build-system python-build-system)
e9127525
MB
11344 (native-inputs
11345 `(("python-pytest" ,python-pytest)))
7bf837fd 11346 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11347 (synopsis "Python string transformation library")
11348 (description
11349 "Inflection is a string transformation library. It singularizes
11350and pluralizes English words, and transforms strings from CamelCase to
11351underscored string.")
11352 (license license:expat)))
11353
11354(define-public python2-inflection
11355 (package-with-python2 python-inflection))
11356
18995566
SB
11357(define-public python-pylev
11358 (package
11359 (name "python-pylev")
11360 (version "1.3.0")
11361 (source (origin
11362 (method url-fetch)
11363 (uri (pypi-uri "pylev" version))
11364 (sha256
11365 (base32
11366 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11367 (build-system python-build-system)
7bf837fd 11368 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11369 (synopsis "Levenshtein distance implementation in Python")
11370 (description "Pure Python Levenshtein implementation, based off the
11371Wikipedia code samples at
11372@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11373 (license license:bsd-3)))
18995566
SB
11374
11375(define-public python2-pylev
11376 (package-with-python2 python-pylev))
11377
f5deff7a
SB
11378(define-public python-cleo
11379 (package
11380 (name "python-cleo")
11381 (version "0.4.1")
11382 (source (origin
11383 (method url-fetch)
11384 (uri (pypi-uri "cleo" version))
11385 (sha256
11386 (base32
11387 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11388 (build-system python-build-system)
11389 (native-inputs
f3b98f4f 11390 `(;; For testing
f5deff7a
SB
11391 ("python-mock" ,python-mock)
11392 ("python-pytest" ,python-pytest)))
9403150a
SB
11393 (propagated-inputs
11394 `(("python-psutil" ,python-psutil)
11395 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11396 (home-page "https://github.com/sdispater/cleo")
11397 (synopsis "Command-line arguments library for Python")
11398 (description
11399 "Cleo allows you to create command-line commands with signature in
11400docstring and colored output.")
11401 (license license:expat)))
11402
11403(define-public python2-cleo
11404 (package-with-python2 python-cleo))
11405
77cadb43
SB
11406(define-public python-lazy-object-proxy
11407 (package
11408 (name "python-lazy-object-proxy")
11409 (version "1.2.2")
11410 (source (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "lazy-object-proxy" version))
11413 (sha256
11414 (base32
11415 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11416 (build-system python-build-system)
77cadb43
SB
11417 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11418 (synopsis "Lazy object proxy for python")
11419 (description
11420 "Lazy object proxy is an object that wraps a callable but defers the call
11421until the object is actually required, and caches the result of said call.")
3f641af0 11422 (license license:bsd-2)))
77cadb43
SB
11423
11424(define-public python2-lazy-object-proxy
11425 (package-with-python2 python-lazy-object-proxy))
11426
5477e05f
SB
11427(define-public python-dnspython
11428 (package
11429 (name "python-dnspython")
6c514128 11430 (version "1.15.0")
5477e05f
SB
11431 (source (origin
11432 (method url-fetch)
11433 (uri (string-append "http://www.dnspython.org/kits/"
11434 version "/dnspython-" version ".tar.gz"))
11435 (sha256
11436 (base32
6c514128 11437 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11438 (build-system python-build-system)
11439 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11440 (home-page "http://www.dnspython.org")
11441 (synopsis "DNS toolkit for Python")
11442 (description
11443 "dnspython is a DNS toolkit for Python. It supports almost all record
11444types. It can be used for queries, zone transfers, and dynamic updates.
11445It supports TSIG authenticated messages and EDNS0.")
11446 (license license:expat)))
11447
11448(define-public python2-dnspython
11449 (package-with-python2 python-dnspython))
11450
22711e25
SB
11451(define-public python-email-validator
11452 (package
11453 (name "python-email-validator")
b165c215 11454 (version "1.0.2")
22711e25
SB
11455 (source
11456 (origin (method url-fetch)
11457 (uri (pypi-uri "email_validator" version))
11458 (sha256
11459 (base32
b165c215 11460 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11461 (build-system python-build-system)
11462 (arguments
11463 '(#:phases
11464 (modify-phases %standard-phases
11465 (add-before 'build 'use-dnspython
11466 (lambda _
11467 (substitute* "setup.py"
11468 (("dnspython3") "dnspython"))
11469 #t)))))
d42560bd 11470 (propagated-inputs
22711e25 11471 `(("python-dnspython" ,python-dnspython)
d42560bd 11472 ("python-idna" ,python-idna)))
22711e25
SB
11473 (home-page "https://github.com/JoshData/python-email-validator")
11474 (synopsis "Email address validation library for Python")
11475 (description
11476 "This library validates email address syntax and deliverability.")
3f641af0 11477 (license license:cc0)))
22711e25
SB
11478
11479(define-public python2-email-validator
11480 (package-with-python2 python-email-validator))
11481
8987d91e
SB
11482(define-public python-ukpostcodeparser
11483 (package
11484 (name "python-ukpostcodeparser")
11485 (version "1.0.3")
11486 (source (origin
11487 (method url-fetch)
11488 (uri (pypi-uri "UkPostcodeParser" version))
11489 (sha256
11490 (base32
11491 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11492 (build-system python-build-system)
8987d91e
SB
11493 (home-page "https://github.com/hamstah/ukpostcodeparser")
11494 (synopsis "UK Postcode parser for Python")
11495 (description
11496 "This library provides the @code{parse_uk_postcode} function for
11497parsing UK postcodes.")
11498 (license license:expat)))
11499
11500(define-public python2-ukpostcodeparser
11501 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11502
ce7911dd
MB
11503(define-public python-faker
11504 (package
11505 (name "python-faker")
11506 (version "0.7.9")
11507 (source (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "Faker" version))
11510 (sha256
11511 (base32
11512 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11513 (patches
11514 (search-patches "python-faker-fix-build-32bit.patch"))
11515 (modules '((guix build utils)))
11516 (snippet
11517 '(begin
11518 (for-each delete-file (find-files "." "\\.pyc$"))
11519 #t))))
11520 (build-system python-build-system)
11521 (arguments
11522 '(#:phases
11523 (modify-phases %standard-phases
11524 (replace 'check
11525 (lambda _
11526 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11527 (native-inputs
11528 `(;; For testing
11529 ("python-email-validator" ,python-email-validator)
11530 ("python-mock" ,python-mock)
11531 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11532 (propagated-inputs
11533 `(("python-dateutil" ,python-dateutil)
11534 ("python-six" ,python-six)))
11535 (home-page "https://github.com/joke2k/faker")
11536 (synopsis "Python package that generates fake data")
11537 (description
11538 "Faker is a Python package that generates fake data such as names,
11539addresses, and phone numbers.")
11540 (license license:expat)
11541 (properties `((python2-variant . ,(delay python2-faker))))))
11542
11543(define-public python2-faker
11544 (let ((base (package-with-python2 (strip-python2-variant
11545 python-faker))))
11546 (package
11547 (inherit base)
11548 (propagated-inputs
11549 `(("python2-ipaddress" ,python2-ipaddress)
11550 ,@(package-propagated-inputs base))))))
11551
ea92ae01
SB
11552(define-public python-fake-factory
11553 (package
11554 (name "python-fake-factory")
7adc698f 11555 (version "0.7.2")
ea92ae01
SB
11556 (source (origin
11557 (method url-fetch)
11558 (uri (pypi-uri "fake-factory" version))
11559 (sha256
11560 (base32
42945fb5
MB
11561 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11562 (patches
11563 (search-patches
11564 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11565 (build-system python-build-system)
b7f3ea95
MB
11566 (arguments
11567 '(#:phases
11568 (modify-phases %standard-phases
11569 (replace 'check
11570 (lambda _
11571 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11572 (native-inputs
f3b98f4f 11573 `(;; For testing
ea92ae01
SB
11574 ("python-email-validator" ,python-email-validator)
11575 ("python-mock" ,python-mock)
11576 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11577 (propagated-inputs
22d7360b 11578 `(("python-dateutil" ,python-dateutil)
bbcd7297 11579 ("python-six" ,python-six)))
7adc698f 11580 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11581 (synopsis "Python package that generates fake data")
11582 (description
11583 "Faker is a Python package that generates fake data such as names,
11584addresses, and phone numbers.")
11585 (license license:expat)
ce7911dd
MB
11586 (properties `((python2-variant . ,(delay python2-fake-factory))
11587 (superseded . ,python-faker)))))
ea92ae01
SB
11588
11589(define-public python2-fake-factory
11590 (let ((base (package-with-python2 (strip-python2-variant
11591 python-fake-factory))))
11592 (package
11593 (inherit base)
ce7911dd 11594 (properties `((superseded . ,python2-faker)))
24c9aa18 11595 (propagated-inputs
ea92ae01 11596 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11597 ,@(package-propagated-inputs base))))))
ea92ae01 11598
b49504fd
SB
11599(define-public python-pyaml
11600 (package
11601 (name "python-pyaml")
11602 (version "15.8.2")
11603 (source (origin
11604 (method url-fetch)
11605 (uri (pypi-uri "pyaml" version))
11606 (sha256
11607 (base32
11608 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11609 (build-system python-build-system)
f620311a
MB
11610 (native-inputs
11611 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11612 (propagated-inputs
11613 `(("python-pyyaml" ,python-pyyaml)))
11614 (home-page "https://github.com/mk-fg/pretty-yaml")
11615 (synopsis "YAML pretty-print library for Python")
11616 (description
11617 "pyaml is a PyYAML based python module to produce pretty and readable
11618YAML-serialized data.")
3f641af0 11619 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11620
11621(define-public python2-pyaml
11622 (package-with-python2 python-pyaml))
11623
347175a2
SB
11624(define-public python-flexmock
11625 (package
11626 (name "python-flexmock")
11627 (version "0.10.2")
11628 (source (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "flexmock" version))
11631 (sha256
11632 (base32
11633 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11634 (build-system python-build-system)
347175a2
SB
11635 (home-page "https://flexmock.readthedocs.org")
11636 (synopsis "Testing library for Python")
11637 (description
11638 "flexmock is a testing library for Python that makes it easy to create
11639mocks, stubs and fakes.")
3f641af0 11640 (license license:bsd-3)))
347175a2
SB
11641
11642(define-public python2-flexmock
11643 (package-with-python2 python-flexmock))
11644
5a744191
SB
11645(define-public python-orator
11646 (package
11647 (name "python-orator")
11648 (version "0.8.2")
11649 (source (origin
11650 (method url-fetch)
11651 (uri (pypi-uri "orator" version))
11652 (sha256
11653 (base32
11654 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11655 (build-system python-build-system)
11656 (arguments '(#:tests? #f)) ; no tests
b2676030 11657 (propagated-inputs
5a744191
SB
11658 `(("python-arrow" ,python-arrow)
11659 ("python-blinker" ,python-blinker)
11660 ("python-cleo" ,python-cleo)
ce7911dd 11661 ("python-faker" ,python-faker)
5a744191
SB
11662 ("python-inflection" ,python-inflection)
11663 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11664 ("python-pyaml" ,python-pyaml)
5a744191
SB
11665 ("python-simplejson" ,python-simplejson)
11666 ("python-wrapt" ,python-wrapt)))
11667 (home-page "https://orator-orm.com/")
11668 (synopsis "ActiveRecord ORM for Python")
11669 (description
11670 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11671implementation for Python.")
11672 (license license:expat)
11673 (properties `((python2-variant . ,(delay python2-orator))))))
11674
11675(define-public python2-orator
11676 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11677 (package
11678 (inherit base)
06961617 11679 (propagated-inputs
5a744191 11680 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11681 ,@(package-propagated-inputs base))))))
f4155188
DM
11682
11683(define-public python-prompt-toolkit
11684 (package
11685 (name "python-prompt-toolkit")
6a34f4cc 11686 (version "1.0.9")
f4155188
DM
11687 (source
11688 (origin
11689 (method url-fetch)
d15e2ef0 11690 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11691 (sha256
11692 (base32
6a34f4cc 11693 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11694 (build-system python-build-system)
bae18710
LF
11695 (arguments
11696 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11697 (propagated-inputs
11698 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11699 ("python-six" ,python-six)
f22efa01 11700 ("python-pygments" ,python-pygments)))
f4155188
DM
11701 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11702 (synopsis "Library for building command line interfaces in Python")
11703 (description
11704 "Prompt-Toolkit is a library for building interactive command line
11705interfaces in Python. It's like GNU Readline but it also features syntax
11706highlighting while typing, out-of-the-box multi-line input editing, advanced
11707code completion, incremental search, support for Chinese double-width
11708characters, mouse support, and auto suggestions.")
f210e944 11709 (license license:bsd-3)))
f4155188
DM
11710
11711(define-public python2-prompt-toolkit
f210e944 11712 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11713
11714(define-public python-jedi
11715 (package
11716 (name "python-jedi")
11717 (version "0.9.0")
11718 (source
11719 (origin
11720 (method url-fetch)
11721 (uri (pypi-uri "jedi" version))
11722 (sha256
11723 (base32
11724 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11725 (build-system python-build-system)
bfce8a34
MB
11726 (arguments
11727 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11728 '(#:tests? #f))
11729 (native-inputs
11730 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11731 (home-page "https://github.com/davidhalter/jedi")
11732 (synopsis
11733 "Autocompletion for Python that can be used for text editors")
11734 (description
11735 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11736 (license license:expat)))
a502dfbf
DM
11737
11738(define-public python2-jedi
f210e944 11739 (package-with-python2 python-jedi))
c2f0dc6e
DM
11740
11741(define-public ptpython
11742 (package
11743 (name "ptpython")
11744 (version "0.34")
11745 (source (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "ptpython" version))
11748 (sha256
11749 (base32
11750 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11751 (build-system python-build-system)
32955348
MB
11752 (arguments
11753 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11754 (propagated-inputs
c2f0dc6e
DM
11755 `(("python-docopt" ,python-docopt)
11756 ("python-jedi" ,python-jedi)
11757 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11758 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11759 (home-page "https://github.com/jonathanslenders/ptpython")
11760 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11761 (description
11762 "ptpython is a Python read-eval-print loop with IDE-like features.
11763It supports syntax highlighting, multiline editing, autocompletion, mouse,
11764color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11765etc.")
3f641af0 11766 (license license:bsd-3)
c2f0dc6e
DM
11767 (properties `((python2-variant . ,(delay ptpython-2))))))
11768
11769(define-public ptpython-2
11770 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11771 (package
11772 (inherit base)
11773 (name "ptpython2"))))
b227f0be 11774
b04a52a6
DJ
11775(define-public python-requests-oauthlib
11776 (package
11777 (name "python-requests-oauthlib")
11778 (version "0.6.2")
11779 (source
11780 (origin
11781 (method url-fetch)
11782 (uri (pypi-uri "requests-oauthlib" version))
11783 (sha256
11784 (base32
11785 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11786 (build-system python-build-system)
11787 (arguments
11788 `(#:phases
11789 (modify-phases %standard-phases
11790 ;; removes tests that require network access
11791 (add-before 'check 'pre-check
11792 (lambda _
11793 (delete-file "tests/test_core.py")
11794 #t)))))
11795 (native-inputs
11796 `(("python-requests-mock" ,python-requests-mock)
11797 ("python-mock" ,python-mock)))
f22efa01 11798 (propagated-inputs
b04a52a6
DJ
11799 `(("python-oauthlib" ,python-oauthlib)
11800 ("python-requests" ,python-requests)))
11801 (home-page
11802 "https://github.com/requests/requests-oauthlib")
11803 (synopsis
11804 "OAuthlib authentication support for Requests")
11805 (description
11806 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11807provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11808 (license license:isc)))
b04a52a6
DJ
11809
11810(define-public python2-requests-oauthlib
f210e944 11811 (package-with-python2 python-requests-oauthlib))
b04a52a6 11812
b227f0be 11813(define-public python-stem
11814 (package
11815 (name "python-stem")
0bb1c35a 11816 (version "1.5.4")
b227f0be 11817 (source
11818 (origin
11819 (method url-fetch)
c976b319 11820 (uri (pypi-uri "stem" version))
b227f0be 11821 (sha256
11822 (base32
0bb1c35a 11823 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11824 (build-system python-build-system)
11825 (arguments
11826 `(#:phases
11827 (modify-phases %standard-phases
11828 (replace 'check
11829 (lambda _
11830 (zero? (system* "./run_tests.py" "--unit")))))))
11831 (native-inputs
11832 `(("python-mock" ,python-mock)
11833 ("python-pep8" ,python-pep8)
11834 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11835 (home-page "https://stem.torproject.org/")
11836 (synopsis
11837 "Python controller library that allows applications to interact with Tor")
11838 (description
11839 "Stem is a Python controller library for Tor. With it you can use Tor's
11840control protocol to script against the Tor process and read descriptor data
11841relays publish about themselves.")
3f641af0 11842 (license license:lgpl3)))
b227f0be 11843
11844(define-public python2-stem
11845 (package-with-python2 python-stem))
517a6c0c
DM
11846
11847(define-public python-pyserial
11848 (package
11849 (name "python-pyserial")
11850 (version "3.1.1")
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (pypi-uri "pyserial" version))
11855 (sha256
11856 (base32
11857 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11858 (build-system python-build-system)
0a702009
MB
11859 (arguments
11860 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11861 ;; #:phases
11862 ;; (modify-phases %standard-phases
11863 ;; (replace 'check
11864 ;; (lambda _
11865 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11866 (home-page
11867 "https://github.com/pyserial/pyserial")
11868 (synopsis "Python Serial Port Bindings")
11869 (description "@code{pyserial} provide serial port bindings for Python. It
11870supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11871and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11872 (license license:bsd-3)))
517a6c0c
DM
11873
11874(define-public python2-pyserial
f210e944 11875 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11876
11877(define-public python-kivy
11878 (package
11879 (name "python-kivy")
11880 (version "1.9.1")
11881 (source
11882 (origin
11883 (method url-fetch)
11884 (uri (pypi-uri "kivy" version))
11885 (file-name (string-append name "-" version ".tar.gz"))
11886 (sha256
11887 (base32
11888 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11889 (build-system python-build-system)
11890 (arguments
11891 `(#:tests? #f ; Tests require many optional packages
11892 #:phases
11893 (modify-phases %standard-phases
11894 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11895 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11896 (lambda* (#:key inputs #:allow-other-keys)
11897 (setenv "KIVY_SDL2_PATH"
11898 (string-append (assoc-ref inputs "sdl-union")
11899 "/include/SDL2"))
11900 #t)))))
11901 (native-inputs
f2516de2
HG
11902 `(("pkg-config" ,pkg-config)
11903 ("python-cython" ,python-cython)))
6eb7af2a 11904 (inputs
f2516de2 11905 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11906 ("mesa" ,mesa)
11907 ("sdl-union"
11908 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11909 (home-page "http://kivy.org")
11910 (synopsis
11911 "Multitouch application framework")
11912 (description
11913 "A software library for rapid development of
11914hardware-accelerated multitouch applications.")
11915 (license license:expat)))
11916
11917(define-public python2-kivy
11918 (package-with-python2 python-kivy))
11919
11920(define-public python-kivy-next
11921 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11922 (revision "1"))
11923 (package (inherit python-kivy)
11924 (name "python-kivy-next")
d80a71eb 11925 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11926 (string-take commit 7)))
11927 (source
11928 (origin
11929 (method git-fetch)
11930 (uri (git-reference
11931 (url "https://github.com/kivy/kivy")
11932 (commit commit)))
11933 (file-name (string-append name "-" version "-checkout"))
11934 (sha256
11935 (base32
11936 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11937
11938(define-public python2-kivy-next
11939 (package-with-python2 python-kivy-next))
8794bd8b
DC
11940
11941(define-public python-binaryornot
11942 (package
11943 (name "python-binaryornot")
11944 (version "0.4.0")
11945 (source (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "binaryornot" version))
11948 (sha256
11949 (base32
11950 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11951 (build-system python-build-system)
f22efa01 11952 (propagated-inputs
8794bd8b
DC
11953 `(("python-chardet" ,python-chardet)
11954 ("python-hypothesis" ,python-hypothesis)))
11955 (home-page "https://github.com/audreyr/binaryornot")
11956 (synopsis "Package to check if a file is binary or text")
11957 (description "Ultra-lightweight pure Python package to check if a file is
11958binary or text.")
11959 (license license:bsd-3)
11960 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11961
11962(define-public python2-binaryornot
11963 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11964 (package (inherit base)
f22efa01 11965 (propagated-inputs
8794bd8b 11966 `(("python2-enum34" ,python2-enum34)
f22efa01 11967 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11968
11969(define-public python-nltk
11970 (package
11971 (name "python-nltk")
11972 (version "3.2.1")
11973 (source (origin
11974 (method url-fetch)
11975 (uri (pypi-uri "nltk" version))
11976 (sha256
11977 (base32
11978 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11979 (build-system python-build-system)
59f12985
LF
11980 (arguments
11981 '(;; The tests require some extra resources to be downloaded.
11982 ;; TODO Try packaging these resources.
11983 #:tests? #f))
a9ac982a
DC
11984 (home-page "http://nltk.org/")
11985 (synopsis "Natural Language Toolkit")
11986 (description "It provides interfaces to over 50 corpora and lexical
11987resources such as WordNet, along with a suite of text processing libraries
11988for classification, tokenization, stemming, tagging, parsing, and semantic
11989reasoning, wrappers for natural language processing libraries.")
f210e944 11990 (license license:asl2.0)))
a9ac982a
DC
11991
11992(define-public python2-nltk
f210e944 11993 (package-with-python2 python-nltk))
691cd90d
DC
11994
11995(define-public python-pymongo
11996 (package
11997 (name "python-pymongo")
11998 (version "3.3.0")
11999 (source (origin
12000 (method url-fetch)
12001 (uri (pypi-uri "pymongo" version))
12002 (sha256
12003 (base32
12004 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12005 (build-system python-build-system)
f22efa01 12006 (propagated-inputs
691cd90d 12007 `(("python-certifi" ,python-certifi)))
7bf837fd 12008 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12009 (synopsis "Python driver for MongoDB")
12010 (description "Python driver for MongoDB.")
f210e944 12011 (license license:asl2.0)))
691cd90d
DC
12012
12013(define-public python2-pymongo
f210e944 12014 (package-with-python2 python-pymongo))
6a6c9d43
DC
12015
12016(define-public python-sh
12017 (package
12018 (name "python-sh")
12019 (version "1.11")
12020 (source (origin
12021 (method url-fetch)
12022 (uri (pypi-uri "sh" version))
12023 (sha256
12024 (base32
12025 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12026 (build-system python-build-system)
12027 (arguments
12028 `(#:tests? #f)) ; no tests
12029 (home-page "https://github.com/amoffat/sh")
12030 (synopsis "Python subprocess interface")
12031 (description "Abstracts process invocation by providing a function
12032interface for programs.")
f210e944 12033 (license license:expat)))
6a6c9d43
DC
12034
12035(define-public python2-sh
f210e944 12036 (package-with-python2 python-sh))
05b59190 12037
25702397
EF
12038(define-public python-consul
12039 (package
12040 (name "python-consul")
12041 (version "0.6.1")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "python-consul" version))
12046 (sha256
12047 (base32
12048 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12049 (build-system python-build-system)
12050 (native-inputs
fd1d6de7
HG
12051 `(("python-pytest" ,python-pytest)))
12052 (propagated-inputs
12053 `(("python-requests" ,python-requests)
25702397
EF
12054 ("python-six" ,python-six)))
12055 (home-page "https://github.com/cablehead/python-consul")
12056 (synopsis "Python client for Consul")
12057 (description
12058 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12059discovery, monitoring and configuration.")
12060 (license license:expat)))
12061
12062(define-public python2-consul
f210e944 12063 (package-with-python2 python-consul))
25702397 12064
05b59190
DC
12065(define-public python-schematics
12066 (package
12067 (name "python-schematics")
12068 (version "1.1.1")
12069 (source
12070 (origin
12071 (method url-fetch)
12072 (uri (string-append
12073 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12074 (file-name (string-append name "-" version ".tar.gz"))
12075 (sha256
12076 (base32
12077 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12078 (build-system python-build-system)
f22efa01 12079 (propagated-inputs
05b59190
DC
12080 `(("python-six" ,python-six)))
12081 (arguments
12082 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12083 ; version requirements (eg python-coveralls)
12084 (home-page "https://github.com/schematics/schematics")
12085 (synopsis "Python Data Structures for Humans")
12086 (description "Python Data Structures for Humans.")
f210e944 12087 (license license:bsd-3)))
05b59190
DC
12088
12089(define-public python2-schematics
f210e944 12090 (package-with-python2 python-schematics))
d6907ff7
DC
12091
12092(define-public python-publicsuffix
12093 (package
12094 (name "python-publicsuffix")
12095 (version "1.1.0")
12096 (source (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "publicsuffix" version))
12099 (sha256
12100 (base32
12101 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12102 (build-system python-build-system)
12103 (arguments
12104 `(#:tests? #f)) ; tests use the internet
12105 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12106 (synopsis "Get suffix for a domain name")
12107 (description "Get a public suffix for a domain name using the Public Suffix
12108List.")
f210e944 12109 (license license:expat)))
d6907ff7
DC
12110
12111(define-public python2-publicsuffix
f210e944 12112 (package-with-python2 python-publicsuffix))
b2319996
DC
12113
12114(define-public python-publicsuffix2
12115 (package
12116 (name "python-publicsuffix2")
91862162 12117 (version "2.20160818")
b2319996
DC
12118 (source
12119 (origin
12120 (method url-fetch)
12121 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12122 (sha256
12123 (base32
91862162 12124 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12125 (build-system python-build-system)
10797a0a
LF
12126 (arguments
12127 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12128 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12129 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12130 (description "Get a public suffix for a domain name using the Public Suffix
12131List. Forked from and using the same API as the publicsuffix package.")
f210e944 12132 (license (list license:expat license:mpl2.0))))
b2319996
DC
12133
12134(define-public python2-publicsuffix2
f210e944 12135 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12136
12137(define-public python-url
12138 (package
12139 (name "python-url")
12140 (version "0.2.0")
12141 (source (origin
12142 (method url-fetch)
12143 (uri (pypi-uri "url" version))
12144 (sha256
12145 (base32
12146 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12147 (build-system python-build-system)
f22efa01 12148 (propagated-inputs
81f1515d
DC
12149 `(("python-publicsuffix" ,python-publicsuffix)))
12150 (native-inputs
12151 `(("python-coverage" ,python-coverage)
12152 ("python-nose" ,python-nose)))
12153 (arguments
12154 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12155 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12156 (synopsis "URL Parsing")
12157 (description "Library for parsing urls.")
12158 (license license:expat)
12159 (properties `((python2-variant . ,(delay python2-url))))))
12160
12161(define-public python2-url
12162 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12163 (package (inherit base)
f22efa01 12164 (propagated-inputs
f210e944 12165 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12166
12167(define-public python-freezegun
12168 (package
12169 (name "python-freezegun")
0c315fb3 12170 (version "0.3.8")
974ee2c1
TS
12171 (source
12172 (origin
12173 (method url-fetch)
12174 (uri (pypi-uri "freezegun" version))
12175 (sha256
12176 (base32
0c315fb3 12177 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12178 (build-system python-build-system)
12179 (native-inputs
12180 `(("python-mock" ,python-mock)
12181 ("python-nose" ,python-nose)
4e096968 12182 ("python-coverage" ,python-coverage)))
f22efa01 12183 (propagated-inputs
4e096968 12184 `(("python-six" ,python-six)
22d7360b 12185 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12186 (arguments
12187 `(#:phases (modify-phases %standard-phases
12188 ;; The tests are normally executed via `make test`, but the PyPi
12189 ;; package does not include the Makefile.
12190 (replace 'check
12191 (lambda _
12192 (zero? (system* "nosetests" "./tests/")))))))
12193 (home-page "https://github.com/spulec/freezegun")
12194 (synopsis "Test utility for mocking the datetime module")
12195 (description
12196 "FreezeGun is a library that allows your python tests to travel through
12197time by mocking the datetime module.")
12198 (license license:asl2.0)))
12199
12200(define-public python2-freezegun
f210e944
HG
12201 (package-with-python2 python-freezegun))
12202
dddcb25c
MB
12203
12204(define-public python-odfpy
12205 (package
12206 (name "python-odfpy")
12207 (version "1.3.3")
12208 (source (origin
12209 (method url-fetch)
12210 (uri (pypi-uri "odfpy" version))
12211 (sha256
12212 (base32
12213 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12214 (arguments
12215 `(#:modules ((srfi srfi-1)
12216 (guix build python-build-system)
12217 (guix build utils))
12218 #:phases
12219 (modify-phases %standard-phases
12220 (replace 'check
12221 ;; The test runner invokes python2 and python3 for test*.py.
12222 ;; To avoid having both in inputs, we replicate it here.
12223 (lambda _
12224 (every (lambda (test-file)
12225 (zero? (system* "python" test-file)))
12226 (find-files "tests" "^test.*\\.py$")))))))
12227 (build-system python-build-system)
12228 (home-page "https://github.com/eea/odfpy")
12229 (synopsis "Python API and tools to manipulate OpenDocument files")
12230 (description "Collection of libraries and utility programs written in
12231Python to manipulate OpenDocument 1.2 files.")
12232 (license
12233 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12234 ;; number of files with other licenses.
12235 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12236
12237(define-public python2-odfpy
12238 (package-with-python2 python-odfpy))
b30565bd
MB
12239
12240(define-public python-cachecontrol
12241 (package
12242 (name "python-cachecontrol")
12243 (version "0.11.6")
12244 (source
12245 (origin
12246 (method url-fetch)
12247 ;; Pypi does not have tests.
12248 (uri (string-append
12249 "https://github.com/ionrock/cachecontrol/archive/v"
12250 version ".tar.gz"))
12251 (file-name (string-append name "-" version ".tar.gz"))
12252 (sha256
12253 (base32
12254 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12255 (build-system python-build-system)
12256 (arguments
12257 `(#:phases
12258 (modify-phases %standard-phases
12259 (replace 'check
12260 (lambda _
12261 ;; Drop test that requires internet access.
12262 (delete-file "tests/test_regressions.py")
12263 (setenv "PYTHONPATH"
12264 (string-append (getcwd) "/build/lib:"
12265 (getenv "PYTHONPATH")))
12266 (zero? (system* "py.test" "-vv")))))))
12267 (native-inputs
12268 `(("python-pytest" ,python-pytest)
12269 ("python-redis" ,python-redis)
12270 ("python-webtest" ,python-webtest)
12271 ("python-mock" ,python-mock)))
12272 (propagated-inputs
12273 `(("python-requests" ,python-requests)
12274 ("python-lockfile" ,python-lockfile)))
12275 (home-page "https://github.com/ionrock/cachecontrol")
12276 (synopsis "The httplib2 caching algorithms for use with requests")
12277 (description "CacheControl is a port of the caching algorithms in
12278@code{httplib2} for use with @code{requests} session objects.")
f210e944 12279 (license license:asl2.0)))
b30565bd
MB
12280
12281(define-public python2-cachecontrol
f210e944 12282 (package-with-python2 python-cachecontrol))
243db824
DM
12283
12284(define-public python-lit
12285 (package
12286 (name "python-lit")
12287 (version "0.5.0")
12288 (source
12289 (origin
12290 (method url-fetch)
12291 (uri (pypi-uri "lit" version))
12292 (sha256
12293 (base32
12294 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12295 (build-system python-build-system)
12296 (home-page "http://llvm.org/")
12297 (synopsis "LLVM Software Testing Tool")
12298 (description "@code{lit} is a portable tool for executing LLVM and Clang
12299style test suites, summarizing their results, and providing indication of
12300failures.")
f210e944 12301 (license license:ncsa)))
243db824
DM
12302
12303(define-public python2-lit
f210e944 12304 (package-with-python2 python-lit))
66f95b20
MB
12305
12306(define-public python-pytest-pep8
12307 (package
12308 (name "python-pytest-pep8")
12309 (version "1.0.6")
12310 (source (origin
12311 (method url-fetch)
12312 (uri (pypi-uri "pytest-pep8" version))
12313 (sha256
12314 (base32
12315 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12316 (build-system python-build-system)
12317 (arguments
b41a05ce 12318 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12319 (native-inputs
12320 `(("python-pytest" ,python-pytest)))
12321 (propagated-inputs
12322 `(("python-pep8" ,python-pep8)))
12323 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12324 (synopsis "Py.test plugin to check PEP8 requirements")
12325 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12326 (license license:expat)))
66f95b20
MB
12327
12328(define-public python2-pytest-pep8
f210e944 12329 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12330
12331(define-public python-pytest-flakes
12332 (package
12333 (name "python-pytest-flakes")
12334 (version "1.0.1")
12335 (source (origin
12336 (method url-fetch)
12337 (uri (pypi-uri "pytest-flakes" version))
12338 (sha256
12339 (base32
12340 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12341 (build-system python-build-system)
12342 (arguments
b41a05ce 12343 `(#:phases
df94a6b5
MB
12344 (modify-phases %standard-phases
12345 (delete 'check)
12346 (add-after 'install 'check
05c2fd36
HG
12347 (lambda* (#:key outputs inputs #:allow-other-keys)
12348 ;; It's easier to run tests after install.
12349 ;; Make installed package available for running the tests
12350 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12351 (zero? (system* "py.test" "-vv")))))))
12352 (native-inputs
12353 `(("python-coverage" ,python-coverage)
12354 ("python-pytest" ,python-pytest)
12355 ("python-pytest-cache" ,python-pytest-cache)
12356 ("python-pytest-pep8" ,python-pytest-pep8)))
12357 (propagated-inputs
12358 `(("python-pyflakes" ,python-pyflakes)))
12359 (home-page "https://github.com/fschulze/pytest-flakes")
12360 (synopsis "Py.test plugin to check source code with pyflakes")
12361 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12362 (license license:expat)))
df94a6b5
MB
12363
12364(define-public python2-pytest-flakes
f210e944 12365 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12366
12367(define-public python-natsort
12368 (package
12369 (name "python-natsort")
a06cd95a 12370 (version "5.0.2")
5467ea62
MB
12371 (source (origin
12372 (method url-fetch)
12373 (uri (pypi-uri "natsort" version))
12374 (sha256
12375 (base32
a06cd95a 12376 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12377 (build-system python-build-system)
12378 (arguments
12379 `(#:phases
12380 (modify-phases %standard-phases
12381 (add-before 'check 'set-cachedir
12382 ;; Tests require write access to $HOME by default
12383 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12384 (native-inputs
12385 `(("python-hypothesis" ,python-hypothesis)
12386 ("python-pytest-cache" ,python-pytest-cache)
12387 ("python-pytest-cov" ,python-pytest-cov)
12388 ("python-pytest-flakes" ,python-pytest-flakes)
12389 ("python-pytest-pep8" ,python-pytest-pep8)))
12390 (propagated-inputs ; TODO: Add python-fastnumbers.
12391 `(("python-pyicu" ,python-pyicu)))
12392 (home-page "https://github.com/SethMMorton/natsort")
12393 (synopsis "Natural sorting for python and shell")
12394 (description
12395 "Natsort lets you apply natural sorting on lists instead of
12396lexicographical. If you use the built-in @code{sorted} method in python
12397on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12398returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12399function @code{natsorted} that identifies numbers and sorts them separately
12400from strings. It can also sort version numbers, real numbers, mixed types
12401and more, and comes with a shell command @command{natsort} that exposes this
12402functionality in the command line.")
12403 (license license:expat)
12404 (properties `((python2-variant . ,(delay python2-natsort))))))
12405
12406(define-public python2-natsort
12407 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12408 (package (inherit base)
12409 (native-inputs
00e10c6e 12410 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12411 ("python2-mock" ,python2-mock)
12412 ("python2-enum34" ,python2-enum34)
12413 ,@(package-native-inputs base))))))
4efb9c54
SR
12414
12415(define-public python-glances
12416 (package
12417 (name "python-glances")
12418 (version "2.7.1")
12419 (source
12420 (origin
12421 (method url-fetch)
12422 (uri (pypi-uri "Glances" version))
12423 (sha256
12424 (base32
12425 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12426 (build-system python-build-system)
f22efa01 12427 (propagated-inputs
4efb9c54
SR
12428 `(("python-psutil" ,python-psutil)))
12429 (home-page
12430 "https://github.com/nicolargo/glances")
12431 (synopsis
12432 "A cross-platform curses-based monitoring tool")
12433 (description
12434 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12435Glances uses the PsUtil library to get information from your system. It monitors
12436CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12437 (license license:lgpl3+)))
4efb9c54
SR
12438
12439(define-public python2-glances
f210e944 12440 (package-with-python2 python-glances))
05b7a593
EF
12441
12442(define-public python-graphql-core
12443 (package
12444 (name "python-graphql-core")
12445 (version "0.5.3")
12446 (source
12447 (origin
12448 (method url-fetch)
12449 (uri (pypi-uri "graphql-core" version))
12450 (sha256
12451 (base32
12452 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12453 (build-system python-build-system)
12454 (arguments
326f8285
LF
12455 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12456 #:phases
05b7a593
EF
12457 (modify-phases %standard-phases
12458 (add-after 'unpack 'patch-hardcoded-version
12459 (lambda _ (substitute*
12460 "setup.py"
12461 (("'gevent==1.1rc1'") "'gevent'"))
12462 #t)))))
12463 (native-inputs
12464 `(("python-gevent" ,python-gevent)
12465 ("python-mock" ,python-mock)
12466 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12467 (propagated-inputs
05b7a593
EF
12468 `(("python-promise" ,python-promise)
12469 ("python-six" ,python-six)))
12470 (home-page "https://github.com/graphql-python/graphql-core")
12471 (synopsis "GraphQL implementation for Python")
12472 (description
12473 "GraphQL implementation for Python. GraphQL is a data query language and
12474runtime designed and used to request and deliver data to mobile and web apps.
12475This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12476to Python.")
05b7a593
EF
12477 (license license:expat)))
12478
12479(define-public python2-graphql-core
f210e944 12480 (package-with-python2 python-graphql-core))
7ee51575
EF
12481
12482(define-public python-graphql-relay
12483 (package
12484 (name "python-graphql-relay")
b13a5b4d 12485 (version "0.4.5")
7ee51575
EF
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "graphql-relay" version))
12490 (sha256
12491 (base32
b13a5b4d 12492 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12493 (build-system python-build-system)
12494 (native-inputs
12495 `(("python-pytest" ,python-pytest)))
f22efa01 12496 (propagated-inputs
7ee51575
EF
12497 `(("python-graphql-core" ,python-graphql-core)
12498 ("python-promise" ,python-promise)
12499 ("python-six" ,python-six)))
12500 (home-page "https://github.com/graphql-python/graphql-relay-py")
12501 (synopsis "Relay implementation for Python")
12502 (description
12503 "This is a library to allow the easy creation of Relay-compliant servers
12504using the GraphQL Python reference implementation of a GraphQL server. It
12505should be noted that the code is a exact port of the original
12506@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12507from Facebook.")
7ee51575
EF
12508 (license license:expat)))
12509
12510(define-public python2-graphql-relay
f210e944 12511 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12512
12513(define-public python-graphene
12514 (package
12515 (name "python-graphene")
12516 (version "0.10.2")
12517 (source
12518 (origin
12519 (method url-fetch)
12520 (uri (pypi-uri "graphene" version))
12521 (sha256
12522 (base32
12523 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12524 (build-system python-build-system)
12525 (native-inputs
12526 `(("python-django-filter" ,python-django-filter)
12527 ("python-mock" ,python-mock)
12528 ("python-psycopg2" ,python-psycopg2)
12529 ("python-pytest-django" ,python-pytest-django)
12530 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12531 (propagated-inputs
ddc63a56
EF
12532 `(("python-graphql-core" ,python-graphql-core)
12533 ("python-graphql-relay" ,python-graphql-relay)
12534 ("python-iso8601" ,python-iso8601)
12535 ("python-promise" ,python-promise)
12536 ("python-six" ,python-six)))
12537 (home-page "http://graphene-python.org/")
12538 (synopsis "GraphQL Framework for Python")
12539 (description
12540 "Graphene is a Python library for building GraphQL schemas/types.
12541A GraphQL schema describes your data model, and provides a GraphQL server
12542with an associated set of resolve methods that know how to fetch data.")
12543 (properties `((python2-variant . ,(delay python2-graphene))))
12544 (license license:expat)))
12545
12546(define-public python2-graphene
12547 (let ((base (package-with-python2
12548 (strip-python2-variant python-graphene))))
12549 (package (inherit base)
12550 (native-inputs
00e10c6e 12551 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12552 ,@(package-native-inputs base))))))
d488d5d6
EF
12553
12554(define-public python-nautilus
12555 (package
12556 (name "python-nautilus")
12557 (version "0.4.9")
12558 (source
12559 (origin
12560 (method url-fetch)
12561 (uri (pypi-uri "nautilus" version))
12562 (sha256
12563 (base32
12564 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12565 (build-system python-build-system)
12566 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12567 (propagated-inputs
d488d5d6
EF
12568 `(("python-bcrypt" ,python-bcrypt)
12569 ("python-click" ,python-click)
12570 ("python-consul" ,python-consul)
d488d5d6
EF
12571 ("python-graphene" ,python-graphene)
12572 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12573 ("python-peewee" ,python-peewee)
12574 ("python-pika" ,python-pika)
d488d5d6
EF
12575 ("python-tornado" ,python-tornado)
12576 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12577 (native-inputs
12578 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12579 (home-page "https://github.com/AlecAivazis/nautilus")
12580 (synopsis "Library for creating microservice applications")
12581 (description
12582 "Nautilus is a framework for flux based microservices that looks to
12583provide extendible implementations of common aspects of a cloud so that you can
12584focus on building massively scalable web applications.")
12585 (license license:expat)))
94cffc63 12586
89cd988b
DM
12587(define-public python-snowballstemmer
12588 (package
12589 (name "python-snowballstemmer")
12590 (version "1.2.1")
12591 (source (origin
1bd858cc
MB
12592 (method url-fetch)
12593 (uri (pypi-uri "snowballstemmer" version))
12594 (sha256
12595 (base32
12596 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12597 (build-system python-build-system)
12598 (arguments
12599 `(;; No tests exist
12600 #:tests? #f))
12601 (home-page "https://github.com/shibukawa/snowball_py")
12602 (synopsis "Snowball stemming library collection for Python")
12603 (description "This package provides 16 word stemmer algorithms generated
12604from Snowball algorithms. It includes the 15 original ones plus the Poerter
12605English stemmer.")
12606 (license license:bsd-3)))
12607
12608(define-public python2-snowballstemmer
12609 (package-with-python2 python-snowballstemmer))
12610
754bfd70
DM
12611(define-public python-sphinx-cloud-sptheme
12612 (package
12613 (name "python-sphinx-cloud-sptheme")
5095bc7d 12614 (version "1.8.0")
754bfd70 12615 (source (origin
1bd858cc
MB
12616 (method url-fetch)
12617 (uri (pypi-uri "cloud_sptheme" version))
12618 (sha256
12619 (base32
5095bc7d 12620 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12621 (build-system python-build-system)
a31e2f1a
MB
12622 ;; FIXME: The 'pypi' release archive does not contain tests.
12623 (arguments '(#:tests? #f))
1bd858cc
MB
12624 (native-inputs
12625 `(("python-sphinx" ,python-sphinx)))
12626 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12627 (synopsis "'Cloud' theme for Sphinx documenter")
12628 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12629related extensions.")
1bd858cc 12630 (license license:bsd-3)))
754bfd70
DM
12631
12632(define-public python2-sphinx-cloud-sptheme
12633 (package-with-python2 python-sphinx-cloud-sptheme))
12634
807a5b32
DM
12635(define-public python-sphinx-alabaster-theme
12636 (package
12637 (name "python-sphinx-alabaster-theme")
12638 (version "0.7.9")
1bd858cc
MB
12639 (source (origin
12640 (method url-fetch)
12641 (uri (pypi-uri "alabaster" version))
12642 (sha256
12643 (base32
12644 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12645 (build-system python-build-system)
12646 (propagated-inputs
12647 `(("python-pygments" ,python-pygments)))
12648 (home-page "https://alabaster.readthedocs.io/")
12649 (synopsis "Configurable sidebar-enabled Sphinx theme")
12650 (description "Alabaster is a visually (c)lean, responsive, configurable
12651theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12652 (license license:bsd-3)))
12653
12654(define-public python2-sphinx-alabaster-theme
12655 (package-with-python2 python-sphinx-alabaster-theme))
12656
66d3f50a
LF
12657(define-public python-betamax
12658 (package
12659 (name "python-betamax")
12660 (version "0.8.0")
12661 (source
12662 (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "betamax" version))
12665 (sha256
12666 (base32
12667 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12668 (build-system python-build-system)
12669 (arguments
12670 '(;; Many tests fail because they require networking.
12671 #:tests? #f))
c415f763 12672 (propagated-inputs
66d3f50a
LF
12673 `(("python-requests" ,python-requests)))
12674 (home-page "https://github.com/sigmavirus24/betamax")
12675 (synopsis "Record HTTP interactions with python-requests")
12676 (description "Betamax will record your test suite's HTTP interactions and
12677replay them during future tests. It is designed to work with python-requests.")
f210e944 12678 (license license:expat)))
66d3f50a
LF
12679
12680(define-public python2-betamax
f210e944 12681 (package-with-python2 python-betamax))
ca0635b4 12682
94cffc63
LF
12683(define-public python-s3transfer
12684 (package
12685 (name "python-s3transfer")
1b5ea092 12686 (version "0.1.10")
94cffc63
LF
12687 (source (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "s3transfer" version))
12690 (sha256
12691 (base32
1b5ea092 12692 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12693 (build-system python-build-system)
fad8bf97
LF
12694 (arguments
12695 `(#:phases
12696 (modify-phases %standard-phases
12697 (replace 'check
12698 (lambda _
12699 ;; 7 of the 'integration' tests require network access or login
12700 ;; credentials.
12701 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12702 (native-inputs
fad8bf97
LF
12703 `(("python-docutils" ,python-docutils)
12704 ("python-mock" ,python-mock)
12705 ("python-nose" ,python-nose)))
f22efa01 12706 (propagated-inputs
94cffc63
LF
12707 `(("python-botocore" ,python-botocore)))
12708 (synopsis "Amazon S3 Transfer Manager")
12709 (description "S3transfer is a Python library for managing Amazon S3
12710transfers.")
12711 (home-page "https://github.com/boto/s3transfer")
12712 (license license:asl2.0)
12713 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12714
12715(define-public python2-s3transfer
12716 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12717 (package
12718 (inherit base)
12719 (native-inputs
12720 `(("python2-futures" ,python2-futures)
94cffc63 12721 ,@(package-native-inputs base))))))
8ab59181
HG
12722
12723(define-public python-setproctitle
12724(package
12725 (name "python-setproctitle")
12726 (version "1.1.10")
12727 (source
12728 (origin
12729 (method url-fetch)
12730 (uri (pypi-uri "setproctitle" version))
12731 (sha256
12732 (base32
12733 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12734 (build-system python-build-system)
12735 (arguments
12736 '(#:phases
12737 (modify-phases %standard-phases
12738 (add-before 'check 'patch-Makefile
12739 ;; Stricly this is only required for the python2 variant.
12740 ;; But adding a phase in an inherited package seems to be
12741 ;; cumbersum. So we patch even for python3.
12742 (lambda _
12743 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12744 (when nose
12745 (substitute* "Makefile"
12746 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12747 (string-append nose "/bin/nosetests "))))
12748 #t)))
12749 (replace 'check
12750 (lambda _
12751 (setenv "PYTHON" (or (which "python3") (which "python")))
12752 (setenv "PYCONFIG" (or (which "python3-config")
12753 (which "python-config")))
12754 (setenv "CC" "gcc")
12755 ;; No need to extend PYTHONPATH to find the built package, since
12756 ;; the Makefile will build anyway
12757 (zero? (system* "make" "check")))))))
12758 (native-inputs
12759 `(("procps" ,procps))) ; required for tests
12760 (home-page
12761 "https://github.com/dvarrazzo/py-setproctitle")
12762 (synopsis
12763 "Setproctitle implementation for Python to customize the process title")
12764 (description "The library allows a process to change its title (as displayed
12765by system tools such as ps and top).
12766
12767Changing the title is mostly useful in multi-process systems, for
12768example when a master process is forked: changing the children's title
12769allows to identify the task each process is busy with. The technique
12770is used by PostgreSQL and the OpenSSH Server for example.")
12771 (license license:bsd-3)
12772 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12773
12774(define-public python2-setproctitle
12775 (let ((base (package-with-python2
12776 (strip-python2-variant python-setproctitle))))
12777 (package
12778 (inherit base)
12779 (native-inputs `(("python2-nose" ,python2-nose)
12780 ,@(package-native-inputs base))))))
162e42d8
HG
12781
12782(define-public python-validictory
12783 (package
12784 (name "python-validictory")
12785 (version "1.0.1")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "validictory" version))
12790 (sha256
12791 (base32
12792 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12793 (build-system python-build-system)
12794 (arguments
12795 '(#:phases
12796 (modify-phases %standard-phases
12797 (add-after 'unpack 'bootstrap
12798 ;; Move the tests out of the package directory to avoid
12799 ;; packaging them.
12800 (lambda* _
12801 (rename-file "validictory/tests" "tests")
12802 (delete-file "tests/__init__.py")))
12803 (replace 'check
12804 (lambda _
12805 ;; Extend PYTHONPATH so the built package will be found.
12806 (setenv "PYTHONPATH"
12807 (string-append (getcwd) "/build/lib:"
12808 (getenv "PYTHONPATH")))
12809 (zero? (system* "py.test" "-vv" )))))))
12810 (native-inputs
12811 `(("python-pytest" ,python-pytest)))
12812 (home-page
12813 "https://github.com/jamesturk/validictory")
12814 (synopsis "General purpose Python data validator")
12815 (description "It allows validation of arbitrary Python data structures.
12816
12817The schema format is based on the JSON Schema
12818proposal (http://json-schema.org), so combined with json the library is also
12819useful as a validator for JSON data.")
f210e944 12820 (license license:expat)))
162e42d8
HG
12821
12822(define-public python2-validictory
f210e944 12823 (package-with-python2 python-validictory))
0990edfe
DM
12824
12825(define-public python-aniso8601
12826 (package
12827 (name "python-aniso8601")
12828 (version "1.1.0")
12829 (source
12830 (origin
12831 (method url-fetch)
12832 (uri (pypi-uri "aniso8601" version))
12833 (sha256
12834 (base32
12835 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12836 (build-system python-build-system)
12837 (propagated-inputs
22d7360b 12838 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12839 (home-page
12840 "https://bitbucket.org/nielsenb/aniso8601")
12841 (synopsis
12842 "Python library for parsing ISO 8601 strings")
12843 (description
12844 "This package contains a library for parsing ISO 8601 datetime strings.")
12845 (license license:bsd-3)))
999d964d
DM
12846
12847(define-public python-flask-restful
12848 (package
12849 (name "python-flask-restful")
12850 (version "0.3.5")
12851 (source
12852 (origin
12853 (method url-fetch)
12854 (uri (pypi-uri "Flask-RESTful" version))
12855 (sha256
12856 (base32
12857 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12858 (build-system python-build-system)
12859 (propagated-inputs
12860 `(("python-aniso8601" ,python-aniso8601)
12861 ("python-flask" ,python-flask)
12862 ("python-pycrypto" ,python-pycrypto)
12863 ("python-pytz" ,python-pytz)))
12864 (native-inputs
12865 `(;; Optional dependency of Flask. Tests need it.
12866 ("python-blinker" ,python-blinker)
12867 ("python-mock" ,python-mock) ; For tests
12868 ("python-nose" ,python-nose) ; For tests
12869 ("python-sphinx" ,python-sphinx)))
12870 (home-page
12871 "https://www.github.com/flask-restful/flask-restful/")
12872 (synopsis
12873 "Flask module for creating REST APIs")
12874 (description
12875 "This package contains a Flask module for creating REST APIs.")
12876 (license license:bsd-3)))
31288222
DM
12877
12878(define-public python-flask-basicauth
12879 (package
12880 (name "python-flask-basicauth")
12881 (version "0.2.0")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "Flask-BasicAuth" version))
12886 (sha256
12887 (base32
12888 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12889 (build-system python-build-system)
12890 (propagated-inputs
12891 `(("python-flask" ,python-flask)))
12892 (home-page
12893 "https://github.com/jpvanhal/flask-basicauth")
12894 (synopsis
12895 "HTTP basic access authentication for Flask")
12896 (description
12897 "This package provides HTTP basic access authentication for Flask.")
12898 (license license:bsd-3)))
903276d0
DM
12899
12900(define-public python-flask-sqlalchemy
12901 (package
12902 (name "python-flask-sqlalchemy")
12903 (version "2.1")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "Flask-SQLAlchemy" version))
12908 (sha256
12909 (base32
12910 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12911 (build-system python-build-system)
12912 (propagated-inputs
12913 `(("python-flask" ,python-flask)
12914 ("python-sqlalchemy" ,python-sqlalchemy)))
12915 (home-page
7bf837fd 12916 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
12917 (synopsis
12918 "Module adding SQLAlchemy support to your Flask application")
12919 (description
12920 "This package adds SQLAlchemy support to your Flask application.")
12921 (license license:bsd-3)))
329b4b3b
LF
12922
12923(define-public python-pyev
12924 (package
12925 (name "python-pyev")
12926 (version "0.9.0")
12927 (source
12928 (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "pyev" version))
12931 (sha256
12932 (base32
12933 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12934 (build-system python-build-system)
12935 (arguments
12936 `(#:tests? #f ; no test suite
12937 #:phases
12938 (modify-phases %standard-phases
12939 (add-after 'unpack 'patch
12940 (lambda* (#:key inputs #:allow-other-keys)
12941 (let ((libev (string-append (assoc-ref inputs "libev")
12942 "/lib/libev.so.4")))
12943 (substitute* "setup.py"
12944 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12945 (string-append "libev_dll_name = \"" libev "\"")))))))))
12946 (inputs
12947 `(("libev" ,libev)))
12948 (home-page "http://pythonhosted.org/pyev/")
12949 (synopsis "Python libev interface")
12950 (description "Pyev provides a Python interface to libev.")
12951 (license license:gpl3)))
12952
12953(define-public python2-pyev
12954 (package-with-python2 python-pyev))
45b4f127
DM
12955
12956(define-public python-imagesize
12957 (package
12958 (name "python-imagesize")
12959 (version "0.7.1")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "imagesize" version))
12964 (sha256
12965 (base32
12966 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12967 (build-system python-build-system)
9422c98a
LF
12968 (arguments
12969 '(;; Test files are not distributed on PyPi:
12970 ;; https://github.com/shibukawa/imagesize_py/issues/7
12971 #:tests? #f))
45b4f127
DM
12972 (home-page "https://github.com/shibukawa/imagesize_py")
12973 (synopsis "Gets image size of files in variaous formats in Python")
12974 (description
12975 "This package allows determination of image size from
12976PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12977 (license license:expat)))
45b4f127
DM
12978
12979(define-public python2-imagesize
f210e944 12980 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12981
12982(define-public python-axolotl-curve25519
12983 (package
12984 (name "python-axolotl-curve25519")
12985 (version "0.1")
12986 (source
12987 (origin
12988 (method git-fetch)
12989 (uri (git-reference
12990 (url "git://github.com/tgalal/python-axolotl-curve25519")
12991 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12992 (file-name (string-append name "-" version "-checkout"))
12993 (sha256
12994 (base32
12995 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12996 (build-system python-build-system)
12997 (arguments
12998 `(;; Prevent creation of the egg. This works around
12999 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13000 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13001 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13002 (synopsis "Python wrapper for curve25519 library")
13003 (description "This is a python wrapper for the curve25519 library
13004with ed25519 signatures. The C code was pulled from
13005libaxolotl-android. At the moment this wrapper is meant for use by
13006python-axolotl.")
13007 (license (list license:gpl3 ; Most files
683cdbf5 13008 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13009
13010(define-public python2-axolotl-curve25519
13011 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13012
13013(define-public python-axolotl
13014 (package
13015 (name "python-axolotl")
13016 (version "0.1.35")
13017 (source
13018 (origin
13019 (method url-fetch)
13020 (uri (string-append
13021 "https://github.com/tgalal/python-axolotl/archive/"
13022 version ".tar.gz"))
13023 (file-name (string-append name "-" version ".tar.gz"))
13024 (sha256
13025 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(#:phases
13029 (modify-phases %standard-phases
13030 ;; Don't install tests
13031 (add-before 'install 'remove-tests
13032 (lambda _
13033 (for-each delete-file-recursively
13034 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13035 #t)))))
06ff0837
AI
13036 (propagated-inputs
13037 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13038 ("python-dateutil" ,python-dateutil)
13039 ("python-protobuf" ,python-protobuf)
13040 ("python-pycrypto" ,python-pycrypto)))
13041 (home-page "https://github.com/tgalal/python-axolotl")
13042 (synopsis "Python port of libaxolotl-android")
13043 (description "This is a python port of libaxolotl-android. This
13044is a ratcheting forward secrecy protocol that works in synchronous and
13045asynchronous messaging environments.")
13046 (license license:gpl3)))
13047
13048(define-public python2-axolotl
13049 (package-with-python2 python-axolotl))
e2fca490
DM
13050
13051(define-public python-termstyle
13052 (package
13053 (name "python-termstyle")
13054 (version "0.1.11")
13055 (source
13056 (origin
13057 (method url-fetch)
13058 (uri (pypi-uri "termstyle" version))
13059 (sha256
13060 (base32
13061 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13062 (build-system python-build-system)
7917a135
MB
13063 (arguments
13064 '(#:phases
13065 (modify-phases %standard-phases
13066 (replace 'check
13067 (lambda _
13068 (zero? (system* "python" "test3.py")))))))
7bf837fd 13069 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13070 (synopsis "Console text coloring for Python")
13071 (description "This package provides console text coloring for Python.")
13072 (license license:bsd-3)))
1e6112d8
DM
13073
13074(define-public python-rednose
13075 (package
13076 (name "python-rednose")
13077 (version "1.2.1")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "rednose" version))
13082 (sha256
13083 (base32
13084 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13085 (build-system python-build-system)
13086 (arguments
13087 `(#:phases
13088 (modify-phases %standard-phases
13089 (add-after 'unpack 'fix-deps
13090 (lambda _
13091 ;; See <https://github.com/JBKahn/rednose/issues/12>
13092 (substitute* "setup.py"
13093 (("python-termstyle") "termstyle"))
13094 #t)))))
13095 (propagated-inputs
13096 `(("python-colorama" ,python-colorama)
13097 ("python-termstyle" ,python-termstyle)))
13098 (native-inputs
13099 `(("python-six" ,python-six)
13100 ("python-nose" ,python-nose)))
13101 (home-page "https://github.com/JBKahn/rednose")
13102 (synopsis "Colored output for Python nosetests")
13103 (description "This package provides colored output for the
13104@command{nosetests} command of the Python Nose unit test framework.")
13105 (license license:bsd-3)))
0a7f17f0
DM
13106
13107(define-public python-flask-restplus
13108 (package
13109 (name "python-flask-restplus")
13110 (version "0.9.2")
13111 (source
13112 (origin
13113 (method url-fetch)
13114 (uri (pypi-uri "flask-restplus" version))
13115 (sha256
13116 (base32
13117 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13118 (build-system python-build-system)
59f74825
MB
13119 (arguments
13120 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13121 ;; #:phases
13122 ;; (modify-phases %standard-phases
13123 ;; (replace 'check
13124 ;; (lambda _
13125 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13126 (propagated-inputs
13127 `(("python-aniso8601" ,python-aniso8601)
13128 ("python-flask" ,python-flask)
13129 ("python-jsonschema" ,python-jsonschema)
13130 ("python-pytz" ,python-pytz)
13131 ("python-six" ,python-six)))
13132 (native-inputs
13133 `(("python-tzlocal" ,python-tzlocal)
13134 ("python-blinker" ,python-blinker)
13135 ("python-nose" ,python-nose)
13136 ("python-rednose" ,python-rednose)))
13137 (home-page "https://github.com/noirbizarre/flask-restplus")
13138 (synopsis "Framework for documented API development with Flask")
13139 (description "This package provides a framework for API development with
13140the Flask web framework in Python. It is similar to package
13141@code{python-flask-restful} but supports the @code{python-swagger}
13142documentation builder.")
13143 (license license:expat)))
1ed21519
DM
13144
13145(define-public python-sadisplay
13146 (package
13147 (name "python-sadisplay")
13148 (version "0.4.6")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "sadisplay" version))
13153 (sha256
13154 (base32
13155 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13156 (build-system python-build-system)
13157 (propagated-inputs
13158 `(("python-sqlalchemy" ,python-sqlalchemy)))
13159 (native-inputs
13160 `(("python-nose" ,python-nose)))
13161 (home-page "https://bitbucket.org/estin/sadisplay")
13162 (synopsis "SQLAlchemy schema displayer")
13163 (description "This package provides a program to build Entity
13164Relationship diagrams from a SQLAlchemy model (or directly from the
13165database).")
13166 (license license:bsd-3)))
13167
13168(define-public python2-sadisplay
13169 (package-with-python2 python-sadisplay))
444a79b6
DM
13170
13171(define-public python-flask-restful-swagger
13172 (package
13173 (name "python-flask-restful-swagger")
13174 (version "0.19")
13175 (source
13176 (origin
13177 (method url-fetch)
13178 (uri (pypi-uri "flask-restful-swagger" version))
13179 (sha256
13180 (base32
13181 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13182 (build-system python-build-system)
13183 (propagated-inputs
13184 `(("python-flask-restful" ,python-flask-restful)))
13185 (home-page "https://github.com/rantav/flask-restful-swagger")
13186 (synopsis "Extract Swagger specs from Flask-Restful projects")
13187 (description "This package lets you extract Swagger API documentation
13188specs from your Flask-Restful projects.")
13189 (license license:expat)))
13190
13191(define-public python2-flask-restful-swagger
13192 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13193
13194(define-public python-argcomplete
13195 (package
13196 (name "python-argcomplete")
13197 (version "1.7.0")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "argcomplete" version))
13202 (sha256
13203 (base32
13204 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13205 (build-system python-build-system)
80ce42bd
MB
13206 (native-inputs
13207 `(("python-pexpect" ,python-pexpect)
13208 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13209 (home-page "https://github.com/kislyuk/argcomplete")
13210 (synopsis "Shell tab completion for Python argparse")
13211 (description "argcomplete provides extensible command line tab completion
13212of arguments and options for Python scripts using @code{argparse}. It's
13213particularly useful for programs with many options or sub-parsers that can
13214dynamically suggest completions; for example, when browsing resources over the
13215network.")
13216 (license license:asl2.0)))
13217
13218(define-public python2-argcomplete
13219 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13220
13221(define-public python-xopen
13222 (package
13223 (name "python-xopen")
13224 (version "0.1.1")
13225 (source
13226 (origin
13227 (method url-fetch)
13228 (uri (pypi-uri "xopen" version))
13229 (sha256
13230 (base32
13231 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13232 (file-name (string-append name "-" version ".tar.gz"))))
13233 (build-system python-build-system)
13234 (home-page "https://github.com/marcelm/xopen/")
13235 (synopsis "Open compressed files transparently")
13236 (description "This module provides an @code{xopen} function that works like
13237Python's built-in @code{open} function, but can also deal with compressed files.
13238Supported compression formats are gzip, bzip2 and, xz, and are automatically
13239recognized by their file extensions. The focus is on being as efficient as
13240possible on all supported Python versions.")
13241 (license license:expat)))
13242
13243(define-public python2-xopen
13244 (package-with-python2 python-xopen))
8d67610b
DM
13245
13246(define-public python2-cheetah
13247 (package
13248 (name "python2-cheetah")
13249 (version "2.4.4")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (pypi-uri "Cheetah" version))
13254 (sha256
13255 (base32
13256 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13257 (build-system python-build-system)
13258 (arguments
13259 `(#:python ,python-2))
13260 (propagated-inputs
13261 `(("python2-markdown" ,python2-markdown)))
13262 (home-page "https://pythonhosted.org/Cheetah/")
13263 (synopsis "Template engine")
13264 (description "Cheetah is a text-based template engine and Python code
13265generator.
13266
13267Cheetah can be used as a standalone templating utility or referenced as
13268a library from other Python applications. It has many potential uses,
13269but web developers looking for a viable alternative to ASP, JSP, PHP and
13270PSP are expected to be its principle user group.
13271
13272Features:
13273@enumerate
13274@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13275 text-based format.
13276@item Cleanly separates content, graphic design, and program code.
13277@item Blends the power and flexibility of Python with a simple template language
13278 that non-programmers can understand.
13279@item Gives template writers full access to any Python data structure, module,
13280 function, object, or method in their templates.
13281@item Makes code reuse easy by providing an object-orientated interface to
13282 templates that is accessible from Python code or other Cheetah templates.
13283 One template can subclass another and selectively reimplement sections of it.
13284@item Provides a simple, yet powerful, caching mechanism that can dramatically
13285 improve the performance of a dynamic website.
13286@item Compiles templates into optimized, yet readable, Python code.
13287@end enumerate")
13288 (license (license:x11-style "file://LICENSE"))))
916aafa4 13289
d83d8722
DM
13290(define-public python-dulwich
13291 (package
13292 (name "python-dulwich")
13293 (version "0.16.3")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (list (string-append "https://www.dulwich.io/releases/"
13298 "dulwich-" version ".tar.gz")
13299 (pypi-uri "dulwich" version)))
13300 (sha256
13301 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13302 (build-system python-build-system)
13303 (arguments
13304 `(#:phases
13305 (modify-phases %standard-phases
13306 (add-before 'check 'fix-tests
13307 (lambda* (#:key inputs #:allow-other-keys)
13308 ;; The tests use Popen with a custom environment which doesn't
13309 ;; include PATH.
13310 (substitute* "dulwich/tests/compat/utils.py"
13311 (("'git'") (string-append "'"
13312 (which "git")
13313 "'")))
13314 (substitute* '("dulwich/tests/test_repository.py"
13315 "dulwich/tests/test_hooks.py")
13316 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13317 (setenv "TEST_RUNNER" "unittest")
13318 (setenv "PYTHONHASHSEED" "random")
13319 #t)))))
13320 (propagated-inputs
13321 `(("python-fastimport" ,python-fastimport)))
13322 (native-inputs
13323 `(("python-mock" ,python-mock)
13324 ("python-geventhttpclient" ,python-geventhttpclient)
13325 ("git" ,git)))
13326 (home-page "https://www.dulwich.io/")
13327 (synopsis "Git implementation in Python")
13328 (description "Dulwich is an implementation of the Git file formats and
13329protocols written in pure Python.")
13330 ;; Can be used with either license.
13331 (license (list license:asl2.0 license:gpl2+))))
13332
13333(define-public python2-dulwich
13334 (package-with-python2 python-dulwich))
424b1ae7 13335
916aafa4
CZ
13336(define-public python-pbkdf2
13337 (package
13338 (name "python-pbkdf2")
13339 (version "1.3")
13340 (source
13341 (origin
13342 (method url-fetch)
13343 (uri (pypi-uri "pbkdf2" version))
13344 (sha256
13345 (base32
13346 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13347 (build-system python-build-system)
fffcd8b8
MB
13348 (arguments
13349 '(#:phases
13350 (modify-phases %standard-phases
13351 (replace 'check
13352 (lambda _
13353 (setenv "PYTHONPATH"
13354 (string-append (getcwd) "/build/lib:"
13355 (getenv "PYTHONPATH")))
13356 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13357 (propagated-inputs
13358 `(("python-pycrypto" ,python-pycrypto))) ; optional
13359 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13360 (synopsis "Password-based key derivation")
13361 (description "This module implements the password-based key derivation
13362function, PBKDF2, specified in RSA PKCS#5 v2.0.
13363
13364PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13365is part of the RSA Public Key Cryptography Standards series. The provided
13366implementation takes a password or a passphrase and a salt value (and
13367optionally a iteration count, a digest module, and a MAC module) and provides
13368a file-like object from which an arbitrarly-sized key can be read.")
13369 (license license:expat)))
13370
13371(define-public python2-pbkdf2
13372 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13373
13374(define-public python-qrcode
13375 (package
13376 (name "python-qrcode")
13377 (version "5.3")
13378 (source
13379 (origin
13380 (method url-fetch)
13381 (uri (pypi-uri "qrcode" version))
13382 (sha256
13383 (base32
13384 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13385 (build-system python-build-system)
6925cd78
MB
13386 (arguments
13387 ;; FIXME: Tests require packaging 'pymaging'.
13388 '(#:tests? #f))
cba84a38
CZ
13389 (propagated-inputs
13390 `(("python-lxml" ,python-lxml) ; for SVG output
13391 ("python-pillow" ,python-pillow) ; for PNG output
13392 ("python-six" ,python-six)))
13393 (home-page "https://github.com/lincolnloop/python-qrcode")
13394 (synopsis "QR Code image generator")
13395 (description "This package provides a pure Python QR Code generator
13396module. It uses the Python Imaging Library (PIL) to allow for the generation
13397of QR Codes.
13398
13399In addition this package provides a command line tool to generate QR codes and
13400either write these QR codes to a file or do the output as ascii art at the
13401console.")
13402 (license license:bsd-3)))
13403
13404(define-public python2-qrcode
13405 (package-with-python2 python-qrcode))
af7caada
CZ
13406
13407;; SlowAES isn't compatible with Python 3.
13408(define-public python2-slowaes
13409 (package
13410 (name "python2-slowaes")
13411 (version "0.1a1")
13412 (source
13413 (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "slowaes" version))
13416 (sha256
13417 (base32
13418 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13419 (build-system python-build-system)
13420 (arguments `(#:python ,python-2))
13421 (home-page "http://code.google.com/p/slowaes/")
13422 (synopsis "Implementation of AES in Python")
13423 (description "This package contains an implementation of AES in Python.
13424This implementation is slow (hence the project name) but still useful when
13425faster ones are not available.")
13426 (license license:asl2.0)))
1a917fc9
MFM
13427
13428(define-public python-rst2ansi
13429 (package
13430 (name "python-rst2ansi")
13431 (version "0.1.5")
13432 (source
13433 (origin
13434 (method url-fetch)
13435 (uri (pypi-uri "rst2ansi" version))
13436 (sha256
13437 (base32
13438 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13439 (build-system python-build-system)
13440 (propagated-inputs
13441 `(("python-docutils" ,python-docutils)))
13442 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13443 (synopsis "Convert RST to ANSI-decorated console output")
13444 (description
13445 "Python module dedicated to rendering RST (reStructuredText) documents
13446to ansi-escaped strings suitable for display in a terminal.")
13447 (license license:expat)))
2f4623db
MFM
13448
13449(define-public python-ddt
13450 (package
13451 (name "python-ddt")
13452 (version "1.1.1")
13453 (source
13454 (origin
13455 (method url-fetch)
13456 (uri (pypi-uri "ddt" version))
13457 (sha256
13458 (base32
13459 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13460 (build-system python-build-system)
13461 (native-inputs
13462 `(("python-mock" ,python-mock)
13463 ("python-nose" ,python-nose)))
13464 (propagated-inputs
13465 `(("python-six" ,python-six)
13466 ("python-pyyaml" ,python-pyyaml)))
13467 (home-page "https://github.com/txels/ddt")
13468 (synopsis "Data-Driven Tests")
13469 (description
13470 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13471it with different test data, and make it appear as multiple test cases.")
13472 (license license:expat)))
13473
13474(define-public python2-ddt
13475 (package-with-python2 python-ddt))
2299b137
MFM
13476
13477(define-public python-pycosat
13478 (package
13479 (name "python-pycosat")
13480 (version "0.6.1")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "pycosat" version))
13485 (sha256
13486 (base32
13487 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13488 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13489 (build-system python-build-system)
13490 (home-page "https://github.com/ContinuumIO/pycosat")
13491 (synopsis "Bindings to picosat (a SAT solver)")
13492 (description
13493 "This package provides efficient Python bindings to @code{picosat} on
13494the C level. When importing pycosat, the @code{picosat} solver becomes part
13495of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13496Problem} (SAT) solver.")
13497 (license license:expat)))
13498
13499(define-public python2-pycosat
13500 (package-with-python2 python-pycosat))
8fd68504
MFM
13501
13502(define-public python2-ruamel.ordereddict
13503 (package
13504 (name "python2-ruamel.ordereddict")
13505 (version "0.4.9")
13506 (source
13507 (origin
13508 (method url-fetch)
13509 (uri (pypi-uri "ruamel.ordereddict" version))
13510 (sha256
13511 (base32
13512 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13513 (build-system python-build-system)
13514 (arguments
13515 `(#:python ,python-2
13516 #:phases
13517 (modify-phases %standard-phases
13518 (delete 'check)
13519 (add-after 'install 'check
13520 (lambda* (#:key inputs outputs #:allow-other-keys)
13521 (add-installed-pythonpath inputs outputs)
13522 (zero? (system* "python" "test/testordereddict.py")))))))
13523 (home-page "https://bitbucket.org/ruamel/ordereddict")
13524 (synopsis "Version of dict that keeps keys in insertion order")
13525 (description
13526 "This is an implementation of an ordered dictionary with @dfn{Key
13527Insertion Order} (KIO: updates of values do not affect the position of the
13528key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13529removed and put at the back). The standard library module @code{OrderedDict},
13530implemented later, implements a subset of @code{ordereddict} functionality.
13531Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13532Order} (KSO, no sorting function can be specified, but a transform can be
13533specified to apply on the key before comparison (e.g. @code{string.lower})).")
13534 (license license:expat)))
d8768e31
EB
13535
13536(define-public python-pypeg2
13537 (package
13538 (name "python-pypeg2")
13539 (version "2.15.2")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "pyPEG2" version))
13544 (sha256
13545 (base32
13546 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13547 (build-system python-build-system)
13548 (propagated-inputs `(("python-lxml" ,python-lxml)))
13549 (arguments
13550 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13551 '(#:tests? #f))
13552 (home-page "https://fdik.org/pyPEG/")
13553 (synopsis "Parsering Expression Grammars in Python")
13554 (description "PyPEG is an intrinsic parser interpreter framework for
13555Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13556parse many formal languages.")
13557 (license license:gpl2)))
33e9490c
AI
13558
13559(define-public python2-cliapp
13560 (package
13561 (name "python2-cliapp")
13562 (version "1.20160724")
13563 (source
13564 (origin
13565 (method url-fetch)
13566 (uri (string-append
13567 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13568 version ".tar.gz"))
13569 (sha256
13570 (base32
13571 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13572 (build-system python-build-system)
13573 (arguments
13574 `(#:python ,python-2))
13575 (propagated-inputs
13576 `(("python2-pyaml" ,python2-pyaml)))
13577 (home-page "https://liw.fi/cliapp/")
13578 (synopsis "Python framework for command line programs")
13579 (description "@code{python2-cliapp} is a python framework for
13580command line programs. It contains the typical stuff such programs
13581need to do, such as parsing the command line for options, and
13582iterating over input files.")
13583 (license license:gpl2+)))
13584
77e99411
AI
13585(define-public python2-ttystatus
13586 (package
13587 (name "python2-ttystatus")
13588 (version "0.32")
13589 (source
13590 (origin
13591 (method url-fetch)
13592 (uri (string-append
13593 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13594 version ".tar.gz"))
13595 (sha256
13596 (base32
13597 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13598 (build-system python-build-system)
13599 (arguments
13600 `(#:python ,python-2))
13601 (home-page "https://liw.fi/ttystatus/")
13602 (synopsis "Python library for showing progress reporting and
13603status updates on terminals")
13604 (description "@code{python2-ttystatus} is a python library for
13605showing progress reporting and status updates on terminals, for
13606command line programs. Output is automatically adapted to the width
13607of the terminal: truncated if it does not fit, and resized if the
13608terminal size changes.")
13609 (license license:gpl3+)))
c220f0b4
AI
13610
13611(define-public python2-tracing
13612 (package
13613 (name "python2-tracing")
13614 (version "0.10")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (string-append
13619 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13620 version ".tar.gz"))
13621 (sha256
13622 (base32
13623 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13624 (build-system python-build-system)
13625 (arguments
13626 `(#:python ,python-2))
13627 (home-page "https://liw.fi/tracing/")
13628 (synopsis "Python debug logging helper")
13629 (description "@code{python2-tracing} is a python library for
13630logging debug messages. It provides a way to turn debugging messages
13631on and off, based on the filename they occur in. It is much faster
13632than using @code{logging.Filter} to accomplish the same thing, which
13633matters when code is run in production mode. The actual logging still
13634happens using the @code{logging} library.")
13635 (license license:gpl3+)))
b6b2ca5d
AI
13636
13637(define-public python2-larch
13638 (package
13639 (name "python2-larch")
13640 (version "1.20151025")
13641 (source
13642 (origin
13643 (method url-fetch)
13644 (uri (string-append
13645 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13646 version ".tar.gz"))
13647 (sha256
13648 (base32
13649 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13650 (build-system python-build-system)
13651 (arguments
13652 `(#:python ,python-2))
13653 (propagated-inputs
13654 `(("python2-tracing" ,python2-tracing)))
13655 (home-page "https://liw.fi/larch/")
13656 (synopsis "Python copy-on-write B-tree library")
13657 (description "@code{python2-larch} is an implementation of
13658particular kind of B-tree, based on research by Ohad Rodeh. See
13659@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13660on the data structure.
13661
13662The distinctive feature of this B-tree is that a node is never
13663(conceptually) modified. Instead, all updates are done by
13664copy-on-write. This makes it easy to clone a tree, and modify only the
13665clone, while other processes access the original tree.")
13666 (license license:gpl3+)))
35db2d3c
AP
13667
13668(define-public python-htmlmin
13669 (package
13670 (name "python-htmlmin")
13671 (version "0.1.10")
13672 (source
13673 (origin
13674 (method url-fetch)
13675 (uri (pypi-uri "htmlmin" version))
13676 (sha256
13677 (base32
13678 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13679 (arguments
13680 `(#:tests? #f)) ;htmlmin has no tests
13681 (build-system python-build-system)
13682 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13683 (synopsis "HTML minifier")
13684 (description "@code{htmlmin} is an HTML minifier that just works.
13685It comes with safe defaults and easily configurable options.")
13686 (license license:bsd-3)))
13687
13688(define-public python2-htmlmin
13689 (package-with-python2 python-htmlmin))
78c55663
AP
13690
13691(define-public python-flask-htmlmin
13692 (package
13693 (name "python-flask-htmlmin")
13694 (version "1.2")
13695 (source
13696 (origin
13697 (method url-fetch)
13698 (uri (pypi-uri "Flask-HTMLmin" version))
13699 (sha256
13700 (base32
13701 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13702 (propagated-inputs
13703 `(("python-flask" ,python-flask)
13704 ("python-htmlmin" ,python-htmlmin)))
13705 (build-system python-build-system)
13706 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13707 (synopsis "HTML response minifier for Flask")
13708 (description
13709 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13710 (license license:bsd-3)))
13711
13712(define-public python2-flask-htmlmin
13713 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
13714
13715(define-public python-flask-login
13716 (package
13717 (name "python-flask-login")
13718 (version "0.4.0")
13719 (source
13720 (origin
13721 (method url-fetch)
13722 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13723 version ".tar.gz"))
13724 (file-name (string-append name "-" version ".tar.gz"))
13725 (sha256
13726 (base32
13727 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13728 (arguments
13729 ;; Tests fail PEP8 compliance. See:
13730 ;; https://github.com/maxcountryman/flask-login/issues/340
13731 `(#:tests? #f))
13732 (build-system python-build-system)
13733 (home-page "https://github.com/maxcountryman/flask-login")
13734 (synopsis "User session management for Flask")
13735 (description
13736 "@code{Flask-Login} provides user session management for Flask. It
13737handles the common tasks of logging in, logging out, and remembering your
13738users' sessions over extended periods of time.")
13739 (license license:expat)))
13740
13741(define-public python2-flask-login
13742 (package-with-python2 python-flask-login))
d5ef113c
AI
13743
13744(define-public python-astroid
13745 (package
13746 (name "python-astroid")
13747 (version "1.4.9")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (string-append
13752 "https://github.com/PyCQA/astroid/archive/astroid-"
13753 version ".tar.gz"))
13754 (sha256
13755 (base32
13756 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13757 (build-system python-build-system)
13758 (propagated-inputs
13759 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13760 ("python-six" ,python-six)
13761 ("python-wrapt" ,python-wrapt)))
13762 (arguments
13763 `(#:phases
13764 (modify-phases %standard-phases
13765 (replace 'check
13766 (lambda _
13767 (zero? (system* "python" "-m" "unittest" "discover"
13768 "-p" "unittest*.py")))))))
13769 (home-page "https://github.com/PyCQA/astroid")
13770 (synopsis "Common base representation of python source code for pylint and
13771other projects")
13772 (description "@code{python-astroid} provides a common base representation
13773of python source code for projects such as pychecker, pyreverse, pylint, etc.
13774
13775It provides a compatible representation which comes from the _ast module. It
13776rebuilds the tree generated by the builtin _ast module by recursively walking
13777down the AST and building an extended ast. The new node classes have
13778additional methods and attributes for different usages. They include some
13779support for static inference and local name scopes. Furthermore, astroid
13780builds partial trees by inspecting living objects.")
13781 (license license:lgpl2.1+)))
13782
13783(define-public python2-astroid
13784 (package-with-python2 python-astroid))
6ba0af79
AI
13785
13786(define-public python-isort
13787 (package
13788 (name "python-isort")
13789 (version "4.2.5")
13790 (source
13791 (origin
13792 (method url-fetch)
13793 (uri (string-append
13794 "https://github.com/timothycrosley/isort/archive/"
13795 version ".tar.gz"))
13796 (file-name (string-append name "-" version ".tar.gz"))
13797 (sha256
13798 (base32
13799 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13800 (build-system python-build-system)
13801 (native-inputs
13802 `(("python-mock" ,python-mock)
13803 ("python-pytest" ,python-pytest)))
13804 (home-page "https://github.com/timothycrosley/isort")
13805 (synopsis "Python utility/library to sort python imports")
13806 (description "@code{python-isort} is a python utility/library to sort
13807imports alphabetically, and automatically separated into sections. It
13808provides a command line utility, a python library and plugins for various
13809editors.")
13810 (license license:expat)))
13811
13812(define-public python2-isort
13813 (package-with-python2 python-isort))
965a083e
AI
13814
13815(define-public python2-backports-functools-lru-cache
13816 (package
13817 (name "python2-backports-functools-lru-cache")
13818 (version "1.3")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 ;; only the pypi tarballs contain the necessary metadata
13823 (uri (pypi-uri "backports.functools_lru_cache" version))
13824 (sha256
13825 (base32
13826 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13827 (build-system python-build-system)
13828 (native-inputs
13829 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13830 (arguments
13831 `(#:python ,python-2))
13832 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13833 (synopsis "Backport of functools.lru_cache from Python 3.3")
13834 (description "@code{python2-backports-functools-lru-cache} is a backport
13835of @code{functools.lru_cache} from python 3.3.")
13836 (license license:expat)))
23db3fc6
AI
13837
13838(define-public python-configparser
13839 (package
13840 (name "python-configparser")
13841 (version "3.5.0")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (string-append
13846 "https://bitbucket.org/ambv/configparser/get/"
13847 version ".tar.bz2"))
13848 (file-name (string-append name "-" version ".tar.gz"))
13849 (sha256
13850 (base32
13851 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13852 (build-system python-build-system)
13853 (home-page "http://docs.python.org/py3k/library/configparser.html")
13854 (synopsis "Backport of configparser from python 3.5")
13855 (description "@code{python-configparser} is a backport of
13856@code{configparser} from Python 3.5 so that it can be used directly
13857in other versions.")
13858 (license license:expat)))
13859
13860(define-public python2-configparser
13861 (package-with-python2 python-configparser))
61550ded
AI
13862
13863(define-public python2-coverage-test-runner
13864 (package
13865 (name "python2-coverage-test-runner")
13866 (version "1.11")
13867 (source
13868 (origin
13869 (method url-fetch)
13870 (uri (string-append
13871 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13872 "coverage-test-runner/snapshot/coverage-test-runner-"
13873 version ".tar.gz"))
13874 (sha256
13875 (base32
13876 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13877 (build-system python-build-system)
13878 (arguments
13879 `(#:python ,python-2
13880 #:phases
13881 (modify-phases %standard-phases
13882 (replace 'check
13883 (lambda _
13884 (zero? (system* "./testrun")))))))
13885 (propagated-inputs
13886 `(("python2-coverage" ,python2-coverage)))
13887 (home-page "https://liw.fi/coverage-test-runner/")
13888 (synopsis "Python module for running unit tests")
13889 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 13890unit tests and failing them if the unit test module does not exercise all
61550ded
AI
13891statements in the module it tests.")
13892 (license license:gpl3+)))
315944a3
AI
13893
13894(define-public python-pylint
13895 (package
13896 (name "python-pylint")
13897 (version "1.6.5")
13898 (source
13899 (origin
13900 (method url-fetch)
13901 (uri (string-append
13902 "https://github.com/PyCQA/pylint/archive/pylint-"
13903 version ".tar.gz"))
13904 (sha256
13905 (base32
13906 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13907 (build-system python-build-system)
13908 (native-inputs
13909 `(("python-tox" ,python-tox)))
13910 (propagated-inputs
13911 `(("python-astroid" ,python-astroid)
13912 ("python-isort" ,python-isort)
13913 ("python-mccabe" ,python-mccabe)
13914 ("python-six" ,python-six)))
13915 (arguments
13916 `(#:phases
13917 (modify-phases %standard-phases
13918 (replace 'check
13919 (lambda _
13920 ;; Somehow, tests for python2-pylint
13921 ;; fail if run from the build directory
13922 (let ((work "/tmp/work"))
13923 (mkdir-p work)
13924 (setenv "PYTHONPATH"
13925 (string-append (getenv "PYTHONPATH") ":" work))
13926 (copy-recursively "." work)
13927 (with-directory-excursion "/tmp"
13928 (zero? (system* "python" "-m" "unittest" "discover"
13929 "-s" (string-append work "/pylint/test")
13930 "-p" "*test_*.py")))))))))
13931 (home-page "https://github.com/PyCQA/pylint")
13932 (synopsis "Python source code analyzer which looks for coding standard
13933errors")
13934 (description "Pylint is a Python source code analyzer which looks
13935for programming errors, helps enforcing a coding standard and sniffs
13936for some code smells (as defined in Martin Fowler's Refactoring book).
13937
13938Pylint has many rules enabled by default, way too much to silence them
13939all on a minimally sized program. It's highly configurable and handle
13940pragmas to control it from within your code. Additionally, it is
13941possible to write plugins to add your own checks.")
13942 (license license:gpl2+)))
13943
13944(define-public python2-pylint
13945 (let ((pylint (package-with-python2 python-pylint)))
13946 (package (inherit pylint)
13947 (propagated-inputs
13948 `(("python2-backports-functools-lru-cache"
13949 ,python2-backports-functools-lru-cache)
13950 ("python2-configparser" ,python2-configparser)
13951 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
13952
13953(define-public python-paramunittest
13954 (package
13955 (name "python-paramunittest")
13956 (version "0.2")
13957 (source
13958 (origin
13959 (method url-fetch)
13960 (uri (pypi-uri "ParamUnittest" version))
13961 (sha256
13962 (base32
13963 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
13964 (build-system python-build-system)
13965 (home-page
13966 "https://github.com/rik0/ParamUnittest")
13967 (synopsis
13968 "Simple extension to have parametrized unit tests")
13969 (description
13970 "This package allows to create parametrized unit-tests that work with the standard
13971unittest package. A parametrized test case is automatically converted to multiple test
13972cases. Since they are TestCase subclasses, they work with other test suites that
13973recognize TestCases.")
13974 (license license:bsd-2)))
13975
13976(define-public python2-python-paramunittest
13977 (package-with-python2 python-paramunittest))
eec21d4b
MFM
13978
13979(define-public python-mando
13980 (package
13981 (name "python-mando")
13982 (version "0.5")
13983 (source
13984 (origin
13985 (method url-fetch)
13986 (uri (pypi-uri "mando" version))
13987 (sha256
13988 (base32
13989 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
13990 (build-system python-build-system)
13991 (propagated-inputs
13992 `(("python-rst2ansi" ,python-rst2ansi)))
13993 (native-inputs
13994 `(("python-sphinx" ,python-sphinx-1.5.3)
13995 ("python-paramunittest" ,python-paramunittest)))
13996 (home-page "https://mando.readthedocs.org/")
13997 (synopsis
13998 "Wrapper around argparse, allowing creation of complete CLI applications")
13999 (description
14000 "This package is a wrapper around argparse, allowing you to write complete CLI
14001 applications in seconds while maintaining all the flexibility.")
14002 (license license:expat)))
14003
14004(define-public python2-mando
14005 (package-with-python2 python-mando))
b98d4ec0
MFM
14006
14007(define-public python-mando-0.3.1
14008 ;; python-radon (version 1.5.0) has a requirement
14009 ;; for mando<0.4,>=0.3
14010 (package
14011 (inherit python-mando)
14012 (name "python-mando")
14013 (version "0.3.1")
14014 (source
14015 (origin
14016 (method url-fetch)
14017 (uri (string-append "https://github.com/rubik/mando/archive/v"
14018 version
14019 ".tar.gz"))
14020 (sha256
14021 (base32
14022 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14023
14024(define-public python-fudge
14025 (package
14026 (name "python-fudge")
14027 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14028 ;; package, which is currently the only use of this package.
14029 (version "0.9.6")
14030 (source
14031 (origin
14032 (method url-fetch)
14033 (uri (pypi-uri "fudge" version))
14034 (sha256
14035 (base32
14036 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14037 (build-system python-build-system)
14038 (arguments
14039 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14040 (home-page "https://github.com/fudge-py/fudge")
14041 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14042 (description
14043 "Fudge is a Python module for using fake objects (mocks and stubs) to
14044test real ones.
14045
14046In readable Python code, you declare the methods available on your fake object
14047and how they should be called. Then you inject that into your application and
14048start testing. This declarative approach means you don’t have to record and
14049playback actions and you don’t have to inspect your fakes after running code.
14050If the fake object was used incorrectly then you’ll see an informative
14051exception message with a traceback that points to the culprit.")
14052 (license license:expat)))
14053
14054(define-public python2-fudge
14055 (package-with-python2 python-fudge))
f3f8d159
DM
14056
14057(define-public python-oauth2client
14058 (package
14059 (name "python-oauth2client")
14060 (version "4.0.0")
14061 (source
14062 (origin
14063 (method url-fetch)
14064 (uri (pypi-uri "oauth2client" version))
14065 (sha256
14066 (base32
14067 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14068 (build-system python-build-system)
14069 (arguments
14070 `(#:tests? #f))
14071 (propagated-inputs
14072 `(("python-httplib2" ,python-httplib2)
14073 ("python-pyasn1" ,python-pyasn1)
14074 ("python-pyasn1-modules" ,python-pyasn1-modules)
14075 ("python-rsa" ,python-rsa)
14076 ("python-six" ,python-six)))
14077 (home-page "http://github.com/google/oauth2client/")
14078 (synopsis "OAuth 2.0 client library")
14079 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14080library for Python")
14081 (license license:asl2.0)))
6e7302e9
DM
14082
14083(define-public python-flask-oidc
14084 (package
14085 (name "python-flask-oidc")
14086 (version "1.1.1")
14087 (source
14088 (origin
14089 (method url-fetch)
14090 (uri (pypi-uri "flask-oidc" version))
14091 (sha256
14092 (base32
14093 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14094 (build-system python-build-system)
14095 (propagated-inputs
14096 `(("python-flask" ,python-flask)
14097 ("python-itsdangerous" ,python-itsdangerous)
14098 ("python-oauth2client" ,python-oauth2client)
14099 ("python-six" ,python-six)))
14100 (native-inputs
14101 `(("python-nose" ,python-nose)
14102 ("python-mock" ,python-mock)))
14103 (home-page "https://github.com/puiterwijk/flask-oidc")
14104 (synopsis "OpenID Connect extension for Flask")
14105 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14106for Flask.")
14107 (license license:bsd-2)))
7e16478f
DM
14108
14109(define-public python-mwclient
14110 (package
14111 (name "python-mwclient")
14112 (version "0.8.4")
14113 (source
14114 (origin
14115 (method url-fetch)
14116 ;; The PyPI version wouldn't contain tests.
14117 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14118 "v" version ".tar.gz"))
14119 (sha256
14120 (base32
14121 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14122 (build-system python-build-system)
14123 (propagated-inputs
14124 `(("python-requests" ,python-requests)
14125 ("python-requests-oauthlib"
14126 ,python-requests-oauthlib)
14127 ("python-six" ,python-six)))
14128 (native-inputs
14129 `(("python-mock" ,python-mock)
14130 ("python-pytest" ,python-pytest)
14131 ("python-pytest-pep8" ,python-pytest-pep8)
14132 ("python-pytest-cache" ,python-pytest-cache)
14133 ("python-pytest-cov" ,python-pytest-cov)
14134 ("python-responses" ,python-responses)))
14135 (home-page "https://github.com/btongminh/mwclient")
14136 (synopsis "MediaWiki API client")
14137 (description "This package provides a MediaWiki API client.")
14138 (license license:expat)))
14139
14140(define-public python2-mwclient
14141 (package-with-python2 python-mwclient))
59a97288
JL
14142
14143(define-public python-pytest-warnings
14144 (package
14145 (name "python-pytest-warnings")
14146 (version "0.2.0")
14147 (source
14148 (origin
14149 (method url-fetch)
14150 (uri (pypi-uri "pytest-warnings" version))
14151 (sha256
14152 (base32
14153 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14154 (build-system python-build-system)
14155 (propagated-inputs
14156 `(("pytest" ,python-pytest-3.0)))
14157 (home-page "https://github.com/fschulze/pytest-warnings")
14158 (synopsis "Pytest plugin to list Python warnings in pytest report")
14159 (description
14160 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14161pytest report.")
14162 (license license:expat)))
14163
14164(define-public python2-pytest-warnings
14165 (package-with-python2 python-pytest-warnings))
2d6e56ba
JL
14166
14167(define-public python-pytest-catchlog
14168 (package
14169 (name "python-pytest-catchlog")
14170 (version "1.2.2")
14171 (source
14172 (origin
14173 (method url-fetch)
14174 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14175 (sha256
14176 (base32
14177 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14178 (build-system python-build-system)
14179 (native-inputs
14180 `(("unzip" ,unzip)))
14181 (propagated-inputs
14182 `(("pytest" ,python-pytest-3.0)))
14183 (home-page "https://github.com/eisensheng/pytest-catchlog")
14184 (synopsis "Pytest plugin to catch log messages")
14185 (description
14186 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14187a fork of pytest-capturelog.")
14188 (license license:expat)))
14189
14190(define-public python2-pytest-catchlog
14191 (package-with-python2 python-pytest-catchlog))
75805449
JL
14192
14193(define-public python-utils
14194 (package
14195 (name "python-utils")
14196 (version "2.1.0")
14197 (source (origin
14198 (method url-fetch)
14199 (uri (pypi-uri "python-utils" version))
14200 (sha256
14201 (base32
14202 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14203 (build-system python-build-system)
14204 (native-inputs
14205 `(("pytest-runner" ,python-pytest-runner)
14206 ("pytest" ,python-pytest)
14207 ("six" ,python-six)))
14208 (home-page "https://github.com/WoLpH/python-utils")
14209 (synopsis "Convenient utilities not included with the standard Python install")
14210 (description
14211 "Python Utils is a collection of small Python functions and classes which
14212make common patterns shorter and easier.")
14213 (license license:bsd-2)))
14214
14215(define-public python2-utils
14216 (package-with-python2 python-utils))
709a5a93
JL
14217
14218(define-public python-webassets
14219 (package
14220 (name "python-webassets")
14221 (version "0.12.1")
14222 (source
14223 (origin
14224 (method url-fetch)
14225 (uri (pypi-uri "webassets" version))
14226 (sha256
14227 (base32
14228 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14229 (build-system python-build-system)
14230 (native-inputs
14231 `(("python-jinja2" ,python-jinja2)
14232 ("python-mock" ,python-mock)
14233 ("python-nose" ,python-nose)
14234 ("python-pytest" ,python-pytest)))
14235 (home-page "https://github.com/miracle2k/webassets")
14236 (synopsis "Media asset management")
14237 (description "Merges, minifies and compresses Javascript and CSS files,
14238supporting a variety of different filters, including YUI, jsmin, jspacker or
14239CSS tidy. Also supports URL rewriting in CSS files.")
14240 (license license:bsd-2)))
4c066b72
JL
14241
14242(define-public python-sphinx-me
14243 (package
14244 (name "python-sphinx-me")
14245 (version "0.3")
14246 (source
14247 (origin
14248 (method url-fetch)
14249 (uri (pypi-uri "sphinx-me" version))
14250 (sha256
14251 (base32
14252 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14253 (build-system python-build-system)
14254 (home-page "https://github.com/stephenmcd/sphinx-me")
14255 (synopsis "Create a Sphinx documentation shell")
14256 (description
14257 "Create a Sphinx documentation shell for your project and include the
14258README file as the documentation index. It handles extracting the required
14259meta data such as the project name, author and version from your project for
14260use in your Sphinx docs.")
14261 (license license:bsd-2)))
14262
14263(define-public python2-sphinx-me
14264 (package-with-python2 python-sphinx-me))
03ded2fd
JL
14265
14266(define-public python-cssmin
14267 (package
14268 (name "python-cssmin")
14269 (version "0.2.0")
14270 (source
14271 (origin
14272 (method url-fetch)
14273 (uri (pypi-uri "cssmin" version))
14274 (sha256
14275 (base32
14276 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14277 (build-system python-build-system)
14278 (home-page "https://github.com/zacharyvoase/cssmin")
14279 (synopsis "Python port of the YUI CSS Compressor")
14280 (description "Python port of the YUI CSS Compressor.")
14281 (license (list license:expat license:bsd-3))))
14282
14283(define-public python2-cssmin
14284 (package-with-python2 python-cssmin))
186d4f8d
JL
14285
14286(define-public python-diff-match-patch
14287 (package
14288 (name "python-diff-match-patch")
14289 (version "20121119")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "diff-match-patch" version))
14294 (sha256
14295 (base32
14296 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14297 (build-system python-build-system)
14298 (home-page "https://code.google.com/p/google-diff-match-patch")
14299 (synopsis "Synchronize plain text")
14300 (description "Diff Match and Patch libraries offer robust algorithms to
14301perform the operations required for synchronizing plain text.")
14302 (license license:asl2.0)))
14303
14304(define-public python2-diff-match-patch
14305 (package-with-python2 python-diff-match-patch))
d15a4791
JL
14306
14307(define-public python-dirsync
14308 (package
14309 (name "python-dirsync")
14310 (version "2.2.2")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 (uri (pypi-uri "dirsync" version ".zip"))
14315 (sha256
14316 (base32
14317 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14318 (build-system python-build-system)
14319 (native-inputs
14320 `(("unzip" ,unzip)))
14321 (propagated-inputs
14322 `(("six" ,python-six)))
14323 (home-page "https://bitbucket.org/tkhyn/dirsync")
14324 (synopsis "Advanced directory tree synchronisation tool")
14325 (description "Advanced directory tree synchronisation tool.")
14326 (license license:expat)))
14327
14328(define-public python2-dirsync
14329 (package-with-python2 python-dirsync))
1b16f1ec
JL
14330
14331(define-public python-nosexcover
14332 (package
14333 (name "python-nosexcover")
14334 (version "1.0.11")
14335 (source (origin
14336 (method url-fetch)
14337 (uri (pypi-uri "nosexcover" version))
14338 (sha256
14339 (base32
14340 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14341 (build-system python-build-system)
14342 (propagated-inputs
14343 `(("python-coverage" ,python-coverage)
14344 ("python-nose" ,python-nose)))
14345 (home-page "http://github.com/cmheisel/nose-xcover")
14346 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14347 (description "Nose-xcover is a companion to the built-in
14348@code{nose.plugins.cover}. This plugin will write out an XML coverage report
14349to a file named coverage.xml.
14350
14351It will honor all the options you pass to the Nose coverage plugin,
14352especially -cover-package.")
14353 (license license:expat)))
14354
14355(define-public python2-nosexcover
14356 (package-with-python2 python-nosexcover))
afdfbb1d
JL
14357
14358(define-public python-elasticsearch
14359 (package
14360 (name "python-elasticsearch")
14361 (version "1.0.0")
14362 (source
14363 (origin
14364 (method url-fetch)
14365 (uri (pypi-uri "elasticsearch" version))
14366 (sha256
14367 (base32
14368 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14369 (build-system python-build-system)
14370 (native-inputs
14371 `(("python-mock" ,python-mock)
14372 ("python-nosexcover" ,python-nosexcover)
14373 ("python-pyaml" ,python-pyaml)
14374 ("python-requests" ,python-requests)))
14375 (propagated-inputs
14376 `(("urllib3" ,python-urllib3)))
14377 (arguments
14378 ;; tests require the test_elasticsearch module but it is not distributed.
14379 `(#:tests? #f))
14380 (home-page "https://github.com/elastic/elasticsearch-py")
14381 (synopsis "Low-level client for Elasticsearch")
14382 (description "Official low-level client for Elasticsearch. Its goal is to
14383provide common ground for all Elasticsearch-related code in Python; because of
14384this it tries to be opinion-free and very extendable.")
14385 (license license:expat)))
14386
14387(define-public python2-elasticsearch
14388 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
14389
14390(define-public python-levenshtein
14391 (package
14392 (name "python-levenshtein")
14393 (version "0.12.0")
14394 (source
14395 (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "python-Levenshtein" version))
14398 (sha256
14399 (base32
14400 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14401 (build-system python-build-system)
14402 (home-page "https://github.com/ztane/python-Levenshtein")
14403 (synopsis "Fast computation of Levenshtein distance and string similarity")
14404 (description
14405 "The Levenshtein Python C extension module contains functions for fast computation of
14406@enumerate
14407@item Levenshtein (edit) distance, and edit operations
14408@item string similarity
14409@item approximate median strings, and generally string averaging
14410@item string sequence and set similarity
14411@end enumerate
14412It supports both normal and Unicode strings.")
14413 (license license:gpl2+)))
14414
14415(define-public python2-levenshtein
14416 (package-with-python2 python-levenshtein))
38a370d2
JL
14417
14418(define-public python-scandir
14419 (package
14420 (name "python-scandir")
14421 (version "1.4")
14422 (source
14423 (origin
14424 (method url-fetch)
14425 (uri (pypi-uri "scandir" version))
14426 (sha256
14427 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14428 (build-system python-build-system)
14429 (home-page "https://github.com/benhoyt/scandir")
14430 (synopsis "Directory iteration function")
14431 (description
14432 "Directory iteration function like os.listdir(), except that instead of
14433returning a list of bare filenames, it yields DirEntry objects that include
14434file type and stat information along with the name. Using scandir() increases
14435the speed of os.walk() by 2-20 times (depending on the platform and file
14436system) by avoiding unnecessary calls to os.stat() in most cases.")
14437 (license license:bsd-3)))
14438
14439(define-public python2-scandir
14440 (package-with-python2 python-scandir))
18c25460
JL
14441
14442(define-public python2-stemming
14443 (package
14444 (name "python2-stemming")
14445 (version "1.0.1")
14446 (source
14447 (origin
14448 (method url-fetch)
14449 (uri (pypi-uri "stemming" version))
14450 (sha256
14451 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14452 (build-system python-build-system)
14453 (arguments
14454 `(#:python ,python-2))
14455 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14456 (synopsis "Python implementations of various stemming algorithms")
14457 (description
14458 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14459stemming algorithms for English. These implementations are straightforward and
14460efficient, unlike some Python versions of the same algorithms available on the
14461Web. This package is an extraction of the stemming code included in the Whoosh
14462search engine.")
14463 (license license:public-domain)))
54153b85
JL
14464
14465(define-public python-factory-boy
14466 (package
14467 (name "python-factory-boy")
14468 (version "2.8.1")
14469 (source
14470 (origin
14471 (method url-fetch)
14472 (uri (pypi-uri "factory_boy" version))
14473 (sha256
14474 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14475 (build-system python-build-system)
14476 (arguments
14477 ;; Tests are not included in the tarball.
14478 `(#:tests? #f))
14479 (propagated-inputs
14480 `(("faker" ,python-faker)))
14481 (home-page "https://github.com/benhoyt/scandir")
14482 (synopsis "Versatile test fixtures replacement")
14483 (description
14484 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14485
14486As a fixtures replacement tool, it aims to replace static, hard to maintain
14487fixtures with easy-to-use factories for complex object.
14488
14489Instead of building an exhaustive test setup with every possible combination
14490of corner cases, factory_boy allows you to use objects customized for the
14491current test, while only declaring the test-specific fields")
14492 (license license:expat)))
14493
14494(define-public python2-factory-boy
14495 (package-with-python2 python-factory-boy))
5f25fd69
JL
14496
14497(define-public python-translate-toolkit
14498 (package
14499 (name "python-translate-toolkit")
14500 (version "2.1.0")
14501 (source
14502 (origin
14503 (method url-fetch)
14504 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14505 (sha256
14506 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14507 (build-system python-build-system)
14508 (native-inputs
14509 `(("python-pytest" ,python-pytest)
14510 ("python-sphinx" ,python-sphinx)))
14511 (propagated-inputs
14512 `(("python-babel" ,python-babel)
14513 ("python-beautifulsoup4" ,python-beautifulsoup4)
14514 ("python-chardet" ,python-chardet)
14515 ("python-diff-match-patch" ,python-diff-match-patch)
14516 ("python-levenshtein" ,python-levenshtein)
14517 ("python-lxml" ,python-lxml)
14518 ("python-six" ,python-six)
14519 ("python-vobject" ,python-vobject)
14520 ("python-pyyaml" ,python-pyyaml)))
14521 (arguments
14522 ;; TODO: tests are not run, because they end with
14523 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14524 ;; 'parse_funcs'
14525 ;; during test setup.
14526 `(#:tests? #f))
14527 (home-page "http://toolkit.translatehouse.org")
14528 (synopsis "Tools and API for translation and localization engineering")
14529 (description
14530 "Tools and API for translation and localization engineering. It contains
14531several utilities, as well as an API for building localization tools.")
14532 (license license:gpl2+)))
14533
14534(define-public python2-translate-toolkit
14535 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
14536
14537(define-public python-mysqlclient
14538 (package
14539 (name "python-mysqlclient")
14540 (version "1.3.10")
14541 (source
14542 (origin
14543 (method url-fetch)
14544 (uri (pypi-uri "mysqlclient" version))
14545 (sha256
14546 (base32
14547 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14548 (build-system python-build-system)
14549 (native-inputs
14550 `(("mariadb" ,mariadb)
14551 ("nose" ,python-nose)
14552 ("mock" ,python-mock)
14553 ("py.test" ,python-pytest)))
14554 (inputs
14555 `(("mysql" ,mysql)
14556 ("libz" ,zlib)
14557 ("openssl" ,openssl)))
14558 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14559 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14560 (description "MySQLdb is an interface to the popular MySQL database server
14561for Python. The design goals are:
14562@enumerate
14563@item Compliance with Python database API version 2.0 [PEP-0249],
14564@item Thread-safety,
14565@item Thread-friendliness (threads will not block each other).
14566@end enumerate")
14567 (license license:gpl2)))
14568
14569(define-public python2-mysqlclient
14570 (package-with-python2 python-mysqlclient))