gnu: Add python-packaging.
[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>
ca0e62bf 30;;; Copyright © 2016, 2017 Stefan Reichör <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>
a5e8f597 41;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
3015d455 42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
a01b6da7
NK
43;;;
44;;; This file is part of GNU Guix.
45;;;
46;;; GNU Guix is free software; you can redistribute it and/or modify it
47;;; under the terms of the GNU General Public License as published by
48;;; the Free Software Foundation; either version 3 of the License, or (at
49;;; your option) any later version.
50;;;
51;;; GNU Guix is distributed in the hope that it will be useful, but
52;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54;;; GNU General Public License for more details.
55;;;
56;;; You should have received a copy of the GNU General Public License
57;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58
1ffa7090 59(define-module (gnu packages python)
3f641af0 60 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 61 #:use-module (gnu packages)
8e451885 62 #:use-module (gnu packages algebra)
d79a343b 63 #:use-module (gnu packages adns)
89b2e0b0 64 #:use-module (gnu packages attr)
d96034ed 65 #:use-module (gnu packages backup)
3969ca54 66 #:use-module (gnu packages bash)
1ffa7090 67 #:use-module (gnu packages compression)
4ed20663 68 #:use-module (gnu packages databases)
ddc63a56 69 #:use-module (gnu packages django)
5e1c9367 70 #:use-module (gnu packages file)
4ed20663 71 #:use-module (gnu packages fontutils)
4ed20663
AE
72 #:use-module (gnu packages gcc)
73 #:use-module (gnu packages ghostscript)
6eb7af2a 74 #:use-module (gnu packages gl)
4ed20663 75 #:use-module (gnu packages glib)
c227458a 76 #:use-module (gnu packages graphviz)
6eb7af2a 77 #:use-module (gnu packages gstreamer)
4ed20663 78 #:use-module (gnu packages gtk)
421a80a2 79 #:use-module (gnu packages icu4c)
c937562e 80 #:use-module (gnu packages image)
4ed20663 81 #:use-module (gnu packages imagemagick)
d79a343b 82 #:use-module (gnu packages libevent)
b10ab723 83 #:use-module (gnu packages libffi)
89b2e0b0 84 #:use-module (gnu packages linux)
ed118043 85 #:use-module (gnu packages man)
0da98533 86 #:use-module (gnu packages maths)
4ed20663 87 #:use-module (gnu packages multiprecision)
45203542 88 #:use-module (gnu packages networking)
be7134bf 89 #:use-module (gnu packages ncurses)
b04a52a6 90 #:use-module (gnu packages openstack)
d488d5d6 91 #:use-module (gnu packages password-utils)
c9b1b4f9 92 #:use-module (gnu packages pcre)
4ed20663 93 #:use-module (gnu packages perl)
b10ab723 94 #:use-module (gnu packages pkg-config)
06ff0837 95 #:use-module (gnu packages protobuf)
4535a93a 96 #:use-module (gnu packages qt)
4ed20663 97 #:use-module (gnu packages readline)
6eb7af2a 98 #:use-module (gnu packages sdl)
80ce42bd 99 #:use-module (gnu packages shells)
c9b1b4f9 100 #:use-module (gnu packages statistics)
8f9ac901 101 #:use-module (gnu packages tex)
1c65314c 102 #:use-module (gnu packages texinfo)
cc2b77df 103 #:use-module (gnu packages tls)
e25f0174 104 #:use-module (gnu packages version-control)
02f8f804 105 #:use-module (gnu packages video)
8d12be1e 106 #:use-module (gnu packages web)
ce0614dd 107 #:use-module (gnu packages base)
26b307e2 108 #:use-module (gnu packages xml)
6fa14469 109 #:use-module (gnu packages xorg)
0bdc1671 110 #:use-module (gnu packages xdisorg)
4ed20663 111 #:use-module (gnu packages zip)
afa181ff 112 #:use-module (gnu packages tcl)
63bcec71 113 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
114 #:use-module (guix packages)
115 #:use-module (guix download)
ea5456c8 116 #:use-module (guix git-download)
11bb85a1 117 #:use-module (guix utils)
acc26ff1 118 #:use-module (guix build-system gnu)
d8c4998f 119 #:use-module (guix build-system cmake)
898238b9 120 #:use-module (guix build-system python)
1c65314c
FB
121 #:use-module (guix build-system trivial)
122 #:use-module (srfi srfi-1))
a01b6da7 123
45848023 124(define-public python-2.7
a01b6da7
NK
125 (package
126 (name "python")
49c2a46e 127 (version "2.7.13")
a01b6da7
NK
128 (source
129 (origin
130 (method url-fetch)
9b43a0ff 131 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
132 version "/Python-" version ".tar.xz"))
133 (sha256
134 (base32
49c2a46e 135 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
c3052d6b
ML
136 (patches (search-patches "python-2.7-search-paths.patch"
137 "python-2-deterministic-build-info.patch"
15e57f57 138 "python-2.7-site-prefixes.patch"
dc5cec21
LF
139 "python-2.7-source-date-epoch.patch"
140 "python-2.7-getentropy-on-old-kernels.patch"))
10a42aa2
EF
141 (modules '((guix build utils)))
142 ;; suboptimal to delete failing tests here, but if we delete them in the
143 ;; arguments then we need to make sure to strip out that phase when it
144 ;; gets inherited by python and python-minimal.
145 (snippet
146 '(begin
147 (for-each delete-file
148 '("Lib/test/test_compileall.py"
f0499100 149 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
150 "Lib/test/test_distutils.py"
151 "Lib/test/test_import.py"
152 "Lib/test/test_shutil.py"
153 "Lib/test/test_socket.py"
1bb163b0 154 "Lib/test/test_subprocess.py"))
10a42aa2 155 #t))))
02f0c3b2
LC
156 (outputs '("out"
157 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 158 (build-system gnu-build-system)
3fdc99da 159 (arguments
10a42aa2 160 `(;; 356 tests OK.
e7e7a1eb
EF
161 ;; 6 tests failed:
162 ;; test_compileall test_distutils test_import test_shutil test_socket
163 ;; test_subprocess
164 ;; 39 tests skipped:
ff6f33cf
ED
165 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
166 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
167 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
168 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
169 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
170 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
171 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
172 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
173 ;; test_winreg test_winsound test_zipfile64
174 ;; 4 skips unexpected on linux2:
175 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 176 #:test-target "test"
3fdc99da 177 #:configure-flags
6a20289d
LC
178 (list "--enable-shared" ;allow embedding
179 "--with-system-ffi" ;build ctypes
aaf75c89 180 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 181 "--enable-unicode=ucs4"
6a20289d
LC
182 (string-append "LDFLAGS=-Wl,-rpath="
183 (assoc-ref %outputs "out") "/lib"))
fd982732 184
d2cc9c7c
LC
185 #:modules ((ice-9 ftw) (ice-9 match)
186 (guix build utils) (guix build gnu-build-system))
fd982732 187 #:phases
46472ecd
MW
188 (modify-phases %standard-phases
189 (add-before
190 'configure 'patch-lib-shells
191 (lambda _
192 ;; Filter for existing files, since some may not exist in all
193 ;; versions of python that are built with this recipe.
194 (substitute* (filter file-exists?
195 '("Lib/subprocess.py"
196 "Lib/popen2.py"
197 "Lib/distutils/tests/test_spawn.py"
198 "Lib/test/test_subprocess.py"))
199 (("/bin/sh") (which "sh")))
dedc8320
LC
200
201 ;; Use zero as the timestamp in .pyc files so that builds are
202 ;; deterministic. TODO: Remove it when this variable is set in
203 ;; gnu-build-system.scm.
a665996f 204 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 205 #t))
5b4e2791
LC
206 (add-before 'configure 'do-not-record-configure-flags
207 (lambda* (#:key configure-flags #:allow-other-keys)
208 ;; Remove configure flags from the installed '_sysconfigdata.py'
209 ;; and 'Makefile' so we don't end up keeping references to the
210 ;; build tools.
211 ;;
212 ;; Preserve at least '--with-system-ffi' since otherwise the
213 ;; thing tries to build libffi, fails, and we end up with a
214 ;; Python that lacks ctypes.
215 (substitute* "configure"
216 (("^CONFIG_ARGS=.*$")
217 (format #f "CONFIG_ARGS='~a'\n"
218 (if (member "--with-system-ffi" configure-flags)
219 "--with-system-ffi"
220 ""))))
221 #t))
46472ecd
MW
222 (add-before
223 'check 'pre-check
224 (lambda _
225 ;; 'Lib/test/test_site.py' needs a valid $HOME
226 (setenv "HOME" (getcwd))
227 #t))
228 (add-after
229 'unpack 'set-source-file-times-to-1980
230 ;; XXX One of the tests uses a ZIP library to pack up some of the
231 ;; source tree, and fails with "ZIP does not support timestamps
232 ;; before 1980". Work around this by setting the file times in the
233 ;; source tree to sometime in early 1980.
234 (lambda _
235 (let ((circa-1980 (* 10 366 24 60 60)))
236 (ftw "." (lambda (file stat flag)
237 (utime file circa-1980 circa-1980)
238 #t))
02f0c3b2 239 #t)))
9ffe61b0
LC
240 (add-after 'install 'remove-tests
241 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
242 ;; because these files are used by some libraries out there.
243 (lambda* (#:key outputs #:allow-other-keys)
244 (let ((out (assoc-ref outputs "out")))
245 (match (scandir (string-append out "/lib")
246 (lambda (name)
247 (string-prefix? "python" name)))
248 ((pythonX.Y)
249 (let ((testdir (string-append out "/lib/" pythonX.Y
250 "/test")))
251 (with-directory-excursion testdir
252 (for-each delete-file-recursively
253 (scandir testdir
254 (match-lambda
255 ((or "." "..") #f)
256 (file
257 (not
258 (string-prefix? "test_support."
259 file))))))
260 (call-with-output-file "__init__.py" (const #t))
261 #t)))))))
216c283b
LC
262 (add-before 'strip 'make-libraries-writable
263 (lambda* (#:key outputs #:allow-other-keys)
264 ;; Make .so files writable so they can be stripped.
265 (let ((out (assoc-ref outputs "out")))
266 (for-each (lambda (file)
267 (chmod file #o755))
268 (find-files (string-append out "/lib")
269 "\\.so"))
270 #t)))
02f0c3b2
LC
271 (add-after 'install 'move-tk-inter
272 (lambda* (#:key outputs #:allow-other-keys)
273 ;; When Tkinter support is built move it to a separate output so
274 ;; that the main output doesn't contain a reference to Tcl/Tk.
275 (let ((out (assoc-ref outputs "out"))
276 (tk (assoc-ref outputs "tk")))
277 (when tk
278 (match (find-files out "tkinter.*\\.so")
279 ((tkinter.so)
280 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
281 ;; want it under TK/lib/pythonX.Y/site-packages.
282 (let* ((len (string-length out))
283 (target (string-append
284 tk "/"
285 (string-drop
286 (dirname (dirname tkinter.so))
287 len)
288 "/site-packages")))
289 (install-file tkinter.so target)
290 (delete-file tkinter.so)))))
291 #t))))))
a01b6da7 292 (inputs
3fdc99da
CR
293 `(("bzip2" ,bzip2)
294 ("gdbm" ,gdbm)
b10ab723 295 ("libffi" ,libffi) ; for ctypes
b88e1b0a 296 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 297 ("openssl" ,openssl)
3fdc99da 298 ("readline" ,readline)
afa181ff
LC
299 ("zlib" ,zlib)
300 ("tcl" ,tcl)
301 ("tk" ,tk))) ; for tkinter
b10ab723
CR
302 (native-inputs
303 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
304 (native-search-paths
305 (list (search-path-specification
306 (variable "PYTHONPATH")
af070955 307 (files '("lib/python2.7/site-packages")))))
f0499100 308 (home-page "https://www.python.org")
afa181ff 309 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
310 (description
311 "Python is a remarkably powerful dynamic programming language that
312is used in a wide variety of application domains. Some of its key
313distinguishing features include: clear, readable syntax; strong
314introspection capabilities; intuitive object orientation; natural
315expression of procedural code; full modularity, supporting hierarchical
316packages; exception-based error handling; and very high level dynamic
317data types.")
3f641af0 318 (license license:psfl)))
acc26ff1 319
45848023
HG
320;; Current 2.x version.
321(define-public python-2 python-2.7)
322
72df6680 323(define-public python-3.5
b24d1cfc 324 (package (inherit python-2)
343cee8a 325 (version "3.5.3")
717003e3
LC
326 (source (origin
327 (method url-fetch)
328 (uri (string-append "https://www.python.org/ftp/python/"
329 version "/Python-" version ".tar.xz"))
fc1adab1
AK
330 (patches (search-patches
331 "python-fix-tests.patch"
72df6680 332 "python-3.5-fix-tests.patch"
e4d34cd0 333 "python-3.5-getentropy-on-old-kernels.patch"
fc1adab1
AK
334 "python-3-deterministic-build-info.patch"
335 "python-3-search-paths.patch"))
717003e3
LC
336 (patch-flags '("-p0"))
337 (sha256
338 (base32
343cee8a 339 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
fd615918
EF
340 (snippet
341 '(delete-file
342 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
1f434457
MW
343 (arguments (substitute-keyword-arguments (package-arguments python-2)
344 ((#:tests? _) #t)))
1aebc0cb
AE
345 (native-search-paths
346 (list (search-path-specification
347 (variable "PYTHONPATH")
0e05d01e
SB
348 (files (list (string-append "lib/python"
349 (version-major+minor version)
350 "/site-packages"))))))))
f26a77ff 351
45848023 352;; Current 3.x version.
72df6680 353(define-public python-3 python-3.5)
45848023
HG
354
355;; Current major version.
356(define-public python python-3)
357
95288fcc
LC
358;; Minimal variants of Python, mostly used to break the cycle between Tk and
359;; Python (Tk -> libxcb -> Python.)
360
361(define-public python2-minimal
362 (package (inherit python-2)
363 (name "python-minimal")
02f0c3b2 364 (outputs '("out"))
5927a843
LC
365
366 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
367 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
368 ;; libffi.
369 (inputs `(("libffi" ,libffi)
370 ("zlib" ,zlib)))))
95288fcc
LC
371
372(define-public python-minimal
898238b9 373 (package (inherit python)
95288fcc 374 (name "python-minimal")
02f0c3b2 375 (outputs '("out"))
95288fcc 376
d0b73960 377 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
378 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
379 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
380 (inputs `(("libffi" ,libffi)
381 ("openssl" ,openssl)
95288fcc
LC
382 ("zlib" ,zlib)))))
383
64cb064c
LC
384(define* (wrap-python3 python
385 #:optional
386 (name (string-append (package-name python) "-wrapper")))
898238b9 387 (package (inherit python)
95288fcc 388 (name name)
898238b9
AE
389 (source #f)
390 (build-system trivial-build-system)
02f0c3b2 391 (outputs '("out"))
3969ca54 392 (inputs `(("bash" ,bash)))
3c0f2329 393 (propagated-inputs `(("python" ,python)))
898238b9
AE
394 (arguments
395 `(#:modules ((guix build utils))
396 #:builder
397 (begin
398 (use-modules (guix build utils))
399 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
400 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (mkdir-p bin)
402 (for-each
403 (lambda (old new)
404 (symlink (string-append python old)
405 (string-append bin "/" new)))
3969ca54
SB
406 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
407 `("python" ,"pydoc" ,"idle" ,"pip"))
408 ;; python-config outputs search paths based upon its location,
409 ;; use a bash wrapper to avoid changing its outputs.
410 (let ((bash (string-append (assoc-ref %build-inputs "bash")
411 "/bin/bash"))
412 (old (string-append python "python3-config"))
413 (new (string-append bin "/python-config")))
414 (with-output-to-file new
415 (lambda ()
416 (format #t "#!~a~%" bash)
417 (format #t "exec \"~a\" \"$@\"~%" old)
418 (chmod new #o755)
419 #t)))))))
0d56e3e1
LC
420 (synopsis "Wrapper for the Python 3 commands")
421 (description
422 "This package provides wrappers for the commands of Python@tie{}3.x such
423that they can be invoked under their usual name---e.g., @command{python}
424instead of @command{python3}.")))
425
95288fcc
LC
426(define-public python-wrapper (wrap-python3 python))
427(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 428
aaf625b8
RW
429(define-public python-psutil
430 (package
431 (name "python-psutil")
88535a44 432 (version "4.3.0")
aaf625b8
RW
433 (source
434 (origin
435 (method url-fetch)
f56777be 436 (uri (pypi-uri "psutil" version))
aaf625b8
RW
437 (sha256
438 (base32
88535a44 439 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 440 (build-system python-build-system)
fb08c4fe
MB
441 (arguments
442 ;; FIXME: some tests does not return and times out.
443 '(#:tests? #f))
88535a44 444 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
445 (synopsis "Library for retrieving information on running processes")
446 (description
447 "psutil (Python system and process utilities) is a library for retrieving
448information on running processes and system utilization (CPU, memory, disks,
449network) in Python. It is useful mainly for system monitoring, profiling and
450limiting process resources and management of running processes. It implements
451many functionalities offered by command line tools such as: ps, top, lsof,
452netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
453pidof, tty, taskset, pmap.")
3f641af0 454 (license license:bsd-3)))
aaf625b8
RW
455
456(define-public python2-psutil
457 (package-with-python2 python-psutil))
898238b9 458
f9da1d8a
ED
459(define-public python-passlib
460 (package
461 (name "python-passlib")
3b86a385 462 (version "1.7.1")
f9da1d8a
ED
463 (source
464 (origin
465 (method url-fetch)
690e8c66 466 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
467 (sha256
468 (base32
3b86a385 469 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
470 (build-system python-build-system)
471 (native-inputs
f3b98f4f 472 `(("python-nose" ,python-nose)))
f22efa01 473 (propagated-inputs
f9da1d8a
ED
474 `(("python-py-bcrypt" ,python-py-bcrypt)))
475 (arguments
476 `(#:phases
477 (alist-cons-before
478 'check 'set-PYTHON_EGG_CACHE
479 ;; some tests require access to "$HOME/.cython"
480 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
481 %standard-phases)))
482 (home-page "https://bitbucket.org/ecollins/passlib")
483 (synopsis
484 "Comprehensive password hashing framework")
485 (description
486 "Passlib is a password hashing library for Python 2 & 3, which provides
487cross-platform implementations of over 30 password hashing algorithms, as well
488as a framework for managing existing password hashes. It's designed to be
489useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
490to providing full-strength password hashing for multi-user application.")
3f641af0 491 (license license:bsd-3)))
f9da1d8a
ED
492
493(define-public python2-passlib
494 (package-with-python2 python-passlib))
495
feb0d9c3
ED
496(define-public python-py-bcrypt
497 (package
498 (name "python-py-bcrypt")
499 (version "0.4")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (string-append
504 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
505 version
506 ".tar.gz"))
507 (sha256
508 (base32
509 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
510 (build-system python-build-system)
feb0d9c3
ED
511 (home-page "https://code.google.com/p/py-bcrypt")
512 (synopsis
513 "Bcrypt password hashing and key derivation")
514 (description
515 "A python wrapper of OpenBSD's Blowfish password hashing code. This
516system hashes passwords using a version of Bruce Schneier's Blowfish block
517cipher with modifications designed to raise the cost of off-line password
518cracking and frustrate fast hardware implementation. The computation cost of
519the algorithm is parametised, so it can be increased as computers get faster.
520The intent is to make a compromise of a password database less likely to
521result in an attacker gaining knowledge of the plaintext passwords (e.g. using
522John the Ripper).")
523 ;; "sha2.c" is under BSD-3;
524 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
525 ;; the rest is under ISC.
3f641af0 526 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
527
528(define-public python2-py-bcrypt
529 (package-with-python2 python-py-bcrypt))
530
531
429fdea1
ED
532(define-public python-paramiko
533 (package
534 (name "python-paramiko")
c1aba1a7 535 (version "1.17.4")
429fdea1
ED
536 (source
537 (origin
538 (method url-fetch)
81b9bbbd 539 (uri (pypi-uri "paramiko" version))
429fdea1
ED
540 (sha256
541 (base32
c1aba1a7 542 "1rs2qcmskcmq66q6g5al08wa41l9am0fad5r719m8wf91msyylqw"))))
429fdea1 543 (build-system python-build-system)
49910e6a
MB
544 (arguments
545 '(;; FIXME: One test fails with "EOFError not raised by connect".
546 #:tests? #f))
547 ;; #:phases
548 ;; (modify-phases %standard-phases
549 ;; (replace 'check
550 ;; (lambda _
551 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 552 (propagated-inputs
f22efa01
HG
553 `(("python-pycrypto" ,python-pycrypto)
554 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
555 (home-page "http://www.paramiko.org/")
556 (synopsis "SSHv2 protocol library")
557 (description "Paramiko is a python implementation of the SSHv2 protocol,
558providing both client and server functionality. While it leverages a Python C
559extension for low level cryptography (PyCrypto), Paramiko itself is a pure
560Python interface around SSH networking concepts.")
3f641af0 561 (license license:lgpl2.1+)))
429fdea1
ED
562
563(define-public python2-paramiko
564 (package-with-python2 python-paramiko))
565
566
de73dbf6
ED
567(define-public python-httplib2
568 (package
569 (name "python-httplib2")
286f1bac 570 (version "0.9.2")
de73dbf6
ED
571 (source
572 (origin
573 (method url-fetch)
286f1bac 574 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
575 (sha256
576 (base32
286f1bac 577 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 578 (build-system python-build-system)
286f1bac 579 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
580 (synopsis "Comprehensive HTTP client library")
581 (description
582 "A comprehensive HTTP client library supporting many features left out of
583other HTTP libraries.")
584 (license license:expat)))
585
586(define-public python2-httplib2
587 (package-with-python2 python-httplib2))
588
67039875
ED
589(define-public python-ecdsa
590 (package
591 (name "python-ecdsa")
592 (version "0.13")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (string-append
597 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
598 version
599 ".tar.gz"))
600 (sha256
601 (base32
602 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
603 (build-system python-build-system)
67039875
ED
604 (inputs
605 `(("openssl" ,openssl)))
606 (home-page
7bf837fd 607 "https://github.com/warner/python-ecdsa")
67039875
ED
608 (synopsis
609 "ECDSA cryptographic signature library (pure python)")
610 (description
611 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
612Curve Digital Signature Algorithm), implemented purely in Python. With this
613library, you can quickly create keypairs (signing key and verifying key), sign
614messages, and verify the signatures. The keys and signatures are very short,
615making them easy to handle and incorporate into other protocols.")
616 (license license:expat)))
617
618(define-public python2-ecdsa
619 (package-with-python2 python-ecdsa))
620
52323f32
ED
621(define-public python-ccm
622 (package
623 (name "python-ccm")
db5567f7 624 (version "2.1.6")
52323f32
ED
625 (source
626 (origin
627 (method url-fetch)
db5567f7 628 (uri (pypi-uri "ccm" version))
52323f32
ED
629 (sha256
630 (base32
db5567f7 631 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 632 (build-system python-build-system)
f22efa01 633 (propagated-inputs
52323f32 634 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
635 ;; Not listed in setup.py, but used in ccmlib/node.py for full
636 ;; functionality
637 ("python-psutil" ,python-psutil)
52323f32
ED
638 ("python-six" ,python-six)))
639 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
640 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
641localhost")
642 (description "Cassandra Cluster Manager is a development tool for testing
643local Cassandra clusters. It creates, launches and removes Cassandra clusters
644on localhost.")
3f641af0 645 (license license:asl2.0)))
52323f32
ED
646
647(define-public python2-ccm
648 (package-with-python2 python-ccm))
649
89114f39 650(define-public python-pytz
acc26ff1 651 (package
89114f39 652 (name "python-pytz")
a5f92ca0 653 (version "2016.10")
acc26ff1
CR
654 (source
655 (origin
656 (method url-fetch)
61c9babb 657 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
658 (sha256
659 (base32
a5f92ca0 660 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 661 (build-system python-build-system)
8498b8cf 662 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 663 (home-page "http://pythonhosted.org/pytz")
9e771e3b 664 (synopsis "Python timezone library")
acc26ff1
CR
665 (description
666 "This library allows accurate and cross platform timezone calculations
667using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 668 (license license:expat)))
5ace6e2f 669
89114f39 670(define-public python2-pytz
11bb85a1 671 (package-with-python2 python-pytz))
89114f39 672
fc50e9c6 673
89114f39 674(define-public python-babel
5ace6e2f 675 (package
89114f39 676 (name "python-babel")
ffb1e98d 677 (version "2.3.4")
5ace6e2f
CR
678 (source
679 (origin
680 (method url-fetch)
b850a6d8 681 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
682 (sha256
683 (base32
ffb1e98d 684 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 685 (build-system python-build-system)
f22efa01 686 (propagated-inputs
f3b98f4f 687 `(("python-pytz" ,python-pytz)))
8498b8cf 688 (arguments `(#:tests? #f)) ; no test target
e1804763 689 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
690 (synopsis
691 "Tools for internationalizing Python applications")
692 (description
693 "Babel is composed of two major parts:
694- tools to build and work with gettext message catalogs
695- a Python interface to the CLDR (Common Locale Data Repository), providing
696access to various locale display names, localized number and date formatting,
697etc. ")
3f641af0 698 (license license:bsd-3)))
89114f39
AE
699
700(define-public python2-babel
11bb85a1 701 (package-with-python2 python-babel))
73adf220 702
ed377cc6
RW
703(define-public python2-backport-ssl-match-hostname
704 (package
705 (name "python2-backport-ssl-match-hostname")
f2d06d46 706 (version "3.5.0.1")
ed377cc6
RW
707 (source
708 (origin
709 (method url-fetch)
710 (uri (string-append
711 "https://pypi.python.org/packages/source/b/"
712 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
713 version ".tar.gz"))
714 (sha256
715 (base32
f2d06d46 716 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 717 (build-system python-build-system)
f2d06d46
EF
718 (arguments
719 `(#:python ,python-2
720 #:tests? #f)) ; no test target
f2d06d46
EF
721 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
722 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
723 (description
724 "This backport brings the ssl.match_hostname() function to users of
725earlier versions of Python. The function checks the hostname in the
726certificate returned by the server to which a connection has been established,
727and verifies that it matches the intended target hostname.")
3f641af0 728 (license license:psfl)))
ed377cc6 729
d205f895
TD
730(define-public python-hdf4
731 (package
732 (name "python-hdf4")
733 (version "0.9")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (pypi-uri name version))
738 (sha256
739 (base32
740 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
741 (build-system python-build-system)
742 (native-inputs `(("nose" ,python-nose)))
743 (propagated-inputs `(("numpy" ,python-numpy)))
744 (inputs
745 `(("hdf4" ,hdf4)
746 ("libjpeg" ,libjpeg)
747 ("zlib" ,zlib)))
748 (arguments
749 `(#:phases
750 (modify-phases %standard-phases
751 (replace 'check
752 (lambda _
753 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
754 ;; on to import numpy. Somehow this works on their CI system.
755 ;; Let's just manage PYTHONPATH here instead.
756 (substitute* "runexamples.sh"
757 (("export PYTHONPATH=.*") ""))
758 (setenv "PYTHONPATH"
759 (string-append (getcwd) ":"
760 (getenv "PYTHONPATH")))
761 (and (zero? (system* "./runexamples.sh"))
762 (zero? (system* "nosetests" "-v"))))))))
763 (home-page "https://github.com/fhs/python-hdf4")
764 (synopsis "Python interface to the NCSA HDF4 library")
765 (description
766 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
767which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
768NetCDF files can also be read and modified. Python-HDF4 is a fork of
769@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
770 (license license:expat)))
771
772(define-public python2-hdf4
773 (package-with-python2 python-hdf4))
774
ef5cbf9b
RW
775(define-public python-h5py
776 (package
777 (name "python-h5py")
fe147c41 778 (version "2.6.0")
ef5cbf9b
RW
779 (source
780 (origin
781 (method url-fetch)
fe147c41 782 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
783 (sha256
784 (base32
fe147c41 785 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 786 (build-system python-build-system)
797e1401
RW
787 (arguments
788 `(#:tests? #f ; no test target
789 #:phases
790 (modify-phases %standard-phases
791 (add-after 'unpack 'fix-hdf5-paths
792 (lambda* (#:key inputs #:allow-other-keys)
793 (let ((prefix (assoc-ref inputs "hdf5")))
794 (substitute* "setup_build.py"
795 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
796 (string-append "['" prefix "/lib" "']"))
797 (("'/opt/local/include', '/usr/local/include'")
798 (string-append "'" prefix "/include" "'")))
799 (substitute* "setup_configure.py"
800 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']")))
802 #t))))))
3c4010b1 803 (propagated-inputs
69866690
HG
804 `(("python-six" ,python-six)
805 ("python-numpy" ,python-numpy)))
ef5cbf9b 806 (inputs
69866690 807 `(("hdf5" ,hdf5)))
ef5cbf9b 808 (native-inputs
fe147c41
EF
809 `(("python-cython" ,python-cython)
810 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
811 (home-page "http://www.h5py.org/")
812 (synopsis "Read and write HDF5 files from Python")
813 (description
814 "The h5py package provides both a high- and low-level interface to the
815HDF5 library from Python. The low-level interface is intended to be a
816complete wrapping of the HDF5 API, while the high-level component supports
817access to HDF5 files, datasets and groups using established Python and NumPy
818concepts.")
9820a028 819 (license license:bsd-3)))
ef5cbf9b
RW
820
821(define-public python2-h5py
9820a028 822 (package-with-python2 python-h5py))
ef5cbf9b 823
ea8450c8
TD
824(define-public python-netcdf4
825 (package
826 (name "python-netcdf4")
d5a97839 827 (version "1.2.7")
ea8450c8
TD
828 (source
829 (origin
830 (method url-fetch)
831 (uri (pypi-uri "netCDF4" version))
832 (sha256
833 (base32
d5a97839 834 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
835 (build-system python-build-system)
836 (native-inputs
837 `(("python-cython" ,python-cython)))
838 (propagated-inputs
839 `(("python-numpy" ,python-numpy)))
840 (inputs
841 `(("netcdf" ,netcdf)
842 ("hdf4" ,hdf4)
843 ("hdf5" ,hdf5)))
844 (arguments
845 '(#:phases
846 (modify-phases %standard-phases
847 (replace 'check
848 (lambda _
849 (setenv "NO_NET" "1") ; disable opendap tests
850 (with-directory-excursion "test"
851 (setenv "PYTHONPATH" ; find and add the library we just built
852 (string-append
853 (car (find-files "../build" "lib.*"
854 #:directories? #:t
855 #:fail-on-error? #:t))
856 ":" (getenv "PYTHONPATH")))
857 (zero? (system* "python" "run_all.py"))))))))
858 (home-page
859 "https://github.com/Unidata/netcdf4-python")
860 (synopsis "Python/numpy interface to the netCDF library")
861 (description "Netcdf4-python is a Python interface to the netCDF C
862library. netCDF version 4 has many features not found in earlier
863versions of the library and is implemented on top of HDF5. This module
864can read and write files in both the new netCDF 4 and the old netCDF 3
865format, and can create files that are readable by HDF5 clients. The
866API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
867to users of that module.")
868 ;; The software is mainly ISC, but includes some files covered
869 ;; by the Expat license.
870 (license (list license:isc license:expat))))
871
872(define-public python2-netcdf4
873 (package-with-python2 python-netcdf4))
874
c1448c69
EB
875(define-public python-lockfile
876 (package
877 (name "python-lockfile")
692add53 878 (version "0.12.2")
c1448c69
EB
879 (source
880 (origin
881 (method url-fetch)
882 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
883 "lockfile-" version ".tar.gz"))
884 (sha256
885 (base32
692add53 886 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
887 (build-system python-build-system)
888 (arguments '(#:test-target "check"))
692add53
BW
889 (native-inputs
890 `(("python-pbr" ,python-pbr)))
6a8f26a4 891 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
892 (synopsis "Platform-independent file locking module")
893 (description
894 "The lockfile package exports a LockFile class which provides a simple
895API for locking files.")
f210e944 896 (license license:expat)))
c1448c69
EB
897
898(define-public python2-lockfile
f210e944 899 (package-with-python2 python-lockfile))
c1448c69 900
5a1a4bf6
EB
901(define-public python-mock
902 (package
903 (name "python-mock")
904 (version "1.0.1")
905 (source
906 (origin
907 (method url-fetch)
6b7877e1 908 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
909 (sha256
910 (base32
911 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
912 (build-system python-build-system)
913 (arguments '(#:test-target "check"))
6b7877e1 914 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 915 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
916 (description
917 "Mock is a library for testing in Python. It allows you to replace parts
918of your system under test with mock objects and make assertions about how they
919have been used.")
bd3fa666 920 (license license:expat)))
5a1a4bf6
EB
921
922(define-public python2-mock
923 (package-with-python2 python-mock))
924
fc50e9c6 925
73adf220
AE
926(define-public python-setuptools
927 (package
928 (name "python-setuptools")
d660f7be 929 (version "31.0.0")
73adf220
AE
930 (source
931 (origin
932 (method url-fetch)
d660f7be 933 (uri (pypi-uri "setuptools" version))
73adf220
AE
934 (sha256
935 (base32
d660f7be 936 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
937 (modules '((guix build utils)))
938 (snippet
939 '(begin
940 ;; Remove included binaries which are used to build self-extracting
941 ;; installers for Windows.
942 ;; TODO: Find some way to build them ourself so we can include them.
943 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
944 #t))))
73adf220 945 (build-system python-build-system)
d3d656c5
AE
946 ;; FIXME: Tests require pytest, which itself relies on setuptools.
947 ;; One could bootstrap with an internal untested setuptools.
73adf220 948 (arguments
824af8ca 949 `(#:tests? #f))
73adf220
AE
950 (home-page "https://pypi.python.org/pypi/setuptools")
951 (synopsis
952 "Library designed to facilitate packaging Python projects")
953 (description
954 "Setuptools is a fully-featured, stable library designed to facilitate
955packaging Python projects, where packaging includes:
956Python package and module definitions,
957distribution package metadata,
958test hooks,
959project installation,
960platform-specific details,
961Python 3 support.")
d660f7be
MB
962 ;; TODO: setuptools now bundles the following libraries:
963 ;; packaging, pyparsing, six and appdirs. How to unbundle?
964 (license (list license:psfl ; setuptools itself
965 license:expat ; six, appdirs, pyparsing
966 license:asl2.0 ; packaging is dual ASL2/BSD-2
967 license:bsd-2))))
73adf220
AE
968
969(define-public python2-setuptools
970 (package-with-python2 python-setuptools))
fc50e9c6 971
aa21c764 972;;; Pycrypto is abandoned upstream:
1194575b 973;;;
aa21c764 974;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 975;;;
aa21c764 976;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
977(define-public python-pycrypto
978 (package
979 (name "python-pycrypto")
980 (version "2.6.1")
981 (source
982 (origin
983 (method url-fetch)
aa21c764
LF
984 (uri (pypi-uri "pycrypto" version))
985 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
986 (sha256
987 (base32
988 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
989 (build-system python-build-system)
cafc3f5a
EB
990 (inputs
991 `(("python" ,python)
992 ("gmp" ,gmp)))
993 (arguments
994 `(#:phases
995 (alist-cons-before
996 'build 'set-build-env
997 ;; pycrypto runs an autoconf configure script behind the scenes
998 (lambda _
999 (setenv "CONFIG_SHELL" (which "bash")))
1000 %standard-phases)))
1001 (home-page "http://www.pycrypto.org/")
1002 (synopsis "Cryptographic modules for Python")
1003 (description
1004 "Pycrypto is a collection of both secure hash functions (such as SHA256
1005and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1006etc.). The package is structured to make adding new modules easy.")
3f641af0 1007 (license license:public-domain)))
cafc3f5a 1008
345f0611 1009(define-public python2-pycrypto
1c0059da
EF
1010 (let ((pycrypto (package-with-python2 python-pycrypto)))
1011 (package (inherit pycrypto)
1012 (inputs
1013 `(("python" ,python-2)
1014 ,@(alist-delete
1015 "python"
1016 (package-inputs pycrypto)))))))
345f0611 1017
de959250 1018(define-public python-eventlet
1019 (package
1020 (name "python-eventlet")
1021 (version "0.20.1")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (pypi-uri "eventlet" version))
1026 (sha256
1027 (base32
1028 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1029 (build-system python-build-system)
1030 (propagated-inputs
1031 `(("python-greenlet" ,python-greenlet)))
1032 (home-page "http://eventlet.net")
1033 (synopsis "Concurrent networking library for Python")
1034 (description
1035 "Eventlet is a concurrent networking library for Python that
1036allows you to change how you run your code, not how you write it.
1037It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1038Coroutines ensure that the developer uses a blocking style of programming
1039that is similar to threading, but provide the benefits of non-blocking I/O.
1040The event dispatch is implicit, which means you can easily use @code{Eventlet}
1041from the Python interpreter, or as a small part of a larger application.")
1042 (license license:expat)))
1043
1044(define-public python2-eventlet
1045 (let ((base (package-with-python2
1046 (strip-python2-variant python-eventlet))))
1047 (package (inherit base)
1048 (propagated-inputs
1049 `(("python2-enum34" ,python2-enum34)
1050 ,@(package-propagated-inputs base))))))
1051
cafc3f5a
EB
1052(define-public python-keyring
1053 (package
1054 (name "python-keyring")
13f3ff35 1055 (version "8.7")
cafc3f5a
EB
1056 (source
1057 (origin
1058 (method url-fetch)
664e6c3a 1059 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1060 (sha256
1061 (base32
13f3ff35 1062 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1063 (build-system python-build-system)
1064 (native-inputs
13f3ff35 1065 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1066 (propagated-inputs
cafc3f5a
EB
1067 `(("python-pycrypto" ,python-pycrypto)))
1068 (arguments
664e6c3a 1069 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1070 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1071 (synopsis "Store and access your passwords safely")
1072 (description
1073 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1074service from python. It can be used in any application that needs safe
cafc3f5a
EB
1075password storage.")
1076 ;; "MIT" and PSF dual license
f210e944 1077 (license license:x11)))
cafc3f5a 1078
d7af1069 1079(define-public python2-keyring
f210e944 1080 (package-with-python2 python-keyring))
d7af1069 1081
a480bc41
EB
1082(define-public python-six
1083 (package
1084 (name "python-six")
b6ab89ef 1085 (version "1.10.0")
a480bc41
EB
1086 (source
1087 (origin
1088 (method url-fetch)
b6ab89ef 1089 (uri (pypi-uri "six" version))
a480bc41
EB
1090 (sha256
1091 (base32
b6ab89ef 1092 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1093 (build-system python-build-system)
4fd129ee
MB
1094 (native-inputs
1095 `(("python-py" ,python-py)
1096 ("python-pytest" ,python-pytest)))
a480bc41
EB
1097 (home-page "http://pypi.python.org/pypi/six/")
1098 (synopsis "Python 2 and 3 compatibility utilities")
1099 (description
35b9e423 1100 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1101functions for smoothing over the differences between the Python versions with
1102the goal of writing Python code that is compatible on both Python versions.
35b9e423 1103Six supports every Python version since 2.5. It is contained in only one
a480bc41 1104Python file, so it can be easily copied into your project.")
3f641af0 1105 (license license:x11)))
a480bc41 1106
0c20025c
AE
1107(define-public python2-six
1108 (package-with-python2 python-six))
1109
22d7360b 1110(define-public python-dateutil
cafc3f5a
EB
1111 (package
1112 (name "python-dateutil")
e139c7a7 1113 (version "2.6.0")
cafc3f5a
EB
1114 (source
1115 (origin
1116 (method url-fetch)
394b8060 1117 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1118 (sha256
1119 (base32
e139c7a7 1120 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1121 (build-system python-build-system)
f22efa01 1122 (propagated-inputs
394b8060 1123 `(("python-six" ,python-six)))
b5a5fb19 1124 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1125 (synopsis "Extensions to the standard datetime module")
1126 (description
1127 "The dateutil module provides powerful extensions to the standard
1128datetime module, available in Python 2.3+.")
f210e944 1129 (license license:bsd-3)))
cafc3f5a 1130
fc50e9c6
AE
1131(define-public python2-dateutil
1132 (package-with-python2 python-dateutil))
1d08c01f 1133
cafc3f5a
EB
1134(define-public python-parsedatetime
1135 (package
1136 (name "python-parsedatetime")
28958b64 1137 (version "2.3")
cafc3f5a
EB
1138 (source
1139 (origin
1140 (method url-fetch)
eebf6f01 1141 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1142 (sha256
1143 (base32
28958b64 1144 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
cafc3f5a
EB
1145 (build-system python-build-system)
1146 (native-inputs
eebf6f01 1147 `(("python-nose" ,python-nose)
28958b64
LC
1148 ("python-pyicu" ,python-pyicu)
1149 ("python-pytest" ,python-pytest)
1150 ("python-pytest-runner" ,python-pytest-runner)))
1151 (propagated-inputs
1152 `(("python-future" ,python-future)))
7bf837fd 1153 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1154 (synopsis
1155 "Parse human-readable date/time text")
1156 (description
e881752c 1157 "Parse human-readable date/time text.")
f210e944 1158 (license license:asl2.0)))
cafc3f5a 1159
38b8f9b2 1160(define-public python2-parsedatetime
f210e944 1161 (package-with-python2 python-parsedatetime))
38b8f9b2 1162
d072efcb
RW
1163(define-public python-pandas
1164 (package
1165 (name "python-pandas")
8e086048 1166 (version "0.19.2")
d072efcb
RW
1167 (source
1168 (origin
1b96f069 1169 (method url-fetch)
8e086048 1170 (uri (pypi-uri "pandas" version))
1b96f069 1171 (sha256
b03ee02f
MB
1172 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1173 (patches
1174 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1175 (build-system python-build-system)
d072efcb 1176 (propagated-inputs
f22efa01
HG
1177 `(("python-numpy" ,python-numpy)
1178 ("python-pytz" ,python-pytz)
22d7360b 1179 ("python-dateutil" ,python-dateutil)))
d072efcb 1180 (native-inputs
abcc7a0e
HG
1181 `(("python-nose" ,python-nose)
1182 ("python-cython" ,python-cython)))
d072efcb
RW
1183 (home-page "http://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1185 (description
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187structures designed to make working with structured (tabular,
1188multidimensional, potentially heterogeneous) and time series data both easy
1189and intuitive. It aims to be the fundamental high-level building block for
1190doing practical, real world data analysis in Python.")
f210e944 1191 (license license:bsd-3)))
d072efcb
RW
1192
1193(define-public python2-pandas
f210e944 1194 (package-with-python2 python-pandas))
d072efcb 1195
cafc3f5a
EB
1196(define-public python-tzlocal
1197 (package
1198 (name "python-tzlocal")
ed80839b 1199 (version "1.2.2")
cafc3f5a
EB
1200 (source
1201 (origin
1202 (method url-fetch)
226d3331 1203 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1204 (sha256
1205 (base32
ed80839b 1206 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1207 (build-system python-build-system)
f22efa01
HG
1208 (propagated-inputs
1209 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1210 (home-page "https://github.com/regebro/tzlocal")
1211 (synopsis
35b9e423 1212 "Local timezone information for Python")
cafc3f5a
EB
1213 (description
1214 "Tzlocal returns a tzinfo object with the local timezone information.
1215This module attempts to fix a glaring hole in pytz, that there is no way to
1216get the local timezone information, unless you know the zoneinfo name, and
1217under several distributions that's hard or impossible to figure out.")
3f641af0 1218 (license license:cc0)))
cafc3f5a 1219
1d08c01f
AE
1220(define-public python2-pysqlite
1221 (package
1222 (name "python2-pysqlite")
e80aaeb4 1223 (version "2.8.3")
1d08c01f
AE
1224 (source
1225 (origin
1226 (method url-fetch)
fe476868 1227 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1228 (sha256
1229 (base32
e80aaeb4 1230 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1231 (build-system python-build-system)
1232 (inputs
1233 `(("sqlite" ,sqlite)))
1234 (arguments
1235 `(#:python ,python-2 ; incompatible with Python 3
1236 #:tests? #f)) ; no test target
7bf837fd 1237 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1238 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1239 (description
1240 "Pysqlite provides SQLite bindings for Python that comply to the
1241Database API 2.0T.")
ed0cdf83 1242 (license license:zlib)))
1d08c01f 1243
2875caf5
AE
1244
1245(define-public python2-mechanize
1246 (package
1247 (name "python2-mechanize")
1248 (version "0.2.5")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1253 version ".tar.gz"))
1254 (sha256
1255 (base32
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
2875caf5
AE
1258 (arguments
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1260 #:tests? #f))
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1265 ;; (python-2.7.5).
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1269 (synopsis
1270 "Stateful programmatic web browsing in Python")
1271 (description
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1274 (license (license:non-copyleft
1275 "file://COPYING"
1276 "See COPYING in the distribution."))))
2875caf5 1277
0352532e
AE
1278
1279(define-public python-simplejson
1280 (package
1281 (name "python-simplejson")
b2e6e150 1282 (version "3.10.0")
0352532e
AE
1283 (source
1284 (origin
1285 (method url-fetch)
988d1bad 1286 (uri (pypi-uri "simplejson" version))
0352532e
AE
1287 (sha256
1288 (base32
b2e6e150 1289 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1292 (synopsis
1293 "Json library for Python")
1294 (description
e881752c
AK
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1297format.
0352532e
AE
1298
1299Simplejson exposes an API familiar to users of the standard library marshal
1300and pickle modules. It is the externally maintained version of the json
1301library contained in Python 2.6, but maintains compatibility with Python 2.5
1302and (currently) has significant performance advantages, even without using
1303the optional C extension for speedups. Simplejson is also supported on
1304Python 3.3+.")
3f641af0 1305 (license license:x11)))
0352532e
AE
1306
1307(define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
421a80a2
AE
1309
1310
ed07b08d 1311(define-public python-pyicu
421a80a2 1312 (package
ed07b08d 1313 (name "python-pyicu")
2e161eaf 1314 (version "1.9.5")
421a80a2
AE
1315 (source
1316 (origin
1317 (method url-fetch)
2e161eaf 1318 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1319 (sha256
1320 (base32
2e161eaf 1321 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1322 (build-system python-build-system)
dc027d40
MB
1323 (arguments
1324 '(#:phases
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1327 (lambda _
1328 ;; XXX: These tests require locales that are unavailable
1329 ;; in the build environment.
1330 (delete-file "test/test_DateTimeParserGenerator.py")
1331 #t)))))
421a80a2
AE
1332 (inputs
1333 `(("icu4c" ,icu4c)))
421a80a2 1334 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1335 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1336 (description
1337 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1338 (license license:x11)))
ed07b08d
LF
1339
1340(define-public python2-pyicu
f210e944 1341 (package-with-python2 python-pyicu))
cc20a22a
LC
1342
1343(define-public python2-dogtail
1344 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1345 ;; spaces in indentation" with Python 3.
1346 (package
1347 (name "python2-dogtail")
c5be3467 1348 (version "0.9.9")
cc20a22a
LC
1349 (source (origin
1350 (method url-fetch)
c5be3467 1351 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1352 (sha256
1353 (base32
c5be3467 1354 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1355 (build-system python-build-system)
1356 (arguments `(#:python ,python-2
1357 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1358 ;; Currently no offical homepage.
1359 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1360 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1361 (description
35b9e423 1362 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1363It uses Accessibility (a11y) technologies to communicate with desktop
1364applications. dogtail scripts are written in Python and executed like any
1365other Python program.")
3f641af0 1366 (license license:gpl2+)))
515e6878 1367
011b18c3
LC
1368(define-public python2-empy
1369 (package
1370 (name "python2-empy")
1371 (version "3.3")
1372 (source (origin
1373 (method url-fetch)
1374 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1375 version ".tar.gz"))
1376 (sha256
1377 (base32
1378 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1379 (build-system python-build-system)
1380 (arguments
1381 `(#:python ,python-2
1382 #:phases (alist-replace
1383 'check
1384 (lambda _
1385 (zero? (system* "./test.sh")))
1386 %standard-phases)))
1387 (home-page "http://www.alcyone.com/software/empy/")
1388 (synopsis "Templating system for Python")
1389 (description
1390 "EmPy is a system for embedding Python expressions and statements in
1391template text; it takes an EmPy source file, processes it, and produces
1392output. This is accomplished via expansions, which are special signals to the
1cd4027c 1393EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1394EmPy can expand arbitrary Python expressions and statements in this way, as
1395well as a variety of special forms. Textual data not explicitly delimited in
1396this way is sent unaffected to the output, allowing Python to be used in
1397effect as a markup language. Also supported are callbacks via hooks,
1398recording and playback via diversions, and dynamic, chainable filters. The
1399system is highly configurable via command line options and embedded
1400commands.")
3f641af0 1401 (license license:lgpl2.1+)))
011b18c3 1402
8deeda0c
LC
1403(define-public python2-element-tree
1404 (package
1405 (name "python2-element-tree")
1406 (version "1.2.6")
1407 (source (origin
1408 (method url-fetch)
1409 (uri (string-append
1410 "http://effbot.org/media/downloads/elementtree-"
1411 version "-20050316.tar.gz"))
1412 (sha256
1413 (base32
1414 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1415 (build-system python-build-system)
1416 (arguments
1417 `(#:python ,python-2 ; seems to be part of Python 3
1418 #:tests? #f)) ; no 'test' sub-command
1419 (synopsis "Toolkit for XML processing in Python")
1420 (description
1421 "ElementTree is a Python library supporting lightweight XML processing.")
1422 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1423 (license (license:x11-style
1424 "http://docs.python.org/2/license.html"
1425 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1426
1427(define-public python2-pybugz
1428 (package
1429 (name "python2-pybugz")
1430 (version "0.6.11")
1431 (source (origin
1432 (method url-fetch)
1433 (uri (string-append
1434 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1435 version ".tar.gz"))
1436 (sha256
1437 (base32
6f194a1e 1438 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1439 (patches (search-patches "pybugz-stty.patch"
1440 "pybugz-encode-error.patch"))))
8deeda0c
LC
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:python ,python-2 ; SyntaxError with Python 3
1444 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1445 (propagated-inputs
1446 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1447 (synopsis "Python and command-line interface to Bugzilla")
1448 (description
1449 "PyBugz is a Python library and command-line tool to query the Bugzilla
1450bug tracking system. It is meant as an aid to speed up interaction with the
1451bug tracker.")
1452 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1453 (license license:gpl2)))
8deeda0c 1454
a480bc41
EB
1455(define-public python-enum34
1456 (package
1457 (name "python-enum34")
5e923414 1458 (version "1.1.6")
a480bc41
EB
1459 (source
1460 (origin
1461 (method url-fetch)
d39ae1e5 1462 (uri (pypi-uri "enum34" version))
a480bc41
EB
1463 (sha256
1464 (base32
5e923414 1465 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1466 (build-system python-build-system)
a480bc41
EB
1467 (home-page "https://pypi.python.org/pypi/enum34")
1468 (synopsis "Backported Python 3.4 Enum")
1469 (description
1470 "Enum34 is the new Python stdlib enum module available in Python 3.4
1471backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1472 (license license:bsd-3)))
a480bc41 1473
820acd1b
LF
1474(define-public python2-enum34
1475 (package-with-python2 python-enum34))
1476
a480bc41
EB
1477(define-public python-parse-type
1478 (package
1479 (name "python-parse-type")
1480 (version "0.3.4")
1481 (source
1482 (origin
1483 (method url-fetch)
1484 (uri (string-append "https://pypi.python.org/packages/source/p/"
1485 "parse_type/parse_type-" version ".tar.gz"))
1486 (sha256
1487 (base32
1488 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1489 (build-system python-build-system)
8ed12889
DM
1490 (arguments
1491 `(#:phases
1492 (modify-phases %standard-phases
1493 (add-after 'unpack 'patch-tests
1494 (lambda _
1495 (substitute* "tests/test_parse_type_parse.py"
1496 ;; Newer Python versions don't have the problem this test tests.
1497 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1498 ""))
1499 #t)))))
f22efa01 1500 (propagated-inputs
f3b98f4f 1501 `(("python-six" ,python-six)
68f1cdec 1502 ("python-parse" ,python-parse)))
8ed12889
DM
1503 (native-inputs
1504 `(("python-pytest" ,python-pytest)
1505 ("python-pytest-runner" ,python-pytest-runner)))
a480bc41
EB
1506 (home-page "https://github.com/jenisys/parse_type")
1507 (synopsis "Extended parse module")
1508 (description
1509 "Parse_type extends the python parse module.")
8ed12889
DM
1510 (properties
1511 `((python2-variant . ,(delay python2-parse-type))))
3f641af0 1512 (license license:bsd-3)))
a480bc41 1513
8ed12889
DM
1514(define-public python2-parse-type
1515 (let ((base (package-with-python2
1516 (strip-python2-variant python-parse-type))))
1517 (package (inherit base)
1518 (propagated-inputs
1519 `(("python2-enum34" ,python2-enum34)
1520 ,@(package-propagated-inputs base))))))
1521
a480bc41
EB
1522(define-public python-parse
1523 (package
1524 (name "python-parse")
eb3d3503 1525 (version "1.6.6")
a480bc41
EB
1526 (source
1527 (origin
1528 (method url-fetch)
eb3d3503 1529 (uri (pypi-uri "parse" version))
a480bc41
EB
1530 (sha256
1531 (base32
aa6c09ed
EF
1532 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1533 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1534 (build-system python-build-system)
1535 (arguments
1536 `(#:phases
f9a65318
EF
1537 (modify-phases %standard-phases
1538 (replace 'check
1539 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1540 (home-page "https://github.com/r1chardj0n3s/parse")
1541 (synopsis "Parse strings")
1542 (description
1543 "Parse strings using a specification based on the Python format()
1544syntax.")
3f641af0 1545 (license license:x11)))
a480bc41 1546
d3eff97a
JL
1547(define-public python-polib
1548 (package
1549 (name "python-polib")
1550 (version "1.0.8")
1551 (source (origin
1552 (method url-fetch)
1553 (uri (pypi-uri "polib" version))
1554 (sha256
1555 (base32
1556 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1557 (build-system python-build-system)
1558 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1559 (synopsis "Manipulate, create and modify gettext files")
1560 (description "Polib can manipulate any gettext format (po, pot and mo)
1561files. It can be used to create po files from scratch or to modify
1562existing ones.")
1563 (license license:expat)))
1564
1565(define-public python2-polib
1566 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1567 (package
1568 (inherit base)
1569 (arguments `(,@(package-arguments base)
1570 ;; Tests don't work with python2.
1571 #:tests? #f)))))
a480bc41 1572
515e6878
LC
1573(define-public scons
1574 (package
1575 (name "scons")
a3f61425 1576 (version "2.3.4")
515e6878
LC
1577 (source (origin
1578 (method url-fetch)
de67e922
LF
1579 (uri (string-append "mirror://sourceforge/scons/scons/" version
1580 "/scons-" version ".tar.gz"))
515e6878
LC
1581 (sha256
1582 (base32
a3f61425 1583 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1584 (build-system python-build-system)
1585 (arguments
1586 ;; With Python 3.x, fails to build with a syntax error.
1587 `(#:python ,python-2
b3e8b4bd 1588 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1589 #:tests? #f)) ; no 'python setup.py test' command
1590 (home-page "http://scons.org/")
1591 (synopsis "Software construction tool written in Python")
1592 (description
1593 "SCons is a software construction tool. Think of SCons as an improved,
1594cross-platform substitute for the classic Make utility with integrated
1595functionality similar to autoconf/automake and compiler caches such as ccache.
1596In short, SCons is an easier, more reliable and faster way to build
1597software.")
3f641af0 1598 (license license:x11)))
011b18c3 1599
c15a5c0e
DT
1600(define-public python-extras
1601 (package
1602 (name "python-extras")
1603 (version "0.0.3")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (string-append
1608 "https://pypi.python.org/packages/source/e/extras/extras-"
1609 version ".tar.gz"))
1610 (sha256
1611 (base32
1612 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1613 (build-system python-build-system)
c15a5c0e
DT
1614 (arguments
1615 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1616 '(#:tests? #f))
1617 (home-page "https://github.com/testing-cabal/extras")
1618 (synopsis "Useful extensions to the Python standard library")
1619 (description
1620 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1621 (license license:expat)))
c15a5c0e
DT
1622
1623(define-public python2-extras
1624 (package-with-python2 python-extras))
1625
56ea0efd
DT
1626(define-public python-mimeparse
1627 (package
1628 (name "python-mimeparse")
1629 (version "0.1.4")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (string-append
1634 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1635 version ".tar.gz"))
1636 (sha256
1637 (base32
1638 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1639 (build-system python-build-system)
56ea0efd
DT
1640 (arguments
1641 '(#:tests? #f)) ; no setup.py test command
1642 (home-page
1643 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1644 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1645 (description
1646 "Mimeparse provides basic functions for parsing MIME type names and
1647matching them against a list of media-ranges.")
bd3fa666 1648 (license license:expat)))
56ea0efd
DT
1649
1650(define-public python2-mimeparse
1651 (package-with-python2 python-mimeparse))
1652
4435427e
DT
1653(define-public python-nose
1654 (package
1655 (name "python-nose")
f7cb9841 1656 (version "1.3.7")
4435427e
DT
1657 (source
1658 (origin
1659 (method url-fetch)
f7cb9841 1660 (uri (pypi-uri "nose" version))
4435427e
DT
1661 (sha256
1662 (base32
f7cb9841 1663 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1664 (build-system python-build-system)
4435427e
DT
1665 (arguments
1666 '(#:tests? #f)) ; FIXME: test suite fails
1667 (home-page "http://readthedocs.org/docs/nose/")
1668 (synopsis "Python testing library")
1669 (description
1670 "Nose extends the unittest library to make testing easier.")
3f641af0 1671 (license license:lgpl2.0+)))
4435427e
DT
1672
1673(define-public python2-nose
1674 (package-with-python2 python-nose))
1675
0aea283a
EF
1676(define-public python-nose2
1677 (package
1678 (name "python-nose2")
1679 (version "0.6.5")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "nose2" version))
1684 (sha256
1685 (base32
1686 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1687 (build-system python-build-system)
1688 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1689 (propagated-inputs
0aea283a
EF
1690 `(("python-cov-core" ,python-cov-core)
1691 ("python-pytest-cov" ,python-pytest-cov)
1692 ("python-six" ,python-six)))
1693 (home-page "https://github.com/nose-devs/nose2")
1694 (synopsis "Next generation of nicer testing for Python")
1695 (description
1696 "Nose2 is the next generation of nicer testing for Python, based on the
1697plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1698better plugin api, being easier for users to configure, and simplifying internal
1699interfaces and processes.")
1700 (license license:bsd-2)))
1701
1702(define-public python2-nose2
1703 (package-with-python2 python-nose2))
1704
6cd9c356
DT
1705(define-public python-unittest2
1706 (package
1707 (name "python-unittest2")
1708 (version "0.5.1")
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (string-append
1713 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1714 version ".tar.gz"))
1715 (sha256
1716 (base32
1717 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1718 (build-system python-build-system)
6cd9c356
DT
1719 (home-page "http://pypi.python.org/pypi/unittest2")
1720 (synopsis "Python unit testing library")
1721 (description
1722 "Unittest2 is a replacement for the unittest module in the Python
1723standard library.")
3f641af0 1724 (license license:psfl)))
6cd9c356
DT
1725
1726(define-public python2-unittest2
1727 (package (inherit python-unittest2)
1728 (name "python2-unittest2")
1729 (version "0.5.1")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1739 (arguments
1740 `(#:python ,python-2
1741 #:tests? #f)))) ; no setup.py test command
1742
02f8f804 1743(define-public python-pafy
1744 (package
1745 (name "python-pafy")
745d85b7 1746 (version "0.5.3.1")
02f8f804 1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "pafy" version))
1751 (sha256
1752 (base32
745d85b7 1753 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1754 (build-system python-build-system)
ed3fee5f 1755 (arguments
1756 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1757 (propagated-inputs
1758 ;; Youtube-dl is a python package which is imported in the file
1759 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1760 `(("youtube-dl" ,youtube-dl)))
1761 (home-page "https://np1.github.io/pafy/")
1762 (synopsis "Retrieve YouTube content and metadata")
1763 (description
1764 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1765 (license license:lgpl3+)))
1766
542ad60f
DT
1767(define-public python-py
1768 (package
1769 (name "python-py")
b9463fdb 1770 (version "1.4.32")
542ad60f
DT
1771 (source
1772 (origin
1773 (method url-fetch)
71c8a804 1774 (uri (pypi-uri "py" version))
542ad60f
DT
1775 (sha256
1776 (base32
b9463fdb 1777 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1778 (build-system python-build-system)
dcb0da7b
MB
1779 (arguments
1780 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1781 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1782 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1783 ;; Is this module globally installed?"
1784 '(#:tests? #f))
542ad60f
DT
1785 (home-page "http://pylib.readthedocs.org/")
1786 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1787 (description
1788 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1789code introspection, and logging.")
bd3fa666 1790 (license license:expat)))
542ad60f
DT
1791
1792(define-public python2-py
1793 (package-with-python2 python-py))
1794
855d4761
DT
1795(define-public python-pytest
1796 (package
1797 (name "python-pytest")
61a4332d 1798 (version "2.7.3")
855d4761
DT
1799 (source
1800 (origin
1801 (method url-fetch)
1802 (uri (string-append
1803 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1804 version ".tar.gz"))
1805 (sha256
1806 (base32
61a4332d 1807 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1808 (modules '((guix build utils)))
1809 (snippet
1810 ;; One of the tests involves the /usr directory, so it fails.
1811 '(substitute* "testing/test_argcomplete.py"
1812 (("def test_remove_dir_prefix\\(self\\):")
1813 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1814 (build-system python-build-system)
482d9591
HG
1815 (propagated-inputs
1816 `(("python-py" ,python-py)))
e7881f3d 1817 (native-inputs
482d9591 1818 `(("python-nose" ,python-nose)
855d4761
DT
1819 ("python-mock" ,python-mock)))
1820 (home-page "http://pytest.org")
1821 (synopsis "Python testing library")
1822 (description
1823 "Pytest is a testing tool that provides auto-discovery of test modules
1824and functions, detailed info on failing assert statements, modular fixtures,
1825and many external plugins.")
bd3fa666 1826 (license license:expat)))
855d4761
DT
1827
1828(define-public python2-pytest
1829 (package-with-python2 python-pytest))
1830
23b9168d
LF
1831;; Some packages require a newer pytest.
1832(define-public python-pytest-3.0
fca4ff35
LF
1833 (package
1834 (inherit python-pytest)
1835 (name "python-pytest")
23b9168d 1836 (version "3.0.7")
fca4ff35
LF
1837 (source (origin
1838 (method url-fetch)
1839 (uri (pypi-uri "pytest" version))
1840 (sha256
1841 (base32
23b9168d 1842 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
fca4ff35
LF
1843 (arguments
1844 `(#:phases
1845 (modify-phases %standard-phases
1846 (add-before 'check 'disable-invalid-test
1847 (lambda _
1848 (substitute* "testing/test_argcomplete.py"
1849 (("def test_remove_dir_prefix" line)
1850 (string-append "@pytest.mark.skip"
1851 "(reason=\"Assumes that /usr exists.\")\n "
1852 line)))
23b9168d 1853 #t)))))
7f71e257
MFM
1854 (native-inputs
1855 `(("python-nose" ,python-nose)
1856 ("python-mock" ,python-mock)
23b9168d
LF
1857 ("python-hypothesis" ,python-hypothesis)))
1858 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1859
1860(define-public python2-pytest-3.0
1861 (let ((base (package-with-python2
1862 (strip-python2-variant python-pytest-3.0))))
1863 (package (inherit base)
1864 (native-inputs
1865 `(("python2-enum34" ,python2-enum34)
1866 ,@(package-native-inputs base))))))
fca4ff35 1867
358c3d61
EF
1868(define-public python-pytest-cov
1869 (package
1870 (name "python-pytest-cov")
1aecfe17 1871 (version "2.4.0")
358c3d61
EF
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "pytest-cov" version))
1876 (sha256
545f4a1c 1877 (base32
1aecfe17 1878 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 1879 (build-system python-build-system)
ce40b383
HG
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (replace 'check
1884 (lambda _
1885 ;; options taken from tox.ini
1886 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1887 ;; with "Duplicate implicit target name"
1888 (zero? (system* "python" "./setup.py" "check"
1889 "--strict" "--metadata")))))))
f22efa01 1890 (propagated-inputs
10468636
EF
1891 `(("python-coverage" ,python-coverage)
1892 ("python-pytest" ,python-pytest)))
10468636
EF
1893 (home-page "https://github.com/pytest-dev/pytest-cov")
1894 (synopsis "Pytest plugin for measuring coverage")
1895 (description
1896 "Pytest-cov produces coverage reports. It supports centralised testing and
1897distributed testing in both @code{load} and @code{each} modes. It also
1898supports coverage of subprocesses.")
f210e944 1899 (license license:expat)))
358c3d61
EF
1900
1901(define-public python2-pytest-cov
f210e944 1902 (package-with-python2 python-pytest-cov))
358c3d61 1903
6784f2e3
RW
1904(define-public python-pytest-runner
1905 (package
1906 (name "python-pytest-runner")
047160f2 1907 (version "2.11.1")
6784f2e3
RW
1908 (source
1909 (origin
1910 (method url-fetch)
54cd239b 1911 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1912 (sha256
1913 (base32
047160f2 1914 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
1915 (build-system python-build-system)
1916 (arguments
1917 `(#:phases
1918 (modify-phases %standard-phases
1919 ;; The fancy way of setting the version with setuptools_scm does not
1920 ;; seem to work here.
1921 (add-after 'unpack 'set-version
1922 (lambda _
1923 (substitute* "docs/conf.py"
1924 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1925 (string-append "version = \"" ,version "\"")))
1926 #t)))))
1927 (native-inputs
1928 `(("python-pytest" ,python-pytest)
1929 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1930 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1931 (synopsis "Invoke py.test as a distutils command")
1932 (description
1933 "This package provides a @command{pytest-runner} command that
1934@file{setup.py} files can use to run tests.")
f210e944 1935 (license license:expat)))
54cd239b
EF
1936
1937(define-public python2-pytest-runner
f210e944 1938 (package-with-python2 python-pytest-runner))
6784f2e3 1939
44547e51
EF
1940(define-public python-pytest-mock
1941 (package
1942 (name "python-pytest-mock")
1943 (version "1.2")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "pytest-mock" version ".zip"))
1948 (sha256
1949 (base32
1950 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1951 (build-system python-build-system)
1952 (native-inputs
1953 `(("unzip" ,unzip)))
f22efa01 1954 (propagated-inputs
d5e41cf2 1955 `(("python-pytest" ,python-pytest)))
44547e51
EF
1956 (home-page "https://github.com/pytest-dev/pytest-mock/")
1957 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1958 (description
1959 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1960around the patching API provided by the @code{mock} package, but with the
1961benefit of not having to worry about undoing patches at the end of a test.
1962The mocker fixture has the same API as @code{mock.patch}, supporting the
1963same arguments.")
1964 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1965 (license license:expat)))
1966
1967(define-public python2-pytest-mock
1968 (let ((base (package-with-python2
1969 (strip-python2-variant python-pytest-mock))))
1970 (package (inherit base)
f22efa01 1971 (propagated-inputs
44547e51 1972 `(("python2-mock" ,python2-mock)
f22efa01 1973 ,@(package-propagated-inputs base))))))
44547e51 1974
8fa58fc9
CAW
1975(define-public python-pytest-xdist
1976 (package
1977 (name "python-pytest-xdist")
1978 (version "1.14")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "pytest-xdist" version ".zip"))
1983 (sha256
1984 (base32
de585a7e
HG
1985 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1986 (modules '((guix build utils)))
1987 (snippet
1988 '(begin
1989 ;; Remove pre-compiled .pyc files from source.
1990 (for-each delete-file-recursively
1991 (find-files "." "__pycache__" #:directories? #t))
1992 (for-each delete-file (find-files "." "\\.pyc$"))
1993 #t))))
8fa58fc9 1994 (build-system python-build-system)
4eb385fb
MB
1995 (arguments
1996 '(#:tests? #f)) ;FIXME: Some tests are failing.
1997 ;; #:phases
1998 ;; (modify-phases %standard-phases
1999 ;; (delete 'check)
2000 ;; (add-after 'install 'check
2001 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2002 ;; (add-installed-pythonpath inputs outputs)
2003 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
2004 (native-inputs
2005 `(("unzip" ,unzip)
8fa58fc9 2006 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 2007 (propagated-inputs
c4516ad2 2008 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
2009 ("python-pytest" ,python-pytest)
2010 ("python-py" ,python-py)))
2011 (home-page
2012 "https://github.com/pytest-dev/pytest-xdist")
2013 (synopsis
2014 "Plugin for py.test with distributed testing and loop-on-failing modes")
2015 (description
2016 "The pytest-xdist plugin extends py.test with some unique test execution
2017modes: parallelization, running tests in boxed subprocesses, the ability
2018to run tests repeatedly when failed, and the ability to run tests on multiple
2019Python interpreters or platforms. It uses rsync to copy the existing
2020program code to a remote location, executes there, and then syncs the
2021result back.")
f210e944 2022 (license license:expat)))
8fa58fc9
CAW
2023
2024(define-public python2-pytest-xdist
f210e944 2025 (package-with-python2 python-pytest-xdist))
8fa58fc9 2026
84d24017
DT
2027(define-public python-scripttest
2028 (package
2029 (name "python-scripttest")
2030 (version "1.3")
2031 (source
2032 (origin
2033 (method url-fetch)
2034 (uri (string-append
2035 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2036 version ".tar.gz"))
2037 (sha256
2038 (base32
2039 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2040 (build-system python-build-system)
521b7772 2041 (native-inputs
f3b98f4f 2042 `(("python-pytest" ,python-pytest)))
84d24017
DT
2043 (home-page "http://pythonpaste.org/scripttest/")
2044 (synopsis "Python library to test command-line scripts")
2045 (description "Scripttest is a Python helper library for testing
2046interactive command-line applications. With it you can run a script in a
2047subprocess and see the output as well as any file modifications.")
bd3fa666 2048 (license license:expat)))
84d24017
DT
2049
2050(define-public python2-scripttest
2051 (package-with-python2 python-scripttest))
2052
d8fa80e1
DT
2053(define-public python-testtools
2054 (package
2055 (name "python-testtools")
7adb9031 2056 (version "1.4.0")
d8fa80e1
DT
2057 (source
2058 (origin
2059 (method url-fetch)
7adb9031 2060 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2061 (sha256
2062 (base32
7adb9031 2063 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2064 (build-system python-build-system)
7adb9031
DM
2065 (arguments
2066 `(#:phases
2067 (modify-phases %standard-phases
2068 (add-after 'unpack 'fix-module-imports
2069 (lambda _
2070 (substitute* "setup.py"
2071 (("'unittest2>=0.8.0',") ""))
2072 (substitute* '("testtools/testcase.py"
2073 "testtools/testsuite.py"
2074 "testtools/run.py"
2075 "testtools/tests/test_run.py"
2076 "testtools/tests/test_testsuite.py"
2077 "testtools/tests/test_deferredruntest.py")
2078 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2079 (("import unittest2 as unittest") "import unittest")
2080 (("import unittest2") "import unittest as unittest2")
2081 (("from unittest2 import") "from unittest import"))
2082 (substitute* "testtools/tests/test_testresult.py"
2083 ;; NUL in source code is not allowed (raises ValueError).
2084 (("\\x00\\x04") "\\x04"))
2085 #t)))))
0e88cbf8 2086 (propagated-inputs
f22efa01
HG
2087 `(("python-mimeparse" ,python-mimeparse)
2088 ("python-extras" ,python-extras)))
d8fa80e1
DT
2089 (home-page "https://github.com/testing-cabal/testtools")
2090 (synopsis
2091 "Extensions to the Python standard library unit testing framework")
2092 (description
2093 "Testtools extends the Python standard library unit testing framework to
2094provide matchers, more debugging information, and cross-Python
2095compatibility.")
3f641af0 2096 (license license:psfl)))
d8fa80e1
DT
2097
2098(define-public python2-testtools
2099 (package-with-python2 python-testtools))
2100
5bf3afea
DT
2101(define-public python-testscenarios
2102 (package
2103 (name "python-testscenarios")
2104 (version "0.4")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (string-append
2109 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2110 version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2114 (build-system python-build-system)
f22efa01 2115 (propagated-inputs
8e73d3ba 2116 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2117 (home-page "https://launchpad.net/testscenarios")
2118 (synopsis "Pyunit extension for dependency injection")
2119 (description
2120 "Testscenarios provides clean dependency injection for Python unittest
2121style tests.")
3f641af0 2122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2123
2124(define-public python2-testscenarios
2125 (package-with-python2 python-testscenarios))
2126
dac79ecc
DT
2127(define-public python-testresources
2128 (package
2129 (name "python-testresources")
2130 (version "0.2.7")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (string-append
2135 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2136 version ".tar.gz"))
2137 (sha256
2138 (base32
2139 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2140 (build-system python-build-system)
dac79ecc
DT
2141 (home-page "https://launchpad.net/testresources")
2142 (synopsis
2143 "Pyunit extension for managing test resources")
2144 (description
2145 "Testresources is an extension to Python's unittest to allow declarative
2146use of resources by test cases.")
3f641af0 2147 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2148
2149(define-public python2-testresources
2150 (package-with-python2 python-testresources))
2151
070ab058
DT
2152(define-public python-subunit
2153 (package
2154 (name "python-subunit")
2155 (version "0.0.21")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append
2160 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2161 version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2165 (build-system python-build-system)
f22efa01 2166 (propagated-inputs
b52ad371
HG
2167 `(("python-extras" ,python-extras)
2168 ("python-mimeparse" ,python-mimeparse)))
2169 (native-inputs
2170 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2171 (home-page "http://launchpad.net/subunit")
2172 (synopsis "Python implementation of the subunit protocol")
2173 (description
2174 "Python-subunit is a Python implementation of the subunit test streaming
2175protocol.")
3f641af0 2176 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2177
2178(define-public python2-subunit
2179 (package-with-python2 python-subunit))
2180
d2a8db92
HG
2181;; Recent versions of python-fixtures and python-testrepository need
2182;; python-pbr for packaging, which itself needs these two packages for
2183;; testing.
2184;; To fix this circular dependency, we use a build of python-pbr, based on the
2185;; same source, just without any test dependencies and with tests disabled.
2186;; python-pbr-minmal is then used to package python-fixtures and
2187;; python-testrepository.
2188;; Strictly speaking we currently could remove the test-requirements from the
2189;; normal python-pbr package (and save this package) since test are disabled
2190;; there anyway. But this may change in future.
2191(define python-pbr-minimal
cd49454b 2192 (package
d2a8db92 2193 (name "python-pbr-minimal")
5bbb2249 2194 (version "1.10.0")
7787ef76
CR
2195 (source
2196 (origin
2197 (method url-fetch)
d2a8db92 2198 (uri (pypi-uri "pbr" version))
7787ef76
CR
2199 (sha256
2200 (base32
a1e3ed6e
DM
2201 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2202 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2203 (build-system python-build-system)
2204 (arguments
d2a8db92
HG
2205 `(#:tests? #f))
2206 (home-page "http://docs.openstack.org/developer/pbr/")
2207 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2208 (description
d2a8db92 2209 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2210 (license license:asl2.0)))
7787ef76 2211
d2a8db92
HG
2212(define python2-pbr-minimal
2213 (package-with-python2 python-pbr-minimal))
7787ef76 2214
1ef09c0c 2215(define-public python-pbr
e25f0174 2216 (package
d2a8db92 2217 (inherit python-pbr-minimal)
e25f0174 2218 (name "python-pbr")
e25f0174
BW
2219 (arguments
2220 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2221 (propagated-inputs
d2a8db92
HG
2222 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2223 (native-inputs
e25f0174 2224 `(("python-fixtures" ,python-fixtures)
d2a8db92 2225 ;; discover, coverage, hacking, subunit
e25f0174 2226 ("python-mock" ,python-mock)
d2a8db92 2227 ("python-six" ,python-six)
e25f0174
BW
2228 ("python-sphinx" ,python-sphinx)
2229 ("python-testrepository" ,python-testrepository)
2230 ("python-testresources" ,python-testresources)
2231 ("python-testscenarios" ,python-testscenarios)
2232 ("python-testtools" ,python-testtools)
2233 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2234 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2235 (description
2236 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2237and sensible default behaviors into your setuptools run. It will set
2238versions, process requirements files and generate AUTHORS and ChangeLog file
2239from git information.
2240")))
1ef09c0c
BW
2241
2242(define-public python2-pbr
e25f0174 2243 (package-with-python2 python-pbr))
1ef09c0c 2244
7787ef76
CR
2245(define-public python-fixtures
2246 (package
2247 (name "python-fixtures")
13fcc6df 2248 (version "1.4.0")
7787ef76
CR
2249 (source
2250 (origin
2251 (method url-fetch)
13fcc6df 2252 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2253 (sha256
2254 (base32
13fcc6df 2255 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2256 (build-system python-build-system)
f6c1ef18
MB
2257 (arguments
2258 '(#:phases
2259 (modify-phases %standard-phases
2260 (replace 'check
2261 (lambda _
2262 (zero? (system* "python" "-m" "testtools.run"
2263 "fixtures.test_suite")))))))
7787ef76 2264 (propagated-inputs
ae92cadd 2265 `(("python-six" ,python-six)))
e7881f3d 2266 (native-inputs
f6c1ef18
MB
2267 `(("python-mock" ,python-mock)
2268 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2269 ("python-testtools" ,python-testtools)))
7787ef76
CR
2270 (home-page "https://launchpad.net/python-fixtures")
2271 (synopsis "Python test fixture library")
2272 (description
2273 "Fixtures provides a way to create reusable state, useful when writing
2274Python tests.")
3f641af0 2275 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2276
cd49454b
DT
2277(define-public python2-fixtures
2278 (package-with-python2 python-fixtures))
2279
b24a0c00
DT
2280(define-public python-testrepository
2281 (package
2282 (name "python-testrepository")
2283 (version "0.0.20")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (string-append
2288 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2289 version ".tar.gz"))
2290 (sha256
2291 (base32
2292 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2293 (build-system python-build-system)
90110ef9
MB
2294 (arguments
2295 ;; FIXME: Many tests are failing.
2296 '(#:tests? #f))
05de40c5 2297 (propagated-inputs
b2e66edf
HG
2298 `(("python-fixtures" ,python-fixtures)
2299 ("python-subunit" ,python-subunit)
b52ad371
HG
2300 ("python-testtools" ,python-testtools)))
2301 (native-inputs
2302 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2303 ("python-mimeparse" ,python-mimeparse)))
2304 (home-page "https://launchpad.net/testrepository")
2305 (synopsis "Database for Python test results")
2306 (description "Testrepository provides a database of test results which can
2307be used as part of a developer's workflow to check things such as what tests
2308have failed since the last commit or what tests are currently failing.")
3f641af0 2309 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2310
2311(define-public python2-testrepository
2312 (package-with-python2 python-testrepository))
2313
243a009a
DT
2314(define-public python-coverage
2315 (package
2316 (name "python-coverage")
4d4cf3dd 2317 (version "4.1")
243a009a
DT
2318 (source
2319 (origin
2320 (method url-fetch)
82a3c582 2321 (uri (pypi-uri "coverage" version))
243a009a
DT
2322 (sha256
2323 (base32
4d4cf3dd 2324 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2325 (build-system python-build-system)
bd10e677
MB
2326 (arguments
2327 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2328 '(#:tests? #f))
243a009a
DT
2329 (home-page "http://nedbatchelder.com/code/coverage")
2330 (synopsis "Code coverage measurement for Python")
2331 (description
2332 "Coverage measures code coverage, typically during test execution. It
2333uses the code analysis tools and tracing hooks provided in the Python standard
2334library to determine which lines are executable, and which have been
2335executed.")
3f641af0 2336 (license license:bsd-3)))
243a009a
DT
2337
2338(define-public python2-coverage
2339 (package-with-python2 python-coverage))
2340
12f839fd
EF
2341(define-public python-cov-core
2342 (package
2343 (name "python-cov-core")
2344 (version "1.15.0")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "cov-core" version))
2349 (sha256
2350 (base32
2351 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2352 (build-system python-build-system)
f78e1c27 2353 (propagated-inputs
12f839fd
EF
2354 `(("python-coverage" ,python-coverage)))
2355 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2356 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2357 (description
49d5e338
TGR
2358 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2359and @code{nose2-cov}. It is useful for developing coverage plugins for these
2360testing frameworks.")
f210e944 2361 (license license:expat)))
12f839fd
EF
2362
2363(define-public python2-cov-core
f210e944 2364 (package-with-python2 python-cov-core))
12f839fd 2365
041358fb
DT
2366(define-public python-discover
2367 (package
2368 (name "python-discover")
2369 (version "0.4.0")
2370 (source
2371 (origin
2372 (method url-fetch)
2373 (uri (string-append
2374 "https://pypi.python.org/packages/source/d/discover/discover-"
2375 version ".tar.gz"))
2376 (sha256
2377 (base32
2378 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2379 (build-system python-build-system)
041358fb
DT
2380 (home-page "http://pypi.python.org/pypi/discover/")
2381 (synopsis
2382 "Python test discovery for unittest")
2383 (description
2384 "Discover provides test discovery for unittest, a feature that has been
e881752c 2385backported from Python 2.7 for Python 2.4+.")
3f641af0 2386 (license license:bsd-3)))
041358fb
DT
2387
2388(define-public python2-discover
2389 (package-with-python2 python-discover))
2390
a480bc41
EB
2391(define-public behave
2392 (package
2393 (name "behave")
287cfd1a 2394 (version "1.2.5")
a480bc41
EB
2395 (source (origin
2396 (method url-fetch)
287cfd1a 2397 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2398 (sha256
2399 (base32
287cfd1a 2400 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2401 (build-system python-build-system)
f22efa01 2402 (propagated-inputs
f3b98f4f 2403 `(("python-six" ,python-six)
a480bc41
EB
2404 ("python-parse" ,python-parse)
2405 ("python-parse-type" ,python-parse-type)))
2406 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2407 ;PyHamcrest>=1.8
7bf837fd 2408 (home-page "https://github.com/behave/behave")
a480bc41
EB
2409 (synopsis "Python behavior-driven development")
2410 (description
2411 "Behave is a tool for behavior-driven development in python.
2412Behavior-driven development (or BDD) is an agile software development
2413technique that encourages collaboration between developers, QA and
2414non-technical or business participants in a software project. Behave uses
2415tests written in a natural language style, backed up by Python code.")
3f641af0 2416 (license license:x11)))
c7303d3c
DT
2417
2418(define-public python-exif-read
2419 (package
2420 (name "python-exif-read")
2a2d0981 2421 (version "2.1.2")
c7303d3c
DT
2422 (source (origin
2423 (method url-fetch)
2a2d0981 2424 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2425 (sha256
2426 (base32
2a2d0981 2427 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2428 (build-system python-build-system)
c7303d3c
DT
2429 (arguments `(#:tests? #f)) ; no tests
2430 (home-page "https://github.com/ianare/exif-py")
2431 (synopsis "Python library to extract EXIF data from image files")
2432 (description
2433 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2434files.")
3f641af0 2435 (license license:bsd-3)))
c7303d3c
DT
2436
2437(define-public python2-exif-read
2438 (package-with-python2 python-exif-read))
d5f89b22
DT
2439
2440(define-public python-pyld
2441 (package
2442 (name "python-pyld")
8957af32 2443 (version "0.7.1")
d5f89b22
DT
2444 (source (origin
2445 (method url-fetch)
af1ab773 2446 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2447 (sha256
2448 (base32
8957af32 2449 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2450 (build-system python-build-system)
d5f89b22 2451 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2452 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2453 (synopsis "Python implementation of the JSON-LD specification")
2454 (description
2455 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2456 (license license:bsd-3)))
d5f89b22
DT
2457
2458(define-public python2-pyld
2459 (package-with-python2 python-pyld))
3a1f9a68
DT
2460
2461(define-public python-certifi
2462 (package
2463 (name "python-certifi")
28576403 2464 (version "2017.1.23")
3a1f9a68
DT
2465 (source (origin
2466 (method url-fetch)
9a41f443 2467 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2468 (sha256
2469 (base32
28576403 2470 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2471 (build-system python-build-system)
28576403 2472 (home-page "https://certifi.io/")
3a1f9a68
DT
2473 (synopsis "Python CA certificate bundle")
2474 (description
2475 "Certifi is a Python library that contains a CA certificate bundle, which
2476is used by the Requests library to verify HTTPS requests.")
3f641af0 2477 (license license:asl2.0)))
3a1f9a68
DT
2478
2479(define-public python2-certifi
2480 (package-with-python2 python-certifi))
e6cfbd36 2481
12c270dd
RW
2482(define-public python-click
2483 (package
2484 (name "python-click")
d4acb6db 2485 (version "6.7")
12c270dd
RW
2486 (source
2487 (origin
2488 (method url-fetch)
375f224b 2489 (uri (pypi-uri "click" version))
12c270dd 2490 (sha256
43accb58 2491 (base32
d4acb6db 2492 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2493 (build-system python-build-system)
e2ab5a09
BW
2494 (arguments
2495 `(#:phases
2496 (modify-phases %standard-phases
2497 (add-after 'unpack 'fix-paths
2498 (lambda* (#:key inputs #:allow-other-keys)
2499 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2500 "cross-libc" "libc"))))
2501 (substitute* "click/_unicodefun.py"
2502 (("'locale'")
2503 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2504 #t))
2505 (replace 'check
2506 (lambda _
2507 (zero? (system* "make" "test")))))))
2508 (native-inputs
2509 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2510 (home-page "http://click.pocoo.org")
2511 (synopsis "Command line library for Python")
2512 (description
2513 "Click is a Python package for creating command line interfaces in a
2514composable way with as little code as necessary. Its name stands for
2515\"Command Line Interface Creation Kit\". It's highly configurable but comes
2516with sensible defaults out of the box.")
3f641af0 2517 (license license:bsd-3)))
12c270dd
RW
2518
2519(define-public python2-click
2520 (package-with-python2 python-click))
2521
addc808d
EF
2522(define-public python-wheel
2523 (package
2524 (name "python-wheel")
0e6df70b 2525 (version "0.30.0a0")
e1ba0749
EF
2526 (source
2527 (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "wheel" version))
2530 (sha256
2531 (base32
0e6df70b 2532 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2533 (build-system python-build-system)
2534 (native-inputs
f3b98f4f 2535 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2536 ("python-pytest-cov" ,python-pytest-cov)))
2537 (home-page "https://bitbucket.org/pypa/wheel/")
2538 (synopsis "Format for built Python packages")
2539 (description
2540 "A wheel is a ZIP-format archive with a specially formatted filename and
2541the @code{.whl} extension. It is designed to contain all the files for a PEP
2542376 compatible install in a way that is very close to the on-disk format. Many
2543packages will be properly installed with only the @code{Unpack} step and the
2544unpacked archive preserves enough information to @code{Spread} (copy data and
2545scripts to their final locations) at any later time. Wheel files can be
2546installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2547 (license license:expat)
2548 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2549
2550(define-public python2-wheel
8ad4ae20
LF
2551 (let ((wheel (package-with-python2
2552 (strip-python2-variant python-wheel))))
264ae686 2553 (package (inherit wheel)
8ad4ae20
LF
2554 (native-inputs `(("python2-functools32" ,python2-functools32)
2555 ,@(package-native-inputs wheel))))))
2556
addc808d 2557
ae641128 2558(define-public python-requests
e6cfbd36 2559 (package
ae641128 2560 (name "python-requests")
da5db988 2561 (version "2.13.0")
e6cfbd36
DT
2562 (source (origin
2563 (method url-fetch)
5d691657 2564 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2565 (sha256
2566 (base32
da5db988 2567 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2568 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2569 (build-system python-build-system)
cff0ccf9
MB
2570 (arguments
2571 ;; FIXME: Some tests require network access.
2572 '(#:tests? #f))
e6cfbd36
DT
2573 (home-page "http://python-requests.org/")
2574 (synopsis "Python HTTP library")
2575 (description
2576 "Requests is a Python HTTP client library. It aims to be easier to use
2577than Python’s urllib2 library.")
3f641af0 2578 (license license:asl2.0)))
864b5211 2579
e9005180
DT
2580;; Some software requires an older version of Requests, notably Docker
2581;; Compose.
2582(define-public python-requests-2.7
2583 (package (inherit python-requests)
2584 (version "2.7.0")
2585 (source (origin
2586 (method url-fetch)
2587 (uri (pypi-uri "requests" version))
2588 (sha256
2589 (base32
2590 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2591
ae641128 2592(define-public python2-requests
8ad4ae20 2593 (package-with-python2 python-requests))
ae641128 2594
ea521b42
DT
2595(define-public python-vcversioner
2596 (package
2597 (name "python-vcversioner")
538fe019 2598 (version "2.16.0.0")
ea521b42
DT
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "vcversioner" version))
2603 (sha256
2604 (base32
538fe019 2605 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2606 (build-system python-build-system)
ea521b42
DT
2607 (synopsis "Python library for version number discovery")
2608 (description "Vcversioner is a Python library that inspects tagging
2609information in a variety of version control systems in order to discover
2610version numbers.")
2611 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2612 (license license:isc)))
ea521b42
DT
2613
2614(define-public python2-vcversioner
f210e944 2615 (package-with-python2 python-vcversioner))
ae641128 2616
864b5211
DT
2617(define-public python-jsonschema
2618 (package
2619 (name "python-jsonschema")
b3667afb 2620 (version "2.5.1")
864b5211
DT
2621 (source (origin
2622 (method url-fetch)
2623 (uri
2624 (string-append
2625 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2626 version ".tar.gz"))
2627 (sha256
2628 (base32
b3667afb 2629 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2630 (build-system python-build-system)
8bcd6b91
EF
2631 (arguments
2632 '(#:phases
2633 (modify-phases %standard-phases
2634 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2635 (native-inputs
8bcd6b91
EF
2636 `(("python-nose" ,python-nose)
2637 ("python-vcversioner" ,python-vcversioner)))
2638 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2639 (synopsis "Implementation of JSON Schema for Python")
2640 (description
2641 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2642 (license license:expat)
2643 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2644
2645(define-public python2-jsonschema
a14600ec
LF
2646 (let ((jsonschema (package-with-python2
2647 (strip-python2-variant python-jsonschema))))
264ae686 2648 (package (inherit jsonschema)
eaba9d66 2649 (native-inputs
8bcd6b91 2650 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2651 ,@(package-native-inputs jsonschema)))
2652 (propagated-inputs
2653 `(("python2-functools32" ,python2-functools32))))))
850189b8 2654
9f21414d 2655(define-public python-kitchen
2656 (package
2657 (name "python-kitchen")
2658 (version "1.2.4")
2659 (source
2660 (origin
2661 (method url-fetch)
2662 (uri (pypi-uri "kitchen" version))
2663 (sha256
2664 (base32
2665 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2666 (build-system python-build-system)
2667 (propagated-inputs
2668 `(("python-chardet" ,python-chardet)))
cb542830 2669 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2670 (synopsis "Python API for snippets")
2671 (description "@code{kitchen} module provides a python API for all sorts of
2672little useful snippets of code that everybody ends up writing for their projects
2673but never seem big enough to build an independent release. Use kitchen and stop
2674cutting and pasting that code over and over.")
2675 (license (list license:lgpl2.1+
2676 ;; subprocess.py, test_subprocess.py,
2677 ;; kitchen/pycompat25/defaultdict.py:
2678 license:psfl))))
2679
2680(define-public python2-kitchen
2681 (package-with-python2 python-kitchen))
2682
850189b8
DT
2683(define-public python-unidecode
2684 (package
2685 (name "python-unidecode")
5754fe95 2686 (version "0.04.20")
850189b8
DT
2687 (source (origin
2688 (method url-fetch)
8925d4f3 2689 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2690 (sha256
2691 (base32
5754fe95 2692 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2693 (build-system python-build-system)
850189b8
DT
2694 (home-page "https://pypi.python.org/pypi/Unidecode")
2695 (synopsis "ASCII transliterations of Unicode text")
2696 (description
2697 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2698useful when integrating with legacy code that doesn't support Unicode, or for
2699ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2700machine identifiers from human-readable Unicode strings that should still be
2701somewhat intelligeble.")
3f641af0 2702 (license license:gpl2+)))
850189b8
DT
2703
2704(define-public python2-unidecode
2705 (package-with-python2 python-unidecode))
6d45fef4
DT
2706
2707(define-public python-pyjwt
2708 (package
2709 (name "python-pyjwt")
eb31d4b4 2710 (version "1.4.0")
6d45fef4
DT
2711 (source
2712 (origin
2713 (method url-fetch)
eb31d4b4 2714 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2715 (sha256
2716 (base32
eb31d4b4 2717 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2718 (build-system python-build-system)
eb31d4b4 2719 (native-inputs
130fe994
HG
2720 `(("python-pytest" ,python-pytest)
2721 ("python-pytest-cov" ,python-pytest-cov)
2722 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 2723 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
2724 (synopsis "JSON Web Token implementation in Python")
2725 (description
2726 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2727 (license license:expat)))
6d45fef4
DT
2728
2729(define-public python2-pyjwt
2730 (package-with-python2 python-pyjwt))
2731
a80488c2 2732(define-public python-pykka
2733 (package
2734 (name "python-pykka")
2735 (version "1.2.1")
2736 (source
2737 (origin
2738 (method url-fetch)
2739 (uri (pypi-uri "Pykka" version))
2740 (sha256
2741 (base32
2742 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2743 (build-system python-build-system)
2744 (native-inputs
2745 `(("python-mock" ,python-mock)
2746 ("python-nose" ,python-nose)
2747 ("python-gevent" ,python-gevent)
2748 ("python-eventlet" ,python-eventlet)))
2749 (home-page "https://www.pykka.org/")
2750 (synopsis "Pykka is a Python implementation of the actor model")
2751 (description
2752 "Pykka is a Python implementation of the actor model.
2753The actor model introduces some simple rules to control the sharing
2754of state and cooperation between execution units, which makes it
2755easier to build concurrent applications.")
2756 (license license:asl2.0)))
2757
2758(define-public python2-pykka
2759 (package-with-python2 python-pykka))
2760
2cec1f6f
DT
2761(define-public python-oauthlib
2762 (package
2763 (name "python-oauthlib")
bde2171d 2764 (version "1.0.3")
2cec1f6f
DT
2765 (source (origin
2766 (method url-fetch)
bde2171d 2767 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2768 (sha256
2769 (base32
bde2171d 2770 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2771 (build-system python-build-system)
bde2171d 2772 (native-inputs
bb06aa34 2773 `(("python-nose" ,python-nose)
c616b5d3 2774 ("python-mock" ,python-mock)
bde2171d 2775 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2776 ("python-pyjwt" ,python-pyjwt)
2777 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2778 (home-page "https://github.com/idan/oauthlib")
2779 (synopsis "OAuth implementation for Python")
2780 (description
2781 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2782OAuth request-signing logic.")
3f641af0 2783 (license license:bsd-3)
59f151ec 2784 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2785
2786(define-public python2-oauthlib
59f151ec 2787 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2788 (package
2789 (inherit base)
00e10c6e 2790 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2791 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2792
2793(define-public python-itsdangerous
2794 (package
2795 (name "python-itsdangerous")
2796 (version "0.24")
2797 (source
2798 (origin
2799 (method url-fetch)
2800 (uri (string-append
2801 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2802 version ".tar.gz"))
2803 (sha256
2804 (base32
2805 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2806 (build-system python-build-system)
7bf837fd 2807 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
2808 (synopsis "Python library for passing data to/from untrusted environments")
2809 (description
2810 "Itsdangerous provides various helpers to pass trusted data to untrusted
2811environments and back.")
f210e944 2812 (license license:bsd-3)))
ec5dbb5c
DT
2813
2814(define-public python2-itsdangerous
f210e944 2815 (package-with-python2 python-itsdangerous))
5731cae3 2816
8d12be1e
RW
2817(define-public python-pyyaml
2818 (package
2819 (name "python-pyyaml")
bf5e4bc4 2820 (version "3.12")
8d12be1e
RW
2821 (source
2822 (origin
2823 (method url-fetch)
bf5e4bc4 2824 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2825 (sha256
2826 (base32
bf5e4bc4 2827 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2828 (build-system python-build-system)
2829 (inputs
2830 `(("libyaml" ,libyaml)))
8d12be1e
RW
2831 (home-page "http://pyyaml.org/wiki/PyYAML")
2832 (synopsis "YAML parser and emitter for Python")
2833 (description
2834 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2835complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2836API, and sensible error messages. PyYAML supports standard YAML tags and
2837provides Python-specific tags that allow to represent an arbitrary Python
2838object.")
2839 (license license:expat)))
2840
2841(define-public python2-pyyaml
2842 (package-with-python2 python-pyyaml))
2843
5731cae3
DT
2844(define-public python-virtualenv
2845 (package
2846 (name "python-virtualenv")
58d04dba 2847 (version "15.0.3")
5731cae3
DT
2848 (source
2849 (origin
2850 (method url-fetch)
17804240 2851 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2852 (sha256
2853 (base32
58d04dba 2854 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2855 (build-system python-build-system)
17804240
EF
2856 (arguments
2857 `(#:phases
2858 (modify-phases %standard-phases
58d04dba
RW
2859 (replace 'check
2860 (lambda _
2861 ;; Disable failing test. See upstream bug report
2862 ;; https://github.com/pypa/virtualenv/issues/957
2863 (substitute* "tests/test_virtualenv.py"
2864 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2865 (zero? (system* "py.test")))))))
e7881f3d 2866 (native-inputs
f3b98f4f 2867 `(("python-mock" ,python-mock)
17804240 2868 ("python-pytest" ,python-pytest)))
5731cae3
DT
2869 (home-page "https://virtualenv.pypa.io/")
2870 (synopsis "Virtual Python environment builder")
2871 (description
2872 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2873 (license license:expat)))
5731cae3
DT
2874
2875(define-public python2-virtualenv
2876 (package-with-python2 python-virtualenv))
8176d4d5
DT
2877
2878(define-public python-markupsafe
2879 (package
2880 (name "python-markupsafe")
2881 (version "0.23")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (string-append
2886 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2887 version ".tar.gz"))
2888 (sha256
2889 (base32
2890 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2891 (build-system python-build-system)
7bf837fd 2892 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
2893 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2894 (description
2895 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2896for Python.")
3f641af0 2897 (license license:bsd-3)))
8176d4d5
DT
2898
2899(define-public python2-markupsafe
2900 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2901
2902(define-public python-jinja2
2903 (package
2904 (name "python-jinja2")
e98149b3 2905 (version "2.8")
fe34f0d1
DT
2906 (source
2907 (origin
2908 (method url-fetch)
e98149b3 2909 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2910 (sha256
2911 (base32
e98149b3 2912 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2913 (build-system python-build-system)
f22efa01 2914 (propagated-inputs
f3b98f4f 2915 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2916 (home-page "http://jinja.pocoo.org/")
2917 (synopsis "Python template engine")
2918 (description
2919 "Jinja2 is a small but fast and easy to use stand-alone template engine
2920written in pure Python.")
3f641af0 2921 (license license:bsd-3)))
fe34f0d1
DT
2922
2923(define-public python2-jinja2
2924 (package-with-python2 python-jinja2))
3580ab8b 2925
f7d17ac7
EE
2926(define-public python-pystache
2927 (package
2928 (name "python-pystache")
2929 (version "0.5.4")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "pystache" version))
2933 (sha256
2934 (base32
2935 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2936 (build-system python-build-system)
8bd5164b
MB
2937 (arguments
2938 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2939 (home-page "http://defunkt.io/pystache/")
2940 (synopsis "Python logic-less template engine")
2941 (description
2942 "Pystache is a Python implementation of the framework agnostic,
2943logic-free templating system Mustache.")
8bd5164b
MB
2944 (license license:expat)
2945 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2946
2947(define-public python2-pystache
8bd5164b
MB
2948 (package (inherit (package-with-python2
2949 (strip-python2-variant python-pystache)))
2950 (arguments
2951 `(#:python ,python-2
2952 #:phases
2953 (modify-phases %standard-phases
2954 (replace 'check
2955 (lambda _
2956 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2957
1285119b
RW
2958(define-public python-joblib
2959 (package
2960 (name "python-joblib")
f34ef331 2961 (version "0.10.3")
1285119b
RW
2962 (source (origin
2963 (method url-fetch)
f34ef331 2964 (uri (pypi-uri "joblib" version))
1285119b
RW
2965 (sha256
2966 (base32
6aa5f1ca
HG
2967 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2968 (modules '((guix build utils)))
2969 (snippet
2970 '(begin
2971 ;; Remove pre-compiled .pyc files from source.
2972 (for-each delete-file-recursively
2973 (find-files "." "__pycache__" #:directories? #t))
2974 (for-each delete-file (find-files "." "\\.pyc$"))
2975 #t))))
1285119b 2976 (build-system python-build-system)
a8dd960a
RW
2977 (arguments
2978 `(#:phases
2979 (modify-phases %standard-phases
2980 (add-before 'check 'disable-failing-tests
2981 (lambda _
2982 ;; This numpydoc tests fails for unknown reasons
2983 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2984 ;; This numpydoc test depends on matplotlib, which is not a
2985 ;; required input.
2986 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2987 ;; These tests fail to execute sys.executable
2988 (substitute* "joblib/test/test_parallel.py"
2989 (("import nose" line)
2990 (string-append "from nose.plugins.skip import SkipTest\n" line))
2991 (("def test_nested_parallel_warnings" line)
2992 (string-append "@SkipTest\n" line))
2993 (("def test_parallel_with_interactively_defined_functions" line)
2994 (string-append "@SkipTest\n" line)))
2995 #t)))))
f052ec9a 2996 ;; Provide nose to enable tests command
1285119b 2997 (native-inputs
f3b98f4f 2998 `(("python-nose" ,python-nose)
f34ef331
RW
2999 ("python-sphinx" ,python-sphinx)
3000 ("python-docutils" ,python-docutils)
3001 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
3002 (home-page "http://pythonhosted.org/joblib/")
3003 (synopsis "Using Python functions as pipeline jobs")
3004 (description
3005 "Joblib is a set of tools to provide lightweight pipelining in Python.
3006In particular, joblib offers: transparent disk-caching of the output values
3007and lazy re-evaluation (memoize pattern), easy simple parallel computing
3008logging and tracing of the execution.")
3f641af0 3009 (license license:bsd-3)))
1285119b
RW
3010
3011(define-public python2-joblib
3012 (package-with-python2 python-joblib))
3013
3580ab8b
DT
3014(define-public python-docutils
3015 (package
3016 (name "python-docutils")
00e0ca7c 3017 (version "0.13.1")
3580ab8b
DT
3018 (source
3019 (origin
3020 (method url-fetch)
00e0ca7c 3021 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3022 (sha256
3023 (base32
00e0ca7c 3024 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3025 (build-system python-build-system)
3580ab8b
DT
3026 (arguments
3027 '(#:tests? #f)) ; no setup.py test command
3028 (home-page "http://docutils.sourceforge.net/")
3029 (synopsis "Python Documentation Utilities")
3030 (description
3031 "Docutils is a modular system for processing documentation into useful
3032formats, such as HTML, XML, and LaTeX. For input Docutils supports
3033reStructuredText.")
3034 ;; Most of the source code is public domain, but some source files are
3035 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3036 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3037
3038(define-public python2-docutils
3039 (package-with-python2 python-docutils))
fb35b7c0
DT
3040
3041(define-public python-pygments
3042 (package
3043 (name "python-pygments")
7d2e758d 3044 (version "2.1.3")
fb35b7c0
DT
3045 (source
3046 (origin
3047 (method url-fetch)
9f442285 3048 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3049 (sha256
3050 (base32
7d2e758d 3051 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3052 (build-system python-build-system)
995cb99e
MB
3053 (arguments
3054 ;; FIXME: Tests require sphinx, which depends on this.
3055 '(#:tests? #f))
fb35b7c0
DT
3056 (home-page "http://pygments.org/")
3057 (synopsis "Syntax highlighting")
3058 (description
3059 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3060 (license license:bsd-2)))
fb35b7c0
DT
3061
3062(define-public python2-pygments
3063 (package-with-python2 python-pygments))
9dd6078d
DT
3064
3065(define-public python-sphinx
3066 (package
3067 (name "python-sphinx")
c227458a 3068 (version "1.5.1")
9dd6078d
DT
3069 (source
3070 (origin
3071 (method url-fetch)
9a8acd00 3072 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3073 (sha256
3074 (base32
c227458a 3075 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3076 (build-system python-build-system)
03cb5f9e 3077 (arguments
c227458a
DM
3078 `(#:phases
3079 (modify-phases %standard-phases
3080 (replace 'check
3081 (lambda _
3082 ;; Requires Internet access.
3083 (delete-file "tests/test_build_linkcheck.py")
3084 (zero? (system* "make" "test")))))))
f22efa01 3085 (propagated-inputs
9a8acd00
DM
3086 `(("python-imagesize" ,python-imagesize)
3087 ("python-sphinx-alabaster-theme"
3088 ,python-sphinx-alabaster-theme)
3089 ("python-babel" ,python-babel)
3090 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3091 ("python-docutils" ,python-docutils)
9a8acd00
DM
3092 ("python-jinja2" ,python-jinja2)
3093 ("python-pygments" ,python-pygments)
a10b9810 3094 ("python-requests" ,python-requests)
9a8acd00 3095 ("python-six" ,python-six)))
c227458a
DM
3096 (native-inputs
3097 `(("graphviz" ,graphviz)
3098 ("python-html5lib" ,python-html5lib)
3099 ("python-mock" ,python-mock)
a10b9810 3100 ("python-nose" ,python-nose)))
9dd6078d
DT
3101 (home-page "http://sphinx-doc.org/")
3102 (synopsis "Python documentation generator")
3103 (description "Sphinx is a tool that makes it easy to create documentation
3104for Python projects or other documents consisting of multiple reStructuredText
3105sources.")
9a8acd00
DM
3106 (license license:bsd-3)
3107 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3108
3061b331
MFM
3109(define-public python-sphinx-1.5.3
3110 (package
3111 (inherit python-sphinx)
3112 (name "python-sphinx")
3113 (version "1.5.3")
3114 (source
3115 (origin
3116 (method url-fetch)
3117 (uri (pypi-uri "Sphinx" version))
3118 (sha256
3119 (base32
3120 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3121 (native-inputs
23b9168d 3122 `(("python-pytest" ,python-pytest-3.0)
3061b331
MFM
3123 ,@(package-native-inputs python-sphinx)))))
3124
9dd6078d 3125(define-public python2-sphinx
9a8acd00
DM
3126 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3127 (package
3128 (inherit base)
3129 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3130 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3131 ,@(package-native-inputs base)))
3132 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3133 ,@(package-propagated-inputs base))))))
6888830b 3134
ad320b20
RW
3135(define-public python-sphinx-rtd-theme
3136 (package
3137 (name "python-sphinx-rtd-theme")
3138 (version "0.1.6")
3139 (source
3140 (origin
3141 (method url-fetch)
3142 (uri (string-append "https://pypi.python.org/packages/source/s/"
3143 "sphinx_rtd_theme/sphinx_rtd_theme-"
3144 version ".tar.gz"))
3145 (sha256
3146 (base32
3147 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3148 (build-system python-build-system)
9893cff3 3149 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3150 (propagated-inputs
3151 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3152 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3153 (synopsis "ReadTheDocs.org theme for Sphinx")
3154 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3155 (license license:expat)))
ad320b20
RW
3156
3157(define-public python2-sphinx-rtd-theme
3158 (package-with-python2 python-sphinx-rtd-theme))
3159
fe94cf0c
HG
3160(define-public python-rst.linker
3161 (package
3162 (name "python-rst.linker")
3163 (version "1.7")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (pypi-uri "rst.linker" version))
3168 (sha256
3169 (base32
3170 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3171 (build-system python-build-system)
3172 (propagated-inputs
22d7360b 3173 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3174 ("python-six" ,python-six)))
3175 (native-inputs
3176 `(("python-setuptools-scm" ,python-setuptools-scm)))
3177 ;; Test would require path.py, which would introduce a cyclic dependence.
3178 (arguments `(#:tests? #f))
3179 ;; Note: As of version 1.7 the documentation is not worth building.
3180 (home-page "https://github.com/jaraco/rst.linker")
3181 (synopsis "Sphinx plugin to add links and timestamps")
3182 (description "rst.linker allows to automatically replace text by a
3183reStructuredText external reference or timestamps. It's primary purpose is to
3184augment the changelog, but it can be used for other documents, too.")
3185 (license license:expat)))
3186
3187(define-public python2-rst.linker
3188 (package-with-python2 python-rst.linker))
3189
f4de5b3b
CAW
3190(define-public python-feedgenerator
3191 (package
3192 (name "python-feedgenerator")
d5c183d1 3193 (version "1.9")
f4de5b3b 3194 (source
f4de5b3b 3195 (origin
f0412aa2
EF
3196 (method url-fetch)
3197 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3198 (sha256
3199 (base32
d5c183d1 3200 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3201 (modules '((guix build utils)))
3202 (snippet
3203 '(begin
3204 ;; Remove pre-compiled .pyc files from source.
3205 (for-each delete-file-recursively
3206 (find-files "." "__pycache__" #:directories? #t))
3207 (for-each delete-file (find-files "." "\\.pyc$"))
3208 #t))))
f4de5b3b 3209 (build-system python-build-system)
dae73d9b 3210 (propagated-inputs
f3b98f4f 3211 `(("python-pytz" ,python-pytz)
f4de5b3b 3212 ("python-six" ,python-six)))
f0412aa2 3213 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3214 (synopsis
3215 "Standalone version of Django's Atom/RSS feed generator")
3216 (description
3217 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3218which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3219 (license license:bsd-3)))
f4de5b3b
CAW
3220
3221(define-public python2-feedgenerator
3222 (package-with-python2 python-feedgenerator))
3223
59ad30e3
CAW
3224(define-public python-blinker
3225 (package
3226 (name "python-blinker")
7fb9ff4d 3227 (version "1.4")
59ad30e3
CAW
3228 (source
3229 (origin
3230 (method url-fetch)
7fb9ff4d 3231 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3232 (sha256
3233 (base32
7fb9ff4d 3234 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3235 (build-system python-build-system)
59ad30e3
CAW
3236 (home-page "http://pythonhosted.org/blinker/")
3237 (synopsis "Fast, simple object-to-object and broadcast signaling")
3238 (description
3239 "Blinker provides a fast dispatching system that allows any number of
3240interested parties to subscribe to events, or \"signals\".")
3241 (license license:expat)))
3242
3243(define-public python2-blinker
3244 (package-with-python2 python-blinker))
3245
b8050e71
CAW
3246(define-public pelican
3247 (package
3248 (name "pelican")
11f97c27 3249 (version "3.6.3")
b8050e71
CAW
3250 (source
3251 (origin
3252 (method url-fetch)
11f97c27 3253 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3254 (sha256
3255 (base32
11f97c27 3256 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3257 (build-system python-build-system)
f22efa01 3258 (propagated-inputs
b8050e71
CAW
3259 `(("python-feedgenerator" ,python-feedgenerator)
3260 ("python-jinja2" ,python-jinja2)
3261 ("python-pygments" ,python-pygments)
3262 ("python-docutils" ,python-docutils)
3263 ("python-pytz" ,python-pytz)
3264 ("python-blinker" ,python-blinker)
3265 ("python-unidecode" ,python-unidecode)
3266 ("python-six" ,python-six)
22d7360b 3267 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3268 (home-page "http://getpelican.com/")
3269 (arguments
3270 `(;; XXX Requires a lot more packages to do unit tests :P
3271 #:tests? #f
3272 #:phases (modify-phases %standard-phases
3273 (add-before
3274 'install 'adjust-requires
3275 ;; Since feedgenerator is installed from git, it doesn't
3276 ;; conform to the version requirements.
3277 ;;
3278 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3279 ;; version requirement so setuptools doesn't get confused.
3280 (lambda _
3281 (substitute* "setup.py"
3282 (("['\"]feedgenerator.*?['\"]")
3283 "'feedgenerator'")))))))
3284 (synopsis "Python-based static site publishing system")
3285 (description
3286 "Pelican is a tool to generate a static blog from reStructuredText,
3287Markdown input files, and more. Pelican uses Jinja2 for templating
3288and is very extensible.")
3f641af0 3289 (license license:agpl3+)))
b8050e71 3290
240ca4aa
RW
3291(define-public python-scikit-learn
3292 (package
3293 (name "python-scikit-learn")
8e401ab6 3294 (version "0.18.1")
240ca4aa
RW
3295 (source
3296 (origin
3297 (method url-fetch)
3298 (uri (string-append
3299 "https://github.com/scikit-learn/scikit-learn/archive/"
3300 version ".tar.gz"))
7e21b9fb 3301 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3302 (sha256
3303 (base32
8e401ab6 3304 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3305 (build-system python-build-system)
3306 (arguments
3307 `(#:phases
4d25c486
MB
3308 (modify-phases %standard-phases
3309 (delete 'check)
3310 (add-after 'install 'check
3311 ;; Running tests from the source directory requires
3312 ;; an "inplace" build with paths relative to CWD.
3313 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3314 ;; Use the installed version instead.
3315 (lambda* (#:key inputs outputs #:allow-other-keys)
3316 (add-installed-pythonpath inputs outputs)
3317 ;; some tests require access to "$HOME"
3318 (setenv "HOME" "/tmp")
3319 ;; Step out of the source directory just to be sure.
3320 (chdir "..")
3321 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3322 (inputs
328bb95d
HG
3323 `(("openblas" ,openblas)))
3324 (native-inputs
8e401ab6
RW
3325 `(("python-nose" ,python-nose)
3326 ("python-cython" ,python-cython)))
240ca4aa
RW
3327 (propagated-inputs
3328 `(("python-numpy" ,python-numpy)
3329 ("python-scipy" ,python-scipy)))
3330 (home-page "http://scikit-learn.org/")
3331 (synopsis "Machine Learning in Python")
3332 (description
3333 "Scikit-learn provides simple and efficient tools for data
3334mining and data analysis.")
1b5241c5 3335 (license license:bsd-3)))
240ca4aa
RW
3336
3337(define-public python2-scikit-learn
1b5241c5 3338 (package-with-python2 python-scikit-learn))
240ca4aa 3339
12f8f9bb
RW
3340(define-public python-scikit-image
3341 (package
3342 (name "python-scikit-image")
3343 (version "0.11.3")
3344 (source
3345 (origin
3346 (method url-fetch)
3347 (uri (string-append
3348 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3349 version ".tar.gz"))
3350 (sha256
3351 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3352 (build-system python-build-system)
9026e689
MB
3353 (arguments
3354 ;; TODO: Some tests require running X11 server. Disable them?
3355 '(#:tests? #f))
b83e2333 3356 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3357 (propagated-inputs
3358 `(("python-matplotlib" ,python-matplotlib)
3359 ("python-networkx" ,python-networkx)
12f8f9bb 3360 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3361 ("python-pillow" ,python-pillow)))
3362 (native-inputs
b83e2333
HG
3363 `(("python-numpy" ,python-numpy)
3364 ("python-cython" ,python-cython)
3365 ("python-six" ,python-six)))
12f8f9bb
RW
3366 (home-page "http://scikit-image.org/")
3367 (synopsis "Image processing in Python")
3368 (description
e881752c 3369 "Scikit-image is a collection of algorithms for image processing.")
12733594 3370 (license license:bsd-3)))
12f8f9bb
RW
3371
3372(define-public python2-scikit-image
12733594 3373 (package-with-python2 python-scikit-image))
12f8f9bb 3374
5394a6a6
RW
3375(define-public python-redis
3376 (package
3377 (name "python-redis")
911a8faf 3378 (version "2.10.5")
5394a6a6
RW
3379 (source
3380 (origin
3381 (method url-fetch)
911a8faf 3382 (uri (pypi-uri "redis" version))
5394a6a6 3383 (sha256
911a8faf 3384 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3385 (build-system python-build-system)
3386 ;; Tests require a running Redis server
3387 (arguments '(#:tests? #f))
cf8124b0
HG
3388 ;; As long as we are not running test, we do not need this input :-)
3389 ;;(native-inputs
3390 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3391 (home-page "https://github.com/andymccurdy/redis-py")
3392 (synopsis "Redis Python client")
3393 (description
3394 "This package provides a Python interface to the Redis key-value store.")
3395 (license license:expat)))
3396
3397(define-public python2-redis
3398 (package-with-python2 python-redis))
3399
748cef5b
RW
3400(define-public python-rq
3401 (package
3402 (name "python-rq")
eed206cb 3403 (version "0.7.1")
748cef5b
RW
3404 (source
3405 (origin
3406 (method url-fetch)
eed206cb 3407 (uri (pypi-uri "rq" version))
748cef5b 3408 (sha256
eed206cb 3409 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3410 (build-system python-build-system)
3411 (propagated-inputs
3412 `(("python-click" ,python-click)
3413 ("python-redis" ,python-redis)))
748cef5b
RW
3414 (home-page "http://python-rq.org/")
3415 (synopsis "Simple job queues for Python")
3416 (description
3417 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3418processing them in the background with workers. It is backed by Redis and it
3419is designed to have a low barrier to entry.")
3f641af0 3420 (license license:bsd-2)))
748cef5b
RW
3421
3422(define-public python2-rq
3423 (package-with-python2 python-rq))
3424
6888830b
FB
3425(define-public python-cython
3426 (package
3427 (name "python-cython")
cd158a2b 3428 (version "0.25.2")
6888830b
FB
3429 (source
3430 (origin
3431 (method url-fetch)
56918e26 3432 (uri (pypi-uri "Cython" version))
a3dea991 3433 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
6888830b
FB
3434 (sha256
3435 (base32
cd158a2b 3436 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
6888830b
FB
3437 (build-system python-build-system)
3438 ;; we need the full python package and not just the python-wrapper
3439 ;; because we need libpython3.3m.so
3440 (inputs
3441 `(("python" ,python)))
3442 (arguments
3443 `(#:phases
b92f651b
EF
3444 (modify-phases %standard-phases
3445 (add-before 'check 'set-HOME
3446 ;; some tests require access to "$HOME/.cython"
3447 (lambda _ (setenv "HOME" "/tmp")))
3448 (replace 'check
3449 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3450 (home-page "http://cython.org/")
3451 (synopsis "C extensions for Python")
3452 (description "Cython is an optimising static compiler for both the Python
3453programming language and the extended Cython programming language. It makes
3454writing C extensions for Python as easy as Python itself.")
3f641af0 3455 (license license:asl2.0)
48b311b1 3456 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3457
3458(define-public python2-cython
48b311b1
LC
3459 (package (inherit (package-with-python2
3460 (strip-python2-variant python-cython)))
6888830b
FB
3461 (name "python2-cython")
3462 (inputs
3463 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3464
ee5fb7ee
AV
3465;; The RPython toolchain currently does not support Python 3.
3466(define-public python2-rpython
3467 (package
3468 (name "python2-rpython")
3469 (version "0.1.4")
3470 (source
3471 (origin
3472 (method url-fetch)
3473 (uri (pypi-uri "rpython" version))
3474 (sha256
3475 (base32
3476 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3477 (build-system python-build-system)
3478 (arguments `(#:python ,python-2))
3479 (native-inputs
f3b98f4f 3480 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3481 (home-page "https://rpython.readthedocs.org")
3482 (synopsis "Framework for implementing interpreters and virtual machines")
3483 (description "RPython is a translation and support framework for
3484producing implementations of dynamic languages, emphasizing a clean separation
3485between language specification and implementation aspects.")
3486 (license license:expat)))
3487
7ccb71e0 3488(define-public python-numpy
0da98533 3489 (package
7ccb71e0
TD
3490 (name "python-numpy")
3491 (version "1.12.0")
0da98533
FB
3492 (source
3493 (origin
3494 (method url-fetch)
7ccb71e0
TD
3495 (uri (string-append
3496 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3497 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3498 (sha256
3499 (base32
7ccb71e0 3500 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3501 (build-system python-build-system)
3502 (inputs
328bb95d 3503 `(("openblas" ,openblas)
cba256f8 3504 ("lapack" ,lapack)))
0da98533 3505 (native-inputs
7ccb71e0
TD
3506 `(("python-cython" ,python-cython)
3507 ("python-nose" ,python-nose)
2efabc55 3508 ("gfortran" ,gfortran)))
0da98533
FB
3509 (arguments
3510 `(#:phases
2efabc55
HG
3511 (modify-phases %standard-phases
3512 (add-before 'build 'set-environment-variables
3513 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3514 (call-with-output-file "site.cfg"
3515 (lambda (port)
cba256f8
RW
3516 (format port
3517 "[openblas]
dbdfe515
RW
3518libraries = openblas
3519library_dirs = ~a/lib
3520include_dirs = ~a/include
cba256f8 3521
2efabc55
HG
3522# backslash-n to make emacs happy
3523\n[lapack]
cba256f8
RW
3524lapack_libs = lapack
3525library_dirs = ~a/lib
3526include_dirs = ~a/include
3527"
3528 (assoc-ref inputs "openblas")
3529 (assoc-ref inputs "openblas")
3530 (assoc-ref inputs "lapack")
3531 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3532 ;; Use "gcc" executable, not "cc".
3533 (substitute* "numpy/distutils/system_info.py"
3534 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3535 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3536 #t))
6a843168
FB
3537 ;; Tests can only be run after the library has been installed and not
3538 ;; within the source directory.
2efabc55
HG
3539 (delete 'check)
3540 (add-after 'install 'check
3541 (lambda* (#:key outputs inputs #:allow-other-keys)
3542 ;; Make installed package available for running the tests
3543 (add-installed-pythonpath inputs outputs)
6a843168 3544 (with-directory-excursion "/tmp"
89b5c60e 3545 (zero? (system* "python" "-c"
2efabc55 3546 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3547 (home-page "http://www.numpy.org/")
3548 (synopsis "Fundamental package for scientific computing with Python")
3549 (description "NumPy is the fundamental package for scientific computing
e881752c 3550with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3551object, sophisticated (broadcasting) functions, tools for integrating C/C++
3552and Fortran code, useful linear algebra, Fourier transform, and random number
3553capabilities.")
3f641af0 3554 (license license:bsd-3)))
0da98533 3555
7ccb71e0
TD
3556(define-public python2-numpy
3557 (package-with-python2 python-numpy))
15bfe6d6 3558
460fccd4 3559(define-public python-munch
3560 (package
3561 (name "python-munch")
3562 (version "2.0.4")
3563 (source
3564 (origin
3565 (method url-fetch)
3566 (uri (pypi-uri "munch" version))
3567 (sha256
3568 (base32
3569 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3570 (build-system python-build-system)
3571 (home-page "https://github.com/Infinidat/munch")
3572 (synopsis "Dot-accessible dictionary")
3573 (description "Munch is a dot-accessible dictionary similar to JavaScript
3574objects.")
3575 (license license:expat)))
3576
3577(define-public python2-munch
3578 (package-with-python2 python-munch))
3579
3a1bfe18
RW
3580(define-public python2-fastlmm
3581 (package
3582 (name "python2-fastlmm")
154d0016 3583 (version "0.2.21")
3a1bfe18
RW
3584 (source
3585 (origin
3586 (method url-fetch)
b074e7d4 3587 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3588 (sha256
3589 (base32
154d0016 3590 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3591 (build-system python-build-system)
3592 (arguments
3593 `(#:python ,python-2)) ; only Python 2.7 is supported
3594 (propagated-inputs
3595 `(("python2-numpy" ,python2-numpy)
3596 ("python2-scipy" ,python2-scipy)
3597 ("python2-matplotlib" ,python2-matplotlib)
3598 ("python2-pandas" ,python2-pandas)
3599 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3600 ("python2-pysnptools" ,python2-pysnptools)))
3601 (native-inputs
3602 `(("unzip" ,unzip)
2efabc55 3603 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3604 ("python2-mock" ,python2-mock)
3605 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3606 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3607 (synopsis "Perform genome-wide association studies on large data sets")
3608 (description
3609 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3610Models, is a program for performing both single-SNP and SNP-set genome-wide
3611association studies (GWAS) on extremely large data sets.")
3f641af0 3612 (license license:asl2.0)))
3a1bfe18 3613
7ccb71e0
TD
3614(define-public python-numpy-documentation
3615 (package
3616 (name "python-numpy-documentation")
3617 (version (package-version python-numpy))
3618 (source (package-source python-numpy))
3619 (build-system python-build-system)
2ee8869a 3620 (native-inputs
7ccb71e0
TD
3621 `(("python-matplotlib" ,python-matplotlib)
3622 ("python-numpy" ,python-numpy)
3623 ("pkg-config" ,pkg-config)
2efabc55
HG
3624 ("python-sphinx" ,python-sphinx)
3625 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3626 ("texlive" ,texlive)
3627 ("texinfo" ,texinfo)
3628 ("perl" ,perl)
7ccb71e0
TD
3629 ("scipy-sphinx-theme"
3630 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3631 (method git-fetch)
3632 (uri (git-reference
3633 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3634 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3635 (sha256
3636 (base32
67416769 3637 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3638 ,@(package-native-inputs python-numpy)))
2ee8869a 3639 (arguments
7ccb71e0
TD
3640 `(#:tests? #f ; we're only generating the documentation
3641 #:phases
3642 (modify-phases %standard-phases
3643 (delete 'build)
3644 (replace 'install
3645 (lambda* (#:key inputs outputs #:allow-other-keys)
3646 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3647 (doc (string-append
3648 data "/doc/" ,name "-"
3649 ,(package-version python-numpy)))
3650 (info-reader (string-append data "/info"))
3651 (html (string-append doc "/html"))
3652 (scipy-sphinx-theme "scipy-sphinx-theme")
3653 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3654 (pyver ,(string-append "PYVER=")))
3655 (with-directory-excursion "doc"
3656 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3657 (mkdir-p html)
3658 (system* "make" "html" pyver)
3659 (system* "make" "latex" "PAPER=a4" pyver)
3660 (system* "make" "-C" "build/latex"
3661 "all-pdf" "PAPER=a4" pyver)
3662 ;; FIXME: Generation of the info file fails.
3663 ;; (system* "make" "info" pyver)
3664 ;; (mkdir-p info)
3665 ;; (copy-file "build/texinfo/numpy.info"
3666 ;; (string-append info "/numpy.info"))
3667 (for-each (lambda (file)
3668 (copy-file (string-append "build/latex" file)
3669 (string-append doc file)))
3670 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3671 (with-directory-excursion "build/html"
3672 (for-each (lambda (file)
3673 (let* ((dir (dirname file))
3674 (tgt-dir (string-append html "/" dir)))
3675 (unless (equal? "." dir)
3676 (mkdir-p tgt-dir))
3677 (install-file file html)))
3678 (find-files "." ".*")))))
3679 #t)))))
3680 (home-page (package-home-page python-numpy))
3681 (synopsis "Documentation for the python-numpy package")
3682 (description (package-description python-numpy))
3683 (license (package-license python-numpy))))
2ee8869a 3684
7ccb71e0
TD
3685(define-public python2-numpy-documentation
3686 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3687 (package
3688 (inherit numpy-documentation)
3689 (native-inputs `(("python2-functools32" ,python2-functools32)
3690 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3691
0151a8df 3692(define-public python-pygit2
3693 (package
3694 (name "python-pygit2")
022c9772 3695 (version "0.25.0")
0151a8df 3696 (source
3697 (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "pygit2" version))
3700 (sha256
3701 (base32
bb6043fe
MB
3702 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3703 (patches
3704 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3705 (build-system python-build-system)
3706 (propagated-inputs
3707 `(("python-six" ,python-six)
3708 ("python-cffi" ,python-cffi)
3709 ("libgit2" ,libgit2)
3710 ("python-tox" ,python-tox)))
3711 (home-page "https://github.com/libgit2/pygit2")
3712 (synopsis "Python bindings for libgit2")
3713 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3714library, libgit2 implements Git plumbing.")
3715 ;; GPL2.0 only, with linking exception.
3716 (license license:gpl2)))
3717
3718(define-public python2-pygit2
3719 (package-with-python2 python-pygit2))
3720
15bfe6d6
FB
3721(define-public python-pyparsing
3722 (package
3723 (name "python-pyparsing")
e0669289 3724 (version "2.0.3")
15bfe6d6
FB
3725 (source
3726 (origin
3727 (method url-fetch)
de67e922
LF
3728 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3729 "/pyparsing-" version
15bfe6d6
FB
3730 "/pyparsing-" version ".tar.gz"))
3731 (sha256
3732 (base32
e0669289 3733 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3734 (build-system python-build-system)
3735 (outputs '("out" "doc"))
3736 (arguments
3737 `(#:tests? #f ; no test target
3738 #:modules ((guix build python-build-system)
3739 (guix build utils))
3740 #:phases
3741 (alist-cons-after
3742 'install 'install-doc
3743 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3744 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3745 "/share/doc/" ,name "-" ,version))
3746 (html-doc (string-append doc "/html"))
3747 (examples (string-append doc "/examples")))
3748 (mkdir-p html-doc)
3749 (mkdir-p examples)
89b5c60e 3750 (for-each
15bfe6d6 3751 (lambda (dir tgt)
89b5c60e 3752 (map (lambda (file)
96c46210 3753 (install-file file tgt))
15bfe6d6
FB
3754 (find-files dir ".*")))
3755 (list "docs" "htmldoc" "examples")
3756 (list doc html-doc examples))))
3757 %standard-phases)))
3758 (home-page "http://pyparsing.wikispaces.com")
3759 (synopsis "Python parsing class library")
3760 (description
3761 "The pyparsing module is an alternative approach to creating and
3762executing simple grammars, vs. the traditional lex/yacc approach, or the use
3763of regular expressions. The pyparsing module provides a library of classes
3764that client code uses to construct the grammar directly in Python code.")
bd3fa666 3765 (license license:expat)))
15bfe6d6
FB
3766
3767(define-public python2-pyparsing
3768 (package-with-python2 python-pyparsing))
3769
ec00de35
FB
3770(define-public python-numpydoc
3771 (package
3772 (name "python-numpydoc")
3773 (version "0.5")
3774 (source
3775 (origin
3776 (method url-fetch)
89b5c60e 3777 (uri (string-append
ec00de35
FB
3778 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3779 version ".tar.gz"))
3780 (sha256
3781 (base32
5e4d8f67
AE
3782 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3783 (modules '((guix build utils)))
3784 (snippet
3785 '(begin
3786 ;; Drop a test requiring matplotlib, which we cannot add as an
3787 ;; input since it would create a circular dependency: Extend the
3788 ;; test for Python 3, where it is already dropped, to Python 2.
3789 (substitute* "numpydoc/tests/test_plot_directive.py"
3790 (("3") "2"))))))
ec00de35 3791 (build-system python-build-system)
fe4a8da4 3792 (propagated-inputs
213d1745
HG
3793 `(("python-sphinx" ,python-sphinx)))
3794 (native-inputs
3795 `(("python-nose" ,python-nose)))
ec00de35
FB
3796 (home-page "https://pypi.python.org/pypi/numpydoc")
3797 (synopsis
3798 "Numpy's Sphinx extensions")
3799 (description
3800 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3801 (license license:bsd-2)))
ec00de35
FB
3802
3803(define-public python2-numpydoc
5e4d8f67 3804 (package-with-python2 python-numpydoc))
1c65314c 3805
1e656049
RW
3806(define-public python-numexpr
3807 (package
3808 (name "python-numexpr")
2ee57340 3809 (version "2.6.1")
1e656049
RW
3810 (source
3811 (origin
3812 (method url-fetch)
26112c0a 3813 (uri (pypi-uri "numexpr" version))
1e656049
RW
3814 (sha256
3815 (base32
2ee57340 3816 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3817 (build-system python-build-system)
3818 (arguments `(#:tests? #f)) ; no tests included
3819 (propagated-inputs
3820 `(("python-numpy" ,python-numpy)))
3821 (home-page "https://github.com/pydata/numexpr")
3822 (synopsis "Fast numerical expression evaluator for NumPy")
3823 (description
3824 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3825expressions that operate on arrays are accelerated and use less memory than
3826doing the same calculation in Python. In addition, its multi-threaded
3827capabilities can make use of all your cores, which may accelerate
3828computations, most specially if they are not memory-bounded (e.g. those using
3829transcendental functions).")
f210e944 3830 (license license:expat)))
1e656049
RW
3831
3832(define-public python2-numexpr
f210e944 3833 (package-with-python2 python-numexpr))
1e656049 3834
361d982c
MB
3835(define-public python-cycler
3836 (package
3837 (name "python-cycler")
3838 (version "0.10.0")
3839 (source (origin
3840 (method url-fetch)
3841 (uri (pypi-uri "cycler" version))
3842 (sha256
3843 (base32
3844 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3845 (build-system python-build-system)
3846 (arguments
3847 ;; XXX: The current version requires 'coveralls' which we don't have.
3848 ;; Enable this for the next release which uses 'python-pytest'.
3849 '(#:tests? #f))
3850 (propagated-inputs
3851 `(("python-six" ,python-six)))
3852 (home-page "http://matplotlib.org/cycler/")
3853 (synopsis "Composable keyword argument iterator")
3854 (description
3855 "When using @code{matplotlib} and plotting more than one line, it is
3856common to want to be able to want to be able to cycle over one or more artist
3857styles; but the plotting logic can quickly become involved.
3858To address this and enable easy cycling over arbitrary @code{kwargs}, the
3859@code{Cycler} class was developed.")
3860 (license license:bsd-3)))
3861
3862(define-public python2-cycler
3863 (package-with-python2 python-cycler))
3864
2aa6d3ae
TD
3865(define-public python-colorspacious
3866 (package
3867 (name "python-colorspacious")
3868 (version "1.1.0")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3873 version ".tar.gz"))
3874 (file-name (string-append name "-" version))
3875 (sha256
3876 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3877 (build-system python-build-system)
3878 (propagated-inputs
3879 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
3880 (native-inputs
3881 `(("python-nose" ,python-nose)))
3882 (arguments
3883 `(#:phases
3884 (modify-phases %standard-phases
3885 (replace 'check
3886 (lambda _
3887 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
3888 (home-page "https://github.com/njsmith/colorspacious")
3889 (synopsis "Python library for colorspace conversions")
3890 (description "@code{colorspacious} is a Python library that lets you
3891convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3892 (license license:expat)))
3893
3894(define-public python2-colorspacious
3895 (package-with-python2 python-colorspacious))
3896
1c65314c
FB
3897(define-public python-matplotlib
3898 (package
3899 (name "python-matplotlib")
4535a93a 3900 (version "2.0.0")
1c65314c
FB
3901 (source
3902 (origin
3903 (method url-fetch)
4535a93a
TD
3904 (uri (string-append
3905 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3906 (file-name (string-append name "-" version ".tar.gz"))
1c65314c
FB
3907 (sha256
3908 (base32
4535a93a 3909 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
1c65314c 3910 (build-system python-build-system)
25f9a068 3911 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
3912 `(("python-cycler" ,python-cycler)
3913 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
3914 ("python-pygobject" ,python-pygobject)
3915 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3916 ("python-tkinter" ,python "tk")
22d7360b 3917 ("python-dateutil" ,python-dateutil)
7ccb71e0 3918 ("python-numpy" ,python-numpy)
ca33a3ad
HG
3919 ("python-pillow" ,python-pillow)
3920 ("python-pytz" ,python-pytz)
3921 ("python-six" ,python-six)
25f9a068
FB
3922 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3923 ;; from 'gtk+') provides the required 'typelib' files used by
3924 ;; 'gobject-introspection'. The location of these files is set with the
3925 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3926 ;; is done automatically by a 'native-search-path' procedure. However,
3927 ;; at run-time the user must set this variable as follows:
3928 ;;
3929 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3930 ("gtk+" ,gtk+)
3931 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3932 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3933 ;; object. For this reason we need to import both libraries.
3934 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3935 ("python-pycairo" ,python-pycairo)
3936 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3937 (inputs
ca33a3ad 3938 `(("libpng" ,libpng)
1c65314c
FB
3939 ("imagemagick" ,imagemagick)
3940 ("freetype" ,freetype)
25f9a068
FB
3941 ("cairo" ,cairo)
3942 ("glib" ,glib)
1c65314c 3943 ;; FIXME: Add backends when available.
1c65314c 3944 ;("python-wxpython" ,python-wxpython)
4535a93a 3945 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
3946 ("tcl" ,tcl)
3947 ("tk" ,tk)))
1c65314c
FB
3948 (native-inputs
3949 `(("pkg-config" ,pkg-config)
ca33a3ad 3950 ("python-nose" ,python-nose)
4535a93a 3951 ("python-mock" ,python-mock)))
1c65314c
FB
3952 (arguments
3953 `(#:phases
42b7009a
DM
3954 (modify-phases %standard-phases
3955 (add-before 'build 'configure-environment
3956 (lambda* (#:key outputs inputs #:allow-other-keys)
3957 (let ((cairo (assoc-ref inputs "cairo"))
3958 (gtk+ (assoc-ref inputs "gtk+")))
3959 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3960 ;; has not effect.
3961 (setenv "LD_LIBRARY_PATH"
3962 (string-append cairo "/lib:" gtk+ "/lib"))
3963 (setenv "HOME" (getcwd))
3964 (call-with-output-file "setup.cfg"
3965 (lambda (port)
3966 (format port "[directories]~%
1bbc659f 3967basedirlist = ~a,~a~%
57b7b8cd 3968 [rc_options]~%
1bbc659f
FB
3969backend = TkAgg~%"
3970 (assoc-ref inputs "tcl")
4535a93a
TD
3971 (assoc-ref inputs "tk")))))
3972 #t)))))
1c65314c
FB
3973 (home-page "http://matplotlib.org")
3974 (synopsis "2D plotting library for Python")
3975 (description
3976 "Matplotlib is a Python 2D plotting library which produces publication
3977quality figures in a variety of hardcopy formats and interactive environments
3978across platforms. Matplotlib can be used in Python scripts, the python and
3979ipython shell, web application servers, and six graphical user interface
3980toolkits.")
3f641af0 3981 (license license:psfl)
57b7b8cd 3982 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3983
764c077b 3984(define-public python2-matplotlib
57b7b8cd
LC
3985 (let ((matplotlib (package-with-python2
3986 (strip-python2-variant python-matplotlib))))
764c077b 3987 (package (inherit matplotlib)
88c26834
AE
3988 ;; Make sure to use special packages for Python 2 instead
3989 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3990 (propagated-inputs
7ca0dbc3 3991 `(("python2-pycairo" ,python2-pycairo)
4535a93a 3992 ("python2-functools32" ,python2-functools32)
764c077b 3993 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 3994 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
3995 ("python2-tkinter" ,python-2 "tk")
3996 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3997 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3998
4535a93a
TD
3999(define-public python-matplotlib-documentation
4000 (package
4001 (name "python-matplotlib-documentation")
4002 (version (package-version python-matplotlib))
4003 (source (package-source python-matplotlib))
4004 (build-system python-build-system)
4005 (native-inputs
4006 `(("python-matplotlib" ,python-matplotlib)
4007 ("python-colorspacious" ,python-colorspacious)
4008 ("python-sphinx" ,python-sphinx)
4009 ("python-numpydoc" ,python-numpydoc)
4010 ("python-ipython" ,python-ipython)
1eaaea41
TD
4011 ("python-mock" ,python-mock)
4012 ("graphviz" ,graphviz)
4535a93a
TD
4013 ("texlive" ,texlive)
4014 ("texinfo" ,texinfo)
4015 ,@(package-native-inputs python-matplotlib)))
4016 (arguments
4017 `(#:tests? #f ; we're only generating documentation
4018 #:phases
4019 (modify-phases %standard-phases
1eaaea41
TD
4020 (replace 'build
4021 (lambda _
4022 (chdir "doc")
4023 ;; Produce pdf in 'A4' format.
4024 (substitute* "conf.py"
4025 (("latex_paper_size = 'letter'") "")
4026 ;; latex_paper_size is deprecated -> set paper size using
4027 ;; latex_elements
4028 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4029 ;; insert at a point where latex_elements{} is defined:
4030 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4031 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4032 (replace 'install
42b7009a 4033 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4034 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4035 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4036 (info (string-append data "/info"))
4037 (html (string-append doc "/html")))
1eaaea41
TD
4038 (mkdir-p html)
4039 (mkdir-p info)
4040 (copy-recursively "build/html" html)
4041 (symlink (string-append html "/_images")
4042 (string-append info "/matplotlib-figures"))
4043 (with-directory-excursion "build/texinfo"
4044 (substitute* "matplotlib.texi"
4045 (("@image\\{([^,]*)" all file)
4046 (string-append "@image{matplotlib-figures/" file)))
18b31516 4047 (symlink (string-append html "/_images")
1eaaea41
TD
4048 "./matplotlib-figures")
4049 (system* "makeinfo" "--no-split"
4050 "-o" "matplotlib.info" "matplotlib.texi"))
4051 (copy-file "build/texinfo/matplotlib.info"
4052 (string-append info "/matplotlib.info"))
4053 (copy-file "build/latex/Matplotlib.pdf"
4054 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4055 #t)))))
4056 (home-page (package-home-page python-matplotlib))
4057 (synopsis "Documentation for the python-matplotlib package")
4058 (description (package-description python-matplotlib))
4059 (license (package-license python-matplotlib))))
1c65314c 4060
4535a93a
TD
4061(define-public python2-matplotlib-documentation
4062 (package-with-python2 python-matplotlib-documentation))
94914805 4063
0dde6232
RW
4064(define-public python2-pysnptools
4065 (package
4066 (name "python2-pysnptools")
a800018e 4067 (version "0.3.9")
0dde6232
RW
4068 (source
4069 (origin
4070 (method url-fetch)
3f2e9675 4071 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4072 (sha256
4073 (base32
a800018e 4074 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4075 (build-system python-build-system)
4076 (arguments
4077 `(#:python ,python-2)) ; only Python 2.7 is supported
4078 (propagated-inputs
4079 `(("python2-numpy" ,python2-numpy)
4080 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4081 ("python2-pandas" ,python2-pandas)))
4082 (native-inputs
4083 `(("python2-cython" ,python2-cython)))
0dde6232 4084 (native-inputs
f3b98f4f 4085 `(("unzip" ,unzip)))
0dde6232
RW
4086 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4087 (synopsis "Library for reading and manipulating genetic data")
4088 (description
4089 "PySnpTools is a library for reading and manipulating genetic data. It
4090can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4091those files. It can also efficiently manipulate ranges of integers using set
4092operators such as union, intersection, and difference.")
3f641af0 4093 (license license:asl2.0)))
0dde6232 4094
c9b1b4f9
RW
4095(define-public python-rpy2
4096 (package
4097 (name "python-rpy2")
ec3bcbc7 4098 (version "2.7.6")
c9b1b4f9
RW
4099 (source
4100 (origin
4101 (method url-fetch)
ec3bcbc7 4102 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4103 (sha256
4104 (base32
ec3bcbc7 4105 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4106 (build-system python-build-system)
444464ec
MB
4107 (arguments
4108 '(#:phases
4109 (modify-phases %standard-phases
4110 (delete 'check)
4111 (add-after 'install 'check
4112 (lambda* (#:key outputs inputs #:allow-other-keys)
4113 ;; It's easier to run tests after install.
4114 ;; Make installed package available for running the tests
4115 (add-installed-pythonpath inputs outputs)
4116 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4117 (propagated-inputs
4118 `(("python-six" ,python-six)))
c9b1b4f9 4119 (inputs
482d9591 4120 `(("readline" ,readline)
c9b1b4f9
RW
4121 ("icu4c" ,icu4c)
4122 ("pcre" ,pcre)
2d7c4ae3 4123 ("r-minimal" ,r-minimal)
aeb64f3c 4124 ("r-survival" ,r-survival)))
c9b1b4f9 4125 (native-inputs
f3b98f4f 4126 `(("zlib" ,zlib)))
c9b1b4f9
RW
4127 (home-page "http://rpy.sourceforge.net/")
4128 (synopsis "Python interface to the R language")
4129 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4130low-level interface to R from Python, a proposed high-level interface,
4131including wrappers to graphical libraries, as well as R-like structures and
4132functions.")
3f641af0 4133 (license license:gpl3+)))
c9b1b4f9
RW
4134
4135(define-public python2-rpy2
4136 (let ((rpy2 (package-with-python2 python-rpy2)))
4137 (package (inherit rpy2)
d6abd094 4138 (propagated-inputs
c9b1b4f9 4139 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4140 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4141
bb986599
FB
4142(define-public python-scipy
4143 (package
4144 (name "python-scipy")
35093253 4145 (version "0.18.1")
bb986599
FB
4146 (source
4147 (origin
4148 (method url-fetch)
35093253
TD
4149 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4150 version ".tar.gz"))
4151 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4152 (sha256
4153 (base32
35093253 4154 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4155 (build-system python-build-system)
dd86c0d1 4156 (propagated-inputs
bb986599
FB
4157 `(("python-numpy" ,python-numpy)
4158 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4159 ("python-pyparsing" ,python-pyparsing)))
4160 (inputs
4161 `(("lapack" ,lapack)
719b01c1 4162 ("openblas" ,openblas)))
bb986599 4163 (native-inputs
35093253
TD
4164 `(("python-cython" ,python-cython)
4165 ("python-nose" ,python-nose)
dd86c0d1 4166 ("python-sphinx" ,python-sphinx)
5248d49e 4167 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4168 ("gfortran" ,gfortran)
bb986599
FB
4169 ("perl" ,perl)))
4170 (outputs '("out" "doc"))
4171 (arguments
4172 `(#:phases
16ca6aaa 4173 (modify-phases %standard-phases
16ca6aaa
MB
4174 (add-before 'build 'configure-openblas
4175 (lambda* (#:key inputs #:allow-other-keys)
4176 (call-with-output-file "site.cfg"
4177 (lambda (port)
4178 (format port
4179 "[blas]
719b01c1
RW
4180libraries = openblas
4181library_dirs = ~a/lib
4182include_dirs = ~a/include
d548e6aa
HG
4183
4184# backslash-n to make emacs happy
4185\n[atlas]
719b01c1
RW
4186library_dirs = ~a/lib
4187atlas_libs = openblas
4188"
16ca6aaa
MB
4189 (assoc-ref inputs "openblas")
4190 (assoc-ref inputs "openblas")
4191 (assoc-ref inputs "openblas"))))
db967b64 4192 #t))
35093253
TD
4193 (add-after 'install 'install-doc
4194 (lambda* (#:key inputs outputs #:allow-other-keys)
4195 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4196 (doc (string-append data "/doc/" ,name "-" ,version))
4197 (html (string-append doc "/html"))
4198 (pyver ,(string-append "PYVER=")))
4199 ;; Make installed package available for building the
4200 ;; documentation
4201 (add-installed-pythonpath inputs outputs)
4202 (with-directory-excursion "doc"
4203 ;; Fix generation of images for mathematical expressions.
4204 (substitute* (find-files "source" "conf\\.py")
4205 (("pngmath_use_preview = True")
4206 "pngmath_use_preview = False"))
4207 (mkdir-p html)
4208 (system* "make" "html" pyver)
4209 (with-directory-excursion "build/html"
4210 (for-each (lambda (file)
4211 (let* ((dir (dirname file))
4212 (tgt-dir (string-append html "/" dir)))
4213 (install-file file html)))
4214 (find-files "." ".*")))))
4215 #t))
4216 (add-after 'unpack 'fix-tests
4217 (lambda _
4218 (substitute* "scipy/integrate/tests/test_quadpack.py"
4219 (("libm.so") "libm.so.6"))
4220 #t))
4221 ;; Tests can only be run after the library has been installed and not
4222 ;; within the source directory.
4223 (delete 'check)
4224 (add-after 'install 'check
4225 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4226 (add-installed-pythonpath inputs outputs)
35093253
TD
4227 (with-directory-excursion "/tmp"
4228 (zero? (system* "python" "-c"
4229 "import scipy; scipy.test('full')")))
4230 #t)))))
bb986599
FB
4231 (home-page "http://www.scipy.org/")
4232 (synopsis "The Scipy library provides efficient numerical routines")
4233 (description "The SciPy library is one of the core packages that make up
4234the SciPy stack. It provides many user-friendly and efficient numerical
4235routines such as routines for numerical integration and optimization.")
9200fe14 4236 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4237 (license license:bsd-3)))
bb986599 4238
764c077b 4239(define-public python2-scipy
35093253
TD
4240 (package-with-python2
4241 (strip-python2-variant python-scipy)))
bb986599 4242
e537c917
CB
4243(define-public python-sockjs-tornado
4244 (package
4245 (name "python-sockjs-tornado")
4246 (version "1.0.3")
4247 (source
4248 (origin
4249 (method url-fetch)
4250 (uri (pypi-uri "sockjs-tornado" version))
4251 (sha256
4252 (base32
4253 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4254 (build-system python-build-system)
4255 (arguments
4256 `(;; There are no tests, and running the test phase requires missing
4257 ;; dependencies
4258 #:tests? #f))
4259 (propagated-inputs
4260 `(("python-tornado" ,python-tornado)))
4261 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4262 (synopsis
4263 "SockJS python server implementation on top of Tornado framework")
4264 (description
4265 "SockJS-tornado provides the server side counterpart to a SockJS client
4266library, through the Tornado framework.
4267
4268SockJS provides a low latency, full duplex, cross-domain communication channel
4269between a web browser and web server.")
4270 (license license:expat)))
4271
4272(define-public python2-sockjs-tornado
4273 (package-with-python2 python-sockjs-tornado))
4274
73acc193 4275(define-public python-socksipy-branch
4276 (package
4277 (name "python-socksipy-branch")
4278 (version "1.01")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (pypi-uri "SocksiPy-branch" version))
4283 (sha256
4284 (base32
4285 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4286 (build-system python-build-system)
4287 (arguments
4288 `(#:tests? #f)) ; There are no tests
4289 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4290 (synopsis "Python SOCKS module")
4291 (description
4292 "SocksiPy - A Python SOCKS client module. It provides a
4293socket-like interface that supports connections to any TCP
4294service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4295The original version was developed by Dan Haim, this is a
4296branch created by Mario Vilas to address some open issues,
4297as the original project seems to have been abandoned circa 2007.")
4298 (license license:bsd-3)))
4299
4300(define-public python2-socksipy-branch
4301 (package-with-python2 python-socksipy-branch))
4302
94914805
EB
4303(define-public python-sqlalchemy
4304 (package
4305 (name "python-sqlalchemy")
a4ba286b 4306 (version "1.0.12")
94914805
EB
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (string-append "https://pypi.python.org/packages/source/S/"
4311 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4312 (sha256
4313 (base32
a4ba286b 4314 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4315 (build-system python-build-system)
4316 (native-inputs
4317 `(("python-cython" ,python-cython) ;for c extensions
4318 ("python-pytest" ,python-pytest)
4319 ("python-mock" ,python-mock))) ;for tests
4320 (arguments
4321 `(#:phases (alist-replace
4322 'check
4323 (lambda _ (zero? (system* "py.test")))
4324 %standard-phases)))
4325 (home-page "http://www.sqlalchemy.org")
4326 (synopsis "Database abstraction library")
4327 (description
4328 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4329gives application developers the full power and flexibility of SQL. It
4330provides a full suite of well known enterprise-level persistence patterns,
4331designed for efficient and high-performing database access, adapted into a
4332simple and Pythonic domain language.")
3f641af0 4333 (license license:x11)))
94914805
EB
4334
4335(define-public python2-sqlalchemy
4336 (package-with-python2 python-sqlalchemy))
c937562e 4337
4a093330
DM
4338(define-public python-pycodestyle
4339 (package
4340 (name "python-pycodestyle")
4341 (version "2.0.0")
4342 (source
4343 (origin
4344 (method url-fetch)
4345 (uri (pypi-uri "pycodestyle" version))
4346 (sha256
4347 (base32
4348 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4349 (build-system python-build-system)
4350 (home-page "https://pycodestyle.readthedocs.io/")
4351 (synopsis "Python style guide checker")
4352 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4353Python code against some of the style conventions in
4354@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4355 (license license:expat)))
4a093330
DM
4356
4357(define-public python2-pycodestyle
f210e944 4358 (package-with-python2 python-pycodestyle))
b91912c4
DM
4359
4360(define-public python-orderedmultidict
4361 (package
4362 (name "python-orderedmultidict")
9e2802cb 4363 (version "0.7.11")
b91912c4
DM
4364 (source
4365 (origin
4366 (method url-fetch)
4367 (uri (pypi-uri "orderedmultidict" version))
4368 (sha256
4369 (base32
9e2802cb 4370 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4371 (build-system python-build-system)
4372 (arguments
4373 `(#:phases
4374 (modify-phases %standard-phases
4375 (add-after 'unpack 'fix-tests
4376 (lambda _
4377 ;; The package uses nosetest for running the tests.
4378 ;; Adding this initfile allows to run the test suite
4379 ;; without requiring nosetest.
4380 (zero? (system* "touch" "tests/__init__.py")))))))
4381 (propagated-inputs
4382 `(("python-six" ,python-six)))
4383 (native-inputs
4384 `(("python-pycodestyle" ,python-pycodestyle)))
4385 (home-page "https://github.com/gruns/orderedmultidict")
4386 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4387 (description "This package contains a library for ordered multivalue
4388dictionaries. A multivalue dictionary is a dictionary that can store
4389multiple values for the same key. An ordered multivalue dictionary is a
4390multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4391 (license license:unlicense)))
b91912c4
DM
4392
4393(define-public python2-orderedmultidict
f210e944 4394 (package-with-python2 python-orderedmultidict))
9dede065
DM
4395
4396(define-public python-furl
4397 (package
4398 (name "python-furl")
4399 (version "0.5.6")
4400 (source
4401 (origin
4402 (method url-fetch)
4403 (uri (pypi-uri "furl" version))
4404 (sha256
4405 (base32
4406 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4407 (build-system python-build-system)
4408 (propagated-inputs
4409 `(("python-six" ,python-six)
4410 ("python-orderedmultidict" ,python-orderedmultidict)))
4411 (native-inputs
4412 `(("python-pycodestyle" ,python-pycodestyle)))
4413 (home-page "https://github.com/gruns/furl")
4414 (synopsis "URL manipulation in Python")
4415 (description "Furl provides an easy-to-use alternative to the
4416@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4417 (license license:unlicense)))
9dede065
DM
4418
4419(define-public python2-furl
f210e944 4420 (package-with-python2 python-furl))
462bf271
DM
4421
4422(define-public python-flask-babel
4423 (package
4424 (name "python-flask-babel")
4425 (version "0.11.1")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "Flask-Babel" version))
4430 (sha256
4431 (base32
4432 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4433 (build-system python-build-system)
4434 (propagated-inputs
4435 `(("python-flask" ,python-flask)
4436 ("python-babel" ,python-babel)
4437 ("python-jinja2" ,python-jinja2)
4438 ("python-pytz" ,python-pytz)))
4439 (home-page "https://github.com/python-babel/flask-babel")
4440 (synopsis "Add i18n/l10n support to Flask applications")
4441 (description "This package implements internationalization and localization
4442support for Flask. This is based on the Python babel module as well as pytz -
4443both of which are installed automatically if you install this library.")
f210e944 4444 (license license:bsd-3)))
462bf271
DM
4445
4446(define-public python2-flask-babel
f210e944 4447 (package-with-python2 python-flask-babel))
4a093330 4448
de2966cf
EF
4449(define-public python-sqlalchemy-utils
4450 (package
4451 (name "python-sqlalchemy-utils")
fd2662e9 4452 (version "0.32.13")
de2966cf
EF
4453 (source
4454 (origin
4455 (method url-fetch)
4456 (uri (pypi-uri "SQLAlchemy-Utils" version))
4457 (sha256
4458 (base32
fd2662e9 4459 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4460 (build-system python-build-system)
35d56b7b
MB
4461 (arguments
4462 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4463 ;; #:phases
4464 ;; (modify-phases %standard-phases
4465 ;; (replace 'check
4466 ;; (lambda _
4467 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4468 (propagated-inputs
de2966cf
EF
4469 `(("python-six" ,python-six)
4470 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4471 (native-inputs
22d7360b 4472 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4473 ("python-flexmock" ,python-flexmock)
4474 ("python-psycopg2" ,python-psycopg2)
4475 ("python-pytest" ,python-pytest)
4476 ("python-pytz" ,python-pytz)))
de2966cf
EF
4477 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4478 (synopsis "Various utility functions for SQLAlchemy")
4479 (description
4480 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4481for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4482
4483You might also want to install the following optional dependencies:
4484@enumerate
4485@item @code{python-passlib}
4486@item @code{python-babel}
4487@item @code{python-cryptography}
4488@item @code{python-pytz}
4489@item @code{python-psycopg2}
4490@item @code{python-furl}
4491@item @code{python-flask-babel}
4492@end enumerate
4493")
de2966cf
EF
4494 (license license:bsd-3)))
4495
4496(define-public python2-sqlalchemy-utils
f210e944 4497 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4498
af5a4602
CAW
4499(define-public python-alembic
4500 (package
4501 (name "python-alembic")
4418990d 4502 (version "0.8.10")
af5a4602
CAW
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (pypi-uri "alembic" version))
4507 (sha256
4508 (base32
4418990d 4509 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4510 (build-system python-build-system)
4511 (native-inputs
4512 `(("python-mock" ,python-mock)
4513 ("python-pytest-cov" ,python-pytest-cov)))
4514 (propagated-inputs
4515 `(("python-sqlalchemy" ,python-sqlalchemy)
4516 ("python-mako" ,python-mako)
4517 ("python-editor" ,python-editor)))
4518 (home-page "http://bitbucket.org/zzzeek/alembic")
4519 (synopsis
4520 "Database migration tool for SQLAlchemy")
4521 (description
4522 "Alembic is a lightweight database migration tool for usage with the
4523SQLAlchemy Database Toolkit for Python.")
f210e944 4524 (license license:expat)))
af5a4602
CAW
4525
4526(define-public python2-alembic
f210e944 4527 (package-with-python2 python-alembic))
af5a4602 4528
138adbbe
TD
4529(define-public python-autopep8
4530 (package
4531 (name "python-autopep8")
4532 (version "1.2.4")
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (pypi-uri "autopep8" version))
4537 (sha256
4538 (base32
4539 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4540 (build-system python-build-system)
4541 (propagated-inputs
4542 `(("python-pep8" ,python-pep8)))
4543 (home-page "https://github.com/hhatto/autopep8")
4544 (synopsis "Format Python code according to the PEP 8 style guide")
4545 (description
4546 "@code{autopep8} automatically formats Python code to conform to
4547the PEP 8 style guide. It uses the pycodestyle utility to determine
4548what parts of the code needs to be formatted. @code{autopep8} is
4549capable of fixing most of the formatting issues that can be reported
4550by pycodestyle.")
4551 (license (license:non-copyleft
4552 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4553
4554(define-public python2-autopep8
4555 (package-with-python2 python-autopep8))
4556
1671c07c
EB
4557(define-public python-distutils-extra
4558 (package
4559 (name "python-distutils-extra")
4560 (version "2.38")
4561 (source
4562 (origin
4563 (method url-fetch)
4564 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4565 version "/+download/python-distutils-extra-"
4566 version ".tar.gz"))
4567 (sha256
4568 (base32
4569 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4570 (build-system python-build-system)
1671c07c
EB
4571 (home-page "https://launchpad.net/python-distutils-extra/")
4572 (synopsis "Enhancements to Python's distutils")
4573 (description
4574 "The python-distutils-extra module enables you to easily integrate
4575gettext support, themed icons, and scrollkeeper-based documentation into
4576Python's distutils.")
3f641af0 4577 (license license:gpl2)))
1671c07c
EB
4578
4579(define-public python2-distutils-extra
4580 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4581
4582(define-public python2-elib.intl
4583 (package
4584 (name "python2-elib.intl")
4585 (version "0.0.3")
4586 (source
4587 (origin
4588 ;; This project doesn't tag releases or publish tarballs, so we take
4589 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4590 (method git-fetch)
4591 (uri (git-reference
4592 (url "https://github.com/dieterv/elib.intl.git")
4593 (commit "d09997cfef")))
4594 (sha256
4595 (base32
4596 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4597 (build-system python-build-system)
ea5456c8
EB
4598 (arguments
4599 ;; incompatible with Python 3 (exception syntax)
4600 `(#:python ,python-2
b41a05ce 4601 #:tests? #f))
ea5456c8
EB
4602 (home-page "https://github.com/dieterv/elib.intl")
4603 (synopsis "Enhanced internationalization for Python")
4604 (description
4605 "The elib.intl module provides enhanced internationalization (I18N)
4606services for your Python modules and applications.")
3f641af0 4607 (license license:lgpl3+)))
ea5456c8 4608
c937562e
EB
4609(define-public python-pillow
4610 (package
4611 (name "python-pillow")
aba5182c 4612 (version "3.3.3")
c937562e
EB
4613 (source
4614 (origin
4615 (method url-fetch)
f1d9231d 4616 (uri (pypi-uri "Pillow" version))
a9681c74 4617 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4618 (sha256
4619 (base32
aba5182c 4620 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4621 (build-system python-build-system)
4622 (native-inputs
f3b98f4f 4623 `(("python-nose" ,python-nose)))
c937562e 4624 (inputs
5ff408d9
SB
4625 `(("freetype" ,freetype)
4626 ("lcms" ,lcms)
c937562e
EB
4627 ("zlib" ,zlib)
4628 ("libjpeg" ,libjpeg)
4629 ("openjpeg" ,openjpeg)
5ff408d9
SB
4630 ("libtiff" ,libtiff)
4631 ("libwebp" ,libwebp)))
c937562e 4632 (arguments
e5358a6b 4633 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4634 (add-after
4635 'install 'check-installed
6151120a 4636 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4637 (begin
4638 (setenv "HOME" (getcwd))
6151120a
HG
4639 ;; Make installed package available for running the
4640 ;; tests
4641 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4642 (and (zero? (system* "python" "selftest.py"
4643 "--installed"))
4644 (zero? (system* "python" "test-installed.py"))))))
4645 (delete 'check))))
c937562e
EB
4646 (home-page "https://pypi.python.org/pypi/Pillow")
4647 (synopsis "Fork of the Python Imaging Library")
4648 (description
4649 "The Python Imaging Library adds image processing capabilities to your
4650Python interpreter. This library provides extensive file format support, an
4651efficient internal representation, and fairly powerful image processing
4652capabilities. The core image library is designed for fast access to data
4653stored in a few basic pixel formats. It should provide a solid foundation for
4654a general image processing tool.")
3f641af0 4655 (license (license:x11-style
c937562e
EB
4656 "http://www.pythonware.com/products/pil/license.htm"
4657 "The PIL Software License"))))
4658
4659(define-public python2-pillow
4660 (package-with-python2 python-pillow))
bb986599 4661
a415f036
FB
4662(define-public python-pycparser
4663 (package
4664 (name "python-pycparser")
5043b20d 4665 (version "2.17")
a415f036
FB
4666 (source
4667 (origin
4668 (method url-fetch)
38eb6919 4669 (uri (pypi-uri "pycparser" version))
a415f036
FB
4670 (sha256
4671 (base32
5043b20d 4672 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4673 (outputs '("out" "doc"))
4674 (build-system python-build-system)
4675 (native-inputs
f3b98f4f 4676 `(("pkg-config" ,pkg-config)))
a415f036 4677 (arguments
89b5c60e 4678 `(#:phases
819939cb
TGR
4679 (modify-phases %standard-phases
4680 (replace 'check
4681 (lambda _
4682 (with-directory-excursion "tests"
4683 (zero? (system* "python" "all_tests.py")))))
4684 (add-after 'install 'install-doc
4685 (lambda* (#:key outputs #:allow-other-keys)
4686 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4687 (doc (string-append data "/doc/" ,name "-" ,version))
4688 (examples (string-append doc "/examples")))
4689 (mkdir-p examples)
4690 (for-each (lambda (file)
4691 (copy-file (string-append "." file)
4692 (string-append doc file)))
4693 '("/README.rst" "/CHANGES" "/LICENSE"))
4694 (copy-recursively "examples" examples)))))))
a415f036
FB
4695 (home-page "https://github.com/eliben/pycparser")
4696 (synopsis "C parser in Python")
4697 (description
4698 "Pycparser is a complete parser of the C language, written in pure Python
4699using the PLY parsing library. It parses C code into an AST and can serve as
4700a front-end for C compilers or analysis tools.")
3f641af0 4701 (license license:bsd-3)))
a415f036
FB
4702
4703(define-public python2-pycparser
4704 (package-with-python2 python-pycparser))
57c3f716
FB
4705
4706(define-public python-cffi
4707 (package
4708 (name "python-cffi")
2d3a437c 4709 (version "1.4.2")
57c3f716
FB
4710 (source
4711 (origin
4712 (method url-fetch)
2d3a437c 4713 (uri (pypi-uri "cffi" version))
89b5c60e 4714 (sha256
2d3a437c 4715 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4716 (build-system python-build-system)
4717 (outputs '("out" "doc"))
4718 (inputs
4719 `(("libffi" ,libffi)))
4720 (propagated-inputs ; required at run-time
4721 `(("python-pycparser" ,python-pycparser)))
4722 (native-inputs
4723 `(("pkg-config" ,pkg-config)
4724 ("python-sphinx" ,python-sphinx)
f3b98f4f 4725 ("python-pytest" ,python-pytest)))
57c3f716 4726 (arguments
4179f952 4727 `(#:phases
57c3f716
FB
4728 (alist-cons-after
4729 'install 'install-doc
4730 (lambda* (#:key outputs #:allow-other-keys)
4731 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4732 (doc (string-append data "/doc/" ,name "-" ,version))
4733 (html (string-append doc "/html")))
4734 (with-directory-excursion "doc"
4735 (system* "make" "html")
4736 (mkdir-p html)
4737 (copy-recursively "build/html" html))
4738 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4739 %standard-phases)))
4740 (home-page "http://cffi.readthedocs.org")
4741 (synopsis "Foreign function interface for Python")
4742 (description
4743 "Foreign Function Interface for Python calling C code.")
bd3fa666 4744 (license license:expat)))
57c3f716
FB
4745
4746(define-public python2-cffi
4747 (package-with-python2 python-cffi))
6fa14469
FB
4748
4749(define-public python-xcffib
4750 (package
4751 (name "python-xcffib")
8347c122 4752 (version "0.5.1")
6fa14469
FB
4753 (source
4754 (origin
4755 (method url-fetch)
8347c122 4756 (uri (pypi-uri "xcffib" version))
6fa14469
FB
4757 (sha256
4758 (base32
8347c122 4759 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
6fa14469
FB
4760 (build-system python-build-system)
4761 (inputs
482d9591 4762 `(("libxcb" ,libxcb)))
6fa14469 4763 (propagated-inputs
482d9591
HG
4764 `(("python-cffi" ,python-cffi) ; used at run time
4765 ("python-six" ,python-six)))
6fa14469 4766 (arguments
e46bf223 4767 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
e2816ac7
MB
4768 #:tests? #f
4769 #:phases
c8cd850c 4770 (modify-phases %standard-phases
e46bf223
JMSG
4771 (add-after 'unpack 'fix-libxcb-path
4772 (lambda* (#:key inputs #:allow-other-keys)
4773 (let ((libxcb (assoc-ref inputs "libxcb")))
4774 (substitute* '("xcffib/__init__.py")
4775 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4776 #t)))
c8cd850c
MB
4777 (add-after 'install 'install-doc
4778 (lambda* (#:key outputs #:allow-other-keys)
4779 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4780 "/doc/" ,name "-" ,version)))
4781 (mkdir-p doc)
4782 (copy-file "README.md"
4783 (string-append doc "/README.md"))
4784 #t))))))
6fa14469
FB
4785 (home-page "https://github.com/tych0/xcffib")
4786 (synopsis "XCB Python bindings")
4787 (description
4788 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4789support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4790 (license license:expat)))
6fa14469
FB
4791
4792(define-public python2-xcffib
4793 (package-with-python2 python-xcffib))
4794
9e099723
FB
4795(define-public python-cairocffi
4796 (package
4797 (name "python-cairocffi")
80f78e8f 4798 (version "0.8.0")
9e099723
FB
4799 (source
4800 (origin
4801 (method url-fetch)
4802 ;; The archive on pypi is missing the 'utils' directory!
3015d455 4803 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
9e099723 4804 version ".tar.gz"))
f586c877 4805 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4806 (sha256
4807 (base32
80f78e8f 4808 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
9e099723
FB
4809 (build-system python-build-system)
4810 (outputs '("out" "doc"))
4811 (inputs
4812 `(("gdk-pixbuf" ,gdk-pixbuf)
4813 ("cairo" ,cairo)))
4814 (native-inputs
4815 `(("pkg-config" ,pkg-config)
4816 ("python-sphinx" ,python-sphinx)
f3b98f4f 4817 ("python-docutils" ,python-docutils)))
9e099723
FB
4818 (propagated-inputs
4819 `(("python-xcffib" ,python-xcffib))) ; used at run time
4820 (arguments
a792e1aa
MB
4821 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4822 #:tests? #f
4823 #:phases
6734c7ba
MB
4824 (modify-phases %standard-phases
4825 (add-after 'install 'install-doc
4826 (lambda* (#:key inputs outputs #:allow-other-keys)
4827 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4828 (doc (string-append data "/doc/" ,name "-" ,version))
4829 (html (string-append doc "/html")))
4830 (setenv "LD_LIBRARY_PATH"
4831 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4832 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4833 (setenv "LANG" "en_US.UTF-8")
4834 (mkdir-p html)
4835 (for-each (lambda (file)
4836 (copy-file (string-append "." file)
4837 (string-append doc file)))
4838 '("/README.rst" "/CHANGES" "/LICENSE"))
4839 (system* "python" "setup.py" "build_sphinx")
4840 (copy-recursively "docs/_build/html" html)
4841 #t))))))
3015d455 4842 (home-page "https://github.com/Kozea/cairocffi")
9e099723
FB
4843 (synopsis "Python bindings and object-oriented API for Cairo")
4844 (description
4845 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4846Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4847graphics library with support for multiple backends including image buffers,
4848PNG, PostScript, PDF, and SVG file output.")
3f641af0 4849 (license license:bsd-3)))
9e099723
FB
4850
4851(define-public python2-cairocffi
4852 (package-with-python2 python-cairocffi))
4853
3cff95cb
RW
4854(define-public python-decorator
4855 (package
4856 (name "python-decorator")
d79fa7da 4857 (version "4.0.10")
3cff95cb
RW
4858 (source
4859 (origin
4860 (method url-fetch)
e21338be 4861 (uri (pypi-uri "decorator" version))
3cff95cb 4862 (sha256
d79fa7da 4863 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4864 (build-system python-build-system)
4865 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4866 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4867 (synopsis "Python module to simplify usage of decorators")
4868 (description
4869 "The aim of the decorator module is to simplify the usage of decorators
4870for the average programmer, and to popularize decorators usage giving examples
4871of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4872etc. The core of this module is a decorator factory.")
4873 (license license:expat)))
4874
4875(define-public python2-decorator
4876 (package-with-python2 python-decorator))
4877
2c0499ad
RW
4878(define-public python-drmaa
4879 (package
4880 (name "python-drmaa")
7c427932 4881 (version "0.7.7")
2c0499ad
RW
4882 (source
4883 (origin
4884 (method url-fetch)
4885 (uri (string-append
4886 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4887 version ".tar.gz"))
4888 (sha256
7c427932 4889 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
4890 (build-system python-build-system)
4891 ;; The test suite requires libdrmaa which is provided by the cluster
4892 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4893 ;; should be set to the path of the libdrmaa library.
4894 (arguments '(#:tests? #f))
4895 (native-inputs
f3b98f4f 4896 `(("python-nose" ,python-nose)))
2c0499ad
RW
4897 (home-page "https://pypi.python.org/pypi/drmaa")
4898 (synopsis "Python bindings for the DRMAA library")
4899 (description
4900 "A Python package for Distributed Resource Management (DRM) job
4901submission and control. This package is an implementation of the DRMAA 1.0
4902Python language binding specification.")
3f641af0 4903 (license license:bsd-3)))
2c0499ad
RW
4904
4905(define-public python2-drmaa
4906 (package-with-python2 python-drmaa))
4907
d05c6da0
RW
4908(define-public python-gridmap
4909 (package
4910 (name "python-gridmap")
4911 (version "0.13.0")
4912 (source
4913 (origin
4914 (method url-fetch)
4915 (uri (string-append
4916 "https://github.com/pygridtools/gridmap/archive/v"
4917 version ".tar.gz"))
4918 (file-name (string-append name "-" version ".tar.gz"))
4919 (sha256
4920 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4921 (build-system python-build-system)
ad348f9f
MB
4922 (arguments
4923 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4924 (propagated-inputs
d05c6da0
RW
4925 `(("python-psutil" ,python-psutil)
4926 ("python-drmaa" ,python-drmaa)
4927 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4928 (home-page "https://github.com/pygridtools/gridmap")
4929 (synopsis "Create jobs on a cluster directly from Python")
4930 (description
4931 "Gridmap is a Python package to allow you to easily create jobs on the
4932cluster directly from Python. You can directly map Python functions onto the
4933cluster without needing to write any wrapper code yourself.")
3f641af0 4934 (license license:gpl3+)))
d05c6da0
RW
4935
4936(define-public python2-gridmap
4937 (package-with-python2 python-gridmap))
4938
cb6d5c54
RW
4939(define-public python-pexpect
4940 (package
4941 (name "python-pexpect")
ed118043 4942 (version "4.2.1")
cb6d5c54
RW
4943 (source
4944 (origin
4945 (method url-fetch)
ed118043 4946 (uri (pypi-uri "pexpect" version))
cb6d5c54 4947 (sha256
ed118043 4948 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4949 (build-system python-build-system)
4950 (arguments
4951 `(#:phases
4952 (modify-phases %standard-phases
ed118043
MB
4953 (add-before 'check 'prepare-tests
4954 (lambda _
4955 (substitute* (find-files "tests")
4956 (("/bin/ls") (which "ls"))
4957 (("/bin/echo") (which "echo"))
4958 (("/bin/which") (which "which"))
4959 ;; Many tests try to use the /bin directory which
4960 ;; is not present in the build environment.
4961 ;; Use one that's non-empty and unlikely to change.
4962 (("/bin'") "/dev'"))
4963 ;; XXX: Socket connection test gets "Connection reset by peer".
4964 ;; Why does it not work? Delete for now.
4965 (delete-file "tests/test_socket.py")
4966 #t))
3ee9355e 4967 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 4968 (native-inputs
ed118043 4969 `(("python-nose" ,python-nose)
350a3084 4970 ("python-pytest" ,python-pytest-3.0)
ed118043
MB
4971 ("man-db" ,man-db)
4972 ("which" ,which)))
4973 (propagated-inputs
4974 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4975 (home-page "http://pexpect.readthedocs.org/")
4976 (synopsis "Controlling interactive console applications")
4977 (description
4978 "Pexpect is a pure Python module for spawning child applications;
4979controlling them; and responding to expected patterns in their output.
4980Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4981child application and control it as if a human were typing commands.")
3f641af0 4982 (license license:isc)))
cb6d5c54
RW
4983
4984(define-public python2-pexpect
4985 (package-with-python2 python-pexpect))
4986
229ad120
RW
4987(define-public python-setuptools-scm
4988 (package
4989 (name "python-setuptools-scm")
5b1f31ff 4990 (version "1.15.0")
229ad120
RW
4991 (source (origin
4992 (method url-fetch)
383af6b0 4993 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4994 (sha256
4995 (base32
5b1f31ff 4996 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
4997 (build-system python-build-system)
4998 (home-page "https://github.com/pypa/setuptools_scm/")
4999 (synopsis "Manage Python package versions in SCM metadata")
5000 (description
383af6b0 5001 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
5002@dfn{software configuration management} (SCM) metadata instead of declaring
5003them as the version argument or in a SCM managed file.")
5004 (license license:expat)))
5005
5006(define-public python2-setuptools-scm
5007 (package-with-python2 python-setuptools-scm))
5008
b74270ee
RW
5009(define-public python-pathpy
5010 (package
5011 (name "python-pathpy")
5012 (version "8.1.1")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (string-append "https://pypi.python.org/packages/source/p/"
5017 "path.py/path.py-" version ".tar.gz"))
5018 (sha256
5019 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 5020 (outputs '("out" "doc"))
b74270ee
RW
5021 (build-system python-build-system)
5022 (propagated-inputs
5023 `(("python-appdirs" ,python-appdirs)))
5024 (native-inputs
f3b98f4f 5025 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
5026 ("python-sphinx" ,python-sphinx)
5027 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5028 ("python-pytest" ,python-pytest)
5029 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5030 (arguments
5031 `(#:phases
5032 (modify-phases %standard-phases
5033 (add-after 'build 'build-doc
5034 (lambda _
5035 (setenv "LANG" "en_US.UTF-8")
5036 (zero? (system* "python" "setup.py" "build_sphinx"))))
5037 (add-after 'install 'install-doc
5038 (lambda* (#:key outputs #:allow-other-keys)
5039 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5040 (doc (string-append data "/doc/" ,name "-" ,version))
5041 (html (string-append doc "/html")))
5042 (mkdir-p html)
5043 (for-each (lambda (file)
5044 (copy-file file (string-append doc "/" file)))
5045 '("README.rst" "CHANGES.rst"))
5046 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5047 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5048 (synopsis "Python module wrapper for built-in os.path")
5049 (description
5050 "@code{path.py} implements path objects as first-class entities, allowing
5051common operations on files to be invoked on those path objects directly.")
5052 (license license:expat)))
5053
5054(define-public python2-pathpy
5055 (package-with-python2 python-pathpy))
5056
0d34e01b
RW
5057(define-public python-pickleshare
5058 (package
5059 (name "python-pickleshare")
5060 (version "0.5")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (string-append "https://pypi.python.org/packages/source/p/"
5065 "pickleshare/pickleshare-" version ".tar.gz"))
5066 (sha256
5067 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5068 (build-system python-build-system)
5069 (propagated-inputs
5070 `(("python-pathpy" ,python-pathpy)))
5071 (home-page "https://github.com/vivainio/pickleshare")
5072 (synopsis "Tiny key value database with concurrency support")
5073 (description
5074 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5075Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5076shelve, many processes can access the database simultaneously. Changing a
5077value in database is immediately visible to other processes accessing the same
5078database. Concurrency is possible because the values are stored in separate
5079files. Hence the “database” is a directory where all files are governed by
5080PickleShare.")
5081 (license license:expat)))
5082
5083(define-public python2-pickleshare
5084 (package-with-python2 python-pickleshare))
5085
cd6e5189
RW
5086(define-public python-simplegeneric
5087 (package
5088 (name "python-simplegeneric")
5089 (version "0.8.1")
5090 (source
5091 (origin
5092 (method url-fetch)
5093 (uri (string-append "https://pypi.python.org/packages/source/s/"
5094 "simplegeneric/simplegeneric-" version ".zip"))
5095 (sha256
5096 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5097 (build-system python-build-system)
5098 (native-inputs
f3b98f4f 5099 `(("unzip" ,unzip)))
cd6e5189
RW
5100 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5101 (synopsis "Python module for simple generic functions")
5102 (description
5103 "The simplegeneric module lets you define simple single-dispatch generic
5104functions, akin to Python’s built-in generic functions like @code{len()},
5105@code{iter()} and so on. However, instead of using specially-named methods,
5106these generic functions use simple lookup tables, akin to those used by
5107e.g. @code{pickle.dump()} and other generic functions found in the Python
5108standard library.")
3f641af0 5109 (license license:zpl2.1)))
cd6e5189
RW
5110
5111(define-public python2-simplegeneric
5112 (package-with-python2 python-simplegeneric))
5113
ddc7d8ed 5114(define-public python-ipython-genutils
c4abbac3 5115 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5116 (package
5117 (name "python-ipython-genutils")
5118 (version "0.1.0")
5119 (source
5120 (origin
5121 (method url-fetch)
5122 (uri (string-append "https://pypi.python.org/packages/source/i/"
5123 "ipython_genutils/ipython_genutils-"
5124 version ".tar.gz"))
5125 (sha256
5126 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5127 (build-system python-build-system)
5128 (arguments `(#:tests? #f)) ; no tests
5129 (home-page "http://ipython.org")
5130 (synopsis "Vestigial utilities from IPython")
5131 (description
c4abbac3
HG
5132 "This package provides retired utilities from IPython. No packages
5133outside IPython/Jupyter should depend on it.
5134
5135This package shouldn't exist. It contains some common utilities shared by
5136Jupyter and IPython projects during The Big Split. As soon as possible, those
5137packages will remove their dependency on this, and this package will go
5138away.")
3f641af0 5139 (license license:bsd-3)))
ddc7d8ed
RW
5140
5141(define-public python2-ipython-genutils
5142 (package-with-python2 python-ipython-genutils))
5143
2b10eb48
RW
5144(define-public python-traitlets
5145 (package
5146 (name "python-traitlets")
a5ba1481 5147 (version "4.2.0")
2b10eb48
RW
5148 (source
5149 (origin
5150 (method url-fetch)
cc0c4fde 5151 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5152 (sha256
5153 (base32
a5ba1481 5154 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5155 (build-system python-build-system)
5156 (arguments
5157 `(#:phases
5158 (modify-phases %standard-phases
5159 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5160 (propagated-inputs
5161 `(("python-ipython-genutils" ,python-ipython-genutils)
5162 ("python-decorator" ,python-decorator)))
5163 (native-inputs
cc0c4fde
EF
5164 `(("python-mock" ,python-mock)
5165 ("python-nose" ,python-nose)))
2b10eb48
RW
5166 (home-page "http://ipython.org")
5167 (synopsis "Configuration system for Python applications")
5168 (description
5169 "Traitlets is a framework that lets Python classes have attributes with
5170type checking, dynamically calculated default values, and ‘on change’
5171callbacks. The package also includes a mechanism to use traitlets for
5172configuration, loading values from files or from command line arguments. This
5173is a distinct layer on top of traitlets, so you can use traitlets in your code
5174without using the configuration machinery.")
3f641af0 5175 (license license:bsd-3)))
2b10eb48
RW
5176
5177(define-public python2-traitlets
5178 (package-with-python2 python-traitlets))
5179
4263b06f
RW
5180(define-public python-jupyter-core
5181 (package
5182 (name "python-jupyter-core")
45cc957c 5183 (version "4.2.1")
4263b06f
RW
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (string-append (pypi-uri "jupyter_core" version)))
5188 (sha256
5189 (base32
45cc957c 5190 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5191 (build-system python-build-system)
5192 ;; FIXME: not sure how to run the tests
5193 (arguments `(#:tests? #f))
5194 (propagated-inputs
5195 `(("python-traitlets" ,python-traitlets)))
5196 (home-page "http://jupyter.org/")
5197 (synopsis "Jupyter base package")
5198 (description
5199 "Jupyter core is the base package on which Jupyter projects rely.")
5200 (license license:bsd-3)))
5201
5202(define-public python2-jupyter-core
5203 (package-with-python2 python-jupyter-core))
5204
9ff01f2d
RW
5205(define-public python-jupyter-client
5206 (package
5207 (name "python-jupyter-client")
5208 (version "4.4.0")
5209 (source
5210 (origin
5211 (method url-fetch)
5212 (uri (pypi-uri "jupyter_client" version))
5213 (sha256
5214 (base32
5215 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5216 (build-system python-build-system)
5217 ;; Tests fail because of missing native python kernel which I assume is
5218 ;; provided by the ipython package, which we cannot use because it would
5219 ;; cause a dependency cycle.
5220 (arguments `(#:tests? #f))
5221 (propagated-inputs
5222 `(("python-pyzmq" ,python-pyzmq)
5223 ("python-traitlets" ,python-traitlets)
5224 ("python-jupyter-core" ,python-jupyter-core)))
5225 (home-page "http://jupyter.org/")
5226 (synopsis "Jupyter protocol implementation and client libraries")
5227 (description
5228 "The @code{jupyter_client} package contains the reference implementation
5229of the Jupyter protocol. It also provides client and kernel management APIs
5230for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5231installing @code{kernelspec}s for use with Jupyter frontends.")
5232 (license license:bsd-3)))
5233
5234(define-public python2-jupyter-client
5235 (package-with-python2 python-jupyter-client))
5236
ab526102
RW
5237(define-public python-ipykernel
5238 (package
5239 (name "python-ipykernel")
f165648e 5240 (version "4.5.2")
ab526102
RW
5241 (source
5242 (origin
5243 (method url-fetch)
5244 (uri (pypi-uri "ipykernel" version))
5245 (sha256
f165648e 5246 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5247 (build-system python-build-system)
5248 ;; The tests load a submodule of IPython. However, IPython itself depends
5249 ;; on ipykernel.
5250 (arguments `(#:tests? #f))
5251 (propagated-inputs
5252 ;; imported at runtime during connect
5253 `(("python-jupyter-client" ,python-jupyter-client)))
5254 (home-page "http://ipython.org")
5255 (synopsis "IPython Kernel for Jupyter")
5256 (description
5257 "This package provides the IPython kernel for Jupyter.")
5258 (license license:bsd-3)))
5259
5260(define-public python2-ipykernel
5261 (package-with-python2 python-ipykernel))
5262
5ff6effc
RW
5263(define-public python-testpath
5264 (package
5265 (name "python-testpath")
5266 (version "0.2")
5267 (source
5268 (origin
5269 (method url-fetch)
5270 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5271 version ".tar.gz"))
5272 (file-name (string-append name "-" version ".tar.gz"))
5273 (sha256
5274 (base32
5275 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5276 (build-system python-build-system)
5277 (arguments
5278 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5279 #:modules ((guix build python-build-system)
5280 (guix build utils)
5281 (srfi srfi-1))
5282 #:imported-modules (,@%python-build-system-modules
5283 (srfi srfi-1))
5ff6effc
RW
5284 #:phases
5285 (modify-phases %standard-phases
5286 (delete 'install)
5287 (replace 'build
b320f7bf
TD
5288 (lambda* (#:key inputs outputs #:allow-other-keys)
5289 (let* ((version (last
5290 (string-split (assoc-ref inputs "python") #\-)))
5291 (x.y (string-join (take (string-split version #\.) 2)
5292 "."))
5293 (dir (string-append
5294 (assoc-ref outputs "out")
5295 "/lib/python" x.y "/site-packages/testpath")))
5296 (mkdir-p dir)
5297 (copy-recursively "testpath" dir))
5298 #t)))))
5ff6effc
RW
5299 (home-page "https://github.com/takluyver/testpath")
5300 (synopsis "Test utilities for code working with files and commands")
5301 (description
5302 "Testpath is a collection of utilities for Python code working with files
5303and commands. It contains functions to check things on the filesystem, and
5304tools for mocking system commands and recording calls to those.")
5305 (license license:expat)))
5306
5307(define-public python2-testpath
5308 (package-with-python2 python-testpath))
5309
ae1ab9fe
FB
5310(define-public python-ipython
5311 (package
5312 (name "python-ipython")
fb25d348 5313 (version "5.2.2")
ae1ab9fe
FB
5314 (source
5315 (origin
fceac880 5316 (method url-fetch)
accd5f99 5317 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5318 (sha256
fb25d348 5319 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5320 (build-system python-build-system)
5321 (outputs '("out" "doc"))
3a0b1b9a
FB
5322 (propagated-inputs
5323 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5324 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5325 ("python-terminado" ,python-terminado)
ae1ab9fe 5326 ("python-matplotlib" ,python-matplotlib)
5d26e542 5327 ("python-numpy" ,python-numpy)
ae1ab9fe 5328 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5329 ("python-jinja2" ,python-jinja2)
5330 ("python-mistune" ,python-mistune)
accd5f99
RW
5331 ("python-pexpect" ,python-pexpect)
5332 ("python-pickleshare" ,python-pickleshare)
5333 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5334 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5335 ("python-traitlets" ,python-traitlets)
5336 ("python-ipykernel" ,python-ipykernel)
fb25d348 5337 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5338 ("python-pygments" ,python-pygments)))
5339 (inputs
5340 `(("readline" ,readline)
5341 ("which" ,which)))
ae1ab9fe 5342 (native-inputs
fb25d348
TD
5343 `(("graphviz" ,graphviz)
5344 ("pkg-config" ,pkg-config)
accd5f99
RW
5345 ("python-requests" ,python-requests) ;; for tests
5346 ("python-testpath" ,python-testpath)
5347 ("python-nose" ,python-nose)
ae1ab9fe 5348 ("python-sphinx" ,python-sphinx)
fb25d348 5349 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5350 ("texlive" ,texlive)
f3b98f4f 5351 ("texinfo" ,texinfo)))
ae1ab9fe 5352 (arguments
89b5c60e 5353 `(#:phases
3a0b1b9a
FB
5354 (modify-phases %standard-phases
5355 (add-after
5356 'install 'install-doc
5357 (lambda* (#:key inputs outputs #:allow-other-keys)
5358 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5359 (doc (string-append data "/doc/" ,name "-" ,version))
5360 (html (string-append doc "/html"))
5361 (man1 (string-append data "/man/man1"))
5362 (info (string-append data "/info"))
fb25d348
TD
5363 (examples (string-append doc "/examples"))
5364 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5365 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5366 ;; Make installed package available for running the tests
5367 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5368 (with-directory-excursion "docs"
accd5f99
RW
5369 ;; FIXME: pdf fails to build
5370 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5371 (system* "make" python-arg "html")
5372 (system* "make" python-arg "info"))
3a0b1b9a
FB
5373 (copy-recursively "docs/man" man1)
5374 (copy-recursively "examples" examples)
accd5f99 5375 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5376 ;; (copy-file "docs/build/latex/ipython.pdf"
5377 ;; (string-append doc "/ipython.pdf"))
5378 (mkdir-p info)
5379 (copy-file "docs/build/texinfo/ipython.info"
5380 (string-append info "/ipython.info"))
5381 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5382 ;; Tests can only be run after the library has been installed and not
5383 ;; within the source directory.
5384 (delete 'check)
5385 (add-after
5386 'install 'check
eee5cd04 5387 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5388 (if tests?
5389 (with-directory-excursion "/tmp"
eee5cd04
HG
5390 ;; Make installed package available for running the tests
5391 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5392 (setenv "HOME" "/tmp/") ;; required by a test
5393 (zero? (system* (string-append (assoc-ref outputs "out")
5394 "/bin/iptest"))))
5395 #t)))
5396 (add-before
5397 'install 'fix-tests
5398 (lambda* (#:key inputs #:allow-other-keys)
5399 (substitute* "./IPython/utils/_process_posix.py"
5400 (("/usr/bin/env', 'which") (which "which")))
5401 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5402 (("#!/usr/bin/env python")
5403 (string-append "#!" (which "python"))))
5404 ;; Disable 1 failing test
5405 (substitute* "./IPython/core/tests/test_magic.py"
5406 (("def test_dirops\\(\\):" all)
5407 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5408 (home-page "http://ipython.org")
5409 (synopsis "IPython is a tool for interactive computing in Python")
5410 (description
5411 "IPython provides a rich architecture for interactive computing with:
5412Powerful interactive shells, a browser-based notebook, support for interactive
5413data visualization, embeddable interpreters and tools for parallel
5414computing.")
135ba811
EF
5415 (license license:bsd-3)
5416 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5417
5418(define-public python2-ipython
135ba811 5419 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5420 (package
5421 (inherit ipython)
3a0b1b9a 5422 ;; FIXME: add pyreadline once available.
fb25d348
TD
5423 (propagated-inputs
5424 `(("python2-backports-shutil-get-terminal-size"
5425 ,python2-backports-shutil-get-terminal-size)
5426 ("python2-pathlib2" ,python2-pathlib2)
5427 ,@(package-propagated-inputs ipython)))
e62600fe 5428 (native-inputs
135ba811 5429 `(("python2-mock" ,python2-mock)
77a6932a 5430 ,@(package-native-inputs ipython))))))
03411993
AE
5431
5432(define-public python-isodate
5433 (package
5434 (name "python-isodate")
b6785c2e 5435 (version "0.5.4")
03411993
AE
5436 (source
5437 (origin
5438 (method url-fetch)
b6785c2e 5439 (uri (pypi-uri "isodate" version))
03411993
AE
5440 (sha256
5441 (base32
b6785c2e 5442 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5443 (build-system python-build-system)
03411993
AE
5444 (home-page
5445 "http://cheeseshop.python.org/pypi/isodate")
5446 (synopsis
5447 "Python date parser and formatter")
5448 (description
5449 "Python-isodate is a python module for parsing and formatting
5450ISO 8601 dates, time and duration.")
3f641af0 5451 (license license:bsd-3)))
03411993
AE
5452
5453(define-public python2-isodate
5454 (package-with-python2 python-isodate))
673ab897
AE
5455
5456(define-public python-html5lib
5457 (package
5458 (name "python-html5lib")
a14061aa 5459 (version "1.0b10")
673ab897
AE
5460 (source
5461 (origin
5462 (method url-fetch)
fee04c19 5463 (uri (pypi-uri "html5lib" version))
673ab897
AE
5464 (sha256
5465 (base32
a14061aa 5466 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5467 (build-system python-build-system)
3dd75476 5468 (propagated-inputs
4eb6ed28
MB
5469 `(("python-six" ,python-six)
5470 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5471 (arguments
5472 `(#:test-target "check"))
5473 (home-page
5474 "https://github.com/html5lib/html5lib-python")
5475 (synopsis
5476 "Python HTML parser based on the WHATWG HTML specifcation")
5477 (description
5478 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5479and written in Python.")
bd3fa666 5480 (license license:expat)))
673ab897
AE
5481
5482(define-public python2-html5lib
5483 (package-with-python2 python-html5lib))
e99f4211 5484
8ee62c97
RW
5485;; Needed for python-bleach, a dependency of python-notebook
5486(define-public python-html5lib-0.9
5487 (package
5488 (inherit python-html5lib)
5489 (version "0.999")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (pypi-uri "html5lib" version))
5494 (sha256
5495 (base32
5496 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5497
5498(define-public python2-html5lib-0.9
5499 (package-with-python2 python-html5lib-0.9))
5500
adbca19e
MB
5501(define-public python-webencodings
5502 (package
5503 (name "python-webencodings")
5504 (version "0.5")
5505 (source (origin
5506 (method url-fetch)
5507 (uri (pypi-uri "webencodings" version))
5508 (sha256
5509 (base32
5510 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5511 (build-system python-build-system)
5512 (arguments
5513 '(#:phases
5514 (modify-phases %standard-phases
5515 (replace 'check
5516 (lambda _
5517 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5518 (native-inputs
5519 `(("python-pytest" ,python-pytest)))
5520 (home-page "https://github.com/SimonSapin/python-webencodings")
5521 (synopsis "Character encoding aliases for legacy web content")
5522 (description
5523 "In order to be compatible with legacy web content when interpreting
5524something like @code{Content-Type: text/html; charset=latin1}, tools need
5525to use a particular set of aliases for encoding labels as well as some
5526overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5527the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5528or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5529The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5530defines all such details so that implementations do not have to
5531reverse-engineer each other.
5532
5533This module implements the Encoding standard and has encoding labels and
5534BOM detection, but the actual implementation for encoders and decoders
5535is Python’s.")
5536 (license license:bsd-3)))
5537
5538(define-public python2-webencodings
5539 (package-with-python2 python-webencodings))
5540
e99f4211
MW
5541(define-public python-urwid
5542 (package
5543 (name "python-urwid")
51ff41f6 5544 (version "1.3.1")
e99f4211
MW
5545 (source
5546 (origin
5547 (method url-fetch)
b97c1bfd 5548 (uri (pypi-uri "urwid" version))
e99f4211
MW
5549 (sha256
5550 (base32
51ff41f6 5551 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5552 (build-system python-build-system)
b97c1bfd
LF
5553 (arguments
5554 `(#:phases
5555 (modify-phases %standard-phases
5556 ;; Disable failing test. Bug filed upstream:
5557 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5558 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5559 (add-after 'unpack 'disable-failing-test
5560 (lambda _
5561 (substitute* "urwid/tests/test_event_loops.py"
5562 (("test_remove_watch_file")
5563 "disable_remove_watch_file")))))))
e99f4211
MW
5564 (home-page "http://urwid.org")
5565 (synopsis "Console user interface library for Python")
5566 (description
5567 "Urwid is a curses-based UI/widget library for Python. It includes many
5568features useful for text console applications.")
3f641af0 5569 (license license:lgpl2.1+)))
e99f4211
MW
5570
5571(define-public python2-urwid
e9379305
MC
5572 (let ((python2-urwid (package-with-python2 python-urwid)))
5573 (package
5574 (inherit python2-urwid)
5575 (arguments
5576 (append
5577 '(#:phases
5578 (modify-phases %standard-phases
5579 ;; Disable the vterm tests because of non-deterministic failures
5580 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5581 (add-after 'unpack 'delete-test_vterm.py
5582 (delete-file "urwid/tests/test_vterm.py"))))
5583 (package-arguments python-urwid))))))
d95a56c6 5584
5220022a
JL
5585(define-public python-openid
5586 (package
5587 (name "python-openid")
5588 (version "3.0.10")
5589 (source
5590 (origin
5591 (method url-fetch)
5592 (uri (pypi-uri "python3-openid" version))
5593 (sha256
5594 (base32
5595 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5596 (build-system python-build-system)
0660d327
DM
5597 (arguments
5598 `(#:phases
5599 (modify-phases %standard-phases
5600 (replace 'check
5601 (lambda _
5602 (zero? (system* "./admin/runtests")))))))
f048db5a 5603 (properties `((python2-variant . ,(delay python2-openid))))
0660d327
DM
5604 (propagated-inputs
5605 `(("python-defusedxml" ,python-defusedxml)))
5606 (native-inputs
5607 `(("python-psycopg2" ,python-psycopg2)
5608 ("python-django" ,python-django)))
5220022a
JL
5609 (home-page "https://github.com/necaris/python3-openid")
5610 (synopsis "OpenID support for servers and consumers")
5611 (description "This library provides OpenID authentication for Python, both
5612for clients and servers.")
5613 (license license:asl2.0)))
5614
3ef00f56 5615(define-public python2-openid
5616 (package
5617 (name "python2-openid")
5618 (version "2.2.5")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (pypi-uri "python-openid" version))
5623 (sha256
5624 (base32
5625 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5626 (build-system python-build-system)
5627 (arguments
5628 ;; Python 3 support is in `python3-openid`, a separate package.
5629 `(#:python ,python-2))
5630 (home-page "https://github.com/openid/python-openid")
5631 (synopsis "OpenID support for servers and consumers")
5632 (description "This library provides OpenID authentication for Python, both
5633for clients and servers.")
5634 (license license:asl2.0)))
5635
47d0b292
TS
5636(define-public python-urwidtrees
5637 (package
5638 (name "python-urwidtrees")
37ec4623 5639 (version "1.0.2")
47d0b292
TS
5640 (source
5641 (origin
5642 (method url-fetch)
37ec4623
TS
5643 ;; package author intends on distributing via github rather than pypi:
5644 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5645 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5646 version ".tar.gz"))
5647 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5648 (sha256
5649 (base32
37ec4623 5650 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5651 (build-system python-build-system)
5652 (arguments
5653 '(#:tests? #f)) ; no tests
f22efa01 5654 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5655 (home-page "https://github.com/pazz/urwidtrees")
5656 (synopsis "Tree widgets for urwid")
5657 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5658toolkit. Use it to build trees of widgets.")
3f641af0 5659 (license license:gpl3+)))
47d0b292
TS
5660
5661(define-public python2-urwidtrees
5662 (package-with-python2 python-urwidtrees))
5663
d95a56c6
PAR
5664(define-public python-dbus
5665 (package
5666 (name "python-dbus")
5667 (version "1.2.0")
5668 (source
5669 (origin
5670 (method url-fetch)
5671 (uri (string-append
5cc3096c 5672 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5673 version ".tar.gz"))
5674 (sha256
5675 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5676 (build-system gnu-build-system)
6717c879
SB
5677 (arguments
5678 '(#:phases
5679 (modify-phases %standard-phases
5680 (add-before
5681 'check 'pre-check
5682 (lambda _
5683 ;; XXX: For the missing '/etc/machine-id'.
5684 (substitute* "test/run-test.sh"
5685 (("DBUS_FATAL_WARNINGS=1")
5686 "DBUS_FATAL_WARNINGS=0"))
5687 #t)))))
d95a56c6
PAR
5688 (native-inputs
5689 `(("pkg-config" ,pkg-config)))
5690 (inputs
5691 `(("python" ,python)
2e88d113 5692 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5693 (synopsis "Python bindings for D-bus")
5694 (description "python-dbus provides bindings for libdbus, the reference
5695implementation of D-Bus.")
5696 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5697 (license license:expat)))
b52af02b
MW
5698
5699(define-public python2-dbus
5700 (package (inherit python-dbus)
5701 (name "python2-dbus")
5702 (inputs `(("python" ,python-2)
5703 ,@(alist-delete "python"
5704 (package-inputs python-dbus)
5705 equal?)))
5706 ;; FIXME: on Python 2, the test_utf8 fails with:
5707 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5708 (arguments `(#:tests? #f))))
a6ac8332
AE
5709
5710(define-public python-apsw
5711 (package
5712 (name "python-apsw")
917708c2 5713 (version "3.9.2-r1")
a6ac8332
AE
5714 (source
5715 (origin
5716 (method url-fetch)
917708c2 5717 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5718 (sha256
5719 (base32
917708c2 5720 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5721 (build-system python-build-system)
5722 (inputs
f3b98f4f 5723 `(("sqlite" ,sqlite)))
a6ac8332
AE
5724 (arguments
5725 `(#:phases
154d207c
MB
5726 (modify-phases %standard-phases
5727 (delete 'check)
5728 (add-after 'install 'check
5729 (lambda* (#:key inputs outputs #:allow-other-keys)
5730 (add-installed-pythonpath inputs outputs)
5731 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5732 (home-page "https://github.com/rogerbinns/apsw/")
5733 (synopsis "Another Python SQLite Wrapper")
5734 (description "APSW is a Python wrapper for the SQLite
5735embedded relational database engine. In contrast to other wrappers such as
5736pysqlite it focuses on being a minimal layer over SQLite attempting just to
5737translate the complete SQLite API into Python.")
abde5f37 5738 (license license:zlib)))
a6ac8332
AE
5739
5740(define-public python2-apsw
5741 (package-with-python2 python-apsw))
26b307e2
AE
5742
5743(define-public python-lxml
5744 (package
5745 (name "python-lxml")
d58a3203 5746 (version "3.6.0")
26b307e2
AE
5747 (source
5748 (origin
5749 (method url-fetch)
97bbc480 5750 (uri (pypi-uri "lxml" version))
26b307e2 5751 (sha256
d58a3203
EF
5752 (base32
5753 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5754 (build-system python-build-system)
5755 (inputs
5756 `(("libxml2" ,libxml2)
f3b98f4f 5757 ("libxslt" ,libxslt)))
26b307e2
AE
5758 (home-page "http://lxml.de/")
5759 (synopsis
5760 "Python XML processing library")
5761 (description
5762 "The lxml XML toolkit is a Pythonic binding for the C libraries
5763libxml2 and libxslt.")
3f641af0 5764 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5765
5766(define-public python2-lxml
5767 (package-with-python2 python-lxml))
4ed20663 5768
b32a1e47
CAW
5769;; beautifulsoup4 has a totally different namespace than 3.x,
5770;; and pypi seems to put it under its own name, so I guess we should too
5771(define-public python-beautifulsoup4
5772 (package
5773 (name "python-beautifulsoup4")
80e8d851 5774 (version "4.5.3")
b32a1e47
CAW
5775 (source
5776 (origin
5777 (method url-fetch)
5778 (uri (pypi-uri "beautifulsoup4" version))
5779 (sha256
5780 (base32
80e8d851 5781 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 5782 (build-system python-build-system)
5f37f0b6
LF
5783 (arguments
5784 `(#:phases
5785 (modify-phases %standard-phases
5786 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5787 ;; must use this conversion script when building with Python 3. The
5788 ;; conversion script also runs the tests.
5789 ;; For more information, see the file 'convert-py3k' in the source
5790 ;; distribution.
5791 (replace 'check
5792 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5793 (home-page
5794 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5795 (synopsis
5796 "Python screen-scraping library")
5797 (description
5798 "Beautiful Soup is a Python library designed for rapidly setting up
5799screen-scraping projects. It offers Pythonic idioms for navigating,
5800searching, and modifying a parse tree, providing a toolkit for
5801dissecting a document and extracting what you need. It automatically
5802converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5803 (license license:expat)
5804 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5805
5806(define-public python2-beautifulsoup4
5807 (package
5808 (inherit (package-with-python2
5809 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5810 (arguments `(#:python ,python-2))))
b32a1e47 5811
4dcb135e 5812(define-public python-cssutils
092e86f5 5813 (package
4dcb135e 5814 (name "python-cssutils")
58d1d816 5815 (version "1.0.1")
092e86f5
AE
5816 (source
5817 (origin
5818 (method url-fetch)
58d1d816 5819 (uri (pypi-uri "cssutils" version))
092e86f5 5820 (sha256
58d1d816
EF
5821 (base32
5822 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5823 (build-system python-build-system)
5824 (native-inputs
4dcb135e 5825 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5826 (arguments
4dcb135e 5827 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5828 (home-page "http://cthedot.de/cssutils/")
5829 (synopsis
5830 "CSS Cascading Style Sheets library for Python")
5831 (description
5832 "Cssutils is a Python package for parsing and building CSS
5833Cascading Style Sheets. Currently it provides a DOM only and no rendering
5834options.")
3f641af0 5835 (license license:lgpl3+)))
880ff77c 5836
4dcb135e
EB
5837(define-public python2-cssutils
5838 (package-with-python2 python-cssutils))
5839
880ff77c
AE
5840(define-public python-cssselect
5841 (package
5842 (name "python-cssselect")
d5ccd9ab 5843 (version "0.9.2")
880ff77c
AE
5844 (source
5845 (origin
5846 (method url-fetch)
d5ccd9ab 5847 (uri (pypi-uri "cssselect" version))
880ff77c 5848 (sha256
d5ccd9ab
EF
5849 (base32
5850 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5851 (build-system python-build-system)
880ff77c
AE
5852 (arguments
5853 ;; tests fail with message
5854 ;; AttributeError: 'module' object has no attribute 'tests'
5855 `(#:tests? #f))
5856 (home-page
5857 "https://pythonhosted.org/cssselect/")
5858 (synopsis
5859 "CSS3 selector parser and translator to XPath 1.0")
5860 (description
5861 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5862them to XPath 1.0 expressions. Such expressions can be used in lxml or
5863another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5864 (license license:bsd-3)))
880ff77c
AE
5865
5866(define-public python2-cssselect
5867 (package-with-python2 python-cssselect))
60357f99 5868
03702173 5869(define-public python-openid-cla
5870 (package
5871 (name "python-openid-cla")
5872 (version "1.2")
5873 (source
5874 (origin
5875 (method url-fetch)
5876 (uri (pypi-uri "python-openid-cla" version))
5877 (sha256
5878 (base32
5879 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5880 (build-system python-build-system)
019ccdb6 5881 (arguments '(#:tests? #f)) ; No tests.
03702173 5882 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5883 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5884 (description "@code{openid-cla} is an implementation of the OpenID
5885contributor license agreement extension for python-openid.")
5886 (license license:bsd-3)))
5887
5888(define-public python2-openid-cla
5889 (package-with-python2 python-openid-cla))
5890
a0e41de4 5891(define-public python-openid-teams
5892 (package
5893 (name "python-openid-teams")
5894 (version "1.1")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "python-openid-teams" version))
5899 (sha256
5900 (base32
5901 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5902 (build-system python-build-system)
ac72d3d2 5903 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5904 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5905 (synopsis "Implementation of the OpenID teams extension for python-openid")
5906 (description
5907 "@code{openid-teams} is an implementation of the OpenID
5908teams extension for python-openid.")
5909 (license license:bsd-3)))
5910
5911(define-public python2-openid-teams
5912 (package-with-python2 python-openid-teams))
5913
60357f99
AE
5914(define-public python-netifaces
5915 (package
5916 (name "python-netifaces")
5917 (version "0.10.4")
5918 (source
5919 (origin
5920 (method url-fetch)
5921 (uri (string-append
5922 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5923 version
5924 ".tar.gz"))
5925 (sha256
5926 (base32
5927 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5928 (build-system python-build-system)
60357f99
AE
5929 (home-page
5930 "https://bitbucket.org/al45tair/netifaces")
5931 (synopsis
5932 "Python module for portable network interface information")
5933 (description
5934 "Netifaces is a Python module providing information on network
5935interfaces in an easy and portable manner.")
5936 (license license:expat)))
5937
5938(define-public python2-netifaces
5939 (package-with-python2 python-netifaces))
92cb152b 5940
32f77c04
RW
5941(define-public python-networkx
5942 (package
5943 (name "python-networkx")
a4d9609c 5944 (version "1.11")
32f77c04
RW
5945 (source
5946 (origin
5947 (method url-fetch)
a4d9609c 5948 (uri (pypi-uri "networkx" version))
32f77c04 5949 (sha256
a4d9609c 5950 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5951 (build-system python-build-system)
5952 ;; python-decorator is needed at runtime
5953 (propagated-inputs
5954 `(("python-decorator" ,python-decorator)))
5955 (native-inputs
f3b98f4f 5956 `(("python-nose" ,python-nose)))
32f77c04
RW
5957 (home-page "http://networkx.github.io/")
5958 (synopsis "Python module for creating and manipulating graphs and networks")
5959 (description
5960 "NetworkX is a Python package for the creation, manipulation, and study
5961of the structure, dynamics, and functions of complex networks.")
3f641af0 5962 (license license:bsd-3)))
32f77c04
RW
5963
5964(define-public python2-networkx
5965 (package-with-python2 python-networkx))
5966
92cb152b
RW
5967(define-public snakemake
5968 (package
5969 (name "snakemake")
ef71ed8f 5970 (version "3.11.2")
92cb152b
RW
5971 (source
5972 (origin
5973 (method url-fetch)
7b93d866 5974 (uri (pypi-uri "snakemake" version))
92cb152b 5975 (sha256
ef71ed8f 5976 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
92cb152b 5977 (build-system python-build-system)
7b93d866
MB
5978 (arguments
5979 ;; TODO: Package missing test dependencies.
5980 '(#:tests? #f))
4f9998c6
RW
5981 (propagated-inputs
5982 `(("python-wrapt" ,python-wrapt)
5983 ("python-requests" ,python-requests)))
7b93d866 5984 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5985 (synopsis "Python-based execution environment for make-like workflows")
5986 (description
5987 "Snakemake aims to reduce the complexity of creating workflows by
5988providing a clean and modern domain specific specification language (DSL) in
5989Python style, together with a fast and comfortable execution environment.")
5990 (license license:expat)))
a1920bc9 5991
35de1fbd
RW
5992(define-public python-seaborn
5993 (package
5994 (name "python-seaborn")
ccc18762 5995 (version "0.7.1")
35de1fbd
RW
5996 (source
5997 (origin
5998 (method url-fetch)
fc899d4f 5999 (uri (pypi-uri "seaborn" version))
35de1fbd 6000 (sha256
ccc18762 6001 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 6002 (build-system python-build-system)
6f976df6
MB
6003 (arguments
6004 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
6005 (propagated-inputs
6006 `(("python-pandas" ,python-pandas)
6007 ("python-matplotlib" ,python-matplotlib)
6008 ("python-scipy" ,python-scipy)))
35de1fbd
RW
6009 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6010 (synopsis "Statistical data visualization")
6011 (description
6012 "Seaborn is a library for making attractive and informative statistical
6013graphics in Python. It is built on top of matplotlib and tightly integrated
6014with the PyData stack, including support for numpy and pandas data structures
6015and statistical routines from scipy and statsmodels.")
3f641af0 6016 (license license:bsd-3)
fc899d4f 6017 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
6018
6019(define-public python2-seaborn
fc899d4f
EF
6020 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6021 (package
6022 (inherit base)
6023 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 6024 ,@(package-propagated-inputs base))))))
35de1fbd 6025
58a35665
MB
6026(define-public python-mpmath
6027 (package
6028 (name "python-mpmath")
6029 (version "0.19")
6030 (source (origin
6031 (method url-fetch)
6032 (uri (string-append "http://mpmath.org/files/mpmath-"
6033 version ".tar.gz"))
6034 (sha256
6035 (base32
6036 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6037 (build-system python-build-system)
6038 (arguments
6039 '(#:phases
6040 (modify-phases %standard-phases
6041 (replace 'check
6042 (lambda _
6043 (zero?
6044 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6045 (home-page "http://mpmath.org")
6046 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6047 (description
6048 "@code{mpmath} can be used as an arbitrary-precision substitute for
6049Python's float/complex types and math/cmath modules, but also does much
6050more advanced mathematics.")
6051 (license license:bsd-3)))
6052
6053(define-public python2-mpmath
6054 (package-with-python2 python-mpmath))
35de1fbd 6055
90fc547f
RW
6056(define-public python-sympy
6057 (package
6058 (name "python-sympy")
52f622ef 6059 (version "1.0")
90fc547f
RW
6060 (source
6061 (origin
6062 (method url-fetch)
6063 (uri (string-append
6064 "https://github.com/sympy/sympy/releases/download/sympy-"
6065 version "/sympy-" version ".tar.gz"))
6066 (sha256
52f622ef 6067 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6068 (build-system python-build-system)
52f622ef
MB
6069 (propagated-inputs
6070 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6071 (home-page "http://www.sympy.org/")
6072 (synopsis "Python library for symbolic mathematics")
6073 (description
6074 "SymPy is a Python library for symbolic mathematics. It aims to become a
6075full-featured computer algebra system (CAS) while keeping the code as simple
6076as possible in order to be comprehensible and easily extensible.")
3f641af0 6077 (license license:bsd-3)))
90fc547f
RW
6078
6079(define-public python2-sympy
6080 (package-with-python2 python-sympy))
6081
e8c9b010
SR
6082(define-public python-q
6083 (package
6084 (name "python-q")
6085 (version "2.6")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "q" version))
6090 (sha256
6091 (base32
6092 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6093 (build-system python-build-system)
6094 (home-page "https://github.com/zestyping/q")
6095 (synopsis "Quick-and-dirty debugging output for tired programmers")
6096 (description
6097 "q is a Python module for \"print\" style of debugging Python code. It
6098provides convenient short API for print out of values, tracebacks, and
6099falling into the Python interpreter.")
f210e944 6100 (license license:asl2.0)))
e8c9b010
SR
6101
6102(define-public python2-q
f210e944 6103 (package-with-python2 python-q))
e8c9b010 6104
a1920bc9
FB
6105(define-public python-testlib
6106 (package
6107 (name "python-testlib")
6108 (version "0.6.5")
6109 (source
6110 (origin
6111 (method url-fetch)
6112 (uri (string-append
6113 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6114 version ".zip"))
6115 (sha256
6116 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6117 (build-system python-build-system)
a1920bc9 6118 (native-inputs
632735f2 6119 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6120 (synopsis "Python micro test suite harness")
6121 (description "A micro unittest suite harness for Python.")
6122 (home-page "https://github.com/trentm/testlib")
1cb9c006 6123 (license license:expat)))
a1920bc9
FB
6124
6125(define-public python2-testlib
6126 (package-with-python2 python-testlib))
db62afa5
LC
6127
6128(define-public python2-xlib
6129 (package
6130 (name "python2-xlib")
6131 (version "0.14")
6132 (source (origin
6133 (method url-fetch)
de67e922
LF
6134 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6135 "/" version "/"
db62afa5
LC
6136 "python-xlib-" version ".tar.gz"))
6137 (sha256
6138 (base32
6139 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6140 (build-system python-build-system)
6141 (arguments
6142 `(#:python ,python-2 ;Python 2 only
6143 #:tests? #f)) ;no tests
db62afa5
LC
6144 (home-page "http://python-xlib.sourceforge.net/")
6145 (synopsis "Python X11 client library")
6146 (description
6147 "The Python X Library is intended to be a fully functional X client
6148library for Python programs. It is useful to implement low-level X clients.
6149It is written entirely in Python.")
3f641af0 6150 (license license:gpl2+)))
0234ca06
DT
6151
6152(define-public python-singledispatch
6153 (package
6154 (name "python-singledispatch")
6155 (version "3.4.0.3")
6156 (source
6157 (origin
6158 (method url-fetch)
bdb67d84 6159 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6160 (sha256
6161 (base32
6162 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6163 (build-system python-build-system)
5e1c9d24
HG
6164 (native-inputs
6165 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6166 (home-page
6167 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6168 (synopsis "Backport of singledispatch feature from Python 3.4")
6169 (description
6170 "This library brings functools.singledispatch from Python 3.4 to Python
61712.6-3.3.")
6172 (license license:expat)))
6173
6174(define-public python2-singledispatch
6175 (package-with-python2 python-singledispatch))
feaae484 6176
310d218f
RW
6177(define-public python-tornado
6178 (package
6179 (name "python-tornado")
6fdeb324 6180 (version "4.5.1")
310d218f
RW
6181 (source
6182 (origin
6183 (method url-fetch)
a724924b 6184 (uri (pypi-uri "tornado" version))
310d218f 6185 (sha256
6fdeb324 6186 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6187 (build-system python-build-system)
3fe2c209
MB
6188 (arguments
6189 '(;; FIXME: Two tests error out with:
6190 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6191 ;; #:phases
6192 ;; (modify-phases %standard-phases
6193 ;; (replace 'check
6194 ;; (lambda _
6195 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6196 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6197 ;; (zero? (system* "python" "-m" "tornado.test")))))
6198 #:tests? #f))
310d218f 6199 (native-inputs
b455439b 6200 `(("python-certifi" ,python-certifi)))
f22efa01 6201 (propagated-inputs
b455439b 6202 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6203 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6204 (synopsis "Python web framework and asynchronous networking library")
6205 (description
6206 "Tornado is a Python web framework and asynchronous networking library,
6207originally developed at FriendFeed. By using non-blocking network I/O,
6208Tornado can scale to tens of thousands of open connections, making it ideal
6209for long polling, WebSockets, and other applications that require a long-lived
6210connection to each user.")
3f641af0 6211 (license license:asl2.0)
b455439b 6212 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6213
6214(define-public python2-tornado
b455439b 6215 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6216 (package (inherit tornado)
f22efa01 6217 (propagated-inputs
310d218f
RW
6218 `(("python2-backport-ssl-match-hostname"
6219 ,python2-backport-ssl-match-hostname)
b455439b 6220 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6221 ,@(package-propagated-inputs tornado))))))
310d218f 6222
6b59fc10
EF
6223;; the python- version can be removed with python-3.5
6224(define-public python-backports-abc
6225 (package
6226 (name "python-backports-abc")
27f9148e 6227 (version "0.5")
6b59fc10
EF
6228 (source
6229 (origin
6230 (method url-fetch)
6231 (uri (pypi-uri "backports_abc" version))
6232 (sha256
6233 (base32
27f9148e 6234 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6235 (build-system python-build-system)
6b59fc10 6236 (home-page "https://github.com/cython/backports_abc")
66e07664 6237 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6238 (description
6239 "Python-backports-abc provides a backport of additions to the
6240'collections.abc' module in Python-3.5.")
3f641af0 6241 (license license:psfl)))
6b59fc10
EF
6242
6243(define-public python2-backports-abc
6244 (package-with-python2 python-backports-abc))
6245
ec074213
TD
6246(define-public python2-backports-shutil-get-terminal-size
6247 (package
6248 (name "python2-backports-shutil-get-terminal-size")
6249 (version "1.0.0")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6254 (sha256
6255 (base32
6256 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6257 (build-system python-build-system)
6258 (arguments
c0446791
MB
6259 `(#:python ,python-2
6260 #:phases
6261 (modify-phases %standard-phases
6262 (replace 'check
6263 (lambda _
6264 (zero? (system* "py.test" "-v")))))))
6265 (native-inputs
6266 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6267 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6268 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6269 (description
6270 "This package provides a backport of the @code{get_terminal_size
6271function} from Python 3.3's @code{shutil}.
6272Unlike the original version it is written in pure Python rather than C,
6273so it might be a tiny bit slower.")
6274 (license license:expat)))
6275
feaae484
SB
6276(define-public python-waf
6277 (package
6278 (name "python-waf")
27bf00e6 6279 (version "1.9.8")
feaae484
SB
6280 (source (origin
6281 (method url-fetch)
bae67829 6282 (uri (string-append "https://waf.io/"
feaae484
SB
6283 "waf-" version ".tar.bz2"))
6284 (sha256
6285 (base32
27bf00e6 6286 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6287 (build-system python-build-system)
6288 (arguments
6289 '(#:phases
6290 (modify-phases %standard-phases
6291 (replace 'build
7dd55dfe
EF
6292 (lambda _
6293 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6294 (replace 'check
7dd55dfe
EF
6295 (lambda _
6296 (zero? (system* "python" "waf" "--version"))))
feaae484 6297 (replace 'install
7dd55dfe
EF
6298 (lambda _
6299 (copy-file "waf" %output))))))
27bf00e6 6300 (home-page "https://waf.io/")
feaae484
SB
6301 (synopsis "Python-based build system")
6302 (description
6303 "Waf is a Python-based framework for configuring, compiling and installing
6304applications.")
3f641af0 6305 (license license:bsd-3)))
feaae484
SB
6306
6307(define-public python2-waf
6308 (package-with-python2 python-waf))
45203542
RW
6309
6310(define-public python-pyzmq
6311 (package
6312 (name "python-pyzmq")
3655ee76 6313 (version "15.1.0")
45203542
RW
6314 (source
6315 (origin
6316 (method url-fetch)
3655ee76 6317 (uri (pypi-uri "pyzmq" version))
45203542 6318 (sha256
3655ee76 6319 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6320 (build-system python-build-system)
6321 (arguments
6322 `(#:configure-flags
6323 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6324 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6325 ;; --inplace' for 'python setup.py test' to work.
6326 #:tests? #f))
6327 (inputs
6328 `(("zeromq" ,zeromq)))
6329 (native-inputs
6330 `(("pkg-config" ,pkg-config)
f3b98f4f 6331 ("python-nose" ,python-nose)))
7bf837fd 6332 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6333 (synopsis "Python bindings for 0MQ")
6334 (description
6335 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6336 (license license:bsd-4)))
45203542
RW
6337
6338(define-public python2-pyzmq
6339 (package-with-python2 python-pyzmq))
d889e6c4
CR
6340
6341(define-public python-pep8
6342 (package
6343 (name "python-pep8")
db251311 6344 (version "1.7.0")
d889e6c4
CR
6345 (source
6346 (origin
6347 (method url-fetch)
db251311 6348 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6349 (sha256
6350 (base32
db251311 6351 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6352 (build-system python-build-system)
d889e6c4
CR
6353 (home-page "http://pep8.readthedocs.org/")
6354 (synopsis "Python style guide checker")
6355 (description
6356 "This tools checks Python code against some of the style conventions in
6357PEP 8.")
6358 (license license:expat)))
6359
6360(define-public python2-pep8
6361 (package-with-python2 python-pep8))
e31d7f44
CR
6362
6363(define-public python-pyflakes
6364 (package
6365 (name "python-pyflakes")
2abc3972 6366 (version "1.0.0")
e31d7f44
CR
6367 (source
6368 (origin
6369 (method url-fetch)
2abc3972 6370 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6371 (sha256
6372 (base32
2abc3972 6373 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6374 (build-system python-build-system)
e31d7f44
CR
6375 (home-page
6376 "https://github.com/pyflakes/pyflakes")
6377 (synopsis "Passive checker of Python programs")
6378 (description
6379 "Pyflakes statically checks Python source code for common errors.")
6380 (license license:expat)))
a59e017c 6381
7261d9eb
CR
6382(define-public python2-pyflakes
6383 (package-with-python2 python-pyflakes))
6384
a59e017c
CR
6385(define-public python-mccabe
6386 (package
6387 (name "python-mccabe")
c6ebd40d 6388 (version "0.4.0")
a59e017c
CR
6389 (source
6390 (origin
6391 (method url-fetch)
c6ebd40d 6392 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6393 (sha256
6394 (base32
c6ebd40d 6395 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6396 (build-system python-build-system)
328bb95d 6397 (native-inputs
c6ebd40d 6398 `(("python-pytest" ,python-pytest)
f3b98f4f 6399 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6400 (home-page "https://github.com/flintwork/mccabe")
6401 (synopsis "McCabe checker, plugin for flake8")
6402 (description
6403 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6404complexity of Python source code.")
7362371d 6405 (license license:expat)))
a59e017c
CR
6406
6407(define-public python2-mccabe
6408 (package-with-python2 python-mccabe))
e8df8f47 6409
7477fbb1
CR
6410(define-public python-mccabe-0.2.1
6411 (package (inherit python-mccabe)
6412 (version "0.2.1")
6413 (source
6414 (origin
6415 (method url-fetch)
6416 (uri (pypi-uri "mccabe" version))
6417 (sha256
6418 (base32
f3b98f4f 6419 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6420
6421(define-public python2-mccabe-0.2.1
6422 (package-with-python2 python-mccabe-0.2.1))
6423
e8df8f47
CR
6424;; Flake8 2.4.1 requires an older version of pep8.
6425;; This should be removed ASAP.
6426(define-public python-pep8-1.5.7
6427 (package (inherit python-pep8)
6428 (version "1.5.7")
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (string-append
6433 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6434 version
6435 ".tar.gz"))
6436 (sha256
6437 (base32
73e3060d
MB
6438 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6439 (arguments
6440 ;; XXX Tests not compatible with Python 3.5.
6441 '(#:tests? #f))))
e8df8f47
CR
6442
6443(define-public python2-pep8-1.5.7
6444 (package-with-python2 python-pep8-1.5.7))
6445
6446;; Flake8 2.4.1 requires an older version of pyflakes.
6447;; This should be removed ASAP.
6448(define-public python-pyflakes-0.8.1
6449 (package (inherit python-pyflakes)
6450 (version "0.8.1")
6451 (source
6452 (origin
6453 (method url-fetch)
6454 (uri (string-append
6455 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6456 version
6457 ".tar.gz"))
6458 (sha256
6459 (base32
0d84e1ef
MB
6460 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6461 (arguments
6462 ;; XXX Tests not compatible with Python 3.5.
6463 '(#:tests? #f))))
e8df8f47
CR
6464
6465(define-public python2-pyflakes-0.8.1
7261d9eb 6466 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6467
6468(define-public python-flake8
6469 (package
6470 (name "python-flake8")
43789136 6471 (version "2.5.4")
e8df8f47
CR
6472 (source
6473 (origin
6474 (method url-fetch)
1b995533 6475 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6476 (sha256
6477 (base32
011271c7
HG
6478 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6479 (modules '((guix build utils)))
6480 (snippet
6481 '(begin
6482 ;; Remove pre-compiled .pyc files from source.
6483 (for-each delete-file-recursively
6484 (find-files "." "__pycache__" #:directories? #t))
6485 (for-each delete-file (find-files "." "\\.pyc$"))
6486 #t))))
e8df8f47 6487 (build-system python-build-system)
482d9591 6488 (propagated-inputs
f3b98f4f 6489 `(("python-pep8" ,python-pep8)
43789136 6490 ("python-pyflakes" ,python-pyflakes)
482d9591 6491 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6492 (native-inputs
6493 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6494 ("python-nose" ,python-nose)))
6495 (home-page "https://gitlab.com/pycqa/flake8")
6496 (synopsis
6497 "The modular source code checker: pep8, pyflakes and co")
6498 (description
6499 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6500 (license license:expat)))
6501
6502(define-public python2-flake8
6503 (package-with-python2 python-flake8))
61b9ac53 6504
abf21efc
CR
6505;; This will only be needed by the python-hacking package and will not be
6506;; necessary once python-hacking > 0.10.2 is released.
6507(define-public python-flake8-2.2.4
6508 (package (inherit python-flake8)
482d9591 6509 (propagated-inputs
f3b98f4f 6510 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6511 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6512 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6513 (native-inputs
482d9591 6514 `(("python-mock" ,python-mock)
abf21efc
CR
6515 ("python-nose" ,python-nose)))
6516 (version "2.2.4")
6517 (source
6518 (origin
6519 (method url-fetch)
6520 (uri (pypi-uri "flake8" version))
6521 (sha256
6522 (base32
b9c8ccce
HG
6523 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6524 (modules '((guix build utils)))
6525 (snippet
6526 '(begin
6527 ;; Remove pre-compiled .pyc files from source.
6528 (for-each delete-file-recursively
6529 (find-files "." "__pycache__" #:directories? #t))
6530 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6531 #t))))
6532 (arguments
6533 ;; XXX Fails with Python 3.5.
6534 '(#:tests? #f))))
abf21efc
CR
6535
6536(define-public python2-flake8-2.2.4
6537 (package-with-python2 python-flake8-2.2.4))
6538
1f42d824
MFM
6539(define-public python-flake8-polyfill
6540 (package
6541 (name "python-flake8-polyfill")
6542 (version "1.0.1")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "flake8-polyfill" version))
6547 (sha256
6548 (base32
6549 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6550 (build-system python-build-system)
2c1cad7a
MB
6551 (arguments
6552 '(#:phases
6553 (modify-phases %standard-phases
6554 (replace 'check
6555 (lambda _
6556 (setenv "PYTHONPATH"
6557 (string-append (getcwd) "/build/lib:"
6558 (getenv "PYTHONPATH")))
6559 (zero? (system* "py.test" "-v")))))))
6560 (native-inputs
6561 `(("python-flake8" ,python-flake8)
6562 ("python-mock" ,python-mock)
6563 ("python-pycodestyle" ,python-pycodestyle)
6564 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6565 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6566 (synopsis "Polyfill package for Flake8 plugins")
6567 (description
6568 "This package that provides some compatibility helpers for Flake8
6569plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6570 (license license:expat)))
6571
6572(define-public python2-flake8-polyfill
6573 (package-with-python2 python-flake8-polyfill))
6574
61b9ac53
FB
6575(define-public python-mistune
6576 (package
6577 (name "python-mistune")
08b81336 6578 (version "0.7.3")
61b9ac53
FB
6579 (source
6580 (origin
6581 (method url-fetch)
eff8d773 6582 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6583 (sha256
6584 (base32
08b81336 6585 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6586 (build-system python-build-system)
328bb95d 6587 (native-inputs
f3b98f4f 6588 `(("python-nose" ,python-nose)
61b9ac53
FB
6589 ("python-cython" ,python-cython)))
6590 (home-page "https://github.com/lepture/mistune")
6591 (synopsis "Markdown parser in pure Python")
6592 (description "This package provides a fast markdown parser in pure
6593Python.")
3f641af0 6594 (license license:bsd-3)))
61b9ac53
FB
6595
6596(define-public python2-mistune
6597 (package-with-python2 python-mistune))
6d992d07 6598
b9893908
EE
6599(define-public python-markdown
6600 (package
6601 (name "python-markdown")
4ffbe8c6 6602 (version "2.6.8")
b9893908
EE
6603 (source
6604 (origin
6605 (method url-fetch)
6606 (uri (pypi-uri "Markdown" version))
6607 (sha256
6608 (base32
4ffbe8c6 6609 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6610 (build-system python-build-system)
6611 (arguments
6612 `(#:phases
6613 (modify-phases %standard-phases
6614 (replace 'check
6615 (lambda _
6616 (zero? (system* "python" "run-tests.py")))))))
6617 (native-inputs
6618 `(("python-nose" ,python-nose)
6619 ("python-pyyaml" ,python-pyyaml)))
6620 (home-page "https://pythonhosted.org/Markdown/")
6621 (synopsis "Python implementation of Markdown")
6622 (description
6623 "This package provides a Python implementation of John Gruber's
6624Markdown. The library features international input, various Markdown
6625extensions, and several HTML output formats. A command line wrapper
6626markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6627 (license license:bsd-3)))
b9893908
EE
6628
6629(define-public python2-markdown
6630 (package-with-python2 python-markdown))
6631
6d992d07
FB
6632(define-public python-ptyprocess
6633 (package
6634 (name "python-ptyprocess")
70fc93cb 6635 (version "0.5.1")
6d992d07
FB
6636 (source
6637 (origin
6638 (method url-fetch)
6639 (uri (string-append
6640 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6641 version ".tar.gz"))
6642 (sha256
6643 (base32
70fc93cb 6644 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6645 (build-system python-build-system)
328bb95d 6646 (native-inputs
f3b98f4f 6647 `(("python-nose" ,python-nose)))
6d992d07
FB
6648 (arguments
6649 `(#:phases
6650 (modify-phases %standard-phases
6651 (replace 'check
6652 (lambda _
6653 (zero? (system* "nosetests")))))))
6654 (home-page "https://github.com/pexpect/ptyprocess")
6655 (synopsis "Run a subprocess in a pseudo terminal")
6656 (description
6657 "This package provides a Python library used to launch a subprocess in a
6658pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6659 (license license:isc)))
6d992d07
FB
6660
6661(define-public python2-ptyprocess
6662 (package-with-python2 python-ptyprocess))
4aadb1df 6663
df893a38
MB
6664(define-public python-cram
6665 (package
6666 (name "python-cram")
6667 (version "0.7")
6668 (home-page "https://bitheap.org/cram/")
6669 (source (origin
6670 (method url-fetch)
6671 (uri (list (string-append home-page "cram-"
6672 version ".tar.gz")
6673 (pypi-uri "cram" version)))
6674 (sha256
6675 (base32
6676 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6677 (arguments
6678 '(#:phases
6679 (modify-phases %standard-phases
6680 (add-after 'unpack 'patch-source
6681 (lambda _
6682 (substitute* (find-files "cram" ".*\\.py$")
6683 ;; Replace default shell path.
6684 (("/bin/sh") (which "sh")))
6685 (substitute* (find-files "tests" ".*\\.t$")
6686 (("md5") "md5sum")
6687 (("/bin/bash") (which "bash"))
6688 (("/bin/sh") (which "sh")))
6689 (substitute* "cram/_test.py"
6690 ;; This hack works around a bug triggered by substituting
6691 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6692 ;; "cram -h", which breaks the output at 80 characters. This
6693 ;; causes the line showing the default shell to break into two
6694 ;; lines, but the test expects a single line...
6695 (("env\\['COLUMNS'\\] = '80'")
6696 "env['COLUMNS'] = '160'"))
6697 #t))
6698 (delete 'check)
6699 (add-after 'install 'check
6700 ;; The test phase uses the built library and executable.
6701 ;; It's easier to run it after install since the build
6702 ;; directory contains version-specific PATH.
6703 (lambda* (#:key inputs outputs #:allow-other-keys)
6704 (add-installed-pythonpath inputs outputs)
6705 (setenv "PATH" (string-append (getenv "PATH") ":"
6706 (assoc-ref outputs "out") "/bin"))
6707 (zero? (system* "make" "test")))))))
6708 (build-system python-build-system)
6709 (native-inputs
6710 `(("python-coverage" ,python-coverage)
6711 ("which" ,which)))
6712 (synopsis "Simple testing framework for command line applications")
6713 (description
6714 "Cram is a functional testing framework for command line applications.
6715Cram tests look like snippets of interactive shell sessions. Cram runs each
6716command and compares the command output in the test with the command’s actual
6717output.")
6718 (license license:gpl2+)))
6719
6720(define-public python2-cram
6721 (package-with-python2 python-cram))
6722
4aadb1df
FB
6723(define-public python-terminado
6724 (package
6725 (name "python-terminado")
783fb0a3 6726 (version "0.6")
4aadb1df
FB
6727 (source
6728 (origin
6729 (method url-fetch)
783fb0a3 6730 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6731 (sha256
6732 (base32
783fb0a3 6733 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6734 (build-system python-build-system)
6735 (propagated-inputs
6736 `(("python-tornado" ,python-tornado)
6737 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6738 (native-inputs
6739 `(("python-nose" ,python-nose)))
4aadb1df
FB
6740 (arguments
6741 `(#:phases
6742 (modify-phases %standard-phases
6743 (replace 'check
6744 (lambda _
6745 (zero? (system* "nosetests")))))))
6746 (home-page "https://github.com/takluyver/terminado")
6747 (synopsis "Terminals served to term.js using Tornado websockets")
6748 (description "This package provides a Tornado websocket backend for the
6749term.js Javascript terminal emulator library.")
3f641af0 6750 (license license:bsd-2)
783fb0a3 6751 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6752
6753(define-public python2-terminado
783fb0a3 6754 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6755 (package (inherit terminado)
783fb0a3
EF
6756 (propagated-inputs
6757 `(("python2-backport-ssl-match-hostname"
6758 ,python2-backport-ssl-match-hostname)
00e10c6e 6759 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6760
789de5e2 6761(define-public python-straight-plugin
6762 (package
6763 (name "python-straight-plugin")
6764 (version "1.4.1")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri "straight.plugin" version))
6769 (sha256
6770 (base32
6771 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6772 (build-system python-build-system)
6773 (home-page "https://github.com/ironfroggy/straight.plugin")
6774 (synopsis "Simple namespaced plugin facility")
6775 (description "Straight Plugin provides a type of plugin you can create from
6776almost any existing Python modules, and an easy way for outside developers to
6777add functionality and customization to your projects with their own plugins.")
6778 (license license:expat)))
6779
6780(define-public python2-straight-plugin
6781 (package-with-python2 python-straight-plugin))
6782
d582eaac
SB
6783(define-public python-fonttools
6784 (package
6785 (name "python-fonttools")
6786 (version "2.5")
6787 (source (origin
6788 (method url-fetch)
6789 (uri (string-append
6790 "https://pypi.python.org/packages/source/F/FontTools/"
6791 "fonttools-" version ".tar.gz"))
6792 (sha256
6793 (base32
6794 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6795 (build-system python-build-system)
9e8c6a37
HG
6796 (arguments
6797 '(#:test-target "check"
6798 #:phases
6799 (modify-phases %standard-phases
6800 (add-after 'unpack 'patch-setuppy
6801 ;; Remove the undocumented "extra_path" argument, which adds an
6802 ;; intervening directories between site-packages and the package
6803 ;; directory.
6804 (lambda _
6805 (substitute* "setup.py"
6806 (("^[ \t]*extra_path *= *'FontTools',") ""))
6807 #t)))))
7bf837fd 6808 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
6809 (synopsis "Tools to manipulate font files")
6810 (description
6811 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6812supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6813of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6814also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6815from an XML-based format.")
3f641af0
DC
6816 (license (license:non-copyleft
6817 "file://LICENSE.txt"
6818 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6819
6820(define-public python2-fonttools
6821 (package-with-python2 python-fonttools))
75710da6 6822
5faa5ce4
RW
6823(define-public python-ly
6824 (package
6825 (name "python-ly")
5135354f 6826 (version "0.9.4")
5faa5ce4
RW
6827 (source
6828 (origin
6829 (method url-fetch)
5135354f
RW
6830 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6831 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6832 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6833 (sha256
6834 (base32
5135354f 6835 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6836 (build-system python-build-system)
972cf9be
MB
6837 (arguments
6838 ;; FIXME: Some tests need network access.
6839 '(#:tests? #f))
5faa5ce4
RW
6840 (synopsis "Tool and library for manipulating LilyPond files")
6841 (description "This package provides a Python library to parse, manipulate
6842or create documents in LilyPond format. A command line program ly is also
6843provided that can be used to do various manipulations with LilyPond files.")
6844 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6845 (license license:gpl2+)))
7e7b27d9
CR
6846
6847(define-public python-appdirs
6848 (package
6849 (name "python-appdirs")
543782e1 6850 (version "1.4.3")
7e7b27d9
CR
6851 (source
6852 (origin
6853 (method url-fetch)
26b16fd9 6854 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
6855 (sha256
6856 (base32
543782e1 6857 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 6858 (build-system python-build-system)
7bf837fd 6859 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
6860 (synopsis
6861 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6862 (description
6863 "This module provides a portable way of finding out where user data
6864should be stored on various operating systems.")
6865 (license license:expat)))
6866
6867(define-public python2-appdirs
6868 (package-with-python2 python-appdirs))
89b2e0b0
LF
6869
6870(define-public python-llfuse
6871 (package
6872 (name "python-llfuse")
4d31d143 6873 (version "1.2")
89b2e0b0
LF
6874 (source (origin
6875 (method url-fetch)
6876 (uri (string-append
6877 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6878 "llfuse-" version ".tar.bz2"))
6879 (sha256
6880 (base32
4d31d143 6881 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
6882 (build-system python-build-system)
6883 (inputs
6884 `(("fuse" ,fuse)
6885 ("attr" ,attr)))
6886 (native-inputs
f3b98f4f 6887 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6888 (synopsis "Python bindings for FUSE")
6889 (description
6890 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6891 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6892 (license license:lgpl2.0+)
cd0569c4 6893 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6894
6895(define-public python2-llfuse
cd0569c4
LF
6896 (package (inherit (package-with-python2
6897 (strip-python2-variant python-llfuse)))
6898 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6899
6900;; For attic-0.16
6901(define-public python-llfuse-0.41
6902 (package (inherit python-llfuse)
229b3661 6903 (version "0.41.1")
cd0569c4
LF
6904 (source (origin
6905 (method url-fetch)
6906 (uri (string-append
6907 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6908 "llfuse-" version ".tar.bz2"))
6909 (sha256
6910 (base32
229b3661 6911 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6912 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6913 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6914 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6915
6916(define-public python-msgpack
6917 (package
6918 (name "python-msgpack")
aed625bd 6919 (version "0.4.8")
641c9871
LF
6920 (source (origin
6921 (method url-fetch)
ae831df4 6922 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6923 (sha256
6924 (base32
aed625bd 6925 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6926 (build-system python-build-system)
641c9871
LF
6927 (synopsis "MessagePack (de)serializer")
6928 (description "MessagePack is a fast, compact binary serialization format,
6929suitable for similar data to JSON. This package provides CPython bindings for
6930reading and writing MessagePack data.")
6931 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6932 (license license:asl2.0)))
bd74be7b
LF
6933
6934(define-public python2-msgpack
f210e944 6935 (package-with-python2 python-msgpack))
641c9871 6936
6e5e39f4
CR
6937(define-public python-netaddr
6938 (package
6939 (name "python-netaddr")
6940 (version "0.7.18")
6941 (source
6942 (origin
6943 (method url-fetch)
6944 (uri (string-append
6945 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6946 version
6947 ".tar.gz"))
6948 (sha256
6949 (base32
6950 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6951 (build-system python-build-system)
6952 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6953 (home-page "https://github.com/drkjam/netaddr/")
6954 (synopsis "Pythonic manipulation of network addresses")
6955 (description
6956 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6957and MAC network addresses.")
3f641af0 6958 (license license:bsd-3)))
6e5e39f4
CR
6959
6960(define-public python2-netaddr
6961 (package-with-python2 python-netaddr))
8c692a52
CR
6962
6963(define-public python-wrapt
6964 (package
6965 (name "python-wrapt")
d25bee26 6966 (version "1.10.8")
8c692a52
CR
6967 (source
6968 (origin
6969 (method url-fetch)
d25bee26 6970 (uri (pypi-uri "wrapt" version))
8c692a52
CR
6971 (sha256
6972 (base32
d25bee26 6973 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
6974 (build-system python-build-system)
6975 (arguments
6976 ;; Tests are not included in the tarball, they are only available in the
6977 ;; git repository.
6978 `(#:tests? #f))
8c692a52
CR
6979 (home-page "https://github.com/GrahamDumpleton/wrapt")
6980 (synopsis "Module for decorators, wrappers and monkey patching")
6981 (description
6982 "The aim of the wrapt module is to provide a transparent object proxy for
6983 Python, which can be used as the basis for the construction of function
6984 wrappers and decorator functions.")
3f641af0 6985 (license license:bsd-2)))
8c692a52
CR
6986
6987(define-public python2-wrapt
6988 (package-with-python2 python-wrapt))
b85c85be
CR
6989
6990(define-public python-iso8601
6991 (package
6992 (name "python-iso8601")
fe84bc9a 6993 (version "0.1.11")
b85c85be
CR
6994 (source
6995 (origin
6996 (method url-fetch)
fe84bc9a 6997 (uri (pypi-uri "iso8601" version))
b85c85be 6998 (sha256
fe84bc9a
EF
6999 (base32
7000 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 7001 (build-system python-build-system)
63b02364
MB
7002 (native-inputs
7003 `(("python-pytest" ,python-pytest)))
b85c85be
CR
7004 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7005 (synopsis "Module to parse ISO 8601 dates")
7006 (description
7007 "This module parses the most common forms of ISO 8601 date strings (e.g.
7008@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7009 (license license:expat)))
7010
7011(define-public python2-iso8601
7012 (package-with-python2 python-iso8601))
5e412b63
CR
7013
7014(define-public python-monotonic
7015 (package
7016 (name "python-monotonic")
7017 (version "0.3")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 (uri (string-append
7022 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7023 version
7024 ".tar.gz"))
7025 (sha256
7026 (base32
7027 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7028 (build-system python-build-system)
5e412b63
CR
7029 (home-page "https://github.com/atdt/monotonic")
7030 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7031 (description
7032 "This module provides a monotonic() function which returns the value (in
7033fractional seconds) of a clock which never goes backwards.")
3f641af0 7034 (license license:asl2.0)))
5e412b63
CR
7035
7036(define-public python2-monotonic
7037 (package-with-python2 python-monotonic))
de34afac
CR
7038
7039(define-public python-webob
7040 (package
7041 (name "python-webob")
b8834c21 7042 (version "1.5.1")
de34afac
CR
7043 (source
7044 (origin
7045 (method url-fetch)
b8834c21 7046 (uri (pypi-uri "WebOb" version))
de34afac
CR
7047 (sha256
7048 (base32
b8834c21 7049 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7050 (build-system python-build-system)
328bb95d 7051 (native-inputs
f3b98f4f 7052 `(("python-nose" ,python-nose)))
de34afac
CR
7053 (home-page "http://webob.org/")
7054 (synopsis "WSGI request and response object")
7055 (description
7056 "WebOb provides wrappers around the WSGI request environment, and an
7057object to help create WSGI responses.")
7058 (license license:expat)))
7059
7060(define-public python2-webob
7061 (package-with-python2 python-webob))
350ba0a3 7062
02a8a187
BW
7063(define-public python-xlrd
7064 (package
7065 (name "python-xlrd")
c2ad4d70 7066 (version "1.0.0")
02a8a187
BW
7067 (source (origin
7068 (method url-fetch)
e775f48e 7069 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7070 (sha256
7071 (base32
c2ad4d70 7072 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7073 (build-system python-build-system)
7074 (arguments
7075 `(#:phases
7076 (modify-phases %standard-phases
c2ad4d70 7077 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7078 ;; run tests instead for now.
7079 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7080 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7081 (home-page "http://www.python-excel.org/")
7082 (synopsis "Library for extracting data from Excel files")
7083 (description "This packages provides a library to extract data from
c598e35c 7084spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7085@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7086Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7087 (license license:bsd-3)))
02a8a187
BW
7088
7089(define-public python2-xlrd
7090 (package-with-python2 python-xlrd))
7091
350ba0a3
CR
7092(define-public python-prettytable
7093 (package
7094 (name "python-prettytable")
7095 (version "0.7.2")
7096 (source
7097 (origin
7098 (method url-fetch)
7099 (uri (string-append
7100 "https://pypi.python.org/packages/source/P/PrettyTable/"
7101 "prettytable-" version ".tar.bz2"))
7102 (sha256
7103 (base32
7104 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7105 (build-system python-build-system)
350ba0a3
CR
7106 (home-page "http://code.google.com/p/prettytable/")
7107 (synopsis "Display tabular data in an ASCII table format")
7108 (description
7109 "A library designed to represent tabular data in visually appealing ASCII
7110tables. PrettyTable allows for selection of which columns are to be printed,
7111independent alignment of columns (left or right justified or centred) and
7112printing of sub-tables by specifying a row range.")
3f641af0 7113 (license license:bsd-3)))
350ba0a3
CR
7114
7115(define-public python2-prettytable
7116 (package-with-python2 python-prettytable))
7a8ac75a 7117
9f8ee3fe
RW
7118(define-public python-tables
7119 (package
7120 (name "python-tables")
7121 (version "3.2.2")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "tables" version))
7126 (sha256
7127 (base32
bac23672
HG
7128 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7129 (modules '((guix build utils)))
7130 (snippet
7131 '(begin
7132 ;; Remove pre-compiled .pyc files from source.
7133 (for-each delete-file-recursively
7134 (find-files "." "__pycache__" #:directories? #t))
7135 (for-each delete-file (find-files "." "\\.pyc$"))
7136 #t))))
9f8ee3fe
RW
7137 (build-system python-build-system)
7138 (arguments
7139 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7140 ;; or "check", so we must override the build and check phases.
7141 #:phases
7142 (modify-phases %standard-phases
7143 (add-after 'unpack 'use-gcc
7144 (lambda _
7145 (substitute* "setup.py"
7146 (("compiler = new_compiler\\(\\)" line)
7147 (string-append line
7148 "\ncompiler.set_executables(compiler='gcc',"
7149 "compiler_so='gcc',"
7150 "linker_exe='gcc',"
7151 "linker_so='gcc -shared')")))
7152 #t))
7153 (replace 'build
7154 (lambda* (#:key inputs #:allow-other-keys)
7155 (zero? (system* "python" "setup.py" "build"
7156 (string-append "--hdf5="
7157 (assoc-ref inputs "hdf5"))))))
7158 (replace 'check
7159 (lambda* (#:key inputs #:allow-other-keys)
7160 (zero? (system* "python" "setup.py" "check"
7161 (string-append "--hdf5="
7162 (assoc-ref inputs "hdf5")))))))))
7163 (propagated-inputs
7164 `(("python-numexpr" ,python-numexpr)
7165 ("python-numpy" ,python-numpy)))
7166 (native-inputs
f3b98f4f 7167 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7168 ("pkg-config" ,pkg-config)))
7169 (inputs
7170 `(("hdf5" ,hdf5)
7171 ("bzip2" ,bzip2)
7172 ("zlib" ,zlib)))
7173 (home-page "http://www.pytables.org/")
7174 (synopsis "Hierarchical datasets for Python")
7175 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7176designed to efficiently cope with extremely large amounts of data.")
3f641af0 7177 (license license:bsd-3)))
9f8ee3fe
RW
7178
7179(define-public python2-tables
7180 (package-with-python2 python-tables))
7181
7a8ac75a
RW
7182(define-public python-pyasn1
7183 (package
7184 (name "python-pyasn1")
5e0ddfba 7185 (version "0.2.3")
7a8ac75a
RW
7186 (source
7187 (origin
7188 (method url-fetch)
caa0edb3 7189 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7190 (sha256
7191 (base32
5e0ddfba 7192 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7a8ac75a
RW
7193 (build-system python-build-system)
7194 (home-page "http://pyasn1.sourceforge.net/")
7195 (synopsis "ASN.1 types and codecs")
7196 (description
7197 "This is an implementation of ASN.1 types and codecs in Python. It is
7198suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7199 (license license:bsd-2)))
7a8ac75a
RW
7200
7201(define-public python2-pyasn1
7202 (package-with-python2 python-pyasn1))
9a49a535 7203
5988c299
EF
7204(define-public python-pyasn1-modules
7205 (package
7206 (name "python-pyasn1-modules")
7207 (version "0.0.8")
7208 (source
7209 (origin
7210 (method url-fetch)
7211 (uri (pypi-uri "pyasn1-modules" version))
7212 (sha256
7213 (base32
7214 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7215 (build-system python-build-system)
5988c299
EF
7216 (propagated-inputs
7217 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7218 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7219 (synopsis "ASN.1 codec implementations")
7220 (description
7221 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7222implementations of ASN.1-based codecs and protocols.")
3f641af0 7223 (license license:bsd-3)))
5988c299
EF
7224
7225(define-public python2-pyasn1-modules
7226 (package-with-python2 python-pyasn1-modules))
7227
520af157 7228(define-public python-ipaddress
9a49a535 7229 (package
520af157 7230 (name "python-ipaddress")
36e0d9db 7231 (version "1.0.18")
520af157
DC
7232 (source (origin
7233 (method url-fetch)
7234 (uri (pypi-uri "ipaddress" version))
7235 (sha256
7236 (base32
36e0d9db 7237 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7238 (build-system python-build-system)
9a49a535
RW
7239 (home-page "https://github.com/phihag/ipaddress")
7240 (synopsis "IP address manipulation library")
7241 (description
520af157
DC
7242 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7243 in Python. This library is used to create, poke at, and manipulate IPv4 and
7244 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7245 module to older versions of Python.")
f210e944 7246 (license license:psfl)))
520af157
DC
7247
7248(define-public python2-ipaddress
f210e944 7249 (package-with-python2 python-ipaddress))
3f00e078 7250
4a238186
HG
7251(define-public python2-ipaddr
7252 (package
7253 (name "python2-ipaddr")
7254 (version "2.1.11")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "ipaddr" version))
7259 (sha256
7260 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7261 (build-system python-build-system)
7262 (arguments
7263 `(#:python ,python-2 ;version 2 only
7264 #:phases
7265 (modify-phases %standard-phases
7266 (replace 'check
7267 (lambda* _
7268 (zero? (system* "python" "ipaddr_test.py")))))))
7269 (home-page "https://github.com/google/ipaddr-py")
7270 (synopsis "IP address manipulation library")
7271 (description
7272 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7273IPv6 addresses and networks.
7274
7275For new implementations you may prefer to use the standard module
7276@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7277versions of Python.")
3f641af0 7278 (license license:asl2.0)))
4a238186 7279
3f00e078
RW
7280(define-public python-idna
7281 (package
7282 (name "python-idna")
37c04f91 7283 (version "2.5")
3f00e078
RW
7284 (source
7285 (origin
7286 (method url-fetch)
37c04f91 7287 (uri (pypi-uri "idna" version))
3f00e078
RW
7288 (sha256
7289 (base32
37c04f91 7290 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
3f00e078 7291 (build-system python-build-system)
3f00e078
RW
7292 (home-page "https://github.com/kjd/idna")
7293 (synopsis "Internationalized domain names in applications")
7294 (description
7295 "This is a library to support the Internationalised Domain Names in
7296Applications (IDNA) protocol as specified in RFC 5891. This version of the
7297protocol is often referred to as “IDNA2008” and can produce different results
7298from the earlier standard from 2003. The library is also intended to act as a
7299suitable drop-in replacement for the “encodings.idna” module that comes with
7300the Python standard library but currently only supports the older 2003
7301specification.")
3f641af0 7302 (license license:bsd-4)))
3f00e078
RW
7303
7304(define-public python2-idna
7305 (package-with-python2 python-idna))
36ebf972
RW
7306
7307(define-public python-pretend
7308 (package
7309 (name "python-pretend")
7310 (version "1.0.8")
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (string-append "https://pypi.python.org/packages/source/p/"
7315 "pretend/pretend-" version ".tar.gz"))
7316 (sha256
7317 (base32
7318 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7319 (build-system python-build-system)
36ebf972
RW
7320 (home-page "https://github.com/alex/pretend")
7321 (synopsis "Library for stubbing in Python")
7322 (description
7323 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7324technique for writing tests. You may hear the term mixed up with mocks,
7325fakes, or doubles. Basically, a stub is an object that returns pre-canned
7326responses, rather than doing any computation.")
3f641af0 7327 (license license:bsd-3)))
36ebf972
RW
7328
7329(define-public python2-pretend
7330 (package-with-python2 python-pretend))
aa759a51
RW
7331
7332(define-public python-cryptography-vectors
7333 (package
7334 (name "python-cryptography-vectors")
27fab2bf 7335 (version "1.7.1")
aa759a51
RW
7336 (source
7337 (origin
7338 (method url-fetch)
9c509ca9 7339 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7340 (sha256
7341 (base32
27fab2bf 7342 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7343 (build-system python-build-system)
aa759a51 7344 (home-page "https://github.com/pyca/cryptography")
66e07664 7345 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7346 (description
7347 "This package contains test vectors for the cryptography package.")
7348 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7349 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7350
7351(define-public python2-cryptography-vectors
7352 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7353
7354(define-public python-cryptography
7355 (package
7356 (name "python-cryptography")
27fab2bf 7357 (version "1.7.1")
88b47cb0
RW
7358 (source
7359 (origin
7360 (method url-fetch)
9c509ca9 7361 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7362 (sha256
7363 (base32
27fab2bf 7364 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7365 (build-system python-build-system)
7366 (inputs
7367 `(("openssl" ,openssl)))
7368 (propagated-inputs
7369 `(("python-cffi" ,python-cffi)
7370 ("python-six" ,python-six)
7371 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7372 ("python-idna" ,python-idna)
7373 ("python-iso8601" ,python-iso8601)))
7374 (native-inputs
7375 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7376 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7377 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7378 ("python-pyasn1" ,python-pyasn1)
7379 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad 7380 ("python-pytz" ,python-pytz)
23b9168d 7381 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7382 (home-page "https://github.com/pyca/cryptography")
7383 (synopsis "Cryptographic recipes and primitives for Python")
7384 (description
7385 "cryptography is a package which provides cryptographic recipes and
7386primitives to Python developers. It aims to be the “cryptographic standard
7387library” for Python. The package includes both high level recipes, and low
7388level interfaces to common cryptographic algorithms such as symmetric ciphers,
7389message digests and key derivation functions.")
7390 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7391 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7392 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7393
7394(define-public python2-cryptography
519e2f4f
LF
7395 (let ((crypto (package-with-python2
7396 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7397 (package (inherit crypto)
7398 (propagated-inputs
7399 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7400 ("python2-backport-ssl-match-hostname"
7401 ,python2-backport-ssl-match-hostname)
68f1cdec 7402 ("python2-enum34" ,python2-enum34)
88b47cb0 7403 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7404
7405(define-public python-pyopenssl
7406 (package
7407 (name "python-pyopenssl")
833df99d 7408 (version "17.0.0")
5af999b8
RW
7409 (source
7410 (origin
7411 (method url-fetch)
eb68d268 7412 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7413 (sha256
7414 (base32
833df99d 7415 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7c6bf660
MB
7416 (patches
7417 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7418 (build-system python-build-system)
30e0229a 7419 (arguments
7c6bf660
MB
7420 '(#:phases
7421 (modify-phases %standard-phases
7422 (delete 'check)
7423 (add-after 'install 'check
7424 (lambda* (#:key inputs outputs #:allow-other-keys)
7425 (add-installed-pythonpath inputs outputs)
7426 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7427 (propagated-inputs
7428 `(("python-cryptography" ,python-cryptography)
7429 ("python-six" ,python-six)))
7430 (inputs
7431 `(("openssl" ,openssl)))
30e0229a 7432 (native-inputs
833df99d 7433 `(("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7434 (home-page "https://github.com/pyca/pyopenssl")
7435 (synopsis "Python wrapper module around the OpenSSL library")
7436 (description
7437 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7438library.")
3f641af0 7439 (license license:asl2.0)))
5af999b8
RW
7440
7441(define-public python2-pyopenssl
519e2f4f 7442 (package-with-python2 python-pyopenssl))
643725a1
CR
7443
7444(define-public python-pip
7445 (package
7446 (name "python-pip")
392c26b0 7447 (version "9.0.1")
643725a1
CR
7448 (source
7449 (origin
7450 (method url-fetch)
6fb54e3b 7451 (uri (pypi-uri "pip" version))
643725a1
CR
7452 (sha256
7453 (base32
392c26b0 7454 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7455 (build-system python-build-system)
392c26b0
MC
7456 (arguments
7457 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7458 (home-page "https://pip.pypa.io/")
392c26b0 7459 (synopsis "Package manager for Python software")
643725a1 7460 (description
392c26b0 7461 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7462Python Package Index (PyPI).")
7463 (license license:expat)))
7464
7465(define-public python2-pip
7466 (package-with-python2 python-pip))
d8c4998f
LC
7467
7468(define-public python-tlsh
7469 (package
7470 (name "python-tlsh")
99b00dc7 7471 (version "3.4.4")
d8c4998f
LC
7472 (home-page "https://github.com/trendmicro/tlsh")
7473 (source (origin
99b00dc7
EF
7474 (method url-fetch)
7475 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7476 version ".tar.gz"))
d8c4998f
LC
7477 (sha256
7478 (base32
99b00dc7
EF
7479 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7480 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7481 (build-system cmake-build-system)
7482 (arguments
7483 '(#:out-of-source? #f
7484 #:phases (modify-phases %standard-phases
7485 (replace
7486 'install
7487 (lambda* (#:key outputs #:allow-other-keys)
7488 ;; Build and install the Python bindings. The underlying
7489 ;; C++ library is apparently not meant to be installed.
7490 (let ((out (assoc-ref outputs "out")))
7491 (with-directory-excursion "py_ext"
7492 (and (system* "python" "setup.py" "build")
7493 (system* "python" "setup.py" "install"
7494 (string-append "--prefix=" out))))))))))
7495 (inputs `(("python" ,python-wrapper))) ;for the bindings
7496 (synopsis "Fuzzy matching library for Python")
7497 (description
7498 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7499Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7500value which can be used for similarity comparisons. Similar objects have
7501similar hash values, which allows for the detection of similar objects by
7502comparing their hash values. The byte stream should have a sufficient amount
7503of complexity; for example, a byte stream of identical bytes will not generate
7504a hash value.")
3f641af0 7505 (license license:asl2.0)))
d8c4998f
LC
7506
7507(define-public python2-tlsh
7508 (package
7509 (inherit python-tlsh)
7510 (name "python2-tlsh")
7511 (inputs `(("python" ,python-2)))))
d96034ed 7512
67f66812
BW
7513(define-public python-termcolor
7514 (package
7515 (name "python-termcolor")
7516 (version "1.1.0")
7517 (source
7518 (origin
7519 (method url-fetch)
a5e8f597 7520 (uri (pypi-uri "termcolor" version))
67f66812
BW
7521 (sha256
7522 (base32
7523 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7524 (build-system python-build-system)
7525 (arguments
7526 ;; There are no tests.
7527 `(#:tests? #f))
7528 (home-page "http://pypi.python.org/pypi/termcolor")
7529 (synopsis "ANSII Color formatting for terminal output")
7530 (description
7531 "This package provides ANSII Color formatting for output in terminals.")
7532 (license license:expat)))
7533
7534(define-public python2-termcolor
7535 (package-with-python2 python-termcolor))
7536
d96034ed
LC
7537(define-public python-libarchive-c
7538 (package
7539 (name "python-libarchive-c")
03fd001c 7540 (version "2.2")
d96034ed
LC
7541 (source (origin
7542 (method url-fetch)
03fd001c 7543 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7544 (sha256
7545 (base32
03fd001c 7546 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7547 (build-system python-build-system)
7548 (arguments
7549 '(#:phases (modify-phases %standard-phases
7550 (add-before
7551 'build 'reference-libarchive
7552 (lambda* (#:key inputs #:allow-other-keys)
7553 ;; Retain the absolute file name of libarchive.so.
7554 (let ((libarchive (assoc-ref inputs "libarchive")))
7555 (substitute* "libarchive/ffi.py"
7556 (("find_library\\('archive'\\)")
7557 (string-append "'" libarchive
b41a05ce 7558 "/lib/libarchive.so'")))))))))
d96034ed 7559 (inputs
f3b98f4f 7560 `(("libarchive" ,libarchive)))
d96034ed
LC
7561 (home-page "https://github.com/Changaco/python-libarchive-c")
7562 (synopsis "Python interface to libarchive")
7563 (description
7564 "This package provides Python bindings to libarchive, a C library to
7565access possibly compressed archives in many different formats. It uses
7566Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7567 (license license:lgpl2.0+)))
d96034ed
LC
7568
7569(define-public python2-libarchive-c
7570 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7571
7572(define-public python-file
7573 (package
7574 (inherit file)
7575 (name "python-file")
7ffa5d4a
LF
7576 (source (origin
7577 (inherit (package-source file))
7578 ;; This patch should not be applied to python2-file.
7579 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7580 (build-system python-build-system)
7581 (arguments
7582 '(#:tests? #f ;no tests
00bf74be 7583 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7584 #:phases (modify-phases %standard-phases
7585 (add-before 'build 'change-directory
7586 (lambda _
7587 (chdir "python")
7588 #t))
7589 (add-before 'build 'set-library-file-name
7590 (lambda* (#:key inputs #:allow-other-keys)
7591 (let ((file (assoc-ref inputs "file")))
7592 (substitute* "magic.py"
7593 (("find_library\\('magic'\\)")
7594 (string-append "'" file "/lib/libmagic.so'")))
7595 #t))))))
7596 (inputs `(("file" ,file)))
7597 (self-native-input? #f)
daeeea71
CM
7598 (synopsis "Python bindings to the libmagic file type guesser. Note that
7599this module and the python-magic module both provide a \"magic.py\" file;
7600these two modules, which are different and were developed separately, both
f210e944 7601serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7602
7603(define-public python2-file
f210e944 7604 (package-with-python2 python-file))
85d4aeac
LC
7605
7606(define-public python-debian
7607 (package
7608 (name "python-debian")
02d7f337 7609 (version "0.1.28")
85d4aeac
LC
7610 (source
7611 (origin
7612 (method url-fetch)
5e217a8b 7613 (uri (pypi-uri name version))
85d4aeac
LC
7614 (sha256
7615 (base32
02d7f337 7616 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7617 (build-system python-build-system)
f22efa01 7618 (propagated-inputs
85d4aeac 7619 `(("python-six" ,python-six)))
85d4aeac
LC
7620 (home-page "http://packages.debian.org/sid/python-debian")
7621 (synopsis "Debian package related modules")
7622 (description
5c7bdc9a
LC
7623 ;; XXX: Use @enumerate instead of @itemize to work around
7624 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7625 "This package provides Python modules that abstract many formats of
7626Debian-related files, such as:
7627
5c7bdc9a 7628@enumerate
85d4aeac
LC
7629@item Debtags information;
7630@item @file{debian/changelog} files;
7631@item packages files, pdiffs;
7632@item control files of single or multiple RFC822-style paragraphs---e.g.
7633 @file{debian/control}, @file{.changes}, @file{.dsc};
7634@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7635 contained files and meta-information.
5c7bdc9a 7636@end enumerate\n")
85d4aeac
LC
7637
7638 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7639 (license license:gpl3+)))
85d4aeac
LC
7640
7641(define-public python2-debian
7642 (package-with-python2 python-debian))
816a6538 7643
2d321bb2
RW
7644(define-public python-nbformat
7645 (package
7646 (name "python-nbformat")
7647 (version "4.1.0")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "nbformat" version))
7652 (sha256
7653 (base32
7654 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7655 (build-system python-build-system)
7656 (arguments `(#:tests? #f)) ; no test target
7657 (propagated-inputs
7658 `(("python-ipython-genutils" ,python-ipython-genutils)
7659 ("python-jsonschema" ,python-jsonschema)
7660 ("python-jupyter-core" ,python-jupyter-core)
7661 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7662 (home-page "http://jupyter.org")
7663 (synopsis "Jupyter Notebook format")
7664 (description "This package provides the reference implementation of the
7665Jupyter Notebook format and Python APIs for working with notebooks.")
7666 (license license:bsd-3)))
7667
7668(define-public python2-nbformat
7669 (package-with-python2 python-nbformat))
7670
55436048
RW
7671(define-public python-bleach
7672 (package
7673 (name "python-bleach")
7674 (version "1.4.3")
7675 (source
7676 (origin
7677 (method url-fetch)
7678 (uri (pypi-uri "bleach" version))
7679 (sha256
7680 (base32
7681 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7682 (build-system python-build-system)
7683 (propagated-inputs
7684 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7685 ("python-six" ,python-six)))
7686 (native-inputs
7687 `(("python-nose" ,python-nose)))
7bf837fd 7688 (home-page "https://github.com/jsocol/bleach")
55436048
RW
7689 (synopsis "Whitelist-based HTML-sanitizing tool")
7690 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7691 (license license:asl2.0)))
7692
7693(define-public python2-bleach
7694 (package-with-python2 python-bleach))
7695
60590a3a
RW
7696(define-public python-entrypoints
7697 (package
7698 (name "python-entrypoints")
7699 (version "0.2.2")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7704 version ".tar.gz"))
7705 (file-name (string-append name "-" version ".tar.gz"))
7706 (sha256
7707 (base32
7708 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7709 (build-system python-build-system)
7710 ;; The package does not come with a setup.py file, so we have to generate
7711 ;; one ourselves.
7712 (arguments
7713 `(#:tests? #f
7714 #:phases
7715 (modify-phases %standard-phases
7716 (add-after 'unpack 'create-setup.py
7717 (lambda _
7718 (call-with-output-file "setup.py"
7719 (lambda (port)
7720 (format port "\
7721from setuptools import setup
7722setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7723" ,version))))))))
7724 (home-page "https://github.com/takluyver/entrypoints")
7725 (synopsis "Discover and load entry points from installed Python packages")
7726 (description "Entry points are a way for Python packages to advertise
7727objects with some common interface. The most common examples are
7728@code{console_scripts} entry points, which define shell commands by
7729identifying a Python function to run. The @code{entrypoints} module contains
7730functions to find and load entry points.")
7731 (license license:expat)))
7732
7733(define-public python2-entrypoints
7734 (package-with-python2 python-entrypoints))
7735
c60898a8
RW
7736(define-public python-nbconvert
7737 (package
7738 (name "python-nbconvert")
7739 (version "5.0.0b1")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (pypi-uri "nbconvert" version))
7744 (sha256
7745 (base32
7746 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7747 (build-system python-build-system)
497355dc
MB
7748 (arguments
7749 `(;; The "bdist_egg" target is disabled by default, causing the installation
7750 ;; to fail.
7751 #:configure-flags (list "bdist_egg")
7752 ;; FIXME: 5 failures, 40 errors.
7753 #:tests? #f))
7754 ;; #:phases
7755 ;; (modify-phases %standard-phases
7756 ;; (replace 'check
7757 ;; (lambda _
7758 ;; (zero? (system* "py.test" "-v")))))
7759 (native-inputs
7760 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7761 (propagated-inputs
7762 `(("python-bleach" ,python-bleach)
7763 ("python-entrypoints" ,python-entrypoints)
7764 ("python-jinja2" ,python-jinja2)
7765 ("python-jupyter-core" ,python-jupyter-core)
7766 ("python-mistune" ,python-mistune)
7767 ("python-nbformat" ,python-nbformat)
7768 ("python-pygments" ,python-pygments)
c60898a8
RW
7769 ("python-traitlets" ,python-traitlets)))
7770 (home-page "http://jupyter.org")
7771 (synopsis "Converting Jupyter Notebooks")
7772 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7773notebooks to various other formats via Jinja templates. It allows you to
7774convert an @code{.ipynb} notebook file into various static formats including:
7775
7776@enumerate
7777@item HTML
7778@item LaTeX
7779@item PDF
7780@item Reveal JS
7781@item Markdown (md)
7782@item ReStructured Text (rst)
7783@item executable script
7784@end enumerate\n")
7785 (license license:bsd-3)))
7786
7787(define-public python2-nbconvert
7788 (package-with-python2 python-nbconvert))
7789
a0d62280
RW
7790(define-public python-notebook
7791 (package
7792 (name "python-notebook")
7793 (version "4.2.3")
7794 (source (origin
7795 (method url-fetch)
7796 (uri (pypi-uri "notebook" version))
7797 (sha256
7798 (base32
7799 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7800 (build-system python-build-system)
7801 (arguments
7802 `(#:phases
7803 (modify-phases %standard-phases
7804 (replace 'check
7805 (lambda _
7806 ;; HOME must be set for tests
7807 (setenv "HOME" "/tmp")
7808 (zero? (system* "nosetests")))))))
7809 (propagated-inputs
7810 `(("python-jupyter-core" ,python-jupyter-core)
7811 ("python-nbformat" ,python-nbformat)
7812 ("python-nbconvert" ,python-nbconvert)
7813 ("python-ipython" ,python-ipython)))
7814 (native-inputs
7815 `(("python-nose" ,python-nose)
7816 ("python-sphinx" ,python-sphinx)
7817 ("python-requests" ,python-requests)))
7818 (home-page "http://jupyter.org/")
7819 (synopsis "Web-based notebook environment for interactive computing")
7820 (description
7821 "The Jupyter HTML notebook is a web-based notebook environment for
7822interactive computing.")
3a735ecf 7823 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7824 (license license:bsd-3)))
7825
7826(define-public python2-notebook
3a735ecf
HG
7827 (let ((base (package-with-python2
7828 (strip-python2-variant python-notebook))))
7829 (package (inherit base)
7830 (native-inputs
7831 `(("python2-mock" ,python2-mock)
7832 ,@(package-native-inputs base)))
7833 (arguments
7834 (substitute-keyword-arguments (package-arguments base)
7835 ((#:phases phases)
7836 `(modify-phases ,phases
7837 (add-before 'check 'disable-test-case
7838 ;; The test requires network access to localhost. Curiously it
7839 ;; fails with Python 2 only. Simply make the test-case return
7840 ;; immediately.
7841 (lambda _
7842 (substitute*
7843 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7844 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7845
d55724ed
RW
7846(define-public python-widgetsnbextension
7847 (package
7848 (name "python-widgetsnbextension")
7849 (version "1.2.6")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "widgetsnbextension" version))
7854 (sha256
7855 (base32
7856 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7857 (build-system python-build-system)
7858 (propagated-inputs
7859 `(("python-notebook" ,python-notebook)))
7860 (native-inputs
58f5fae7
MB
7861 `(("python-certifi" ,python-certifi)
7862 ("python-nose" ,python-nose)))
d55724ed
RW
7863 (home-page "http://ipython.org")
7864 (synopsis "IPython HTML widgets for Jupyter")
7865 (description "This package provides interactive HTML widgets for Jupyter
7866notebooks.")
7867 (license license:bsd-3)))
7868
7869(define-public python2-widgetsnbextension
7870 (package-with-python2 python-widgetsnbextension))
7871
4fe2e344
RW
7872(define-public python-ipywidgets
7873 (package
7874 (name "python-ipywidgets")
7875 (version "5.2.2")
7876 (source
7877 (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "ipywidgets" version))
7880 (sha256
7881 (base32
7882 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7883 (build-system python-build-system)
7884 ;; FIXME: it's not clear how to run the tests.
7885 (arguments `(#:tests? #f))
7886 (propagated-inputs
7887 `(("python-ipykernel" ,python-ipykernel)
7888 ("python-ipython" ,python-ipython)
4fe2e344
RW
7889 ("python-traitlets" ,python-traitlets)
7890 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7891 (home-page "http://ipython.org")
7892 (synopsis "IPython HTML widgets for Jupyter")
7893 (description "Ipywidgets are interactive HTML widgets for Jupyter
7894notebooks and the IPython kernel. Notebooks come alive when interactive
7895widgets are used. Users gain control of their data and can visualize changes
7896in the data.")
7897 (license license:bsd-3)))
7898
7899(define-public python2-ipywidgets
7900 (package-with-python2 python-ipywidgets))
7901
8ceebf8f
RW
7902(define-public python-jupyter-console
7903 (package
7904 (name "python-jupyter-console")
7905 (version "5.0.0")
7906 (source
7907 (origin
7908 (method url-fetch)
7909 (uri (pypi-uri "jupyter_console" version))
7910 (sha256
7911 (base32
7912 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7913 (build-system python-build-system)
7914 ;; FIXME: it's not clear how to run the tests.
7915 (arguments `(#:tests? #f))
7916 (propagated-inputs
7917 `(("python-ipykernel" ,python-ipykernel)
7918 ("python-ipython" ,python-ipython)
7919 ("python-jupyter-client" ,python-jupyter-client)
7920 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7921 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7922 (home-page "https://jupyter.org")
7923 (synopsis "Jupyter terminal console")
7924 (description "This package provides a terminal-based console frontend for
7925Jupyter kernels. It also allows for console-based interaction with non-Python
7926Jupyter kernels such as IJulia and IRKernel.")
7927 (license license:bsd-3)))
7928
7929(define-public python2-jupyter-console
7930 (package-with-python2 python-jupyter-console))
7931
c27ae827
RW
7932(define-public jupyter
7933 (package
7934 (name "jupyter")
7935 (version "1.0.0")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "jupyter" version))
7940 (sha256
7941 (base32
7942 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7943 (build-system python-build-system)
7944 ;; FIXME: it's not clear how to run the tests.
7945 (arguments `(#:tests? #f))
7946 (propagated-inputs
7947 `(("python-ipykernel" ,python-ipykernel)
7948 ("python-ipywidgets" ,python-ipywidgets)
7949 ("python-jupyter-console" ,python-jupyter-console)
7950 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7951 ("python-notebook" ,python-notebook)))
c27ae827
RW
7952 (home-page "http://jupyter.org")
7953 (synopsis "Web application for interactive documents")
7954 (description
7955 "The Jupyter Notebook is a web application that allows you to create and
7956share documents that contain live code, equations, visualizations and
7957explanatory text. Uses include: data cleaning and transformation, numerical
7958simulation, statistical modeling, machine learning and much more.")
7959 (license license:bsd-3)))
7960
816a6538
LC
7961(define-public python-chardet
7962 (package
7963 (name "python-chardet")
7964 (version "2.3.0")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (string-append
7969 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7970 version
7971 ".tar.gz"))
7972 (sha256
7973 (base32
7974 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7975 (build-system python-build-system)
816a6538
LC
7976 (home-page "https://github.com/chardet/chardet")
7977 (synopsis "Universal encoding detector for Python 2 and 3")
7978 (description
7979 "This package provides @code{chardet}, a Python module that can
7980automatically detect a wide range of file encodings.")
3f641af0 7981 (license license:lgpl2.1+)))
816a6538
LC
7982
7983(define-public python2-chardet
7984 (package-with-python2 python-chardet))
2fc5f186 7985
1872f1bb
KM
7986(define-public python-docopt
7987 (package
7988 (name "python-docopt")
7989 (version "0.6.2")
7990 (source
7991 (origin
7992 (method url-fetch)
7993 ;; The release on PyPI does not include tests.
7994 (uri (string-append
7995 "https://github.com/docopt/docopt/archive/"
7996 version ".tar.gz"))
7997 (file-name (string-append name "-" version ".tar.gz"))
7998 (sha256
7999 (base32
8000 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8001 (build-system python-build-system)
8002 (native-inputs
f3b98f4f 8003 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
8004 (arguments
8005 `(#:phases (alist-replace
8006 'check
8007 (lambda _ (zero? (system* "py.test")))
8008 %standard-phases)))
8009 (home-page "http://docopt.org")
8010 (synopsis "Command-line interface description language for Python")
8011 (description "This library allows the user to define a command-line
8012interface from a program's help message rather than specifying it
8013programatically with command-line parsers like @code{getopt} and
8014@code{argparse}.")
8015 (license license:expat)))
8016
8017(define-public python2-docopt
8018 (package-with-python2 python-docopt))
8019
2fc5f186
LF
8020(define-public python-zope-event
8021 (package
8022 (name "python-zope-event")
8023 (version "4.1.0")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (string-append "https://pypi.python.org/packages/source/z"
8028 "/zope.event/zope.event-" version ".tar.gz"))
8029 (sha256
8030 (base32
8031 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8032 (build-system python-build-system)
2fc5f186
LF
8033 (home-page "http://pypi.python.org/pypi/zope.event")
8034 (synopsis "Event publishing system for Python")
8035 (description "Zope.event provides an event publishing API, intended for
8036use by applications which are unaware of any subscribers to their events. It
8037is a simple event-dispatching system on which more sophisticated event
8038dispatching systems can be built.")
3f641af0 8039 (license license:zpl2.1)))
2fc5f186
LF
8040
8041(define-public python2-zope-event
8042 (package-with-python2 python-zope-event))
97abe268
LF
8043
8044(define-public python-zope-interface
8045 (package
8046 (name "python-zope-interface")
8047 (version "4.1.3")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (string-append "https://pypi.python.org/packages/source/z"
8052 "/zope.interface/zope.interface-" version ".tar.gz"))
8053 (sha256
8054 (base32
8055 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8056 (build-system python-build-system)
38d480a8 8057 (native-inputs
97abe268
LF
8058 `(("python-zope-event" ,python-zope-event)))
8059 (home-page "https://github.com/zopefoundation/zope.interface")
8060 (synopsis "Python implementation of the \"design by contract\"
8061methodology")
8062 (description "Zope.interface provides an implementation of \"object
8063interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8064conforming to a given API or contract.")
3f641af0 8065 (license license:zpl2.1)))
97abe268
LF
8066
8067(define-public python2-zope-interface
8068 (package-with-python2 python-zope-interface))
81f2373c
LF
8069
8070(define-public python-zope-exceptions
8071 (package
8072 (name "python-zope-exceptions")
8073 (version "4.0.8")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (string-append "https://pypi.python.org/packages/source/z"
8078 "/zope.exceptions/zope.exceptions-"
8079 version ".tar.gz"))
8080 (sha256
8081 (base32
8082 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8083 (build-system python-build-system)
8084 (arguments
8085 '(#:tests? #f)) ; circular dependency with zope.testrunner
8086 (propagated-inputs
8087 `(("python-zope-interface" ,python-zope-interface)))
8088 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8089 (synopsis "Zope exceptions")
8090 (description "Zope.exceptions provides general-purpose exception types
8091that have uses outside of the Zope framework.")
3f641af0 8092 (license license:zpl2.1)))
81f2373c
LF
8093
8094(define-public python2-zope-exceptions
8095 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8096
8097(define-public python-zope-testing
8098 (package
8099 (name "python-zope-testing")
8100 (version "4.5.0")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (string-append "https://pypi.python.org/packages/source/z"
8105 "/zope.testing/zope.testing-" version ".tar.gz"))
8106 (sha256
8107 (base32
b02f7a21
HG
8108 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8109 (modules '((guix build utils)))
8110 (snippet
8111 '(begin
8112 ;; Remove pre-compiled .pyc files backup files from source.
8113 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8114 #t))))
900e3c0e
LF
8115 (build-system python-build-system)
8116 (native-inputs
8117 `(("python-zope-exceptions" ,python-zope-exceptions)))
8118 (propagated-inputs
8119 `(("python-zope-interface" ,python-zope-interface)))
8120 (home-page "http://pypi.python.org/pypi/zope.testing")
8121 (synopsis "Zope testing helpers")
8122 (description "Zope.testing provides a number of testing utilities for HTML
8123forms, HTTP servers, regular expressions, and more.")
3f641af0 8124 (license license:zpl2.1)))
900e3c0e
LF
8125
8126(define-public python2-zope-testing
8127 (package-with-python2 python-zope-testing))
01614c4f
LF
8128
8129(define-public python-zope-testrunner
8130 (package
8131 (name "python-zope-testrunner")
8132 (version "4.4.9")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (string-append "https://pypi.python.org/packages/source/z"
8137 "/zope.testrunner/zope.testrunner-"
8138 version ".zip"))
8139 (sha256
8140 (base32
8141 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8142 (build-system python-build-system)
385871e5
MB
8143 (arguments
8144 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8145 (native-inputs
8146 `(("python-six" ,python-six)
e408ffc3 8147 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8148 ("python-zope-exceptions" ,python-zope-exceptions)
8149 ("python-zope-testing" ,python-zope-testing)
8150 ("unzip" ,unzip)))
8151 (propagated-inputs
8152 `(("python-zope-interface" ,python-zope-interface)))
8153 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8154 (synopsis "Zope testrunner script")
8155 (description "Zope.testrunner provides a script for running Python
8156tests.")
3f641af0 8157 (license license:zpl2.1)))
01614c4f
LF
8158
8159(define-public python2-zope-testrunner
8160 (let ((base (package-with-python2 python-zope-testrunner)))
8161 (package
8162 (inherit base)
8163 (native-inputs
8164 (append (package-native-inputs base)
8165 `(("python2-subunit" ,python2-subunit)
8166 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8167
8168(define-public python-zope-i18nmessageid
8169 (package
8170 (name "python-zope-i18nmessageid")
8171 (version "4.0.3")
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (string-append
8176 "https://pypi.python.org/packages/source/z"
8177 "/zope.i18nmessageid/zope.i18nmessageid-"
8178 version ".tar.gz"))
8179 (sha256
8180 (base32
8181 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8182 (build-system python-build-system)
6a5c710c
LF
8183 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8184 (synopsis "Message identifiers for internationalization")
8185 (description "Zope.i18nmessageid provides facilities for declaring
8186internationalized messages within program source text.")
3f641af0 8187 (license license:zpl2.1)))
6a5c710c
LF
8188
8189(define-public python2-zope-i18nmessageid
8190 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8191
8192(define-public python-zope-schema
8193 (package
8194 (name "python-zope-schema")
8195 (version "4.4.2")
8196 (source
8197 (origin
8198 (method url-fetch)
8199 (uri (string-append "https://pypi.python.org/packages/source/z"
8200 "/zope.schema/zope.schema-" version ".tar.gz"))
8201 (sha256
8202 (base32
8203 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8204 (build-system python-build-system)
22dba2ef
MB
8205 (arguments
8206 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8207 (propagated-inputs
8208 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8209 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8210 ("python-zope-interface" ,python-zope-interface)))
8211 (native-inputs
47f77210
HG
8212 `(("python-zope-testing" ,python-zope-testing)
8213 ("python-coverage" ,python-coverage)
8214 ("python-nose" ,python-nose)))
71fb09f3
LF
8215 (home-page "http://pypi.python.org/pypi/zope.schema")
8216 (synopsis "Zope data schemas")
8217 (description "Zope.scheme provides extensions to zope.interface for
8218defining data schemas.")
3f641af0 8219 (license license:zpl2.1)))
71fb09f3
LF
8220
8221(define-public python2-zope-schema
8222 (package-with-python2 python-zope-schema))
fbac9b17
LF
8223
8224(define-public python-zope-configuration
8225 (package
8226 (name "python-zope-configuration")
8227 (version "4.0.3")
8228 (source (origin
8229 (method url-fetch)
8230 (uri (string-append "https://pypi.python.org/packages/source/z"
8231 "/zope.configuration/zope.configuration-"
8232 version ".tar.gz"))
8233 (sha256
8234 (base32
8235 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8236 (build-system python-build-system)
7e8b1bfa
MB
8237 (arguments
8238 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8239 (propagated-inputs
8240 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8241 ("python-zope-schema" ,python-zope-schema)))
8242 (home-page "http://pypi.python.org/pypi/zope.configuration")
8243 (synopsis "Zope Configuration Markup Language")
8244 (description "Zope.configuration implements ZCML, the Zope Configuration
8245Markup Language.")
3f641af0 8246 (license license:zpl2.1)))
fbac9b17
LF
8247
8248(define-public python2-zope-configuration
8249 (package-with-python2 python-zope-configuration))
2ad52086
LF
8250
8251(define-public python-zope-proxy
8252 (package
8253 (name "python-zope-proxy")
8254 (version "4.1.6")
8255 (source
8256 (origin
8257 (method url-fetch)
8258 (uri (string-append "https://pypi.python.org/packages/source/z"
8259 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8260 (sha256
8261 (base32
8262 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8263 (build-system python-build-system)
66b3aadb
MB
8264 (arguments
8265 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8266 (propagated-inputs
8267 `(("python-zope-interface" ,python-zope-interface)))
8268 (home-page "http://pypi.python.org/pypi/zope.proxy")
8269 (synopsis "Generic, transparent proxies")
8270 (description "Zope.proxy provides generic, transparent proxies for Python.
8271Proxies are special objects which serve as mostly-transparent wrappers around
8272another object, intervening in the apparent behavior of the wrapped object
8273only when necessary to apply the policy (e.g., access checking, location
8274brokering, etc.) for which the proxy is responsible.")
3f641af0 8275 (license license:zpl2.1)))
2ad52086
LF
8276
8277(define-public python2-zope-proxy
8278 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8279
8280(define-public python-zope-location
8281 (package
8282 (name "python-zope-location")
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.location/zope.location-" version ".tar.gz"))
8289 (sha256
8290 (base32
8291 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8292 (build-system python-build-system)
40bb8e07
MB
8293 (arguments
8294 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8295 (propagated-inputs
f404b5ea
LF
8296 `(("python-zope-proxy" ,python-zope-proxy)
8297 ("python-zope-schema" ,python-zope-schema)))
8298 (home-page "http://pypi.python.org/pypi/zope.location/")
8299 (synopsis "Zope location library")
8300 (description "Zope.location implements the concept of \"locations\" in
8301Zope3, which are are special objects that have a structural location.")
3f641af0 8302 (license license:zpl2.1)))
f404b5ea
LF
8303
8304(define-public python2-zope-location
8305 (package-with-python2 python-zope-location))
d4b77f36
LF
8306
8307(define-public python-zope-security
8308 (package
8309 (name "python-zope-security")
8310 (version "4.0.3")
8311 (source
8312 (origin
8313 (method url-fetch)
8314 (uri (string-append "https://pypi.python.org/packages/source/z"
8315 "/zope.security/zope.security-" version ".tar.gz"))
8316 (sha256
8317 (base32
8318 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8319 (build-system python-build-system)
a74f9b12
MB
8320 (arguments
8321 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8322 (propagated-inputs
8323 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8324 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8325 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8326 (native-inputs
8327 `(("python-six" ,python-six)
8328 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8329 ("python-zope-configuration" ,python-zope-configuration)
8330 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8331 ("python-zope-testrunner" ,python-zope-testrunner)
8332 ("python-zope-testing" ,python-zope-testing)))
8333 (home-page "http://pypi.python.org/pypi/zope.security")
8334 (synopsis "Zope security framework")
8335 (description "Zope.security provides a generic mechanism to implement
8336security policies on Python objects.")
3f641af0 8337 (license license:zpl2.1)))
d4b77f36
LF
8338
8339(define-public python2-zope-security
04417662
EF
8340 (let ((zope-security (package-with-python2 python-zope-security)))
8341 (package (inherit zope-security)
8342 (propagated-inputs
8343 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8344 ,@(alist-delete
8345 "python-zope-testrunner"
8346 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8347
8348(define-public python-zope-component
8349 (package
8350 (name "python-zope-component")
35e1a0f1 8351 (version "4.3.0")
a6b61b27
LF
8352 (source
8353 (origin
8354 (method url-fetch)
35e1a0f1 8355 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8356 (sha256
8357 (base32
35e1a0f1 8358 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8359 (build-system python-build-system)
8360 (arguments
8361 ;; Skip tests due to circular dependency with python-zope-security.
8362 '(#:tests? #f))
8363 (native-inputs
8364 `(("python-zope-testing" ,python-zope-testing)))
8365 (propagated-inputs
8366 `(("python-zope-event" ,python-zope-event)
8367 ("python-zope-interface" ,python-zope-interface)
8368 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8369 ("python-zope-configuration" ,python-zope-configuration)))
8370 (home-page "https://github.com/zopefoundation/zope.component")
8371 (synopsis "Zope Component Architecture")
8372 (description "Zope.component represents the core of the Zope Component
8373Architecture. Together with the zope.interface package, it provides
8374facilities for defining, registering and looking up components.")
3f641af0 8375 (license license:zpl2.1)))
a6b61b27
LF
8376
8377(define-public python2-zope-component
8378 (package-with-python2 python-zope-component))
3859ac12 8379
1ae44b80 8380(define-public python-pythondialog
b5f218be 8381 (package
1ae44b80 8382 (name "python-pythondialog")
42c4b246 8383 (version "3.4.0")
b5f218be
LF
8384 (source
8385 (origin
8386 (method url-fetch)
1ae44b80 8387 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8388 (sha256
8389 (base32
1ae44b80 8390 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8391 (build-system python-build-system)
8392 (arguments
8393 `(#:phases
8394 (modify-phases %standard-phases
8395 (add-after 'unpack 'patch-path
8396 (lambda* (#:key inputs #:allow-other-keys)
8397 (let* ((dialog (assoc-ref inputs "dialog")))
8398 ;; Since this library really wants to grovel the search path, we
8399 ;; must hardcode dialog's store path into it.
8400 (substitute* "dialog.py"
8401 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8402 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8403 #t))))
b5f218be
LF
8404 #:tests? #f)) ; no test suite
8405 (propagated-inputs
8406 `(("dialog" ,dialog)))
8407 (home-page "http://pythondialog.sourceforge.net/")
8408 (synopsis "Python interface to the UNIX dialog utility")
8409 (description "A Python wrapper for the dialog utility. Its purpose is to
8410provide an easy to use, pythonic and comprehensive Python interface to dialog.
8411This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8412 (license license:lgpl2.1)
1ae44b80
LF
8413 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8414
8415(define-public python2-pythondialog
8416 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8417 (package
8418 (inherit base)
8419 (version (package-version python-pythondialog))
8420 (source (origin
8421 (method url-fetch)
8422 (uri (pypi-uri "python2-pythondialog" version))
8423 (sha256
8424 (base32
8425 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8426
3859ac12
LF
8427(define-public python-pyrfc3339
8428 (package
8429 (name "python-pyrfc3339")
d9aa097b 8430 (version "1.0")
3859ac12
LF
8431 (source
8432 (origin
8433 (method url-fetch)
d9aa097b 8434 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8435 (sha256
8436 (base32
d9aa097b 8437 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8438 (build-system python-build-system)
8439 (propagated-inputs
8440 `(("python-pytz" ,python-pytz)))
8441 (native-inputs
f3b98f4f 8442 `(("python-nose" ,python-nose)))
3859ac12
LF
8443 (home-page "https://github.com/kurtraschke/pyRFC3339")
8444 (synopsis "Python timestamp library")
8445 (description "Python library for generating and parsing RFC 3339-compliant
8446timestamps.")
8447 (license license:expat)))
8448
8449(define-public python2-pyrfc3339
8450 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8451
8452(define-public python-werkzeug
8453 (package
8454 (name "python-werkzeug")
bbb99d6b 8455 (version "0.11.15")
5eea2005
LF
8456 (source
8457 (origin
8458 (method url-fetch)
4b47cbfa 8459 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8460 (sha256
8461 (base32
bbb99d6b 8462 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8463 (build-system python-build-system)
8464 (native-inputs
8465 `(("python-pytest" ,python-pytest)))
8466 (home-page "http://werkzeug.pocoo.org/")
8467 (synopsis "Utilities for WSGI applications")
8468 (description "One of the most advanced WSGI utility modules. It includes a
8469powerful debugger, full-featured request and response objects, HTTP utilities to
8470handle entity tags, cache control headers, HTTP dates, cookie handling, file
8471uploads, a powerful URL routing system and a bunch of community-contributed
8472addon modules.")
3f641af0 8473 (license license:x11)))
5eea2005
LF
8474
8475(define-public python2-werkzeug
8476 (package-with-python2 python-werkzeug))
99fffa8a
LF
8477
8478(define-public python-configobj
8479 (package
8480 (name "python-configobj")
8481 (version "5.0.6")
8482 (source (origin
8483 (method url-fetch)
8484 (uri (string-append
8485 "https://pypi.python.org/packages/source/c/configobj/"
8486 "configobj-" version ".tar.gz"))
8487 (sha256
8488 (base32
8489 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8490 ;; Patch setup.py so it looks for python-setuptools, which is
8491 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8492 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8493 (build-system python-build-system)
861f70c9 8494 (propagated-inputs
f3b98f4f 8495 `(("python-six" ,python-six)))
99fffa8a
LF
8496 (synopsis "Config file reading, writing and validation")
8497 (description "ConfigObj is a simple but powerful config file reader and
8498writer: an ini file round tripper. Its main feature is that it is very easy to
8499use, with a straightforward programmer’s interface and a simple syntax for
8500config files.")
8501 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8502 (license license:bsd-3)))
99fffa8a
LF
8503
8504(define-public python2-configobj
8505 (package-with-python2 python-configobj))
79e8a291
LF
8506
8507(define-public python-configargparse
8508 (package
8509 (name "python-configargparse")
8510 (version "0.10.0")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (string-append
8514 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8515 "ConfigArgParse-" version ".tar.gz"))
8516 (sha256
8517 (base32
8518 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8519 (build-system python-build-system)
8520 (arguments
8521 ;; FIXME: Bug in test suite filed upstream:
8522 ;; https://github.com/bw2/ConfigArgParse/issues/32
8523 '(#:tests? #f))
8524 (synopsis "Replacement for argparse")
8525 (description "A drop-in replacement for argparse that allows options to also
8526be set via config files and/or environment variables.")
8527 (home-page "https://github.com/bw2/ConfigArgParse")
8528 (license license:expat)))
8529
8530(define-public python2-configargparse
8531 (package-with-python2 python-configargparse))
ab41f979
LF
8532
8533(define-public python-ndg-httpsclient
8534 (package
8535 (name "python-ndg-httpsclient")
ae476d01 8536 (version "0.4.2")
ab41f979
LF
8537 (source (origin
8538 (method url-fetch)
7be13d00 8539 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8540 (sha256
8541 (base32
ae476d01 8542 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8543 (build-system python-build-system)
a39cc016
LF
8544 (arguments
8545 '(;; The tests appear to require networking.
8546 #:tests? #f))
ab41f979
LF
8547 (propagated-inputs
8548 `(("python-pyopenssl" ,python-pyopenssl)))
8549 (synopsis "HTTPS support for Python's httplib and urllib2")
8550 (description "This is a HTTPS client implementation for httplib and urllib2
8551based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8552over the default provided with Python and importantly enables full verification
8553of the SSL peer.")
8554 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8555 (license license:bsd-3)))
ab41f979
LF
8556
8557;; python2-openssl requires special care, so package-with-python2 is
8558;; insufficient.
8559(define-public python2-ndg-httpsclient
8560 (package (inherit python-ndg-httpsclient)
8561 (name "python2-ndg-httpsclient")
8562 (arguments `(#:python ,python-2))
8563 (propagated-inputs
8564 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8565
8566(define-public python-contextlib2
8567 (package
8568 (name "python-contextlib2")
8569 (version "0.4.0")
8570 (source
8571 (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "contextlib2" version))
8574 (sha256
8575 (base32
8576 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8577 (build-system python-build-system)
8578 (arguments
8579 `(#:phases
8580 (modify-phases %standard-phases
8581 (replace 'check
8582 (lambda _ (zero?
8583 (system*
b3546174 8584 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8585 (home-page "http://contextlib2.readthedocs.org/")
8586 (synopsis "Tools for decorators and context managers")
8587 (description "This module is primarily a backport of the Python
85883.2 contextlib to earlier Python versions. Like contextlib, it
8589provides utilities for common tasks involving decorators and context
8590managers. It also contains additional features that are not part of
8591the standard library.")
3f641af0 8592 (license license:psfl)))
03f964a5
CM
8593
8594(define-public python2-contextlib2
8595 (package-with-python2 python-contextlib2))
210bf497
DT
8596
8597(define-public python-texttable
8598 (package
8599 (name "python-texttable")
4c4d4df3 8600 (version "0.8.7")
210bf497
DT
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "texttable" version))
8605 (sha256
8606 (base32
4c4d4df3 8607 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8608 (build-system python-build-system)
8609 (arguments '(#:tests? #f)) ; no tests
8610 (home-page "https://github.com/foutaise/texttable/")
8611 (synopsis "Python module for creating simple ASCII tables")
8612 (description "Texttable is a Python module for creating simple ASCII
8613tables.")
3f641af0 8614 (license license:lgpl2.1+)))
210bf497
DT
8615
8616(define-public python2-texttable
8617 (package-with-python2 python-texttable))
67c52bb3
DT
8618
8619(define-public python-websocket-client
8620 (package
8621 (name "python-websocket-client")
6b810897 8622 (version "0.37.0")
67c52bb3
DT
8623 (source
8624 (origin
8625 (method url-fetch)
6b810897 8626 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8627 (sha256
8628 (base32
6b810897 8629 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8630 (build-system python-build-system)
a5333f7c
HG
8631 (propagated-inputs
8632 `(("python-six" ,python-six)))
67c52bb3
DT
8633 (home-page "https://github.com/liris/websocket-client")
8634 (synopsis "WebSocket client for Python")
8635 (description "The Websocket-client module provides the low level APIs for
8636WebSocket usage in Python programs.")
3f641af0 8637 (license license:lgpl2.1+)))
67c52bb3
DT
8638
8639(define-public python2-websocket-client
8640 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8641
8642(define-public python-atomicwrites
8643 (package
8644 (name "python-atomicwrites")
c56ad5e2 8645 (version "1.1.5")
5c6eea2a
LF
8646 (source (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "atomicwrites" version))
8649 (sha256
8650 (base32
c56ad5e2 8651 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8652 (build-system python-build-system)
8653 (synopsis "Atomic file writes in Python")
8654 (description "Library for atomic file writes using platform dependent tools
8f65585b 8655for atomic file system operations.")
5c6eea2a 8656 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8657 (license license:expat)))
9bb6d184
LF
8658
8659(define-public python2-atomicwrites
f210e944 8660 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8661
8662(define-public python-requests-toolbelt
8663 (package
8664 (name "python-requests-toolbelt")
c02af1c8 8665 (version "0.6.2")
561bb3cb
LF
8666 (source (origin
8667 (method url-fetch)
c02af1c8
LF
8668 (uri (string-append
8669 "https://pypi.python.org/packages/"
8670 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8671 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8672 (sha256
8673 (base32
c02af1c8 8674 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8675 (build-system python-build-system)
759aadd4
LF
8676 (native-inputs
8677 `(("python-betamax" ,python-betamax)
8678 ("python-mock" ,python-mock)
8679 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8680 (propagated-inputs
8681 `(("python-requests" ,python-requests)))
8682 (synopsis "Extensions to python-requests")
8683 (description "This is a toolbelt of useful classes and functions to be used
8684with python-requests.")
8685 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8686 (license license:asl2.0)))
d1deb90b
LF
8687
8688(define-public python-click-threading
8689 (package
8690 (name "python-click-threading")
3d2e0dbc 8691 (version "0.2.0")
d1deb90b
LF
8692 (source (origin
8693 (method url-fetch)
3d2e0dbc
LF
8694 (uri (string-append
8695 "https://pypi.python.org/packages/"
8696 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8697 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8698 (sha256
8699 (base32
3d2e0dbc 8700 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8701 (build-system python-build-system)
8702 (propagated-inputs
8703 `(("python-click" ,python-click)))
8704 (synopsis "Utilities for multithreading in Click")
8705 (description "This package provides utilities for multithreading in Click
8706applications.")
8707 (home-page "https://github.com/click-contrib/click-threading")
8708 (license license:expat)))
7b17cab9
LF
8709
8710(define-public python-click-log
8711 (package
8712 (name "python-click-log")
42734b9a 8713 (version "0.1.8")
7b17cab9
LF
8714 (source (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "click-log" version))
8717 (sha256
8718 (base32
42734b9a 8719 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8720 (build-system python-build-system)
8721 (propagated-inputs
8722 `(("python-click" ,python-click)))
8723 (synopsis "Logging for click applications")
8724 (description "This package provides a Python library for logging Click
8725applications.")
8726 (home-page "https://github.com/click-contrib/click-log")
8727 (license license:expat)))
7b3a4ee4
LF
8728
8729(define-public python-apipkg
8730 (package
8731 (name "python-apipkg")
8732 (version "1.4")
8733 (source (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "apipkg" version))
8736 (sha256
8737 (base32
8738 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8739 (build-system python-build-system)
328bb95d 8740 (native-inputs
7b3a4ee4
LF
8741 `(("python-pytest" ,python-pytest)))
8742 (synopsis "Namespace control and lazy-import mechanism")
8743 (description "With apipkg you can control the exported namespace of a Python
8744package and greatly reduce the number of imports for your users. It is a small
8745pure Python module that works on virtually all Python versions.")
8746 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8747 (license license:expat)))
e08739c3
CAW
8748
8749(define-public python2-apipkg
f210e944 8750 (package-with-python2 python-apipkg))
848964fe
LF
8751
8752(define-public python-execnet
8753 (package
8754 (name "python-execnet")
8755 (version "1.4.1")
8756 (source (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "execnet" version))
8759 (sha256
8760 (base32
8761 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8762 (build-system python-build-system)
ca0eee9d
LF
8763 (arguments
8764 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8765 ;; The two test failures are caused by the lack of an `ssh` executable.
8766 ;; The test suite can be run with pytest after the 'install' phase.
8767 #:tests? #f))
848964fe 8768 (native-inputs
ca0eee9d
LF
8769 `(("python-pytest" ,python-pytest)
8770 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8771 (propagated-inputs
848964fe
LF
8772 `(("python-apipkg" ,python-apipkg)))
8773 (synopsis "Rapid multi-Python deployment")
8774 (description "Execnet provides a share-nothing model with
8775channel-send/receive communication for distributing execution across many
8776Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 8777minimal and fast API targeting the following uses:
848964fe
LF
8778@enumerate
8779@item distribute tasks to (many) local or remote CPUs
8780@item write and deploy hybrid multi-process applications
8781@item write scripts to administer multiple environments
8782@end enumerate")
8783 (home-page "http://codespeak.net/execnet/")
f210e944 8784 (license license:expat)))
16c84f90
CAW
8785
8786(define-public python2-execnet
f210e944 8787 (package-with-python2 python-execnet))
6720dbb4 8788
d5bbf806 8789(define-public python-trollius-redis
8790 (package
8791 (name "python-trollius-redis")
8792 (version "0.1.4")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "trollius_redis" version))
8797 (sha256
8798 (base32
8799 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8800 (build-system python-build-system)
97b62eb0
MB
8801 ;; TODO: Tests require packaging 'hiredis'.
8802 (arguments '(#:tests? #f))
d5bbf806 8803 (home-page "https://github.com/benjolitz/trollius-redis")
8804 (synopsis "Port of asyncio-redis to trollius")
8805 (description "@code{trollius-redis} is a Redis client for Python
8806 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8807 Redis protocol.")
8808 (license license:bsd-2)))
8809
8810(define-public python2-trollius-redis
8811 (package-with-python2 python-trollius-redis))
8812
6720dbb4
LF
8813;;; The software provided by this package was integrated into pytest 2.8.
8814(define-public python-pytest-cache
8815 (package
8816 (name "python-pytest-cache")
8817 (version "1.0")
8818 (source (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "pytest-cache" version))
8821 (sha256
8822 (base32
8823 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8824 (build-system python-build-system)
f22efa01 8825 (propagated-inputs
630d938f
EF
8826 `(("python-apipkg" ,python-apipkg)
8827 ("python-execnet" ,python-execnet)
8828 ("python-py" ,python-py)
8829 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8830 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8831 (description "The pytest-cache plugin provides tools to rerun failures from
8832the last py.test invocation.")
8833 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8834 (license license:expat)))
0adc21c2
EF
8835
8836(define-public python2-pytest-cache
f210e944 8837 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8838
8839(define-public python-pytest-localserver
8840 (package
8841 (name "python-pytest-localserver")
29f20168 8842 (version "0.3.5")
d7e729fe
LF
8843 (source (origin
8844 (method url-fetch)
29f20168 8845 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8846 (sha256
8847 (base32
29f20168 8848 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8849 (build-system python-build-system)
8850 (arguments
8851 `(#:phases (modify-phases %standard-phases
8852 (replace 'check
8853 (lambda _
8854 (zero? (system* "py.test" "--genscript=runtests.py"))
8855 (zero? (system* "py.test")))))))
8856 (native-inputs
d7e729fe
LF
8857 `(("python-pytest" ,python-pytest)
8858 ("python-requests" ,python-requests)
9ba40f05 8859 ("python-six" ,python-six)))
f22efa01 8860 (propagated-inputs
9ba40f05 8861 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8862 (synopsis "Py.test plugin to test server connections locally")
8863 (description "Pytest-localserver is a plugin for the pytest testing
8864framework which enables you to test server connections locally.")
8865 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8866 (license license:expat)))
28cecbb7
LF
8867
8868(define-public python-wsgi-intercept
8869 (package
8870 (name "python-wsgi-intercept")
909fbd2b 8871 (version "1.2.2")
28cecbb7
LF
8872 (source (origin
8873 (method url-fetch)
909fbd2b
LF
8874 (uri (string-append
8875 "https://pypi.python.org/packages/"
8876 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8877 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8878 (sha256
8879 (base32
909fbd2b 8880 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8881 (build-system python-build-system)
b9fc496f
HG
8882 (propagated-inputs
8883 `(("python-six" ,python-six)))
28cecbb7 8884 (native-inputs
9d813ec1 8885 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8886 ("python-httplib2" ,python-httplib2)
8887 ("python-requests" ,python-requests)
8757f050 8888 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8889 (synopsis "Puts a WSGI application in place of a real URI for testing")
8890 (description "Wsgi_intercept installs a WSGI application in place of a real
8891URI for testing. Testing a WSGI application normally involves starting a
8892server at a local host and port, then pointing your test code to that address.
8893Instead, this library lets you intercept calls to any specific host/port
8894combination and redirect them into a WSGI application importable by your test
8895program. Thus, you can avoid spawning multiple processes or threads to test
8896your Web app.")
8897 (home-page "https://github.com/cdent/wsgi-intercept")
8898 (license license:expat)))
89b8a551
LF
8899
8900(define-public python-pytest-xprocess
8901 (package
8902 (name "python-pytest-xprocess")
8903 (version "0.9.1")
8904 (source (origin
8905 (method url-fetch)
8906 (uri (pypi-uri "pytest-xprocess" version))
8907 (sha256
8908 (base32
8909 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8910 (build-system python-build-system)
8911 (propagated-inputs
8912 `(("python-pytest" ,python-pytest)
8913 ("python-pytest-cache" ,python-pytest-cache)
8914 ("python-psutil" ,python-psutil)))
8915 (synopsis "Pytest plugin to manage external processes across test runs")
8916 (description "Pytest-xprocess is an experimental py.test plugin for managing
8917processes across test runs.")
8918 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8919 (license license:expat)))
5c299bf0
LF
8920
8921(define-public python-icalendar
8922 (package
8923 (name "python-icalendar")
68ab3e6c 8924 (version "3.11.4")
5c299bf0
LF
8925 (source (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "icalendar" version))
8928 (sha256
8929 (base32
68ab3e6c 8930 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
5c299bf0
LF
8931 (build-system python-build-system)
8932 (propagated-inputs
22d7360b 8933 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8934 ("python-pytz" ,python-pytz)))
8935 (synopsis "Python library for parsing iCalendar files")
8936 (description "The icalendar package is a parser/generator of iCalendar
8937files for use with Python.")
8938 (home-page "https://github.com/collective/icalendar")
3f641af0 8939 (license license:bsd-2)))
6bbbb53e
LF
8940
8941(define-public python-sphinxcontrib-newsfeed
8942 (package
8943 (name "python-sphinxcontrib-newsfeed")
8944 (version "0.1.4")
8945 (source (origin
8946 (method url-fetch)
8947 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8948 (sha256
8949 (base32
8950 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8951 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8952 (build-system python-build-system)
8953 (propagated-inputs
251ed7f2 8954 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8955 (synopsis "News Feed extension for Sphinx")
8956 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8957Blog, News or Announcements section to a Sphinx website.")
8958 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8959 (license license:bsd-2)))
2216e15c
SB
8960
8961(define-public python-args
8962 (package
8963 (name "python-args")
8964 (version "0.1.0")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "args" version))
8968 (sha256
8969 (base32
8970 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8971 (build-system python-build-system)
2216e15c
SB
8972 (home-page "https://github.com/kennethreitz/args")
8973 (synopsis "Command-line argument parser")
8974 (description
8975 "This library provides a Python module to parse command-line arguments.")
3f641af0 8976 (license license:bsd-3)))
2216e15c
SB
8977
8978(define-public python2-args
8979 (package-with-python2 python-args))
c06a3de9
SB
8980
8981(define-public python-clint
8982 (package
8983 (name "python-clint")
8984 (version "0.5.1")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "clint" version))
8988 (sha256
8989 (base32
8990 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8991 (build-system python-build-system)
6145b604
MB
8992 (arguments
8993 '(#:phases
8994 (modify-phases %standard-phases
8995 (replace 'check
8996 (lambda _
8997 (zero? (system* "py.test" "-v")))))))
8998 (native-inputs
8999 `(("python-pytest" ,python-pytest)))
f22efa01 9000 (propagated-inputs
f3b98f4f 9001 `(("python-args" ,python-args)))
c06a3de9
SB
9002 (home-page "https://github.com/kennethreitz/clint")
9003 (synopsis "Command-line interface tools")
9004 (description
9005 "Clint is a Python module filled with a set of tools for developing
9006command-line applications, including tools for colored and indented
9007output, progress bar display, and pipes.")
3f641af0 9008 (license license:isc)))
c06a3de9
SB
9009
9010(define-public python2-clint
9011 (package-with-python2 python-clint))
4ecdeef8
SB
9012
9013(define-public python-astor
9014 (package
9015 (name "python-astor")
9016 (version "0.5")
9017 (source (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "astor" version))
9020 (sha256
9021 (base32
9022 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9023 (build-system python-build-system)
4ecdeef8
SB
9024 (home-page "https://github.com/berkerpeksag/astor")
9025 (synopsis "Read and write Python ASTs")
9026 (description
9027 "Astor is designed to allow easy manipulation of Python source via the
9028Abstract Syntax Tree.")
3f641af0 9029 (license license:bsd-3)))
4ecdeef8
SB
9030
9031(define-public python2-astor
9032 (package-with-python2 python-astor))
e224b7d0
SB
9033
9034(define-public python-rply
9035 (package
9036 (name "python-rply")
9037 (version "0.7.4")
9038 (source (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "rply" version))
9041 (sha256
9042 (base32
9043 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9044 (build-system python-build-system)
f22efa01 9045 (propagated-inputs
f3b98f4f 9046 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9047 (home-page "https://github.com/alex/rply")
9048 (synopsis "Parser generator for Python")
9049 (description
9050 "This package provides a pure Python based parser generator, that also
9051works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9052with a new public API, and RPython support.")
3f641af0 9053 (license license:bsd-3)))
e224b7d0
SB
9054
9055(define-public python2-rply
9056 (package-with-python2 python-rply))
c3e919d7
SB
9057
9058(define-public python-hy
9059 (package
9060 (name "python-hy")
9061 (version "0.11.1")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "hy" version))
9065 (sha256
9066 (base32
9067 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9068 (build-system python-build-system)
15c37077
MB
9069 (arguments
9070 '(#:phases
9071 (modify-phases %standard-phases
9072 (replace 'check
9073 (lambda _
9074 ;; Tests require write access to HOME.
9075 (setenv "HOME" "/tmp")
9076 (zero? (system* "nosetests")))))))
9077 (native-inputs
9078 `(("python-coverage" ,python-coverage)
9079 ("python-nose" ,python-nose)))
f22efa01 9080 (propagated-inputs
c3e919d7
SB
9081 `(("python-astor" ,python-astor)
9082 ("python-clint" ,python-clint)
f3b98f4f 9083 ("python-rply" ,python-rply)))
c3e919d7
SB
9084 (home-page "http://hylang.org/")
9085 (synopsis "Lisp frontend to Python")
9086 (description
9087 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9088its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9089Python at your fingertips, in Lisp form.")
9090 (license license:expat)))
9091
9092(define-public python2-hy
9093 (package-with-python2 python-hy))
7a5b944e 9094
81f7f297
EF
9095(define-public python-rauth
9096 (package
9097 (name "python-rauth")
06fe79f2 9098 (version "0.7.3")
81f7f297
EF
9099 (source
9100 (origin
9101 (method url-fetch)
9102 (uri (pypi-uri "rauth" version))
9103 (sha256
9104 (base32
06fe79f2 9105 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9106 (build-system python-build-system)
9107 (arguments
9108 `(#:test-target "check"))
f22efa01 9109 (propagated-inputs
81f7f297
EF
9110 `(("python-requests" ,python-requests)))
9111 (home-page "https://github.com/litl/rauth")
9112 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9113 (description
9114 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9115provides service wrappers for convenient connection initialization and
9116authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9117 (license license:expat)
9118 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9119
9120(define-public python2-rauth
0848d8d3
EF
9121 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9122 (package
9123 (inherit base)
00e10c6e 9124 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9125 ,@(package-native-inputs base))))))
81f7f297 9126
1abe448d
EF
9127(define-public python2-functools32
9128 (package
9129 (name "python2-functools32")
9130 (version "3.2.3-2")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "functools32" version))
9135 (sha256
9136 (base32
9137 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9138 (build-system python-build-system)
9139 (arguments
9140 `(#:python ,python-2
9141 #:tests? #f)) ; no test target
1abe448d
EF
9142 (home-page "https://github.com/MiCHiLU/python-functools32")
9143 (synopsis
9144 "Backport of the functools module from Python 3.2.3")
9145 (description
9146 "This package is a backport of the @code{functools} module from Python
91473.2.3 for use with older versions of Python and PyPy.")
9148 (license license:expat)))
9149
550bd98b
MB
9150(define-public python2-subprocess32
9151 (package
9152 (name "python2-subprocess32")
9153 (version "3.2.7")
9154 (source (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "subprocess32" version))
9157 (sha256
9158 (base32
9159 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9160 (patches
9161 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9162 (build-system python-build-system)
9163 (arguments
9164 `(#:python ,python-2
9165 #:phases
9166 (modify-phases %standard-phases
9167 (add-after 'unpack 'patch-/bin/sh
9168 (lambda _
9169 (substitute* '("subprocess32.py"
9170 "test_subprocess32.py")
9171 (("/bin/sh") (which "sh")))
9172 #t))
9173 (delete 'check)
9174 (add-after 'install 'check
9175 (lambda* (#:key inputs outputs #:allow-other-keys)
9176 ;; For some reason this package fails to import
9177 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9178 ;; directory. Running tests after install is easier.
9179 (add-installed-pythonpath inputs outputs)
9180 (zero? (system* "python" "test_subprocess32.py")))))))
9181 (home-page "https://github.com/google/python-subprocess32")
9182 (synopsis "Backport of the subprocess module from Python 3.2")
9183 (description
9184 "This is a backport of the @code{subprocess} standard library module
9185from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9186new features. On POSIX systems it is guaranteed to be reliable when used
9187in threaded applications. It includes timeout support from Python 3.3 but
9188otherwise matches 3.2’s API.")
9189 (license license:psfl)))
9190
877889f3 9191(define-public python2-futures
7a5b944e 9192 (package
877889f3 9193 (name "python2-futures")
e17a1248 9194 (version "3.0.5")
7a5b944e
EF
9195 (source
9196 (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "futures" version))
9199 (sha256
9200 (base32
e17a1248 9201 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9202 (build-system python-build-system)
877889f3 9203 (arguments `(#:python ,python-2))
7a5b944e
EF
9204 (home-page "https://github.com/agronholm/pythonfutures")
9205 (synopsis
9206 "Backport of the concurrent.futures package from Python 3.2")
9207 (description
9208 "The concurrent.futures module provides a high-level interface for
9209asynchronously executing callables. This package backports the
9210concurrent.futures package from Python 3.2")
3f641af0 9211 (license license:bsd-3)))
7a5b944e 9212
5cb2fe44
EF
9213(define-public python-promise
9214 (package
9215 (name "python-promise")
9216 (version "0.4.2")
9217 (source
9218 (origin
9219 (method url-fetch)
9220 (uri (pypi-uri "promise" version))
9221 (sha256
9222 (base32
9223 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9224 (build-system python-build-system)
9225 ;; Tests wants python-futures, which is a python2 only program, and
9226 ;; can't be found by python-promise at test time.
9227 (arguments `(#:tests? #f))
9228 (home-page "https://github.com/syrusakbary/promise")
9229 (synopsis "Promises/A+ implementation for Python")
9230 (description
9231 "Promises/A+ implementation for Python")
9232 (properties `((python2-variant . ,(delay python2-promise))))
9233 (license license:expat)))
9234
9235(define-public python2-promise
9236 (let ((promise (package-with-python2
9237 (strip-python2-variant python-promise))))
9238 (package (inherit promise)
9239 (arguments (substitute-keyword-arguments (package-arguments promise)
9240 ((#:tests? _) #t)))
9241 (native-inputs
9242 `(("python2-futures" ,python2-futures)
9243 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9244 ,@(package-native-inputs promise))))))
9245
c18f6368
EF
9246(define-public python-urllib3
9247 (package
9248 (name "python-urllib3")
6178274d 9249 (version "1.18.1")
c18f6368
EF
9250 (source
9251 (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "urllib3" version))
9254 (sha256
9255 (base32
6178274d 9256 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9257 (build-system python-build-system)
9258 (arguments `(#:tests? #f))
9259 (native-inputs
f3b98f4f 9260 `(;; some packages for tests
c18f6368
EF
9261 ("python-nose" ,python-nose)
9262 ("python-mock" ,python-mock)
9263 ("python-tornado" ,python-tornado)))
9264 (propagated-inputs
8322749a 9265 `(;; extra packages for https security
c18f6368
EF
9266 ("python-certifi" ,python-certifi)
9267 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9268 ("python-pyasn1" ,python-pyasn1)
9269 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9270 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9271 (synopsis "HTTP library with thread-safe connection pooling")
9272 (description
9273 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9274can reuse the same socket connection for multiple requests, it can POST files,
9275supports url redirection and retries, and also gzip and deflate decoding.")
9276 (license license:expat)))
9277
9278(define-public python2-urllib3
9279 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9280
9281(define-public python-colorama
9282 (package
9283 (name "python-colorama")
f92576f9 9284 (version "0.3.7")
2b2f2fc1
DT
9285 (source
9286 (origin
9287 (method url-fetch)
9288 (uri (pypi-uri "colorama" version))
9289 (sha256
9290 (base32
f92576f9 9291 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9292 (build-system python-build-system)
46e110cc 9293 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9294 (description "Colorama is a Python library for rendering colored terminal
9295text.")
9296 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9297 (license license:bsd-3)))
2b2f2fc1
DT
9298
9299(define-public python2-colorama
9300 (package-with-python2 python-colorama))
f5bcec6e
DT
9301
9302(define-public python-rsa
9303 (package
9304 (name "python-rsa")
ecd68c53 9305 (version "3.4.2")
f5bcec6e
DT
9306 (source
9307 (origin
9308 (method url-fetch)
9309 (uri (pypi-uri "rsa" version))
9310 (sha256
9311 (base32
ecd68c53 9312 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9313 (build-system python-build-system)
f22efa01 9314 (propagated-inputs
f3b98f4f 9315 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9316 (synopsis "Pure-Python RSA implementation")
9317 (description "Python-RSA is a pure-Python RSA implementation. It supports
9318encryption and decryption, signing and verifying signatures, and key
9319generation according to PKCS#1 version 1.5. It can be used as a Python
9320library as well as on the command line.")
9321 (home-page "http://stuvel.eu/rsa")
3f641af0 9322 (license license:asl2.0)))
f5bcec6e
DT
9323
9324(define-public python2-rsa
9325 (package-with-python2 python-rsa))
c0aacfa5
DT
9326
9327(define-public python-pluggy
9328 (package
9329 (name "python-pluggy")
9330 (version "0.3.1")
9331 (source
9332 (origin
9333 (method url-fetch)
9334 (uri (pypi-uri "pluggy" version))
9335 (sha256
9336 (base32
9337 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9338 (build-system python-build-system)
c0aacfa5
DT
9339 (synopsis "Plugin and hook calling mechanism for Python")
9340 (description "Pluggy is an extraction of the plugin manager as used by
9341Pytest but stripped of Pytest specific details.")
9342 (home-page "https://pypi.python.org/pypi/pluggy")
9343 (license license:expat)))
9344
9345(define-public python2-pluggy
9346 (package-with-python2 python-pluggy))
a4af21ca
DT
9347
9348(define-public python-tox
9349 (package
9350 (name "python-tox")
9351 (version "2.3.1")
9352 (source
9353 (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "tox" version))
9356 (sha256
9357 (base32
9358 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9359 (build-system python-build-system)
9360 (arguments
7ba07edf
HG
9361 ;; FIXME: Tests require pytest-timeout, which itself requires
9362 ;; pytest>=2.8.0 for installation.
a4af21ca 9363 '(#:tests? #f))
482d9591
HG
9364 (propagated-inputs
9365 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9366 ("python-py" ,python-py)
482d9591 9367 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9368 (native-inputs
7ba07edf
HG
9369 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9370 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9371 (home-page "http://tox.testrun.org/")
9372 (synopsis "Virtualenv-based automation of test activities")
9373 (description "Tox is a generic virtualenv management and test command line
9374tool. It can be used to check that a package installs correctly with
9375different Python versions and interpreters, or run tests in each type of
9376supported environment, or act as a frontend to continuous integration
9377servers.")
9378 (license license:expat)))
9379
9380(define-public python2-tox
9381 (package-with-python2 python-tox))
ba9da248
DT
9382
9383(define-public python-jmespath
9384 (package
9385 (name "python-jmespath")
9386 (version "0.9.0")
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "jmespath" version))
9391 (sha256
9392 (base32
9393 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9394 (build-system python-build-system)
52a75a83
MB
9395 (native-inputs
9396 `(("python-nose" ,python-nose)))
ba9da248
DT
9397 (synopsis "JSON Matching Expressions")
9398 (description "JMESPath (pronounced “james path”) is a Python library that
9399allows one to declaratively specify how to extract elements from a JSON
9400document.")
9401 (home-page "https://github.com/jmespath/jmespath.py")
9402 (license license:expat)))
9403
9404(define-public python2-jmespath
9405 (package-with-python2 python-jmespath))
935fcd5c
DT
9406
9407(define-public python-botocore
9408 (package
9409 (name "python-botocore")
d93985fe 9410 (version "1.5.26")
935fcd5c
DT
9411 (source
9412 (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "botocore" version))
9415 (sha256
9416 (base32
d93985fe 9417 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9418 (build-system python-build-system)
877fdac9
MB
9419 (arguments
9420 ;; FIXME: Many tests are failing.
9421 '(#:tests? #f))
482d9591 9422 (propagated-inputs
22d7360b 9423 `(("python-dateutil" ,python-dateutil)
935fcd5c 9424 ("python-docutils" ,python-docutils)
482d9591 9425 ("python-jmespath" ,python-jmespath)))
8fa6890b 9426 (native-inputs
482d9591 9427 `(("python-mock" ,python-mock)
935fcd5c 9428 ("python-nose" ,python-nose)
482d9591 9429 ("behave" ,behave)
935fcd5c 9430 ("python-tox" ,python-tox)
482d9591 9431 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9432 (home-page "https://github.com/boto/botocore")
9433 (synopsis "Low-level interface to AWS")
9434 (description "Botocore is a Python library that provides a low-level
9435interface to the Amazon Web Services (AWS) API.")
3f641af0 9436 (license license:asl2.0)))
935fcd5c
DT
9437
9438(define-public python2-botocore
9439 (package-with-python2 python-botocore))
f861b8b8
DT
9440
9441(define-public awscli
9442 (package
9443 (name "awscli")
192b887a 9444 (version "1.11.63")
f861b8b8
DT
9445 (source
9446 (origin
9447 (method url-fetch)
d5ccf71e 9448 (uri (pypi-uri name version))
f861b8b8
DT
9449 (sha256
9450 (base32
192b887a 9451 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9452 (build-system python-build-system)
482d9591 9453 (propagated-inputs
f861b8b8 9454 `(("python-colorama" ,python-colorama)
482d9591
HG
9455 ("python-botocore" ,python-botocore)
9456 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9457 ("python-docutils" ,python-docutils)
0cb9fba3 9458 ("python-pyyaml" ,python-pyyaml)
482d9591 9459 ("python-rsa" ,python-rsa)))
619bfd81
MB
9460 (arguments
9461 ;; FIXME: The 'pypi' release does not contain tests.
9462 '(#:tests? #f))
60a8be3a 9463 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9464 (synopsis "Command line client for AWS")
9465 (description "AWS CLI provides a unified command line interface to the
9466Amazon Web Services (AWS) API.")
3f641af0 9467 (license license:asl2.0)))
6a44697d
LF
9468
9469(define-public python-hypothesis
9470 (package
9471 (name "python-hypothesis")
bea6d94d 9472 (version "3.1.0")
6a44697d
LF
9473 (source (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "hypothesis" version))
9476 (sha256
9477 (base32
bea6d94d 9478 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9479 (build-system python-build-system)
bd100c71 9480 (native-inputs
6a44697d
LF
9481 `(("python-flake8" ,python-flake8)
9482 ("python-pytest" ,python-pytest)))
9483 (synopsis "Library for property based testing")
9484 (description "Hypothesis is a library for testing your Python code against a
9485much larger range of examples than you would ever want to write by hand. It’s
9486based on the Haskell library, Quickcheck, and is designed to integrate
9487seamlessly into your existing Python unit testing work flow.")
9488 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9489 (license license:mpl2.0)
6f068e08 9490 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9491
9492(define-public python2-hypothesis
6f068e08
EF
9493 (let ((hypothesis (package-with-python2
9494 (strip-python2-variant python-hypothesis))))
9495 (package (inherit hypothesis)
9496 (native-inputs
bd100c71
MB
9497 `(("python2-enum34" ,python2-enum34)
9498 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9499
9500(define-public python-pytest-subtesthack
9501 (package
9502 (name "python-pytest-subtesthack")
9503 (version "0.1.1")
9504 (source (origin
9505 (method url-fetch)
9506 (uri (pypi-uri "pytest-subtesthack" version))
9507 (sha256
9508 (base32
9509 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9510 (build-system python-build-system)
7517e73c
LF
9511 (propagated-inputs
9512 `(("python-pytest" ,python-pytest)))
9513 (synopsis "Set-up and tear-down fixtures for unit tests")
9514 (description "This plugin allows you to set up and tear down fixtures within
9515unit test functions that use @code{py.test}. This is useful for using
9516@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9517function multiple times, without setting up or tearing down fixture state as is
9518normally the case.")
9519 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9520 (license license:unlicense)))
7517e73c
LF
9521
9522(define-public python2-pytest-subtesthack
9523 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9524
7637de23 9525(define-public python-xdo
0bdc1671 9526 (package
7637de23 9527 (name "python-xdo")
e871c332 9528 (version "0.3")
0bdc1671
CAW
9529 (source (origin
9530 (method url-fetch)
9531 (uri (string-append
9532 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9533 "python-xdo_" version ".orig.tar.gz"))
9534 (sha256
9535 (base32
e871c332 9536 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9537 (build-system python-build-system)
9538 (arguments
736cfc10
SB
9539 '(#:phases
9540 (modify-phases %standard-phases
9541 (add-before 'install 'patch-libxdo-path
9542 ;; Hardcode the path of dynamically loaded libxdo library.
9543 (lambda* (#:key inputs #:allow-other-keys)
9544 (let ((libxdo (string-append
9545 (assoc-ref inputs "xdotool")
9546 "/lib/libxdo.so")))
9547 (substitute* "xdo/_xdo.py"
9548 (("find_library\\(\"xdo\"\\)")
9549 (simple-format #f "\"~a\"" libxdo)))
9550 #t))))
9551 #:tests? #f)) ; no tests provided
0b5e0863
SB
9552 (propagated-inputs
9553 `(("python-six" ,python-six)))
0bdc1671
CAW
9554 (inputs
9555 `(("xdotool" ,xdotool)
9556 ("libX11" ,libx11)))
9557 (home-page "https://tracker.debian.org/pkg/python-xdo")
9558 (synopsis "Python library for simulating X11 keyboard/mouse input")
9559 (description "Provides bindings to libxdo for manipulating X11 via simulated
9560input. (Note that this is mostly a legacy library; you may wish to look at
9561python-xdo for newer bindings.)")
3f641af0 9562 (license license:bsd-3)))
0bdc1671 9563
7637de23
LF
9564(define-public python2-xdo
9565 (package-with-python2 python-xdo))
9566
cb34dc6c
CAW
9567(define-public python-wtforms
9568 (package
9569 (name "python-wtforms")
9570 (version "2.1")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "WTForms" version ".zip"))
9575 (sha256
9576 (base32
9577 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9578 (build-system python-build-system)
13c4d874
EF
9579 (arguments
9580 '(#:phases
9581 (modify-phases %standard-phases
9582 (add-after 'unpack 'remove-django-test
9583 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9584 (lambda _
9585 (substitute*
9586 "tests/runtests.py"
9587 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9588 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9589 #t)))))
cb34dc6c
CAW
9590 (native-inputs
9591 `(("unzip" ,unzip)))
9592 (home-page "http://wtforms.simplecodes.com/")
9593 (synopsis
9594 "Form validation and rendering library for Python web development")
9595 (description
9596 "WTForms is a flexible forms validation and rendering library
9597for Python web development. It is very similar to the web form API
9598available in Django, but is a standalone package.")
f210e944 9599 (license license:bsd-3)))
cb34dc6c
CAW
9600
9601(define-public python2-wtforms
f210e944 9602 (package-with-python2 python-wtforms))
50aaec25
DT
9603
9604(define-public python-mako
9605 (package
9606 (name "python-mako")
3753f2e6 9607 (version "1.0.6")
50aaec25
DT
9608 (source
9609 (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "Mako" version))
9612 (sha256
9613 (base32
3753f2e6 9614 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9615 (build-system python-build-system)
482d9591
HG
9616 (propagated-inputs
9617 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9618 (native-inputs
482d9591 9619 `(("python-mock" ,python-mock)
e435af5c
MB
9620 ("python-nose" ,python-nose)
9621 ("python-pytest" ,python-pytest)))
50aaec25
DT
9622 (home-page "http://www.makotemplates.org/")
9623 (synopsis "Templating language for Python")
9624 (description "Mako is a templating language for Python that compiles
9625templates into Python modules.")
f210e944 9626 (license license:expat)))
50aaec25
DT
9627
9628(define-public python2-mako
f210e944 9629 (package-with-python2 python-mako))
ae00a41f
CAW
9630
9631(define-public python-waitress
9632 (package
9633 (name "python-waitress")
9634 (version "0.8.10")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (pypi-uri "waitress" version))
9639 (sha256
9640 (base32
9641 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9642 (build-system python-build-system)
9643 (home-page "https://github.com/Pylons/waitress")
9644 (synopsis "Waitress WSGI server")
9645 (description "Waitress is meant to be a production-quality pure-Python WSGI
9646server with very acceptable performance.")
f210e944 9647 (license license:zpl2.1)))
ae00a41f
CAW
9648
9649(define-public python2-waitress
f210e944 9650 (package-with-python2 python-waitress))
778a284b
CAW
9651
9652(define-public python-wsgiproxy2
9653 (package
9654 (name "python-wsgiproxy2")
9655 (version "0.4.2")
9656 (source
9657 (origin
9658 (method url-fetch)
9659 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9660 (sha256
9661 (base32
9662 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9663 (build-system python-build-system)
e359b31a
LF
9664 (arguments
9665 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9666 ;; support Python 3:
9667 ;; https://github.com/benoitc/restkit/issues/140
9668 #:tests? #f))
778a284b
CAW
9669 (native-inputs
9670 `(("unzip" ,unzip)
9671 ("python-nose" ,python-nose)
9672 ("python-coverage" ,python-coverage)))
9673 (propagated-inputs
9674 `(("python-six" ,python-six)
9675 ("python-webob" ,python-webob)))
9676 (home-page
9677 "https://github.com/gawel/WSGIProxy2/")
9678 (synopsis "WSGI Proxy with various http client backends")
9679 (description "WSGI turns HTTP requests into WSGI function calls.
9680WSGIProxy turns WSGI function calls into HTTP requests.
9681It also includes code to sign requests and pass private data,
9682and to spawn subprocesses to handle requests.")
f210e944 9683 (license license:expat)))
778a284b
CAW
9684
9685(define-public python2-wsgiproxy2
f210e944 9686 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9687
9688(define-public python-pastedeploy
9689 (package
9690 (name "python-pastedeploy")
9691 (version "1.5.2")
9692 (source
9693 (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "PasteDeploy" version))
9696 (sha256
9697 (base32
9698 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9699 (build-system python-build-system)
9700 (native-inputs
9701 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9702 (home-page "http://pythonpaste.org/deploy/")
9703 (synopsis
9704 "Load, configure, and compose WSGI applications and servers")
9705 (description
9706 "This tool provides code to load WSGI applications and servers from URIs;
9707these URIs can refer to Python Eggs for INI-style configuration files. Paste
9708Script provides commands to serve applications based on this configuration
9709file.")
9710 (license license:expat)))
9711
9712(define-public python2-pastedeploy
9713 (package-with-python2 python-pastedeploy))
1cf53652 9714
c4a7904c
CAW
9715(define-public python-paste
9716 (package
9717 (name "python-paste")
ba1731da 9718 (version "2.0.3")
c4a7904c
CAW
9719 (source
9720 (origin
9721 (method url-fetch)
9722 (uri (pypi-uri "Paste" version))
9723 (sha256
9724 (base32
ba1731da 9725 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9726 (patches (search-patches "python-paste-remove-website-test.patch"
9727 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9728 (build-system python-build-system)
9729 (native-inputs
9730 `(("python-nose" ,python-nose)))
9731 (propagated-inputs
f3b98f4f 9732 `(("python-six" ,python-six)))
c4a7904c
CAW
9733 (home-page "http://pythonpaste.org")
9734 (synopsis
9735 "Python web development tools, focusing on WSGI")
9736 (description
9737 "Paste provides a variety of web development tools and middleware which
9738can be nested together to build web applications. Paste's design closely
9739follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9740 (license license:expat)))
c4a7904c
CAW
9741
9742(define-public python2-paste
ba1731da 9743 (package-with-python2 python-paste))
c4a7904c 9744
a8f20f63
CAW
9745(define-public python-pastescript
9746 (package
9747 (name "python-pastescript")
9748 (version "2.0.2")
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "PasteScript" version))
9753 (sha256
9754 (base32
9755 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9756 (build-system python-build-system)
9757 (native-inputs
9758 `(("python-nose" ,python-nose)))
9759 (propagated-inputs
f3b98f4f 9760 `(("python-paste" ,python-paste)
a8f20f63
CAW
9761 ("python-pastedeploy" ,python-pastedeploy)))
9762 (home-page "http://pythonpaste.org/script/")
9763 (arguments
9764 '(;; Unfortunately, this requires the latest unittest2,
9765 ;; but that requires traceback2 which requires linecache2 which requires
9766 ;; unittest2. So we're skipping tests for now.
9767 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9768 ;; so in theory we could get around this situation somehow.)
9769 #:tests? #f))
9770 (synopsis
9771 "Pluggable command line tool for serving web applications and more")
9772 (description
9773 "PasteScript is a plugin-friendly command line tool which provides a
9774variety of features, from launching web applications to bootstrapping project
9775layouts.")
9776 (license license:expat)))
9777
9778(define-public python2-pastescript
9779 (package-with-python2 python-pastescript))
9780
1cf53652
CAW
9781(define-public python-pyquery
9782 (package
9783 (name "python-pyquery")
ab0c3429 9784 (version "1.2.17")
1cf53652
CAW
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "pyquery" version))
9789 (sha256
9790 (base32
ab0c3429 9791 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9792 (build-system python-build-system)
2ddbfa8c
LF
9793 (native-inputs
9794 `(("python-webob" ,python-webob)
9795 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9796 (propagated-inputs
9797 `(("python-lxml" ,python-lxml)
9798 ("python-cssselect" ,python-cssselect)))
9799 (home-page "https://github.com/gawel/pyquery")
9800 (synopsis "Make jQuery-like queries on xml documents")
9801 (description "pyquery allows you to make jQuery queries on xml documents.
9802The API is as much as possible the similar to jQuery. pyquery uses lxml for
9803fast xml and html manipulation.")
f210e944 9804 (license license:bsd-3)))
1cf53652
CAW
9805
9806(define-public python2-pyquery
f210e944 9807 (package-with-python2 python-pyquery))
aa6313d6
CAW
9808
9809(define-public python-webtest
9810 (package
9811 (name "python-webtest")
9812 (version "2.0.20")
9813 (source
9814 (origin
9815 (method url-fetch)
9816 (uri (pypi-uri "WebTest" version))
9817 (sha256
9818 (base32
9819 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9820 (build-system python-build-system)
9821 (arguments
9822 `(;; Unfortunately we have to disable tests!
9823 ;; This release of WebTest is pinned to python-nose < 1.3,
9824 ;; but older versions of python-nose are plagued with the following
9825 ;; bug(s), which rears its ugly head during test execution:
9826 ;; https://github.com/nose-devs/nose/issues/759
9827 ;; https://github.com/nose-devs/nose/pull/811
9828 #:tests? #f))
9829 ;; Commented out code is no good, but in this case, once tests
9830 ;; are ready to be enabled again, we should put the following
9831 ;; in place:
9832 ;; (native-inputs
9833 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9834 ;; ; but see above comment
9835 ;; ("python-coverage" ,python-coverage)
9836 ;; ("python-mock" ,python-mock)
9837 ;; ("python-pastedeploy" ,python-pastedeploy)
9838 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9839 ;; ("python-pyquery" ,python-pyquery)))
9840 (propagated-inputs
9841 `(("python-waitress" ,python-waitress)
9842 ("python-webob" ,python-webob)
9843 ("python-six" ,python-six)
9844 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9845 (home-page "http://webtest.pythonpaste.org/")
9846 (synopsis "Helper to test WSGI applications")
9847 (description "Webtest allows you to test your Python web applications
9848without starting an HTTP server. It supports anything that supports the
9849minimum of WSGI.")
f210e944 9850 (license license:expat)))
aa6313d6
CAW
9851
9852(define-public python2-webtest
f210e944 9853 (package-with-python2 python-webtest))
4cb122cd
CAW
9854
9855(define-public python-anyjson
9856 (package
9857 (name "python-anyjson")
9858 (version "0.3.3")
9859 (source
9860 (origin
9861 (method url-fetch)
9862 (uri (pypi-uri "anyjson" version))
9863 (sha256
9864 (base32
9865 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9866 (build-system python-build-system)
9867 (arguments
9868 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9869 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9870 ;; whatever) so this transformation needs to be done before the tests
9871 ;; can be run. Maybe we could add a build step to transform beforehand
9872 ;; but it could be annoying/difficult.
9873 ;; We can enable tests for the Python 2 version, though, and do below.
9874 #:tests? #f))
9875 (home-page "http://bitbucket.org/runeh/anyjson/")
9876 (synopsis
9877 "Wraps best available JSON implementation in a common interface")
9878 (description
9879 "Anyjson loads whichever is the fastest JSON module installed
9880and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9881 (license license:bsd-3)
4cb122cd
CAW
9882 (properties `((python2-variant . ,(delay python2-anyjson))))))
9883
9884(define-public python2-anyjson
9885 (let ((anyjson (package-with-python2
9886 (strip-python2-variant python-anyjson))))
9887 (package
9888 (inherit anyjson)
9889 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9890 #:tests? #t
9891 ,@(package-arguments anyjson)))
00e10c6e 9892 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9893
9894(define-public python-amqp
9895 (package
9896 (name "python-amqp")
9897 (version "1.4.9")
9898 (source
9899 (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "amqp" version))
9902 (sha256
9903 (base32
9904 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9905 (build-system python-build-system)
9906 (native-inputs
9907 `(("python-nose" ,python-nose)
9908 ("python-mock" ,python-mock)))
7bf837fd 9909 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
9910 (synopsis
9911 "Low-level AMQP client for Python (fork of amqplib)")
9912 (description
9913 "This is a fork of amqplib which was originally written by Barry Pederson.
9914It is maintained by the Celery project, and used by kombu as a pure python
9915alternative when librabbitmq is not available.")
3f641af0 9916 (license license:lgpl2.1+)
8dfceab7
CAW
9917 (properties `((python2-variant . ,(delay python2-amqp))))))
9918
9919(define-public python2-amqp
9920 (let ((amqp (package-with-python2
9921 (strip-python2-variant python-amqp))))
9922 (package
9923 (inherit amqp)
9924 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9925 ;; unmaintained. Weirdly, does not do this on the python 3
9926 ;; version?
9927 #:tests? #f
00e10c6e 9928 ,@(package-arguments amqp))))))
7d387305
CAW
9929
9930(define-public python-kombu
9931 (package
9932 (name "python-kombu")
0cb59822 9933 (version "3.0.37")
7d387305
CAW
9934 (source
9935 (origin
9936 (method url-fetch)
9937 (uri (pypi-uri "kombu" version))
9938 (sha256
9939 (base32
0cb59822 9940 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9941 (build-system python-build-system)
9942 (native-inputs
9943 `(("python-mock" ,python-mock)
9944 ("python-nose" ,python-nose)))
9945 (propagated-inputs
9946 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9947 ("python-amqp" ,python-amqp)
9948 ("python-redis" ,python-redis)))
7d387305
CAW
9949 (home-page "http://kombu.readthedocs.org")
9950 (synopsis "Message passing library for Python")
9951 (description "The aim of Kombu is to make messaging in Python as easy as
9952possible by providing an idiomatic high-level interface for the AMQ protocol,
9953and also provide proven and tested solutions to common messaging problems.
9954AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9955message orientation, queuing, routing, reliability and security, for which the
9956RabbitMQ messaging server is the most popular implementation.")
3f641af0 9957 (license license:bsd-3)
7d387305
CAW
9958 (properties `((python2-variant . ,(delay python2-kombu))))))
9959
9960(define-public python2-kombu
9961 (let ((kombu (package-with-python2
9962 (strip-python2-variant python-kombu))))
9963 (package
9964 (inherit kombu)
752eb9e0
MB
9965 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9966 ;; It works fine on the python3 variant.
9967 #:tests? #f
9968 ,@(package-arguments kombu)))
328bb95d
HG
9969 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9970 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9971
9972(define-public python-billiard
9973 (package
9974 (name "python-billiard")
a6bb9e44 9975 (version "3.3.0.23")
b6f0b9fb
CAW
9976 (source
9977 (origin
9978 (method url-fetch)
9979 (uri (pypi-uri "billiard" version))
9980 (sha256
9981 (base32
a6bb9e44 9982 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9983 (build-system python-build-system)
9984 (native-inputs
9985 `(("python-nose" ,python-nose)))
7bf837fd 9986 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
9987 (synopsis
9988 "Python multiprocessing fork with improvements and bugfixes")
9989 (description
9990 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9991multiprocessing package itself is a renamed and updated version of R Oudkerk's
9992pyprocessing package. This standalone variant is intended to be compatible with
9993Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9994 (license license:bsd-3)
b6f0b9fb
CAW
9995 (properties `((python2-variant . ,(delay python2-billiard))))))
9996
9997(define-public python2-billiard
9998 (let ((billiard (package-with-python2
9999 (strip-python2-variant python-billiard))))
10000 (package
10001 (inherit billiard)
00e10c6e 10002 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
10003 ("python2-mock" ,python2-mock)
10004 ,@(package-native-inputs billiard))))))
22df6419
CAW
10005
10006(define-public python-celery
10007 (package
10008 (name "python-celery")
9ebe87fe 10009 (version "3.1.24")
22df6419
CAW
10010 (source
10011 (origin
10012 (method url-fetch)
10013 (uri (pypi-uri "celery" version))
10014 (sha256
10015 (base32
9ebe87fe 10016 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 10017 (build-system python-build-system)
9ebe87fe
LF
10018 (arguments
10019 `(#:phases
10020 (modify-phases %standard-phases
10021 ;; These tests break with Python 3.5:
10022 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10023 (replace 'check
10024 (lambda _
10025 (zero?
10026 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10027 (native-inputs
10028 `(("python-nose" ,python-nose)))
f22efa01 10029 (propagated-inputs
22df6419
CAW
10030 `(("python-pytz" ,python-pytz)
10031 ("python-billiard" ,python-billiard)
10032 ("python-kombu" ,python-kombu)))
10033 (home-page "http://celeryproject.org")
10034 (synopsis "Distributed Task Queue")
10035 (description "Celery is an asynchronous task queue/job queue based on
10036distributed message passing. It is focused on real-time operation, but
10037supports scheduling as well. The execution units, called tasks, are executed
10038concurrently on a single or more worker servers using multiprocessing,
10039Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10040synchronously (wait until ready).")
3f641af0 10041 (license license:bsd-3)
22df6419
CAW
10042 (properties `((python2-variant . ,(delay python2-celery))))))
10043
10044(define-public python2-celery
10045 (let ((celery (package-with-python2
10046 (strip-python2-variant python-celery))))
10047 (package
10048 (inherit celery)
00e10c6e 10049 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10050 ("python2-mock" ,python2-mock)
10051 ,@(package-native-inputs celery))))))
97e32948
CAW
10052
10053(define-public python-translitcodec
10054 (package
10055 (name "python-translitcodec")
10056 (version "0.4.0")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "translitcodec" version))
10061 (sha256
10062 (base32
10063 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10064 (build-system python-build-system)
10065 (arguments
10066 `(#:tests? #f)) ; no tests provided
10067 (home-page
10068 "https://github.com/claudep/translitcodec")
10069 (synopsis
10070 "Unicode to 8-bit charset transliteration codec")
10071 (description
10072 "This package contains codecs for transliterating ISO 10646 texts into
10073best-effort representations using smaller coded character sets (ASCII,
10074ISO 8859, etc.).")
f210e944 10075 (license license:expat)))
97e32948
CAW
10076
10077(define-public python2-translitcodec
f210e944 10078 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10079
10080(define-public python-editor
10081 (package
10082 (name "python-editor")
10083 (version "0.5")
10084 (source
10085 (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "python-editor" version))
10088 (sha256
10089 (base32
10090 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10091 (build-system python-build-system)
10092 (home-page
10093 "https://github.com/fmoo/python-editor")
10094 (synopsis
10095 "Programmatically open an editor, capture the result")
10096 (description
10097 "python-editor is a library that provides the editor module for
10098programmatically interfacing with your system's $EDITOR.")
f210e944 10099 (license license:asl2.0)))
0c3b90d4
CAW
10100
10101(define-public python2-editor
f210e944 10102 (package-with-python2 python-editor))
3276517c
LF
10103
10104(define-public python-sphinxcontrib-programoutput
10105 (package
10106 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10107 (version "0.10")
3276517c
LF
10108 (source (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10111 (sha256
10112 (base32
b9ce9eca 10113 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10114 (build-system python-build-system)
e2cb140e
MB
10115 (arguments
10116 ;; FIXME: Many tests are failing and the upstream is gone.
10117 '(#:tests? #f))
3276517c 10118 (propagated-inputs
a0a09859 10119 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10120 (synopsis "Sphinx extension to include program output")
10121 (description "A Sphinx extension to literally insert the output of arbitrary
10122commands into documents, helping you to keep your command examples up to date.")
10123 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10124 (license license:bsd-2)))
3276517c
LF
10125
10126(define-public python2-sphinxcontrib-programoutput
f210e944 10127 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10128
10129(define-public python-sphinx-repoze-autointerface
10130 (package
10131 (name "python-sphinx-repoze-autointerface")
328ae341 10132 (version "0.8")
548d7165
LF
10133 (source (origin
10134 (method url-fetch)
10135 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10136 (sha256
10137 (base32
328ae341 10138 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10139 (build-system python-build-system)
5b3c3d4b 10140 (arguments '(#:tests? #f)) ; No tests.
548d7165 10141 (propagated-inputs
47c7dc4a 10142 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10143 ("python-zope-interface" ,python-zope-interface)))
10144 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10145 (description "This package defines an extension for the Sphinx documentation
10146system. The extension allows generation of API documentation by
10147introspection of @code{zope.interface} instances in code.")
10148 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10149 (license license:repoze)))
548d7165
LF
10150
10151(define-public python2-sphinx-repoze-autointerface
10152 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10153
10154(define-public python-psycopg2
10155 (package
10156 (name "python-psycopg2")
8e718963 10157 (version "2.6.2")
b31fbea5
DM
10158 (source
10159 (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "psycopg2" version))
10162 (sha256
10163 (base32
8e718963 10164 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10165 (build-system python-build-system)
10166 (arguments
10167 ;; Tests would require a postgresql database "psycopg2_test"
10168 ;; and a running postgresql database management service.
10169 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10170 (inputs
10171 `(("postgresql" ,postgresql))) ; libpq
10172 (home-page "http://initd.org/psycopg/")
10173 (synopsis "Python PostgreSQL adapter")
10174 (description
10175 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10176 (license license:lgpl3+)))
b31fbea5
DM
10177
10178(define-public python2-psycopg2
f210e944 10179 (package-with-python2 python-psycopg2))
eed1a61f
LF
10180
10181(define-public python-vobject
10182 (package
10183 (name "python-vobject")
9bed9b15 10184 (version "0.9.2")
eed1a61f
LF
10185 (source (origin
10186 (method url-fetch)
10187 (uri (pypi-uri "vobject" version))
10188 (sha256
10189 (base32
9bed9b15 10190 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 10191 (build-system python-build-system)
a9871b7b
LF
10192 (arguments
10193 '(;; The test suite relies on some non-portable Windows interfaces.
10194 #:tests? #f))
f22efa01 10195 (propagated-inputs
22d7360b 10196 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10197 ("python-pyicu" ,python-pyicu)))
10198 (synopsis "Parse and generate vCard and vCalendar files")
10199 (description "Vobject is intended to be a full featured Python package for
10200parsing and generating vCard and vCalendar files. Currently, iCalendar files
10201are supported and well tested. vCard 3.0 files are supported, and all data
10202should be imported, but only a few components are understood in a sophisticated
10203way.")
10204 (home-page "http://eventable.github.io/vobject/")
f210e944 10205 (license license:asl2.0)))
eed1a61f
LF
10206
10207(define-public python2-vobject
f210e944 10208 (package-with-python2 python-vobject))
cedac813
LF
10209
10210(define-public python-munkres
10211 (package
10212 (name "python-munkres")
38e81a2c 10213 (version "1.0.8")
cedac813
LF
10214 (source (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "munkres" version))
10217 (sha256
10218 (base32
38e81a2c 10219 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10220 (build-system python-build-system)
10221 (arguments
10222 '(#:tests? #f)) ; no test suite
10223 (home-page "http://software.clapper.org/munkres/")
10224 (synopsis "Implementation of the Munkres algorithm")
10225 (description "The Munkres module provides an implementation of the Munkres
10226algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10227useful for solving the Assignment Problem.")
3f641af0 10228 (license license:bsd-3)))
cedac813
LF
10229
10230(define-public python2-munkres
10231 (package-with-python2 python-munkres))
f3b3d78f
LF
10232
10233(define-public python-flask
10234 (package
10235 (name "python-flask")
c6c80104 10236 (version "0.11.1")
f3b3d78f
LF
10237 (source (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "Flask" version))
10240 (sha256
10241 (base32
c6c80104 10242 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10243 (build-system python-build-system)
10244 (propagated-inputs
10245 `(("python-itsdangerous" ,python-itsdangerous)
10246 ("python-jinja2" ,python-jinja2)
8f35c030 10247 ("python-click" ,python-click)
f3b3d78f
LF
10248 ("python-werkzeug" ,python-werkzeug)))
10249 (home-page "https://github.com/mitsuhiko/flask/")
10250 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10251 (description "Flask is a micro web framework based on the Werkzeug toolkit
10252and Jinja2 template engine. It is called a micro framework because it does not
10253presume or force a developer to use a particular tool or library.")
f210e944 10254 (license license:bsd-3)))
f3b3d78f
LF
10255
10256(define-public python2-flask
f210e944 10257 (package-with-python2 python-flask))
603d665b 10258
a7ad802b 10259(define-public python-flask-wtf
10260 (package
10261 (name "python-flask-wtf")
10262 (version "0.13.1")
10263 (source
10264 (origin
10265 (method url-fetch)
10266 (uri (pypi-uri "Flask-WTF" version))
10267 (sha256
10268 (base32
10269 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10270 (build-system python-build-system)
d296d300
MB
10271 (arguments
10272 '(#:phases
10273 (modify-phases %standard-phases
10274 (add-before 'check 'drop-failing-test
10275 (lambda _
10276 ;; FIXME: This file tries resolving an external server, which
10277 ;; fails. Try to patch out the offending section instead of
10278 ;; deleting the whole thing.
10279 (delete-file "tests/test_recaptcha.py")
10280 #t)))))
a7ad802b 10281 (propagated-inputs
10282 `(("python-flask-babel" ,python-flask-babel)
10283 ("python-babel" ,python-babel)
10284 ("python-wtforms" ,python-wtforms)))
10285 (native-inputs
10286 `(("python-nose" ,python-nose)))
10287 (home-page "https://github.com/lepture/flask-wtf")
10288 (synopsis "Simple integration of Flask and WTForms")
10289 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10290upload, and reCAPTCHA.")
10291 (license license:bsd-3)))
10292
10293(define-public python2-flask-wtf
10294 (package-with-python2 python-flask-wtf))
10295
a2c7d88e 10296(define-public python-flask-multistatic
10297 (package
10298 (name "python-flask-multistatic")
10299 (version "1.0")
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "flask-multistatic" version))
10304 (sha256
10305 (base32
10306 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10307 (build-system python-build-system)
10308 (propagated-inputs
10309 `(("python-flask" ,python-flask)))
10310 (home-page "https://pagure.io/flask-multistatic")
10311 (synopsis "Flask plugin to allow overriding static files")
10312 (description "@code{flask-multistatic} is a flask plugin that adds support
10313for overriding static files.")
10314 (license license:gpl3+)))
10315
10316(define-public python2-flask-multistatic
10317 (package-with-python2 python-flask-multistatic))
10318
603d665b
LF
10319(define-public python-cookies
10320 (package
10321 (name "python-cookies")
10322 (version "2.2.1")
10323 (source (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "cookies" version))
10326 (sha256
10327 (base32
10328 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10329 (build-system python-build-system)
10330 (arguments
10331 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10332 #:tests? #f))
10333 (native-inputs
10334 `(("python-pytest" ,python2-pytest)))
10335 (synopsis "HTTP cookie parser and renderer")
10336 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10337Python.")
10338 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10339 (license license:expat)))
603d665b
LF
10340
10341(define-public python2-cookies
f210e944 10342 (package-with-python2 python-cookies))
0efde7d6
LF
10343
10344(define-public python-responses
10345 (package
10346 (name "python-responses")
10347 (version "0.5.1")
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "responses" version))
10351 (sha256
10352 (base32
10353 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10354 (build-system python-build-system)
10355 (arguments
10356 `(;; Test suite is not distributed:
10357 ;; https://github.com/getsentry/responses/issues/38
10358 #:tests? #f))
10359 (native-inputs
d8ea5f2f 10360 `(("python-mock" ,python-mock)))
0efde7d6
LF
10361 (propagated-inputs
10362 `(("python-requests" ,python-requests)
d8ea5f2f 10363 ("python-cookies" ,python-cookies)
0efde7d6
LF
10364 ("python-six" ,python-six)))
10365 (home-page "https://github.com/getsentry/responses")
10366 (synopsis "Utility for mocking out the `requests` Python library")
10367 (description "A utility library for mocking out the `requests` Python
10368library.")
f210e944 10369 (license license:asl2.0)))
0efde7d6
LF
10370
10371(define-public python2-responses
f210e944 10372 (package-with-python2 python-responses))
76b94885 10373
b7afd018
RW
10374(define-public python-whoosh
10375 (package
10376 (name "python-whoosh")
10377 (version "2.7.4")
10378 (source
10379 (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "Whoosh" version))
10382 (sha256
10383 (base32
10384 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10385 (build-system python-build-system)
10386 (native-inputs
f3b98f4f 10387 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10388 (home-page "http://bitbucket.org/mchaput/whoosh")
10389 (synopsis "Full text indexing, search, and spell checking library")
10390 (description
10391 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10392checking library.")
10393 (license license:bsd-2)))
10394
10395(define-public python2-whoosh
10396 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10397 (package (inherit whoosh)
10398 (propagated-inputs
10399 `(("python2-backport-ssl-match-hostname"
10400 ,python2-backport-ssl-match-hostname)
10401 ,@(package-propagated-inputs whoosh))))))
10402
76b94885
LF
10403(define-public python-pathlib
10404 (package
10405 (name "python-pathlib")
10406 (version "1.0.1")
10407 (source (origin
10408 (method url-fetch)
10409 (uri (pypi-uri "pathlib" version))
10410 (sha256
10411 (base32
10412 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10413 (build-system python-build-system)
92a312dc
RW
10414 ;; The tests depend on the internal "test" module, which does not provide
10415 ;; a stable interface.
10416 (arguments `(#:tests? #f))
76b94885 10417 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10418 (synopsis "Object-oriented file system paths")
10419 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10420It offers the following advantages over using string objects:
10421
10422@enumerate
10423@item No more cumbersome use of os and os.path functions. Everything can
10424be done easily through operators, attribute accesses, and method calls.
10425@item Embodies the semantics of different path types. For example,
10426comparing Windows paths ignores casing.
10427@item Well-defined semantics, eliminating any inconsistencies or
10428ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10429@end enumerate
10430
10431Note: In Python 3.4, pathlib is now part of the standard library. For other
10432Python versions please consider python-pathlib2 instead, which tracks the
10433standard library module. This module (python-pathlib) isn't maintained
10434anymore.")
76b94885
LF
10435 (license license:expat)))
10436
10437(define-public python2-pathlib
10438 (package-with-python2 python-pathlib))
25a7db0a 10439
b7703c81
HG
10440(define-public python2-pathlib2
10441 (package
10442 (name "python2-pathlib2")
10443 (version "2.1.0")
10444 (source (origin
10445 (method url-fetch)
10446 (uri (pypi-uri "pathlib2" version))
10447 (sha256
10448 (base32
10449 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10450 (build-system python-build-system)
49a531f5
HG
10451 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10452 ;; version is 3.4 which already includes this package as part of the
10453 ;; standard library.
b7703c81
HG
10454 (arguments
10455 `(#:python ,python-2))
10456 (native-inputs
f3b98f4f 10457 `(("python2-six" ,python2-six)))
b7703c81
HG
10458 (home-page "http://pypi.python.org/pypi/pathlib2/")
10459 (synopsis "Object-oriented file system paths - backport of standard
10460pathlib module")
10461 (description "The goal of pathlib2 is to provide a backport of standard
10462pathlib module which tracks the standard library module, so all the newest
10463features of the standard pathlib can be used also on older Python versions.
10464
10465Pathlib offers a set of classes to handle file system paths. It offers the
10466following advantages over using string objects:
10467
10468@enumerate
10469@item No more cumbersome use of os and os.path functions. Everything can
10470be done easily through operators, attribute accesses, and method calls.
10471@item Embodies the semantics of different path types. For example,
10472comparing Windows paths ignores casing.
10473@item Well-defined semantics, eliminating any inconsistencies or
10474ambiguities (forward vs. backward slashes, etc.).
10475@end enumerate")
10476 (license license:expat)))
10477
25a7db0a
LF
10478(define-public python-jellyfish
10479 (package
10480 (name "python-jellyfish")
8c4964dd 10481 (version "0.5.6")
25a7db0a
LF
10482 (source (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "jellyfish" version))
10485 (sha256
10486 (base32
8c4964dd 10487 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10488 (build-system python-build-system)
10489 (native-inputs
10490 `(("python-pytest" ,python-pytest)))
10491 (home-page "https://github.com/jamesturk/jellyfish")
10492 (synopsis "Approximate and phonetic matching of strings")
10493 (description "Jellyfish uses a variety of string comparison and phonetic
10494encoding algorithms to do fuzzy string matching.")
3f641af0 10495 (license license:bsd-2)
25a7db0a
LF
10496 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10497
10498(define-public python2-jellyfish
10499 (let ((jellyfish (package-with-python2
10500 (strip-python2-variant python-jellyfish))))
10501 (package (inherit jellyfish)
00e10c6e 10502 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10503 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10504
10505(define-public python2-unicodecsv
10506 (package
10507 (name "python2-unicodecsv")
10508 (version "0.14.1")
10509 (source (origin
10510 (method url-fetch)
10511 ;; The test suite is not included in the PyPi release.
10512 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10513 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10514 "archive/" version ".tar.gz"))
10515 (file-name (string-append name "-" version ".tar.gz"))
10516 (sha256
10517 (base32
10518 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10519 (build-system python-build-system)
10520 (arguments
10521 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10522 #:python ,python-2))
10523 (native-inputs
f3b98f4f 10524 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10525 (home-page "https://github.com/jdunck/python-unicodecsv")
10526 (synopsis "Unicode CSV module for Python 2")
10527 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10528module, adding support for Unicode strings.")
3f641af0 10529 (license license:bsd-2)))
064503aa
LF
10530
10531(define-public python-rarfile
10532 (package
10533 (name "python-rarfile")
67824447 10534 (version "2.8")
064503aa
LF
10535 (source (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "rarfile" version))
10538 (sha256
10539 (base32
67824447 10540 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10541 (build-system python-build-system)
10542 (arguments
10543 '(#:phases
10544 (modify-phases %standard-phases
10545 (replace 'check
10546 ;; Many tests fail, but the installation proceeds.
10547 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10548 (native-inputs
10549 `(("which" ,which))) ; required for tests
10550 (propagated-inputs
10551 `(("libarchive" ,libarchive)))
10552 (home-page "https://github.com/markokr/rarfile")
10553 (synopsis "RAR archive reader for Python")
10554 (description "This is Python module for RAR archive reading. The interface
10555is made as zipfile like as possible.")
3f641af0 10556 (license license:isc)))
064503aa
LF
10557
10558(define-public python2-rarfile
10559 (package-with-python2 python-rarfile))
daeeea71
CM
10560
10561(define-public python-magic
10562 (package
10563 (name "python-magic")
10564 (version "0.4.3")
10565 (source
10566 (origin
10567 (method url-fetch)
10568 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10569 version ".tar.gz"))
10570 (sha256
10571 (base32
10572 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10573 (file-name (string-append name "-" version "-checkout"))))
10574 (build-system python-build-system)
10575 (arguments
10576 ;; The tests are unreliable, so don't run them. The tests fail
10577 ;; under Python3 because they were written for Python2 and
10578 ;; contain import statements that do not work in Python3. One of
10579 ;; the tests fails under Python2 because its assertions are
10580 ;; overly stringent; it relies on comparing output strings which
10581 ;; are brittle and can change depending on the version of
10582 ;; libmagic being used and the system on which the test is
10583 ;; running. In my case, under GuixSD 0.10.0, only one test
10584 ;; failed, and it seems to have failed only because the version
10585 ;; of libmagic that is packaged in Guix outputs a slightly
10586 ;; different (but not wrong) string than the one that the test
10587 ;; expected.
10588 '(#:tests? #f
10589 #:phases (modify-phases %standard-phases
10590 ;; Replace a specific method call with a hard-coded
10591 ;; path to the necessary libmagic.so file in the
10592 ;; store. If we don't do this, then the method call
10593 ;; will fail to find the libmagic.so file, which in
10594 ;; turn will cause any application using
10595 ;; python-magic to fail.
10596 (add-before 'build 'hard-code-path-to-libmagic
10597 (lambda* (#:key inputs #:allow-other-keys)
10598 (let ((file (assoc-ref inputs "file")))
10599 (substitute* "magic.py"
10600 (("ctypes.util.find_library\\('magic'\\)")
10601 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10602 #t)))
10603 (add-before 'install 'disable-egg-compression
10604 (lambda _
10605 (let ((port (open-file "setup.cfg" "a")))
10606 (display "\n[easy_install]\nzip_ok = 0\n"
10607 port)
10608 (close-port port)
10609 #t))))))
daeeea71
CM
10610 (inputs
10611 ;; python-magic needs to be able to find libmagic.so.
10612 `(("file" ,file)))
10613 (home-page "https://github.com/ahupp/python-magic")
10614 (synopsis "File type identification using libmagic")
10615 (description
10616 "This module uses ctypes to access the libmagic file type
10617identification library. It makes use of the local magic database and
10618supports both textual and MIME-type output. Note that this module and
10619the python-file module both provide a \"magic.py\" file; these two
10620modules, which are different and were developed separately, both serve
10621the same purpose: to provide Python bindings for libmagic.")
10622 (license license:expat)))
10623
10624(define-public python2-magic
10625 (package-with-python2 python-magic))
12af303f
CM
10626
10627(define-public python2-s3cmd
10628 (package
10629 (name "python2-s3cmd")
10630 (version "1.6.1")
10631 (source
10632 (origin
10633 (method url-fetch)
de67e922 10634 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10635 "s3cmd-" version ".tar.gz"))
10636 (sha256
10637 (base32
10638 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10639 (build-system python-build-system)
10640 (arguments
10641 ;; s3cmd is written for python2 only and contains no tests.
10642 `(#:python ,python-2
10643 #:tests? #f))
f22efa01 10644 (propagated-inputs
12af303f
CM
10645 `(("python2-dateutil" ,python2-dateutil)
10646 ;; The python-file package also provides a magic.py module.
10647 ;; This is an unfortunate state of affairs; however, s3cmd
10648 ;; fails to install if it cannot find specifically the
10649 ;; python-magic package. Thus we include it, instead of using
10650 ;; python-file. Ironically, s3cmd sometimes works better
10651 ;; without libmagic bindings at all:
10652 ;; https://github.com/s3tools/s3cmd/issues/198
10653 ("python2-magic" ,python2-magic)))
10654 (home-page "http://s3tools.org/s3cmd")
10655 (synopsis "Command line tool for S3-compatible storage services")
10656 (description
10657 "S3cmd is a command line tool for uploading, retrieving and managing data
10658in storage services that are compatible with the Amazon Simple Storage
10659Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10660GnuPG encryption, and more. It also supports management of Amazon's
10661CloudFront content delivery network.")
3f641af0 10662 (license license:gpl2+)))
4323a5f0
AE
10663
10664(define-public python-pkgconfig
10665 (package
10666 (name "python-pkgconfig")
10667 (version "1.1.0")
10668 (source
10669 (origin
10670 (method url-fetch)
10671 (uri (pypi-uri "pkgconfig" version))
10672 (sha256
10673 (base32
10674 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10675 (build-system python-build-system)
10676 (native-inputs
f3b98f4f 10677 `(("python-nose" ,python-nose)))
4323a5f0
AE
10678 (inputs
10679 `(("pkg-config" ,pkg-config)))
10680 (arguments
10681 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10682 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10683 #:tests? #f
4323a5f0
AE
10684 ;; Hard-code the path to pkg-config.
10685 #:phases
10686 (modify-phases %standard-phases
10687 (add-before
10688 'build 'patch
10689 (lambda _
10690 (substitute* "pkgconfig/pkgconfig.py"
10691 (("cmd = 'pkg-config")
10692 (string-append "cmd = '" (which "pkg-config"))))
10693 #t)))))
7bf837fd 10694 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
10695 (synopsis "Python interface for pkg-config")
10696 (description "This module provides a Python interface to pkg-config. It
10697can be used to find all pkg-config packages, check if a package exists,
10698check if a package meets certain version requirements, query CFLAGS and
10699LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10700 (license license:expat)))
4323a5f0
AE
10701
10702(define-public python2-pkgconfig
10703 (package-with-python2 python-pkgconfig))
10704
2e697322
BW
10705(define-public python-bz2file
10706 (package
10707 (name "python-bz2file")
10708 (version "0.98")
10709 (source
10710 (origin
10711 (method url-fetch)
10712 (uri (pypi-uri "bz2file" version))
10713 (sha256
10714 (base32
10715 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10716 (build-system python-build-system)
10717 (arguments
124df723 10718 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10719 (home-page "https://github.com/nvawda/bz2file")
10720 (synopsis "Read and write bzip2-compressed files")
10721 (description
10722 "Bz2file is a Python library for reading and writing bzip2-compressed
10723files. It contains a drop-in replacement for the I/O interface in the
10724standard library's @code{bz2} module, including features from the latest
10725development version of CPython that are not available in older releases.")
3f641af0 10726 (license license:asl2.0)
2e697322
BW
10727 (properties `((python2-variant . ,(delay python2-bz2file))))))
10728
10729(define-public python2-bz2file
10730 (let ((base (package-with-python2
10731 (strip-python2-variant python-bz2file))))
10732 (package
10733 (inherit base)
124df723 10734 (arguments
752bb447
BW
10735 `(#:python ,python-2
10736 #:phases
124df723
BW
10737 (modify-phases %standard-phases
10738 ;; 'python setup.py test' does not work as of 0.98.
10739 ;; There is only the one test file, so we run it directly.
10740 (replace 'check
10741 (lambda _ (zero? (system* "python"
10742 "test_bz2file.py"))))))))))
2e697322 10743
da4ac1aa
BW
10744(define-public python-future
10745 (package
10746 (name "python-future")
c522f57e 10747 (version "0.16.0")
da4ac1aa
BW
10748 (source
10749 (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "future" version))
10752 (sha256
10753 (base32
c522f57e 10754 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
da4ac1aa
BW
10755 (build-system python-build-system)
10756 ;; Many tests connect to the network or are otherwise flawed.
10757 ;; https://github.com/PythonCharmers/python-future/issues/210
10758 (arguments
10759 `(#:tests? #f))
10760 (home-page "http://python-future.org")
10761 (synopsis "Single-source support for Python 3 and 2")
10762 (description
10763 "@code{python-future} is the missing compatibility layer between Python 2 and
10764Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10765to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10766 (license license:expat)))
da4ac1aa
BW
10767
10768(define-public python2-future
f210e944 10769 (package-with-python2 python-future))
da4ac1aa 10770
8e451885
AE
10771(define-public python-cysignals
10772 (package
10773 (name "python-cysignals")
10774 (version "1.1.0")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10779 (sha256
10780 (base32
10781 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10782 (build-system python-build-system)
10783 (native-inputs
10784 `(("python-cython" ,python-cython)
8e451885
AE
10785 ("python-sphinx" ,python-sphinx)))
10786 (inputs
10787 `(("pari-gp" ,pari-gp)))
10788 (arguments
10789 `(#:modules ((guix build python-build-system)
10790 ((guix build gnu-build-system) #:prefix gnu:)
10791 (guix build utils))
10792 ;; FIXME: Tests are executed after installation and currently fail
10793 ;; when not installing into standard locations; the author is working
10794 ;; on a fix.
10795 #:tests? #f
10796 #:phases
10797 (modify-phases %standard-phases
10798 (add-before
10799 'build 'configure
10800 (assoc-ref gnu:%standard-phases 'configure)))))
10801 (home-page
10802 "https://github.com/sagemath/cysignals")
10803 (synopsis
10804 "Handling of interrupts and signals for Cython")
10805 (description
10806 "The cysignals package provides mechanisms to handle interrupts (and
10807other signals and errors) in Cython code, using two related approaches,
10808for mixed Cython/Python code or external C libraries and pure Cython code,
10809respectively.")
3f641af0 10810 (license license:lgpl3+)))
8e451885
AE
10811
10812(define-public python2-cysignals
10813 (package-with-python2 python-cysignals))
10814
63bcec71
DM
10815(define-public python2-shedskin
10816 (package
10817 (name "python2-shedskin")
10818 (version "0.9.4")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (string-append "https://github.com/shedskin/shedskin/"
10823 "releases/download/v" version
10824 "/shedskin-" version ".tgz"))
10825 (sha256
10826 (base32
10827 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10828 (build-system python-build-system)
10829 (arguments
10830 `(#:python ,python-2
10831 #:phases (modify-phases %standard-phases
10832 (add-after 'unpack 'fix-resulting-include-libs
10833 (lambda* (#:key inputs #:allow-other-keys)
10834 (let ((libgc (assoc-ref inputs "libgc"))
10835 (pcre (assoc-ref inputs "pcre")))
10836 (substitute* "shedskin/makefile.py"
10837 (("variable == 'CCFLAGS':[ ]*")
10838 (string-append "variable == 'CCFLAGS':\n"
10839 " line += ' -I " pcre "/include"
10840 " -I " libgc "/include'"))
10841 (("variable == 'LFLAGS':[ ]*")
10842 (string-append "variable == 'LFLAGS':\n"
10843 " line += ' -L" pcre "/lib"
10844 " -L " libgc "/lib'")))
10845 #t))))))
63bcec71
DM
10846 (inputs `(("pcre" ,pcre)
10847 ("libgc" ,libgc)))
10848 (home-page "https://shedskin.github.io/")
10849 (synopsis "Experimental Python-2 to C++ Compiler")
10850 (description (string-append "This is an experimental compiler for a subset of
10851Python. It generates C++ code and a Makefile."))
3f641af0 10852 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10853
10854(define-public python2-rope
10855 (package
10856 (name "python2-rope")
10857 (version "0.10.3")
10858 (source
10859 (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "rope" version))
10862 (sha256
10863 (base32
10864 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10865 (arguments
10866 ;; Rope is currently python-2 only.
10867 ;; https://github.com/python-rope/rope/issues/57
10868 `(#:python ,python-2))
10869 (build-system python-build-system)
10870 (native-inputs
f3b98f4f 10871 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10872 (home-page "https://github.com/python-rope/rope")
10873 (synopsis "Refactoring library for Python")
10874 (description "Rope is a refactoring library for Python. It facilitates
10875the renaming, moving and extracting of attributes, functions, modules, fields
10876and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 10877to occurrences in strings and comments.")
3f641af0 10878 (license license:gpl2)))
6ba8ca17
10879
10880(define-public python-py3status
10881 (package
10882 (name "python-py3status")
d2262d70 10883 (version "3.1")
6ba8ca17
10884 (source
10885 (origin
10886 (method url-fetch)
10887 (uri (pypi-uri "py3status" version))
10888 (sha256
10889 (base32
d2262d70 10890 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10891 (build-system python-build-system)
8653c1d5
MB
10892 (arguments
10893 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10894 (home-page "https://github.com/ultrabug/py3status")
10895 (synopsis "Extensible i3status wrapper written in Python")
10896 (description "py3status is an i3status wrapper which extends i3status
10897functionality in a modular way, allowing you to extend your panel with your
10898own code, responding to click events and updating clock every second.")
3f641af0 10899 (license license:bsd-3)))
b8fdbca3
HG
10900
10901(define-public python-tblib
10902 (package
10903 (name "python-tblib")
10904 (version "1.3.0")
10905 (source (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "tblib" version))
10908 (sha256 (base32
10909 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10910 (build-system python-build-system)
10911 (arguments
10912 `(#:phases
10913 (modify-phases %standard-phases
10914 (replace 'check
10915 (lambda _
10916 ;; Upstream runs tests after installation and the package itself
10917 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10918 ;; found.
10919 (setenv "PYTHONPATH"
10920 (string-append (getcwd) "/build/lib:"
10921 (getenv "PYTHONPATH")))
10922 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10923 (native-inputs
10924 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10925 ("python-six" ,python-six)))
10926 (home-page "https://github.com/ionelmc/python-tblib")
10927 (synopsis "Traceback serialization library")
10928 (description
10929 "Traceback serialization allows you to:
10930
10931@enumerate
10932@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10933different processes. This allows better error handling when running code over
10934multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10935
10936@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10937@end enumerate\n")
3f641af0 10938 (license license:bsd-3)))
b8fdbca3
HG
10939
10940(define-public python2-tblib
10941 (package-with-python2 python-tblib))
1a024de4
HG
10942
10943(define-public python-sqlparse
10944 (package
10945 (name "python-sqlparse")
10946 (version "0.1.19")
10947 (source (origin
10948 (method url-fetch)
10949 (uri (pypi-uri "sqlparse" version))
10950 (sha256
10951 (base32
10952 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10953 (build-system python-build-system)
10954 (arguments
10955 `(#:phases
10956 (modify-phases %standard-phases
10957 (replace 'check
10958 (lambda* _
10959 ;; setup.py-integrated 2to3 only affects the build files, but
10960 ;; py.test is using the source files. So we need to convert them
10961 ;; manually.
10962 (when (zero? (system* "python3"))
10963 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10964 (zero? (system* "py.test")))))))
10965 (native-inputs
f3b98f4f 10966 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10967 (home-page "https://github.com/andialbrecht/sqlparse")
10968 (synopsis "Non-validating SQL parser")
10969 (description "Sqlparse is a non-validating SQL parser for Python. It
10970provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10971 (license license:bsd-3)))
1a024de4
HG
10972
10973(define-public python2-sqlparse
10974 (package-with-python2 python-sqlparse))
68b9d242
SB
10975
10976(define-public python-greenlet
10977 (package
10978 (name "python-greenlet")
1f89fb16 10979 (version "0.4.11")
68b9d242
SB
10980 (source (origin
10981 (method url-fetch)
10982 (uri (pypi-uri "greenlet" version))
10983 (sha256
10984 (base32
1f89fb16 10985 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10986 (build-system python-build-system)
68b9d242
SB
10987 (home-page "https://greenlet.readthedocs.io/")
10988 (synopsis "Lightweight in-process concurrent programming")
10989 (description
10990 "Greenlet package is a spin-off of Stackless, a version of CPython
10991that supports micro-threads called \"tasklets\". Tasklets run
10992pseudo-concurrently (typically in a single or a few OS-level threads) and
10993are synchronized with data exchanges on \"channels\".")
3f641af0 10994 (license (list license:psfl license:expat))))
68b9d242
SB
10995
10996(define-public python2-greenlet
10997 (package-with-python2 python-greenlet))
d79a343b
SB
10998
10999(define-public python-gevent
11000 (package
11001 (name "python-gevent")
11002 (version "1.1.1")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (pypi-uri "gevent" version))
11006 (sha256
11007 (base32
11008 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11009 (modules '((guix build utils)))
11010 (snippet
11011 '(begin
11012 ;; unbunding libev and c-ares
11013 (for-each delete-file-recursively '("libev" "c-ares"))
11014 ;; fixing testsuite
11015 (call-with-output-file "greentest/__init__.py" noop)
11016 (substitute* "greentest/testrunner.py"
11017 (("import util") "from . import util")
11018 (("from util import log") "from .util import log"))))))
11019 (build-system python-build-system)
11020 (propagated-inputs
11021 `(("python-greenlet" ,python-greenlet)))
11022 (native-inputs
f3b98f4f 11023 `(("python-six" ,python-six)))
d79a343b
SB
11024 (inputs
11025 `(("c-ares" ,c-ares)
11026 ("libev" ,libev)))
11027 (home-page "http://www.gevent.org/")
11028 (synopsis "Coroutine-based network library")
11029 (description
11030 "gevent is a coroutine-based Python networking library that uses greenlet
11031to provide a high-level synchronous API on top of the libev event loop.")
11032 (license license:expat)))
11033
11034(define-public python2-gevent
11035 (package-with-python2 python-gevent))
da3aeeb6 11036
c9a18125
MB
11037(define-public python-geventhttpclient
11038 (package
11039 (name "python-geventhttpclient")
11040 (version "1.3.1")
11041 (source (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "geventhttpclient" version))
11044 (sha256
11045 (base32
11046 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11047 (modules '((guix build utils)))
11048 (snippet
11049 '(begin
11050 ;; Delete pre-compiled files.
11051 (for-each delete-file (find-files "src/geventhttpclient"
11052 ".*\\.pyc"))
11053 #t))))
11054 (build-system python-build-system)
11055 (arguments
11056 '(#:phases
11057 (modify-phases %standard-phases
11058 (add-after 'unpack 'delete-network-tests
11059 (lambda _
11060 (delete-file "src/geventhttpclient/tests/test_client.py")
11061 #t))
11062 (delete 'check)
11063 (add-after 'install 'check
11064 (lambda* (#:key inputs outputs #:allow-other-keys)
11065 (add-installed-pythonpath inputs outputs)
11066 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11067 (native-inputs
11068 `(("python-pytest" ,python-pytest)))
11069 (propagated-inputs
11070 `(("python-certifi" ,python-certifi)
11071 ("python-gevent" ,python-gevent)
11072 ("python-six" ,python-six)))
11073 (home-page "https://github.com/gwik/geventhttpclient")
11074 (synopsis "HTTP client library for gevent")
11075 (description "@code{python-geventhttpclient} is a high performance,
11076concurrent HTTP client library for python using @code{gevent}.")
11077 (license license:expat)))
11078
11079(define-public python2-geventhttpclient
11080 (package-with-python2 python-geventhttpclient))
11081
b585e361
DM
11082(define-public python-fastimport
11083 (package
11084 (name "python-fastimport")
11085 (version "0.9.6")
11086 (source
11087 (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "fastimport" version))
11090 (sha256
11091 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11092 (build-system python-build-system)
11093 (home-page "https://github.com/jelmer/python-fastimport")
11094 (synopsis "VCS fastimport parser and generator in Python")
11095 (description "This package provides a parser for and generator of the Git
11096@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11097format.")
11098 (license license:gpl2+)))
11099
11100(define-public python2-fastimport
11101 (package-with-python2 python-fastimport))
11102
da3aeeb6
SB
11103(define-public python-twisted
11104 (package
11105 (name "python-twisted")
11106 (version "16.2.0")
11107 (source (origin
11108 (method url-fetch)
8ea8e8d3 11109 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11110 (sha256
11111 (base32
11112 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11113 (build-system python-build-system)
a960e73f
MB
11114 (arguments
11115 '(#:tests? #f)) ; FIXME: Some tests are failing.
11116 ;; #:phases
11117 ;; (modify-phases %standard-phases
11118 ;; (replace 'check
11119 ;; (lambda _
11120 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11121 (propagated-inputs
11122 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11123 (home-page "https://twistedmatrix.com/")
11124 (synopsis "Asynchronous networking framework written in Python")
11125 (description
11126 "Twisted is an extensible framework for Python programming, with special
11127focus on event-based network programming and multiprotocol integration.")
11128 (license license:expat)))
11129
11130(define-public python2-twisted
11131 (package-with-python2 python-twisted))
d0b6fed6 11132
4d3fa5a4
EF
11133(define-public python-pika
11134 (package
11135 (name "python-pika")
11136 (version "0.10.0")
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "pika" version))
11141 (sha256
11142 (base32
11143 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11144 (build-system python-build-system)
11145 (native-inputs
269d9172
LF
11146 `(("python-pyev" ,python-pyev)
11147 ("python-tornado" ,python-tornado)
11148 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11149 (home-page "https://pika.readthedocs.org")
11150 (synopsis "Pure Python AMQP Client Library")
11151 (description
11152 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11153Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11154network support library.")
11155 (license license:bsd-3)))
11156
11157(define-public python2-pika
11158 (package-with-python2 python-pika))
11159
d0b6fed6
DM
11160(define-public python-ply
11161 (package
11162 (name "python-ply")
234ade2d 11163 (version "3.9")
d0b6fed6
DM
11164 (source
11165 (origin
11166 (method url-fetch)
234ade2d 11167 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11168 (sha256
11169 (base32
234ade2d 11170 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11171 (build-system python-build-system)
11172 (home-page "http://www.dabeaz.com/ply/")
11173 (synopsis "Python Lex & Yacc")
11174 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11175It uses LR parsing and does extensive error checking.")
f210e944 11176 (license license:bsd-3)))
d0b6fed6
DM
11177
11178(define-public python2-ply
f210e944 11179 (package-with-python2 python-ply))
d951bd54
SB
11180
11181(define-public python-tabulate
11182 (package
11183 (name "python-tabulate")
e6ace98d 11184 (version "0.7.7")
d951bd54
SB
11185 (source (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "tabulate" version))
11188 (sha256
11189 (base32
fe2ba3a8 11190 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11191 (build-system python-build-system)
fe2ba3a8
MB
11192 (arguments
11193 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11194 ;; and the latest release is not tagged in the upstream repository.
11195 '(#:tests? #f))
d951bd54
SB
11196 (home-page "https://bitbucket.org/astanin/python-tabulate")
11197 (synopsis "Pretty-print tabular data")
11198 (description
11199 "Tabulate is a library and command-line utility to pretty-print tabular
11200data in Python.")
11201 (license license:expat)))
11202
11203(define-public python2-tabulate
11204 (package-with-python2 python-tabulate))
1c4c8a33
SB
11205
11206(define-public python-kazoo
11207 (package
11208 (name "python-kazoo")
11209 (version "2.2.1")
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "kazoo" version))
11214 (sha256
11215 (base32
11216 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11217 (build-system python-build-system)
11218 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11219 (propagated-inputs
11220 `(("python-six" ,python-six)))
1c4c8a33
SB
11221 (home-page "https://kazoo.readthedocs.org")
11222 (synopsis "High-level Zookeeper client library")
11223 (description
11224 "Kazoo is a Python client library for the Apache Zookeeper distributed
11225application service. It is designed to be easy to use and to avoid common
11226programming errors.")
3f641af0 11227 (license license:asl2.0)))
1c4c8a33
SB
11228
11229(define-public python2-kazoo
11230 (package-with-python2 python-kazoo))
45dda35e
SB
11231
11232(define-public python-pykafka
11233 (package
11234 (name "python-pykafka")
11235 (version "2.4.0")
11236 (source (origin
11237 (method url-fetch)
c6bccf71
EF
11238 (uri (string-append
11239 "https://pypi.python.org/packages/8b/3e/"
11240 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11241 "pykafka-" version ".tar.gz"))
45dda35e
SB
11242 (sha256
11243 (base32
11244 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11245 (build-system python-build-system)
11246 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11247 (propagated-inputs
45dda35e
SB
11248 `(("python-gevent" ,python-gevent)
11249 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11250 ("python-tabulate" ,python-tabulate)))
11251 (inputs
11252 `(("librdkafka" ,librdkafka)))
11253 (home-page "https://pykafka.readthedocs.io/")
11254 (synopsis "Apache Kafka client for Python")
11255 (description
11256 "PyKafka is a client for the Apache Kafka distributed messaging system.
11257It includes Python implementations of Kafka producers and consumers, which
11258are optionally backed by a C extension built on librdkafka.")
3f641af0 11259 (license license:asl2.0)))
45dda35e
SB
11260
11261(define-public python2-pykafka
11262 (package-with-python2 python-pykafka))
a44fd439
DM
11263
11264(define-public python-wcwidth
11265 (package
11266 (name "python-wcwidth")
9e59478f 11267 (version "0.1.7")
a44fd439
DM
11268 (source
11269 (origin
11270 (method url-fetch)
9e59478f 11271 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11272 (sha256
11273 (base32
9e59478f 11274 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11275 (build-system python-build-system)
11276 (home-page "https://github.com/jquast/wcwidth")
66e07664 11277 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11278 (description "Wcwidth measures the number of terminal column cells of
11279wide-character codes. It is useful for those implementing a terminal emulator,
11280or programs that carefully produce output to be interpreted by one. It is a
11281Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11282specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11283 (license license:expat)))
a44fd439
DM
11284
11285(define-public python2-wcwidth
f210e944 11286 (package-with-python2 python-wcwidth))
0de78c95
DP
11287
11288(define-public python2-jsonrpclib
11289 (package
11290 (name "python2-jsonrpclib")
11291 (version "0.1.7")
11292 (source (origin
11293 (method url-fetch)
11294 (uri (string-append
11295 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11296 "jsonrpclib-" version ".tar.gz"))
11297 (sha256
11298 (base32
11299 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11300 (build-system python-build-system)
0de78c95
DP
11301 (arguments
11302 `(#:tests? #f
11303 #:python ,python-2))
11304 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11305 (synopsis "Implementation of JSON-RPC specification for Python")
11306 (description
11307 "This library is an implementation of the JSON-RPC specification.
11308It supports both the original 1.0 specification, as well as the
11309new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11310etc.")
3f641af0 11311 (license license:asl2.0)))
9250b0f3
SB
11312
11313(define-public python-chai
11314 (package
11315 (name "python-chai")
11316 (version "1.1.1")
11317 (source (origin
11318 (method url-fetch)
11319 (uri (pypi-uri "chai" version))
11320 (sha256
11321 (base32
11322 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11323 (build-system python-build-system)
9250b0f3
SB
11324 (home-page "https://github.com/agoragames/chai")
11325 (synopsis "Mocking framework for Python")
11326 (description
11327 "Chai provides an api for mocking, stubbing and spying your python
11328objects, patterned after the Mocha library for Ruby.")
3f641af0 11329 (license license:bsd-3)))
9250b0f3
SB
11330
11331(define-public python2-chai
11332 (package-with-python2 python-chai))
11333
ae43baa8
SB
11334(define-public python-arrow
11335 (package
11336 (name "python-arrow")
11337 (version "0.8.0")
11338 (source (origin
11339 (method url-fetch)
11340 (uri (pypi-uri "arrow" version))
11341 (sha256
11342 (base32
11343 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11344 (build-system python-build-system)
11345 (native-inputs
f3b98f4f 11346 `(;; For testing
ae43baa8
SB
11347 ("python-chai" ,python-chai)
11348 ("python-simplejson" ,python-simplejson)))
36aed736 11349 (propagated-inputs
22d7360b 11350 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11351 (home-page "https://github.com/crsmithdev/arrow/")
11352 (synopsis "Dates and times for Python")
11353 (description
11354 "Arrow is a Python library to creating, manipulating, formatting and
11355converting dates, times, and timestamps. It implements and updates the
11356datetime type.")
3f641af0 11357 (license license:asl2.0)))
ae43baa8
SB
11358
11359(define-public python2-arrow
11360 (package-with-python2 python-arrow))
11361
1f2b62a4
SB
11362(define-public python-inflection
11363 (package
11364 (name "python-inflection")
11365 (version "0.3.1")
11366 (source
11367 (origin (method url-fetch)
11368 (uri (pypi-uri "inflection" version))
11369 (sha256
11370 (base32
11371 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11372 (build-system python-build-system)
e9127525
MB
11373 (native-inputs
11374 `(("python-pytest" ,python-pytest)))
7bf837fd 11375 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11376 (synopsis "Python string transformation library")
11377 (description
11378 "Inflection is a string transformation library. It singularizes
11379and pluralizes English words, and transforms strings from CamelCase to
11380underscored string.")
11381 (license license:expat)))
11382
11383(define-public python2-inflection
11384 (package-with-python2 python-inflection))
11385
18995566
SB
11386(define-public python-pylev
11387 (package
11388 (name "python-pylev")
11389 (version "1.3.0")
11390 (source (origin
11391 (method url-fetch)
11392 (uri (pypi-uri "pylev" version))
11393 (sha256
11394 (base32
11395 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11396 (build-system python-build-system)
7bf837fd 11397 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11398 (synopsis "Levenshtein distance implementation in Python")
11399 (description "Pure Python Levenshtein implementation, based off the
11400Wikipedia code samples at
11401@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11402 (license license:bsd-3)))
18995566
SB
11403
11404(define-public python2-pylev
11405 (package-with-python2 python-pylev))
11406
f5deff7a
SB
11407(define-public python-cleo
11408 (package
11409 (name "python-cleo")
11410 (version "0.4.1")
11411 (source (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "cleo" version))
11414 (sha256
11415 (base32
11416 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11417 (build-system python-build-system)
11418 (native-inputs
f3b98f4f 11419 `(;; For testing
f5deff7a
SB
11420 ("python-mock" ,python-mock)
11421 ("python-pytest" ,python-pytest)))
9403150a
SB
11422 (propagated-inputs
11423 `(("python-psutil" ,python-psutil)
11424 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11425 (home-page "https://github.com/sdispater/cleo")
11426 (synopsis "Command-line arguments library for Python")
11427 (description
11428 "Cleo allows you to create command-line commands with signature in
11429docstring and colored output.")
11430 (license license:expat)))
11431
11432(define-public python2-cleo
11433 (package-with-python2 python-cleo))
11434
77cadb43
SB
11435(define-public python-lazy-object-proxy
11436 (package
11437 (name "python-lazy-object-proxy")
11438 (version "1.2.2")
11439 (source (origin
11440 (method url-fetch)
11441 (uri (pypi-uri "lazy-object-proxy" version))
11442 (sha256
11443 (base32
11444 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11445 (build-system python-build-system)
77cadb43
SB
11446 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11447 (synopsis "Lazy object proxy for python")
11448 (description
11449 "Lazy object proxy is an object that wraps a callable but defers the call
11450until the object is actually required, and caches the result of said call.")
3f641af0 11451 (license license:bsd-2)))
77cadb43
SB
11452
11453(define-public python2-lazy-object-proxy
11454 (package-with-python2 python-lazy-object-proxy))
11455
5477e05f
SB
11456(define-public python-dnspython
11457 (package
11458 (name "python-dnspython")
6c514128 11459 (version "1.15.0")
5477e05f
SB
11460 (source (origin
11461 (method url-fetch)
11462 (uri (string-append "http://www.dnspython.org/kits/"
11463 version "/dnspython-" version ".tar.gz"))
11464 (sha256
11465 (base32
6c514128 11466 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11467 (build-system python-build-system)
11468 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11469 (home-page "http://www.dnspython.org")
11470 (synopsis "DNS toolkit for Python")
11471 (description
11472 "dnspython is a DNS toolkit for Python. It supports almost all record
11473types. It can be used for queries, zone transfers, and dynamic updates.
11474It supports TSIG authenticated messages and EDNS0.")
11475 (license license:expat)))
11476
11477(define-public python2-dnspython
11478 (package-with-python2 python-dnspython))
11479
22711e25
SB
11480(define-public python-email-validator
11481 (package
11482 (name "python-email-validator")
b165c215 11483 (version "1.0.2")
22711e25
SB
11484 (source
11485 (origin (method url-fetch)
11486 (uri (pypi-uri "email_validator" version))
11487 (sha256
11488 (base32
b165c215 11489 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11490 (build-system python-build-system)
11491 (arguments
11492 '(#:phases
11493 (modify-phases %standard-phases
11494 (add-before 'build 'use-dnspython
11495 (lambda _
11496 (substitute* "setup.py"
11497 (("dnspython3") "dnspython"))
11498 #t)))))
d42560bd 11499 (propagated-inputs
22711e25 11500 `(("python-dnspython" ,python-dnspython)
d42560bd 11501 ("python-idna" ,python-idna)))
22711e25
SB
11502 (home-page "https://github.com/JoshData/python-email-validator")
11503 (synopsis "Email address validation library for Python")
11504 (description
11505 "This library validates email address syntax and deliverability.")
3f641af0 11506 (license license:cc0)))
22711e25
SB
11507
11508(define-public python2-email-validator
11509 (package-with-python2 python-email-validator))
11510
8987d91e
SB
11511(define-public python-ukpostcodeparser
11512 (package
11513 (name "python-ukpostcodeparser")
11514 (version "1.0.3")
11515 (source (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "UkPostcodeParser" version))
11518 (sha256
11519 (base32
11520 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11521 (build-system python-build-system)
8987d91e
SB
11522 (home-page "https://github.com/hamstah/ukpostcodeparser")
11523 (synopsis "UK Postcode parser for Python")
11524 (description
11525 "This library provides the @code{parse_uk_postcode} function for
11526parsing UK postcodes.")
11527 (license license:expat)))
11528
11529(define-public python2-ukpostcodeparser
11530 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11531
ce7911dd
MB
11532(define-public python-faker
11533 (package
11534 (name "python-faker")
11535 (version "0.7.9")
11536 (source (origin
11537 (method url-fetch)
11538 (uri (pypi-uri "Faker" version))
11539 (sha256
11540 (base32
11541 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11542 (patches
11543 (search-patches "python-faker-fix-build-32bit.patch"))
11544 (modules '((guix build utils)))
11545 (snippet
11546 '(begin
11547 (for-each delete-file (find-files "." "\\.pyc$"))
11548 #t))))
11549 (build-system python-build-system)
11550 (arguments
11551 '(#:phases
11552 (modify-phases %standard-phases
11553 (replace 'check
11554 (lambda _
11555 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11556 (native-inputs
11557 `(;; For testing
11558 ("python-email-validator" ,python-email-validator)
11559 ("python-mock" ,python-mock)
11560 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11561 (propagated-inputs
11562 `(("python-dateutil" ,python-dateutil)
11563 ("python-six" ,python-six)))
11564 (home-page "https://github.com/joke2k/faker")
11565 (synopsis "Python package that generates fake data")
11566 (description
11567 "Faker is a Python package that generates fake data such as names,
11568addresses, and phone numbers.")
11569 (license license:expat)
11570 (properties `((python2-variant . ,(delay python2-faker))))))
11571
11572(define-public python2-faker
11573 (let ((base (package-with-python2 (strip-python2-variant
11574 python-faker))))
11575 (package
11576 (inherit base)
11577 (propagated-inputs
11578 `(("python2-ipaddress" ,python2-ipaddress)
11579 ,@(package-propagated-inputs base))))))
11580
ea92ae01
SB
11581(define-public python-fake-factory
11582 (package
11583 (name "python-fake-factory")
7adc698f 11584 (version "0.7.2")
ea92ae01
SB
11585 (source (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "fake-factory" version))
11588 (sha256
11589 (base32
42945fb5
MB
11590 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11591 (patches
11592 (search-patches
11593 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11594 (build-system python-build-system)
b7f3ea95
MB
11595 (arguments
11596 '(#:phases
11597 (modify-phases %standard-phases
11598 (replace 'check
11599 (lambda _
11600 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11601 (native-inputs
f3b98f4f 11602 `(;; For testing
ea92ae01
SB
11603 ("python-email-validator" ,python-email-validator)
11604 ("python-mock" ,python-mock)
11605 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11606 (propagated-inputs
22d7360b 11607 `(("python-dateutil" ,python-dateutil)
bbcd7297 11608 ("python-six" ,python-six)))
7adc698f 11609 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11610 (synopsis "Python package that generates fake data")
11611 (description
11612 "Faker is a Python package that generates fake data such as names,
11613addresses, and phone numbers.")
11614 (license license:expat)
ce7911dd
MB
11615 (properties `((python2-variant . ,(delay python2-fake-factory))
11616 (superseded . ,python-faker)))))
ea92ae01
SB
11617
11618(define-public python2-fake-factory
11619 (let ((base (package-with-python2 (strip-python2-variant
11620 python-fake-factory))))
11621 (package
11622 (inherit base)
ce7911dd 11623 (properties `((superseded . ,python2-faker)))
24c9aa18 11624 (propagated-inputs
ea92ae01 11625 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11626 ,@(package-propagated-inputs base))))))
ea92ae01 11627
b49504fd
SB
11628(define-public python-pyaml
11629 (package
11630 (name "python-pyaml")
11631 (version "15.8.2")
11632 (source (origin
11633 (method url-fetch)
11634 (uri (pypi-uri "pyaml" version))
11635 (sha256
11636 (base32
11637 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11638 (build-system python-build-system)
f620311a
MB
11639 (native-inputs
11640 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11641 (propagated-inputs
11642 `(("python-pyyaml" ,python-pyyaml)))
11643 (home-page "https://github.com/mk-fg/pretty-yaml")
11644 (synopsis "YAML pretty-print library for Python")
11645 (description
11646 "pyaml is a PyYAML based python module to produce pretty and readable
11647YAML-serialized data.")
3f641af0 11648 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11649
11650(define-public python2-pyaml
11651 (package-with-python2 python-pyaml))
11652
347175a2
SB
11653(define-public python-flexmock
11654 (package
11655 (name "python-flexmock")
11656 (version "0.10.2")
11657 (source (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "flexmock" version))
11660 (sha256
11661 (base32
11662 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11663 (build-system python-build-system)
347175a2
SB
11664 (home-page "https://flexmock.readthedocs.org")
11665 (synopsis "Testing library for Python")
11666 (description
11667 "flexmock is a testing library for Python that makes it easy to create
11668mocks, stubs and fakes.")
3f641af0 11669 (license license:bsd-3)))
347175a2
SB
11670
11671(define-public python2-flexmock
11672 (package-with-python2 python-flexmock))
11673
5a744191
SB
11674(define-public python-orator
11675 (package
11676 (name "python-orator")
11677 (version "0.8.2")
11678 (source (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "orator" version))
11681 (sha256
11682 (base32
11683 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11684 (build-system python-build-system)
11685 (arguments '(#:tests? #f)) ; no tests
b2676030 11686 (propagated-inputs
5a744191
SB
11687 `(("python-arrow" ,python-arrow)
11688 ("python-blinker" ,python-blinker)
11689 ("python-cleo" ,python-cleo)
ce7911dd 11690 ("python-faker" ,python-faker)
5a744191
SB
11691 ("python-inflection" ,python-inflection)
11692 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11693 ("python-pyaml" ,python-pyaml)
5a744191
SB
11694 ("python-simplejson" ,python-simplejson)
11695 ("python-wrapt" ,python-wrapt)))
11696 (home-page "https://orator-orm.com/")
11697 (synopsis "ActiveRecord ORM for Python")
11698 (description
11699 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11700implementation for Python.")
11701 (license license:expat)
11702 (properties `((python2-variant . ,(delay python2-orator))))))
11703
11704(define-public python2-orator
11705 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11706 (package
11707 (inherit base)
06961617 11708 (propagated-inputs
5a744191 11709 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11710 ,@(package-propagated-inputs base))))))
f4155188
DM
11711
11712(define-public python-prompt-toolkit
11713 (package
11714 (name "python-prompt-toolkit")
6a34f4cc 11715 (version "1.0.9")
f4155188
DM
11716 (source
11717 (origin
11718 (method url-fetch)
d15e2ef0 11719 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11720 (sha256
11721 (base32
6a34f4cc 11722 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11723 (build-system python-build-system)
bae18710
LF
11724 (arguments
11725 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11726 (propagated-inputs
11727 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11728 ("python-six" ,python-six)
f22efa01 11729 ("python-pygments" ,python-pygments)))
f4155188
DM
11730 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11731 (synopsis "Library for building command line interfaces in Python")
11732 (description
11733 "Prompt-Toolkit is a library for building interactive command line
11734interfaces in Python. It's like GNU Readline but it also features syntax
11735highlighting while typing, out-of-the-box multi-line input editing, advanced
11736code completion, incremental search, support for Chinese double-width
11737characters, mouse support, and auto suggestions.")
f210e944 11738 (license license:bsd-3)))
f4155188
DM
11739
11740(define-public python2-prompt-toolkit
f210e944 11741 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11742
11743(define-public python-jedi
11744 (package
11745 (name "python-jedi")
11746 (version "0.9.0")
11747 (source
11748 (origin
11749 (method url-fetch)
11750 (uri (pypi-uri "jedi" version))
11751 (sha256
11752 (base32
11753 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11754 (build-system python-build-system)
bfce8a34
MB
11755 (arguments
11756 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11757 '(#:tests? #f))
11758 (native-inputs
11759 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11760 (home-page "https://github.com/davidhalter/jedi")
11761 (synopsis
11762 "Autocompletion for Python that can be used for text editors")
11763 (description
11764 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11765 (license license:expat)))
a502dfbf
DM
11766
11767(define-public python2-jedi
f210e944 11768 (package-with-python2 python-jedi))
c2f0dc6e
DM
11769
11770(define-public ptpython
11771 (package
11772 (name "ptpython")
11773 (version "0.34")
11774 (source (origin
11775 (method url-fetch)
11776 (uri (pypi-uri "ptpython" version))
11777 (sha256
11778 (base32
11779 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11780 (build-system python-build-system)
32955348
MB
11781 (arguments
11782 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11783 (propagated-inputs
c2f0dc6e
DM
11784 `(("python-docopt" ,python-docopt)
11785 ("python-jedi" ,python-jedi)
11786 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11787 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11788 (home-page "https://github.com/jonathanslenders/ptpython")
11789 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11790 (description
11791 "ptpython is a Python read-eval-print loop with IDE-like features.
11792It supports syntax highlighting, multiline editing, autocompletion, mouse,
11793color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11794etc.")
3f641af0 11795 (license license:bsd-3)
c2f0dc6e
DM
11796 (properties `((python2-variant . ,(delay ptpython-2))))))
11797
11798(define-public ptpython-2
11799 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11800 (package
11801 (inherit base)
11802 (name "ptpython2"))))
b227f0be 11803
b04a52a6
DJ
11804(define-public python-requests-oauthlib
11805 (package
11806 (name "python-requests-oauthlib")
11807 (version "0.6.2")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "requests-oauthlib" version))
11812 (sha256
11813 (base32
11814 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11815 (build-system python-build-system)
11816 (arguments
11817 `(#:phases
11818 (modify-phases %standard-phases
11819 ;; removes tests that require network access
11820 (add-before 'check 'pre-check
11821 (lambda _
11822 (delete-file "tests/test_core.py")
11823 #t)))))
11824 (native-inputs
11825 `(("python-requests-mock" ,python-requests-mock)
11826 ("python-mock" ,python-mock)))
f22efa01 11827 (propagated-inputs
b04a52a6
DJ
11828 `(("python-oauthlib" ,python-oauthlib)
11829 ("python-requests" ,python-requests)))
11830 (home-page
11831 "https://github.com/requests/requests-oauthlib")
11832 (synopsis
11833 "OAuthlib authentication support for Requests")
11834 (description
11835 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11836provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11837 (license license:isc)))
b04a52a6
DJ
11838
11839(define-public python2-requests-oauthlib
f210e944 11840 (package-with-python2 python-requests-oauthlib))
b04a52a6 11841
b227f0be 11842(define-public python-stem
11843 (package
11844 (name "python-stem")
0bb1c35a 11845 (version "1.5.4")
b227f0be 11846 (source
11847 (origin
11848 (method url-fetch)
c976b319 11849 (uri (pypi-uri "stem" version))
b227f0be 11850 (sha256
11851 (base32
0bb1c35a 11852 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11853 (build-system python-build-system)
11854 (arguments
11855 `(#:phases
11856 (modify-phases %standard-phases
11857 (replace 'check
11858 (lambda _
11859 (zero? (system* "./run_tests.py" "--unit")))))))
11860 (native-inputs
11861 `(("python-mock" ,python-mock)
11862 ("python-pep8" ,python-pep8)
11863 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11864 (home-page "https://stem.torproject.org/")
11865 (synopsis
11866 "Python controller library that allows applications to interact with Tor")
11867 (description
11868 "Stem is a Python controller library for Tor. With it you can use Tor's
11869control protocol to script against the Tor process and read descriptor data
11870relays publish about themselves.")
3f641af0 11871 (license license:lgpl3)))
b227f0be 11872
11873(define-public python2-stem
11874 (package-with-python2 python-stem))
517a6c0c
DM
11875
11876(define-public python-pyserial
11877 (package
11878 (name "python-pyserial")
11879 (version "3.1.1")
11880 (source
11881 (origin
11882 (method url-fetch)
11883 (uri (pypi-uri "pyserial" version))
11884 (sha256
11885 (base32
11886 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11887 (build-system python-build-system)
0a702009
MB
11888 (arguments
11889 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11890 ;; #:phases
11891 ;; (modify-phases %standard-phases
11892 ;; (replace 'check
11893 ;; (lambda _
11894 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11895 (home-page
11896 "https://github.com/pyserial/pyserial")
11897 (synopsis "Python Serial Port Bindings")
11898 (description "@code{pyserial} provide serial port bindings for Python. It
11899supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11900and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11901 (license license:bsd-3)))
517a6c0c
DM
11902
11903(define-public python2-pyserial
f210e944 11904 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11905
11906(define-public python-kivy
11907 (package
11908 (name "python-kivy")
11909 (version "1.9.1")
11910 (source
11911 (origin
11912 (method url-fetch)
11913 (uri (pypi-uri "kivy" version))
11914 (file-name (string-append name "-" version ".tar.gz"))
11915 (sha256
11916 (base32
11917 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11918 (build-system python-build-system)
11919 (arguments
11920 `(#:tests? #f ; Tests require many optional packages
11921 #:phases
11922 (modify-phases %standard-phases
11923 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11924 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11925 (lambda* (#:key inputs #:allow-other-keys)
11926 (setenv "KIVY_SDL2_PATH"
11927 (string-append (assoc-ref inputs "sdl-union")
11928 "/include/SDL2"))
11929 #t)))))
11930 (native-inputs
f2516de2
HG
11931 `(("pkg-config" ,pkg-config)
11932 ("python-cython" ,python-cython)))
6eb7af2a 11933 (inputs
f2516de2 11934 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11935 ("mesa" ,mesa)
11936 ("sdl-union"
11937 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11938 (home-page "http://kivy.org")
11939 (synopsis
11940 "Multitouch application framework")
11941 (description
11942 "A software library for rapid development of
11943hardware-accelerated multitouch applications.")
11944 (license license:expat)))
11945
11946(define-public python2-kivy
11947 (package-with-python2 python-kivy))
11948
11949(define-public python-kivy-next
11950 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11951 (revision "1"))
11952 (package (inherit python-kivy)
11953 (name "python-kivy-next")
d80a71eb 11954 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11955 (string-take commit 7)))
11956 (source
11957 (origin
11958 (method git-fetch)
11959 (uri (git-reference
11960 (url "https://github.com/kivy/kivy")
11961 (commit commit)))
11962 (file-name (string-append name "-" version "-checkout"))
11963 (sha256
11964 (base32
11965 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11966
11967(define-public python2-kivy-next
11968 (package-with-python2 python-kivy-next))
8794bd8b
DC
11969
11970(define-public python-binaryornot
11971 (package
11972 (name "python-binaryornot")
11973 (version "0.4.0")
11974 (source (origin
11975 (method url-fetch)
11976 (uri (pypi-uri "binaryornot" version))
11977 (sha256
11978 (base32
11979 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11980 (build-system python-build-system)
f22efa01 11981 (propagated-inputs
8794bd8b
DC
11982 `(("python-chardet" ,python-chardet)
11983 ("python-hypothesis" ,python-hypothesis)))
11984 (home-page "https://github.com/audreyr/binaryornot")
11985 (synopsis "Package to check if a file is binary or text")
11986 (description "Ultra-lightweight pure Python package to check if a file is
11987binary or text.")
11988 (license license:bsd-3)
11989 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11990
11991(define-public python2-binaryornot
11992 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11993 (package (inherit base)
f22efa01 11994 (propagated-inputs
8794bd8b 11995 `(("python2-enum34" ,python2-enum34)
f22efa01 11996 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11997
11998(define-public python-nltk
11999 (package
12000 (name "python-nltk")
12001 (version "3.2.1")
12002 (source (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "nltk" version))
12005 (sha256
12006 (base32
12007 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12008 (build-system python-build-system)
59f12985
LF
12009 (arguments
12010 '(;; The tests require some extra resources to be downloaded.
12011 ;; TODO Try packaging these resources.
12012 #:tests? #f))
a9ac982a
DC
12013 (home-page "http://nltk.org/")
12014 (synopsis "Natural Language Toolkit")
12015 (description "It provides interfaces to over 50 corpora and lexical
12016resources such as WordNet, along with a suite of text processing libraries
12017for classification, tokenization, stemming, tagging, parsing, and semantic
12018reasoning, wrappers for natural language processing libraries.")
f210e944 12019 (license license:asl2.0)))
a9ac982a
DC
12020
12021(define-public python2-nltk
f210e944 12022 (package-with-python2 python-nltk))
691cd90d
DC
12023
12024(define-public python-pymongo
12025 (package
12026 (name "python-pymongo")
12027 (version "3.3.0")
12028 (source (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "pymongo" version))
12031 (sha256
12032 (base32
12033 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12034 (build-system python-build-system)
f22efa01 12035 (propagated-inputs
691cd90d 12036 `(("python-certifi" ,python-certifi)))
7bf837fd 12037 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12038 (synopsis "Python driver for MongoDB")
12039 (description "Python driver for MongoDB.")
f210e944 12040 (license license:asl2.0)))
691cd90d
DC
12041
12042(define-public python2-pymongo
f210e944 12043 (package-with-python2 python-pymongo))
6a6c9d43
DC
12044
12045(define-public python-sh
12046 (package
12047 (name "python-sh")
12048 (version "1.11")
12049 (source (origin
12050 (method url-fetch)
12051 (uri (pypi-uri "sh" version))
12052 (sha256
12053 (base32
12054 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12055 (build-system python-build-system)
12056 (arguments
12057 `(#:tests? #f)) ; no tests
12058 (home-page "https://github.com/amoffat/sh")
12059 (synopsis "Python subprocess interface")
12060 (description "Abstracts process invocation by providing a function
12061interface for programs.")
f210e944 12062 (license license:expat)))
6a6c9d43
DC
12063
12064(define-public python2-sh
f210e944 12065 (package-with-python2 python-sh))
05b59190 12066
25702397
EF
12067(define-public python-consul
12068 (package
12069 (name "python-consul")
12070 (version "0.6.1")
12071 (source
12072 (origin
12073 (method url-fetch)
12074 (uri (pypi-uri "python-consul" version))
12075 (sha256
12076 (base32
12077 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12078 (build-system python-build-system)
12079 (native-inputs
fd1d6de7
HG
12080 `(("python-pytest" ,python-pytest)))
12081 (propagated-inputs
12082 `(("python-requests" ,python-requests)
25702397
EF
12083 ("python-six" ,python-six)))
12084 (home-page "https://github.com/cablehead/python-consul")
12085 (synopsis "Python client for Consul")
12086 (description
12087 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12088discovery, monitoring and configuration.")
12089 (license license:expat)))
12090
12091(define-public python2-consul
f210e944 12092 (package-with-python2 python-consul))
25702397 12093
05b59190
DC
12094(define-public python-schematics
12095 (package
12096 (name "python-schematics")
12097 (version "1.1.1")
12098 (source
12099 (origin
12100 (method url-fetch)
12101 (uri (string-append
12102 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12103 (file-name (string-append name "-" version ".tar.gz"))
12104 (sha256
12105 (base32
12106 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12107 (build-system python-build-system)
f22efa01 12108 (propagated-inputs
05b59190
DC
12109 `(("python-six" ,python-six)))
12110 (arguments
12111 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12112 ; version requirements (eg python-coveralls)
12113 (home-page "https://github.com/schematics/schematics")
12114 (synopsis "Python Data Structures for Humans")
12115 (description "Python Data Structures for Humans.")
f210e944 12116 (license license:bsd-3)))
05b59190
DC
12117
12118(define-public python2-schematics
f210e944 12119 (package-with-python2 python-schematics))
d6907ff7
DC
12120
12121(define-public python-publicsuffix
12122 (package
12123 (name "python-publicsuffix")
12124 (version "1.1.0")
12125 (source (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "publicsuffix" version))
12128 (sha256
12129 (base32
12130 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12131 (build-system python-build-system)
12132 (arguments
12133 `(#:tests? #f)) ; tests use the internet
12134 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12135 (synopsis "Get suffix for a domain name")
12136 (description "Get a public suffix for a domain name using the Public Suffix
12137List.")
f210e944 12138 (license license:expat)))
d6907ff7
DC
12139
12140(define-public python2-publicsuffix
f210e944 12141 (package-with-python2 python-publicsuffix))
b2319996
DC
12142
12143(define-public python-publicsuffix2
12144 (package
12145 (name "python-publicsuffix2")
91862162 12146 (version "2.20160818")
b2319996
DC
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12151 (sha256
12152 (base32
91862162 12153 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12154 (build-system python-build-system)
10797a0a
LF
12155 (arguments
12156 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12157 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12158 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12159 (description "Get a public suffix for a domain name using the Public Suffix
12160List. Forked from and using the same API as the publicsuffix package.")
f210e944 12161 (license (list license:expat license:mpl2.0))))
b2319996
DC
12162
12163(define-public python2-publicsuffix2
f210e944 12164 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12165
12166(define-public python-url
12167 (package
12168 (name "python-url")
12169 (version "0.2.0")
12170 (source (origin
12171 (method url-fetch)
12172 (uri (pypi-uri "url" version))
12173 (sha256
12174 (base32
12175 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12176 (build-system python-build-system)
f22efa01 12177 (propagated-inputs
81f1515d
DC
12178 `(("python-publicsuffix" ,python-publicsuffix)))
12179 (native-inputs
12180 `(("python-coverage" ,python-coverage)
12181 ("python-nose" ,python-nose)))
12182 (arguments
12183 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12184 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12185 (synopsis "URL Parsing")
12186 (description "Library for parsing urls.")
12187 (license license:expat)
12188 (properties `((python2-variant . ,(delay python2-url))))))
12189
12190(define-public python2-url
12191 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12192 (package (inherit base)
f22efa01 12193 (propagated-inputs
f210e944 12194 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12195
12196(define-public python-freezegun
12197 (package
12198 (name "python-freezegun")
0c315fb3 12199 (version "0.3.8")
974ee2c1
TS
12200 (source
12201 (origin
12202 (method url-fetch)
12203 (uri (pypi-uri "freezegun" version))
12204 (sha256
12205 (base32
0c315fb3 12206 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12207 (build-system python-build-system)
12208 (native-inputs
12209 `(("python-mock" ,python-mock)
12210 ("python-nose" ,python-nose)
4e096968 12211 ("python-coverage" ,python-coverage)))
f22efa01 12212 (propagated-inputs
4e096968 12213 `(("python-six" ,python-six)
22d7360b 12214 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12215 (arguments
12216 `(#:phases (modify-phases %standard-phases
12217 ;; The tests are normally executed via `make test`, but the PyPi
12218 ;; package does not include the Makefile.
12219 (replace 'check
12220 (lambda _
12221 (zero? (system* "nosetests" "./tests/")))))))
12222 (home-page "https://github.com/spulec/freezegun")
12223 (synopsis "Test utility for mocking the datetime module")
12224 (description
12225 "FreezeGun is a library that allows your python tests to travel through
12226time by mocking the datetime module.")
12227 (license license:asl2.0)))
12228
12229(define-public python2-freezegun
f210e944
HG
12230 (package-with-python2 python-freezegun))
12231
dddcb25c
MB
12232
12233(define-public python-odfpy
12234 (package
12235 (name "python-odfpy")
12236 (version "1.3.3")
12237 (source (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "odfpy" version))
12240 (sha256
12241 (base32
12242 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12243 (arguments
12244 `(#:modules ((srfi srfi-1)
12245 (guix build python-build-system)
12246 (guix build utils))
12247 #:phases
12248 (modify-phases %standard-phases
12249 (replace 'check
12250 ;; The test runner invokes python2 and python3 for test*.py.
12251 ;; To avoid having both in inputs, we replicate it here.
12252 (lambda _
12253 (every (lambda (test-file)
12254 (zero? (system* "python" test-file)))
12255 (find-files "tests" "^test.*\\.py$")))))))
12256 (build-system python-build-system)
12257 (home-page "https://github.com/eea/odfpy")
12258 (synopsis "Python API and tools to manipulate OpenDocument files")
12259 (description "Collection of libraries and utility programs written in
12260Python to manipulate OpenDocument 1.2 files.")
12261 (license
12262 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12263 ;; number of files with other licenses.
12264 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12265
12266(define-public python2-odfpy
12267 (package-with-python2 python-odfpy))
b30565bd
MB
12268
12269(define-public python-cachecontrol
12270 (package
12271 (name "python-cachecontrol")
12272 (version "0.11.6")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 ;; Pypi does not have tests.
12277 (uri (string-append
12278 "https://github.com/ionrock/cachecontrol/archive/v"
12279 version ".tar.gz"))
12280 (file-name (string-append name "-" version ".tar.gz"))
12281 (sha256
12282 (base32
12283 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12284 (build-system python-build-system)
12285 (arguments
12286 `(#:phases
12287 (modify-phases %standard-phases
12288 (replace 'check
12289 (lambda _
12290 ;; Drop test that requires internet access.
12291 (delete-file "tests/test_regressions.py")
12292 (setenv "PYTHONPATH"
12293 (string-append (getcwd) "/build/lib:"
12294 (getenv "PYTHONPATH")))
12295 (zero? (system* "py.test" "-vv")))))))
12296 (native-inputs
12297 `(("python-pytest" ,python-pytest)
12298 ("python-redis" ,python-redis)
12299 ("python-webtest" ,python-webtest)
12300 ("python-mock" ,python-mock)))
12301 (propagated-inputs
12302 `(("python-requests" ,python-requests)
12303 ("python-lockfile" ,python-lockfile)))
12304 (home-page "https://github.com/ionrock/cachecontrol")
12305 (synopsis "The httplib2 caching algorithms for use with requests")
12306 (description "CacheControl is a port of the caching algorithms in
12307@code{httplib2} for use with @code{requests} session objects.")
f210e944 12308 (license license:asl2.0)))
b30565bd
MB
12309
12310(define-public python2-cachecontrol
f210e944 12311 (package-with-python2 python-cachecontrol))
243db824
DM
12312
12313(define-public python-lit
12314 (package
12315 (name "python-lit")
12316 (version "0.5.0")
12317 (source
12318 (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "lit" version))
12321 (sha256
12322 (base32
12323 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12324 (build-system python-build-system)
12325 (home-page "http://llvm.org/")
12326 (synopsis "LLVM Software Testing Tool")
12327 (description "@code{lit} is a portable tool for executing LLVM and Clang
12328style test suites, summarizing their results, and providing indication of
12329failures.")
f210e944 12330 (license license:ncsa)))
243db824
DM
12331
12332(define-public python2-lit
f210e944 12333 (package-with-python2 python-lit))
66f95b20
MB
12334
12335(define-public python-pytest-pep8
12336 (package
12337 (name "python-pytest-pep8")
12338 (version "1.0.6")
12339 (source (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "pytest-pep8" version))
12342 (sha256
12343 (base32
12344 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12345 (build-system python-build-system)
12346 (arguments
b41a05ce 12347 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12348 (native-inputs
12349 `(("python-pytest" ,python-pytest)))
12350 (propagated-inputs
12351 `(("python-pep8" ,python-pep8)))
12352 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12353 (synopsis "Py.test plugin to check PEP8 requirements")
12354 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12355 (license license:expat)))
66f95b20
MB
12356
12357(define-public python2-pytest-pep8
f210e944 12358 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12359
12360(define-public python-pytest-flakes
12361 (package
12362 (name "python-pytest-flakes")
12363 (version "1.0.1")
12364 (source (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "pytest-flakes" version))
12367 (sha256
12368 (base32
12369 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12370 (build-system python-build-system)
12371 (arguments
b41a05ce 12372 `(#:phases
df94a6b5
MB
12373 (modify-phases %standard-phases
12374 (delete 'check)
12375 (add-after 'install 'check
05c2fd36
HG
12376 (lambda* (#:key outputs inputs #:allow-other-keys)
12377 ;; It's easier to run tests after install.
12378 ;; Make installed package available for running the tests
12379 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12380 (zero? (system* "py.test" "-vv")))))))
12381 (native-inputs
12382 `(("python-coverage" ,python-coverage)
12383 ("python-pytest" ,python-pytest)
12384 ("python-pytest-cache" ,python-pytest-cache)
12385 ("python-pytest-pep8" ,python-pytest-pep8)))
12386 (propagated-inputs
12387 `(("python-pyflakes" ,python-pyflakes)))
12388 (home-page "https://github.com/fschulze/pytest-flakes")
12389 (synopsis "Py.test plugin to check source code with pyflakes")
12390 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12391 (license license:expat)))
df94a6b5
MB
12392
12393(define-public python2-pytest-flakes
f210e944 12394 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12395
12396(define-public python-natsort
12397 (package
12398 (name "python-natsort")
a06cd95a 12399 (version "5.0.2")
5467ea62
MB
12400 (source (origin
12401 (method url-fetch)
12402 (uri (pypi-uri "natsort" version))
12403 (sha256
12404 (base32
a06cd95a 12405 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12406 (build-system python-build-system)
12407 (arguments
12408 `(#:phases
12409 (modify-phases %standard-phases
12410 (add-before 'check 'set-cachedir
12411 ;; Tests require write access to $HOME by default
12412 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12413 (native-inputs
12414 `(("python-hypothesis" ,python-hypothesis)
12415 ("python-pytest-cache" ,python-pytest-cache)
12416 ("python-pytest-cov" ,python-pytest-cov)
12417 ("python-pytest-flakes" ,python-pytest-flakes)
12418 ("python-pytest-pep8" ,python-pytest-pep8)))
12419 (propagated-inputs ; TODO: Add python-fastnumbers.
12420 `(("python-pyicu" ,python-pyicu)))
12421 (home-page "https://github.com/SethMMorton/natsort")
12422 (synopsis "Natural sorting for python and shell")
12423 (description
12424 "Natsort lets you apply natural sorting on lists instead of
12425lexicographical. If you use the built-in @code{sorted} method in python
12426on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12427returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12428function @code{natsorted} that identifies numbers and sorts them separately
12429from strings. It can also sort version numbers, real numbers, mixed types
12430and more, and comes with a shell command @command{natsort} that exposes this
12431functionality in the command line.")
12432 (license license:expat)
12433 (properties `((python2-variant . ,(delay python2-natsort))))))
12434
12435(define-public python2-natsort
12436 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12437 (package (inherit base)
12438 (native-inputs
00e10c6e 12439 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12440 ("python2-mock" ,python2-mock)
12441 ("python2-enum34" ,python2-enum34)
12442 ,@(package-native-inputs base))))))
4efb9c54
SR
12443
12444(define-public python-glances
12445 (package
12446 (name "python-glances")
12447 (version "2.7.1")
12448 (source
12449 (origin
12450 (method url-fetch)
12451 (uri (pypi-uri "Glances" version))
12452 (sha256
12453 (base32
12454 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12455 (build-system python-build-system)
f22efa01 12456 (propagated-inputs
4efb9c54
SR
12457 `(("python-psutil" ,python-psutil)))
12458 (home-page
12459 "https://github.com/nicolargo/glances")
12460 (synopsis
12461 "A cross-platform curses-based monitoring tool")
12462 (description
12463 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12464Glances uses the PsUtil library to get information from your system. It monitors
12465CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12466 (license license:lgpl3+)))
4efb9c54
SR
12467
12468(define-public python2-glances
f210e944 12469 (package-with-python2 python-glances))
05b7a593
EF
12470
12471(define-public python-graphql-core
12472 (package
12473 (name "python-graphql-core")
12474 (version "0.5.3")
12475 (source
12476 (origin
12477 (method url-fetch)
12478 (uri (pypi-uri "graphql-core" version))
12479 (sha256
12480 (base32
12481 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12482 (build-system python-build-system)
12483 (arguments
326f8285
LF
12484 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12485 #:phases
05b7a593
EF
12486 (modify-phases %standard-phases
12487 (add-after 'unpack 'patch-hardcoded-version
12488 (lambda _ (substitute*
12489 "setup.py"
12490 (("'gevent==1.1rc1'") "'gevent'"))
12491 #t)))))
12492 (native-inputs
12493 `(("python-gevent" ,python-gevent)
12494 ("python-mock" ,python-mock)
12495 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12496 (propagated-inputs
05b7a593
EF
12497 `(("python-promise" ,python-promise)
12498 ("python-six" ,python-six)))
12499 (home-page "https://github.com/graphql-python/graphql-core")
12500 (synopsis "GraphQL implementation for Python")
12501 (description
12502 "GraphQL implementation for Python. GraphQL is a data query language and
12503runtime designed and used to request and deliver data to mobile and web apps.
12504This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12505to Python.")
05b7a593
EF
12506 (license license:expat)))
12507
12508(define-public python2-graphql-core
f210e944 12509 (package-with-python2 python-graphql-core))
7ee51575
EF
12510
12511(define-public python-graphql-relay
12512 (package
12513 (name "python-graphql-relay")
b13a5b4d 12514 (version "0.4.5")
7ee51575
EF
12515 (source
12516 (origin
12517 (method url-fetch)
12518 (uri (pypi-uri "graphql-relay" version))
12519 (sha256
12520 (base32
b13a5b4d 12521 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12522 (build-system python-build-system)
12523 (native-inputs
12524 `(("python-pytest" ,python-pytest)))
f22efa01 12525 (propagated-inputs
7ee51575
EF
12526 `(("python-graphql-core" ,python-graphql-core)
12527 ("python-promise" ,python-promise)
12528 ("python-six" ,python-six)))
12529 (home-page "https://github.com/graphql-python/graphql-relay-py")
12530 (synopsis "Relay implementation for Python")
12531 (description
12532 "This is a library to allow the easy creation of Relay-compliant servers
12533using the GraphQL Python reference implementation of a GraphQL server. It
12534should be noted that the code is a exact port of the original
12535@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12536from Facebook.")
7ee51575
EF
12537 (license license:expat)))
12538
12539(define-public python2-graphql-relay
f210e944 12540 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12541
12542(define-public python-graphene
12543 (package
12544 (name "python-graphene")
12545 (version "0.10.2")
12546 (source
12547 (origin
12548 (method url-fetch)
12549 (uri (pypi-uri "graphene" version))
12550 (sha256
12551 (base32
12552 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12553 (build-system python-build-system)
12554 (native-inputs
12555 `(("python-django-filter" ,python-django-filter)
12556 ("python-mock" ,python-mock)
12557 ("python-psycopg2" ,python-psycopg2)
12558 ("python-pytest-django" ,python-pytest-django)
12559 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12560 (propagated-inputs
ddc63a56
EF
12561 `(("python-graphql-core" ,python-graphql-core)
12562 ("python-graphql-relay" ,python-graphql-relay)
12563 ("python-iso8601" ,python-iso8601)
12564 ("python-promise" ,python-promise)
12565 ("python-six" ,python-six)))
12566 (home-page "http://graphene-python.org/")
12567 (synopsis "GraphQL Framework for Python")
12568 (description
12569 "Graphene is a Python library for building GraphQL schemas/types.
12570A GraphQL schema describes your data model, and provides a GraphQL server
12571with an associated set of resolve methods that know how to fetch data.")
12572 (properties `((python2-variant . ,(delay python2-graphene))))
12573 (license license:expat)))
12574
12575(define-public python2-graphene
12576 (let ((base (package-with-python2
12577 (strip-python2-variant python-graphene))))
12578 (package (inherit base)
12579 (native-inputs
00e10c6e 12580 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12581 ,@(package-native-inputs base))))))
d488d5d6
EF
12582
12583(define-public python-nautilus
12584 (package
12585 (name "python-nautilus")
12586 (version "0.4.9")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "nautilus" version))
12591 (sha256
12592 (base32
12593 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12594 (build-system python-build-system)
12595 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12596 (propagated-inputs
d488d5d6
EF
12597 `(("python-bcrypt" ,python-bcrypt)
12598 ("python-click" ,python-click)
12599 ("python-consul" ,python-consul)
d488d5d6
EF
12600 ("python-graphene" ,python-graphene)
12601 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12602 ("python-peewee" ,python-peewee)
12603 ("python-pika" ,python-pika)
d488d5d6
EF
12604 ("python-tornado" ,python-tornado)
12605 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12606 (native-inputs
12607 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12608 (home-page "https://github.com/AlecAivazis/nautilus")
12609 (synopsis "Library for creating microservice applications")
12610 (description
12611 "Nautilus is a framework for flux based microservices that looks to
12612provide extendible implementations of common aspects of a cloud so that you can
12613focus on building massively scalable web applications.")
12614 (license license:expat)))
94cffc63 12615
89cd988b
DM
12616(define-public python-snowballstemmer
12617 (package
12618 (name "python-snowballstemmer")
12619 (version "1.2.1")
12620 (source (origin
1bd858cc
MB
12621 (method url-fetch)
12622 (uri (pypi-uri "snowballstemmer" version))
12623 (sha256
12624 (base32
12625 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12626 (build-system python-build-system)
12627 (arguments
12628 `(;; No tests exist
12629 #:tests? #f))
12630 (home-page "https://github.com/shibukawa/snowball_py")
12631 (synopsis "Snowball stemming library collection for Python")
12632 (description "This package provides 16 word stemmer algorithms generated
12633from Snowball algorithms. It includes the 15 original ones plus the Poerter
12634English stemmer.")
12635 (license license:bsd-3)))
12636
12637(define-public python2-snowballstemmer
12638 (package-with-python2 python-snowballstemmer))
12639
754bfd70
DM
12640(define-public python-sphinx-cloud-sptheme
12641 (package
12642 (name "python-sphinx-cloud-sptheme")
5095bc7d 12643 (version "1.8.0")
754bfd70 12644 (source (origin
1bd858cc
MB
12645 (method url-fetch)
12646 (uri (pypi-uri "cloud_sptheme" version))
12647 (sha256
12648 (base32
5095bc7d 12649 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12650 (build-system python-build-system)
a31e2f1a
MB
12651 ;; FIXME: The 'pypi' release archive does not contain tests.
12652 (arguments '(#:tests? #f))
1bd858cc
MB
12653 (native-inputs
12654 `(("python-sphinx" ,python-sphinx)))
12655 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12656 (synopsis "'Cloud' theme for Sphinx documenter")
12657 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12658related extensions.")
1bd858cc 12659 (license license:bsd-3)))
754bfd70
DM
12660
12661(define-public python2-sphinx-cloud-sptheme
12662 (package-with-python2 python-sphinx-cloud-sptheme))
12663
807a5b32
DM
12664(define-public python-sphinx-alabaster-theme
12665 (package
12666 (name "python-sphinx-alabaster-theme")
12667 (version "0.7.9")
1bd858cc
MB
12668 (source (origin
12669 (method url-fetch)
12670 (uri (pypi-uri "alabaster" version))
12671 (sha256
12672 (base32
12673 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12674 (build-system python-build-system)
12675 (propagated-inputs
12676 `(("python-pygments" ,python-pygments)))
12677 (home-page "https://alabaster.readthedocs.io/")
12678 (synopsis "Configurable sidebar-enabled Sphinx theme")
12679 (description "Alabaster is a visually (c)lean, responsive, configurable
12680theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12681 (license license:bsd-3)))
12682
12683(define-public python2-sphinx-alabaster-theme
12684 (package-with-python2 python-sphinx-alabaster-theme))
12685
66d3f50a
LF
12686(define-public python-betamax
12687 (package
12688 (name "python-betamax")
12689 (version "0.8.0")
12690 (source
12691 (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "betamax" version))
12694 (sha256
12695 (base32
12696 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12697 (build-system python-build-system)
12698 (arguments
12699 '(;; Many tests fail because they require networking.
12700 #:tests? #f))
c415f763 12701 (propagated-inputs
66d3f50a
LF
12702 `(("python-requests" ,python-requests)))
12703 (home-page "https://github.com/sigmavirus24/betamax")
12704 (synopsis "Record HTTP interactions with python-requests")
12705 (description "Betamax will record your test suite's HTTP interactions and
12706replay them during future tests. It is designed to work with python-requests.")
f210e944 12707 (license license:expat)))
66d3f50a
LF
12708
12709(define-public python2-betamax
f210e944 12710 (package-with-python2 python-betamax))
ca0635b4 12711
94cffc63
LF
12712(define-public python-s3transfer
12713 (package
12714 (name "python-s3transfer")
1b5ea092 12715 (version "0.1.10")
94cffc63
LF
12716 (source (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "s3transfer" version))
12719 (sha256
12720 (base32
1b5ea092 12721 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12722 (build-system python-build-system)
fad8bf97
LF
12723 (arguments
12724 `(#:phases
12725 (modify-phases %standard-phases
12726 (replace 'check
12727 (lambda _
12728 ;; 7 of the 'integration' tests require network access or login
12729 ;; credentials.
12730 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12731 (native-inputs
fad8bf97
LF
12732 `(("python-docutils" ,python-docutils)
12733 ("python-mock" ,python-mock)
12734 ("python-nose" ,python-nose)))
f22efa01 12735 (propagated-inputs
94cffc63
LF
12736 `(("python-botocore" ,python-botocore)))
12737 (synopsis "Amazon S3 Transfer Manager")
12738 (description "S3transfer is a Python library for managing Amazon S3
12739transfers.")
12740 (home-page "https://github.com/boto/s3transfer")
12741 (license license:asl2.0)
12742 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12743
12744(define-public python2-s3transfer
12745 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12746 (package
12747 (inherit base)
12748 (native-inputs
12749 `(("python2-futures" ,python2-futures)
94cffc63 12750 ,@(package-native-inputs base))))))
8ab59181
HG
12751
12752(define-public python-setproctitle
12753(package
12754 (name "python-setproctitle")
12755 (version "1.1.10")
12756 (source
12757 (origin
12758 (method url-fetch)
12759 (uri (pypi-uri "setproctitle" version))
12760 (sha256
12761 (base32
12762 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12763 (build-system python-build-system)
12764 (arguments
12765 '(#:phases
12766 (modify-phases %standard-phases
12767 (add-before 'check 'patch-Makefile
12768 ;; Stricly this is only required for the python2 variant.
12769 ;; But adding a phase in an inherited package seems to be
12770 ;; cumbersum. So we patch even for python3.
12771 (lambda _
12772 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12773 (when nose
12774 (substitute* "Makefile"
12775 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12776 (string-append nose "/bin/nosetests "))))
12777 #t)))
12778 (replace 'check
12779 (lambda _
12780 (setenv "PYTHON" (or (which "python3") (which "python")))
12781 (setenv "PYCONFIG" (or (which "python3-config")
12782 (which "python-config")))
12783 (setenv "CC" "gcc")
12784 ;; No need to extend PYTHONPATH to find the built package, since
12785 ;; the Makefile will build anyway
12786 (zero? (system* "make" "check")))))))
12787 (native-inputs
12788 `(("procps" ,procps))) ; required for tests
12789 (home-page
12790 "https://github.com/dvarrazzo/py-setproctitle")
12791 (synopsis
12792 "Setproctitle implementation for Python to customize the process title")
12793 (description "The library allows a process to change its title (as displayed
12794by system tools such as ps and top).
12795
12796Changing the title is mostly useful in multi-process systems, for
12797example when a master process is forked: changing the children's title
12798allows to identify the task each process is busy with. The technique
12799is used by PostgreSQL and the OpenSSH Server for example.")
12800 (license license:bsd-3)
12801 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12802
12803(define-public python2-setproctitle
12804 (let ((base (package-with-python2
12805 (strip-python2-variant python-setproctitle))))
12806 (package
12807 (inherit base)
12808 (native-inputs `(("python2-nose" ,python2-nose)
12809 ,@(package-native-inputs base))))))
162e42d8
HG
12810
12811(define-public python-validictory
12812 (package
12813 (name "python-validictory")
12814 (version "1.0.1")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "validictory" version))
12819 (sha256
12820 (base32
12821 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12822 (build-system python-build-system)
12823 (arguments
12824 '(#:phases
12825 (modify-phases %standard-phases
12826 (add-after 'unpack 'bootstrap
12827 ;; Move the tests out of the package directory to avoid
12828 ;; packaging them.
12829 (lambda* _
12830 (rename-file "validictory/tests" "tests")
12831 (delete-file "tests/__init__.py")))
12832 (replace 'check
12833 (lambda _
12834 ;; Extend PYTHONPATH so the built package will be found.
12835 (setenv "PYTHONPATH"
12836 (string-append (getcwd) "/build/lib:"
12837 (getenv "PYTHONPATH")))
12838 (zero? (system* "py.test" "-vv" )))))))
12839 (native-inputs
12840 `(("python-pytest" ,python-pytest)))
12841 (home-page
12842 "https://github.com/jamesturk/validictory")
12843 (synopsis "General purpose Python data validator")
12844 (description "It allows validation of arbitrary Python data structures.
12845
12846The schema format is based on the JSON Schema
12847proposal (http://json-schema.org), so combined with json the library is also
12848useful as a validator for JSON data.")
f210e944 12849 (license license:expat)))
162e42d8
HG
12850
12851(define-public python2-validictory
f210e944 12852 (package-with-python2 python-validictory))
0990edfe
DM
12853
12854(define-public python-aniso8601
12855 (package
12856 (name "python-aniso8601")
12857 (version "1.1.0")
12858 (source
12859 (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "aniso8601" version))
12862 (sha256
12863 (base32
12864 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12865 (build-system python-build-system)
12866 (propagated-inputs
22d7360b 12867 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12868 (home-page
12869 "https://bitbucket.org/nielsenb/aniso8601")
12870 (synopsis
12871 "Python library for parsing ISO 8601 strings")
12872 (description
12873 "This package contains a library for parsing ISO 8601 datetime strings.")
12874 (license license:bsd-3)))
999d964d
DM
12875
12876(define-public python-flask-restful
12877 (package
12878 (name "python-flask-restful")
12879 (version "0.3.5")
12880 (source
12881 (origin
12882 (method url-fetch)
12883 (uri (pypi-uri "Flask-RESTful" version))
12884 (sha256
12885 (base32
12886 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12887 (build-system python-build-system)
12888 (propagated-inputs
12889 `(("python-aniso8601" ,python-aniso8601)
12890 ("python-flask" ,python-flask)
12891 ("python-pycrypto" ,python-pycrypto)
12892 ("python-pytz" ,python-pytz)))
12893 (native-inputs
12894 `(;; Optional dependency of Flask. Tests need it.
12895 ("python-blinker" ,python-blinker)
12896 ("python-mock" ,python-mock) ; For tests
12897 ("python-nose" ,python-nose) ; For tests
12898 ("python-sphinx" ,python-sphinx)))
12899 (home-page
12900 "https://www.github.com/flask-restful/flask-restful/")
12901 (synopsis
12902 "Flask module for creating REST APIs")
12903 (description
12904 "This package contains a Flask module for creating REST APIs.")
12905 (license license:bsd-3)))
31288222
DM
12906
12907(define-public python-flask-basicauth
12908 (package
12909 (name "python-flask-basicauth")
12910 (version "0.2.0")
12911 (source
12912 (origin
12913 (method url-fetch)
12914 (uri (pypi-uri "Flask-BasicAuth" version))
12915 (sha256
12916 (base32
12917 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12918 (build-system python-build-system)
12919 (propagated-inputs
12920 `(("python-flask" ,python-flask)))
12921 (home-page
12922 "https://github.com/jpvanhal/flask-basicauth")
12923 (synopsis
12924 "HTTP basic access authentication for Flask")
12925 (description
12926 "This package provides HTTP basic access authentication for Flask.")
12927 (license license:bsd-3)))
903276d0
DM
12928
12929(define-public python-flask-sqlalchemy
12930 (package
12931 (name "python-flask-sqlalchemy")
12932 (version "2.1")
12933 (source
12934 (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "Flask-SQLAlchemy" version))
12937 (sha256
12938 (base32
12939 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12940 (build-system python-build-system)
12941 (propagated-inputs
12942 `(("python-flask" ,python-flask)
12943 ("python-sqlalchemy" ,python-sqlalchemy)))
12944 (home-page
7bf837fd 12945 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
12946 (synopsis
12947 "Module adding SQLAlchemy support to your Flask application")
12948 (description
12949 "This package adds SQLAlchemy support to your Flask application.")
12950 (license license:bsd-3)))
329b4b3b
LF
12951
12952(define-public python-pyev
12953 (package
12954 (name "python-pyev")
12955 (version "0.9.0")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "pyev" version))
12960 (sha256
12961 (base32
12962 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:tests? #f ; no test suite
12966 #:phases
12967 (modify-phases %standard-phases
12968 (add-after 'unpack 'patch
12969 (lambda* (#:key inputs #:allow-other-keys)
12970 (let ((libev (string-append (assoc-ref inputs "libev")
12971 "/lib/libev.so.4")))
12972 (substitute* "setup.py"
12973 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12974 (string-append "libev_dll_name = \"" libev "\"")))))))))
12975 (inputs
12976 `(("libev" ,libev)))
12977 (home-page "http://pythonhosted.org/pyev/")
12978 (synopsis "Python libev interface")
12979 (description "Pyev provides a Python interface to libev.")
12980 (license license:gpl3)))
12981
12982(define-public python2-pyev
12983 (package-with-python2 python-pyev))
45b4f127
DM
12984
12985(define-public python-imagesize
12986 (package
12987 (name "python-imagesize")
12988 (version "0.7.1")
12989 (source
12990 (origin
12991 (method url-fetch)
12992 (uri (pypi-uri "imagesize" version))
12993 (sha256
12994 (base32
12995 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12996 (build-system python-build-system)
9422c98a
LF
12997 (arguments
12998 '(;; Test files are not distributed on PyPi:
12999 ;; https://github.com/shibukawa/imagesize_py/issues/7
13000 #:tests? #f))
45b4f127
DM
13001 (home-page "https://github.com/shibukawa/imagesize_py")
13002 (synopsis "Gets image size of files in variaous formats in Python")
13003 (description
13004 "This package allows determination of image size from
13005PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 13006 (license license:expat)))
45b4f127
DM
13007
13008(define-public python2-imagesize
f210e944 13009 (package-with-python2 python-imagesize))
2f6dd9cd
AI
13010
13011(define-public python-axolotl-curve25519
13012 (package
13013 (name "python-axolotl-curve25519")
13014 (version "0.1")
13015 (source
13016 (origin
13017 (method git-fetch)
13018 (uri (git-reference
13019 (url "git://github.com/tgalal/python-axolotl-curve25519")
13020 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13021 (file-name (string-append name "-" version "-checkout"))
13022 (sha256
13023 (base32
13024 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13025 (build-system python-build-system)
13026 (arguments
13027 `(;; Prevent creation of the egg. This works around
13028 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13029 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13030 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13031 (synopsis "Python wrapper for curve25519 library")
13032 (description "This is a python wrapper for the curve25519 library
13033with ed25519 signatures. The C code was pulled from
13034libaxolotl-android. At the moment this wrapper is meant for use by
13035python-axolotl.")
13036 (license (list license:gpl3 ; Most files
683cdbf5 13037 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13038
13039(define-public python2-axolotl-curve25519
13040 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13041
13042(define-public python-axolotl
13043 (package
13044 (name "python-axolotl")
13045 (version "0.1.35")
13046 (source
13047 (origin
13048 (method url-fetch)
13049 (uri (string-append
13050 "https://github.com/tgalal/python-axolotl/archive/"
13051 version ".tar.gz"))
13052 (file-name (string-append name "-" version ".tar.gz"))
13053 (sha256
13054 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13055 (build-system python-build-system)
13056 (arguments
13057 `(#:phases
13058 (modify-phases %standard-phases
13059 ;; Don't install tests
13060 (add-before 'install 'remove-tests
13061 (lambda _
13062 (for-each delete-file-recursively
13063 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13064 #t)))))
06ff0837
AI
13065 (propagated-inputs
13066 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13067 ("python-dateutil" ,python-dateutil)
13068 ("python-protobuf" ,python-protobuf)
13069 ("python-pycrypto" ,python-pycrypto)))
13070 (home-page "https://github.com/tgalal/python-axolotl")
13071 (synopsis "Python port of libaxolotl-android")
13072 (description "This is a python port of libaxolotl-android. This
13073is a ratcheting forward secrecy protocol that works in synchronous and
13074asynchronous messaging environments.")
13075 (license license:gpl3)))
13076
13077(define-public python2-axolotl
13078 (package-with-python2 python-axolotl))
e2fca490
DM
13079
13080(define-public python-termstyle
13081 (package
13082 (name "python-termstyle")
13083 (version "0.1.11")
13084 (source
13085 (origin
13086 (method url-fetch)
13087 (uri (pypi-uri "termstyle" version))
13088 (sha256
13089 (base32
13090 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13091 (build-system python-build-system)
7917a135
MB
13092 (arguments
13093 '(#:phases
13094 (modify-phases %standard-phases
13095 (replace 'check
13096 (lambda _
13097 (zero? (system* "python" "test3.py")))))))
7bf837fd 13098 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13099 (synopsis "Console text coloring for Python")
13100 (description "This package provides console text coloring for Python.")
13101 (license license:bsd-3)))
1e6112d8
DM
13102
13103(define-public python-rednose
13104 (package
13105 (name "python-rednose")
13106 (version "1.2.1")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "rednose" version))
13111 (sha256
13112 (base32
13113 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13114 (build-system python-build-system)
13115 (arguments
13116 `(#:phases
13117 (modify-phases %standard-phases
13118 (add-after 'unpack 'fix-deps
13119 (lambda _
13120 ;; See <https://github.com/JBKahn/rednose/issues/12>
13121 (substitute* "setup.py"
13122 (("python-termstyle") "termstyle"))
13123 #t)))))
13124 (propagated-inputs
13125 `(("python-colorama" ,python-colorama)
13126 ("python-termstyle" ,python-termstyle)))
13127 (native-inputs
13128 `(("python-six" ,python-six)
13129 ("python-nose" ,python-nose)))
13130 (home-page "https://github.com/JBKahn/rednose")
13131 (synopsis "Colored output for Python nosetests")
13132 (description "This package provides colored output for the
13133@command{nosetests} command of the Python Nose unit test framework.")
13134 (license license:bsd-3)))
0a7f17f0
DM
13135
13136(define-public python-flask-restplus
13137 (package
13138 (name "python-flask-restplus")
13139 (version "0.9.2")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "flask-restplus" version))
13144 (sha256
13145 (base32
13146 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13147 (build-system python-build-system)
59f74825
MB
13148 (arguments
13149 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13150 ;; #:phases
13151 ;; (modify-phases %standard-phases
13152 ;; (replace 'check
13153 ;; (lambda _
13154 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13155 (propagated-inputs
13156 `(("python-aniso8601" ,python-aniso8601)
13157 ("python-flask" ,python-flask)
13158 ("python-jsonschema" ,python-jsonschema)
13159 ("python-pytz" ,python-pytz)
13160 ("python-six" ,python-six)))
13161 (native-inputs
13162 `(("python-tzlocal" ,python-tzlocal)
13163 ("python-blinker" ,python-blinker)
13164 ("python-nose" ,python-nose)
13165 ("python-rednose" ,python-rednose)))
13166 (home-page "https://github.com/noirbizarre/flask-restplus")
13167 (synopsis "Framework for documented API development with Flask")
13168 (description "This package provides a framework for API development with
13169the Flask web framework in Python. It is similar to package
13170@code{python-flask-restful} but supports the @code{python-swagger}
13171documentation builder.")
13172 (license license:expat)))
1ed21519
DM
13173
13174(define-public python-sadisplay
13175 (package
13176 (name "python-sadisplay")
13177 (version "0.4.6")
13178 (source
13179 (origin
13180 (method url-fetch)
13181 (uri (pypi-uri "sadisplay" version))
13182 (sha256
13183 (base32
13184 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13185 (build-system python-build-system)
13186 (propagated-inputs
13187 `(("python-sqlalchemy" ,python-sqlalchemy)))
13188 (native-inputs
13189 `(("python-nose" ,python-nose)))
13190 (home-page "https://bitbucket.org/estin/sadisplay")
13191 (synopsis "SQLAlchemy schema displayer")
13192 (description "This package provides a program to build Entity
13193Relationship diagrams from a SQLAlchemy model (or directly from the
13194database).")
13195 (license license:bsd-3)))
13196
13197(define-public python2-sadisplay
13198 (package-with-python2 python-sadisplay))
444a79b6
DM
13199
13200(define-public python-flask-restful-swagger
13201 (package
13202 (name "python-flask-restful-swagger")
13203 (version "0.19")
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "flask-restful-swagger" version))
13208 (sha256
13209 (base32
13210 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13211 (build-system python-build-system)
13212 (propagated-inputs
13213 `(("python-flask-restful" ,python-flask-restful)))
13214 (home-page "https://github.com/rantav/flask-restful-swagger")
13215 (synopsis "Extract Swagger specs from Flask-Restful projects")
13216 (description "This package lets you extract Swagger API documentation
13217specs from your Flask-Restful projects.")
13218 (license license:expat)))
13219
13220(define-public python2-flask-restful-swagger
13221 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13222
13223(define-public python-argcomplete
13224 (package
13225 (name "python-argcomplete")
13226 (version "1.7.0")
13227 (source
13228 (origin
13229 (method url-fetch)
13230 (uri (pypi-uri "argcomplete" version))
13231 (sha256
13232 (base32
13233 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13234 (build-system python-build-system)
80ce42bd
MB
13235 (native-inputs
13236 `(("python-pexpect" ,python-pexpect)
13237 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13238 (home-page "https://github.com/kislyuk/argcomplete")
13239 (synopsis "Shell tab completion for Python argparse")
13240 (description "argcomplete provides extensible command line tab completion
13241of arguments and options for Python scripts using @code{argparse}. It's
13242particularly useful for programs with many options or sub-parsers that can
13243dynamically suggest completions; for example, when browsing resources over the
13244network.")
13245 (license license:asl2.0)))
13246
13247(define-public python2-argcomplete
13248 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13249
13250(define-public python-xopen
13251 (package
13252 (name "python-xopen")
13253 (version "0.1.1")
13254 (source
13255 (origin
13256 (method url-fetch)
13257 (uri (pypi-uri "xopen" version))
13258 (sha256
13259 (base32
13260 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13261 (file-name (string-append name "-" version ".tar.gz"))))
13262 (build-system python-build-system)
13263 (home-page "https://github.com/marcelm/xopen/")
13264 (synopsis "Open compressed files transparently")
13265 (description "This module provides an @code{xopen} function that works like
13266Python's built-in @code{open} function, but can also deal with compressed files.
13267Supported compression formats are gzip, bzip2 and, xz, and are automatically
13268recognized by their file extensions. The focus is on being as efficient as
13269possible on all supported Python versions.")
13270 (license license:expat)))
13271
13272(define-public python2-xopen
13273 (package-with-python2 python-xopen))
8d67610b
DM
13274
13275(define-public python2-cheetah
13276 (package
13277 (name "python2-cheetah")
13278 (version "2.4.4")
13279 (source
13280 (origin
13281 (method url-fetch)
13282 (uri (pypi-uri "Cheetah" version))
13283 (sha256
13284 (base32
13285 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13286 (build-system python-build-system)
13287 (arguments
13288 `(#:python ,python-2))
13289 (propagated-inputs
13290 `(("python2-markdown" ,python2-markdown)))
13291 (home-page "https://pythonhosted.org/Cheetah/")
13292 (synopsis "Template engine")
13293 (description "Cheetah is a text-based template engine and Python code
13294generator.
13295
13296Cheetah can be used as a standalone templating utility or referenced as
13297a library from other Python applications. It has many potential uses,
13298but web developers looking for a viable alternative to ASP, JSP, PHP and
13299PSP are expected to be its principle user group.
13300
13301Features:
13302@enumerate
13303@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13304 text-based format.
13305@item Cleanly separates content, graphic design, and program code.
13306@item Blends the power and flexibility of Python with a simple template language
13307 that non-programmers can understand.
13308@item Gives template writers full access to any Python data structure, module,
13309 function, object, or method in their templates.
13310@item Makes code reuse easy by providing an object-orientated interface to
13311 templates that is accessible from Python code or other Cheetah templates.
13312 One template can subclass another and selectively reimplement sections of it.
13313@item Provides a simple, yet powerful, caching mechanism that can dramatically
13314 improve the performance of a dynamic website.
13315@item Compiles templates into optimized, yet readable, Python code.
13316@end enumerate")
13317 (license (license:x11-style "file://LICENSE"))))
916aafa4 13318
d83d8722
DM
13319(define-public python-dulwich
13320 (package
13321 (name "python-dulwich")
13322 (version "0.16.3")
13323 (source
13324 (origin
13325 (method url-fetch)
13326 (uri (list (string-append "https://www.dulwich.io/releases/"
13327 "dulwich-" version ".tar.gz")
13328 (pypi-uri "dulwich" version)))
13329 (sha256
13330 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13331 (build-system python-build-system)
13332 (arguments
13333 `(#:phases
13334 (modify-phases %standard-phases
13335 (add-before 'check 'fix-tests
13336 (lambda* (#:key inputs #:allow-other-keys)
13337 ;; The tests use Popen with a custom environment which doesn't
13338 ;; include PATH.
13339 (substitute* "dulwich/tests/compat/utils.py"
13340 (("'git'") (string-append "'"
13341 (which "git")
13342 "'")))
13343 (substitute* '("dulwich/tests/test_repository.py"
13344 "dulwich/tests/test_hooks.py")
13345 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13346 (setenv "TEST_RUNNER" "unittest")
13347 (setenv "PYTHONHASHSEED" "random")
13348 #t)))))
13349 (propagated-inputs
13350 `(("python-fastimport" ,python-fastimport)))
13351 (native-inputs
13352 `(("python-mock" ,python-mock)
13353 ("python-geventhttpclient" ,python-geventhttpclient)
13354 ("git" ,git)))
13355 (home-page "https://www.dulwich.io/")
13356 (synopsis "Git implementation in Python")
13357 (description "Dulwich is an implementation of the Git file formats and
13358protocols written in pure Python.")
13359 ;; Can be used with either license.
13360 (license (list license:asl2.0 license:gpl2+))))
13361
13362(define-public python2-dulwich
13363 (package-with-python2 python-dulwich))
424b1ae7 13364
916aafa4
CZ
13365(define-public python-pbkdf2
13366 (package
13367 (name "python-pbkdf2")
13368 (version "1.3")
13369 (source
13370 (origin
13371 (method url-fetch)
13372 (uri (pypi-uri "pbkdf2" version))
13373 (sha256
13374 (base32
13375 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13376 (build-system python-build-system)
fffcd8b8
MB
13377 (arguments
13378 '(#:phases
13379 (modify-phases %standard-phases
13380 (replace 'check
13381 (lambda _
13382 (setenv "PYTHONPATH"
13383 (string-append (getcwd) "/build/lib:"
13384 (getenv "PYTHONPATH")))
13385 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13386 (propagated-inputs
13387 `(("python-pycrypto" ,python-pycrypto))) ; optional
13388 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13389 (synopsis "Password-based key derivation")
13390 (description "This module implements the password-based key derivation
13391function, PBKDF2, specified in RSA PKCS#5 v2.0.
13392
13393PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13394is part of the RSA Public Key Cryptography Standards series. The provided
13395implementation takes a password or a passphrase and a salt value (and
13396optionally a iteration count, a digest module, and a MAC module) and provides
13397a file-like object from which an arbitrarly-sized key can be read.")
13398 (license license:expat)))
13399
13400(define-public python2-pbkdf2
13401 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13402
13403(define-public python-qrcode
13404 (package
13405 (name "python-qrcode")
13406 (version "5.3")
13407 (source
13408 (origin
13409 (method url-fetch)
13410 (uri (pypi-uri "qrcode" version))
13411 (sha256
13412 (base32
13413 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13414 (build-system python-build-system)
6925cd78
MB
13415 (arguments
13416 ;; FIXME: Tests require packaging 'pymaging'.
13417 '(#:tests? #f))
cba84a38
CZ
13418 (propagated-inputs
13419 `(("python-lxml" ,python-lxml) ; for SVG output
13420 ("python-pillow" ,python-pillow) ; for PNG output
13421 ("python-six" ,python-six)))
13422 (home-page "https://github.com/lincolnloop/python-qrcode")
13423 (synopsis "QR Code image generator")
13424 (description "This package provides a pure Python QR Code generator
13425module. It uses the Python Imaging Library (PIL) to allow for the generation
13426of QR Codes.
13427
13428In addition this package provides a command line tool to generate QR codes and
13429either write these QR codes to a file or do the output as ascii art at the
13430console.")
13431 (license license:bsd-3)))
13432
13433(define-public python2-qrcode
13434 (package-with-python2 python-qrcode))
af7caada
CZ
13435
13436;; SlowAES isn't compatible with Python 3.
13437(define-public python2-slowaes
13438 (package
13439 (name "python2-slowaes")
13440 (version "0.1a1")
13441 (source
13442 (origin
13443 (method url-fetch)
13444 (uri (pypi-uri "slowaes" version))
13445 (sha256
13446 (base32
13447 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13448 (build-system python-build-system)
13449 (arguments `(#:python ,python-2))
13450 (home-page "http://code.google.com/p/slowaes/")
13451 (synopsis "Implementation of AES in Python")
13452 (description "This package contains an implementation of AES in Python.
13453This implementation is slow (hence the project name) but still useful when
13454faster ones are not available.")
13455 (license license:asl2.0)))
1a917fc9
MFM
13456
13457(define-public python-rst2ansi
13458 (package
13459 (name "python-rst2ansi")
13460 (version "0.1.5")
13461 (source
13462 (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "rst2ansi" version))
13465 (sha256
13466 (base32
13467 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13468 (build-system python-build-system)
13469 (propagated-inputs
13470 `(("python-docutils" ,python-docutils)))
13471 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13472 (synopsis "Convert RST to ANSI-decorated console output")
13473 (description
13474 "Python module dedicated to rendering RST (reStructuredText) documents
13475to ansi-escaped strings suitable for display in a terminal.")
13476 (license license:expat)))
2f4623db 13477
ca0e62bf
SR
13478(define-public python-ansi2html
13479 (package
13480 (name "python-ansi2html")
13481 (version "1.2.0")
13482 (source
13483 (origin
13484 (method url-fetch)
13485 (uri (pypi-uri "ansi2html" version))
13486 (sha256
13487 (base32
13488 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13489 (build-system python-build-system)
13490 (native-inputs
13491 `(("python-mock" ,python-mock)
13492 ("python-nose" ,python-nose)))
13493 (propagated-inputs
13494 `(("python-six" ,python-six)))
13495 (home-page "http://github.com/ralphbean/ansi2html")
13496 (synopsis "Convert ANSI-decorated console output to HTML")
13497 (description
13498 "@command{ansi2html} is a Python library and command line utility for
13499convering text with ANSI color codes to HTML or LaTeX.")
13500 (license license:gpl3+)))
13501
13502(define-public python2-ansi2html
13503 (package-with-python2 python-ansi2html))
13504
2f4623db
MFM
13505(define-public python-ddt
13506 (package
13507 (name "python-ddt")
13508 (version "1.1.1")
13509 (source
13510 (origin
13511 (method url-fetch)
13512 (uri (pypi-uri "ddt" version))
13513 (sha256
13514 (base32
13515 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13516 (build-system python-build-system)
13517 (native-inputs
13518 `(("python-mock" ,python-mock)
13519 ("python-nose" ,python-nose)))
13520 (propagated-inputs
13521 `(("python-six" ,python-six)
13522 ("python-pyyaml" ,python-pyyaml)))
13523 (home-page "https://github.com/txels/ddt")
13524 (synopsis "Data-Driven Tests")
13525 (description
13526 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13527it with different test data, and make it appear as multiple test cases.")
13528 (license license:expat)))
13529
13530(define-public python2-ddt
13531 (package-with-python2 python-ddt))
2299b137
MFM
13532
13533(define-public python-pycosat
13534 (package
13535 (name "python-pycosat")
13536 (version "0.6.1")
13537 (source
13538 (origin
13539 (method url-fetch)
13540 (uri (pypi-uri "pycosat" version))
13541 (sha256
13542 (base32
13543 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13544 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13545 (build-system python-build-system)
13546 (home-page "https://github.com/ContinuumIO/pycosat")
13547 (synopsis "Bindings to picosat (a SAT solver)")
13548 (description
13549 "This package provides efficient Python bindings to @code{picosat} on
13550the C level. When importing pycosat, the @code{picosat} solver becomes part
13551of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13552Problem} (SAT) solver.")
13553 (license license:expat)))
13554
13555(define-public python2-pycosat
13556 (package-with-python2 python-pycosat))
8fd68504
MFM
13557
13558(define-public python2-ruamel.ordereddict
13559 (package
13560 (name "python2-ruamel.ordereddict")
13561 (version "0.4.9")
13562 (source
13563 (origin
13564 (method url-fetch)
13565 (uri (pypi-uri "ruamel.ordereddict" version))
13566 (sha256
13567 (base32
13568 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13569 (build-system python-build-system)
13570 (arguments
13571 `(#:python ,python-2
13572 #:phases
13573 (modify-phases %standard-phases
13574 (delete 'check)
13575 (add-after 'install 'check
13576 (lambda* (#:key inputs outputs #:allow-other-keys)
13577 (add-installed-pythonpath inputs outputs)
13578 (zero? (system* "python" "test/testordereddict.py")))))))
13579 (home-page "https://bitbucket.org/ruamel/ordereddict")
13580 (synopsis "Version of dict that keeps keys in insertion order")
13581 (description
13582 "This is an implementation of an ordered dictionary with @dfn{Key
13583Insertion Order} (KIO: updates of values do not affect the position of the
13584key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13585removed and put at the back). The standard library module @code{OrderedDict},
13586implemented later, implements a subset of @code{ordereddict} functionality.
13587Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13588Order} (KSO, no sorting function can be specified, but a transform can be
13589specified to apply on the key before comparison (e.g. @code{string.lower})).")
13590 (license license:expat)))
d8768e31
EB
13591
13592(define-public python-pypeg2
13593 (package
13594 (name "python-pypeg2")
13595 (version "2.15.2")
13596 (source
13597 (origin
13598 (method url-fetch)
13599 (uri (pypi-uri "pyPEG2" version))
13600 (sha256
13601 (base32
13602 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13603 (build-system python-build-system)
13604 (propagated-inputs `(("python-lxml" ,python-lxml)))
13605 (arguments
13606 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13607 '(#:tests? #f))
13608 (home-page "https://fdik.org/pyPEG/")
13609 (synopsis "Parsering Expression Grammars in Python")
13610 (description "PyPEG is an intrinsic parser interpreter framework for
13611Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13612parse many formal languages.")
13613 (license license:gpl2)))
33e9490c
AI
13614
13615(define-public python2-cliapp
13616 (package
13617 (name "python2-cliapp")
13618 (version "1.20160724")
13619 (source
13620 (origin
13621 (method url-fetch)
13622 (uri (string-append
13623 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13624 version ".tar.gz"))
13625 (sha256
13626 (base32
13627 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13628 (build-system python-build-system)
13629 (arguments
13630 `(#:python ,python-2))
13631 (propagated-inputs
13632 `(("python2-pyaml" ,python2-pyaml)))
13633 (home-page "https://liw.fi/cliapp/")
13634 (synopsis "Python framework for command line programs")
13635 (description "@code{python2-cliapp} is a python framework for
13636command line programs. It contains the typical stuff such programs
13637need to do, such as parsing the command line for options, and
13638iterating over input files.")
13639 (license license:gpl2+)))
13640
77e99411
AI
13641(define-public python2-ttystatus
13642 (package
13643 (name "python2-ttystatus")
13644 (version "0.32")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (string-append
13649 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13650 version ".tar.gz"))
13651 (sha256
13652 (base32
13653 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13654 (build-system python-build-system)
13655 (arguments
13656 `(#:python ,python-2))
13657 (home-page "https://liw.fi/ttystatus/")
13658 (synopsis "Python library for showing progress reporting and
13659status updates on terminals")
13660 (description "@code{python2-ttystatus} is a python library for
13661showing progress reporting and status updates on terminals, for
13662command line programs. Output is automatically adapted to the width
13663of the terminal: truncated if it does not fit, and resized if the
13664terminal size changes.")
13665 (license license:gpl3+)))
c220f0b4
AI
13666
13667(define-public python2-tracing
13668 (package
13669 (name "python2-tracing")
13670 (version "0.10")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (string-append
13675 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13676 version ".tar.gz"))
13677 (sha256
13678 (base32
13679 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13680 (build-system python-build-system)
13681 (arguments
13682 `(#:python ,python-2))
13683 (home-page "https://liw.fi/tracing/")
13684 (synopsis "Python debug logging helper")
13685 (description "@code{python2-tracing} is a python library for
13686logging debug messages. It provides a way to turn debugging messages
13687on and off, based on the filename they occur in. It is much faster
13688than using @code{logging.Filter} to accomplish the same thing, which
13689matters when code is run in production mode. The actual logging still
13690happens using the @code{logging} library.")
13691 (license license:gpl3+)))
b6b2ca5d
AI
13692
13693(define-public python2-larch
13694 (package
13695 (name "python2-larch")
13696 (version "1.20151025")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (string-append
13701 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13702 version ".tar.gz"))
13703 (sha256
13704 (base32
13705 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13706 (build-system python-build-system)
13707 (arguments
13708 `(#:python ,python-2))
13709 (propagated-inputs
13710 `(("python2-tracing" ,python2-tracing)))
13711 (home-page "https://liw.fi/larch/")
13712 (synopsis "Python copy-on-write B-tree library")
13713 (description "@code{python2-larch} is an implementation of
13714particular kind of B-tree, based on research by Ohad Rodeh. See
13715@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13716on the data structure.
13717
13718The distinctive feature of this B-tree is that a node is never
13719(conceptually) modified. Instead, all updates are done by
13720copy-on-write. This makes it easy to clone a tree, and modify only the
13721clone, while other processes access the original tree.")
13722 (license license:gpl3+)))
35db2d3c
AP
13723
13724(define-public python-htmlmin
13725 (package
13726 (name "python-htmlmin")
13727 (version "0.1.10")
13728 (source
13729 (origin
13730 (method url-fetch)
13731 (uri (pypi-uri "htmlmin" version))
13732 (sha256
13733 (base32
13734 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13735 (arguments
13736 `(#:tests? #f)) ;htmlmin has no tests
13737 (build-system python-build-system)
13738 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13739 (synopsis "HTML minifier")
13740 (description "@code{htmlmin} is an HTML minifier that just works.
13741It comes with safe defaults and easily configurable options.")
13742 (license license:bsd-3)))
13743
13744(define-public python2-htmlmin
13745 (package-with-python2 python-htmlmin))
78c55663
AP
13746
13747(define-public python-flask-htmlmin
13748 (package
13749 (name "python-flask-htmlmin")
13750 (version "1.2")
13751 (source
13752 (origin
13753 (method url-fetch)
13754 (uri (pypi-uri "Flask-HTMLmin" version))
13755 (sha256
13756 (base32
13757 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13758 (propagated-inputs
13759 `(("python-flask" ,python-flask)
13760 ("python-htmlmin" ,python-htmlmin)))
13761 (build-system python-build-system)
13762 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13763 (synopsis "HTML response minifier for Flask")
13764 (description
13765 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13766 (license license:bsd-3)))
13767
13768(define-public python2-flask-htmlmin
13769 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
13770
13771(define-public python-flask-login
13772 (package
13773 (name "python-flask-login")
13774 (version "0.4.0")
13775 (source
13776 (origin
13777 (method url-fetch)
13778 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13779 version ".tar.gz"))
13780 (file-name (string-append name "-" version ".tar.gz"))
13781 (sha256
13782 (base32
13783 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13784 (arguments
13785 ;; Tests fail PEP8 compliance. See:
13786 ;; https://github.com/maxcountryman/flask-login/issues/340
13787 `(#:tests? #f))
13788 (build-system python-build-system)
13789 (home-page "https://github.com/maxcountryman/flask-login")
13790 (synopsis "User session management for Flask")
13791 (description
13792 "@code{Flask-Login} provides user session management for Flask. It
13793handles the common tasks of logging in, logging out, and remembering your
13794users' sessions over extended periods of time.")
13795 (license license:expat)))
13796
13797(define-public python2-flask-login
13798 (package-with-python2 python-flask-login))
d5ef113c
AI
13799
13800(define-public python-astroid
13801 (package
13802 (name "python-astroid")
13803 (version "1.4.9")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (string-append
13808 "https://github.com/PyCQA/astroid/archive/astroid-"
13809 version ".tar.gz"))
13810 (sha256
13811 (base32
13812 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13813 (build-system python-build-system)
13814 (propagated-inputs
13815 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13816 ("python-six" ,python-six)
13817 ("python-wrapt" ,python-wrapt)))
13818 (arguments
13819 `(#:phases
13820 (modify-phases %standard-phases
13821 (replace 'check
13822 (lambda _
13823 (zero? (system* "python" "-m" "unittest" "discover"
13824 "-p" "unittest*.py")))))))
13825 (home-page "https://github.com/PyCQA/astroid")
13826 (synopsis "Common base representation of python source code for pylint and
13827other projects")
13828 (description "@code{python-astroid} provides a common base representation
13829of python source code for projects such as pychecker, pyreverse, pylint, etc.
13830
13831It provides a compatible representation which comes from the _ast module. It
13832rebuilds the tree generated by the builtin _ast module by recursively walking
13833down the AST and building an extended ast. The new node classes have
13834additional methods and attributes for different usages. They include some
13835support for static inference and local name scopes. Furthermore, astroid
13836builds partial trees by inspecting living objects.")
13837 (license license:lgpl2.1+)))
13838
13839(define-public python2-astroid
13840 (package-with-python2 python-astroid))
6ba0af79
AI
13841
13842(define-public python-isort
13843 (package
13844 (name "python-isort")
13845 (version "4.2.5")
13846 (source
13847 (origin
13848 (method url-fetch)
13849 (uri (string-append
13850 "https://github.com/timothycrosley/isort/archive/"
13851 version ".tar.gz"))
13852 (file-name (string-append name "-" version ".tar.gz"))
13853 (sha256
13854 (base32
13855 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13856 (build-system python-build-system)
13857 (native-inputs
13858 `(("python-mock" ,python-mock)
13859 ("python-pytest" ,python-pytest)))
13860 (home-page "https://github.com/timothycrosley/isort")
13861 (synopsis "Python utility/library to sort python imports")
13862 (description "@code{python-isort} is a python utility/library to sort
13863imports alphabetically, and automatically separated into sections. It
13864provides a command line utility, a python library and plugins for various
13865editors.")
13866 (license license:expat)))
13867
13868(define-public python2-isort
13869 (package-with-python2 python-isort))
965a083e
AI
13870
13871(define-public python2-backports-functools-lru-cache
13872 (package
13873 (name "python2-backports-functools-lru-cache")
13874 (version "1.3")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 ;; only the pypi tarballs contain the necessary metadata
13879 (uri (pypi-uri "backports.functools_lru_cache" version))
13880 (sha256
13881 (base32
13882 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13883 (build-system python-build-system)
13884 (native-inputs
13885 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13886 (arguments
13887 `(#:python ,python-2))
13888 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13889 (synopsis "Backport of functools.lru_cache from Python 3.3")
13890 (description "@code{python2-backports-functools-lru-cache} is a backport
13891of @code{functools.lru_cache} from python 3.3.")
13892 (license license:expat)))
23db3fc6
AI
13893
13894(define-public python-configparser
13895 (package
13896 (name "python-configparser")
13897 (version "3.5.0")
13898 (source
13899 (origin
13900 (method url-fetch)
13901 (uri (string-append
13902 "https://bitbucket.org/ambv/configparser/get/"
13903 version ".tar.bz2"))
13904 (file-name (string-append name "-" version ".tar.gz"))
13905 (sha256
13906 (base32
13907 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13908 (build-system python-build-system)
13909 (home-page "http://docs.python.org/py3k/library/configparser.html")
13910 (synopsis "Backport of configparser from python 3.5")
13911 (description "@code{python-configparser} is a backport of
13912@code{configparser} from Python 3.5 so that it can be used directly
13913in other versions.")
13914 (license license:expat)))
13915
13916(define-public python2-configparser
13917 (package-with-python2 python-configparser))
61550ded
AI
13918
13919(define-public python2-coverage-test-runner
13920 (package
13921 (name "python2-coverage-test-runner")
13922 (version "1.11")
13923 (source
13924 (origin
13925 (method url-fetch)
13926 (uri (string-append
13927 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13928 "coverage-test-runner/snapshot/coverage-test-runner-"
13929 version ".tar.gz"))
13930 (sha256
13931 (base32
13932 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13933 (build-system python-build-system)
13934 (arguments
13935 `(#:python ,python-2
13936 #:phases
13937 (modify-phases %standard-phases
13938 (replace 'check
13939 (lambda _
13940 (zero? (system* "./testrun")))))))
13941 (propagated-inputs
13942 `(("python2-coverage" ,python2-coverage)))
13943 (home-page "https://liw.fi/coverage-test-runner/")
13944 (synopsis "Python module for running unit tests")
13945 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 13946unit tests and failing them if the unit test module does not exercise all
61550ded
AI
13947statements in the module it tests.")
13948 (license license:gpl3+)))
315944a3
AI
13949
13950(define-public python-pylint
13951 (package
13952 (name "python-pylint")
13953 (version "1.6.5")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (string-append
13958 "https://github.com/PyCQA/pylint/archive/pylint-"
13959 version ".tar.gz"))
13960 (sha256
13961 (base32
13962 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13963 (build-system python-build-system)
13964 (native-inputs
13965 `(("python-tox" ,python-tox)))
13966 (propagated-inputs
13967 `(("python-astroid" ,python-astroid)
13968 ("python-isort" ,python-isort)
13969 ("python-mccabe" ,python-mccabe)
13970 ("python-six" ,python-six)))
13971 (arguments
13972 `(#:phases
13973 (modify-phases %standard-phases
13974 (replace 'check
13975 (lambda _
13976 ;; Somehow, tests for python2-pylint
13977 ;; fail if run from the build directory
13978 (let ((work "/tmp/work"))
13979 (mkdir-p work)
13980 (setenv "PYTHONPATH"
13981 (string-append (getenv "PYTHONPATH") ":" work))
13982 (copy-recursively "." work)
13983 (with-directory-excursion "/tmp"
13984 (zero? (system* "python" "-m" "unittest" "discover"
13985 "-s" (string-append work "/pylint/test")
13986 "-p" "*test_*.py")))))))))
13987 (home-page "https://github.com/PyCQA/pylint")
13988 (synopsis "Python source code analyzer which looks for coding standard
13989errors")
13990 (description "Pylint is a Python source code analyzer which looks
13991for programming errors, helps enforcing a coding standard and sniffs
13992for some code smells (as defined in Martin Fowler's Refactoring book).
13993
13994Pylint has many rules enabled by default, way too much to silence them
13995all on a minimally sized program. It's highly configurable and handle
13996pragmas to control it from within your code. Additionally, it is
13997possible to write plugins to add your own checks.")
13998 (license license:gpl2+)))
13999
14000(define-public python2-pylint
14001 (let ((pylint (package-with-python2 python-pylint)))
14002 (package (inherit pylint)
14003 (propagated-inputs
14004 `(("python2-backports-functools-lru-cache"
14005 ,python2-backports-functools-lru-cache)
14006 ("python2-configparser" ,python2-configparser)
14007 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
14008
14009(define-public python-paramunittest
14010 (package
14011 (name "python-paramunittest")
14012 (version "0.2")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (pypi-uri "ParamUnittest" version))
14017 (sha256
14018 (base32
14019 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14020 (build-system python-build-system)
14021 (home-page
14022 "https://github.com/rik0/ParamUnittest")
14023 (synopsis
14024 "Simple extension to have parametrized unit tests")
14025 (description
14026 "This package allows to create parametrized unit-tests that work with the standard
14027unittest package. A parametrized test case is automatically converted to multiple test
14028cases. Since they are TestCase subclasses, they work with other test suites that
14029recognize TestCases.")
14030 (license license:bsd-2)))
14031
14032(define-public python2-python-paramunittest
14033 (package-with-python2 python-paramunittest))
eec21d4b
MFM
14034
14035(define-public python-mando
14036 (package
14037 (name "python-mando")
14038 (version "0.5")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "mando" version))
14043 (sha256
14044 (base32
14045 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14046 (build-system python-build-system)
14047 (propagated-inputs
14048 `(("python-rst2ansi" ,python-rst2ansi)))
14049 (native-inputs
14050 `(("python-sphinx" ,python-sphinx-1.5.3)
14051 ("python-paramunittest" ,python-paramunittest)))
14052 (home-page "https://mando.readthedocs.org/")
14053 (synopsis
14054 "Wrapper around argparse, allowing creation of complete CLI applications")
14055 (description
14056 "This package is a wrapper around argparse, allowing you to write complete CLI
14057 applications in seconds while maintaining all the flexibility.")
14058 (license license:expat)))
14059
14060(define-public python2-mando
14061 (package-with-python2 python-mando))
b98d4ec0
MFM
14062
14063(define-public python-mando-0.3.1
14064 ;; python-radon (version 1.5.0) has a requirement
14065 ;; for mando<0.4,>=0.3
14066 (package
14067 (inherit python-mando)
14068 (name "python-mando")
14069 (version "0.3.1")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (string-append "https://github.com/rubik/mando/archive/v"
14074 version
14075 ".tar.gz"))
14076 (sha256
14077 (base32
14078 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14079
14080(define-public python-fudge
14081 (package
14082 (name "python-fudge")
14083 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14084 ;; package, which is currently the only use of this package.
14085 (version "0.9.6")
14086 (source
14087 (origin
14088 (method url-fetch)
14089 (uri (pypi-uri "fudge" version))
14090 (sha256
14091 (base32
14092 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14093 (build-system python-build-system)
14094 (arguments
14095 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14096 (home-page "https://github.com/fudge-py/fudge")
14097 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14098 (description
14099 "Fudge is a Python module for using fake objects (mocks and stubs) to
14100test real ones.
14101
14102In readable Python code, you declare the methods available on your fake object
14103and how they should be called. Then you inject that into your application and
14104start testing. This declarative approach means you don’t have to record and
14105playback actions and you don’t have to inspect your fakes after running code.
14106If the fake object was used incorrectly then you’ll see an informative
14107exception message with a traceback that points to the culprit.")
14108 (license license:expat)))
14109
14110(define-public python2-fudge
14111 (package-with-python2 python-fudge))
f3f8d159
DM
14112
14113(define-public python-oauth2client
14114 (package
14115 (name "python-oauth2client")
14116 (version "4.0.0")
14117 (source
14118 (origin
14119 (method url-fetch)
14120 (uri (pypi-uri "oauth2client" version))
14121 (sha256
14122 (base32
14123 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14124 (build-system python-build-system)
14125 (arguments
14126 `(#:tests? #f))
14127 (propagated-inputs
14128 `(("python-httplib2" ,python-httplib2)
14129 ("python-pyasn1" ,python-pyasn1)
14130 ("python-pyasn1-modules" ,python-pyasn1-modules)
14131 ("python-rsa" ,python-rsa)
14132 ("python-six" ,python-six)))
14133 (home-page "http://github.com/google/oauth2client/")
14134 (synopsis "OAuth 2.0 client library")
14135 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14136library for Python")
14137 (license license:asl2.0)))
6e7302e9
DM
14138
14139(define-public python-flask-oidc
14140 (package
14141 (name "python-flask-oidc")
14142 (version "1.1.1")
14143 (source
14144 (origin
14145 (method url-fetch)
14146 (uri (pypi-uri "flask-oidc" version))
14147 (sha256
14148 (base32
14149 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14150 (build-system python-build-system)
14151 (propagated-inputs
14152 `(("python-flask" ,python-flask)
14153 ("python-itsdangerous" ,python-itsdangerous)
14154 ("python-oauth2client" ,python-oauth2client)
14155 ("python-six" ,python-six)))
14156 (native-inputs
14157 `(("python-nose" ,python-nose)
14158 ("python-mock" ,python-mock)))
14159 (home-page "https://github.com/puiterwijk/flask-oidc")
14160 (synopsis "OpenID Connect extension for Flask")
14161 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14162for Flask.")
14163 (license license:bsd-2)))
7e16478f
DM
14164
14165(define-public python-mwclient
14166 (package
14167 (name "python-mwclient")
14168 (version "0.8.4")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 ;; The PyPI version wouldn't contain tests.
14173 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14174 "v" version ".tar.gz"))
14175 (sha256
14176 (base32
14177 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14178 (build-system python-build-system)
14179 (propagated-inputs
14180 `(("python-requests" ,python-requests)
14181 ("python-requests-oauthlib"
14182 ,python-requests-oauthlib)
14183 ("python-six" ,python-six)))
14184 (native-inputs
14185 `(("python-mock" ,python-mock)
14186 ("python-pytest" ,python-pytest)
14187 ("python-pytest-pep8" ,python-pytest-pep8)
14188 ("python-pytest-cache" ,python-pytest-cache)
14189 ("python-pytest-cov" ,python-pytest-cov)
14190 ("python-responses" ,python-responses)))
14191 (home-page "https://github.com/btongminh/mwclient")
14192 (synopsis "MediaWiki API client")
14193 (description "This package provides a MediaWiki API client.")
14194 (license license:expat)))
14195
14196(define-public python2-mwclient
14197 (package-with-python2 python-mwclient))
59a97288
JL
14198
14199(define-public python-pytest-warnings
14200 (package
14201 (name "python-pytest-warnings")
14202 (version "0.2.0")
14203 (source
14204 (origin
14205 (method url-fetch)
14206 (uri (pypi-uri "pytest-warnings" version))
14207 (sha256
14208 (base32
14209 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14210 (build-system python-build-system)
14211 (propagated-inputs
14212 `(("pytest" ,python-pytest-3.0)))
14213 (home-page "https://github.com/fschulze/pytest-warnings")
14214 (synopsis "Pytest plugin to list Python warnings in pytest report")
14215 (description
14216 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14217pytest report.")
14218 (license license:expat)))
14219
14220(define-public python2-pytest-warnings
14221 (package-with-python2 python-pytest-warnings))
2d6e56ba
JL
14222
14223(define-public python-pytest-catchlog
14224 (package
14225 (name "python-pytest-catchlog")
14226 (version "1.2.2")
14227 (source
14228 (origin
14229 (method url-fetch)
14230 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14231 (sha256
14232 (base32
14233 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14234 (build-system python-build-system)
14235 (native-inputs
14236 `(("unzip" ,unzip)))
14237 (propagated-inputs
14238 `(("pytest" ,python-pytest-3.0)))
14239 (home-page "https://github.com/eisensheng/pytest-catchlog")
14240 (synopsis "Pytest plugin to catch log messages")
14241 (description
14242 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14243a fork of pytest-capturelog.")
14244 (license license:expat)))
14245
14246(define-public python2-pytest-catchlog
14247 (package-with-python2 python-pytest-catchlog))
75805449
JL
14248
14249(define-public python-utils
14250 (package
14251 (name "python-utils")
14252 (version "2.1.0")
14253 (source (origin
14254 (method url-fetch)
14255 (uri (pypi-uri "python-utils" version))
14256 (sha256
14257 (base32
14258 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14259 (build-system python-build-system)
14260 (native-inputs
14261 `(("pytest-runner" ,python-pytest-runner)
14262 ("pytest" ,python-pytest)
14263 ("six" ,python-six)))
14264 (home-page "https://github.com/WoLpH/python-utils")
14265 (synopsis "Convenient utilities not included with the standard Python install")
14266 (description
14267 "Python Utils is a collection of small Python functions and classes which
14268make common patterns shorter and easier.")
14269 (license license:bsd-2)))
14270
14271(define-public python2-utils
14272 (package-with-python2 python-utils))
709a5a93
JL
14273
14274(define-public python-webassets
14275 (package
14276 (name "python-webassets")
14277 (version "0.12.1")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "webassets" version))
14282 (sha256
14283 (base32
14284 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14285 (build-system python-build-system)
14286 (native-inputs
14287 `(("python-jinja2" ,python-jinja2)
14288 ("python-mock" ,python-mock)
14289 ("python-nose" ,python-nose)
14290 ("python-pytest" ,python-pytest)))
14291 (home-page "https://github.com/miracle2k/webassets")
14292 (synopsis "Media asset management")
14293 (description "Merges, minifies and compresses Javascript and CSS files,
14294supporting a variety of different filters, including YUI, jsmin, jspacker or
14295CSS tidy. Also supports URL rewriting in CSS files.")
14296 (license license:bsd-2)))
4c066b72
JL
14297
14298(define-public python-sphinx-me
14299 (package
14300 (name "python-sphinx-me")
14301 (version "0.3")
14302 (source
14303 (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "sphinx-me" version))
14306 (sha256
14307 (base32
14308 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14309 (build-system python-build-system)
14310 (home-page "https://github.com/stephenmcd/sphinx-me")
14311 (synopsis "Create a Sphinx documentation shell")
14312 (description
14313 "Create a Sphinx documentation shell for your project and include the
14314README file as the documentation index. It handles extracting the required
14315meta data such as the project name, author and version from your project for
14316use in your Sphinx docs.")
14317 (license license:bsd-2)))
14318
14319(define-public python2-sphinx-me
14320 (package-with-python2 python-sphinx-me))
03ded2fd
JL
14321
14322(define-public python-cssmin
14323 (package
14324 (name "python-cssmin")
14325 (version "0.2.0")
14326 (source
14327 (origin
14328 (method url-fetch)
14329 (uri (pypi-uri "cssmin" version))
14330 (sha256
14331 (base32
14332 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14333 (build-system python-build-system)
14334 (home-page "https://github.com/zacharyvoase/cssmin")
14335 (synopsis "Python port of the YUI CSS Compressor")
14336 (description "Python port of the YUI CSS Compressor.")
14337 (license (list license:expat license:bsd-3))))
14338
14339(define-public python2-cssmin
14340 (package-with-python2 python-cssmin))
186d4f8d
JL
14341
14342(define-public python-diff-match-patch
14343 (package
14344 (name "python-diff-match-patch")
14345 (version "20121119")
14346 (source
14347 (origin
14348 (method url-fetch)
14349 (uri (pypi-uri "diff-match-patch" version))
14350 (sha256
14351 (base32
14352 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14353 (build-system python-build-system)
14354 (home-page "https://code.google.com/p/google-diff-match-patch")
14355 (synopsis "Synchronize plain text")
14356 (description "Diff Match and Patch libraries offer robust algorithms to
14357perform the operations required for synchronizing plain text.")
14358 (license license:asl2.0)))
14359
14360(define-public python2-diff-match-patch
14361 (package-with-python2 python-diff-match-patch))
d15a4791
JL
14362
14363(define-public python-dirsync
14364 (package
14365 (name "python-dirsync")
14366 (version "2.2.2")
14367 (source
14368 (origin
14369 (method url-fetch)
14370 (uri (pypi-uri "dirsync" version ".zip"))
14371 (sha256
14372 (base32
14373 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14374 (build-system python-build-system)
14375 (native-inputs
14376 `(("unzip" ,unzip)))
14377 (propagated-inputs
14378 `(("six" ,python-six)))
14379 (home-page "https://bitbucket.org/tkhyn/dirsync")
14380 (synopsis "Advanced directory tree synchronisation tool")
14381 (description "Advanced directory tree synchronisation tool.")
14382 (license license:expat)))
14383
14384(define-public python2-dirsync
14385 (package-with-python2 python-dirsync))
1b16f1ec
JL
14386
14387(define-public python-nosexcover
14388 (package
14389 (name "python-nosexcover")
14390 (version "1.0.11")
14391 (source (origin
14392 (method url-fetch)
14393 (uri (pypi-uri "nosexcover" version))
14394 (sha256
14395 (base32
14396 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14397 (build-system python-build-system)
14398 (propagated-inputs
14399 `(("python-coverage" ,python-coverage)
14400 ("python-nose" ,python-nose)))
14401 (home-page "http://github.com/cmheisel/nose-xcover")
14402 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14403 (description "Nose-xcover is a companion to the built-in
14404@code{nose.plugins.cover}. This plugin will write out an XML coverage report
14405to a file named coverage.xml.
14406
14407It will honor all the options you pass to the Nose coverage plugin,
14408especially -cover-package.")
14409 (license license:expat)))
14410
14411(define-public python2-nosexcover
14412 (package-with-python2 python-nosexcover))
afdfbb1d
JL
14413
14414(define-public python-elasticsearch
14415 (package
14416 (name "python-elasticsearch")
14417 (version "1.0.0")
14418 (source
14419 (origin
14420 (method url-fetch)
14421 (uri (pypi-uri "elasticsearch" version))
14422 (sha256
14423 (base32
14424 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14425 (build-system python-build-system)
14426 (native-inputs
14427 `(("python-mock" ,python-mock)
14428 ("python-nosexcover" ,python-nosexcover)
14429 ("python-pyaml" ,python-pyaml)
14430 ("python-requests" ,python-requests)))
14431 (propagated-inputs
14432 `(("urllib3" ,python-urllib3)))
14433 (arguments
14434 ;; tests require the test_elasticsearch module but it is not distributed.
14435 `(#:tests? #f))
14436 (home-page "https://github.com/elastic/elasticsearch-py")
14437 (synopsis "Low-level client for Elasticsearch")
14438 (description "Official low-level client for Elasticsearch. Its goal is to
14439provide common ground for all Elasticsearch-related code in Python; because of
14440this it tries to be opinion-free and very extendable.")
14441 (license license:expat)))
14442
14443(define-public python2-elasticsearch
14444 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
14445
14446(define-public python-levenshtein
14447 (package
14448 (name "python-levenshtein")
14449 (version "0.12.0")
14450 (source
14451 (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "python-Levenshtein" version))
14454 (sha256
14455 (base32
14456 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14457 (build-system python-build-system)
14458 (home-page "https://github.com/ztane/python-Levenshtein")
14459 (synopsis "Fast computation of Levenshtein distance and string similarity")
14460 (description
14461 "The Levenshtein Python C extension module contains functions for fast computation of
14462@enumerate
14463@item Levenshtein (edit) distance, and edit operations
14464@item string similarity
14465@item approximate median strings, and generally string averaging
14466@item string sequence and set similarity
14467@end enumerate
14468It supports both normal and Unicode strings.")
14469 (license license:gpl2+)))
14470
14471(define-public python2-levenshtein
14472 (package-with-python2 python-levenshtein))
38a370d2
JL
14473
14474(define-public python-scandir
14475 (package
14476 (name "python-scandir")
14477 (version "1.4")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "scandir" version))
14482 (sha256
14483 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14484 (build-system python-build-system)
14485 (home-page "https://github.com/benhoyt/scandir")
14486 (synopsis "Directory iteration function")
14487 (description
14488 "Directory iteration function like os.listdir(), except that instead of
14489returning a list of bare filenames, it yields DirEntry objects that include
14490file type and stat information along with the name. Using scandir() increases
14491the speed of os.walk() by 2-20 times (depending on the platform and file
14492system) by avoiding unnecessary calls to os.stat() in most cases.")
14493 (license license:bsd-3)))
14494
14495(define-public python2-scandir
14496 (package-with-python2 python-scandir))
18c25460
JL
14497
14498(define-public python2-stemming
14499 (package
14500 (name "python2-stemming")
14501 (version "1.0.1")
14502 (source
14503 (origin
14504 (method url-fetch)
14505 (uri (pypi-uri "stemming" version))
14506 (sha256
14507 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14508 (build-system python-build-system)
14509 (arguments
14510 `(#:python ,python-2))
14511 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14512 (synopsis "Python implementations of various stemming algorithms")
14513 (description
14514 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14515stemming algorithms for English. These implementations are straightforward and
14516efficient, unlike some Python versions of the same algorithms available on the
14517Web. This package is an extraction of the stemming code included in the Whoosh
14518search engine.")
14519 (license license:public-domain)))
54153b85
JL
14520
14521(define-public python-factory-boy
14522 (package
14523 (name "python-factory-boy")
14524 (version "2.8.1")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "factory_boy" version))
14529 (sha256
14530 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14531 (build-system python-build-system)
14532 (arguments
14533 ;; Tests are not included in the tarball.
14534 `(#:tests? #f))
14535 (propagated-inputs
14536 `(("faker" ,python-faker)))
14537 (home-page "https://github.com/benhoyt/scandir")
14538 (synopsis "Versatile test fixtures replacement")
14539 (description
14540 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14541
14542As a fixtures replacement tool, it aims to replace static, hard to maintain
14543fixtures with easy-to-use factories for complex object.
14544
14545Instead of building an exhaustive test setup with every possible combination
14546of corner cases, factory_boy allows you to use objects customized for the
14547current test, while only declaring the test-specific fields")
14548 (license license:expat)))
14549
14550(define-public python2-factory-boy
14551 (package-with-python2 python-factory-boy))
5f25fd69
JL
14552
14553(define-public python-translate-toolkit
14554 (package
14555 (name "python-translate-toolkit")
14556 (version "2.1.0")
14557 (source
14558 (origin
14559 (method url-fetch)
14560 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14561 (sha256
14562 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14563 (build-system python-build-system)
14564 (native-inputs
14565 `(("python-pytest" ,python-pytest)
14566 ("python-sphinx" ,python-sphinx)))
14567 (propagated-inputs
14568 `(("python-babel" ,python-babel)
14569 ("python-beautifulsoup4" ,python-beautifulsoup4)
14570 ("python-chardet" ,python-chardet)
14571 ("python-diff-match-patch" ,python-diff-match-patch)
14572 ("python-levenshtein" ,python-levenshtein)
14573 ("python-lxml" ,python-lxml)
14574 ("python-six" ,python-six)
14575 ("python-vobject" ,python-vobject)
14576 ("python-pyyaml" ,python-pyyaml)))
14577 (arguments
14578 ;; TODO: tests are not run, because they end with
14579 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14580 ;; 'parse_funcs'
14581 ;; during test setup.
14582 `(#:tests? #f))
14583 (home-page "http://toolkit.translatehouse.org")
14584 (synopsis "Tools and API for translation and localization engineering")
14585 (description
14586 "Tools and API for translation and localization engineering. It contains
14587several utilities, as well as an API for building localization tools.")
14588 (license license:gpl2+)))
14589
14590(define-public python2-translate-toolkit
14591 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
14592
14593(define-public python-mysqlclient
14594 (package
14595 (name "python-mysqlclient")
14596 (version "1.3.10")
14597 (source
14598 (origin
14599 (method url-fetch)
14600 (uri (pypi-uri "mysqlclient" version))
14601 (sha256
14602 (base32
14603 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14604 (build-system python-build-system)
14605 (native-inputs
14606 `(("mariadb" ,mariadb)
14607 ("nose" ,python-nose)
14608 ("mock" ,python-mock)
14609 ("py.test" ,python-pytest)))
14610 (inputs
14611 `(("mysql" ,mysql)
14612 ("libz" ,zlib)
14613 ("openssl" ,openssl)))
14614 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14615 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14616 (description "MySQLdb is an interface to the popular MySQL database server
14617for Python. The design goals are:
14618@enumerate
14619@item Compliance with Python database API version 2.0 [PEP-0249],
14620@item Thread-safety,
14621@item Thread-friendliness (threads will not block each other).
14622@end enumerate")
14623 (license license:gpl2)))
14624
14625(define-public python2-mysqlclient
14626 (package-with-python2 python-mysqlclient))
c009e934
JL
14627
14628(define-public python-hiredis
14629 (package
14630 (name "python-hiredis")
14631 (version "0.2.0")
14632 (source
14633 (origin
14634 (method url-fetch)
14635 (uri (pypi-uri "hiredis" version))
14636 (sha256
14637 (base32
14638 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14639 (build-system python-build-system)
14640 (arguments
14641 ;; no tests
14642 `(#:tests? #f))
14643 (home-page "https://github.com/redis/hiredis-py")
14644 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14645 (description "Python-hiredis is a python extension that wraps protocol
14646parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14647 (license license:bsd-3)))
14648
14649(define-public python2-hiredis
14650 (package-with-python2 python-hiredis))
91154d4a
JL
14651
14652(define-public python-fakeredis
14653 (package
14654 (name "python-fakeredis")
14655 (version "0.8.2")
14656 (source
14657 (origin
14658 (method url-fetch)
14659 (uri (pypi-uri "fakeredis" version))
14660 (sha256
14661 (base32
14662 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14663 (build-system python-build-system)
14664 (arguments
14665 ;; no tests
14666 `(#:tests? #f))
14667 (home-page "https://github.com/jamesls/fakeredis")
14668 (synopsis "Fake implementation of redis API for testing purposes")
14669 (description "Fakeredis is a pure python implementation of the redis-py
14670python client that simulates talking to a redis server. This was created for a
14671single purpose: to write unittests. Setting up redis is not hard, but many time
14672 you want to write unittests that do not talk to an external server (such as
14673redis). This module now allows tests to simply use this module as a reasonable
14674substitute for redis.")
14675 (license license:bsd-3)))
14676
14677(define-public python2-fakeredis
14678 (package-with-python2 python-fakeredis))
d1693269
DM
14679
14680(define-public python-behave-web-api
14681 (package
14682 (name "python-behave-web-api")
14683 (version "1.0.6")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "behave-web-api" version))
14688 (sha256
14689 (base32
14690 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14691 (build-system python-build-system)
14692 (arguments
14693 `(#:phases
14694 (modify-phases %standard-phases
14695 (add-after 'unpack 'fix-dependencies
14696 (lambda _
14697 (substitute* "setup.py"
14698 (("'wheel'") "") ; We don't use it.
14699 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14700 (propagated-inputs
14701 `(("behave" ,behave)
14702 ("python-requests" ,python-requests)))
14703 (home-page "https://github.com/jefersondaniel/behave-web-api")
14704 (synopsis "Provides testing for JSON APIs with Behave for Python")
14705 (description "This package provides testing utility modules for testing
14706JSON APIs with Behave.")
14707 (license license:expat)))
14708
14709(define-public python2-behave-web-api
14710 (package-with-python2 python-behave-web-api))
75baf319
DM
14711
14712(define-public python-flask-script
14713 (package
14714 (name "python-flask-script")
14715 (version "2.0.5")
14716 (source
14717 (origin
14718 (method url-fetch)
14719 (uri (pypi-uri "Flask-Script" version))
14720 (sha256
14721 (base32
14722 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14723 (build-system python-build-system)
14724 (propagated-inputs
14725 `(("python-flask" ,python-flask)
14726 ("python-argcomplete" ,python-argcomplete)
14727 ("python-werkzeug" ,python-werkzeug)))
14728 (native-inputs
14729 `(("python-pytest" ,python-pytest)))
14730 (home-page
14731 "http://github.com/smurfix/flask-script")
14732 (synopsis "Scripting support for Flask")
14733 (description "The Flask-Script extension provides support for writing
14734external scripts in Flask. This includes running a development server,
14735a customised Python shell, scripts to set up your database, cronjobs,
14736and other command-line tasks that belong outside the web application
14737itself.")
14738 (license license:bsd-3)))
14739
14740(define-public python2-flask-script
14741 (package-with-python2 python-flask-script))
013e1e85
DM
14742
14743(define-public python-flask-migrate
14744 (package
14745 (name "python-flask-migrate")
14746 (version "2.0.3")
14747 (source
14748 (origin
14749 (method url-fetch)
14750 (uri (pypi-uri "Flask-Migrate" version))
14751 (sha256
14752 (base32
14753 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14754 (build-system python-build-system)
14755 (propagated-inputs
14756 `(("python-flask" ,python-flask)
14757 ("python-alembic" ,python-alembic)
14758 ("python-sqlalchemy" ,python-sqlalchemy)
14759 ("python-flask-script" ,python-flask-script)
14760 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14761 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14762 (synopsis "SQLAlchemy database migrations for Flask programs using
14763Alembic")
14764 (description "This package contains SQLAlchemy database migration tools
14765for Flask programs that are using @code{python-alembic}.")
14766 (license license:expat)))
14767
14768(define-public python2-flask-migrate
14769 (package-with-python2 python-flask-migrate))
c0f5b802
LF
14770
14771(define-public python-packaging
14772 (package
14773 (name "python-packaging")
14774 (version "16.8")
14775 (source
14776 (origin
14777 (method url-fetch)
14778 (uri (pypi-uri "packaging" version))
14779 (sha256
14780 (base32
14781 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14782 (build-system python-build-system)
14783 (native-inputs
14784 `(("python-pretend" ,python-pretend)
14785 ("python-pytest" ,python-pytest)))
14786 (propagated-inputs
14787 `(("python-pyparsing" ,python-pyparsing)
14788 ("python-six" ,python-six)))
14789 (home-page "https://github.com/pypa/packaging")
14790 (synopsis "Core utilities for Python packages")
14791 (description "Packaging is a Python module for dealing with Python packages.
14792It offers an interface for working with package versions, names, and dependency
14793information.")
14794 ;; From 'LICENSE': This software is made available under the terms of
14795 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14796 ;; Contributions to this software is made under the terms of *both* these
14797 ;; licenses.
14798 (license (list license:asl2.0 license:bsd-2))))
14799
14800(define-public python2-packaging
14801 (package-with-python2 python-packaging))