gnu: lvm2: Fix static build after 62ec02bf21.
[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")
6bd9ad69 1111 (version "2.5.3")
cafc3f5a
EB
1112 (source
1113 (origin
1114 (method url-fetch)
394b8060 1115 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1116 (sha256
1117 (base32
6bd9ad69 1118 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
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")
1883 (version "2.6.2")
1884 (source
1885 (origin
1886 (method url-fetch)
54cd239b 1887 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1888 (sha256
1889 (base32
1890 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
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")
3379 (version "0.5.2")
3380 (source
3381 (origin
3382 (method url-fetch)
3383 (uri (string-append
3384 "https://pypi.python.org/packages/source/r/rq/rq-"
3385 version ".tar.gz"))
3386 (sha256
3387 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3388 (build-system python-build-system)
3389 (propagated-inputs
3390 `(("python-click" ,python-click)
3391 ("python-redis" ,python-redis)))
748cef5b
RW
3392 (home-page "http://python-rq.org/")
3393 (synopsis "Simple job queues for Python")
3394 (description
3395 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3396processing them in the background with workers. It is backed by Redis and it
3397is designed to have a low barrier to entry.")
3f641af0 3398 (license license:bsd-2)))
748cef5b
RW
3399
3400(define-public python2-rq
3401 (package-with-python2 python-rq))
3402
6888830b
FB
3403(define-public python-cython
3404 (package
3405 (name "python-cython")
cd158a2b 3406 (version "0.25.2")
6888830b
FB
3407 (source
3408 (origin
3409 (method url-fetch)
56918e26 3410 (uri (pypi-uri "Cython" version))
a3dea991 3411 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
6888830b
FB
3412 (sha256
3413 (base32
cd158a2b 3414 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
6888830b
FB
3415 (build-system python-build-system)
3416 ;; we need the full python package and not just the python-wrapper
3417 ;; because we need libpython3.3m.so
3418 (inputs
3419 `(("python" ,python)))
3420 (arguments
3421 `(#:phases
b92f651b
EF
3422 (modify-phases %standard-phases
3423 (add-before 'check 'set-HOME
3424 ;; some tests require access to "$HOME/.cython"
3425 (lambda _ (setenv "HOME" "/tmp")))
3426 (replace 'check
3427 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3428 (home-page "http://cython.org/")
3429 (synopsis "C extensions for Python")
3430 (description "Cython is an optimising static compiler for both the Python
3431programming language and the extended Cython programming language. It makes
3432writing C extensions for Python as easy as Python itself.")
3f641af0 3433 (license license:asl2.0)
48b311b1 3434 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3435
3436(define-public python2-cython
48b311b1
LC
3437 (package (inherit (package-with-python2
3438 (strip-python2-variant python-cython)))
6888830b
FB
3439 (name "python2-cython")
3440 (inputs
3441 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3442
ee5fb7ee
AV
3443;; The RPython toolchain currently does not support Python 3.
3444(define-public python2-rpython
3445 (package
3446 (name "python2-rpython")
3447 (version "0.1.4")
3448 (source
3449 (origin
3450 (method url-fetch)
3451 (uri (pypi-uri "rpython" version))
3452 (sha256
3453 (base32
3454 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3455 (build-system python-build-system)
3456 (arguments `(#:python ,python-2))
3457 (native-inputs
f3b98f4f 3458 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3459 (home-page "https://rpython.readthedocs.org")
3460 (synopsis "Framework for implementing interpreters and virtual machines")
3461 (description "RPython is a translation and support framework for
3462producing implementations of dynamic languages, emphasizing a clean separation
3463between language specification and implementation aspects.")
3464 (license license:expat)))
3465
7ccb71e0 3466(define-public python-numpy
0da98533 3467 (package
7ccb71e0
TD
3468 (name "python-numpy")
3469 (version "1.12.0")
0da98533
FB
3470 (source
3471 (origin
3472 (method url-fetch)
7ccb71e0
TD
3473 (uri (string-append
3474 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3475 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3476 (sha256
3477 (base32
7ccb71e0 3478 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3479 (build-system python-build-system)
3480 (inputs
328bb95d 3481 `(("openblas" ,openblas)
cba256f8 3482 ("lapack" ,lapack)))
0da98533 3483 (native-inputs
7ccb71e0
TD
3484 `(("python-cython" ,python-cython)
3485 ("python-nose" ,python-nose)
2efabc55 3486 ("gfortran" ,gfortran)))
0da98533
FB
3487 (arguments
3488 `(#:phases
2efabc55
HG
3489 (modify-phases %standard-phases
3490 (add-before 'build 'set-environment-variables
3491 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3492 (call-with-output-file "site.cfg"
3493 (lambda (port)
cba256f8
RW
3494 (format port
3495 "[openblas]
dbdfe515
RW
3496libraries = openblas
3497library_dirs = ~a/lib
3498include_dirs = ~a/include
cba256f8 3499
2efabc55
HG
3500# backslash-n to make emacs happy
3501\n[lapack]
cba256f8
RW
3502lapack_libs = lapack
3503library_dirs = ~a/lib
3504include_dirs = ~a/include
3505"
3506 (assoc-ref inputs "openblas")
3507 (assoc-ref inputs "openblas")
3508 (assoc-ref inputs "lapack")
3509 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3510 ;; Use "gcc" executable, not "cc".
3511 (substitute* "numpy/distutils/system_info.py"
3512 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3513 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3514 #t))
6a843168
FB
3515 ;; Tests can only be run after the library has been installed and not
3516 ;; within the source directory.
2efabc55
HG
3517 (delete 'check)
3518 (add-after 'install 'check
3519 (lambda* (#:key outputs inputs #:allow-other-keys)
3520 ;; Make installed package available for running the tests
3521 (add-installed-pythonpath inputs outputs)
6a843168 3522 (with-directory-excursion "/tmp"
89b5c60e 3523 (zero? (system* "python" "-c"
2efabc55 3524 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3525 (home-page "http://www.numpy.org/")
3526 (synopsis "Fundamental package for scientific computing with Python")
3527 (description "NumPy is the fundamental package for scientific computing
e881752c 3528with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3529object, sophisticated (broadcasting) functions, tools for integrating C/C++
3530and Fortran code, useful linear algebra, Fourier transform, and random number
3531capabilities.")
3f641af0 3532 (license license:bsd-3)))
0da98533 3533
7ccb71e0
TD
3534(define-public python2-numpy
3535 (package-with-python2 python-numpy))
15bfe6d6 3536
460fccd4 3537(define-public python-munch
3538 (package
3539 (name "python-munch")
3540 (version "2.0.4")
3541 (source
3542 (origin
3543 (method url-fetch)
3544 (uri (pypi-uri "munch" version))
3545 (sha256
3546 (base32
3547 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3548 (build-system python-build-system)
3549 (home-page "https://github.com/Infinidat/munch")
3550 (synopsis "Dot-accessible dictionary")
3551 (description "Munch is a dot-accessible dictionary similar to JavaScript
3552objects.")
3553 (license license:expat)))
3554
3555(define-public python2-munch
3556 (package-with-python2 python-munch))
3557
3a1bfe18
RW
3558(define-public python2-fastlmm
3559 (package
3560 (name "python2-fastlmm")
154d0016 3561 (version "0.2.21")
3a1bfe18
RW
3562 (source
3563 (origin
3564 (method url-fetch)
b074e7d4 3565 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3566 (sha256
3567 (base32
154d0016 3568 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3569 (build-system python-build-system)
3570 (arguments
3571 `(#:python ,python-2)) ; only Python 2.7 is supported
3572 (propagated-inputs
3573 `(("python2-numpy" ,python2-numpy)
3574 ("python2-scipy" ,python2-scipy)
3575 ("python2-matplotlib" ,python2-matplotlib)
3576 ("python2-pandas" ,python2-pandas)
3577 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3578 ("python2-pysnptools" ,python2-pysnptools)))
3579 (native-inputs
3580 `(("unzip" ,unzip)
2efabc55 3581 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3582 ("python2-mock" ,python2-mock)
3583 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3584 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3585 (synopsis "Perform genome-wide association studies on large data sets")
3586 (description
3587 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3588Models, is a program for performing both single-SNP and SNP-set genome-wide
3589association studies (GWAS) on extremely large data sets.")
3f641af0 3590 (license license:asl2.0)))
3a1bfe18 3591
7ccb71e0
TD
3592(define-public python-numpy-documentation
3593 (package
3594 (name "python-numpy-documentation")
3595 (version (package-version python-numpy))
3596 (source (package-source python-numpy))
3597 (build-system python-build-system)
2ee8869a 3598 (native-inputs
7ccb71e0
TD
3599 `(("python-matplotlib" ,python-matplotlib)
3600 ("python-numpy" ,python-numpy)
3601 ("pkg-config" ,pkg-config)
2efabc55
HG
3602 ("python-sphinx" ,python-sphinx)
3603 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3604 ("texlive" ,texlive)
3605 ("texinfo" ,texinfo)
3606 ("perl" ,perl)
7ccb71e0
TD
3607 ("scipy-sphinx-theme"
3608 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3609 (method git-fetch)
3610 (uri (git-reference
3611 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3612 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3613 (sha256
3614 (base32
67416769 3615 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3616 ,@(package-native-inputs python-numpy)))
2ee8869a 3617 (arguments
7ccb71e0
TD
3618 `(#:tests? #f ; we're only generating the documentation
3619 #:phases
3620 (modify-phases %standard-phases
3621 (delete 'build)
3622 (replace 'install
3623 (lambda* (#:key inputs outputs #:allow-other-keys)
3624 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3625 (doc (string-append
3626 data "/doc/" ,name "-"
3627 ,(package-version python-numpy)))
3628 (info-reader (string-append data "/info"))
3629 (html (string-append doc "/html"))
3630 (scipy-sphinx-theme "scipy-sphinx-theme")
3631 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3632 (pyver ,(string-append "PYVER=")))
3633 (with-directory-excursion "doc"
3634 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3635 (mkdir-p html)
3636 (system* "make" "html" pyver)
3637 (system* "make" "latex" "PAPER=a4" pyver)
3638 (system* "make" "-C" "build/latex"
3639 "all-pdf" "PAPER=a4" pyver)
3640 ;; FIXME: Generation of the info file fails.
3641 ;; (system* "make" "info" pyver)
3642 ;; (mkdir-p info)
3643 ;; (copy-file "build/texinfo/numpy.info"
3644 ;; (string-append info "/numpy.info"))
3645 (for-each (lambda (file)
3646 (copy-file (string-append "build/latex" file)
3647 (string-append doc file)))
3648 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3649 (with-directory-excursion "build/html"
3650 (for-each (lambda (file)
3651 (let* ((dir (dirname file))
3652 (tgt-dir (string-append html "/" dir)))
3653 (unless (equal? "." dir)
3654 (mkdir-p tgt-dir))
3655 (install-file file html)))
3656 (find-files "." ".*")))))
3657 #t)))))
3658 (home-page (package-home-page python-numpy))
3659 (synopsis "Documentation for the python-numpy package")
3660 (description (package-description python-numpy))
3661 (license (package-license python-numpy))))
2ee8869a 3662
7ccb71e0
TD
3663(define-public python2-numpy-documentation
3664 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3665 (package
3666 (inherit numpy-documentation)
3667 (native-inputs `(("python2-functools32" ,python2-functools32)
3668 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3669
0151a8df 3670(define-public python-pygit2
3671 (package
3672 (name "python-pygit2")
022c9772 3673 (version "0.25.0")
0151a8df 3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (pypi-uri "pygit2" version))
3678 (sha256
3679 (base32
bb6043fe
MB
3680 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3681 (patches
3682 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3683 (build-system python-build-system)
3684 (propagated-inputs
3685 `(("python-six" ,python-six)
3686 ("python-cffi" ,python-cffi)
3687 ("libgit2" ,libgit2)
3688 ("python-tox" ,python-tox)))
3689 (home-page "https://github.com/libgit2/pygit2")
3690 (synopsis "Python bindings for libgit2")
3691 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3692library, libgit2 implements Git plumbing.")
3693 ;; GPL2.0 only, with linking exception.
3694 (license license:gpl2)))
3695
3696(define-public python2-pygit2
3697 (package-with-python2 python-pygit2))
3698
15bfe6d6
FB
3699(define-public python-pyparsing
3700 (package
3701 (name "python-pyparsing")
e0669289 3702 (version "2.0.3")
15bfe6d6
FB
3703 (source
3704 (origin
3705 (method url-fetch)
de67e922
LF
3706 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3707 "/pyparsing-" version
15bfe6d6
FB
3708 "/pyparsing-" version ".tar.gz"))
3709 (sha256
3710 (base32
e0669289 3711 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3712 (build-system python-build-system)
3713 (outputs '("out" "doc"))
3714 (arguments
3715 `(#:tests? #f ; no test target
3716 #:modules ((guix build python-build-system)
3717 (guix build utils))
3718 #:phases
3719 (alist-cons-after
3720 'install 'install-doc
3721 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3722 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3723 "/share/doc/" ,name "-" ,version))
3724 (html-doc (string-append doc "/html"))
3725 (examples (string-append doc "/examples")))
3726 (mkdir-p html-doc)
3727 (mkdir-p examples)
89b5c60e 3728 (for-each
15bfe6d6 3729 (lambda (dir tgt)
89b5c60e 3730 (map (lambda (file)
96c46210 3731 (install-file file tgt))
15bfe6d6
FB
3732 (find-files dir ".*")))
3733 (list "docs" "htmldoc" "examples")
3734 (list doc html-doc examples))))
3735 %standard-phases)))
3736 (home-page "http://pyparsing.wikispaces.com")
3737 (synopsis "Python parsing class library")
3738 (description
3739 "The pyparsing module is an alternative approach to creating and
3740executing simple grammars, vs. the traditional lex/yacc approach, or the use
3741of regular expressions. The pyparsing module provides a library of classes
3742that client code uses to construct the grammar directly in Python code.")
bd3fa666 3743 (license license:expat)))
15bfe6d6
FB
3744
3745(define-public python2-pyparsing
3746 (package-with-python2 python-pyparsing))
3747
ec00de35
FB
3748(define-public python-numpydoc
3749 (package
3750 (name "python-numpydoc")
3751 (version "0.5")
3752 (source
3753 (origin
3754 (method url-fetch)
89b5c60e 3755 (uri (string-append
ec00de35
FB
3756 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3757 version ".tar.gz"))
3758 (sha256
3759 (base32
5e4d8f67
AE
3760 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3761 (modules '((guix build utils)))
3762 (snippet
3763 '(begin
3764 ;; Drop a test requiring matplotlib, which we cannot add as an
3765 ;; input since it would create a circular dependency: Extend the
3766 ;; test for Python 3, where it is already dropped, to Python 2.
3767 (substitute* "numpydoc/tests/test_plot_directive.py"
3768 (("3") "2"))))))
ec00de35 3769 (build-system python-build-system)
fe4a8da4 3770 (propagated-inputs
213d1745
HG
3771 `(("python-sphinx" ,python-sphinx)))
3772 (native-inputs
3773 `(("python-nose" ,python-nose)))
ec00de35
FB
3774 (home-page "https://pypi.python.org/pypi/numpydoc")
3775 (synopsis
3776 "Numpy's Sphinx extensions")
3777 (description
3778 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3779 (license license:bsd-2)))
ec00de35
FB
3780
3781(define-public python2-numpydoc
5e4d8f67 3782 (package-with-python2 python-numpydoc))
1c65314c 3783
1e656049
RW
3784(define-public python-numexpr
3785 (package
3786 (name "python-numexpr")
2ee57340 3787 (version "2.6.1")
1e656049
RW
3788 (source
3789 (origin
3790 (method url-fetch)
26112c0a 3791 (uri (pypi-uri "numexpr" version))
1e656049
RW
3792 (sha256
3793 (base32
2ee57340 3794 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3795 (build-system python-build-system)
3796 (arguments `(#:tests? #f)) ; no tests included
3797 (propagated-inputs
3798 `(("python-numpy" ,python-numpy)))
3799 (home-page "https://github.com/pydata/numexpr")
3800 (synopsis "Fast numerical expression evaluator for NumPy")
3801 (description
3802 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3803expressions that operate on arrays are accelerated and use less memory than
3804doing the same calculation in Python. In addition, its multi-threaded
3805capabilities can make use of all your cores, which may accelerate
3806computations, most specially if they are not memory-bounded (e.g. those using
3807transcendental functions).")
f210e944 3808 (license license:expat)))
1e656049
RW
3809
3810(define-public python2-numexpr
f210e944 3811 (package-with-python2 python-numexpr))
1e656049 3812
361d982c
MB
3813(define-public python-cycler
3814 (package
3815 (name "python-cycler")
3816 (version "0.10.0")
3817 (source (origin
3818 (method url-fetch)
3819 (uri (pypi-uri "cycler" version))
3820 (sha256
3821 (base32
3822 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3823 (build-system python-build-system)
3824 (arguments
3825 ;; XXX: The current version requires 'coveralls' which we don't have.
3826 ;; Enable this for the next release which uses 'python-pytest'.
3827 '(#:tests? #f))
3828 (propagated-inputs
3829 `(("python-six" ,python-six)))
3830 (home-page "http://matplotlib.org/cycler/")
3831 (synopsis "Composable keyword argument iterator")
3832 (description
3833 "When using @code{matplotlib} and plotting more than one line, it is
3834common to want to be able to want to be able to cycle over one or more artist
3835styles; but the plotting logic can quickly become involved.
3836To address this and enable easy cycling over arbitrary @code{kwargs}, the
3837@code{Cycler} class was developed.")
3838 (license license:bsd-3)))
3839
3840(define-public python2-cycler
3841 (package-with-python2 python-cycler))
3842
2aa6d3ae
TD
3843(define-public python-colorspacious
3844 (package
3845 (name "python-colorspacious")
3846 (version "1.1.0")
3847 (source
3848 (origin
3849 (method url-fetch)
3850 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3851 version ".tar.gz"))
3852 (file-name (string-append name "-" version))
3853 (sha256
3854 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3855 (build-system python-build-system)
3856 (propagated-inputs
3857 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
3858 (native-inputs
3859 `(("python-nose" ,python-nose)))
3860 (arguments
3861 `(#:phases
3862 (modify-phases %standard-phases
3863 (replace 'check
3864 (lambda _
3865 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
3866 (home-page "https://github.com/njsmith/colorspacious")
3867 (synopsis "Python library for colorspace conversions")
3868 (description "@code{colorspacious} is a Python library that lets you
3869convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3870 (license license:expat)))
3871
3872(define-public python2-colorspacious
3873 (package-with-python2 python-colorspacious))
3874
1c65314c
FB
3875(define-public python-matplotlib
3876 (package
3877 (name "python-matplotlib")
4535a93a 3878 (version "2.0.0")
1c65314c
FB
3879 (source
3880 (origin
3881 (method url-fetch)
4535a93a
TD
3882 (uri (string-append
3883 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3884 (file-name (string-append name "-" version ".tar.gz"))
1c65314c
FB
3885 (sha256
3886 (base32
4535a93a 3887 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
1c65314c 3888 (build-system python-build-system)
25f9a068 3889 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
3890 `(("python-cycler" ,python-cycler)
3891 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
3892 ("python-pygobject" ,python-pygobject)
3893 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3894 ("python-tkinter" ,python "tk")
22d7360b 3895 ("python-dateutil" ,python-dateutil)
7ccb71e0 3896 ("python-numpy" ,python-numpy)
ca33a3ad
HG
3897 ("python-pillow" ,python-pillow)
3898 ("python-pytz" ,python-pytz)
3899 ("python-six" ,python-six)
25f9a068
FB
3900 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3901 ;; from 'gtk+') provides the required 'typelib' files used by
3902 ;; 'gobject-introspection'. The location of these files is set with the
3903 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3904 ;; is done automatically by a 'native-search-path' procedure. However,
3905 ;; at run-time the user must set this variable as follows:
3906 ;;
3907 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3908 ("gtk+" ,gtk+)
3909 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3910 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3911 ;; object. For this reason we need to import both libraries.
3912 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3913 ("python-pycairo" ,python-pycairo)
3914 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3915 (inputs
ca33a3ad 3916 `(("libpng" ,libpng)
1c65314c
FB
3917 ("imagemagick" ,imagemagick)
3918 ("freetype" ,freetype)
25f9a068
FB
3919 ("cairo" ,cairo)
3920 ("glib" ,glib)
1c65314c 3921 ;; FIXME: Add backends when available.
1c65314c 3922 ;("python-wxpython" ,python-wxpython)
4535a93a 3923 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
3924 ("tcl" ,tcl)
3925 ("tk" ,tk)))
1c65314c
FB
3926 (native-inputs
3927 `(("pkg-config" ,pkg-config)
ca33a3ad 3928 ("python-nose" ,python-nose)
4535a93a 3929 ("python-mock" ,python-mock)))
1c65314c
FB
3930 (arguments
3931 `(#:phases
42b7009a
DM
3932 (modify-phases %standard-phases
3933 (add-before 'build 'configure-environment
3934 (lambda* (#:key outputs inputs #:allow-other-keys)
3935 (let ((cairo (assoc-ref inputs "cairo"))
3936 (gtk+ (assoc-ref inputs "gtk+")))
3937 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3938 ;; has not effect.
3939 (setenv "LD_LIBRARY_PATH"
3940 (string-append cairo "/lib:" gtk+ "/lib"))
3941 (setenv "HOME" (getcwd))
3942 (call-with-output-file "setup.cfg"
3943 (lambda (port)
3944 (format port "[directories]~%
1bbc659f 3945basedirlist = ~a,~a~%
57b7b8cd 3946 [rc_options]~%
1bbc659f
FB
3947backend = TkAgg~%"
3948 (assoc-ref inputs "tcl")
4535a93a
TD
3949 (assoc-ref inputs "tk")))))
3950 #t)))))
1c65314c
FB
3951 (home-page "http://matplotlib.org")
3952 (synopsis "2D plotting library for Python")
3953 (description
3954 "Matplotlib is a Python 2D plotting library which produces publication
3955quality figures in a variety of hardcopy formats and interactive environments
3956across platforms. Matplotlib can be used in Python scripts, the python and
3957ipython shell, web application servers, and six graphical user interface
3958toolkits.")
3f641af0 3959 (license license:psfl)
57b7b8cd 3960 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3961
764c077b 3962(define-public python2-matplotlib
57b7b8cd
LC
3963 (let ((matplotlib (package-with-python2
3964 (strip-python2-variant python-matplotlib))))
764c077b 3965 (package (inherit matplotlib)
88c26834
AE
3966 ;; Make sure to use special packages for Python 2 instead
3967 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3968 (propagated-inputs
7ca0dbc3 3969 `(("python2-pycairo" ,python2-pycairo)
4535a93a 3970 ("python2-functools32" ,python2-functools32)
764c077b 3971 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 3972 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
3973 ("python2-tkinter" ,python-2 "tk")
3974 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3975 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3976
4535a93a
TD
3977(define-public python-matplotlib-documentation
3978 (package
3979 (name "python-matplotlib-documentation")
3980 (version (package-version python-matplotlib))
3981 (source (package-source python-matplotlib))
3982 (build-system python-build-system)
3983 (native-inputs
3984 `(("python-matplotlib" ,python-matplotlib)
3985 ("python-colorspacious" ,python-colorspacious)
3986 ("python-sphinx" ,python-sphinx)
3987 ("python-numpydoc" ,python-numpydoc)
3988 ("python-ipython" ,python-ipython)
1eaaea41
TD
3989 ("python-mock" ,python-mock)
3990 ("graphviz" ,graphviz)
4535a93a
TD
3991 ("texlive" ,texlive)
3992 ("texinfo" ,texinfo)
3993 ,@(package-native-inputs python-matplotlib)))
3994 (arguments
3995 `(#:tests? #f ; we're only generating documentation
3996 #:phases
3997 (modify-phases %standard-phases
1eaaea41
TD
3998 (replace 'build
3999 (lambda _
4000 (chdir "doc")
4001 ;; Produce pdf in 'A4' format.
4002 (substitute* "conf.py"
4003 (("latex_paper_size = 'letter'") "")
4004 ;; latex_paper_size is deprecated -> set paper size using
4005 ;; latex_elements
4006 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4007 ;; insert at a point where latex_elements{} is defined:
4008 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4009 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4010 (replace 'install
42b7009a 4011 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4012 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4013 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4014 (info (string-append data "/info"))
4015 (html (string-append doc "/html")))
1eaaea41
TD
4016 (mkdir-p html)
4017 (mkdir-p info)
4018 (copy-recursively "build/html" html)
4019 (symlink (string-append html "/_images")
4020 (string-append info "/matplotlib-figures"))
4021 (with-directory-excursion "build/texinfo"
4022 (substitute* "matplotlib.texi"
4023 (("@image\\{([^,]*)" all file)
4024 (string-append "@image{matplotlib-figures/" file)))
18b31516 4025 (symlink (string-append html "/_images")
1eaaea41
TD
4026 "./matplotlib-figures")
4027 (system* "makeinfo" "--no-split"
4028 "-o" "matplotlib.info" "matplotlib.texi"))
4029 (copy-file "build/texinfo/matplotlib.info"
4030 (string-append info "/matplotlib.info"))
4031 (copy-file "build/latex/Matplotlib.pdf"
4032 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4033 #t)))))
4034 (home-page (package-home-page python-matplotlib))
4035 (synopsis "Documentation for the python-matplotlib package")
4036 (description (package-description python-matplotlib))
4037 (license (package-license python-matplotlib))))
1c65314c 4038
4535a93a
TD
4039(define-public python2-matplotlib-documentation
4040 (package-with-python2 python-matplotlib-documentation))
94914805 4041
0dde6232
RW
4042(define-public python2-pysnptools
4043 (package
4044 (name "python2-pysnptools")
a800018e 4045 (version "0.3.9")
0dde6232
RW
4046 (source
4047 (origin
4048 (method url-fetch)
3f2e9675 4049 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4050 (sha256
4051 (base32
a800018e 4052 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4053 (build-system python-build-system)
4054 (arguments
4055 `(#:python ,python-2)) ; only Python 2.7 is supported
4056 (propagated-inputs
4057 `(("python2-numpy" ,python2-numpy)
4058 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4059 ("python2-pandas" ,python2-pandas)))
4060 (native-inputs
4061 `(("python2-cython" ,python2-cython)))
0dde6232 4062 (native-inputs
f3b98f4f 4063 `(("unzip" ,unzip)))
0dde6232
RW
4064 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4065 (synopsis "Library for reading and manipulating genetic data")
4066 (description
4067 "PySnpTools is a library for reading and manipulating genetic data. It
4068can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4069those files. It can also efficiently manipulate ranges of integers using set
4070operators such as union, intersection, and difference.")
3f641af0 4071 (license license:asl2.0)))
0dde6232 4072
c9b1b4f9
RW
4073(define-public python-rpy2
4074 (package
4075 (name "python-rpy2")
ec3bcbc7 4076 (version "2.7.6")
c9b1b4f9
RW
4077 (source
4078 (origin
4079 (method url-fetch)
ec3bcbc7 4080 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4081 (sha256
4082 (base32
ec3bcbc7 4083 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4084 (build-system python-build-system)
444464ec
MB
4085 (arguments
4086 '(#:phases
4087 (modify-phases %standard-phases
4088 (delete 'check)
4089 (add-after 'install 'check
4090 (lambda* (#:key outputs inputs #:allow-other-keys)
4091 ;; It's easier to run tests after install.
4092 ;; Make installed package available for running the tests
4093 (add-installed-pythonpath inputs outputs)
4094 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4095 (propagated-inputs
4096 `(("python-six" ,python-six)))
c9b1b4f9 4097 (inputs
482d9591 4098 `(("readline" ,readline)
c9b1b4f9
RW
4099 ("icu4c" ,icu4c)
4100 ("pcre" ,pcre)
2d7c4ae3 4101 ("r-minimal" ,r-minimal)
aeb64f3c 4102 ("r-survival" ,r-survival)))
c9b1b4f9 4103 (native-inputs
f3b98f4f 4104 `(("zlib" ,zlib)))
c9b1b4f9
RW
4105 (home-page "http://rpy.sourceforge.net/")
4106 (synopsis "Python interface to the R language")
4107 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4108low-level interface to R from Python, a proposed high-level interface,
4109including wrappers to graphical libraries, as well as R-like structures and
4110functions.")
3f641af0 4111 (license license:gpl3+)))
c9b1b4f9
RW
4112
4113(define-public python2-rpy2
4114 (let ((rpy2 (package-with-python2 python-rpy2)))
4115 (package (inherit rpy2)
d6abd094 4116 (propagated-inputs
c9b1b4f9 4117 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4118 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4119
bb986599
FB
4120(define-public python-scipy
4121 (package
4122 (name "python-scipy")
35093253 4123 (version "0.18.1")
bb986599
FB
4124 (source
4125 (origin
4126 (method url-fetch)
35093253
TD
4127 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4128 version ".tar.gz"))
4129 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4130 (sha256
4131 (base32
35093253 4132 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4133 (build-system python-build-system)
dd86c0d1 4134 (propagated-inputs
bb986599
FB
4135 `(("python-numpy" ,python-numpy)
4136 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4137 ("python-pyparsing" ,python-pyparsing)))
4138 (inputs
4139 `(("lapack" ,lapack)
719b01c1 4140 ("openblas" ,openblas)))
bb986599 4141 (native-inputs
35093253
TD
4142 `(("python-cython" ,python-cython)
4143 ("python-nose" ,python-nose)
dd86c0d1 4144 ("python-sphinx" ,python-sphinx)
5248d49e 4145 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4146 ("gfortran" ,gfortran)
bb986599
FB
4147 ("perl" ,perl)))
4148 (outputs '("out" "doc"))
4149 (arguments
4150 `(#:phases
16ca6aaa 4151 (modify-phases %standard-phases
16ca6aaa
MB
4152 (add-before 'build 'configure-openblas
4153 (lambda* (#:key inputs #:allow-other-keys)
4154 (call-with-output-file "site.cfg"
4155 (lambda (port)
4156 (format port
4157 "[blas]
719b01c1
RW
4158libraries = openblas
4159library_dirs = ~a/lib
4160include_dirs = ~a/include
d548e6aa
HG
4161
4162# backslash-n to make emacs happy
4163\n[atlas]
719b01c1
RW
4164library_dirs = ~a/lib
4165atlas_libs = openblas
4166"
16ca6aaa
MB
4167 (assoc-ref inputs "openblas")
4168 (assoc-ref inputs "openblas")
4169 (assoc-ref inputs "openblas"))))
db967b64 4170 #t))
35093253
TD
4171 (add-after 'install 'install-doc
4172 (lambda* (#:key inputs outputs #:allow-other-keys)
4173 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4174 (doc (string-append data "/doc/" ,name "-" ,version))
4175 (html (string-append doc "/html"))
4176 (pyver ,(string-append "PYVER=")))
4177 ;; Make installed package available for building the
4178 ;; documentation
4179 (add-installed-pythonpath inputs outputs)
4180 (with-directory-excursion "doc"
4181 ;; Fix generation of images for mathematical expressions.
4182 (substitute* (find-files "source" "conf\\.py")
4183 (("pngmath_use_preview = True")
4184 "pngmath_use_preview = False"))
4185 (mkdir-p html)
4186 (system* "make" "html" pyver)
4187 (with-directory-excursion "build/html"
4188 (for-each (lambda (file)
4189 (let* ((dir (dirname file))
4190 (tgt-dir (string-append html "/" dir)))
4191 (install-file file html)))
4192 (find-files "." ".*")))))
4193 #t))
4194 (add-after 'unpack 'fix-tests
4195 (lambda _
4196 (substitute* "scipy/integrate/tests/test_quadpack.py"
4197 (("libm.so") "libm.so.6"))
4198 #t))
4199 ;; Tests can only be run after the library has been installed and not
4200 ;; within the source directory.
4201 (delete 'check)
4202 (add-after 'install 'check
4203 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4204 (add-installed-pythonpath inputs outputs)
35093253
TD
4205 (with-directory-excursion "/tmp"
4206 (zero? (system* "python" "-c"
4207 "import scipy; scipy.test('full')")))
4208 #t)))))
bb986599
FB
4209 (home-page "http://www.scipy.org/")
4210 (synopsis "The Scipy library provides efficient numerical routines")
4211 (description "The SciPy library is one of the core packages that make up
4212the SciPy stack. It provides many user-friendly and efficient numerical
4213routines such as routines for numerical integration and optimization.")
9200fe14 4214 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4215 (license license:bsd-3)))
bb986599 4216
764c077b 4217(define-public python2-scipy
35093253
TD
4218 (package-with-python2
4219 (strip-python2-variant python-scipy)))
bb986599 4220
e537c917
CB
4221(define-public python-sockjs-tornado
4222 (package
4223 (name "python-sockjs-tornado")
4224 (version "1.0.3")
4225 (source
4226 (origin
4227 (method url-fetch)
4228 (uri (pypi-uri "sockjs-tornado" version))
4229 (sha256
4230 (base32
4231 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4232 (build-system python-build-system)
4233 (arguments
4234 `(;; There are no tests, and running the test phase requires missing
4235 ;; dependencies
4236 #:tests? #f))
4237 (propagated-inputs
4238 `(("python-tornado" ,python-tornado)))
4239 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4240 (synopsis
4241 "SockJS python server implementation on top of Tornado framework")
4242 (description
4243 "SockJS-tornado provides the server side counterpart to a SockJS client
4244library, through the Tornado framework.
4245
4246SockJS provides a low latency, full duplex, cross-domain communication channel
4247between a web browser and web server.")
4248 (license license:expat)))
4249
4250(define-public python2-sockjs-tornado
4251 (package-with-python2 python-sockjs-tornado))
4252
73acc193 4253(define-public python-socksipy-branch
4254 (package
4255 (name "python-socksipy-branch")
4256 (version "1.01")
4257 (source
4258 (origin
4259 (method url-fetch)
4260 (uri (pypi-uri "SocksiPy-branch" version))
4261 (sha256
4262 (base32
4263 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4264 (build-system python-build-system)
4265 (arguments
4266 `(#:tests? #f)) ; There are no tests
4267 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4268 (synopsis "Python SOCKS module")
4269 (description
4270 "SocksiPy - A Python SOCKS client module. It provides a
4271socket-like interface that supports connections to any TCP
4272service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4273The original version was developed by Dan Haim, this is a
4274branch created by Mario Vilas to address some open issues,
4275as the original project seems to have been abandoned circa 2007.")
4276 (license license:bsd-3)))
4277
4278(define-public python2-socksipy-branch
4279 (package-with-python2 python-socksipy-branch))
4280
94914805
EB
4281(define-public python-sqlalchemy
4282 (package
4283 (name "python-sqlalchemy")
a4ba286b 4284 (version "1.0.12")
94914805
EB
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (string-append "https://pypi.python.org/packages/source/S/"
4289 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4290 (sha256
4291 (base32
a4ba286b 4292 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4293 (build-system python-build-system)
4294 (native-inputs
4295 `(("python-cython" ,python-cython) ;for c extensions
4296 ("python-pytest" ,python-pytest)
4297 ("python-mock" ,python-mock))) ;for tests
4298 (arguments
4299 `(#:phases (alist-replace
4300 'check
4301 (lambda _ (zero? (system* "py.test")))
4302 %standard-phases)))
4303 (home-page "http://www.sqlalchemy.org")
4304 (synopsis "Database abstraction library")
4305 (description
4306 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4307gives application developers the full power and flexibility of SQL. It
4308provides a full suite of well known enterprise-level persistence patterns,
4309designed for efficient and high-performing database access, adapted into a
4310simple and Pythonic domain language.")
3f641af0 4311 (license license:x11)))
94914805
EB
4312
4313(define-public python2-sqlalchemy
4314 (package-with-python2 python-sqlalchemy))
c937562e 4315
4a093330
DM
4316(define-public python-pycodestyle
4317 (package
4318 (name "python-pycodestyle")
4319 (version "2.0.0")
4320 (source
4321 (origin
4322 (method url-fetch)
4323 (uri (pypi-uri "pycodestyle" version))
4324 (sha256
4325 (base32
4326 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4327 (build-system python-build-system)
4328 (home-page "https://pycodestyle.readthedocs.io/")
4329 (synopsis "Python style guide checker")
4330 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4331Python code against some of the style conventions in
4332@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4333 (license license:expat)))
4a093330
DM
4334
4335(define-public python2-pycodestyle
f210e944 4336 (package-with-python2 python-pycodestyle))
b91912c4
DM
4337
4338(define-public python-orderedmultidict
4339 (package
4340 (name "python-orderedmultidict")
9e2802cb 4341 (version "0.7.11")
b91912c4
DM
4342 (source
4343 (origin
4344 (method url-fetch)
4345 (uri (pypi-uri "orderedmultidict" version))
4346 (sha256
4347 (base32
9e2802cb 4348 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4349 (build-system python-build-system)
4350 (arguments
4351 `(#:phases
4352 (modify-phases %standard-phases
4353 (add-after 'unpack 'fix-tests
4354 (lambda _
4355 ;; The package uses nosetest for running the tests.
4356 ;; Adding this initfile allows to run the test suite
4357 ;; without requiring nosetest.
4358 (zero? (system* "touch" "tests/__init__.py")))))))
4359 (propagated-inputs
4360 `(("python-six" ,python-six)))
4361 (native-inputs
4362 `(("python-pycodestyle" ,python-pycodestyle)))
4363 (home-page "https://github.com/gruns/orderedmultidict")
4364 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4365 (description "This package contains a library for ordered multivalue
4366dictionaries. A multivalue dictionary is a dictionary that can store
4367multiple values for the same key. An ordered multivalue dictionary is a
4368multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4369 (license license:unlicense)))
b91912c4
DM
4370
4371(define-public python2-orderedmultidict
f210e944 4372 (package-with-python2 python-orderedmultidict))
9dede065
DM
4373
4374(define-public python-furl
4375 (package
4376 (name "python-furl")
4377 (version "0.5.6")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (pypi-uri "furl" version))
4382 (sha256
4383 (base32
4384 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4385 (build-system python-build-system)
4386 (propagated-inputs
4387 `(("python-six" ,python-six)
4388 ("python-orderedmultidict" ,python-orderedmultidict)))
4389 (native-inputs
4390 `(("python-pycodestyle" ,python-pycodestyle)))
4391 (home-page "https://github.com/gruns/furl")
4392 (synopsis "URL manipulation in Python")
4393 (description "Furl provides an easy-to-use alternative to the
4394@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4395 (license license:unlicense)))
9dede065
DM
4396
4397(define-public python2-furl
f210e944 4398 (package-with-python2 python-furl))
462bf271
DM
4399
4400(define-public python-flask-babel
4401 (package
4402 (name "python-flask-babel")
4403 (version "0.11.1")
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri (pypi-uri "Flask-Babel" version))
4408 (sha256
4409 (base32
4410 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4411 (build-system python-build-system)
4412 (propagated-inputs
4413 `(("python-flask" ,python-flask)
4414 ("python-babel" ,python-babel)
4415 ("python-jinja2" ,python-jinja2)
4416 ("python-pytz" ,python-pytz)))
4417 (home-page "https://github.com/python-babel/flask-babel")
4418 (synopsis "Add i18n/l10n support to Flask applications")
4419 (description "This package implements internationalization and localization
4420support for Flask. This is based on the Python babel module as well as pytz -
4421both of which are installed automatically if you install this library.")
f210e944 4422 (license license:bsd-3)))
462bf271
DM
4423
4424(define-public python2-flask-babel
f210e944 4425 (package-with-python2 python-flask-babel))
4a093330 4426
de2966cf
EF
4427(define-public python-sqlalchemy-utils
4428 (package
4429 (name "python-sqlalchemy-utils")
fd2662e9 4430 (version "0.32.13")
de2966cf
EF
4431 (source
4432 (origin
4433 (method url-fetch)
4434 (uri (pypi-uri "SQLAlchemy-Utils" version))
4435 (sha256
4436 (base32
fd2662e9 4437 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4438 (build-system python-build-system)
35d56b7b
MB
4439 (arguments
4440 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4441 ;; #:phases
4442 ;; (modify-phases %standard-phases
4443 ;; (replace 'check
4444 ;; (lambda _
4445 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4446 (propagated-inputs
de2966cf
EF
4447 `(("python-six" ,python-six)
4448 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4449 (native-inputs
22d7360b 4450 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4451 ("python-flexmock" ,python-flexmock)
4452 ("python-psycopg2" ,python-psycopg2)
4453 ("python-pytest" ,python-pytest)
4454 ("python-pytz" ,python-pytz)))
de2966cf
EF
4455 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4456 (synopsis "Various utility functions for SQLAlchemy")
4457 (description
4458 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4459for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4460
4461You might also want to install the following optional dependencies:
4462@enumerate
4463@item @code{python-passlib}
4464@item @code{python-babel}
4465@item @code{python-cryptography}
4466@item @code{python-pytz}
4467@item @code{python-psycopg2}
4468@item @code{python-furl}
4469@item @code{python-flask-babel}
4470@end enumerate
4471")
de2966cf
EF
4472 (license license:bsd-3)))
4473
4474(define-public python2-sqlalchemy-utils
f210e944 4475 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4476
af5a4602
CAW
4477(define-public python-alembic
4478 (package
4479 (name "python-alembic")
4418990d 4480 (version "0.8.10")
af5a4602
CAW
4481 (source
4482 (origin
4483 (method url-fetch)
4484 (uri (pypi-uri "alembic" version))
4485 (sha256
4486 (base32
4418990d 4487 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4488 (build-system python-build-system)
4489 (native-inputs
4490 `(("python-mock" ,python-mock)
4491 ("python-pytest-cov" ,python-pytest-cov)))
4492 (propagated-inputs
4493 `(("python-sqlalchemy" ,python-sqlalchemy)
4494 ("python-mako" ,python-mako)
4495 ("python-editor" ,python-editor)))
4496 (home-page "http://bitbucket.org/zzzeek/alembic")
4497 (synopsis
4498 "Database migration tool for SQLAlchemy")
4499 (description
4500 "Alembic is a lightweight database migration tool for usage with the
4501SQLAlchemy Database Toolkit for Python.")
f210e944 4502 (license license:expat)))
af5a4602
CAW
4503
4504(define-public python2-alembic
f210e944 4505 (package-with-python2 python-alembic))
af5a4602 4506
138adbbe
TD
4507(define-public python-autopep8
4508 (package
4509 (name "python-autopep8")
4510 (version "1.2.4")
4511 (source
4512 (origin
4513 (method url-fetch)
4514 (uri (pypi-uri "autopep8" version))
4515 (sha256
4516 (base32
4517 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4518 (build-system python-build-system)
4519 (propagated-inputs
4520 `(("python-pep8" ,python-pep8)))
4521 (home-page "https://github.com/hhatto/autopep8")
4522 (synopsis "Format Python code according to the PEP 8 style guide")
4523 (description
4524 "@code{autopep8} automatically formats Python code to conform to
4525the PEP 8 style guide. It uses the pycodestyle utility to determine
4526what parts of the code needs to be formatted. @code{autopep8} is
4527capable of fixing most of the formatting issues that can be reported
4528by pycodestyle.")
4529 (license (license:non-copyleft
4530 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4531
4532(define-public python2-autopep8
4533 (package-with-python2 python-autopep8))
4534
1671c07c
EB
4535(define-public python-distutils-extra
4536 (package
4537 (name "python-distutils-extra")
4538 (version "2.38")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4543 version "/+download/python-distutils-extra-"
4544 version ".tar.gz"))
4545 (sha256
4546 (base32
4547 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4548 (build-system python-build-system)
1671c07c
EB
4549 (home-page "https://launchpad.net/python-distutils-extra/")
4550 (synopsis "Enhancements to Python's distutils")
4551 (description
4552 "The python-distutils-extra module enables you to easily integrate
4553gettext support, themed icons, and scrollkeeper-based documentation into
4554Python's distutils.")
3f641af0 4555 (license license:gpl2)))
1671c07c
EB
4556
4557(define-public python2-distutils-extra
4558 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4559
4560(define-public python2-elib.intl
4561 (package
4562 (name "python2-elib.intl")
4563 (version "0.0.3")
4564 (source
4565 (origin
4566 ;; This project doesn't tag releases or publish tarballs, so we take
4567 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4568 (method git-fetch)
4569 (uri (git-reference
4570 (url "https://github.com/dieterv/elib.intl.git")
4571 (commit "d09997cfef")))
4572 (sha256
4573 (base32
4574 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4575 (build-system python-build-system)
ea5456c8
EB
4576 (arguments
4577 ;; incompatible with Python 3 (exception syntax)
4578 `(#:python ,python-2
b41a05ce 4579 #:tests? #f))
ea5456c8
EB
4580 (home-page "https://github.com/dieterv/elib.intl")
4581 (synopsis "Enhanced internationalization for Python")
4582 (description
4583 "The elib.intl module provides enhanced internationalization (I18N)
4584services for your Python modules and applications.")
3f641af0 4585 (license license:lgpl3+)))
ea5456c8 4586
c937562e
EB
4587(define-public python-pillow
4588 (package
4589 (name "python-pillow")
aba5182c 4590 (version "3.3.3")
c937562e
EB
4591 (source
4592 (origin
4593 (method url-fetch)
f1d9231d 4594 (uri (pypi-uri "Pillow" version))
a9681c74 4595 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4596 (sha256
4597 (base32
aba5182c 4598 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4599 (build-system python-build-system)
4600 (native-inputs
f3b98f4f 4601 `(("python-nose" ,python-nose)))
c937562e 4602 (inputs
5ff408d9
SB
4603 `(("freetype" ,freetype)
4604 ("lcms" ,lcms)
c937562e
EB
4605 ("zlib" ,zlib)
4606 ("libjpeg" ,libjpeg)
4607 ("openjpeg" ,openjpeg)
5ff408d9
SB
4608 ("libtiff" ,libtiff)
4609 ("libwebp" ,libwebp)))
c937562e 4610 (arguments
e5358a6b 4611 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4612 (add-after
4613 'install 'check-installed
6151120a 4614 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4615 (begin
4616 (setenv "HOME" (getcwd))
6151120a
HG
4617 ;; Make installed package available for running the
4618 ;; tests
4619 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4620 (and (zero? (system* "python" "selftest.py"
4621 "--installed"))
4622 (zero? (system* "python" "test-installed.py"))))))
4623 (delete 'check))))
c937562e
EB
4624 (home-page "https://pypi.python.org/pypi/Pillow")
4625 (synopsis "Fork of the Python Imaging Library")
4626 (description
4627 "The Python Imaging Library adds image processing capabilities to your
4628Python interpreter. This library provides extensive file format support, an
4629efficient internal representation, and fairly powerful image processing
4630capabilities. The core image library is designed for fast access to data
4631stored in a few basic pixel formats. It should provide a solid foundation for
4632a general image processing tool.")
3f641af0 4633 (license (license:x11-style
c937562e
EB
4634 "http://www.pythonware.com/products/pil/license.htm"
4635 "The PIL Software License"))))
4636
4637(define-public python2-pillow
4638 (package-with-python2 python-pillow))
bb986599 4639
a415f036
FB
4640(define-public python-pycparser
4641 (package
4642 (name "python-pycparser")
5043b20d 4643 (version "2.17")
a415f036
FB
4644 (source
4645 (origin
4646 (method url-fetch)
38eb6919 4647 (uri (pypi-uri "pycparser" version))
a415f036
FB
4648 (sha256
4649 (base32
5043b20d 4650 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4651 (outputs '("out" "doc"))
4652 (build-system python-build-system)
4653 (native-inputs
f3b98f4f 4654 `(("pkg-config" ,pkg-config)))
a415f036 4655 (arguments
89b5c60e 4656 `(#:phases
819939cb
TGR
4657 (modify-phases %standard-phases
4658 (replace 'check
4659 (lambda _
4660 (with-directory-excursion "tests"
4661 (zero? (system* "python" "all_tests.py")))))
4662 (add-after 'install 'install-doc
4663 (lambda* (#:key outputs #:allow-other-keys)
4664 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4665 (doc (string-append data "/doc/" ,name "-" ,version))
4666 (examples (string-append doc "/examples")))
4667 (mkdir-p examples)
4668 (for-each (lambda (file)
4669 (copy-file (string-append "." file)
4670 (string-append doc file)))
4671 '("/README.rst" "/CHANGES" "/LICENSE"))
4672 (copy-recursively "examples" examples)))))))
a415f036
FB
4673 (home-page "https://github.com/eliben/pycparser")
4674 (synopsis "C parser in Python")
4675 (description
4676 "Pycparser is a complete parser of the C language, written in pure Python
4677using the PLY parsing library. It parses C code into an AST and can serve as
4678a front-end for C compilers or analysis tools.")
3f641af0 4679 (license license:bsd-3)))
a415f036
FB
4680
4681(define-public python2-pycparser
4682 (package-with-python2 python-pycparser))
57c3f716
FB
4683
4684(define-public python-cffi
4685 (package
4686 (name "python-cffi")
2d3a437c 4687 (version "1.4.2")
57c3f716
FB
4688 (source
4689 (origin
4690 (method url-fetch)
2d3a437c 4691 (uri (pypi-uri "cffi" version))
89b5c60e 4692 (sha256
2d3a437c 4693 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4694 (build-system python-build-system)
4695 (outputs '("out" "doc"))
4696 (inputs
4697 `(("libffi" ,libffi)))
4698 (propagated-inputs ; required at run-time
4699 `(("python-pycparser" ,python-pycparser)))
4700 (native-inputs
4701 `(("pkg-config" ,pkg-config)
4702 ("python-sphinx" ,python-sphinx)
f3b98f4f 4703 ("python-pytest" ,python-pytest)))
57c3f716 4704 (arguments
4179f952 4705 `(#:phases
57c3f716
FB
4706 (alist-cons-after
4707 'install 'install-doc
4708 (lambda* (#:key outputs #:allow-other-keys)
4709 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4710 (doc (string-append data "/doc/" ,name "-" ,version))
4711 (html (string-append doc "/html")))
4712 (with-directory-excursion "doc"
4713 (system* "make" "html")
4714 (mkdir-p html)
4715 (copy-recursively "build/html" html))
4716 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4717 %standard-phases)))
4718 (home-page "http://cffi.readthedocs.org")
4719 (synopsis "Foreign function interface for Python")
4720 (description
4721 "Foreign Function Interface for Python calling C code.")
bd3fa666 4722 (license license:expat)))
57c3f716
FB
4723
4724(define-public python2-cffi
4725 (package-with-python2 python-cffi))
6fa14469
FB
4726
4727(define-public python-xcffib
4728 (package
4729 (name "python-xcffib")
4730 (version "0.1.9")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri (string-append "https://pypi.python.org/packages/source/x/"
4735 "xcffib/xcffib-" version ".tar.gz"))
4736 (sha256
4737 (base32
4738 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4739 (build-system python-build-system)
4740 (inputs
482d9591 4741 `(("libxcb" ,libxcb)))
6fa14469 4742 (propagated-inputs
482d9591
HG
4743 `(("python-cffi" ,python-cffi) ; used at run time
4744 ("python-six" ,python-six)))
6fa14469 4745 (arguments
e2816ac7
MB
4746 `(;; FIXME: Tests cannot load libxcb.so.1
4747 #:tests? #f
4748 #:phases
c8cd850c
MB
4749 (modify-phases %standard-phases
4750 (add-after 'install 'install-doc
4751 (lambda* (#:key outputs #:allow-other-keys)
4752 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4753 "/doc/" ,name "-" ,version)))
4754 (mkdir-p doc)
4755 (copy-file "README.md"
4756 (string-append doc "/README.md"))
4757 #t))))))
6fa14469
FB
4758 (home-page "https://github.com/tych0/xcffib")
4759 (synopsis "XCB Python bindings")
4760 (description
4761 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4762support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4763 (license license:expat)))
6fa14469
FB
4764
4765(define-public python2-xcffib
4766 (package-with-python2 python-xcffib))
4767
9e099723
FB
4768(define-public python-cairocffi
4769 (package
4770 (name "python-cairocffi")
4771 (version "0.6")
4772 (source
4773 (origin
4774 (method url-fetch)
4775 ;; The archive on pypi is missing the 'utils' directory!
4776 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4777 version ".tar.gz"))
f586c877 4778 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4779 (sha256
4780 (base32
4781 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4782 (build-system python-build-system)
4783 (outputs '("out" "doc"))
4784 (inputs
4785 `(("gdk-pixbuf" ,gdk-pixbuf)
4786 ("cairo" ,cairo)))
4787 (native-inputs
4788 `(("pkg-config" ,pkg-config)
4789 ("python-sphinx" ,python-sphinx)
f3b98f4f 4790 ("python-docutils" ,python-docutils)))
9e099723
FB
4791 (propagated-inputs
4792 `(("python-xcffib" ,python-xcffib))) ; used at run time
4793 (arguments
a792e1aa
MB
4794 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4795 #:tests? #f
4796 #:phases
6734c7ba
MB
4797 (modify-phases %standard-phases
4798 (add-after 'install 'install-doc
4799 (lambda* (#:key inputs outputs #:allow-other-keys)
4800 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4801 (doc (string-append data "/doc/" ,name "-" ,version))
4802 (html (string-append doc "/html")))
4803 (setenv "LD_LIBRARY_PATH"
4804 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4805 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4806 (setenv "LANG" "en_US.UTF-8")
4807 (mkdir-p html)
4808 (for-each (lambda (file)
4809 (copy-file (string-append "." file)
4810 (string-append doc file)))
4811 '("/README.rst" "/CHANGES" "/LICENSE"))
4812 (system* "python" "setup.py" "build_sphinx")
4813 (copy-recursively "docs/_build/html" html)
4814 #t))))))
9e099723
FB
4815 (home-page "https://github.com/SimonSapin/cairocffi")
4816 (synopsis "Python bindings and object-oriented API for Cairo")
4817 (description
4818 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4819Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4820graphics library with support for multiple backends including image buffers,
4821PNG, PostScript, PDF, and SVG file output.")
3f641af0 4822 (license license:bsd-3)))
9e099723
FB
4823
4824(define-public python2-cairocffi
4825 (package-with-python2 python-cairocffi))
4826
3cff95cb
RW
4827(define-public python-decorator
4828 (package
4829 (name "python-decorator")
d79fa7da 4830 (version "4.0.10")
3cff95cb
RW
4831 (source
4832 (origin
4833 (method url-fetch)
e21338be 4834 (uri (pypi-uri "decorator" version))
3cff95cb 4835 (sha256
d79fa7da 4836 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4837 (build-system python-build-system)
4838 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4839 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4840 (synopsis "Python module to simplify usage of decorators")
4841 (description
4842 "The aim of the decorator module is to simplify the usage of decorators
4843for the average programmer, and to popularize decorators usage giving examples
4844of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4845etc. The core of this module is a decorator factory.")
4846 (license license:expat)))
4847
4848(define-public python2-decorator
4849 (package-with-python2 python-decorator))
4850
2c0499ad
RW
4851(define-public python-drmaa
4852 (package
4853 (name "python-drmaa")
7c427932 4854 (version "0.7.7")
2c0499ad
RW
4855 (source
4856 (origin
4857 (method url-fetch)
4858 (uri (string-append
4859 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4860 version ".tar.gz"))
4861 (sha256
7c427932 4862 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
4863 (build-system python-build-system)
4864 ;; The test suite requires libdrmaa which is provided by the cluster
4865 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4866 ;; should be set to the path of the libdrmaa library.
4867 (arguments '(#:tests? #f))
4868 (native-inputs
f3b98f4f 4869 `(("python-nose" ,python-nose)))
2c0499ad
RW
4870 (home-page "https://pypi.python.org/pypi/drmaa")
4871 (synopsis "Python bindings for the DRMAA library")
4872 (description
4873 "A Python package for Distributed Resource Management (DRM) job
4874submission and control. This package is an implementation of the DRMAA 1.0
4875Python language binding specification.")
3f641af0 4876 (license license:bsd-3)))
2c0499ad
RW
4877
4878(define-public python2-drmaa
4879 (package-with-python2 python-drmaa))
4880
d05c6da0
RW
4881(define-public python-gridmap
4882 (package
4883 (name "python-gridmap")
4884 (version "0.13.0")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (string-append
4889 "https://github.com/pygridtools/gridmap/archive/v"
4890 version ".tar.gz"))
4891 (file-name (string-append name "-" version ".tar.gz"))
4892 (sha256
4893 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4894 (build-system python-build-system)
ad348f9f
MB
4895 (arguments
4896 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4897 (propagated-inputs
d05c6da0
RW
4898 `(("python-psutil" ,python-psutil)
4899 ("python-drmaa" ,python-drmaa)
4900 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4901 (home-page "https://github.com/pygridtools/gridmap")
4902 (synopsis "Create jobs on a cluster directly from Python")
4903 (description
4904 "Gridmap is a Python package to allow you to easily create jobs on the
4905cluster directly from Python. You can directly map Python functions onto the
4906cluster without needing to write any wrapper code yourself.")
3f641af0 4907 (license license:gpl3+)))
d05c6da0
RW
4908
4909(define-public python2-gridmap
4910 (package-with-python2 python-gridmap))
4911
cb6d5c54
RW
4912(define-public python-pexpect
4913 (package
4914 (name "python-pexpect")
ed118043 4915 (version "4.2.1")
cb6d5c54
RW
4916 (source
4917 (origin
4918 (method url-fetch)
ed118043 4919 (uri (pypi-uri "pexpect" version))
cb6d5c54 4920 (sha256
ed118043 4921 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4922 (build-system python-build-system)
4923 (arguments
4924 `(#:phases
4925 (modify-phases %standard-phases
ed118043
MB
4926 (add-before 'check 'prepare-tests
4927 (lambda _
4928 (substitute* (find-files "tests")
4929 (("/bin/ls") (which "ls"))
4930 (("/bin/echo") (which "echo"))
4931 (("/bin/which") (which "which"))
4932 ;; Many tests try to use the /bin directory which
4933 ;; is not present in the build environment.
4934 ;; Use one that's non-empty and unlikely to change.
4935 (("/bin'") "/dev'"))
4936 ;; XXX: Socket connection test gets "Connection reset by peer".
4937 ;; Why does it not work? Delete for now.
4938 (delete-file "tests/test_socket.py")
4939 #t))
3ee9355e 4940 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 4941 (native-inputs
ed118043 4942 `(("python-nose" ,python-nose)
350a3084 4943 ("python-pytest" ,python-pytest-3.0)
ed118043
MB
4944 ("man-db" ,man-db)
4945 ("which" ,which)))
4946 (propagated-inputs
4947 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4948 (home-page "http://pexpect.readthedocs.org/")
4949 (synopsis "Controlling interactive console applications")
4950 (description
4951 "Pexpect is a pure Python module for spawning child applications;
4952controlling them; and responding to expected patterns in their output.
4953Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4954child application and control it as if a human were typing commands.")
3f641af0 4955 (license license:isc)))
cb6d5c54
RW
4956
4957(define-public python2-pexpect
4958 (package-with-python2 python-pexpect))
4959
229ad120
RW
4960(define-public python-setuptools-scm
4961 (package
4962 (name "python-setuptools-scm")
5b1f31ff 4963 (version "1.15.0")
229ad120
RW
4964 (source (origin
4965 (method url-fetch)
383af6b0 4966 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4967 (sha256
4968 (base32
5b1f31ff 4969 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
4970 (build-system python-build-system)
4971 (home-page "https://github.com/pypa/setuptools_scm/")
4972 (synopsis "Manage Python package versions in SCM metadata")
4973 (description
383af6b0 4974 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4975@dfn{software configuration management} (SCM) metadata instead of declaring
4976them as the version argument or in a SCM managed file.")
4977 (license license:expat)))
4978
4979(define-public python2-setuptools-scm
4980 (package-with-python2 python-setuptools-scm))
4981
b74270ee
RW
4982(define-public python-pathpy
4983 (package
4984 (name "python-pathpy")
4985 (version "8.1.1")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (string-append "https://pypi.python.org/packages/source/p/"
4990 "path.py/path.py-" version ".tar.gz"))
4991 (sha256
4992 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4993 (outputs '("out" "doc"))
b74270ee
RW
4994 (build-system python-build-system)
4995 (propagated-inputs
4996 `(("python-appdirs" ,python-appdirs)))
4997 (native-inputs
f3b98f4f 4998 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4999 ("python-sphinx" ,python-sphinx)
5000 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5001 ("python-pytest" ,python-pytest)
5002 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5003 (arguments
5004 `(#:phases
5005 (modify-phases %standard-phases
5006 (add-after 'build 'build-doc
5007 (lambda _
5008 (setenv "LANG" "en_US.UTF-8")
5009 (zero? (system* "python" "setup.py" "build_sphinx"))))
5010 (add-after 'install 'install-doc
5011 (lambda* (#:key outputs #:allow-other-keys)
5012 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5013 (doc (string-append data "/doc/" ,name "-" ,version))
5014 (html (string-append doc "/html")))
5015 (mkdir-p html)
5016 (for-each (lambda (file)
5017 (copy-file file (string-append doc "/" file)))
5018 '("README.rst" "CHANGES.rst"))
5019 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5020 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5021 (synopsis "Python module wrapper for built-in os.path")
5022 (description
5023 "@code{path.py} implements path objects as first-class entities, allowing
5024common operations on files to be invoked on those path objects directly.")
5025 (license license:expat)))
5026
5027(define-public python2-pathpy
5028 (package-with-python2 python-pathpy))
5029
0d34e01b
RW
5030(define-public python-pickleshare
5031 (package
5032 (name "python-pickleshare")
5033 (version "0.5")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (string-append "https://pypi.python.org/packages/source/p/"
5038 "pickleshare/pickleshare-" version ".tar.gz"))
5039 (sha256
5040 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5041 (build-system python-build-system)
5042 (propagated-inputs
5043 `(("python-pathpy" ,python-pathpy)))
5044 (home-page "https://github.com/vivainio/pickleshare")
5045 (synopsis "Tiny key value database with concurrency support")
5046 (description
5047 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5048Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5049shelve, many processes can access the database simultaneously. Changing a
5050value in database is immediately visible to other processes accessing the same
5051database. Concurrency is possible because the values are stored in separate
5052files. Hence the “database” is a directory where all files are governed by
5053PickleShare.")
5054 (license license:expat)))
5055
5056(define-public python2-pickleshare
5057 (package-with-python2 python-pickleshare))
5058
cd6e5189
RW
5059(define-public python-simplegeneric
5060 (package
5061 (name "python-simplegeneric")
5062 (version "0.8.1")
5063 (source
5064 (origin
5065 (method url-fetch)
5066 (uri (string-append "https://pypi.python.org/packages/source/s/"
5067 "simplegeneric/simplegeneric-" version ".zip"))
5068 (sha256
5069 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5070 (build-system python-build-system)
5071 (native-inputs
f3b98f4f 5072 `(("unzip" ,unzip)))
cd6e5189
RW
5073 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5074 (synopsis "Python module for simple generic functions")
5075 (description
5076 "The simplegeneric module lets you define simple single-dispatch generic
5077functions, akin to Python’s built-in generic functions like @code{len()},
5078@code{iter()} and so on. However, instead of using specially-named methods,
5079these generic functions use simple lookup tables, akin to those used by
5080e.g. @code{pickle.dump()} and other generic functions found in the Python
5081standard library.")
3f641af0 5082 (license license:zpl2.1)))
cd6e5189
RW
5083
5084(define-public python2-simplegeneric
5085 (package-with-python2 python-simplegeneric))
5086
ddc7d8ed 5087(define-public python-ipython-genutils
c4abbac3 5088 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5089 (package
5090 (name "python-ipython-genutils")
5091 (version "0.1.0")
5092 (source
5093 (origin
5094 (method url-fetch)
5095 (uri (string-append "https://pypi.python.org/packages/source/i/"
5096 "ipython_genutils/ipython_genutils-"
5097 version ".tar.gz"))
5098 (sha256
5099 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5100 (build-system python-build-system)
5101 (arguments `(#:tests? #f)) ; no tests
5102 (home-page "http://ipython.org")
5103 (synopsis "Vestigial utilities from IPython")
5104 (description
c4abbac3
HG
5105 "This package provides retired utilities from IPython. No packages
5106outside IPython/Jupyter should depend on it.
5107
5108This package shouldn't exist. It contains some common utilities shared by
5109Jupyter and IPython projects during The Big Split. As soon as possible, those
5110packages will remove their dependency on this, and this package will go
5111away.")
3f641af0 5112 (license license:bsd-3)))
ddc7d8ed
RW
5113
5114(define-public python2-ipython-genutils
5115 (package-with-python2 python-ipython-genutils))
5116
2b10eb48
RW
5117(define-public python-traitlets
5118 (package
5119 (name "python-traitlets")
a5ba1481 5120 (version "4.2.0")
2b10eb48
RW
5121 (source
5122 (origin
5123 (method url-fetch)
cc0c4fde 5124 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5125 (sha256
5126 (base32
a5ba1481 5127 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5128 (build-system python-build-system)
5129 (arguments
5130 `(#:phases
5131 (modify-phases %standard-phases
5132 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5133 (propagated-inputs
5134 `(("python-ipython-genutils" ,python-ipython-genutils)
5135 ("python-decorator" ,python-decorator)))
5136 (native-inputs
cc0c4fde
EF
5137 `(("python-mock" ,python-mock)
5138 ("python-nose" ,python-nose)))
2b10eb48
RW
5139 (home-page "http://ipython.org")
5140 (synopsis "Configuration system for Python applications")
5141 (description
5142 "Traitlets is a framework that lets Python classes have attributes with
5143type checking, dynamically calculated default values, and ‘on change’
5144callbacks. The package also includes a mechanism to use traitlets for
5145configuration, loading values from files or from command line arguments. This
5146is a distinct layer on top of traitlets, so you can use traitlets in your code
5147without using the configuration machinery.")
3f641af0 5148 (license license:bsd-3)))
2b10eb48
RW
5149
5150(define-public python2-traitlets
5151 (package-with-python2 python-traitlets))
5152
4263b06f
RW
5153(define-public python-jupyter-core
5154 (package
5155 (name "python-jupyter-core")
45cc957c 5156 (version "4.2.1")
4263b06f
RW
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (string-append (pypi-uri "jupyter_core" version)))
5161 (sha256
5162 (base32
45cc957c 5163 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5164 (build-system python-build-system)
5165 ;; FIXME: not sure how to run the tests
5166 (arguments `(#:tests? #f))
5167 (propagated-inputs
5168 `(("python-traitlets" ,python-traitlets)))
5169 (home-page "http://jupyter.org/")
5170 (synopsis "Jupyter base package")
5171 (description
5172 "Jupyter core is the base package on which Jupyter projects rely.")
5173 (license license:bsd-3)))
5174
5175(define-public python2-jupyter-core
5176 (package-with-python2 python-jupyter-core))
5177
9ff01f2d
RW
5178(define-public python-jupyter-client
5179 (package
5180 (name "python-jupyter-client")
5181 (version "4.4.0")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "jupyter_client" version))
5186 (sha256
5187 (base32
5188 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5189 (build-system python-build-system)
5190 ;; Tests fail because of missing native python kernel which I assume is
5191 ;; provided by the ipython package, which we cannot use because it would
5192 ;; cause a dependency cycle.
5193 (arguments `(#:tests? #f))
5194 (propagated-inputs
5195 `(("python-pyzmq" ,python-pyzmq)
5196 ("python-traitlets" ,python-traitlets)
5197 ("python-jupyter-core" ,python-jupyter-core)))
5198 (home-page "http://jupyter.org/")
5199 (synopsis "Jupyter protocol implementation and client libraries")
5200 (description
5201 "The @code{jupyter_client} package contains the reference implementation
5202of the Jupyter protocol. It also provides client and kernel management APIs
5203for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5204installing @code{kernelspec}s for use with Jupyter frontends.")
5205 (license license:bsd-3)))
5206
5207(define-public python2-jupyter-client
5208 (package-with-python2 python-jupyter-client))
5209
ab526102
RW
5210(define-public python-ipykernel
5211 (package
5212 (name "python-ipykernel")
f165648e 5213 (version "4.5.2")
ab526102
RW
5214 (source
5215 (origin
5216 (method url-fetch)
5217 (uri (pypi-uri "ipykernel" version))
5218 (sha256
f165648e 5219 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5220 (build-system python-build-system)
5221 ;; The tests load a submodule of IPython. However, IPython itself depends
5222 ;; on ipykernel.
5223 (arguments `(#:tests? #f))
5224 (propagated-inputs
5225 ;; imported at runtime during connect
5226 `(("python-jupyter-client" ,python-jupyter-client)))
5227 (home-page "http://ipython.org")
5228 (synopsis "IPython Kernel for Jupyter")
5229 (description
5230 "This package provides the IPython kernel for Jupyter.")
5231 (license license:bsd-3)))
5232
5233(define-public python2-ipykernel
5234 (package-with-python2 python-ipykernel))
5235
5ff6effc
RW
5236(define-public python-testpath
5237 (package
5238 (name "python-testpath")
5239 (version "0.2")
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5244 version ".tar.gz"))
5245 (file-name (string-append name "-" version ".tar.gz"))
5246 (sha256
5247 (base32
5248 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5249 (build-system python-build-system)
5250 (arguments
5251 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5252 #:modules ((guix build python-build-system)
5253 (guix build utils)
5254 (srfi srfi-1))
5255 #:imported-modules (,@%python-build-system-modules
5256 (srfi srfi-1))
5ff6effc
RW
5257 #:phases
5258 (modify-phases %standard-phases
5259 (delete 'install)
5260 (replace 'build
b320f7bf
TD
5261 (lambda* (#:key inputs outputs #:allow-other-keys)
5262 (let* ((version (last
5263 (string-split (assoc-ref inputs "python") #\-)))
5264 (x.y (string-join (take (string-split version #\.) 2)
5265 "."))
5266 (dir (string-append
5267 (assoc-ref outputs "out")
5268 "/lib/python" x.y "/site-packages/testpath")))
5269 (mkdir-p dir)
5270 (copy-recursively "testpath" dir))
5271 #t)))))
5ff6effc
RW
5272 (home-page "https://github.com/takluyver/testpath")
5273 (synopsis "Test utilities for code working with files and commands")
5274 (description
5275 "Testpath is a collection of utilities for Python code working with files
5276and commands. It contains functions to check things on the filesystem, and
5277tools for mocking system commands and recording calls to those.")
5278 (license license:expat)))
5279
5280(define-public python2-testpath
5281 (package-with-python2 python-testpath))
5282
ae1ab9fe
FB
5283(define-public python-ipython
5284 (package
5285 (name "python-ipython")
fb25d348 5286 (version "5.2.2")
ae1ab9fe
FB
5287 (source
5288 (origin
fceac880 5289 (method url-fetch)
accd5f99 5290 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5291 (sha256
fb25d348 5292 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5293 (build-system python-build-system)
5294 (outputs '("out" "doc"))
3a0b1b9a
FB
5295 (propagated-inputs
5296 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5297 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5298 ("python-terminado" ,python-terminado)
ae1ab9fe 5299 ("python-matplotlib" ,python-matplotlib)
5d26e542 5300 ("python-numpy" ,python-numpy)
ae1ab9fe 5301 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5302 ("python-jinja2" ,python-jinja2)
5303 ("python-mistune" ,python-mistune)
accd5f99
RW
5304 ("python-pexpect" ,python-pexpect)
5305 ("python-pickleshare" ,python-pickleshare)
5306 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5307 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5308 ("python-traitlets" ,python-traitlets)
5309 ("python-ipykernel" ,python-ipykernel)
fb25d348 5310 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5311 ("python-pygments" ,python-pygments)))
5312 (inputs
5313 `(("readline" ,readline)
5314 ("which" ,which)))
ae1ab9fe 5315 (native-inputs
fb25d348
TD
5316 `(("graphviz" ,graphviz)
5317 ("pkg-config" ,pkg-config)
accd5f99
RW
5318 ("python-requests" ,python-requests) ;; for tests
5319 ("python-testpath" ,python-testpath)
5320 ("python-nose" ,python-nose)
ae1ab9fe 5321 ("python-sphinx" ,python-sphinx)
fb25d348 5322 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5323 ("texlive" ,texlive)
f3b98f4f 5324 ("texinfo" ,texinfo)))
ae1ab9fe 5325 (arguments
89b5c60e 5326 `(#:phases
3a0b1b9a
FB
5327 (modify-phases %standard-phases
5328 (add-after
5329 'install 'install-doc
5330 (lambda* (#:key inputs outputs #:allow-other-keys)
5331 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5332 (doc (string-append data "/doc/" ,name "-" ,version))
5333 (html (string-append doc "/html"))
5334 (man1 (string-append data "/man/man1"))
5335 (info (string-append data "/info"))
fb25d348
TD
5336 (examples (string-append doc "/examples"))
5337 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5338 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5339 ;; Make installed package available for running the tests
5340 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5341 (with-directory-excursion "docs"
accd5f99
RW
5342 ;; FIXME: pdf fails to build
5343 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5344 (system* "make" python-arg "html")
5345 (system* "make" python-arg "info"))
3a0b1b9a
FB
5346 (copy-recursively "docs/man" man1)
5347 (copy-recursively "examples" examples)
accd5f99 5348 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5349 ;; (copy-file "docs/build/latex/ipython.pdf"
5350 ;; (string-append doc "/ipython.pdf"))
5351 (mkdir-p info)
5352 (copy-file "docs/build/texinfo/ipython.info"
5353 (string-append info "/ipython.info"))
5354 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5355 ;; Tests can only be run after the library has been installed and not
5356 ;; within the source directory.
5357 (delete 'check)
5358 (add-after
5359 'install 'check
eee5cd04 5360 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5361 (if tests?
5362 (with-directory-excursion "/tmp"
eee5cd04
HG
5363 ;; Make installed package available for running the tests
5364 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5365 (setenv "HOME" "/tmp/") ;; required by a test
5366 (zero? (system* (string-append (assoc-ref outputs "out")
5367 "/bin/iptest"))))
5368 #t)))
5369 (add-before
5370 'install 'fix-tests
5371 (lambda* (#:key inputs #:allow-other-keys)
5372 (substitute* "./IPython/utils/_process_posix.py"
5373 (("/usr/bin/env', 'which") (which "which")))
5374 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5375 (("#!/usr/bin/env python")
5376 (string-append "#!" (which "python"))))
5377 ;; Disable 1 failing test
5378 (substitute* "./IPython/core/tests/test_magic.py"
5379 (("def test_dirops\\(\\):" all)
5380 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5381 (home-page "http://ipython.org")
5382 (synopsis "IPython is a tool for interactive computing in Python")
5383 (description
5384 "IPython provides a rich architecture for interactive computing with:
5385Powerful interactive shells, a browser-based notebook, support for interactive
5386data visualization, embeddable interpreters and tools for parallel
5387computing.")
135ba811
EF
5388 (license license:bsd-3)
5389 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5390
5391(define-public python2-ipython
135ba811 5392 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5393 (package
5394 (inherit ipython)
3a0b1b9a 5395 ;; FIXME: add pyreadline once available.
fb25d348
TD
5396 (propagated-inputs
5397 `(("python2-backports-shutil-get-terminal-size"
5398 ,python2-backports-shutil-get-terminal-size)
5399 ("python2-pathlib2" ,python2-pathlib2)
5400 ,@(package-propagated-inputs ipython)))
e62600fe 5401 (native-inputs
135ba811 5402 `(("python2-mock" ,python2-mock)
77a6932a 5403 ,@(package-native-inputs ipython))))))
03411993
AE
5404
5405(define-public python-isodate
5406 (package
5407 (name "python-isodate")
b6785c2e 5408 (version "0.5.4")
03411993
AE
5409 (source
5410 (origin
5411 (method url-fetch)
b6785c2e 5412 (uri (pypi-uri "isodate" version))
03411993
AE
5413 (sha256
5414 (base32
b6785c2e 5415 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5416 (build-system python-build-system)
03411993
AE
5417 (home-page
5418 "http://cheeseshop.python.org/pypi/isodate")
5419 (synopsis
5420 "Python date parser and formatter")
5421 (description
5422 "Python-isodate is a python module for parsing and formatting
5423ISO 8601 dates, time and duration.")
3f641af0 5424 (license license:bsd-3)))
03411993
AE
5425
5426(define-public python2-isodate
5427 (package-with-python2 python-isodate))
673ab897
AE
5428
5429(define-public python-html5lib
5430 (package
5431 (name "python-html5lib")
a14061aa 5432 (version "1.0b10")
673ab897
AE
5433 (source
5434 (origin
5435 (method url-fetch)
fee04c19 5436 (uri (pypi-uri "html5lib" version))
673ab897
AE
5437 (sha256
5438 (base32
a14061aa 5439 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5440 (build-system python-build-system)
3dd75476 5441 (propagated-inputs
4eb6ed28
MB
5442 `(("python-six" ,python-six)
5443 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5444 (arguments
5445 `(#:test-target "check"))
5446 (home-page
5447 "https://github.com/html5lib/html5lib-python")
5448 (synopsis
5449 "Python HTML parser based on the WHATWG HTML specifcation")
5450 (description
5451 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5452and written in Python.")
bd3fa666 5453 (license license:expat)))
673ab897
AE
5454
5455(define-public python2-html5lib
5456 (package-with-python2 python-html5lib))
e99f4211 5457
8ee62c97
RW
5458;; Needed for python-bleach, a dependency of python-notebook
5459(define-public python-html5lib-0.9
5460 (package
5461 (inherit python-html5lib)
5462 (version "0.999")
5463 (source
5464 (origin
5465 (method url-fetch)
5466 (uri (pypi-uri "html5lib" version))
5467 (sha256
5468 (base32
5469 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5470
5471(define-public python2-html5lib-0.9
5472 (package-with-python2 python-html5lib-0.9))
5473
adbca19e
MB
5474(define-public python-webencodings
5475 (package
5476 (name "python-webencodings")
5477 (version "0.5")
5478 (source (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "webencodings" version))
5481 (sha256
5482 (base32
5483 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5484 (build-system python-build-system)
5485 (arguments
5486 '(#:phases
5487 (modify-phases %standard-phases
5488 (replace 'check
5489 (lambda _
5490 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5491 (native-inputs
5492 `(("python-pytest" ,python-pytest)))
5493 (home-page "https://github.com/SimonSapin/python-webencodings")
5494 (synopsis "Character encoding aliases for legacy web content")
5495 (description
5496 "In order to be compatible with legacy web content when interpreting
5497something like @code{Content-Type: text/html; charset=latin1}, tools need
5498to use a particular set of aliases for encoding labels as well as some
5499overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5500the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5501or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5502The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5503defines all such details so that implementations do not have to
5504reverse-engineer each other.
5505
5506This module implements the Encoding standard and has encoding labels and
5507BOM detection, but the actual implementation for encoders and decoders
5508is Python’s.")
5509 (license license:bsd-3)))
5510
5511(define-public python2-webencodings
5512 (package-with-python2 python-webencodings))
5513
e99f4211
MW
5514(define-public python-urwid
5515 (package
5516 (name "python-urwid")
51ff41f6 5517 (version "1.3.1")
e99f4211
MW
5518 (source
5519 (origin
5520 (method url-fetch)
b97c1bfd 5521 (uri (pypi-uri "urwid" version))
e99f4211
MW
5522 (sha256
5523 (base32
51ff41f6 5524 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5525 (build-system python-build-system)
b97c1bfd
LF
5526 (arguments
5527 `(#:phases
5528 (modify-phases %standard-phases
5529 ;; Disable failing test. Bug filed upstream:
5530 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5531 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5532 (add-after 'unpack 'disable-failing-test
5533 (lambda _
5534 (substitute* "urwid/tests/test_event_loops.py"
5535 (("test_remove_watch_file")
5536 "disable_remove_watch_file")))))))
e99f4211
MW
5537 (home-page "http://urwid.org")
5538 (synopsis "Console user interface library for Python")
5539 (description
5540 "Urwid is a curses-based UI/widget library for Python. It includes many
5541features useful for text console applications.")
3f641af0 5542 (license license:lgpl2.1+)))
e99f4211
MW
5543
5544(define-public python2-urwid
e9379305
MC
5545 (let ((python2-urwid (package-with-python2 python-urwid)))
5546 (package
5547 (inherit python2-urwid)
5548 (arguments
5549 (append
5550 '(#:phases
5551 (modify-phases %standard-phases
5552 ;; Disable the vterm tests because of non-deterministic failures
5553 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5554 (add-after 'unpack 'delete-test_vterm.py
5555 (delete-file "urwid/tests/test_vterm.py"))))
5556 (package-arguments python-urwid))))))
d95a56c6 5557
5220022a
JL
5558(define-public python-openid
5559 (package
5560 (name "python-openid")
5561 (version "3.0.10")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (pypi-uri "python3-openid" version))
5566 (sha256
5567 (base32
5568 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5569 (build-system python-build-system)
0660d327
DM
5570 (arguments
5571 `(#:phases
5572 (modify-phases %standard-phases
5573 (replace 'check
5574 (lambda _
5575 (zero? (system* "./admin/runtests")))))))
5576 (propagated-inputs
5577 `(("python-defusedxml" ,python-defusedxml)))
5578 (native-inputs
5579 `(("python-psycopg2" ,python-psycopg2)
5580 ("python-django" ,python-django)))
5220022a
JL
5581 (home-page "https://github.com/necaris/python3-openid")
5582 (synopsis "OpenID support for servers and consumers")
5583 (description "This library provides OpenID authentication for Python, both
5584for clients and servers.")
5585 (license license:asl2.0)))
5586
3ef00f56 5587(define-public python2-openid
5588 (package
5589 (name "python2-openid")
5590 (version "2.2.5")
5591 (source
5592 (origin
5593 (method url-fetch)
5594 (uri (pypi-uri "python-openid" version))
5595 (sha256
5596 (base32
5597 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5598 (build-system python-build-system)
5599 (arguments
5600 ;; Python 3 support is in `python3-openid`, a separate package.
5601 `(#:python ,python-2))
5602 (home-page "https://github.com/openid/python-openid")
5603 (synopsis "OpenID support for servers and consumers")
5604 (description "This library provides OpenID authentication for Python, both
5605for clients and servers.")
5606 (license license:asl2.0)))
5607
47d0b292
TS
5608(define-public python-urwidtrees
5609 (package
5610 (name "python-urwidtrees")
37ec4623 5611 (version "1.0.2")
47d0b292
TS
5612 (source
5613 (origin
5614 (method url-fetch)
37ec4623
TS
5615 ;; package author intends on distributing via github rather than pypi:
5616 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5617 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5618 version ".tar.gz"))
5619 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5620 (sha256
5621 (base32
37ec4623 5622 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5623 (build-system python-build-system)
5624 (arguments
5625 '(#:tests? #f)) ; no tests
f22efa01 5626 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5627 (home-page "https://github.com/pazz/urwidtrees")
5628 (synopsis "Tree widgets for urwid")
5629 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5630toolkit. Use it to build trees of widgets.")
3f641af0 5631 (license license:gpl3+)))
47d0b292
TS
5632
5633(define-public python2-urwidtrees
5634 (package-with-python2 python-urwidtrees))
5635
d95a56c6
PAR
5636(define-public python-dbus
5637 (package
5638 (name "python-dbus")
5639 (version "1.2.0")
5640 (source
5641 (origin
5642 (method url-fetch)
5643 (uri (string-append
5cc3096c 5644 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5645 version ".tar.gz"))
5646 (sha256
5647 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5648 (build-system gnu-build-system)
6717c879
SB
5649 (arguments
5650 '(#:phases
5651 (modify-phases %standard-phases
5652 (add-before
5653 'check 'pre-check
5654 (lambda _
5655 ;; XXX: For the missing '/etc/machine-id'.
5656 (substitute* "test/run-test.sh"
5657 (("DBUS_FATAL_WARNINGS=1")
5658 "DBUS_FATAL_WARNINGS=0"))
5659 #t)))))
d95a56c6
PAR
5660 (native-inputs
5661 `(("pkg-config" ,pkg-config)))
5662 (inputs
5663 `(("python" ,python)
2e88d113 5664 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5665 (synopsis "Python bindings for D-bus")
5666 (description "python-dbus provides bindings for libdbus, the reference
5667implementation of D-Bus.")
5668 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5669 (license license:expat)))
b52af02b
MW
5670
5671(define-public python2-dbus
5672 (package (inherit python-dbus)
5673 (name "python2-dbus")
5674 (inputs `(("python" ,python-2)
5675 ,@(alist-delete "python"
5676 (package-inputs python-dbus)
5677 equal?)))
5678 ;; FIXME: on Python 2, the test_utf8 fails with:
5679 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5680 (arguments `(#:tests? #f))))
a6ac8332
AE
5681
5682(define-public python-apsw
5683 (package
5684 (name "python-apsw")
917708c2 5685 (version "3.9.2-r1")
a6ac8332
AE
5686 (source
5687 (origin
5688 (method url-fetch)
917708c2 5689 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5690 (sha256
5691 (base32
917708c2 5692 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5693 (build-system python-build-system)
5694 (inputs
f3b98f4f 5695 `(("sqlite" ,sqlite)))
a6ac8332
AE
5696 (arguments
5697 `(#:phases
154d207c
MB
5698 (modify-phases %standard-phases
5699 (delete 'check)
5700 (add-after 'install 'check
5701 (lambda* (#:key inputs outputs #:allow-other-keys)
5702 (add-installed-pythonpath inputs outputs)
5703 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5704 (home-page "https://github.com/rogerbinns/apsw/")
5705 (synopsis "Another Python SQLite Wrapper")
5706 (description "APSW is a Python wrapper for the SQLite
5707embedded relational database engine. In contrast to other wrappers such as
5708pysqlite it focuses on being a minimal layer over SQLite attempting just to
5709translate the complete SQLite API into Python.")
abde5f37 5710 (license license:zlib)))
a6ac8332
AE
5711
5712(define-public python2-apsw
5713 (package-with-python2 python-apsw))
26b307e2
AE
5714
5715(define-public python-lxml
5716 (package
5717 (name "python-lxml")
d58a3203 5718 (version "3.6.0")
26b307e2
AE
5719 (source
5720 (origin
5721 (method url-fetch)
97bbc480 5722 (uri (pypi-uri "lxml" version))
26b307e2 5723 (sha256
d58a3203
EF
5724 (base32
5725 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5726 (build-system python-build-system)
5727 (inputs
5728 `(("libxml2" ,libxml2)
f3b98f4f 5729 ("libxslt" ,libxslt)))
26b307e2
AE
5730 (home-page "http://lxml.de/")
5731 (synopsis
5732 "Python XML processing library")
5733 (description
5734 "The lxml XML toolkit is a Pythonic binding for the C libraries
5735libxml2 and libxslt.")
3f641af0 5736 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5737
5738(define-public python2-lxml
5739 (package-with-python2 python-lxml))
4ed20663 5740
b32a1e47
CAW
5741;; beautifulsoup4 has a totally different namespace than 3.x,
5742;; and pypi seems to put it under its own name, so I guess we should too
5743(define-public python-beautifulsoup4
5744 (package
5745 (name "python-beautifulsoup4")
80e8d851 5746 (version "4.5.3")
b32a1e47
CAW
5747 (source
5748 (origin
5749 (method url-fetch)
5750 (uri (pypi-uri "beautifulsoup4" version))
5751 (sha256
5752 (base32
80e8d851 5753 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 5754 (build-system python-build-system)
5f37f0b6
LF
5755 (arguments
5756 `(#:phases
5757 (modify-phases %standard-phases
5758 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5759 ;; must use this conversion script when building with Python 3. The
5760 ;; conversion script also runs the tests.
5761 ;; For more information, see the file 'convert-py3k' in the source
5762 ;; distribution.
5763 (replace 'check
5764 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5765 (home-page
5766 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5767 (synopsis
5768 "Python screen-scraping library")
5769 (description
5770 "Beautiful Soup is a Python library designed for rapidly setting up
5771screen-scraping projects. It offers Pythonic idioms for navigating,
5772searching, and modifying a parse tree, providing a toolkit for
5773dissecting a document and extracting what you need. It automatically
5774converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5775 (license license:expat)
5776 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5777
5778(define-public python2-beautifulsoup4
5779 (package
5780 (inherit (package-with-python2
5781 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5782 (arguments `(#:python ,python-2))))
b32a1e47 5783
4dcb135e 5784(define-public python-cssutils
092e86f5 5785 (package
4dcb135e 5786 (name "python-cssutils")
58d1d816 5787 (version "1.0.1")
092e86f5
AE
5788 (source
5789 (origin
5790 (method url-fetch)
58d1d816 5791 (uri (pypi-uri "cssutils" version))
092e86f5 5792 (sha256
58d1d816
EF
5793 (base32
5794 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5795 (build-system python-build-system)
5796 (native-inputs
4dcb135e 5797 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5798 (arguments
4dcb135e 5799 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5800 (home-page "http://cthedot.de/cssutils/")
5801 (synopsis
5802 "CSS Cascading Style Sheets library for Python")
5803 (description
5804 "Cssutils is a Python package for parsing and building CSS
5805Cascading Style Sheets. Currently it provides a DOM only and no rendering
5806options.")
3f641af0 5807 (license license:lgpl3+)))
880ff77c 5808
4dcb135e
EB
5809(define-public python2-cssutils
5810 (package-with-python2 python-cssutils))
5811
880ff77c
AE
5812(define-public python-cssselect
5813 (package
5814 (name "python-cssselect")
d5ccd9ab 5815 (version "0.9.2")
880ff77c
AE
5816 (source
5817 (origin
5818 (method url-fetch)
d5ccd9ab 5819 (uri (pypi-uri "cssselect" version))
880ff77c 5820 (sha256
d5ccd9ab
EF
5821 (base32
5822 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5823 (build-system python-build-system)
880ff77c
AE
5824 (arguments
5825 ;; tests fail with message
5826 ;; AttributeError: 'module' object has no attribute 'tests'
5827 `(#:tests? #f))
5828 (home-page
5829 "https://pythonhosted.org/cssselect/")
5830 (synopsis
5831 "CSS3 selector parser and translator to XPath 1.0")
5832 (description
5833 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5834them to XPath 1.0 expressions. Such expressions can be used in lxml or
5835another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5836 (license license:bsd-3)))
880ff77c
AE
5837
5838(define-public python2-cssselect
5839 (package-with-python2 python-cssselect))
60357f99 5840
03702173 5841(define-public python-openid-cla
5842 (package
5843 (name "python-openid-cla")
5844 (version "1.2")
5845 (source
5846 (origin
5847 (method url-fetch)
5848 (uri (pypi-uri "python-openid-cla" version))
5849 (sha256
5850 (base32
5851 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5852 (build-system python-build-system)
019ccdb6 5853 (arguments '(#:tests? #f)) ; No tests.
03702173 5854 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5855 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5856 (description "@code{openid-cla} is an implementation of the OpenID
5857contributor license agreement extension for python-openid.")
5858 (license license:bsd-3)))
5859
5860(define-public python2-openid-cla
5861 (package-with-python2 python-openid-cla))
5862
a0e41de4 5863(define-public python-openid-teams
5864 (package
5865 (name "python-openid-teams")
5866 (version "1.1")
5867 (source
5868 (origin
5869 (method url-fetch)
5870 (uri (pypi-uri "python-openid-teams" version))
5871 (sha256
5872 (base32
5873 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5874 (build-system python-build-system)
ac72d3d2 5875 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5876 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5877 (synopsis "Implementation of the OpenID teams extension for python-openid")
5878 (description
5879 "@code{openid-teams} is an implementation of the OpenID
5880teams extension for python-openid.")
5881 (license license:bsd-3)))
5882
5883(define-public python2-openid-teams
5884 (package-with-python2 python-openid-teams))
5885
60357f99
AE
5886(define-public python-netifaces
5887 (package
5888 (name "python-netifaces")
5889 (version "0.10.4")
5890 (source
5891 (origin
5892 (method url-fetch)
5893 (uri (string-append
5894 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5895 version
5896 ".tar.gz"))
5897 (sha256
5898 (base32
5899 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5900 (build-system python-build-system)
60357f99
AE
5901 (home-page
5902 "https://bitbucket.org/al45tair/netifaces")
5903 (synopsis
5904 "Python module for portable network interface information")
5905 (description
5906 "Netifaces is a Python module providing information on network
5907interfaces in an easy and portable manner.")
5908 (license license:expat)))
5909
5910(define-public python2-netifaces
5911 (package-with-python2 python-netifaces))
92cb152b 5912
32f77c04
RW
5913(define-public python-networkx
5914 (package
5915 (name "python-networkx")
a4d9609c 5916 (version "1.11")
32f77c04
RW
5917 (source
5918 (origin
5919 (method url-fetch)
a4d9609c 5920 (uri (pypi-uri "networkx" version))
32f77c04 5921 (sha256
a4d9609c 5922 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5923 (build-system python-build-system)
5924 ;; python-decorator is needed at runtime
5925 (propagated-inputs
5926 `(("python-decorator" ,python-decorator)))
5927 (native-inputs
f3b98f4f 5928 `(("python-nose" ,python-nose)))
32f77c04
RW
5929 (home-page "http://networkx.github.io/")
5930 (synopsis "Python module for creating and manipulating graphs and networks")
5931 (description
5932 "NetworkX is a Python package for the creation, manipulation, and study
5933of the structure, dynamics, and functions of complex networks.")
3f641af0 5934 (license license:bsd-3)))
32f77c04
RW
5935
5936(define-public python2-networkx
5937 (package-with-python2 python-networkx))
5938
92cb152b
RW
5939(define-public snakemake
5940 (package
5941 (name "snakemake")
ef71ed8f 5942 (version "3.11.2")
92cb152b
RW
5943 (source
5944 (origin
5945 (method url-fetch)
7b93d866 5946 (uri (pypi-uri "snakemake" version))
92cb152b 5947 (sha256
ef71ed8f 5948 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
92cb152b 5949 (build-system python-build-system)
7b93d866
MB
5950 (arguments
5951 ;; TODO: Package missing test dependencies.
5952 '(#:tests? #f))
4f9998c6
RW
5953 (propagated-inputs
5954 `(("python-wrapt" ,python-wrapt)
5955 ("python-requests" ,python-requests)))
7b93d866 5956 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5957 (synopsis "Python-based execution environment for make-like workflows")
5958 (description
5959 "Snakemake aims to reduce the complexity of creating workflows by
5960providing a clean and modern domain specific specification language (DSL) in
5961Python style, together with a fast and comfortable execution environment.")
5962 (license license:expat)))
a1920bc9 5963
35de1fbd
RW
5964(define-public python-seaborn
5965 (package
5966 (name "python-seaborn")
ccc18762 5967 (version "0.7.1")
35de1fbd
RW
5968 (source
5969 (origin
5970 (method url-fetch)
fc899d4f 5971 (uri (pypi-uri "seaborn" version))
35de1fbd 5972 (sha256
ccc18762 5973 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5974 (build-system python-build-system)
6f976df6
MB
5975 (arguments
5976 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5977 (propagated-inputs
5978 `(("python-pandas" ,python-pandas)
5979 ("python-matplotlib" ,python-matplotlib)
5980 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5981 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5982 (synopsis "Statistical data visualization")
5983 (description
5984 "Seaborn is a library for making attractive and informative statistical
5985graphics in Python. It is built on top of matplotlib and tightly integrated
5986with the PyData stack, including support for numpy and pandas data structures
5987and statistical routines from scipy and statsmodels.")
3f641af0 5988 (license license:bsd-3)
fc899d4f 5989 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5990
5991(define-public python2-seaborn
fc899d4f
EF
5992 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5993 (package
5994 (inherit base)
5995 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5996 ,@(package-propagated-inputs base))))))
35de1fbd 5997
58a35665
MB
5998(define-public python-mpmath
5999 (package
6000 (name "python-mpmath")
6001 (version "0.19")
6002 (source (origin
6003 (method url-fetch)
6004 (uri (string-append "http://mpmath.org/files/mpmath-"
6005 version ".tar.gz"))
6006 (sha256
6007 (base32
6008 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6009 (build-system python-build-system)
6010 (arguments
6011 '(#:phases
6012 (modify-phases %standard-phases
6013 (replace 'check
6014 (lambda _
6015 (zero?
6016 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6017 (home-page "http://mpmath.org")
6018 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6019 (description
6020 "@code{mpmath} can be used as an arbitrary-precision substitute for
6021Python's float/complex types and math/cmath modules, but also does much
6022more advanced mathematics.")
6023 (license license:bsd-3)))
6024
6025(define-public python2-mpmath
6026 (package-with-python2 python-mpmath))
35de1fbd 6027
90fc547f
RW
6028(define-public python-sympy
6029 (package
6030 (name "python-sympy")
52f622ef 6031 (version "1.0")
90fc547f
RW
6032 (source
6033 (origin
6034 (method url-fetch)
6035 (uri (string-append
6036 "https://github.com/sympy/sympy/releases/download/sympy-"
6037 version "/sympy-" version ".tar.gz"))
6038 (sha256
52f622ef 6039 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6040 (build-system python-build-system)
52f622ef
MB
6041 (propagated-inputs
6042 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6043 (home-page "http://www.sympy.org/")
6044 (synopsis "Python library for symbolic mathematics")
6045 (description
6046 "SymPy is a Python library for symbolic mathematics. It aims to become a
6047full-featured computer algebra system (CAS) while keeping the code as simple
6048as possible in order to be comprehensible and easily extensible.")
3f641af0 6049 (license license:bsd-3)))
90fc547f
RW
6050
6051(define-public python2-sympy
6052 (package-with-python2 python-sympy))
6053
e8c9b010
SR
6054(define-public python-q
6055 (package
6056 (name "python-q")
6057 (version "2.6")
6058 (source
6059 (origin
6060 (method url-fetch)
6061 (uri (pypi-uri "q" version))
6062 (sha256
6063 (base32
6064 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6065 (build-system python-build-system)
6066 (home-page "https://github.com/zestyping/q")
6067 (synopsis "Quick-and-dirty debugging output for tired programmers")
6068 (description
6069 "q is a Python module for \"print\" style of debugging Python code. It
6070provides convenient short API for print out of values, tracebacks, and
6071falling into the Python interpreter.")
f210e944 6072 (license license:asl2.0)))
e8c9b010
SR
6073
6074(define-public python2-q
f210e944 6075 (package-with-python2 python-q))
e8c9b010 6076
a1920bc9
FB
6077(define-public python-testlib
6078 (package
6079 (name "python-testlib")
6080 (version "0.6.5")
6081 (source
6082 (origin
6083 (method url-fetch)
6084 (uri (string-append
6085 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6086 version ".zip"))
6087 (sha256
6088 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6089 (build-system python-build-system)
a1920bc9 6090 (native-inputs
632735f2 6091 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6092 (synopsis "Python micro test suite harness")
6093 (description "A micro unittest suite harness for Python.")
6094 (home-page "https://github.com/trentm/testlib")
1cb9c006 6095 (license license:expat)))
a1920bc9
FB
6096
6097(define-public python2-testlib
6098 (package-with-python2 python-testlib))
db62afa5
LC
6099
6100(define-public python2-xlib
6101 (package
6102 (name "python2-xlib")
6103 (version "0.14")
6104 (source (origin
6105 (method url-fetch)
de67e922
LF
6106 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6107 "/" version "/"
db62afa5
LC
6108 "python-xlib-" version ".tar.gz"))
6109 (sha256
6110 (base32
6111 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6112 (build-system python-build-system)
6113 (arguments
6114 `(#:python ,python-2 ;Python 2 only
6115 #:tests? #f)) ;no tests
db62afa5
LC
6116 (home-page "http://python-xlib.sourceforge.net/")
6117 (synopsis "Python X11 client library")
6118 (description
6119 "The Python X Library is intended to be a fully functional X client
6120library for Python programs. It is useful to implement low-level X clients.
6121It is written entirely in Python.")
3f641af0 6122 (license license:gpl2+)))
0234ca06
DT
6123
6124(define-public python-singledispatch
6125 (package
6126 (name "python-singledispatch")
6127 (version "3.4.0.3")
6128 (source
6129 (origin
6130 (method url-fetch)
bdb67d84 6131 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6132 (sha256
6133 (base32
6134 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6135 (build-system python-build-system)
5e1c9d24
HG
6136 (native-inputs
6137 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6138 (home-page
6139 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6140 (synopsis "Backport of singledispatch feature from Python 3.4")
6141 (description
6142 "This library brings functools.singledispatch from Python 3.4 to Python
61432.6-3.3.")
6144 (license license:expat)))
6145
6146(define-public python2-singledispatch
6147 (package-with-python2 python-singledispatch))
feaae484 6148
310d218f
RW
6149(define-public python-tornado
6150 (package
6151 (name "python-tornado")
6fdeb324 6152 (version "4.5.1")
310d218f
RW
6153 (source
6154 (origin
6155 (method url-fetch)
a724924b 6156 (uri (pypi-uri "tornado" version))
310d218f 6157 (sha256
6fdeb324 6158 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6159 (build-system python-build-system)
3fe2c209
MB
6160 (arguments
6161 '(;; FIXME: Two tests error out with:
6162 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6163 ;; #:phases
6164 ;; (modify-phases %standard-phases
6165 ;; (replace 'check
6166 ;; (lambda _
6167 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6168 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6169 ;; (zero? (system* "python" "-m" "tornado.test")))))
6170 #:tests? #f))
310d218f 6171 (native-inputs
b455439b 6172 `(("python-certifi" ,python-certifi)))
f22efa01 6173 (propagated-inputs
b455439b 6174 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6175 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6176 (synopsis "Python web framework and asynchronous networking library")
6177 (description
6178 "Tornado is a Python web framework and asynchronous networking library,
6179originally developed at FriendFeed. By using non-blocking network I/O,
6180Tornado can scale to tens of thousands of open connections, making it ideal
6181for long polling, WebSockets, and other applications that require a long-lived
6182connection to each user.")
3f641af0 6183 (license license:asl2.0)
b455439b 6184 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6185
6186(define-public python2-tornado
b455439b 6187 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6188 (package (inherit tornado)
f22efa01 6189 (propagated-inputs
310d218f
RW
6190 `(("python2-backport-ssl-match-hostname"
6191 ,python2-backport-ssl-match-hostname)
b455439b 6192 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6193 ,@(package-propagated-inputs tornado))))))
310d218f 6194
6b59fc10
EF
6195;; the python- version can be removed with python-3.5
6196(define-public python-backports-abc
6197 (package
6198 (name "python-backports-abc")
27f9148e 6199 (version "0.5")
6b59fc10
EF
6200 (source
6201 (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "backports_abc" version))
6204 (sha256
6205 (base32
27f9148e 6206 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6207 (build-system python-build-system)
6b59fc10 6208 (home-page "https://github.com/cython/backports_abc")
66e07664 6209 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6210 (description
6211 "Python-backports-abc provides a backport of additions to the
6212'collections.abc' module in Python-3.5.")
3f641af0 6213 (license license:psfl)))
6b59fc10
EF
6214
6215(define-public python2-backports-abc
6216 (package-with-python2 python-backports-abc))
6217
ec074213
TD
6218(define-public python2-backports-shutil-get-terminal-size
6219 (package
6220 (name "python2-backports-shutil-get-terminal-size")
6221 (version "1.0.0")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6226 (sha256
6227 (base32
6228 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6229 (build-system python-build-system)
6230 (arguments
c0446791
MB
6231 `(#:python ,python-2
6232 #:phases
6233 (modify-phases %standard-phases
6234 (replace 'check
6235 (lambda _
6236 (zero? (system* "py.test" "-v")))))))
6237 (native-inputs
6238 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6239 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6240 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6241 (description
6242 "This package provides a backport of the @code{get_terminal_size
6243function} from Python 3.3's @code{shutil}.
6244Unlike the original version it is written in pure Python rather than C,
6245so it might be a tiny bit slower.")
6246 (license license:expat)))
6247
feaae484
SB
6248(define-public python-waf
6249 (package
6250 (name "python-waf")
27bf00e6 6251 (version "1.9.8")
feaae484
SB
6252 (source (origin
6253 (method url-fetch)
bae67829 6254 (uri (string-append "https://waf.io/"
feaae484
SB
6255 "waf-" version ".tar.bz2"))
6256 (sha256
6257 (base32
27bf00e6 6258 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6259 (build-system python-build-system)
6260 (arguments
6261 '(#:phases
6262 (modify-phases %standard-phases
6263 (replace 'build
7dd55dfe
EF
6264 (lambda _
6265 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6266 (replace 'check
7dd55dfe
EF
6267 (lambda _
6268 (zero? (system* "python" "waf" "--version"))))
feaae484 6269 (replace 'install
7dd55dfe
EF
6270 (lambda _
6271 (copy-file "waf" %output))))))
27bf00e6 6272 (home-page "https://waf.io/")
feaae484
SB
6273 (synopsis "Python-based build system")
6274 (description
6275 "Waf is a Python-based framework for configuring, compiling and installing
6276applications.")
3f641af0 6277 (license license:bsd-3)))
feaae484
SB
6278
6279(define-public python2-waf
6280 (package-with-python2 python-waf))
45203542
RW
6281
6282(define-public python-pyzmq
6283 (package
6284 (name "python-pyzmq")
3655ee76 6285 (version "15.1.0")
45203542
RW
6286 (source
6287 (origin
6288 (method url-fetch)
3655ee76 6289 (uri (pypi-uri "pyzmq" version))
45203542 6290 (sha256
3655ee76 6291 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6292 (build-system python-build-system)
6293 (arguments
6294 `(#:configure-flags
6295 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6296 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6297 ;; --inplace' for 'python setup.py test' to work.
6298 #:tests? #f))
6299 (inputs
6300 `(("zeromq" ,zeromq)))
6301 (native-inputs
6302 `(("pkg-config" ,pkg-config)
f3b98f4f 6303 ("python-nose" ,python-nose)))
7bf837fd 6304 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6305 (synopsis "Python bindings for 0MQ")
6306 (description
6307 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6308 (license license:bsd-4)))
45203542
RW
6309
6310(define-public python2-pyzmq
6311 (package-with-python2 python-pyzmq))
d889e6c4
CR
6312
6313(define-public python-pep8
6314 (package
6315 (name "python-pep8")
db251311 6316 (version "1.7.0")
d889e6c4
CR
6317 (source
6318 (origin
6319 (method url-fetch)
db251311 6320 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6321 (sha256
6322 (base32
db251311 6323 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6324 (build-system python-build-system)
d889e6c4
CR
6325 (home-page "http://pep8.readthedocs.org/")
6326 (synopsis "Python style guide checker")
6327 (description
6328 "This tools checks Python code against some of the style conventions in
6329PEP 8.")
6330 (license license:expat)))
6331
6332(define-public python2-pep8
6333 (package-with-python2 python-pep8))
e31d7f44
CR
6334
6335(define-public python-pyflakes
6336 (package
6337 (name "python-pyflakes")
2abc3972 6338 (version "1.0.0")
e31d7f44
CR
6339 (source
6340 (origin
6341 (method url-fetch)
2abc3972 6342 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6343 (sha256
6344 (base32
2abc3972 6345 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6346 (build-system python-build-system)
e31d7f44
CR
6347 (home-page
6348 "https://github.com/pyflakes/pyflakes")
6349 (synopsis "Passive checker of Python programs")
6350 (description
6351 "Pyflakes statically checks Python source code for common errors.")
6352 (license license:expat)))
a59e017c 6353
7261d9eb
CR
6354(define-public python2-pyflakes
6355 (package-with-python2 python-pyflakes))
6356
a59e017c
CR
6357(define-public python-mccabe
6358 (package
6359 (name "python-mccabe")
c6ebd40d 6360 (version "0.4.0")
a59e017c
CR
6361 (source
6362 (origin
6363 (method url-fetch)
c6ebd40d 6364 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6365 (sha256
6366 (base32
c6ebd40d 6367 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6368 (build-system python-build-system)
328bb95d 6369 (native-inputs
c6ebd40d 6370 `(("python-pytest" ,python-pytest)
f3b98f4f 6371 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6372 (home-page "https://github.com/flintwork/mccabe")
6373 (synopsis "McCabe checker, plugin for flake8")
6374 (description
6375 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6376complexity of Python source code.")
7362371d 6377 (license license:expat)))
a59e017c
CR
6378
6379(define-public python2-mccabe
6380 (package-with-python2 python-mccabe))
e8df8f47 6381
7477fbb1
CR
6382(define-public python-mccabe-0.2.1
6383 (package (inherit python-mccabe)
6384 (version "0.2.1")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "mccabe" version))
6389 (sha256
6390 (base32
f3b98f4f 6391 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6392
6393(define-public python2-mccabe-0.2.1
6394 (package-with-python2 python-mccabe-0.2.1))
6395
e8df8f47
CR
6396;; Flake8 2.4.1 requires an older version of pep8.
6397;; This should be removed ASAP.
6398(define-public python-pep8-1.5.7
6399 (package (inherit python-pep8)
6400 (version "1.5.7")
6401 (source
6402 (origin
6403 (method url-fetch)
6404 (uri (string-append
6405 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6406 version
6407 ".tar.gz"))
6408 (sha256
6409 (base32
73e3060d
MB
6410 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6411 (arguments
6412 ;; XXX Tests not compatible with Python 3.5.
6413 '(#:tests? #f))))
e8df8f47
CR
6414
6415(define-public python2-pep8-1.5.7
6416 (package-with-python2 python-pep8-1.5.7))
6417
6418;; Flake8 2.4.1 requires an older version of pyflakes.
6419;; This should be removed ASAP.
6420(define-public python-pyflakes-0.8.1
6421 (package (inherit python-pyflakes)
6422 (version "0.8.1")
6423 (source
6424 (origin
6425 (method url-fetch)
6426 (uri (string-append
6427 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6428 version
6429 ".tar.gz"))
6430 (sha256
6431 (base32
0d84e1ef
MB
6432 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6433 (arguments
6434 ;; XXX Tests not compatible with Python 3.5.
6435 '(#:tests? #f))))
e8df8f47
CR
6436
6437(define-public python2-pyflakes-0.8.1
7261d9eb 6438 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6439
6440(define-public python-flake8
6441 (package
6442 (name "python-flake8")
43789136 6443 (version "2.5.4")
e8df8f47
CR
6444 (source
6445 (origin
6446 (method url-fetch)
1b995533 6447 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6448 (sha256
6449 (base32
011271c7
HG
6450 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6451 (modules '((guix build utils)))
6452 (snippet
6453 '(begin
6454 ;; Remove pre-compiled .pyc files from source.
6455 (for-each delete-file-recursively
6456 (find-files "." "__pycache__" #:directories? #t))
6457 (for-each delete-file (find-files "." "\\.pyc$"))
6458 #t))))
e8df8f47 6459 (build-system python-build-system)
482d9591 6460 (propagated-inputs
f3b98f4f 6461 `(("python-pep8" ,python-pep8)
43789136 6462 ("python-pyflakes" ,python-pyflakes)
482d9591 6463 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6464 (native-inputs
6465 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6466 ("python-nose" ,python-nose)))
6467 (home-page "https://gitlab.com/pycqa/flake8")
6468 (synopsis
6469 "The modular source code checker: pep8, pyflakes and co")
6470 (description
6471 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6472 (license license:expat)))
6473
6474(define-public python2-flake8
6475 (package-with-python2 python-flake8))
61b9ac53 6476
abf21efc
CR
6477;; This will only be needed by the python-hacking package and will not be
6478;; necessary once python-hacking > 0.10.2 is released.
6479(define-public python-flake8-2.2.4
6480 (package (inherit python-flake8)
482d9591 6481 (propagated-inputs
f3b98f4f 6482 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6483 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6484 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6485 (native-inputs
482d9591 6486 `(("python-mock" ,python-mock)
abf21efc
CR
6487 ("python-nose" ,python-nose)))
6488 (version "2.2.4")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "flake8" version))
6493 (sha256
6494 (base32
b9c8ccce
HG
6495 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6496 (modules '((guix build utils)))
6497 (snippet
6498 '(begin
6499 ;; Remove pre-compiled .pyc files from source.
6500 (for-each delete-file-recursively
6501 (find-files "." "__pycache__" #:directories? #t))
6502 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6503 #t))))
6504 (arguments
6505 ;; XXX Fails with Python 3.5.
6506 '(#:tests? #f))))
abf21efc
CR
6507
6508(define-public python2-flake8-2.2.4
6509 (package-with-python2 python-flake8-2.2.4))
6510
1f42d824
MFM
6511(define-public python-flake8-polyfill
6512 (package
6513 (name "python-flake8-polyfill")
6514 (version "1.0.1")
6515 (source
6516 (origin
6517 (method url-fetch)
6518 (uri (pypi-uri "flake8-polyfill" version))
6519 (sha256
6520 (base32
6521 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6522 (build-system python-build-system)
2c1cad7a
MB
6523 (arguments
6524 '(#:phases
6525 (modify-phases %standard-phases
6526 (replace 'check
6527 (lambda _
6528 (setenv "PYTHONPATH"
6529 (string-append (getcwd) "/build/lib:"
6530 (getenv "PYTHONPATH")))
6531 (zero? (system* "py.test" "-v")))))))
6532 (native-inputs
6533 `(("python-flake8" ,python-flake8)
6534 ("python-mock" ,python-mock)
6535 ("python-pycodestyle" ,python-pycodestyle)
6536 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6537 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6538 (synopsis "Polyfill package for Flake8 plugins")
6539 (description
6540 "This package that provides some compatibility helpers for Flake8
6541plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6542 (license license:expat)))
6543
6544(define-public python2-flake8-polyfill
6545 (package-with-python2 python-flake8-polyfill))
6546
61b9ac53
FB
6547(define-public python-mistune
6548 (package
6549 (name "python-mistune")
08b81336 6550 (version "0.7.3")
61b9ac53
FB
6551 (source
6552 (origin
6553 (method url-fetch)
eff8d773 6554 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6555 (sha256
6556 (base32
08b81336 6557 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6558 (build-system python-build-system)
328bb95d 6559 (native-inputs
f3b98f4f 6560 `(("python-nose" ,python-nose)
61b9ac53
FB
6561 ("python-cython" ,python-cython)))
6562 (home-page "https://github.com/lepture/mistune")
6563 (synopsis "Markdown parser in pure Python")
6564 (description "This package provides a fast markdown parser in pure
6565Python.")
3f641af0 6566 (license license:bsd-3)))
61b9ac53
FB
6567
6568(define-public python2-mistune
6569 (package-with-python2 python-mistune))
6d992d07 6570
b9893908
EE
6571(define-public python-markdown
6572 (package
6573 (name "python-markdown")
4ffbe8c6 6574 (version "2.6.8")
b9893908
EE
6575 (source
6576 (origin
6577 (method url-fetch)
6578 (uri (pypi-uri "Markdown" version))
6579 (sha256
6580 (base32
4ffbe8c6 6581 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6582 (build-system python-build-system)
6583 (arguments
6584 `(#:phases
6585 (modify-phases %standard-phases
6586 (replace 'check
6587 (lambda _
6588 (zero? (system* "python" "run-tests.py")))))))
6589 (native-inputs
6590 `(("python-nose" ,python-nose)
6591 ("python-pyyaml" ,python-pyyaml)))
6592 (home-page "https://pythonhosted.org/Markdown/")
6593 (synopsis "Python implementation of Markdown")
6594 (description
6595 "This package provides a Python implementation of John Gruber's
6596Markdown. The library features international input, various Markdown
6597extensions, and several HTML output formats. A command line wrapper
6598markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6599 (license license:bsd-3)))
b9893908
EE
6600
6601(define-public python2-markdown
6602 (package-with-python2 python-markdown))
6603
6d992d07
FB
6604(define-public python-ptyprocess
6605 (package
6606 (name "python-ptyprocess")
70fc93cb 6607 (version "0.5.1")
6d992d07
FB
6608 (source
6609 (origin
6610 (method url-fetch)
6611 (uri (string-append
6612 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6613 version ".tar.gz"))
6614 (sha256
6615 (base32
70fc93cb 6616 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6617 (build-system python-build-system)
328bb95d 6618 (native-inputs
f3b98f4f 6619 `(("python-nose" ,python-nose)))
6d992d07
FB
6620 (arguments
6621 `(#:phases
6622 (modify-phases %standard-phases
6623 (replace 'check
6624 (lambda _
6625 (zero? (system* "nosetests")))))))
6626 (home-page "https://github.com/pexpect/ptyprocess")
6627 (synopsis "Run a subprocess in a pseudo terminal")
6628 (description
6629 "This package provides a Python library used to launch a subprocess in a
6630pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6631 (license license:isc)))
6d992d07
FB
6632
6633(define-public python2-ptyprocess
6634 (package-with-python2 python-ptyprocess))
4aadb1df 6635
df893a38
MB
6636(define-public python-cram
6637 (package
6638 (name "python-cram")
6639 (version "0.7")
6640 (home-page "https://bitheap.org/cram/")
6641 (source (origin
6642 (method url-fetch)
6643 (uri (list (string-append home-page "cram-"
6644 version ".tar.gz")
6645 (pypi-uri "cram" version)))
6646 (sha256
6647 (base32
6648 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6649 (arguments
6650 '(#:phases
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'patch-source
6653 (lambda _
6654 (substitute* (find-files "cram" ".*\\.py$")
6655 ;; Replace default shell path.
6656 (("/bin/sh") (which "sh")))
6657 (substitute* (find-files "tests" ".*\\.t$")
6658 (("md5") "md5sum")
6659 (("/bin/bash") (which "bash"))
6660 (("/bin/sh") (which "sh")))
6661 (substitute* "cram/_test.py"
6662 ;; This hack works around a bug triggered by substituting
6663 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6664 ;; "cram -h", which breaks the output at 80 characters. This
6665 ;; causes the line showing the default shell to break into two
6666 ;; lines, but the test expects a single line...
6667 (("env\\['COLUMNS'\\] = '80'")
6668 "env['COLUMNS'] = '160'"))
6669 #t))
6670 (delete 'check)
6671 (add-after 'install 'check
6672 ;; The test phase uses the built library and executable.
6673 ;; It's easier to run it after install since the build
6674 ;; directory contains version-specific PATH.
6675 (lambda* (#:key inputs outputs #:allow-other-keys)
6676 (add-installed-pythonpath inputs outputs)
6677 (setenv "PATH" (string-append (getenv "PATH") ":"
6678 (assoc-ref outputs "out") "/bin"))
6679 (zero? (system* "make" "test")))))))
6680 (build-system python-build-system)
6681 (native-inputs
6682 `(("python-coverage" ,python-coverage)
6683 ("which" ,which)))
6684 (synopsis "Simple testing framework for command line applications")
6685 (description
6686 "Cram is a functional testing framework for command line applications.
6687Cram tests look like snippets of interactive shell sessions. Cram runs each
6688command and compares the command output in the test with the command’s actual
6689output.")
6690 (license license:gpl2+)))
6691
6692(define-public python2-cram
6693 (package-with-python2 python-cram))
6694
4aadb1df
FB
6695(define-public python-terminado
6696 (package
6697 (name "python-terminado")
783fb0a3 6698 (version "0.6")
4aadb1df
FB
6699 (source
6700 (origin
6701 (method url-fetch)
783fb0a3 6702 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6703 (sha256
6704 (base32
783fb0a3 6705 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6706 (build-system python-build-system)
6707 (propagated-inputs
6708 `(("python-tornado" ,python-tornado)
6709 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6710 (native-inputs
6711 `(("python-nose" ,python-nose)))
4aadb1df
FB
6712 (arguments
6713 `(#:phases
6714 (modify-phases %standard-phases
6715 (replace 'check
6716 (lambda _
6717 (zero? (system* "nosetests")))))))
6718 (home-page "https://github.com/takluyver/terminado")
6719 (synopsis "Terminals served to term.js using Tornado websockets")
6720 (description "This package provides a Tornado websocket backend for the
6721term.js Javascript terminal emulator library.")
3f641af0 6722 (license license:bsd-2)
783fb0a3 6723 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6724
6725(define-public python2-terminado
783fb0a3 6726 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6727 (package (inherit terminado)
783fb0a3
EF
6728 (propagated-inputs
6729 `(("python2-backport-ssl-match-hostname"
6730 ,python2-backport-ssl-match-hostname)
00e10c6e 6731 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6732
789de5e2 6733(define-public python-straight-plugin
6734 (package
6735 (name "python-straight-plugin")
6736 (version "1.4.1")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (pypi-uri "straight.plugin" version))
6741 (sha256
6742 (base32
6743 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6744 (build-system python-build-system)
6745 (home-page "https://github.com/ironfroggy/straight.plugin")
6746 (synopsis "Simple namespaced plugin facility")
6747 (description "Straight Plugin provides a type of plugin you can create from
6748almost any existing Python modules, and an easy way for outside developers to
6749add functionality and customization to your projects with their own plugins.")
6750 (license license:expat)))
6751
6752(define-public python2-straight-plugin
6753 (package-with-python2 python-straight-plugin))
6754
d582eaac
SB
6755(define-public python-fonttools
6756 (package
6757 (name "python-fonttools")
6758 (version "2.5")
6759 (source (origin
6760 (method url-fetch)
6761 (uri (string-append
6762 "https://pypi.python.org/packages/source/F/FontTools/"
6763 "fonttools-" version ".tar.gz"))
6764 (sha256
6765 (base32
6766 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6767 (build-system python-build-system)
9e8c6a37
HG
6768 (arguments
6769 '(#:test-target "check"
6770 #:phases
6771 (modify-phases %standard-phases
6772 (add-after 'unpack 'patch-setuppy
6773 ;; Remove the undocumented "extra_path" argument, which adds an
6774 ;; intervening directories between site-packages and the package
6775 ;; directory.
6776 (lambda _
6777 (substitute* "setup.py"
6778 (("^[ \t]*extra_path *= *'FontTools',") ""))
6779 #t)))))
7bf837fd 6780 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
6781 (synopsis "Tools to manipulate font files")
6782 (description
6783 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6784supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6785of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6786also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6787from an XML-based format.")
3f641af0
DC
6788 (license (license:non-copyleft
6789 "file://LICENSE.txt"
6790 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6791
6792(define-public python2-fonttools
6793 (package-with-python2 python-fonttools))
75710da6 6794
5faa5ce4
RW
6795(define-public python-ly
6796 (package
6797 (name "python-ly")
5135354f 6798 (version "0.9.4")
5faa5ce4
RW
6799 (source
6800 (origin
6801 (method url-fetch)
5135354f
RW
6802 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6803 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6804 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6805 (sha256
6806 (base32
5135354f 6807 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6808 (build-system python-build-system)
972cf9be
MB
6809 (arguments
6810 ;; FIXME: Some tests need network access.
6811 '(#:tests? #f))
5faa5ce4
RW
6812 (synopsis "Tool and library for manipulating LilyPond files")
6813 (description "This package provides a Python library to parse, manipulate
6814or create documents in LilyPond format. A command line program ly is also
6815provided that can be used to do various manipulations with LilyPond files.")
6816 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6817 (license license:gpl2+)))
7e7b27d9
CR
6818
6819(define-public python-appdirs
6820 (package
6821 (name "python-appdirs")
543782e1 6822 (version "1.4.3")
7e7b27d9
CR
6823 (source
6824 (origin
6825 (method url-fetch)
26b16fd9 6826 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
6827 (sha256
6828 (base32
543782e1 6829 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 6830 (build-system python-build-system)
7bf837fd 6831 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
6832 (synopsis
6833 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6834 (description
6835 "This module provides a portable way of finding out where user data
6836should be stored on various operating systems.")
6837 (license license:expat)))
6838
6839(define-public python2-appdirs
6840 (package-with-python2 python-appdirs))
89b2e0b0
LF
6841
6842(define-public python-llfuse
6843 (package
6844 (name "python-llfuse")
4d31d143 6845 (version "1.2")
89b2e0b0
LF
6846 (source (origin
6847 (method url-fetch)
6848 (uri (string-append
6849 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6850 "llfuse-" version ".tar.bz2"))
6851 (sha256
6852 (base32
4d31d143 6853 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
6854 (build-system python-build-system)
6855 (inputs
6856 `(("fuse" ,fuse)
6857 ("attr" ,attr)))
6858 (native-inputs
f3b98f4f 6859 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6860 (synopsis "Python bindings for FUSE")
6861 (description
6862 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6863 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6864 (license license:lgpl2.0+)
cd0569c4 6865 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6866
6867(define-public python2-llfuse
cd0569c4
LF
6868 (package (inherit (package-with-python2
6869 (strip-python2-variant python-llfuse)))
6870 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6871
6872;; For attic-0.16
6873(define-public python-llfuse-0.41
6874 (package (inherit python-llfuse)
229b3661 6875 (version "0.41.1")
cd0569c4
LF
6876 (source (origin
6877 (method url-fetch)
6878 (uri (string-append
6879 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6880 "llfuse-" version ".tar.bz2"))
6881 (sha256
6882 (base32
229b3661 6883 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6884 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6885 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6886 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6887
6888(define-public python-msgpack
6889 (package
6890 (name "python-msgpack")
aed625bd 6891 (version "0.4.8")
641c9871
LF
6892 (source (origin
6893 (method url-fetch)
ae831df4 6894 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6895 (sha256
6896 (base32
aed625bd 6897 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6898 (build-system python-build-system)
641c9871
LF
6899 (synopsis "MessagePack (de)serializer")
6900 (description "MessagePack is a fast, compact binary serialization format,
6901suitable for similar data to JSON. This package provides CPython bindings for
6902reading and writing MessagePack data.")
6903 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6904 (license license:asl2.0)))
bd74be7b
LF
6905
6906(define-public python2-msgpack
f210e944 6907 (package-with-python2 python-msgpack))
641c9871 6908
6e5e39f4
CR
6909(define-public python-netaddr
6910 (package
6911 (name "python-netaddr")
6912 (version "0.7.18")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (string-append
6917 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6918 version
6919 ".tar.gz"))
6920 (sha256
6921 (base32
6922 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6923 (build-system python-build-system)
6924 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6925 (home-page "https://github.com/drkjam/netaddr/")
6926 (synopsis "Pythonic manipulation of network addresses")
6927 (description
6928 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6929and MAC network addresses.")
3f641af0 6930 (license license:bsd-3)))
6e5e39f4
CR
6931
6932(define-public python2-netaddr
6933 (package-with-python2 python-netaddr))
8c692a52
CR
6934
6935(define-public python-wrapt
6936 (package
6937 (name "python-wrapt")
d25bee26 6938 (version "1.10.8")
8c692a52
CR
6939 (source
6940 (origin
6941 (method url-fetch)
d25bee26 6942 (uri (pypi-uri "wrapt" version))
8c692a52
CR
6943 (sha256
6944 (base32
d25bee26 6945 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
6946 (build-system python-build-system)
6947 (arguments
6948 ;; Tests are not included in the tarball, they are only available in the
6949 ;; git repository.
6950 `(#:tests? #f))
8c692a52
CR
6951 (home-page "https://github.com/GrahamDumpleton/wrapt")
6952 (synopsis "Module for decorators, wrappers and monkey patching")
6953 (description
6954 "The aim of the wrapt module is to provide a transparent object proxy for
6955 Python, which can be used as the basis for the construction of function
6956 wrappers and decorator functions.")
3f641af0 6957 (license license:bsd-2)))
8c692a52
CR
6958
6959(define-public python2-wrapt
6960 (package-with-python2 python-wrapt))
b85c85be
CR
6961
6962(define-public python-iso8601
6963 (package
6964 (name "python-iso8601")
fe84bc9a 6965 (version "0.1.11")
b85c85be
CR
6966 (source
6967 (origin
6968 (method url-fetch)
fe84bc9a 6969 (uri (pypi-uri "iso8601" version))
b85c85be 6970 (sha256
fe84bc9a
EF
6971 (base32
6972 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6973 (build-system python-build-system)
63b02364
MB
6974 (native-inputs
6975 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6976 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6977 (synopsis "Module to parse ISO 8601 dates")
6978 (description
6979 "This module parses the most common forms of ISO 8601 date strings (e.g.
6980@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6981 (license license:expat)))
6982
6983(define-public python2-iso8601
6984 (package-with-python2 python-iso8601))
5e412b63
CR
6985
6986(define-public python-monotonic
6987 (package
6988 (name "python-monotonic")
6989 (version "0.3")
6990 (source
6991 (origin
6992 (method url-fetch)
6993 (uri (string-append
6994 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6995 version
6996 ".tar.gz"))
6997 (sha256
6998 (base32
6999 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7000 (build-system python-build-system)
5e412b63
CR
7001 (home-page "https://github.com/atdt/monotonic")
7002 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7003 (description
7004 "This module provides a monotonic() function which returns the value (in
7005fractional seconds) of a clock which never goes backwards.")
3f641af0 7006 (license license:asl2.0)))
5e412b63
CR
7007
7008(define-public python2-monotonic
7009 (package-with-python2 python-monotonic))
de34afac
CR
7010
7011(define-public python-webob
7012 (package
7013 (name "python-webob")
b8834c21 7014 (version "1.5.1")
de34afac
CR
7015 (source
7016 (origin
7017 (method url-fetch)
b8834c21 7018 (uri (pypi-uri "WebOb" version))
de34afac
CR
7019 (sha256
7020 (base32
b8834c21 7021 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7022 (build-system python-build-system)
328bb95d 7023 (native-inputs
f3b98f4f 7024 `(("python-nose" ,python-nose)))
de34afac
CR
7025 (home-page "http://webob.org/")
7026 (synopsis "WSGI request and response object")
7027 (description
7028 "WebOb provides wrappers around the WSGI request environment, and an
7029object to help create WSGI responses.")
7030 (license license:expat)))
7031
7032(define-public python2-webob
7033 (package-with-python2 python-webob))
350ba0a3 7034
02a8a187
BW
7035(define-public python-xlrd
7036 (package
7037 (name "python-xlrd")
c2ad4d70 7038 (version "1.0.0")
02a8a187
BW
7039 (source (origin
7040 (method url-fetch)
e775f48e 7041 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7042 (sha256
7043 (base32
c2ad4d70 7044 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7045 (build-system python-build-system)
7046 (arguments
7047 `(#:phases
7048 (modify-phases %standard-phases
c2ad4d70 7049 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7050 ;; run tests instead for now.
7051 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7052 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7053 (home-page "http://www.python-excel.org/")
7054 (synopsis "Library for extracting data from Excel files")
7055 (description "This packages provides a library to extract data from
c598e35c 7056spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7057@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7058Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7059 (license license:bsd-3)))
02a8a187
BW
7060
7061(define-public python2-xlrd
7062 (package-with-python2 python-xlrd))
7063
350ba0a3
CR
7064(define-public python-prettytable
7065 (package
7066 (name "python-prettytable")
7067 (version "0.7.2")
7068 (source
7069 (origin
7070 (method url-fetch)
7071 (uri (string-append
7072 "https://pypi.python.org/packages/source/P/PrettyTable/"
7073 "prettytable-" version ".tar.bz2"))
7074 (sha256
7075 (base32
7076 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7077 (build-system python-build-system)
350ba0a3
CR
7078 (home-page "http://code.google.com/p/prettytable/")
7079 (synopsis "Display tabular data in an ASCII table format")
7080 (description
7081 "A library designed to represent tabular data in visually appealing ASCII
7082tables. PrettyTable allows for selection of which columns are to be printed,
7083independent alignment of columns (left or right justified or centred) and
7084printing of sub-tables by specifying a row range.")
3f641af0 7085 (license license:bsd-3)))
350ba0a3
CR
7086
7087(define-public python2-prettytable
7088 (package-with-python2 python-prettytable))
7a8ac75a 7089
9f8ee3fe
RW
7090(define-public python-tables
7091 (package
7092 (name "python-tables")
7093 (version "3.2.2")
7094 (source
7095 (origin
7096 (method url-fetch)
7097 (uri (pypi-uri "tables" version))
7098 (sha256
7099 (base32
bac23672
HG
7100 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7101 (modules '((guix build utils)))
7102 (snippet
7103 '(begin
7104 ;; Remove pre-compiled .pyc files from source.
7105 (for-each delete-file-recursively
7106 (find-files "." "__pycache__" #:directories? #t))
7107 (for-each delete-file (find-files "." "\\.pyc$"))
7108 #t))))
9f8ee3fe
RW
7109 (build-system python-build-system)
7110 (arguments
7111 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7112 ;; or "check", so we must override the build and check phases.
7113 #:phases
7114 (modify-phases %standard-phases
7115 (add-after 'unpack 'use-gcc
7116 (lambda _
7117 (substitute* "setup.py"
7118 (("compiler = new_compiler\\(\\)" line)
7119 (string-append line
7120 "\ncompiler.set_executables(compiler='gcc',"
7121 "compiler_so='gcc',"
7122 "linker_exe='gcc',"
7123 "linker_so='gcc -shared')")))
7124 #t))
7125 (replace 'build
7126 (lambda* (#:key inputs #:allow-other-keys)
7127 (zero? (system* "python" "setup.py" "build"
7128 (string-append "--hdf5="
7129 (assoc-ref inputs "hdf5"))))))
7130 (replace 'check
7131 (lambda* (#:key inputs #:allow-other-keys)
7132 (zero? (system* "python" "setup.py" "check"
7133 (string-append "--hdf5="
7134 (assoc-ref inputs "hdf5")))))))))
7135 (propagated-inputs
7136 `(("python-numexpr" ,python-numexpr)
7137 ("python-numpy" ,python-numpy)))
7138 (native-inputs
f3b98f4f 7139 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7140 ("pkg-config" ,pkg-config)))
7141 (inputs
7142 `(("hdf5" ,hdf5)
7143 ("bzip2" ,bzip2)
7144 ("zlib" ,zlib)))
7145 (home-page "http://www.pytables.org/")
7146 (synopsis "Hierarchical datasets for Python")
7147 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7148designed to efficiently cope with extremely large amounts of data.")
3f641af0 7149 (license license:bsd-3)))
9f8ee3fe
RW
7150
7151(define-public python2-tables
7152 (package-with-python2 python-tables))
7153
7a8ac75a
RW
7154(define-public python-pyasn1
7155 (package
7156 (name "python-pyasn1")
caa0edb3 7157 (version "0.1.9")
7a8ac75a
RW
7158 (source
7159 (origin
7160 (method url-fetch)
caa0edb3 7161 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7162 (sha256
7163 (base32
caa0edb3 7164 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
7165 (build-system python-build-system)
7166 (home-page "http://pyasn1.sourceforge.net/")
7167 (synopsis "ASN.1 types and codecs")
7168 (description
7169 "This is an implementation of ASN.1 types and codecs in Python. It is
7170suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7171 (license license:bsd-2)))
7a8ac75a
RW
7172
7173(define-public python2-pyasn1
7174 (package-with-python2 python-pyasn1))
9a49a535 7175
5988c299
EF
7176(define-public python-pyasn1-modules
7177 (package
7178 (name "python-pyasn1-modules")
7179 (version "0.0.8")
7180 (source
7181 (origin
7182 (method url-fetch)
7183 (uri (pypi-uri "pyasn1-modules" version))
7184 (sha256
7185 (base32
7186 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7187 (build-system python-build-system)
5988c299
EF
7188 (propagated-inputs
7189 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7190 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7191 (synopsis "ASN.1 codec implementations")
7192 (description
7193 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7194implementations of ASN.1-based codecs and protocols.")
3f641af0 7195 (license license:bsd-3)))
5988c299
EF
7196
7197(define-public python2-pyasn1-modules
7198 (package-with-python2 python-pyasn1-modules))
7199
520af157 7200(define-public python-ipaddress
9a49a535 7201 (package
520af157 7202 (name "python-ipaddress")
36e0d9db 7203 (version "1.0.18")
520af157
DC
7204 (source (origin
7205 (method url-fetch)
7206 (uri (pypi-uri "ipaddress" version))
7207 (sha256
7208 (base32
36e0d9db 7209 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7210 (build-system python-build-system)
9a49a535
RW
7211 (home-page "https://github.com/phihag/ipaddress")
7212 (synopsis "IP address manipulation library")
7213 (description
520af157
DC
7214 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7215 in Python. This library is used to create, poke at, and manipulate IPv4 and
7216 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7217 module to older versions of Python.")
f210e944 7218 (license license:psfl)))
520af157
DC
7219
7220(define-public python2-ipaddress
f210e944 7221 (package-with-python2 python-ipaddress))
3f00e078 7222
4a238186
HG
7223(define-public python2-ipaddr
7224 (package
7225 (name "python2-ipaddr")
7226 (version "2.1.11")
7227 (source
7228 (origin
7229 (method url-fetch)
7230 (uri (pypi-uri "ipaddr" version))
7231 (sha256
7232 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7233 (build-system python-build-system)
7234 (arguments
7235 `(#:python ,python-2 ;version 2 only
7236 #:phases
7237 (modify-phases %standard-phases
7238 (replace 'check
7239 (lambda* _
7240 (zero? (system* "python" "ipaddr_test.py")))))))
7241 (home-page "https://github.com/google/ipaddr-py")
7242 (synopsis "IP address manipulation library")
7243 (description
7244 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7245IPv6 addresses and networks.
7246
7247For new implementations you may prefer to use the standard module
7248@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7249versions of Python.")
3f641af0 7250 (license license:asl2.0)))
4a238186 7251
3f00e078
RW
7252(define-public python-idna
7253 (package
7254 (name "python-idna")
7255 (version "2.0")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (string-append "https://pypi.python.org/packages/source/i/"
7260 "idna/idna-" version ".tar.gz"))
7261 (sha256
7262 (base32
7263 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7264 (build-system python-build-system)
3f00e078
RW
7265 (home-page "https://github.com/kjd/idna")
7266 (synopsis "Internationalized domain names in applications")
7267 (description
7268 "This is a library to support the Internationalised Domain Names in
7269Applications (IDNA) protocol as specified in RFC 5891. This version of the
7270protocol is often referred to as “IDNA2008” and can produce different results
7271from the earlier standard from 2003. The library is also intended to act as a
7272suitable drop-in replacement for the “encodings.idna” module that comes with
7273the Python standard library but currently only supports the older 2003
7274specification.")
3f641af0 7275 (license license:bsd-4)))
3f00e078
RW
7276
7277(define-public python2-idna
7278 (package-with-python2 python-idna))
36ebf972
RW
7279
7280(define-public python-pretend
7281 (package
7282 (name "python-pretend")
7283 (version "1.0.8")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (string-append "https://pypi.python.org/packages/source/p/"
7288 "pretend/pretend-" version ".tar.gz"))
7289 (sha256
7290 (base32
7291 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7292 (build-system python-build-system)
36ebf972
RW
7293 (home-page "https://github.com/alex/pretend")
7294 (synopsis "Library for stubbing in Python")
7295 (description
7296 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7297technique for writing tests. You may hear the term mixed up with mocks,
7298fakes, or doubles. Basically, a stub is an object that returns pre-canned
7299responses, rather than doing any computation.")
3f641af0 7300 (license license:bsd-3)))
36ebf972
RW
7301
7302(define-public python2-pretend
7303 (package-with-python2 python-pretend))
aa759a51
RW
7304
7305(define-public python-cryptography-vectors
7306 (package
7307 (name "python-cryptography-vectors")
27fab2bf 7308 (version "1.7.1")
aa759a51
RW
7309 (source
7310 (origin
7311 (method url-fetch)
9c509ca9 7312 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7313 (sha256
7314 (base32
27fab2bf 7315 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7316 (build-system python-build-system)
aa759a51 7317 (home-page "https://github.com/pyca/cryptography")
66e07664 7318 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7319 (description
7320 "This package contains test vectors for the cryptography package.")
7321 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7322 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7323
7324(define-public python2-cryptography-vectors
7325 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7326
7327(define-public python-cryptography
7328 (package
7329 (name "python-cryptography")
27fab2bf 7330 (version "1.7.1")
88b47cb0
RW
7331 (source
7332 (origin
7333 (method url-fetch)
9c509ca9 7334 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7335 (sha256
7336 (base32
27fab2bf 7337 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7338 (build-system python-build-system)
7339 (inputs
7340 `(("openssl" ,openssl)))
7341 (propagated-inputs
7342 `(("python-cffi" ,python-cffi)
7343 ("python-six" ,python-six)
7344 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7345 ("python-idna" ,python-idna)
7346 ("python-iso8601" ,python-iso8601)))
7347 (native-inputs
7348 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7349 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7350 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7351 ("python-pyasn1" ,python-pyasn1)
7352 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad 7353 ("python-pytz" ,python-pytz)
23b9168d 7354 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7355 (home-page "https://github.com/pyca/cryptography")
7356 (synopsis "Cryptographic recipes and primitives for Python")
7357 (description
7358 "cryptography is a package which provides cryptographic recipes and
7359primitives to Python developers. It aims to be the “cryptographic standard
7360library” for Python. The package includes both high level recipes, and low
7361level interfaces to common cryptographic algorithms such as symmetric ciphers,
7362message digests and key derivation functions.")
7363 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7364 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7365 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7366
7367(define-public python2-cryptography
519e2f4f
LF
7368 (let ((crypto (package-with-python2
7369 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7370 (package (inherit crypto)
7371 (propagated-inputs
7372 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7373 ("python2-backport-ssl-match-hostname"
7374 ,python2-backport-ssl-match-hostname)
68f1cdec 7375 ("python2-enum34" ,python2-enum34)
88b47cb0 7376 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7377
7378(define-public python-pyopenssl
7379 (package
7380 (name "python-pyopenssl")
833df99d 7381 (version "17.0.0")
5af999b8
RW
7382 (source
7383 (origin
7384 (method url-fetch)
eb68d268 7385 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7386 (sha256
7387 (base32
833df99d 7388 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7c6bf660
MB
7389 (patches
7390 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7391 (build-system python-build-system)
30e0229a 7392 (arguments
7c6bf660
MB
7393 '(#:phases
7394 (modify-phases %standard-phases
7395 (delete 'check)
7396 (add-after 'install 'check
7397 (lambda* (#:key inputs outputs #:allow-other-keys)
7398 (add-installed-pythonpath inputs outputs)
7399 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7400 (propagated-inputs
7401 `(("python-cryptography" ,python-cryptography)
7402 ("python-six" ,python-six)))
7403 (inputs
7404 `(("openssl" ,openssl)))
30e0229a 7405 (native-inputs
833df99d 7406 `(("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7407 (home-page "https://github.com/pyca/pyopenssl")
7408 (synopsis "Python wrapper module around the OpenSSL library")
7409 (description
7410 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7411library.")
3f641af0 7412 (license license:asl2.0)))
5af999b8
RW
7413
7414(define-public python2-pyopenssl
519e2f4f 7415 (package-with-python2 python-pyopenssl))
643725a1
CR
7416
7417(define-public python-pip
7418 (package
7419 (name "python-pip")
392c26b0 7420 (version "9.0.1")
643725a1
CR
7421 (source
7422 (origin
7423 (method url-fetch)
6fb54e3b 7424 (uri (pypi-uri "pip" version))
643725a1
CR
7425 (sha256
7426 (base32
392c26b0 7427 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7428 (build-system python-build-system)
392c26b0
MC
7429 (arguments
7430 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7431 (home-page "https://pip.pypa.io/")
392c26b0 7432 (synopsis "Package manager for Python software")
643725a1 7433 (description
392c26b0 7434 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7435Python Package Index (PyPI).")
7436 (license license:expat)))
7437
7438(define-public python2-pip
7439 (package-with-python2 python-pip))
d8c4998f
LC
7440
7441(define-public python-tlsh
7442 (package
7443 (name "python-tlsh")
99b00dc7 7444 (version "3.4.4")
d8c4998f
LC
7445 (home-page "https://github.com/trendmicro/tlsh")
7446 (source (origin
99b00dc7
EF
7447 (method url-fetch)
7448 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7449 version ".tar.gz"))
d8c4998f
LC
7450 (sha256
7451 (base32
99b00dc7
EF
7452 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7453 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7454 (build-system cmake-build-system)
7455 (arguments
7456 '(#:out-of-source? #f
7457 #:phases (modify-phases %standard-phases
7458 (replace
7459 'install
7460 (lambda* (#:key outputs #:allow-other-keys)
7461 ;; Build and install the Python bindings. The underlying
7462 ;; C++ library is apparently not meant to be installed.
7463 (let ((out (assoc-ref outputs "out")))
7464 (with-directory-excursion "py_ext"
7465 (and (system* "python" "setup.py" "build")
7466 (system* "python" "setup.py" "install"
7467 (string-append "--prefix=" out))))))))))
7468 (inputs `(("python" ,python-wrapper))) ;for the bindings
7469 (synopsis "Fuzzy matching library for Python")
7470 (description
7471 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7472Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7473value which can be used for similarity comparisons. Similar objects have
7474similar hash values, which allows for the detection of similar objects by
7475comparing their hash values. The byte stream should have a sufficient amount
7476of complexity; for example, a byte stream of identical bytes will not generate
7477a hash value.")
3f641af0 7478 (license license:asl2.0)))
d8c4998f
LC
7479
7480(define-public python2-tlsh
7481 (package
7482 (inherit python-tlsh)
7483 (name "python2-tlsh")
7484 (inputs `(("python" ,python-2)))))
d96034ed 7485
67f66812
BW
7486(define-public python-termcolor
7487 (package
7488 (name "python-termcolor")
7489 (version "1.1.0")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "python-termcolor" version))
7494 (sha256
7495 (base32
7496 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7497 (build-system python-build-system)
7498 (arguments
7499 ;; There are no tests.
7500 `(#:tests? #f))
7501 (home-page "http://pypi.python.org/pypi/termcolor")
7502 (synopsis "ANSII Color formatting for terminal output")
7503 (description
7504 "This package provides ANSII Color formatting for output in terminals.")
7505 (license license:expat)))
7506
7507(define-public python2-termcolor
7508 (package-with-python2 python-termcolor))
7509
d96034ed
LC
7510(define-public python-libarchive-c
7511 (package
7512 (name "python-libarchive-c")
03fd001c 7513 (version "2.2")
d96034ed
LC
7514 (source (origin
7515 (method url-fetch)
03fd001c 7516 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7517 (sha256
7518 (base32
03fd001c 7519 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7520 (build-system python-build-system)
7521 (arguments
7522 '(#:phases (modify-phases %standard-phases
7523 (add-before
7524 'build 'reference-libarchive
7525 (lambda* (#:key inputs #:allow-other-keys)
7526 ;; Retain the absolute file name of libarchive.so.
7527 (let ((libarchive (assoc-ref inputs "libarchive")))
7528 (substitute* "libarchive/ffi.py"
7529 (("find_library\\('archive'\\)")
7530 (string-append "'" libarchive
b41a05ce 7531 "/lib/libarchive.so'")))))))))
d96034ed 7532 (inputs
f3b98f4f 7533 `(("libarchive" ,libarchive)))
d96034ed
LC
7534 (home-page "https://github.com/Changaco/python-libarchive-c")
7535 (synopsis "Python interface to libarchive")
7536 (description
7537 "This package provides Python bindings to libarchive, a C library to
7538access possibly compressed archives in many different formats. It uses
7539Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7540 (license license:lgpl2.0+)))
d96034ed
LC
7541
7542(define-public python2-libarchive-c
7543 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7544
7545(define-public python-file
7546 (package
7547 (inherit file)
7548 (name "python-file")
7ffa5d4a
LF
7549 (source (origin
7550 (inherit (package-source file))
7551 ;; This patch should not be applied to python2-file.
7552 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7553 (build-system python-build-system)
7554 (arguments
7555 '(#:tests? #f ;no tests
00bf74be 7556 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7557 #:phases (modify-phases %standard-phases
7558 (add-before 'build 'change-directory
7559 (lambda _
7560 (chdir "python")
7561 #t))
7562 (add-before 'build 'set-library-file-name
7563 (lambda* (#:key inputs #:allow-other-keys)
7564 (let ((file (assoc-ref inputs "file")))
7565 (substitute* "magic.py"
7566 (("find_library\\('magic'\\)")
7567 (string-append "'" file "/lib/libmagic.so'")))
7568 #t))))))
7569 (inputs `(("file" ,file)))
7570 (self-native-input? #f)
daeeea71
CM
7571 (synopsis "Python bindings to the libmagic file type guesser. Note that
7572this module and the python-magic module both provide a \"magic.py\" file;
7573these two modules, which are different and were developed separately, both
f210e944 7574serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7575
7576(define-public python2-file
f210e944 7577 (package-with-python2 python-file))
85d4aeac
LC
7578
7579(define-public python-debian
7580 (package
7581 (name "python-debian")
02d7f337 7582 (version "0.1.28")
85d4aeac
LC
7583 (source
7584 (origin
7585 (method url-fetch)
5e217a8b 7586 (uri (pypi-uri name version))
85d4aeac
LC
7587 (sha256
7588 (base32
02d7f337 7589 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7590 (build-system python-build-system)
f22efa01 7591 (propagated-inputs
85d4aeac 7592 `(("python-six" ,python-six)))
85d4aeac
LC
7593 (home-page "http://packages.debian.org/sid/python-debian")
7594 (synopsis "Debian package related modules")
7595 (description
5c7bdc9a
LC
7596 ;; XXX: Use @enumerate instead of @itemize to work around
7597 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7598 "This package provides Python modules that abstract many formats of
7599Debian-related files, such as:
7600
5c7bdc9a 7601@enumerate
85d4aeac
LC
7602@item Debtags information;
7603@item @file{debian/changelog} files;
7604@item packages files, pdiffs;
7605@item control files of single or multiple RFC822-style paragraphs---e.g.
7606 @file{debian/control}, @file{.changes}, @file{.dsc};
7607@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7608 contained files and meta-information.
5c7bdc9a 7609@end enumerate\n")
85d4aeac
LC
7610
7611 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7612 (license license:gpl3+)))
85d4aeac
LC
7613
7614(define-public python2-debian
7615 (package-with-python2 python-debian))
816a6538 7616
2d321bb2
RW
7617(define-public python-nbformat
7618 (package
7619 (name "python-nbformat")
7620 (version "4.1.0")
7621 (source
7622 (origin
7623 (method url-fetch)
7624 (uri (pypi-uri "nbformat" version))
7625 (sha256
7626 (base32
7627 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7628 (build-system python-build-system)
7629 (arguments `(#:tests? #f)) ; no test target
7630 (propagated-inputs
7631 `(("python-ipython-genutils" ,python-ipython-genutils)
7632 ("python-jsonschema" ,python-jsonschema)
7633 ("python-jupyter-core" ,python-jupyter-core)
7634 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7635 (home-page "http://jupyter.org")
7636 (synopsis "Jupyter Notebook format")
7637 (description "This package provides the reference implementation of the
7638Jupyter Notebook format and Python APIs for working with notebooks.")
7639 (license license:bsd-3)))
7640
7641(define-public python2-nbformat
7642 (package-with-python2 python-nbformat))
7643
55436048
RW
7644(define-public python-bleach
7645 (package
7646 (name "python-bleach")
7647 (version "1.4.3")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "bleach" version))
7652 (sha256
7653 (base32
7654 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7655 (build-system python-build-system)
7656 (propagated-inputs
7657 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7658 ("python-six" ,python-six)))
7659 (native-inputs
7660 `(("python-nose" ,python-nose)))
7bf837fd 7661 (home-page "https://github.com/jsocol/bleach")
55436048
RW
7662 (synopsis "Whitelist-based HTML-sanitizing tool")
7663 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7664 (license license:asl2.0)))
7665
7666(define-public python2-bleach
7667 (package-with-python2 python-bleach))
7668
60590a3a
RW
7669(define-public python-entrypoints
7670 (package
7671 (name "python-entrypoints")
7672 (version "0.2.2")
7673 (source
7674 (origin
7675 (method url-fetch)
7676 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7677 version ".tar.gz"))
7678 (file-name (string-append name "-" version ".tar.gz"))
7679 (sha256
7680 (base32
7681 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7682 (build-system python-build-system)
7683 ;; The package does not come with a setup.py file, so we have to generate
7684 ;; one ourselves.
7685 (arguments
7686 `(#:tests? #f
7687 #:phases
7688 (modify-phases %standard-phases
7689 (add-after 'unpack 'create-setup.py
7690 (lambda _
7691 (call-with-output-file "setup.py"
7692 (lambda (port)
7693 (format port "\
7694from setuptools import setup
7695setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7696" ,version))))))))
7697 (home-page "https://github.com/takluyver/entrypoints")
7698 (synopsis "Discover and load entry points from installed Python packages")
7699 (description "Entry points are a way for Python packages to advertise
7700objects with some common interface. The most common examples are
7701@code{console_scripts} entry points, which define shell commands by
7702identifying a Python function to run. The @code{entrypoints} module contains
7703functions to find and load entry points.")
7704 (license license:expat)))
7705
7706(define-public python2-entrypoints
7707 (package-with-python2 python-entrypoints))
7708
c60898a8
RW
7709(define-public python-nbconvert
7710 (package
7711 (name "python-nbconvert")
7712 (version "5.0.0b1")
7713 (source
7714 (origin
7715 (method url-fetch)
7716 (uri (pypi-uri "nbconvert" version))
7717 (sha256
7718 (base32
7719 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7720 (build-system python-build-system)
497355dc
MB
7721 (arguments
7722 `(;; The "bdist_egg" target is disabled by default, causing the installation
7723 ;; to fail.
7724 #:configure-flags (list "bdist_egg")
7725 ;; FIXME: 5 failures, 40 errors.
7726 #:tests? #f))
7727 ;; #:phases
7728 ;; (modify-phases %standard-phases
7729 ;; (replace 'check
7730 ;; (lambda _
7731 ;; (zero? (system* "py.test" "-v")))))
7732 (native-inputs
7733 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7734 (propagated-inputs
7735 `(("python-bleach" ,python-bleach)
7736 ("python-entrypoints" ,python-entrypoints)
7737 ("python-jinja2" ,python-jinja2)
7738 ("python-jupyter-core" ,python-jupyter-core)
7739 ("python-mistune" ,python-mistune)
7740 ("python-nbformat" ,python-nbformat)
7741 ("python-pygments" ,python-pygments)
c60898a8
RW
7742 ("python-traitlets" ,python-traitlets)))
7743 (home-page "http://jupyter.org")
7744 (synopsis "Converting Jupyter Notebooks")
7745 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7746notebooks to various other formats via Jinja templates. It allows you to
7747convert an @code{.ipynb} notebook file into various static formats including:
7748
7749@enumerate
7750@item HTML
7751@item LaTeX
7752@item PDF
7753@item Reveal JS
7754@item Markdown (md)
7755@item ReStructured Text (rst)
7756@item executable script
7757@end enumerate\n")
7758 (license license:bsd-3)))
7759
7760(define-public python2-nbconvert
7761 (package-with-python2 python-nbconvert))
7762
a0d62280
RW
7763(define-public python-notebook
7764 (package
7765 (name "python-notebook")
7766 (version "4.2.3")
7767 (source (origin
7768 (method url-fetch)
7769 (uri (pypi-uri "notebook" version))
7770 (sha256
7771 (base32
7772 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7773 (build-system python-build-system)
7774 (arguments
7775 `(#:phases
7776 (modify-phases %standard-phases
7777 (replace 'check
7778 (lambda _
7779 ;; HOME must be set for tests
7780 (setenv "HOME" "/tmp")
7781 (zero? (system* "nosetests")))))))
7782 (propagated-inputs
7783 `(("python-jupyter-core" ,python-jupyter-core)
7784 ("python-nbformat" ,python-nbformat)
7785 ("python-nbconvert" ,python-nbconvert)
7786 ("python-ipython" ,python-ipython)))
7787 (native-inputs
7788 `(("python-nose" ,python-nose)
7789 ("python-sphinx" ,python-sphinx)
7790 ("python-requests" ,python-requests)))
7791 (home-page "http://jupyter.org/")
7792 (synopsis "Web-based notebook environment for interactive computing")
7793 (description
7794 "The Jupyter HTML notebook is a web-based notebook environment for
7795interactive computing.")
3a735ecf 7796 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7797 (license license:bsd-3)))
7798
7799(define-public python2-notebook
3a735ecf
HG
7800 (let ((base (package-with-python2
7801 (strip-python2-variant python-notebook))))
7802 (package (inherit base)
7803 (native-inputs
7804 `(("python2-mock" ,python2-mock)
7805 ,@(package-native-inputs base)))
7806 (arguments
7807 (substitute-keyword-arguments (package-arguments base)
7808 ((#:phases phases)
7809 `(modify-phases ,phases
7810 (add-before 'check 'disable-test-case
7811 ;; The test requires network access to localhost. Curiously it
7812 ;; fails with Python 2 only. Simply make the test-case return
7813 ;; immediately.
7814 (lambda _
7815 (substitute*
7816 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7817 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7818
d55724ed
RW
7819(define-public python-widgetsnbextension
7820 (package
7821 (name "python-widgetsnbextension")
7822 (version "1.2.6")
7823 (source
7824 (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "widgetsnbextension" version))
7827 (sha256
7828 (base32
7829 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7830 (build-system python-build-system)
7831 (propagated-inputs
7832 `(("python-notebook" ,python-notebook)))
7833 (native-inputs
58f5fae7
MB
7834 `(("python-certifi" ,python-certifi)
7835 ("python-nose" ,python-nose)))
d55724ed
RW
7836 (home-page "http://ipython.org")
7837 (synopsis "IPython HTML widgets for Jupyter")
7838 (description "This package provides interactive HTML widgets for Jupyter
7839notebooks.")
7840 (license license:bsd-3)))
7841
7842(define-public python2-widgetsnbextension
7843 (package-with-python2 python-widgetsnbextension))
7844
4fe2e344
RW
7845(define-public python-ipywidgets
7846 (package
7847 (name "python-ipywidgets")
7848 (version "5.2.2")
7849 (source
7850 (origin
7851 (method url-fetch)
7852 (uri (pypi-uri "ipywidgets" version))
7853 (sha256
7854 (base32
7855 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7856 (build-system python-build-system)
7857 ;; FIXME: it's not clear how to run the tests.
7858 (arguments `(#:tests? #f))
7859 (propagated-inputs
7860 `(("python-ipykernel" ,python-ipykernel)
7861 ("python-ipython" ,python-ipython)
4fe2e344
RW
7862 ("python-traitlets" ,python-traitlets)
7863 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7864 (home-page "http://ipython.org")
7865 (synopsis "IPython HTML widgets for Jupyter")
7866 (description "Ipywidgets are interactive HTML widgets for Jupyter
7867notebooks and the IPython kernel. Notebooks come alive when interactive
7868widgets are used. Users gain control of their data and can visualize changes
7869in the data.")
7870 (license license:bsd-3)))
7871
7872(define-public python2-ipywidgets
7873 (package-with-python2 python-ipywidgets))
7874
8ceebf8f
RW
7875(define-public python-jupyter-console
7876 (package
7877 (name "python-jupyter-console")
7878 (version "5.0.0")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "jupyter_console" version))
7883 (sha256
7884 (base32
7885 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7886 (build-system python-build-system)
7887 ;; FIXME: it's not clear how to run the tests.
7888 (arguments `(#:tests? #f))
7889 (propagated-inputs
7890 `(("python-ipykernel" ,python-ipykernel)
7891 ("python-ipython" ,python-ipython)
7892 ("python-jupyter-client" ,python-jupyter-client)
7893 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7894 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7895 (home-page "https://jupyter.org")
7896 (synopsis "Jupyter terminal console")
7897 (description "This package provides a terminal-based console frontend for
7898Jupyter kernels. It also allows for console-based interaction with non-Python
7899Jupyter kernels such as IJulia and IRKernel.")
7900 (license license:bsd-3)))
7901
7902(define-public python2-jupyter-console
7903 (package-with-python2 python-jupyter-console))
7904
c27ae827
RW
7905(define-public jupyter
7906 (package
7907 (name "jupyter")
7908 (version "1.0.0")
7909 (source
7910 (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "jupyter" version))
7913 (sha256
7914 (base32
7915 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7916 (build-system python-build-system)
7917 ;; FIXME: it's not clear how to run the tests.
7918 (arguments `(#:tests? #f))
7919 (propagated-inputs
7920 `(("python-ipykernel" ,python-ipykernel)
7921 ("python-ipywidgets" ,python-ipywidgets)
7922 ("python-jupyter-console" ,python-jupyter-console)
7923 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7924 ("python-notebook" ,python-notebook)))
c27ae827
RW
7925 (home-page "http://jupyter.org")
7926 (synopsis "Web application for interactive documents")
7927 (description
7928 "The Jupyter Notebook is a web application that allows you to create and
7929share documents that contain live code, equations, visualizations and
7930explanatory text. Uses include: data cleaning and transformation, numerical
7931simulation, statistical modeling, machine learning and much more.")
7932 (license license:bsd-3)))
7933
816a6538
LC
7934(define-public python-chardet
7935 (package
7936 (name "python-chardet")
7937 (version "2.3.0")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (string-append
7942 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7943 version
7944 ".tar.gz"))
7945 (sha256
7946 (base32
7947 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7948 (build-system python-build-system)
816a6538
LC
7949 (home-page "https://github.com/chardet/chardet")
7950 (synopsis "Universal encoding detector for Python 2 and 3")
7951 (description
7952 "This package provides @code{chardet}, a Python module that can
7953automatically detect a wide range of file encodings.")
3f641af0 7954 (license license:lgpl2.1+)))
816a6538
LC
7955
7956(define-public python2-chardet
7957 (package-with-python2 python-chardet))
2fc5f186 7958
1872f1bb
KM
7959(define-public python-docopt
7960 (package
7961 (name "python-docopt")
7962 (version "0.6.2")
7963 (source
7964 (origin
7965 (method url-fetch)
7966 ;; The release on PyPI does not include tests.
7967 (uri (string-append
7968 "https://github.com/docopt/docopt/archive/"
7969 version ".tar.gz"))
7970 (file-name (string-append name "-" version ".tar.gz"))
7971 (sha256
7972 (base32
7973 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7974 (build-system python-build-system)
7975 (native-inputs
f3b98f4f 7976 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7977 (arguments
7978 `(#:phases (alist-replace
7979 'check
7980 (lambda _ (zero? (system* "py.test")))
7981 %standard-phases)))
7982 (home-page "http://docopt.org")
7983 (synopsis "Command-line interface description language for Python")
7984 (description "This library allows the user to define a command-line
7985interface from a program's help message rather than specifying it
7986programatically with command-line parsers like @code{getopt} and
7987@code{argparse}.")
7988 (license license:expat)))
7989
7990(define-public python2-docopt
7991 (package-with-python2 python-docopt))
7992
2fc5f186
LF
7993(define-public python-zope-event
7994 (package
7995 (name "python-zope-event")
7996 (version "4.1.0")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (string-append "https://pypi.python.org/packages/source/z"
8001 "/zope.event/zope.event-" version ".tar.gz"))
8002 (sha256
8003 (base32
8004 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8005 (build-system python-build-system)
2fc5f186
LF
8006 (home-page "http://pypi.python.org/pypi/zope.event")
8007 (synopsis "Event publishing system for Python")
8008 (description "Zope.event provides an event publishing API, intended for
8009use by applications which are unaware of any subscribers to their events. It
8010is a simple event-dispatching system on which more sophisticated event
8011dispatching systems can be built.")
3f641af0 8012 (license license:zpl2.1)))
2fc5f186
LF
8013
8014(define-public python2-zope-event
8015 (package-with-python2 python-zope-event))
97abe268
LF
8016
8017(define-public python-zope-interface
8018 (package
8019 (name "python-zope-interface")
8020 (version "4.1.3")
8021 (source
8022 (origin
8023 (method url-fetch)
8024 (uri (string-append "https://pypi.python.org/packages/source/z"
8025 "/zope.interface/zope.interface-" version ".tar.gz"))
8026 (sha256
8027 (base32
8028 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8029 (build-system python-build-system)
38d480a8 8030 (native-inputs
97abe268
LF
8031 `(("python-zope-event" ,python-zope-event)))
8032 (home-page "https://github.com/zopefoundation/zope.interface")
8033 (synopsis "Python implementation of the \"design by contract\"
8034methodology")
8035 (description "Zope.interface provides an implementation of \"object
8036interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8037conforming to a given API or contract.")
3f641af0 8038 (license license:zpl2.1)))
97abe268
LF
8039
8040(define-public python2-zope-interface
8041 (package-with-python2 python-zope-interface))
81f2373c
LF
8042
8043(define-public python-zope-exceptions
8044 (package
8045 (name "python-zope-exceptions")
8046 (version "4.0.8")
8047 (source
8048 (origin
8049 (method url-fetch)
8050 (uri (string-append "https://pypi.python.org/packages/source/z"
8051 "/zope.exceptions/zope.exceptions-"
8052 version ".tar.gz"))
8053 (sha256
8054 (base32
8055 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8056 (build-system python-build-system)
8057 (arguments
8058 '(#:tests? #f)) ; circular dependency with zope.testrunner
8059 (propagated-inputs
8060 `(("python-zope-interface" ,python-zope-interface)))
8061 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8062 (synopsis "Zope exceptions")
8063 (description "Zope.exceptions provides general-purpose exception types
8064that have uses outside of the Zope framework.")
3f641af0 8065 (license license:zpl2.1)))
81f2373c
LF
8066
8067(define-public python2-zope-exceptions
8068 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8069
8070(define-public python-zope-testing
8071 (package
8072 (name "python-zope-testing")
8073 (version "4.5.0")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (string-append "https://pypi.python.org/packages/source/z"
8078 "/zope.testing/zope.testing-" version ".tar.gz"))
8079 (sha256
8080 (base32
b02f7a21
HG
8081 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8082 (modules '((guix build utils)))
8083 (snippet
8084 '(begin
8085 ;; Remove pre-compiled .pyc files backup files from source.
8086 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8087 #t))))
900e3c0e
LF
8088 (build-system python-build-system)
8089 (native-inputs
8090 `(("python-zope-exceptions" ,python-zope-exceptions)))
8091 (propagated-inputs
8092 `(("python-zope-interface" ,python-zope-interface)))
8093 (home-page "http://pypi.python.org/pypi/zope.testing")
8094 (synopsis "Zope testing helpers")
8095 (description "Zope.testing provides a number of testing utilities for HTML
8096forms, HTTP servers, regular expressions, and more.")
3f641af0 8097 (license license:zpl2.1)))
900e3c0e
LF
8098
8099(define-public python2-zope-testing
8100 (package-with-python2 python-zope-testing))
01614c4f
LF
8101
8102(define-public python-zope-testrunner
8103 (package
8104 (name "python-zope-testrunner")
8105 (version "4.4.9")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (string-append "https://pypi.python.org/packages/source/z"
8110 "/zope.testrunner/zope.testrunner-"
8111 version ".zip"))
8112 (sha256
8113 (base32
8114 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8115 (build-system python-build-system)
385871e5
MB
8116 (arguments
8117 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8118 (native-inputs
8119 `(("python-six" ,python-six)
e408ffc3 8120 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8121 ("python-zope-exceptions" ,python-zope-exceptions)
8122 ("python-zope-testing" ,python-zope-testing)
8123 ("unzip" ,unzip)))
8124 (propagated-inputs
8125 `(("python-zope-interface" ,python-zope-interface)))
8126 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8127 (synopsis "Zope testrunner script")
8128 (description "Zope.testrunner provides a script for running Python
8129tests.")
3f641af0 8130 (license license:zpl2.1)))
01614c4f
LF
8131
8132(define-public python2-zope-testrunner
8133 (let ((base (package-with-python2 python-zope-testrunner)))
8134 (package
8135 (inherit base)
8136 (native-inputs
8137 (append (package-native-inputs base)
8138 `(("python2-subunit" ,python2-subunit)
8139 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8140
8141(define-public python-zope-i18nmessageid
8142 (package
8143 (name "python-zope-i18nmessageid")
8144 (version "4.0.3")
8145 (source
8146 (origin
8147 (method url-fetch)
8148 (uri (string-append
8149 "https://pypi.python.org/packages/source/z"
8150 "/zope.i18nmessageid/zope.i18nmessageid-"
8151 version ".tar.gz"))
8152 (sha256
8153 (base32
8154 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8155 (build-system python-build-system)
6a5c710c
LF
8156 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8157 (synopsis "Message identifiers for internationalization")
8158 (description "Zope.i18nmessageid provides facilities for declaring
8159internationalized messages within program source text.")
3f641af0 8160 (license license:zpl2.1)))
6a5c710c
LF
8161
8162(define-public python2-zope-i18nmessageid
8163 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8164
8165(define-public python-zope-schema
8166 (package
8167 (name "python-zope-schema")
8168 (version "4.4.2")
8169 (source
8170 (origin
8171 (method url-fetch)
8172 (uri (string-append "https://pypi.python.org/packages/source/z"
8173 "/zope.schema/zope.schema-" version ".tar.gz"))
8174 (sha256
8175 (base32
8176 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8177 (build-system python-build-system)
22dba2ef
MB
8178 (arguments
8179 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8180 (propagated-inputs
8181 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8182 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8183 ("python-zope-interface" ,python-zope-interface)))
8184 (native-inputs
47f77210
HG
8185 `(("python-zope-testing" ,python-zope-testing)
8186 ("python-coverage" ,python-coverage)
8187 ("python-nose" ,python-nose)))
71fb09f3
LF
8188 (home-page "http://pypi.python.org/pypi/zope.schema")
8189 (synopsis "Zope data schemas")
8190 (description "Zope.scheme provides extensions to zope.interface for
8191defining data schemas.")
3f641af0 8192 (license license:zpl2.1)))
71fb09f3
LF
8193
8194(define-public python2-zope-schema
8195 (package-with-python2 python-zope-schema))
fbac9b17
LF
8196
8197(define-public python-zope-configuration
8198 (package
8199 (name "python-zope-configuration")
8200 (version "4.0.3")
8201 (source (origin
8202 (method url-fetch)
8203 (uri (string-append "https://pypi.python.org/packages/source/z"
8204 "/zope.configuration/zope.configuration-"
8205 version ".tar.gz"))
8206 (sha256
8207 (base32
8208 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8209 (build-system python-build-system)
7e8b1bfa
MB
8210 (arguments
8211 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8212 (propagated-inputs
8213 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8214 ("python-zope-schema" ,python-zope-schema)))
8215 (home-page "http://pypi.python.org/pypi/zope.configuration")
8216 (synopsis "Zope Configuration Markup Language")
8217 (description "Zope.configuration implements ZCML, the Zope Configuration
8218Markup Language.")
3f641af0 8219 (license license:zpl2.1)))
fbac9b17
LF
8220
8221(define-public python2-zope-configuration
8222 (package-with-python2 python-zope-configuration))
2ad52086
LF
8223
8224(define-public python-zope-proxy
8225 (package
8226 (name "python-zope-proxy")
8227 (version "4.1.6")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (string-append "https://pypi.python.org/packages/source/z"
8232 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8233 (sha256
8234 (base32
8235 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8236 (build-system python-build-system)
66b3aadb
MB
8237 (arguments
8238 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8239 (propagated-inputs
8240 `(("python-zope-interface" ,python-zope-interface)))
8241 (home-page "http://pypi.python.org/pypi/zope.proxy")
8242 (synopsis "Generic, transparent proxies")
8243 (description "Zope.proxy provides generic, transparent proxies for Python.
8244Proxies are special objects which serve as mostly-transparent wrappers around
8245another object, intervening in the apparent behavior of the wrapped object
8246only when necessary to apply the policy (e.g., access checking, location
8247brokering, etc.) for which the proxy is responsible.")
3f641af0 8248 (license license:zpl2.1)))
2ad52086
LF
8249
8250(define-public python2-zope-proxy
8251 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8252
8253(define-public python-zope-location
8254 (package
8255 (name "python-zope-location")
8256 (version "4.0.3")
8257 (source
8258 (origin
8259 (method url-fetch)
8260 (uri (string-append "https://pypi.python.org/packages/source/z"
8261 "/zope.location/zope.location-" version ".tar.gz"))
8262 (sha256
8263 (base32
8264 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8265 (build-system python-build-system)
40bb8e07
MB
8266 (arguments
8267 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8268 (propagated-inputs
f404b5ea
LF
8269 `(("python-zope-proxy" ,python-zope-proxy)
8270 ("python-zope-schema" ,python-zope-schema)))
8271 (home-page "http://pypi.python.org/pypi/zope.location/")
8272 (synopsis "Zope location library")
8273 (description "Zope.location implements the concept of \"locations\" in
8274Zope3, which are are special objects that have a structural location.")
3f641af0 8275 (license license:zpl2.1)))
f404b5ea
LF
8276
8277(define-public python2-zope-location
8278 (package-with-python2 python-zope-location))
d4b77f36
LF
8279
8280(define-public python-zope-security
8281 (package
8282 (name "python-zope-security")
8283 (version "4.0.3")
8284 (source
8285 (origin
8286 (method url-fetch)
8287 (uri (string-append "https://pypi.python.org/packages/source/z"
8288 "/zope.security/zope.security-" version ".tar.gz"))
8289 (sha256
8290 (base32
8291 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8292 (build-system python-build-system)
a74f9b12
MB
8293 (arguments
8294 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8295 (propagated-inputs
8296 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8297 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8298 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8299 (native-inputs
8300 `(("python-six" ,python-six)
8301 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8302 ("python-zope-configuration" ,python-zope-configuration)
8303 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8304 ("python-zope-testrunner" ,python-zope-testrunner)
8305 ("python-zope-testing" ,python-zope-testing)))
8306 (home-page "http://pypi.python.org/pypi/zope.security")
8307 (synopsis "Zope security framework")
8308 (description "Zope.security provides a generic mechanism to implement
8309security policies on Python objects.")
3f641af0 8310 (license license:zpl2.1)))
d4b77f36
LF
8311
8312(define-public python2-zope-security
04417662
EF
8313 (let ((zope-security (package-with-python2 python-zope-security)))
8314 (package (inherit zope-security)
8315 (propagated-inputs
8316 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8317 ,@(alist-delete
8318 "python-zope-testrunner"
8319 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8320
8321(define-public python-zope-component
8322 (package
8323 (name "python-zope-component")
35e1a0f1 8324 (version "4.3.0")
a6b61b27
LF
8325 (source
8326 (origin
8327 (method url-fetch)
35e1a0f1 8328 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8329 (sha256
8330 (base32
35e1a0f1 8331 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8332 (build-system python-build-system)
8333 (arguments
8334 ;; Skip tests due to circular dependency with python-zope-security.
8335 '(#:tests? #f))
8336 (native-inputs
8337 `(("python-zope-testing" ,python-zope-testing)))
8338 (propagated-inputs
8339 `(("python-zope-event" ,python-zope-event)
8340 ("python-zope-interface" ,python-zope-interface)
8341 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8342 ("python-zope-configuration" ,python-zope-configuration)))
8343 (home-page "https://github.com/zopefoundation/zope.component")
8344 (synopsis "Zope Component Architecture")
8345 (description "Zope.component represents the core of the Zope Component
8346Architecture. Together with the zope.interface package, it provides
8347facilities for defining, registering and looking up components.")
3f641af0 8348 (license license:zpl2.1)))
a6b61b27
LF
8349
8350(define-public python2-zope-component
8351 (package-with-python2 python-zope-component))
3859ac12 8352
1ae44b80 8353(define-public python-pythondialog
b5f218be 8354 (package
1ae44b80 8355 (name "python-pythondialog")
42c4b246 8356 (version "3.4.0")
b5f218be
LF
8357 (source
8358 (origin
8359 (method url-fetch)
1ae44b80 8360 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8361 (sha256
8362 (base32
1ae44b80 8363 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8364 (build-system python-build-system)
8365 (arguments
8366 `(#:phases
8367 (modify-phases %standard-phases
8368 (add-after 'unpack 'patch-path
8369 (lambda* (#:key inputs #:allow-other-keys)
8370 (let* ((dialog (assoc-ref inputs "dialog")))
8371 ;; Since this library really wants to grovel the search path, we
8372 ;; must hardcode dialog's store path into it.
8373 (substitute* "dialog.py"
8374 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8375 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8376 #t))))
b5f218be
LF
8377 #:tests? #f)) ; no test suite
8378 (propagated-inputs
8379 `(("dialog" ,dialog)))
8380 (home-page "http://pythondialog.sourceforge.net/")
8381 (synopsis "Python interface to the UNIX dialog utility")
8382 (description "A Python wrapper for the dialog utility. Its purpose is to
8383provide an easy to use, pythonic and comprehensive Python interface to dialog.
8384This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8385 (license license:lgpl2.1)
1ae44b80
LF
8386 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8387
8388(define-public python2-pythondialog
8389 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8390 (package
8391 (inherit base)
8392 (version (package-version python-pythondialog))
8393 (source (origin
8394 (method url-fetch)
8395 (uri (pypi-uri "python2-pythondialog" version))
8396 (sha256
8397 (base32
8398 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8399
3859ac12
LF
8400(define-public python-pyrfc3339
8401 (package
8402 (name "python-pyrfc3339")
d9aa097b 8403 (version "1.0")
3859ac12
LF
8404 (source
8405 (origin
8406 (method url-fetch)
d9aa097b 8407 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8408 (sha256
8409 (base32
d9aa097b 8410 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8411 (build-system python-build-system)
8412 (propagated-inputs
8413 `(("python-pytz" ,python-pytz)))
8414 (native-inputs
f3b98f4f 8415 `(("python-nose" ,python-nose)))
3859ac12
LF
8416 (home-page "https://github.com/kurtraschke/pyRFC3339")
8417 (synopsis "Python timestamp library")
8418 (description "Python library for generating and parsing RFC 3339-compliant
8419timestamps.")
8420 (license license:expat)))
8421
8422(define-public python2-pyrfc3339
8423 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8424
8425(define-public python-werkzeug
8426 (package
8427 (name "python-werkzeug")
bbb99d6b 8428 (version "0.11.15")
5eea2005
LF
8429 (source
8430 (origin
8431 (method url-fetch)
4b47cbfa 8432 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8433 (sha256
8434 (base32
bbb99d6b 8435 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8436 (build-system python-build-system)
8437 (native-inputs
8438 `(("python-pytest" ,python-pytest)))
8439 (home-page "http://werkzeug.pocoo.org/")
8440 (synopsis "Utilities for WSGI applications")
8441 (description "One of the most advanced WSGI utility modules. It includes a
8442powerful debugger, full-featured request and response objects, HTTP utilities to
8443handle entity tags, cache control headers, HTTP dates, cookie handling, file
8444uploads, a powerful URL routing system and a bunch of community-contributed
8445addon modules.")
3f641af0 8446 (license license:x11)))
5eea2005
LF
8447
8448(define-public python2-werkzeug
8449 (package-with-python2 python-werkzeug))
99fffa8a
LF
8450
8451(define-public python-configobj
8452 (package
8453 (name "python-configobj")
8454 (version "5.0.6")
8455 (source (origin
8456 (method url-fetch)
8457 (uri (string-append
8458 "https://pypi.python.org/packages/source/c/configobj/"
8459 "configobj-" version ".tar.gz"))
8460 (sha256
8461 (base32
8462 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8463 ;; Patch setup.py so it looks for python-setuptools, which is
8464 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8465 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8466 (build-system python-build-system)
861f70c9 8467 (propagated-inputs
f3b98f4f 8468 `(("python-six" ,python-six)))
99fffa8a
LF
8469 (synopsis "Config file reading, writing and validation")
8470 (description "ConfigObj is a simple but powerful config file reader and
8471writer: an ini file round tripper. Its main feature is that it is very easy to
8472use, with a straightforward programmer’s interface and a simple syntax for
8473config files.")
8474 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8475 (license license:bsd-3)))
99fffa8a
LF
8476
8477(define-public python2-configobj
8478 (package-with-python2 python-configobj))
79e8a291
LF
8479
8480(define-public python-configargparse
8481 (package
8482 (name "python-configargparse")
8483 (version "0.10.0")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (string-append
8487 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8488 "ConfigArgParse-" version ".tar.gz"))
8489 (sha256
8490 (base32
8491 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8492 (build-system python-build-system)
8493 (arguments
8494 ;; FIXME: Bug in test suite filed upstream:
8495 ;; https://github.com/bw2/ConfigArgParse/issues/32
8496 '(#:tests? #f))
8497 (synopsis "Replacement for argparse")
8498 (description "A drop-in replacement for argparse that allows options to also
8499be set via config files and/or environment variables.")
8500 (home-page "https://github.com/bw2/ConfigArgParse")
8501 (license license:expat)))
8502
8503(define-public python2-configargparse
8504 (package-with-python2 python-configargparse))
ab41f979
LF
8505
8506(define-public python-ndg-httpsclient
8507 (package
8508 (name "python-ndg-httpsclient")
ae476d01 8509 (version "0.4.2")
ab41f979
LF
8510 (source (origin
8511 (method url-fetch)
7be13d00 8512 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8513 (sha256
8514 (base32
ae476d01 8515 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8516 (build-system python-build-system)
a39cc016
LF
8517 (arguments
8518 '(;; The tests appear to require networking.
8519 #:tests? #f))
ab41f979
LF
8520 (propagated-inputs
8521 `(("python-pyopenssl" ,python-pyopenssl)))
8522 (synopsis "HTTPS support for Python's httplib and urllib2")
8523 (description "This is a HTTPS client implementation for httplib and urllib2
8524based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8525over the default provided with Python and importantly enables full verification
8526of the SSL peer.")
8527 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8528 (license license:bsd-3)))
ab41f979
LF
8529
8530;; python2-openssl requires special care, so package-with-python2 is
8531;; insufficient.
8532(define-public python2-ndg-httpsclient
8533 (package (inherit python-ndg-httpsclient)
8534 (name "python2-ndg-httpsclient")
8535 (arguments `(#:python ,python-2))
8536 (propagated-inputs
8537 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8538
8539(define-public python-contextlib2
8540 (package
8541 (name "python-contextlib2")
8542 (version "0.4.0")
8543 (source
8544 (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "contextlib2" version))
8547 (sha256
8548 (base32
8549 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8550 (build-system python-build-system)
8551 (arguments
8552 `(#:phases
8553 (modify-phases %standard-phases
8554 (replace 'check
8555 (lambda _ (zero?
8556 (system*
b3546174 8557 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8558 (home-page "http://contextlib2.readthedocs.org/")
8559 (synopsis "Tools for decorators and context managers")
8560 (description "This module is primarily a backport of the Python
85613.2 contextlib to earlier Python versions. Like contextlib, it
8562provides utilities for common tasks involving decorators and context
8563managers. It also contains additional features that are not part of
8564the standard library.")
3f641af0 8565 (license license:psfl)))
03f964a5
CM
8566
8567(define-public python2-contextlib2
8568 (package-with-python2 python-contextlib2))
210bf497
DT
8569
8570(define-public python-texttable
8571 (package
8572 (name "python-texttable")
4c4d4df3 8573 (version "0.8.7")
210bf497
DT
8574 (source
8575 (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "texttable" version))
8578 (sha256
8579 (base32
4c4d4df3 8580 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8581 (build-system python-build-system)
8582 (arguments '(#:tests? #f)) ; no tests
8583 (home-page "https://github.com/foutaise/texttable/")
8584 (synopsis "Python module for creating simple ASCII tables")
8585 (description "Texttable is a Python module for creating simple ASCII
8586tables.")
3f641af0 8587 (license license:lgpl2.1+)))
210bf497
DT
8588
8589(define-public python2-texttable
8590 (package-with-python2 python-texttable))
67c52bb3
DT
8591
8592(define-public python-websocket-client
8593 (package
8594 (name "python-websocket-client")
6b810897 8595 (version "0.37.0")
67c52bb3
DT
8596 (source
8597 (origin
8598 (method url-fetch)
6b810897 8599 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8600 (sha256
8601 (base32
6b810897 8602 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8603 (build-system python-build-system)
a5333f7c
HG
8604 (propagated-inputs
8605 `(("python-six" ,python-six)))
67c52bb3
DT
8606 (home-page "https://github.com/liris/websocket-client")
8607 (synopsis "WebSocket client for Python")
8608 (description "The Websocket-client module provides the low level APIs for
8609WebSocket usage in Python programs.")
3f641af0 8610 (license license:lgpl2.1+)))
67c52bb3
DT
8611
8612(define-public python2-websocket-client
8613 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8614
8615(define-public python-atomicwrites
8616 (package
8617 (name "python-atomicwrites")
c56ad5e2 8618 (version "1.1.5")
5c6eea2a
LF
8619 (source (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "atomicwrites" version))
8622 (sha256
8623 (base32
c56ad5e2 8624 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8625 (build-system python-build-system)
8626 (synopsis "Atomic file writes in Python")
8627 (description "Library for atomic file writes using platform dependent tools
8f65585b 8628for atomic file system operations.")
5c6eea2a 8629 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8630 (license license:expat)))
9bb6d184
LF
8631
8632(define-public python2-atomicwrites
f210e944 8633 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8634
8635(define-public python-requests-toolbelt
8636 (package
8637 (name "python-requests-toolbelt")
c02af1c8 8638 (version "0.6.2")
561bb3cb
LF
8639 (source (origin
8640 (method url-fetch)
c02af1c8
LF
8641 (uri (string-append
8642 "https://pypi.python.org/packages/"
8643 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8644 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8645 (sha256
8646 (base32
c02af1c8 8647 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8648 (build-system python-build-system)
759aadd4
LF
8649 (native-inputs
8650 `(("python-betamax" ,python-betamax)
8651 ("python-mock" ,python-mock)
8652 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8653 (propagated-inputs
8654 `(("python-requests" ,python-requests)))
8655 (synopsis "Extensions to python-requests")
8656 (description "This is a toolbelt of useful classes and functions to be used
8657with python-requests.")
8658 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8659 (license license:asl2.0)))
d1deb90b
LF
8660
8661(define-public python-click-threading
8662 (package
8663 (name "python-click-threading")
3d2e0dbc 8664 (version "0.2.0")
d1deb90b
LF
8665 (source (origin
8666 (method url-fetch)
3d2e0dbc
LF
8667 (uri (string-append
8668 "https://pypi.python.org/packages/"
8669 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8670 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8671 (sha256
8672 (base32
3d2e0dbc 8673 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8674 (build-system python-build-system)
8675 (propagated-inputs
8676 `(("python-click" ,python-click)))
8677 (synopsis "Utilities for multithreading in Click")
8678 (description "This package provides utilities for multithreading in Click
8679applications.")
8680 (home-page "https://github.com/click-contrib/click-threading")
8681 (license license:expat)))
7b17cab9
LF
8682
8683(define-public python-click-log
8684 (package
8685 (name "python-click-log")
42734b9a 8686 (version "0.1.8")
7b17cab9
LF
8687 (source (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "click-log" version))
8690 (sha256
8691 (base32
42734b9a 8692 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8693 (build-system python-build-system)
8694 (propagated-inputs
8695 `(("python-click" ,python-click)))
8696 (synopsis "Logging for click applications")
8697 (description "This package provides a Python library for logging Click
8698applications.")
8699 (home-page "https://github.com/click-contrib/click-log")
8700 (license license:expat)))
7b3a4ee4
LF
8701
8702(define-public python-apipkg
8703 (package
8704 (name "python-apipkg")
8705 (version "1.4")
8706 (source (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "apipkg" version))
8709 (sha256
8710 (base32
8711 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8712 (build-system python-build-system)
328bb95d 8713 (native-inputs
7b3a4ee4
LF
8714 `(("python-pytest" ,python-pytest)))
8715 (synopsis "Namespace control and lazy-import mechanism")
8716 (description "With apipkg you can control the exported namespace of a Python
8717package and greatly reduce the number of imports for your users. It is a small
8718pure Python module that works on virtually all Python versions.")
8719 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8720 (license license:expat)))
e08739c3
CAW
8721
8722(define-public python2-apipkg
f210e944 8723 (package-with-python2 python-apipkg))
848964fe
LF
8724
8725(define-public python-execnet
8726 (package
8727 (name "python-execnet")
8728 (version "1.4.1")
8729 (source (origin
8730 (method url-fetch)
8731 (uri (pypi-uri "execnet" version))
8732 (sha256
8733 (base32
8734 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8735 (build-system python-build-system)
ca0eee9d
LF
8736 (arguments
8737 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8738 ;; The two test failures are caused by the lack of an `ssh` executable.
8739 ;; The test suite can be run with pytest after the 'install' phase.
8740 #:tests? #f))
848964fe 8741 (native-inputs
ca0eee9d
LF
8742 `(("python-pytest" ,python-pytest)
8743 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8744 (propagated-inputs
848964fe
LF
8745 `(("python-apipkg" ,python-apipkg)))
8746 (synopsis "Rapid multi-Python deployment")
8747 (description "Execnet provides a share-nothing model with
8748channel-send/receive communication for distributing execution across many
8749Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 8750minimal and fast API targeting the following uses:
848964fe
LF
8751@enumerate
8752@item distribute tasks to (many) local or remote CPUs
8753@item write and deploy hybrid multi-process applications
8754@item write scripts to administer multiple environments
8755@end enumerate")
8756 (home-page "http://codespeak.net/execnet/")
f210e944 8757 (license license:expat)))
16c84f90
CAW
8758
8759(define-public python2-execnet
f210e944 8760 (package-with-python2 python-execnet))
6720dbb4 8761
d5bbf806 8762(define-public python-trollius-redis
8763 (package
8764 (name "python-trollius-redis")
8765 (version "0.1.4")
8766 (source
8767 (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "trollius_redis" version))
8770 (sha256
8771 (base32
8772 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8773 (build-system python-build-system)
97b62eb0
MB
8774 ;; TODO: Tests require packaging 'hiredis'.
8775 (arguments '(#:tests? #f))
d5bbf806 8776 (home-page "https://github.com/benjolitz/trollius-redis")
8777 (synopsis "Port of asyncio-redis to trollius")
8778 (description "@code{trollius-redis} is a Redis client for Python
8779 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8780 Redis protocol.")
8781 (license license:bsd-2)))
8782
8783(define-public python2-trollius-redis
8784 (package-with-python2 python-trollius-redis))
8785
6720dbb4
LF
8786;;; The software provided by this package was integrated into pytest 2.8.
8787(define-public python-pytest-cache
8788 (package
8789 (name "python-pytest-cache")
8790 (version "1.0")
8791 (source (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "pytest-cache" version))
8794 (sha256
8795 (base32
8796 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8797 (build-system python-build-system)
f22efa01 8798 (propagated-inputs
630d938f
EF
8799 `(("python-apipkg" ,python-apipkg)
8800 ("python-execnet" ,python-execnet)
8801 ("python-py" ,python-py)
8802 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8803 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8804 (description "The pytest-cache plugin provides tools to rerun failures from
8805the last py.test invocation.")
8806 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8807 (license license:expat)))
0adc21c2
EF
8808
8809(define-public python2-pytest-cache
f210e944 8810 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8811
8812(define-public python-pytest-localserver
8813 (package
8814 (name "python-pytest-localserver")
29f20168 8815 (version "0.3.5")
d7e729fe
LF
8816 (source (origin
8817 (method url-fetch)
29f20168 8818 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8819 (sha256
8820 (base32
29f20168 8821 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8822 (build-system python-build-system)
8823 (arguments
8824 `(#:phases (modify-phases %standard-phases
8825 (replace 'check
8826 (lambda _
8827 (zero? (system* "py.test" "--genscript=runtests.py"))
8828 (zero? (system* "py.test")))))))
8829 (native-inputs
d7e729fe
LF
8830 `(("python-pytest" ,python-pytest)
8831 ("python-requests" ,python-requests)
9ba40f05 8832 ("python-six" ,python-six)))
f22efa01 8833 (propagated-inputs
9ba40f05 8834 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8835 (synopsis "Py.test plugin to test server connections locally")
8836 (description "Pytest-localserver is a plugin for the pytest testing
8837framework which enables you to test server connections locally.")
8838 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8839 (license license:expat)))
28cecbb7
LF
8840
8841(define-public python-wsgi-intercept
8842 (package
8843 (name "python-wsgi-intercept")
909fbd2b 8844 (version "1.2.2")
28cecbb7
LF
8845 (source (origin
8846 (method url-fetch)
909fbd2b
LF
8847 (uri (string-append
8848 "https://pypi.python.org/packages/"
8849 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8850 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8851 (sha256
8852 (base32
909fbd2b 8853 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8854 (build-system python-build-system)
b9fc496f
HG
8855 (propagated-inputs
8856 `(("python-six" ,python-six)))
28cecbb7 8857 (native-inputs
9d813ec1 8858 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8859 ("python-httplib2" ,python-httplib2)
8860 ("python-requests" ,python-requests)
8757f050 8861 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8862 (synopsis "Puts a WSGI application in place of a real URI for testing")
8863 (description "Wsgi_intercept installs a WSGI application in place of a real
8864URI for testing. Testing a WSGI application normally involves starting a
8865server at a local host and port, then pointing your test code to that address.
8866Instead, this library lets you intercept calls to any specific host/port
8867combination and redirect them into a WSGI application importable by your test
8868program. Thus, you can avoid spawning multiple processes or threads to test
8869your Web app.")
8870 (home-page "https://github.com/cdent/wsgi-intercept")
8871 (license license:expat)))
89b8a551
LF
8872
8873(define-public python-pytest-xprocess
8874 (package
8875 (name "python-pytest-xprocess")
8876 (version "0.9.1")
8877 (source (origin
8878 (method url-fetch)
8879 (uri (pypi-uri "pytest-xprocess" version))
8880 (sha256
8881 (base32
8882 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8883 (build-system python-build-system)
8884 (propagated-inputs
8885 `(("python-pytest" ,python-pytest)
8886 ("python-pytest-cache" ,python-pytest-cache)
8887 ("python-psutil" ,python-psutil)))
8888 (synopsis "Pytest plugin to manage external processes across test runs")
8889 (description "Pytest-xprocess is an experimental py.test plugin for managing
8890processes across test runs.")
8891 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8892 (license license:expat)))
5c299bf0
LF
8893
8894(define-public python-icalendar
8895 (package
8896 (name "python-icalendar")
68ab3e6c 8897 (version "3.11.4")
5c299bf0
LF
8898 (source (origin
8899 (method url-fetch)
8900 (uri (pypi-uri "icalendar" version))
8901 (sha256
8902 (base32
68ab3e6c 8903 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
5c299bf0
LF
8904 (build-system python-build-system)
8905 (propagated-inputs
22d7360b 8906 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8907 ("python-pytz" ,python-pytz)))
8908 (synopsis "Python library for parsing iCalendar files")
8909 (description "The icalendar package is a parser/generator of iCalendar
8910files for use with Python.")
8911 (home-page "https://github.com/collective/icalendar")
3f641af0 8912 (license license:bsd-2)))
6bbbb53e
LF
8913
8914(define-public python-sphinxcontrib-newsfeed
8915 (package
8916 (name "python-sphinxcontrib-newsfeed")
8917 (version "0.1.4")
8918 (source (origin
8919 (method url-fetch)
8920 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8921 (sha256
8922 (base32
8923 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8924 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8925 (build-system python-build-system)
8926 (propagated-inputs
251ed7f2 8927 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8928 (synopsis "News Feed extension for Sphinx")
8929 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8930Blog, News or Announcements section to a Sphinx website.")
8931 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8932 (license license:bsd-2)))
2216e15c
SB
8933
8934(define-public python-args
8935 (package
8936 (name "python-args")
8937 (version "0.1.0")
8938 (source (origin
8939 (method url-fetch)
8940 (uri (pypi-uri "args" version))
8941 (sha256
8942 (base32
8943 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8944 (build-system python-build-system)
2216e15c
SB
8945 (home-page "https://github.com/kennethreitz/args")
8946 (synopsis "Command-line argument parser")
8947 (description
8948 "This library provides a Python module to parse command-line arguments.")
3f641af0 8949 (license license:bsd-3)))
2216e15c
SB
8950
8951(define-public python2-args
8952 (package-with-python2 python-args))
c06a3de9
SB
8953
8954(define-public python-clint
8955 (package
8956 (name "python-clint")
8957 (version "0.5.1")
8958 (source (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "clint" version))
8961 (sha256
8962 (base32
8963 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8964 (build-system python-build-system)
6145b604
MB
8965 (arguments
8966 '(#:phases
8967 (modify-phases %standard-phases
8968 (replace 'check
8969 (lambda _
8970 (zero? (system* "py.test" "-v")))))))
8971 (native-inputs
8972 `(("python-pytest" ,python-pytest)))
f22efa01 8973 (propagated-inputs
f3b98f4f 8974 `(("python-args" ,python-args)))
c06a3de9
SB
8975 (home-page "https://github.com/kennethreitz/clint")
8976 (synopsis "Command-line interface tools")
8977 (description
8978 "Clint is a Python module filled with a set of tools for developing
8979command-line applications, including tools for colored and indented
8980output, progress bar display, and pipes.")
3f641af0 8981 (license license:isc)))
c06a3de9
SB
8982
8983(define-public python2-clint
8984 (package-with-python2 python-clint))
4ecdeef8
SB
8985
8986(define-public python-astor
8987 (package
8988 (name "python-astor")
8989 (version "0.5")
8990 (source (origin
8991 (method url-fetch)
8992 (uri (pypi-uri "astor" version))
8993 (sha256
8994 (base32
8995 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8996 (build-system python-build-system)
4ecdeef8
SB
8997 (home-page "https://github.com/berkerpeksag/astor")
8998 (synopsis "Read and write Python ASTs")
8999 (description
9000 "Astor is designed to allow easy manipulation of Python source via the
9001Abstract Syntax Tree.")
3f641af0 9002 (license license:bsd-3)))
4ecdeef8
SB
9003
9004(define-public python2-astor
9005 (package-with-python2 python-astor))
e224b7d0
SB
9006
9007(define-public python-rply
9008 (package
9009 (name "python-rply")
9010 (version "0.7.4")
9011 (source (origin
9012 (method url-fetch)
9013 (uri (pypi-uri "rply" version))
9014 (sha256
9015 (base32
9016 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9017 (build-system python-build-system)
f22efa01 9018 (propagated-inputs
f3b98f4f 9019 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9020 (home-page "https://github.com/alex/rply")
9021 (synopsis "Parser generator for Python")
9022 (description
9023 "This package provides a pure Python based parser generator, that also
9024works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9025with a new public API, and RPython support.")
3f641af0 9026 (license license:bsd-3)))
e224b7d0
SB
9027
9028(define-public python2-rply
9029 (package-with-python2 python-rply))
c3e919d7
SB
9030
9031(define-public python-hy
9032 (package
9033 (name "python-hy")
9034 (version "0.11.1")
9035 (source (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "hy" version))
9038 (sha256
9039 (base32
9040 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9041 (build-system python-build-system)
15c37077
MB
9042 (arguments
9043 '(#:phases
9044 (modify-phases %standard-phases
9045 (replace 'check
9046 (lambda _
9047 ;; Tests require write access to HOME.
9048 (setenv "HOME" "/tmp")
9049 (zero? (system* "nosetests")))))))
9050 (native-inputs
9051 `(("python-coverage" ,python-coverage)
9052 ("python-nose" ,python-nose)))
f22efa01 9053 (propagated-inputs
c3e919d7
SB
9054 `(("python-astor" ,python-astor)
9055 ("python-clint" ,python-clint)
f3b98f4f 9056 ("python-rply" ,python-rply)))
c3e919d7
SB
9057 (home-page "http://hylang.org/")
9058 (synopsis "Lisp frontend to Python")
9059 (description
9060 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9061its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9062Python at your fingertips, in Lisp form.")
9063 (license license:expat)))
9064
9065(define-public python2-hy
9066 (package-with-python2 python-hy))
7a5b944e 9067
81f7f297
EF
9068(define-public python-rauth
9069 (package
9070 (name "python-rauth")
06fe79f2 9071 (version "0.7.3")
81f7f297
EF
9072 (source
9073 (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "rauth" version))
9076 (sha256
9077 (base32
06fe79f2 9078 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9079 (build-system python-build-system)
9080 (arguments
9081 `(#:test-target "check"))
f22efa01 9082 (propagated-inputs
81f7f297
EF
9083 `(("python-requests" ,python-requests)))
9084 (home-page "https://github.com/litl/rauth")
9085 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9086 (description
9087 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9088provides service wrappers for convenient connection initialization and
9089authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9090 (license license:expat)
9091 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9092
9093(define-public python2-rauth
0848d8d3
EF
9094 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9095 (package
9096 (inherit base)
00e10c6e 9097 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9098 ,@(package-native-inputs base))))))
81f7f297 9099
1abe448d
EF
9100(define-public python2-functools32
9101 (package
9102 (name "python2-functools32")
9103 (version "3.2.3-2")
9104 (source
9105 (origin
9106 (method url-fetch)
9107 (uri (pypi-uri "functools32" version))
9108 (sha256
9109 (base32
9110 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9111 (build-system python-build-system)
9112 (arguments
9113 `(#:python ,python-2
9114 #:tests? #f)) ; no test target
1abe448d
EF
9115 (home-page "https://github.com/MiCHiLU/python-functools32")
9116 (synopsis
9117 "Backport of the functools module from Python 3.2.3")
9118 (description
9119 "This package is a backport of the @code{functools} module from Python
91203.2.3 for use with older versions of Python and PyPy.")
9121 (license license:expat)))
9122
550bd98b
MB
9123(define-public python2-subprocess32
9124 (package
9125 (name "python2-subprocess32")
9126 (version "3.2.7")
9127 (source (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "subprocess32" version))
9130 (sha256
9131 (base32
9132 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9133 (patches
9134 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9135 (build-system python-build-system)
9136 (arguments
9137 `(#:python ,python-2
9138 #:phases
9139 (modify-phases %standard-phases
9140 (add-after 'unpack 'patch-/bin/sh
9141 (lambda _
9142 (substitute* '("subprocess32.py"
9143 "test_subprocess32.py")
9144 (("/bin/sh") (which "sh")))
9145 #t))
9146 (delete 'check)
9147 (add-after 'install 'check
9148 (lambda* (#:key inputs outputs #:allow-other-keys)
9149 ;; For some reason this package fails to import
9150 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9151 ;; directory. Running tests after install is easier.
9152 (add-installed-pythonpath inputs outputs)
9153 (zero? (system* "python" "test_subprocess32.py")))))))
9154 (home-page "https://github.com/google/python-subprocess32")
9155 (synopsis "Backport of the subprocess module from Python 3.2")
9156 (description
9157 "This is a backport of the @code{subprocess} standard library module
9158from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9159new features. On POSIX systems it is guaranteed to be reliable when used
9160in threaded applications. It includes timeout support from Python 3.3 but
9161otherwise matches 3.2’s API.")
9162 (license license:psfl)))
9163
877889f3 9164(define-public python2-futures
7a5b944e 9165 (package
877889f3 9166 (name "python2-futures")
e17a1248 9167 (version "3.0.5")
7a5b944e
EF
9168 (source
9169 (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "futures" version))
9172 (sha256
9173 (base32
e17a1248 9174 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9175 (build-system python-build-system)
877889f3 9176 (arguments `(#:python ,python-2))
7a5b944e
EF
9177 (home-page "https://github.com/agronholm/pythonfutures")
9178 (synopsis
9179 "Backport of the concurrent.futures package from Python 3.2")
9180 (description
9181 "The concurrent.futures module provides a high-level interface for
9182asynchronously executing callables. This package backports the
9183concurrent.futures package from Python 3.2")
3f641af0 9184 (license license:bsd-3)))
7a5b944e 9185
5cb2fe44
EF
9186(define-public python-promise
9187 (package
9188 (name "python-promise")
9189 (version "0.4.2")
9190 (source
9191 (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "promise" version))
9194 (sha256
9195 (base32
9196 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9197 (build-system python-build-system)
9198 ;; Tests wants python-futures, which is a python2 only program, and
9199 ;; can't be found by python-promise at test time.
9200 (arguments `(#:tests? #f))
9201 (home-page "https://github.com/syrusakbary/promise")
9202 (synopsis "Promises/A+ implementation for Python")
9203 (description
9204 "Promises/A+ implementation for Python")
9205 (properties `((python2-variant . ,(delay python2-promise))))
9206 (license license:expat)))
9207
9208(define-public python2-promise
9209 (let ((promise (package-with-python2
9210 (strip-python2-variant python-promise))))
9211 (package (inherit promise)
9212 (arguments (substitute-keyword-arguments (package-arguments promise)
9213 ((#:tests? _) #t)))
9214 (native-inputs
9215 `(("python2-futures" ,python2-futures)
9216 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9217 ,@(package-native-inputs promise))))))
9218
c18f6368
EF
9219(define-public python-urllib3
9220 (package
9221 (name "python-urllib3")
6178274d 9222 (version "1.18.1")
c18f6368
EF
9223 (source
9224 (origin
9225 (method url-fetch)
9226 (uri (pypi-uri "urllib3" version))
9227 (sha256
9228 (base32
6178274d 9229 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9230 (build-system python-build-system)
9231 (arguments `(#:tests? #f))
9232 (native-inputs
f3b98f4f 9233 `(;; some packages for tests
c18f6368
EF
9234 ("python-nose" ,python-nose)
9235 ("python-mock" ,python-mock)
9236 ("python-tornado" ,python-tornado)))
9237 (propagated-inputs
8322749a 9238 `(;; extra packages for https security
c18f6368
EF
9239 ("python-certifi" ,python-certifi)
9240 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9241 ("python-pyasn1" ,python-pyasn1)
9242 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9243 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9244 (synopsis "HTTP library with thread-safe connection pooling")
9245 (description
9246 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9247can reuse the same socket connection for multiple requests, it can POST files,
9248supports url redirection and retries, and also gzip and deflate decoding.")
9249 (license license:expat)))
9250
9251(define-public python2-urllib3
9252 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9253
9254(define-public python-colorama
9255 (package
9256 (name "python-colorama")
f92576f9 9257 (version "0.3.7")
2b2f2fc1
DT
9258 (source
9259 (origin
9260 (method url-fetch)
9261 (uri (pypi-uri "colorama" version))
9262 (sha256
9263 (base32
f92576f9 9264 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9265 (build-system python-build-system)
46e110cc 9266 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9267 (description "Colorama is a Python library for rendering colored terminal
9268text.")
9269 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9270 (license license:bsd-3)))
2b2f2fc1
DT
9271
9272(define-public python2-colorama
9273 (package-with-python2 python-colorama))
f5bcec6e
DT
9274
9275(define-public python-rsa
9276 (package
9277 (name "python-rsa")
ecd68c53 9278 (version "3.4.2")
f5bcec6e
DT
9279 (source
9280 (origin
9281 (method url-fetch)
9282 (uri (pypi-uri "rsa" version))
9283 (sha256
9284 (base32
ecd68c53 9285 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9286 (build-system python-build-system)
f22efa01 9287 (propagated-inputs
f3b98f4f 9288 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9289 (synopsis "Pure-Python RSA implementation")
9290 (description "Python-RSA is a pure-Python RSA implementation. It supports
9291encryption and decryption, signing and verifying signatures, and key
9292generation according to PKCS#1 version 1.5. It can be used as a Python
9293library as well as on the command line.")
9294 (home-page "http://stuvel.eu/rsa")
3f641af0 9295 (license license:asl2.0)))
f5bcec6e
DT
9296
9297(define-public python2-rsa
9298 (package-with-python2 python-rsa))
c0aacfa5
DT
9299
9300(define-public python-pluggy
9301 (package
9302 (name "python-pluggy")
9303 (version "0.3.1")
9304 (source
9305 (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "pluggy" version))
9308 (sha256
9309 (base32
9310 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9311 (build-system python-build-system)
c0aacfa5
DT
9312 (synopsis "Plugin and hook calling mechanism for Python")
9313 (description "Pluggy is an extraction of the plugin manager as used by
9314Pytest but stripped of Pytest specific details.")
9315 (home-page "https://pypi.python.org/pypi/pluggy")
9316 (license license:expat)))
9317
9318(define-public python2-pluggy
9319 (package-with-python2 python-pluggy))
a4af21ca
DT
9320
9321(define-public python-tox
9322 (package
9323 (name "python-tox")
9324 (version "2.3.1")
9325 (source
9326 (origin
9327 (method url-fetch)
9328 (uri (pypi-uri "tox" version))
9329 (sha256
9330 (base32
9331 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9332 (build-system python-build-system)
9333 (arguments
7ba07edf
HG
9334 ;; FIXME: Tests require pytest-timeout, which itself requires
9335 ;; pytest>=2.8.0 for installation.
a4af21ca 9336 '(#:tests? #f))
482d9591
HG
9337 (propagated-inputs
9338 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9339 ("python-py" ,python-py)
482d9591 9340 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9341 (native-inputs
7ba07edf
HG
9342 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9343 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9344 (home-page "http://tox.testrun.org/")
9345 (synopsis "Virtualenv-based automation of test activities")
9346 (description "Tox is a generic virtualenv management and test command line
9347tool. It can be used to check that a package installs correctly with
9348different Python versions and interpreters, or run tests in each type of
9349supported environment, or act as a frontend to continuous integration
9350servers.")
9351 (license license:expat)))
9352
9353(define-public python2-tox
9354 (package-with-python2 python-tox))
ba9da248
DT
9355
9356(define-public python-jmespath
9357 (package
9358 (name "python-jmespath")
9359 (version "0.9.0")
9360 (source
9361 (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "jmespath" version))
9364 (sha256
9365 (base32
9366 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9367 (build-system python-build-system)
52a75a83
MB
9368 (native-inputs
9369 `(("python-nose" ,python-nose)))
ba9da248
DT
9370 (synopsis "JSON Matching Expressions")
9371 (description "JMESPath (pronounced “james path”) is a Python library that
9372allows one to declaratively specify how to extract elements from a JSON
9373document.")
9374 (home-page "https://github.com/jmespath/jmespath.py")
9375 (license license:expat)))
9376
9377(define-public python2-jmespath
9378 (package-with-python2 python-jmespath))
935fcd5c
DT
9379
9380(define-public python-botocore
9381 (package
9382 (name "python-botocore")
d93985fe 9383 (version "1.5.26")
935fcd5c
DT
9384 (source
9385 (origin
9386 (method url-fetch)
9387 (uri (pypi-uri "botocore" version))
9388 (sha256
9389 (base32
d93985fe 9390 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9391 (build-system python-build-system)
877fdac9
MB
9392 (arguments
9393 ;; FIXME: Many tests are failing.
9394 '(#:tests? #f))
482d9591 9395 (propagated-inputs
22d7360b 9396 `(("python-dateutil" ,python-dateutil)
935fcd5c 9397 ("python-docutils" ,python-docutils)
482d9591 9398 ("python-jmespath" ,python-jmespath)))
8fa6890b 9399 (native-inputs
482d9591 9400 `(("python-mock" ,python-mock)
935fcd5c 9401 ("python-nose" ,python-nose)
482d9591 9402 ("behave" ,behave)
935fcd5c 9403 ("python-tox" ,python-tox)
482d9591 9404 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9405 (home-page "https://github.com/boto/botocore")
9406 (synopsis "Low-level interface to AWS")
9407 (description "Botocore is a Python library that provides a low-level
9408interface to the Amazon Web Services (AWS) API.")
3f641af0 9409 (license license:asl2.0)))
935fcd5c
DT
9410
9411(define-public python2-botocore
9412 (package-with-python2 python-botocore))
f861b8b8
DT
9413
9414(define-public awscli
9415 (package
9416 (name "awscli")
192b887a 9417 (version "1.11.63")
f861b8b8
DT
9418 (source
9419 (origin
9420 (method url-fetch)
d5ccf71e 9421 (uri (pypi-uri name version))
f861b8b8
DT
9422 (sha256
9423 (base32
192b887a 9424 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9425 (build-system python-build-system)
482d9591 9426 (propagated-inputs
f861b8b8 9427 `(("python-colorama" ,python-colorama)
482d9591
HG
9428 ("python-botocore" ,python-botocore)
9429 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9430 ("python-docutils" ,python-docutils)
0cb9fba3 9431 ("python-pyyaml" ,python-pyyaml)
482d9591 9432 ("python-rsa" ,python-rsa)))
619bfd81
MB
9433 (arguments
9434 ;; FIXME: The 'pypi' release does not contain tests.
9435 '(#:tests? #f))
60a8be3a 9436 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9437 (synopsis "Command line client for AWS")
9438 (description "AWS CLI provides a unified command line interface to the
9439Amazon Web Services (AWS) API.")
3f641af0 9440 (license license:asl2.0)))
6a44697d
LF
9441
9442(define-public python-hypothesis
9443 (package
9444 (name "python-hypothesis")
bea6d94d 9445 (version "3.1.0")
6a44697d
LF
9446 (source (origin
9447 (method url-fetch)
9448 (uri (pypi-uri "hypothesis" version))
9449 (sha256
9450 (base32
bea6d94d 9451 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9452 (build-system python-build-system)
bd100c71 9453 (native-inputs
6a44697d
LF
9454 `(("python-flake8" ,python-flake8)
9455 ("python-pytest" ,python-pytest)))
9456 (synopsis "Library for property based testing")
9457 (description "Hypothesis is a library for testing your Python code against a
9458much larger range of examples than you would ever want to write by hand. It’s
9459based on the Haskell library, Quickcheck, and is designed to integrate
9460seamlessly into your existing Python unit testing work flow.")
9461 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9462 (license license:mpl2.0)
6f068e08 9463 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9464
9465(define-public python2-hypothesis
6f068e08
EF
9466 (let ((hypothesis (package-with-python2
9467 (strip-python2-variant python-hypothesis))))
9468 (package (inherit hypothesis)
9469 (native-inputs
bd100c71
MB
9470 `(("python2-enum34" ,python2-enum34)
9471 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9472
9473(define-public python-pytest-subtesthack
9474 (package
9475 (name "python-pytest-subtesthack")
9476 (version "0.1.1")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "pytest-subtesthack" version))
9480 (sha256
9481 (base32
9482 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9483 (build-system python-build-system)
7517e73c
LF
9484 (propagated-inputs
9485 `(("python-pytest" ,python-pytest)))
9486 (synopsis "Set-up and tear-down fixtures for unit tests")
9487 (description "This plugin allows you to set up and tear down fixtures within
9488unit test functions that use @code{py.test}. This is useful for using
9489@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9490function multiple times, without setting up or tearing down fixture state as is
9491normally the case.")
9492 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9493 (license license:unlicense)))
7517e73c
LF
9494
9495(define-public python2-pytest-subtesthack
9496 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9497
7637de23 9498(define-public python-xdo
0bdc1671 9499 (package
7637de23 9500 (name "python-xdo")
e871c332 9501 (version "0.3")
0bdc1671
CAW
9502 (source (origin
9503 (method url-fetch)
9504 (uri (string-append
9505 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9506 "python-xdo_" version ".orig.tar.gz"))
9507 (sha256
9508 (base32
e871c332 9509 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9510 (build-system python-build-system)
9511 (arguments
736cfc10
SB
9512 '(#:phases
9513 (modify-phases %standard-phases
9514 (add-before 'install 'patch-libxdo-path
9515 ;; Hardcode the path of dynamically loaded libxdo library.
9516 (lambda* (#:key inputs #:allow-other-keys)
9517 (let ((libxdo (string-append
9518 (assoc-ref inputs "xdotool")
9519 "/lib/libxdo.so")))
9520 (substitute* "xdo/_xdo.py"
9521 (("find_library\\(\"xdo\"\\)")
9522 (simple-format #f "\"~a\"" libxdo)))
9523 #t))))
9524 #:tests? #f)) ; no tests provided
0b5e0863
SB
9525 (propagated-inputs
9526 `(("python-six" ,python-six)))
0bdc1671
CAW
9527 (inputs
9528 `(("xdotool" ,xdotool)
9529 ("libX11" ,libx11)))
9530 (home-page "https://tracker.debian.org/pkg/python-xdo")
9531 (synopsis "Python library for simulating X11 keyboard/mouse input")
9532 (description "Provides bindings to libxdo for manipulating X11 via simulated
9533input. (Note that this is mostly a legacy library; you may wish to look at
9534python-xdo for newer bindings.)")
3f641af0 9535 (license license:bsd-3)))
0bdc1671 9536
7637de23
LF
9537(define-public python2-xdo
9538 (package-with-python2 python-xdo))
9539
cb34dc6c
CAW
9540(define-public python-wtforms
9541 (package
9542 (name "python-wtforms")
9543 (version "2.1")
9544 (source
9545 (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "WTForms" version ".zip"))
9548 (sha256
9549 (base32
9550 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9551 (build-system python-build-system)
13c4d874
EF
9552 (arguments
9553 '(#:phases
9554 (modify-phases %standard-phases
9555 (add-after 'unpack 'remove-django-test
9556 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9557 (lambda _
9558 (substitute*
9559 "tests/runtests.py"
9560 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9561 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9562 #t)))))
cb34dc6c
CAW
9563 (native-inputs
9564 `(("unzip" ,unzip)))
9565 (home-page "http://wtforms.simplecodes.com/")
9566 (synopsis
9567 "Form validation and rendering library for Python web development")
9568 (description
9569 "WTForms is a flexible forms validation and rendering library
9570for Python web development. It is very similar to the web form API
9571available in Django, but is a standalone package.")
f210e944 9572 (license license:bsd-3)))
cb34dc6c
CAW
9573
9574(define-public python2-wtforms
f210e944 9575 (package-with-python2 python-wtforms))
50aaec25
DT
9576
9577(define-public python-mako
9578 (package
9579 (name "python-mako")
3753f2e6 9580 (version "1.0.6")
50aaec25
DT
9581 (source
9582 (origin
9583 (method url-fetch)
9584 (uri (pypi-uri "Mako" version))
9585 (sha256
9586 (base32
3753f2e6 9587 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9588 (build-system python-build-system)
482d9591
HG
9589 (propagated-inputs
9590 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9591 (native-inputs
482d9591 9592 `(("python-mock" ,python-mock)
e435af5c
MB
9593 ("python-nose" ,python-nose)
9594 ("python-pytest" ,python-pytest)))
50aaec25
DT
9595 (home-page "http://www.makotemplates.org/")
9596 (synopsis "Templating language for Python")
9597 (description "Mako is a templating language for Python that compiles
9598templates into Python modules.")
f210e944 9599 (license license:expat)))
50aaec25
DT
9600
9601(define-public python2-mako
f210e944 9602 (package-with-python2 python-mako))
ae00a41f
CAW
9603
9604(define-public python-waitress
9605 (package
9606 (name "python-waitress")
9607 (version "0.8.10")
9608 (source
9609 (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "waitress" version))
9612 (sha256
9613 (base32
9614 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9615 (build-system python-build-system)
9616 (home-page "https://github.com/Pylons/waitress")
9617 (synopsis "Waitress WSGI server")
9618 (description "Waitress is meant to be a production-quality pure-Python WSGI
9619server with very acceptable performance.")
f210e944 9620 (license license:zpl2.1)))
ae00a41f
CAW
9621
9622(define-public python2-waitress
f210e944 9623 (package-with-python2 python-waitress))
778a284b
CAW
9624
9625(define-public python-wsgiproxy2
9626 (package
9627 (name "python-wsgiproxy2")
9628 (version "0.4.2")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9633 (sha256
9634 (base32
9635 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9636 (build-system python-build-system)
e359b31a
LF
9637 (arguments
9638 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9639 ;; support Python 3:
9640 ;; https://github.com/benoitc/restkit/issues/140
9641 #:tests? #f))
778a284b
CAW
9642 (native-inputs
9643 `(("unzip" ,unzip)
9644 ("python-nose" ,python-nose)
9645 ("python-coverage" ,python-coverage)))
9646 (propagated-inputs
9647 `(("python-six" ,python-six)
9648 ("python-webob" ,python-webob)))
9649 (home-page
9650 "https://github.com/gawel/WSGIProxy2/")
9651 (synopsis "WSGI Proxy with various http client backends")
9652 (description "WSGI turns HTTP requests into WSGI function calls.
9653WSGIProxy turns WSGI function calls into HTTP requests.
9654It also includes code to sign requests and pass private data,
9655and to spawn subprocesses to handle requests.")
f210e944 9656 (license license:expat)))
778a284b
CAW
9657
9658(define-public python2-wsgiproxy2
f210e944 9659 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9660
9661(define-public python-pastedeploy
9662 (package
9663 (name "python-pastedeploy")
9664 (version "1.5.2")
9665 (source
9666 (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "PasteDeploy" version))
9669 (sha256
9670 (base32
9671 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9672 (build-system python-build-system)
9673 (native-inputs
9674 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9675 (home-page "http://pythonpaste.org/deploy/")
9676 (synopsis
9677 "Load, configure, and compose WSGI applications and servers")
9678 (description
9679 "This tool provides code to load WSGI applications and servers from URIs;
9680these URIs can refer to Python Eggs for INI-style configuration files. Paste
9681Script provides commands to serve applications based on this configuration
9682file.")
9683 (license license:expat)))
9684
9685(define-public python2-pastedeploy
9686 (package-with-python2 python-pastedeploy))
1cf53652 9687
c4a7904c
CAW
9688(define-public python-paste
9689 (package
9690 (name "python-paste")
ba1731da 9691 (version "2.0.3")
c4a7904c
CAW
9692 (source
9693 (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "Paste" version))
9696 (sha256
9697 (base32
ba1731da 9698 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9699 (patches (search-patches "python-paste-remove-website-test.patch"
9700 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9701 (build-system python-build-system)
9702 (native-inputs
9703 `(("python-nose" ,python-nose)))
9704 (propagated-inputs
f3b98f4f 9705 `(("python-six" ,python-six)))
c4a7904c
CAW
9706 (home-page "http://pythonpaste.org")
9707 (synopsis
9708 "Python web development tools, focusing on WSGI")
9709 (description
9710 "Paste provides a variety of web development tools and middleware which
9711can be nested together to build web applications. Paste's design closely
9712follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9713 (license license:expat)))
c4a7904c
CAW
9714
9715(define-public python2-paste
ba1731da 9716 (package-with-python2 python-paste))
c4a7904c 9717
a8f20f63
CAW
9718(define-public python-pastescript
9719 (package
9720 (name "python-pastescript")
9721 (version "2.0.2")
9722 (source
9723 (origin
9724 (method url-fetch)
9725 (uri (pypi-uri "PasteScript" version))
9726 (sha256
9727 (base32
9728 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9729 (build-system python-build-system)
9730 (native-inputs
9731 `(("python-nose" ,python-nose)))
9732 (propagated-inputs
f3b98f4f 9733 `(("python-paste" ,python-paste)
a8f20f63
CAW
9734 ("python-pastedeploy" ,python-pastedeploy)))
9735 (home-page "http://pythonpaste.org/script/")
9736 (arguments
9737 '(;; Unfortunately, this requires the latest unittest2,
9738 ;; but that requires traceback2 which requires linecache2 which requires
9739 ;; unittest2. So we're skipping tests for now.
9740 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9741 ;; so in theory we could get around this situation somehow.)
9742 #:tests? #f))
9743 (synopsis
9744 "Pluggable command line tool for serving web applications and more")
9745 (description
9746 "PasteScript is a plugin-friendly command line tool which provides a
9747variety of features, from launching web applications to bootstrapping project
9748layouts.")
9749 (license license:expat)))
9750
9751(define-public python2-pastescript
9752 (package-with-python2 python-pastescript))
9753
1cf53652
CAW
9754(define-public python-pyquery
9755 (package
9756 (name "python-pyquery")
ab0c3429 9757 (version "1.2.17")
1cf53652
CAW
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "pyquery" version))
9762 (sha256
9763 (base32
ab0c3429 9764 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9765 (build-system python-build-system)
2ddbfa8c
LF
9766 (native-inputs
9767 `(("python-webob" ,python-webob)
9768 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9769 (propagated-inputs
9770 `(("python-lxml" ,python-lxml)
9771 ("python-cssselect" ,python-cssselect)))
9772 (home-page "https://github.com/gawel/pyquery")
9773 (synopsis "Make jQuery-like queries on xml documents")
9774 (description "pyquery allows you to make jQuery queries on xml documents.
9775The API is as much as possible the similar to jQuery. pyquery uses lxml for
9776fast xml and html manipulation.")
f210e944 9777 (license license:bsd-3)))
1cf53652
CAW
9778
9779(define-public python2-pyquery
f210e944 9780 (package-with-python2 python-pyquery))
aa6313d6
CAW
9781
9782(define-public python-webtest
9783 (package
9784 (name "python-webtest")
9785 (version "2.0.20")
9786 (source
9787 (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "WebTest" version))
9790 (sha256
9791 (base32
9792 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9793 (build-system python-build-system)
9794 (arguments
9795 `(;; Unfortunately we have to disable tests!
9796 ;; This release of WebTest is pinned to python-nose < 1.3,
9797 ;; but older versions of python-nose are plagued with the following
9798 ;; bug(s), which rears its ugly head during test execution:
9799 ;; https://github.com/nose-devs/nose/issues/759
9800 ;; https://github.com/nose-devs/nose/pull/811
9801 #:tests? #f))
9802 ;; Commented out code is no good, but in this case, once tests
9803 ;; are ready to be enabled again, we should put the following
9804 ;; in place:
9805 ;; (native-inputs
9806 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9807 ;; ; but see above comment
9808 ;; ("python-coverage" ,python-coverage)
9809 ;; ("python-mock" ,python-mock)
9810 ;; ("python-pastedeploy" ,python-pastedeploy)
9811 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9812 ;; ("python-pyquery" ,python-pyquery)))
9813 (propagated-inputs
9814 `(("python-waitress" ,python-waitress)
9815 ("python-webob" ,python-webob)
9816 ("python-six" ,python-six)
9817 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9818 (home-page "http://webtest.pythonpaste.org/")
9819 (synopsis "Helper to test WSGI applications")
9820 (description "Webtest allows you to test your Python web applications
9821without starting an HTTP server. It supports anything that supports the
9822minimum of WSGI.")
f210e944 9823 (license license:expat)))
aa6313d6
CAW
9824
9825(define-public python2-webtest
f210e944 9826 (package-with-python2 python-webtest))
4cb122cd
CAW
9827
9828(define-public python-anyjson
9829 (package
9830 (name "python-anyjson")
9831 (version "0.3.3")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "anyjson" version))
9836 (sha256
9837 (base32
9838 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9839 (build-system python-build-system)
9840 (arguments
9841 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9842 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9843 ;; whatever) so this transformation needs to be done before the tests
9844 ;; can be run. Maybe we could add a build step to transform beforehand
9845 ;; but it could be annoying/difficult.
9846 ;; We can enable tests for the Python 2 version, though, and do below.
9847 #:tests? #f))
9848 (home-page "http://bitbucket.org/runeh/anyjson/")
9849 (synopsis
9850 "Wraps best available JSON implementation in a common interface")
9851 (description
9852 "Anyjson loads whichever is the fastest JSON module installed
9853and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9854 (license license:bsd-3)
4cb122cd
CAW
9855 (properties `((python2-variant . ,(delay python2-anyjson))))))
9856
9857(define-public python2-anyjson
9858 (let ((anyjson (package-with-python2
9859 (strip-python2-variant python-anyjson))))
9860 (package
9861 (inherit anyjson)
9862 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9863 #:tests? #t
9864 ,@(package-arguments anyjson)))
00e10c6e 9865 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9866
9867(define-public python-amqp
9868 (package
9869 (name "python-amqp")
9870 (version "1.4.9")
9871 (source
9872 (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "amqp" version))
9875 (sha256
9876 (base32
9877 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9878 (build-system python-build-system)
9879 (native-inputs
9880 `(("python-nose" ,python-nose)
9881 ("python-mock" ,python-mock)))
7bf837fd 9882 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
9883 (synopsis
9884 "Low-level AMQP client for Python (fork of amqplib)")
9885 (description
9886 "This is a fork of amqplib which was originally written by Barry Pederson.
9887It is maintained by the Celery project, and used by kombu as a pure python
9888alternative when librabbitmq is not available.")
3f641af0 9889 (license license:lgpl2.1+)
8dfceab7
CAW
9890 (properties `((python2-variant . ,(delay python2-amqp))))))
9891
9892(define-public python2-amqp
9893 (let ((amqp (package-with-python2
9894 (strip-python2-variant python-amqp))))
9895 (package
9896 (inherit amqp)
9897 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9898 ;; unmaintained. Weirdly, does not do this on the python 3
9899 ;; version?
9900 #:tests? #f
00e10c6e 9901 ,@(package-arguments amqp))))))
7d387305
CAW
9902
9903(define-public python-kombu
9904 (package
9905 (name "python-kombu")
0cb59822 9906 (version "3.0.37")
7d387305
CAW
9907 (source
9908 (origin
9909 (method url-fetch)
9910 (uri (pypi-uri "kombu" version))
9911 (sha256
9912 (base32
0cb59822 9913 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9914 (build-system python-build-system)
9915 (native-inputs
9916 `(("python-mock" ,python-mock)
9917 ("python-nose" ,python-nose)))
9918 (propagated-inputs
9919 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9920 ("python-amqp" ,python-amqp)
9921 ("python-redis" ,python-redis)))
7d387305
CAW
9922 (home-page "http://kombu.readthedocs.org")
9923 (synopsis "Message passing library for Python")
9924 (description "The aim of Kombu is to make messaging in Python as easy as
9925possible by providing an idiomatic high-level interface for the AMQ protocol,
9926and also provide proven and tested solutions to common messaging problems.
9927AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9928message orientation, queuing, routing, reliability and security, for which the
9929RabbitMQ messaging server is the most popular implementation.")
3f641af0 9930 (license license:bsd-3)
7d387305
CAW
9931 (properties `((python2-variant . ,(delay python2-kombu))))))
9932
9933(define-public python2-kombu
9934 (let ((kombu (package-with-python2
9935 (strip-python2-variant python-kombu))))
9936 (package
9937 (inherit kombu)
752eb9e0
MB
9938 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9939 ;; It works fine on the python3 variant.
9940 #:tests? #f
9941 ,@(package-arguments kombu)))
328bb95d
HG
9942 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9943 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9944
9945(define-public python-billiard
9946 (package
9947 (name "python-billiard")
a6bb9e44 9948 (version "3.3.0.23")
b6f0b9fb
CAW
9949 (source
9950 (origin
9951 (method url-fetch)
9952 (uri (pypi-uri "billiard" version))
9953 (sha256
9954 (base32
a6bb9e44 9955 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9956 (build-system python-build-system)
9957 (native-inputs
9958 `(("python-nose" ,python-nose)))
7bf837fd 9959 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
9960 (synopsis
9961 "Python multiprocessing fork with improvements and bugfixes")
9962 (description
9963 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9964multiprocessing package itself is a renamed and updated version of R Oudkerk's
9965pyprocessing package. This standalone variant is intended to be compatible with
9966Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9967 (license license:bsd-3)
b6f0b9fb
CAW
9968 (properties `((python2-variant . ,(delay python2-billiard))))))
9969
9970(define-public python2-billiard
9971 (let ((billiard (package-with-python2
9972 (strip-python2-variant python-billiard))))
9973 (package
9974 (inherit billiard)
00e10c6e 9975 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9976 ("python2-mock" ,python2-mock)
9977 ,@(package-native-inputs billiard))))))
22df6419
CAW
9978
9979(define-public python-celery
9980 (package
9981 (name "python-celery")
9ebe87fe 9982 (version "3.1.24")
22df6419
CAW
9983 (source
9984 (origin
9985 (method url-fetch)
9986 (uri (pypi-uri "celery" version))
9987 (sha256
9988 (base32
9ebe87fe 9989 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9990 (build-system python-build-system)
9ebe87fe
LF
9991 (arguments
9992 `(#:phases
9993 (modify-phases %standard-phases
9994 ;; These tests break with Python 3.5:
9995 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9996 (replace 'check
9997 (lambda _
9998 (zero?
9999 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10000 (native-inputs
10001 `(("python-nose" ,python-nose)))
f22efa01 10002 (propagated-inputs
22df6419
CAW
10003 `(("python-pytz" ,python-pytz)
10004 ("python-billiard" ,python-billiard)
10005 ("python-kombu" ,python-kombu)))
10006 (home-page "http://celeryproject.org")
10007 (synopsis "Distributed Task Queue")
10008 (description "Celery is an asynchronous task queue/job queue based on
10009distributed message passing. It is focused on real-time operation, but
10010supports scheduling as well. The execution units, called tasks, are executed
10011concurrently on a single or more worker servers using multiprocessing,
10012Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10013synchronously (wait until ready).")
3f641af0 10014 (license license:bsd-3)
22df6419
CAW
10015 (properties `((python2-variant . ,(delay python2-celery))))))
10016
10017(define-public python2-celery
10018 (let ((celery (package-with-python2
10019 (strip-python2-variant python-celery))))
10020 (package
10021 (inherit celery)
00e10c6e 10022 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10023 ("python2-mock" ,python2-mock)
10024 ,@(package-native-inputs celery))))))
97e32948
CAW
10025
10026(define-public python-translitcodec
10027 (package
10028 (name "python-translitcodec")
10029 (version "0.4.0")
10030 (source
10031 (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "translitcodec" version))
10034 (sha256
10035 (base32
10036 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10037 (build-system python-build-system)
10038 (arguments
10039 `(#:tests? #f)) ; no tests provided
10040 (home-page
10041 "https://github.com/claudep/translitcodec")
10042 (synopsis
10043 "Unicode to 8-bit charset transliteration codec")
10044 (description
10045 "This package contains codecs for transliterating ISO 10646 texts into
10046best-effort representations using smaller coded character sets (ASCII,
10047ISO 8859, etc.).")
f210e944 10048 (license license:expat)))
97e32948
CAW
10049
10050(define-public python2-translitcodec
f210e944 10051 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10052
10053(define-public python-editor
10054 (package
10055 (name "python-editor")
10056 (version "0.5")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "python-editor" version))
10061 (sha256
10062 (base32
10063 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10064 (build-system python-build-system)
10065 (home-page
10066 "https://github.com/fmoo/python-editor")
10067 (synopsis
10068 "Programmatically open an editor, capture the result")
10069 (description
10070 "python-editor is a library that provides the editor module for
10071programmatically interfacing with your system's $EDITOR.")
f210e944 10072 (license license:asl2.0)))
0c3b90d4
CAW
10073
10074(define-public python2-editor
f210e944 10075 (package-with-python2 python-editor))
3276517c
LF
10076
10077(define-public python-sphinxcontrib-programoutput
10078 (package
10079 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10080 (version "0.10")
3276517c
LF
10081 (source (origin
10082 (method url-fetch)
10083 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10084 (sha256
10085 (base32
b9ce9eca 10086 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10087 (build-system python-build-system)
e2cb140e
MB
10088 (arguments
10089 ;; FIXME: Many tests are failing and the upstream is gone.
10090 '(#:tests? #f))
3276517c 10091 (propagated-inputs
a0a09859 10092 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10093 (synopsis "Sphinx extension to include program output")
10094 (description "A Sphinx extension to literally insert the output of arbitrary
10095commands into documents, helping you to keep your command examples up to date.")
10096 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10097 (license license:bsd-2)))
3276517c
LF
10098
10099(define-public python2-sphinxcontrib-programoutput
f210e944 10100 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10101
10102(define-public python-sphinx-repoze-autointerface
10103 (package
10104 (name "python-sphinx-repoze-autointerface")
328ae341 10105 (version "0.8")
548d7165
LF
10106 (source (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10109 (sha256
10110 (base32
328ae341 10111 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10112 (build-system python-build-system)
5b3c3d4b 10113 (arguments '(#:tests? #f)) ; No tests.
548d7165 10114 (propagated-inputs
47c7dc4a 10115 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10116 ("python-zope-interface" ,python-zope-interface)))
10117 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10118 (description "This package defines an extension for the Sphinx documentation
10119system. The extension allows generation of API documentation by
10120introspection of @code{zope.interface} instances in code.")
10121 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10122 (license license:repoze)))
548d7165
LF
10123
10124(define-public python2-sphinx-repoze-autointerface
10125 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10126
10127(define-public python-psycopg2
10128 (package
10129 (name "python-psycopg2")
8e718963 10130 (version "2.6.2")
b31fbea5
DM
10131 (source
10132 (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "psycopg2" version))
10135 (sha256
10136 (base32
8e718963 10137 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10138 (build-system python-build-system)
10139 (arguments
10140 ;; Tests would require a postgresql database "psycopg2_test"
10141 ;; and a running postgresql database management service.
10142 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10143 (inputs
10144 `(("postgresql" ,postgresql))) ; libpq
10145 (home-page "http://initd.org/psycopg/")
10146 (synopsis "Python PostgreSQL adapter")
10147 (description
10148 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10149 (license license:lgpl3+)))
b31fbea5
DM
10150
10151(define-public python2-psycopg2
f210e944 10152 (package-with-python2 python-psycopg2))
eed1a61f
LF
10153
10154(define-public python-vobject
10155 (package
10156 (name "python-vobject")
9bed9b15 10157 (version "0.9.2")
eed1a61f
LF
10158 (source (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "vobject" version))
10161 (sha256
10162 (base32
9bed9b15 10163 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 10164 (build-system python-build-system)
a9871b7b
LF
10165 (arguments
10166 '(;; The test suite relies on some non-portable Windows interfaces.
10167 #:tests? #f))
f22efa01 10168 (propagated-inputs
22d7360b 10169 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10170 ("python-pyicu" ,python-pyicu)))
10171 (synopsis "Parse and generate vCard and vCalendar files")
10172 (description "Vobject is intended to be a full featured Python package for
10173parsing and generating vCard and vCalendar files. Currently, iCalendar files
10174are supported and well tested. vCard 3.0 files are supported, and all data
10175should be imported, but only a few components are understood in a sophisticated
10176way.")
10177 (home-page "http://eventable.github.io/vobject/")
f210e944 10178 (license license:asl2.0)))
eed1a61f
LF
10179
10180(define-public python2-vobject
f210e944 10181 (package-with-python2 python-vobject))
cedac813
LF
10182
10183(define-public python-munkres
10184 (package
10185 (name "python-munkres")
38e81a2c 10186 (version "1.0.8")
cedac813
LF
10187 (source (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "munkres" version))
10190 (sha256
10191 (base32
38e81a2c 10192 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10193 (build-system python-build-system)
10194 (arguments
10195 '(#:tests? #f)) ; no test suite
10196 (home-page "http://software.clapper.org/munkres/")
10197 (synopsis "Implementation of the Munkres algorithm")
10198 (description "The Munkres module provides an implementation of the Munkres
10199algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10200useful for solving the Assignment Problem.")
3f641af0 10201 (license license:bsd-3)))
cedac813
LF
10202
10203(define-public python2-munkres
10204 (package-with-python2 python-munkres))
f3b3d78f
LF
10205
10206(define-public python-flask
10207 (package
10208 (name "python-flask")
c6c80104 10209 (version "0.11.1")
f3b3d78f
LF
10210 (source (origin
10211 (method url-fetch)
10212 (uri (pypi-uri "Flask" version))
10213 (sha256
10214 (base32
c6c80104 10215 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10216 (build-system python-build-system)
10217 (propagated-inputs
10218 `(("python-itsdangerous" ,python-itsdangerous)
10219 ("python-jinja2" ,python-jinja2)
8f35c030 10220 ("python-click" ,python-click)
f3b3d78f
LF
10221 ("python-werkzeug" ,python-werkzeug)))
10222 (home-page "https://github.com/mitsuhiko/flask/")
10223 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10224 (description "Flask is a micro web framework based on the Werkzeug toolkit
10225and Jinja2 template engine. It is called a micro framework because it does not
10226presume or force a developer to use a particular tool or library.")
f210e944 10227 (license license:bsd-3)))
f3b3d78f
LF
10228
10229(define-public python2-flask
f210e944 10230 (package-with-python2 python-flask))
603d665b 10231
a7ad802b 10232(define-public python-flask-wtf
10233 (package
10234 (name "python-flask-wtf")
10235 (version "0.13.1")
10236 (source
10237 (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "Flask-WTF" version))
10240 (sha256
10241 (base32
10242 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10243 (build-system python-build-system)
d296d300
MB
10244 (arguments
10245 '(#:phases
10246 (modify-phases %standard-phases
10247 (add-before 'check 'drop-failing-test
10248 (lambda _
10249 ;; FIXME: This file tries resolving an external server, which
10250 ;; fails. Try to patch out the offending section instead of
10251 ;; deleting the whole thing.
10252 (delete-file "tests/test_recaptcha.py")
10253 #t)))))
a7ad802b 10254 (propagated-inputs
10255 `(("python-flask-babel" ,python-flask-babel)
10256 ("python-babel" ,python-babel)
10257 ("python-wtforms" ,python-wtforms)))
10258 (native-inputs
10259 `(("python-nose" ,python-nose)))
10260 (home-page "https://github.com/lepture/flask-wtf")
10261 (synopsis "Simple integration of Flask and WTForms")
10262 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10263upload, and reCAPTCHA.")
10264 (license license:bsd-3)))
10265
10266(define-public python2-flask-wtf
10267 (package-with-python2 python-flask-wtf))
10268
a2c7d88e 10269(define-public python-flask-multistatic
10270 (package
10271 (name "python-flask-multistatic")
10272 (version "1.0")
10273 (source
10274 (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "flask-multistatic" version))
10277 (sha256
10278 (base32
10279 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10280 (build-system python-build-system)
10281 (propagated-inputs
10282 `(("python-flask" ,python-flask)))
10283 (home-page "https://pagure.io/flask-multistatic")
10284 (synopsis "Flask plugin to allow overriding static files")
10285 (description "@code{flask-multistatic} is a flask plugin that adds support
10286for overriding static files.")
10287 (license license:gpl3+)))
10288
10289(define-public python2-flask-multistatic
10290 (package-with-python2 python-flask-multistatic))
10291
603d665b
LF
10292(define-public python-cookies
10293 (package
10294 (name "python-cookies")
10295 (version "2.2.1")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (pypi-uri "cookies" version))
10299 (sha256
10300 (base32
10301 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10302 (build-system python-build-system)
10303 (arguments
10304 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10305 #:tests? #f))
10306 (native-inputs
10307 `(("python-pytest" ,python2-pytest)))
10308 (synopsis "HTTP cookie parser and renderer")
10309 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10310Python.")
10311 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10312 (license license:expat)))
603d665b
LF
10313
10314(define-public python2-cookies
f210e944 10315 (package-with-python2 python-cookies))
0efde7d6
LF
10316
10317(define-public python-responses
10318 (package
10319 (name "python-responses")
10320 (version "0.5.1")
10321 (source (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "responses" version))
10324 (sha256
10325 (base32
10326 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10327 (build-system python-build-system)
10328 (arguments
10329 `(;; Test suite is not distributed:
10330 ;; https://github.com/getsentry/responses/issues/38
10331 #:tests? #f))
10332 (native-inputs
d8ea5f2f 10333 `(("python-mock" ,python-mock)))
0efde7d6
LF
10334 (propagated-inputs
10335 `(("python-requests" ,python-requests)
d8ea5f2f 10336 ("python-cookies" ,python-cookies)
0efde7d6
LF
10337 ("python-six" ,python-six)))
10338 (home-page "https://github.com/getsentry/responses")
10339 (synopsis "Utility for mocking out the `requests` Python library")
10340 (description "A utility library for mocking out the `requests` Python
10341library.")
f210e944 10342 (license license:asl2.0)))
0efde7d6
LF
10343
10344(define-public python2-responses
f210e944 10345 (package-with-python2 python-responses))
76b94885 10346
b7afd018
RW
10347(define-public python-whoosh
10348 (package
10349 (name "python-whoosh")
10350 (version "2.7.4")
10351 (source
10352 (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "Whoosh" version))
10355 (sha256
10356 (base32
10357 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10358 (build-system python-build-system)
10359 (native-inputs
f3b98f4f 10360 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10361 (home-page "http://bitbucket.org/mchaput/whoosh")
10362 (synopsis "Full text indexing, search, and spell checking library")
10363 (description
10364 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10365checking library.")
10366 (license license:bsd-2)))
10367
10368(define-public python2-whoosh
10369 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10370 (package (inherit whoosh)
10371 (propagated-inputs
10372 `(("python2-backport-ssl-match-hostname"
10373 ,python2-backport-ssl-match-hostname)
10374 ,@(package-propagated-inputs whoosh))))))
10375
76b94885
LF
10376(define-public python-pathlib
10377 (package
10378 (name "python-pathlib")
10379 (version "1.0.1")
10380 (source (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "pathlib" version))
10383 (sha256
10384 (base32
10385 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10386 (build-system python-build-system)
92a312dc
RW
10387 ;; The tests depend on the internal "test" module, which does not provide
10388 ;; a stable interface.
10389 (arguments `(#:tests? #f))
76b94885 10390 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10391 (synopsis "Object-oriented file system paths")
10392 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10393It offers the following advantages over using string objects:
10394
10395@enumerate
10396@item No more cumbersome use of os and os.path functions. Everything can
10397be done easily through operators, attribute accesses, and method calls.
10398@item Embodies the semantics of different path types. For example,
10399comparing Windows paths ignores casing.
10400@item Well-defined semantics, eliminating any inconsistencies or
10401ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10402@end enumerate
10403
10404Note: In Python 3.4, pathlib is now part of the standard library. For other
10405Python versions please consider python-pathlib2 instead, which tracks the
10406standard library module. This module (python-pathlib) isn't maintained
10407anymore.")
76b94885
LF
10408 (license license:expat)))
10409
10410(define-public python2-pathlib
10411 (package-with-python2 python-pathlib))
25a7db0a 10412
b7703c81
HG
10413(define-public python2-pathlib2
10414 (package
10415 (name "python2-pathlib2")
10416 (version "2.1.0")
10417 (source (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "pathlib2" version))
10420 (sha256
10421 (base32
10422 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10423 (build-system python-build-system)
49a531f5
HG
10424 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10425 ;; version is 3.4 which already includes this package as part of the
10426 ;; standard library.
b7703c81
HG
10427 (arguments
10428 `(#:python ,python-2))
10429 (native-inputs
f3b98f4f 10430 `(("python2-six" ,python2-six)))
b7703c81
HG
10431 (home-page "http://pypi.python.org/pypi/pathlib2/")
10432 (synopsis "Object-oriented file system paths - backport of standard
10433pathlib module")
10434 (description "The goal of pathlib2 is to provide a backport of standard
10435pathlib module which tracks the standard library module, so all the newest
10436features of the standard pathlib can be used also on older Python versions.
10437
10438Pathlib offers a set of classes to handle file system paths. It offers the
10439following advantages over using string objects:
10440
10441@enumerate
10442@item No more cumbersome use of os and os.path functions. Everything can
10443be done easily through operators, attribute accesses, and method calls.
10444@item Embodies the semantics of different path types. For example,
10445comparing Windows paths ignores casing.
10446@item Well-defined semantics, eliminating any inconsistencies or
10447ambiguities (forward vs. backward slashes, etc.).
10448@end enumerate")
10449 (license license:expat)))
10450
25a7db0a
LF
10451(define-public python-jellyfish
10452 (package
10453 (name "python-jellyfish")
8c4964dd 10454 (version "0.5.6")
25a7db0a
LF
10455 (source (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "jellyfish" version))
10458 (sha256
10459 (base32
8c4964dd 10460 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10461 (build-system python-build-system)
10462 (native-inputs
10463 `(("python-pytest" ,python-pytest)))
10464 (home-page "https://github.com/jamesturk/jellyfish")
10465 (synopsis "Approximate and phonetic matching of strings")
10466 (description "Jellyfish uses a variety of string comparison and phonetic
10467encoding algorithms to do fuzzy string matching.")
3f641af0 10468 (license license:bsd-2)
25a7db0a
LF
10469 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10470
10471(define-public python2-jellyfish
10472 (let ((jellyfish (package-with-python2
10473 (strip-python2-variant python-jellyfish))))
10474 (package (inherit jellyfish)
00e10c6e 10475 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10476 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10477
10478(define-public python2-unicodecsv
10479 (package
10480 (name "python2-unicodecsv")
10481 (version "0.14.1")
10482 (source (origin
10483 (method url-fetch)
10484 ;; The test suite is not included in the PyPi release.
10485 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10486 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10487 "archive/" version ".tar.gz"))
10488 (file-name (string-append name "-" version ".tar.gz"))
10489 (sha256
10490 (base32
10491 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10492 (build-system python-build-system)
10493 (arguments
10494 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10495 #:python ,python-2))
10496 (native-inputs
f3b98f4f 10497 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10498 (home-page "https://github.com/jdunck/python-unicodecsv")
10499 (synopsis "Unicode CSV module for Python 2")
10500 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10501module, adding support for Unicode strings.")
3f641af0 10502 (license license:bsd-2)))
064503aa
LF
10503
10504(define-public python-rarfile
10505 (package
10506 (name "python-rarfile")
67824447 10507 (version "2.8")
064503aa
LF
10508 (source (origin
10509 (method url-fetch)
10510 (uri (pypi-uri "rarfile" version))
10511 (sha256
10512 (base32
67824447 10513 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10514 (build-system python-build-system)
10515 (arguments
10516 '(#:phases
10517 (modify-phases %standard-phases
10518 (replace 'check
10519 ;; Many tests fail, but the installation proceeds.
10520 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10521 (native-inputs
10522 `(("which" ,which))) ; required for tests
10523 (propagated-inputs
10524 `(("libarchive" ,libarchive)))
10525 (home-page "https://github.com/markokr/rarfile")
10526 (synopsis "RAR archive reader for Python")
10527 (description "This is Python module for RAR archive reading. The interface
10528is made as zipfile like as possible.")
3f641af0 10529 (license license:isc)))
064503aa
LF
10530
10531(define-public python2-rarfile
10532 (package-with-python2 python-rarfile))
daeeea71
CM
10533
10534(define-public python-magic
10535 (package
10536 (name "python-magic")
10537 (version "0.4.3")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10542 version ".tar.gz"))
10543 (sha256
10544 (base32
10545 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10546 (file-name (string-append name "-" version "-checkout"))))
10547 (build-system python-build-system)
10548 (arguments
10549 ;; The tests are unreliable, so don't run them. The tests fail
10550 ;; under Python3 because they were written for Python2 and
10551 ;; contain import statements that do not work in Python3. One of
10552 ;; the tests fails under Python2 because its assertions are
10553 ;; overly stringent; it relies on comparing output strings which
10554 ;; are brittle and can change depending on the version of
10555 ;; libmagic being used and the system on which the test is
10556 ;; running. In my case, under GuixSD 0.10.0, only one test
10557 ;; failed, and it seems to have failed only because the version
10558 ;; of libmagic that is packaged in Guix outputs a slightly
10559 ;; different (but not wrong) string than the one that the test
10560 ;; expected.
10561 '(#:tests? #f
10562 #:phases (modify-phases %standard-phases
10563 ;; Replace a specific method call with a hard-coded
10564 ;; path to the necessary libmagic.so file in the
10565 ;; store. If we don't do this, then the method call
10566 ;; will fail to find the libmagic.so file, which in
10567 ;; turn will cause any application using
10568 ;; python-magic to fail.
10569 (add-before 'build 'hard-code-path-to-libmagic
10570 (lambda* (#:key inputs #:allow-other-keys)
10571 (let ((file (assoc-ref inputs "file")))
10572 (substitute* "magic.py"
10573 (("ctypes.util.find_library\\('magic'\\)")
10574 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10575 #t)))
10576 (add-before 'install 'disable-egg-compression
10577 (lambda _
10578 (let ((port (open-file "setup.cfg" "a")))
10579 (display "\n[easy_install]\nzip_ok = 0\n"
10580 port)
10581 (close-port port)
10582 #t))))))
daeeea71
CM
10583 (inputs
10584 ;; python-magic needs to be able to find libmagic.so.
10585 `(("file" ,file)))
10586 (home-page "https://github.com/ahupp/python-magic")
10587 (synopsis "File type identification using libmagic")
10588 (description
10589 "This module uses ctypes to access the libmagic file type
10590identification library. It makes use of the local magic database and
10591supports both textual and MIME-type output. Note that this module and
10592the python-file module both provide a \"magic.py\" file; these two
10593modules, which are different and were developed separately, both serve
10594the same purpose: to provide Python bindings for libmagic.")
10595 (license license:expat)))
10596
10597(define-public python2-magic
10598 (package-with-python2 python-magic))
12af303f
CM
10599
10600(define-public python2-s3cmd
10601 (package
10602 (name "python2-s3cmd")
10603 (version "1.6.1")
10604 (source
10605 (origin
10606 (method url-fetch)
de67e922 10607 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10608 "s3cmd-" version ".tar.gz"))
10609 (sha256
10610 (base32
10611 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10612 (build-system python-build-system)
10613 (arguments
10614 ;; s3cmd is written for python2 only and contains no tests.
10615 `(#:python ,python-2
10616 #:tests? #f))
f22efa01 10617 (propagated-inputs
12af303f
CM
10618 `(("python2-dateutil" ,python2-dateutil)
10619 ;; The python-file package also provides a magic.py module.
10620 ;; This is an unfortunate state of affairs; however, s3cmd
10621 ;; fails to install if it cannot find specifically the
10622 ;; python-magic package. Thus we include it, instead of using
10623 ;; python-file. Ironically, s3cmd sometimes works better
10624 ;; without libmagic bindings at all:
10625 ;; https://github.com/s3tools/s3cmd/issues/198
10626 ("python2-magic" ,python2-magic)))
10627 (home-page "http://s3tools.org/s3cmd")
10628 (synopsis "Command line tool for S3-compatible storage services")
10629 (description
10630 "S3cmd is a command line tool for uploading, retrieving and managing data
10631in storage services that are compatible with the Amazon Simple Storage
10632Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10633GnuPG encryption, and more. It also supports management of Amazon's
10634CloudFront content delivery network.")
3f641af0 10635 (license license:gpl2+)))
4323a5f0
AE
10636
10637(define-public python-pkgconfig
10638 (package
10639 (name "python-pkgconfig")
10640 (version "1.1.0")
10641 (source
10642 (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "pkgconfig" version))
10645 (sha256
10646 (base32
10647 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10648 (build-system python-build-system)
10649 (native-inputs
f3b98f4f 10650 `(("python-nose" ,python-nose)))
4323a5f0
AE
10651 (inputs
10652 `(("pkg-config" ,pkg-config)))
10653 (arguments
10654 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10655 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10656 #:tests? #f
4323a5f0
AE
10657 ;; Hard-code the path to pkg-config.
10658 #:phases
10659 (modify-phases %standard-phases
10660 (add-before
10661 'build 'patch
10662 (lambda _
10663 (substitute* "pkgconfig/pkgconfig.py"
10664 (("cmd = 'pkg-config")
10665 (string-append "cmd = '" (which "pkg-config"))))
10666 #t)))))
7bf837fd 10667 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
10668 (synopsis "Python interface for pkg-config")
10669 (description "This module provides a Python interface to pkg-config. It
10670can be used to find all pkg-config packages, check if a package exists,
10671check if a package meets certain version requirements, query CFLAGS and
10672LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10673 (license license:expat)))
4323a5f0
AE
10674
10675(define-public python2-pkgconfig
10676 (package-with-python2 python-pkgconfig))
10677
2e697322
BW
10678(define-public python-bz2file
10679 (package
10680 (name "python-bz2file")
10681 (version "0.98")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "bz2file" version))
10686 (sha256
10687 (base32
10688 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10689 (build-system python-build-system)
10690 (arguments
124df723 10691 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10692 (home-page "https://github.com/nvawda/bz2file")
10693 (synopsis "Read and write bzip2-compressed files")
10694 (description
10695 "Bz2file is a Python library for reading and writing bzip2-compressed
10696files. It contains a drop-in replacement for the I/O interface in the
10697standard library's @code{bz2} module, including features from the latest
10698development version of CPython that are not available in older releases.")
3f641af0 10699 (license license:asl2.0)
2e697322
BW
10700 (properties `((python2-variant . ,(delay python2-bz2file))))))
10701
10702(define-public python2-bz2file
10703 (let ((base (package-with-python2
10704 (strip-python2-variant python-bz2file))))
10705 (package
10706 (inherit base)
124df723 10707 (arguments
752bb447
BW
10708 `(#:python ,python-2
10709 #:phases
124df723
BW
10710 (modify-phases %standard-phases
10711 ;; 'python setup.py test' does not work as of 0.98.
10712 ;; There is only the one test file, so we run it directly.
10713 (replace 'check
10714 (lambda _ (zero? (system* "python"
10715 "test_bz2file.py"))))))))))
2e697322 10716
da4ac1aa
BW
10717(define-public python-future
10718 (package
10719 (name "python-future")
10720 (version "0.15.2")
10721 (source
10722 (origin
10723 (method url-fetch)
10724 (uri (pypi-uri "future" version))
10725 (sha256
10726 (base32
10727 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10728 (build-system python-build-system)
10729 ;; Many tests connect to the network or are otherwise flawed.
10730 ;; https://github.com/PythonCharmers/python-future/issues/210
10731 (arguments
10732 `(#:tests? #f))
10733 (home-page "http://python-future.org")
10734 (synopsis "Single-source support for Python 3 and 2")
10735 (description
10736 "@code{python-future} is the missing compatibility layer between Python 2 and
10737Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10738to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10739 (license license:expat)))
da4ac1aa
BW
10740
10741(define-public python2-future
f210e944 10742 (package-with-python2 python-future))
da4ac1aa 10743
8e451885
AE
10744(define-public python-cysignals
10745 (package
10746 (name "python-cysignals")
10747 (version "1.1.0")
10748 (source
10749 (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10752 (sha256
10753 (base32
10754 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10755 (build-system python-build-system)
10756 (native-inputs
10757 `(("python-cython" ,python-cython)
8e451885
AE
10758 ("python-sphinx" ,python-sphinx)))
10759 (inputs
10760 `(("pari-gp" ,pari-gp)))
10761 (arguments
10762 `(#:modules ((guix build python-build-system)
10763 ((guix build gnu-build-system) #:prefix gnu:)
10764 (guix build utils))
10765 ;; FIXME: Tests are executed after installation and currently fail
10766 ;; when not installing into standard locations; the author is working
10767 ;; on a fix.
10768 #:tests? #f
10769 #:phases
10770 (modify-phases %standard-phases
10771 (add-before
10772 'build 'configure
10773 (assoc-ref gnu:%standard-phases 'configure)))))
10774 (home-page
10775 "https://github.com/sagemath/cysignals")
10776 (synopsis
10777 "Handling of interrupts and signals for Cython")
10778 (description
10779 "The cysignals package provides mechanisms to handle interrupts (and
10780other signals and errors) in Cython code, using two related approaches,
10781for mixed Cython/Python code or external C libraries and pure Cython code,
10782respectively.")
3f641af0 10783 (license license:lgpl3+)))
8e451885
AE
10784
10785(define-public python2-cysignals
10786 (package-with-python2 python-cysignals))
10787
63bcec71
DM
10788(define-public python2-shedskin
10789 (package
10790 (name "python2-shedskin")
10791 (version "0.9.4")
10792 (source
10793 (origin
10794 (method url-fetch)
10795 (uri (string-append "https://github.com/shedskin/shedskin/"
10796 "releases/download/v" version
10797 "/shedskin-" version ".tgz"))
10798 (sha256
10799 (base32
10800 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10801 (build-system python-build-system)
10802 (arguments
10803 `(#:python ,python-2
10804 #:phases (modify-phases %standard-phases
10805 (add-after 'unpack 'fix-resulting-include-libs
10806 (lambda* (#:key inputs #:allow-other-keys)
10807 (let ((libgc (assoc-ref inputs "libgc"))
10808 (pcre (assoc-ref inputs "pcre")))
10809 (substitute* "shedskin/makefile.py"
10810 (("variable == 'CCFLAGS':[ ]*")
10811 (string-append "variable == 'CCFLAGS':\n"
10812 " line += ' -I " pcre "/include"
10813 " -I " libgc "/include'"))
10814 (("variable == 'LFLAGS':[ ]*")
10815 (string-append "variable == 'LFLAGS':\n"
10816 " line += ' -L" pcre "/lib"
10817 " -L " libgc "/lib'")))
10818 #t))))))
63bcec71
DM
10819 (inputs `(("pcre" ,pcre)
10820 ("libgc" ,libgc)))
10821 (home-page "https://shedskin.github.io/")
10822 (synopsis "Experimental Python-2 to C++ Compiler")
10823 (description (string-append "This is an experimental compiler for a subset of
10824Python. It generates C++ code and a Makefile."))
3f641af0 10825 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10826
10827(define-public python2-rope
10828 (package
10829 (name "python2-rope")
10830 (version "0.10.3")
10831 (source
10832 (origin
10833 (method url-fetch)
10834 (uri (pypi-uri "rope" version))
10835 (sha256
10836 (base32
10837 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10838 (arguments
10839 ;; Rope is currently python-2 only.
10840 ;; https://github.com/python-rope/rope/issues/57
10841 `(#:python ,python-2))
10842 (build-system python-build-system)
10843 (native-inputs
f3b98f4f 10844 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10845 (home-page "https://github.com/python-rope/rope")
10846 (synopsis "Refactoring library for Python")
10847 (description "Rope is a refactoring library for Python. It facilitates
10848the renaming, moving and extracting of attributes, functions, modules, fields
10849and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 10850to occurrences in strings and comments.")
3f641af0 10851 (license license:gpl2)))
6ba8ca17
10852
10853(define-public python-py3status
10854 (package
10855 (name "python-py3status")
d2262d70 10856 (version "3.1")
6ba8ca17
10857 (source
10858 (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "py3status" version))
10861 (sha256
10862 (base32
d2262d70 10863 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10864 (build-system python-build-system)
8653c1d5
MB
10865 (arguments
10866 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10867 (home-page "https://github.com/ultrabug/py3status")
10868 (synopsis "Extensible i3status wrapper written in Python")
10869 (description "py3status is an i3status wrapper which extends i3status
10870functionality in a modular way, allowing you to extend your panel with your
10871own code, responding to click events and updating clock every second.")
3f641af0 10872 (license license:bsd-3)))
b8fdbca3
HG
10873
10874(define-public python-tblib
10875 (package
10876 (name "python-tblib")
10877 (version "1.3.0")
10878 (source (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "tblib" version))
10881 (sha256 (base32
10882 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10883 (build-system python-build-system)
10884 (arguments
10885 `(#:phases
10886 (modify-phases %standard-phases
10887 (replace 'check
10888 (lambda _
10889 ;; Upstream runs tests after installation and the package itself
10890 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10891 ;; found.
10892 (setenv "PYTHONPATH"
10893 (string-append (getcwd) "/build/lib:"
10894 (getenv "PYTHONPATH")))
10895 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10896 (native-inputs
10897 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10898 ("python-six" ,python-six)))
10899 (home-page "https://github.com/ionelmc/python-tblib")
10900 (synopsis "Traceback serialization library")
10901 (description
10902 "Traceback serialization allows you to:
10903
10904@enumerate
10905@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10906different processes. This allows better error handling when running code over
10907multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10908
10909@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10910@end enumerate\n")
3f641af0 10911 (license license:bsd-3)))
b8fdbca3
HG
10912
10913(define-public python2-tblib
10914 (package-with-python2 python-tblib))
1a024de4
HG
10915
10916(define-public python-sqlparse
10917 (package
10918 (name "python-sqlparse")
10919 (version "0.1.19")
10920 (source (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "sqlparse" version))
10923 (sha256
10924 (base32
10925 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10926 (build-system python-build-system)
10927 (arguments
10928 `(#:phases
10929 (modify-phases %standard-phases
10930 (replace 'check
10931 (lambda* _
10932 ;; setup.py-integrated 2to3 only affects the build files, but
10933 ;; py.test is using the source files. So we need to convert them
10934 ;; manually.
10935 (when (zero? (system* "python3"))
10936 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10937 (zero? (system* "py.test")))))))
10938 (native-inputs
f3b98f4f 10939 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10940 (home-page "https://github.com/andialbrecht/sqlparse")
10941 (synopsis "Non-validating SQL parser")
10942 (description "Sqlparse is a non-validating SQL parser for Python. It
10943provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10944 (license license:bsd-3)))
1a024de4
HG
10945
10946(define-public python2-sqlparse
10947 (package-with-python2 python-sqlparse))
68b9d242
SB
10948
10949(define-public python-greenlet
10950 (package
10951 (name "python-greenlet")
1f89fb16 10952 (version "0.4.11")
68b9d242
SB
10953 (source (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "greenlet" version))
10956 (sha256
10957 (base32
1f89fb16 10958 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10959 (build-system python-build-system)
68b9d242
SB
10960 (home-page "https://greenlet.readthedocs.io/")
10961 (synopsis "Lightweight in-process concurrent programming")
10962 (description
10963 "Greenlet package is a spin-off of Stackless, a version of CPython
10964that supports micro-threads called \"tasklets\". Tasklets run
10965pseudo-concurrently (typically in a single or a few OS-level threads) and
10966are synchronized with data exchanges on \"channels\".")
3f641af0 10967 (license (list license:psfl license:expat))))
68b9d242
SB
10968
10969(define-public python2-greenlet
10970 (package-with-python2 python-greenlet))
d79a343b
SB
10971
10972(define-public python-gevent
10973 (package
10974 (name "python-gevent")
10975 (version "1.1.1")
10976 (source (origin
10977 (method url-fetch)
10978 (uri (pypi-uri "gevent" version))
10979 (sha256
10980 (base32
10981 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10982 (modules '((guix build utils)))
10983 (snippet
10984 '(begin
10985 ;; unbunding libev and c-ares
10986 (for-each delete-file-recursively '("libev" "c-ares"))
10987 ;; fixing testsuite
10988 (call-with-output-file "greentest/__init__.py" noop)
10989 (substitute* "greentest/testrunner.py"
10990 (("import util") "from . import util")
10991 (("from util import log") "from .util import log"))))))
10992 (build-system python-build-system)
10993 (propagated-inputs
10994 `(("python-greenlet" ,python-greenlet)))
10995 (native-inputs
f3b98f4f 10996 `(("python-six" ,python-six)))
d79a343b
SB
10997 (inputs
10998 `(("c-ares" ,c-ares)
10999 ("libev" ,libev)))
11000 (home-page "http://www.gevent.org/")
11001 (synopsis "Coroutine-based network library")
11002 (description
11003 "gevent is a coroutine-based Python networking library that uses greenlet
11004to provide a high-level synchronous API on top of the libev event loop.")
11005 (license license:expat)))
11006
11007(define-public python2-gevent
11008 (package-with-python2 python-gevent))
da3aeeb6 11009
c9a18125
MB
11010(define-public python-geventhttpclient
11011 (package
11012 (name "python-geventhttpclient")
11013 (version "1.3.1")
11014 (source (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "geventhttpclient" version))
11017 (sha256
11018 (base32
11019 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11020 (modules '((guix build utils)))
11021 (snippet
11022 '(begin
11023 ;; Delete pre-compiled files.
11024 (for-each delete-file (find-files "src/geventhttpclient"
11025 ".*\\.pyc"))
11026 #t))))
11027 (build-system python-build-system)
11028 (arguments
11029 '(#:phases
11030 (modify-phases %standard-phases
11031 (add-after 'unpack 'delete-network-tests
11032 (lambda _
11033 (delete-file "src/geventhttpclient/tests/test_client.py")
11034 #t))
11035 (delete 'check)
11036 (add-after 'install 'check
11037 (lambda* (#:key inputs outputs #:allow-other-keys)
11038 (add-installed-pythonpath inputs outputs)
11039 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11040 (native-inputs
11041 `(("python-pytest" ,python-pytest)))
11042 (propagated-inputs
11043 `(("python-certifi" ,python-certifi)
11044 ("python-gevent" ,python-gevent)
11045 ("python-six" ,python-six)))
11046 (home-page "https://github.com/gwik/geventhttpclient")
11047 (synopsis "HTTP client library for gevent")
11048 (description "@code{python-geventhttpclient} is a high performance,
11049concurrent HTTP client library for python using @code{gevent}.")
11050 (license license:expat)))
11051
11052(define-public python2-geventhttpclient
11053 (package-with-python2 python-geventhttpclient))
11054
b585e361
DM
11055(define-public python-fastimport
11056 (package
11057 (name "python-fastimport")
11058 (version "0.9.6")
11059 (source
11060 (origin
11061 (method url-fetch)
11062 (uri (pypi-uri "fastimport" version))
11063 (sha256
11064 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11065 (build-system python-build-system)
11066 (home-page "https://github.com/jelmer/python-fastimport")
11067 (synopsis "VCS fastimport parser and generator in Python")
11068 (description "This package provides a parser for and generator of the Git
11069@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11070format.")
11071 (license license:gpl2+)))
11072
11073(define-public python2-fastimport
11074 (package-with-python2 python-fastimport))
11075
da3aeeb6
SB
11076(define-public python-twisted
11077 (package
11078 (name "python-twisted")
11079 (version "16.2.0")
11080 (source (origin
11081 (method url-fetch)
8ea8e8d3 11082 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11083 (sha256
11084 (base32
11085 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11086 (build-system python-build-system)
a960e73f
MB
11087 (arguments
11088 '(#:tests? #f)) ; FIXME: Some tests are failing.
11089 ;; #:phases
11090 ;; (modify-phases %standard-phases
11091 ;; (replace 'check
11092 ;; (lambda _
11093 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11094 (propagated-inputs
11095 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11096 (home-page "https://twistedmatrix.com/")
11097 (synopsis "Asynchronous networking framework written in Python")
11098 (description
11099 "Twisted is an extensible framework for Python programming, with special
11100focus on event-based network programming and multiprotocol integration.")
11101 (license license:expat)))
11102
11103(define-public python2-twisted
11104 (package-with-python2 python-twisted))
d0b6fed6 11105
4d3fa5a4
EF
11106(define-public python-pika
11107 (package
11108 (name "python-pika")
11109 (version "0.10.0")
11110 (source
11111 (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "pika" version))
11114 (sha256
11115 (base32
11116 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11117 (build-system python-build-system)
11118 (native-inputs
269d9172
LF
11119 `(("python-pyev" ,python-pyev)
11120 ("python-tornado" ,python-tornado)
11121 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11122 (home-page "https://pika.readthedocs.org")
11123 (synopsis "Pure Python AMQP Client Library")
11124 (description
11125 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11126Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11127network support library.")
11128 (license license:bsd-3)))
11129
11130(define-public python2-pika
11131 (package-with-python2 python-pika))
11132
d0b6fed6
DM
11133(define-public python-ply
11134 (package
11135 (name "python-ply")
234ade2d 11136 (version "3.9")
d0b6fed6
DM
11137 (source
11138 (origin
11139 (method url-fetch)
234ade2d 11140 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11141 (sha256
11142 (base32
234ade2d 11143 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11144 (build-system python-build-system)
11145 (home-page "http://www.dabeaz.com/ply/")
11146 (synopsis "Python Lex & Yacc")
11147 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11148It uses LR parsing and does extensive error checking.")
f210e944 11149 (license license:bsd-3)))
d0b6fed6
DM
11150
11151(define-public python2-ply
f210e944 11152 (package-with-python2 python-ply))
d951bd54
SB
11153
11154(define-public python-tabulate
11155 (package
11156 (name "python-tabulate")
e6ace98d 11157 (version "0.7.7")
d951bd54
SB
11158 (source (origin
11159 (method url-fetch)
11160 (uri (pypi-uri "tabulate" version))
11161 (sha256
11162 (base32
fe2ba3a8 11163 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11164 (build-system python-build-system)
fe2ba3a8
MB
11165 (arguments
11166 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11167 ;; and the latest release is not tagged in the upstream repository.
11168 '(#:tests? #f))
d951bd54
SB
11169 (home-page "https://bitbucket.org/astanin/python-tabulate")
11170 (synopsis "Pretty-print tabular data")
11171 (description
11172 "Tabulate is a library and command-line utility to pretty-print tabular
11173data in Python.")
11174 (license license:expat)))
11175
11176(define-public python2-tabulate
11177 (package-with-python2 python-tabulate))
1c4c8a33
SB
11178
11179(define-public python-kazoo
11180 (package
11181 (name "python-kazoo")
11182 (version "2.2.1")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "kazoo" version))
11187 (sha256
11188 (base32
11189 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11190 (build-system python-build-system)
11191 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11192 (propagated-inputs
11193 `(("python-six" ,python-six)))
1c4c8a33
SB
11194 (home-page "https://kazoo.readthedocs.org")
11195 (synopsis "High-level Zookeeper client library")
11196 (description
11197 "Kazoo is a Python client library for the Apache Zookeeper distributed
11198application service. It is designed to be easy to use and to avoid common
11199programming errors.")
3f641af0 11200 (license license:asl2.0)))
1c4c8a33
SB
11201
11202(define-public python2-kazoo
11203 (package-with-python2 python-kazoo))
45dda35e
SB
11204
11205(define-public python-pykafka
11206 (package
11207 (name "python-pykafka")
11208 (version "2.4.0")
11209 (source (origin
11210 (method url-fetch)
c6bccf71
EF
11211 (uri (string-append
11212 "https://pypi.python.org/packages/8b/3e/"
11213 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11214 "pykafka-" version ".tar.gz"))
45dda35e
SB
11215 (sha256
11216 (base32
11217 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11218 (build-system python-build-system)
11219 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11220 (propagated-inputs
45dda35e
SB
11221 `(("python-gevent" ,python-gevent)
11222 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11223 ("python-tabulate" ,python-tabulate)))
11224 (inputs
11225 `(("librdkafka" ,librdkafka)))
11226 (home-page "https://pykafka.readthedocs.io/")
11227 (synopsis "Apache Kafka client for Python")
11228 (description
11229 "PyKafka is a client for the Apache Kafka distributed messaging system.
11230It includes Python implementations of Kafka producers and consumers, which
11231are optionally backed by a C extension built on librdkafka.")
3f641af0 11232 (license license:asl2.0)))
45dda35e
SB
11233
11234(define-public python2-pykafka
11235 (package-with-python2 python-pykafka))
a44fd439
DM
11236
11237(define-public python-wcwidth
11238 (package
11239 (name "python-wcwidth")
9e59478f 11240 (version "0.1.7")
a44fd439
DM
11241 (source
11242 (origin
11243 (method url-fetch)
9e59478f 11244 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11245 (sha256
11246 (base32
9e59478f 11247 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11248 (build-system python-build-system)
11249 (home-page "https://github.com/jquast/wcwidth")
66e07664 11250 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11251 (description "Wcwidth measures the number of terminal column cells of
11252wide-character codes. It is useful for those implementing a terminal emulator,
11253or programs that carefully produce output to be interpreted by one. It is a
11254Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11255specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11256 (license license:expat)))
a44fd439
DM
11257
11258(define-public python2-wcwidth
f210e944 11259 (package-with-python2 python-wcwidth))
0de78c95
DP
11260
11261(define-public python2-jsonrpclib
11262 (package
11263 (name "python2-jsonrpclib")
11264 (version "0.1.7")
11265 (source (origin
11266 (method url-fetch)
11267 (uri (string-append
11268 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11269 "jsonrpclib-" version ".tar.gz"))
11270 (sha256
11271 (base32
11272 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11273 (build-system python-build-system)
0de78c95
DP
11274 (arguments
11275 `(#:tests? #f
11276 #:python ,python-2))
11277 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11278 (synopsis "Implementation of JSON-RPC specification for Python")
11279 (description
11280 "This library is an implementation of the JSON-RPC specification.
11281It supports both the original 1.0 specification, as well as the
11282new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11283etc.")
3f641af0 11284 (license license:asl2.0)))
9250b0f3
SB
11285
11286(define-public python-chai
11287 (package
11288 (name "python-chai")
11289 (version "1.1.1")
11290 (source (origin
11291 (method url-fetch)
11292 (uri (pypi-uri "chai" version))
11293 (sha256
11294 (base32
11295 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11296 (build-system python-build-system)
9250b0f3
SB
11297 (home-page "https://github.com/agoragames/chai")
11298 (synopsis "Mocking framework for Python")
11299 (description
11300 "Chai provides an api for mocking, stubbing and spying your python
11301objects, patterned after the Mocha library for Ruby.")
3f641af0 11302 (license license:bsd-3)))
9250b0f3
SB
11303
11304(define-public python2-chai
11305 (package-with-python2 python-chai))
11306
ae43baa8
SB
11307(define-public python-arrow
11308 (package
11309 (name "python-arrow")
11310 (version "0.8.0")
11311 (source (origin
11312 (method url-fetch)
11313 (uri (pypi-uri "arrow" version))
11314 (sha256
11315 (base32
11316 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11317 (build-system python-build-system)
11318 (native-inputs
f3b98f4f 11319 `(;; For testing
ae43baa8
SB
11320 ("python-chai" ,python-chai)
11321 ("python-simplejson" ,python-simplejson)))
36aed736 11322 (propagated-inputs
22d7360b 11323 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11324 (home-page "https://github.com/crsmithdev/arrow/")
11325 (synopsis "Dates and times for Python")
11326 (description
11327 "Arrow is a Python library to creating, manipulating, formatting and
11328converting dates, times, and timestamps. It implements and updates the
11329datetime type.")
3f641af0 11330 (license license:asl2.0)))
ae43baa8
SB
11331
11332(define-public python2-arrow
11333 (package-with-python2 python-arrow))
11334
1f2b62a4
SB
11335(define-public python-inflection
11336 (package
11337 (name "python-inflection")
11338 (version "0.3.1")
11339 (source
11340 (origin (method url-fetch)
11341 (uri (pypi-uri "inflection" version))
11342 (sha256
11343 (base32
11344 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11345 (build-system python-build-system)
e9127525
MB
11346 (native-inputs
11347 `(("python-pytest" ,python-pytest)))
7bf837fd 11348 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11349 (synopsis "Python string transformation library")
11350 (description
11351 "Inflection is a string transformation library. It singularizes
11352and pluralizes English words, and transforms strings from CamelCase to
11353underscored string.")
11354 (license license:expat)))
11355
11356(define-public python2-inflection
11357 (package-with-python2 python-inflection))
11358
18995566
SB
11359(define-public python-pylev
11360 (package
11361 (name "python-pylev")
11362 (version "1.3.0")
11363 (source (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "pylev" version))
11366 (sha256
11367 (base32
11368 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11369 (build-system python-build-system)
7bf837fd 11370 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11371 (synopsis "Levenshtein distance implementation in Python")
11372 (description "Pure Python Levenshtein implementation, based off the
11373Wikipedia code samples at
11374@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11375 (license license:bsd-3)))
18995566
SB
11376
11377(define-public python2-pylev
11378 (package-with-python2 python-pylev))
11379
f5deff7a
SB
11380(define-public python-cleo
11381 (package
11382 (name "python-cleo")
11383 (version "0.4.1")
11384 (source (origin
11385 (method url-fetch)
11386 (uri (pypi-uri "cleo" version))
11387 (sha256
11388 (base32
11389 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11390 (build-system python-build-system)
11391 (native-inputs
f3b98f4f 11392 `(;; For testing
f5deff7a
SB
11393 ("python-mock" ,python-mock)
11394 ("python-pytest" ,python-pytest)))
9403150a
SB
11395 (propagated-inputs
11396 `(("python-psutil" ,python-psutil)
11397 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11398 (home-page "https://github.com/sdispater/cleo")
11399 (synopsis "Command-line arguments library for Python")
11400 (description
11401 "Cleo allows you to create command-line commands with signature in
11402docstring and colored output.")
11403 (license license:expat)))
11404
11405(define-public python2-cleo
11406 (package-with-python2 python-cleo))
11407
77cadb43
SB
11408(define-public python-lazy-object-proxy
11409 (package
11410 (name "python-lazy-object-proxy")
11411 (version "1.2.2")
11412 (source (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "lazy-object-proxy" version))
11415 (sha256
11416 (base32
11417 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11418 (build-system python-build-system)
77cadb43
SB
11419 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11420 (synopsis "Lazy object proxy for python")
11421 (description
11422 "Lazy object proxy is an object that wraps a callable but defers the call
11423until the object is actually required, and caches the result of said call.")
3f641af0 11424 (license license:bsd-2)))
77cadb43
SB
11425
11426(define-public python2-lazy-object-proxy
11427 (package-with-python2 python-lazy-object-proxy))
11428
5477e05f
SB
11429(define-public python-dnspython
11430 (package
11431 (name "python-dnspython")
6c514128 11432 (version "1.15.0")
5477e05f
SB
11433 (source (origin
11434 (method url-fetch)
11435 (uri (string-append "http://www.dnspython.org/kits/"
11436 version "/dnspython-" version ".tar.gz"))
11437 (sha256
11438 (base32
6c514128 11439 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11440 (build-system python-build-system)
11441 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11442 (home-page "http://www.dnspython.org")
11443 (synopsis "DNS toolkit for Python")
11444 (description
11445 "dnspython is a DNS toolkit for Python. It supports almost all record
11446types. It can be used for queries, zone transfers, and dynamic updates.
11447It supports TSIG authenticated messages and EDNS0.")
11448 (license license:expat)))
11449
11450(define-public python2-dnspython
11451 (package-with-python2 python-dnspython))
11452
22711e25
SB
11453(define-public python-email-validator
11454 (package
11455 (name "python-email-validator")
b165c215 11456 (version "1.0.2")
22711e25
SB
11457 (source
11458 (origin (method url-fetch)
11459 (uri (pypi-uri "email_validator" version))
11460 (sha256
11461 (base32
b165c215 11462 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11463 (build-system python-build-system)
11464 (arguments
11465 '(#:phases
11466 (modify-phases %standard-phases
11467 (add-before 'build 'use-dnspython
11468 (lambda _
11469 (substitute* "setup.py"
11470 (("dnspython3") "dnspython"))
11471 #t)))))
d42560bd 11472 (propagated-inputs
22711e25 11473 `(("python-dnspython" ,python-dnspython)
d42560bd 11474 ("python-idna" ,python-idna)))
22711e25
SB
11475 (home-page "https://github.com/JoshData/python-email-validator")
11476 (synopsis "Email address validation library for Python")
11477 (description
11478 "This library validates email address syntax and deliverability.")
3f641af0 11479 (license license:cc0)))
22711e25
SB
11480
11481(define-public python2-email-validator
11482 (package-with-python2 python-email-validator))
11483
8987d91e
SB
11484(define-public python-ukpostcodeparser
11485 (package
11486 (name "python-ukpostcodeparser")
11487 (version "1.0.3")
11488 (source (origin
11489 (method url-fetch)
11490 (uri (pypi-uri "UkPostcodeParser" version))
11491 (sha256
11492 (base32
11493 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11494 (build-system python-build-system)
8987d91e
SB
11495 (home-page "https://github.com/hamstah/ukpostcodeparser")
11496 (synopsis "UK Postcode parser for Python")
11497 (description
11498 "This library provides the @code{parse_uk_postcode} function for
11499parsing UK postcodes.")
11500 (license license:expat)))
11501
11502(define-public python2-ukpostcodeparser
11503 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11504
ce7911dd
MB
11505(define-public python-faker
11506 (package
11507 (name "python-faker")
11508 (version "0.7.9")
11509 (source (origin
11510 (method url-fetch)
11511 (uri (pypi-uri "Faker" version))
11512 (sha256
11513 (base32
11514 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11515 (patches
11516 (search-patches "python-faker-fix-build-32bit.patch"))
11517 (modules '((guix build utils)))
11518 (snippet
11519 '(begin
11520 (for-each delete-file (find-files "." "\\.pyc$"))
11521 #t))))
11522 (build-system python-build-system)
11523 (arguments
11524 '(#:phases
11525 (modify-phases %standard-phases
11526 (replace 'check
11527 (lambda _
11528 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11529 (native-inputs
11530 `(;; For testing
11531 ("python-email-validator" ,python-email-validator)
11532 ("python-mock" ,python-mock)
11533 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11534 (propagated-inputs
11535 `(("python-dateutil" ,python-dateutil)
11536 ("python-six" ,python-six)))
11537 (home-page "https://github.com/joke2k/faker")
11538 (synopsis "Python package that generates fake data")
11539 (description
11540 "Faker is a Python package that generates fake data such as names,
11541addresses, and phone numbers.")
11542 (license license:expat)
11543 (properties `((python2-variant . ,(delay python2-faker))))))
11544
11545(define-public python2-faker
11546 (let ((base (package-with-python2 (strip-python2-variant
11547 python-faker))))
11548 (package
11549 (inherit base)
11550 (propagated-inputs
11551 `(("python2-ipaddress" ,python2-ipaddress)
11552 ,@(package-propagated-inputs base))))))
11553
ea92ae01
SB
11554(define-public python-fake-factory
11555 (package
11556 (name "python-fake-factory")
7adc698f 11557 (version "0.7.2")
ea92ae01
SB
11558 (source (origin
11559 (method url-fetch)
11560 (uri (pypi-uri "fake-factory" version))
11561 (sha256
11562 (base32
42945fb5
MB
11563 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11564 (patches
11565 (search-patches
11566 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11567 (build-system python-build-system)
b7f3ea95
MB
11568 (arguments
11569 '(#:phases
11570 (modify-phases %standard-phases
11571 (replace 'check
11572 (lambda _
11573 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11574 (native-inputs
f3b98f4f 11575 `(;; For testing
ea92ae01
SB
11576 ("python-email-validator" ,python-email-validator)
11577 ("python-mock" ,python-mock)
11578 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11579 (propagated-inputs
22d7360b 11580 `(("python-dateutil" ,python-dateutil)
bbcd7297 11581 ("python-six" ,python-six)))
7adc698f 11582 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11583 (synopsis "Python package that generates fake data")
11584 (description
11585 "Faker is a Python package that generates fake data such as names,
11586addresses, and phone numbers.")
11587 (license license:expat)
ce7911dd
MB
11588 (properties `((python2-variant . ,(delay python2-fake-factory))
11589 (superseded . ,python-faker)))))
ea92ae01
SB
11590
11591(define-public python2-fake-factory
11592 (let ((base (package-with-python2 (strip-python2-variant
11593 python-fake-factory))))
11594 (package
11595 (inherit base)
ce7911dd 11596 (properties `((superseded . ,python2-faker)))
24c9aa18 11597 (propagated-inputs
ea92ae01 11598 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11599 ,@(package-propagated-inputs base))))))
ea92ae01 11600
b49504fd
SB
11601(define-public python-pyaml
11602 (package
11603 (name "python-pyaml")
11604 (version "15.8.2")
11605 (source (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "pyaml" version))
11608 (sha256
11609 (base32
11610 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11611 (build-system python-build-system)
f620311a
MB
11612 (native-inputs
11613 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11614 (propagated-inputs
11615 `(("python-pyyaml" ,python-pyyaml)))
11616 (home-page "https://github.com/mk-fg/pretty-yaml")
11617 (synopsis "YAML pretty-print library for Python")
11618 (description
11619 "pyaml is a PyYAML based python module to produce pretty and readable
11620YAML-serialized data.")
3f641af0 11621 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11622
11623(define-public python2-pyaml
11624 (package-with-python2 python-pyaml))
11625
347175a2
SB
11626(define-public python-flexmock
11627 (package
11628 (name "python-flexmock")
11629 (version "0.10.2")
11630 (source (origin
11631 (method url-fetch)
11632 (uri (pypi-uri "flexmock" version))
11633 (sha256
11634 (base32
11635 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11636 (build-system python-build-system)
347175a2
SB
11637 (home-page "https://flexmock.readthedocs.org")
11638 (synopsis "Testing library for Python")
11639 (description
11640 "flexmock is a testing library for Python that makes it easy to create
11641mocks, stubs and fakes.")
3f641af0 11642 (license license:bsd-3)))
347175a2
SB
11643
11644(define-public python2-flexmock
11645 (package-with-python2 python-flexmock))
11646
5a744191
SB
11647(define-public python-orator
11648 (package
11649 (name "python-orator")
11650 (version "0.8.2")
11651 (source (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "orator" version))
11654 (sha256
11655 (base32
11656 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11657 (build-system python-build-system)
11658 (arguments '(#:tests? #f)) ; no tests
b2676030 11659 (propagated-inputs
5a744191
SB
11660 `(("python-arrow" ,python-arrow)
11661 ("python-blinker" ,python-blinker)
11662 ("python-cleo" ,python-cleo)
ce7911dd 11663 ("python-faker" ,python-faker)
5a744191
SB
11664 ("python-inflection" ,python-inflection)
11665 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11666 ("python-pyaml" ,python-pyaml)
5a744191
SB
11667 ("python-simplejson" ,python-simplejson)
11668 ("python-wrapt" ,python-wrapt)))
11669 (home-page "https://orator-orm.com/")
11670 (synopsis "ActiveRecord ORM for Python")
11671 (description
11672 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11673implementation for Python.")
11674 (license license:expat)
11675 (properties `((python2-variant . ,(delay python2-orator))))))
11676
11677(define-public python2-orator
11678 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11679 (package
11680 (inherit base)
06961617 11681 (propagated-inputs
5a744191 11682 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11683 ,@(package-propagated-inputs base))))))
f4155188
DM
11684
11685(define-public python-prompt-toolkit
11686 (package
11687 (name "python-prompt-toolkit")
6a34f4cc 11688 (version "1.0.9")
f4155188
DM
11689 (source
11690 (origin
11691 (method url-fetch)
d15e2ef0 11692 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11693 (sha256
11694 (base32
6a34f4cc 11695 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11696 (build-system python-build-system)
bae18710
LF
11697 (arguments
11698 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11699 (propagated-inputs
11700 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11701 ("python-six" ,python-six)
f22efa01 11702 ("python-pygments" ,python-pygments)))
f4155188
DM
11703 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11704 (synopsis "Library for building command line interfaces in Python")
11705 (description
11706 "Prompt-Toolkit is a library for building interactive command line
11707interfaces in Python. It's like GNU Readline but it also features syntax
11708highlighting while typing, out-of-the-box multi-line input editing, advanced
11709code completion, incremental search, support for Chinese double-width
11710characters, mouse support, and auto suggestions.")
f210e944 11711 (license license:bsd-3)))
f4155188
DM
11712
11713(define-public python2-prompt-toolkit
f210e944 11714 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11715
11716(define-public python-jedi
11717 (package
11718 (name "python-jedi")
11719 (version "0.9.0")
11720 (source
11721 (origin
11722 (method url-fetch)
11723 (uri (pypi-uri "jedi" version))
11724 (sha256
11725 (base32
11726 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11727 (build-system python-build-system)
bfce8a34
MB
11728 (arguments
11729 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11730 '(#:tests? #f))
11731 (native-inputs
11732 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11733 (home-page "https://github.com/davidhalter/jedi")
11734 (synopsis
11735 "Autocompletion for Python that can be used for text editors")
11736 (description
11737 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11738 (license license:expat)))
a502dfbf
DM
11739
11740(define-public python2-jedi
f210e944 11741 (package-with-python2 python-jedi))
c2f0dc6e
DM
11742
11743(define-public ptpython
11744 (package
11745 (name "ptpython")
11746 (version "0.34")
11747 (source (origin
11748 (method url-fetch)
11749 (uri (pypi-uri "ptpython" version))
11750 (sha256
11751 (base32
11752 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11753 (build-system python-build-system)
32955348
MB
11754 (arguments
11755 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11756 (propagated-inputs
c2f0dc6e
DM
11757 `(("python-docopt" ,python-docopt)
11758 ("python-jedi" ,python-jedi)
11759 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11760 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11761 (home-page "https://github.com/jonathanslenders/ptpython")
11762 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11763 (description
11764 "ptpython is a Python read-eval-print loop with IDE-like features.
11765It supports syntax highlighting, multiline editing, autocompletion, mouse,
11766color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11767etc.")
3f641af0 11768 (license license:bsd-3)
c2f0dc6e
DM
11769 (properties `((python2-variant . ,(delay ptpython-2))))))
11770
11771(define-public ptpython-2
11772 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11773 (package
11774 (inherit base)
11775 (name "ptpython2"))))
b227f0be 11776
b04a52a6
DJ
11777(define-public python-requests-oauthlib
11778 (package
11779 (name "python-requests-oauthlib")
11780 (version "0.6.2")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "requests-oauthlib" version))
11785 (sha256
11786 (base32
11787 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11788 (build-system python-build-system)
11789 (arguments
11790 `(#:phases
11791 (modify-phases %standard-phases
11792 ;; removes tests that require network access
11793 (add-before 'check 'pre-check
11794 (lambda _
11795 (delete-file "tests/test_core.py")
11796 #t)))))
11797 (native-inputs
11798 `(("python-requests-mock" ,python-requests-mock)
11799 ("python-mock" ,python-mock)))
f22efa01 11800 (propagated-inputs
b04a52a6
DJ
11801 `(("python-oauthlib" ,python-oauthlib)
11802 ("python-requests" ,python-requests)))
11803 (home-page
11804 "https://github.com/requests/requests-oauthlib")
11805 (synopsis
11806 "OAuthlib authentication support for Requests")
11807 (description
11808 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11809provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11810 (license license:isc)))
b04a52a6
DJ
11811
11812(define-public python2-requests-oauthlib
f210e944 11813 (package-with-python2 python-requests-oauthlib))
b04a52a6 11814
b227f0be 11815(define-public python-stem
11816 (package
11817 (name "python-stem")
0bb1c35a 11818 (version "1.5.4")
b227f0be 11819 (source
11820 (origin
11821 (method url-fetch)
c976b319 11822 (uri (pypi-uri "stem" version))
b227f0be 11823 (sha256
11824 (base32
0bb1c35a 11825 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11826 (build-system python-build-system)
11827 (arguments
11828 `(#:phases
11829 (modify-phases %standard-phases
11830 (replace 'check
11831 (lambda _
11832 (zero? (system* "./run_tests.py" "--unit")))))))
11833 (native-inputs
11834 `(("python-mock" ,python-mock)
11835 ("python-pep8" ,python-pep8)
11836 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11837 (home-page "https://stem.torproject.org/")
11838 (synopsis
11839 "Python controller library that allows applications to interact with Tor")
11840 (description
11841 "Stem is a Python controller library for Tor. With it you can use Tor's
11842control protocol to script against the Tor process and read descriptor data
11843relays publish about themselves.")
3f641af0 11844 (license license:lgpl3)))
b227f0be 11845
11846(define-public python2-stem
11847 (package-with-python2 python-stem))
517a6c0c
DM
11848
11849(define-public python-pyserial
11850 (package
11851 (name "python-pyserial")
11852 (version "3.1.1")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "pyserial" version))
11857 (sha256
11858 (base32
11859 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11860 (build-system python-build-system)
0a702009
MB
11861 (arguments
11862 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11863 ;; #:phases
11864 ;; (modify-phases %standard-phases
11865 ;; (replace 'check
11866 ;; (lambda _
11867 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11868 (home-page
11869 "https://github.com/pyserial/pyserial")
11870 (synopsis "Python Serial Port Bindings")
11871 (description "@code{pyserial} provide serial port bindings for Python. It
11872supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11873and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11874 (license license:bsd-3)))
517a6c0c
DM
11875
11876(define-public python2-pyserial
f210e944 11877 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11878
11879(define-public python-kivy
11880 (package
11881 (name "python-kivy")
11882 (version "1.9.1")
11883 (source
11884 (origin
11885 (method url-fetch)
11886 (uri (pypi-uri "kivy" version))
11887 (file-name (string-append name "-" version ".tar.gz"))
11888 (sha256
11889 (base32
11890 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11891 (build-system python-build-system)
11892 (arguments
11893 `(#:tests? #f ; Tests require many optional packages
11894 #:phases
11895 (modify-phases %standard-phases
11896 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11897 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11898 (lambda* (#:key inputs #:allow-other-keys)
11899 (setenv "KIVY_SDL2_PATH"
11900 (string-append (assoc-ref inputs "sdl-union")
11901 "/include/SDL2"))
11902 #t)))))
11903 (native-inputs
f2516de2
HG
11904 `(("pkg-config" ,pkg-config)
11905 ("python-cython" ,python-cython)))
6eb7af2a 11906 (inputs
f2516de2 11907 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11908 ("mesa" ,mesa)
11909 ("sdl-union"
11910 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11911 (home-page "http://kivy.org")
11912 (synopsis
11913 "Multitouch application framework")
11914 (description
11915 "A software library for rapid development of
11916hardware-accelerated multitouch applications.")
11917 (license license:expat)))
11918
11919(define-public python2-kivy
11920 (package-with-python2 python-kivy))
11921
11922(define-public python-kivy-next
11923 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11924 (revision "1"))
11925 (package (inherit python-kivy)
11926 (name "python-kivy-next")
d80a71eb 11927 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11928 (string-take commit 7)))
11929 (source
11930 (origin
11931 (method git-fetch)
11932 (uri (git-reference
11933 (url "https://github.com/kivy/kivy")
11934 (commit commit)))
11935 (file-name (string-append name "-" version "-checkout"))
11936 (sha256
11937 (base32
11938 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11939
11940(define-public python2-kivy-next
11941 (package-with-python2 python-kivy-next))
8794bd8b
DC
11942
11943(define-public python-binaryornot
11944 (package
11945 (name "python-binaryornot")
11946 (version "0.4.0")
11947 (source (origin
11948 (method url-fetch)
11949 (uri (pypi-uri "binaryornot" version))
11950 (sha256
11951 (base32
11952 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11953 (build-system python-build-system)
f22efa01 11954 (propagated-inputs
8794bd8b
DC
11955 `(("python-chardet" ,python-chardet)
11956 ("python-hypothesis" ,python-hypothesis)))
11957 (home-page "https://github.com/audreyr/binaryornot")
11958 (synopsis "Package to check if a file is binary or text")
11959 (description "Ultra-lightweight pure Python package to check if a file is
11960binary or text.")
11961 (license license:bsd-3)
11962 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11963
11964(define-public python2-binaryornot
11965 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11966 (package (inherit base)
f22efa01 11967 (propagated-inputs
8794bd8b 11968 `(("python2-enum34" ,python2-enum34)
f22efa01 11969 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11970
11971(define-public python-nltk
11972 (package
11973 (name "python-nltk")
11974 (version "3.2.1")
11975 (source (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "nltk" version))
11978 (sha256
11979 (base32
11980 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11981 (build-system python-build-system)
59f12985
LF
11982 (arguments
11983 '(;; The tests require some extra resources to be downloaded.
11984 ;; TODO Try packaging these resources.
11985 #:tests? #f))
a9ac982a
DC
11986 (home-page "http://nltk.org/")
11987 (synopsis "Natural Language Toolkit")
11988 (description "It provides interfaces to over 50 corpora and lexical
11989resources such as WordNet, along with a suite of text processing libraries
11990for classification, tokenization, stemming, tagging, parsing, and semantic
11991reasoning, wrappers for natural language processing libraries.")
f210e944 11992 (license license:asl2.0)))
a9ac982a
DC
11993
11994(define-public python2-nltk
f210e944 11995 (package-with-python2 python-nltk))
691cd90d
DC
11996
11997(define-public python-pymongo
11998 (package
11999 (name "python-pymongo")
12000 (version "3.3.0")
12001 (source (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "pymongo" version))
12004 (sha256
12005 (base32
12006 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12007 (build-system python-build-system)
f22efa01 12008 (propagated-inputs
691cd90d 12009 `(("python-certifi" ,python-certifi)))
7bf837fd 12010 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12011 (synopsis "Python driver for MongoDB")
12012 (description "Python driver for MongoDB.")
f210e944 12013 (license license:asl2.0)))
691cd90d
DC
12014
12015(define-public python2-pymongo
f210e944 12016 (package-with-python2 python-pymongo))
6a6c9d43
DC
12017
12018(define-public python-sh
12019 (package
12020 (name "python-sh")
12021 (version "1.11")
12022 (source (origin
12023 (method url-fetch)
12024 (uri (pypi-uri "sh" version))
12025 (sha256
12026 (base32
12027 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12028 (build-system python-build-system)
12029 (arguments
12030 `(#:tests? #f)) ; no tests
12031 (home-page "https://github.com/amoffat/sh")
12032 (synopsis "Python subprocess interface")
12033 (description "Abstracts process invocation by providing a function
12034interface for programs.")
f210e944 12035 (license license:expat)))
6a6c9d43
DC
12036
12037(define-public python2-sh
f210e944 12038 (package-with-python2 python-sh))
05b59190 12039
25702397
EF
12040(define-public python-consul
12041 (package
12042 (name "python-consul")
12043 (version "0.6.1")
12044 (source
12045 (origin
12046 (method url-fetch)
12047 (uri (pypi-uri "python-consul" version))
12048 (sha256
12049 (base32
12050 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12051 (build-system python-build-system)
12052 (native-inputs
fd1d6de7
HG
12053 `(("python-pytest" ,python-pytest)))
12054 (propagated-inputs
12055 `(("python-requests" ,python-requests)
25702397
EF
12056 ("python-six" ,python-six)))
12057 (home-page "https://github.com/cablehead/python-consul")
12058 (synopsis "Python client for Consul")
12059 (description
12060 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12061discovery, monitoring and configuration.")
12062 (license license:expat)))
12063
12064(define-public python2-consul
f210e944 12065 (package-with-python2 python-consul))
25702397 12066
05b59190
DC
12067(define-public python-schematics
12068 (package
12069 (name "python-schematics")
12070 (version "1.1.1")
12071 (source
12072 (origin
12073 (method url-fetch)
12074 (uri (string-append
12075 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12076 (file-name (string-append name "-" version ".tar.gz"))
12077 (sha256
12078 (base32
12079 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12080 (build-system python-build-system)
f22efa01 12081 (propagated-inputs
05b59190
DC
12082 `(("python-six" ,python-six)))
12083 (arguments
12084 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12085 ; version requirements (eg python-coveralls)
12086 (home-page "https://github.com/schematics/schematics")
12087 (synopsis "Python Data Structures for Humans")
12088 (description "Python Data Structures for Humans.")
f210e944 12089 (license license:bsd-3)))
05b59190
DC
12090
12091(define-public python2-schematics
f210e944 12092 (package-with-python2 python-schematics))
d6907ff7
DC
12093
12094(define-public python-publicsuffix
12095 (package
12096 (name "python-publicsuffix")
12097 (version "1.1.0")
12098 (source (origin
12099 (method url-fetch)
12100 (uri (pypi-uri "publicsuffix" version))
12101 (sha256
12102 (base32
12103 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12104 (build-system python-build-system)
12105 (arguments
12106 `(#:tests? #f)) ; tests use the internet
12107 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12108 (synopsis "Get suffix for a domain name")
12109 (description "Get a public suffix for a domain name using the Public Suffix
12110List.")
f210e944 12111 (license license:expat)))
d6907ff7
DC
12112
12113(define-public python2-publicsuffix
f210e944 12114 (package-with-python2 python-publicsuffix))
b2319996
DC
12115
12116(define-public python-publicsuffix2
12117 (package
12118 (name "python-publicsuffix2")
91862162 12119 (version "2.20160818")
b2319996
DC
12120 (source
12121 (origin
12122 (method url-fetch)
12123 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12124 (sha256
12125 (base32
91862162 12126 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12127 (build-system python-build-system)
10797a0a
LF
12128 (arguments
12129 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12130 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12131 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12132 (description "Get a public suffix for a domain name using the Public Suffix
12133List. Forked from and using the same API as the publicsuffix package.")
f210e944 12134 (license (list license:expat license:mpl2.0))))
b2319996
DC
12135
12136(define-public python2-publicsuffix2
f210e944 12137 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12138
12139(define-public python-url
12140 (package
12141 (name "python-url")
12142 (version "0.2.0")
12143 (source (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "url" version))
12146 (sha256
12147 (base32
12148 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12149 (build-system python-build-system)
f22efa01 12150 (propagated-inputs
81f1515d
DC
12151 `(("python-publicsuffix" ,python-publicsuffix)))
12152 (native-inputs
12153 `(("python-coverage" ,python-coverage)
12154 ("python-nose" ,python-nose)))
12155 (arguments
12156 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12157 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12158 (synopsis "URL Parsing")
12159 (description "Library for parsing urls.")
12160 (license license:expat)
12161 (properties `((python2-variant . ,(delay python2-url))))))
12162
12163(define-public python2-url
12164 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12165 (package (inherit base)
f22efa01 12166 (propagated-inputs
f210e944 12167 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12168
12169(define-public python-freezegun
12170 (package
12171 (name "python-freezegun")
0c315fb3 12172 (version "0.3.8")
974ee2c1
TS
12173 (source
12174 (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "freezegun" version))
12177 (sha256
12178 (base32
0c315fb3 12179 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12180 (build-system python-build-system)
12181 (native-inputs
12182 `(("python-mock" ,python-mock)
12183 ("python-nose" ,python-nose)
4e096968 12184 ("python-coverage" ,python-coverage)))
f22efa01 12185 (propagated-inputs
4e096968 12186 `(("python-six" ,python-six)
22d7360b 12187 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12188 (arguments
12189 `(#:phases (modify-phases %standard-phases
12190 ;; The tests are normally executed via `make test`, but the PyPi
12191 ;; package does not include the Makefile.
12192 (replace 'check
12193 (lambda _
12194 (zero? (system* "nosetests" "./tests/")))))))
12195 (home-page "https://github.com/spulec/freezegun")
12196 (synopsis "Test utility for mocking the datetime module")
12197 (description
12198 "FreezeGun is a library that allows your python tests to travel through
12199time by mocking the datetime module.")
12200 (license license:asl2.0)))
12201
12202(define-public python2-freezegun
f210e944
HG
12203 (package-with-python2 python-freezegun))
12204
dddcb25c
MB
12205
12206(define-public python-odfpy
12207 (package
12208 (name "python-odfpy")
12209 (version "1.3.3")
12210 (source (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "odfpy" version))
12213 (sha256
12214 (base32
12215 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12216 (arguments
12217 `(#:modules ((srfi srfi-1)
12218 (guix build python-build-system)
12219 (guix build utils))
12220 #:phases
12221 (modify-phases %standard-phases
12222 (replace 'check
12223 ;; The test runner invokes python2 and python3 for test*.py.
12224 ;; To avoid having both in inputs, we replicate it here.
12225 (lambda _
12226 (every (lambda (test-file)
12227 (zero? (system* "python" test-file)))
12228 (find-files "tests" "^test.*\\.py$")))))))
12229 (build-system python-build-system)
12230 (home-page "https://github.com/eea/odfpy")
12231 (synopsis "Python API and tools to manipulate OpenDocument files")
12232 (description "Collection of libraries and utility programs written in
12233Python to manipulate OpenDocument 1.2 files.")
12234 (license
12235 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12236 ;; number of files with other licenses.
12237 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12238
12239(define-public python2-odfpy
12240 (package-with-python2 python-odfpy))
b30565bd
MB
12241
12242(define-public python-cachecontrol
12243 (package
12244 (name "python-cachecontrol")
12245 (version "0.11.6")
12246 (source
12247 (origin
12248 (method url-fetch)
12249 ;; Pypi does not have tests.
12250 (uri (string-append
12251 "https://github.com/ionrock/cachecontrol/archive/v"
12252 version ".tar.gz"))
12253 (file-name (string-append name "-" version ".tar.gz"))
12254 (sha256
12255 (base32
12256 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12257 (build-system python-build-system)
12258 (arguments
12259 `(#:phases
12260 (modify-phases %standard-phases
12261 (replace 'check
12262 (lambda _
12263 ;; Drop test that requires internet access.
12264 (delete-file "tests/test_regressions.py")
12265 (setenv "PYTHONPATH"
12266 (string-append (getcwd) "/build/lib:"
12267 (getenv "PYTHONPATH")))
12268 (zero? (system* "py.test" "-vv")))))))
12269 (native-inputs
12270 `(("python-pytest" ,python-pytest)
12271 ("python-redis" ,python-redis)
12272 ("python-webtest" ,python-webtest)
12273 ("python-mock" ,python-mock)))
12274 (propagated-inputs
12275 `(("python-requests" ,python-requests)
12276 ("python-lockfile" ,python-lockfile)))
12277 (home-page "https://github.com/ionrock/cachecontrol")
12278 (synopsis "The httplib2 caching algorithms for use with requests")
12279 (description "CacheControl is a port of the caching algorithms in
12280@code{httplib2} for use with @code{requests} session objects.")
f210e944 12281 (license license:asl2.0)))
b30565bd
MB
12282
12283(define-public python2-cachecontrol
f210e944 12284 (package-with-python2 python-cachecontrol))
243db824
DM
12285
12286(define-public python-lit
12287 (package
12288 (name "python-lit")
12289 (version "0.5.0")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "lit" version))
12294 (sha256
12295 (base32
12296 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12297 (build-system python-build-system)
12298 (home-page "http://llvm.org/")
12299 (synopsis "LLVM Software Testing Tool")
12300 (description "@code{lit} is a portable tool for executing LLVM and Clang
12301style test suites, summarizing their results, and providing indication of
12302failures.")
f210e944 12303 (license license:ncsa)))
243db824
DM
12304
12305(define-public python2-lit
f210e944 12306 (package-with-python2 python-lit))
66f95b20
MB
12307
12308(define-public python-pytest-pep8
12309 (package
12310 (name "python-pytest-pep8")
12311 (version "1.0.6")
12312 (source (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "pytest-pep8" version))
12315 (sha256
12316 (base32
12317 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12318 (build-system python-build-system)
12319 (arguments
b41a05ce 12320 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12321 (native-inputs
12322 `(("python-pytest" ,python-pytest)))
12323 (propagated-inputs
12324 `(("python-pep8" ,python-pep8)))
12325 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12326 (synopsis "Py.test plugin to check PEP8 requirements")
12327 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12328 (license license:expat)))
66f95b20
MB
12329
12330(define-public python2-pytest-pep8
f210e944 12331 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12332
12333(define-public python-pytest-flakes
12334 (package
12335 (name "python-pytest-flakes")
12336 (version "1.0.1")
12337 (source (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "pytest-flakes" version))
12340 (sha256
12341 (base32
12342 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12343 (build-system python-build-system)
12344 (arguments
b41a05ce 12345 `(#:phases
df94a6b5
MB
12346 (modify-phases %standard-phases
12347 (delete 'check)
12348 (add-after 'install 'check
05c2fd36
HG
12349 (lambda* (#:key outputs inputs #:allow-other-keys)
12350 ;; It's easier to run tests after install.
12351 ;; Make installed package available for running the tests
12352 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12353 (zero? (system* "py.test" "-vv")))))))
12354 (native-inputs
12355 `(("python-coverage" ,python-coverage)
12356 ("python-pytest" ,python-pytest)
12357 ("python-pytest-cache" ,python-pytest-cache)
12358 ("python-pytest-pep8" ,python-pytest-pep8)))
12359 (propagated-inputs
12360 `(("python-pyflakes" ,python-pyflakes)))
12361 (home-page "https://github.com/fschulze/pytest-flakes")
12362 (synopsis "Py.test plugin to check source code with pyflakes")
12363 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12364 (license license:expat)))
df94a6b5
MB
12365
12366(define-public python2-pytest-flakes
f210e944 12367 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12368
12369(define-public python-natsort
12370 (package
12371 (name "python-natsort")
a06cd95a 12372 (version "5.0.2")
5467ea62
MB
12373 (source (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "natsort" version))
12376 (sha256
12377 (base32
a06cd95a 12378 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12379 (build-system python-build-system)
12380 (arguments
12381 `(#:phases
12382 (modify-phases %standard-phases
12383 (add-before 'check 'set-cachedir
12384 ;; Tests require write access to $HOME by default
12385 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12386 (native-inputs
12387 `(("python-hypothesis" ,python-hypothesis)
12388 ("python-pytest-cache" ,python-pytest-cache)
12389 ("python-pytest-cov" ,python-pytest-cov)
12390 ("python-pytest-flakes" ,python-pytest-flakes)
12391 ("python-pytest-pep8" ,python-pytest-pep8)))
12392 (propagated-inputs ; TODO: Add python-fastnumbers.
12393 `(("python-pyicu" ,python-pyicu)))
12394 (home-page "https://github.com/SethMMorton/natsort")
12395 (synopsis "Natural sorting for python and shell")
12396 (description
12397 "Natsort lets you apply natural sorting on lists instead of
12398lexicographical. If you use the built-in @code{sorted} method in python
12399on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12400returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12401function @code{natsorted} that identifies numbers and sorts them separately
12402from strings. It can also sort version numbers, real numbers, mixed types
12403and more, and comes with a shell command @command{natsort} that exposes this
12404functionality in the command line.")
12405 (license license:expat)
12406 (properties `((python2-variant . ,(delay python2-natsort))))))
12407
12408(define-public python2-natsort
12409 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12410 (package (inherit base)
12411 (native-inputs
00e10c6e 12412 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12413 ("python2-mock" ,python2-mock)
12414 ("python2-enum34" ,python2-enum34)
12415 ,@(package-native-inputs base))))))
4efb9c54
SR
12416
12417(define-public python-glances
12418 (package
12419 (name "python-glances")
12420 (version "2.7.1")
12421 (source
12422 (origin
12423 (method url-fetch)
12424 (uri (pypi-uri "Glances" version))
12425 (sha256
12426 (base32
12427 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12428 (build-system python-build-system)
f22efa01 12429 (propagated-inputs
4efb9c54
SR
12430 `(("python-psutil" ,python-psutil)))
12431 (home-page
12432 "https://github.com/nicolargo/glances")
12433 (synopsis
12434 "A cross-platform curses-based monitoring tool")
12435 (description
12436 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12437Glances uses the PsUtil library to get information from your system. It monitors
12438CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12439 (license license:lgpl3+)))
4efb9c54
SR
12440
12441(define-public python2-glances
f210e944 12442 (package-with-python2 python-glances))
05b7a593
EF
12443
12444(define-public python-graphql-core
12445 (package
12446 (name "python-graphql-core")
12447 (version "0.5.3")
12448 (source
12449 (origin
12450 (method url-fetch)
12451 (uri (pypi-uri "graphql-core" version))
12452 (sha256
12453 (base32
12454 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12455 (build-system python-build-system)
12456 (arguments
326f8285
LF
12457 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12458 #:phases
05b7a593
EF
12459 (modify-phases %standard-phases
12460 (add-after 'unpack 'patch-hardcoded-version
12461 (lambda _ (substitute*
12462 "setup.py"
12463 (("'gevent==1.1rc1'") "'gevent'"))
12464 #t)))))
12465 (native-inputs
12466 `(("python-gevent" ,python-gevent)
12467 ("python-mock" ,python-mock)
12468 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12469 (propagated-inputs
05b7a593
EF
12470 `(("python-promise" ,python-promise)
12471 ("python-six" ,python-six)))
12472 (home-page "https://github.com/graphql-python/graphql-core")
12473 (synopsis "GraphQL implementation for Python")
12474 (description
12475 "GraphQL implementation for Python. GraphQL is a data query language and
12476runtime designed and used to request and deliver data to mobile and web apps.
12477This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12478to Python.")
05b7a593
EF
12479 (license license:expat)))
12480
12481(define-public python2-graphql-core
f210e944 12482 (package-with-python2 python-graphql-core))
7ee51575
EF
12483
12484(define-public python-graphql-relay
12485 (package
12486 (name "python-graphql-relay")
b13a5b4d 12487 (version "0.4.5")
7ee51575
EF
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "graphql-relay" version))
12492 (sha256
12493 (base32
b13a5b4d 12494 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12495 (build-system python-build-system)
12496 (native-inputs
12497 `(("python-pytest" ,python-pytest)))
f22efa01 12498 (propagated-inputs
7ee51575
EF
12499 `(("python-graphql-core" ,python-graphql-core)
12500 ("python-promise" ,python-promise)
12501 ("python-six" ,python-six)))
12502 (home-page "https://github.com/graphql-python/graphql-relay-py")
12503 (synopsis "Relay implementation for Python")
12504 (description
12505 "This is a library to allow the easy creation of Relay-compliant servers
12506using the GraphQL Python reference implementation of a GraphQL server. It
12507should be noted that the code is a exact port of the original
12508@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12509from Facebook.")
7ee51575
EF
12510 (license license:expat)))
12511
12512(define-public python2-graphql-relay
f210e944 12513 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12514
12515(define-public python-graphene
12516 (package
12517 (name "python-graphene")
12518 (version "0.10.2")
12519 (source
12520 (origin
12521 (method url-fetch)
12522 (uri (pypi-uri "graphene" version))
12523 (sha256
12524 (base32
12525 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12526 (build-system python-build-system)
12527 (native-inputs
12528 `(("python-django-filter" ,python-django-filter)
12529 ("python-mock" ,python-mock)
12530 ("python-psycopg2" ,python-psycopg2)
12531 ("python-pytest-django" ,python-pytest-django)
12532 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12533 (propagated-inputs
ddc63a56
EF
12534 `(("python-graphql-core" ,python-graphql-core)
12535 ("python-graphql-relay" ,python-graphql-relay)
12536 ("python-iso8601" ,python-iso8601)
12537 ("python-promise" ,python-promise)
12538 ("python-six" ,python-six)))
12539 (home-page "http://graphene-python.org/")
12540 (synopsis "GraphQL Framework for Python")
12541 (description
12542 "Graphene is a Python library for building GraphQL schemas/types.
12543A GraphQL schema describes your data model, and provides a GraphQL server
12544with an associated set of resolve methods that know how to fetch data.")
12545 (properties `((python2-variant . ,(delay python2-graphene))))
12546 (license license:expat)))
12547
12548(define-public python2-graphene
12549 (let ((base (package-with-python2
12550 (strip-python2-variant python-graphene))))
12551 (package (inherit base)
12552 (native-inputs
00e10c6e 12553 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12554 ,@(package-native-inputs base))))))
d488d5d6
EF
12555
12556(define-public python-nautilus
12557 (package
12558 (name "python-nautilus")
12559 (version "0.4.9")
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "nautilus" version))
12564 (sha256
12565 (base32
12566 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12567 (build-system python-build-system)
12568 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12569 (propagated-inputs
d488d5d6
EF
12570 `(("python-bcrypt" ,python-bcrypt)
12571 ("python-click" ,python-click)
12572 ("python-consul" ,python-consul)
d488d5d6
EF
12573 ("python-graphene" ,python-graphene)
12574 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12575 ("python-peewee" ,python-peewee)
12576 ("python-pika" ,python-pika)
d488d5d6
EF
12577 ("python-tornado" ,python-tornado)
12578 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12579 (native-inputs
12580 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12581 (home-page "https://github.com/AlecAivazis/nautilus")
12582 (synopsis "Library for creating microservice applications")
12583 (description
12584 "Nautilus is a framework for flux based microservices that looks to
12585provide extendible implementations of common aspects of a cloud so that you can
12586focus on building massively scalable web applications.")
12587 (license license:expat)))
94cffc63 12588
89cd988b
DM
12589(define-public python-snowballstemmer
12590 (package
12591 (name "python-snowballstemmer")
12592 (version "1.2.1")
12593 (source (origin
1bd858cc
MB
12594 (method url-fetch)
12595 (uri (pypi-uri "snowballstemmer" version))
12596 (sha256
12597 (base32
12598 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12599 (build-system python-build-system)
12600 (arguments
12601 `(;; No tests exist
12602 #:tests? #f))
12603 (home-page "https://github.com/shibukawa/snowball_py")
12604 (synopsis "Snowball stemming library collection for Python")
12605 (description "This package provides 16 word stemmer algorithms generated
12606from Snowball algorithms. It includes the 15 original ones plus the Poerter
12607English stemmer.")
12608 (license license:bsd-3)))
12609
12610(define-public python2-snowballstemmer
12611 (package-with-python2 python-snowballstemmer))
12612
754bfd70
DM
12613(define-public python-sphinx-cloud-sptheme
12614 (package
12615 (name "python-sphinx-cloud-sptheme")
5095bc7d 12616 (version "1.8.0")
754bfd70 12617 (source (origin
1bd858cc
MB
12618 (method url-fetch)
12619 (uri (pypi-uri "cloud_sptheme" version))
12620 (sha256
12621 (base32
5095bc7d 12622 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12623 (build-system python-build-system)
a31e2f1a
MB
12624 ;; FIXME: The 'pypi' release archive does not contain tests.
12625 (arguments '(#:tests? #f))
1bd858cc
MB
12626 (native-inputs
12627 `(("python-sphinx" ,python-sphinx)))
12628 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12629 (synopsis "'Cloud' theme for Sphinx documenter")
12630 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12631related extensions.")
1bd858cc 12632 (license license:bsd-3)))
754bfd70
DM
12633
12634(define-public python2-sphinx-cloud-sptheme
12635 (package-with-python2 python-sphinx-cloud-sptheme))
12636
807a5b32
DM
12637(define-public python-sphinx-alabaster-theme
12638 (package
12639 (name "python-sphinx-alabaster-theme")
12640 (version "0.7.9")
1bd858cc
MB
12641 (source (origin
12642 (method url-fetch)
12643 (uri (pypi-uri "alabaster" version))
12644 (sha256
12645 (base32
12646 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12647 (build-system python-build-system)
12648 (propagated-inputs
12649 `(("python-pygments" ,python-pygments)))
12650 (home-page "https://alabaster.readthedocs.io/")
12651 (synopsis "Configurable sidebar-enabled Sphinx theme")
12652 (description "Alabaster is a visually (c)lean, responsive, configurable
12653theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12654 (license license:bsd-3)))
12655
12656(define-public python2-sphinx-alabaster-theme
12657 (package-with-python2 python-sphinx-alabaster-theme))
12658
66d3f50a
LF
12659(define-public python-betamax
12660 (package
12661 (name "python-betamax")
12662 (version "0.8.0")
12663 (source
12664 (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "betamax" version))
12667 (sha256
12668 (base32
12669 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12670 (build-system python-build-system)
12671 (arguments
12672 '(;; Many tests fail because they require networking.
12673 #:tests? #f))
c415f763 12674 (propagated-inputs
66d3f50a
LF
12675 `(("python-requests" ,python-requests)))
12676 (home-page "https://github.com/sigmavirus24/betamax")
12677 (synopsis "Record HTTP interactions with python-requests")
12678 (description "Betamax will record your test suite's HTTP interactions and
12679replay them during future tests. It is designed to work with python-requests.")
f210e944 12680 (license license:expat)))
66d3f50a
LF
12681
12682(define-public python2-betamax
f210e944 12683 (package-with-python2 python-betamax))
ca0635b4 12684
94cffc63
LF
12685(define-public python-s3transfer
12686 (package
12687 (name "python-s3transfer")
1b5ea092 12688 (version "0.1.10")
94cffc63
LF
12689 (source (origin
12690 (method url-fetch)
12691 (uri (pypi-uri "s3transfer" version))
12692 (sha256
12693 (base32
1b5ea092 12694 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12695 (build-system python-build-system)
fad8bf97
LF
12696 (arguments
12697 `(#:phases
12698 (modify-phases %standard-phases
12699 (replace 'check
12700 (lambda _
12701 ;; 7 of the 'integration' tests require network access or login
12702 ;; credentials.
12703 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12704 (native-inputs
fad8bf97
LF
12705 `(("python-docutils" ,python-docutils)
12706 ("python-mock" ,python-mock)
12707 ("python-nose" ,python-nose)))
f22efa01 12708 (propagated-inputs
94cffc63
LF
12709 `(("python-botocore" ,python-botocore)))
12710 (synopsis "Amazon S3 Transfer Manager")
12711 (description "S3transfer is a Python library for managing Amazon S3
12712transfers.")
12713 (home-page "https://github.com/boto/s3transfer")
12714 (license license:asl2.0)
12715 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12716
12717(define-public python2-s3transfer
12718 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12719 (package
12720 (inherit base)
12721 (native-inputs
12722 `(("python2-futures" ,python2-futures)
94cffc63 12723 ,@(package-native-inputs base))))))
8ab59181
HG
12724
12725(define-public python-setproctitle
12726(package
12727 (name "python-setproctitle")
12728 (version "1.1.10")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "setproctitle" version))
12733 (sha256
12734 (base32
12735 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12736 (build-system python-build-system)
12737 (arguments
12738 '(#:phases
12739 (modify-phases %standard-phases
12740 (add-before 'check 'patch-Makefile
12741 ;; Stricly this is only required for the python2 variant.
12742 ;; But adding a phase in an inherited package seems to be
12743 ;; cumbersum. So we patch even for python3.
12744 (lambda _
12745 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12746 (when nose
12747 (substitute* "Makefile"
12748 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12749 (string-append nose "/bin/nosetests "))))
12750 #t)))
12751 (replace 'check
12752 (lambda _
12753 (setenv "PYTHON" (or (which "python3") (which "python")))
12754 (setenv "PYCONFIG" (or (which "python3-config")
12755 (which "python-config")))
12756 (setenv "CC" "gcc")
12757 ;; No need to extend PYTHONPATH to find the built package, since
12758 ;; the Makefile will build anyway
12759 (zero? (system* "make" "check")))))))
12760 (native-inputs
12761 `(("procps" ,procps))) ; required for tests
12762 (home-page
12763 "https://github.com/dvarrazzo/py-setproctitle")
12764 (synopsis
12765 "Setproctitle implementation for Python to customize the process title")
12766 (description "The library allows a process to change its title (as displayed
12767by system tools such as ps and top).
12768
12769Changing the title is mostly useful in multi-process systems, for
12770example when a master process is forked: changing the children's title
12771allows to identify the task each process is busy with. The technique
12772is used by PostgreSQL and the OpenSSH Server for example.")
12773 (license license:bsd-3)
12774 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12775
12776(define-public python2-setproctitle
12777 (let ((base (package-with-python2
12778 (strip-python2-variant python-setproctitle))))
12779 (package
12780 (inherit base)
12781 (native-inputs `(("python2-nose" ,python2-nose)
12782 ,@(package-native-inputs base))))))
162e42d8
HG
12783
12784(define-public python-validictory
12785 (package
12786 (name "python-validictory")
12787 (version "1.0.1")
12788 (source
12789 (origin
12790 (method url-fetch)
12791 (uri (pypi-uri "validictory" version))
12792 (sha256
12793 (base32
12794 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12795 (build-system python-build-system)
12796 (arguments
12797 '(#:phases
12798 (modify-phases %standard-phases
12799 (add-after 'unpack 'bootstrap
12800 ;; Move the tests out of the package directory to avoid
12801 ;; packaging them.
12802 (lambda* _
12803 (rename-file "validictory/tests" "tests")
12804 (delete-file "tests/__init__.py")))
12805 (replace 'check
12806 (lambda _
12807 ;; Extend PYTHONPATH so the built package will be found.
12808 (setenv "PYTHONPATH"
12809 (string-append (getcwd) "/build/lib:"
12810 (getenv "PYTHONPATH")))
12811 (zero? (system* "py.test" "-vv" )))))))
12812 (native-inputs
12813 `(("python-pytest" ,python-pytest)))
12814 (home-page
12815 "https://github.com/jamesturk/validictory")
12816 (synopsis "General purpose Python data validator")
12817 (description "It allows validation of arbitrary Python data structures.
12818
12819The schema format is based on the JSON Schema
12820proposal (http://json-schema.org), so combined with json the library is also
12821useful as a validator for JSON data.")
f210e944 12822 (license license:expat)))
162e42d8
HG
12823
12824(define-public python2-validictory
f210e944 12825 (package-with-python2 python-validictory))
0990edfe
DM
12826
12827(define-public python-aniso8601
12828 (package
12829 (name "python-aniso8601")
12830 (version "1.1.0")
12831 (source
12832 (origin
12833 (method url-fetch)
12834 (uri (pypi-uri "aniso8601" version))
12835 (sha256
12836 (base32
12837 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12838 (build-system python-build-system)
12839 (propagated-inputs
22d7360b 12840 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12841 (home-page
12842 "https://bitbucket.org/nielsenb/aniso8601")
12843 (synopsis
12844 "Python library for parsing ISO 8601 strings")
12845 (description
12846 "This package contains a library for parsing ISO 8601 datetime strings.")
12847 (license license:bsd-3)))
999d964d
DM
12848
12849(define-public python-flask-restful
12850 (package
12851 (name "python-flask-restful")
12852 (version "0.3.5")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "Flask-RESTful" version))
12857 (sha256
12858 (base32
12859 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12860 (build-system python-build-system)
12861 (propagated-inputs
12862 `(("python-aniso8601" ,python-aniso8601)
12863 ("python-flask" ,python-flask)
12864 ("python-pycrypto" ,python-pycrypto)
12865 ("python-pytz" ,python-pytz)))
12866 (native-inputs
12867 `(;; Optional dependency of Flask. Tests need it.
12868 ("python-blinker" ,python-blinker)
12869 ("python-mock" ,python-mock) ; For tests
12870 ("python-nose" ,python-nose) ; For tests
12871 ("python-sphinx" ,python-sphinx)))
12872 (home-page
12873 "https://www.github.com/flask-restful/flask-restful/")
12874 (synopsis
12875 "Flask module for creating REST APIs")
12876 (description
12877 "This package contains a Flask module for creating REST APIs.")
12878 (license license:bsd-3)))
31288222
DM
12879
12880(define-public python-flask-basicauth
12881 (package
12882 (name "python-flask-basicauth")
12883 (version "0.2.0")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "Flask-BasicAuth" version))
12888 (sha256
12889 (base32
12890 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12891 (build-system python-build-system)
12892 (propagated-inputs
12893 `(("python-flask" ,python-flask)))
12894 (home-page
12895 "https://github.com/jpvanhal/flask-basicauth")
12896 (synopsis
12897 "HTTP basic access authentication for Flask")
12898 (description
12899 "This package provides HTTP basic access authentication for Flask.")
12900 (license license:bsd-3)))
903276d0
DM
12901
12902(define-public python-flask-sqlalchemy
12903 (package
12904 (name "python-flask-sqlalchemy")
12905 (version "2.1")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "Flask-SQLAlchemy" version))
12910 (sha256
12911 (base32
12912 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12913 (build-system python-build-system)
12914 (propagated-inputs
12915 `(("python-flask" ,python-flask)
12916 ("python-sqlalchemy" ,python-sqlalchemy)))
12917 (home-page
7bf837fd 12918 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
12919 (synopsis
12920 "Module adding SQLAlchemy support to your Flask application")
12921 (description
12922 "This package adds SQLAlchemy support to your Flask application.")
12923 (license license:bsd-3)))
329b4b3b
LF
12924
12925(define-public python-pyev
12926 (package
12927 (name "python-pyev")
12928 (version "0.9.0")
12929 (source
12930 (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "pyev" version))
12933 (sha256
12934 (base32
12935 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12936 (build-system python-build-system)
12937 (arguments
12938 `(#:tests? #f ; no test suite
12939 #:phases
12940 (modify-phases %standard-phases
12941 (add-after 'unpack 'patch
12942 (lambda* (#:key inputs #:allow-other-keys)
12943 (let ((libev (string-append (assoc-ref inputs "libev")
12944 "/lib/libev.so.4")))
12945 (substitute* "setup.py"
12946 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12947 (string-append "libev_dll_name = \"" libev "\"")))))))))
12948 (inputs
12949 `(("libev" ,libev)))
12950 (home-page "http://pythonhosted.org/pyev/")
12951 (synopsis "Python libev interface")
12952 (description "Pyev provides a Python interface to libev.")
12953 (license license:gpl3)))
12954
12955(define-public python2-pyev
12956 (package-with-python2 python-pyev))
45b4f127
DM
12957
12958(define-public python-imagesize
12959 (package
12960 (name "python-imagesize")
12961 (version "0.7.1")
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "imagesize" version))
12966 (sha256
12967 (base32
12968 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12969 (build-system python-build-system)
9422c98a
LF
12970 (arguments
12971 '(;; Test files are not distributed on PyPi:
12972 ;; https://github.com/shibukawa/imagesize_py/issues/7
12973 #:tests? #f))
45b4f127
DM
12974 (home-page "https://github.com/shibukawa/imagesize_py")
12975 (synopsis "Gets image size of files in variaous formats in Python")
12976 (description
12977 "This package allows determination of image size from
12978PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12979 (license license:expat)))
45b4f127
DM
12980
12981(define-public python2-imagesize
f210e944 12982 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12983
12984(define-public python-axolotl-curve25519
12985 (package
12986 (name "python-axolotl-curve25519")
12987 (version "0.1")
12988 (source
12989 (origin
12990 (method git-fetch)
12991 (uri (git-reference
12992 (url "git://github.com/tgalal/python-axolotl-curve25519")
12993 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12994 (file-name (string-append name "-" version "-checkout"))
12995 (sha256
12996 (base32
12997 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12998 (build-system python-build-system)
12999 (arguments
13000 `(;; Prevent creation of the egg. This works around
13001 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13002 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13003 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13004 (synopsis "Python wrapper for curve25519 library")
13005 (description "This is a python wrapper for the curve25519 library
13006with ed25519 signatures. The C code was pulled from
13007libaxolotl-android. At the moment this wrapper is meant for use by
13008python-axolotl.")
13009 (license (list license:gpl3 ; Most files
683cdbf5 13010 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13011
13012(define-public python2-axolotl-curve25519
13013 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13014
13015(define-public python-axolotl
13016 (package
13017 (name "python-axolotl")
13018 (version "0.1.35")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (string-append
13023 "https://github.com/tgalal/python-axolotl/archive/"
13024 version ".tar.gz"))
13025 (file-name (string-append name "-" version ".tar.gz"))
13026 (sha256
13027 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13028 (build-system python-build-system)
13029 (arguments
13030 `(#:phases
13031 (modify-phases %standard-phases
13032 ;; Don't install tests
13033 (add-before 'install 'remove-tests
13034 (lambda _
13035 (for-each delete-file-recursively
13036 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13037 #t)))))
06ff0837
AI
13038 (propagated-inputs
13039 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13040 ("python-dateutil" ,python-dateutil)
13041 ("python-protobuf" ,python-protobuf)
13042 ("python-pycrypto" ,python-pycrypto)))
13043 (home-page "https://github.com/tgalal/python-axolotl")
13044 (synopsis "Python port of libaxolotl-android")
13045 (description "This is a python port of libaxolotl-android. This
13046is a ratcheting forward secrecy protocol that works in synchronous and
13047asynchronous messaging environments.")
13048 (license license:gpl3)))
13049
13050(define-public python2-axolotl
13051 (package-with-python2 python-axolotl))
e2fca490
DM
13052
13053(define-public python-termstyle
13054 (package
13055 (name "python-termstyle")
13056 (version "0.1.11")
13057 (source
13058 (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "termstyle" version))
13061 (sha256
13062 (base32
13063 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13064 (build-system python-build-system)
7917a135
MB
13065 (arguments
13066 '(#:phases
13067 (modify-phases %standard-phases
13068 (replace 'check
13069 (lambda _
13070 (zero? (system* "python" "test3.py")))))))
7bf837fd 13071 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13072 (synopsis "Console text coloring for Python")
13073 (description "This package provides console text coloring for Python.")
13074 (license license:bsd-3)))
1e6112d8
DM
13075
13076(define-public python-rednose
13077 (package
13078 (name "python-rednose")
13079 (version "1.2.1")
13080 (source
13081 (origin
13082 (method url-fetch)
13083 (uri (pypi-uri "rednose" version))
13084 (sha256
13085 (base32
13086 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13087 (build-system python-build-system)
13088 (arguments
13089 `(#:phases
13090 (modify-phases %standard-phases
13091 (add-after 'unpack 'fix-deps
13092 (lambda _
13093 ;; See <https://github.com/JBKahn/rednose/issues/12>
13094 (substitute* "setup.py"
13095 (("python-termstyle") "termstyle"))
13096 #t)))))
13097 (propagated-inputs
13098 `(("python-colorama" ,python-colorama)
13099 ("python-termstyle" ,python-termstyle)))
13100 (native-inputs
13101 `(("python-six" ,python-six)
13102 ("python-nose" ,python-nose)))
13103 (home-page "https://github.com/JBKahn/rednose")
13104 (synopsis "Colored output for Python nosetests")
13105 (description "This package provides colored output for the
13106@command{nosetests} command of the Python Nose unit test framework.")
13107 (license license:bsd-3)))
0a7f17f0
DM
13108
13109(define-public python-flask-restplus
13110 (package
13111 (name "python-flask-restplus")
13112 (version "0.9.2")
13113 (source
13114 (origin
13115 (method url-fetch)
13116 (uri (pypi-uri "flask-restplus" version))
13117 (sha256
13118 (base32
13119 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13120 (build-system python-build-system)
59f74825
MB
13121 (arguments
13122 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13123 ;; #:phases
13124 ;; (modify-phases %standard-phases
13125 ;; (replace 'check
13126 ;; (lambda _
13127 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13128 (propagated-inputs
13129 `(("python-aniso8601" ,python-aniso8601)
13130 ("python-flask" ,python-flask)
13131 ("python-jsonschema" ,python-jsonschema)
13132 ("python-pytz" ,python-pytz)
13133 ("python-six" ,python-six)))
13134 (native-inputs
13135 `(("python-tzlocal" ,python-tzlocal)
13136 ("python-blinker" ,python-blinker)
13137 ("python-nose" ,python-nose)
13138 ("python-rednose" ,python-rednose)))
13139 (home-page "https://github.com/noirbizarre/flask-restplus")
13140 (synopsis "Framework for documented API development with Flask")
13141 (description "This package provides a framework for API development with
13142the Flask web framework in Python. It is similar to package
13143@code{python-flask-restful} but supports the @code{python-swagger}
13144documentation builder.")
13145 (license license:expat)))
1ed21519
DM
13146
13147(define-public python-sadisplay
13148 (package
13149 (name "python-sadisplay")
13150 (version "0.4.6")
13151 (source
13152 (origin
13153 (method url-fetch)
13154 (uri (pypi-uri "sadisplay" version))
13155 (sha256
13156 (base32
13157 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13158 (build-system python-build-system)
13159 (propagated-inputs
13160 `(("python-sqlalchemy" ,python-sqlalchemy)))
13161 (native-inputs
13162 `(("python-nose" ,python-nose)))
13163 (home-page "https://bitbucket.org/estin/sadisplay")
13164 (synopsis "SQLAlchemy schema displayer")
13165 (description "This package provides a program to build Entity
13166Relationship diagrams from a SQLAlchemy model (or directly from the
13167database).")
13168 (license license:bsd-3)))
13169
13170(define-public python2-sadisplay
13171 (package-with-python2 python-sadisplay))
444a79b6
DM
13172
13173(define-public python-flask-restful-swagger
13174 (package
13175 (name "python-flask-restful-swagger")
13176 (version "0.19")
13177 (source
13178 (origin
13179 (method url-fetch)
13180 (uri (pypi-uri "flask-restful-swagger" version))
13181 (sha256
13182 (base32
13183 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13184 (build-system python-build-system)
13185 (propagated-inputs
13186 `(("python-flask-restful" ,python-flask-restful)))
13187 (home-page "https://github.com/rantav/flask-restful-swagger")
13188 (synopsis "Extract Swagger specs from Flask-Restful projects")
13189 (description "This package lets you extract Swagger API documentation
13190specs from your Flask-Restful projects.")
13191 (license license:expat)))
13192
13193(define-public python2-flask-restful-swagger
13194 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13195
13196(define-public python-argcomplete
13197 (package
13198 (name "python-argcomplete")
13199 (version "1.7.0")
13200 (source
13201 (origin
13202 (method url-fetch)
13203 (uri (pypi-uri "argcomplete" version))
13204 (sha256
13205 (base32
13206 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13207 (build-system python-build-system)
80ce42bd
MB
13208 (native-inputs
13209 `(("python-pexpect" ,python-pexpect)
13210 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13211 (home-page "https://github.com/kislyuk/argcomplete")
13212 (synopsis "Shell tab completion for Python argparse")
13213 (description "argcomplete provides extensible command line tab completion
13214of arguments and options for Python scripts using @code{argparse}. It's
13215particularly useful for programs with many options or sub-parsers that can
13216dynamically suggest completions; for example, when browsing resources over the
13217network.")
13218 (license license:asl2.0)))
13219
13220(define-public python2-argcomplete
13221 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13222
13223(define-public python-xopen
13224 (package
13225 (name "python-xopen")
13226 (version "0.1.1")
13227 (source
13228 (origin
13229 (method url-fetch)
13230 (uri (pypi-uri "xopen" version))
13231 (sha256
13232 (base32
13233 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13234 (file-name (string-append name "-" version ".tar.gz"))))
13235 (build-system python-build-system)
13236 (home-page "https://github.com/marcelm/xopen/")
13237 (synopsis "Open compressed files transparently")
13238 (description "This module provides an @code{xopen} function that works like
13239Python's built-in @code{open} function, but can also deal with compressed files.
13240Supported compression formats are gzip, bzip2 and, xz, and are automatically
13241recognized by their file extensions. The focus is on being as efficient as
13242possible on all supported Python versions.")
13243 (license license:expat)))
13244
13245(define-public python2-xopen
13246 (package-with-python2 python-xopen))
8d67610b
DM
13247
13248(define-public python2-cheetah
13249 (package
13250 (name "python2-cheetah")
13251 (version "2.4.4")
13252 (source
13253 (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "Cheetah" version))
13256 (sha256
13257 (base32
13258 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13259 (build-system python-build-system)
13260 (arguments
13261 `(#:python ,python-2))
13262 (propagated-inputs
13263 `(("python2-markdown" ,python2-markdown)))
13264 (home-page "https://pythonhosted.org/Cheetah/")
13265 (synopsis "Template engine")
13266 (description "Cheetah is a text-based template engine and Python code
13267generator.
13268
13269Cheetah can be used as a standalone templating utility or referenced as
13270a library from other Python applications. It has many potential uses,
13271but web developers looking for a viable alternative to ASP, JSP, PHP and
13272PSP are expected to be its principle user group.
13273
13274Features:
13275@enumerate
13276@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13277 text-based format.
13278@item Cleanly separates content, graphic design, and program code.
13279@item Blends the power and flexibility of Python with a simple template language
13280 that non-programmers can understand.
13281@item Gives template writers full access to any Python data structure, module,
13282 function, object, or method in their templates.
13283@item Makes code reuse easy by providing an object-orientated interface to
13284 templates that is accessible from Python code or other Cheetah templates.
13285 One template can subclass another and selectively reimplement sections of it.
13286@item Provides a simple, yet powerful, caching mechanism that can dramatically
13287 improve the performance of a dynamic website.
13288@item Compiles templates into optimized, yet readable, Python code.
13289@end enumerate")
13290 (license (license:x11-style "file://LICENSE"))))
916aafa4 13291
d83d8722
DM
13292(define-public python-dulwich
13293 (package
13294 (name "python-dulwich")
13295 (version "0.16.3")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (list (string-append "https://www.dulwich.io/releases/"
13300 "dulwich-" version ".tar.gz")
13301 (pypi-uri "dulwich" version)))
13302 (sha256
13303 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13304 (build-system python-build-system)
13305 (arguments
13306 `(#:phases
13307 (modify-phases %standard-phases
13308 (add-before 'check 'fix-tests
13309 (lambda* (#:key inputs #:allow-other-keys)
13310 ;; The tests use Popen with a custom environment which doesn't
13311 ;; include PATH.
13312 (substitute* "dulwich/tests/compat/utils.py"
13313 (("'git'") (string-append "'"
13314 (which "git")
13315 "'")))
13316 (substitute* '("dulwich/tests/test_repository.py"
13317 "dulwich/tests/test_hooks.py")
13318 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13319 (setenv "TEST_RUNNER" "unittest")
13320 (setenv "PYTHONHASHSEED" "random")
13321 #t)))))
13322 (propagated-inputs
13323 `(("python-fastimport" ,python-fastimport)))
13324 (native-inputs
13325 `(("python-mock" ,python-mock)
13326 ("python-geventhttpclient" ,python-geventhttpclient)
13327 ("git" ,git)))
13328 (home-page "https://www.dulwich.io/")
13329 (synopsis "Git implementation in Python")
13330 (description "Dulwich is an implementation of the Git file formats and
13331protocols written in pure Python.")
13332 ;; Can be used with either license.
13333 (license (list license:asl2.0 license:gpl2+))))
13334
13335(define-public python2-dulwich
13336 (package-with-python2 python-dulwich))
424b1ae7 13337
916aafa4
CZ
13338(define-public python-pbkdf2
13339 (package
13340 (name "python-pbkdf2")
13341 (version "1.3")
13342 (source
13343 (origin
13344 (method url-fetch)
13345 (uri (pypi-uri "pbkdf2" version))
13346 (sha256
13347 (base32
13348 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13349 (build-system python-build-system)
fffcd8b8
MB
13350 (arguments
13351 '(#:phases
13352 (modify-phases %standard-phases
13353 (replace 'check
13354 (lambda _
13355 (setenv "PYTHONPATH"
13356 (string-append (getcwd) "/build/lib:"
13357 (getenv "PYTHONPATH")))
13358 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13359 (propagated-inputs
13360 `(("python-pycrypto" ,python-pycrypto))) ; optional
13361 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13362 (synopsis "Password-based key derivation")
13363 (description "This module implements the password-based key derivation
13364function, PBKDF2, specified in RSA PKCS#5 v2.0.
13365
13366PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13367is part of the RSA Public Key Cryptography Standards series. The provided
13368implementation takes a password or a passphrase and a salt value (and
13369optionally a iteration count, a digest module, and a MAC module) and provides
13370a file-like object from which an arbitrarly-sized key can be read.")
13371 (license license:expat)))
13372
13373(define-public python2-pbkdf2
13374 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13375
13376(define-public python-qrcode
13377 (package
13378 (name "python-qrcode")
13379 (version "5.3")
13380 (source
13381 (origin
13382 (method url-fetch)
13383 (uri (pypi-uri "qrcode" version))
13384 (sha256
13385 (base32
13386 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13387 (build-system python-build-system)
6925cd78
MB
13388 (arguments
13389 ;; FIXME: Tests require packaging 'pymaging'.
13390 '(#:tests? #f))
cba84a38
CZ
13391 (propagated-inputs
13392 `(("python-lxml" ,python-lxml) ; for SVG output
13393 ("python-pillow" ,python-pillow) ; for PNG output
13394 ("python-six" ,python-six)))
13395 (home-page "https://github.com/lincolnloop/python-qrcode")
13396 (synopsis "QR Code image generator")
13397 (description "This package provides a pure Python QR Code generator
13398module. It uses the Python Imaging Library (PIL) to allow for the generation
13399of QR Codes.
13400
13401In addition this package provides a command line tool to generate QR codes and
13402either write these QR codes to a file or do the output as ascii art at the
13403console.")
13404 (license license:bsd-3)))
13405
13406(define-public python2-qrcode
13407 (package-with-python2 python-qrcode))
af7caada
CZ
13408
13409;; SlowAES isn't compatible with Python 3.
13410(define-public python2-slowaes
13411 (package
13412 (name "python2-slowaes")
13413 (version "0.1a1")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "slowaes" version))
13418 (sha256
13419 (base32
13420 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13421 (build-system python-build-system)
13422 (arguments `(#:python ,python-2))
13423 (home-page "http://code.google.com/p/slowaes/")
13424 (synopsis "Implementation of AES in Python")
13425 (description "This package contains an implementation of AES in Python.
13426This implementation is slow (hence the project name) but still useful when
13427faster ones are not available.")
13428 (license license:asl2.0)))
1a917fc9
MFM
13429
13430(define-public python-rst2ansi
13431 (package
13432 (name "python-rst2ansi")
13433 (version "0.1.5")
13434 (source
13435 (origin
13436 (method url-fetch)
13437 (uri (pypi-uri "rst2ansi" version))
13438 (sha256
13439 (base32
13440 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13441 (build-system python-build-system)
13442 (propagated-inputs
13443 `(("python-docutils" ,python-docutils)))
13444 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13445 (synopsis "Convert RST to ANSI-decorated console output")
13446 (description
13447 "Python module dedicated to rendering RST (reStructuredText) documents
13448to ansi-escaped strings suitable for display in a terminal.")
13449 (license license:expat)))
2f4623db
MFM
13450
13451(define-public python-ddt
13452 (package
13453 (name "python-ddt")
13454 (version "1.1.1")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "ddt" version))
13459 (sha256
13460 (base32
13461 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13462 (build-system python-build-system)
13463 (native-inputs
13464 `(("python-mock" ,python-mock)
13465 ("python-nose" ,python-nose)))
13466 (propagated-inputs
13467 `(("python-six" ,python-six)
13468 ("python-pyyaml" ,python-pyyaml)))
13469 (home-page "https://github.com/txels/ddt")
13470 (synopsis "Data-Driven Tests")
13471 (description
13472 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13473it with different test data, and make it appear as multiple test cases.")
13474 (license license:expat)))
13475
13476(define-public python2-ddt
13477 (package-with-python2 python-ddt))
2299b137
MFM
13478
13479(define-public python-pycosat
13480 (package
13481 (name "python-pycosat")
13482 (version "0.6.1")
13483 (source
13484 (origin
13485 (method url-fetch)
13486 (uri (pypi-uri "pycosat" version))
13487 (sha256
13488 (base32
13489 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13490 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13491 (build-system python-build-system)
13492 (home-page "https://github.com/ContinuumIO/pycosat")
13493 (synopsis "Bindings to picosat (a SAT solver)")
13494 (description
13495 "This package provides efficient Python bindings to @code{picosat} on
13496the C level. When importing pycosat, the @code{picosat} solver becomes part
13497of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13498Problem} (SAT) solver.")
13499 (license license:expat)))
13500
13501(define-public python2-pycosat
13502 (package-with-python2 python-pycosat))
8fd68504
MFM
13503
13504(define-public python2-ruamel.ordereddict
13505 (package
13506 (name "python2-ruamel.ordereddict")
13507 (version "0.4.9")
13508 (source
13509 (origin
13510 (method url-fetch)
13511 (uri (pypi-uri "ruamel.ordereddict" version))
13512 (sha256
13513 (base32
13514 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13515 (build-system python-build-system)
13516 (arguments
13517 `(#:python ,python-2
13518 #:phases
13519 (modify-phases %standard-phases
13520 (delete 'check)
13521 (add-after 'install 'check
13522 (lambda* (#:key inputs outputs #:allow-other-keys)
13523 (add-installed-pythonpath inputs outputs)
13524 (zero? (system* "python" "test/testordereddict.py")))))))
13525 (home-page "https://bitbucket.org/ruamel/ordereddict")
13526 (synopsis "Version of dict that keeps keys in insertion order")
13527 (description
13528 "This is an implementation of an ordered dictionary with @dfn{Key
13529Insertion Order} (KIO: updates of values do not affect the position of the
13530key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13531removed and put at the back). The standard library module @code{OrderedDict},
13532implemented later, implements a subset of @code{ordereddict} functionality.
13533Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13534Order} (KSO, no sorting function can be specified, but a transform can be
13535specified to apply on the key before comparison (e.g. @code{string.lower})).")
13536 (license license:expat)))
d8768e31
EB
13537
13538(define-public python-pypeg2
13539 (package
13540 (name "python-pypeg2")
13541 (version "2.15.2")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "pyPEG2" version))
13546 (sha256
13547 (base32
13548 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13549 (build-system python-build-system)
13550 (propagated-inputs `(("python-lxml" ,python-lxml)))
13551 (arguments
13552 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13553 '(#:tests? #f))
13554 (home-page "https://fdik.org/pyPEG/")
13555 (synopsis "Parsering Expression Grammars in Python")
13556 (description "PyPEG is an intrinsic parser interpreter framework for
13557Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13558parse many formal languages.")
13559 (license license:gpl2)))
33e9490c
AI
13560
13561(define-public python2-cliapp
13562 (package
13563 (name "python2-cliapp")
13564 (version "1.20160724")
13565 (source
13566 (origin
13567 (method url-fetch)
13568 (uri (string-append
13569 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13570 version ".tar.gz"))
13571 (sha256
13572 (base32
13573 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13574 (build-system python-build-system)
13575 (arguments
13576 `(#:python ,python-2))
13577 (propagated-inputs
13578 `(("python2-pyaml" ,python2-pyaml)))
13579 (home-page "https://liw.fi/cliapp/")
13580 (synopsis "Python framework for command line programs")
13581 (description "@code{python2-cliapp} is a python framework for
13582command line programs. It contains the typical stuff such programs
13583need to do, such as parsing the command line for options, and
13584iterating over input files.")
13585 (license license:gpl2+)))
13586
77e99411
AI
13587(define-public python2-ttystatus
13588 (package
13589 (name "python2-ttystatus")
13590 (version "0.32")
13591 (source
13592 (origin
13593 (method url-fetch)
13594 (uri (string-append
13595 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13596 version ".tar.gz"))
13597 (sha256
13598 (base32
13599 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13600 (build-system python-build-system)
13601 (arguments
13602 `(#:python ,python-2))
13603 (home-page "https://liw.fi/ttystatus/")
13604 (synopsis "Python library for showing progress reporting and
13605status updates on terminals")
13606 (description "@code{python2-ttystatus} is a python library for
13607showing progress reporting and status updates on terminals, for
13608command line programs. Output is automatically adapted to the width
13609of the terminal: truncated if it does not fit, and resized if the
13610terminal size changes.")
13611 (license license:gpl3+)))
c220f0b4
AI
13612
13613(define-public python2-tracing
13614 (package
13615 (name "python2-tracing")
13616 (version "0.10")
13617 (source
13618 (origin
13619 (method url-fetch)
13620 (uri (string-append
13621 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13622 version ".tar.gz"))
13623 (sha256
13624 (base32
13625 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13626 (build-system python-build-system)
13627 (arguments
13628 `(#:python ,python-2))
13629 (home-page "https://liw.fi/tracing/")
13630 (synopsis "Python debug logging helper")
13631 (description "@code{python2-tracing} is a python library for
13632logging debug messages. It provides a way to turn debugging messages
13633on and off, based on the filename they occur in. It is much faster
13634than using @code{logging.Filter} to accomplish the same thing, which
13635matters when code is run in production mode. The actual logging still
13636happens using the @code{logging} library.")
13637 (license license:gpl3+)))
b6b2ca5d
AI
13638
13639(define-public python2-larch
13640 (package
13641 (name "python2-larch")
13642 (version "1.20151025")
13643 (source
13644 (origin
13645 (method url-fetch)
13646 (uri (string-append
13647 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13648 version ".tar.gz"))
13649 (sha256
13650 (base32
13651 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13652 (build-system python-build-system)
13653 (arguments
13654 `(#:python ,python-2))
13655 (propagated-inputs
13656 `(("python2-tracing" ,python2-tracing)))
13657 (home-page "https://liw.fi/larch/")
13658 (synopsis "Python copy-on-write B-tree library")
13659 (description "@code{python2-larch} is an implementation of
13660particular kind of B-tree, based on research by Ohad Rodeh. See
13661@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13662on the data structure.
13663
13664The distinctive feature of this B-tree is that a node is never
13665(conceptually) modified. Instead, all updates are done by
13666copy-on-write. This makes it easy to clone a tree, and modify only the
13667clone, while other processes access the original tree.")
13668 (license license:gpl3+)))
35db2d3c
AP
13669
13670(define-public python-htmlmin
13671 (package
13672 (name "python-htmlmin")
13673 (version "0.1.10")
13674 (source
13675 (origin
13676 (method url-fetch)
13677 (uri (pypi-uri "htmlmin" version))
13678 (sha256
13679 (base32
13680 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13681 (arguments
13682 `(#:tests? #f)) ;htmlmin has no tests
13683 (build-system python-build-system)
13684 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13685 (synopsis "HTML minifier")
13686 (description "@code{htmlmin} is an HTML minifier that just works.
13687It comes with safe defaults and easily configurable options.")
13688 (license license:bsd-3)))
13689
13690(define-public python2-htmlmin
13691 (package-with-python2 python-htmlmin))
78c55663
AP
13692
13693(define-public python-flask-htmlmin
13694 (package
13695 (name "python-flask-htmlmin")
13696 (version "1.2")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "Flask-HTMLmin" version))
13701 (sha256
13702 (base32
13703 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13704 (propagated-inputs
13705 `(("python-flask" ,python-flask)
13706 ("python-htmlmin" ,python-htmlmin)))
13707 (build-system python-build-system)
13708 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13709 (synopsis "HTML response minifier for Flask")
13710 (description
13711 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13712 (license license:bsd-3)))
13713
13714(define-public python2-flask-htmlmin
13715 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
13716
13717(define-public python-flask-login
13718 (package
13719 (name "python-flask-login")
13720 (version "0.4.0")
13721 (source
13722 (origin
13723 (method url-fetch)
13724 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13725 version ".tar.gz"))
13726 (file-name (string-append name "-" version ".tar.gz"))
13727 (sha256
13728 (base32
13729 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13730 (arguments
13731 ;; Tests fail PEP8 compliance. See:
13732 ;; https://github.com/maxcountryman/flask-login/issues/340
13733 `(#:tests? #f))
13734 (build-system python-build-system)
13735 (home-page "https://github.com/maxcountryman/flask-login")
13736 (synopsis "User session management for Flask")
13737 (description
13738 "@code{Flask-Login} provides user session management for Flask. It
13739handles the common tasks of logging in, logging out, and remembering your
13740users' sessions over extended periods of time.")
13741 (license license:expat)))
13742
13743(define-public python2-flask-login
13744 (package-with-python2 python-flask-login))
d5ef113c
AI
13745
13746(define-public python-astroid
13747 (package
13748 (name "python-astroid")
13749 (version "1.4.9")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (string-append
13754 "https://github.com/PyCQA/astroid/archive/astroid-"
13755 version ".tar.gz"))
13756 (sha256
13757 (base32
13758 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13759 (build-system python-build-system)
13760 (propagated-inputs
13761 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13762 ("python-six" ,python-six)
13763 ("python-wrapt" ,python-wrapt)))
13764 (arguments
13765 `(#:phases
13766 (modify-phases %standard-phases
13767 (replace 'check
13768 (lambda _
13769 (zero? (system* "python" "-m" "unittest" "discover"
13770 "-p" "unittest*.py")))))))
13771 (home-page "https://github.com/PyCQA/astroid")
13772 (synopsis "Common base representation of python source code for pylint and
13773other projects")
13774 (description "@code{python-astroid} provides a common base representation
13775of python source code for projects such as pychecker, pyreverse, pylint, etc.
13776
13777It provides a compatible representation which comes from the _ast module. It
13778rebuilds the tree generated by the builtin _ast module by recursively walking
13779down the AST and building an extended ast. The new node classes have
13780additional methods and attributes for different usages. They include some
13781support for static inference and local name scopes. Furthermore, astroid
13782builds partial trees by inspecting living objects.")
13783 (license license:lgpl2.1+)))
13784
13785(define-public python2-astroid
13786 (package-with-python2 python-astroid))
6ba0af79
AI
13787
13788(define-public python-isort
13789 (package
13790 (name "python-isort")
13791 (version "4.2.5")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (string-append
13796 "https://github.com/timothycrosley/isort/archive/"
13797 version ".tar.gz"))
13798 (file-name (string-append name "-" version ".tar.gz"))
13799 (sha256
13800 (base32
13801 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13802 (build-system python-build-system)
13803 (native-inputs
13804 `(("python-mock" ,python-mock)
13805 ("python-pytest" ,python-pytest)))
13806 (home-page "https://github.com/timothycrosley/isort")
13807 (synopsis "Python utility/library to sort python imports")
13808 (description "@code{python-isort} is a python utility/library to sort
13809imports alphabetically, and automatically separated into sections. It
13810provides a command line utility, a python library and plugins for various
13811editors.")
13812 (license license:expat)))
13813
13814(define-public python2-isort
13815 (package-with-python2 python-isort))
965a083e
AI
13816
13817(define-public python2-backports-functools-lru-cache
13818 (package
13819 (name "python2-backports-functools-lru-cache")
13820 (version "1.3")
13821 (source
13822 (origin
13823 (method url-fetch)
13824 ;; only the pypi tarballs contain the necessary metadata
13825 (uri (pypi-uri "backports.functools_lru_cache" version))
13826 (sha256
13827 (base32
13828 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13829 (build-system python-build-system)
13830 (native-inputs
13831 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13832 (arguments
13833 `(#:python ,python-2))
13834 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13835 (synopsis "Backport of functools.lru_cache from Python 3.3")
13836 (description "@code{python2-backports-functools-lru-cache} is a backport
13837of @code{functools.lru_cache} from python 3.3.")
13838 (license license:expat)))
23db3fc6
AI
13839
13840(define-public python-configparser
13841 (package
13842 (name "python-configparser")
13843 (version "3.5.0")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (string-append
13848 "https://bitbucket.org/ambv/configparser/get/"
13849 version ".tar.bz2"))
13850 (file-name (string-append name "-" version ".tar.gz"))
13851 (sha256
13852 (base32
13853 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13854 (build-system python-build-system)
13855 (home-page "http://docs.python.org/py3k/library/configparser.html")
13856 (synopsis "Backport of configparser from python 3.5")
13857 (description "@code{python-configparser} is a backport of
13858@code{configparser} from Python 3.5 so that it can be used directly
13859in other versions.")
13860 (license license:expat)))
13861
13862(define-public python2-configparser
13863 (package-with-python2 python-configparser))
61550ded
AI
13864
13865(define-public python2-coverage-test-runner
13866 (package
13867 (name "python2-coverage-test-runner")
13868 (version "1.11")
13869 (source
13870 (origin
13871 (method url-fetch)
13872 (uri (string-append
13873 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13874 "coverage-test-runner/snapshot/coverage-test-runner-"
13875 version ".tar.gz"))
13876 (sha256
13877 (base32
13878 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13879 (build-system python-build-system)
13880 (arguments
13881 `(#:python ,python-2
13882 #:phases
13883 (modify-phases %standard-phases
13884 (replace 'check
13885 (lambda _
13886 (zero? (system* "./testrun")))))))
13887 (propagated-inputs
13888 `(("python2-coverage" ,python2-coverage)))
13889 (home-page "https://liw.fi/coverage-test-runner/")
13890 (synopsis "Python module for running unit tests")
13891 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 13892unit tests and failing them if the unit test module does not exercise all
61550ded
AI
13893statements in the module it tests.")
13894 (license license:gpl3+)))
315944a3
AI
13895
13896(define-public python-pylint
13897 (package
13898 (name "python-pylint")
13899 (version "1.6.5")
13900 (source
13901 (origin
13902 (method url-fetch)
13903 (uri (string-append
13904 "https://github.com/PyCQA/pylint/archive/pylint-"
13905 version ".tar.gz"))
13906 (sha256
13907 (base32
13908 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13909 (build-system python-build-system)
13910 (native-inputs
13911 `(("python-tox" ,python-tox)))
13912 (propagated-inputs
13913 `(("python-astroid" ,python-astroid)
13914 ("python-isort" ,python-isort)
13915 ("python-mccabe" ,python-mccabe)
13916 ("python-six" ,python-six)))
13917 (arguments
13918 `(#:phases
13919 (modify-phases %standard-phases
13920 (replace 'check
13921 (lambda _
13922 ;; Somehow, tests for python2-pylint
13923 ;; fail if run from the build directory
13924 (let ((work "/tmp/work"))
13925 (mkdir-p work)
13926 (setenv "PYTHONPATH"
13927 (string-append (getenv "PYTHONPATH") ":" work))
13928 (copy-recursively "." work)
13929 (with-directory-excursion "/tmp"
13930 (zero? (system* "python" "-m" "unittest" "discover"
13931 "-s" (string-append work "/pylint/test")
13932 "-p" "*test_*.py")))))))))
13933 (home-page "https://github.com/PyCQA/pylint")
13934 (synopsis "Python source code analyzer which looks for coding standard
13935errors")
13936 (description "Pylint is a Python source code analyzer which looks
13937for programming errors, helps enforcing a coding standard and sniffs
13938for some code smells (as defined in Martin Fowler's Refactoring book).
13939
13940Pylint has many rules enabled by default, way too much to silence them
13941all on a minimally sized program. It's highly configurable and handle
13942pragmas to control it from within your code. Additionally, it is
13943possible to write plugins to add your own checks.")
13944 (license license:gpl2+)))
13945
13946(define-public python2-pylint
13947 (let ((pylint (package-with-python2 python-pylint)))
13948 (package (inherit pylint)
13949 (propagated-inputs
13950 `(("python2-backports-functools-lru-cache"
13951 ,python2-backports-functools-lru-cache)
13952 ("python2-configparser" ,python2-configparser)
13953 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
13954
13955(define-public python-paramunittest
13956 (package
13957 (name "python-paramunittest")
13958 (version "0.2")
13959 (source
13960 (origin
13961 (method url-fetch)
13962 (uri (pypi-uri "ParamUnittest" version))
13963 (sha256
13964 (base32
13965 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
13966 (build-system python-build-system)
13967 (home-page
13968 "https://github.com/rik0/ParamUnittest")
13969 (synopsis
13970 "Simple extension to have parametrized unit tests")
13971 (description
13972 "This package allows to create parametrized unit-tests that work with the standard
13973unittest package. A parametrized test case is automatically converted to multiple test
13974cases. Since they are TestCase subclasses, they work with other test suites that
13975recognize TestCases.")
13976 (license license:bsd-2)))
13977
13978(define-public python2-python-paramunittest
13979 (package-with-python2 python-paramunittest))
eec21d4b
MFM
13980
13981(define-public python-mando
13982 (package
13983 (name "python-mando")
13984 (version "0.5")
13985 (source
13986 (origin
13987 (method url-fetch)
13988 (uri (pypi-uri "mando" version))
13989 (sha256
13990 (base32
13991 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
13992 (build-system python-build-system)
13993 (propagated-inputs
13994 `(("python-rst2ansi" ,python-rst2ansi)))
13995 (native-inputs
13996 `(("python-sphinx" ,python-sphinx-1.5.3)
13997 ("python-paramunittest" ,python-paramunittest)))
13998 (home-page "https://mando.readthedocs.org/")
13999 (synopsis
14000 "Wrapper around argparse, allowing creation of complete CLI applications")
14001 (description
14002 "This package is a wrapper around argparse, allowing you to write complete CLI
14003 applications in seconds while maintaining all the flexibility.")
14004 (license license:expat)))
14005
14006(define-public python2-mando
14007 (package-with-python2 python-mando))
b98d4ec0
MFM
14008
14009(define-public python-mando-0.3.1
14010 ;; python-radon (version 1.5.0) has a requirement
14011 ;; for mando<0.4,>=0.3
14012 (package
14013 (inherit python-mando)
14014 (name "python-mando")
14015 (version "0.3.1")
14016 (source
14017 (origin
14018 (method url-fetch)
14019 (uri (string-append "https://github.com/rubik/mando/archive/v"
14020 version
14021 ".tar.gz"))
14022 (sha256
14023 (base32
14024 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14025
14026(define-public python-fudge
14027 (package
14028 (name "python-fudge")
14029 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14030 ;; package, which is currently the only use of this package.
14031 (version "0.9.6")
14032 (source
14033 (origin
14034 (method url-fetch)
14035 (uri (pypi-uri "fudge" version))
14036 (sha256
14037 (base32
14038 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14039 (build-system python-build-system)
14040 (arguments
14041 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14042 (home-page "https://github.com/fudge-py/fudge")
14043 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14044 (description
14045 "Fudge is a Python module for using fake objects (mocks and stubs) to
14046test real ones.
14047
14048In readable Python code, you declare the methods available on your fake object
14049and how they should be called. Then you inject that into your application and
14050start testing. This declarative approach means you don’t have to record and
14051playback actions and you don’t have to inspect your fakes after running code.
14052If the fake object was used incorrectly then you’ll see an informative
14053exception message with a traceback that points to the culprit.")
14054 (license license:expat)))
14055
14056(define-public python2-fudge
14057 (package-with-python2 python-fudge))
f3f8d159
DM
14058
14059(define-public python-oauth2client
14060 (package
14061 (name "python-oauth2client")
14062 (version "4.0.0")
14063 (source
14064 (origin
14065 (method url-fetch)
14066 (uri (pypi-uri "oauth2client" version))
14067 (sha256
14068 (base32
14069 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14070 (build-system python-build-system)
14071 (arguments
14072 `(#:tests? #f))
14073 (propagated-inputs
14074 `(("python-httplib2" ,python-httplib2)
14075 ("python-pyasn1" ,python-pyasn1)
14076 ("python-pyasn1-modules" ,python-pyasn1-modules)
14077 ("python-rsa" ,python-rsa)
14078 ("python-six" ,python-six)))
14079 (home-page "http://github.com/google/oauth2client/")
14080 (synopsis "OAuth 2.0 client library")
14081 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14082library for Python")
14083 (license license:asl2.0)))
6e7302e9
DM
14084
14085(define-public python-flask-oidc
14086 (package
14087 (name "python-flask-oidc")
14088 (version "1.1.1")
14089 (source
14090 (origin
14091 (method url-fetch)
14092 (uri (pypi-uri "flask-oidc" version))
14093 (sha256
14094 (base32
14095 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14096 (build-system python-build-system)
14097 (propagated-inputs
14098 `(("python-flask" ,python-flask)
14099 ("python-itsdangerous" ,python-itsdangerous)
14100 ("python-oauth2client" ,python-oauth2client)
14101 ("python-six" ,python-six)))
14102 (native-inputs
14103 `(("python-nose" ,python-nose)
14104 ("python-mock" ,python-mock)))
14105 (home-page "https://github.com/puiterwijk/flask-oidc")
14106 (synopsis "OpenID Connect extension for Flask")
14107 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14108for Flask.")
14109 (license license:bsd-2)))
7e16478f
DM
14110
14111(define-public python-mwclient
14112 (package
14113 (name "python-mwclient")
14114 (version "0.8.4")
14115 (source
14116 (origin
14117 (method url-fetch)
14118 ;; The PyPI version wouldn't contain tests.
14119 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14120 "v" version ".tar.gz"))
14121 (sha256
14122 (base32
14123 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14124 (build-system python-build-system)
14125 (propagated-inputs
14126 `(("python-requests" ,python-requests)
14127 ("python-requests-oauthlib"
14128 ,python-requests-oauthlib)
14129 ("python-six" ,python-six)))
14130 (native-inputs
14131 `(("python-mock" ,python-mock)
14132 ("python-pytest" ,python-pytest)
14133 ("python-pytest-pep8" ,python-pytest-pep8)
14134 ("python-pytest-cache" ,python-pytest-cache)
14135 ("python-pytest-cov" ,python-pytest-cov)
14136 ("python-responses" ,python-responses)))
14137 (home-page "https://github.com/btongminh/mwclient")
14138 (synopsis "MediaWiki API client")
14139 (description "This package provides a MediaWiki API client.")
14140 (license license:expat)))
14141
14142(define-public python2-mwclient
14143 (package-with-python2 python-mwclient))