gnu: python-sphinx-cloud-sptheme: Explicitly disable tests.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
7637de23 14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
6bd9ad69 26;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
df893a38 29;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 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>
d205f895 36;;; Copyright © 2016 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>
a01b6da7
NK
39;;;
40;;; This file is part of GNU Guix.
41;;;
42;;; GNU Guix is free software; you can redistribute it and/or modify it
43;;; under the terms of the GNU General Public License as published by
44;;; the Free Software Foundation; either version 3 of the License, or (at
45;;; your option) any later version.
46;;;
47;;; GNU Guix is distributed in the hope that it will be useful, but
48;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50;;; GNU General Public License for more details.
51;;;
52;;; You should have received a copy of the GNU General Public License
53;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
1ffa7090 55(define-module (gnu packages python)
3f641af0 56 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 57 #:use-module (gnu packages)
8e451885 58 #:use-module (gnu packages algebra)
d79a343b 59 #:use-module (gnu packages adns)
89b2e0b0 60 #:use-module (gnu packages attr)
d96034ed 61 #:use-module (gnu packages backup)
3969ca54 62 #:use-module (gnu packages bash)
1ffa7090 63 #:use-module (gnu packages compression)
4ed20663 64 #:use-module (gnu packages databases)
ddc63a56 65 #:use-module (gnu packages django)
5e1c9367 66 #:use-module (gnu packages file)
4ed20663 67 #:use-module (gnu packages fontutils)
4ed20663
AE
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
6eb7af2a 70 #:use-module (gnu packages gl)
4ed20663 71 #:use-module (gnu packages glib)
c227458a 72 #:use-module (gnu packages graphviz)
6eb7af2a 73 #:use-module (gnu packages gstreamer)
4ed20663 74 #:use-module (gnu packages gtk)
421a80a2 75 #:use-module (gnu packages icu4c)
c937562e 76 #:use-module (gnu packages image)
4ed20663 77 #:use-module (gnu packages imagemagick)
d79a343b 78 #:use-module (gnu packages libevent)
b10ab723 79 #:use-module (gnu packages libffi)
89b2e0b0 80 #:use-module (gnu packages linux)
ed118043 81 #:use-module (gnu packages man)
0da98533 82 #:use-module (gnu packages maths)
4ed20663 83 #:use-module (gnu packages multiprecision)
45203542 84 #:use-module (gnu packages networking)
be7134bf 85 #:use-module (gnu packages ncurses)
b04a52a6 86 #:use-module (gnu packages openstack)
d488d5d6 87 #:use-module (gnu packages password-utils)
c9b1b4f9 88 #:use-module (gnu packages pcre)
4ed20663 89 #:use-module (gnu packages perl)
b10ab723 90 #:use-module (gnu packages pkg-config)
06ff0837 91 #:use-module (gnu packages protobuf)
4ed20663 92 #:use-module (gnu packages readline)
6eb7af2a 93 #:use-module (gnu packages sdl)
80ce42bd 94 #:use-module (gnu packages shells)
c9b1b4f9 95 #:use-module (gnu packages statistics)
8f9ac901 96 #:use-module (gnu packages tex)
1c65314c 97 #:use-module (gnu packages texinfo)
cc2b77df 98 #:use-module (gnu packages tls)
e25f0174 99 #:use-module (gnu packages version-control)
02f8f804 100 #:use-module (gnu packages video)
8d12be1e 101 #:use-module (gnu packages web)
ce0614dd 102 #:use-module (gnu packages base)
26b307e2 103 #:use-module (gnu packages xml)
6fa14469 104 #:use-module (gnu packages xorg)
0bdc1671 105 #:use-module (gnu packages xdisorg)
4ed20663 106 #:use-module (gnu packages zip)
afa181ff 107 #:use-module (gnu packages tcl)
63bcec71 108 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
109 #:use-module (guix packages)
110 #:use-module (guix download)
ea5456c8 111 #:use-module (guix git-download)
11bb85a1 112 #:use-module (guix utils)
acc26ff1 113 #:use-module (guix build-system gnu)
d8c4998f 114 #:use-module (guix build-system cmake)
898238b9 115 #:use-module (guix build-system python)
1c65314c
FB
116 #:use-module (guix build-system trivial)
117 #:use-module (srfi srfi-1))
a01b6da7 118
45848023 119(define-public python-2.7
a01b6da7
NK
120 (package
121 (name "python")
f0499100 122 (version "2.7.12")
a01b6da7
NK
123 (source
124 (origin
125 (method url-fetch)
9b43a0ff 126 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
127 version "/Python-" version ".tar.xz"))
128 (sha256
129 (base32
f0499100 130 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
131 (patches (search-patches "python-2.7-search-paths.patch"
132 "python-2-deterministic-build-info.patch"
15e57f57 133 "python-2.7-site-prefixes.patch"
c3052d6b 134 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
135 (modules '((guix build utils)))
136 ;; suboptimal to delete failing tests here, but if we delete them in the
137 ;; arguments then we need to make sure to strip out that phase when it
138 ;; gets inherited by python and python-minimal.
139 (snippet
140 '(begin
141 (for-each delete-file
142 '("Lib/test/test_compileall.py"
f0499100 143 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
144 "Lib/test/test_distutils.py"
145 "Lib/test/test_import.py"
146 "Lib/test/test_shutil.py"
147 "Lib/test/test_socket.py"
1bb163b0 148 "Lib/test/test_subprocess.py"))
10a42aa2 149 #t))))
02f0c3b2
LC
150 (outputs '("out"
151 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 152 (build-system gnu-build-system)
3fdc99da 153 (arguments
10a42aa2 154 `(;; 356 tests OK.
e7e7a1eb
EF
155 ;; 6 tests failed:
156 ;; test_compileall test_distutils test_import test_shutil test_socket
157 ;; test_subprocess
158 ;; 39 tests skipped:
ff6f33cf
ED
159 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
160 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
161 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
162 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
163 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
164 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
165 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
166 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
167 ;; test_winreg test_winsound test_zipfile64
168 ;; 4 skips unexpected on linux2:
169 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 170 #:test-target "test"
3fdc99da 171 #:configure-flags
6a20289d
LC
172 (list "--enable-shared" ;allow embedding
173 "--with-system-ffi" ;build ctypes
aaf75c89 174 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
175 (string-append "LDFLAGS=-Wl,-rpath="
176 (assoc-ref %outputs "out") "/lib"))
fd982732 177
d2cc9c7c
LC
178 #:modules ((ice-9 ftw) (ice-9 match)
179 (guix build utils) (guix build gnu-build-system))
fd982732 180 #:phases
46472ecd
MW
181 (modify-phases %standard-phases
182 (add-before
183 'configure 'patch-lib-shells
184 (lambda _
185 ;; Filter for existing files, since some may not exist in all
186 ;; versions of python that are built with this recipe.
187 (substitute* (filter file-exists?
188 '("Lib/subprocess.py"
189 "Lib/popen2.py"
190 "Lib/distutils/tests/test_spawn.py"
191 "Lib/test/test_subprocess.py"))
192 (("/bin/sh") (which "sh")))
dedc8320
LC
193
194 ;; Use zero as the timestamp in .pyc files so that builds are
195 ;; deterministic. TODO: Remove it when this variable is set in
196 ;; gnu-build-system.scm.
a665996f 197 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 198 #t))
5b4e2791
LC
199 (add-before 'configure 'do-not-record-configure-flags
200 (lambda* (#:key configure-flags #:allow-other-keys)
201 ;; Remove configure flags from the installed '_sysconfigdata.py'
202 ;; and 'Makefile' so we don't end up keeping references to the
203 ;; build tools.
204 ;;
205 ;; Preserve at least '--with-system-ffi' since otherwise the
206 ;; thing tries to build libffi, fails, and we end up with a
207 ;; Python that lacks ctypes.
208 (substitute* "configure"
209 (("^CONFIG_ARGS=.*$")
210 (format #f "CONFIG_ARGS='~a'\n"
211 (if (member "--with-system-ffi" configure-flags)
212 "--with-system-ffi"
213 ""))))
214 #t))
46472ecd
MW
215 (add-before
216 'check 'pre-check
217 (lambda _
218 ;; 'Lib/test/test_site.py' needs a valid $HOME
219 (setenv "HOME" (getcwd))
220 #t))
221 (add-after
222 'unpack 'set-source-file-times-to-1980
223 ;; XXX One of the tests uses a ZIP library to pack up some of the
224 ;; source tree, and fails with "ZIP does not support timestamps
225 ;; before 1980". Work around this by setting the file times in the
226 ;; source tree to sometime in early 1980.
227 (lambda _
228 (let ((circa-1980 (* 10 366 24 60 60)))
229 (ftw "." (lambda (file stat flag)
230 (utime file circa-1980 circa-1980)
231 #t))
02f0c3b2 232 #t)))
9ffe61b0
LC
233 (add-after 'install 'remove-tests
234 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
235 ;; because these files are used by some libraries out there.
236 (lambda* (#:key outputs #:allow-other-keys)
237 (let ((out (assoc-ref outputs "out")))
238 (match (scandir (string-append out "/lib")
239 (lambda (name)
240 (string-prefix? "python" name)))
241 ((pythonX.Y)
242 (let ((testdir (string-append out "/lib/" pythonX.Y
243 "/test")))
244 (with-directory-excursion testdir
245 (for-each delete-file-recursively
246 (scandir testdir
247 (match-lambda
248 ((or "." "..") #f)
249 (file
250 (not
251 (string-prefix? "test_support."
252 file))))))
253 (call-with-output-file "__init__.py" (const #t))
254 #t)))))))
216c283b
LC
255 (add-before 'strip 'make-libraries-writable
256 (lambda* (#:key outputs #:allow-other-keys)
257 ;; Make .so files writable so they can be stripped.
258 (let ((out (assoc-ref outputs "out")))
259 (for-each (lambda (file)
260 (chmod file #o755))
261 (find-files (string-append out "/lib")
262 "\\.so"))
263 #t)))
02f0c3b2
LC
264 (add-after 'install 'move-tk-inter
265 (lambda* (#:key outputs #:allow-other-keys)
266 ;; When Tkinter support is built move it to a separate output so
267 ;; that the main output doesn't contain a reference to Tcl/Tk.
268 (let ((out (assoc-ref outputs "out"))
269 (tk (assoc-ref outputs "tk")))
270 (when tk
271 (match (find-files out "tkinter.*\\.so")
272 ((tkinter.so)
273 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
274 ;; want it under TK/lib/pythonX.Y/site-packages.
275 (let* ((len (string-length out))
276 (target (string-append
277 tk "/"
278 (string-drop
279 (dirname (dirname tkinter.so))
280 len)
281 "/site-packages")))
282 (install-file tkinter.so target)
283 (delete-file tkinter.so)))))
284 #t))))))
a01b6da7 285 (inputs
3fdc99da
CR
286 `(("bzip2" ,bzip2)
287 ("gdbm" ,gdbm)
b10ab723 288 ("libffi" ,libffi) ; for ctypes
b88e1b0a 289 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 290 ("openssl" ,openssl)
3fdc99da 291 ("readline" ,readline)
afa181ff
LC
292 ("zlib" ,zlib)
293 ("tcl" ,tcl)
294 ("tk" ,tk))) ; for tkinter
b10ab723
CR
295 (native-inputs
296 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
297 (native-search-paths
298 (list (search-path-specification
299 (variable "PYTHONPATH")
af070955 300 (files '("lib/python2.7/site-packages")))))
f0499100 301 (home-page "https://www.python.org")
afa181ff 302 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
303 (description
304 "Python is a remarkably powerful dynamic programming language that
305is used in a wide variety of application domains. Some of its key
306distinguishing features include: clear, readable syntax; strong
307introspection capabilities; intuitive object orientation; natural
308expression of procedural code; full modularity, supporting hierarchical
309packages; exception-based error handling; and very high level dynamic
310data types.")
3f641af0 311 (license license:psfl)))
acc26ff1 312
45848023
HG
313;; Current 2.x version.
314(define-public python-2 python-2.7)
315
72df6680 316(define-public python-3.5
b24d1cfc 317 (package (inherit python-2)
72df6680 318 (version "3.5.2")
717003e3
LC
319 (source (origin
320 (method url-fetch)
321 (uri (string-append "https://www.python.org/ftp/python/"
322 version "/Python-" version ".tar.xz"))
fc1adab1
AK
323 (patches (search-patches
324 "python-fix-tests.patch"
72df6680 325 "python-3.5-fix-tests.patch"
fc1adab1
AK
326 "python-3-deterministic-build-info.patch"
327 "python-3-search-paths.patch"))
717003e3
LC
328 (patch-flags '("-p0"))
329 (sha256
330 (base32
72df6680 331 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
332 (arguments (substitute-keyword-arguments (package-arguments python-2)
333 ((#:tests? _) #t)))
1aebc0cb
AE
334 (native-search-paths
335 (list (search-path-specification
336 (variable "PYTHONPATH")
0e05d01e
SB
337 (files (list (string-append "lib/python"
338 (version-major+minor version)
339 "/site-packages"))))))))
f26a77ff 340
72df6680
LF
341(define-public python-3.4
342 (package (inherit python-3.5)
343 (version "3.4.5")
344 (source (origin
345 (method url-fetch)
346 (uri (string-append "https://www.python.org/ftp/python/"
347 version "/Python-" version ".tar.xz"))
348 (patches (search-patches
349 "python-fix-tests.patch"
350 "python-3.4-fix-tests.patch"
351 "python-3-deterministic-build-info.patch"
352 "python-3-search-paths.patch"))
353 (patch-flags '("-p0"))
354 (sha256
355 (base32
356 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
357
45848023 358;; Current 3.x version.
72df6680 359(define-public python-3 python-3.5)
45848023
HG
360
361;; Current major version.
362(define-public python python-3)
363
95288fcc
LC
364;; Minimal variants of Python, mostly used to break the cycle between Tk and
365;; Python (Tk -> libxcb -> Python.)
366
367(define-public python2-minimal
368 (package (inherit python-2)
369 (name "python-minimal")
02f0c3b2 370 (outputs '("out"))
95288fcc
LC
371 (arguments
372 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
373 ((#:configure-flags cf)
374 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
375 (inputs '()))) ;none of the optional dependencies
376
377(define-public python-minimal
898238b9 378 (package (inherit python)
95288fcc 379 (name "python-minimal")
02f0c3b2 380 (outputs '("out"))
95288fcc 381
d0b73960 382 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
383 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
384 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
385 (inputs `(("libffi" ,libffi)
386 ("openssl" ,openssl)
95288fcc
LC
387 ("zlib" ,zlib)))))
388
64cb064c
LC
389(define* (wrap-python3 python
390 #:optional
391 (name (string-append (package-name python) "-wrapper")))
898238b9 392 (package (inherit python)
95288fcc 393 (name name)
898238b9
AE
394 (source #f)
395 (build-system trivial-build-system)
02f0c3b2 396 (outputs '("out"))
3969ca54 397 (inputs `(("bash" ,bash)))
3c0f2329 398 (propagated-inputs `(("python" ,python)))
898238b9
AE
399 (arguments
400 `(#:modules ((guix build utils))
401 #:builder
402 (begin
403 (use-modules (guix build utils))
404 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
405 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
406 (mkdir-p bin)
407 (for-each
408 (lambda (old new)
409 (symlink (string-append python old)
410 (string-append bin "/" new)))
3969ca54
SB
411 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
412 `("python" ,"pydoc" ,"idle" ,"pip"))
413 ;; python-config outputs search paths based upon its location,
414 ;; use a bash wrapper to avoid changing its outputs.
415 (let ((bash (string-append (assoc-ref %build-inputs "bash")
416 "/bin/bash"))
417 (old (string-append python "python3-config"))
418 (new (string-append bin "/python-config")))
419 (with-output-to-file new
420 (lambda ()
421 (format #t "#!~a~%" bash)
422 (format #t "exec \"~a\" \"$@\"~%" old)
423 (chmod new #o755)
424 #t)))))))
0d56e3e1
LC
425 (synopsis "Wrapper for the Python 3 commands")
426 (description
427 "This package provides wrappers for the commands of Python@tie{}3.x such
428that they can be invoked under their usual name---e.g., @command{python}
429instead of @command{python3}.")))
430
95288fcc
LC
431(define-public python-wrapper (wrap-python3 python))
432(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 433
aaf625b8
RW
434(define-public python-psutil
435 (package
436 (name "python-psutil")
88535a44 437 (version "4.3.0")
aaf625b8
RW
438 (source
439 (origin
440 (method url-fetch)
f56777be 441 (uri (pypi-uri "psutil" version))
aaf625b8
RW
442 (sha256
443 (base32
88535a44 444 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 445 (build-system python-build-system)
fb08c4fe
MB
446 (arguments
447 ;; FIXME: some tests does not return and times out.
448 '(#:tests? #f))
88535a44 449 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
450 (synopsis "Library for retrieving information on running processes")
451 (description
452 "psutil (Python system and process utilities) is a library for retrieving
453information on running processes and system utilization (CPU, memory, disks,
454network) in Python. It is useful mainly for system monitoring, profiling and
455limiting process resources and management of running processes. It implements
456many functionalities offered by command line tools such as: ps, top, lsof,
457netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
458pidof, tty, taskset, pmap.")
3f641af0 459 (license license:bsd-3)))
aaf625b8
RW
460
461(define-public python2-psutil
462 (package-with-python2 python-psutil))
898238b9 463
f9da1d8a
ED
464(define-public python-passlib
465 (package
466 (name "python-passlib")
1c9f78ec 467 (version "1.7.0")
f9da1d8a
ED
468 (source
469 (origin
470 (method url-fetch)
690e8c66 471 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
472 (sha256
473 (base32
1c9f78ec 474 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
475 (build-system python-build-system)
476 (native-inputs
f3b98f4f 477 `(("python-nose" ,python-nose)))
f22efa01 478 (propagated-inputs
f9da1d8a
ED
479 `(("python-py-bcrypt" ,python-py-bcrypt)))
480 (arguments
481 `(#:phases
482 (alist-cons-before
483 'check 'set-PYTHON_EGG_CACHE
484 ;; some tests require access to "$HOME/.cython"
485 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
486 %standard-phases)))
487 (home-page "https://bitbucket.org/ecollins/passlib")
488 (synopsis
489 "Comprehensive password hashing framework")
490 (description
491 "Passlib is a password hashing library for Python 2 & 3, which provides
492cross-platform implementations of over 30 password hashing algorithms, as well
493as a framework for managing existing password hashes. It's designed to be
494useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
495to providing full-strength password hashing for multi-user application.")
3f641af0 496 (license license:bsd-3)))
f9da1d8a
ED
497
498(define-public python2-passlib
499 (package-with-python2 python-passlib))
500
feb0d9c3
ED
501(define-public python-py-bcrypt
502 (package
503 (name "python-py-bcrypt")
504 (version "0.4")
505 (source
506 (origin
507 (method url-fetch)
508 (uri (string-append
509 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
510 version
511 ".tar.gz"))
512 (sha256
513 (base32
514 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
515 (build-system python-build-system)
feb0d9c3
ED
516 (home-page "https://code.google.com/p/py-bcrypt")
517 (synopsis
518 "Bcrypt password hashing and key derivation")
519 (description
520 "A python wrapper of OpenBSD's Blowfish password hashing code. This
521system hashes passwords using a version of Bruce Schneier's Blowfish block
522cipher with modifications designed to raise the cost of off-line password
523cracking and frustrate fast hardware implementation. The computation cost of
524the algorithm is parametised, so it can be increased as computers get faster.
525The intent is to make a compromise of a password database less likely to
526result in an attacker gaining knowledge of the plaintext passwords (e.g. using
527John the Ripper).")
528 ;; "sha2.c" is under BSD-3;
529 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
530 ;; the rest is under ISC.
3f641af0 531 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
532
533(define-public python2-py-bcrypt
534 (package-with-python2 python-py-bcrypt))
535
536
429fdea1
ED
537(define-public python-paramiko
538 (package
539 (name "python-paramiko")
81b9bbbd 540 (version "1.16.0")
429fdea1
ED
541 (source
542 (origin
543 (method url-fetch)
81b9bbbd 544 (uri (pypi-uri "paramiko" version))
429fdea1
ED
545 (sha256
546 (base32
81b9bbbd 547 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 548 (build-system python-build-system)
49910e6a
MB
549 (arguments
550 '(;; FIXME: One test fails with "EOFError not raised by connect".
551 #:tests? #f))
552 ;; #:phases
553 ;; (modify-phases %standard-phases
554 ;; (replace 'check
555 ;; (lambda _
556 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 557 (propagated-inputs
f22efa01
HG
558 `(("python-pycrypto" ,python-pycrypto)
559 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
560 (home-page "http://www.paramiko.org/")
561 (synopsis "SSHv2 protocol library")
562 (description "Paramiko is a python implementation of the SSHv2 protocol,
563providing both client and server functionality. While it leverages a Python C
564extension for low level cryptography (PyCrypto), Paramiko itself is a pure
565Python interface around SSH networking concepts.")
3f641af0 566 (license license:lgpl2.1+)))
429fdea1
ED
567
568(define-public python2-paramiko
569 (package-with-python2 python-paramiko))
570
571
de73dbf6
ED
572(define-public python-httplib2
573 (package
574 (name "python-httplib2")
286f1bac 575 (version "0.9.2")
de73dbf6
ED
576 (source
577 (origin
578 (method url-fetch)
286f1bac 579 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
580 (sha256
581 (base32
286f1bac 582 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 583 (build-system python-build-system)
286f1bac 584 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
585 (synopsis "Comprehensive HTTP client library")
586 (description
587 "A comprehensive HTTP client library supporting many features left out of
588other HTTP libraries.")
589 (license license:expat)))
590
591(define-public python2-httplib2
592 (package-with-python2 python-httplib2))
593
67039875
ED
594(define-public python-ecdsa
595 (package
596 (name "python-ecdsa")
597 (version "0.13")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append
602 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
603 version
604 ".tar.gz"))
605 (sha256
606 (base32
607 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
608 (build-system python-build-system)
67039875
ED
609 (inputs
610 `(("openssl" ,openssl)))
611 (home-page
612 "http://github.com/warner/python-ecdsa")
613 (synopsis
614 "ECDSA cryptographic signature library (pure python)")
615 (description
616 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
617Curve Digital Signature Algorithm), implemented purely in Python. With this
618library, you can quickly create keypairs (signing key and verifying key), sign
619messages, and verify the signatures. The keys and signatures are very short,
620making them easy to handle and incorporate into other protocols.")
621 (license license:expat)))
622
623(define-public python2-ecdsa
624 (package-with-python2 python-ecdsa))
625
52323f32
ED
626(define-public python-ccm
627 (package
628 (name "python-ccm")
db5567f7 629 (version "2.1.6")
52323f32
ED
630 (source
631 (origin
632 (method url-fetch)
db5567f7 633 (uri (pypi-uri "ccm" version))
52323f32
ED
634 (sha256
635 (base32
db5567f7 636 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 637 (build-system python-build-system)
f22efa01 638 (propagated-inputs
52323f32 639 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
640 ;; Not listed in setup.py, but used in ccmlib/node.py for full
641 ;; functionality
642 ("python-psutil" ,python-psutil)
52323f32
ED
643 ("python-six" ,python-six)))
644 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
645 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
646localhost")
647 (description "Cassandra Cluster Manager is a development tool for testing
648local Cassandra clusters. It creates, launches and removes Cassandra clusters
649on localhost.")
3f641af0 650 (license license:asl2.0)))
52323f32
ED
651
652(define-public python2-ccm
653 (package-with-python2 python-ccm))
654
89114f39 655(define-public python-pytz
acc26ff1 656 (package
89114f39 657 (name "python-pytz")
a5f92ca0 658 (version "2016.10")
acc26ff1
CR
659 (source
660 (origin
661 (method url-fetch)
61c9babb 662 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
663 (sha256
664 (base32
a5f92ca0 665 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 666 (build-system python-build-system)
8498b8cf 667 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 668 (home-page "http://pythonhosted.org/pytz")
9e771e3b 669 (synopsis "Python timezone library")
acc26ff1
CR
670 (description
671 "This library allows accurate and cross platform timezone calculations
672using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 673 (license license:expat)))
5ace6e2f 674
89114f39 675(define-public python2-pytz
11bb85a1 676 (package-with-python2 python-pytz))
89114f39 677
fc50e9c6 678
89114f39 679(define-public python-babel
5ace6e2f 680 (package
89114f39 681 (name "python-babel")
ffb1e98d 682 (version "2.3.4")
5ace6e2f
CR
683 (source
684 (origin
685 (method url-fetch)
b850a6d8 686 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
687 (sha256
688 (base32
ffb1e98d 689 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 690 (build-system python-build-system)
f22efa01 691 (propagated-inputs
f3b98f4f 692 `(("python-pytz" ,python-pytz)))
8498b8cf 693 (arguments `(#:tests? #f)) ; no test target
e1804763 694 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
695 (synopsis
696 "Tools for internationalizing Python applications")
697 (description
698 "Babel is composed of two major parts:
699- tools to build and work with gettext message catalogs
700- a Python interface to the CLDR (Common Locale Data Repository), providing
701access to various locale display names, localized number and date formatting,
702etc. ")
3f641af0 703 (license license:bsd-3)))
89114f39
AE
704
705(define-public python2-babel
11bb85a1 706 (package-with-python2 python-babel))
73adf220 707
ed377cc6
RW
708(define-public python2-backport-ssl-match-hostname
709 (package
710 (name "python2-backport-ssl-match-hostname")
f2d06d46 711 (version "3.5.0.1")
ed377cc6
RW
712 (source
713 (origin
714 (method url-fetch)
715 (uri (string-append
716 "https://pypi.python.org/packages/source/b/"
717 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
718 version ".tar.gz"))
719 (sha256
720 (base32
f2d06d46 721 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 722 (build-system python-build-system)
f2d06d46
EF
723 (arguments
724 `(#:python ,python-2
725 #:tests? #f)) ; no test target
f2d06d46
EF
726 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
727 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
728 (description
729 "This backport brings the ssl.match_hostname() function to users of
730earlier versions of Python. The function checks the hostname in the
731certificate returned by the server to which a connection has been established,
732and verifies that it matches the intended target hostname.")
3f641af0 733 (license license:psfl)))
ed377cc6 734
d205f895
TD
735(define-public python-hdf4
736 (package
737 (name "python-hdf4")
738 (version "0.9")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (pypi-uri name version))
743 (sha256
744 (base32
745 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
746 (build-system python-build-system)
747 (native-inputs `(("nose" ,python-nose)))
748 (propagated-inputs `(("numpy" ,python-numpy)))
749 (inputs
750 `(("hdf4" ,hdf4)
751 ("libjpeg" ,libjpeg)
752 ("zlib" ,zlib)))
753 (arguments
754 `(#:phases
755 (modify-phases %standard-phases
756 (replace 'check
757 (lambda _
758 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
759 ;; on to import numpy. Somehow this works on their CI system.
760 ;; Let's just manage PYTHONPATH here instead.
761 (substitute* "runexamples.sh"
762 (("export PYTHONPATH=.*") ""))
763 (setenv "PYTHONPATH"
764 (string-append (getcwd) ":"
765 (getenv "PYTHONPATH")))
766 (and (zero? (system* "./runexamples.sh"))
767 (zero? (system* "nosetests" "-v"))))))))
768 (home-page "https://github.com/fhs/python-hdf4")
769 (synopsis "Python interface to the NCSA HDF4 library")
770 (description
771 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
772which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
773NetCDF files can also be read and modified. Python-HDF4 is a fork of
774@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
775 (license license:expat)))
776
777(define-public python2-hdf4
778 (package-with-python2 python-hdf4))
779
ef5cbf9b
RW
780(define-public python-h5py
781 (package
782 (name "python-h5py")
fe147c41 783 (version "2.6.0")
ef5cbf9b
RW
784 (source
785 (origin
786 (method url-fetch)
fe147c41 787 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
788 (sha256
789 (base32
fe147c41 790 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 791 (build-system python-build-system)
797e1401
RW
792 (arguments
793 `(#:tests? #f ; no test target
794 #:phases
795 (modify-phases %standard-phases
796 (add-after 'unpack 'fix-hdf5-paths
797 (lambda* (#:key inputs #:allow-other-keys)
798 (let ((prefix (assoc-ref inputs "hdf5")))
799 (substitute* "setup_build.py"
800 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']"))
802 (("'/opt/local/include', '/usr/local/include'")
803 (string-append "'" prefix "/include" "'")))
804 (substitute* "setup_configure.py"
805 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
806 (string-append "['" prefix "/lib" "']")))
807 #t))))))
3c4010b1 808 (propagated-inputs
69866690
HG
809 `(("python-six" ,python-six)
810 ("python-numpy" ,python-numpy)))
ef5cbf9b 811 (inputs
69866690 812 `(("hdf5" ,hdf5)))
ef5cbf9b 813 (native-inputs
fe147c41
EF
814 `(("python-cython" ,python-cython)
815 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
816 (home-page "http://www.h5py.org/")
817 (synopsis "Read and write HDF5 files from Python")
818 (description
819 "The h5py package provides both a high- and low-level interface to the
820HDF5 library from Python. The low-level interface is intended to be a
821complete wrapping of the HDF5 API, while the high-level component supports
822access to HDF5 files, datasets and groups using established Python and NumPy
823concepts.")
9820a028 824 (license license:bsd-3)))
ef5cbf9b
RW
825
826(define-public python2-h5py
9820a028 827 (package-with-python2 python-h5py))
ef5cbf9b 828
ea8450c8
TD
829(define-public python-netcdf4
830 (package
831 (name "python-netcdf4")
832 (version "1.2.6")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "netCDF4" version))
837 (sha256
838 (base32
839 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-cython" ,python-cython)))
843 (propagated-inputs
844 `(("python-numpy" ,python-numpy)))
845 (inputs
846 `(("netcdf" ,netcdf)
847 ("hdf4" ,hdf4)
848 ("hdf5" ,hdf5)))
849 (arguments
850 '(#:phases
851 (modify-phases %standard-phases
852 (replace 'check
853 (lambda _
854 (setenv "NO_NET" "1") ; disable opendap tests
855 (with-directory-excursion "test"
856 (setenv "PYTHONPATH" ; find and add the library we just built
857 (string-append
858 (car (find-files "../build" "lib.*"
859 #:directories? #:t
860 #:fail-on-error? #:t))
861 ":" (getenv "PYTHONPATH")))
862 (zero? (system* "python" "run_all.py"))))))))
863 (home-page
864 "https://github.com/Unidata/netcdf4-python")
865 (synopsis "Python/numpy interface to the netCDF library")
866 (description "Netcdf4-python is a Python interface to the netCDF C
867library. netCDF version 4 has many features not found in earlier
868versions of the library and is implemented on top of HDF5. This module
869can read and write files in both the new netCDF 4 and the old netCDF 3
870format, and can create files that are readable by HDF5 clients. The
871API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
872to users of that module.")
873 ;; The software is mainly ISC, but includes some files covered
874 ;; by the Expat license.
875 (license (list license:isc license:expat))))
876
877(define-public python2-netcdf4
878 (package-with-python2 python-netcdf4))
879
c1448c69
EB
880(define-public python-lockfile
881 (package
882 (name "python-lockfile")
692add53 883 (version "0.12.2")
c1448c69
EB
884 (source
885 (origin
886 (method url-fetch)
887 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
888 "lockfile-" version ".tar.gz"))
889 (sha256
890 (base32
692add53 891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
692add53
BW
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
6a8f26a4 896 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900API for locking files.")
f210e944 901 (license license:expat)))
c1448c69
EB
902
903(define-public python2-lockfile
f210e944 904 (package-with-python2 python-lockfile))
c1448c69 905
5a1a4bf6
EB
906(define-public python-mock
907 (package
908 (name "python-mock")
909 (version "1.0.1")
910 (source
911 (origin
912 (method url-fetch)
6b7877e1 913 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
914 (sha256
915 (base32
916 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
917 (build-system python-build-system)
918 (arguments '(#:test-target "check"))
6b7877e1 919 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 920 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
921 (description
922 "Mock is a library for testing in Python. It allows you to replace parts
923of your system under test with mock objects and make assertions about how they
924have been used.")
bd3fa666 925 (license license:expat)))
5a1a4bf6
EB
926
927(define-public python2-mock
928 (package-with-python2 python-mock))
929
fc50e9c6 930
73adf220
AE
931(define-public python-setuptools
932 (package
933 (name "python-setuptools")
d660f7be 934 (version "31.0.0")
73adf220
AE
935 (source
936 (origin
937 (method url-fetch)
d660f7be 938 (uri (pypi-uri "setuptools" version))
73adf220
AE
939 (sha256
940 (base32
d660f7be 941 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
942 (modules '((guix build utils)))
943 (snippet
944 '(begin
945 ;; Remove included binaries which are used to build self-extracting
946 ;; installers for Windows.
947 ;; TODO: Find some way to build them ourself so we can include them.
948 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
949 #t))))
73adf220 950 (build-system python-build-system)
d3d656c5
AE
951 ;; FIXME: Tests require pytest, which itself relies on setuptools.
952 ;; One could bootstrap with an internal untested setuptools.
73adf220 953 (arguments
824af8ca 954 `(#:tests? #f))
73adf220
AE
955 (home-page "https://pypi.python.org/pypi/setuptools")
956 (synopsis
957 "Library designed to facilitate packaging Python projects")
958 (description
959 "Setuptools is a fully-featured, stable library designed to facilitate
960packaging Python projects, where packaging includes:
961Python package and module definitions,
962distribution package metadata,
963test hooks,
964project installation,
965platform-specific details,
966Python 3 support.")
d660f7be
MB
967 ;; TODO: setuptools now bundles the following libraries:
968 ;; packaging, pyparsing, six and appdirs. How to unbundle?
969 (license (list license:psfl ; setuptools itself
970 license:expat ; six, appdirs, pyparsing
971 license:asl2.0 ; packaging is dual ASL2/BSD-2
972 license:bsd-2))))
73adf220
AE
973
974(define-public python2-setuptools
975 (package-with-python2 python-setuptools))
fc50e9c6 976
aa21c764 977;;; Pycrypto is abandoned upstream:
1194575b 978;;;
aa21c764 979;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 980;;;
aa21c764 981;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
982(define-public python-pycrypto
983 (package
984 (name "python-pycrypto")
985 (version "2.6.1")
986 (source
987 (origin
988 (method url-fetch)
aa21c764
LF
989 (uri (pypi-uri "pycrypto" version))
990 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
991 (sha256
992 (base32
993 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
994 (build-system python-build-system)
cafc3f5a
EB
995 (inputs
996 `(("python" ,python)
997 ("gmp" ,gmp)))
998 (arguments
999 `(#:phases
1000 (alist-cons-before
1001 'build 'set-build-env
1002 ;; pycrypto runs an autoconf configure script behind the scenes
1003 (lambda _
1004 (setenv "CONFIG_SHELL" (which "bash")))
1005 %standard-phases)))
1006 (home-page "http://www.pycrypto.org/")
1007 (synopsis "Cryptographic modules for Python")
1008 (description
1009 "Pycrypto is a collection of both secure hash functions (such as SHA256
1010and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1011etc.). The package is structured to make adding new modules easy.")
3f641af0 1012 (license license:public-domain)))
cafc3f5a 1013
345f0611 1014(define-public python2-pycrypto
1c0059da
EF
1015 (let ((pycrypto (package-with-python2 python-pycrypto)))
1016 (package (inherit pycrypto)
1017 (inputs
1018 `(("python" ,python-2)
1019 ,@(alist-delete
1020 "python"
1021 (package-inputs pycrypto)))))))
345f0611 1022
cafc3f5a
EB
1023(define-public python-keyring
1024 (package
1025 (name "python-keyring")
13f3ff35 1026 (version "8.7")
cafc3f5a
EB
1027 (source
1028 (origin
1029 (method url-fetch)
664e6c3a 1030 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1031 (sha256
1032 (base32
13f3ff35 1033 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1034 (build-system python-build-system)
1035 (native-inputs
13f3ff35 1036 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1037 (propagated-inputs
cafc3f5a
EB
1038 `(("python-pycrypto" ,python-pycrypto)))
1039 (arguments
664e6c3a 1040 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1041 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1042 (synopsis "Store and access your passwords safely")
1043 (description
1044 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1045service from python. It can be used in any application that needs safe
cafc3f5a
EB
1046password storage.")
1047 ;; "MIT" and PSF dual license
f210e944 1048 (license license:x11)))
cafc3f5a 1049
d7af1069 1050(define-public python2-keyring
f210e944 1051 (package-with-python2 python-keyring))
d7af1069 1052
a480bc41
EB
1053(define-public python-six
1054 (package
1055 (name "python-six")
b6ab89ef 1056 (version "1.10.0")
a480bc41
EB
1057 (source
1058 (origin
1059 (method url-fetch)
b6ab89ef 1060 (uri (pypi-uri "six" version))
a480bc41
EB
1061 (sha256
1062 (base32
b6ab89ef 1063 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1064 (build-system python-build-system)
4fd129ee
MB
1065 (native-inputs
1066 `(("python-py" ,python-py)
1067 ("python-pytest" ,python-pytest)))
a480bc41
EB
1068 (home-page "http://pypi.python.org/pypi/six/")
1069 (synopsis "Python 2 and 3 compatibility utilities")
1070 (description
35b9e423 1071 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1072functions for smoothing over the differences between the Python versions with
1073the goal of writing Python code that is compatible on both Python versions.
35b9e423 1074Six supports every Python version since 2.5. It is contained in only one
a480bc41 1075Python file, so it can be easily copied into your project.")
3f641af0 1076 (license license:x11)))
a480bc41 1077
0c20025c
AE
1078(define-public python2-six
1079 (package-with-python2 python-six))
1080
22d7360b 1081(define-public python-dateutil
cafc3f5a
EB
1082 (package
1083 (name "python-dateutil")
6bd9ad69 1084 (version "2.5.3")
cafc3f5a
EB
1085 (source
1086 (origin
1087 (method url-fetch)
394b8060 1088 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1089 (sha256
1090 (base32
6bd9ad69 1091 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
cafc3f5a 1092 (build-system python-build-system)
f22efa01 1093 (propagated-inputs
394b8060 1094 `(("python-six" ,python-six)))
b5a5fb19 1095 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1096 (synopsis "Extensions to the standard datetime module")
1097 (description
1098 "The dateutil module provides powerful extensions to the standard
1099datetime module, available in Python 2.3+.")
f210e944 1100 (license license:bsd-3)))
cafc3f5a 1101
fc50e9c6
AE
1102(define-public python2-dateutil
1103 (package-with-python2 python-dateutil))
1d08c01f 1104
cafc3f5a
EB
1105(define-public python-parsedatetime
1106 (package
1107 (name "python-parsedatetime")
eebf6f01 1108 (version "2.1")
cafc3f5a
EB
1109 (source
1110 (origin
1111 (method url-fetch)
eebf6f01 1112 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1113 (sha256
1114 (base32
eebf6f01 1115 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1116 (build-system python-build-system)
1117 (native-inputs
eebf6f01
EF
1118 `(("python-nose" ,python-nose)
1119 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1120 (home-page "http://github.com/bear/parsedatetime/")
1121 (synopsis
1122 "Parse human-readable date/time text")
1123 (description
e881752c 1124 "Parse human-readable date/time text.")
f210e944 1125 (license license:asl2.0)))
cafc3f5a 1126
38b8f9b2 1127(define-public python2-parsedatetime
f210e944 1128 (package-with-python2 python-parsedatetime))
38b8f9b2 1129
d072efcb
RW
1130(define-public python-pandas
1131 (package
1132 (name "python-pandas")
7d0c3c8d 1133 (version "0.18.1")
d072efcb
RW
1134 (source
1135 (origin
1b96f069 1136 (method url-fetch)
7d0c3c8d
EF
1137 (uri (string-append
1138 "https://pypi.python.org/packages/11/09/"
1139 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1140 "pandas-" version ".tar.gz"))
1b96f069 1141 (sha256
7d0c3c8d 1142 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1143 (build-system python-build-system)
d072efcb 1144 (propagated-inputs
f22efa01
HG
1145 `(("python-numpy" ,python-numpy)
1146 ("python-pytz" ,python-pytz)
22d7360b 1147 ("python-dateutil" ,python-dateutil)))
d072efcb 1148 (native-inputs
abcc7a0e
HG
1149 `(("python-nose" ,python-nose)
1150 ("python-cython" ,python-cython)))
d072efcb
RW
1151 (home-page "http://pandas.pydata.org")
1152 (synopsis "Data structures for data analysis, time series, and statistics")
1153 (description
1154 "Pandas is a Python package providing fast, flexible, and expressive data
1155structures designed to make working with structured (tabular,
1156multidimensional, potentially heterogeneous) and time series data both easy
1157and intuitive. It aims to be the fundamental high-level building block for
1158doing practical, real world data analysis in Python.")
f210e944 1159 (license license:bsd-3)))
d072efcb
RW
1160
1161(define-public python2-pandas
f210e944 1162 (package-with-python2 python-pandas))
d072efcb 1163
cafc3f5a
EB
1164(define-public python-tzlocal
1165 (package
1166 (name "python-tzlocal")
ed80839b 1167 (version "1.2.2")
cafc3f5a
EB
1168 (source
1169 (origin
1170 (method url-fetch)
226d3331 1171 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1172 (sha256
1173 (base32
ed80839b 1174 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1175 (build-system python-build-system)
f22efa01
HG
1176 (propagated-inputs
1177 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1178 (home-page "https://github.com/regebro/tzlocal")
1179 (synopsis
35b9e423 1180 "Local timezone information for Python")
cafc3f5a
EB
1181 (description
1182 "Tzlocal returns a tzinfo object with the local timezone information.
1183This module attempts to fix a glaring hole in pytz, that there is no way to
1184get the local timezone information, unless you know the zoneinfo name, and
1185under several distributions that's hard or impossible to figure out.")
3f641af0 1186 (license license:cc0)))
cafc3f5a 1187
1d08c01f
AE
1188(define-public python2-pysqlite
1189 (package
1190 (name "python2-pysqlite")
e80aaeb4 1191 (version "2.8.3")
1d08c01f
AE
1192 (source
1193 (origin
1194 (method url-fetch)
fe476868 1195 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1196 (sha256
1197 (base32
e80aaeb4 1198 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1199 (build-system python-build-system)
1200 (inputs
1201 `(("sqlite" ,sqlite)))
1202 (arguments
1203 `(#:python ,python-2 ; incompatible with Python 3
1204 #:tests? #f)) ; no test target
fe476868 1205 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1206 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1207 (description
1208 "Pysqlite provides SQLite bindings for Python that comply to the
1209Database API 2.0T.")
ed0cdf83 1210 (license license:zlib)))
1d08c01f 1211
2875caf5
AE
1212
1213(define-public python2-mechanize
1214 (package
1215 (name "python2-mechanize")
1216 (version "0.2.5")
1217 (source
1218 (origin
1219 (method url-fetch)
1220 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1221 version ".tar.gz"))
1222 (sha256
1223 (base32
1224 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1225 (build-system python-build-system)
2875caf5
AE
1226 (arguments
1227 `(#:python ,python-2 ; apparently incompatible with Python 3
1228 #:tests? #f))
1229 ;; test fails with message
1230 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1231 ;; (python-3.3.2) or
1232 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1233 ;; (python-2.7.5).
1234 ;; The source code is from March 2011 and probably not up-to-date
1235 ;; with respect to python unit tests.
1236 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1237 (synopsis
1238 "Stateful programmatic web browsing in Python")
1239 (description
1240 "Mechanize implements stateful programmatic web browsing in Python,
1241after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1242 (license (license:non-copyleft
1243 "file://COPYING"
1244 "See COPYING in the distribution."))))
2875caf5 1245
0352532e
AE
1246
1247(define-public python-simplejson
1248 (package
1249 (name "python-simplejson")
b2e6e150 1250 (version "3.10.0")
0352532e
AE
1251 (source
1252 (origin
1253 (method url-fetch)
988d1bad 1254 (uri (pypi-uri "simplejson" version))
0352532e
AE
1255 (sha256
1256 (base32
b2e6e150 1257 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1258 (build-system python-build-system)
1259 (home-page "http://simplejson.readthedocs.org/en/latest/")
1260 (synopsis
1261 "Json library for Python")
1262 (description
e881752c
AK
1263 "JSON (JavaScript Object Notation) is a subset of JavaScript
1264syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1265format.
0352532e
AE
1266
1267Simplejson exposes an API familiar to users of the standard library marshal
1268and pickle modules. It is the externally maintained version of the json
1269library contained in Python 2.6, but maintains compatibility with Python 2.5
1270and (currently) has significant performance advantages, even without using
1271the optional C extension for speedups. Simplejson is also supported on
1272Python 3.3+.")
3f641af0 1273 (license license:x11)))
0352532e
AE
1274
1275(define-public python2-simplejson
1276 (package-with-python2 python-simplejson))
421a80a2
AE
1277
1278
ed07b08d 1279(define-public python-pyicu
421a80a2 1280 (package
ed07b08d 1281 (name "python-pyicu")
2e161eaf 1282 (version "1.9.5")
421a80a2
AE
1283 (source
1284 (origin
1285 (method url-fetch)
2e161eaf 1286 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1287 (sha256
1288 (base32
2e161eaf 1289 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2
AE
1290 (build-system python-build-system)
1291 (inputs
1292 `(("icu4c" ,icu4c)))
421a80a2 1293 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1294 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1295 (description
1296 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1297 (license license:x11)))
ed07b08d
LF
1298
1299(define-public python2-pyicu
f210e944 1300 (package-with-python2 python-pyicu))
cc20a22a
LC
1301
1302(define-public python2-dogtail
1303 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1304 ;; spaces in indentation" with Python 3.
1305 (package
1306 (name "python2-dogtail")
1307 (version "0.8.2")
1308 (source (origin
1309 (method url-fetch)
1310 (uri (string-append
1311 "https://fedorahosted.org/released/dogtail/dogtail-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
1315 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1316 (build-system python-build-system)
1317 (arguments `(#:python ,python-2
1318 #:tests? #f)) ; invalid command "test"
1319 (home-page "https://fedorahosted.org/dogtail/")
1003fbcf 1320 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1321 (description
35b9e423 1322 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1323It uses Accessibility (a11y) technologies to communicate with desktop
1324applications. dogtail scripts are written in Python and executed like any
1325other Python program.")
3f641af0 1326 (license license:gpl2+)))
515e6878 1327
011b18c3
LC
1328(define-public python2-empy
1329 (package
1330 (name "python2-empy")
1331 (version "3.3")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1335 version ".tar.gz"))
1336 (sha256
1337 (base32
1338 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1339 (build-system python-build-system)
1340 (arguments
1341 `(#:python ,python-2
1342 #:phases (alist-replace
1343 'check
1344 (lambda _
1345 (zero? (system* "./test.sh")))
1346 %standard-phases)))
1347 (home-page "http://www.alcyone.com/software/empy/")
1348 (synopsis "Templating system for Python")
1349 (description
1350 "EmPy is a system for embedding Python expressions and statements in
1351template text; it takes an EmPy source file, processes it, and produces
1352output. This is accomplished via expansions, which are special signals to the
1cd4027c 1353EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1354EmPy can expand arbitrary Python expressions and statements in this way, as
1355well as a variety of special forms. Textual data not explicitly delimited in
1356this way is sent unaffected to the output, allowing Python to be used in
1357effect as a markup language. Also supported are callbacks via hooks,
1358recording and playback via diversions, and dynamic, chainable filters. The
1359system is highly configurable via command line options and embedded
1360commands.")
3f641af0 1361 (license license:lgpl2.1+)))
011b18c3 1362
8deeda0c
LC
1363(define-public python2-element-tree
1364 (package
1365 (name "python2-element-tree")
1366 (version "1.2.6")
1367 (source (origin
1368 (method url-fetch)
1369 (uri (string-append
1370 "http://effbot.org/media/downloads/elementtree-"
1371 version "-20050316.tar.gz"))
1372 (sha256
1373 (base32
1374 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1375 (build-system python-build-system)
1376 (arguments
1377 `(#:python ,python-2 ; seems to be part of Python 3
1378 #:tests? #f)) ; no 'test' sub-command
1379 (synopsis "Toolkit for XML processing in Python")
1380 (description
1381 "ElementTree is a Python library supporting lightweight XML processing.")
1382 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1383 (license (license:x11-style
1384 "http://docs.python.org/2/license.html"
1385 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1386
1387(define-public python2-pybugz
1388 (package
1389 (name "python2-pybugz")
1390 (version "0.6.11")
1391 (source (origin
1392 (method url-fetch)
1393 (uri (string-append
1394 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1395 version ".tar.gz"))
1396 (sha256
1397 (base32
6f194a1e 1398 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1399 (patches (search-patches "pybugz-stty.patch"
1400 "pybugz-encode-error.patch"))))
8deeda0c
LC
1401 (build-system python-build-system)
1402 (arguments
1403 `(#:python ,python-2 ; SyntaxError with Python 3
1404 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1405 (propagated-inputs
1406 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1407 (synopsis "Python and command-line interface to Bugzilla")
1408 (description
1409 "PyBugz is a Python library and command-line tool to query the Bugzilla
1410bug tracking system. It is meant as an aid to speed up interaction with the
1411bug tracker.")
1412 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1413 (license license:gpl2)))
8deeda0c 1414
a480bc41
EB
1415(define-public python-enum34
1416 (package
1417 (name "python-enum34")
d39ae1e5 1418 (version "1.1.0")
a480bc41
EB
1419 (source
1420 (origin
1421 (method url-fetch)
d39ae1e5 1422 (uri (pypi-uri "enum34" version))
a480bc41
EB
1423 (sha256
1424 (base32
d39ae1e5 1425 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1426 (build-system python-build-system)
a480bc41
EB
1427 (arguments
1428 `(#:phases
1429 (alist-replace
1430 'check
1431 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1432 %standard-phases)))
1433 (home-page "https://pypi.python.org/pypi/enum34")
1434 (synopsis "Backported Python 3.4 Enum")
1435 (description
1436 "Enum34 is the new Python stdlib enum module available in Python 3.4
1437backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1438 (license license:bsd-3)))
a480bc41 1439
820acd1b
LF
1440(define-public python2-enum34
1441 (package-with-python2 python-enum34))
1442
a480bc41
EB
1443(define-public python-parse-type
1444 (package
1445 (name "python-parse-type")
1446 (version "0.3.4")
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (string-append "https://pypi.python.org/packages/source/p/"
1451 "parse_type/parse_type-" version ".tar.gz"))
1452 (sha256
1453 (base32
1454 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1455 (build-system python-build-system)
f22efa01 1456 (propagated-inputs
f3b98f4f 1457 `(("python-six" ,python-six)
68f1cdec 1458 ("python-parse" ,python-parse)))
a480bc41
EB
1459 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1460 (home-page "https://github.com/jenisys/parse_type")
1461 (synopsis "Extended parse module")
1462 (description
1463 "Parse_type extends the python parse module.")
3f641af0 1464 (license license:bsd-3)))
a480bc41
EB
1465
1466(define-public python-parse
1467 (package
1468 (name "python-parse")
eb3d3503 1469 (version "1.6.6")
a480bc41
EB
1470 (source
1471 (origin
1472 (method url-fetch)
eb3d3503 1473 (uri (pypi-uri "parse" version))
a480bc41
EB
1474 (sha256
1475 (base32
aa6c09ed
EF
1476 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1477 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1478 (build-system python-build-system)
1479 (arguments
1480 `(#:phases
f9a65318
EF
1481 (modify-phases %standard-phases
1482 (replace 'check
1483 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1484 (home-page "https://github.com/r1chardj0n3s/parse")
1485 (synopsis "Parse strings")
1486 (description
1487 "Parse strings using a specification based on the Python format()
1488syntax.")
3f641af0 1489 (license license:x11)))
a480bc41 1490
d3eff97a
JL
1491(define-public python-polib
1492 (package
1493 (name "python-polib")
1494 (version "1.0.8")
1495 (source (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "polib" version))
1498 (sha256
1499 (base32
1500 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1501 (build-system python-build-system)
1502 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1503 (synopsis "Manipulate, create and modify gettext files")
1504 (description "Polib can manipulate any gettext format (po, pot and mo)
1505files. It can be used to create po files from scratch or to modify
1506existing ones.")
1507 (license license:expat)))
1508
1509(define-public python2-polib
1510 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1511 (package
1512 (inherit base)
1513 (arguments `(,@(package-arguments base)
1514 ;; Tests don't work with python2.
1515 #:tests? #f)))))
a480bc41 1516
515e6878
LC
1517(define-public scons
1518 (package
1519 (name "scons")
a3f61425 1520 (version "2.3.4")
515e6878
LC
1521 (source (origin
1522 (method url-fetch)
de67e922
LF
1523 (uri (string-append "mirror://sourceforge/scons/scons/" version
1524 "/scons-" version ".tar.gz"))
515e6878
LC
1525 (sha256
1526 (base32
a3f61425 1527 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1528 (build-system python-build-system)
1529 (arguments
1530 ;; With Python 3.x, fails to build with a syntax error.
1531 `(#:python ,python-2
b3e8b4bd 1532 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1533 #:tests? #f)) ; no 'python setup.py test' command
1534 (home-page "http://scons.org/")
1535 (synopsis "Software construction tool written in Python")
1536 (description
1537 "SCons is a software construction tool. Think of SCons as an improved,
1538cross-platform substitute for the classic Make utility with integrated
1539functionality similar to autoconf/automake and compiler caches such as ccache.
1540In short, SCons is an easier, more reliable and faster way to build
1541software.")
3f641af0 1542 (license license:x11)))
011b18c3 1543
c15a5c0e
DT
1544(define-public python-extras
1545 (package
1546 (name "python-extras")
1547 (version "0.0.3")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/e/extras/extras-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1557 (build-system python-build-system)
c15a5c0e
DT
1558 (arguments
1559 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1560 '(#:tests? #f))
1561 (home-page "https://github.com/testing-cabal/extras")
1562 (synopsis "Useful extensions to the Python standard library")
1563 (description
1564 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1565 (license license:expat)))
c15a5c0e
DT
1566
1567(define-public python2-extras
1568 (package-with-python2 python-extras))
1569
56ea0efd
DT
1570(define-public python-mimeparse
1571 (package
1572 (name "python-mimeparse")
1573 (version "0.1.4")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (string-append
1578 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1579 version ".tar.gz"))
1580 (sha256
1581 (base32
1582 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1583 (build-system python-build-system)
56ea0efd
DT
1584 (arguments
1585 '(#:tests? #f)) ; no setup.py test command
1586 (home-page
1587 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1588 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1589 (description
1590 "Mimeparse provides basic functions for parsing MIME type names and
1591matching them against a list of media-ranges.")
bd3fa666 1592 (license license:expat)))
56ea0efd
DT
1593
1594(define-public python2-mimeparse
1595 (package-with-python2 python-mimeparse))
1596
4435427e
DT
1597(define-public python-nose
1598 (package
1599 (name "python-nose")
f7cb9841 1600 (version "1.3.7")
4435427e
DT
1601 (source
1602 (origin
1603 (method url-fetch)
f7cb9841 1604 (uri (pypi-uri "nose" version))
4435427e
DT
1605 (sha256
1606 (base32
f7cb9841 1607 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1608 (build-system python-build-system)
4435427e
DT
1609 (arguments
1610 '(#:tests? #f)) ; FIXME: test suite fails
1611 (home-page "http://readthedocs.org/docs/nose/")
1612 (synopsis "Python testing library")
1613 (description
1614 "Nose extends the unittest library to make testing easier.")
3f641af0 1615 (license license:lgpl2.0+)))
4435427e
DT
1616
1617(define-public python2-nose
1618 (package-with-python2 python-nose))
1619
0aea283a
EF
1620(define-public python-nose2
1621 (package
1622 (name "python-nose2")
1623 (version "0.6.5")
1624 (source
1625 (origin
1626 (method url-fetch)
1627 (uri (pypi-uri "nose2" version))
1628 (sha256
1629 (base32
1630 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1631 (build-system python-build-system)
1632 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1633 (propagated-inputs
0aea283a
EF
1634 `(("python-cov-core" ,python-cov-core)
1635 ("python-pytest-cov" ,python-pytest-cov)
1636 ("python-six" ,python-six)))
1637 (home-page "https://github.com/nose-devs/nose2")
1638 (synopsis "Next generation of nicer testing for Python")
1639 (description
1640 "Nose2 is the next generation of nicer testing for Python, based on the
1641plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1642better plugin api, being easier for users to configure, and simplifying internal
1643interfaces and processes.")
1644 (license license:bsd-2)))
1645
1646(define-public python2-nose2
1647 (package-with-python2 python-nose2))
1648
6cd9c356
DT
1649(define-public python-unittest2
1650 (package
1651 (name "python-unittest2")
1652 (version "0.5.1")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (string-append
1657 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1658 version ".tar.gz"))
1659 (sha256
1660 (base32
1661 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1662 (build-system python-build-system)
6cd9c356
DT
1663 (home-page "http://pypi.python.org/pypi/unittest2")
1664 (synopsis "Python unit testing library")
1665 (description
1666 "Unittest2 is a replacement for the unittest module in the Python
1667standard library.")
3f641af0 1668 (license license:psfl)))
6cd9c356
DT
1669
1670(define-public python2-unittest2
1671 (package (inherit python-unittest2)
1672 (name "python2-unittest2")
1673 (version "0.5.1")
1674 (source
1675 (origin
1676 (method url-fetch)
1677 (uri (string-append
1678 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1679 version ".tar.gz"))
1680 (sha256
1681 (base32
1682 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1683 (arguments
1684 `(#:python ,python-2
1685 #:tests? #f)))) ; no setup.py test command
1686
02f8f804 1687(define-public python-pafy
1688 (package
1689 (name "python-pafy")
1690 (version "0.5.2")
1691 (source
1692 (origin
1693 (method url-fetch)
1694 (uri (pypi-uri "pafy" version))
1695 (sha256
1696 (base32
1697 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1698 (build-system python-build-system)
ed3fee5f 1699 (arguments
1700 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1701 (propagated-inputs
1702 ;; Youtube-dl is a python package which is imported in the file
1703 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1704 `(("youtube-dl" ,youtube-dl)))
1705 (home-page "https://np1.github.io/pafy/")
1706 (synopsis "Retrieve YouTube content and metadata")
1707 (description
1708 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1709 (license license:lgpl3+)))
1710
542ad60f
DT
1711(define-public python-py
1712 (package
1713 (name "python-py")
71c8a804 1714 (version "1.4.31")
542ad60f
DT
1715 (source
1716 (origin
1717 (method url-fetch)
71c8a804 1718 (uri (pypi-uri "py" version))
542ad60f
DT
1719 (sha256
1720 (base32
71c8a804 1721 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1722 (build-system python-build-system)
dcb0da7b
MB
1723 (arguments
1724 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1725 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1726 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1727 ;; Is this module globally installed?"
1728 '(#:tests? #f))
542ad60f
DT
1729 (home-page "http://pylib.readthedocs.org/")
1730 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1731 (description
1732 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1733code introspection, and logging.")
bd3fa666 1734 (license license:expat)))
542ad60f
DT
1735
1736(define-public python2-py
1737 (package-with-python2 python-py))
1738
855d4761
DT
1739(define-public python-pytest
1740 (package
1741 (name "python-pytest")
61a4332d 1742 (version "2.7.3")
855d4761
DT
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (string-append
1747 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1748 version ".tar.gz"))
1749 (sha256
1750 (base32
61a4332d 1751 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1752 (modules '((guix build utils)))
1753 (snippet
1754 ;; One of the tests involves the /usr directory, so it fails.
1755 '(substitute* "testing/test_argcomplete.py"
1756 (("def test_remove_dir_prefix\\(self\\):")
1757 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1758 (build-system python-build-system)
482d9591
HG
1759 (propagated-inputs
1760 `(("python-py" ,python-py)))
e7881f3d 1761 (native-inputs
482d9591 1762 `(("python-nose" ,python-nose)
855d4761
DT
1763 ("python-mock" ,python-mock)))
1764 (home-page "http://pytest.org")
1765 (synopsis "Python testing library")
1766 (description
1767 "Pytest is a testing tool that provides auto-discovery of test modules
1768and functions, detailed info on failing assert statements, modular fixtures,
1769and many external plugins.")
bd3fa666 1770 (license license:expat)))
855d4761
DT
1771
1772(define-public python2-pytest
1773 (package-with-python2 python-pytest))
1774
fca4ff35
LF
1775;; This package is used by Borg until we can upgrade all our Python packages to
1776;; use a more recent pytest.
1777(define-public python-pytest-2.9.2
1778 (package
1779 (inherit python-pytest)
1780 (name "python-pytest")
1781 (version "2.9.2")
1782 (source (origin
1783 (method url-fetch)
1784 (uri (pypi-uri "pytest" version))
1785 (sha256
1786 (base32
1787 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1788 (arguments
1789 `(#:phases
1790 (modify-phases %standard-phases
1791 (add-before 'check 'disable-invalid-test
1792 (lambda _
1793 (substitute* "testing/test_argcomplete.py"
1794 (("def test_remove_dir_prefix" line)
1795 (string-append "@pytest.mark.skip"
1796 "(reason=\"Assumes that /usr exists.\")\n "
1797 line)))
1798 #t)))))))
1799
358c3d61
EF
1800(define-public python-pytest-cov
1801 (package
1802 (name "python-pytest-cov")
545f4a1c 1803 (version "2.2.1")
358c3d61
EF
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "pytest-cov" version))
1808 (sha256
545f4a1c
EF
1809 (base32
1810 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1811 (build-system python-build-system)
ce40b383
HG
1812 (arguments
1813 `(#:phases
1814 (modify-phases %standard-phases
1815 (replace 'check
1816 (lambda _
1817 ;; options taken from tox.ini
1818 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1819 ;; with "Duplicate implicit target name"
1820 (zero? (system* "python" "./setup.py" "check"
1821 "--strict" "--metadata")))))))
f22efa01 1822 (propagated-inputs
10468636
EF
1823 `(("python-coverage" ,python-coverage)
1824 ("python-pytest" ,python-pytest)))
10468636
EF
1825 (home-page "https://github.com/pytest-dev/pytest-cov")
1826 (synopsis "Pytest plugin for measuring coverage")
1827 (description
1828 "Pytest-cov produces coverage reports. It supports centralised testing and
1829distributed testing in both @code{load} and @code{each} modes. It also
1830supports coverage of subprocesses.")
f210e944 1831 (license license:expat)))
358c3d61
EF
1832
1833(define-public python2-pytest-cov
f210e944 1834 (package-with-python2 python-pytest-cov))
358c3d61 1835
6784f2e3
RW
1836(define-public python-pytest-runner
1837 (package
1838 (name "python-pytest-runner")
1839 (version "2.6.2")
1840 (source
1841 (origin
1842 (method url-fetch)
54cd239b 1843 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1844 (sha256
1845 (base32
1846 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1847 (build-system python-build-system)
1848 (arguments
1849 `(#:phases
1850 (modify-phases %standard-phases
1851 ;; The fancy way of setting the version with setuptools_scm does not
1852 ;; seem to work here.
1853 (add-after 'unpack 'set-version
1854 (lambda _
1855 (substitute* "docs/conf.py"
1856 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1857 (string-append "version = \"" ,version "\"")))
1858 #t)))))
1859 (native-inputs
1860 `(("python-pytest" ,python-pytest)
1861 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1862 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1863 (synopsis "Invoke py.test as a distutils command")
1864 (description
1865 "This package provides a @command{pytest-runner} command that
1866@file{setup.py} files can use to run tests.")
f210e944 1867 (license license:expat)))
54cd239b
EF
1868
1869(define-public python2-pytest-runner
f210e944 1870 (package-with-python2 python-pytest-runner))
6784f2e3 1871
44547e51
EF
1872(define-public python-pytest-mock
1873 (package
1874 (name "python-pytest-mock")
1875 (version "1.2")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "pytest-mock" version ".zip"))
1880 (sha256
1881 (base32
1882 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1883 (build-system python-build-system)
1884 (native-inputs
1885 `(("unzip" ,unzip)))
f22efa01 1886 (propagated-inputs
d5e41cf2 1887 `(("python-pytest" ,python-pytest)))
44547e51
EF
1888 (home-page "https://github.com/pytest-dev/pytest-mock/")
1889 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1890 (description
1891 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1892around the patching API provided by the @code{mock} package, but with the
1893benefit of not having to worry about undoing patches at the end of a test.
1894The mocker fixture has the same API as @code{mock.patch}, supporting the
1895same arguments.")
1896 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1897 (license license:expat)))
1898
1899(define-public python2-pytest-mock
1900 (let ((base (package-with-python2
1901 (strip-python2-variant python-pytest-mock))))
1902 (package (inherit base)
f22efa01 1903 (propagated-inputs
44547e51 1904 `(("python2-mock" ,python2-mock)
f22efa01 1905 ,@(package-propagated-inputs base))))))
44547e51 1906
8fa58fc9
CAW
1907(define-public python-pytest-xdist
1908 (package
1909 (name "python-pytest-xdist")
1910 (version "1.14")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "pytest-xdist" version ".zip"))
1915 (sha256
1916 (base32
de585a7e
HG
1917 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1918 (modules '((guix build utils)))
1919 (snippet
1920 '(begin
1921 ;; Remove pre-compiled .pyc files from source.
1922 (for-each delete-file-recursively
1923 (find-files "." "__pycache__" #:directories? #t))
1924 (for-each delete-file (find-files "." "\\.pyc$"))
1925 #t))))
8fa58fc9 1926 (build-system python-build-system)
4eb385fb
MB
1927 (arguments
1928 '(#:tests? #f)) ;FIXME: Some tests are failing.
1929 ;; #:phases
1930 ;; (modify-phases %standard-phases
1931 ;; (delete 'check)
1932 ;; (add-after 'install 'check
1933 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1934 ;; (add-installed-pythonpath inputs outputs)
1935 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1936 (native-inputs
1937 `(("unzip" ,unzip)
8fa58fc9 1938 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1939 (propagated-inputs
c4516ad2 1940 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1941 ("python-pytest" ,python-pytest)
1942 ("python-py" ,python-py)))
1943 (home-page
1944 "https://github.com/pytest-dev/pytest-xdist")
1945 (synopsis
1946 "Plugin for py.test with distributed testing and loop-on-failing modes")
1947 (description
1948 "The pytest-xdist plugin extends py.test with some unique test execution
1949modes: parallelization, running tests in boxed subprocesses, the ability
1950to run tests repeatedly when failed, and the ability to run tests on multiple
1951Python interpreters or platforms. It uses rsync to copy the existing
1952program code to a remote location, executes there, and then syncs the
1953result back.")
f210e944 1954 (license license:expat)))
8fa58fc9
CAW
1955
1956(define-public python2-pytest-xdist
f210e944 1957 (package-with-python2 python-pytest-xdist))
8fa58fc9 1958
84d24017
DT
1959(define-public python-scripttest
1960 (package
1961 (name "python-scripttest")
1962 (version "1.3")
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (string-append
1967 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1968 version ".tar.gz"))
1969 (sha256
1970 (base32
1971 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1972 (build-system python-build-system)
521b7772 1973 (native-inputs
f3b98f4f 1974 `(("python-pytest" ,python-pytest)))
84d24017
DT
1975 (home-page "http://pythonpaste.org/scripttest/")
1976 (synopsis "Python library to test command-line scripts")
1977 (description "Scripttest is a Python helper library for testing
1978interactive command-line applications. With it you can run a script in a
1979subprocess and see the output as well as any file modifications.")
bd3fa666 1980 (license license:expat)))
84d24017
DT
1981
1982(define-public python2-scripttest
1983 (package-with-python2 python-scripttest))
1984
d8fa80e1
DT
1985(define-public python-testtools
1986 (package
1987 (name "python-testtools")
7adb9031 1988 (version "1.4.0")
d8fa80e1
DT
1989 (source
1990 (origin
1991 (method url-fetch)
7adb9031 1992 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
1993 (sha256
1994 (base32
7adb9031 1995 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 1996 (build-system python-build-system)
7adb9031
DM
1997 (arguments
1998 `(#:phases
1999 (modify-phases %standard-phases
2000 (add-after 'unpack 'fix-module-imports
2001 (lambda _
2002 (substitute* "setup.py"
2003 (("'unittest2>=0.8.0',") ""))
2004 (substitute* '("testtools/testcase.py"
2005 "testtools/testsuite.py"
2006 "testtools/run.py"
2007 "testtools/tests/test_run.py"
2008 "testtools/tests/test_testsuite.py"
2009 "testtools/tests/test_deferredruntest.py")
2010 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2011 (("import unittest2 as unittest") "import unittest")
2012 (("import unittest2") "import unittest as unittest2")
2013 (("from unittest2 import") "from unittest import"))
2014 (substitute* "testtools/tests/test_testresult.py"
2015 ;; NUL in source code is not allowed (raises ValueError).
2016 (("\\x00\\x04") "\\x04"))
2017 #t)))))
0e88cbf8 2018 (propagated-inputs
f22efa01
HG
2019 `(("python-mimeparse" ,python-mimeparse)
2020 ("python-extras" ,python-extras)))
d8fa80e1
DT
2021 (home-page "https://github.com/testing-cabal/testtools")
2022 (synopsis
2023 "Extensions to the Python standard library unit testing framework")
2024 (description
2025 "Testtools extends the Python standard library unit testing framework to
2026provide matchers, more debugging information, and cross-Python
2027compatibility.")
3f641af0 2028 (license license:psfl)))
d8fa80e1
DT
2029
2030(define-public python2-testtools
2031 (package-with-python2 python-testtools))
2032
5bf3afea
DT
2033(define-public python-testscenarios
2034 (package
2035 (name "python-testscenarios")
2036 (version "0.4")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2042 version ".tar.gz"))
2043 (sha256
2044 (base32
2045 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2046 (build-system python-build-system)
f22efa01 2047 (propagated-inputs
8e73d3ba 2048 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2049 (home-page "https://launchpad.net/testscenarios")
2050 (synopsis "Pyunit extension for dependency injection")
2051 (description
2052 "Testscenarios provides clean dependency injection for Python unittest
2053style tests.")
3f641af0 2054 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2055
2056(define-public python2-testscenarios
2057 (package-with-python2 python-testscenarios))
2058
dac79ecc
DT
2059(define-public python-testresources
2060 (package
2061 (name "python-testresources")
2062 (version "0.2.7")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (string-append
2067 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2068 version ".tar.gz"))
2069 (sha256
2070 (base32
2071 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2072 (build-system python-build-system)
dac79ecc
DT
2073 (home-page "https://launchpad.net/testresources")
2074 (synopsis
2075 "Pyunit extension for managing test resources")
2076 (description
2077 "Testresources is an extension to Python's unittest to allow declarative
2078use of resources by test cases.")
3f641af0 2079 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2080
2081(define-public python2-testresources
2082 (package-with-python2 python-testresources))
2083
070ab058
DT
2084(define-public python-subunit
2085 (package
2086 (name "python-subunit")
2087 (version "0.0.21")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (string-append
2092 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2093 version ".tar.gz"))
2094 (sha256
2095 (base32
2096 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2097 (build-system python-build-system)
f22efa01 2098 (propagated-inputs
b52ad371
HG
2099 `(("python-extras" ,python-extras)
2100 ("python-mimeparse" ,python-mimeparse)))
2101 (native-inputs
2102 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2103 (home-page "http://launchpad.net/subunit")
2104 (synopsis "Python implementation of the subunit protocol")
2105 (description
2106 "Python-subunit is a Python implementation of the subunit test streaming
2107protocol.")
3f641af0 2108 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2109
2110(define-public python2-subunit
2111 (package-with-python2 python-subunit))
2112
d2a8db92
HG
2113;; Recent versions of python-fixtures and python-testrepository need
2114;; python-pbr for packaging, which itself needs these two packages for
2115;; testing.
2116;; To fix this circular dependency, we use a build of python-pbr, based on the
2117;; same source, just without any test dependencies and with tests disabled.
2118;; python-pbr-minmal is then used to package python-fixtures and
2119;; python-testrepository.
2120;; Strictly speaking we currently could remove the test-requirements from the
2121;; normal python-pbr package (and save this package) since test are disabled
2122;; there anyway. But this may change in future.
2123(define python-pbr-minimal
cd49454b 2124 (package
d2a8db92 2125 (name "python-pbr-minimal")
5bbb2249 2126 (version "1.10.0")
7787ef76
CR
2127 (source
2128 (origin
2129 (method url-fetch)
d2a8db92 2130 (uri (pypi-uri "pbr" version))
7787ef76
CR
2131 (sha256
2132 (base32
5bbb2249 2133 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))))
7787ef76
CR
2134 (build-system python-build-system)
2135 (arguments
d2a8db92
HG
2136 `(#:tests? #f))
2137 (home-page "http://docs.openstack.org/developer/pbr/")
2138 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2139 (description
d2a8db92 2140 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2141 (license license:asl2.0)))
7787ef76 2142
d2a8db92
HG
2143(define python2-pbr-minimal
2144 (package-with-python2 python-pbr-minimal))
7787ef76 2145
1ef09c0c 2146(define-public python-pbr
e25f0174 2147 (package
d2a8db92 2148 (inherit python-pbr-minimal)
e25f0174 2149 (name "python-pbr")
e25f0174
BW
2150 (arguments
2151 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2152 (propagated-inputs
d2a8db92
HG
2153 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2154 (native-inputs
e25f0174 2155 `(("python-fixtures" ,python-fixtures)
d2a8db92 2156 ;; discover, coverage, hacking, subunit
e25f0174 2157 ("python-mock" ,python-mock)
d2a8db92 2158 ("python-six" ,python-six)
e25f0174
BW
2159 ("python-sphinx" ,python-sphinx)
2160 ("python-testrepository" ,python-testrepository)
2161 ("python-testresources" ,python-testresources)
2162 ("python-testscenarios" ,python-testscenarios)
2163 ("python-testtools" ,python-testtools)
2164 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2165 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2166 (description
2167 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2168and sensible default behaviors into your setuptools run. It will set
2169versions, process requirements files and generate AUTHORS and ChangeLog file
2170from git information.
2171")))
1ef09c0c
BW
2172
2173(define-public python2-pbr
e25f0174 2174 (package-with-python2 python-pbr))
1ef09c0c 2175
7787ef76
CR
2176(define-public python-fixtures
2177 (package
2178 (name "python-fixtures")
13fcc6df 2179 (version "1.4.0")
7787ef76
CR
2180 (source
2181 (origin
2182 (method url-fetch)
13fcc6df 2183 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2184 (sha256
2185 (base32
13fcc6df 2186 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2187 (build-system python-build-system)
f6c1ef18
MB
2188 (arguments
2189 '(#:phases
2190 (modify-phases %standard-phases
2191 (replace 'check
2192 (lambda _
2193 (zero? (system* "python" "-m" "testtools.run"
2194 "fixtures.test_suite")))))))
7787ef76 2195 (propagated-inputs
ae92cadd 2196 `(("python-six" ,python-six)))
e7881f3d 2197 (native-inputs
f6c1ef18
MB
2198 `(("python-mock" ,python-mock)
2199 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2200 ("python-testtools" ,python-testtools)))
7787ef76
CR
2201 (home-page "https://launchpad.net/python-fixtures")
2202 (synopsis "Python test fixture library")
2203 (description
2204 "Fixtures provides a way to create reusable state, useful when writing
2205Python tests.")
3f641af0 2206 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2207
cd49454b
DT
2208(define-public python2-fixtures
2209 (package-with-python2 python-fixtures))
2210
b24a0c00
DT
2211(define-public python-testrepository
2212 (package
2213 (name "python-testrepository")
2214 (version "0.0.20")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (string-append
2219 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2220 version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2224 (build-system python-build-system)
90110ef9
MB
2225 (arguments
2226 ;; FIXME: Many tests are failing.
2227 '(#:tests? #f))
05de40c5 2228 (propagated-inputs
b2e66edf
HG
2229 `(("python-fixtures" ,python-fixtures)
2230 ("python-subunit" ,python-subunit)
b52ad371
HG
2231 ("python-testtools" ,python-testtools)))
2232 (native-inputs
2233 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2234 ("python-mimeparse" ,python-mimeparse)))
2235 (home-page "https://launchpad.net/testrepository")
2236 (synopsis "Database for Python test results")
2237 (description "Testrepository provides a database of test results which can
2238be used as part of a developer's workflow to check things such as what tests
2239have failed since the last commit or what tests are currently failing.")
3f641af0 2240 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2241
2242(define-public python2-testrepository
2243 (package-with-python2 python-testrepository))
2244
243a009a
DT
2245(define-public python-coverage
2246 (package
2247 (name "python-coverage")
4d4cf3dd 2248 (version "4.1")
243a009a
DT
2249 (source
2250 (origin
2251 (method url-fetch)
82a3c582 2252 (uri (pypi-uri "coverage" version))
243a009a
DT
2253 (sha256
2254 (base32
4d4cf3dd 2255 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2256 (build-system python-build-system)
bd10e677
MB
2257 (arguments
2258 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2259 '(#:tests? #f))
243a009a
DT
2260 (home-page "http://nedbatchelder.com/code/coverage")
2261 (synopsis "Code coverage measurement for Python")
2262 (description
2263 "Coverage measures code coverage, typically during test execution. It
2264uses the code analysis tools and tracing hooks provided in the Python standard
2265library to determine which lines are executable, and which have been
2266executed.")
3f641af0 2267 (license license:bsd-3)))
243a009a
DT
2268
2269(define-public python2-coverage
2270 (package-with-python2 python-coverage))
2271
12f839fd
EF
2272(define-public python-cov-core
2273 (package
2274 (name "python-cov-core")
2275 (version "1.15.0")
2276 (source
2277 (origin
2278 (method url-fetch)
2279 (uri (pypi-uri "cov-core" version))
2280 (sha256
2281 (base32
2282 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2283 (build-system python-build-system)
f78e1c27 2284 (propagated-inputs
12f839fd
EF
2285 `(("python-coverage" ,python-coverage)))
2286 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2287 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2288 (description
49d5e338
TGR
2289 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2290and @code{nose2-cov}. It is useful for developing coverage plugins for these
2291testing frameworks.")
f210e944 2292 (license license:expat)))
12f839fd
EF
2293
2294(define-public python2-cov-core
f210e944 2295 (package-with-python2 python-cov-core))
12f839fd 2296
041358fb
DT
2297(define-public python-discover
2298 (package
2299 (name "python-discover")
2300 (version "0.4.0")
2301 (source
2302 (origin
2303 (method url-fetch)
2304 (uri (string-append
2305 "https://pypi.python.org/packages/source/d/discover/discover-"
2306 version ".tar.gz"))
2307 (sha256
2308 (base32
2309 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2310 (build-system python-build-system)
041358fb
DT
2311 (home-page "http://pypi.python.org/pypi/discover/")
2312 (synopsis
2313 "Python test discovery for unittest")
2314 (description
2315 "Discover provides test discovery for unittest, a feature that has been
e881752c 2316backported from Python 2.7 for Python 2.4+.")
3f641af0 2317 (license license:bsd-3)))
041358fb
DT
2318
2319(define-public python2-discover
2320 (package-with-python2 python-discover))
2321
a480bc41
EB
2322(define-public behave
2323 (package
2324 (name "behave")
287cfd1a 2325 (version "1.2.5")
a480bc41
EB
2326 (source (origin
2327 (method url-fetch)
287cfd1a 2328 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2329 (sha256
2330 (base32
287cfd1a 2331 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2332 (build-system python-build-system)
f22efa01 2333 (propagated-inputs
f3b98f4f 2334 `(("python-six" ,python-six)
a480bc41
EB
2335 ("python-parse" ,python-parse)
2336 ("python-parse-type" ,python-parse-type)))
2337 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2338 ;PyHamcrest>=1.8
2339 (home-page "http://github.com/behave/behave")
2340 (synopsis "Python behavior-driven development")
2341 (description
2342 "Behave is a tool for behavior-driven development in python.
2343Behavior-driven development (or BDD) is an agile software development
2344technique that encourages collaboration between developers, QA and
2345non-technical or business participants in a software project. Behave uses
2346tests written in a natural language style, backed up by Python code.")
3f641af0 2347 (license license:x11)))
c7303d3c
DT
2348
2349(define-public python-exif-read
2350 (package
2351 (name "python-exif-read")
2a2d0981 2352 (version "2.1.2")
c7303d3c
DT
2353 (source (origin
2354 (method url-fetch)
2a2d0981 2355 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2356 (sha256
2357 (base32
2a2d0981 2358 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2359 (build-system python-build-system)
c7303d3c
DT
2360 (arguments `(#:tests? #f)) ; no tests
2361 (home-page "https://github.com/ianare/exif-py")
2362 (synopsis "Python library to extract EXIF data from image files")
2363 (description
2364 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2365files.")
3f641af0 2366 (license license:bsd-3)))
c7303d3c
DT
2367
2368(define-public python2-exif-read
2369 (package-with-python2 python-exif-read))
d5f89b22
DT
2370
2371(define-public python-pyld
2372 (package
2373 (name "python-pyld")
8957af32 2374 (version "0.7.1")
d5f89b22
DT
2375 (source (origin
2376 (method url-fetch)
af1ab773 2377 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2378 (sha256
2379 (base32
8957af32 2380 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2381 (build-system python-build-system)
d5f89b22
DT
2382 (arguments `(#:tests? #f)) ; no tests
2383 (home-page "http://github.com/digitalbazaar/pyld")
2384 (synopsis "Python implementation of the JSON-LD specification")
2385 (description
2386 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2387 (license license:bsd-3)))
d5f89b22
DT
2388
2389(define-public python2-pyld
2390 (package-with-python2 python-pyld))
3a1f9a68
DT
2391
2392(define-public python-certifi
2393 (package
2394 (name "python-certifi")
28576403 2395 (version "2017.1.23")
3a1f9a68
DT
2396 (source (origin
2397 (method url-fetch)
9a41f443 2398 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2399 (sha256
2400 (base32
28576403 2401 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2402 (build-system python-build-system)
28576403 2403 (home-page "https://certifi.io/")
3a1f9a68
DT
2404 (synopsis "Python CA certificate bundle")
2405 (description
2406 "Certifi is a Python library that contains a CA certificate bundle, which
2407is used by the Requests library to verify HTTPS requests.")
3f641af0 2408 (license license:asl2.0)))
3a1f9a68
DT
2409
2410(define-public python2-certifi
2411 (package-with-python2 python-certifi))
e6cfbd36 2412
12c270dd
RW
2413(define-public python-click
2414 (package
2415 (name "python-click")
d4acb6db 2416 (version "6.7")
12c270dd
RW
2417 (source
2418 (origin
2419 (method url-fetch)
375f224b 2420 (uri (pypi-uri "click" version))
12c270dd 2421 (sha256
43accb58 2422 (base32
d4acb6db 2423 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2424 (build-system python-build-system)
e2ab5a09
BW
2425 (arguments
2426 `(#:phases
2427 (modify-phases %standard-phases
2428 (add-after 'unpack 'fix-paths
2429 (lambda* (#:key inputs #:allow-other-keys)
2430 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2431 "cross-libc" "libc"))))
2432 (substitute* "click/_unicodefun.py"
2433 (("'locale'")
2434 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2435 #t))
2436 (replace 'check
2437 (lambda _
2438 (zero? (system* "make" "test")))))))
2439 (native-inputs
2440 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2441 (home-page "http://click.pocoo.org")
2442 (synopsis "Command line library for Python")
2443 (description
2444 "Click is a Python package for creating command line interfaces in a
2445composable way with as little code as necessary. Its name stands for
2446\"Command Line Interface Creation Kit\". It's highly configurable but comes
2447with sensible defaults out of the box.")
3f641af0 2448 (license license:bsd-3)))
12c270dd
RW
2449
2450(define-public python2-click
2451 (package-with-python2 python-click))
2452
addc808d
EF
2453(define-public python-wheel
2454 (package
2455 (name "python-wheel")
0e6df70b 2456 (version "0.30.0a0")
e1ba0749
EF
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "wheel" version))
2461 (sha256
2462 (base32
0e6df70b 2463 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2464 (build-system python-build-system)
2465 (native-inputs
f3b98f4f 2466 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2467 ("python-pytest-cov" ,python-pytest-cov)))
2468 (home-page "https://bitbucket.org/pypa/wheel/")
2469 (synopsis "Format for built Python packages")
2470 (description
2471 "A wheel is a ZIP-format archive with a specially formatted filename and
2472the @code{.whl} extension. It is designed to contain all the files for a PEP
2473376 compatible install in a way that is very close to the on-disk format. Many
2474packages will be properly installed with only the @code{Unpack} step and the
2475unpacked archive preserves enough information to @code{Spread} (copy data and
2476scripts to their final locations) at any later time. Wheel files can be
2477installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2478 (license license:expat)
2479 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2480
2481(define-public python2-wheel
8ad4ae20
LF
2482 (let ((wheel (package-with-python2
2483 (strip-python2-variant python-wheel))))
264ae686 2484 (package (inherit wheel)
8ad4ae20
LF
2485 (native-inputs `(("python2-functools32" ,python2-functools32)
2486 ,@(package-native-inputs wheel))))))
2487
addc808d 2488
ae641128 2489(define-public python-requests
e6cfbd36 2490 (package
ae641128 2491 (name "python-requests")
d1ba1d6b 2492 (version "2.12.4")
e6cfbd36
DT
2493 (source (origin
2494 (method url-fetch)
5d691657 2495 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2496 (sha256
2497 (base32
d1ba1d6b 2498 "0d5fwxmw4ibynk3imph3n4n84m0n3ib1vj339fxhkqri0qd4767d"))))
cff0ccf9 2499 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2500 (build-system python-build-system)
cff0ccf9
MB
2501 (arguments
2502 ;; FIXME: Some tests require network access.
2503 '(#:tests? #f))
e6cfbd36
DT
2504 (home-page "http://python-requests.org/")
2505 (synopsis "Python HTTP library")
2506 (description
2507 "Requests is a Python HTTP client library. It aims to be easier to use
2508than Python’s urllib2 library.")
3f641af0 2509 (license license:asl2.0)))
864b5211 2510
e9005180
DT
2511;; Some software requires an older version of Requests, notably Docker
2512;; Compose.
2513(define-public python-requests-2.7
2514 (package (inherit python-requests)
2515 (version "2.7.0")
2516 (source (origin
2517 (method url-fetch)
2518 (uri (pypi-uri "requests" version))
2519 (sha256
2520 (base32
2521 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2522
ae641128 2523(define-public python2-requests
8ad4ae20 2524 (package-with-python2 python-requests))
ae641128 2525
ea521b42
DT
2526(define-public python-vcversioner
2527 (package
2528 (name "python-vcversioner")
538fe019 2529 (version "2.16.0.0")
ea521b42
DT
2530 (source
2531 (origin
2532 (method url-fetch)
2533 (uri (pypi-uri "vcversioner" version))
2534 (sha256
2535 (base32
538fe019 2536 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2537 (build-system python-build-system)
ea521b42
DT
2538 (synopsis "Python library for version number discovery")
2539 (description "Vcversioner is a Python library that inspects tagging
2540information in a variety of version control systems in order to discover
2541version numbers.")
2542 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2543 (license license:isc)))
ea521b42
DT
2544
2545(define-public python2-vcversioner
f210e944 2546 (package-with-python2 python-vcversioner))
ae641128 2547
864b5211
DT
2548(define-public python-jsonschema
2549 (package
2550 (name "python-jsonschema")
b3667afb 2551 (version "2.5.1")
864b5211
DT
2552 (source (origin
2553 (method url-fetch)
2554 (uri
2555 (string-append
2556 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2557 version ".tar.gz"))
2558 (sha256
2559 (base32
b3667afb 2560 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2561 (build-system python-build-system)
8bcd6b91
EF
2562 (arguments
2563 '(#:phases
2564 (modify-phases %standard-phases
2565 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2566 (native-inputs
8bcd6b91
EF
2567 `(("python-nose" ,python-nose)
2568 ("python-vcversioner" ,python-vcversioner)))
2569 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2570 (synopsis "Implementation of JSON Schema for Python")
2571 (description
2572 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2573 (license license:expat)
2574 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2575
2576(define-public python2-jsonschema
a14600ec
LF
2577 (let ((jsonschema (package-with-python2
2578 (strip-python2-variant python-jsonschema))))
264ae686 2579 (package (inherit jsonschema)
eaba9d66 2580 (native-inputs
8bcd6b91 2581 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2582 ,@(package-native-inputs jsonschema)))
2583 (propagated-inputs
2584 `(("python2-functools32" ,python2-functools32))))))
850189b8 2585
9f21414d 2586(define-public python-kitchen
2587 (package
2588 (name "python-kitchen")
2589 (version "1.2.4")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "kitchen" version))
2594 (sha256
2595 (base32
2596 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2597 (build-system python-build-system)
2598 (propagated-inputs
2599 `(("python-chardet" ,python-chardet)))
2600 (home-page "https://fedorahosted.org/kitchen")
2601 (synopsis "Python API for snippets")
2602 (description "@code{kitchen} module provides a python API for all sorts of
2603little useful snippets of code that everybody ends up writing for their projects
2604but never seem big enough to build an independent release. Use kitchen and stop
2605cutting and pasting that code over and over.")
2606 (license (list license:lgpl2.1+
2607 ;; subprocess.py, test_subprocess.py,
2608 ;; kitchen/pycompat25/defaultdict.py:
2609 license:psfl))))
2610
2611(define-public python2-kitchen
2612 (package-with-python2 python-kitchen))
2613
850189b8
DT
2614(define-public python-unidecode
2615 (package
2616 (name "python-unidecode")
5754fe95 2617 (version "0.04.20")
850189b8
DT
2618 (source (origin
2619 (method url-fetch)
8925d4f3 2620 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2621 (sha256
2622 (base32
5754fe95 2623 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2624 (build-system python-build-system)
850189b8
DT
2625 (home-page "https://pypi.python.org/pypi/Unidecode")
2626 (synopsis "ASCII transliterations of Unicode text")
2627 (description
2628 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2629useful when integrating with legacy code that doesn't support Unicode, or for
2630ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2631machine identifiers from human-readable Unicode strings that should still be
2632somewhat intelligeble.")
3f641af0 2633 (license license:gpl2+)))
850189b8
DT
2634
2635(define-public python2-unidecode
2636 (package-with-python2 python-unidecode))
6d45fef4
DT
2637
2638(define-public python-pyjwt
2639 (package
2640 (name "python-pyjwt")
eb31d4b4 2641 (version "1.4.0")
6d45fef4
DT
2642 (source
2643 (origin
2644 (method url-fetch)
eb31d4b4 2645 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2646 (sha256
2647 (base32
eb31d4b4 2648 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2649 (build-system python-build-system)
eb31d4b4 2650 (native-inputs
130fe994
HG
2651 `(("python-pytest" ,python-pytest)
2652 ("python-pytest-cov" ,python-pytest-cov)
2653 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2654 (home-page "http://github.com/progrium/pyjwt")
2655 (synopsis "JSON Web Token implementation in Python")
2656 (description
2657 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2658 (license license:expat)))
6d45fef4
DT
2659
2660(define-public python2-pyjwt
2661 (package-with-python2 python-pyjwt))
2662
2cec1f6f
DT
2663(define-public python-oauthlib
2664 (package
2665 (name "python-oauthlib")
bde2171d 2666 (version "1.0.3")
2cec1f6f
DT
2667 (source (origin
2668 (method url-fetch)
bde2171d 2669 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2670 (sha256
2671 (base32
bde2171d 2672 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2673 (build-system python-build-system)
bde2171d 2674 (native-inputs
bb06aa34 2675 `(("python-nose" ,python-nose)
c616b5d3 2676 ("python-mock" ,python-mock)
bde2171d 2677 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2678 ("python-pyjwt" ,python-pyjwt)
2679 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2680 (home-page "https://github.com/idan/oauthlib")
2681 (synopsis "OAuth implementation for Python")
2682 (description
2683 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2684OAuth request-signing logic.")
3f641af0 2685 (license license:bsd-3)
59f151ec 2686 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2687
2688(define-public python2-oauthlib
59f151ec 2689 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2690 (package
2691 (inherit base)
00e10c6e 2692 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2693 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2694
2695(define-public python-itsdangerous
2696 (package
2697 (name "python-itsdangerous")
2698 (version "0.24")
2699 (source
2700 (origin
2701 (method url-fetch)
2702 (uri (string-append
2703 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2704 version ".tar.gz"))
2705 (sha256
2706 (base32
2707 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2708 (build-system python-build-system)
ec5dbb5c
DT
2709 (home-page "http://github.com/mitsuhiko/itsdangerous")
2710 (synopsis "Python library for passing data to/from untrusted environments")
2711 (description
2712 "Itsdangerous provides various helpers to pass trusted data to untrusted
2713environments and back.")
f210e944 2714 (license license:bsd-3)))
ec5dbb5c
DT
2715
2716(define-public python2-itsdangerous
f210e944 2717 (package-with-python2 python-itsdangerous))
5731cae3 2718
8d12be1e
RW
2719(define-public python-pyyaml
2720 (package
2721 (name "python-pyyaml")
bf5e4bc4 2722 (version "3.12")
8d12be1e
RW
2723 (source
2724 (origin
2725 (method url-fetch)
bf5e4bc4 2726 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2727 (sha256
2728 (base32
bf5e4bc4 2729 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2730 (build-system python-build-system)
2731 (inputs
2732 `(("libyaml" ,libyaml)))
8d12be1e
RW
2733 (home-page "http://pyyaml.org/wiki/PyYAML")
2734 (synopsis "YAML parser and emitter for Python")
2735 (description
2736 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2737complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2738API, and sensible error messages. PyYAML supports standard YAML tags and
2739provides Python-specific tags that allow to represent an arbitrary Python
2740object.")
2741 (license license:expat)))
2742
2743(define-public python2-pyyaml
2744 (package-with-python2 python-pyyaml))
2745
5731cae3
DT
2746(define-public python-virtualenv
2747 (package
2748 (name "python-virtualenv")
58d04dba 2749 (version "15.0.3")
5731cae3
DT
2750 (source
2751 (origin
2752 (method url-fetch)
17804240 2753 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2754 (sha256
2755 (base32
58d04dba 2756 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2757 (build-system python-build-system)
17804240
EF
2758 (arguments
2759 `(#:phases
2760 (modify-phases %standard-phases
58d04dba
RW
2761 (replace 'check
2762 (lambda _
2763 ;; Disable failing test. See upstream bug report
2764 ;; https://github.com/pypa/virtualenv/issues/957
2765 (substitute* "tests/test_virtualenv.py"
2766 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2767 (zero? (system* "py.test")))))))
e7881f3d 2768 (native-inputs
f3b98f4f 2769 `(("python-mock" ,python-mock)
17804240 2770 ("python-pytest" ,python-pytest)))
5731cae3
DT
2771 (home-page "https://virtualenv.pypa.io/")
2772 (synopsis "Virtual Python environment builder")
2773 (description
2774 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2775 (license license:expat)))
5731cae3
DT
2776
2777(define-public python2-virtualenv
2778 (package-with-python2 python-virtualenv))
8176d4d5
DT
2779
2780(define-public python-markupsafe
2781 (package
2782 (name "python-markupsafe")
2783 (version "0.23")
2784 (source
2785 (origin
2786 (method url-fetch)
2787 (uri (string-append
2788 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2789 version ".tar.gz"))
2790 (sha256
2791 (base32
2792 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2793 (build-system python-build-system)
8176d4d5
DT
2794 (home-page "http://github.com/mitsuhiko/markupsafe")
2795 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2796 (description
2797 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2798for Python.")
3f641af0 2799 (license license:bsd-3)))
8176d4d5
DT
2800
2801(define-public python2-markupsafe
2802 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2803
2804(define-public python-jinja2
2805 (package
2806 (name "python-jinja2")
e98149b3 2807 (version "2.8")
fe34f0d1
DT
2808 (source
2809 (origin
2810 (method url-fetch)
e98149b3 2811 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2812 (sha256
2813 (base32
e98149b3 2814 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2815 (build-system python-build-system)
f22efa01 2816 (propagated-inputs
f3b98f4f 2817 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2818 (home-page "http://jinja.pocoo.org/")
2819 (synopsis "Python template engine")
2820 (description
2821 "Jinja2 is a small but fast and easy to use stand-alone template engine
2822written in pure Python.")
3f641af0 2823 (license license:bsd-3)))
fe34f0d1
DT
2824
2825(define-public python2-jinja2
2826 (package-with-python2 python-jinja2))
3580ab8b 2827
f7d17ac7
EE
2828(define-public python-pystache
2829 (package
2830 (name "python-pystache")
2831 (version "0.5.4")
2832 (source (origin
2833 (method url-fetch)
2834 (uri (pypi-uri "pystache" version))
2835 (sha256
2836 (base32
2837 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2838 (build-system python-build-system)
8bd5164b
MB
2839 (arguments
2840 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2841 (home-page "http://defunkt.io/pystache/")
2842 (synopsis "Python logic-less template engine")
2843 (description
2844 "Pystache is a Python implementation of the framework agnostic,
2845logic-free templating system Mustache.")
8bd5164b
MB
2846 (license license:expat)
2847 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2848
2849(define-public python2-pystache
8bd5164b
MB
2850 (package (inherit (package-with-python2
2851 (strip-python2-variant python-pystache)))
2852 (arguments
2853 `(#:python ,python-2
2854 #:phases
2855 (modify-phases %standard-phases
2856 (replace 'check
2857 (lambda _
2858 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2859
1285119b
RW
2860(define-public python-joblib
2861 (package
2862 (name "python-joblib")
f34ef331 2863 (version "0.10.3")
1285119b
RW
2864 (source (origin
2865 (method url-fetch)
f34ef331 2866 (uri (pypi-uri "joblib" version))
1285119b
RW
2867 (sha256
2868 (base32
6aa5f1ca
HG
2869 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2870 (modules '((guix build utils)))
2871 (snippet
2872 '(begin
2873 ;; Remove pre-compiled .pyc files from source.
2874 (for-each delete-file-recursively
2875 (find-files "." "__pycache__" #:directories? #t))
2876 (for-each delete-file (find-files "." "\\.pyc$"))
2877 #t))))
1285119b 2878 (build-system python-build-system)
a8dd960a
RW
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'check 'disable-failing-tests
2883 (lambda _
2884 ;; This numpydoc tests fails for unknown reasons
2885 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2886 ;; This numpydoc test depends on matplotlib, which is not a
2887 ;; required input.
2888 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2889 ;; These tests fail to execute sys.executable
2890 (substitute* "joblib/test/test_parallel.py"
2891 (("import nose" line)
2892 (string-append "from nose.plugins.skip import SkipTest\n" line))
2893 (("def test_nested_parallel_warnings" line)
2894 (string-append "@SkipTest\n" line))
2895 (("def test_parallel_with_interactively_defined_functions" line)
2896 (string-append "@SkipTest\n" line)))
2897 #t)))))
f052ec9a 2898 ;; Provide nose to enable tests command
1285119b 2899 (native-inputs
f3b98f4f 2900 `(("python-nose" ,python-nose)
f34ef331
RW
2901 ("python-sphinx" ,python-sphinx)
2902 ("python-docutils" ,python-docutils)
2903 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2904 (home-page "http://pythonhosted.org/joblib/")
2905 (synopsis "Using Python functions as pipeline jobs")
2906 (description
2907 "Joblib is a set of tools to provide lightweight pipelining in Python.
2908In particular, joblib offers: transparent disk-caching of the output values
2909and lazy re-evaluation (memoize pattern), easy simple parallel computing
2910logging and tracing of the execution.")
3f641af0 2911 (license license:bsd-3)))
1285119b
RW
2912
2913(define-public python2-joblib
2914 (package-with-python2 python-joblib))
2915
3580ab8b
DT
2916(define-public python-docutils
2917 (package
2918 (name "python-docutils")
00e0ca7c 2919 (version "0.13.1")
3580ab8b
DT
2920 (source
2921 (origin
2922 (method url-fetch)
00e0ca7c 2923 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2924 (sha256
2925 (base32
00e0ca7c 2926 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 2927 (build-system python-build-system)
3580ab8b
DT
2928 (arguments
2929 '(#:tests? #f)) ; no setup.py test command
2930 (home-page "http://docutils.sourceforge.net/")
2931 (synopsis "Python Documentation Utilities")
2932 (description
2933 "Docutils is a modular system for processing documentation into useful
2934formats, such as HTML, XML, and LaTeX. For input Docutils supports
2935reStructuredText.")
2936 ;; Most of the source code is public domain, but some source files are
2937 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2938 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2939
2940(define-public python2-docutils
2941 (package-with-python2 python-docutils))
fb35b7c0
DT
2942
2943(define-public python-pygments
2944 (package
2945 (name "python-pygments")
7d2e758d 2946 (version "2.1.3")
fb35b7c0
DT
2947 (source
2948 (origin
2949 (method url-fetch)
9f442285 2950 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2951 (sha256
2952 (base32
7d2e758d 2953 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 2954 (build-system python-build-system)
995cb99e
MB
2955 (arguments
2956 ;; FIXME: Tests require sphinx, which depends on this.
2957 '(#:tests? #f))
fb35b7c0
DT
2958 (home-page "http://pygments.org/")
2959 (synopsis "Syntax highlighting")
2960 (description
2961 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2962 (license license:bsd-2)))
fb35b7c0
DT
2963
2964(define-public python2-pygments
2965 (package-with-python2 python-pygments))
9dd6078d
DT
2966
2967(define-public python-sphinx
2968 (package
2969 (name "python-sphinx")
c227458a 2970 (version "1.5.1")
9dd6078d
DT
2971 (source
2972 (origin
2973 (method url-fetch)
9a8acd00 2974 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
2975 (sha256
2976 (base32
c227458a 2977 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 2978 (build-system python-build-system)
03cb5f9e 2979 (arguments
c227458a
DM
2980 `(#:phases
2981 (modify-phases %standard-phases
2982 (replace 'check
2983 (lambda _
2984 ;; Requires Internet access.
2985 (delete-file "tests/test_build_linkcheck.py")
2986 (zero? (system* "make" "test")))))))
f22efa01 2987 (propagated-inputs
9a8acd00
DM
2988 `(("python-imagesize" ,python-imagesize)
2989 ("python-sphinx-alabaster-theme"
2990 ,python-sphinx-alabaster-theme)
2991 ("python-babel" ,python-babel)
2992 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 2993 ("python-docutils" ,python-docutils)
9a8acd00
DM
2994 ("python-jinja2" ,python-jinja2)
2995 ("python-pygments" ,python-pygments)
2996 ("python-six" ,python-six)))
c227458a
DM
2997 (native-inputs
2998 `(("graphviz" ,graphviz)
2999 ("python-html5lib" ,python-html5lib)
3000 ("python-mock" ,python-mock)
3001 ("python-nose" ,python-nose)
3002 ("python-requests" ,python-requests)))
9dd6078d
DT
3003 (home-page "http://sphinx-doc.org/")
3004 (synopsis "Python documentation generator")
3005 (description "Sphinx is a tool that makes it easy to create documentation
3006for Python projects or other documents consisting of multiple reStructuredText
3007sources.")
9a8acd00
DM
3008 (license license:bsd-3)
3009 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d
DT
3010
3011(define-public python2-sphinx
9a8acd00
DM
3012 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3013 (package
3014 (inherit base)
3015 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3016 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3017 ,@(package-native-inputs base)))
3018 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3019 ,@(package-propagated-inputs base))))))
6888830b 3020
a50e0301
MB
3021;; This is needed for python-matplotlib@1.4 and python-scipy@0.16, at least.
3022;; Try removing this when they are updated.
3023(define-public python-sphinx-1.2.3
3024 (package (inherit python-sphinx)
3025 (version "1.2.3")
3026 (source (origin
3027 (method url-fetch)
3028 (uri (pypi-uri "Sphinx" version))
3029 (sha256
3030 (base32
3031 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
3032 ;; XXX: "'NoneType' object has no attribute 'split'".
3033 (arguments '(#:tests? #f))))
3034
3035(define-public python2-sphinx-1.2.3
3036 (package (inherit (package-with-python2
3037 (strip-python2-variant python-sphinx-1.2.3)))))
3038
ad320b20
RW
3039(define-public python-sphinx-rtd-theme
3040 (package
3041 (name "python-sphinx-rtd-theme")
3042 (version "0.1.6")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (string-append "https://pypi.python.org/packages/source/s/"
3047 "sphinx_rtd_theme/sphinx_rtd_theme-"
3048 version ".tar.gz"))
3049 (sha256
3050 (base32
3051 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3052 (build-system python-build-system)
9893cff3 3053 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3054 (propagated-inputs
3055 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3056 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3057 (synopsis "ReadTheDocs.org theme for Sphinx")
3058 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3059 (license license:expat)))
ad320b20
RW
3060
3061(define-public python2-sphinx-rtd-theme
3062 (package-with-python2 python-sphinx-rtd-theme))
3063
fe94cf0c
HG
3064(define-public python-rst.linker
3065 (package
3066 (name "python-rst.linker")
3067 (version "1.7")
3068 (source
3069 (origin
3070 (method url-fetch)
3071 (uri (pypi-uri "rst.linker" version))
3072 (sha256
3073 (base32
3074 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3075 (build-system python-build-system)
3076 (propagated-inputs
22d7360b 3077 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3078 ("python-six" ,python-six)))
3079 (native-inputs
3080 `(("python-setuptools-scm" ,python-setuptools-scm)))
3081 ;; Test would require path.py, which would introduce a cyclic dependence.
3082 (arguments `(#:tests? #f))
3083 ;; Note: As of version 1.7 the documentation is not worth building.
3084 (home-page "https://github.com/jaraco/rst.linker")
3085 (synopsis "Sphinx plugin to add links and timestamps")
3086 (description "rst.linker allows to automatically replace text by a
3087reStructuredText external reference or timestamps. It's primary purpose is to
3088augment the changelog, but it can be used for other documents, too.")
3089 (license license:expat)))
3090
3091(define-public python2-rst.linker
3092 (package-with-python2 python-rst.linker))
3093
f4de5b3b
CAW
3094(define-public python-feedgenerator
3095 (package
3096 (name "python-feedgenerator")
f0412aa2 3097 (version "1.8")
f4de5b3b 3098 (source
f4de5b3b 3099 (origin
f0412aa2
EF
3100 (method url-fetch)
3101 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3102 (sha256
3103 (base32
7c88bcf4
HG
3104 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3105 (modules '((guix build utils)))
3106 (snippet
3107 '(begin
3108 ;; Remove pre-compiled .pyc files from source.
3109 (for-each delete-file-recursively
3110 (find-files "." "__pycache__" #:directories? #t))
3111 (for-each delete-file (find-files "." "\\.pyc$"))
3112 #t))))
f4de5b3b 3113 (build-system python-build-system)
dae73d9b 3114 (propagated-inputs
f3b98f4f 3115 `(("python-pytz" ,python-pytz)
f4de5b3b 3116 ("python-six" ,python-six)))
f0412aa2 3117 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3118 (synopsis
3119 "Standalone version of Django's Atom/RSS feed generator")
3120 (description
3121 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3122which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3123 (license license:bsd-3)))
f4de5b3b
CAW
3124
3125(define-public python2-feedgenerator
3126 (package-with-python2 python-feedgenerator))
3127
59ad30e3
CAW
3128(define-public python-blinker
3129 (package
3130 (name "python-blinker")
7fb9ff4d 3131 (version "1.4")
59ad30e3
CAW
3132 (source
3133 (origin
3134 (method url-fetch)
7fb9ff4d 3135 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3136 (sha256
3137 (base32
7fb9ff4d 3138 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3139 (build-system python-build-system)
59ad30e3
CAW
3140 (home-page "http://pythonhosted.org/blinker/")
3141 (synopsis "Fast, simple object-to-object and broadcast signaling")
3142 (description
3143 "Blinker provides a fast dispatching system that allows any number of
3144interested parties to subscribe to events, or \"signals\".")
3145 (license license:expat)))
3146
3147(define-public python2-blinker
3148 (package-with-python2 python-blinker))
3149
b8050e71
CAW
3150(define-public pelican
3151 (package
3152 (name "pelican")
11f97c27 3153 (version "3.6.3")
b8050e71
CAW
3154 (source
3155 (origin
3156 (method url-fetch)
11f97c27 3157 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3158 (sha256
3159 (base32
11f97c27 3160 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3161 (build-system python-build-system)
f22efa01 3162 (propagated-inputs
b8050e71
CAW
3163 `(("python-feedgenerator" ,python-feedgenerator)
3164 ("python-jinja2" ,python-jinja2)
3165 ("python-pygments" ,python-pygments)
3166 ("python-docutils" ,python-docutils)
3167 ("python-pytz" ,python-pytz)
3168 ("python-blinker" ,python-blinker)
3169 ("python-unidecode" ,python-unidecode)
3170 ("python-six" ,python-six)
22d7360b 3171 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3172 (home-page "http://getpelican.com/")
3173 (arguments
3174 `(;; XXX Requires a lot more packages to do unit tests :P
3175 #:tests? #f
3176 #:phases (modify-phases %standard-phases
3177 (add-before
3178 'install 'adjust-requires
3179 ;; Since feedgenerator is installed from git, it doesn't
3180 ;; conform to the version requirements.
3181 ;;
3182 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3183 ;; version requirement so setuptools doesn't get confused.
3184 (lambda _
3185 (substitute* "setup.py"
3186 (("['\"]feedgenerator.*?['\"]")
3187 "'feedgenerator'")))))))
3188 (synopsis "Python-based static site publishing system")
3189 (description
3190 "Pelican is a tool to generate a static blog from reStructuredText,
3191Markdown input files, and more. Pelican uses Jinja2 for templating
3192and is very extensible.")
3f641af0 3193 (license license:agpl3+)))
b8050e71 3194
240ca4aa
RW
3195(define-public python-scikit-learn
3196 (package
3197 (name "python-scikit-learn")
8e401ab6 3198 (version "0.18.1")
240ca4aa
RW
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (string-append
3203 "https://github.com/scikit-learn/scikit-learn/archive/"
3204 version ".tar.gz"))
7e21b9fb 3205 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3206 (sha256
3207 (base32
8e401ab6 3208 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3209 (build-system python-build-system)
3210 (arguments
3211 `(#:phases
3212 (alist-cons-before
2f6b3d2e
RW
3213 'check 'set-HOME
3214 ;; some tests require access to "$HOME"
3215 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3216 %standard-phases)))
240ca4aa 3217 (inputs
328bb95d
HG
3218 `(("openblas" ,openblas)))
3219 (native-inputs
8e401ab6
RW
3220 `(("python-nose" ,python-nose)
3221 ("python-cython" ,python-cython)))
240ca4aa
RW
3222 (propagated-inputs
3223 `(("python-numpy" ,python-numpy)
3224 ("python-scipy" ,python-scipy)))
3225 (home-page "http://scikit-learn.org/")
3226 (synopsis "Machine Learning in Python")
3227 (description
3228 "Scikit-learn provides simple and efficient tools for data
3229mining and data analysis.")
1b5241c5 3230 (license license:bsd-3)))
240ca4aa
RW
3231
3232(define-public python2-scikit-learn
1b5241c5 3233 (package-with-python2 python-scikit-learn))
240ca4aa 3234
12f8f9bb
RW
3235(define-public python-scikit-image
3236 (package
3237 (name "python-scikit-image")
3238 (version "0.11.3")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (string-append
3243 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3244 version ".tar.gz"))
3245 (sha256
3246 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3247 (build-system python-build-system)
9026e689
MB
3248 (arguments
3249 ;; TODO: Some tests require running X11 server. Disable them?
3250 '(#:tests? #f))
b83e2333 3251 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3252 (propagated-inputs
3253 `(("python-matplotlib" ,python-matplotlib)
3254 ("python-networkx" ,python-networkx)
12f8f9bb 3255 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3256 ("python-pillow" ,python-pillow)))
3257 (native-inputs
b83e2333
HG
3258 `(("python-numpy" ,python-numpy)
3259 ("python-cython" ,python-cython)
3260 ("python-six" ,python-six)))
12f8f9bb
RW
3261 (home-page "http://scikit-image.org/")
3262 (synopsis "Image processing in Python")
3263 (description
e881752c 3264 "Scikit-image is a collection of algorithms for image processing.")
12733594 3265 (license license:bsd-3)))
12f8f9bb
RW
3266
3267(define-public python2-scikit-image
12733594 3268 (package-with-python2 python-scikit-image))
12f8f9bb 3269
5394a6a6
RW
3270(define-public python-redis
3271 (package
3272 (name "python-redis")
911a8faf 3273 (version "2.10.5")
5394a6a6
RW
3274 (source
3275 (origin
3276 (method url-fetch)
911a8faf 3277 (uri (pypi-uri "redis" version))
5394a6a6 3278 (sha256
911a8faf 3279 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3280 (build-system python-build-system)
3281 ;; Tests require a running Redis server
3282 (arguments '(#:tests? #f))
cf8124b0
HG
3283 ;; As long as we are not running test, we do not need this input :-)
3284 ;;(native-inputs
3285 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3286 (home-page "https://github.com/andymccurdy/redis-py")
3287 (synopsis "Redis Python client")
3288 (description
3289 "This package provides a Python interface to the Redis key-value store.")
3290 (license license:expat)))
3291
3292(define-public python2-redis
3293 (package-with-python2 python-redis))
3294
748cef5b
RW
3295(define-public python-rq
3296 (package
3297 (name "python-rq")
3298 (version "0.5.2")
3299 (source
3300 (origin
3301 (method url-fetch)
3302 (uri (string-append
3303 "https://pypi.python.org/packages/source/r/rq/rq-"
3304 version ".tar.gz"))
3305 (sha256
3306 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3307 (build-system python-build-system)
3308 (propagated-inputs
3309 `(("python-click" ,python-click)
3310 ("python-redis" ,python-redis)))
748cef5b
RW
3311 (home-page "http://python-rq.org/")
3312 (synopsis "Simple job queues for Python")
3313 (description
3314 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3315processing them in the background with workers. It is backed by Redis and it
3316is designed to have a low barrier to entry.")
3f641af0 3317 (license license:bsd-2)))
748cef5b
RW
3318
3319(define-public python2-rq
3320 (package-with-python2 python-rq))
3321
6888830b
FB
3322(define-public python-cython
3323 (package
3324 (name "python-cython")
dd22efef 3325 (version "0.24.1")
6888830b
FB
3326 (source
3327 (origin
3328 (method url-fetch)
56918e26 3329 (uri (pypi-uri "Cython" version))
6888830b
FB
3330 (sha256
3331 (base32
dd22efef 3332 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3333 (build-system python-build-system)
3334 ;; we need the full python package and not just the python-wrapper
3335 ;; because we need libpython3.3m.so
3336 (inputs
3337 `(("python" ,python)))
3338 (arguments
3339 `(#:phases
b92f651b
EF
3340 (modify-phases %standard-phases
3341 (add-before 'check 'set-HOME
3342 ;; some tests require access to "$HOME/.cython"
3343 (lambda _ (setenv "HOME" "/tmp")))
3344 (replace 'check
3345 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3346 (home-page "http://cython.org/")
3347 (synopsis "C extensions for Python")
3348 (description "Cython is an optimising static compiler for both the Python
3349programming language and the extended Cython programming language. It makes
3350writing C extensions for Python as easy as Python itself.")
3f641af0 3351 (license license:asl2.0)
48b311b1 3352 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3353
3354(define-public python2-cython
48b311b1
LC
3355 (package (inherit (package-with-python2
3356 (strip-python2-variant python-cython)))
6888830b
FB
3357 (name "python2-cython")
3358 (inputs
3359 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3360
ee5fb7ee
AV
3361;; The RPython toolchain currently does not support Python 3.
3362(define-public python2-rpython
3363 (package
3364 (name "python2-rpython")
3365 (version "0.1.4")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "rpython" version))
3370 (sha256
3371 (base32
3372 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3373 (build-system python-build-system)
3374 (arguments `(#:python ,python-2))
3375 (native-inputs
f3b98f4f 3376 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3377 (home-page "https://rpython.readthedocs.org")
3378 (synopsis "Framework for implementing interpreters and virtual machines")
3379 (description "RPython is a translation and support framework for
3380producing implementations of dynamic languages, emphasizing a clean separation
3381between language specification and implementation aspects.")
3382 (license license:expat)))
3383
0da98533
FB
3384;; This version of numpy is missing the documentation and is only used to
3385;; build matplotlib which is required to build numpy's documentation.
3386(define python-numpy-bootstrap
3387 (package
3388 (name "python-numpy-bootstrap")
ef9b4c04 3389 (version "1.10.4")
0da98533
FB
3390 (source
3391 (origin
3392 (method url-fetch)
de67e922 3393 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3394 "/numpy-" version ".tar.gz"))
3395 (sha256
3396 (base32
ef9b4c04 3397 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3398 (build-system python-build-system)
3399 (inputs
328bb95d 3400 `(("openblas" ,openblas)
cba256f8 3401 ("lapack" ,lapack)))
0da98533 3402 (native-inputs
2efabc55
HG
3403 `(("python-nose" ,python-nose)
3404 ("gfortran" ,gfortran)))
0da98533
FB
3405 (arguments
3406 `(#:phases
2efabc55
HG
3407 (modify-phases %standard-phases
3408 (add-before 'build 'set-environment-variables
3409 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3410 (call-with-output-file "site.cfg"
3411 (lambda (port)
cba256f8
RW
3412 (format port
3413 "[openblas]
dbdfe515
RW
3414libraries = openblas
3415library_dirs = ~a/lib
3416include_dirs = ~a/include
cba256f8 3417
2efabc55
HG
3418# backslash-n to make emacs happy
3419\n[lapack]
cba256f8
RW
3420lapack_libs = lapack
3421library_dirs = ~a/lib
3422include_dirs = ~a/include
3423"
3424 (assoc-ref inputs "openblas")
3425 (assoc-ref inputs "openblas")
3426 (assoc-ref inputs "lapack")
3427 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3428 ;; Use "gcc" executable, not "cc".
3429 (substitute* "numpy/distutils/system_info.py"
3430 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3431 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3432 #t))
6a843168
FB
3433 ;; Tests can only be run after the library has been installed and not
3434 ;; within the source directory.
2efabc55
HG
3435 (delete 'check)
3436 (add-after 'install 'check
3437 (lambda* (#:key outputs inputs #:allow-other-keys)
3438 ;; Make installed package available for running the tests
3439 (add-installed-pythonpath inputs outputs)
6a843168 3440 (with-directory-excursion "/tmp"
89b5c60e 3441 (zero? (system* "python" "-c"
2efabc55 3442 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3443 (home-page "http://www.numpy.org/")
3444 (synopsis "Fundamental package for scientific computing with Python")
3445 (description "NumPy is the fundamental package for scientific computing
e881752c 3446with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3447object, sophisticated (broadcasting) functions, tools for integrating C/C++
3448and Fortran code, useful linear algebra, Fourier transform, and random number
3449capabilities.")
3f641af0 3450 (license license:bsd-3)))
0da98533
FB
3451
3452(define python2-numpy-bootstrap
3453 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3454
460fccd4 3455(define-public python-munch
3456 (package
3457 (name "python-munch")
3458 (version "2.0.4")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "munch" version))
3463 (sha256
3464 (base32
3465 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3466 (build-system python-build-system)
3467 (home-page "https://github.com/Infinidat/munch")
3468 (synopsis "Dot-accessible dictionary")
3469 (description "Munch is a dot-accessible dictionary similar to JavaScript
3470objects.")
3471 (license license:expat)))
3472
3473(define-public python2-munch
3474 (package-with-python2 python-munch))
3475
3a1bfe18
RW
3476(define-public python2-fastlmm
3477 (package
3478 (name "python2-fastlmm")
594358f5 3479 (version "0.2.26")
3a1bfe18
RW
3480 (source
3481 (origin
3482 (method url-fetch)
b074e7d4 3483 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3484 (sha256
3485 (base32
594358f5 3486 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3a1bfe18
RW
3487 (build-system python-build-system)
3488 (arguments
3489 `(#:python ,python-2)) ; only Python 2.7 is supported
3490 (propagated-inputs
3491 `(("python2-numpy" ,python2-numpy)
3492 ("python2-scipy" ,python2-scipy)
3493 ("python2-matplotlib" ,python2-matplotlib)
3494 ("python2-pandas" ,python2-pandas)
3495 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3496 ("python2-pysnptools" ,python2-pysnptools)))
3497 (native-inputs
3498 `(("unzip" ,unzip)
2efabc55 3499 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3500 ("python2-mock" ,python2-mock)
3501 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3502 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3503 (synopsis "Perform genome-wide association studies on large data sets")
3504 (description
3505 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3506Models, is a program for performing both single-SNP and SNP-set genome-wide
3507association studies (GWAS) on extremely large data sets.")
3f641af0 3508 (license license:asl2.0)))
3a1bfe18 3509
2ee8869a
FB
3510(define-public python-numpy
3511 (package (inherit python-numpy-bootstrap)
3512 (name "python-numpy")
3513 (outputs '("out" "doc"))
89b5c60e 3514 (inputs
b0aa6ede
HG
3515 `(("which" ,which)
3516 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3517 (propagated-inputs
3518 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3519 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3520 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3521 (native-inputs
3522 `(("pkg-config" ,pkg-config)
2efabc55
HG
3523 ("python-sphinx" ,python-sphinx)
3524 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3525 ("texlive" ,texlive)
3526 ("texinfo" ,texinfo)
3527 ("perl" ,perl)
3528 ,@(package-native-inputs python-numpy-bootstrap)))
3529 (arguments
89b5c60e 3530 `(,@(substitute-keyword-arguments
2ee8869a
FB
3531 (package-arguments python-numpy-bootstrap)
3532 ((#:phases phases)
3533 `(alist-cons-after
3534 'install 'install-doc
2efabc55
HG
3535 (lambda* (#:key inputs outputs #:allow-other-keys)
3536 ;; Make installed package available for building the
3537 ;; documentation
3538 (add-installed-pythonpath inputs outputs)
2ee8869a 3539 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3540 (doc (string-append
3541 data "/doc/" ,name "-"
2ee8869a
FB
3542 ,(package-version python-numpy-bootstrap)))
3543 (info (string-append data "/info"))
3544 (html (string-append doc "/html"))
3545 (pyver ,(string-append "PYVER=")))
3546 (with-directory-excursion "doc"
3547 (mkdir-p html)
3548 (system* "make" "html" pyver)
3549 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3550 (system* "make" "-C" "build/latex"
2ee8869a
FB
3551 "all-pdf" "PAPER=a4" pyver)
3552 ;; FIXME: Generation of the info file fails.
3553 ;; (system* "make" "info" pyver)
3554 ;; (mkdir-p info)
3555 ;; (copy-file "build/texinfo/numpy.info"
3556 ;; (string-append info "/numpy.info"))
3557 (for-each (lambda (file)
3558 (copy-file (string-append "build/latex" file)
3559 (string-append doc file)))
3560 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3561 (with-directory-excursion "build/html"
3562 (for-each (lambda (file)
3563 (let* ((dir (dirname file))
3564 (tgt-dir (string-append html "/" dir)))
3565 (unless (equal? "." dir)
3566 (mkdir-p tgt-dir))
96c46210 3567 (install-file file html)))
2ee8869a
FB
3568 (find-files "." ".*"))))))
3569 ,phases)))))))
3570
764c077b 3571(define-public python2-numpy
57b7b8cd 3572 (package-with-python2 python-numpy))
2ee8869a 3573
0151a8df 3574(define-public python-pygit2
3575 (package
3576 (name "python-pygit2")
022c9772 3577 (version "0.25.0")
0151a8df 3578 (source
3579 (origin
3580 (method url-fetch)
3581 (uri (pypi-uri "pygit2" version))
3582 (sha256
3583 (base32
bb6043fe
MB
3584 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3585 (patches
3586 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3587 (build-system python-build-system)
3588 (propagated-inputs
3589 `(("python-six" ,python-six)
3590 ("python-cffi" ,python-cffi)
3591 ("libgit2" ,libgit2)
3592 ("python-tox" ,python-tox)))
3593 (home-page "https://github.com/libgit2/pygit2")
3594 (synopsis "Python bindings for libgit2")
3595 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3596library, libgit2 implements Git plumbing.")
3597 ;; GPL2.0 only, with linking exception.
3598 (license license:gpl2)))
3599
3600(define-public python2-pygit2
3601 (package-with-python2 python-pygit2))
3602
15bfe6d6
FB
3603(define-public python-pyparsing
3604 (package
3605 (name "python-pyparsing")
e0669289 3606 (version "2.0.3")
15bfe6d6
FB
3607 (source
3608 (origin
3609 (method url-fetch)
de67e922
LF
3610 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3611 "/pyparsing-" version
15bfe6d6
FB
3612 "/pyparsing-" version ".tar.gz"))
3613 (sha256
3614 (base32
e0669289 3615 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3616 (build-system python-build-system)
3617 (outputs '("out" "doc"))
3618 (arguments
3619 `(#:tests? #f ; no test target
3620 #:modules ((guix build python-build-system)
3621 (guix build utils))
3622 #:phases
3623 (alist-cons-after
3624 'install 'install-doc
3625 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3626 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3627 "/share/doc/" ,name "-" ,version))
3628 (html-doc (string-append doc "/html"))
3629 (examples (string-append doc "/examples")))
3630 (mkdir-p html-doc)
3631 (mkdir-p examples)
89b5c60e 3632 (for-each
15bfe6d6 3633 (lambda (dir tgt)
89b5c60e 3634 (map (lambda (file)
96c46210 3635 (install-file file tgt))
15bfe6d6
FB
3636 (find-files dir ".*")))
3637 (list "docs" "htmldoc" "examples")
3638 (list doc html-doc examples))))
3639 %standard-phases)))
3640 (home-page "http://pyparsing.wikispaces.com")
3641 (synopsis "Python parsing class library")
3642 (description
3643 "The pyparsing module is an alternative approach to creating and
3644executing simple grammars, vs. the traditional lex/yacc approach, or the use
3645of regular expressions. The pyparsing module provides a library of classes
3646that client code uses to construct the grammar directly in Python code.")
bd3fa666 3647 (license license:expat)))
15bfe6d6
FB
3648
3649(define-public python2-pyparsing
3650 (package-with-python2 python-pyparsing))
3651
ec00de35
FB
3652(define-public python-numpydoc
3653 (package
3654 (name "python-numpydoc")
3655 (version "0.5")
3656 (source
3657 (origin
3658 (method url-fetch)
89b5c60e 3659 (uri (string-append
ec00de35
FB
3660 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3661 version ".tar.gz"))
3662 (sha256
3663 (base32
5e4d8f67
AE
3664 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3665 (modules '((guix build utils)))
3666 (snippet
3667 '(begin
3668 ;; Drop a test requiring matplotlib, which we cannot add as an
3669 ;; input since it would create a circular dependency: Extend the
3670 ;; test for Python 3, where it is already dropped, to Python 2.
3671 (substitute* "numpydoc/tests/test_plot_directive.py"
3672 (("3") "2"))))))
ec00de35 3673 (build-system python-build-system)
fe4a8da4 3674 (propagated-inputs
213d1745
HG
3675 `(("python-sphinx" ,python-sphinx)))
3676 (native-inputs
3677 `(("python-nose" ,python-nose)))
ec00de35
FB
3678 (home-page "https://pypi.python.org/pypi/numpydoc")
3679 (synopsis
3680 "Numpy's Sphinx extensions")
3681 (description
3682 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3683 (license license:bsd-2)))
ec00de35
FB
3684
3685(define-public python2-numpydoc
5e4d8f67 3686 (package-with-python2 python-numpydoc))
1c65314c 3687
1e656049
RW
3688(define-public python-numexpr
3689 (package
3690 (name "python-numexpr")
2ee57340 3691 (version "2.6.1")
1e656049
RW
3692 (source
3693 (origin
3694 (method url-fetch)
26112c0a 3695 (uri (pypi-uri "numexpr" version))
1e656049
RW
3696 (sha256
3697 (base32
2ee57340 3698 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3699 (build-system python-build-system)
3700 (arguments `(#:tests? #f)) ; no tests included
3701 (propagated-inputs
3702 `(("python-numpy" ,python-numpy)))
3703 (home-page "https://github.com/pydata/numexpr")
3704 (synopsis "Fast numerical expression evaluator for NumPy")
3705 (description
3706 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3707expressions that operate on arrays are accelerated and use less memory than
3708doing the same calculation in Python. In addition, its multi-threaded
3709capabilities can make use of all your cores, which may accelerate
3710computations, most specially if they are not memory-bounded (e.g. those using
3711transcendental functions).")
f210e944 3712 (license license:expat)))
1e656049
RW
3713
3714(define-public python2-numexpr
f210e944 3715 (package-with-python2 python-numexpr))
1e656049 3716
1c65314c
FB
3717(define-public python-matplotlib
3718 (package
3719 (name "python-matplotlib")
1bbc659f 3720 (version "1.4.3")
1c65314c
FB
3721 (source
3722 (origin
3723 (method url-fetch)
de67e922
LF
3724 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3725 "/matplotlib-" version
1c65314c
FB
3726 "/matplotlib-" version ".tar.gz"))
3727 (sha256
3728 (base32
1bbc659f 3729 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3730 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3731 (build-system python-build-system)
3732 (outputs '("out" "doc"))
25f9a068
FB
3733 (propagated-inputs ; the following packages are all needed at run time
3734 `(("python-pyparsing" ,python-pyparsing)
3735 ("python-pygobject" ,python-pygobject)
3736 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3737 ("python-tkinter" ,python "tk")
22d7360b 3738 ("python-dateutil" ,python-dateutil)
ca33a3ad
HG
3739 ("python-numpy" ,python-numpy-bootstrap)
3740 ("python-pillow" ,python-pillow)
3741 ("python-pytz" ,python-pytz)
3742 ("python-six" ,python-six)
25f9a068
FB
3743 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3744 ;; from 'gtk+') provides the required 'typelib' files used by
3745 ;; 'gobject-introspection'. The location of these files is set with the
3746 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3747 ;; is done automatically by a 'native-search-path' procedure. However,
3748 ;; at run-time the user must set this variable as follows:
3749 ;;
3750 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3751 ("gtk+" ,gtk+)
3752 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3753 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3754 ;; object. For this reason we need to import both libraries.
3755 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3756 ("python-pycairo" ,python-pycairo)
3757 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3758 (inputs
ca33a3ad 3759 `(("libpng" ,libpng)
1c65314c
FB
3760 ("imagemagick" ,imagemagick)
3761 ("freetype" ,freetype)
25f9a068
FB
3762 ("cairo" ,cairo)
3763 ("glib" ,glib)
1c65314c 3764 ;; FIXME: Add backends when available.
1c65314c
FB
3765 ;("python-wxpython" ,python-wxpython)
3766 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3767 ("tcl" ,tcl)
3768 ("tk" ,tk)))
1c65314c
FB
3769 (native-inputs
3770 `(("pkg-config" ,pkg-config)
a50e0301 3771 ("python-sphinx" ,python-sphinx-1.2.3)
ca33a3ad
HG
3772 ("python-numpydoc" ,python-numpydoc)
3773 ("python-nose" ,python-nose)
3774 ("python-mock" ,python-mock)
1c65314c
FB
3775 ("texlive" ,texlive)
3776 ("texinfo" ,texinfo)))
3777 (arguments
3778 `(#:phases
42b7009a
DM
3779 (modify-phases %standard-phases
3780 (add-before 'build 'configure-environment
3781 (lambda* (#:key outputs inputs #:allow-other-keys)
3782 (let ((cairo (assoc-ref inputs "cairo"))
3783 (gtk+ (assoc-ref inputs "gtk+")))
3784 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3785 ;; has not effect.
3786 (setenv "LD_LIBRARY_PATH"
3787 (string-append cairo "/lib:" gtk+ "/lib"))
3788 (setenv "HOME" (getcwd))
3789 (call-with-output-file "setup.cfg"
3790 (lambda (port)
3791 (format port "[directories]~%
1bbc659f 3792basedirlist = ~a,~a~%
57b7b8cd 3793 [rc_options]~%
1bbc659f 3794backend = TkAgg~%"
42b7009a 3795 (assoc-ref inputs "tcl")
fdcbf10b
DM
3796 (assoc-ref inputs "tk"))))
3797 #t)))
42b7009a
DM
3798 (add-after 'install 'install-doc
3799 (lambda* (#:key inputs outputs #:allow-other-keys)
3800 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3801 (doc (string-append data "/doc/" ,name "-" ,version))
3802 (info (string-append data "/info"))
3803 (html (string-append doc "/html")))
3804 ;; Make installed package available for building the
3805 ;; documentation
3806 (add-installed-pythonpath inputs outputs)
3807 (with-directory-excursion "doc"
3808 ;; Produce pdf in 'A4' format.
3809 (substitute* (find-files "." "conf\\.py")
3810 (("latex_paper_size = 'letter'")
3811 "latex_paper_size = 'a4'"))
84e0f8c1
DM
3812 (substitute* "users/intro.rst"
3813 ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>)
3814 (("[[][*][]]") "[#]"))
42b7009a
DM
3815 (mkdir-p html)
3816 (mkdir-p info)
3817 ;; The doc recommends to run the 'html' target twice.
3818 (system* "python" "make.py" "html")
3819 (system* "python" "make.py" "html")
3820 (copy-recursively "build/html" html)
3821 (system* "python" "make.py" "latex")
3822 (system* "python" "make.py" "texinfo")
18b31516 3823 (symlink (string-append html "/_images")
42b7009a
DM
3824 (string-append info "/matplotlib-figures"))
3825 (with-directory-excursion "build/texinfo"
3826 (substitute* "matplotlib.texi"
3827 (("@image\\{([^,]*)" all file)
3828 (string-append "@image{matplotlib-figures/" file)))
3829 (symlink (string-append html "/_images")
3830 "./matplotlib-figures")
3831 (system* "makeinfo" "--no-split"
3832 "-o" "matplotlib.info" "matplotlib.texi"))
3833 (copy-file "build/texinfo/matplotlib.info"
3834 (string-append info "/matplotlib.info"))
3835 (copy-file "build/latex/Matplotlib.pdf"
fdcbf10b
DM
3836 (string-append doc "/Matplotlib.pdf")))
3837 #t))))))
1c65314c
FB
3838 (home-page "http://matplotlib.org")
3839 (synopsis "2D plotting library for Python")
3840 (description
3841 "Matplotlib is a Python 2D plotting library which produces publication
3842quality figures in a variety of hardcopy formats and interactive environments
3843across platforms. Matplotlib can be used in Python scripts, the python and
3844ipython shell, web application servers, and six graphical user interface
3845toolkits.")
3f641af0 3846 (license license:psfl)
57b7b8cd 3847 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3848
764c077b 3849(define-public python2-matplotlib
57b7b8cd
LC
3850 (let ((matplotlib (package-with-python2
3851 (strip-python2-variant python-matplotlib))))
764c077b 3852 (package (inherit matplotlib)
88c26834
AE
3853 ;; Make sure to use special packages for Python 2 instead
3854 ;; of those automatically rewritten by package-with-python2.
a50e0301
MB
3855 (native-inputs
3856 `(("python2-sphinx" ,python2-sphinx-1.2.3)
3857 ,@(fold alist-delete (package-native-inputs matplotlib)
3858 '("python-sphinx"))))
89b5c60e 3859 (propagated-inputs
7ca0dbc3 3860 `(("python2-pycairo" ,python2-pycairo)
764c077b 3861 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3862 ("python2-tkinter" ,python-2 "tk")
3863 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3864 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3865
0dde6232
RW
3866(define-public python2-pysnptools
3867 (package
3868 (name "python2-pysnptools")
a800018e 3869 (version "0.3.9")
0dde6232
RW
3870 (source
3871 (origin
3872 (method url-fetch)
3f2e9675 3873 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3874 (sha256
3875 (base32
a800018e 3876 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3877 (build-system python-build-system)
3878 (arguments
3879 `(#:python ,python-2)) ; only Python 2.7 is supported
3880 (propagated-inputs
3881 `(("python2-numpy" ,python2-numpy)
3882 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3883 ("python2-pandas" ,python2-pandas)))
3884 (native-inputs
3885 `(("python2-cython" ,python2-cython)))
0dde6232 3886 (native-inputs
f3b98f4f 3887 `(("unzip" ,unzip)))
0dde6232
RW
3888 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3889 (synopsis "Library for reading and manipulating genetic data")
3890 (description
3891 "PySnpTools is a library for reading and manipulating genetic data. It
3892can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3893those files. It can also efficiently manipulate ranges of integers using set
3894operators such as union, intersection, and difference.")
3f641af0 3895 (license license:asl2.0)))
0dde6232 3896
c9b1b4f9
RW
3897(define-public python-rpy2
3898 (package
3899 (name "python-rpy2")
ec3bcbc7 3900 (version "2.7.6")
c9b1b4f9
RW
3901 (source
3902 (origin
3903 (method url-fetch)
ec3bcbc7 3904 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3905 (sha256
3906 (base32
ec3bcbc7 3907 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3908 (build-system python-build-system)
444464ec
MB
3909 (arguments
3910 '(#:phases
3911 (modify-phases %standard-phases
3912 (delete 'check)
3913 (add-after 'install 'check
3914 (lambda* (#:key outputs inputs #:allow-other-keys)
3915 ;; It's easier to run tests after install.
3916 ;; Make installed package available for running the tests
3917 (add-installed-pythonpath inputs outputs)
3918 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3919 (propagated-inputs
3920 `(("python-six" ,python-six)))
c9b1b4f9 3921 (inputs
482d9591 3922 `(("readline" ,readline)
c9b1b4f9
RW
3923 ("icu4c" ,icu4c)
3924 ("pcre" ,pcre)
3925 ("r" ,r)))
3926 (native-inputs
f3b98f4f 3927 `(("zlib" ,zlib)))
c9b1b4f9
RW
3928 (home-page "http://rpy.sourceforge.net/")
3929 (synopsis "Python interface to the R language")
3930 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3931low-level interface to R from Python, a proposed high-level interface,
3932including wrappers to graphical libraries, as well as R-like structures and
3933functions.")
3f641af0 3934 (license license:gpl3+)))
c9b1b4f9
RW
3935
3936(define-public python2-rpy2
3937 (let ((rpy2 (package-with-python2 python-rpy2)))
3938 (package (inherit rpy2)
3939 (native-inputs
3940 `(("python2-singledispatch" ,python2-singledispatch)
3941 ,@(package-native-inputs rpy2))))))
3942
bb986599
FB
3943(define-public python-scipy
3944 (package
3945 (name "python-scipy")
ba8a0824 3946 (version "0.16.0")
bb986599
FB
3947 (source
3948 (origin
3949 (method url-fetch)
de67e922
LF
3950; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3951 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3952 "/scipy-" version ".tar.xz"))
bb986599
FB
3953 (sha256
3954 (base32
ba8a0824 3955 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3956 (build-system python-build-system)
dd86c0d1 3957 (propagated-inputs
bb986599
FB
3958 `(("python-numpy" ,python-numpy)
3959 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3960 ("python-pyparsing" ,python-pyparsing)))
3961 (inputs
3962 `(("lapack" ,lapack)
719b01c1 3963 ("openblas" ,openblas)))
bb986599 3964 (native-inputs
dd86c0d1 3965 `(("python-nose" ,python-nose)
a50e0301 3966 ("python-sphinx" ,python-sphinx-1.2.3)
5248d49e 3967 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3968 ("gfortran" ,gfortran)
bb986599
FB
3969 ("texlive" ,texlive)
3970 ("perl" ,perl)))
3971 (outputs '("out" "doc"))
3972 (arguments
3973 `(#:phases
16ca6aaa
MB
3974 (modify-phases %standard-phases
3975 (add-after 'unpack 'fix-tests
3976 (lambda _
3977 (substitute* "scipy/integrate/tests/test_quadpack.py"
3978 (("libm.so") "libm.so.6"))
db967b64 3979 #t))
16ca6aaa
MB
3980 (add-before 'build 'configure-openblas
3981 (lambda* (#:key inputs #:allow-other-keys)
3982 (call-with-output-file "site.cfg"
3983 (lambda (port)
3984 (format port
3985 "[blas]
719b01c1
RW
3986libraries = openblas
3987library_dirs = ~a/lib
3988include_dirs = ~a/include
d548e6aa
HG
3989
3990# backslash-n to make emacs happy
3991\n[atlas]
719b01c1
RW
3992library_dirs = ~a/lib
3993atlas_libs = openblas
3994"
16ca6aaa
MB
3995 (assoc-ref inputs "openblas")
3996 (assoc-ref inputs "openblas")
3997 (assoc-ref inputs "openblas"))))
db967b64 3998 #t))
16ca6aaa
MB
3999 (delete 'check)
4000 (add-after 'install 'install-doc
4001 (lambda* (#:key inputs outputs #:allow-other-keys)
4002 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4003 (doc (string-append data "/doc/" ,name "-" ,version))
4004 (html (string-append doc "/html"))
4005 (pyver ,(string-append "PYVER=")))
4006 ;; Make installed package available for building the
4007 ;; documentation
4008 (add-installed-pythonpath inputs outputs)
4009 (with-directory-excursion "doc"
4010 ;; Fix generation of images for mathematical expressions.
4011 (substitute* (find-files "source" "conf\\.py")
4012 (("pngmath_use_preview = True")
4013 "pngmath_use_preview = False"))
4014 (mkdir-p html)
4015 (system* "make" "html" pyver)
4016 (system* "make" "latex" "PAPER=a4" pyver)
4017 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
4018 (copy-file "build/latex/scipy-ref.pdf"
4019 (string-append doc "/scipy-ref.pdf"))
4020 (with-directory-excursion "build/html"
4021 (for-each (lambda (file)
4022 (let* ((dir (dirname file))
4023 (tgt-dir (string-append html "/" dir)))
4024 (install-file file html)))
4025 (find-files "." ".*"))))
4026 #t)))
4027 (add-after 'install-doc 'check
4028 (lambda _
4029 ;; Tests can only be run after the library has been installed and not
4030 ;; within the source directory.
4031 (with-directory-excursion "/tmp"
db967b64 4032 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))))))
bb986599
FB
4033 (home-page "http://www.scipy.org/")
4034 (synopsis "The Scipy library provides efficient numerical routines")
4035 (description "The SciPy library is one of the core packages that make up
4036the SciPy stack. It provides many user-friendly and efficient numerical
4037routines such as routines for numerical integration and optimization.")
3f641af0 4038 (license license:bsd-3)))
bb986599 4039
764c077b 4040(define-public python2-scipy
a50e0301
MB
4041 (let ((scipy (package-with-python2
4042 (strip-python2-variant python-scipy))))
4043 (package (inherit scipy)
4044 ;; Make sure to use special packages for Python 2 instead
4045 ;; of those automatically rewritten by package-with-python2.
4046 (native-inputs
4047 `(("python2-sphinx" ,python2-sphinx-1.2.3)
4048 ,@(fold alist-delete (package-native-inputs scipy)
4049 '("python-sphinx")))))))
bb986599 4050
73acc193 4051(define-public python-socksipy-branch
4052 (package
4053 (name "python-socksipy-branch")
4054 (version "1.01")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (pypi-uri "SocksiPy-branch" version))
4059 (sha256
4060 (base32
4061 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4062 (build-system python-build-system)
4063 (arguments
4064 `(#:tests? #f)) ; There are no tests
4065 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4066 (synopsis "Python SOCKS module")
4067 (description
4068 "SocksiPy - A Python SOCKS client module. It provides a
4069socket-like interface that supports connections to any TCP
4070service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4071The original version was developed by Dan Haim, this is a
4072branch created by Mario Vilas to address some open issues,
4073as the original project seems to have been abandoned circa 2007.")
4074 (license license:bsd-3)))
4075
4076(define-public python2-socksipy-branch
4077 (package-with-python2 python-socksipy-branch))
4078
94914805
EB
4079(define-public python-sqlalchemy
4080 (package
4081 (name "python-sqlalchemy")
a4ba286b 4082 (version "1.0.12")
94914805
EB
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (string-append "https://pypi.python.org/packages/source/S/"
4087 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4088 (sha256
4089 (base32
a4ba286b 4090 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4091 (build-system python-build-system)
4092 (native-inputs
4093 `(("python-cython" ,python-cython) ;for c extensions
4094 ("python-pytest" ,python-pytest)
4095 ("python-mock" ,python-mock))) ;for tests
4096 (arguments
4097 `(#:phases (alist-replace
4098 'check
4099 (lambda _ (zero? (system* "py.test")))
4100 %standard-phases)))
4101 (home-page "http://www.sqlalchemy.org")
4102 (synopsis "Database abstraction library")
4103 (description
4104 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4105gives application developers the full power and flexibility of SQL. It
4106provides a full suite of well known enterprise-level persistence patterns,
4107designed for efficient and high-performing database access, adapted into a
4108simple and Pythonic domain language.")
3f641af0 4109 (license license:x11)))
94914805
EB
4110
4111(define-public python2-sqlalchemy
4112 (package-with-python2 python-sqlalchemy))
c937562e 4113
4a093330
DM
4114(define-public python-pycodestyle
4115 (package
4116 (name "python-pycodestyle")
4117 (version "2.0.0")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 (uri (pypi-uri "pycodestyle" version))
4122 (sha256
4123 (base32
4124 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4125 (build-system python-build-system)
4126 (home-page "https://pycodestyle.readthedocs.io/")
4127 (synopsis "Python style guide checker")
4128 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4129Python code against some of the style conventions in
4130@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4131 (license license:expat)))
4a093330
DM
4132
4133(define-public python2-pycodestyle
f210e944 4134 (package-with-python2 python-pycodestyle))
b91912c4
DM
4135
4136(define-public python-orderedmultidict
4137 (package
4138 (name "python-orderedmultidict")
9e2802cb 4139 (version "0.7.11")
b91912c4
DM
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "orderedmultidict" version))
4144 (sha256
4145 (base32
9e2802cb 4146 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4147 (build-system python-build-system)
4148 (arguments
4149 `(#:phases
4150 (modify-phases %standard-phases
4151 (add-after 'unpack 'fix-tests
4152 (lambda _
4153 ;; The package uses nosetest for running the tests.
4154 ;; Adding this initfile allows to run the test suite
4155 ;; without requiring nosetest.
4156 (zero? (system* "touch" "tests/__init__.py")))))))
4157 (propagated-inputs
4158 `(("python-six" ,python-six)))
4159 (native-inputs
4160 `(("python-pycodestyle" ,python-pycodestyle)))
4161 (home-page "https://github.com/gruns/orderedmultidict")
4162 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4163 (description "This package contains a library for ordered multivalue
4164dictionaries. A multivalue dictionary is a dictionary that can store
4165multiple values for the same key. An ordered multivalue dictionary is a
4166multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4167 (license license:unlicense)))
b91912c4
DM
4168
4169(define-public python2-orderedmultidict
f210e944 4170 (package-with-python2 python-orderedmultidict))
9dede065
DM
4171
4172(define-public python-furl
4173 (package
4174 (name "python-furl")
4175 (version "0.5.6")
4176 (source
4177 (origin
4178 (method url-fetch)
4179 (uri (pypi-uri "furl" version))
4180 (sha256
4181 (base32
4182 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4183 (build-system python-build-system)
4184 (propagated-inputs
4185 `(("python-six" ,python-six)
4186 ("python-orderedmultidict" ,python-orderedmultidict)))
4187 (native-inputs
4188 `(("python-pycodestyle" ,python-pycodestyle)))
4189 (home-page "https://github.com/gruns/furl")
4190 (synopsis "URL manipulation in Python")
4191 (description "Furl provides an easy-to-use alternative to the
4192@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4193 (license license:unlicense)))
9dede065
DM
4194
4195(define-public python2-furl
f210e944 4196 (package-with-python2 python-furl))
462bf271
DM
4197
4198(define-public python-flask-babel
4199 (package
4200 (name "python-flask-babel")
4201 (version "0.11.1")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (pypi-uri "Flask-Babel" version))
4206 (sha256
4207 (base32
4208 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4209 (build-system python-build-system)
4210 (propagated-inputs
4211 `(("python-flask" ,python-flask)
4212 ("python-babel" ,python-babel)
4213 ("python-jinja2" ,python-jinja2)
4214 ("python-pytz" ,python-pytz)))
4215 (home-page "https://github.com/python-babel/flask-babel")
4216 (synopsis "Add i18n/l10n support to Flask applications")
4217 (description "This package implements internationalization and localization
4218support for Flask. This is based on the Python babel module as well as pytz -
4219both of which are installed automatically if you install this library.")
f210e944 4220 (license license:bsd-3)))
462bf271
DM
4221
4222(define-public python2-flask-babel
f210e944 4223 (package-with-python2 python-flask-babel))
4a093330 4224
de2966cf
EF
4225(define-public python-sqlalchemy-utils
4226 (package
4227 (name "python-sqlalchemy-utils")
bb4b1706 4228 (version "0.32.11")
de2966cf
EF
4229 (source
4230 (origin
4231 (method url-fetch)
4232 (uri (pypi-uri "SQLAlchemy-Utils" version))
4233 (sha256
4234 (base32
bb4b1706 4235 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4236 (build-system python-build-system)
35d56b7b
MB
4237 (arguments
4238 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4239 ;; #:phases
4240 ;; (modify-phases %standard-phases
4241 ;; (replace 'check
4242 ;; (lambda _
4243 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4244 (propagated-inputs
de2966cf
EF
4245 `(("python-six" ,python-six)
4246 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4247 (native-inputs
22d7360b 4248 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4249 ("python-flexmock" ,python-flexmock)
4250 ("python-psycopg2" ,python-psycopg2)
4251 ("python-pytest" ,python-pytest)
4252 ("python-pytz" ,python-pytz)))
de2966cf
EF
4253 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4254 (synopsis "Various utility functions for SQLAlchemy")
4255 (description
4256 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4257for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4258
4259You might also want to install the following optional dependencies:
4260@enumerate
4261@item @code{python-passlib}
4262@item @code{python-babel}
4263@item @code{python-cryptography}
4264@item @code{python-pytz}
4265@item @code{python-psycopg2}
4266@item @code{python-furl}
4267@item @code{python-flask-babel}
4268@end enumerate
4269")
de2966cf
EF
4270 (license license:bsd-3)))
4271
4272(define-public python2-sqlalchemy-utils
f210e944 4273 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4274
af5a4602
CAW
4275(define-public python-alembic
4276 (package
4277 (name "python-alembic")
4418990d 4278 (version "0.8.10")
af5a4602
CAW
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (pypi-uri "alembic" version))
4283 (sha256
4284 (base32
4418990d 4285 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4286 (build-system python-build-system)
4287 (native-inputs
4288 `(("python-mock" ,python-mock)
4289 ("python-pytest-cov" ,python-pytest-cov)))
4290 (propagated-inputs
4291 `(("python-sqlalchemy" ,python-sqlalchemy)
4292 ("python-mako" ,python-mako)
4293 ("python-editor" ,python-editor)))
4294 (home-page "http://bitbucket.org/zzzeek/alembic")
4295 (synopsis
4296 "Database migration tool for SQLAlchemy")
4297 (description
4298 "Alembic is a lightweight database migration tool for usage with the
4299SQLAlchemy Database Toolkit for Python.")
f210e944 4300 (license license:expat)))
af5a4602
CAW
4301
4302(define-public python2-alembic
f210e944 4303 (package-with-python2 python-alembic))
af5a4602 4304
138adbbe
TD
4305(define-public python-autopep8
4306 (package
4307 (name "python-autopep8")
4308 (version "1.2.4")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "autopep8" version))
4313 (sha256
4314 (base32
4315 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4316 (build-system python-build-system)
4317 (propagated-inputs
4318 `(("python-pep8" ,python-pep8)))
4319 (home-page "https://github.com/hhatto/autopep8")
4320 (synopsis "Format Python code according to the PEP 8 style guide")
4321 (description
4322 "@code{autopep8} automatically formats Python code to conform to
4323the PEP 8 style guide. It uses the pycodestyle utility to determine
4324what parts of the code needs to be formatted. @code{autopep8} is
4325capable of fixing most of the formatting issues that can be reported
4326by pycodestyle.")
4327 (license (license:non-copyleft
4328 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4329
4330(define-public python2-autopep8
4331 (package-with-python2 python-autopep8))
4332
1671c07c
EB
4333(define-public python-distutils-extra
4334 (package
4335 (name "python-distutils-extra")
4336 (version "2.38")
4337 (source
4338 (origin
4339 (method url-fetch)
4340 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4341 version "/+download/python-distutils-extra-"
4342 version ".tar.gz"))
4343 (sha256
4344 (base32
4345 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4346 (build-system python-build-system)
1671c07c
EB
4347 (home-page "https://launchpad.net/python-distutils-extra/")
4348 (synopsis "Enhancements to Python's distutils")
4349 (description
4350 "The python-distutils-extra module enables you to easily integrate
4351gettext support, themed icons, and scrollkeeper-based documentation into
4352Python's distutils.")
3f641af0 4353 (license license:gpl2)))
1671c07c
EB
4354
4355(define-public python2-distutils-extra
4356 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4357
4358(define-public python2-elib.intl
4359 (package
4360 (name "python2-elib.intl")
4361 (version "0.0.3")
4362 (source
4363 (origin
4364 ;; This project doesn't tag releases or publish tarballs, so we take
4365 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4366 (method git-fetch)
4367 (uri (git-reference
4368 (url "https://github.com/dieterv/elib.intl.git")
4369 (commit "d09997cfef")))
4370 (sha256
4371 (base32
4372 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4373 (build-system python-build-system)
ea5456c8
EB
4374 (arguments
4375 ;; incompatible with Python 3 (exception syntax)
4376 `(#:python ,python-2
b41a05ce 4377 #:tests? #f))
ea5456c8
EB
4378 (home-page "https://github.com/dieterv/elib.intl")
4379 (synopsis "Enhanced internationalization for Python")
4380 (description
4381 "The elib.intl module provides enhanced internationalization (I18N)
4382services for your Python modules and applications.")
3f641af0 4383 (license license:lgpl3+)))
ea5456c8 4384
c937562e
EB
4385(define-public python-pillow
4386 (package
4387 (name "python-pillow")
aba5182c 4388 (version "3.3.3")
c937562e
EB
4389 (source
4390 (origin
4391 (method url-fetch)
f1d9231d 4392 (uri (pypi-uri "Pillow" version))
c937562e
EB
4393 (sha256
4394 (base32
aba5182c 4395 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4396 (build-system python-build-system)
4397 (native-inputs
f3b98f4f 4398 `(("python-nose" ,python-nose)))
c937562e 4399 (inputs
5ff408d9
SB
4400 `(("freetype" ,freetype)
4401 ("lcms" ,lcms)
c937562e
EB
4402 ("zlib" ,zlib)
4403 ("libjpeg" ,libjpeg)
4404 ("openjpeg" ,openjpeg)
5ff408d9
SB
4405 ("libtiff" ,libtiff)
4406 ("libwebp" ,libwebp)))
c937562e 4407 (arguments
e5358a6b 4408 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4409 (add-after
4410 'install 'check-installed
6151120a 4411 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4412 (begin
4413 (setenv "HOME" (getcwd))
6151120a
HG
4414 ;; Make installed package available for running the
4415 ;; tests
4416 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4417 (and (zero? (system* "python" "selftest.py"
4418 "--installed"))
4419 (zero? (system* "python" "test-installed.py"))))))
4420 (delete 'check))))
c937562e
EB
4421 (home-page "https://pypi.python.org/pypi/Pillow")
4422 (synopsis "Fork of the Python Imaging Library")
4423 (description
4424 "The Python Imaging Library adds image processing capabilities to your
4425Python interpreter. This library provides extensive file format support, an
4426efficient internal representation, and fairly powerful image processing
4427capabilities. The core image library is designed for fast access to data
4428stored in a few basic pixel formats. It should provide a solid foundation for
4429a general image processing tool.")
3f641af0 4430 (license (license:x11-style
c937562e
EB
4431 "http://www.pythonware.com/products/pil/license.htm"
4432 "The PIL Software License"))))
4433
4434(define-public python2-pillow
4435 (package-with-python2 python-pillow))
bb986599 4436
a415f036
FB
4437(define-public python-pycparser
4438 (package
4439 (name "python-pycparser")
5043b20d 4440 (version "2.17")
a415f036
FB
4441 (source
4442 (origin
4443 (method url-fetch)
38eb6919 4444 (uri (pypi-uri "pycparser" version))
a415f036
FB
4445 (sha256
4446 (base32
5043b20d 4447 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4448 (outputs '("out" "doc"))
4449 (build-system python-build-system)
4450 (native-inputs
f3b98f4f 4451 `(("pkg-config" ,pkg-config)))
a415f036 4452 (arguments
89b5c60e 4453 `(#:phases
819939cb
TGR
4454 (modify-phases %standard-phases
4455 (replace 'check
4456 (lambda _
4457 (with-directory-excursion "tests"
4458 (zero? (system* "python" "all_tests.py")))))
4459 (add-after 'install 'install-doc
4460 (lambda* (#:key outputs #:allow-other-keys)
4461 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4462 (doc (string-append data "/doc/" ,name "-" ,version))
4463 (examples (string-append doc "/examples")))
4464 (mkdir-p examples)
4465 (for-each (lambda (file)
4466 (copy-file (string-append "." file)
4467 (string-append doc file)))
4468 '("/README.rst" "/CHANGES" "/LICENSE"))
4469 (copy-recursively "examples" examples)))))))
a415f036
FB
4470 (home-page "https://github.com/eliben/pycparser")
4471 (synopsis "C parser in Python")
4472 (description
4473 "Pycparser is a complete parser of the C language, written in pure Python
4474using the PLY parsing library. It parses C code into an AST and can serve as
4475a front-end for C compilers or analysis tools.")
3f641af0 4476 (license license:bsd-3)))
a415f036
FB
4477
4478(define-public python2-pycparser
4479 (package-with-python2 python-pycparser))
57c3f716
FB
4480
4481(define-public python-cffi
4482 (package
4483 (name "python-cffi")
2d3a437c 4484 (version "1.4.2")
57c3f716
FB
4485 (source
4486 (origin
4487 (method url-fetch)
2d3a437c 4488 (uri (pypi-uri "cffi" version))
89b5c60e 4489 (sha256
2d3a437c 4490 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4491 (build-system python-build-system)
4492 (outputs '("out" "doc"))
4493 (inputs
4494 `(("libffi" ,libffi)))
4495 (propagated-inputs ; required at run-time
4496 `(("python-pycparser" ,python-pycparser)))
4497 (native-inputs
4498 `(("pkg-config" ,pkg-config)
4499 ("python-sphinx" ,python-sphinx)
f3b98f4f 4500 ("python-pytest" ,python-pytest)))
57c3f716 4501 (arguments
4179f952 4502 `(#:phases
57c3f716
FB
4503 (alist-cons-after
4504 'install 'install-doc
4505 (lambda* (#:key outputs #:allow-other-keys)
4506 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4507 (doc (string-append data "/doc/" ,name "-" ,version))
4508 (html (string-append doc "/html")))
4509 (with-directory-excursion "doc"
4510 (system* "make" "html")
4511 (mkdir-p html)
4512 (copy-recursively "build/html" html))
4513 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4514 %standard-phases)))
4515 (home-page "http://cffi.readthedocs.org")
4516 (synopsis "Foreign function interface for Python")
4517 (description
4518 "Foreign Function Interface for Python calling C code.")
bd3fa666 4519 (license license:expat)))
57c3f716
FB
4520
4521(define-public python2-cffi
4522 (package-with-python2 python-cffi))
6fa14469
FB
4523
4524(define-public python-xcffib
4525 (package
4526 (name "python-xcffib")
4527 (version "0.1.9")
4528 (source
4529 (origin
4530 (method url-fetch)
4531 (uri (string-append "https://pypi.python.org/packages/source/x/"
4532 "xcffib/xcffib-" version ".tar.gz"))
4533 (sha256
4534 (base32
4535 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4536 (build-system python-build-system)
4537 (inputs
482d9591 4538 `(("libxcb" ,libxcb)))
6fa14469 4539 (propagated-inputs
482d9591
HG
4540 `(("python-cffi" ,python-cffi) ; used at run time
4541 ("python-six" ,python-six)))
6fa14469 4542 (arguments
e2816ac7
MB
4543 `(;; FIXME: Tests cannot load libxcb.so.1
4544 #:tests? #f
4545 #:phases
c8cd850c
MB
4546 (modify-phases %standard-phases
4547 (add-after 'install 'install-doc
4548 (lambda* (#:key outputs #:allow-other-keys)
4549 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4550 "/doc/" ,name "-" ,version)))
4551 (mkdir-p doc)
4552 (copy-file "README.md"
4553 (string-append doc "/README.md"))
4554 #t))))))
6fa14469
FB
4555 (home-page "https://github.com/tych0/xcffib")
4556 (synopsis "XCB Python bindings")
4557 (description
4558 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4559support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4560 (license license:expat)))
6fa14469
FB
4561
4562(define-public python2-xcffib
4563 (package-with-python2 python-xcffib))
4564
9e099723
FB
4565(define-public python-cairocffi
4566 (package
4567 (name "python-cairocffi")
4568 (version "0.6")
4569 (source
4570 (origin
4571 (method url-fetch)
4572 ;; The archive on pypi is missing the 'utils' directory!
4573 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4574 version ".tar.gz"))
f586c877 4575 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4576 (sha256
4577 (base32
4578 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4579 (build-system python-build-system)
4580 (outputs '("out" "doc"))
4581 (inputs
4582 `(("gdk-pixbuf" ,gdk-pixbuf)
4583 ("cairo" ,cairo)))
4584 (native-inputs
4585 `(("pkg-config" ,pkg-config)
4586 ("python-sphinx" ,python-sphinx)
f3b98f4f 4587 ("python-docutils" ,python-docutils)))
9e099723
FB
4588 (propagated-inputs
4589 `(("python-xcffib" ,python-xcffib))) ; used at run time
4590 (arguments
a792e1aa
MB
4591 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4592 #:tests? #f
4593 #:phases
6734c7ba
MB
4594 (modify-phases %standard-phases
4595 (add-after 'install 'install-doc
4596 (lambda* (#:key inputs outputs #:allow-other-keys)
4597 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4598 (doc (string-append data "/doc/" ,name "-" ,version))
4599 (html (string-append doc "/html")))
4600 (setenv "LD_LIBRARY_PATH"
4601 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4602 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4603 (setenv "LANG" "en_US.UTF-8")
4604 (mkdir-p html)
4605 (for-each (lambda (file)
4606 (copy-file (string-append "." file)
4607 (string-append doc file)))
4608 '("/README.rst" "/CHANGES" "/LICENSE"))
4609 (system* "python" "setup.py" "build_sphinx")
4610 (copy-recursively "docs/_build/html" html)
4611 #t))))))
9e099723
FB
4612 (home-page "https://github.com/SimonSapin/cairocffi")
4613 (synopsis "Python bindings and object-oriented API for Cairo")
4614 (description
4615 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4616Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4617graphics library with support for multiple backends including image buffers,
4618PNG, PostScript, PDF, and SVG file output.")
3f641af0 4619 (license license:bsd-3)))
9e099723
FB
4620
4621(define-public python2-cairocffi
4622 (package-with-python2 python-cairocffi))
4623
3cff95cb
RW
4624(define-public python-decorator
4625 (package
4626 (name "python-decorator")
d79fa7da 4627 (version "4.0.10")
3cff95cb
RW
4628 (source
4629 (origin
4630 (method url-fetch)
e21338be 4631 (uri (pypi-uri "decorator" version))
3cff95cb 4632 (sha256
d79fa7da 4633 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4634 (build-system python-build-system)
4635 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4636 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4637 (synopsis "Python module to simplify usage of decorators")
4638 (description
4639 "The aim of the decorator module is to simplify the usage of decorators
4640for the average programmer, and to popularize decorators usage giving examples
4641of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4642etc. The core of this module is a decorator factory.")
4643 (license license:expat)))
4644
4645(define-public python2-decorator
4646 (package-with-python2 python-decorator))
4647
2c0499ad
RW
4648(define-public python-drmaa
4649 (package
4650 (name "python-drmaa")
4651 (version "0.7.6")
4652 (source
4653 (origin
4654 (method url-fetch)
4655 (uri (string-append
4656 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4657 version ".tar.gz"))
4658 (sha256
4659 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4660 (build-system python-build-system)
4661 ;; The test suite requires libdrmaa which is provided by the cluster
4662 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4663 ;; should be set to the path of the libdrmaa library.
4664 (arguments '(#:tests? #f))
4665 (native-inputs
f3b98f4f 4666 `(("python-nose" ,python-nose)))
2c0499ad
RW
4667 (home-page "https://pypi.python.org/pypi/drmaa")
4668 (synopsis "Python bindings for the DRMAA library")
4669 (description
4670 "A Python package for Distributed Resource Management (DRM) job
4671submission and control. This package is an implementation of the DRMAA 1.0
4672Python language binding specification.")
3f641af0 4673 (license license:bsd-3)))
2c0499ad
RW
4674
4675(define-public python2-drmaa
4676 (package-with-python2 python-drmaa))
4677
d05c6da0
RW
4678(define-public python-gridmap
4679 (package
4680 (name "python-gridmap")
4681 (version "0.13.0")
4682 (source
4683 (origin
4684 (method url-fetch)
4685 (uri (string-append
4686 "https://github.com/pygridtools/gridmap/archive/v"
4687 version ".tar.gz"))
4688 (file-name (string-append name "-" version ".tar.gz"))
4689 (sha256
4690 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4691 (build-system python-build-system)
ad348f9f
MB
4692 (arguments
4693 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4694 (propagated-inputs
d05c6da0
RW
4695 `(("python-psutil" ,python-psutil)
4696 ("python-drmaa" ,python-drmaa)
4697 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4698 (home-page "https://github.com/pygridtools/gridmap")
4699 (synopsis "Create jobs on a cluster directly from Python")
4700 (description
4701 "Gridmap is a Python package to allow you to easily create jobs on the
4702cluster directly from Python. You can directly map Python functions onto the
4703cluster without needing to write any wrapper code yourself.")
3f641af0 4704 (license license:gpl3+)))
d05c6da0
RW
4705
4706(define-public python2-gridmap
4707 (package-with-python2 python-gridmap))
4708
cb6d5c54
RW
4709(define-public python-pexpect
4710 (package
4711 (name "python-pexpect")
ed118043 4712 (version "4.2.1")
cb6d5c54
RW
4713 (source
4714 (origin
4715 (method url-fetch)
ed118043 4716 (uri (pypi-uri "pexpect" version))
cb6d5c54 4717 (sha256
ed118043 4718 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4719 (build-system python-build-system)
4720 (arguments
4721 `(#:phases
4722 (modify-phases %standard-phases
ed118043
MB
4723 (add-before 'check 'prepare-tests
4724 (lambda _
4725 (substitute* (find-files "tests")
4726 (("/bin/ls") (which "ls"))
4727 (("/bin/echo") (which "echo"))
4728 (("/bin/which") (which "which"))
4729 ;; Many tests try to use the /bin directory which
4730 ;; is not present in the build environment.
4731 ;; Use one that's non-empty and unlikely to change.
4732 (("/bin'") "/dev'"))
4733 ;; XXX: Socket connection test gets "Connection reset by peer".
4734 ;; Why does it not work? Delete for now.
4735 (delete-file "tests/test_socket.py")
4736 #t))
cb6d5c54
RW
4737 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4738 (native-inputs
ed118043
MB
4739 `(("python-nose" ,python-nose)
4740 ("python-pytest" ,python-pytest)
4741 ("man-db" ,man-db)
4742 ("which" ,which)))
4743 (propagated-inputs
4744 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4745 (home-page "http://pexpect.readthedocs.org/")
4746 (synopsis "Controlling interactive console applications")
4747 (description
4748 "Pexpect is a pure Python module for spawning child applications;
4749controlling them; and responding to expected patterns in their output.
4750Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4751child application and control it as if a human were typing commands.")
3f641af0 4752 (license license:isc)))
cb6d5c54
RW
4753
4754(define-public python2-pexpect
4755 (package-with-python2 python-pexpect))
4756
229ad120
RW
4757(define-public python-setuptools-scm
4758 (package
4759 (name "python-setuptools-scm")
42d6d0d0 4760 (version "1.11.1")
229ad120
RW
4761 (source (origin
4762 (method url-fetch)
383af6b0 4763 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4764 (sha256
4765 (base32
42d6d0d0 4766 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4767 (build-system python-build-system)
4768 (home-page "https://github.com/pypa/setuptools_scm/")
4769 (synopsis "Manage Python package versions in SCM metadata")
4770 (description
383af6b0 4771 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4772@dfn{software configuration management} (SCM) metadata instead of declaring
4773them as the version argument or in a SCM managed file.")
4774 (license license:expat)))
4775
4776(define-public python2-setuptools-scm
4777 (package-with-python2 python-setuptools-scm))
4778
b74270ee
RW
4779(define-public python-pathpy
4780 (package
4781 (name "python-pathpy")
4782 (version "8.1.1")
4783 (source
4784 (origin
4785 (method url-fetch)
4786 (uri (string-append "https://pypi.python.org/packages/source/p/"
4787 "path.py/path.py-" version ".tar.gz"))
4788 (sha256
4789 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4790 (outputs '("out" "doc"))
b74270ee
RW
4791 (build-system python-build-system)
4792 (propagated-inputs
4793 `(("python-appdirs" ,python-appdirs)))
4794 (native-inputs
f3b98f4f 4795 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4796 ("python-sphinx" ,python-sphinx)
4797 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4798 ("python-pytest" ,python-pytest)
4799 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4800 (arguments
4801 `(#:phases
4802 (modify-phases %standard-phases
4803 (add-after 'build 'build-doc
4804 (lambda _
4805 (setenv "LANG" "en_US.UTF-8")
4806 (zero? (system* "python" "setup.py" "build_sphinx"))))
4807 (add-after 'install 'install-doc
4808 (lambda* (#:key outputs #:allow-other-keys)
4809 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4810 (doc (string-append data "/doc/" ,name "-" ,version))
4811 (html (string-append doc "/html")))
4812 (mkdir-p html)
4813 (for-each (lambda (file)
4814 (copy-file file (string-append doc "/" file)))
4815 '("README.rst" "CHANGES.rst"))
4816 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4817 (home-page "http://github.com/jaraco/path.py")
4818 (synopsis "Python module wrapper for built-in os.path")
4819 (description
4820 "@code{path.py} implements path objects as first-class entities, allowing
4821common operations on files to be invoked on those path objects directly.")
4822 (license license:expat)))
4823
4824(define-public python2-pathpy
4825 (package-with-python2 python-pathpy))
4826
0d34e01b
RW
4827(define-public python-pickleshare
4828 (package
4829 (name "python-pickleshare")
4830 (version "0.5")
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (string-append "https://pypi.python.org/packages/source/p/"
4835 "pickleshare/pickleshare-" version ".tar.gz"))
4836 (sha256
4837 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4838 (build-system python-build-system)
4839 (propagated-inputs
4840 `(("python-pathpy" ,python-pathpy)))
4841 (home-page "https://github.com/vivainio/pickleshare")
4842 (synopsis "Tiny key value database with concurrency support")
4843 (description
4844 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4845Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4846shelve, many processes can access the database simultaneously. Changing a
4847value in database is immediately visible to other processes accessing the same
4848database. Concurrency is possible because the values are stored in separate
4849files. Hence the “database” is a directory where all files are governed by
4850PickleShare.")
4851 (license license:expat)))
4852
4853(define-public python2-pickleshare
4854 (package-with-python2 python-pickleshare))
4855
cd6e5189
RW
4856(define-public python-simplegeneric
4857 (package
4858 (name "python-simplegeneric")
4859 (version "0.8.1")
4860 (source
4861 (origin
4862 (method url-fetch)
4863 (uri (string-append "https://pypi.python.org/packages/source/s/"
4864 "simplegeneric/simplegeneric-" version ".zip"))
4865 (sha256
4866 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4867 (build-system python-build-system)
4868 (native-inputs
f3b98f4f 4869 `(("unzip" ,unzip)))
cd6e5189
RW
4870 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4871 (synopsis "Python module for simple generic functions")
4872 (description
4873 "The simplegeneric module lets you define simple single-dispatch generic
4874functions, akin to Python’s built-in generic functions like @code{len()},
4875@code{iter()} and so on. However, instead of using specially-named methods,
4876these generic functions use simple lookup tables, akin to those used by
4877e.g. @code{pickle.dump()} and other generic functions found in the Python
4878standard library.")
3f641af0 4879 (license license:zpl2.1)))
cd6e5189
RW
4880
4881(define-public python2-simplegeneric
4882 (package-with-python2 python-simplegeneric))
4883
ddc7d8ed 4884(define-public python-ipython-genutils
c4abbac3 4885 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4886 (package
4887 (name "python-ipython-genutils")
4888 (version "0.1.0")
4889 (source
4890 (origin
4891 (method url-fetch)
4892 (uri (string-append "https://pypi.python.org/packages/source/i/"
4893 "ipython_genutils/ipython_genutils-"
4894 version ".tar.gz"))
4895 (sha256
4896 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4897 (build-system python-build-system)
4898 (arguments `(#:tests? #f)) ; no tests
4899 (home-page "http://ipython.org")
4900 (synopsis "Vestigial utilities from IPython")
4901 (description
c4abbac3
HG
4902 "This package provides retired utilities from IPython. No packages
4903outside IPython/Jupyter should depend on it.
4904
4905This package shouldn't exist. It contains some common utilities shared by
4906Jupyter and IPython projects during The Big Split. As soon as possible, those
4907packages will remove their dependency on this, and this package will go
4908away.")
3f641af0 4909 (license license:bsd-3)))
ddc7d8ed
RW
4910
4911(define-public python2-ipython-genutils
4912 (package-with-python2 python-ipython-genutils))
4913
2b10eb48
RW
4914(define-public python-traitlets
4915 (package
4916 (name "python-traitlets")
a5ba1481 4917 (version "4.2.0")
2b10eb48
RW
4918 (source
4919 (origin
4920 (method url-fetch)
cc0c4fde 4921 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4922 (sha256
4923 (base32
a5ba1481 4924 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4925 (build-system python-build-system)
4926 (arguments
4927 `(#:phases
4928 (modify-phases %standard-phases
4929 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4930 (propagated-inputs
4931 `(("python-ipython-genutils" ,python-ipython-genutils)
4932 ("python-decorator" ,python-decorator)))
4933 (native-inputs
cc0c4fde
EF
4934 `(("python-mock" ,python-mock)
4935 ("python-nose" ,python-nose)))
2b10eb48
RW
4936 (home-page "http://ipython.org")
4937 (synopsis "Configuration system for Python applications")
4938 (description
4939 "Traitlets is a framework that lets Python classes have attributes with
4940type checking, dynamically calculated default values, and ‘on change’
4941callbacks. The package also includes a mechanism to use traitlets for
4942configuration, loading values from files or from command line arguments. This
4943is a distinct layer on top of traitlets, so you can use traitlets in your code
4944without using the configuration machinery.")
3f641af0 4945 (license license:bsd-3)))
2b10eb48
RW
4946
4947(define-public python2-traitlets
4948 (package-with-python2 python-traitlets))
4949
4263b06f
RW
4950(define-public python-jupyter-core
4951 (package
4952 (name "python-jupyter-core")
45cc957c 4953 (version "4.2.1")
4263b06f
RW
4954 (source
4955 (origin
4956 (method url-fetch)
4957 (uri (string-append (pypi-uri "jupyter_core" version)))
4958 (sha256
4959 (base32
45cc957c 4960 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
4961 (build-system python-build-system)
4962 ;; FIXME: not sure how to run the tests
4963 (arguments `(#:tests? #f))
4964 (propagated-inputs
4965 `(("python-traitlets" ,python-traitlets)))
4966 (home-page "http://jupyter.org/")
4967 (synopsis "Jupyter base package")
4968 (description
4969 "Jupyter core is the base package on which Jupyter projects rely.")
4970 (license license:bsd-3)))
4971
4972(define-public python2-jupyter-core
4973 (package-with-python2 python-jupyter-core))
4974
9ff01f2d
RW
4975(define-public python-jupyter-client
4976 (package
4977 (name "python-jupyter-client")
4978 (version "4.4.0")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "jupyter_client" version))
4983 (sha256
4984 (base32
4985 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4986 (build-system python-build-system)
4987 ;; Tests fail because of missing native python kernel which I assume is
4988 ;; provided by the ipython package, which we cannot use because it would
4989 ;; cause a dependency cycle.
4990 (arguments `(#:tests? #f))
4991 (propagated-inputs
4992 `(("python-pyzmq" ,python-pyzmq)
4993 ("python-traitlets" ,python-traitlets)
4994 ("python-jupyter-core" ,python-jupyter-core)))
4995 (home-page "http://jupyter.org/")
4996 (synopsis "Jupyter protocol implementation and client libraries")
4997 (description
4998 "The @code{jupyter_client} package contains the reference implementation
4999of the Jupyter protocol. It also provides client and kernel management APIs
5000for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5001installing @code{kernelspec}s for use with Jupyter frontends.")
5002 (license license:bsd-3)))
5003
5004(define-public python2-jupyter-client
5005 (package-with-python2 python-jupyter-client))
5006
ab526102
RW
5007(define-public python-ipykernel
5008 (package
5009 (name "python-ipykernel")
f165648e 5010 (version "4.5.2")
ab526102
RW
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "ipykernel" version))
5015 (sha256
f165648e 5016 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5017 (build-system python-build-system)
5018 ;; The tests load a submodule of IPython. However, IPython itself depends
5019 ;; on ipykernel.
5020 (arguments `(#:tests? #f))
5021 (propagated-inputs
5022 ;; imported at runtime during connect
5023 `(("python-jupyter-client" ,python-jupyter-client)))
5024 (home-page "http://ipython.org")
5025 (synopsis "IPython Kernel for Jupyter")
5026 (description
5027 "This package provides the IPython kernel for Jupyter.")
5028 (license license:bsd-3)))
5029
5030(define-public python2-ipykernel
5031 (package-with-python2 python-ipykernel))
5032
5ff6effc
RW
5033(define-public python-testpath
5034 (package
5035 (name "python-testpath")
5036 (version "0.2")
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5041 version ".tar.gz"))
5042 (file-name (string-append name "-" version ".tar.gz"))
5043 (sha256
5044 (base32
5045 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5046 (build-system python-build-system)
5047 (arguments
5048 `(#:tests? #f ; this package does not even have a setup.py
5049 #:phases
5050 (modify-phases %standard-phases
5051 (delete 'install)
5052 (replace 'build
5053 (lambda* (#:key inputs outputs #:allow-other-keys)
5054 (let ((dir (string-append
5055 (assoc-ref outputs "out")
5056 "/lib/python"
5057 (string-take (string-take-right
5058 (assoc-ref inputs "python") 5) 3)
5059 "/site-packages/testpath")))
5060 (mkdir-p dir)
5061 (copy-recursively "testpath" dir))
5062 #t)))))
5063 (home-page "https://github.com/takluyver/testpath")
5064 (synopsis "Test utilities for code working with files and commands")
5065 (description
5066 "Testpath is a collection of utilities for Python code working with files
5067and commands. It contains functions to check things on the filesystem, and
5068tools for mocking system commands and recording calls to those.")
5069 (license license:expat)))
5070
5071(define-public python2-testpath
5072 (package-with-python2 python-testpath))
5073
ae1ab9fe
FB
5074(define-public python-ipython
5075 (package
5076 (name "python-ipython")
4dbc8ec4 5077 (version "4.0.3")
ae1ab9fe
FB
5078 (source
5079 (origin
fceac880 5080 (method url-fetch)
accd5f99 5081 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5082 (sha256
4dbc8ec4 5083 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
5084 (build-system python-build-system)
5085 (outputs '("out" "doc"))
3a0b1b9a
FB
5086 (propagated-inputs
5087 `(("python-pyzmq" ,python-pyzmq)
accd5f99 5088 ("python-terminado" ,python-terminado)
ae1ab9fe 5089 ("python-matplotlib" ,python-matplotlib)
5d26e542 5090 ("python-numpy" ,python-numpy)
ae1ab9fe 5091 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5092 ("python-jinja2" ,python-jinja2)
5093 ("python-mistune" ,python-mistune)
accd5f99
RW
5094 ("python-pexpect" ,python-pexpect)
5095 ("python-pickleshare" ,python-pickleshare)
5096 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5097 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5098 ("python-traitlets" ,python-traitlets)
5099 ("python-ipykernel" ,python-ipykernel)
5100 ("python-pygments" ,python-pygments)))
5101 (inputs
5102 `(("readline" ,readline)
5103 ("which" ,which)))
ae1ab9fe
FB
5104 (native-inputs
5105 `(("pkg-config" ,pkg-config)
accd5f99
RW
5106 ("python-requests" ,python-requests) ;; for tests
5107 ("python-testpath" ,python-testpath)
5108 ("python-nose" ,python-nose)
ae1ab9fe
FB
5109 ("python-sphinx" ,python-sphinx)
5110 ("texlive" ,texlive)
f3b98f4f 5111 ("texinfo" ,texinfo)))
ae1ab9fe 5112 (arguments
89b5c60e 5113 `(#:phases
3a0b1b9a
FB
5114 (modify-phases %standard-phases
5115 (add-after
5116 'install 'install-doc
5117 (lambda* (#:key inputs outputs #:allow-other-keys)
5118 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5119 (doc (string-append data "/doc/" ,name "-" ,version))
5120 (html (string-append doc "/html"))
5121 (man1 (string-append data "/man/man1"))
5122 (info (string-append data "/info"))
5123 (examples (string-append doc "/examples")))
afd3d931 5124 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5125 ;; Make installed package available for running the tests
5126 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5127 (with-directory-excursion "docs"
accd5f99
RW
5128 ;; FIXME: pdf fails to build
5129 ;;(system* "make" "pdf" "PAPER=a4")
5130 (system* "make" "html")
3a0b1b9a
FB
5131 (system* "make" "info"))
5132 (copy-recursively "docs/man" man1)
5133 (copy-recursively "examples" examples)
accd5f99 5134 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5135 ;; (copy-file "docs/build/latex/ipython.pdf"
5136 ;; (string-append doc "/ipython.pdf"))
5137 (mkdir-p info)
5138 (copy-file "docs/build/texinfo/ipython.info"
5139 (string-append info "/ipython.info"))
5140 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5141 ;; Tests can only be run after the library has been installed and not
5142 ;; within the source directory.
5143 (delete 'check)
5144 (add-after
5145 'install 'check
eee5cd04 5146 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5147 (if tests?
5148 (with-directory-excursion "/tmp"
eee5cd04
HG
5149 ;; Make installed package available for running the tests
5150 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5151 (setenv "HOME" "/tmp/") ;; required by a test
5152 (zero? (system* (string-append (assoc-ref outputs "out")
5153 "/bin/iptest"))))
5154 #t)))
5155 (add-before
5156 'install 'fix-tests
5157 (lambda* (#:key inputs #:allow-other-keys)
5158 (substitute* "./IPython/utils/_process_posix.py"
5159 (("/usr/bin/env', 'which") (which "which")))
5160 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5161 (("#!/usr/bin/env python")
5162 (string-append "#!" (which "python"))))
5163 ;; Disable 1 failing test
5164 (substitute* "./IPython/core/tests/test_magic.py"
5165 (("def test_dirops\\(\\):" all)
5166 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5167 (home-page "http://ipython.org")
5168 (synopsis "IPython is a tool for interactive computing in Python")
5169 (description
5170 "IPython provides a rich architecture for interactive computing with:
5171Powerful interactive shells, a browser-based notebook, support for interactive
5172data visualization, embeddable interpreters and tools for parallel
5173computing.")
135ba811
EF
5174 (license license:bsd-3)
5175 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5176
5177(define-public python2-ipython
135ba811 5178 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5179 (package
5180 (inherit ipython)
5181 ;; FIXME: some tests are failing
5182 (arguments
5183 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 5184 ;; FIXME: add pyreadline once available.
e62600fe 5185 (native-inputs
135ba811 5186 `(("python2-mock" ,python2-mock)
77a6932a 5187 ,@(package-native-inputs ipython))))))
03411993
AE
5188
5189(define-public python-isodate
5190 (package
5191 (name "python-isodate")
b6785c2e 5192 (version "0.5.4")
03411993
AE
5193 (source
5194 (origin
5195 (method url-fetch)
b6785c2e 5196 (uri (pypi-uri "isodate" version))
03411993
AE
5197 (sha256
5198 (base32
b6785c2e 5199 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5200 (build-system python-build-system)
03411993
AE
5201 (home-page
5202 "http://cheeseshop.python.org/pypi/isodate")
5203 (synopsis
5204 "Python date parser and formatter")
5205 (description
5206 "Python-isodate is a python module for parsing and formatting
5207ISO 8601 dates, time and duration.")
3f641af0 5208 (license license:bsd-3)))
03411993
AE
5209
5210(define-public python2-isodate
5211 (package-with-python2 python-isodate))
673ab897
AE
5212
5213(define-public python-html5lib
5214 (package
5215 (name "python-html5lib")
a14061aa 5216 (version "1.0b10")
673ab897
AE
5217 (source
5218 (origin
5219 (method url-fetch)
fee04c19 5220 (uri (pypi-uri "html5lib" version))
673ab897
AE
5221 (sha256
5222 (base32
a14061aa 5223 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5224 (build-system python-build-system)
3dd75476 5225 (propagated-inputs
4eb6ed28
MB
5226 `(("python-six" ,python-six)
5227 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5228 (arguments
5229 `(#:test-target "check"))
5230 (home-page
5231 "https://github.com/html5lib/html5lib-python")
5232 (synopsis
5233 "Python HTML parser based on the WHATWG HTML specifcation")
5234 (description
5235 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5236and written in Python.")
bd3fa666 5237 (license license:expat)))
673ab897
AE
5238
5239(define-public python2-html5lib
5240 (package-with-python2 python-html5lib))
e99f4211 5241
8ee62c97
RW
5242;; Needed for python-bleach, a dependency of python-notebook
5243(define-public python-html5lib-0.9
5244 (package
5245 (inherit python-html5lib)
5246 (version "0.999")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "html5lib" version))
5251 (sha256
5252 (base32
5253 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5254
5255(define-public python2-html5lib-0.9
5256 (package-with-python2 python-html5lib-0.9))
5257
adbca19e
MB
5258(define-public python-webencodings
5259 (package
5260 (name "python-webencodings")
5261 (version "0.5")
5262 (source (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "webencodings" version))
5265 (sha256
5266 (base32
5267 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5268 (build-system python-build-system)
5269 (arguments
5270 '(#:phases
5271 (modify-phases %standard-phases
5272 (replace 'check
5273 (lambda _
5274 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5275 (native-inputs
5276 `(("python-pytest" ,python-pytest)))
5277 (home-page "https://github.com/SimonSapin/python-webencodings")
5278 (synopsis "Character encoding aliases for legacy web content")
5279 (description
5280 "In order to be compatible with legacy web content when interpreting
5281something like @code{Content-Type: text/html; charset=latin1}, tools need
5282to use a particular set of aliases for encoding labels as well as some
5283overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5284the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5285or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5286The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5287defines all such details so that implementations do not have to
5288reverse-engineer each other.
5289
5290This module implements the Encoding standard and has encoding labels and
5291BOM detection, but the actual implementation for encoders and decoders
5292is Python’s.")
5293 (license license:bsd-3)))
5294
5295(define-public python2-webencodings
5296 (package-with-python2 python-webencodings))
5297
e99f4211
MW
5298(define-public python-urwid
5299 (package
5300 (name "python-urwid")
51ff41f6 5301 (version "1.3.1")
e99f4211
MW
5302 (source
5303 (origin
5304 (method url-fetch)
b97c1bfd 5305 (uri (pypi-uri "urwid" version))
e99f4211
MW
5306 (sha256
5307 (base32
51ff41f6 5308 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5309 (build-system python-build-system)
b97c1bfd
LF
5310 (arguments
5311 `(#:phases
5312 (modify-phases %standard-phases
5313 ;; Disable failing test. Bug filed upstream:
5314 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5315 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5316 (add-after 'unpack 'disable-failing-test
5317 (lambda _
5318 (substitute* "urwid/tests/test_event_loops.py"
5319 (("test_remove_watch_file")
5320 "disable_remove_watch_file")))))))
e99f4211
MW
5321 (home-page "http://urwid.org")
5322 (synopsis "Console user interface library for Python")
5323 (description
5324 "Urwid is a curses-based UI/widget library for Python. It includes many
5325features useful for text console applications.")
3f641af0 5326 (license license:lgpl2.1+)))
e99f4211
MW
5327
5328(define-public python2-urwid
5329 (package-with-python2 python-urwid))
d95a56c6 5330
5220022a
JL
5331(define-public python-openid
5332 (package
5333 (name "python-openid")
5334 (version "3.0.10")
5335 (source
5336 (origin
5337 (method url-fetch)
5338 (uri (pypi-uri "python3-openid" version))
5339 (sha256
5340 (base32
5341 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5342 (build-system python-build-system)
5343 (home-page "https://github.com/necaris/python3-openid")
5344 (synopsis "OpenID support for servers and consumers")
5345 (description "This library provides OpenID authentication for Python, both
5346for clients and servers.")
5347 (license license:asl2.0)))
5348
3ef00f56 5349(define-public python2-openid
5350 (package
5351 (name "python2-openid")
5352 (version "2.2.5")
5353 (source
5354 (origin
5355 (method url-fetch)
5356 (uri (pypi-uri "python-openid" version))
5357 (sha256
5358 (base32
5359 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5360 (build-system python-build-system)
5361 (arguments
5362 ;; Python 3 support is in `python3-openid`, a separate package.
5363 `(#:python ,python-2))
5364 (home-page "https://github.com/openid/python-openid")
5365 (synopsis "OpenID support for servers and consumers")
5366 (description "This library provides OpenID authentication for Python, both
5367for clients and servers.")
5368 (license license:asl2.0)))
5369
47d0b292
TS
5370(define-public python-urwidtrees
5371 (package
5372 (name "python-urwidtrees")
37ec4623 5373 (version "1.0.2")
47d0b292
TS
5374 (source
5375 (origin
5376 (method url-fetch)
37ec4623
TS
5377 ;; package author intends on distributing via github rather than pypi:
5378 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5379 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5380 version ".tar.gz"))
5381 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5382 (sha256
5383 (base32
37ec4623 5384 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5385 (build-system python-build-system)
5386 (arguments
5387 '(#:tests? #f)) ; no tests
f22efa01 5388 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5389 (home-page "https://github.com/pazz/urwidtrees")
5390 (synopsis "Tree widgets for urwid")
5391 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5392toolkit. Use it to build trees of widgets.")
3f641af0 5393 (license license:gpl3+)))
47d0b292
TS
5394
5395(define-public python2-urwidtrees
5396 (package-with-python2 python-urwidtrees))
5397
d95a56c6
PAR
5398(define-public python-dbus
5399 (package
5400 (name "python-dbus")
5401 (version "1.2.0")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (string-append
5cc3096c 5406 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5407 version ".tar.gz"))
5408 (sha256
5409 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5410 (build-system gnu-build-system)
6717c879
SB
5411 (arguments
5412 '(#:phases
5413 (modify-phases %standard-phases
5414 (add-before
5415 'check 'pre-check
5416 (lambda _
5417 ;; XXX: For the missing '/etc/machine-id'.
5418 (substitute* "test/run-test.sh"
5419 (("DBUS_FATAL_WARNINGS=1")
5420 "DBUS_FATAL_WARNINGS=0"))
5421 #t)))))
d95a56c6
PAR
5422 (native-inputs
5423 `(("pkg-config" ,pkg-config)))
5424 (inputs
5425 `(("python" ,python)
2e88d113 5426 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5427 (synopsis "Python bindings for D-bus")
5428 (description "python-dbus provides bindings for libdbus, the reference
5429implementation of D-Bus.")
5430 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5431 (license license:expat)))
b52af02b
MW
5432
5433(define-public python2-dbus
5434 (package (inherit python-dbus)
5435 (name "python2-dbus")
5436 (inputs `(("python" ,python-2)
5437 ,@(alist-delete "python"
5438 (package-inputs python-dbus)
5439 equal?)))
5440 ;; FIXME: on Python 2, the test_utf8 fails with:
5441 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5442 (arguments `(#:tests? #f))))
a6ac8332
AE
5443
5444(define-public python-apsw
5445 (package
5446 (name "python-apsw")
917708c2 5447 (version "3.9.2-r1")
a6ac8332
AE
5448 (source
5449 (origin
5450 (method url-fetch)
917708c2 5451 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5452 (sha256
5453 (base32
917708c2 5454 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5455 (build-system python-build-system)
5456 (inputs
f3b98f4f 5457 `(("sqlite" ,sqlite)))
a6ac8332
AE
5458 (arguments
5459 `(#:phases
154d207c
MB
5460 (modify-phases %standard-phases
5461 (delete 'check)
5462 (add-after 'install 'check
5463 (lambda* (#:key inputs outputs #:allow-other-keys)
5464 (add-installed-pythonpath inputs outputs)
5465 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5466 (home-page "https://github.com/rogerbinns/apsw/")
5467 (synopsis "Another Python SQLite Wrapper")
5468 (description "APSW is a Python wrapper for the SQLite
5469embedded relational database engine. In contrast to other wrappers such as
5470pysqlite it focuses on being a minimal layer over SQLite attempting just to
5471translate the complete SQLite API into Python.")
abde5f37 5472 (license license:zlib)))
a6ac8332
AE
5473
5474(define-public python2-apsw
5475 (package-with-python2 python-apsw))
26b307e2
AE
5476
5477(define-public python-lxml
5478 (package
5479 (name "python-lxml")
d58a3203 5480 (version "3.6.0")
26b307e2
AE
5481 (source
5482 (origin
5483 (method url-fetch)
97bbc480 5484 (uri (pypi-uri "lxml" version))
26b307e2 5485 (sha256
d58a3203
EF
5486 (base32
5487 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5488 (build-system python-build-system)
5489 (inputs
5490 `(("libxml2" ,libxml2)
f3b98f4f 5491 ("libxslt" ,libxslt)))
26b307e2
AE
5492 (home-page "http://lxml.de/")
5493 (synopsis
5494 "Python XML processing library")
5495 (description
5496 "The lxml XML toolkit is a Pythonic binding for the C libraries
5497libxml2 and libxslt.")
3f641af0 5498 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5499
5500(define-public python2-lxml
5501 (package-with-python2 python-lxml))
4ed20663 5502
b32a1e47
CAW
5503;; beautifulsoup4 has a totally different namespace than 3.x,
5504;; and pypi seems to put it under its own name, so I guess we should too
5505(define-public python-beautifulsoup4
5506 (package
5507 (name "python-beautifulsoup4")
67fd4a12 5508 (version "4.5.1")
b32a1e47
CAW
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "beautifulsoup4" version))
5513 (sha256
5514 (base32
67fd4a12 5515 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5516 (build-system python-build-system)
5f37f0b6
LF
5517 (arguments
5518 `(#:phases
5519 (modify-phases %standard-phases
5520 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5521 ;; must use this conversion script when building with Python 3. The
5522 ;; conversion script also runs the tests.
5523 ;; For more information, see the file 'convert-py3k' in the source
5524 ;; distribution.
5525 (replace 'check
5526 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5527 (home-page
5528 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5529 (synopsis
5530 "Python screen-scraping library")
5531 (description
5532 "Beautiful Soup is a Python library designed for rapidly setting up
5533screen-scraping projects. It offers Pythonic idioms for navigating,
5534searching, and modifying a parse tree, providing a toolkit for
5535dissecting a document and extracting what you need. It automatically
5536converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5537 (license license:expat)
5538 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5539
5540(define-public python2-beautifulsoup4
5541 (package
5542 (inherit (package-with-python2
5543 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5544 (arguments `(#:python ,python-2))))
b32a1e47 5545
092e86f5
AE
5546(define-public python2-cssutils
5547 (package
5548 (name "python2-cssutils")
58d1d816 5549 (version "1.0.1")
092e86f5
AE
5550 (source
5551 (origin
5552 (method url-fetch)
58d1d816 5553 (uri (pypi-uri "cssutils" version))
092e86f5 5554 (sha256
58d1d816
EF
5555 (base32
5556 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5557 (build-system python-build-system)
5558 (native-inputs
5559 `(("python2-mock" ,python2-mock) ; for the tests
5560 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5561 (arguments
5562 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5563 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5564 ))
092e86f5
AE
5565 (home-page "http://cthedot.de/cssutils/")
5566 (synopsis
5567 "CSS Cascading Style Sheets library for Python")
5568 (description
5569 "Cssutils is a Python package for parsing and building CSS
5570Cascading Style Sheets. Currently it provides a DOM only and no rendering
5571options.")
3f641af0 5572 (license license:lgpl3+)))
880ff77c
AE
5573
5574(define-public python-cssselect
5575 (package
5576 (name "python-cssselect")
d5ccd9ab 5577 (version "0.9.2")
880ff77c
AE
5578 (source
5579 (origin
5580 (method url-fetch)
d5ccd9ab 5581 (uri (pypi-uri "cssselect" version))
880ff77c 5582 (sha256
d5ccd9ab
EF
5583 (base32
5584 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5585 (build-system python-build-system)
880ff77c
AE
5586 (arguments
5587 ;; tests fail with message
5588 ;; AttributeError: 'module' object has no attribute 'tests'
5589 `(#:tests? #f))
5590 (home-page
5591 "https://pythonhosted.org/cssselect/")
5592 (synopsis
5593 "CSS3 selector parser and translator to XPath 1.0")
5594 (description
5595 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5596them to XPath 1.0 expressions. Such expressions can be used in lxml or
5597another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5598 (license license:bsd-3)))
880ff77c
AE
5599
5600(define-public python2-cssselect
5601 (package-with-python2 python-cssselect))
60357f99 5602
03702173 5603(define-public python-openid-cla
5604 (package
5605 (name "python-openid-cla")
5606 (version "1.2")
5607 (source
5608 (origin
5609 (method url-fetch)
5610 (uri (pypi-uri "python-openid-cla" version))
5611 (sha256
5612 (base32
5613 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5614 (build-system python-build-system)
019ccdb6 5615 (arguments '(#:tests? #f)) ; No tests.
03702173 5616 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5617 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5618 (description "@code{openid-cla} is an implementation of the OpenID
5619contributor license agreement extension for python-openid.")
5620 (license license:bsd-3)))
5621
5622(define-public python2-openid-cla
5623 (package-with-python2 python-openid-cla))
5624
a0e41de4 5625(define-public python-openid-teams
5626 (package
5627 (name "python-openid-teams")
5628 (version "1.1")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (pypi-uri "python-openid-teams" version))
5633 (sha256
5634 (base32
5635 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5636 (build-system python-build-system)
ac72d3d2 5637 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5638 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5639 (synopsis "Implementation of the OpenID teams extension for python-openid")
5640 (description
5641 "@code{openid-teams} is an implementation of the OpenID
5642teams extension for python-openid.")
5643 (license license:bsd-3)))
5644
5645(define-public python2-openid-teams
5646 (package-with-python2 python-openid-teams))
5647
60357f99
AE
5648(define-public python-netifaces
5649 (package
5650 (name "python-netifaces")
5651 (version "0.10.4")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (string-append
5656 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5657 version
5658 ".tar.gz"))
5659 (sha256
5660 (base32
5661 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5662 (build-system python-build-system)
60357f99
AE
5663 (home-page
5664 "https://bitbucket.org/al45tair/netifaces")
5665 (synopsis
5666 "Python module for portable network interface information")
5667 (description
5668 "Netifaces is a Python module providing information on network
5669interfaces in an easy and portable manner.")
5670 (license license:expat)))
5671
5672(define-public python2-netifaces
5673 (package-with-python2 python-netifaces))
92cb152b 5674
32f77c04
RW
5675(define-public python-networkx
5676 (package
5677 (name "python-networkx")
a4d9609c 5678 (version "1.11")
32f77c04
RW
5679 (source
5680 (origin
5681 (method url-fetch)
a4d9609c 5682 (uri (pypi-uri "networkx" version))
32f77c04 5683 (sha256
a4d9609c 5684 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5685 (build-system python-build-system)
5686 ;; python-decorator is needed at runtime
5687 (propagated-inputs
5688 `(("python-decorator" ,python-decorator)))
5689 (native-inputs
f3b98f4f 5690 `(("python-nose" ,python-nose)))
32f77c04
RW
5691 (home-page "http://networkx.github.io/")
5692 (synopsis "Python module for creating and manipulating graphs and networks")
5693 (description
5694 "NetworkX is a Python package for the creation, manipulation, and study
5695of the structure, dynamics, and functions of complex networks.")
3f641af0 5696 (license license:bsd-3)))
32f77c04
RW
5697
5698(define-public python2-networkx
5699 (package-with-python2 python-networkx))
5700
92cb152b
RW
5701(define-public snakemake
5702 (package
5703 (name "snakemake")
7b93d866 5704 (version "3.9.0")
92cb152b
RW
5705 (source
5706 (origin
5707 (method url-fetch)
7b93d866 5708 (uri (pypi-uri "snakemake" version))
92cb152b 5709 (sha256
7b93d866 5710 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5711 (build-system python-build-system)
7b93d866
MB
5712 (arguments
5713 ;; TODO: Package missing test dependencies.
5714 '(#:tests? #f))
5715 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5716 (synopsis "Python-based execution environment for make-like workflows")
5717 (description
5718 "Snakemake aims to reduce the complexity of creating workflows by
5719providing a clean and modern domain specific specification language (DSL) in
5720Python style, together with a fast and comfortable execution environment.")
5721 (license license:expat)))
a1920bc9 5722
35de1fbd
RW
5723(define-public python-seaborn
5724 (package
5725 (name "python-seaborn")
ccc18762 5726 (version "0.7.1")
35de1fbd
RW
5727 (source
5728 (origin
5729 (method url-fetch)
fc899d4f 5730 (uri (pypi-uri "seaborn" version))
35de1fbd 5731 (sha256
ccc18762 5732 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5733 (build-system python-build-system)
6f976df6
MB
5734 (arguments
5735 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5736 (propagated-inputs
5737 `(("python-pandas" ,python-pandas)
5738 ("python-matplotlib" ,python-matplotlib)
5739 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5740 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5741 (synopsis "Statistical data visualization")
5742 (description
5743 "Seaborn is a library for making attractive and informative statistical
5744graphics in Python. It is built on top of matplotlib and tightly integrated
5745with the PyData stack, including support for numpy and pandas data structures
5746and statistical routines from scipy and statsmodels.")
3f641af0 5747 (license license:bsd-3)
fc899d4f 5748 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5749
5750(define-public python2-seaborn
fc899d4f
EF
5751 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5752 (package
5753 (inherit base)
5754 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5755 ,@(package-propagated-inputs base))))))
35de1fbd 5756
58a35665
MB
5757(define-public python-mpmath
5758 (package
5759 (name "python-mpmath")
5760 (version "0.19")
5761 (source (origin
5762 (method url-fetch)
5763 (uri (string-append "http://mpmath.org/files/mpmath-"
5764 version ".tar.gz"))
5765 (sha256
5766 (base32
5767 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5768 (build-system python-build-system)
5769 (arguments
5770 '(#:phases
5771 (modify-phases %standard-phases
5772 (replace 'check
5773 (lambda _
5774 (zero?
5775 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5776 (home-page "http://mpmath.org")
5777 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5778 (description
5779 "@code{mpmath} can be used as an arbitrary-precision substitute for
5780Python's float/complex types and math/cmath modules, but also does much
5781more advanced mathematics.")
5782 (license license:bsd-3)))
5783
5784(define-public python2-mpmath
5785 (package-with-python2 python-mpmath))
5786
90fc547f
RW
5787(define-public python-sympy
5788 (package
5789 (name "python-sympy")
52f622ef 5790 (version "1.0")
90fc547f
RW
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (string-append
5795 "https://github.com/sympy/sympy/releases/download/sympy-"
5796 version "/sympy-" version ".tar.gz"))
5797 (sha256
52f622ef 5798 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5799 (build-system python-build-system)
52f622ef
MB
5800 (propagated-inputs
5801 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5802 (home-page "http://www.sympy.org/")
5803 (synopsis "Python library for symbolic mathematics")
5804 (description
5805 "SymPy is a Python library for symbolic mathematics. It aims to become a
5806full-featured computer algebra system (CAS) while keeping the code as simple
5807as possible in order to be comprehensible and easily extensible.")
3f641af0 5808 (license license:bsd-3)))
90fc547f
RW
5809
5810(define-public python2-sympy
5811 (package-with-python2 python-sympy))
5812
e8c9b010
SR
5813(define-public python-q
5814 (package
5815 (name "python-q")
5816 (version "2.6")
5817 (source
5818 (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "q" version))
5821 (sha256
5822 (base32
5823 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5824 (build-system python-build-system)
5825 (home-page "https://github.com/zestyping/q")
5826 (synopsis "Quick-and-dirty debugging output for tired programmers")
5827 (description
5828 "q is a Python module for \"print\" style of debugging Python code. It
5829provides convenient short API for print out of values, tracebacks, and
5830falling into the Python interpreter.")
f210e944 5831 (license license:asl2.0)))
e8c9b010
SR
5832
5833(define-public python2-q
f210e944 5834 (package-with-python2 python-q))
e8c9b010 5835
a1920bc9
FB
5836(define-public python-testlib
5837 (package
5838 (name "python-testlib")
5839 (version "0.6.5")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (string-append
5844 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5845 version ".zip"))
5846 (sha256
5847 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5848 (build-system python-build-system)
a1920bc9 5849 (native-inputs
632735f2 5850 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5851 (synopsis "Python micro test suite harness")
5852 (description "A micro unittest suite harness for Python.")
5853 (home-page "https://github.com/trentm/testlib")
1cb9c006 5854 (license license:expat)))
a1920bc9
FB
5855
5856(define-public python2-testlib
5857 (package-with-python2 python-testlib))
db62afa5
LC
5858
5859(define-public python2-xlib
5860 (package
5861 (name "python2-xlib")
5862 (version "0.14")
5863 (source (origin
5864 (method url-fetch)
de67e922
LF
5865 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5866 "/" version "/"
db62afa5
LC
5867 "python-xlib-" version ".tar.gz"))
5868 (sha256
5869 (base32
5870 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5871 (build-system python-build-system)
5872 (arguments
5873 `(#:python ,python-2 ;Python 2 only
5874 #:tests? #f)) ;no tests
db62afa5
LC
5875 (home-page "http://python-xlib.sourceforge.net/")
5876 (synopsis "Python X11 client library")
5877 (description
5878 "The Python X Library is intended to be a fully functional X client
5879library for Python programs. It is useful to implement low-level X clients.
5880It is written entirely in Python.")
3f641af0 5881 (license license:gpl2+)))
0234ca06
DT
5882
5883(define-public python-singledispatch
5884 (package
5885 (name "python-singledispatch")
5886 (version "3.4.0.3")
5887 (source
5888 (origin
5889 (method url-fetch)
bdb67d84 5890 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5891 (sha256
5892 (base32
5893 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5894 (build-system python-build-system)
5e1c9d24
HG
5895 (native-inputs
5896 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5897 (home-page
5898 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5899 (synopsis "Backport of singledispatch feature from Python 3.4")
5900 (description
5901 "This library brings functools.singledispatch from Python 3.4 to Python
59022.6-3.3.")
5903 (license license:expat)))
5904
5905(define-public python2-singledispatch
5906 (package-with-python2 python-singledispatch))
feaae484 5907
310d218f
RW
5908(define-public python-tornado
5909 (package
5910 (name "python-tornado")
a724924b 5911 (version "4.3")
310d218f
RW
5912 (source
5913 (origin
5914 (method url-fetch)
a724924b 5915 (uri (pypi-uri "tornado" version))
310d218f 5916 (sha256
a724924b 5917 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5918 (build-system python-build-system)
3fe2c209
MB
5919 (arguments
5920 '(;; FIXME: Two tests error out with:
5921 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5922 ;; #:phases
5923 ;; (modify-phases %standard-phases
5924 ;; (replace 'check
5925 ;; (lambda _
5926 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5927 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5928 ;; (zero? (system* "python" "-m" "tornado.test")))))
5929 #:tests? #f))
310d218f 5930 (native-inputs
b455439b 5931 `(("python-certifi" ,python-certifi)))
f22efa01 5932 (propagated-inputs
b455439b 5933 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5934 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5935 (synopsis "Python web framework and asynchronous networking library")
5936 (description
5937 "Tornado is a Python web framework and asynchronous networking library,
5938originally developed at FriendFeed. By using non-blocking network I/O,
5939Tornado can scale to tens of thousands of open connections, making it ideal
5940for long polling, WebSockets, and other applications that require a long-lived
5941connection to each user.")
3f641af0 5942 (license license:asl2.0)
b455439b 5943 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5944
5945(define-public python2-tornado
b455439b 5946 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5947 (package (inherit tornado)
f22efa01 5948 (propagated-inputs
310d218f
RW
5949 `(("python2-backport-ssl-match-hostname"
5950 ,python2-backport-ssl-match-hostname)
b455439b 5951 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5952 ,@(package-propagated-inputs tornado))))))
310d218f 5953
6b59fc10
EF
5954;; the python- version can be removed with python-3.5
5955(define-public python-backports-abc
5956 (package
5957 (name "python-backports-abc")
27f9148e 5958 (version "0.5")
6b59fc10
EF
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "backports_abc" version))
5963 (sha256
5964 (base32
27f9148e 5965 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 5966 (build-system python-build-system)
6b59fc10 5967 (home-page "https://github.com/cython/backports_abc")
66e07664 5968 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5969 (description
5970 "Python-backports-abc provides a backport of additions to the
5971'collections.abc' module in Python-3.5.")
3f641af0 5972 (license license:psfl)))
6b59fc10
EF
5973
5974(define-public python2-backports-abc
5975 (package-with-python2 python-backports-abc))
5976
feaae484
SB
5977(define-public python-waf
5978 (package
5979 (name "python-waf")
7dd55dfe 5980 (version "1.9.5")
feaae484
SB
5981 (source (origin
5982 (method url-fetch)
bae67829 5983 (uri (string-append "https://waf.io/"
feaae484
SB
5984 "waf-" version ".tar.bz2"))
5985 (sha256
5986 (base32
7dd55dfe 5987 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5988 (build-system python-build-system)
5989 (arguments
5990 '(#:phases
5991 (modify-phases %standard-phases
5992 (replace 'build
7dd55dfe
EF
5993 (lambda _
5994 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5995 (replace 'check
7dd55dfe
EF
5996 (lambda _
5997 (zero? (system* "python" "waf" "--version"))))
feaae484 5998 (replace 'install
7dd55dfe
EF
5999 (lambda _
6000 (copy-file "waf" %output))))))
6001 (home-page "http://waf.io/")
feaae484
SB
6002 (synopsis "Python-based build system")
6003 (description
6004 "Waf is a Python-based framework for configuring, compiling and installing
6005applications.")
3f641af0 6006 (license license:bsd-3)))
feaae484
SB
6007
6008(define-public python2-waf
6009 (package-with-python2 python-waf))
45203542
RW
6010
6011(define-public python-pyzmq
6012 (package
6013 (name "python-pyzmq")
3655ee76 6014 (version "15.1.0")
45203542
RW
6015 (source
6016 (origin
6017 (method url-fetch)
3655ee76 6018 (uri (pypi-uri "pyzmq" version))
45203542 6019 (sha256
3655ee76 6020 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6021 (build-system python-build-system)
6022 (arguments
6023 `(#:configure-flags
6024 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6025 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6026 ;; --inplace' for 'python setup.py test' to work.
6027 #:tests? #f))
6028 (inputs
6029 `(("zeromq" ,zeromq)))
6030 (native-inputs
6031 `(("pkg-config" ,pkg-config)
f3b98f4f 6032 ("python-nose" ,python-nose)))
45203542
RW
6033 (home-page "http://github.com/zeromq/pyzmq")
6034 (synopsis "Python bindings for 0MQ")
6035 (description
6036 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6037 (license license:bsd-4)))
45203542
RW
6038
6039(define-public python2-pyzmq
6040 (package-with-python2 python-pyzmq))
d889e6c4
CR
6041
6042(define-public python-pep8
6043 (package
6044 (name "python-pep8")
db251311 6045 (version "1.7.0")
d889e6c4
CR
6046 (source
6047 (origin
6048 (method url-fetch)
db251311 6049 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6050 (sha256
6051 (base32
db251311 6052 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6053 (build-system python-build-system)
d889e6c4
CR
6054 (home-page "http://pep8.readthedocs.org/")
6055 (synopsis "Python style guide checker")
6056 (description
6057 "This tools checks Python code against some of the style conventions in
6058PEP 8.")
6059 (license license:expat)))
6060
6061(define-public python2-pep8
6062 (package-with-python2 python-pep8))
e31d7f44
CR
6063
6064(define-public python-pyflakes
6065 (package
6066 (name "python-pyflakes")
2abc3972 6067 (version "1.0.0")
e31d7f44
CR
6068 (source
6069 (origin
6070 (method url-fetch)
2abc3972 6071 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6072 (sha256
6073 (base32
2abc3972 6074 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6075 (build-system python-build-system)
e31d7f44
CR
6076 (home-page
6077 "https://github.com/pyflakes/pyflakes")
6078 (synopsis "Passive checker of Python programs")
6079 (description
6080 "Pyflakes statically checks Python source code for common errors.")
6081 (license license:expat)))
a59e017c 6082
7261d9eb
CR
6083(define-public python2-pyflakes
6084 (package-with-python2 python-pyflakes))
6085
a59e017c
CR
6086(define-public python-mccabe
6087 (package
6088 (name "python-mccabe")
c6ebd40d 6089 (version "0.4.0")
a59e017c
CR
6090 (source
6091 (origin
6092 (method url-fetch)
c6ebd40d 6093 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6094 (sha256
6095 (base32
c6ebd40d 6096 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6097 (build-system python-build-system)
328bb95d 6098 (native-inputs
c6ebd40d 6099 `(("python-pytest" ,python-pytest)
f3b98f4f 6100 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6101 (home-page "https://github.com/flintwork/mccabe")
6102 (synopsis "McCabe checker, plugin for flake8")
6103 (description
6104 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6105complexity of Python source code.")
7362371d 6106 (license license:expat)))
a59e017c
CR
6107
6108(define-public python2-mccabe
6109 (package-with-python2 python-mccabe))
e8df8f47 6110
7477fbb1
CR
6111(define-public python-mccabe-0.2.1
6112 (package (inherit python-mccabe)
6113 (version "0.2.1")
6114 (source
6115 (origin
6116 (method url-fetch)
6117 (uri (pypi-uri "mccabe" version))
6118 (sha256
6119 (base32
f3b98f4f 6120 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6121
6122(define-public python2-mccabe-0.2.1
6123 (package-with-python2 python-mccabe-0.2.1))
6124
e8df8f47
CR
6125;; Flake8 2.4.1 requires an older version of pep8.
6126;; This should be removed ASAP.
6127(define-public python-pep8-1.5.7
6128 (package (inherit python-pep8)
6129 (version "1.5.7")
6130 (source
6131 (origin
6132 (method url-fetch)
6133 (uri (string-append
6134 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6135 version
6136 ".tar.gz"))
6137 (sha256
6138 (base32
73e3060d
MB
6139 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6140 (arguments
6141 ;; XXX Tests not compatible with Python 3.5.
6142 '(#:tests? #f))))
e8df8f47
CR
6143
6144(define-public python2-pep8-1.5.7
6145 (package-with-python2 python-pep8-1.5.7))
6146
6147;; Flake8 2.4.1 requires an older version of pyflakes.
6148;; This should be removed ASAP.
6149(define-public python-pyflakes-0.8.1
6150 (package (inherit python-pyflakes)
6151 (version "0.8.1")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri (string-append
6156 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6157 version
6158 ".tar.gz"))
6159 (sha256
6160 (base32
0d84e1ef
MB
6161 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6162 (arguments
6163 ;; XXX Tests not compatible with Python 3.5.
6164 '(#:tests? #f))))
e8df8f47
CR
6165
6166(define-public python2-pyflakes-0.8.1
7261d9eb 6167 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6168
6169(define-public python-flake8
6170 (package
6171 (name "python-flake8")
43789136 6172 (version "2.5.4")
e8df8f47
CR
6173 (source
6174 (origin
6175 (method url-fetch)
1b995533 6176 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6177 (sha256
6178 (base32
011271c7
HG
6179 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6180 (modules '((guix build utils)))
6181 (snippet
6182 '(begin
6183 ;; Remove pre-compiled .pyc files from source.
6184 (for-each delete-file-recursively
6185 (find-files "." "__pycache__" #:directories? #t))
6186 (for-each delete-file (find-files "." "\\.pyc$"))
6187 #t))))
e8df8f47 6188 (build-system python-build-system)
482d9591 6189 (propagated-inputs
f3b98f4f 6190 `(("python-pep8" ,python-pep8)
43789136 6191 ("python-pyflakes" ,python-pyflakes)
482d9591 6192 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6193 (native-inputs
6194 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6195 ("python-nose" ,python-nose)))
6196 (home-page "https://gitlab.com/pycqa/flake8")
6197 (synopsis
6198 "The modular source code checker: pep8, pyflakes and co")
6199 (description
6200 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6201 (license license:expat)))
6202
6203(define-public python2-flake8
6204 (package-with-python2 python-flake8))
61b9ac53 6205
abf21efc
CR
6206;; This will only be needed by the python-hacking package and will not be
6207;; necessary once python-hacking > 0.10.2 is released.
6208(define-public python-flake8-2.2.4
6209 (package (inherit python-flake8)
482d9591 6210 (propagated-inputs
f3b98f4f 6211 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6212 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6213 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6214 (native-inputs
482d9591 6215 `(("python-mock" ,python-mock)
abf21efc
CR
6216 ("python-nose" ,python-nose)))
6217 (version "2.2.4")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "flake8" version))
6222 (sha256
6223 (base32
b9c8ccce
HG
6224 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6225 (modules '((guix build utils)))
6226 (snippet
6227 '(begin
6228 ;; Remove pre-compiled .pyc files from source.
6229 (for-each delete-file-recursively
6230 (find-files "." "__pycache__" #:directories? #t))
6231 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6232 #t))))
6233 (arguments
6234 ;; XXX Fails with Python 3.5.
6235 '(#:tests? #f))))
abf21efc
CR
6236
6237(define-public python2-flake8-2.2.4
6238 (package-with-python2 python-flake8-2.2.4))
6239
1f42d824
MFM
6240(define-public python-flake8-polyfill
6241 (package
6242 (name "python-flake8-polyfill")
6243 (version "1.0.1")
6244 (source
6245 (origin
6246 (method url-fetch)
6247 (uri (pypi-uri "flake8-polyfill" version))
6248 (sha256
6249 (base32
6250 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6251 (build-system python-build-system)
6252 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6253 (synopsis "Polyfill package for Flake8 plugins")
6254 (description
6255 "This package that provides some compatibility helpers for Flake8
6256plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6257 (license license:expat)))
6258
6259(define-public python2-flake8-polyfill
6260 (package-with-python2 python-flake8-polyfill))
6261
61b9ac53
FB
6262(define-public python-mistune
6263 (package
6264 (name "python-mistune")
08b81336 6265 (version "0.7.3")
61b9ac53
FB
6266 (source
6267 (origin
6268 (method url-fetch)
eff8d773 6269 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6270 (sha256
6271 (base32
08b81336 6272 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6273 (build-system python-build-system)
328bb95d 6274 (native-inputs
f3b98f4f 6275 `(("python-nose" ,python-nose)
61b9ac53
FB
6276 ("python-cython" ,python-cython)))
6277 (home-page "https://github.com/lepture/mistune")
6278 (synopsis "Markdown parser in pure Python")
6279 (description "This package provides a fast markdown parser in pure
6280Python.")
3f641af0 6281 (license license:bsd-3)))
61b9ac53
FB
6282
6283(define-public python2-mistune
6284 (package-with-python2 python-mistune))
6d992d07 6285
b9893908
EE
6286(define-public python-markdown
6287 (package
6288 (name "python-markdown")
791ac6a6 6289 (version "2.6.7")
b9893908
EE
6290 (source
6291 (origin
6292 (method url-fetch)
6293 (uri (pypi-uri "Markdown" version))
6294 (sha256
6295 (base32
791ac6a6 6296 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6297 (build-system python-build-system)
6298 (arguments
6299 `(#:phases
6300 (modify-phases %standard-phases
6301 (replace 'check
6302 (lambda _
6303 (zero? (system* "python" "run-tests.py")))))))
6304 (native-inputs
6305 `(("python-nose" ,python-nose)
6306 ("python-pyyaml" ,python-pyyaml)))
6307 (home-page "https://pythonhosted.org/Markdown/")
6308 (synopsis "Python implementation of Markdown")
6309 (description
6310 "This package provides a Python implementation of John Gruber's
6311Markdown. The library features international input, various Markdown
6312extensions, and several HTML output formats. A command line wrapper
6313markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6314 (license license:bsd-3)))
b9893908
EE
6315
6316(define-public python2-markdown
6317 (package-with-python2 python-markdown))
6318
6d992d07
FB
6319(define-public python-ptyprocess
6320 (package
6321 (name "python-ptyprocess")
6322 (version "0.5")
6323 (source
6324 (origin
6325 (method url-fetch)
6326 (uri (string-append
6327 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6328 version ".tar.gz"))
6329 (sha256
6330 (base32
6331 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6332 (build-system python-build-system)
328bb95d 6333 (native-inputs
f3b98f4f 6334 `(("python-nose" ,python-nose)))
6d992d07
FB
6335 (arguments
6336 `(#:phases
6337 (modify-phases %standard-phases
6338 (replace 'check
6339 (lambda _
6340 (zero? (system* "nosetests")))))))
6341 (home-page "https://github.com/pexpect/ptyprocess")
6342 (synopsis "Run a subprocess in a pseudo terminal")
6343 (description
6344 "This package provides a Python library used to launch a subprocess in a
6345pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6346 (license license:isc)))
6d992d07
FB
6347
6348(define-public python2-ptyprocess
6349 (package-with-python2 python-ptyprocess))
4aadb1df 6350
df893a38
MB
6351(define-public python-cram
6352 (package
6353 (name "python-cram")
6354 (version "0.7")
6355 (home-page "https://bitheap.org/cram/")
6356 (source (origin
6357 (method url-fetch)
6358 (uri (list (string-append home-page "cram-"
6359 version ".tar.gz")
6360 (pypi-uri "cram" version)))
6361 (sha256
6362 (base32
6363 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6364 (arguments
6365 '(#:phases
6366 (modify-phases %standard-phases
6367 (add-after 'unpack 'patch-source
6368 (lambda _
6369 (substitute* (find-files "cram" ".*\\.py$")
6370 ;; Replace default shell path.
6371 (("/bin/sh") (which "sh")))
6372 (substitute* (find-files "tests" ".*\\.t$")
6373 (("md5") "md5sum")
6374 (("/bin/bash") (which "bash"))
6375 (("/bin/sh") (which "sh")))
6376 (substitute* "cram/_test.py"
6377 ;; This hack works around a bug triggered by substituting
6378 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6379 ;; "cram -h", which breaks the output at 80 characters. This
6380 ;; causes the line showing the default shell to break into two
6381 ;; lines, but the test expects a single line...
6382 (("env\\['COLUMNS'\\] = '80'")
6383 "env['COLUMNS'] = '160'"))
6384 #t))
6385 (delete 'check)
6386 (add-after 'install 'check
6387 ;; The test phase uses the built library and executable.
6388 ;; It's easier to run it after install since the build
6389 ;; directory contains version-specific PATH.
6390 (lambda* (#:key inputs outputs #:allow-other-keys)
6391 (add-installed-pythonpath inputs outputs)
6392 (setenv "PATH" (string-append (getenv "PATH") ":"
6393 (assoc-ref outputs "out") "/bin"))
6394 (zero? (system* "make" "test")))))))
6395 (build-system python-build-system)
6396 (native-inputs
6397 `(("python-coverage" ,python-coverage)
6398 ("which" ,which)))
6399 (synopsis "Simple testing framework for command line applications")
6400 (description
6401 "Cram is a functional testing framework for command line applications.
6402Cram tests look like snippets of interactive shell sessions. Cram runs each
6403command and compares the command output in the test with the command’s actual
6404output.")
6405 (license license:gpl2+)))
6406
6407(define-public python2-cram
6408 (package-with-python2 python-cram))
6409
4aadb1df
FB
6410(define-public python-terminado
6411 (package
6412 (name "python-terminado")
783fb0a3 6413 (version "0.6")
4aadb1df
FB
6414 (source
6415 (origin
6416 (method url-fetch)
783fb0a3 6417 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6418 (sha256
6419 (base32
783fb0a3 6420 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6421 (build-system python-build-system)
6422 (propagated-inputs
6423 `(("python-tornado" ,python-tornado)
6424 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6425 (native-inputs
6426 `(("python-nose" ,python-nose)))
4aadb1df
FB
6427 (arguments
6428 `(#:phases
6429 (modify-phases %standard-phases
6430 (replace 'check
6431 (lambda _
6432 (zero? (system* "nosetests")))))))
6433 (home-page "https://github.com/takluyver/terminado")
6434 (synopsis "Terminals served to term.js using Tornado websockets")
6435 (description "This package provides a Tornado websocket backend for the
6436term.js Javascript terminal emulator library.")
3f641af0 6437 (license license:bsd-2)
783fb0a3 6438 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6439
6440(define-public python2-terminado
783fb0a3 6441 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6442 (package (inherit terminado)
783fb0a3
EF
6443 (propagated-inputs
6444 `(("python2-backport-ssl-match-hostname"
6445 ,python2-backport-ssl-match-hostname)
00e10c6e 6446 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6447
789de5e2 6448(define-public python-straight-plugin
6449 (package
6450 (name "python-straight-plugin")
6451 (version "1.4.1")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "straight.plugin" version))
6456 (sha256
6457 (base32
6458 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6459 (build-system python-build-system)
6460 (home-page "https://github.com/ironfroggy/straight.plugin")
6461 (synopsis "Simple namespaced plugin facility")
6462 (description "Straight Plugin provides a type of plugin you can create from
6463almost any existing Python modules, and an easy way for outside developers to
6464add functionality and customization to your projects with their own plugins.")
6465 (license license:expat)))
6466
6467(define-public python2-straight-plugin
6468 (package-with-python2 python-straight-plugin))
6469
d582eaac
SB
6470(define-public python-fonttools
6471 (package
6472 (name "python-fonttools")
6473 (version "2.5")
6474 (source (origin
6475 (method url-fetch)
6476 (uri (string-append
6477 "https://pypi.python.org/packages/source/F/FontTools/"
6478 "fonttools-" version ".tar.gz"))
6479 (sha256
6480 (base32
6481 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6482 (build-system python-build-system)
9e8c6a37
HG
6483 (arguments
6484 '(#:test-target "check"
6485 #:phases
6486 (modify-phases %standard-phases
6487 (add-after 'unpack 'patch-setuppy
6488 ;; Remove the undocumented "extra_path" argument, which adds an
6489 ;; intervening directories between site-packages and the package
6490 ;; directory.
6491 (lambda _
6492 (substitute* "setup.py"
6493 (("^[ \t]*extra_path *= *'FontTools',") ""))
6494 #t)))))
d582eaac
SB
6495 (home-page "http://github.com/behdad/fonttools")
6496 (synopsis "Tools to manipulate font files")
6497 (description
6498 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6499supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6500of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6501also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6502from an XML-based format.")
3f641af0
DC
6503 (license (license:non-copyleft
6504 "file://LICENSE.txt"
6505 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6506
6507(define-public python2-fonttools
6508 (package-with-python2 python-fonttools))
75710da6 6509
5faa5ce4
RW
6510(define-public python-ly
6511 (package
6512 (name "python-ly")
5135354f 6513 (version "0.9.4")
5faa5ce4
RW
6514 (source
6515 (origin
6516 (method url-fetch)
5135354f
RW
6517 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6518 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6519 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6520 (sha256
6521 (base32
5135354f 6522 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6523 (build-system python-build-system)
972cf9be
MB
6524 (arguments
6525 ;; FIXME: Some tests need network access.
6526 '(#:tests? #f))
5faa5ce4
RW
6527 (synopsis "Tool and library for manipulating LilyPond files")
6528 (description "This package provides a Python library to parse, manipulate
6529or create documents in LilyPond format. A command line program ly is also
6530provided that can be used to do various manipulations with LilyPond files.")
6531 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6532 (license license:gpl2+)))
7e7b27d9
CR
6533
6534(define-public python-appdirs
6535 (package
6536 (name "python-appdirs")
6537 (version "1.4.0")
6538 (source
6539 (origin
6540 (method url-fetch)
6541 (uri (string-append
6542 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6543 version
6544 ".tar.gz"))
6545 (sha256
6546 (base32
6547 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6548 (build-system python-build-system)
7e7b27d9
CR
6549 (home-page "http://github.com/ActiveState/appdirs")
6550 (synopsis
6551 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6552 (description
6553 "This module provides a portable way of finding out where user data
6554should be stored on various operating systems.")
6555 (license license:expat)))
6556
6557(define-public python2-appdirs
6558 (package-with-python2 python-appdirs))
89b2e0b0
LF
6559
6560(define-public python-llfuse
6561 (package
6562 (name "python-llfuse")
e36ace36 6563 (version "1.1.1")
89b2e0b0
LF
6564 (source (origin
6565 (method url-fetch)
6566 (uri (string-append
6567 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6568 "llfuse-" version ".tar.bz2"))
6569 (sha256
6570 (base32
e36ace36 6571 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6572 (build-system python-build-system)
6573 (inputs
6574 `(("fuse" ,fuse)
6575 ("attr" ,attr)))
6576 (native-inputs
f3b98f4f 6577 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6578 (synopsis "Python bindings for FUSE")
6579 (description
6580 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6581 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6582 (license license:lgpl2.0+)
cd0569c4 6583 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6584
6585(define-public python2-llfuse
cd0569c4
LF
6586 (package (inherit (package-with-python2
6587 (strip-python2-variant python-llfuse)))
6588 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6589
6590;; For attic-0.16
6591(define-public python-llfuse-0.41
6592 (package (inherit python-llfuse)
229b3661 6593 (version "0.41.1")
cd0569c4
LF
6594 (source (origin
6595 (method url-fetch)
6596 (uri (string-append
6597 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6598 "llfuse-" version ".tar.bz2"))
6599 (sha256
6600 (base32
229b3661 6601 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6602 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6603 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6604 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6605
6606(define-public python-msgpack
6607 (package
6608 (name "python-msgpack")
aed625bd 6609 (version "0.4.8")
641c9871
LF
6610 (source (origin
6611 (method url-fetch)
ae831df4 6612 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6613 (sha256
6614 (base32
aed625bd 6615 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6616 (build-system python-build-system)
641c9871
LF
6617 (synopsis "MessagePack (de)serializer")
6618 (description "MessagePack is a fast, compact binary serialization format,
6619suitable for similar data to JSON. This package provides CPython bindings for
6620reading and writing MessagePack data.")
6621 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6622 (license license:asl2.0)))
bd74be7b
LF
6623
6624(define-public python2-msgpack
f210e944 6625 (package-with-python2 python-msgpack))
641c9871 6626
6e5e39f4
CR
6627(define-public python-netaddr
6628 (package
6629 (name "python-netaddr")
6630 (version "0.7.18")
6631 (source
6632 (origin
6633 (method url-fetch)
6634 (uri (string-append
6635 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6636 version
6637 ".tar.gz"))
6638 (sha256
6639 (base32
6640 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6641 (build-system python-build-system)
6642 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6643 (home-page "https://github.com/drkjam/netaddr/")
6644 (synopsis "Pythonic manipulation of network addresses")
6645 (description
6646 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6647and MAC network addresses.")
3f641af0 6648 (license license:bsd-3)))
6e5e39f4
CR
6649
6650(define-public python2-netaddr
6651 (package-with-python2 python-netaddr))
8c692a52
CR
6652
6653(define-public python-wrapt
6654 (package
6655 (name "python-wrapt")
6656 (version "1.10.5")
6657 (source
6658 (origin
6659 (method url-fetch)
6660 (uri (string-append
6661 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6662 version
6663 ".tar.gz"))
6664 (sha256
6665 (base32
6666 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6667 (build-system python-build-system)
6668 (arguments
6669 ;; Tests are not included in the tarball, they are only available in the
6670 ;; git repository.
6671 `(#:tests? #f))
8c692a52
CR
6672 (home-page "https://github.com/GrahamDumpleton/wrapt")
6673 (synopsis "Module for decorators, wrappers and monkey patching")
6674 (description
6675 "The aim of the wrapt module is to provide a transparent object proxy for
6676 Python, which can be used as the basis for the construction of function
6677 wrappers and decorator functions.")
3f641af0 6678 (license license:bsd-2)))
8c692a52
CR
6679
6680(define-public python2-wrapt
6681 (package-with-python2 python-wrapt))
b85c85be
CR
6682
6683(define-public python-iso8601
6684 (package
6685 (name "python-iso8601")
fe84bc9a 6686 (version "0.1.11")
b85c85be
CR
6687 (source
6688 (origin
6689 (method url-fetch)
fe84bc9a 6690 (uri (pypi-uri "iso8601" version))
b85c85be 6691 (sha256
fe84bc9a
EF
6692 (base32
6693 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6694 (build-system python-build-system)
63b02364
MB
6695 (native-inputs
6696 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6697 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6698 (synopsis "Module to parse ISO 8601 dates")
6699 (description
6700 "This module parses the most common forms of ISO 8601 date strings (e.g.
6701@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6702 (license license:expat)))
6703
6704(define-public python2-iso8601
6705 (package-with-python2 python-iso8601))
5e412b63
CR
6706
6707(define-public python-monotonic
6708 (package
6709 (name "python-monotonic")
6710 (version "0.3")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (string-append
6715 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6716 version
6717 ".tar.gz"))
6718 (sha256
6719 (base32
6720 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6721 (build-system python-build-system)
5e412b63
CR
6722 (home-page "https://github.com/atdt/monotonic")
6723 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6724 (description
6725 "This module provides a monotonic() function which returns the value (in
6726fractional seconds) of a clock which never goes backwards.")
3f641af0 6727 (license license:asl2.0)))
5e412b63
CR
6728
6729(define-public python2-monotonic
6730 (package-with-python2 python-monotonic))
de34afac
CR
6731
6732(define-public python-webob
6733 (package
6734 (name "python-webob")
b8834c21 6735 (version "1.5.1")
de34afac
CR
6736 (source
6737 (origin
6738 (method url-fetch)
b8834c21 6739 (uri (pypi-uri "WebOb" version))
de34afac
CR
6740 (sha256
6741 (base32
b8834c21 6742 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6743 (build-system python-build-system)
328bb95d 6744 (native-inputs
f3b98f4f 6745 `(("python-nose" ,python-nose)))
de34afac
CR
6746 (home-page "http://webob.org/")
6747 (synopsis "WSGI request and response object")
6748 (description
6749 "WebOb provides wrappers around the WSGI request environment, and an
6750object to help create WSGI responses.")
6751 (license license:expat)))
6752
6753(define-public python2-webob
6754 (package-with-python2 python-webob))
350ba0a3 6755
02a8a187
BW
6756(define-public python-xlrd
6757 (package
6758 (name "python-xlrd")
c2ad4d70 6759 (version "1.0.0")
02a8a187
BW
6760 (source (origin
6761 (method url-fetch)
e775f48e 6762 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6763 (sha256
6764 (base32
c2ad4d70 6765 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6766 (build-system python-build-system)
6767 (arguments
6768 `(#:phases
6769 (modify-phases %standard-phases
c2ad4d70 6770 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6771 ;; run tests instead for now.
6772 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6773 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6774 (home-page "http://www.python-excel.org/")
6775 (synopsis "Library for extracting data from Excel files")
6776 (description "This packages provides a library to extract data from
c598e35c 6777spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6778@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6779Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6780 (license license:bsd-3)))
02a8a187
BW
6781
6782(define-public python2-xlrd
6783 (package-with-python2 python-xlrd))
6784
350ba0a3
CR
6785(define-public python-prettytable
6786 (package
6787 (name "python-prettytable")
6788 (version "0.7.2")
6789 (source
6790 (origin
6791 (method url-fetch)
6792 (uri (string-append
6793 "https://pypi.python.org/packages/source/P/PrettyTable/"
6794 "prettytable-" version ".tar.bz2"))
6795 (sha256
6796 (base32
6797 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6798 (build-system python-build-system)
350ba0a3
CR
6799 (home-page "http://code.google.com/p/prettytable/")
6800 (synopsis "Display tabular data in an ASCII table format")
6801 (description
6802 "A library designed to represent tabular data in visually appealing ASCII
6803tables. PrettyTable allows for selection of which columns are to be printed,
6804independent alignment of columns (left or right justified or centred) and
6805printing of sub-tables by specifying a row range.")
3f641af0 6806 (license license:bsd-3)))
350ba0a3
CR
6807
6808(define-public python2-prettytable
6809 (package-with-python2 python-prettytable))
7a8ac75a 6810
9f8ee3fe
RW
6811(define-public python-tables
6812 (package
6813 (name "python-tables")
6814 (version "3.2.2")
6815 (source
6816 (origin
6817 (method url-fetch)
6818 (uri (pypi-uri "tables" version))
6819 (sha256
6820 (base32
bac23672
HG
6821 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6822 (modules '((guix build utils)))
6823 (snippet
6824 '(begin
6825 ;; Remove pre-compiled .pyc files from source.
6826 (for-each delete-file-recursively
6827 (find-files "." "__pycache__" #:directories? #t))
6828 (for-each delete-file (find-files "." "\\.pyc$"))
6829 #t))))
9f8ee3fe
RW
6830 (build-system python-build-system)
6831 (arguments
6832 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6833 ;; or "check", so we must override the build and check phases.
6834 #:phases
6835 (modify-phases %standard-phases
6836 (add-after 'unpack 'use-gcc
6837 (lambda _
6838 (substitute* "setup.py"
6839 (("compiler = new_compiler\\(\\)" line)
6840 (string-append line
6841 "\ncompiler.set_executables(compiler='gcc',"
6842 "compiler_so='gcc',"
6843 "linker_exe='gcc',"
6844 "linker_so='gcc -shared')")))
6845 #t))
6846 (replace 'build
6847 (lambda* (#:key inputs #:allow-other-keys)
6848 (zero? (system* "python" "setup.py" "build"
6849 (string-append "--hdf5="
6850 (assoc-ref inputs "hdf5"))))))
6851 (replace 'check
6852 (lambda* (#:key inputs #:allow-other-keys)
6853 (zero? (system* "python" "setup.py" "check"
6854 (string-append "--hdf5="
6855 (assoc-ref inputs "hdf5")))))))))
6856 (propagated-inputs
6857 `(("python-numexpr" ,python-numexpr)
6858 ("python-numpy" ,python-numpy)))
6859 (native-inputs
f3b98f4f 6860 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6861 ("pkg-config" ,pkg-config)))
6862 (inputs
6863 `(("hdf5" ,hdf5)
6864 ("bzip2" ,bzip2)
6865 ("zlib" ,zlib)))
6866 (home-page "http://www.pytables.org/")
6867 (synopsis "Hierarchical datasets for Python")
6868 (description "PyTables is a package for managing hierarchical datasets and
6869designed to efficently cope with extremely large amounts of data.")
3f641af0 6870 (license license:bsd-3)))
9f8ee3fe
RW
6871
6872(define-public python2-tables
6873 (package-with-python2 python-tables))
6874
7a8ac75a
RW
6875(define-public python-pyasn1
6876 (package
6877 (name "python-pyasn1")
caa0edb3 6878 (version "0.1.9")
7a8ac75a
RW
6879 (source
6880 (origin
6881 (method url-fetch)
caa0edb3 6882 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6883 (sha256
6884 (base32
caa0edb3 6885 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6886 (build-system python-build-system)
6887 (home-page "http://pyasn1.sourceforge.net/")
6888 (synopsis "ASN.1 types and codecs")
6889 (description
6890 "This is an implementation of ASN.1 types and codecs in Python. It is
6891suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6892 (license license:bsd-2)))
7a8ac75a
RW
6893
6894(define-public python2-pyasn1
6895 (package-with-python2 python-pyasn1))
9a49a535 6896
5988c299
EF
6897(define-public python-pyasn1-modules
6898 (package
6899 (name "python-pyasn1-modules")
6900 (version "0.0.8")
6901 (source
6902 (origin
6903 (method url-fetch)
6904 (uri (pypi-uri "pyasn1-modules" version))
6905 (sha256
6906 (base32
6907 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6908 (build-system python-build-system)
5988c299
EF
6909 (propagated-inputs
6910 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 6911 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
6912 (synopsis "ASN.1 codec implementations")
6913 (description
6914 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6915implementations of ASN.1-based codecs and protocols.")
3f641af0 6916 (license license:bsd-3)))
5988c299
EF
6917
6918(define-public python2-pyasn1-modules
6919 (package-with-python2 python-pyasn1-modules))
6920
520af157 6921(define-public python-ipaddress
9a49a535 6922 (package
520af157
DC
6923 (name "python-ipaddress")
6924 (version "1.0.16")
6925 (source (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "ipaddress" version))
6928 (sha256
6929 (base32
6930 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6931 (build-system python-build-system)
9a49a535
RW
6932 (home-page "https://github.com/phihag/ipaddress")
6933 (synopsis "IP address manipulation library")
6934 (description
520af157
DC
6935 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6936 in Python. This library is used to create, poke at, and manipulate IPv4 and
6937 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6938 module to older versions of Python.")
f210e944 6939 (license license:psfl)))
520af157
DC
6940
6941(define-public python2-ipaddress
f210e944 6942 (package-with-python2 python-ipaddress))
3f00e078 6943
4a238186
HG
6944(define-public python2-ipaddr
6945 (package
6946 (name "python2-ipaddr")
6947 (version "2.1.11")
6948 (source
6949 (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "ipaddr" version))
6952 (sha256
6953 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6954 (build-system python-build-system)
6955 (arguments
6956 `(#:python ,python-2 ;version 2 only
6957 #:phases
6958 (modify-phases %standard-phases
6959 (replace 'check
6960 (lambda* _
6961 (zero? (system* "python" "ipaddr_test.py")))))))
6962 (home-page "https://github.com/google/ipaddr-py")
6963 (synopsis "IP address manipulation library")
6964 (description
6965 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6966IPv6 addresses and networks.
6967
6968For new implementations you may prefer to use the standard module
6969@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6970versions of Python.")
3f641af0 6971 (license license:asl2.0)))
4a238186 6972
3f00e078
RW
6973(define-public python-idna
6974 (package
6975 (name "python-idna")
6976 (version "2.0")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (string-append "https://pypi.python.org/packages/source/i/"
6981 "idna/idna-" version ".tar.gz"))
6982 (sha256
6983 (base32
6984 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6985 (build-system python-build-system)
3f00e078
RW
6986 (home-page "https://github.com/kjd/idna")
6987 (synopsis "Internationalized domain names in applications")
6988 (description
6989 "This is a library to support the Internationalised Domain Names in
6990Applications (IDNA) protocol as specified in RFC 5891. This version of the
6991protocol is often referred to as “IDNA2008” and can produce different results
6992from the earlier standard from 2003. The library is also intended to act as a
6993suitable drop-in replacement for the “encodings.idna” module that comes with
6994the Python standard library but currently only supports the older 2003
6995specification.")
3f641af0 6996 (license license:bsd-4)))
3f00e078
RW
6997
6998(define-public python2-idna
6999 (package-with-python2 python-idna))
36ebf972
RW
7000
7001(define-public python-pretend
7002 (package
7003 (name "python-pretend")
7004 (version "1.0.8")
7005 (source
7006 (origin
7007 (method url-fetch)
7008 (uri (string-append "https://pypi.python.org/packages/source/p/"
7009 "pretend/pretend-" version ".tar.gz"))
7010 (sha256
7011 (base32
7012 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7013 (build-system python-build-system)
36ebf972
RW
7014 (home-page "https://github.com/alex/pretend")
7015 (synopsis "Library for stubbing in Python")
7016 (description
7017 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7018technique for writing tests. You may hear the term mixed up with mocks,
7019fakes, or doubles. Basically, a stub is an object that returns pre-canned
7020responses, rather than doing any computation.")
3f641af0 7021 (license license:bsd-3)))
36ebf972
RW
7022
7023(define-public python2-pretend
7024 (package-with-python2 python-pretend))
aa759a51
RW
7025
7026(define-public python-cryptography-vectors
7027 (package
7028 (name "python-cryptography-vectors")
27fab2bf 7029 (version "1.7.1")
aa759a51
RW
7030 (source
7031 (origin
7032 (method url-fetch)
9c509ca9 7033 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7034 (sha256
7035 (base32
27fab2bf 7036 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7037 (build-system python-build-system)
aa759a51 7038 (home-page "https://github.com/pyca/cryptography")
66e07664 7039 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7040 (description
7041 "This package contains test vectors for the cryptography package.")
7042 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7043 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7044
7045(define-public python2-cryptography-vectors
7046 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7047
7048(define-public python-cryptography
7049 (package
7050 (name "python-cryptography")
27fab2bf 7051 (version "1.7.1")
88b47cb0
RW
7052 (source
7053 (origin
7054 (method url-fetch)
9c509ca9 7055 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7056 (sha256
7057 (base32
27fab2bf 7058 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7059 (build-system python-build-system)
7060 (inputs
7061 `(("openssl" ,openssl)))
7062 (propagated-inputs
7063 `(("python-cffi" ,python-cffi)
7064 ("python-six" ,python-six)
7065 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7066 ("python-idna" ,python-idna)
7067 ("python-iso8601" ,python-iso8601)))
7068 (native-inputs
7069 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7070 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7071 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7072 ("python-pyasn1" ,python-pyasn1)
7073 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
7074 ("python-pytz" ,python-pytz)
7075 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
7076 (home-page "https://github.com/pyca/cryptography")
7077 (synopsis "Cryptographic recipes and primitives for Python")
7078 (description
7079 "cryptography is a package which provides cryptographic recipes and
7080primitives to Python developers. It aims to be the “cryptographic standard
7081library” for Python. The package includes both high level recipes, and low
7082level interfaces to common cryptographic algorithms such as symmetric ciphers,
7083message digests and key derivation functions.")
7084 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7085 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7086 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7087
7088(define-public python2-cryptography
519e2f4f
LF
7089 (let ((crypto (package-with-python2
7090 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7091 (package (inherit crypto)
7092 (propagated-inputs
7093 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7094 ("python2-backport-ssl-match-hostname"
7095 ,python2-backport-ssl-match-hostname)
68f1cdec 7096 ("python2-enum34" ,python2-enum34)
88b47cb0 7097 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7098
7099(define-public python-pyopenssl
7100 (package
7101 (name "python-pyopenssl")
61684de2 7102 (version "16.2.0")
5af999b8
RW
7103 (source
7104 (origin
7105 (method url-fetch)
eb68d268 7106 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7107 (sha256
7108 (base32
7c6bf660
MB
7109 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7110 (patches
7111 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7112 (build-system python-build-system)
30e0229a 7113 (arguments
7c6bf660
MB
7114 '(#:phases
7115 (modify-phases %standard-phases
7116 (delete 'check)
7117 (add-after 'install 'check
7118 (lambda* (#:key inputs outputs #:allow-other-keys)
7119 (add-installed-pythonpath inputs outputs)
7120 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7121 (propagated-inputs
7122 `(("python-cryptography" ,python-cryptography)
7123 ("python-six" ,python-six)))
7124 (inputs
7125 `(("openssl" ,openssl)))
30e0229a
MB
7126 (native-inputs
7127 `(("python-pytest" ,python-pytest)))
5af999b8
RW
7128 (home-page "https://github.com/pyca/pyopenssl")
7129 (synopsis "Python wrapper module around the OpenSSL library")
7130 (description
7131 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7132library.")
3f641af0 7133 (license license:asl2.0)))
5af999b8
RW
7134
7135(define-public python2-pyopenssl
519e2f4f 7136 (package-with-python2 python-pyopenssl))
643725a1
CR
7137
7138(define-public python-pip
7139 (package
7140 (name "python-pip")
392c26b0 7141 (version "9.0.1")
643725a1
CR
7142 (source
7143 (origin
7144 (method url-fetch)
6fb54e3b 7145 (uri (pypi-uri "pip" version))
643725a1
CR
7146 (sha256
7147 (base32
392c26b0 7148 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7149 (build-system python-build-system)
392c26b0
MC
7150 (arguments
7151 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7152 (home-page "https://pip.pypa.io/")
392c26b0 7153 (synopsis "Package manager for Python software")
643725a1 7154 (description
392c26b0 7155 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7156Python Package Index (PyPI).")
7157 (license license:expat)))
7158
7159(define-public python2-pip
7160 (package-with-python2 python-pip))
d8c4998f
LC
7161
7162(define-public python-tlsh
7163 (package
7164 (name "python-tlsh")
99b00dc7 7165 (version "3.4.4")
d8c4998f
LC
7166 (home-page "https://github.com/trendmicro/tlsh")
7167 (source (origin
99b00dc7
EF
7168 (method url-fetch)
7169 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7170 version ".tar.gz"))
d8c4998f
LC
7171 (sha256
7172 (base32
99b00dc7
EF
7173 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7174 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7175 (build-system cmake-build-system)
7176 (arguments
7177 '(#:out-of-source? #f
7178 #:phases (modify-phases %standard-phases
7179 (replace
7180 'install
7181 (lambda* (#:key outputs #:allow-other-keys)
7182 ;; Build and install the Python bindings. The underlying
7183 ;; C++ library is apparently not meant to be installed.
7184 (let ((out (assoc-ref outputs "out")))
7185 (with-directory-excursion "py_ext"
7186 (and (system* "python" "setup.py" "build")
7187 (system* "python" "setup.py" "install"
7188 (string-append "--prefix=" out))))))))))
7189 (inputs `(("python" ,python-wrapper))) ;for the bindings
7190 (synopsis "Fuzzy matching library for Python")
7191 (description
7192 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7193Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7194value which can be used for similarity comparisons. Similar objects have
7195similar hash values, which allows for the detection of similar objects by
7196comparing their hash values. The byte stream should have a sufficient amount
7197of complexity; for example, a byte stream of identical bytes will not generate
7198a hash value.")
3f641af0 7199 (license license:asl2.0)))
d8c4998f
LC
7200
7201(define-public python2-tlsh
7202 (package
7203 (inherit python-tlsh)
7204 (name "python2-tlsh")
7205 (inputs `(("python" ,python-2)))))
d96034ed 7206
67f66812
BW
7207(define-public python-termcolor
7208 (package
7209 (name "python-termcolor")
7210 (version "1.1.0")
7211 (source
7212 (origin
7213 (method url-fetch)
7214 (uri (pypi-uri "python-termcolor" version))
7215 (sha256
7216 (base32
7217 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7218 (build-system python-build-system)
7219 (arguments
7220 ;; There are no tests.
7221 `(#:tests? #f))
7222 (home-page "http://pypi.python.org/pypi/termcolor")
7223 (synopsis "ANSII Color formatting for terminal output")
7224 (description
7225 "This package provides ANSII Color formatting for output in terminals.")
7226 (license license:expat)))
7227
7228(define-public python2-termcolor
7229 (package-with-python2 python-termcolor))
7230
d96034ed
LC
7231(define-public python-libarchive-c
7232 (package
7233 (name "python-libarchive-c")
03fd001c 7234 (version "2.2")
d96034ed
LC
7235 (source (origin
7236 (method url-fetch)
03fd001c 7237 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7238 (sha256
7239 (base32
03fd001c 7240 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7241 (build-system python-build-system)
7242 (arguments
7243 '(#:phases (modify-phases %standard-phases
7244 (add-before
7245 'build 'reference-libarchive
7246 (lambda* (#:key inputs #:allow-other-keys)
7247 ;; Retain the absolute file name of libarchive.so.
7248 (let ((libarchive (assoc-ref inputs "libarchive")))
7249 (substitute* "libarchive/ffi.py"
7250 (("find_library\\('archive'\\)")
7251 (string-append "'" libarchive
b41a05ce 7252 "/lib/libarchive.so'")))))))))
d96034ed 7253 (inputs
f3b98f4f 7254 `(("libarchive" ,libarchive)))
d96034ed
LC
7255 (home-page "https://github.com/Changaco/python-libarchive-c")
7256 (synopsis "Python interface to libarchive")
7257 (description
7258 "This package provides Python bindings to libarchive, a C library to
7259access possibly compressed archives in many different formats. It uses
7260Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7261 (license license:lgpl2.0+)))
d96034ed
LC
7262
7263(define-public python2-libarchive-c
7264 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7265
7266(define-public python-file
7267 (package
7268 (inherit file)
7269 (name "python-file")
7ffa5d4a
LF
7270 (source (origin
7271 (inherit (package-source file))
7272 ;; This patch should not be applied to python2-file.
7273 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7274 (build-system python-build-system)
7275 (arguments
7276 '(#:tests? #f ;no tests
00bf74be 7277 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7278 #:phases (modify-phases %standard-phases
7279 (add-before 'build 'change-directory
7280 (lambda _
7281 (chdir "python")
7282 #t))
7283 (add-before 'build 'set-library-file-name
7284 (lambda* (#:key inputs #:allow-other-keys)
7285 (let ((file (assoc-ref inputs "file")))
7286 (substitute* "magic.py"
7287 (("find_library\\('magic'\\)")
7288 (string-append "'" file "/lib/libmagic.so'")))
7289 #t))))))
7290 (inputs `(("file" ,file)))
7291 (self-native-input? #f)
daeeea71
CM
7292 (synopsis "Python bindings to the libmagic file type guesser. Note that
7293this module and the python-magic module both provide a \"magic.py\" file;
7294these two modules, which are different and were developed separately, both
f210e944 7295serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7296
7297(define-public python2-file
f210e944 7298 (package-with-python2 python-file))
85d4aeac
LC
7299
7300(define-public python-debian
7301 (package
7302 (name "python-debian")
02d7f337 7303 (version "0.1.28")
85d4aeac
LC
7304 (source
7305 (origin
7306 (method url-fetch)
5e217a8b 7307 (uri (pypi-uri name version))
85d4aeac
LC
7308 (sha256
7309 (base32
02d7f337 7310 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7311 (build-system python-build-system)
f22efa01 7312 (propagated-inputs
85d4aeac 7313 `(("python-six" ,python-six)))
85d4aeac
LC
7314 (home-page "http://packages.debian.org/sid/python-debian")
7315 (synopsis "Debian package related modules")
7316 (description
5c7bdc9a
LC
7317 ;; XXX: Use @enumerate instead of @itemize to work around
7318 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7319 "This package provides Python modules that abstract many formats of
7320Debian-related files, such as:
7321
5c7bdc9a 7322@enumerate
85d4aeac
LC
7323@item Debtags information;
7324@item @file{debian/changelog} files;
7325@item packages files, pdiffs;
7326@item control files of single or multiple RFC822-style paragraphs---e.g.
7327 @file{debian/control}, @file{.changes}, @file{.dsc};
7328@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7329 contained files and meta-information.
5c7bdc9a 7330@end enumerate\n")
85d4aeac
LC
7331
7332 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7333 (license license:gpl3+)))
85d4aeac
LC
7334
7335(define-public python2-debian
7336 (package-with-python2 python-debian))
816a6538 7337
2d321bb2
RW
7338(define-public python-nbformat
7339 (package
7340 (name "python-nbformat")
7341 (version "4.1.0")
7342 (source
7343 (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "nbformat" version))
7346 (sha256
7347 (base32
7348 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7349 (build-system python-build-system)
7350 (arguments `(#:tests? #f)) ; no test target
7351 (propagated-inputs
7352 `(("python-ipython-genutils" ,python-ipython-genutils)
7353 ("python-jsonschema" ,python-jsonschema)
7354 ("python-jupyter-core" ,python-jupyter-core)
7355 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7356 (home-page "http://jupyter.org")
7357 (synopsis "Jupyter Notebook format")
7358 (description "This package provides the reference implementation of the
7359Jupyter Notebook format and Python APIs for working with notebooks.")
7360 (license license:bsd-3)))
7361
7362(define-public python2-nbformat
7363 (package-with-python2 python-nbformat))
7364
55436048
RW
7365(define-public python-bleach
7366 (package
7367 (name "python-bleach")
7368 (version "1.4.3")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "bleach" version))
7373 (sha256
7374 (base32
7375 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7376 (build-system python-build-system)
7377 (propagated-inputs
7378 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7379 ("python-six" ,python-six)))
7380 (native-inputs
7381 `(("python-nose" ,python-nose)))
7382 (home-page "http://github.com/jsocol/bleach")
7383 (synopsis "Whitelist-based HTML-sanitizing tool")
7384 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7385 (license license:asl2.0)))
7386
7387(define-public python2-bleach
7388 (package-with-python2 python-bleach))
7389
60590a3a
RW
7390(define-public python-entrypoints
7391 (package
7392 (name "python-entrypoints")
7393 (version "0.2.2")
7394 (source
7395 (origin
7396 (method url-fetch)
7397 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7398 version ".tar.gz"))
7399 (file-name (string-append name "-" version ".tar.gz"))
7400 (sha256
7401 (base32
7402 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7403 (build-system python-build-system)
7404 ;; The package does not come with a setup.py file, so we have to generate
7405 ;; one ourselves.
7406 (arguments
7407 `(#:tests? #f
7408 #:phases
7409 (modify-phases %standard-phases
7410 (add-after 'unpack 'create-setup.py
7411 (lambda _
7412 (call-with-output-file "setup.py"
7413 (lambda (port)
7414 (format port "\
7415from setuptools import setup
7416setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7417" ,version))))))))
7418 (home-page "https://github.com/takluyver/entrypoints")
7419 (synopsis "Discover and load entry points from installed Python packages")
7420 (description "Entry points are a way for Python packages to advertise
7421objects with some common interface. The most common examples are
7422@code{console_scripts} entry points, which define shell commands by
7423identifying a Python function to run. The @code{entrypoints} module contains
7424functions to find and load entry points.")
7425 (license license:expat)))
7426
7427(define-public python2-entrypoints
7428 (package-with-python2 python-entrypoints))
7429
c60898a8
RW
7430(define-public python-nbconvert
7431 (package
7432 (name "python-nbconvert")
7433 (version "5.0.0b1")
7434 (source
7435 (origin
7436 (method url-fetch)
7437 (uri (pypi-uri "nbconvert" version))
7438 (sha256
7439 (base32
7440 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7441 (build-system python-build-system)
497355dc
MB
7442 (arguments
7443 `(;; The "bdist_egg" target is disabled by default, causing the installation
7444 ;; to fail.
7445 #:configure-flags (list "bdist_egg")
7446 ;; FIXME: 5 failures, 40 errors.
7447 #:tests? #f))
7448 ;; #:phases
7449 ;; (modify-phases %standard-phases
7450 ;; (replace 'check
7451 ;; (lambda _
7452 ;; (zero? (system* "py.test" "-v")))))
7453 (native-inputs
7454 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7455 (propagated-inputs
7456 `(("python-bleach" ,python-bleach)
7457 ("python-entrypoints" ,python-entrypoints)
7458 ("python-jinja2" ,python-jinja2)
7459 ("python-jupyter-core" ,python-jupyter-core)
7460 ("python-mistune" ,python-mistune)
7461 ("python-nbformat" ,python-nbformat)
7462 ("python-pygments" ,python-pygments)
c60898a8
RW
7463 ("python-traitlets" ,python-traitlets)))
7464 (home-page "http://jupyter.org")
7465 (synopsis "Converting Jupyter Notebooks")
7466 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7467notebooks to various other formats via Jinja templates. It allows you to
7468convert an @code{.ipynb} notebook file into various static formats including:
7469
7470@enumerate
7471@item HTML
7472@item LaTeX
7473@item PDF
7474@item Reveal JS
7475@item Markdown (md)
7476@item ReStructured Text (rst)
7477@item executable script
7478@end enumerate\n")
7479 (license license:bsd-3)))
7480
7481(define-public python2-nbconvert
7482 (package-with-python2 python-nbconvert))
7483
a0d62280
RW
7484(define-public python-notebook
7485 (package
7486 (name "python-notebook")
7487 (version "4.2.3")
7488 (source (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "notebook" version))
7491 (sha256
7492 (base32
7493 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7494 (build-system python-build-system)
7495 (arguments
7496 `(#:phases
7497 (modify-phases %standard-phases
7498 (replace 'check
7499 (lambda _
7500 ;; HOME must be set for tests
7501 (setenv "HOME" "/tmp")
7502 (zero? (system* "nosetests")))))))
7503 (propagated-inputs
7504 `(("python-jupyter-core" ,python-jupyter-core)
7505 ("python-nbformat" ,python-nbformat)
7506 ("python-nbconvert" ,python-nbconvert)
7507 ("python-ipython" ,python-ipython)))
7508 (native-inputs
7509 `(("python-nose" ,python-nose)
7510 ("python-sphinx" ,python-sphinx)
7511 ("python-requests" ,python-requests)))
7512 (home-page "http://jupyter.org/")
7513 (synopsis "Web-based notebook environment for interactive computing")
7514 (description
7515 "The Jupyter HTML notebook is a web-based notebook environment for
7516interactive computing.")
3a735ecf 7517 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7518 (license license:bsd-3)))
7519
7520(define-public python2-notebook
3a735ecf
HG
7521 (let ((base (package-with-python2
7522 (strip-python2-variant python-notebook))))
7523 (package (inherit base)
7524 (native-inputs
7525 `(("python2-mock" ,python2-mock)
7526 ,@(package-native-inputs base)))
7527 (arguments
7528 (substitute-keyword-arguments (package-arguments base)
7529 ((#:phases phases)
7530 `(modify-phases ,phases
7531 (add-before 'check 'disable-test-case
7532 ;; The test requires network access to localhost. Curiously it
7533 ;; fails with Python 2 only. Simply make the test-case return
7534 ;; immediately.
7535 (lambda _
7536 (substitute*
7537 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7538 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7539
d55724ed
RW
7540(define-public python-widgetsnbextension
7541 (package
7542 (name "python-widgetsnbextension")
7543 (version "1.2.6")
7544 (source
7545 (origin
7546 (method url-fetch)
7547 (uri (pypi-uri "widgetsnbextension" version))
7548 (sha256
7549 (base32
7550 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7551 (build-system python-build-system)
7552 (propagated-inputs
7553 `(("python-notebook" ,python-notebook)))
7554 (native-inputs
58f5fae7
MB
7555 `(("python-certifi" ,python-certifi)
7556 ("python-nose" ,python-nose)))
d55724ed
RW
7557 (home-page "http://ipython.org")
7558 (synopsis "IPython HTML widgets for Jupyter")
7559 (description "This package provides interactive HTML widgets for Jupyter
7560notebooks.")
7561 (license license:bsd-3)))
7562
7563(define-public python2-widgetsnbextension
7564 (package-with-python2 python-widgetsnbextension))
7565
4fe2e344
RW
7566(define-public python-ipywidgets
7567 (package
7568 (name "python-ipywidgets")
7569 (version "5.2.2")
7570 (source
7571 (origin
7572 (method url-fetch)
7573 (uri (pypi-uri "ipywidgets" version))
7574 (sha256
7575 (base32
7576 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7577 (build-system python-build-system)
7578 ;; FIXME: it's not clear how to run the tests.
7579 (arguments `(#:tests? #f))
7580 (propagated-inputs
7581 `(("python-ipykernel" ,python-ipykernel)
7582 ("python-ipython" ,python-ipython)
4fe2e344
RW
7583 ("python-traitlets" ,python-traitlets)
7584 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7585 (home-page "http://ipython.org")
7586 (synopsis "IPython HTML widgets for Jupyter")
7587 (description "Ipywidgets are interactive HTML widgets for Jupyter
7588notebooks and the IPython kernel. Notebooks come alive when interactive
7589widgets are used. Users gain control of their data and can visualize changes
7590in the data.")
7591 (license license:bsd-3)))
7592
7593(define-public python2-ipywidgets
7594 (package-with-python2 python-ipywidgets))
7595
8ceebf8f
RW
7596(define-public python-jupyter-console
7597 (package
7598 (name "python-jupyter-console")
7599 (version "5.0.0")
7600 (source
7601 (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "jupyter_console" version))
7604 (sha256
7605 (base32
7606 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7607 (build-system python-build-system)
7608 ;; FIXME: it's not clear how to run the tests.
7609 (arguments `(#:tests? #f))
7610 (propagated-inputs
7611 `(("python-ipykernel" ,python-ipykernel)
7612 ("python-ipython" ,python-ipython)
7613 ("python-jupyter-client" ,python-jupyter-client)
7614 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7615 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7616 (home-page "https://jupyter.org")
7617 (synopsis "Jupyter terminal console")
7618 (description "This package provides a terminal-based console frontend for
7619Jupyter kernels. It also allows for console-based interaction with non-Python
7620Jupyter kernels such as IJulia and IRKernel.")
7621 (license license:bsd-3)))
7622
7623(define-public python2-jupyter-console
7624 (package-with-python2 python-jupyter-console))
7625
c27ae827
RW
7626(define-public jupyter
7627 (package
7628 (name "jupyter")
7629 (version "1.0.0")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "jupyter" version))
7634 (sha256
7635 (base32
7636 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7637 (build-system python-build-system)
7638 ;; FIXME: it's not clear how to run the tests.
7639 (arguments `(#:tests? #f))
7640 (propagated-inputs
7641 `(("python-ipykernel" ,python-ipykernel)
7642 ("python-ipywidgets" ,python-ipywidgets)
7643 ("python-jupyter-console" ,python-jupyter-console)
7644 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7645 ("python-notebook" ,python-notebook)))
c27ae827
RW
7646 (home-page "http://jupyter.org")
7647 (synopsis "Web application for interactive documents")
7648 (description
7649 "The Jupyter Notebook is a web application that allows you to create and
7650share documents that contain live code, equations, visualizations and
7651explanatory text. Uses include: data cleaning and transformation, numerical
7652simulation, statistical modeling, machine learning and much more.")
7653 (license license:bsd-3)))
7654
816a6538
LC
7655(define-public python-chardet
7656 (package
7657 (name "python-chardet")
7658 (version "2.3.0")
7659 (source
7660 (origin
7661 (method url-fetch)
7662 (uri (string-append
7663 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7664 version
7665 ".tar.gz"))
7666 (sha256
7667 (base32
7668 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7669 (build-system python-build-system)
816a6538
LC
7670 (home-page "https://github.com/chardet/chardet")
7671 (synopsis "Universal encoding detector for Python 2 and 3")
7672 (description
7673 "This package provides @code{chardet}, a Python module that can
7674automatically detect a wide range of file encodings.")
3f641af0 7675 (license license:lgpl2.1+)))
816a6538
LC
7676
7677(define-public python2-chardet
7678 (package-with-python2 python-chardet))
2fc5f186 7679
1872f1bb
KM
7680(define-public python-docopt
7681 (package
7682 (name "python-docopt")
7683 (version "0.6.2")
7684 (source
7685 (origin
7686 (method url-fetch)
7687 ;; The release on PyPI does not include tests.
7688 (uri (string-append
7689 "https://github.com/docopt/docopt/archive/"
7690 version ".tar.gz"))
7691 (file-name (string-append name "-" version ".tar.gz"))
7692 (sha256
7693 (base32
7694 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7695 (build-system python-build-system)
7696 (native-inputs
f3b98f4f 7697 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7698 (arguments
7699 `(#:phases (alist-replace
7700 'check
7701 (lambda _ (zero? (system* "py.test")))
7702 %standard-phases)))
7703 (home-page "http://docopt.org")
7704 (synopsis "Command-line interface description language for Python")
7705 (description "This library allows the user to define a command-line
7706interface from a program's help message rather than specifying it
7707programatically with command-line parsers like @code{getopt} and
7708@code{argparse}.")
7709 (license license:expat)))
7710
7711(define-public python2-docopt
7712 (package-with-python2 python-docopt))
7713
2fc5f186
LF
7714(define-public python-zope-event
7715 (package
7716 (name "python-zope-event")
7717 (version "4.1.0")
7718 (source
7719 (origin
7720 (method url-fetch)
7721 (uri (string-append "https://pypi.python.org/packages/source/z"
7722 "/zope.event/zope.event-" version ".tar.gz"))
7723 (sha256
7724 (base32
7725 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7726 (build-system python-build-system)
2fc5f186
LF
7727 (home-page "http://pypi.python.org/pypi/zope.event")
7728 (synopsis "Event publishing system for Python")
7729 (description "Zope.event provides an event publishing API, intended for
7730use by applications which are unaware of any subscribers to their events. It
7731is a simple event-dispatching system on which more sophisticated event
7732dispatching systems can be built.")
3f641af0 7733 (license license:zpl2.1)))
2fc5f186
LF
7734
7735(define-public python2-zope-event
7736 (package-with-python2 python-zope-event))
97abe268
LF
7737
7738(define-public python-zope-interface
7739 (package
7740 (name "python-zope-interface")
7741 (version "4.1.3")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (string-append "https://pypi.python.org/packages/source/z"
7746 "/zope.interface/zope.interface-" version ".tar.gz"))
7747 (sha256
7748 (base32
7749 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7750 (build-system python-build-system)
38d480a8 7751 (native-inputs
97abe268
LF
7752 `(("python-zope-event" ,python-zope-event)))
7753 (home-page "https://github.com/zopefoundation/zope.interface")
7754 (synopsis "Python implementation of the \"design by contract\"
7755methodology")
7756 (description "Zope.interface provides an implementation of \"object
7757interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7758conforming to a given API or contract.")
3f641af0 7759 (license license:zpl2.1)))
97abe268
LF
7760
7761(define-public python2-zope-interface
7762 (package-with-python2 python-zope-interface))
81f2373c
LF
7763
7764(define-public python-zope-exceptions
7765 (package
7766 (name "python-zope-exceptions")
7767 (version "4.0.8")
7768 (source
7769 (origin
7770 (method url-fetch)
7771 (uri (string-append "https://pypi.python.org/packages/source/z"
7772 "/zope.exceptions/zope.exceptions-"
7773 version ".tar.gz"))
7774 (sha256
7775 (base32
7776 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7777 (build-system python-build-system)
7778 (arguments
7779 '(#:tests? #f)) ; circular dependency with zope.testrunner
7780 (propagated-inputs
7781 `(("python-zope-interface" ,python-zope-interface)))
7782 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7783 (synopsis "Zope exceptions")
7784 (description "Zope.exceptions provides general-purpose exception types
7785that have uses outside of the Zope framework.")
3f641af0 7786 (license license:zpl2.1)))
81f2373c
LF
7787
7788(define-public python2-zope-exceptions
7789 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7790
7791(define-public python-zope-testing
7792 (package
7793 (name "python-zope-testing")
7794 (version "4.5.0")
7795 (source
7796 (origin
7797 (method url-fetch)
7798 (uri (string-append "https://pypi.python.org/packages/source/z"
7799 "/zope.testing/zope.testing-" version ".tar.gz"))
7800 (sha256
7801 (base32
b02f7a21
HG
7802 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7803 (modules '((guix build utils)))
7804 (snippet
7805 '(begin
7806 ;; Remove pre-compiled .pyc files backup files from source.
7807 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7808 #t))))
900e3c0e
LF
7809 (build-system python-build-system)
7810 (native-inputs
7811 `(("python-zope-exceptions" ,python-zope-exceptions)))
7812 (propagated-inputs
7813 `(("python-zope-interface" ,python-zope-interface)))
7814 (home-page "http://pypi.python.org/pypi/zope.testing")
7815 (synopsis "Zope testing helpers")
7816 (description "Zope.testing provides a number of testing utilities for HTML
7817forms, HTTP servers, regular expressions, and more.")
3f641af0 7818 (license license:zpl2.1)))
900e3c0e
LF
7819
7820(define-public python2-zope-testing
7821 (package-with-python2 python-zope-testing))
01614c4f
LF
7822
7823(define-public python-zope-testrunner
7824 (package
7825 (name "python-zope-testrunner")
7826 (version "4.4.9")
7827 (source
7828 (origin
7829 (method url-fetch)
7830 (uri (string-append "https://pypi.python.org/packages/source/z"
7831 "/zope.testrunner/zope.testrunner-"
7832 version ".zip"))
7833 (sha256
7834 (base32
7835 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7836 (build-system python-build-system)
385871e5
MB
7837 (arguments
7838 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7839 (native-inputs
7840 `(("python-six" ,python-six)
e408ffc3 7841 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7842 ("python-zope-exceptions" ,python-zope-exceptions)
7843 ("python-zope-testing" ,python-zope-testing)
7844 ("unzip" ,unzip)))
7845 (propagated-inputs
7846 `(("python-zope-interface" ,python-zope-interface)))
7847 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7848 (synopsis "Zope testrunner script")
7849 (description "Zope.testrunner provides a script for running Python
7850tests.")
3f641af0 7851 (license license:zpl2.1)))
01614c4f
LF
7852
7853(define-public python2-zope-testrunner
7854 (let ((base (package-with-python2 python-zope-testrunner)))
7855 (package
7856 (inherit base)
7857 (native-inputs
7858 (append (package-native-inputs base)
7859 `(("python2-subunit" ,python2-subunit)
7860 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7861
7862(define-public python-zope-i18nmessageid
7863 (package
7864 (name "python-zope-i18nmessageid")
7865 (version "4.0.3")
7866 (source
7867 (origin
7868 (method url-fetch)
7869 (uri (string-append
7870 "https://pypi.python.org/packages/source/z"
7871 "/zope.i18nmessageid/zope.i18nmessageid-"
7872 version ".tar.gz"))
7873 (sha256
7874 (base32
7875 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7876 (build-system python-build-system)
6a5c710c
LF
7877 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7878 (synopsis "Message identifiers for internationalization")
7879 (description "Zope.i18nmessageid provides facilities for declaring
7880internationalized messages within program source text.")
3f641af0 7881 (license license:zpl2.1)))
6a5c710c
LF
7882
7883(define-public python2-zope-i18nmessageid
7884 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7885
7886(define-public python-zope-schema
7887 (package
7888 (name "python-zope-schema")
7889 (version "4.4.2")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (string-append "https://pypi.python.org/packages/source/z"
7894 "/zope.schema/zope.schema-" version ".tar.gz"))
7895 (sha256
7896 (base32
7897 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7898 (build-system python-build-system)
22dba2ef
MB
7899 (arguments
7900 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7901 (propagated-inputs
7902 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7903 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7904 ("python-zope-interface" ,python-zope-interface)))
7905 (native-inputs
47f77210
HG
7906 `(("python-zope-testing" ,python-zope-testing)
7907 ("python-coverage" ,python-coverage)
7908 ("python-nose" ,python-nose)))
71fb09f3
LF
7909 (home-page "http://pypi.python.org/pypi/zope.schema")
7910 (synopsis "Zope data schemas")
7911 (description "Zope.scheme provides extensions to zope.interface for
7912defining data schemas.")
3f641af0 7913 (license license:zpl2.1)))
71fb09f3
LF
7914
7915(define-public python2-zope-schema
7916 (package-with-python2 python-zope-schema))
fbac9b17
LF
7917
7918(define-public python-zope-configuration
7919 (package
7920 (name "python-zope-configuration")
7921 (version "4.0.3")
7922 (source (origin
7923 (method url-fetch)
7924 (uri (string-append "https://pypi.python.org/packages/source/z"
7925 "/zope.configuration/zope.configuration-"
7926 version ".tar.gz"))
7927 (sha256
7928 (base32
7929 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7930 (build-system python-build-system)
7e8b1bfa
MB
7931 (arguments
7932 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7933 (propagated-inputs
7934 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7935 ("python-zope-schema" ,python-zope-schema)))
7936 (home-page "http://pypi.python.org/pypi/zope.configuration")
7937 (synopsis "Zope Configuration Markup Language")
7938 (description "Zope.configuration implements ZCML, the Zope Configuration
7939Markup Language.")
3f641af0 7940 (license license:zpl2.1)))
fbac9b17
LF
7941
7942(define-public python2-zope-configuration
7943 (package-with-python2 python-zope-configuration))
2ad52086
LF
7944
7945(define-public python-zope-proxy
7946 (package
7947 (name "python-zope-proxy")
7948 (version "4.1.6")
7949 (source
7950 (origin
7951 (method url-fetch)
7952 (uri (string-append "https://pypi.python.org/packages/source/z"
7953 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7954 (sha256
7955 (base32
7956 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7957 (build-system python-build-system)
66b3aadb
MB
7958 (arguments
7959 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7960 (propagated-inputs
7961 `(("python-zope-interface" ,python-zope-interface)))
7962 (home-page "http://pypi.python.org/pypi/zope.proxy")
7963 (synopsis "Generic, transparent proxies")
7964 (description "Zope.proxy provides generic, transparent proxies for Python.
7965Proxies are special objects which serve as mostly-transparent wrappers around
7966another object, intervening in the apparent behavior of the wrapped object
7967only when necessary to apply the policy (e.g., access checking, location
7968brokering, etc.) for which the proxy is responsible.")
3f641af0 7969 (license license:zpl2.1)))
2ad52086
LF
7970
7971(define-public python2-zope-proxy
7972 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7973
7974(define-public python-zope-location
7975 (package
7976 (name "python-zope-location")
7977 (version "4.0.3")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (string-append "https://pypi.python.org/packages/source/z"
7982 "/zope.location/zope.location-" version ".tar.gz"))
7983 (sha256
7984 (base32
7985 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7986 (build-system python-build-system)
40bb8e07
MB
7987 (arguments
7988 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7989 (propagated-inputs
f404b5ea
LF
7990 `(("python-zope-proxy" ,python-zope-proxy)
7991 ("python-zope-schema" ,python-zope-schema)))
7992 (home-page "http://pypi.python.org/pypi/zope.location/")
7993 (synopsis "Zope location library")
7994 (description "Zope.location implements the concept of \"locations\" in
7995Zope3, which are are special objects that have a structural location.")
3f641af0 7996 (license license:zpl2.1)))
f404b5ea
LF
7997
7998(define-public python2-zope-location
7999 (package-with-python2 python-zope-location))
d4b77f36
LF
8000
8001(define-public python-zope-security
8002 (package
8003 (name "python-zope-security")
8004 (version "4.0.3")
8005 (source
8006 (origin
8007 (method url-fetch)
8008 (uri (string-append "https://pypi.python.org/packages/source/z"
8009 "/zope.security/zope.security-" version ".tar.gz"))
8010 (sha256
8011 (base32
8012 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8013 (build-system python-build-system)
a74f9b12
MB
8014 (arguments
8015 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8016 (propagated-inputs
8017 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8018 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8019 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8020 (native-inputs
8021 `(("python-six" ,python-six)
8022 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8023 ("python-zope-configuration" ,python-zope-configuration)
8024 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8025 ("python-zope-testrunner" ,python-zope-testrunner)
8026 ("python-zope-testing" ,python-zope-testing)))
8027 (home-page "http://pypi.python.org/pypi/zope.security")
8028 (synopsis "Zope security framework")
8029 (description "Zope.security provides a generic mechanism to implement
8030security policies on Python objects.")
3f641af0 8031 (license license:zpl2.1)))
d4b77f36
LF
8032
8033(define-public python2-zope-security
04417662
EF
8034 (let ((zope-security (package-with-python2 python-zope-security)))
8035 (package (inherit zope-security)
8036 (propagated-inputs
8037 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8038 ,@(alist-delete
8039 "python-zope-testrunner"
8040 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8041
8042(define-public python-zope-component
8043 (package
8044 (name "python-zope-component")
8045 (version "4.2.2")
8046 (source
8047 (origin
8048 (method url-fetch)
8049 (uri (string-append "https://pypi.python.org/packages/source/z"
8050 "/zope.component/zope.component-" version ".tar.gz"))
8051 (sha256
8052 (base32
8053 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8054 (build-system python-build-system)
8055 (arguments
8056 ;; Skip tests due to circular dependency with python-zope-security.
8057 '(#:tests? #f))
8058 (native-inputs
8059 `(("python-zope-testing" ,python-zope-testing)))
8060 (propagated-inputs
8061 `(("python-zope-event" ,python-zope-event)
8062 ("python-zope-interface" ,python-zope-interface)
8063 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8064 ("python-zope-configuration" ,python-zope-configuration)))
8065 (home-page "https://github.com/zopefoundation/zope.component")
8066 (synopsis "Zope Component Architecture")
8067 (description "Zope.component represents the core of the Zope Component
8068Architecture. Together with the zope.interface package, it provides
8069facilities for defining, registering and looking up components.")
3f641af0 8070 (license license:zpl2.1)))
a6b61b27
LF
8071
8072(define-public python2-zope-component
8073 (package-with-python2 python-zope-component))
3859ac12 8074
1ae44b80 8075(define-public python-pythondialog
b5f218be 8076 (package
1ae44b80 8077 (name "python-pythondialog")
42c4b246 8078 (version "3.4.0")
b5f218be
LF
8079 (source
8080 (origin
8081 (method url-fetch)
1ae44b80 8082 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8083 (sha256
8084 (base32
1ae44b80 8085 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8086 (build-system python-build-system)
8087 (arguments
8088 `(#:phases
8089 (modify-phases %standard-phases
8090 (add-after 'unpack 'patch-path
8091 (lambda* (#:key inputs #:allow-other-keys)
8092 (let* ((dialog (assoc-ref inputs "dialog")))
8093 ;; Since this library really wants to grovel the search path, we
8094 ;; must hardcode dialog's store path into it.
8095 (substitute* "dialog.py"
8096 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8097 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8098 #t))))
b5f218be
LF
8099 #:tests? #f)) ; no test suite
8100 (propagated-inputs
8101 `(("dialog" ,dialog)))
8102 (home-page "http://pythondialog.sourceforge.net/")
8103 (synopsis "Python interface to the UNIX dialog utility")
8104 (description "A Python wrapper for the dialog utility. Its purpose is to
8105provide an easy to use, pythonic and comprehensive Python interface to dialog.
8106This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8107 (license license:lgpl2.1)
1ae44b80
LF
8108 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8109
8110(define-public python2-pythondialog
8111 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8112 (package
8113 (inherit base)
8114 (version (package-version python-pythondialog))
8115 (source (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "python2-pythondialog" version))
8118 (sha256
8119 (base32
8120 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8121
3859ac12
LF
8122(define-public python-pyrfc3339
8123 (package
8124 (name "python-pyrfc3339")
d9aa097b 8125 (version "1.0")
3859ac12
LF
8126 (source
8127 (origin
8128 (method url-fetch)
d9aa097b 8129 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8130 (sha256
8131 (base32
d9aa097b 8132 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8133 (build-system python-build-system)
8134 (propagated-inputs
8135 `(("python-pytz" ,python-pytz)))
8136 (native-inputs
f3b98f4f 8137 `(("python-nose" ,python-nose)))
3859ac12
LF
8138 (home-page "https://github.com/kurtraschke/pyRFC3339")
8139 (synopsis "Python timestamp library")
8140 (description "Python library for generating and parsing RFC 3339-compliant
8141timestamps.")
8142 (license license:expat)))
8143
8144(define-public python2-pyrfc3339
8145 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8146
8147(define-public python-werkzeug
8148 (package
8149 (name "python-werkzeug")
bbb99d6b 8150 (version "0.11.15")
5eea2005
LF
8151 (source
8152 (origin
8153 (method url-fetch)
4b47cbfa 8154 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8155 (sha256
8156 (base32
bbb99d6b 8157 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8158 (build-system python-build-system)
8159 (native-inputs
8160 `(("python-pytest" ,python-pytest)))
8161 (home-page "http://werkzeug.pocoo.org/")
8162 (synopsis "Utilities for WSGI applications")
8163 (description "One of the most advanced WSGI utility modules. It includes a
8164powerful debugger, full-featured request and response objects, HTTP utilities to
8165handle entity tags, cache control headers, HTTP dates, cookie handling, file
8166uploads, a powerful URL routing system and a bunch of community-contributed
8167addon modules.")
3f641af0 8168 (license license:x11)))
5eea2005
LF
8169
8170(define-public python2-werkzeug
8171 (package-with-python2 python-werkzeug))
99fffa8a
LF
8172
8173(define-public python-configobj
8174 (package
8175 (name "python-configobj")
8176 (version "5.0.6")
8177 (source (origin
8178 (method url-fetch)
8179 (uri (string-append
8180 "https://pypi.python.org/packages/source/c/configobj/"
8181 "configobj-" version ".tar.gz"))
8182 (sha256
8183 (base32
8184 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8185 ;; Patch setup.py so it looks for python-setuptools, which is
8186 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8187 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8188 (build-system python-build-system)
861f70c9 8189 (propagated-inputs
f3b98f4f 8190 `(("python-six" ,python-six)))
99fffa8a
LF
8191 (synopsis "Config file reading, writing and validation")
8192 (description "ConfigObj is a simple but powerful config file reader and
8193writer: an ini file round tripper. Its main feature is that it is very easy to
8194use, with a straightforward programmer’s interface and a simple syntax for
8195config files.")
8196 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8197 (license license:bsd-3)))
99fffa8a
LF
8198
8199(define-public python2-configobj
8200 (package-with-python2 python-configobj))
79e8a291
LF
8201
8202(define-public python-configargparse
8203 (package
8204 (name "python-configargparse")
8205 (version "0.10.0")
8206 (source (origin
8207 (method url-fetch)
8208 (uri (string-append
8209 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8210 "ConfigArgParse-" version ".tar.gz"))
8211 (sha256
8212 (base32
8213 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8214 (build-system python-build-system)
8215 (arguments
8216 ;; FIXME: Bug in test suite filed upstream:
8217 ;; https://github.com/bw2/ConfigArgParse/issues/32
8218 '(#:tests? #f))
8219 (synopsis "Replacement for argparse")
8220 (description "A drop-in replacement for argparse that allows options to also
8221be set via config files and/or environment variables.")
8222 (home-page "https://github.com/bw2/ConfigArgParse")
8223 (license license:expat)))
8224
8225(define-public python2-configargparse
8226 (package-with-python2 python-configargparse))
ab41f979
LF
8227
8228(define-public python-ndg-httpsclient
8229 (package
8230 (name "python-ndg-httpsclient")
ae476d01 8231 (version "0.4.2")
ab41f979
LF
8232 (source (origin
8233 (method url-fetch)
7be13d00 8234 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8235 (sha256
8236 (base32
ae476d01 8237 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8238 (build-system python-build-system)
a39cc016
LF
8239 (arguments
8240 '(;; The tests appear to require networking.
8241 #:tests? #f))
ab41f979
LF
8242 (propagated-inputs
8243 `(("python-pyopenssl" ,python-pyopenssl)))
8244 (synopsis "HTTPS support for Python's httplib and urllib2")
8245 (description "This is a HTTPS client implementation for httplib and urllib2
8246based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8247over the default provided with Python and importantly enables full verification
8248of the SSL peer.")
8249 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8250 (license license:bsd-3)))
ab41f979
LF
8251
8252;; python2-openssl requires special care, so package-with-python2 is
8253;; insufficient.
8254(define-public python2-ndg-httpsclient
8255 (package (inherit python-ndg-httpsclient)
8256 (name "python2-ndg-httpsclient")
8257 (arguments `(#:python ,python-2))
8258 (propagated-inputs
8259 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8260
8261(define-public python-contextlib2
8262 (package
8263 (name "python-contextlib2")
8264 (version "0.4.0")
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "contextlib2" version))
8269 (sha256
8270 (base32
8271 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8272 (build-system python-build-system)
8273 (arguments
8274 `(#:phases
8275 (modify-phases %standard-phases
8276 (replace 'check
8277 (lambda _ (zero?
8278 (system*
b3546174 8279 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8280 (home-page "http://contextlib2.readthedocs.org/")
8281 (synopsis "Tools for decorators and context managers")
8282 (description "This module is primarily a backport of the Python
82833.2 contextlib to earlier Python versions. Like contextlib, it
8284provides utilities for common tasks involving decorators and context
8285managers. It also contains additional features that are not part of
8286the standard library.")
3f641af0 8287 (license license:psfl)))
03f964a5
CM
8288
8289(define-public python2-contextlib2
8290 (package-with-python2 python-contextlib2))
210bf497
DT
8291
8292(define-public python-texttable
8293 (package
8294 (name "python-texttable")
8295 (version "0.8.4")
8296 (source
8297 (origin
8298 (method url-fetch)
8299 (uri (pypi-uri "texttable" version))
8300 (sha256
8301 (base32
8302 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8303 (build-system python-build-system)
8304 (arguments '(#:tests? #f)) ; no tests
8305 (home-page "https://github.com/foutaise/texttable/")
8306 (synopsis "Python module for creating simple ASCII tables")
8307 (description "Texttable is a Python module for creating simple ASCII
8308tables.")
3f641af0 8309 (license license:lgpl2.1+)))
210bf497
DT
8310
8311(define-public python2-texttable
8312 (package-with-python2 python-texttable))
67c52bb3
DT
8313
8314(define-public python-websocket-client
8315 (package
8316 (name "python-websocket-client")
6b810897 8317 (version "0.37.0")
67c52bb3
DT
8318 (source
8319 (origin
8320 (method url-fetch)
6b810897 8321 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8322 (sha256
8323 (base32
6b810897 8324 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8325 (build-system python-build-system)
a5333f7c
HG
8326 (propagated-inputs
8327 `(("python-six" ,python-six)))
67c52bb3
DT
8328 (home-page "https://github.com/liris/websocket-client")
8329 (synopsis "WebSocket client for Python")
8330 (description "The Websocket-client module provides the low level APIs for
8331WebSocket usage in Python programs.")
3f641af0 8332 (license license:lgpl2.1+)))
67c52bb3
DT
8333
8334(define-public python2-websocket-client
8335 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8336
8337(define-public python-atomicwrites
8338 (package
8339 (name "python-atomicwrites")
4e92d76a 8340 (version "1.1.0")
5c6eea2a
LF
8341 (source (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "atomicwrites" version))
8344 (sha256
8345 (base32
4e92d76a 8346 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
8347 (build-system python-build-system)
8348 (synopsis "Atomic file writes in Python")
8349 (description "Library for atomic file writes using platform dependent tools
8f65585b 8350for atomic file system operations.")
5c6eea2a 8351 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8352 (license license:expat)))
9bb6d184
LF
8353
8354(define-public python2-atomicwrites
f210e944 8355 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8356
8357(define-public python-requests-toolbelt
8358 (package
8359 (name "python-requests-toolbelt")
c02af1c8 8360 (version "0.6.2")
561bb3cb
LF
8361 (source (origin
8362 (method url-fetch)
c02af1c8
LF
8363 (uri (string-append
8364 "https://pypi.python.org/packages/"
8365 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8366 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8367 (sha256
8368 (base32
c02af1c8 8369 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8370 (build-system python-build-system)
759aadd4
LF
8371 (native-inputs
8372 `(("python-betamax" ,python-betamax)
8373 ("python-mock" ,python-mock)
8374 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8375 (propagated-inputs
8376 `(("python-requests" ,python-requests)))
8377 (synopsis "Extensions to python-requests")
8378 (description "This is a toolbelt of useful classes and functions to be used
8379with python-requests.")
8380 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8381 (license license:asl2.0)))
d1deb90b
LF
8382
8383(define-public python-click-threading
8384 (package
8385 (name "python-click-threading")
3d2e0dbc 8386 (version "0.2.0")
d1deb90b
LF
8387 (source (origin
8388 (method url-fetch)
3d2e0dbc
LF
8389 (uri (string-append
8390 "https://pypi.python.org/packages/"
8391 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8392 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8393 (sha256
8394 (base32
3d2e0dbc 8395 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8396 (build-system python-build-system)
8397 (propagated-inputs
8398 `(("python-click" ,python-click)))
8399 (synopsis "Utilities for multithreading in Click")
8400 (description "This package provides utilities for multithreading in Click
8401applications.")
8402 (home-page "https://github.com/click-contrib/click-threading")
8403 (license license:expat)))
7b17cab9
LF
8404
8405(define-public python-click-log
8406 (package
8407 (name "python-click-log")
42734b9a 8408 (version "0.1.8")
7b17cab9
LF
8409 (source (origin
8410 (method url-fetch)
8411 (uri (pypi-uri "click-log" version))
8412 (sha256
8413 (base32
42734b9a 8414 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8415 (build-system python-build-system)
8416 (propagated-inputs
8417 `(("python-click" ,python-click)))
8418 (synopsis "Logging for click applications")
8419 (description "This package provides a Python library for logging Click
8420applications.")
8421 (home-page "https://github.com/click-contrib/click-log")
8422 (license license:expat)))
7b3a4ee4
LF
8423
8424(define-public python-apipkg
8425 (package
8426 (name "python-apipkg")
8427 (version "1.4")
8428 (source (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "apipkg" version))
8431 (sha256
8432 (base32
8433 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8434 (build-system python-build-system)
328bb95d 8435 (native-inputs
7b3a4ee4
LF
8436 `(("python-pytest" ,python-pytest)))
8437 (synopsis "Namespace control and lazy-import mechanism")
8438 (description "With apipkg you can control the exported namespace of a Python
8439package and greatly reduce the number of imports for your users. It is a small
8440pure Python module that works on virtually all Python versions.")
8441 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8442 (license license:expat)))
e08739c3
CAW
8443
8444(define-public python2-apipkg
f210e944 8445 (package-with-python2 python-apipkg))
848964fe
LF
8446
8447(define-public python-execnet
8448 (package
8449 (name "python-execnet")
8450 (version "1.4.1")
8451 (source (origin
8452 (method url-fetch)
8453 (uri (pypi-uri "execnet" version))
8454 (sha256
8455 (base32
8456 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8457 (build-system python-build-system)
ca0eee9d
LF
8458 (arguments
8459 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8460 ;; The two test failures are caused by the lack of an `ssh` executable.
8461 ;; The test suite can be run with pytest after the 'install' phase.
8462 #:tests? #f))
848964fe 8463 (native-inputs
ca0eee9d
LF
8464 `(("python-pytest" ,python-pytest)
8465 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8466 (propagated-inputs
848964fe
LF
8467 `(("python-apipkg" ,python-apipkg)))
8468 (synopsis "Rapid multi-Python deployment")
8469 (description "Execnet provides a share-nothing model with
8470channel-send/receive communication for distributing execution across many
8471Python interpreters across version, platform and network barriers. It has a
8472minimal and fast API targetting the following uses:
8473@enumerate
8474@item distribute tasks to (many) local or remote CPUs
8475@item write and deploy hybrid multi-process applications
8476@item write scripts to administer multiple environments
8477@end enumerate")
8478 (home-page "http://codespeak.net/execnet/")
f210e944 8479 (license license:expat)))
16c84f90
CAW
8480
8481(define-public python2-execnet
f210e944 8482 (package-with-python2 python-execnet))
6720dbb4 8483
d5bbf806 8484(define-public python-trollius-redis
8485 (package
8486 (name "python-trollius-redis")
8487 (version "0.1.4")
8488 (source
8489 (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "trollius_redis" version))
8492 (sha256
8493 (base32
8494 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8495 (build-system python-build-system)
97b62eb0
MB
8496 ;; TODO: Tests require packaging 'hiredis'.
8497 (arguments '(#:tests? #f))
d5bbf806 8498 (home-page "https://github.com/benjolitz/trollius-redis")
8499 (synopsis "Port of asyncio-redis to trollius")
8500 (description "@code{trollius-redis} is a Redis client for Python
8501 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8502 Redis protocol.")
8503 (license license:bsd-2)))
8504
8505(define-public python2-trollius-redis
8506 (package-with-python2 python-trollius-redis))
8507
6720dbb4
LF
8508;;; The software provided by this package was integrated into pytest 2.8.
8509(define-public python-pytest-cache
8510 (package
8511 (name "python-pytest-cache")
8512 (version "1.0")
8513 (source (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "pytest-cache" version))
8516 (sha256
8517 (base32
8518 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8519 (build-system python-build-system)
f22efa01 8520 (propagated-inputs
630d938f
EF
8521 `(("python-apipkg" ,python-apipkg)
8522 ("python-execnet" ,python-execnet)
8523 ("python-py" ,python-py)
8524 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8525 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8526 (description "The pytest-cache plugin provides tools to rerun failures from
8527the last py.test invocation.")
8528 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8529 (license license:expat)))
0adc21c2
EF
8530
8531(define-public python2-pytest-cache
f210e944 8532 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8533
8534(define-public python-pytest-localserver
8535 (package
8536 (name "python-pytest-localserver")
29f20168 8537 (version "0.3.5")
d7e729fe
LF
8538 (source (origin
8539 (method url-fetch)
29f20168 8540 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8541 (sha256
8542 (base32
29f20168 8543 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8544 (build-system python-build-system)
8545 (arguments
8546 `(#:phases (modify-phases %standard-phases
8547 (replace 'check
8548 (lambda _
8549 (zero? (system* "py.test" "--genscript=runtests.py"))
8550 (zero? (system* "py.test")))))))
8551 (native-inputs
d7e729fe
LF
8552 `(("python-pytest" ,python-pytest)
8553 ("python-requests" ,python-requests)
9ba40f05 8554 ("python-six" ,python-six)))
f22efa01 8555 (propagated-inputs
9ba40f05 8556 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8557 (synopsis "Py.test plugin to test server connections locally")
8558 (description "Pytest-localserver is a plugin for the pytest testing
8559framework which enables you to test server connections locally.")
8560 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8561 (license license:expat)))
28cecbb7
LF
8562
8563(define-public python-wsgi-intercept
8564 (package
8565 (name "python-wsgi-intercept")
909fbd2b 8566 (version "1.2.2")
28cecbb7
LF
8567 (source (origin
8568 (method url-fetch)
909fbd2b
LF
8569 (uri (string-append
8570 "https://pypi.python.org/packages/"
8571 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8572 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8573 (sha256
8574 (base32
909fbd2b 8575 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8576 (build-system python-build-system)
b9fc496f
HG
8577 (propagated-inputs
8578 `(("python-six" ,python-six)))
28cecbb7 8579 (native-inputs
9d813ec1 8580 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8581 ("python-httplib2" ,python-httplib2)
8582 ("python-requests" ,python-requests)
8757f050 8583 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8584 (synopsis "Puts a WSGI application in place of a real URI for testing")
8585 (description "Wsgi_intercept installs a WSGI application in place of a real
8586URI for testing. Testing a WSGI application normally involves starting a
8587server at a local host and port, then pointing your test code to that address.
8588Instead, this library lets you intercept calls to any specific host/port
8589combination and redirect them into a WSGI application importable by your test
8590program. Thus, you can avoid spawning multiple processes or threads to test
8591your Web app.")
8592 (home-page "https://github.com/cdent/wsgi-intercept")
8593 (license license:expat)))
89b8a551
LF
8594
8595(define-public python-pytest-xprocess
8596 (package
8597 (name "python-pytest-xprocess")
8598 (version "0.9.1")
8599 (source (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "pytest-xprocess" version))
8602 (sha256
8603 (base32
8604 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8605 (build-system python-build-system)
8606 (propagated-inputs
8607 `(("python-pytest" ,python-pytest)
8608 ("python-pytest-cache" ,python-pytest-cache)
8609 ("python-psutil" ,python-psutil)))
8610 (synopsis "Pytest plugin to manage external processes across test runs")
8611 (description "Pytest-xprocess is an experimental py.test plugin for managing
8612processes across test runs.")
8613 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8614 (license license:expat)))
5c299bf0
LF
8615
8616(define-public python-icalendar
8617 (package
8618 (name "python-icalendar")
268e8ad8 8619 (version "3.11.2")
5c299bf0
LF
8620 (source (origin
8621 (method url-fetch)
8622 (uri (pypi-uri "icalendar" version))
8623 (sha256
8624 (base32
268e8ad8 8625 "17rcy6rb9kqjf4p707ivmx7phjq7ngcz3bf7zriwxrqgrjagj7ag"))))
5c299bf0
LF
8626 (build-system python-build-system)
8627 (propagated-inputs
22d7360b 8628 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8629 ("python-pytz" ,python-pytz)))
8630 (synopsis "Python library for parsing iCalendar files")
8631 (description "The icalendar package is a parser/generator of iCalendar
8632files for use with Python.")
8633 (home-page "https://github.com/collective/icalendar")
3f641af0 8634 (license license:bsd-2)))
6bbbb53e
LF
8635
8636(define-public python-sphinxcontrib-newsfeed
8637 (package
8638 (name "python-sphinxcontrib-newsfeed")
8639 (version "0.1.4")
8640 (source (origin
8641 (method url-fetch)
8642 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8643 (sha256
8644 (base32
8645 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 8646 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
8647 (build-system python-build-system)
8648 (propagated-inputs
251ed7f2 8649 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8650 (synopsis "News Feed extension for Sphinx")
8651 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8652Blog, News or Announcements section to a Sphinx website.")
8653 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8654 (license license:bsd-2)))
2216e15c
SB
8655
8656(define-public python-args
8657 (package
8658 (name "python-args")
8659 (version "0.1.0")
8660 (source (origin
8661 (method url-fetch)
8662 (uri (pypi-uri "args" version))
8663 (sha256
8664 (base32
8665 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8666 (build-system python-build-system)
2216e15c
SB
8667 (home-page "https://github.com/kennethreitz/args")
8668 (synopsis "Command-line argument parser")
8669 (description
8670 "This library provides a Python module to parse command-line arguments.")
3f641af0 8671 (license license:bsd-3)))
2216e15c
SB
8672
8673(define-public python2-args
8674 (package-with-python2 python-args))
c06a3de9
SB
8675
8676(define-public python-clint
8677 (package
8678 (name "python-clint")
8679 (version "0.5.1")
8680 (source (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "clint" version))
8683 (sha256
8684 (base32
8685 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8686 (build-system python-build-system)
6145b604
MB
8687 (arguments
8688 '(#:phases
8689 (modify-phases %standard-phases
8690 (replace 'check
8691 (lambda _
8692 (zero? (system* "py.test" "-v")))))))
8693 (native-inputs
8694 `(("python-pytest" ,python-pytest)))
f22efa01 8695 (propagated-inputs
f3b98f4f 8696 `(("python-args" ,python-args)))
c06a3de9
SB
8697 (home-page "https://github.com/kennethreitz/clint")
8698 (synopsis "Command-line interface tools")
8699 (description
8700 "Clint is a Python module filled with a set of tools for developing
8701command-line applications, including tools for colored and indented
8702output, progress bar display, and pipes.")
3f641af0 8703 (license license:isc)))
c06a3de9
SB
8704
8705(define-public python2-clint
8706 (package-with-python2 python-clint))
4ecdeef8
SB
8707
8708(define-public python-astor
8709 (package
8710 (name "python-astor")
8711 (version "0.5")
8712 (source (origin
8713 (method url-fetch)
8714 (uri (pypi-uri "astor" version))
8715 (sha256
8716 (base32
8717 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8718 (build-system python-build-system)
4ecdeef8
SB
8719 (home-page "https://github.com/berkerpeksag/astor")
8720 (synopsis "Read and write Python ASTs")
8721 (description
8722 "Astor is designed to allow easy manipulation of Python source via the
8723Abstract Syntax Tree.")
3f641af0 8724 (license license:bsd-3)))
4ecdeef8
SB
8725
8726(define-public python2-astor
8727 (package-with-python2 python-astor))
e224b7d0
SB
8728
8729(define-public python-rply
8730 (package
8731 (name "python-rply")
8732 (version "0.7.4")
8733 (source (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "rply" version))
8736 (sha256
8737 (base32
8738 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8739 (build-system python-build-system)
f22efa01 8740 (propagated-inputs
f3b98f4f 8741 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8742 (home-page "https://github.com/alex/rply")
8743 (synopsis "Parser generator for Python")
8744 (description
8745 "This package provides a pure Python based parser generator, that also
8746works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8747with a new public API, and RPython support.")
3f641af0 8748 (license license:bsd-3)))
e224b7d0
SB
8749
8750(define-public python2-rply
8751 (package-with-python2 python-rply))
c3e919d7
SB
8752
8753(define-public python-hy
8754 (package
8755 (name "python-hy")
8756 (version "0.11.1")
8757 (source (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "hy" version))
8760 (sha256
8761 (base32
8762 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8763 (build-system python-build-system)
15c37077
MB
8764 (arguments
8765 '(#:phases
8766 (modify-phases %standard-phases
8767 (replace 'check
8768 (lambda _
8769 ;; Tests require write access to HOME.
8770 (setenv "HOME" "/tmp")
8771 (zero? (system* "nosetests")))))))
8772 (native-inputs
8773 `(("python-coverage" ,python-coverage)
8774 ("python-nose" ,python-nose)))
f22efa01 8775 (propagated-inputs
c3e919d7
SB
8776 `(("python-astor" ,python-astor)
8777 ("python-clint" ,python-clint)
f3b98f4f 8778 ("python-rply" ,python-rply)))
c3e919d7
SB
8779 (home-page "http://hylang.org/")
8780 (synopsis "Lisp frontend to Python")
8781 (description
8782 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8783its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8784Python at your fingertips, in Lisp form.")
8785 (license license:expat)))
8786
8787(define-public python2-hy
8788 (package-with-python2 python-hy))
7a5b944e 8789
81f7f297
EF
8790(define-public python-rauth
8791 (package
8792 (name "python-rauth")
8793 (version "0.7.2")
8794 (source
8795 (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "rauth" version))
8798 (sha256
8799 (base32
8800 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8801 (build-system python-build-system)
8802 (arguments
8803 `(#:test-target "check"))
f22efa01 8804 (propagated-inputs
81f7f297
EF
8805 `(("python-requests" ,python-requests)))
8806 (home-page "https://github.com/litl/rauth")
8807 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8808 (description
8809 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8810provides service wrappers for convenient connection initialization and
8811authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8812 (license license:expat)
8813 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8814
8815(define-public python2-rauth
0848d8d3
EF
8816 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8817 (package
8818 (inherit base)
00e10c6e 8819 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8820 ,@(package-native-inputs base))))))
81f7f297 8821
1abe448d
EF
8822(define-public python2-functools32
8823 (package
8824 (name "python2-functools32")
8825 (version "3.2.3-2")
8826 (source
8827 (origin
8828 (method url-fetch)
8829 (uri (pypi-uri "functools32" version))
8830 (sha256
8831 (base32
8832 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8833 (build-system python-build-system)
8834 (arguments
8835 `(#:python ,python-2
8836 #:tests? #f)) ; no test target
1abe448d
EF
8837 (home-page "https://github.com/MiCHiLU/python-functools32")
8838 (synopsis
8839 "Backport of the functools module from Python 3.2.3")
8840 (description
8841 "This package is a backport of the @code{functools} module from Python
88423.2.3 for use with older versions of Python and PyPy.")
8843 (license license:expat)))
8844
877889f3 8845(define-public python2-futures
7a5b944e 8846 (package
877889f3 8847 (name "python2-futures")
7a5b944e
EF
8848 (version "3.0.3")
8849 (source
8850 (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "futures" version))
8853 (sha256
8854 (base32
8855 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8856 (build-system python-build-system)
877889f3 8857 (arguments `(#:python ,python-2))
7a5b944e
EF
8858 (home-page "https://github.com/agronholm/pythonfutures")
8859 (synopsis
8860 "Backport of the concurrent.futures package from Python 3.2")
8861 (description
8862 "The concurrent.futures module provides a high-level interface for
8863asynchronously executing callables. This package backports the
8864concurrent.futures package from Python 3.2")
3f641af0 8865 (license license:bsd-3)))
7a5b944e 8866
5cb2fe44
EF
8867(define-public python-promise
8868 (package
8869 (name "python-promise")
8870 (version "0.4.2")
8871 (source
8872 (origin
8873 (method url-fetch)
8874 (uri (pypi-uri "promise" version))
8875 (sha256
8876 (base32
8877 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8878 (build-system python-build-system)
8879 ;; Tests wants python-futures, which is a python2 only program, and
8880 ;; can't be found by python-promise at test time.
8881 (arguments `(#:tests? #f))
8882 (home-page "https://github.com/syrusakbary/promise")
8883 (synopsis "Promises/A+ implementation for Python")
8884 (description
8885 "Promises/A+ implementation for Python")
8886 (properties `((python2-variant . ,(delay python2-promise))))
8887 (license license:expat)))
8888
8889(define-public python2-promise
8890 (let ((promise (package-with-python2
8891 (strip-python2-variant python-promise))))
8892 (package (inherit promise)
8893 (arguments (substitute-keyword-arguments (package-arguments promise)
8894 ((#:tests? _) #t)))
8895 (native-inputs
8896 `(("python2-futures" ,python2-futures)
8897 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8898 ,@(package-native-inputs promise))))))
8899
c18f6368
EF
8900(define-public python-urllib3
8901 (package
8902 (name "python-urllib3")
6178274d 8903 (version "1.18.1")
c18f6368
EF
8904 (source
8905 (origin
8906 (method url-fetch)
8907 (uri (pypi-uri "urllib3" version))
8908 (sha256
8909 (base32
6178274d 8910 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8911 (build-system python-build-system)
8912 (arguments `(#:tests? #f))
8913 (native-inputs
f3b98f4f 8914 `(;; some packages for tests
c18f6368
EF
8915 ("python-nose" ,python-nose)
8916 ("python-mock" ,python-mock)
8917 ("python-tornado" ,python-tornado)))
8918 (propagated-inputs
8322749a 8919 `(;; extra packages for https security
c18f6368
EF
8920 ("python-certifi" ,python-certifi)
8921 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8922 ("python-pyasn1" ,python-pyasn1)
8923 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8924 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8925 (synopsis "HTTP library with thread-safe connection pooling")
8926 (description
8927 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8928can reuse the same socket connection for multiple requests, it can POST files,
8929supports url redirection and retries, and also gzip and deflate decoding.")
8930 (license license:expat)))
8931
8932(define-public python2-urllib3
8933 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8934
8935(define-public python-colorama
8936 (package
8937 (name "python-colorama")
f92576f9 8938 (version "0.3.7")
2b2f2fc1
DT
8939 (source
8940 (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "colorama" version))
8943 (sha256
8944 (base32
f92576f9 8945 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 8946 (build-system python-build-system)
46e110cc 8947 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
8948 (description "Colorama is a Python library for rendering colored terminal
8949text.")
8950 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8951 (license license:bsd-3)))
2b2f2fc1
DT
8952
8953(define-public python2-colorama
8954 (package-with-python2 python-colorama))
f5bcec6e
DT
8955
8956(define-public python-rsa
8957 (package
8958 (name "python-rsa")
ecd68c53 8959 (version "3.4.2")
f5bcec6e
DT
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "rsa" version))
8964 (sha256
8965 (base32
ecd68c53 8966 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8967 (build-system python-build-system)
f22efa01 8968 (propagated-inputs
f3b98f4f 8969 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8970 (synopsis "Pure-Python RSA implementation")
8971 (description "Python-RSA is a pure-Python RSA implementation. It supports
8972encryption and decryption, signing and verifying signatures, and key
8973generation according to PKCS#1 version 1.5. It can be used as a Python
8974library as well as on the command line.")
8975 (home-page "http://stuvel.eu/rsa")
3f641af0 8976 (license license:asl2.0)))
f5bcec6e
DT
8977
8978(define-public python2-rsa
8979 (package-with-python2 python-rsa))
c0aacfa5
DT
8980
8981(define-public python-pluggy
8982 (package
8983 (name "python-pluggy")
8984 (version "0.3.1")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "pluggy" version))
8989 (sha256
8990 (base32
8991 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8992 (build-system python-build-system)
c0aacfa5
DT
8993 (synopsis "Plugin and hook calling mechanism for Python")
8994 (description "Pluggy is an extraction of the plugin manager as used by
8995Pytest but stripped of Pytest specific details.")
8996 (home-page "https://pypi.python.org/pypi/pluggy")
8997 (license license:expat)))
8998
8999(define-public python2-pluggy
9000 (package-with-python2 python-pluggy))
a4af21ca
DT
9001
9002(define-public python-tox
9003 (package
9004 (name "python-tox")
9005 (version "2.3.1")
9006 (source
9007 (origin
9008 (method url-fetch)
9009 (uri (pypi-uri "tox" version))
9010 (sha256
9011 (base32
9012 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9013 (build-system python-build-system)
9014 (arguments
7ba07edf
HG
9015 ;; FIXME: Tests require pytest-timeout, which itself requires
9016 ;; pytest>=2.8.0 for installation.
a4af21ca 9017 '(#:tests? #f))
482d9591
HG
9018 (propagated-inputs
9019 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9020 ("python-py" ,python-py)
482d9591 9021 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9022 (native-inputs
7ba07edf
HG
9023 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9024 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9025 (home-page "http://tox.testrun.org/")
9026 (synopsis "Virtualenv-based automation of test activities")
9027 (description "Tox is a generic virtualenv management and test command line
9028tool. It can be used to check that a package installs correctly with
9029different Python versions and interpreters, or run tests in each type of
9030supported environment, or act as a frontend to continuous integration
9031servers.")
9032 (license license:expat)))
9033
9034(define-public python2-tox
9035 (package-with-python2 python-tox))
ba9da248
DT
9036
9037(define-public python-jmespath
9038 (package
9039 (name "python-jmespath")
9040 (version "0.9.0")
9041 (source
9042 (origin
9043 (method url-fetch)
9044 (uri (pypi-uri "jmespath" version))
9045 (sha256
9046 (base32
9047 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9048 (build-system python-build-system)
52a75a83
MB
9049 (native-inputs
9050 `(("python-nose" ,python-nose)))
ba9da248
DT
9051 (synopsis "JSON Matching Expressions")
9052 (description "JMESPath (pronounced “james path”) is a Python library that
9053allows one to declaratively specify how to extract elements from a JSON
9054document.")
9055 (home-page "https://github.com/jmespath/jmespath.py")
9056 (license license:expat)))
9057
9058(define-public python2-jmespath
9059 (package-with-python2 python-jmespath))
935fcd5c
DT
9060
9061(define-public python-botocore
9062 (package
9063 (name "python-botocore")
e09f952d 9064 (version "1.4.62")
935fcd5c
DT
9065 (source
9066 (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "botocore" version))
9069 (sha256
9070 (base32
e09f952d 9071 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 9072 (build-system python-build-system)
877fdac9
MB
9073 (arguments
9074 ;; FIXME: Many tests are failing.
9075 '(#:tests? #f))
482d9591 9076 (propagated-inputs
22d7360b 9077 `(("python-dateutil" ,python-dateutil)
935fcd5c 9078 ("python-docutils" ,python-docutils)
482d9591 9079 ("python-jmespath" ,python-jmespath)))
8fa6890b 9080 (native-inputs
482d9591 9081 `(("python-mock" ,python-mock)
935fcd5c 9082 ("python-nose" ,python-nose)
482d9591 9083 ("behave" ,behave)
935fcd5c 9084 ("python-tox" ,python-tox)
482d9591 9085 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9086 (home-page "https://github.com/boto/botocore")
9087 (synopsis "Low-level interface to AWS")
9088 (description "Botocore is a Python library that provides a low-level
9089interface to the Amazon Web Services (AWS) API.")
3f641af0 9090 (license license:asl2.0)))
935fcd5c
DT
9091
9092(define-public python2-botocore
9093 (package-with-python2 python-botocore))
f861b8b8
DT
9094
9095(define-public awscli
9096 (package
9097 (name "awscli")
60a8be3a 9098 (version "1.11.43")
f861b8b8
DT
9099 (source
9100 (origin
9101 (method url-fetch)
d5ccf71e 9102 (uri (pypi-uri name version))
f861b8b8
DT
9103 (sha256
9104 (base32
60a8be3a 9105 "1x94jmy8ygld8g4pf35zdankh4dx8g8qn3q9j3hrbawqw0vkrp3y"))))
f861b8b8 9106 (build-system python-build-system)
482d9591 9107 (propagated-inputs
f861b8b8 9108 `(("python-colorama" ,python-colorama)
482d9591
HG
9109 ("python-botocore" ,python-botocore)
9110 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9111 ("python-docutils" ,python-docutils)
482d9591 9112 ("python-rsa" ,python-rsa)))
619bfd81
MB
9113 (arguments
9114 ;; FIXME: The 'pypi' release does not contain tests.
9115 '(#:tests? #f))
60a8be3a 9116 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9117 (synopsis "Command line client for AWS")
9118 (description "AWS CLI provides a unified command line interface to the
9119Amazon Web Services (AWS) API.")
3f641af0 9120 (license license:asl2.0)))
6a44697d
LF
9121
9122(define-public python-hypothesis
9123 (package
9124 (name "python-hypothesis")
bea6d94d 9125 (version "3.1.0")
6a44697d
LF
9126 (source (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "hypothesis" version))
9129 (sha256
9130 (base32
bea6d94d 9131 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9132 (build-system python-build-system)
bd100c71 9133 (native-inputs
6a44697d
LF
9134 `(("python-flake8" ,python-flake8)
9135 ("python-pytest" ,python-pytest)))
9136 (synopsis "Library for property based testing")
9137 (description "Hypothesis is a library for testing your Python code against a
9138much larger range of examples than you would ever want to write by hand. It’s
9139based on the Haskell library, Quickcheck, and is designed to integrate
9140seamlessly into your existing Python unit testing work flow.")
9141 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9142 (license license:mpl2.0)
6f068e08 9143 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9144
9145(define-public python2-hypothesis
6f068e08
EF
9146 (let ((hypothesis (package-with-python2
9147 (strip-python2-variant python-hypothesis))))
9148 (package (inherit hypothesis)
9149 (native-inputs
bd100c71
MB
9150 `(("python2-enum34" ,python2-enum34)
9151 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9152
9153(define-public python-pytest-subtesthack
9154 (package
9155 (name "python-pytest-subtesthack")
9156 (version "0.1.1")
9157 (source (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "pytest-subtesthack" version))
9160 (sha256
9161 (base32
9162 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9163 (build-system python-build-system)
7517e73c
LF
9164 (propagated-inputs
9165 `(("python-pytest" ,python-pytest)))
9166 (synopsis "Set-up and tear-down fixtures for unit tests")
9167 (description "This plugin allows you to set up and tear down fixtures within
9168unit test functions that use @code{py.test}. This is useful for using
9169@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9170function multiple times, without setting up or tearing down fixture state as is
9171normally the case.")
9172 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9173 (license license:unlicense)))
7517e73c
LF
9174
9175(define-public python2-pytest-subtesthack
9176 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9177
7637de23 9178(define-public python-xdo
0bdc1671 9179 (package
7637de23 9180 (name "python-xdo")
e871c332 9181 (version "0.3")
0bdc1671
CAW
9182 (source (origin
9183 (method url-fetch)
9184 (uri (string-append
9185 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9186 "python-xdo_" version ".orig.tar.gz"))
9187 (sha256
9188 (base32
e871c332 9189 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9190 (build-system python-build-system)
9191 (arguments
736cfc10
SB
9192 '(#:phases
9193 (modify-phases %standard-phases
9194 (add-before 'install 'patch-libxdo-path
9195 ;; Hardcode the path of dynamically loaded libxdo library.
9196 (lambda* (#:key inputs #:allow-other-keys)
9197 (let ((libxdo (string-append
9198 (assoc-ref inputs "xdotool")
9199 "/lib/libxdo.so")))
9200 (substitute* "xdo/_xdo.py"
9201 (("find_library\\(\"xdo\"\\)")
9202 (simple-format #f "\"~a\"" libxdo)))
9203 #t))))
9204 #:tests? #f)) ; no tests provided
0b5e0863
SB
9205 (propagated-inputs
9206 `(("python-six" ,python-six)))
0bdc1671
CAW
9207 (inputs
9208 `(("xdotool" ,xdotool)
9209 ("libX11" ,libx11)))
9210 (home-page "https://tracker.debian.org/pkg/python-xdo")
9211 (synopsis "Python library for simulating X11 keyboard/mouse input")
9212 (description "Provides bindings to libxdo for manipulating X11 via simulated
9213input. (Note that this is mostly a legacy library; you may wish to look at
9214python-xdo for newer bindings.)")
3f641af0 9215 (license license:bsd-3)))
0bdc1671 9216
7637de23
LF
9217(define-public python2-xdo
9218 (package-with-python2 python-xdo))
9219
cb34dc6c
CAW
9220(define-public python-wtforms
9221 (package
9222 (name "python-wtforms")
9223 (version "2.1")
9224 (source
9225 (origin
9226 (method url-fetch)
9227 (uri (pypi-uri "WTForms" version ".zip"))
9228 (sha256
9229 (base32
9230 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9231 (build-system python-build-system)
13c4d874
EF
9232 (arguments
9233 '(#:phases
9234 (modify-phases %standard-phases
9235 (add-after 'unpack 'remove-django-test
9236 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9237 (lambda _
9238 (substitute*
9239 "tests/runtests.py"
9240 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9241 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9242 #t)))))
cb34dc6c
CAW
9243 (native-inputs
9244 `(("unzip" ,unzip)))
9245 (home-page "http://wtforms.simplecodes.com/")
9246 (synopsis
9247 "Form validation and rendering library for Python web development")
9248 (description
9249 "WTForms is a flexible forms validation and rendering library
9250for Python web development. It is very similar to the web form API
9251available in Django, but is a standalone package.")
f210e944 9252 (license license:bsd-3)))
cb34dc6c
CAW
9253
9254(define-public python2-wtforms
f210e944 9255 (package-with-python2 python-wtforms))
50aaec25
DT
9256
9257(define-public python-mako
9258 (package
9259 (name "python-mako")
3753f2e6 9260 (version "1.0.6")
50aaec25
DT
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "Mako" version))
9265 (sha256
9266 (base32
3753f2e6 9267 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9268 (build-system python-build-system)
482d9591
HG
9269 (propagated-inputs
9270 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9271 (native-inputs
482d9591 9272 `(("python-mock" ,python-mock)
e435af5c
MB
9273 ("python-nose" ,python-nose)
9274 ("python-pytest" ,python-pytest)))
50aaec25
DT
9275 (home-page "http://www.makotemplates.org/")
9276 (synopsis "Templating language for Python")
9277 (description "Mako is a templating language for Python that compiles
9278templates into Python modules.")
f210e944 9279 (license license:expat)))
50aaec25
DT
9280
9281(define-public python2-mako
f210e944 9282 (package-with-python2 python-mako))
ae00a41f
CAW
9283
9284(define-public python-waitress
9285 (package
9286 (name "python-waitress")
9287 (version "0.8.10")
9288 (source
9289 (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "waitress" version))
9292 (sha256
9293 (base32
9294 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9295 (build-system python-build-system)
9296 (home-page "https://github.com/Pylons/waitress")
9297 (synopsis "Waitress WSGI server")
9298 (description "Waitress is meant to be a production-quality pure-Python WSGI
9299server with very acceptable performance.")
f210e944 9300 (license license:zpl2.1)))
ae00a41f
CAW
9301
9302(define-public python2-waitress
f210e944 9303 (package-with-python2 python-waitress))
778a284b
CAW
9304
9305(define-public python-wsgiproxy2
9306 (package
9307 (name "python-wsgiproxy2")
9308 (version "0.4.2")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9313 (sha256
9314 (base32
9315 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9316 (build-system python-build-system)
e359b31a
LF
9317 (arguments
9318 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9319 ;; support Python 3:
9320 ;; https://github.com/benoitc/restkit/issues/140
9321 #:tests? #f))
778a284b
CAW
9322 (native-inputs
9323 `(("unzip" ,unzip)
9324 ("python-nose" ,python-nose)
9325 ("python-coverage" ,python-coverage)))
9326 (propagated-inputs
9327 `(("python-six" ,python-six)
9328 ("python-webob" ,python-webob)))
9329 (home-page
9330 "https://github.com/gawel/WSGIProxy2/")
9331 (synopsis "WSGI Proxy with various http client backends")
9332 (description "WSGI turns HTTP requests into WSGI function calls.
9333WSGIProxy turns WSGI function calls into HTTP requests.
9334It also includes code to sign requests and pass private data,
9335and to spawn subprocesses to handle requests.")
f210e944 9336 (license license:expat)))
778a284b
CAW
9337
9338(define-public python2-wsgiproxy2
f210e944 9339 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9340
9341(define-public python-pastedeploy
9342 (package
9343 (name "python-pastedeploy")
9344 (version "1.5.2")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "PasteDeploy" version))
9349 (sha256
9350 (base32
9351 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9352 (build-system python-build-system)
9353 (native-inputs
9354 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9355 (home-page "http://pythonpaste.org/deploy/")
9356 (synopsis
9357 "Load, configure, and compose WSGI applications and servers")
9358 (description
9359 "This tool provides code to load WSGI applications and servers from URIs;
9360these URIs can refer to Python Eggs for INI-style configuration files. Paste
9361Script provides commands to serve applications based on this configuration
9362file.")
9363 (license license:expat)))
9364
9365(define-public python2-pastedeploy
9366 (package-with-python2 python-pastedeploy))
1cf53652 9367
c4a7904c
CAW
9368(define-public python-paste
9369 (package
9370 (name "python-paste")
ba1731da 9371 (version "2.0.3")
c4a7904c
CAW
9372 (source
9373 (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "Paste" version))
9376 (sha256
9377 (base32
ba1731da 9378 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9379 (patches (search-patches "python-paste-remove-website-test.patch"
9380 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9381 (build-system python-build-system)
9382 (native-inputs
9383 `(("python-nose" ,python-nose)))
9384 (propagated-inputs
f3b98f4f 9385 `(("python-six" ,python-six)))
c4a7904c
CAW
9386 (home-page "http://pythonpaste.org")
9387 (synopsis
9388 "Python web development tools, focusing on WSGI")
9389 (description
9390 "Paste provides a variety of web development tools and middleware which
9391can be nested together to build web applications. Paste's design closely
9392follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9393 (license license:expat)))
c4a7904c
CAW
9394
9395(define-public python2-paste
ba1731da 9396 (package-with-python2 python-paste))
c4a7904c 9397
a8f20f63
CAW
9398(define-public python-pastescript
9399 (package
9400 (name "python-pastescript")
9401 (version "2.0.2")
9402 (source
9403 (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "PasteScript" version))
9406 (sha256
9407 (base32
9408 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9409 (build-system python-build-system)
9410 (native-inputs
9411 `(("python-nose" ,python-nose)))
9412 (propagated-inputs
f3b98f4f 9413 `(("python-paste" ,python-paste)
a8f20f63
CAW
9414 ("python-pastedeploy" ,python-pastedeploy)))
9415 (home-page "http://pythonpaste.org/script/")
9416 (arguments
9417 '(;; Unfortunately, this requires the latest unittest2,
9418 ;; but that requires traceback2 which requires linecache2 which requires
9419 ;; unittest2. So we're skipping tests for now.
9420 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9421 ;; so in theory we could get around this situation somehow.)
9422 #:tests? #f))
9423 (synopsis
9424 "Pluggable command line tool for serving web applications and more")
9425 (description
9426 "PasteScript is a plugin-friendly command line tool which provides a
9427variety of features, from launching web applications to bootstrapping project
9428layouts.")
9429 (license license:expat)))
9430
9431(define-public python2-pastescript
9432 (package-with-python2 python-pastescript))
9433
1cf53652
CAW
9434(define-public python-pyquery
9435 (package
9436 (name "python-pyquery")
ab0c3429 9437 (version "1.2.17")
1cf53652
CAW
9438 (source
9439 (origin
9440 (method url-fetch)
9441 (uri (pypi-uri "pyquery" version))
9442 (sha256
9443 (base32
ab0c3429 9444 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9445 (build-system python-build-system)
2ddbfa8c
LF
9446 (native-inputs
9447 `(("python-webob" ,python-webob)
9448 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9449 (propagated-inputs
9450 `(("python-lxml" ,python-lxml)
9451 ("python-cssselect" ,python-cssselect)))
9452 (home-page "https://github.com/gawel/pyquery")
9453 (synopsis "Make jQuery-like queries on xml documents")
9454 (description "pyquery allows you to make jQuery queries on xml documents.
9455The API is as much as possible the similar to jQuery. pyquery uses lxml for
9456fast xml and html manipulation.")
f210e944 9457 (license license:bsd-3)))
1cf53652
CAW
9458
9459(define-public python2-pyquery
f210e944 9460 (package-with-python2 python-pyquery))
aa6313d6
CAW
9461
9462(define-public python-webtest
9463 (package
9464 (name "python-webtest")
9465 (version "2.0.20")
9466 (source
9467 (origin
9468 (method url-fetch)
9469 (uri (pypi-uri "WebTest" version))
9470 (sha256
9471 (base32
9472 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9473 (build-system python-build-system)
9474 (arguments
9475 `(;; Unfortunately we have to disable tests!
9476 ;; This release of WebTest is pinned to python-nose < 1.3,
9477 ;; but older versions of python-nose are plagued with the following
9478 ;; bug(s), which rears its ugly head during test execution:
9479 ;; https://github.com/nose-devs/nose/issues/759
9480 ;; https://github.com/nose-devs/nose/pull/811
9481 #:tests? #f))
9482 ;; Commented out code is no good, but in this case, once tests
9483 ;; are ready to be enabled again, we should put the following
9484 ;; in place:
9485 ;; (native-inputs
9486 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9487 ;; ; but see above comment
9488 ;; ("python-coverage" ,python-coverage)
9489 ;; ("python-mock" ,python-mock)
9490 ;; ("python-pastedeploy" ,python-pastedeploy)
9491 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9492 ;; ("python-pyquery" ,python-pyquery)))
9493 (propagated-inputs
9494 `(("python-waitress" ,python-waitress)
9495 ("python-webob" ,python-webob)
9496 ("python-six" ,python-six)
9497 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9498 (home-page "http://webtest.pythonpaste.org/")
9499 (synopsis "Helper to test WSGI applications")
9500 (description "Webtest allows you to test your Python web applications
9501without starting an HTTP server. It supports anything that supports the
9502minimum of WSGI.")
f210e944 9503 (license license:expat)))
aa6313d6
CAW
9504
9505(define-public python2-webtest
f210e944 9506 (package-with-python2 python-webtest))
4cb122cd
CAW
9507
9508(define-public python-anyjson
9509 (package
9510 (name "python-anyjson")
9511 (version "0.3.3")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "anyjson" version))
9516 (sha256
9517 (base32
9518 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9519 (build-system python-build-system)
9520 (arguments
9521 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9522 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9523 ;; whatever) so this transformation needs to be done before the tests
9524 ;; can be run. Maybe we could add a build step to transform beforehand
9525 ;; but it could be annoying/difficult.
9526 ;; We can enable tests for the Python 2 version, though, and do below.
9527 #:tests? #f))
9528 (home-page "http://bitbucket.org/runeh/anyjson/")
9529 (synopsis
9530 "Wraps best available JSON implementation in a common interface")
9531 (description
9532 "Anyjson loads whichever is the fastest JSON module installed
9533and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9534 (license license:bsd-3)
4cb122cd
CAW
9535 (properties `((python2-variant . ,(delay python2-anyjson))))))
9536
9537(define-public python2-anyjson
9538 (let ((anyjson (package-with-python2
9539 (strip-python2-variant python-anyjson))))
9540 (package
9541 (inherit anyjson)
9542 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9543 #:tests? #t
9544 ,@(package-arguments anyjson)))
00e10c6e 9545 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9546
9547(define-public python-amqp
9548 (package
9549 (name "python-amqp")
9550 (version "1.4.9")
9551 (source
9552 (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "amqp" version))
9555 (sha256
9556 (base32
9557 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9558 (build-system python-build-system)
9559 (native-inputs
9560 `(("python-nose" ,python-nose)
9561 ("python-mock" ,python-mock)))
9562 (home-page "http://github.com/celery/py-amqp")
9563 (synopsis
9564 "Low-level AMQP client for Python (fork of amqplib)")
9565 (description
9566 "This is a fork of amqplib which was originally written by Barry Pederson.
9567It is maintained by the Celery project, and used by kombu as a pure python
9568alternative when librabbitmq is not available.")
3f641af0 9569 (license license:lgpl2.1+)
8dfceab7
CAW
9570 (properties `((python2-variant . ,(delay python2-amqp))))))
9571
9572(define-public python2-amqp
9573 (let ((amqp (package-with-python2
9574 (strip-python2-variant python-amqp))))
9575 (package
9576 (inherit amqp)
9577 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9578 ;; unmaintained. Weirdly, does not do this on the python 3
9579 ;; version?
9580 #:tests? #f
00e10c6e 9581 ,@(package-arguments amqp))))))
7d387305
CAW
9582
9583(define-public python-kombu
9584 (package
9585 (name "python-kombu")
0cb59822 9586 (version "3.0.37")
7d387305
CAW
9587 (source
9588 (origin
9589 (method url-fetch)
9590 (uri (pypi-uri "kombu" version))
9591 (sha256
9592 (base32
0cb59822 9593 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9594 (build-system python-build-system)
9595 (native-inputs
9596 `(("python-mock" ,python-mock)
9597 ("python-nose" ,python-nose)))
9598 (propagated-inputs
9599 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9600 ("python-amqp" ,python-amqp)
9601 ("python-redis" ,python-redis)))
7d387305
CAW
9602 (home-page "http://kombu.readthedocs.org")
9603 (synopsis "Message passing library for Python")
9604 (description "The aim of Kombu is to make messaging in Python as easy as
9605possible by providing an idiomatic high-level interface for the AMQ protocol,
9606and also provide proven and tested solutions to common messaging problems.
9607AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9608message orientation, queuing, routing, reliability and security, for which the
9609RabbitMQ messaging server is the most popular implementation.")
3f641af0 9610 (license license:bsd-3)
7d387305
CAW
9611 (properties `((python2-variant . ,(delay python2-kombu))))))
9612
9613(define-public python2-kombu
9614 (let ((kombu (package-with-python2
9615 (strip-python2-variant python-kombu))))
9616 (package
9617 (inherit kombu)
752eb9e0
MB
9618 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9619 ;; It works fine on the python3 variant.
9620 #:tests? #f
9621 ,@(package-arguments kombu)))
328bb95d
HG
9622 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9623 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9624
9625(define-public python-billiard
9626 (package
9627 (name "python-billiard")
a6bb9e44 9628 (version "3.3.0.23")
b6f0b9fb
CAW
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "billiard" version))
9633 (sha256
9634 (base32
a6bb9e44 9635 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9636 (build-system python-build-system)
9637 (native-inputs
9638 `(("python-nose" ,python-nose)))
9639 (home-page "http://github.com/celery/billiard")
9640 (synopsis
9641 "Python multiprocessing fork with improvements and bugfixes")
9642 (description
9643 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9644multiprocessing package itself is a renamed and updated version of R Oudkerk's
9645pyprocessing package. This standalone variant is intended to be compatible with
9646Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9647 (license license:bsd-3)
b6f0b9fb
CAW
9648 (properties `((python2-variant . ,(delay python2-billiard))))))
9649
9650(define-public python2-billiard
9651 (let ((billiard (package-with-python2
9652 (strip-python2-variant python-billiard))))
9653 (package
9654 (inherit billiard)
00e10c6e 9655 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9656 ("python2-mock" ,python2-mock)
9657 ,@(package-native-inputs billiard))))))
22df6419
CAW
9658
9659(define-public python-celery
9660 (package
9661 (name "python-celery")
9ebe87fe 9662 (version "3.1.24")
22df6419
CAW
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "celery" version))
9667 (sha256
9668 (base32
9ebe87fe 9669 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9670 (build-system python-build-system)
9ebe87fe
LF
9671 (arguments
9672 `(#:phases
9673 (modify-phases %standard-phases
9674 ;; These tests break with Python 3.5:
9675 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9676 (replace 'check
9677 (lambda _
9678 (zero?
9679 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9680 (native-inputs
9681 `(("python-nose" ,python-nose)))
f22efa01 9682 (propagated-inputs
22df6419
CAW
9683 `(("python-pytz" ,python-pytz)
9684 ("python-billiard" ,python-billiard)
9685 ("python-kombu" ,python-kombu)))
9686 (home-page "http://celeryproject.org")
9687 (synopsis "Distributed Task Queue")
9688 (description "Celery is an asynchronous task queue/job queue based on
9689distributed message passing. It is focused on real-time operation, but
9690supports scheduling as well. The execution units, called tasks, are executed
9691concurrently on a single or more worker servers using multiprocessing,
9692Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9693synchronously (wait until ready).")
3f641af0 9694 (license license:bsd-3)
22df6419
CAW
9695 (properties `((python2-variant . ,(delay python2-celery))))))
9696
9697(define-public python2-celery
9698 (let ((celery (package-with-python2
9699 (strip-python2-variant python-celery))))
9700 (package
9701 (inherit celery)
00e10c6e 9702 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9703 ("python2-mock" ,python2-mock)
9704 ,@(package-native-inputs celery))))))
97e32948
CAW
9705
9706(define-public python-translitcodec
9707 (package
9708 (name "python-translitcodec")
9709 (version "0.4.0")
9710 (source
9711 (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "translitcodec" version))
9714 (sha256
9715 (base32
9716 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9717 (build-system python-build-system)
9718 (arguments
9719 `(#:tests? #f)) ; no tests provided
9720 (home-page
9721 "https://github.com/claudep/translitcodec")
9722 (synopsis
9723 "Unicode to 8-bit charset transliteration codec")
9724 (description
9725 "This package contains codecs for transliterating ISO 10646 texts into
9726best-effort representations using smaller coded character sets (ASCII,
9727ISO 8859, etc.).")
f210e944 9728 (license license:expat)))
97e32948
CAW
9729
9730(define-public python2-translitcodec
f210e944 9731 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9732
9733(define-public python-editor
9734 (package
9735 (name "python-editor")
9736 (version "0.5")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "python-editor" version))
9741 (sha256
9742 (base32
9743 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9744 (build-system python-build-system)
9745 (home-page
9746 "https://github.com/fmoo/python-editor")
9747 (synopsis
9748 "Programmatically open an editor, capture the result")
9749 (description
9750 "python-editor is a library that provides the editor module for
9751programmatically interfacing with your system's $EDITOR.")
f210e944 9752 (license license:asl2.0)))
0c3b90d4
CAW
9753
9754(define-public python2-editor
f210e944 9755 (package-with-python2 python-editor))
3276517c
LF
9756
9757(define-public python-sphinxcontrib-programoutput
9758 (package
9759 (name "python-sphinxcontrib-programoutput")
9760 (version "0.8")
9761 (source (origin
9762 (method url-fetch)
9763 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9764 (sha256
9765 (base32
9766 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9767 (build-system python-build-system)
e2cb140e
MB
9768 (arguments
9769 ;; FIXME: Many tests are failing and the upstream is gone.
9770 '(#:tests? #f))
3276517c 9771 (propagated-inputs
a0a09859 9772 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9773 (synopsis "Sphinx extension to include program output")
9774 (description "A Sphinx extension to literally insert the output of arbitrary
9775commands into documents, helping you to keep your command examples up to date.")
9776 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9777 (license license:bsd-2)))
3276517c
LF
9778
9779(define-public python2-sphinxcontrib-programoutput
f210e944 9780 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9781
9782(define-public python-sphinx-repoze-autointerface
9783 (package
9784 (name "python-sphinx-repoze-autointerface")
328ae341 9785 (version "0.8")
548d7165
LF
9786 (source (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9789 (sha256
9790 (base32
328ae341 9791 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 9792 (build-system python-build-system)
5b3c3d4b 9793 (arguments '(#:tests? #f)) ; No tests.
548d7165 9794 (propagated-inputs
47c7dc4a 9795 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9796 ("python-zope-interface" ,python-zope-interface)))
9797 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9798 (description "This package defines an extension for the Sphinx documentation
9799system. The extension allows generation of API documentation by
9800introspection of @code{zope.interface} instances in code.")
9801 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9802 (license license:repoze)))
548d7165
LF
9803
9804(define-public python2-sphinx-repoze-autointerface
9805 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9806
9807(define-public python-psycopg2
9808 (package
9809 (name "python-psycopg2")
9810 (version "2.6.1")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "psycopg2" version))
9815 (sha256
9816 (base32
9817 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9818 (build-system python-build-system)
9819 (arguments
9820 ;; Tests would require a postgresql database "psycopg2_test"
9821 ;; and a running postgresql database management service.
9822 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9823 (inputs
9824 `(("postgresql" ,postgresql))) ; libpq
9825 (home-page "http://initd.org/psycopg/")
9826 (synopsis "Python PostgreSQL adapter")
9827 (description
9828 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9829 (license license:lgpl3+)))
b31fbea5
DM
9830
9831(define-public python2-psycopg2
f210e944 9832 (package-with-python2 python-psycopg2))
eed1a61f
LF
9833
9834(define-public python-vobject
9835 (package
9836 (name "python-vobject")
9bed9b15 9837 (version "0.9.2")
eed1a61f
LF
9838 (source (origin
9839 (method url-fetch)
9840 (uri (pypi-uri "vobject" version))
9841 (sha256
9842 (base32
9bed9b15 9843 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9844 (build-system python-build-system)
a9871b7b
LF
9845 (arguments
9846 '(;; The test suite relies on some non-portable Windows interfaces.
9847 #:tests? #f))
f22efa01 9848 (propagated-inputs
22d7360b 9849 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
9850 ("python-pyicu" ,python-pyicu)))
9851 (synopsis "Parse and generate vCard and vCalendar files")
9852 (description "Vobject is intended to be a full featured Python package for
9853parsing and generating vCard and vCalendar files. Currently, iCalendar files
9854are supported and well tested. vCard 3.0 files are supported, and all data
9855should be imported, but only a few components are understood in a sophisticated
9856way.")
9857 (home-page "http://eventable.github.io/vobject/")
f210e944 9858 (license license:asl2.0)))
eed1a61f
LF
9859
9860(define-public python2-vobject
f210e944 9861 (package-with-python2 python-vobject))
cedac813
LF
9862
9863(define-public python-munkres
9864 (package
9865 (name "python-munkres")
38e81a2c 9866 (version "1.0.8")
cedac813
LF
9867 (source (origin
9868 (method url-fetch)
9869 (uri (pypi-uri "munkres" version))
9870 (sha256
9871 (base32
38e81a2c 9872 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9873 (build-system python-build-system)
9874 (arguments
9875 '(#:tests? #f)) ; no test suite
9876 (home-page "http://software.clapper.org/munkres/")
9877 (synopsis "Implementation of the Munkres algorithm")
9878 (description "The Munkres module provides an implementation of the Munkres
9879algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9880useful for solving the Assignment Problem.")
3f641af0 9881 (license license:bsd-3)))
cedac813
LF
9882
9883(define-public python2-munkres
9884 (package-with-python2 python-munkres))
f3b3d78f
LF
9885
9886(define-public python-flask
9887 (package
9888 (name "python-flask")
c6c80104 9889 (version "0.11.1")
f3b3d78f
LF
9890 (source (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "Flask" version))
9893 (sha256
9894 (base32
c6c80104 9895 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9896 (build-system python-build-system)
9897 (propagated-inputs
9898 `(("python-itsdangerous" ,python-itsdangerous)
9899 ("python-jinja2" ,python-jinja2)
8f35c030 9900 ("python-click" ,python-click)
f3b3d78f
LF
9901 ("python-werkzeug" ,python-werkzeug)))
9902 (home-page "https://github.com/mitsuhiko/flask/")
9903 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9904 (description "Flask is a micro web framework based on the Werkzeug toolkit
9905and Jinja2 template engine. It is called a micro framework because it does not
9906presume or force a developer to use a particular tool or library.")
f210e944 9907 (license license:bsd-3)))
f3b3d78f
LF
9908
9909(define-public python2-flask
f210e944 9910 (package-with-python2 python-flask))
603d665b 9911
a7ad802b 9912(define-public python-flask-wtf
9913 (package
9914 (name "python-flask-wtf")
9915 (version "0.13.1")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "Flask-WTF" version))
9920 (sha256
9921 (base32
9922 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9923 (build-system python-build-system)
9924 (propagated-inputs
9925 `(("python-flask-babel" ,python-flask-babel)
9926 ("python-babel" ,python-babel)
9927 ("python-wtforms" ,python-wtforms)))
9928 (native-inputs
9929 `(("python-nose" ,python-nose)))
9930 (home-page "https://github.com/lepture/flask-wtf")
9931 (synopsis "Simple integration of Flask and WTForms")
9932 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9933upload, and reCAPTCHA.")
9934 (license license:bsd-3)))
9935
9936(define-public python2-flask-wtf
9937 (package-with-python2 python-flask-wtf))
9938
a2c7d88e 9939(define-public python-flask-multistatic
9940 (package
9941 (name "python-flask-multistatic")
9942 (version "1.0")
9943 (source
9944 (origin
9945 (method url-fetch)
9946 (uri (pypi-uri "flask-multistatic" version))
9947 (sha256
9948 (base32
9949 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9950 (build-system python-build-system)
9951 (propagated-inputs
9952 `(("python-flask" ,python-flask)))
9953 (home-page "https://pagure.io/flask-multistatic")
9954 (synopsis "Flask plugin to allow overriding static files")
9955 (description "@code{flask-multistatic} is a flask plugin that adds support
9956for overriding static files.")
9957 (license license:gpl3+)))
9958
9959(define-public python2-flask-multistatic
9960 (package-with-python2 python-flask-multistatic))
9961
603d665b
LF
9962(define-public python-cookies
9963 (package
9964 (name "python-cookies")
9965 (version "2.2.1")
9966 (source (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "cookies" version))
9969 (sha256
9970 (base32
9971 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9972 (build-system python-build-system)
9973 (arguments
9974 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9975 #:tests? #f))
9976 (native-inputs
9977 `(("python-pytest" ,python2-pytest)))
9978 (synopsis "HTTP cookie parser and renderer")
9979 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9980Python.")
9981 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9982 (license license:expat)))
603d665b
LF
9983
9984(define-public python2-cookies
f210e944 9985 (package-with-python2 python-cookies))
0efde7d6
LF
9986
9987(define-public python-responses
9988 (package
9989 (name "python-responses")
9990 (version "0.5.1")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "responses" version))
9994 (sha256
9995 (base32
9996 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9997 (build-system python-build-system)
9998 (arguments
9999 `(;; Test suite is not distributed:
10000 ;; https://github.com/getsentry/responses/issues/38
10001 #:tests? #f))
10002 (native-inputs
d8ea5f2f 10003 `(("python-mock" ,python-mock)))
0efde7d6
LF
10004 (propagated-inputs
10005 `(("python-requests" ,python-requests)
d8ea5f2f 10006 ("python-cookies" ,python-cookies)
0efde7d6
LF
10007 ("python-six" ,python-six)))
10008 (home-page "https://github.com/getsentry/responses")
10009 (synopsis "Utility for mocking out the `requests` Python library")
10010 (description "A utility library for mocking out the `requests` Python
10011library.")
f210e944 10012 (license license:asl2.0)))
0efde7d6
LF
10013
10014(define-public python2-responses
f210e944 10015 (package-with-python2 python-responses))
76b94885 10016
b7afd018
RW
10017(define-public python-whoosh
10018 (package
10019 (name "python-whoosh")
10020 (version "2.7.4")
10021 (source
10022 (origin
10023 (method url-fetch)
10024 (uri (pypi-uri "Whoosh" version))
10025 (sha256
10026 (base32
10027 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10028 (build-system python-build-system)
10029 (native-inputs
f3b98f4f 10030 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10031 (home-page "http://bitbucket.org/mchaput/whoosh")
10032 (synopsis "Full text indexing, search, and spell checking library")
10033 (description
10034 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10035checking library.")
10036 (license license:bsd-2)))
10037
10038(define-public python2-whoosh
10039 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10040 (package (inherit whoosh)
10041 (propagated-inputs
10042 `(("python2-backport-ssl-match-hostname"
10043 ,python2-backport-ssl-match-hostname)
10044 ,@(package-propagated-inputs whoosh))))))
10045
76b94885
LF
10046(define-public python-pathlib
10047 (package
10048 (name "python-pathlib")
10049 (version "1.0.1")
10050 (source (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "pathlib" version))
10053 (sha256
10054 (base32
10055 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10056 (build-system python-build-system)
92a312dc
RW
10057 ;; The tests depend on the internal "test" module, which does not provide
10058 ;; a stable interface.
10059 (arguments `(#:tests? #f))
76b94885 10060 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10061 (synopsis "Object-oriented file system paths")
10062 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10063It offers the following advantages over using string objects:
10064
10065@enumerate
10066@item No more cumbersome use of os and os.path functions. Everything can
10067be done easily through operators, attribute accesses, and method calls.
10068@item Embodies the semantics of different path types. For example,
10069comparing Windows paths ignores casing.
10070@item Well-defined semantics, eliminating any inconsistencies or
10071ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10072@end enumerate
10073
10074Note: In Python 3.4, pathlib is now part of the standard library. For other
10075Python versions please consider python-pathlib2 instead, which tracks the
10076standard library module. This module (python-pathlib) isn't maintained
10077anymore.")
76b94885
LF
10078 (license license:expat)))
10079
10080(define-public python2-pathlib
10081 (package-with-python2 python-pathlib))
25a7db0a 10082
b7703c81
HG
10083(define-public python2-pathlib2
10084 (package
10085 (name "python2-pathlib2")
10086 (version "2.1.0")
10087 (source (origin
10088 (method url-fetch)
10089 (uri (pypi-uri "pathlib2" version))
10090 (sha256
10091 (base32
10092 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10093 (build-system python-build-system)
49a531f5
HG
10094 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10095 ;; version is 3.4 which already includes this package as part of the
10096 ;; standard library.
b7703c81
HG
10097 (arguments
10098 `(#:python ,python-2))
10099 (native-inputs
f3b98f4f 10100 `(("python2-six" ,python2-six)))
b7703c81
HG
10101 (home-page "http://pypi.python.org/pypi/pathlib2/")
10102 (synopsis "Object-oriented file system paths - backport of standard
10103pathlib module")
10104 (description "The goal of pathlib2 is to provide a backport of standard
10105pathlib module which tracks the standard library module, so all the newest
10106features of the standard pathlib can be used also on older Python versions.
10107
10108Pathlib offers a set of classes to handle file system paths. It offers the
10109following advantages over using string objects:
10110
10111@enumerate
10112@item No more cumbersome use of os and os.path functions. Everything can
10113be done easily through operators, attribute accesses, and method calls.
10114@item Embodies the semantics of different path types. For example,
10115comparing Windows paths ignores casing.
10116@item Well-defined semantics, eliminating any inconsistencies or
10117ambiguities (forward vs. backward slashes, etc.).
10118@end enumerate")
10119 (license license:expat)))
10120
25a7db0a
LF
10121(define-public python-jellyfish
10122 (package
10123 (name "python-jellyfish")
8c4964dd 10124 (version "0.5.6")
25a7db0a
LF
10125 (source (origin
10126 (method url-fetch)
10127 (uri (pypi-uri "jellyfish" version))
10128 (sha256
10129 (base32
8c4964dd 10130 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10131 (build-system python-build-system)
10132 (native-inputs
10133 `(("python-pytest" ,python-pytest)))
10134 (home-page "https://github.com/jamesturk/jellyfish")
10135 (synopsis "Approximate and phonetic matching of strings")
10136 (description "Jellyfish uses a variety of string comparison and phonetic
10137encoding algorithms to do fuzzy string matching.")
3f641af0 10138 (license license:bsd-2)
25a7db0a
LF
10139 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10140
10141(define-public python2-jellyfish
10142 (let ((jellyfish (package-with-python2
10143 (strip-python2-variant python-jellyfish))))
10144 (package (inherit jellyfish)
00e10c6e 10145 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10146 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10147
10148(define-public python2-unicodecsv
10149 (package
10150 (name "python2-unicodecsv")
10151 (version "0.14.1")
10152 (source (origin
10153 (method url-fetch)
10154 ;; The test suite is not included in the PyPi release.
10155 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10156 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10157 "archive/" version ".tar.gz"))
10158 (file-name (string-append name "-" version ".tar.gz"))
10159 (sha256
10160 (base32
10161 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10162 (build-system python-build-system)
10163 (arguments
10164 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10165 #:python ,python-2))
10166 (native-inputs
f3b98f4f 10167 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10168 (home-page "https://github.com/jdunck/python-unicodecsv")
10169 (synopsis "Unicode CSV module for Python 2")
10170 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10171module, adding support for Unicode strings.")
3f641af0 10172 (license license:bsd-2)))
064503aa
LF
10173
10174(define-public python-rarfile
10175 (package
10176 (name "python-rarfile")
67824447 10177 (version "2.8")
064503aa
LF
10178 (source (origin
10179 (method url-fetch)
10180 (uri (pypi-uri "rarfile" version))
10181 (sha256
10182 (base32
67824447 10183 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10184 (build-system python-build-system)
10185 (arguments
10186 '(#:phases
10187 (modify-phases %standard-phases
10188 (replace 'check
10189 ;; Many tests fail, but the installation proceeds.
10190 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10191 (native-inputs
10192 `(("which" ,which))) ; required for tests
10193 (propagated-inputs
10194 `(("libarchive" ,libarchive)))
10195 (home-page "https://github.com/markokr/rarfile")
10196 (synopsis "RAR archive reader for Python")
10197 (description "This is Python module for RAR archive reading. The interface
10198is made as zipfile like as possible.")
3f641af0 10199 (license license:isc)))
064503aa
LF
10200
10201(define-public python2-rarfile
10202 (package-with-python2 python-rarfile))
daeeea71
CM
10203
10204(define-public python-magic
10205 (package
10206 (name "python-magic")
10207 (version "0.4.3")
10208 (source
10209 (origin
10210 (method url-fetch)
10211 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10212 version ".tar.gz"))
10213 (sha256
10214 (base32
10215 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10216 (file-name (string-append name "-" version "-checkout"))))
10217 (build-system python-build-system)
10218 (arguments
10219 ;; The tests are unreliable, so don't run them. The tests fail
10220 ;; under Python3 because they were written for Python2 and
10221 ;; contain import statements that do not work in Python3. One of
10222 ;; the tests fails under Python2 because its assertions are
10223 ;; overly stringent; it relies on comparing output strings which
10224 ;; are brittle and can change depending on the version of
10225 ;; libmagic being used and the system on which the test is
10226 ;; running. In my case, under GuixSD 0.10.0, only one test
10227 ;; failed, and it seems to have failed only because the version
10228 ;; of libmagic that is packaged in Guix outputs a slightly
10229 ;; different (but not wrong) string than the one that the test
10230 ;; expected.
10231 '(#:tests? #f
10232 #:phases (modify-phases %standard-phases
10233 ;; Replace a specific method call with a hard-coded
10234 ;; path to the necessary libmagic.so file in the
10235 ;; store. If we don't do this, then the method call
10236 ;; will fail to find the libmagic.so file, which in
10237 ;; turn will cause any application using
10238 ;; python-magic to fail.
10239 (add-before 'build 'hard-code-path-to-libmagic
10240 (lambda* (#:key inputs #:allow-other-keys)
10241 (let ((file (assoc-ref inputs "file")))
10242 (substitute* "magic.py"
10243 (("ctypes.util.find_library\\('magic'\\)")
10244 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10245 #t)))
10246 (add-before 'install 'disable-egg-compression
10247 (lambda _
10248 (let ((port (open-file "setup.cfg" "a")))
10249 (display "\n[easy_install]\nzip_ok = 0\n"
10250 port)
10251 (close-port port)
10252 #t))))))
daeeea71
CM
10253 (inputs
10254 ;; python-magic needs to be able to find libmagic.so.
10255 `(("file" ,file)))
10256 (home-page "https://github.com/ahupp/python-magic")
10257 (synopsis "File type identification using libmagic")
10258 (description
10259 "This module uses ctypes to access the libmagic file type
10260identification library. It makes use of the local magic database and
10261supports both textual and MIME-type output. Note that this module and
10262the python-file module both provide a \"magic.py\" file; these two
10263modules, which are different and were developed separately, both serve
10264the same purpose: to provide Python bindings for libmagic.")
10265 (license license:expat)))
10266
10267(define-public python2-magic
10268 (package-with-python2 python-magic))
12af303f
CM
10269
10270(define-public python2-s3cmd
10271 (package
10272 (name "python2-s3cmd")
10273 (version "1.6.1")
10274 (source
10275 (origin
10276 (method url-fetch)
de67e922 10277 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10278 "s3cmd-" version ".tar.gz"))
10279 (sha256
10280 (base32
10281 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10282 (build-system python-build-system)
10283 (arguments
10284 ;; s3cmd is written for python2 only and contains no tests.
10285 `(#:python ,python-2
10286 #:tests? #f))
f22efa01 10287 (propagated-inputs
12af303f
CM
10288 `(("python2-dateutil" ,python2-dateutil)
10289 ;; The python-file package also provides a magic.py module.
10290 ;; This is an unfortunate state of affairs; however, s3cmd
10291 ;; fails to install if it cannot find specifically the
10292 ;; python-magic package. Thus we include it, instead of using
10293 ;; python-file. Ironically, s3cmd sometimes works better
10294 ;; without libmagic bindings at all:
10295 ;; https://github.com/s3tools/s3cmd/issues/198
10296 ("python2-magic" ,python2-magic)))
10297 (home-page "http://s3tools.org/s3cmd")
10298 (synopsis "Command line tool for S3-compatible storage services")
10299 (description
10300 "S3cmd is a command line tool for uploading, retrieving and managing data
10301in storage services that are compatible with the Amazon Simple Storage
10302Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10303GnuPG encryption, and more. It also supports management of Amazon's
10304CloudFront content delivery network.")
3f641af0 10305 (license license:gpl2+)))
4323a5f0
AE
10306
10307(define-public python-pkgconfig
10308 (package
10309 (name "python-pkgconfig")
10310 (version "1.1.0")
10311 (source
10312 (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "pkgconfig" version))
10315 (sha256
10316 (base32
10317 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10318 (build-system python-build-system)
10319 (native-inputs
f3b98f4f 10320 `(("python-nose" ,python-nose)))
4323a5f0
AE
10321 (inputs
10322 `(("pkg-config" ,pkg-config)))
10323 (arguments
10324 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10325 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10326 #:tests? #f
4323a5f0
AE
10327 ;; Hard-code the path to pkg-config.
10328 #:phases
10329 (modify-phases %standard-phases
10330 (add-before
10331 'build 'patch
10332 (lambda _
10333 (substitute* "pkgconfig/pkgconfig.py"
10334 (("cmd = 'pkg-config")
10335 (string-append "cmd = '" (which "pkg-config"))))
10336 #t)))))
10337 (home-page "http://github.com/matze/pkgconfig")
10338 (synopsis "Python interface for pkg-config")
10339 (description "This module provides a Python interface to pkg-config. It
10340can be used to find all pkg-config packages, check if a package exists,
10341check if a package meets certain version requirements, query CFLAGS and
10342LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10343 (license license:expat)))
4323a5f0
AE
10344
10345(define-public python2-pkgconfig
10346 (package-with-python2 python-pkgconfig))
10347
2e697322
BW
10348(define-public python-bz2file
10349 (package
10350 (name "python-bz2file")
10351 (version "0.98")
10352 (source
10353 (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "bz2file" version))
10356 (sha256
10357 (base32
10358 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10359 (build-system python-build-system)
10360 (arguments
124df723 10361 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10362 (home-page "https://github.com/nvawda/bz2file")
10363 (synopsis "Read and write bzip2-compressed files")
10364 (description
10365 "Bz2file is a Python library for reading and writing bzip2-compressed
10366files. It contains a drop-in replacement for the I/O interface in the
10367standard library's @code{bz2} module, including features from the latest
10368development version of CPython that are not available in older releases.")
3f641af0 10369 (license license:asl2.0)
2e697322
BW
10370 (properties `((python2-variant . ,(delay python2-bz2file))))))
10371
10372(define-public python2-bz2file
10373 (let ((base (package-with-python2
10374 (strip-python2-variant python-bz2file))))
10375 (package
10376 (inherit base)
124df723 10377 (arguments
752bb447
BW
10378 `(#:python ,python-2
10379 #:phases
124df723
BW
10380 (modify-phases %standard-phases
10381 ;; 'python setup.py test' does not work as of 0.98.
10382 ;; There is only the one test file, so we run it directly.
10383 (replace 'check
10384 (lambda _ (zero? (system* "python"
10385 "test_bz2file.py"))))))))))
2e697322 10386
da4ac1aa
BW
10387(define-public python-future
10388 (package
10389 (name "python-future")
10390 (version "0.15.2")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "future" version))
10395 (sha256
10396 (base32
10397 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10398 (build-system python-build-system)
10399 ;; Many tests connect to the network or are otherwise flawed.
10400 ;; https://github.com/PythonCharmers/python-future/issues/210
10401 (arguments
10402 `(#:tests? #f))
10403 (home-page "http://python-future.org")
10404 (synopsis "Single-source support for Python 3 and 2")
10405 (description
10406 "@code{python-future} is the missing compatibility layer between Python 2 and
10407Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10408to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10409 (license license:expat)))
da4ac1aa
BW
10410
10411(define-public python2-future
f210e944 10412 (package-with-python2 python-future))
da4ac1aa 10413
8e451885
AE
10414(define-public python-cysignals
10415 (package
10416 (name "python-cysignals")
10417 (version "1.1.0")
10418 (source
10419 (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10422 (sha256
10423 (base32
10424 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10425 (build-system python-build-system)
10426 (native-inputs
10427 `(("python-cython" ,python-cython)
8e451885
AE
10428 ("python-sphinx" ,python-sphinx)))
10429 (inputs
10430 `(("pari-gp" ,pari-gp)))
10431 (arguments
10432 `(#:modules ((guix build python-build-system)
10433 ((guix build gnu-build-system) #:prefix gnu:)
10434 (guix build utils))
10435 ;; FIXME: Tests are executed after installation and currently fail
10436 ;; when not installing into standard locations; the author is working
10437 ;; on a fix.
10438 #:tests? #f
10439 #:phases
10440 (modify-phases %standard-phases
10441 (add-before
10442 'build 'configure
10443 (assoc-ref gnu:%standard-phases 'configure)))))
10444 (home-page
10445 "https://github.com/sagemath/cysignals")
10446 (synopsis
10447 "Handling of interrupts and signals for Cython")
10448 (description
10449 "The cysignals package provides mechanisms to handle interrupts (and
10450other signals and errors) in Cython code, using two related approaches,
10451for mixed Cython/Python code or external C libraries and pure Cython code,
10452respectively.")
3f641af0 10453 (license license:lgpl3+)))
8e451885
AE
10454
10455(define-public python2-cysignals
10456 (package-with-python2 python-cysignals))
10457
63bcec71
DM
10458(define-public python2-shedskin
10459 (package
10460 (name "python2-shedskin")
10461 (version "0.9.4")
10462 (source
10463 (origin
10464 (method url-fetch)
10465 (uri (string-append "https://github.com/shedskin/shedskin/"
10466 "releases/download/v" version
10467 "/shedskin-" version ".tgz"))
10468 (sha256
10469 (base32
10470 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10471 (build-system python-build-system)
10472 (arguments
10473 `(#:python ,python-2
10474 #:phases (modify-phases %standard-phases
10475 (add-after 'unpack 'fix-resulting-include-libs
10476 (lambda* (#:key inputs #:allow-other-keys)
10477 (let ((libgc (assoc-ref inputs "libgc"))
10478 (pcre (assoc-ref inputs "pcre")))
10479 (substitute* "shedskin/makefile.py"
10480 (("variable == 'CCFLAGS':[ ]*")
10481 (string-append "variable == 'CCFLAGS':\n"
10482 " line += ' -I " pcre "/include"
10483 " -I " libgc "/include'"))
10484 (("variable == 'LFLAGS':[ ]*")
10485 (string-append "variable == 'LFLAGS':\n"
10486 " line += ' -L" pcre "/lib"
10487 " -L " libgc "/lib'")))
10488 #t))))))
63bcec71
DM
10489 (inputs `(("pcre" ,pcre)
10490 ("libgc" ,libgc)))
10491 (home-page "https://shedskin.github.io/")
10492 (synopsis "Experimental Python-2 to C++ Compiler")
10493 (description (string-append "This is an experimental compiler for a subset of
10494Python. It generates C++ code and a Makefile."))
3f641af0 10495 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10496
10497(define-public python2-rope
10498 (package
10499 (name "python2-rope")
10500 (version "0.10.3")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "rope" version))
10505 (sha256
10506 (base32
10507 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10508 (arguments
10509 ;; Rope is currently python-2 only.
10510 ;; https://github.com/python-rope/rope/issues/57
10511 `(#:python ,python-2))
10512 (build-system python-build-system)
10513 (native-inputs
f3b98f4f 10514 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10515 (home-page "https://github.com/python-rope/rope")
10516 (synopsis "Refactoring library for Python")
10517 (description "Rope is a refactoring library for Python. It facilitates
10518the renaming, moving and extracting of attributes, functions, modules, fields
10519and parameters in Python 2 source code. These refactorings can also be applied
10520to occurences in strings and comments.")
3f641af0 10521 (license license:gpl2)))
6ba8ca17
10522
10523(define-public python-py3status
10524 (package
10525 (name "python-py3status")
d2262d70 10526 (version "3.1")
6ba8ca17
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "py3status" version))
10531 (sha256
10532 (base32
d2262d70 10533 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10534 (build-system python-build-system)
8653c1d5
MB
10535 (arguments
10536 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10537 (home-page "https://github.com/ultrabug/py3status")
10538 (synopsis "Extensible i3status wrapper written in Python")
10539 (description "py3status is an i3status wrapper which extends i3status
10540functionality in a modular way, allowing you to extend your panel with your
10541own code, responding to click events and updating clock every second.")
3f641af0 10542 (license license:bsd-3)))
b8fdbca3
HG
10543
10544(define-public python-tblib
10545 (package
10546 (name "python-tblib")
10547 (version "1.3.0")
10548 (source (origin
10549 (method url-fetch)
10550 (uri (pypi-uri "tblib" version))
10551 (sha256 (base32
10552 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10553 (build-system python-build-system)
10554 (arguments
10555 `(#:phases
10556 (modify-phases %standard-phases
10557 (replace 'check
10558 (lambda _
10559 ;; Upstream runs tests after installation and the package itself
10560 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10561 ;; found.
10562 (setenv "PYTHONPATH"
10563 (string-append (getcwd) "/build/lib:"
10564 (getenv "PYTHONPATH")))
10565 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10566 (native-inputs
10567 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10568 ("python-six" ,python-six)))
10569 (home-page "https://github.com/ionelmc/python-tblib")
10570 (synopsis "Traceback serialization library")
10571 (description
10572 "Traceback serialization allows you to:
10573
10574@enumerate
10575@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10576different processes. This allows better error handling when running code over
10577multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10578
10579@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10580@end enumerate\n")
3f641af0 10581 (license license:bsd-3)))
b8fdbca3
HG
10582
10583(define-public python2-tblib
10584 (package-with-python2 python-tblib))
1a024de4
HG
10585
10586(define-public python-sqlparse
10587 (package
10588 (name "python-sqlparse")
10589 (version "0.1.19")
10590 (source (origin
10591 (method url-fetch)
10592 (uri (pypi-uri "sqlparse" version))
10593 (sha256
10594 (base32
10595 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10596 (build-system python-build-system)
10597 (arguments
10598 `(#:phases
10599 (modify-phases %standard-phases
10600 (replace 'check
10601 (lambda* _
10602 ;; setup.py-integrated 2to3 only affects the build files, but
10603 ;; py.test is using the source files. So we need to convert them
10604 ;; manually.
10605 (when (zero? (system* "python3"))
10606 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10607 (zero? (system* "py.test")))))))
10608 (native-inputs
f3b98f4f 10609 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10610 (home-page "https://github.com/andialbrecht/sqlparse")
10611 (synopsis "Non-validating SQL parser")
10612 (description "Sqlparse is a non-validating SQL parser for Python. It
10613provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10614 (license license:bsd-3)))
1a024de4
HG
10615
10616(define-public python2-sqlparse
10617 (package-with-python2 python-sqlparse))
68b9d242
SB
10618
10619(define-public python-greenlet
10620 (package
10621 (name "python-greenlet")
1f89fb16 10622 (version "0.4.11")
68b9d242
SB
10623 (source (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "greenlet" version))
10626 (sha256
10627 (base32
1f89fb16 10628 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10629 (build-system python-build-system)
68b9d242
SB
10630 (home-page "https://greenlet.readthedocs.io/")
10631 (synopsis "Lightweight in-process concurrent programming")
10632 (description
10633 "Greenlet package is a spin-off of Stackless, a version of CPython
10634that supports micro-threads called \"tasklets\". Tasklets run
10635pseudo-concurrently (typically in a single or a few OS-level threads) and
10636are synchronized with data exchanges on \"channels\".")
3f641af0 10637 (license (list license:psfl license:expat))))
68b9d242
SB
10638
10639(define-public python2-greenlet
10640 (package-with-python2 python-greenlet))
d79a343b
SB
10641
10642(define-public python-gevent
10643 (package
10644 (name "python-gevent")
10645 (version "1.1.1")
10646 (source (origin
10647 (method url-fetch)
10648 (uri (pypi-uri "gevent" version))
10649 (sha256
10650 (base32
10651 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10652 (modules '((guix build utils)))
10653 (snippet
10654 '(begin
10655 ;; unbunding libev and c-ares
10656 (for-each delete-file-recursively '("libev" "c-ares"))
10657 ;; fixing testsuite
10658 (call-with-output-file "greentest/__init__.py" noop)
10659 (substitute* "greentest/testrunner.py"
10660 (("import util") "from . import util")
10661 (("from util import log") "from .util import log"))))))
10662 (build-system python-build-system)
10663 (propagated-inputs
10664 `(("python-greenlet" ,python-greenlet)))
10665 (native-inputs
f3b98f4f 10666 `(("python-six" ,python-six)))
d79a343b
SB
10667 (inputs
10668 `(("c-ares" ,c-ares)
10669 ("libev" ,libev)))
10670 (home-page "http://www.gevent.org/")
10671 (synopsis "Coroutine-based network library")
10672 (description
10673 "gevent is a coroutine-based Python networking library that uses greenlet
10674to provide a high-level synchronous API on top of the libev event loop.")
10675 (license license:expat)))
10676
10677(define-public python2-gevent
10678 (package-with-python2 python-gevent))
da3aeeb6 10679
c9a18125
MB
10680(define-public python-geventhttpclient
10681 (package
10682 (name "python-geventhttpclient")
10683 (version "1.3.1")
10684 (source (origin
10685 (method url-fetch)
10686 (uri (pypi-uri "geventhttpclient" version))
10687 (sha256
10688 (base32
10689 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10690 (modules '((guix build utils)))
10691 (snippet
10692 '(begin
10693 ;; Delete pre-compiled files.
10694 (for-each delete-file (find-files "src/geventhttpclient"
10695 ".*\\.pyc"))
10696 #t))))
10697 (build-system python-build-system)
10698 (arguments
10699 '(#:phases
10700 (modify-phases %standard-phases
10701 (add-after 'unpack 'delete-network-tests
10702 (lambda _
10703 (delete-file "src/geventhttpclient/tests/test_client.py")
10704 #t))
10705 (delete 'check)
10706 (add-after 'install 'check
10707 (lambda* (#:key inputs outputs #:allow-other-keys)
10708 (add-installed-pythonpath inputs outputs)
10709 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10710 (native-inputs
10711 `(("python-pytest" ,python-pytest)))
10712 (propagated-inputs
10713 `(("python-certifi" ,python-certifi)
10714 ("python-gevent" ,python-gevent)
10715 ("python-six" ,python-six)))
10716 (home-page "https://github.com/gwik/geventhttpclient")
10717 (synopsis "HTTP client library for gevent")
10718 (description "@code{python-geventhttpclient} is a high performance,
10719concurrent HTTP client library for python using @code{gevent}.")
10720 (license license:expat)))
10721
10722(define-public python2-geventhttpclient
10723 (package-with-python2 python-geventhttpclient))
10724
b585e361
DM
10725(define-public python-fastimport
10726 (package
10727 (name "python-fastimport")
10728 (version "0.9.6")
10729 (source
10730 (origin
10731 (method url-fetch)
10732 (uri (pypi-uri "fastimport" version))
10733 (sha256
10734 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10735 (build-system python-build-system)
10736 (home-page "https://github.com/jelmer/python-fastimport")
10737 (synopsis "VCS fastimport parser and generator in Python")
10738 (description "This package provides a parser for and generator of the Git
10739@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10740format.")
10741 (license license:gpl2+)))
10742
10743(define-public python2-fastimport
10744 (package-with-python2 python-fastimport))
10745
da3aeeb6
SB
10746(define-public python-twisted
10747 (package
10748 (name "python-twisted")
10749 (version "16.2.0")
10750 (source (origin
10751 (method url-fetch)
8ea8e8d3 10752 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10753 (sha256
10754 (base32
10755 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10756 (build-system python-build-system)
a960e73f
MB
10757 (arguments
10758 '(#:tests? #f)) ; FIXME: Some tests are failing.
10759 ;; #:phases
10760 ;; (modify-phases %standard-phases
10761 ;; (replace 'check
10762 ;; (lambda _
10763 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10764 (propagated-inputs
10765 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10766 (home-page "https://twistedmatrix.com/")
10767 (synopsis "Asynchronous networking framework written in Python")
10768 (description
10769 "Twisted is an extensible framework for Python programming, with special
10770focus on event-based network programming and multiprotocol integration.")
10771 (license license:expat)))
10772
10773(define-public python2-twisted
10774 (package-with-python2 python-twisted))
d0b6fed6 10775
4d3fa5a4
EF
10776(define-public python-pika
10777 (package
10778 (name "python-pika")
10779 (version "0.10.0")
10780 (source
10781 (origin
10782 (method url-fetch)
10783 (uri (pypi-uri "pika" version))
10784 (sha256
10785 (base32
10786 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10787 (build-system python-build-system)
10788 (native-inputs
269d9172
LF
10789 `(("python-pyev" ,python-pyev)
10790 ("python-tornado" ,python-tornado)
10791 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10792 (home-page "https://pika.readthedocs.org")
10793 (synopsis "Pure Python AMQP Client Library")
10794 (description
10795 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10796Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10797network support library.")
10798 (license license:bsd-3)))
10799
10800(define-public python2-pika
10801 (package-with-python2 python-pika))
10802
d0b6fed6
DM
10803(define-public python-ply
10804 (package
10805 (name "python-ply")
234ade2d 10806 (version "3.9")
d0b6fed6
DM
10807 (source
10808 (origin
10809 (method url-fetch)
234ade2d 10810 (uri (pypi-uri "ply" version))
d0b6fed6
DM
10811 (sha256
10812 (base32
234ade2d 10813 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
10814 (build-system python-build-system)
10815 (home-page "http://www.dabeaz.com/ply/")
10816 (synopsis "Python Lex & Yacc")
10817 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10818It uses LR parsing and does extensive error checking.")
f210e944 10819 (license license:bsd-3)))
d0b6fed6
DM
10820
10821(define-public python2-ply
f210e944 10822 (package-with-python2 python-ply))
d951bd54
SB
10823
10824(define-public python-tabulate
10825 (package
10826 (name "python-tabulate")
e6ace98d 10827 (version "0.7.7")
d951bd54
SB
10828 (source (origin
10829 (method url-fetch)
10830 (uri (pypi-uri "tabulate" version))
10831 (sha256
10832 (base32
fe2ba3a8 10833 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 10834 (build-system python-build-system)
fe2ba3a8
MB
10835 (arguments
10836 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10837 ;; and the latest release is not tagged in the upstream repository.
10838 '(#:tests? #f))
d951bd54
SB
10839 (home-page "https://bitbucket.org/astanin/python-tabulate")
10840 (synopsis "Pretty-print tabular data")
10841 (description
10842 "Tabulate is a library and command-line utility to pretty-print tabular
10843data in Python.")
10844 (license license:expat)))
10845
10846(define-public python2-tabulate
10847 (package-with-python2 python-tabulate))
1c4c8a33
SB
10848
10849(define-public python-kazoo
10850 (package
10851 (name "python-kazoo")
10852 (version "2.2.1")
10853 (source
10854 (origin
10855 (method url-fetch)
10856 (uri (pypi-uri "kazoo" version))
10857 (sha256
10858 (base32
10859 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10860 (build-system python-build-system)
10861 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10862 (propagated-inputs
10863 `(("python-six" ,python-six)))
1c4c8a33
SB
10864 (home-page "https://kazoo.readthedocs.org")
10865 (synopsis "High-level Zookeeper client library")
10866 (description
10867 "Kazoo is a Python client library for the Apache Zookeeper distributed
10868application service. It is designed to be easy to use and to avoid common
10869programming errors.")
3f641af0 10870 (license license:asl2.0)))
1c4c8a33
SB
10871
10872(define-public python2-kazoo
10873 (package-with-python2 python-kazoo))
45dda35e
SB
10874
10875(define-public python-pykafka
10876 (package
10877 (name "python-pykafka")
10878 (version "2.4.0")
10879 (source (origin
10880 (method url-fetch)
c6bccf71
EF
10881 (uri (string-append
10882 "https://pypi.python.org/packages/8b/3e/"
10883 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10884 "pykafka-" version ".tar.gz"))
45dda35e
SB
10885 (sha256
10886 (base32
10887 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10888 (build-system python-build-system)
10889 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10890 (propagated-inputs
45dda35e
SB
10891 `(("python-gevent" ,python-gevent)
10892 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10893 ("python-tabulate" ,python-tabulate)))
10894 (inputs
10895 `(("librdkafka" ,librdkafka)))
10896 (home-page "https://pykafka.readthedocs.io/")
10897 (synopsis "Apache Kafka client for Python")
10898 (description
10899 "PyKafka is a client for the Apache Kafka distributed messaging system.
10900It includes Python implementations of Kafka producers and consumers, which
10901are optionally backed by a C extension built on librdkafka.")
3f641af0 10902 (license license:asl2.0)))
45dda35e
SB
10903
10904(define-public python2-pykafka
10905 (package-with-python2 python-pykafka))
a44fd439
DM
10906
10907(define-public python-wcwidth
10908 (package
10909 (name "python-wcwidth")
10910 (version "0.1.6")
10911 (source
10912 (origin
10913 (method url-fetch)
10914 (uri (string-append
10915 "https://pypi.python.org/packages/"
10916 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10917 "wcwidth-" version ".tar.gz"))
10918 (sha256
10919 (base32
10920 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10921 (build-system python-build-system)
10922 (home-page "https://github.com/jquast/wcwidth")
66e07664 10923 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10924 (description "Wcwidth measures the number of terminal column cells of
10925wide-character codes. It is useful for those implementing a terminal emulator,
10926or programs that carefully produce output to be interpreted by one. It is a
10927Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10928specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10929 (license license:expat)))
a44fd439
DM
10930
10931(define-public python2-wcwidth
f210e944 10932 (package-with-python2 python-wcwidth))
0de78c95
DP
10933
10934(define-public python2-jsonrpclib
10935 (package
10936 (name "python2-jsonrpclib")
10937 (version "0.1.7")
10938 (source (origin
10939 (method url-fetch)
10940 (uri (string-append
10941 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10942 "jsonrpclib-" version ".tar.gz"))
10943 (sha256
10944 (base32
10945 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10946 (build-system python-build-system)
0de78c95
DP
10947 (arguments
10948 `(#:tests? #f
10949 #:python ,python-2))
10950 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10951 (synopsis "Implementation of JSON-RPC specification for Python")
10952 (description
10953 "This library is an implementation of the JSON-RPC specification.
10954It supports both the original 1.0 specification, as well as the
10955new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10956etc.")
3f641af0 10957 (license license:asl2.0)))
9250b0f3
SB
10958
10959(define-public python-chai
10960 (package
10961 (name "python-chai")
10962 (version "1.1.1")
10963 (source (origin
10964 (method url-fetch)
10965 (uri (pypi-uri "chai" version))
10966 (sha256
10967 (base32
10968 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10969 (build-system python-build-system)
9250b0f3
SB
10970 (home-page "https://github.com/agoragames/chai")
10971 (synopsis "Mocking framework for Python")
10972 (description
10973 "Chai provides an api for mocking, stubbing and spying your python
10974objects, patterned after the Mocha library for Ruby.")
3f641af0 10975 (license license:bsd-3)))
9250b0f3
SB
10976
10977(define-public python2-chai
10978 (package-with-python2 python-chai))
10979
ae43baa8
SB
10980(define-public python-arrow
10981 (package
10982 (name "python-arrow")
10983 (version "0.8.0")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "arrow" version))
10987 (sha256
10988 (base32
10989 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10990 (build-system python-build-system)
10991 (native-inputs
f3b98f4f 10992 `(;; For testing
ae43baa8
SB
10993 ("python-chai" ,python-chai)
10994 ("python-simplejson" ,python-simplejson)))
36aed736 10995 (propagated-inputs
22d7360b 10996 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
10997 (home-page "https://github.com/crsmithdev/arrow/")
10998 (synopsis "Dates and times for Python")
10999 (description
11000 "Arrow is a Python library to creating, manipulating, formatting and
11001converting dates, times, and timestamps. It implements and updates the
11002datetime type.")
3f641af0 11003 (license license:asl2.0)))
ae43baa8
SB
11004
11005(define-public python2-arrow
11006 (package-with-python2 python-arrow))
11007
1f2b62a4
SB
11008(define-public python-inflection
11009 (package
11010 (name "python-inflection")
11011 (version "0.3.1")
11012 (source
11013 (origin (method url-fetch)
11014 (uri (pypi-uri "inflection" version))
11015 (sha256
11016 (base32
11017 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11018 (build-system python-build-system)
e9127525
MB
11019 (native-inputs
11020 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
11021 (home-page "http://github.com/jpvanhal/inflection")
11022 (synopsis "Python string transformation library")
11023 (description
11024 "Inflection is a string transformation library. It singularizes
11025and pluralizes English words, and transforms strings from CamelCase to
11026underscored string.")
11027 (license license:expat)))
11028
11029(define-public python2-inflection
11030 (package-with-python2 python-inflection))
11031
18995566
SB
11032(define-public python-pylev
11033 (package
11034 (name "python-pylev")
11035 (version "1.3.0")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "pylev" version))
11039 (sha256
11040 (base32
11041 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11042 (build-system python-build-system)
18995566
SB
11043 (home-page "http://github.com/toastdriven/pylev")
11044 (synopsis "Levenshtein distance implementation in Python")
11045 (description "Pure Python Levenshtein implementation, based off the
11046Wikipedia code samples at
11047@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11048 (license license:bsd-3)))
18995566
SB
11049
11050(define-public python2-pylev
11051 (package-with-python2 python-pylev))
11052
f5deff7a
SB
11053(define-public python-cleo
11054 (package
11055 (name "python-cleo")
11056 (version "0.4.1")
11057 (source (origin
11058 (method url-fetch)
11059 (uri (pypi-uri "cleo" version))
11060 (sha256
11061 (base32
11062 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11063 (build-system python-build-system)
11064 (native-inputs
f3b98f4f 11065 `(;; For testing
f5deff7a
SB
11066 ("python-mock" ,python-mock)
11067 ("python-pytest" ,python-pytest)))
9403150a
SB
11068 (propagated-inputs
11069 `(("python-psutil" ,python-psutil)
11070 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11071 (home-page "https://github.com/sdispater/cleo")
11072 (synopsis "Command-line arguments library for Python")
11073 (description
11074 "Cleo allows you to create command-line commands with signature in
11075docstring and colored output.")
11076 (license license:expat)))
11077
11078(define-public python2-cleo
11079 (package-with-python2 python-cleo))
11080
77cadb43
SB
11081(define-public python-lazy-object-proxy
11082 (package
11083 (name "python-lazy-object-proxy")
11084 (version "1.2.2")
11085 (source (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "lazy-object-proxy" version))
11088 (sha256
11089 (base32
11090 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11091 (build-system python-build-system)
77cadb43
SB
11092 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11093 (synopsis "Lazy object proxy for python")
11094 (description
11095 "Lazy object proxy is an object that wraps a callable but defers the call
11096until the object is actually required, and caches the result of said call.")
3f641af0 11097 (license license:bsd-2)))
77cadb43
SB
11098
11099(define-public python2-lazy-object-proxy
11100 (package-with-python2 python-lazy-object-proxy))
11101
5477e05f
SB
11102(define-public python-dnspython
11103 (package
11104 (name "python-dnspython")
6c514128 11105 (version "1.15.0")
5477e05f
SB
11106 (source (origin
11107 (method url-fetch)
11108 (uri (string-append "http://www.dnspython.org/kits/"
11109 version "/dnspython-" version ".tar.gz"))
11110 (sha256
11111 (base32
6c514128 11112 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11113 (build-system python-build-system)
11114 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11115 (home-page "http://www.dnspython.org")
11116 (synopsis "DNS toolkit for Python")
11117 (description
11118 "dnspython is a DNS toolkit for Python. It supports almost all record
11119types. It can be used for queries, zone transfers, and dynamic updates.
11120It supports TSIG authenticated messages and EDNS0.")
11121 (license license:expat)))
11122
11123(define-public python2-dnspython
11124 (package-with-python2 python-dnspython))
11125
22711e25
SB
11126(define-public python-email-validator
11127 (package
11128 (name "python-email-validator")
b165c215 11129 (version "1.0.2")
22711e25
SB
11130 (source
11131 (origin (method url-fetch)
11132 (uri (pypi-uri "email_validator" version))
11133 (sha256
11134 (base32
b165c215 11135 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11136 (build-system python-build-system)
11137 (arguments
11138 '(#:phases
11139 (modify-phases %standard-phases
11140 (add-before 'build 'use-dnspython
11141 (lambda _
11142 (substitute* "setup.py"
11143 (("dnspython3") "dnspython"))
11144 #t)))))
d42560bd 11145 (propagated-inputs
22711e25 11146 `(("python-dnspython" ,python-dnspython)
d42560bd 11147 ("python-idna" ,python-idna)))
22711e25
SB
11148 (home-page "https://github.com/JoshData/python-email-validator")
11149 (synopsis "Email address validation library for Python")
11150 (description
11151 "This library validates email address syntax and deliverability.")
3f641af0 11152 (license license:cc0)))
22711e25
SB
11153
11154(define-public python2-email-validator
11155 (package-with-python2 python-email-validator))
11156
8987d91e
SB
11157(define-public python-ukpostcodeparser
11158 (package
11159 (name "python-ukpostcodeparser")
11160 (version "1.0.3")
11161 (source (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "UkPostcodeParser" version))
11164 (sha256
11165 (base32
11166 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11167 (build-system python-build-system)
8987d91e
SB
11168 (home-page "https://github.com/hamstah/ukpostcodeparser")
11169 (synopsis "UK Postcode parser for Python")
11170 (description
11171 "This library provides the @code{parse_uk_postcode} function for
11172parsing UK postcodes.")
11173 (license license:expat)))
11174
11175(define-public python2-ukpostcodeparser
11176 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
11177
11178(define-public python-fake-factory
11179 (package
11180 (name "python-fake-factory")
7adc698f 11181 (version "0.7.2")
ea92ae01
SB
11182 (source (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "fake-factory" version))
11185 (sha256
11186 (base32
7adc698f 11187 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 11188 (build-system python-build-system)
b7f3ea95
MB
11189 (arguments
11190 '(#:phases
11191 (modify-phases %standard-phases
11192 (replace 'check
11193 (lambda _
11194 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11195 (native-inputs
f3b98f4f 11196 `(;; For testing
ea92ae01
SB
11197 ("python-email-validator" ,python-email-validator)
11198 ("python-mock" ,python-mock)
11199 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11200 (propagated-inputs
22d7360b 11201 `(("python-dateutil" ,python-dateutil)
bbcd7297 11202 ("python-six" ,python-six)))
7adc698f 11203 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11204 (synopsis "Python package that generates fake data")
11205 (description
11206 "Faker is a Python package that generates fake data such as names,
11207addresses, and phone numbers.")
11208 (license license:expat)
11209 (properties `((python2-variant . ,(delay python2-fake-factory))))))
11210
11211(define-public python2-fake-factory
11212 (let ((base (package-with-python2 (strip-python2-variant
11213 python-fake-factory))))
11214 (package
11215 (inherit base)
24c9aa18 11216 (propagated-inputs
ea92ae01 11217 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11218 ,@(package-propagated-inputs base))))))
ea92ae01 11219
b49504fd
SB
11220(define-public python-pyaml
11221 (package
11222 (name "python-pyaml")
11223 (version "15.8.2")
11224 (source (origin
11225 (method url-fetch)
11226 (uri (pypi-uri "pyaml" version))
11227 (sha256
11228 (base32
11229 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11230 (build-system python-build-system)
f620311a
MB
11231 (native-inputs
11232 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11233 (propagated-inputs
11234 `(("python-pyyaml" ,python-pyyaml)))
11235 (home-page "https://github.com/mk-fg/pretty-yaml")
11236 (synopsis "YAML pretty-print library for Python")
11237 (description
11238 "pyaml is a PyYAML based python module to produce pretty and readable
11239YAML-serialized data.")
3f641af0 11240 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11241
11242(define-public python2-pyaml
11243 (package-with-python2 python-pyaml))
11244
347175a2
SB
11245(define-public python-flexmock
11246 (package
11247 (name "python-flexmock")
11248 (version "0.10.2")
11249 (source (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "flexmock" version))
11252 (sha256
11253 (base32
11254 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11255 (build-system python-build-system)
347175a2
SB
11256 (home-page "https://flexmock.readthedocs.org")
11257 (synopsis "Testing library for Python")
11258 (description
11259 "flexmock is a testing library for Python that makes it easy to create
11260mocks, stubs and fakes.")
3f641af0 11261 (license license:bsd-3)))
347175a2
SB
11262
11263(define-public python2-flexmock
11264 (package-with-python2 python-flexmock))
11265
5a744191
SB
11266(define-public python-orator
11267 (package
11268 (name "python-orator")
11269 (version "0.8.2")
11270 (source (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "orator" version))
11273 (sha256
11274 (base32
11275 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11276 (build-system python-build-system)
11277 (arguments '(#:tests? #f)) ; no tests
b2676030 11278 (propagated-inputs
5a744191
SB
11279 `(("python-arrow" ,python-arrow)
11280 ("python-blinker" ,python-blinker)
11281 ("python-cleo" ,python-cleo)
11282 ("python-fake-factory" ,python-fake-factory)
11283 ("python-inflection" ,python-inflection)
11284 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11285 ("python-pyaml" ,python-pyaml)
5a744191
SB
11286 ("python-simplejson" ,python-simplejson)
11287 ("python-wrapt" ,python-wrapt)))
11288 (home-page "https://orator-orm.com/")
11289 (synopsis "ActiveRecord ORM for Python")
11290 (description
11291 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11292implementation for Python.")
11293 (license license:expat)
11294 (properties `((python2-variant . ,(delay python2-orator))))))
11295
11296(define-public python2-orator
11297 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11298 (package
11299 (inherit base)
06961617 11300 (propagated-inputs
5a744191 11301 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11302 ,@(package-propagated-inputs base))))))
f4155188
DM
11303
11304(define-public python-prompt-toolkit
11305 (package
11306 (name "python-prompt-toolkit")
6a34f4cc 11307 (version "1.0.9")
f4155188
DM
11308 (source
11309 (origin
11310 (method url-fetch)
d15e2ef0 11311 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11312 (sha256
11313 (base32
6a34f4cc 11314 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11315 (build-system python-build-system)
bae18710
LF
11316 (arguments
11317 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11318 (propagated-inputs
11319 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11320 ("python-six" ,python-six)
f22efa01 11321 ("python-pygments" ,python-pygments)))
f4155188
DM
11322 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11323 (synopsis "Library for building command line interfaces in Python")
11324 (description
11325 "Prompt-Toolkit is a library for building interactive command line
11326interfaces in Python. It's like GNU Readline but it also features syntax
11327highlighting while typing, out-of-the-box multi-line input editing, advanced
11328code completion, incremental search, support for Chinese double-width
11329characters, mouse support, and auto suggestions.")
f210e944 11330 (license license:bsd-3)))
f4155188
DM
11331
11332(define-public python2-prompt-toolkit
f210e944 11333 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11334
11335(define-public python-jedi
11336 (package
11337 (name "python-jedi")
11338 (version "0.9.0")
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "jedi" version))
11343 (sha256
11344 (base32
11345 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11346 (build-system python-build-system)
bfce8a34
MB
11347 (arguments
11348 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11349 '(#:tests? #f))
11350 (native-inputs
11351 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11352 (home-page "https://github.com/davidhalter/jedi")
11353 (synopsis
11354 "Autocompletion for Python that can be used for text editors")
11355 (description
11356 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11357 (license license:expat)))
a502dfbf
DM
11358
11359(define-public python2-jedi
f210e944 11360 (package-with-python2 python-jedi))
c2f0dc6e
DM
11361
11362(define-public ptpython
11363 (package
11364 (name "ptpython")
11365 (version "0.34")
11366 (source (origin
11367 (method url-fetch)
11368 (uri (pypi-uri "ptpython" version))
11369 (sha256
11370 (base32
11371 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11372 (build-system python-build-system)
32955348
MB
11373 (arguments
11374 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11375 (propagated-inputs
c2f0dc6e
DM
11376 `(("python-docopt" ,python-docopt)
11377 ("python-jedi" ,python-jedi)
11378 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11379 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11380 (home-page "https://github.com/jonathanslenders/ptpython")
11381 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11382 (description
11383 "ptpython is a Python read-eval-print loop with IDE-like features.
11384It supports syntax highlighting, multiline editing, autocompletion, mouse,
11385color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11386etc.")
3f641af0 11387 (license license:bsd-3)
c2f0dc6e
DM
11388 (properties `((python2-variant . ,(delay ptpython-2))))))
11389
11390(define-public ptpython-2
11391 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11392 (package
11393 (inherit base)
11394 (name "ptpython2"))))
b227f0be 11395
b04a52a6
DJ
11396(define-public python-requests-oauthlib
11397 (package
11398 (name "python-requests-oauthlib")
11399 (version "0.6.2")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "requests-oauthlib" version))
11404 (sha256
11405 (base32
11406 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11407 (build-system python-build-system)
11408 (arguments
11409 `(#:phases
11410 (modify-phases %standard-phases
11411 ;; removes tests that require network access
11412 (add-before 'check 'pre-check
11413 (lambda _
11414 (delete-file "tests/test_core.py")
11415 #t)))))
11416 (native-inputs
11417 `(("python-requests-mock" ,python-requests-mock)
11418 ("python-mock" ,python-mock)))
f22efa01 11419 (propagated-inputs
b04a52a6
DJ
11420 `(("python-oauthlib" ,python-oauthlib)
11421 ("python-requests" ,python-requests)))
11422 (home-page
11423 "https://github.com/requests/requests-oauthlib")
11424 (synopsis
11425 "OAuthlib authentication support for Requests")
11426 (description
11427 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11428provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11429 (license license:isc)))
b04a52a6
DJ
11430
11431(define-public python2-requests-oauthlib
f210e944 11432 (package-with-python2 python-requests-oauthlib))
b04a52a6 11433
b227f0be 11434(define-public python-stem
11435 (package
11436 (name "python-stem")
0bb1c35a 11437 (version "1.5.4")
b227f0be 11438 (source
11439 (origin
11440 (method url-fetch)
c976b319 11441 (uri (pypi-uri "stem" version))
b227f0be 11442 (sha256
11443 (base32
0bb1c35a 11444 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11445 (build-system python-build-system)
11446 (arguments
11447 `(#:phases
11448 (modify-phases %standard-phases
11449 (replace 'check
11450 (lambda _
11451 (zero? (system* "./run_tests.py" "--unit")))))))
11452 (native-inputs
11453 `(("python-mock" ,python-mock)
11454 ("python-pep8" ,python-pep8)
11455 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11456 (home-page "https://stem.torproject.org/")
11457 (synopsis
11458 "Python controller library that allows applications to interact with Tor")
11459 (description
11460 "Stem is a Python controller library for Tor. With it you can use Tor's
11461control protocol to script against the Tor process and read descriptor data
11462relays publish about themselves.")
3f641af0 11463 (license license:lgpl3)))
b227f0be 11464
11465(define-public python2-stem
11466 (package-with-python2 python-stem))
517a6c0c
DM
11467
11468(define-public python-pyserial
11469 (package
11470 (name "python-pyserial")
11471 (version "3.1.1")
11472 (source
11473 (origin
11474 (method url-fetch)
11475 (uri (pypi-uri "pyserial" version))
11476 (sha256
11477 (base32
11478 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11479 (build-system python-build-system)
0a702009
MB
11480 (arguments
11481 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11482 ;; #:phases
11483 ;; (modify-phases %standard-phases
11484 ;; (replace 'check
11485 ;; (lambda _
11486 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11487 (home-page
11488 "https://github.com/pyserial/pyserial")
11489 (synopsis "Python Serial Port Bindings")
11490 (description "@code{pyserial} provide serial port bindings for Python. It
11491supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11492and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11493 (license license:bsd-3)))
517a6c0c
DM
11494
11495(define-public python2-pyserial
f210e944 11496 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11497
11498(define-public python-kivy
11499 (package
11500 (name "python-kivy")
11501 (version "1.9.1")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "kivy" version))
11506 (file-name (string-append name "-" version ".tar.gz"))
11507 (sha256
11508 (base32
11509 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11510 (build-system python-build-system)
11511 (arguments
11512 `(#:tests? #f ; Tests require many optional packages
11513 #:phases
11514 (modify-phases %standard-phases
11515 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11516 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11517 (lambda* (#:key inputs #:allow-other-keys)
11518 (setenv "KIVY_SDL2_PATH"
11519 (string-append (assoc-ref inputs "sdl-union")
11520 "/include/SDL2"))
11521 #t)))))
11522 (native-inputs
f2516de2
HG
11523 `(("pkg-config" ,pkg-config)
11524 ("python-cython" ,python-cython)))
6eb7af2a 11525 (inputs
f2516de2 11526 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11527 ("mesa" ,mesa)
11528 ("sdl-union"
11529 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11530 (home-page "http://kivy.org")
11531 (synopsis
11532 "Multitouch application framework")
11533 (description
11534 "A software library for rapid development of
11535hardware-accelerated multitouch applications.")
11536 (license license:expat)))
11537
11538(define-public python2-kivy
11539 (package-with-python2 python-kivy))
11540
11541(define-public python-kivy-next
11542 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11543 (revision "1"))
11544 (package (inherit python-kivy)
11545 (name "python-kivy-next")
d80a71eb 11546 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11547 (string-take commit 7)))
11548 (source
11549 (origin
11550 (method git-fetch)
11551 (uri (git-reference
11552 (url "https://github.com/kivy/kivy")
11553 (commit commit)))
11554 (file-name (string-append name "-" version "-checkout"))
11555 (sha256
11556 (base32
11557 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11558
11559(define-public python2-kivy-next
11560 (package-with-python2 python-kivy-next))
8794bd8b
DC
11561
11562(define-public python-binaryornot
11563 (package
11564 (name "python-binaryornot")
11565 (version "0.4.0")
11566 (source (origin
11567 (method url-fetch)
11568 (uri (pypi-uri "binaryornot" version))
11569 (sha256
11570 (base32
11571 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11572 (build-system python-build-system)
f22efa01 11573 (propagated-inputs
8794bd8b
DC
11574 `(("python-chardet" ,python-chardet)
11575 ("python-hypothesis" ,python-hypothesis)))
11576 (home-page "https://github.com/audreyr/binaryornot")
11577 (synopsis "Package to check if a file is binary or text")
11578 (description "Ultra-lightweight pure Python package to check if a file is
11579binary or text.")
11580 (license license:bsd-3)
11581 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11582
11583(define-public python2-binaryornot
11584 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11585 (package (inherit base)
f22efa01 11586 (propagated-inputs
8794bd8b 11587 `(("python2-enum34" ,python2-enum34)
f22efa01 11588 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11589
11590(define-public python-nltk
11591 (package
11592 (name "python-nltk")
11593 (version "3.2.1")
11594 (source (origin
11595 (method url-fetch)
11596 (uri (pypi-uri "nltk" version))
11597 (sha256
11598 (base32
11599 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11600 (build-system python-build-system)
59f12985
LF
11601 (arguments
11602 '(;; The tests require some extra resources to be downloaded.
11603 ;; TODO Try packaging these resources.
11604 #:tests? #f))
a9ac982a
DC
11605 (home-page "http://nltk.org/")
11606 (synopsis "Natural Language Toolkit")
11607 (description "It provides interfaces to over 50 corpora and lexical
11608resources such as WordNet, along with a suite of text processing libraries
11609for classification, tokenization, stemming, tagging, parsing, and semantic
11610reasoning, wrappers for natural language processing libraries.")
f210e944 11611 (license license:asl2.0)))
a9ac982a
DC
11612
11613(define-public python2-nltk
f210e944 11614 (package-with-python2 python-nltk))
691cd90d
DC
11615
11616(define-public python-pymongo
11617 (package
11618 (name "python-pymongo")
11619 (version "3.3.0")
11620 (source (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "pymongo" version))
11623 (sha256
11624 (base32
11625 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11626 (build-system python-build-system)
f22efa01 11627 (propagated-inputs
691cd90d
DC
11628 `(("python-certifi" ,python-certifi)))
11629 (home-page "http://github.com/mongodb/mongo-python-driver")
11630 (synopsis "Python driver for MongoDB")
11631 (description "Python driver for MongoDB.")
f210e944 11632 (license license:asl2.0)))
691cd90d
DC
11633
11634(define-public python2-pymongo
f210e944 11635 (package-with-python2 python-pymongo))
6a6c9d43
DC
11636
11637(define-public python-sh
11638 (package
11639 (name "python-sh")
11640 (version "1.11")
11641 (source (origin
11642 (method url-fetch)
11643 (uri (pypi-uri "sh" version))
11644 (sha256
11645 (base32
11646 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11647 (build-system python-build-system)
11648 (arguments
11649 `(#:tests? #f)) ; no tests
11650 (home-page "https://github.com/amoffat/sh")
11651 (synopsis "Python subprocess interface")
11652 (description "Abstracts process invocation by providing a function
11653interface for programs.")
f210e944 11654 (license license:expat)))
6a6c9d43
DC
11655
11656(define-public python2-sh
f210e944 11657 (package-with-python2 python-sh))
05b59190 11658
25702397
EF
11659(define-public python-consul
11660 (package
11661 (name "python-consul")
11662 (version "0.6.1")
11663 (source
11664 (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "python-consul" version))
11667 (sha256
11668 (base32
11669 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11670 (build-system python-build-system)
11671 (native-inputs
fd1d6de7
HG
11672 `(("python-pytest" ,python-pytest)))
11673 (propagated-inputs
11674 `(("python-requests" ,python-requests)
25702397
EF
11675 ("python-six" ,python-six)))
11676 (home-page "https://github.com/cablehead/python-consul")
11677 (synopsis "Python client for Consul")
11678 (description
11679 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11680discovery, monitoring and configuration.")
11681 (license license:expat)))
11682
11683(define-public python2-consul
f210e944 11684 (package-with-python2 python-consul))
25702397 11685
05b59190
DC
11686(define-public python-schematics
11687 (package
11688 (name "python-schematics")
11689 (version "1.1.1")
11690 (source
11691 (origin
11692 (method url-fetch)
11693 (uri (string-append
11694 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11695 (file-name (string-append name "-" version ".tar.gz"))
11696 (sha256
11697 (base32
11698 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11699 (build-system python-build-system)
f22efa01 11700 (propagated-inputs
05b59190
DC
11701 `(("python-six" ,python-six)))
11702 (arguments
11703 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11704 ; version requirements (eg python-coveralls)
11705 (home-page "https://github.com/schematics/schematics")
11706 (synopsis "Python Data Structures for Humans")
11707 (description "Python Data Structures for Humans.")
f210e944 11708 (license license:bsd-3)))
05b59190
DC
11709
11710(define-public python2-schematics
f210e944 11711 (package-with-python2 python-schematics))
d6907ff7
DC
11712
11713(define-public python-publicsuffix
11714 (package
11715 (name "python-publicsuffix")
11716 (version "1.1.0")
11717 (source (origin
11718 (method url-fetch)
11719 (uri (pypi-uri "publicsuffix" version))
11720 (sha256
11721 (base32
11722 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11723 (build-system python-build-system)
11724 (arguments
11725 `(#:tests? #f)) ; tests use the internet
11726 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11727 (synopsis "Get suffix for a domain name")
11728 (description "Get a public suffix for a domain name using the Public Suffix
11729List.")
f210e944 11730 (license license:expat)))
d6907ff7
DC
11731
11732(define-public python2-publicsuffix
f210e944 11733 (package-with-python2 python-publicsuffix))
b2319996
DC
11734
11735(define-public python-publicsuffix2
11736 (package
11737 (name "python-publicsuffix2")
11738 (version "2.20160621")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11743 (sha256
11744 (base32
11745 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11746 (build-system python-build-system)
10797a0a
LF
11747 (arguments
11748 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11749 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11750 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11751 (description "Get a public suffix for a domain name using the Public Suffix
11752List. Forked from and using the same API as the publicsuffix package.")
f210e944 11753 (license (list license:expat license:mpl2.0))))
b2319996
DC
11754
11755(define-public python2-publicsuffix2
f210e944 11756 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11757
11758(define-public python-url
11759 (package
11760 (name "python-url")
11761 (version "0.2.0")
11762 (source (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "url" version))
11765 (sha256
11766 (base32
11767 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11768 (build-system python-build-system)
f22efa01 11769 (propagated-inputs
81f1515d
DC
11770 `(("python-publicsuffix" ,python-publicsuffix)))
11771 (native-inputs
11772 `(("python-coverage" ,python-coverage)
11773 ("python-nose" ,python-nose)))
11774 (arguments
11775 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11776 (home-page "http://github.com/seomoz/url-py")
11777 (synopsis "URL Parsing")
11778 (description "Library for parsing urls.")
11779 (license license:expat)
11780 (properties `((python2-variant . ,(delay python2-url))))))
11781
11782(define-public python2-url
11783 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11784 (package (inherit base)
f22efa01 11785 (propagated-inputs
f210e944 11786 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11787
11788(define-public python-freezegun
11789 (package
11790 (name "python-freezegun")
0c315fb3 11791 (version "0.3.8")
974ee2c1
TS
11792 (source
11793 (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "freezegun" version))
11796 (sha256
11797 (base32
0c315fb3 11798 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
11799 (build-system python-build-system)
11800 (native-inputs
11801 `(("python-mock" ,python-mock)
11802 ("python-nose" ,python-nose)
4e096968 11803 ("python-coverage" ,python-coverage)))
f22efa01 11804 (propagated-inputs
4e096968 11805 `(("python-six" ,python-six)
22d7360b 11806 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
11807 (arguments
11808 `(#:phases (modify-phases %standard-phases
11809 ;; The tests are normally executed via `make test`, but the PyPi
11810 ;; package does not include the Makefile.
11811 (replace 'check
11812 (lambda _
11813 (zero? (system* "nosetests" "./tests/")))))))
11814 (home-page "https://github.com/spulec/freezegun")
11815 (synopsis "Test utility for mocking the datetime module")
11816 (description
11817 "FreezeGun is a library that allows your python tests to travel through
11818time by mocking the datetime module.")
11819 (license license:asl2.0)))
11820
11821(define-public python2-freezegun
f210e944
HG
11822 (package-with-python2 python-freezegun))
11823
dddcb25c
MB
11824
11825(define-public python-odfpy
11826 (package
11827 (name "python-odfpy")
11828 (version "1.3.3")
11829 (source (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "odfpy" version))
11832 (sha256
11833 (base32
11834 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11835 (arguments
11836 `(#:modules ((srfi srfi-1)
11837 (guix build python-build-system)
11838 (guix build utils))
11839 #:phases
11840 (modify-phases %standard-phases
11841 (replace 'check
11842 ;; The test runner invokes python2 and python3 for test*.py.
11843 ;; To avoid having both in inputs, we replicate it here.
11844 (lambda _
11845 (every (lambda (test-file)
11846 (zero? (system* "python" test-file)))
11847 (find-files "tests" "^test.*\\.py$")))))))
11848 (build-system python-build-system)
11849 (home-page "https://github.com/eea/odfpy")
11850 (synopsis "Python API and tools to manipulate OpenDocument files")
11851 (description "Collection of libraries and utility programs written in
11852Python to manipulate OpenDocument 1.2 files.")
11853 (license
11854 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11855 ;; number of files with other licenses.
11856 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11857
11858(define-public python2-odfpy
11859 (package-with-python2 python-odfpy))
b30565bd
MB
11860
11861(define-public python-cachecontrol
11862 (package
11863 (name "python-cachecontrol")
11864 (version "0.11.6")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 ;; Pypi does not have tests.
11869 (uri (string-append
11870 "https://github.com/ionrock/cachecontrol/archive/v"
11871 version ".tar.gz"))
11872 (file-name (string-append name "-" version ".tar.gz"))
11873 (sha256
11874 (base32
11875 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11876 (build-system python-build-system)
11877 (arguments
11878 `(#:phases
11879 (modify-phases %standard-phases
11880 (replace 'check
11881 (lambda _
11882 ;; Drop test that requires internet access.
11883 (delete-file "tests/test_regressions.py")
11884 (setenv "PYTHONPATH"
11885 (string-append (getcwd) "/build/lib:"
11886 (getenv "PYTHONPATH")))
11887 (zero? (system* "py.test" "-vv")))))))
11888 (native-inputs
11889 `(("python-pytest" ,python-pytest)
11890 ("python-redis" ,python-redis)
11891 ("python-webtest" ,python-webtest)
11892 ("python-mock" ,python-mock)))
11893 (propagated-inputs
11894 `(("python-requests" ,python-requests)
11895 ("python-lockfile" ,python-lockfile)))
11896 (home-page "https://github.com/ionrock/cachecontrol")
11897 (synopsis "The httplib2 caching algorithms for use with requests")
11898 (description "CacheControl is a port of the caching algorithms in
11899@code{httplib2} for use with @code{requests} session objects.")
f210e944 11900 (license license:asl2.0)))
b30565bd
MB
11901
11902(define-public python2-cachecontrol
f210e944 11903 (package-with-python2 python-cachecontrol))
243db824
DM
11904
11905(define-public python-lit
11906 (package
11907 (name "python-lit")
11908 (version "0.5.0")
11909 (source
11910 (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "lit" version))
11913 (sha256
11914 (base32
11915 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11916 (build-system python-build-system)
11917 (home-page "http://llvm.org/")
11918 (synopsis "LLVM Software Testing Tool")
11919 (description "@code{lit} is a portable tool for executing LLVM and Clang
11920style test suites, summarizing their results, and providing indication of
11921failures.")
f210e944 11922 (license license:ncsa)))
243db824
DM
11923
11924(define-public python2-lit
f210e944 11925 (package-with-python2 python-lit))
66f95b20
MB
11926
11927(define-public python-pytest-pep8
11928 (package
11929 (name "python-pytest-pep8")
11930 (version "1.0.6")
11931 (source (origin
11932 (method url-fetch)
11933 (uri (pypi-uri "pytest-pep8" version))
11934 (sha256
11935 (base32
11936 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11937 (build-system python-build-system)
11938 (arguments
b41a05ce 11939 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11940 (native-inputs
11941 `(("python-pytest" ,python-pytest)))
11942 (propagated-inputs
11943 `(("python-pep8" ,python-pep8)))
11944 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11945 (synopsis "Py.test plugin to check PEP8 requirements")
11946 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11947 (license license:expat)))
66f95b20
MB
11948
11949(define-public python2-pytest-pep8
f210e944 11950 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11951
11952(define-public python-pytest-flakes
11953 (package
11954 (name "python-pytest-flakes")
11955 (version "1.0.1")
11956 (source (origin
11957 (method url-fetch)
11958 (uri (pypi-uri "pytest-flakes" version))
11959 (sha256
11960 (base32
11961 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11962 (build-system python-build-system)
11963 (arguments
b41a05ce 11964 `(#:phases
df94a6b5
MB
11965 (modify-phases %standard-phases
11966 (delete 'check)
11967 (add-after 'install 'check
05c2fd36
HG
11968 (lambda* (#:key outputs inputs #:allow-other-keys)
11969 ;; It's easier to run tests after install.
11970 ;; Make installed package available for running the tests
11971 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11972 (zero? (system* "py.test" "-vv")))))))
11973 (native-inputs
11974 `(("python-coverage" ,python-coverage)
11975 ("python-pytest" ,python-pytest)
11976 ("python-pytest-cache" ,python-pytest-cache)
11977 ("python-pytest-pep8" ,python-pytest-pep8)))
11978 (propagated-inputs
11979 `(("python-pyflakes" ,python-pyflakes)))
11980 (home-page "https://github.com/fschulze/pytest-flakes")
11981 (synopsis "Py.test plugin to check source code with pyflakes")
11982 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11983 (license license:expat)))
df94a6b5
MB
11984
11985(define-public python2-pytest-flakes
f210e944 11986 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11987
11988(define-public python-natsort
11989 (package
11990 (name "python-natsort")
11991 (version "5.0.1")
11992 (source (origin
11993 (method url-fetch)
11994 (uri (pypi-uri "natsort" version))
11995 (sha256
11996 (base32
11997 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11998 (build-system python-build-system)
11999 (arguments
12000 `(#:phases
12001 (modify-phases %standard-phases
12002 (add-before 'check 'set-cachedir
12003 ;; Tests require write access to $HOME by default
12004 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12005 (native-inputs
12006 `(("python-hypothesis" ,python-hypothesis)
12007 ("python-pytest-cache" ,python-pytest-cache)
12008 ("python-pytest-cov" ,python-pytest-cov)
12009 ("python-pytest-flakes" ,python-pytest-flakes)
12010 ("python-pytest-pep8" ,python-pytest-pep8)))
12011 (propagated-inputs ; TODO: Add python-fastnumbers.
12012 `(("python-pyicu" ,python-pyicu)))
12013 (home-page "https://github.com/SethMMorton/natsort")
12014 (synopsis "Natural sorting for python and shell")
12015 (description
12016 "Natsort lets you apply natural sorting on lists instead of
12017lexicographical. If you use the built-in @code{sorted} method in python
12018on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12019returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12020function @code{natsorted} that identifies numbers and sorts them separately
12021from strings. It can also sort version numbers, real numbers, mixed types
12022and more, and comes with a shell command @command{natsort} that exposes this
12023functionality in the command line.")
12024 (license license:expat)
12025 (properties `((python2-variant . ,(delay python2-natsort))))))
12026
12027(define-public python2-natsort
12028 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12029 (package (inherit base)
12030 (native-inputs
00e10c6e 12031 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12032 ("python2-mock" ,python2-mock)
12033 ("python2-enum34" ,python2-enum34)
12034 ,@(package-native-inputs base))))))
4efb9c54
SR
12035
12036(define-public python-glances
12037 (package
12038 (name "python-glances")
12039 (version "2.7.1")
12040 (source
12041 (origin
12042 (method url-fetch)
12043 (uri (pypi-uri "Glances" version))
12044 (sha256
12045 (base32
12046 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12047 (build-system python-build-system)
f22efa01 12048 (propagated-inputs
4efb9c54
SR
12049 `(("python-psutil" ,python-psutil)))
12050 (home-page
12051 "https://github.com/nicolargo/glances")
12052 (synopsis
12053 "A cross-platform curses-based monitoring tool")
12054 (description
12055 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12056Glances uses the PsUtil library to get information from your system. It monitors
12057CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12058 (license license:lgpl3+)))
4efb9c54
SR
12059
12060(define-public python2-glances
f210e944 12061 (package-with-python2 python-glances))
05b7a593
EF
12062
12063(define-public python-graphql-core
12064 (package
12065 (name "python-graphql-core")
12066 (version "0.5.3")
12067 (source
12068 (origin
12069 (method url-fetch)
12070 (uri (pypi-uri "graphql-core" version))
12071 (sha256
12072 (base32
12073 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12074 (build-system python-build-system)
12075 (arguments
326f8285
LF
12076 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12077 #:phases
05b7a593
EF
12078 (modify-phases %standard-phases
12079 (add-after 'unpack 'patch-hardcoded-version
12080 (lambda _ (substitute*
12081 "setup.py"
12082 (("'gevent==1.1rc1'") "'gevent'"))
12083 #t)))))
12084 (native-inputs
12085 `(("python-gevent" ,python-gevent)
12086 ("python-mock" ,python-mock)
12087 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12088 (propagated-inputs
05b7a593
EF
12089 `(("python-promise" ,python-promise)
12090 ("python-six" ,python-six)))
12091 (home-page "https://github.com/graphql-python/graphql-core")
12092 (synopsis "GraphQL implementation for Python")
12093 (description
12094 "GraphQL implementation for Python. GraphQL is a data query language and
12095runtime designed and used to request and deliver data to mobile and web apps.
12096This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12097to Python.")
05b7a593
EF
12098 (license license:expat)))
12099
12100(define-public python2-graphql-core
f210e944 12101 (package-with-python2 python-graphql-core))
7ee51575
EF
12102
12103(define-public python-graphql-relay
12104 (package
12105 (name "python-graphql-relay")
b13a5b4d 12106 (version "0.4.5")
7ee51575
EF
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "graphql-relay" version))
12111 (sha256
12112 (base32
b13a5b4d 12113 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12114 (build-system python-build-system)
12115 (native-inputs
12116 `(("python-pytest" ,python-pytest)))
f22efa01 12117 (propagated-inputs
7ee51575
EF
12118 `(("python-graphql-core" ,python-graphql-core)
12119 ("python-promise" ,python-promise)
12120 ("python-six" ,python-six)))
12121 (home-page "https://github.com/graphql-python/graphql-relay-py")
12122 (synopsis "Relay implementation for Python")
12123 (description
12124 "This is a library to allow the easy creation of Relay-compliant servers
12125using the GraphQL Python reference implementation of a GraphQL server. It
12126should be noted that the code is a exact port of the original
12127@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12128from Facebook.")
7ee51575
EF
12129 (license license:expat)))
12130
12131(define-public python2-graphql-relay
f210e944 12132 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12133
12134(define-public python-graphene
12135 (package
12136 (name "python-graphene")
12137 (version "0.10.2")
12138 (source
12139 (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "graphene" version))
12142 (sha256
12143 (base32
12144 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12145 (build-system python-build-system)
12146 (native-inputs
12147 `(("python-django-filter" ,python-django-filter)
12148 ("python-mock" ,python-mock)
12149 ("python-psycopg2" ,python-psycopg2)
12150 ("python-pytest-django" ,python-pytest-django)
12151 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12152 (propagated-inputs
ddc63a56
EF
12153 `(("python-graphql-core" ,python-graphql-core)
12154 ("python-graphql-relay" ,python-graphql-relay)
12155 ("python-iso8601" ,python-iso8601)
12156 ("python-promise" ,python-promise)
12157 ("python-six" ,python-six)))
12158 (home-page "http://graphene-python.org/")
12159 (synopsis "GraphQL Framework for Python")
12160 (description
12161 "Graphene is a Python library for building GraphQL schemas/types.
12162A GraphQL schema describes your data model, and provides a GraphQL server
12163with an associated set of resolve methods that know how to fetch data.")
12164 (properties `((python2-variant . ,(delay python2-graphene))))
12165 (license license:expat)))
12166
12167(define-public python2-graphene
12168 (let ((base (package-with-python2
12169 (strip-python2-variant python-graphene))))
12170 (package (inherit base)
12171 (native-inputs
00e10c6e 12172 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12173 ,@(package-native-inputs base))))))
d488d5d6
EF
12174
12175(define-public python-nautilus
12176 (package
12177 (name "python-nautilus")
12178 (version "0.4.9")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "nautilus" version))
12183 (sha256
12184 (base32
12185 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12186 (build-system python-build-system)
12187 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12188 (propagated-inputs
d488d5d6
EF
12189 `(("python-bcrypt" ,python-bcrypt)
12190 ("python-click" ,python-click)
12191 ("python-consul" ,python-consul)
d488d5d6
EF
12192 ("python-graphene" ,python-graphene)
12193 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12194 ("python-peewee" ,python-peewee)
12195 ("python-pika" ,python-pika)
d488d5d6
EF
12196 ("python-tornado" ,python-tornado)
12197 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12198 (native-inputs
12199 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12200 (home-page "https://github.com/AlecAivazis/nautilus")
12201 (synopsis "Library for creating microservice applications")
12202 (description
12203 "Nautilus is a framework for flux based microservices that looks to
12204provide extendible implementations of common aspects of a cloud so that you can
12205focus on building massively scalable web applications.")
12206 (license license:expat)))
94cffc63 12207
89cd988b
DM
12208(define-public python-snowballstemmer
12209 (package
12210 (name "python-snowballstemmer")
12211 (version "1.2.1")
12212 (source (origin
1bd858cc
MB
12213 (method url-fetch)
12214 (uri (pypi-uri "snowballstemmer" version))
12215 (sha256
12216 (base32
12217 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12218 (build-system python-build-system)
12219 (arguments
12220 `(;; No tests exist
12221 #:tests? #f))
12222 (home-page "https://github.com/shibukawa/snowball_py")
12223 (synopsis "Snowball stemming library collection for Python")
12224 (description "This package provides 16 word stemmer algorithms generated
12225from Snowball algorithms. It includes the 15 original ones plus the Poerter
12226English stemmer.")
12227 (license license:bsd-3)))
12228
12229(define-public python2-snowballstemmer
12230 (package-with-python2 python-snowballstemmer))
12231
754bfd70
DM
12232(define-public python-sphinx-cloud-sptheme
12233 (package
12234 (name "python-sphinx-cloud-sptheme")
12235 (version "1.7.1")
12236 (source (origin
1bd858cc
MB
12237 (method url-fetch)
12238 (uri (pypi-uri "cloud_sptheme" version))
12239 (sha256
12240 (base32
12241 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12242 (build-system python-build-system)
a31e2f1a
MB
12243 ;; FIXME: The 'pypi' release archive does not contain tests.
12244 (arguments '(#:tests? #f))
1bd858cc
MB
12245 (native-inputs
12246 `(("python-sphinx" ,python-sphinx)))
12247 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12248 (synopsis "'Cloud' theme for Sphinx documenter")
12249 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12250related extensions.")
1bd858cc 12251 (license license:bsd-3)))
754bfd70
DM
12252
12253(define-public python2-sphinx-cloud-sptheme
12254 (package-with-python2 python-sphinx-cloud-sptheme))
12255
807a5b32
DM
12256(define-public python-sphinx-alabaster-theme
12257 (package
12258 (name "python-sphinx-alabaster-theme")
12259 (version "0.7.9")
1bd858cc
MB
12260 (source (origin
12261 (method url-fetch)
12262 (uri (pypi-uri "alabaster" version))
12263 (sha256
12264 (base32
12265 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12266 (build-system python-build-system)
12267 (propagated-inputs
12268 `(("python-pygments" ,python-pygments)))
12269 (home-page "https://alabaster.readthedocs.io/")
12270 (synopsis "Configurable sidebar-enabled Sphinx theme")
12271 (description "Alabaster is a visually (c)lean, responsive, configurable
12272theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12273 (license license:bsd-3)))
12274
12275(define-public python2-sphinx-alabaster-theme
12276 (package-with-python2 python-sphinx-alabaster-theme))
12277
66d3f50a
LF
12278(define-public python-betamax
12279 (package
12280 (name "python-betamax")
12281 (version "0.8.0")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "betamax" version))
12286 (sha256
12287 (base32
12288 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12289 (build-system python-build-system)
12290 (arguments
12291 '(;; Many tests fail because they require networking.
12292 #:tests? #f))
c415f763 12293 (propagated-inputs
66d3f50a
LF
12294 `(("python-requests" ,python-requests)))
12295 (home-page "https://github.com/sigmavirus24/betamax")
12296 (synopsis "Record HTTP interactions with python-requests")
12297 (description "Betamax will record your test suite's HTTP interactions and
12298replay them during future tests. It is designed to work with python-requests.")
f210e944 12299 (license license:expat)))
66d3f50a
LF
12300
12301(define-public python2-betamax
f210e944 12302 (package-with-python2 python-betamax))
ca0635b4 12303
94cffc63
LF
12304(define-public python-s3transfer
12305 (package
12306 (name "python-s3transfer")
1b5ea092 12307 (version "0.1.10")
94cffc63
LF
12308 (source (origin
12309 (method url-fetch)
12310 (uri (pypi-uri "s3transfer" version))
12311 (sha256
12312 (base32
1b5ea092 12313 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12314 (build-system python-build-system)
fad8bf97
LF
12315 (arguments
12316 `(#:phases
12317 (modify-phases %standard-phases
12318 (replace 'check
12319 (lambda _
12320 ;; 7 of the 'integration' tests require network access or login
12321 ;; credentials.
12322 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12323 (native-inputs
fad8bf97
LF
12324 `(("python-docutils" ,python-docutils)
12325 ("python-mock" ,python-mock)
12326 ("python-nose" ,python-nose)))
f22efa01 12327 (propagated-inputs
94cffc63
LF
12328 `(("python-botocore" ,python-botocore)))
12329 (synopsis "Amazon S3 Transfer Manager")
12330 (description "S3transfer is a Python library for managing Amazon S3
12331transfers.")
12332 (home-page "https://github.com/boto/s3transfer")
12333 (license license:asl2.0)
12334 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12335
12336(define-public python2-s3transfer
12337 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12338 (package
12339 (inherit base)
12340 (native-inputs
12341 `(("python2-futures" ,python2-futures)
94cffc63 12342 ,@(package-native-inputs base))))))
8ab59181
HG
12343
12344(define-public python-setproctitle
12345(package
12346 (name "python-setproctitle")
12347 (version "1.1.10")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "setproctitle" version))
12352 (sha256
12353 (base32
12354 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12355 (build-system python-build-system)
12356 (arguments
12357 '(#:phases
12358 (modify-phases %standard-phases
12359 (add-before 'check 'patch-Makefile
12360 ;; Stricly this is only required for the python2 variant.
12361 ;; But adding a phase in an inherited package seems to be
12362 ;; cumbersum. So we patch even for python3.
12363 (lambda _
12364 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12365 (when nose
12366 (substitute* "Makefile"
12367 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12368 (string-append nose "/bin/nosetests "))))
12369 #t)))
12370 (replace 'check
12371 (lambda _
12372 (setenv "PYTHON" (or (which "python3") (which "python")))
12373 (setenv "PYCONFIG" (or (which "python3-config")
12374 (which "python-config")))
12375 (setenv "CC" "gcc")
12376 ;; No need to extend PYTHONPATH to find the built package, since
12377 ;; the Makefile will build anyway
12378 (zero? (system* "make" "check")))))))
12379 (native-inputs
12380 `(("procps" ,procps))) ; required for tests
12381 (home-page
12382 "https://github.com/dvarrazzo/py-setproctitle")
12383 (synopsis
12384 "Setproctitle implementation for Python to customize the process title")
12385 (description "The library allows a process to change its title (as displayed
12386by system tools such as ps and top).
12387
12388Changing the title is mostly useful in multi-process systems, for
12389example when a master process is forked: changing the children's title
12390allows to identify the task each process is busy with. The technique
12391is used by PostgreSQL and the OpenSSH Server for example.")
12392 (license license:bsd-3)
12393 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12394
12395(define-public python2-setproctitle
12396 (let ((base (package-with-python2
12397 (strip-python2-variant python-setproctitle))))
12398 (package
12399 (inherit base)
12400 (native-inputs `(("python2-nose" ,python2-nose)
12401 ,@(package-native-inputs base))))))
162e42d8
HG
12402
12403(define-public python-validictory
12404 (package
12405 (name "python-validictory")
12406 (version "1.0.1")
12407 (source
12408 (origin
12409 (method url-fetch)
12410 (uri (pypi-uri "validictory" version))
12411 (sha256
12412 (base32
12413 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12414 (build-system python-build-system)
12415 (arguments
12416 '(#:phases
12417 (modify-phases %standard-phases
12418 (add-after 'unpack 'bootstrap
12419 ;; Move the tests out of the package directory to avoid
12420 ;; packaging them.
12421 (lambda* _
12422 (rename-file "validictory/tests" "tests")
12423 (delete-file "tests/__init__.py")))
12424 (replace 'check
12425 (lambda _
12426 ;; Extend PYTHONPATH so the built package will be found.
12427 (setenv "PYTHONPATH"
12428 (string-append (getcwd) "/build/lib:"
12429 (getenv "PYTHONPATH")))
12430 (zero? (system* "py.test" "-vv" )))))))
12431 (native-inputs
12432 `(("python-pytest" ,python-pytest)))
12433 (home-page
12434 "https://github.com/jamesturk/validictory")
12435 (synopsis "General purpose Python data validator")
12436 (description "It allows validation of arbitrary Python data structures.
12437
12438The schema format is based on the JSON Schema
12439proposal (http://json-schema.org), so combined with json the library is also
12440useful as a validator for JSON data.")
f210e944 12441 (license license:expat)))
162e42d8
HG
12442
12443(define-public python2-validictory
f210e944 12444 (package-with-python2 python-validictory))
0990edfe
DM
12445
12446(define-public python-aniso8601
12447 (package
12448 (name "python-aniso8601")
12449 (version "1.1.0")
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (pypi-uri "aniso8601" version))
12454 (sha256
12455 (base32
12456 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12457 (build-system python-build-system)
12458 (propagated-inputs
22d7360b 12459 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12460 (home-page
12461 "https://bitbucket.org/nielsenb/aniso8601")
12462 (synopsis
12463 "Python library for parsing ISO 8601 strings")
12464 (description
12465 "This package contains a library for parsing ISO 8601 datetime strings.")
12466 (license license:bsd-3)))
999d964d
DM
12467
12468(define-public python-flask-restful
12469 (package
12470 (name "python-flask-restful")
12471 (version "0.3.5")
12472 (source
12473 (origin
12474 (method url-fetch)
12475 (uri (pypi-uri "Flask-RESTful" version))
12476 (sha256
12477 (base32
12478 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12479 (build-system python-build-system)
12480 (propagated-inputs
12481 `(("python-aniso8601" ,python-aniso8601)
12482 ("python-flask" ,python-flask)
12483 ("python-pycrypto" ,python-pycrypto)
12484 ("python-pytz" ,python-pytz)))
12485 (native-inputs
12486 `(;; Optional dependency of Flask. Tests need it.
12487 ("python-blinker" ,python-blinker)
12488 ("python-mock" ,python-mock) ; For tests
12489 ("python-nose" ,python-nose) ; For tests
12490 ("python-sphinx" ,python-sphinx)))
12491 (home-page
12492 "https://www.github.com/flask-restful/flask-restful/")
12493 (synopsis
12494 "Flask module for creating REST APIs")
12495 (description
12496 "This package contains a Flask module for creating REST APIs.")
12497 (license license:bsd-3)))
31288222
DM
12498
12499(define-public python-flask-basicauth
12500 (package
12501 (name "python-flask-basicauth")
12502 (version "0.2.0")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "Flask-BasicAuth" version))
12507 (sha256
12508 (base32
12509 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12510 (build-system python-build-system)
12511 (propagated-inputs
12512 `(("python-flask" ,python-flask)))
12513 (home-page
12514 "https://github.com/jpvanhal/flask-basicauth")
12515 (synopsis
12516 "HTTP basic access authentication for Flask")
12517 (description
12518 "This package provides HTTP basic access authentication for Flask.")
12519 (license license:bsd-3)))
903276d0
DM
12520
12521(define-public python-flask-sqlalchemy
12522 (package
12523 (name "python-flask-sqlalchemy")
12524 (version "2.1")
12525 (source
12526 (origin
12527 (method url-fetch)
12528 (uri (pypi-uri "Flask-SQLAlchemy" version))
12529 (sha256
12530 (base32
12531 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12532 (build-system python-build-system)
12533 (propagated-inputs
12534 `(("python-flask" ,python-flask)
12535 ("python-sqlalchemy" ,python-sqlalchemy)))
12536 (home-page
12537 "http://github.com/mitsuhiko/flask-sqlalchemy")
12538 (synopsis
12539 "Module adding SQLAlchemy support to your Flask application")
12540 (description
12541 "This package adds SQLAlchemy support to your Flask application.")
12542 (license license:bsd-3)))
329b4b3b
LF
12543
12544(define-public python-pyev
12545 (package
12546 (name "python-pyev")
12547 (version "0.9.0")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "pyev" version))
12552 (sha256
12553 (base32
12554 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12555 (build-system python-build-system)
12556 (arguments
12557 `(#:tests? #f ; no test suite
12558 #:phases
12559 (modify-phases %standard-phases
12560 (add-after 'unpack 'patch
12561 (lambda* (#:key inputs #:allow-other-keys)
12562 (let ((libev (string-append (assoc-ref inputs "libev")
12563 "/lib/libev.so.4")))
12564 (substitute* "setup.py"
12565 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12566 (string-append "libev_dll_name = \"" libev "\"")))))))))
12567 (inputs
12568 `(("libev" ,libev)))
12569 (home-page "http://pythonhosted.org/pyev/")
12570 (synopsis "Python libev interface")
12571 (description "Pyev provides a Python interface to libev.")
12572 (license license:gpl3)))
12573
12574(define-public python2-pyev
12575 (package-with-python2 python-pyev))
45b4f127
DM
12576
12577(define-public python-imagesize
12578 (package
12579 (name "python-imagesize")
12580 (version "0.7.1")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "imagesize" version))
12585 (sha256
12586 (base32
12587 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12588 (build-system python-build-system)
9422c98a
LF
12589 (arguments
12590 '(;; Test files are not distributed on PyPi:
12591 ;; https://github.com/shibukawa/imagesize_py/issues/7
12592 #:tests? #f))
45b4f127
DM
12593 (home-page "https://github.com/shibukawa/imagesize_py")
12594 (synopsis "Gets image size of files in variaous formats in Python")
12595 (description
12596 "This package allows determination of image size from
12597PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 12598 (license license:expat)))
45b4f127
DM
12599
12600(define-public python2-imagesize
f210e944 12601 (package-with-python2 python-imagesize))
2f6dd9cd
AI
12602
12603(define-public python-axolotl-curve25519
12604 (package
12605 (name "python-axolotl-curve25519")
12606 (version "0.1")
12607 (source
12608 (origin
12609 (method git-fetch)
12610 (uri (git-reference
12611 (url "git://github.com/tgalal/python-axolotl-curve25519")
12612 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12613 (file-name (string-append name "-" version "-checkout"))
12614 (sha256
12615 (base32
12616 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12617 (build-system python-build-system)
12618 (arguments
12619 `(;; Prevent creation of the egg. This works around
12620 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12621 #:configure-flags '("--root=/")))
2f6dd9cd
AI
12622 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12623 (synopsis "Python wrapper for curve25519 library")
12624 (description "This is a python wrapper for the curve25519 library
12625with ed25519 signatures. The C code was pulled from
12626libaxolotl-android. At the moment this wrapper is meant for use by
12627python-axolotl.")
12628 (license (list license:gpl3 ; Most files
683cdbf5 12629 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12630
12631(define-public python2-axolotl-curve25519
12632 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12633
12634(define-public python-axolotl
12635 (package
12636 (name "python-axolotl")
12637 (version "0.1.35")
12638 (source
12639 (origin
12640 (method url-fetch)
12641 (uri (string-append
12642 "https://github.com/tgalal/python-axolotl/archive/"
12643 version ".tar.gz"))
12644 (file-name (string-append name "-" version ".tar.gz"))
12645 (sha256
12646 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12647 (build-system python-build-system)
12648 (arguments
12649 `(#:phases
12650 (modify-phases %standard-phases
12651 ;; Don't install tests
12652 (add-before 'install 'remove-tests
12653 (lambda _
12654 (for-each delete-file-recursively
12655 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 12656 #t)))))
06ff0837
AI
12657 (propagated-inputs
12658 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12659 ("python-dateutil" ,python-dateutil)
12660 ("python-protobuf" ,python-protobuf)
12661 ("python-pycrypto" ,python-pycrypto)))
12662 (home-page "https://github.com/tgalal/python-axolotl")
12663 (synopsis "Python port of libaxolotl-android")
12664 (description "This is a python port of libaxolotl-android. This
12665is a ratcheting forward secrecy protocol that works in synchronous and
12666asynchronous messaging environments.")
12667 (license license:gpl3)))
12668
12669(define-public python2-axolotl
12670 (package-with-python2 python-axolotl))
e2fca490
DM
12671
12672(define-public python-termstyle
12673 (package
12674 (name "python-termstyle")
12675 (version "0.1.11")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "termstyle" version))
12680 (sha256
12681 (base32
12682 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12683 (build-system python-build-system)
7917a135
MB
12684 (arguments
12685 '(#:phases
12686 (modify-phases %standard-phases
12687 (replace 'check
12688 (lambda _
12689 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12690 (home-page "http://github.com/gfxmonk/termstyle")
12691 (synopsis "Console text coloring for Python")
12692 (description "This package provides console text coloring for Python.")
12693 (license license:bsd-3)))
1e6112d8
DM
12694
12695(define-public python-rednose
12696 (package
12697 (name "python-rednose")
12698 (version "1.2.1")
12699 (source
12700 (origin
12701 (method url-fetch)
12702 (uri (pypi-uri "rednose" version))
12703 (sha256
12704 (base32
12705 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12706 (build-system python-build-system)
12707 (arguments
12708 `(#:phases
12709 (modify-phases %standard-phases
12710 (add-after 'unpack 'fix-deps
12711 (lambda _
12712 ;; See <https://github.com/JBKahn/rednose/issues/12>
12713 (substitute* "setup.py"
12714 (("python-termstyle") "termstyle"))
12715 #t)))))
12716 (propagated-inputs
12717 `(("python-colorama" ,python-colorama)
12718 ("python-termstyle" ,python-termstyle)))
12719 (native-inputs
12720 `(("python-six" ,python-six)
12721 ("python-nose" ,python-nose)))
12722 (home-page "https://github.com/JBKahn/rednose")
12723 (synopsis "Colored output for Python nosetests")
12724 (description "This package provides colored output for the
12725@command{nosetests} command of the Python Nose unit test framework.")
12726 (license license:bsd-3)))
0a7f17f0
DM
12727
12728(define-public python-flask-restplus
12729 (package
12730 (name "python-flask-restplus")
12731 (version "0.9.2")
12732 (source
12733 (origin
12734 (method url-fetch)
12735 (uri (pypi-uri "flask-restplus" version))
12736 (sha256
12737 (base32
12738 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12739 (build-system python-build-system)
59f74825
MB
12740 (arguments
12741 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12742 ;; #:phases
12743 ;; (modify-phases %standard-phases
12744 ;; (replace 'check
12745 ;; (lambda _
12746 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12747 (propagated-inputs
12748 `(("python-aniso8601" ,python-aniso8601)
12749 ("python-flask" ,python-flask)
12750 ("python-jsonschema" ,python-jsonschema)
12751 ("python-pytz" ,python-pytz)
12752 ("python-six" ,python-six)))
12753 (native-inputs
12754 `(("python-tzlocal" ,python-tzlocal)
12755 ("python-blinker" ,python-blinker)
12756 ("python-nose" ,python-nose)
12757 ("python-rednose" ,python-rednose)))
12758 (home-page "https://github.com/noirbizarre/flask-restplus")
12759 (synopsis "Framework for documented API development with Flask")
12760 (description "This package provides a framework for API development with
12761the Flask web framework in Python. It is similar to package
12762@code{python-flask-restful} but supports the @code{python-swagger}
12763documentation builder.")
12764 (license license:expat)))
1ed21519
DM
12765
12766(define-public python-sadisplay
12767 (package
12768 (name "python-sadisplay")
12769 (version "0.4.6")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "sadisplay" version))
12774 (sha256
12775 (base32
12776 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12777 (build-system python-build-system)
12778 (propagated-inputs
12779 `(("python-sqlalchemy" ,python-sqlalchemy)))
12780 (native-inputs
12781 `(("python-nose" ,python-nose)))
12782 (home-page "https://bitbucket.org/estin/sadisplay")
12783 (synopsis "SQLAlchemy schema displayer")
12784 (description "This package provides a program to build Entity
12785Relationship diagrams from a SQLAlchemy model (or directly from the
12786database).")
12787 (license license:bsd-3)))
12788
12789(define-public python2-sadisplay
12790 (package-with-python2 python-sadisplay))
444a79b6
DM
12791
12792(define-public python-flask-restful-swagger
12793 (package
12794 (name "python-flask-restful-swagger")
12795 (version "0.19")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "flask-restful-swagger" version))
12800 (sha256
12801 (base32
12802 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12803 (build-system python-build-system)
12804 (propagated-inputs
12805 `(("python-flask-restful" ,python-flask-restful)))
12806 (home-page "https://github.com/rantav/flask-restful-swagger")
12807 (synopsis "Extract Swagger specs from Flask-Restful projects")
12808 (description "This package lets you extract Swagger API documentation
12809specs from your Flask-Restful projects.")
12810 (license license:expat)))
12811
12812(define-public python2-flask-restful-swagger
12813 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12814
12815(define-public python-argcomplete
12816 (package
12817 (name "python-argcomplete")
12818 (version "1.7.0")
12819 (source
12820 (origin
12821 (method url-fetch)
12822 (uri (pypi-uri "argcomplete" version))
12823 (sha256
12824 (base32
12825 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12826 (build-system python-build-system)
80ce42bd
MB
12827 (native-inputs
12828 `(("python-pexpect" ,python-pexpect)
12829 ("tcsh" ,tcsh)))
6c2e82bc
TGR
12830 (home-page "https://github.com/kislyuk/argcomplete")
12831 (synopsis "Shell tab completion for Python argparse")
12832 (description "argcomplete provides extensible command line tab completion
12833of arguments and options for Python scripts using @code{argparse}. It's
12834particularly useful for programs with many options or sub-parsers that can
12835dynamically suggest completions; for example, when browsing resources over the
12836network.")
12837 (license license:asl2.0)))
12838
12839(define-public python2-argcomplete
12840 (package-with-python2 python-argcomplete))
361a2fcf
TGR
12841
12842(define-public python-xopen
12843 (package
12844 (name "python-xopen")
12845 (version "0.1.1")
12846 (source
12847 (origin
12848 (method url-fetch)
12849 (uri (pypi-uri "xopen" version))
12850 (sha256
12851 (base32
12852 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12853 (file-name (string-append name "-" version ".tar.gz"))))
12854 (build-system python-build-system)
12855 (home-page "https://github.com/marcelm/xopen/")
12856 (synopsis "Open compressed files transparently")
12857 (description "This module provides an @code{xopen} function that works like
12858Python's built-in @code{open} function, but can also deal with compressed files.
12859Supported compression formats are gzip, bzip2 and, xz, and are automatically
12860recognized by their file extensions. The focus is on being as efficient as
12861possible on all supported Python versions.")
12862 (license license:expat)))
12863
12864(define-public python2-xopen
12865 (package-with-python2 python-xopen))
8d67610b
DM
12866
12867(define-public python2-cheetah
12868 (package
12869 (name "python2-cheetah")
12870 (version "2.4.4")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "Cheetah" version))
12875 (sha256
12876 (base32
12877 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
12878 (build-system python-build-system)
12879 (arguments
12880 `(#:python ,python-2))
12881 (propagated-inputs
12882 `(("python2-markdown" ,python2-markdown)))
12883 (home-page "https://pythonhosted.org/Cheetah/")
12884 (synopsis "Template engine")
12885 (description "Cheetah is a text-based template engine and Python code
12886generator.
12887
12888Cheetah can be used as a standalone templating utility or referenced as
12889a library from other Python applications. It has many potential uses,
12890but web developers looking for a viable alternative to ASP, JSP, PHP and
12891PSP are expected to be its principle user group.
12892
12893Features:
12894@enumerate
12895@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12896 text-based format.
12897@item Cleanly separates content, graphic design, and program code.
12898@item Blends the power and flexibility of Python with a simple template language
12899 that non-programmers can understand.
12900@item Gives template writers full access to any Python data structure, module,
12901 function, object, or method in their templates.
12902@item Makes code reuse easy by providing an object-orientated interface to
12903 templates that is accessible from Python code or other Cheetah templates.
12904 One template can subclass another and selectively reimplement sections of it.
12905@item Provides a simple, yet powerful, caching mechanism that can dramatically
12906 improve the performance of a dynamic website.
12907@item Compiles templates into optimized, yet readable, Python code.
12908@end enumerate")
12909 (license (license:x11-style "file://LICENSE"))))
d83d8722
DM
12910
12911(define-public python-dulwich
12912 (package
12913 (name "python-dulwich")
12914 (version "0.16.3")
12915 (source
12916 (origin
12917 (method url-fetch)
12918 (uri (list (string-append "https://www.dulwich.io/releases/"
12919 "dulwich-" version ".tar.gz")
12920 (pypi-uri "dulwich" version)))
12921 (sha256
12922 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
12923 (build-system python-build-system)
12924 (arguments
12925 `(#:phases
12926 (modify-phases %standard-phases
12927 (add-before 'check 'fix-tests
12928 (lambda* (#:key inputs #:allow-other-keys)
12929 ;; The tests use Popen with a custom environment which doesn't
12930 ;; include PATH.
12931 (substitute* "dulwich/tests/compat/utils.py"
12932 (("'git'") (string-append "'"
12933 (which "git")
12934 "'")))
12935 (substitute* '("dulwich/tests/test_repository.py"
12936 "dulwich/tests/test_hooks.py")
12937 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12938 (setenv "TEST_RUNNER" "unittest")
12939 (setenv "PYTHONHASHSEED" "random")
12940 #t)))))
12941 (propagated-inputs
12942 `(("python-fastimport" ,python-fastimport)))
12943 (native-inputs
12944 `(("python-mock" ,python-mock)
12945 ("python-geventhttpclient" ,python-geventhttpclient)
12946 ("git" ,git)))
12947 (home-page "https://www.dulwich.io/")
12948 (synopsis "Git implementation in Python")
12949 (description "Dulwich is an implementation of the Git file formats and
12950protocols written in pure Python.")
12951 ;; Can be used with either license.
12952 (license (list license:asl2.0 license:gpl2+))))
12953
12954(define-public python2-dulwich
12955 (package-with-python2 python-dulwich))
424b1ae7 12956
916aafa4
CZ
12957(define-public python-pbkdf2
12958 (package
12959 (name "python-pbkdf2")
12960 (version "1.3")
12961 (source
12962 (origin
12963 (method url-fetch)
12964 (uri (pypi-uri "pbkdf2" version))
12965 (sha256
12966 (base32
12967 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12968 (build-system python-build-system)
12969 (propagated-inputs
12970 `(("python-pycrypto" ,python-pycrypto))) ; optional
12971 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
12972 (synopsis "Password-based key derivation")
12973 (description "This module implements the password-based key derivation
12974function, PBKDF2, specified in RSA PKCS#5 v2.0.
12975
12976PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12977is part of the RSA Public Key Cryptography Standards series. The provided
12978implementation takes a password or a passphrase and a salt value (and
12979optionally a iteration count, a digest module, and a MAC module) and provides
12980a file-like object from which an arbitrarly-sized key can be read.")
12981 (license license:expat)))
12982
12983(define-public python2-pbkdf2
12984 (package-with-python2 python-pbkdf2))
cba84a38
CZ
12985
12986(define-public python-qrcode
12987 (package
12988 (name "python-qrcode")
12989 (version "5.3")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "qrcode" version))
12994 (sha256
12995 (base32
12996 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
12997 (build-system python-build-system)
12998 (propagated-inputs
12999 `(("python-lxml" ,python-lxml) ; for SVG output
13000 ("python-pillow" ,python-pillow) ; for PNG output
13001 ("python-six" ,python-six)))
13002 (home-page "https://github.com/lincolnloop/python-qrcode")
13003 (synopsis "QR Code image generator")
13004 (description "This package provides a pure Python QR Code generator
13005module. It uses the Python Imaging Library (PIL) to allow for the generation
13006of QR Codes.
13007
13008In addition this package provides a command line tool to generate QR codes and
13009either write these QR codes to a file or do the output as ascii art at the
13010console.")
13011 (license license:bsd-3)))
13012
13013(define-public python2-qrcode
13014 (package-with-python2 python-qrcode))
af7caada
CZ
13015
13016;; SlowAES isn't compatible with Python 3.
13017(define-public python2-slowaes
13018 (package
13019 (name "python2-slowaes")
13020 (version "0.1a1")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "slowaes" version))
13025 (sha256
13026 (base32
13027 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13028 (build-system python-build-system)
13029 (arguments `(#:python ,python-2))
13030 (home-page "http://code.google.com/p/slowaes/")
13031 (synopsis "Implementation of AES in Python")
13032 (description "This package contains an implementation of AES in Python.
13033This implementation is slow (hence the project name) but still useful when
13034faster ones are not available.")
13035 (license license:asl2.0)))
1a917fc9
MFM
13036
13037(define-public python-rst2ansi
13038 (package
13039 (name "python-rst2ansi")
13040 (version "0.1.5")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "rst2ansi" version))
13045 (sha256
13046 (base32
13047 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13048 (build-system python-build-system)
13049 (propagated-inputs
13050 `(("python-docutils" ,python-docutils)))
13051 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13052 (synopsis "Convert RST to ANSI-decorated console output")
13053 (description
13054 "Python module dedicated to rendering RST (reStructuredText) documents
13055to ansi-escaped strings suitable for display in a terminal.")
13056 (license license:expat)))
2f4623db
MFM
13057
13058(define-public python-ddt
13059 (package
13060 (name "python-ddt")
13061 (version "1.1.1")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (pypi-uri "ddt" version))
13066 (sha256
13067 (base32
13068 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13069 (build-system python-build-system)
13070 (native-inputs
13071 `(("python-mock" ,python-mock)
13072 ("python-nose" ,python-nose)))
13073 (propagated-inputs
13074 `(("python-six" ,python-six)
13075 ("python-pyyaml" ,python-pyyaml)))
13076 (home-page "https://github.com/txels/ddt")
13077 (synopsis "Data-Driven Tests")
13078 (description
13079 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13080it with different test data, and make it appear as multiple test cases.")
13081 (license license:expat)))
13082
13083(define-public python2-ddt
13084 (package-with-python2 python-ddt))
2299b137
MFM
13085
13086(define-public python-pycosat
13087 (package
13088 (name "python-pycosat")
13089 (version "0.6.1")
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (pypi-uri "pycosat" version))
13094 (sha256
13095 (base32
13096 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13097 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13098 (build-system python-build-system)
13099 (home-page "https://github.com/ContinuumIO/pycosat")
13100 (synopsis "Bindings to picosat (a SAT solver)")
13101 (description
13102 "This package provides efficient Python bindings to @code{picosat} on
13103the C level. When importing pycosat, the @code{picosat} solver becomes part
13104of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13105Problem} (SAT) solver.")
13106 (license license:expat)))
13107
13108(define-public python2-pycosat
13109 (package-with-python2 python-pycosat))
8fd68504
MFM
13110
13111(define-public python2-ruamel.ordereddict
13112 (package
13113 (name "python2-ruamel.ordereddict")
13114 (version "0.4.9")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "ruamel.ordereddict" version))
13119 (sha256
13120 (base32
13121 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13122 (build-system python-build-system)
13123 (arguments
13124 `(#:python ,python-2
13125 #:phases
13126 (modify-phases %standard-phases
13127 (delete 'check)
13128 (add-after 'install 'check
13129 (lambda* (#:key inputs outputs #:allow-other-keys)
13130 (add-installed-pythonpath inputs outputs)
13131 (zero? (system* "python" "test/testordereddict.py")))))))
13132 (home-page "https://bitbucket.org/ruamel/ordereddict")
13133 (synopsis "Version of dict that keeps keys in insertion order")
13134 (description
13135 "This is an implementation of an ordered dictionary with @dfn{Key
13136Insertion Order} (KIO: updates of values do not affect the position of the
13137key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13138removed and put at the back). The standard library module @code{OrderedDict},
13139implemented later, implements a subset of @code{ordereddict} functionality.
13140Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13141Order} (KSO, no sorting function can be specified, but a transform can be
13142specified to apply on the key before comparison (e.g. @code{string.lower})).")
13143 (license license:expat)))