gnu: python-openid-teams: 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)
9d3a15b4
LF
3053 (propagated-inputs
3054 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3055 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3056 (synopsis "ReadTheDocs.org theme for Sphinx")
3057 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3058 (license license:expat)))
ad320b20
RW
3059
3060(define-public python2-sphinx-rtd-theme
3061 (package-with-python2 python-sphinx-rtd-theme))
3062
fe94cf0c
HG
3063(define-public python-rst.linker
3064 (package
3065 (name "python-rst.linker")
3066 (version "1.7")
3067 (source
3068 (origin
3069 (method url-fetch)
3070 (uri (pypi-uri "rst.linker" version))
3071 (sha256
3072 (base32
3073 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3074 (build-system python-build-system)
3075 (propagated-inputs
22d7360b 3076 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3077 ("python-six" ,python-six)))
3078 (native-inputs
3079 `(("python-setuptools-scm" ,python-setuptools-scm)))
3080 ;; Test would require path.py, which would introduce a cyclic dependence.
3081 (arguments `(#:tests? #f))
3082 ;; Note: As of version 1.7 the documentation is not worth building.
3083 (home-page "https://github.com/jaraco/rst.linker")
3084 (synopsis "Sphinx plugin to add links and timestamps")
3085 (description "rst.linker allows to automatically replace text by a
3086reStructuredText external reference or timestamps. It's primary purpose is to
3087augment the changelog, but it can be used for other documents, too.")
3088 (license license:expat)))
3089
3090(define-public python2-rst.linker
3091 (package-with-python2 python-rst.linker))
3092
f4de5b3b
CAW
3093(define-public python-feedgenerator
3094 (package
3095 (name "python-feedgenerator")
f0412aa2 3096 (version "1.8")
f4de5b3b 3097 (source
f4de5b3b 3098 (origin
f0412aa2
EF
3099 (method url-fetch)
3100 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3101 (sha256
3102 (base32
7c88bcf4
HG
3103 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3104 (modules '((guix build utils)))
3105 (snippet
3106 '(begin
3107 ;; Remove pre-compiled .pyc files from source.
3108 (for-each delete-file-recursively
3109 (find-files "." "__pycache__" #:directories? #t))
3110 (for-each delete-file (find-files "." "\\.pyc$"))
3111 #t))))
f4de5b3b 3112 (build-system python-build-system)
dae73d9b 3113 (propagated-inputs
f3b98f4f 3114 `(("python-pytz" ,python-pytz)
f4de5b3b 3115 ("python-six" ,python-six)))
f0412aa2 3116 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3117 (synopsis
3118 "Standalone version of Django's Atom/RSS feed generator")
3119 (description
3120 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3121which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3122 (license license:bsd-3)))
f4de5b3b
CAW
3123
3124(define-public python2-feedgenerator
3125 (package-with-python2 python-feedgenerator))
3126
59ad30e3
CAW
3127(define-public python-blinker
3128 (package
3129 (name "python-blinker")
7fb9ff4d 3130 (version "1.4")
59ad30e3
CAW
3131 (source
3132 (origin
3133 (method url-fetch)
7fb9ff4d 3134 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3135 (sha256
3136 (base32
7fb9ff4d 3137 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3138 (build-system python-build-system)
59ad30e3
CAW
3139 (home-page "http://pythonhosted.org/blinker/")
3140 (synopsis "Fast, simple object-to-object and broadcast signaling")
3141 (description
3142 "Blinker provides a fast dispatching system that allows any number of
3143interested parties to subscribe to events, or \"signals\".")
3144 (license license:expat)))
3145
3146(define-public python2-blinker
3147 (package-with-python2 python-blinker))
3148
b8050e71
CAW
3149(define-public pelican
3150 (package
3151 (name "pelican")
11f97c27 3152 (version "3.6.3")
b8050e71
CAW
3153 (source
3154 (origin
3155 (method url-fetch)
11f97c27 3156 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3157 (sha256
3158 (base32
11f97c27 3159 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3160 (build-system python-build-system)
f22efa01 3161 (propagated-inputs
b8050e71
CAW
3162 `(("python-feedgenerator" ,python-feedgenerator)
3163 ("python-jinja2" ,python-jinja2)
3164 ("python-pygments" ,python-pygments)
3165 ("python-docutils" ,python-docutils)
3166 ("python-pytz" ,python-pytz)
3167 ("python-blinker" ,python-blinker)
3168 ("python-unidecode" ,python-unidecode)
3169 ("python-six" ,python-six)
22d7360b 3170 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3171 (home-page "http://getpelican.com/")
3172 (arguments
3173 `(;; XXX Requires a lot more packages to do unit tests :P
3174 #:tests? #f
3175 #:phases (modify-phases %standard-phases
3176 (add-before
3177 'install 'adjust-requires
3178 ;; Since feedgenerator is installed from git, it doesn't
3179 ;; conform to the version requirements.
3180 ;;
3181 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3182 ;; version requirement so setuptools doesn't get confused.
3183 (lambda _
3184 (substitute* "setup.py"
3185 (("['\"]feedgenerator.*?['\"]")
3186 "'feedgenerator'")))))))
3187 (synopsis "Python-based static site publishing system")
3188 (description
3189 "Pelican is a tool to generate a static blog from reStructuredText,
3190Markdown input files, and more. Pelican uses Jinja2 for templating
3191and is very extensible.")
3f641af0 3192 (license license:agpl3+)))
b8050e71 3193
240ca4aa
RW
3194(define-public python-scikit-learn
3195 (package
3196 (name "python-scikit-learn")
8e401ab6 3197 (version "0.18.1")
240ca4aa
RW
3198 (source
3199 (origin
3200 (method url-fetch)
3201 (uri (string-append
3202 "https://github.com/scikit-learn/scikit-learn/archive/"
3203 version ".tar.gz"))
7e21b9fb 3204 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3205 (sha256
3206 (base32
8e401ab6 3207 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3208 (build-system python-build-system)
3209 (arguments
3210 `(#:phases
3211 (alist-cons-before
2f6b3d2e
RW
3212 'check 'set-HOME
3213 ;; some tests require access to "$HOME"
3214 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3215 %standard-phases)))
240ca4aa 3216 (inputs
328bb95d
HG
3217 `(("openblas" ,openblas)))
3218 (native-inputs
8e401ab6
RW
3219 `(("python-nose" ,python-nose)
3220 ("python-cython" ,python-cython)))
240ca4aa
RW
3221 (propagated-inputs
3222 `(("python-numpy" ,python-numpy)
3223 ("python-scipy" ,python-scipy)))
3224 (home-page "http://scikit-learn.org/")
3225 (synopsis "Machine Learning in Python")
3226 (description
3227 "Scikit-learn provides simple and efficient tools for data
3228mining and data analysis.")
1b5241c5 3229 (license license:bsd-3)))
240ca4aa
RW
3230
3231(define-public python2-scikit-learn
1b5241c5 3232 (package-with-python2 python-scikit-learn))
240ca4aa 3233
12f8f9bb
RW
3234(define-public python-scikit-image
3235 (package
3236 (name "python-scikit-image")
3237 (version "0.11.3")
3238 (source
3239 (origin
3240 (method url-fetch)
3241 (uri (string-append
3242 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3243 version ".tar.gz"))
3244 (sha256
3245 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3246 (build-system python-build-system)
9026e689
MB
3247 (arguments
3248 ;; TODO: Some tests require running X11 server. Disable them?
3249 '(#:tests? #f))
b83e2333 3250 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3251 (propagated-inputs
3252 `(("python-matplotlib" ,python-matplotlib)
3253 ("python-networkx" ,python-networkx)
12f8f9bb 3254 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3255 ("python-pillow" ,python-pillow)))
3256 (native-inputs
b83e2333
HG
3257 `(("python-numpy" ,python-numpy)
3258 ("python-cython" ,python-cython)
3259 ("python-six" ,python-six)))
12f8f9bb
RW
3260 (home-page "http://scikit-image.org/")
3261 (synopsis "Image processing in Python")
3262 (description
e881752c 3263 "Scikit-image is a collection of algorithms for image processing.")
12733594 3264 (license license:bsd-3)))
12f8f9bb
RW
3265
3266(define-public python2-scikit-image
12733594 3267 (package-with-python2 python-scikit-image))
12f8f9bb 3268
5394a6a6
RW
3269(define-public python-redis
3270 (package
3271 (name "python-redis")
911a8faf 3272 (version "2.10.5")
5394a6a6
RW
3273 (source
3274 (origin
3275 (method url-fetch)
911a8faf 3276 (uri (pypi-uri "redis" version))
5394a6a6 3277 (sha256
911a8faf 3278 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3279 (build-system python-build-system)
3280 ;; Tests require a running Redis server
3281 (arguments '(#:tests? #f))
cf8124b0
HG
3282 ;; As long as we are not running test, we do not need this input :-)
3283 ;;(native-inputs
3284 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3285 (home-page "https://github.com/andymccurdy/redis-py")
3286 (synopsis "Redis Python client")
3287 (description
3288 "This package provides a Python interface to the Redis key-value store.")
3289 (license license:expat)))
3290
3291(define-public python2-redis
3292 (package-with-python2 python-redis))
3293
748cef5b
RW
3294(define-public python-rq
3295 (package
3296 (name "python-rq")
3297 (version "0.5.2")
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (string-append
3302 "https://pypi.python.org/packages/source/r/rq/rq-"
3303 version ".tar.gz"))
3304 (sha256
3305 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3306 (build-system python-build-system)
3307 (propagated-inputs
3308 `(("python-click" ,python-click)
3309 ("python-redis" ,python-redis)))
748cef5b
RW
3310 (home-page "http://python-rq.org/")
3311 (synopsis "Simple job queues for Python")
3312 (description
3313 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3314processing them in the background with workers. It is backed by Redis and it
3315is designed to have a low barrier to entry.")
3f641af0 3316 (license license:bsd-2)))
748cef5b
RW
3317
3318(define-public python2-rq
3319 (package-with-python2 python-rq))
3320
6888830b
FB
3321(define-public python-cython
3322 (package
3323 (name "python-cython")
dd22efef 3324 (version "0.24.1")
6888830b
FB
3325 (source
3326 (origin
3327 (method url-fetch)
56918e26 3328 (uri (pypi-uri "Cython" version))
6888830b
FB
3329 (sha256
3330 (base32
dd22efef 3331 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3332 (build-system python-build-system)
3333 ;; we need the full python package and not just the python-wrapper
3334 ;; because we need libpython3.3m.so
3335 (inputs
3336 `(("python" ,python)))
3337 (arguments
3338 `(#:phases
b92f651b
EF
3339 (modify-phases %standard-phases
3340 (add-before 'check 'set-HOME
3341 ;; some tests require access to "$HOME/.cython"
3342 (lambda _ (setenv "HOME" "/tmp")))
3343 (replace 'check
3344 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3345 (home-page "http://cython.org/")
3346 (synopsis "C extensions for Python")
3347 (description "Cython is an optimising static compiler for both the Python
3348programming language and the extended Cython programming language. It makes
3349writing C extensions for Python as easy as Python itself.")
3f641af0 3350 (license license:asl2.0)
48b311b1 3351 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3352
3353(define-public python2-cython
48b311b1
LC
3354 (package (inherit (package-with-python2
3355 (strip-python2-variant python-cython)))
6888830b
FB
3356 (name "python2-cython")
3357 (inputs
3358 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3359
ee5fb7ee
AV
3360;; The RPython toolchain currently does not support Python 3.
3361(define-public python2-rpython
3362 (package
3363 (name "python2-rpython")
3364 (version "0.1.4")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "rpython" version))
3369 (sha256
3370 (base32
3371 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3372 (build-system python-build-system)
3373 (arguments `(#:python ,python-2))
3374 (native-inputs
f3b98f4f 3375 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3376 (home-page "https://rpython.readthedocs.org")
3377 (synopsis "Framework for implementing interpreters and virtual machines")
3378 (description "RPython is a translation and support framework for
3379producing implementations of dynamic languages, emphasizing a clean separation
3380between language specification and implementation aspects.")
3381 (license license:expat)))
3382
0da98533
FB
3383;; This version of numpy is missing the documentation and is only used to
3384;; build matplotlib which is required to build numpy's documentation.
3385(define python-numpy-bootstrap
3386 (package
3387 (name "python-numpy-bootstrap")
ef9b4c04 3388 (version "1.10.4")
0da98533
FB
3389 (source
3390 (origin
3391 (method url-fetch)
de67e922 3392 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3393 "/numpy-" version ".tar.gz"))
3394 (sha256
3395 (base32
ef9b4c04 3396 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3397 (build-system python-build-system)
3398 (inputs
328bb95d 3399 `(("openblas" ,openblas)
cba256f8 3400 ("lapack" ,lapack)))
0da98533 3401 (native-inputs
2efabc55
HG
3402 `(("python-nose" ,python-nose)
3403 ("gfortran" ,gfortran)))
0da98533
FB
3404 (arguments
3405 `(#:phases
2efabc55
HG
3406 (modify-phases %standard-phases
3407 (add-before 'build 'set-environment-variables
3408 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3409 (call-with-output-file "site.cfg"
3410 (lambda (port)
cba256f8
RW
3411 (format port
3412 "[openblas]
dbdfe515
RW
3413libraries = openblas
3414library_dirs = ~a/lib
3415include_dirs = ~a/include
cba256f8 3416
2efabc55
HG
3417# backslash-n to make emacs happy
3418\n[lapack]
cba256f8
RW
3419lapack_libs = lapack
3420library_dirs = ~a/lib
3421include_dirs = ~a/include
3422"
3423 (assoc-ref inputs "openblas")
3424 (assoc-ref inputs "openblas")
3425 (assoc-ref inputs "lapack")
3426 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3427 ;; Use "gcc" executable, not "cc".
3428 (substitute* "numpy/distutils/system_info.py"
3429 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3430 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3431 #t))
6a843168
FB
3432 ;; Tests can only be run after the library has been installed and not
3433 ;; within the source directory.
2efabc55
HG
3434 (delete 'check)
3435 (add-after 'install 'check
3436 (lambda* (#:key outputs inputs #:allow-other-keys)
3437 ;; Make installed package available for running the tests
3438 (add-installed-pythonpath inputs outputs)
6a843168 3439 (with-directory-excursion "/tmp"
89b5c60e 3440 (zero? (system* "python" "-c"
2efabc55 3441 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3442 (home-page "http://www.numpy.org/")
3443 (synopsis "Fundamental package for scientific computing with Python")
3444 (description "NumPy is the fundamental package for scientific computing
e881752c 3445with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3446object, sophisticated (broadcasting) functions, tools for integrating C/C++
3447and Fortran code, useful linear algebra, Fourier transform, and random number
3448capabilities.")
3f641af0 3449 (license license:bsd-3)))
0da98533
FB
3450
3451(define python2-numpy-bootstrap
3452 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3453
460fccd4 3454(define-public python-munch
3455 (package
3456 (name "python-munch")
3457 (version "2.0.4")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "munch" version))
3462 (sha256
3463 (base32
3464 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3465 (build-system python-build-system)
3466 (home-page "https://github.com/Infinidat/munch")
3467 (synopsis "Dot-accessible dictionary")
3468 (description "Munch is a dot-accessible dictionary similar to JavaScript
3469objects.")
3470 (license license:expat)))
3471
3472(define-public python2-munch
3473 (package-with-python2 python-munch))
3474
3a1bfe18
RW
3475(define-public python2-fastlmm
3476 (package
3477 (name "python2-fastlmm")
594358f5 3478 (version "0.2.26")
3a1bfe18
RW
3479 (source
3480 (origin
3481 (method url-fetch)
b074e7d4 3482 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3483 (sha256
3484 (base32
594358f5 3485 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3a1bfe18
RW
3486 (build-system python-build-system)
3487 (arguments
3488 `(#:python ,python-2)) ; only Python 2.7 is supported
3489 (propagated-inputs
3490 `(("python2-numpy" ,python2-numpy)
3491 ("python2-scipy" ,python2-scipy)
3492 ("python2-matplotlib" ,python2-matplotlib)
3493 ("python2-pandas" ,python2-pandas)
3494 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3495 ("python2-pysnptools" ,python2-pysnptools)))
3496 (native-inputs
3497 `(("unzip" ,unzip)
2efabc55 3498 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3499 ("python2-mock" ,python2-mock)
3500 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3501 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3502 (synopsis "Perform genome-wide association studies on large data sets")
3503 (description
3504 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3505Models, is a program for performing both single-SNP and SNP-set genome-wide
3506association studies (GWAS) on extremely large data sets.")
3f641af0 3507 (license license:asl2.0)))
3a1bfe18 3508
2ee8869a
FB
3509(define-public python-numpy
3510 (package (inherit python-numpy-bootstrap)
3511 (name "python-numpy")
3512 (outputs '("out" "doc"))
89b5c60e 3513 (inputs
b0aa6ede
HG
3514 `(("which" ,which)
3515 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3516 (propagated-inputs
3517 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3518 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3519 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3520 (native-inputs
3521 `(("pkg-config" ,pkg-config)
2efabc55
HG
3522 ("python-sphinx" ,python-sphinx)
3523 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3524 ("texlive" ,texlive)
3525 ("texinfo" ,texinfo)
3526 ("perl" ,perl)
3527 ,@(package-native-inputs python-numpy-bootstrap)))
3528 (arguments
89b5c60e 3529 `(,@(substitute-keyword-arguments
2ee8869a
FB
3530 (package-arguments python-numpy-bootstrap)
3531 ((#:phases phases)
3532 `(alist-cons-after
3533 'install 'install-doc
2efabc55
HG
3534 (lambda* (#:key inputs outputs #:allow-other-keys)
3535 ;; Make installed package available for building the
3536 ;; documentation
3537 (add-installed-pythonpath inputs outputs)
2ee8869a 3538 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3539 (doc (string-append
3540 data "/doc/" ,name "-"
2ee8869a
FB
3541 ,(package-version python-numpy-bootstrap)))
3542 (info (string-append data "/info"))
3543 (html (string-append doc "/html"))
3544 (pyver ,(string-append "PYVER=")))
3545 (with-directory-excursion "doc"
3546 (mkdir-p html)
3547 (system* "make" "html" pyver)
3548 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3549 (system* "make" "-C" "build/latex"
2ee8869a
FB
3550 "all-pdf" "PAPER=a4" pyver)
3551 ;; FIXME: Generation of the info file fails.
3552 ;; (system* "make" "info" pyver)
3553 ;; (mkdir-p info)
3554 ;; (copy-file "build/texinfo/numpy.info"
3555 ;; (string-append info "/numpy.info"))
3556 (for-each (lambda (file)
3557 (copy-file (string-append "build/latex" file)
3558 (string-append doc file)))
3559 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3560 (with-directory-excursion "build/html"
3561 (for-each (lambda (file)
3562 (let* ((dir (dirname file))
3563 (tgt-dir (string-append html "/" dir)))
3564 (unless (equal? "." dir)
3565 (mkdir-p tgt-dir))
96c46210 3566 (install-file file html)))
2ee8869a
FB
3567 (find-files "." ".*"))))))
3568 ,phases)))))))
3569
764c077b 3570(define-public python2-numpy
57b7b8cd 3571 (package-with-python2 python-numpy))
2ee8869a 3572
0151a8df 3573(define-public python-pygit2
3574 (package
3575 (name "python-pygit2")
022c9772 3576 (version "0.25.0")
0151a8df 3577 (source
3578 (origin
3579 (method url-fetch)
3580 (uri (pypi-uri "pygit2" version))
3581 (sha256
3582 (base32
bb6043fe
MB
3583 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3584 (patches
3585 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3586 (build-system python-build-system)
3587 (propagated-inputs
3588 `(("python-six" ,python-six)
3589 ("python-cffi" ,python-cffi)
3590 ("libgit2" ,libgit2)
3591 ("python-tox" ,python-tox)))
3592 (home-page "https://github.com/libgit2/pygit2")
3593 (synopsis "Python bindings for libgit2")
3594 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3595library, libgit2 implements Git plumbing.")
3596 ;; GPL2.0 only, with linking exception.
3597 (license license:gpl2)))
3598
3599(define-public python2-pygit2
3600 (package-with-python2 python-pygit2))
3601
15bfe6d6
FB
3602(define-public python-pyparsing
3603 (package
3604 (name "python-pyparsing")
e0669289 3605 (version "2.0.3")
15bfe6d6
FB
3606 (source
3607 (origin
3608 (method url-fetch)
de67e922
LF
3609 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3610 "/pyparsing-" version
15bfe6d6
FB
3611 "/pyparsing-" version ".tar.gz"))
3612 (sha256
3613 (base32
e0669289 3614 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3615 (build-system python-build-system)
3616 (outputs '("out" "doc"))
3617 (arguments
3618 `(#:tests? #f ; no test target
3619 #:modules ((guix build python-build-system)
3620 (guix build utils))
3621 #:phases
3622 (alist-cons-after
3623 'install 'install-doc
3624 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3625 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3626 "/share/doc/" ,name "-" ,version))
3627 (html-doc (string-append doc "/html"))
3628 (examples (string-append doc "/examples")))
3629 (mkdir-p html-doc)
3630 (mkdir-p examples)
89b5c60e 3631 (for-each
15bfe6d6 3632 (lambda (dir tgt)
89b5c60e 3633 (map (lambda (file)
96c46210 3634 (install-file file tgt))
15bfe6d6
FB
3635 (find-files dir ".*")))
3636 (list "docs" "htmldoc" "examples")
3637 (list doc html-doc examples))))
3638 %standard-phases)))
3639 (home-page "http://pyparsing.wikispaces.com")
3640 (synopsis "Python parsing class library")
3641 (description
3642 "The pyparsing module is an alternative approach to creating and
3643executing simple grammars, vs. the traditional lex/yacc approach, or the use
3644of regular expressions. The pyparsing module provides a library of classes
3645that client code uses to construct the grammar directly in Python code.")
bd3fa666 3646 (license license:expat)))
15bfe6d6
FB
3647
3648(define-public python2-pyparsing
3649 (package-with-python2 python-pyparsing))
3650
ec00de35
FB
3651(define-public python-numpydoc
3652 (package
3653 (name "python-numpydoc")
3654 (version "0.5")
3655 (source
3656 (origin
3657 (method url-fetch)
89b5c60e 3658 (uri (string-append
ec00de35
FB
3659 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3660 version ".tar.gz"))
3661 (sha256
3662 (base32
5e4d8f67
AE
3663 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3664 (modules '((guix build utils)))
3665 (snippet
3666 '(begin
3667 ;; Drop a test requiring matplotlib, which we cannot add as an
3668 ;; input since it would create a circular dependency: Extend the
3669 ;; test for Python 3, where it is already dropped, to Python 2.
3670 (substitute* "numpydoc/tests/test_plot_directive.py"
3671 (("3") "2"))))))
ec00de35 3672 (build-system python-build-system)
fe4a8da4 3673 (propagated-inputs
213d1745
HG
3674 `(("python-sphinx" ,python-sphinx)))
3675 (native-inputs
3676 `(("python-nose" ,python-nose)))
ec00de35
FB
3677 (home-page "https://pypi.python.org/pypi/numpydoc")
3678 (synopsis
3679 "Numpy's Sphinx extensions")
3680 (description
3681 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3682 (license license:bsd-2)))
ec00de35
FB
3683
3684(define-public python2-numpydoc
5e4d8f67 3685 (package-with-python2 python-numpydoc))
1c65314c 3686
1e656049
RW
3687(define-public python-numexpr
3688 (package
3689 (name "python-numexpr")
2ee57340 3690 (version "2.6.1")
1e656049
RW
3691 (source
3692 (origin
3693 (method url-fetch)
26112c0a 3694 (uri (pypi-uri "numexpr" version))
1e656049
RW
3695 (sha256
3696 (base32
2ee57340 3697 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3698 (build-system python-build-system)
3699 (arguments `(#:tests? #f)) ; no tests included
3700 (propagated-inputs
3701 `(("python-numpy" ,python-numpy)))
3702 (home-page "https://github.com/pydata/numexpr")
3703 (synopsis "Fast numerical expression evaluator for NumPy")
3704 (description
3705 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3706expressions that operate on arrays are accelerated and use less memory than
3707doing the same calculation in Python. In addition, its multi-threaded
3708capabilities can make use of all your cores, which may accelerate
3709computations, most specially if they are not memory-bounded (e.g. those using
3710transcendental functions).")
f210e944 3711 (license license:expat)))
1e656049
RW
3712
3713(define-public python2-numexpr
f210e944 3714 (package-with-python2 python-numexpr))
1e656049 3715
1c65314c
FB
3716(define-public python-matplotlib
3717 (package
3718 (name "python-matplotlib")
1bbc659f 3719 (version "1.4.3")
1c65314c
FB
3720 (source
3721 (origin
3722 (method url-fetch)
de67e922
LF
3723 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3724 "/matplotlib-" version
1c65314c
FB
3725 "/matplotlib-" version ".tar.gz"))
3726 (sha256
3727 (base32
1bbc659f 3728 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3729 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3730 (build-system python-build-system)
3731 (outputs '("out" "doc"))
25f9a068
FB
3732 (propagated-inputs ; the following packages are all needed at run time
3733 `(("python-pyparsing" ,python-pyparsing)
3734 ("python-pygobject" ,python-pygobject)
3735 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3736 ("python-tkinter" ,python "tk")
22d7360b 3737 ("python-dateutil" ,python-dateutil)
ca33a3ad
HG
3738 ("python-numpy" ,python-numpy-bootstrap)
3739 ("python-pillow" ,python-pillow)
3740 ("python-pytz" ,python-pytz)
3741 ("python-six" ,python-six)
25f9a068
FB
3742 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3743 ;; from 'gtk+') provides the required 'typelib' files used by
3744 ;; 'gobject-introspection'. The location of these files is set with the
3745 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3746 ;; is done automatically by a 'native-search-path' procedure. However,
3747 ;; at run-time the user must set this variable as follows:
3748 ;;
3749 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3750 ("gtk+" ,gtk+)
3751 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3752 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3753 ;; object. For this reason we need to import both libraries.
3754 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3755 ("python-pycairo" ,python-pycairo)
3756 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3757 (inputs
ca33a3ad 3758 `(("libpng" ,libpng)
1c65314c
FB
3759 ("imagemagick" ,imagemagick)
3760 ("freetype" ,freetype)
25f9a068
FB
3761 ("cairo" ,cairo)
3762 ("glib" ,glib)
1c65314c 3763 ;; FIXME: Add backends when available.
1c65314c
FB
3764 ;("python-wxpython" ,python-wxpython)
3765 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3766 ("tcl" ,tcl)
3767 ("tk" ,tk)))
1c65314c
FB
3768 (native-inputs
3769 `(("pkg-config" ,pkg-config)
a50e0301 3770 ("python-sphinx" ,python-sphinx-1.2.3)
ca33a3ad
HG
3771 ("python-numpydoc" ,python-numpydoc)
3772 ("python-nose" ,python-nose)
3773 ("python-mock" ,python-mock)
1c65314c
FB
3774 ("texlive" ,texlive)
3775 ("texinfo" ,texinfo)))
3776 (arguments
3777 `(#:phases
42b7009a
DM
3778 (modify-phases %standard-phases
3779 (add-before 'build 'configure-environment
3780 (lambda* (#:key outputs inputs #:allow-other-keys)
3781 (let ((cairo (assoc-ref inputs "cairo"))
3782 (gtk+ (assoc-ref inputs "gtk+")))
3783 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3784 ;; has not effect.
3785 (setenv "LD_LIBRARY_PATH"
3786 (string-append cairo "/lib:" gtk+ "/lib"))
3787 (setenv "HOME" (getcwd))
3788 (call-with-output-file "setup.cfg"
3789 (lambda (port)
3790 (format port "[directories]~%
1bbc659f 3791basedirlist = ~a,~a~%
57b7b8cd 3792 [rc_options]~%
1bbc659f 3793backend = TkAgg~%"
42b7009a 3794 (assoc-ref inputs "tcl")
fdcbf10b
DM
3795 (assoc-ref inputs "tk"))))
3796 #t)))
42b7009a
DM
3797 (add-after 'install 'install-doc
3798 (lambda* (#:key inputs outputs #:allow-other-keys)
3799 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3800 (doc (string-append data "/doc/" ,name "-" ,version))
3801 (info (string-append data "/info"))
3802 (html (string-append doc "/html")))
3803 ;; Make installed package available for building the
3804 ;; documentation
3805 (add-installed-pythonpath inputs outputs)
3806 (with-directory-excursion "doc"
3807 ;; Produce pdf in 'A4' format.
3808 (substitute* (find-files "." "conf\\.py")
3809 (("latex_paper_size = 'letter'")
3810 "latex_paper_size = 'a4'"))
84e0f8c1
DM
3811 (substitute* "users/intro.rst"
3812 ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>)
3813 (("[[][*][]]") "[#]"))
42b7009a
DM
3814 (mkdir-p html)
3815 (mkdir-p info)
3816 ;; The doc recommends to run the 'html' target twice.
3817 (system* "python" "make.py" "html")
3818 (system* "python" "make.py" "html")
3819 (copy-recursively "build/html" html)
3820 (system* "python" "make.py" "latex")
3821 (system* "python" "make.py" "texinfo")
18b31516 3822 (symlink (string-append html "/_images")
42b7009a
DM
3823 (string-append info "/matplotlib-figures"))
3824 (with-directory-excursion "build/texinfo"
3825 (substitute* "matplotlib.texi"
3826 (("@image\\{([^,]*)" all file)
3827 (string-append "@image{matplotlib-figures/" file)))
3828 (symlink (string-append html "/_images")
3829 "./matplotlib-figures")
3830 (system* "makeinfo" "--no-split"
3831 "-o" "matplotlib.info" "matplotlib.texi"))
3832 (copy-file "build/texinfo/matplotlib.info"
3833 (string-append info "/matplotlib.info"))
3834 (copy-file "build/latex/Matplotlib.pdf"
fdcbf10b
DM
3835 (string-append doc "/Matplotlib.pdf")))
3836 #t))))))
1c65314c
FB
3837 (home-page "http://matplotlib.org")
3838 (synopsis "2D plotting library for Python")
3839 (description
3840 "Matplotlib is a Python 2D plotting library which produces publication
3841quality figures in a variety of hardcopy formats and interactive environments
3842across platforms. Matplotlib can be used in Python scripts, the python and
3843ipython shell, web application servers, and six graphical user interface
3844toolkits.")
3f641af0 3845 (license license:psfl)
57b7b8cd 3846 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3847
764c077b 3848(define-public python2-matplotlib
57b7b8cd
LC
3849 (let ((matplotlib (package-with-python2
3850 (strip-python2-variant python-matplotlib))))
764c077b 3851 (package (inherit matplotlib)
88c26834
AE
3852 ;; Make sure to use special packages for Python 2 instead
3853 ;; of those automatically rewritten by package-with-python2.
a50e0301
MB
3854 (native-inputs
3855 `(("python2-sphinx" ,python2-sphinx-1.2.3)
3856 ,@(fold alist-delete (package-native-inputs matplotlib)
3857 '("python-sphinx"))))
89b5c60e 3858 (propagated-inputs
7ca0dbc3 3859 `(("python2-pycairo" ,python2-pycairo)
764c077b 3860 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3861 ("python2-tkinter" ,python-2 "tk")
3862 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3863 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3864
0dde6232
RW
3865(define-public python2-pysnptools
3866 (package
3867 (name "python2-pysnptools")
a800018e 3868 (version "0.3.9")
0dde6232
RW
3869 (source
3870 (origin
3871 (method url-fetch)
3f2e9675 3872 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3873 (sha256
3874 (base32
a800018e 3875 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3876 (build-system python-build-system)
3877 (arguments
3878 `(#:python ,python-2)) ; only Python 2.7 is supported
3879 (propagated-inputs
3880 `(("python2-numpy" ,python2-numpy)
3881 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3882 ("python2-pandas" ,python2-pandas)))
3883 (native-inputs
3884 `(("python2-cython" ,python2-cython)))
0dde6232 3885 (native-inputs
f3b98f4f 3886 `(("unzip" ,unzip)))
0dde6232
RW
3887 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3888 (synopsis "Library for reading and manipulating genetic data")
3889 (description
3890 "PySnpTools is a library for reading and manipulating genetic data. It
3891can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3892those files. It can also efficiently manipulate ranges of integers using set
3893operators such as union, intersection, and difference.")
3f641af0 3894 (license license:asl2.0)))
0dde6232 3895
c9b1b4f9
RW
3896(define-public python-rpy2
3897 (package
3898 (name "python-rpy2")
ec3bcbc7 3899 (version "2.7.6")
c9b1b4f9
RW
3900 (source
3901 (origin
3902 (method url-fetch)
ec3bcbc7 3903 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3904 (sha256
3905 (base32
ec3bcbc7 3906 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3907 (build-system python-build-system)
444464ec
MB
3908 (arguments
3909 '(#:phases
3910 (modify-phases %standard-phases
3911 (delete 'check)
3912 (add-after 'install 'check
3913 (lambda* (#:key outputs inputs #:allow-other-keys)
3914 ;; It's easier to run tests after install.
3915 ;; Make installed package available for running the tests
3916 (add-installed-pythonpath inputs outputs)
3917 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3918 (propagated-inputs
3919 `(("python-six" ,python-six)))
c9b1b4f9 3920 (inputs
482d9591 3921 `(("readline" ,readline)
c9b1b4f9
RW
3922 ("icu4c" ,icu4c)
3923 ("pcre" ,pcre)
3924 ("r" ,r)))
3925 (native-inputs
f3b98f4f 3926 `(("zlib" ,zlib)))
c9b1b4f9
RW
3927 (home-page "http://rpy.sourceforge.net/")
3928 (synopsis "Python interface to the R language")
3929 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3930low-level interface to R from Python, a proposed high-level interface,
3931including wrappers to graphical libraries, as well as R-like structures and
3932functions.")
3f641af0 3933 (license license:gpl3+)))
c9b1b4f9
RW
3934
3935(define-public python2-rpy2
3936 (let ((rpy2 (package-with-python2 python-rpy2)))
3937 (package (inherit rpy2)
3938 (native-inputs
3939 `(("python2-singledispatch" ,python2-singledispatch)
3940 ,@(package-native-inputs rpy2))))))
3941
bb986599
FB
3942(define-public python-scipy
3943 (package
3944 (name "python-scipy")
ba8a0824 3945 (version "0.16.0")
bb986599
FB
3946 (source
3947 (origin
3948 (method url-fetch)
de67e922
LF
3949; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3950 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3951 "/scipy-" version ".tar.xz"))
bb986599
FB
3952 (sha256
3953 (base32
ba8a0824 3954 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3955 (build-system python-build-system)
dd86c0d1 3956 (propagated-inputs
bb986599
FB
3957 `(("python-numpy" ,python-numpy)
3958 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3959 ("python-pyparsing" ,python-pyparsing)))
3960 (inputs
3961 `(("lapack" ,lapack)
719b01c1 3962 ("openblas" ,openblas)))
bb986599 3963 (native-inputs
dd86c0d1 3964 `(("python-nose" ,python-nose)
a50e0301 3965 ("python-sphinx" ,python-sphinx-1.2.3)
5248d49e 3966 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3967 ("gfortran" ,gfortran)
bb986599
FB
3968 ("texlive" ,texlive)
3969 ("perl" ,perl)))
3970 (outputs '("out" "doc"))
3971 (arguments
3972 `(#:phases
16ca6aaa
MB
3973 (modify-phases %standard-phases
3974 (add-after 'unpack 'fix-tests
3975 (lambda _
3976 (substitute* "scipy/integrate/tests/test_quadpack.py"
3977 (("libm.so") "libm.so.6"))
db967b64 3978 #t))
16ca6aaa
MB
3979 (add-before 'build 'configure-openblas
3980 (lambda* (#:key inputs #:allow-other-keys)
3981 (call-with-output-file "site.cfg"
3982 (lambda (port)
3983 (format port
3984 "[blas]
719b01c1
RW
3985libraries = openblas
3986library_dirs = ~a/lib
3987include_dirs = ~a/include
d548e6aa
HG
3988
3989# backslash-n to make emacs happy
3990\n[atlas]
719b01c1
RW
3991library_dirs = ~a/lib
3992atlas_libs = openblas
3993"
16ca6aaa
MB
3994 (assoc-ref inputs "openblas")
3995 (assoc-ref inputs "openblas")
3996 (assoc-ref inputs "openblas"))))
db967b64 3997 #t))
16ca6aaa
MB
3998 (delete 'check)
3999 (add-after 'install 'install-doc
4000 (lambda* (#:key inputs outputs #:allow-other-keys)
4001 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4002 (doc (string-append data "/doc/" ,name "-" ,version))
4003 (html (string-append doc "/html"))
4004 (pyver ,(string-append "PYVER=")))
4005 ;; Make installed package available for building the
4006 ;; documentation
4007 (add-installed-pythonpath inputs outputs)
4008 (with-directory-excursion "doc"
4009 ;; Fix generation of images for mathematical expressions.
4010 (substitute* (find-files "source" "conf\\.py")
4011 (("pngmath_use_preview = True")
4012 "pngmath_use_preview = False"))
4013 (mkdir-p html)
4014 (system* "make" "html" pyver)
4015 (system* "make" "latex" "PAPER=a4" pyver)
4016 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
4017 (copy-file "build/latex/scipy-ref.pdf"
4018 (string-append doc "/scipy-ref.pdf"))
4019 (with-directory-excursion "build/html"
4020 (for-each (lambda (file)
4021 (let* ((dir (dirname file))
4022 (tgt-dir (string-append html "/" dir)))
4023 (install-file file html)))
4024 (find-files "." ".*"))))
4025 #t)))
4026 (add-after 'install-doc 'check
4027 (lambda _
4028 ;; Tests can only be run after the library has been installed and not
4029 ;; within the source directory.
4030 (with-directory-excursion "/tmp"
db967b64 4031 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))))))
bb986599
FB
4032 (home-page "http://www.scipy.org/")
4033 (synopsis "The Scipy library provides efficient numerical routines")
4034 (description "The SciPy library is one of the core packages that make up
4035the SciPy stack. It provides many user-friendly and efficient numerical
4036routines such as routines for numerical integration and optimization.")
3f641af0 4037 (license license:bsd-3)))
bb986599 4038
764c077b 4039(define-public python2-scipy
a50e0301
MB
4040 (let ((scipy (package-with-python2
4041 (strip-python2-variant python-scipy))))
4042 (package (inherit scipy)
4043 ;; Make sure to use special packages for Python 2 instead
4044 ;; of those automatically rewritten by package-with-python2.
4045 (native-inputs
4046 `(("python2-sphinx" ,python2-sphinx-1.2.3)
4047 ,@(fold alist-delete (package-native-inputs scipy)
4048 '("python-sphinx")))))))
bb986599 4049
73acc193 4050(define-public python-socksipy-branch
4051 (package
4052 (name "python-socksipy-branch")
4053 (version "1.01")
4054 (source
4055 (origin
4056 (method url-fetch)
4057 (uri (pypi-uri "SocksiPy-branch" version))
4058 (sha256
4059 (base32
4060 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4061 (build-system python-build-system)
4062 (arguments
4063 `(#:tests? #f)) ; There are no tests
4064 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4065 (synopsis "Python SOCKS module")
4066 (description
4067 "SocksiPy - A Python SOCKS client module. It provides a
4068socket-like interface that supports connections to any TCP
4069service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4070The original version was developed by Dan Haim, this is a
4071branch created by Mario Vilas to address some open issues,
4072as the original project seems to have been abandoned circa 2007.")
4073 (license license:bsd-3)))
4074
4075(define-public python2-socksipy-branch
4076 (package-with-python2 python-socksipy-branch))
4077
94914805
EB
4078(define-public python-sqlalchemy
4079 (package
4080 (name "python-sqlalchemy")
a4ba286b 4081 (version "1.0.12")
94914805
EB
4082 (source
4083 (origin
4084 (method url-fetch)
4085 (uri (string-append "https://pypi.python.org/packages/source/S/"
4086 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4087 (sha256
4088 (base32
a4ba286b 4089 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4090 (build-system python-build-system)
4091 (native-inputs
4092 `(("python-cython" ,python-cython) ;for c extensions
4093 ("python-pytest" ,python-pytest)
4094 ("python-mock" ,python-mock))) ;for tests
4095 (arguments
4096 `(#:phases (alist-replace
4097 'check
4098 (lambda _ (zero? (system* "py.test")))
4099 %standard-phases)))
4100 (home-page "http://www.sqlalchemy.org")
4101 (synopsis "Database abstraction library")
4102 (description
4103 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4104gives application developers the full power and flexibility of SQL. It
4105provides a full suite of well known enterprise-level persistence patterns,
4106designed for efficient and high-performing database access, adapted into a
4107simple and Pythonic domain language.")
3f641af0 4108 (license license:x11)))
94914805
EB
4109
4110(define-public python2-sqlalchemy
4111 (package-with-python2 python-sqlalchemy))
c937562e 4112
4a093330
DM
4113(define-public python-pycodestyle
4114 (package
4115 (name "python-pycodestyle")
4116 (version "2.0.0")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "pycodestyle" version))
4121 (sha256
4122 (base32
4123 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4124 (build-system python-build-system)
4125 (home-page "https://pycodestyle.readthedocs.io/")
4126 (synopsis "Python style guide checker")
4127 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4128Python code against some of the style conventions in
4129@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4130 (license license:expat)))
4a093330
DM
4131
4132(define-public python2-pycodestyle
f210e944 4133 (package-with-python2 python-pycodestyle))
b91912c4
DM
4134
4135(define-public python-orderedmultidict
4136 (package
4137 (name "python-orderedmultidict")
9e2802cb 4138 (version "0.7.11")
b91912c4
DM
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (pypi-uri "orderedmultidict" version))
4143 (sha256
4144 (base32
9e2802cb 4145 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4146 (build-system python-build-system)
4147 (arguments
4148 `(#:phases
4149 (modify-phases %standard-phases
4150 (add-after 'unpack 'fix-tests
4151 (lambda _
4152 ;; The package uses nosetest for running the tests.
4153 ;; Adding this initfile allows to run the test suite
4154 ;; without requiring nosetest.
4155 (zero? (system* "touch" "tests/__init__.py")))))))
4156 (propagated-inputs
4157 `(("python-six" ,python-six)))
4158 (native-inputs
4159 `(("python-pycodestyle" ,python-pycodestyle)))
4160 (home-page "https://github.com/gruns/orderedmultidict")
4161 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4162 (description "This package contains a library for ordered multivalue
4163dictionaries. A multivalue dictionary is a dictionary that can store
4164multiple values for the same key. An ordered multivalue dictionary is a
4165multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4166 (license license:unlicense)))
b91912c4
DM
4167
4168(define-public python2-orderedmultidict
f210e944 4169 (package-with-python2 python-orderedmultidict))
9dede065
DM
4170
4171(define-public python-furl
4172 (package
4173 (name "python-furl")
4174 (version "0.5.6")
4175 (source
4176 (origin
4177 (method url-fetch)
4178 (uri (pypi-uri "furl" version))
4179 (sha256
4180 (base32
4181 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4182 (build-system python-build-system)
4183 (propagated-inputs
4184 `(("python-six" ,python-six)
4185 ("python-orderedmultidict" ,python-orderedmultidict)))
4186 (native-inputs
4187 `(("python-pycodestyle" ,python-pycodestyle)))
4188 (home-page "https://github.com/gruns/furl")
4189 (synopsis "URL manipulation in Python")
4190 (description "Furl provides an easy-to-use alternative to the
4191@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4192 (license license:unlicense)))
9dede065
DM
4193
4194(define-public python2-furl
f210e944 4195 (package-with-python2 python-furl))
462bf271
DM
4196
4197(define-public python-flask-babel
4198 (package
4199 (name "python-flask-babel")
4200 (version "0.11.1")
4201 (source
4202 (origin
4203 (method url-fetch)
4204 (uri (pypi-uri "Flask-Babel" version))
4205 (sha256
4206 (base32
4207 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4208 (build-system python-build-system)
4209 (propagated-inputs
4210 `(("python-flask" ,python-flask)
4211 ("python-babel" ,python-babel)
4212 ("python-jinja2" ,python-jinja2)
4213 ("python-pytz" ,python-pytz)))
4214 (home-page "https://github.com/python-babel/flask-babel")
4215 (synopsis "Add i18n/l10n support to Flask applications")
4216 (description "This package implements internationalization and localization
4217support for Flask. This is based on the Python babel module as well as pytz -
4218both of which are installed automatically if you install this library.")
f210e944 4219 (license license:bsd-3)))
462bf271
DM
4220
4221(define-public python2-flask-babel
f210e944 4222 (package-with-python2 python-flask-babel))
4a093330 4223
de2966cf
EF
4224(define-public python-sqlalchemy-utils
4225 (package
4226 (name "python-sqlalchemy-utils")
bb4b1706 4227 (version "0.32.11")
de2966cf
EF
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "SQLAlchemy-Utils" version))
4232 (sha256
4233 (base32
bb4b1706 4234 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4235 (build-system python-build-system)
35d56b7b
MB
4236 (arguments
4237 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4238 ;; #:phases
4239 ;; (modify-phases %standard-phases
4240 ;; (replace 'check
4241 ;; (lambda _
4242 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4243 (propagated-inputs
de2966cf
EF
4244 `(("python-six" ,python-six)
4245 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4246 (native-inputs
22d7360b 4247 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4248 ("python-flexmock" ,python-flexmock)
4249 ("python-psycopg2" ,python-psycopg2)
4250 ("python-pytest" ,python-pytest)
4251 ("python-pytz" ,python-pytz)))
de2966cf
EF
4252 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4253 (synopsis "Various utility functions for SQLAlchemy")
4254 (description
4255 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4256for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4257
4258You might also want to install the following optional dependencies:
4259@enumerate
4260@item @code{python-passlib}
4261@item @code{python-babel}
4262@item @code{python-cryptography}
4263@item @code{python-pytz}
4264@item @code{python-psycopg2}
4265@item @code{python-furl}
4266@item @code{python-flask-babel}
4267@end enumerate
4268")
de2966cf
EF
4269 (license license:bsd-3)))
4270
4271(define-public python2-sqlalchemy-utils
f210e944 4272 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4273
af5a4602
CAW
4274(define-public python-alembic
4275 (package
4276 (name "python-alembic")
4418990d 4277 (version "0.8.10")
af5a4602
CAW
4278 (source
4279 (origin
4280 (method url-fetch)
4281 (uri (pypi-uri "alembic" version))
4282 (sha256
4283 (base32
4418990d 4284 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4285 (build-system python-build-system)
4286 (native-inputs
4287 `(("python-mock" ,python-mock)
4288 ("python-pytest-cov" ,python-pytest-cov)))
4289 (propagated-inputs
4290 `(("python-sqlalchemy" ,python-sqlalchemy)
4291 ("python-mako" ,python-mako)
4292 ("python-editor" ,python-editor)))
4293 (home-page "http://bitbucket.org/zzzeek/alembic")
4294 (synopsis
4295 "Database migration tool for SQLAlchemy")
4296 (description
4297 "Alembic is a lightweight database migration tool for usage with the
4298SQLAlchemy Database Toolkit for Python.")
f210e944 4299 (license license:expat)))
af5a4602
CAW
4300
4301(define-public python2-alembic
f210e944 4302 (package-with-python2 python-alembic))
af5a4602 4303
138adbbe
TD
4304(define-public python-autopep8
4305 (package
4306 (name "python-autopep8")
4307 (version "1.2.4")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "autopep8" version))
4312 (sha256
4313 (base32
4314 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4315 (build-system python-build-system)
4316 (propagated-inputs
4317 `(("python-pep8" ,python-pep8)))
4318 (home-page "https://github.com/hhatto/autopep8")
4319 (synopsis "Format Python code according to the PEP 8 style guide")
4320 (description
4321 "@code{autopep8} automatically formats Python code to conform to
4322the PEP 8 style guide. It uses the pycodestyle utility to determine
4323what parts of the code needs to be formatted. @code{autopep8} is
4324capable of fixing most of the formatting issues that can be reported
4325by pycodestyle.")
4326 (license (license:non-copyleft
4327 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4328
4329(define-public python2-autopep8
4330 (package-with-python2 python-autopep8))
4331
1671c07c
EB
4332(define-public python-distutils-extra
4333 (package
4334 (name "python-distutils-extra")
4335 (version "2.38")
4336 (source
4337 (origin
4338 (method url-fetch)
4339 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4340 version "/+download/python-distutils-extra-"
4341 version ".tar.gz"))
4342 (sha256
4343 (base32
4344 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4345 (build-system python-build-system)
1671c07c
EB
4346 (home-page "https://launchpad.net/python-distutils-extra/")
4347 (synopsis "Enhancements to Python's distutils")
4348 (description
4349 "The python-distutils-extra module enables you to easily integrate
4350gettext support, themed icons, and scrollkeeper-based documentation into
4351Python's distutils.")
3f641af0 4352 (license license:gpl2)))
1671c07c
EB
4353
4354(define-public python2-distutils-extra
4355 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4356
4357(define-public python2-elib.intl
4358 (package
4359 (name "python2-elib.intl")
4360 (version "0.0.3")
4361 (source
4362 (origin
4363 ;; This project doesn't tag releases or publish tarballs, so we take
4364 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4365 (method git-fetch)
4366 (uri (git-reference
4367 (url "https://github.com/dieterv/elib.intl.git")
4368 (commit "d09997cfef")))
4369 (sha256
4370 (base32
4371 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4372 (build-system python-build-system)
ea5456c8
EB
4373 (arguments
4374 ;; incompatible with Python 3 (exception syntax)
4375 `(#:python ,python-2
b41a05ce 4376 #:tests? #f))
ea5456c8
EB
4377 (home-page "https://github.com/dieterv/elib.intl")
4378 (synopsis "Enhanced internationalization for Python")
4379 (description
4380 "The elib.intl module provides enhanced internationalization (I18N)
4381services for your Python modules and applications.")
3f641af0 4382 (license license:lgpl3+)))
ea5456c8 4383
c937562e
EB
4384(define-public python-pillow
4385 (package
4386 (name "python-pillow")
aba5182c 4387 (version "3.3.3")
c937562e
EB
4388 (source
4389 (origin
4390 (method url-fetch)
f1d9231d 4391 (uri (pypi-uri "Pillow" version))
c937562e
EB
4392 (sha256
4393 (base32
aba5182c 4394 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4395 (build-system python-build-system)
4396 (native-inputs
f3b98f4f 4397 `(("python-nose" ,python-nose)))
c937562e 4398 (inputs
5ff408d9
SB
4399 `(("freetype" ,freetype)
4400 ("lcms" ,lcms)
c937562e
EB
4401 ("zlib" ,zlib)
4402 ("libjpeg" ,libjpeg)
4403 ("openjpeg" ,openjpeg)
5ff408d9
SB
4404 ("libtiff" ,libtiff)
4405 ("libwebp" ,libwebp)))
c937562e 4406 (arguments
e5358a6b 4407 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4408 (add-after
4409 'install 'check-installed
6151120a 4410 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4411 (begin
4412 (setenv "HOME" (getcwd))
6151120a
HG
4413 ;; Make installed package available for running the
4414 ;; tests
4415 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4416 (and (zero? (system* "python" "selftest.py"
4417 "--installed"))
4418 (zero? (system* "python" "test-installed.py"))))))
4419 (delete 'check))))
c937562e
EB
4420 (home-page "https://pypi.python.org/pypi/Pillow")
4421 (synopsis "Fork of the Python Imaging Library")
4422 (description
4423 "The Python Imaging Library adds image processing capabilities to your
4424Python interpreter. This library provides extensive file format support, an
4425efficient internal representation, and fairly powerful image processing
4426capabilities. The core image library is designed for fast access to data
4427stored in a few basic pixel formats. It should provide a solid foundation for
4428a general image processing tool.")
3f641af0 4429 (license (license:x11-style
c937562e
EB
4430 "http://www.pythonware.com/products/pil/license.htm"
4431 "The PIL Software License"))))
4432
4433(define-public python2-pillow
4434 (package-with-python2 python-pillow))
bb986599 4435
a415f036
FB
4436(define-public python-pycparser
4437 (package
4438 (name "python-pycparser")
5043b20d 4439 (version "2.17")
a415f036
FB
4440 (source
4441 (origin
4442 (method url-fetch)
38eb6919 4443 (uri (pypi-uri "pycparser" version))
a415f036
FB
4444 (sha256
4445 (base32
5043b20d 4446 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4447 (outputs '("out" "doc"))
4448 (build-system python-build-system)
4449 (native-inputs
f3b98f4f 4450 `(("pkg-config" ,pkg-config)))
a415f036 4451 (arguments
89b5c60e 4452 `(#:phases
819939cb
TGR
4453 (modify-phases %standard-phases
4454 (replace 'check
4455 (lambda _
4456 (with-directory-excursion "tests"
4457 (zero? (system* "python" "all_tests.py")))))
4458 (add-after 'install 'install-doc
4459 (lambda* (#:key outputs #:allow-other-keys)
4460 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4461 (doc (string-append data "/doc/" ,name "-" ,version))
4462 (examples (string-append doc "/examples")))
4463 (mkdir-p examples)
4464 (for-each (lambda (file)
4465 (copy-file (string-append "." file)
4466 (string-append doc file)))
4467 '("/README.rst" "/CHANGES" "/LICENSE"))
4468 (copy-recursively "examples" examples)))))))
a415f036
FB
4469 (home-page "https://github.com/eliben/pycparser")
4470 (synopsis "C parser in Python")
4471 (description
4472 "Pycparser is a complete parser of the C language, written in pure Python
4473using the PLY parsing library. It parses C code into an AST and can serve as
4474a front-end for C compilers or analysis tools.")
3f641af0 4475 (license license:bsd-3)))
a415f036
FB
4476
4477(define-public python2-pycparser
4478 (package-with-python2 python-pycparser))
57c3f716
FB
4479
4480(define-public python-cffi
4481 (package
4482 (name "python-cffi")
2d3a437c 4483 (version "1.4.2")
57c3f716
FB
4484 (source
4485 (origin
4486 (method url-fetch)
2d3a437c 4487 (uri (pypi-uri "cffi" version))
89b5c60e 4488 (sha256
2d3a437c 4489 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4490 (build-system python-build-system)
4491 (outputs '("out" "doc"))
4492 (inputs
4493 `(("libffi" ,libffi)))
4494 (propagated-inputs ; required at run-time
4495 `(("python-pycparser" ,python-pycparser)))
4496 (native-inputs
4497 `(("pkg-config" ,pkg-config)
4498 ("python-sphinx" ,python-sphinx)
f3b98f4f 4499 ("python-pytest" ,python-pytest)))
57c3f716 4500 (arguments
4179f952 4501 `(#:phases
57c3f716
FB
4502 (alist-cons-after
4503 'install 'install-doc
4504 (lambda* (#:key outputs #:allow-other-keys)
4505 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4506 (doc (string-append data "/doc/" ,name "-" ,version))
4507 (html (string-append doc "/html")))
4508 (with-directory-excursion "doc"
4509 (system* "make" "html")
4510 (mkdir-p html)
4511 (copy-recursively "build/html" html))
4512 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4513 %standard-phases)))
4514 (home-page "http://cffi.readthedocs.org")
4515 (synopsis "Foreign function interface for Python")
4516 (description
4517 "Foreign Function Interface for Python calling C code.")
bd3fa666 4518 (license license:expat)))
57c3f716
FB
4519
4520(define-public python2-cffi
4521 (package-with-python2 python-cffi))
6fa14469
FB
4522
4523(define-public python-xcffib
4524 (package
4525 (name "python-xcffib")
4526 (version "0.1.9")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (string-append "https://pypi.python.org/packages/source/x/"
4531 "xcffib/xcffib-" version ".tar.gz"))
4532 (sha256
4533 (base32
4534 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4535 (build-system python-build-system)
4536 (inputs
482d9591 4537 `(("libxcb" ,libxcb)))
6fa14469 4538 (propagated-inputs
482d9591
HG
4539 `(("python-cffi" ,python-cffi) ; used at run time
4540 ("python-six" ,python-six)))
6fa14469 4541 (arguments
e2816ac7
MB
4542 `(;; FIXME: Tests cannot load libxcb.so.1
4543 #:tests? #f
4544 #:phases
c8cd850c
MB
4545 (modify-phases %standard-phases
4546 (add-after 'install 'install-doc
4547 (lambda* (#:key outputs #:allow-other-keys)
4548 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4549 "/doc/" ,name "-" ,version)))
4550 (mkdir-p doc)
4551 (copy-file "README.md"
4552 (string-append doc "/README.md"))
4553 #t))))))
6fa14469
FB
4554 (home-page "https://github.com/tych0/xcffib")
4555 (synopsis "XCB Python bindings")
4556 (description
4557 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4558support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4559 (license license:expat)))
6fa14469
FB
4560
4561(define-public python2-xcffib
4562 (package-with-python2 python-xcffib))
4563
9e099723
FB
4564(define-public python-cairocffi
4565 (package
4566 (name "python-cairocffi")
4567 (version "0.6")
4568 (source
4569 (origin
4570 (method url-fetch)
4571 ;; The archive on pypi is missing the 'utils' directory!
4572 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4573 version ".tar.gz"))
f586c877 4574 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4575 (sha256
4576 (base32
4577 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4578 (build-system python-build-system)
4579 (outputs '("out" "doc"))
4580 (inputs
4581 `(("gdk-pixbuf" ,gdk-pixbuf)
4582 ("cairo" ,cairo)))
4583 (native-inputs
4584 `(("pkg-config" ,pkg-config)
4585 ("python-sphinx" ,python-sphinx)
f3b98f4f 4586 ("python-docutils" ,python-docutils)))
9e099723
FB
4587 (propagated-inputs
4588 `(("python-xcffib" ,python-xcffib))) ; used at run time
4589 (arguments
a792e1aa
MB
4590 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4591 #:tests? #f
4592 #:phases
6734c7ba
MB
4593 (modify-phases %standard-phases
4594 (add-after 'install 'install-doc
4595 (lambda* (#:key inputs outputs #:allow-other-keys)
4596 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4597 (doc (string-append data "/doc/" ,name "-" ,version))
4598 (html (string-append doc "/html")))
4599 (setenv "LD_LIBRARY_PATH"
4600 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4601 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4602 (setenv "LANG" "en_US.UTF-8")
4603 (mkdir-p html)
4604 (for-each (lambda (file)
4605 (copy-file (string-append "." file)
4606 (string-append doc file)))
4607 '("/README.rst" "/CHANGES" "/LICENSE"))
4608 (system* "python" "setup.py" "build_sphinx")
4609 (copy-recursively "docs/_build/html" html)
4610 #t))))))
9e099723
FB
4611 (home-page "https://github.com/SimonSapin/cairocffi")
4612 (synopsis "Python bindings and object-oriented API for Cairo")
4613 (description
4614 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4615Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4616graphics library with support for multiple backends including image buffers,
4617PNG, PostScript, PDF, and SVG file output.")
3f641af0 4618 (license license:bsd-3)))
9e099723
FB
4619
4620(define-public python2-cairocffi
4621 (package-with-python2 python-cairocffi))
4622
3cff95cb
RW
4623(define-public python-decorator
4624 (package
4625 (name "python-decorator")
d79fa7da 4626 (version "4.0.10")
3cff95cb
RW
4627 (source
4628 (origin
4629 (method url-fetch)
e21338be 4630 (uri (pypi-uri "decorator" version))
3cff95cb 4631 (sha256
d79fa7da 4632 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4633 (build-system python-build-system)
4634 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4635 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4636 (synopsis "Python module to simplify usage of decorators")
4637 (description
4638 "The aim of the decorator module is to simplify the usage of decorators
4639for the average programmer, and to popularize decorators usage giving examples
4640of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4641etc. The core of this module is a decorator factory.")
4642 (license license:expat)))
4643
4644(define-public python2-decorator
4645 (package-with-python2 python-decorator))
4646
2c0499ad
RW
4647(define-public python-drmaa
4648 (package
4649 (name "python-drmaa")
4650 (version "0.7.6")
4651 (source
4652 (origin
4653 (method url-fetch)
4654 (uri (string-append
4655 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4656 version ".tar.gz"))
4657 (sha256
4658 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4659 (build-system python-build-system)
4660 ;; The test suite requires libdrmaa which is provided by the cluster
4661 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4662 ;; should be set to the path of the libdrmaa library.
4663 (arguments '(#:tests? #f))
4664 (native-inputs
f3b98f4f 4665 `(("python-nose" ,python-nose)))
2c0499ad
RW
4666 (home-page "https://pypi.python.org/pypi/drmaa")
4667 (synopsis "Python bindings for the DRMAA library")
4668 (description
4669 "A Python package for Distributed Resource Management (DRM) job
4670submission and control. This package is an implementation of the DRMAA 1.0
4671Python language binding specification.")
3f641af0 4672 (license license:bsd-3)))
2c0499ad
RW
4673
4674(define-public python2-drmaa
4675 (package-with-python2 python-drmaa))
4676
d05c6da0
RW
4677(define-public python-gridmap
4678 (package
4679 (name "python-gridmap")
4680 (version "0.13.0")
4681 (source
4682 (origin
4683 (method url-fetch)
4684 (uri (string-append
4685 "https://github.com/pygridtools/gridmap/archive/v"
4686 version ".tar.gz"))
4687 (file-name (string-append name "-" version ".tar.gz"))
4688 (sha256
4689 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4690 (build-system python-build-system)
ad348f9f
MB
4691 (arguments
4692 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4693 (propagated-inputs
d05c6da0
RW
4694 `(("python-psutil" ,python-psutil)
4695 ("python-drmaa" ,python-drmaa)
4696 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4697 (home-page "https://github.com/pygridtools/gridmap")
4698 (synopsis "Create jobs on a cluster directly from Python")
4699 (description
4700 "Gridmap is a Python package to allow you to easily create jobs on the
4701cluster directly from Python. You can directly map Python functions onto the
4702cluster without needing to write any wrapper code yourself.")
3f641af0 4703 (license license:gpl3+)))
d05c6da0
RW
4704
4705(define-public python2-gridmap
4706 (package-with-python2 python-gridmap))
4707
cb6d5c54
RW
4708(define-public python-pexpect
4709 (package
4710 (name "python-pexpect")
ed118043 4711 (version "4.2.1")
cb6d5c54
RW
4712 (source
4713 (origin
4714 (method url-fetch)
ed118043 4715 (uri (pypi-uri "pexpect" version))
cb6d5c54 4716 (sha256
ed118043 4717 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4718 (build-system python-build-system)
4719 (arguments
4720 `(#:phases
4721 (modify-phases %standard-phases
ed118043
MB
4722 (add-before 'check 'prepare-tests
4723 (lambda _
4724 (substitute* (find-files "tests")
4725 (("/bin/ls") (which "ls"))
4726 (("/bin/echo") (which "echo"))
4727 (("/bin/which") (which "which"))
4728 ;; Many tests try to use the /bin directory which
4729 ;; is not present in the build environment.
4730 ;; Use one that's non-empty and unlikely to change.
4731 (("/bin'") "/dev'"))
4732 ;; XXX: Socket connection test gets "Connection reset by peer".
4733 ;; Why does it not work? Delete for now.
4734 (delete-file "tests/test_socket.py")
4735 #t))
cb6d5c54
RW
4736 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4737 (native-inputs
ed118043
MB
4738 `(("python-nose" ,python-nose)
4739 ("python-pytest" ,python-pytest)
4740 ("man-db" ,man-db)
4741 ("which" ,which)))
4742 (propagated-inputs
4743 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4744 (home-page "http://pexpect.readthedocs.org/")
4745 (synopsis "Controlling interactive console applications")
4746 (description
4747 "Pexpect is a pure Python module for spawning child applications;
4748controlling them; and responding to expected patterns in their output.
4749Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4750child application and control it as if a human were typing commands.")
3f641af0 4751 (license license:isc)))
cb6d5c54
RW
4752
4753(define-public python2-pexpect
4754 (package-with-python2 python-pexpect))
4755
229ad120
RW
4756(define-public python-setuptools-scm
4757 (package
4758 (name "python-setuptools-scm")
42d6d0d0 4759 (version "1.11.1")
229ad120
RW
4760 (source (origin
4761 (method url-fetch)
383af6b0 4762 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4763 (sha256
4764 (base32
42d6d0d0 4765 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4766 (build-system python-build-system)
4767 (home-page "https://github.com/pypa/setuptools_scm/")
4768 (synopsis "Manage Python package versions in SCM metadata")
4769 (description
383af6b0 4770 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4771@dfn{software configuration management} (SCM) metadata instead of declaring
4772them as the version argument or in a SCM managed file.")
4773 (license license:expat)))
4774
4775(define-public python2-setuptools-scm
4776 (package-with-python2 python-setuptools-scm))
4777
b74270ee
RW
4778(define-public python-pathpy
4779 (package
4780 (name "python-pathpy")
4781 (version "8.1.1")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (string-append "https://pypi.python.org/packages/source/p/"
4786 "path.py/path.py-" version ".tar.gz"))
4787 (sha256
4788 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4789 (outputs '("out" "doc"))
b74270ee
RW
4790 (build-system python-build-system)
4791 (propagated-inputs
4792 `(("python-appdirs" ,python-appdirs)))
4793 (native-inputs
f3b98f4f 4794 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4795 ("python-sphinx" ,python-sphinx)
4796 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4797 ("python-pytest" ,python-pytest)
4798 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4799 (arguments
4800 `(#:phases
4801 (modify-phases %standard-phases
4802 (add-after 'build 'build-doc
4803 (lambda _
4804 (setenv "LANG" "en_US.UTF-8")
4805 (zero? (system* "python" "setup.py" "build_sphinx"))))
4806 (add-after 'install 'install-doc
4807 (lambda* (#:key outputs #:allow-other-keys)
4808 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4809 (doc (string-append data "/doc/" ,name "-" ,version))
4810 (html (string-append doc "/html")))
4811 (mkdir-p html)
4812 (for-each (lambda (file)
4813 (copy-file file (string-append doc "/" file)))
4814 '("README.rst" "CHANGES.rst"))
4815 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4816 (home-page "http://github.com/jaraco/path.py")
4817 (synopsis "Python module wrapper for built-in os.path")
4818 (description
4819 "@code{path.py} implements path objects as first-class entities, allowing
4820common operations on files to be invoked on those path objects directly.")
4821 (license license:expat)))
4822
4823(define-public python2-pathpy
4824 (package-with-python2 python-pathpy))
4825
0d34e01b
RW
4826(define-public python-pickleshare
4827 (package
4828 (name "python-pickleshare")
4829 (version "0.5")
4830 (source
4831 (origin
4832 (method url-fetch)
4833 (uri (string-append "https://pypi.python.org/packages/source/p/"
4834 "pickleshare/pickleshare-" version ".tar.gz"))
4835 (sha256
4836 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4837 (build-system python-build-system)
4838 (propagated-inputs
4839 `(("python-pathpy" ,python-pathpy)))
4840 (home-page "https://github.com/vivainio/pickleshare")
4841 (synopsis "Tiny key value database with concurrency support")
4842 (description
4843 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4844Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4845shelve, many processes can access the database simultaneously. Changing a
4846value in database is immediately visible to other processes accessing the same
4847database. Concurrency is possible because the values are stored in separate
4848files. Hence the “database” is a directory where all files are governed by
4849PickleShare.")
4850 (license license:expat)))
4851
4852(define-public python2-pickleshare
4853 (package-with-python2 python-pickleshare))
4854
cd6e5189
RW
4855(define-public python-simplegeneric
4856 (package
4857 (name "python-simplegeneric")
4858 (version "0.8.1")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (string-append "https://pypi.python.org/packages/source/s/"
4863 "simplegeneric/simplegeneric-" version ".zip"))
4864 (sha256
4865 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4866 (build-system python-build-system)
4867 (native-inputs
f3b98f4f 4868 `(("unzip" ,unzip)))
cd6e5189
RW
4869 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4870 (synopsis "Python module for simple generic functions")
4871 (description
4872 "The simplegeneric module lets you define simple single-dispatch generic
4873functions, akin to Python’s built-in generic functions like @code{len()},
4874@code{iter()} and so on. However, instead of using specially-named methods,
4875these generic functions use simple lookup tables, akin to those used by
4876e.g. @code{pickle.dump()} and other generic functions found in the Python
4877standard library.")
3f641af0 4878 (license license:zpl2.1)))
cd6e5189
RW
4879
4880(define-public python2-simplegeneric
4881 (package-with-python2 python-simplegeneric))
4882
ddc7d8ed 4883(define-public python-ipython-genutils
c4abbac3 4884 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4885 (package
4886 (name "python-ipython-genutils")
4887 (version "0.1.0")
4888 (source
4889 (origin
4890 (method url-fetch)
4891 (uri (string-append "https://pypi.python.org/packages/source/i/"
4892 "ipython_genutils/ipython_genutils-"
4893 version ".tar.gz"))
4894 (sha256
4895 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4896 (build-system python-build-system)
4897 (arguments `(#:tests? #f)) ; no tests
4898 (home-page "http://ipython.org")
4899 (synopsis "Vestigial utilities from IPython")
4900 (description
c4abbac3
HG
4901 "This package provides retired utilities from IPython. No packages
4902outside IPython/Jupyter should depend on it.
4903
4904This package shouldn't exist. It contains some common utilities shared by
4905Jupyter and IPython projects during The Big Split. As soon as possible, those
4906packages will remove their dependency on this, and this package will go
4907away.")
3f641af0 4908 (license license:bsd-3)))
ddc7d8ed
RW
4909
4910(define-public python2-ipython-genutils
4911 (package-with-python2 python-ipython-genutils))
4912
2b10eb48
RW
4913(define-public python-traitlets
4914 (package
4915 (name "python-traitlets")
a5ba1481 4916 (version "4.2.0")
2b10eb48
RW
4917 (source
4918 (origin
4919 (method url-fetch)
cc0c4fde 4920 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4921 (sha256
4922 (base32
a5ba1481 4923 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4924 (build-system python-build-system)
4925 (arguments
4926 `(#:phases
4927 (modify-phases %standard-phases
4928 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4929 (propagated-inputs
4930 `(("python-ipython-genutils" ,python-ipython-genutils)
4931 ("python-decorator" ,python-decorator)))
4932 (native-inputs
cc0c4fde
EF
4933 `(("python-mock" ,python-mock)
4934 ("python-nose" ,python-nose)))
2b10eb48
RW
4935 (home-page "http://ipython.org")
4936 (synopsis "Configuration system for Python applications")
4937 (description
4938 "Traitlets is a framework that lets Python classes have attributes with
4939type checking, dynamically calculated default values, and ‘on change’
4940callbacks. The package also includes a mechanism to use traitlets for
4941configuration, loading values from files or from command line arguments. This
4942is a distinct layer on top of traitlets, so you can use traitlets in your code
4943without using the configuration machinery.")
3f641af0 4944 (license license:bsd-3)))
2b10eb48
RW
4945
4946(define-public python2-traitlets
4947 (package-with-python2 python-traitlets))
4948
4263b06f
RW
4949(define-public python-jupyter-core
4950 (package
4951 (name "python-jupyter-core")
45cc957c 4952 (version "4.2.1")
4263b06f
RW
4953 (source
4954 (origin
4955 (method url-fetch)
4956 (uri (string-append (pypi-uri "jupyter_core" version)))
4957 (sha256
4958 (base32
45cc957c 4959 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
4960 (build-system python-build-system)
4961 ;; FIXME: not sure how to run the tests
4962 (arguments `(#:tests? #f))
4963 (propagated-inputs
4964 `(("python-traitlets" ,python-traitlets)))
4965 (home-page "http://jupyter.org/")
4966 (synopsis "Jupyter base package")
4967 (description
4968 "Jupyter core is the base package on which Jupyter projects rely.")
4969 (license license:bsd-3)))
4970
4971(define-public python2-jupyter-core
4972 (package-with-python2 python-jupyter-core))
4973
9ff01f2d
RW
4974(define-public python-jupyter-client
4975 (package
4976 (name "python-jupyter-client")
4977 (version "4.4.0")
4978 (source
4979 (origin
4980 (method url-fetch)
4981 (uri (pypi-uri "jupyter_client" version))
4982 (sha256
4983 (base32
4984 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4985 (build-system python-build-system)
4986 ;; Tests fail because of missing native python kernel which I assume is
4987 ;; provided by the ipython package, which we cannot use because it would
4988 ;; cause a dependency cycle.
4989 (arguments `(#:tests? #f))
4990 (propagated-inputs
4991 `(("python-pyzmq" ,python-pyzmq)
4992 ("python-traitlets" ,python-traitlets)
4993 ("python-jupyter-core" ,python-jupyter-core)))
4994 (home-page "http://jupyter.org/")
4995 (synopsis "Jupyter protocol implementation and client libraries")
4996 (description
4997 "The @code{jupyter_client} package contains the reference implementation
4998of the Jupyter protocol. It also provides client and kernel management APIs
4999for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5000installing @code{kernelspec}s for use with Jupyter frontends.")
5001 (license license:bsd-3)))
5002
5003(define-public python2-jupyter-client
5004 (package-with-python2 python-jupyter-client))
5005
ab526102
RW
5006(define-public python-ipykernel
5007 (package
5008 (name "python-ipykernel")
f165648e 5009 (version "4.5.2")
ab526102
RW
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "ipykernel" version))
5014 (sha256
f165648e 5015 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5016 (build-system python-build-system)
5017 ;; The tests load a submodule of IPython. However, IPython itself depends
5018 ;; on ipykernel.
5019 (arguments `(#:tests? #f))
5020 (propagated-inputs
5021 ;; imported at runtime during connect
5022 `(("python-jupyter-client" ,python-jupyter-client)))
5023 (home-page "http://ipython.org")
5024 (synopsis "IPython Kernel for Jupyter")
5025 (description
5026 "This package provides the IPython kernel for Jupyter.")
5027 (license license:bsd-3)))
5028
5029(define-public python2-ipykernel
5030 (package-with-python2 python-ipykernel))
5031
5ff6effc
RW
5032(define-public python-testpath
5033 (package
5034 (name "python-testpath")
5035 (version "0.2")
5036 (source
5037 (origin
5038 (method url-fetch)
5039 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5040 version ".tar.gz"))
5041 (file-name (string-append name "-" version ".tar.gz"))
5042 (sha256
5043 (base32
5044 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5045 (build-system python-build-system)
5046 (arguments
5047 `(#:tests? #f ; this package does not even have a setup.py
5048 #:phases
5049 (modify-phases %standard-phases
5050 (delete 'install)
5051 (replace 'build
5052 (lambda* (#:key inputs outputs #:allow-other-keys)
5053 (let ((dir (string-append
5054 (assoc-ref outputs "out")
5055 "/lib/python"
5056 (string-take (string-take-right
5057 (assoc-ref inputs "python") 5) 3)
5058 "/site-packages/testpath")))
5059 (mkdir-p dir)
5060 (copy-recursively "testpath" dir))
5061 #t)))))
5062 (home-page "https://github.com/takluyver/testpath")
5063 (synopsis "Test utilities for code working with files and commands")
5064 (description
5065 "Testpath is a collection of utilities for Python code working with files
5066and commands. It contains functions to check things on the filesystem, and
5067tools for mocking system commands and recording calls to those.")
5068 (license license:expat)))
5069
5070(define-public python2-testpath
5071 (package-with-python2 python-testpath))
5072
ae1ab9fe
FB
5073(define-public python-ipython
5074 (package
5075 (name "python-ipython")
4dbc8ec4 5076 (version "4.0.3")
ae1ab9fe
FB
5077 (source
5078 (origin
fceac880 5079 (method url-fetch)
accd5f99 5080 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5081 (sha256
4dbc8ec4 5082 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
5083 (build-system python-build-system)
5084 (outputs '("out" "doc"))
3a0b1b9a
FB
5085 (propagated-inputs
5086 `(("python-pyzmq" ,python-pyzmq)
accd5f99 5087 ("python-terminado" ,python-terminado)
ae1ab9fe 5088 ("python-matplotlib" ,python-matplotlib)
5d26e542 5089 ("python-numpy" ,python-numpy)
ae1ab9fe 5090 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5091 ("python-jinja2" ,python-jinja2)
5092 ("python-mistune" ,python-mistune)
accd5f99
RW
5093 ("python-pexpect" ,python-pexpect)
5094 ("python-pickleshare" ,python-pickleshare)
5095 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5096 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5097 ("python-traitlets" ,python-traitlets)
5098 ("python-ipykernel" ,python-ipykernel)
5099 ("python-pygments" ,python-pygments)))
5100 (inputs
5101 `(("readline" ,readline)
5102 ("which" ,which)))
ae1ab9fe
FB
5103 (native-inputs
5104 `(("pkg-config" ,pkg-config)
accd5f99
RW
5105 ("python-requests" ,python-requests) ;; for tests
5106 ("python-testpath" ,python-testpath)
5107 ("python-nose" ,python-nose)
ae1ab9fe
FB
5108 ("python-sphinx" ,python-sphinx)
5109 ("texlive" ,texlive)
f3b98f4f 5110 ("texinfo" ,texinfo)))
ae1ab9fe 5111 (arguments
89b5c60e 5112 `(#:phases
3a0b1b9a
FB
5113 (modify-phases %standard-phases
5114 (add-after
5115 'install 'install-doc
5116 (lambda* (#:key inputs outputs #:allow-other-keys)
5117 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5118 (doc (string-append data "/doc/" ,name "-" ,version))
5119 (html (string-append doc "/html"))
5120 (man1 (string-append data "/man/man1"))
5121 (info (string-append data "/info"))
5122 (examples (string-append doc "/examples")))
afd3d931 5123 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5124 ;; Make installed package available for running the tests
5125 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5126 (with-directory-excursion "docs"
accd5f99
RW
5127 ;; FIXME: pdf fails to build
5128 ;;(system* "make" "pdf" "PAPER=a4")
5129 (system* "make" "html")
3a0b1b9a
FB
5130 (system* "make" "info"))
5131 (copy-recursively "docs/man" man1)
5132 (copy-recursively "examples" examples)
accd5f99 5133 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5134 ;; (copy-file "docs/build/latex/ipython.pdf"
5135 ;; (string-append doc "/ipython.pdf"))
5136 (mkdir-p info)
5137 (copy-file "docs/build/texinfo/ipython.info"
5138 (string-append info "/ipython.info"))
5139 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5140 ;; Tests can only be run after the library has been installed and not
5141 ;; within the source directory.
5142 (delete 'check)
5143 (add-after
5144 'install 'check
eee5cd04 5145 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5146 (if tests?
5147 (with-directory-excursion "/tmp"
eee5cd04
HG
5148 ;; Make installed package available for running the tests
5149 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5150 (setenv "HOME" "/tmp/") ;; required by a test
5151 (zero? (system* (string-append (assoc-ref outputs "out")
5152 "/bin/iptest"))))
5153 #t)))
5154 (add-before
5155 'install 'fix-tests
5156 (lambda* (#:key inputs #:allow-other-keys)
5157 (substitute* "./IPython/utils/_process_posix.py"
5158 (("/usr/bin/env', 'which") (which "which")))
5159 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5160 (("#!/usr/bin/env python")
5161 (string-append "#!" (which "python"))))
5162 ;; Disable 1 failing test
5163 (substitute* "./IPython/core/tests/test_magic.py"
5164 (("def test_dirops\\(\\):" all)
5165 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5166 (home-page "http://ipython.org")
5167 (synopsis "IPython is a tool for interactive computing in Python")
5168 (description
5169 "IPython provides a rich architecture for interactive computing with:
5170Powerful interactive shells, a browser-based notebook, support for interactive
5171data visualization, embeddable interpreters and tools for parallel
5172computing.")
135ba811
EF
5173 (license license:bsd-3)
5174 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5175
5176(define-public python2-ipython
135ba811 5177 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5178 (package
5179 (inherit ipython)
5180 ;; FIXME: some tests are failing
5181 (arguments
5182 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 5183 ;; FIXME: add pyreadline once available.
e62600fe 5184 (native-inputs
135ba811 5185 `(("python2-mock" ,python2-mock)
77a6932a 5186 ,@(package-native-inputs ipython))))))
03411993
AE
5187
5188(define-public python-isodate
5189 (package
5190 (name "python-isodate")
b6785c2e 5191 (version "0.5.4")
03411993
AE
5192 (source
5193 (origin
5194 (method url-fetch)
b6785c2e 5195 (uri (pypi-uri "isodate" version))
03411993
AE
5196 (sha256
5197 (base32
b6785c2e 5198 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5199 (build-system python-build-system)
03411993
AE
5200 (home-page
5201 "http://cheeseshop.python.org/pypi/isodate")
5202 (synopsis
5203 "Python date parser and formatter")
5204 (description
5205 "Python-isodate is a python module for parsing and formatting
5206ISO 8601 dates, time and duration.")
3f641af0 5207 (license license:bsd-3)))
03411993
AE
5208
5209(define-public python2-isodate
5210 (package-with-python2 python-isodate))
673ab897
AE
5211
5212(define-public python-html5lib
5213 (package
5214 (name "python-html5lib")
a14061aa 5215 (version "1.0b10")
673ab897
AE
5216 (source
5217 (origin
5218 (method url-fetch)
fee04c19 5219 (uri (pypi-uri "html5lib" version))
673ab897
AE
5220 (sha256
5221 (base32
a14061aa 5222 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5223 (build-system python-build-system)
3dd75476 5224 (propagated-inputs
4eb6ed28
MB
5225 `(("python-six" ,python-six)
5226 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5227 (arguments
5228 `(#:test-target "check"))
5229 (home-page
5230 "https://github.com/html5lib/html5lib-python")
5231 (synopsis
5232 "Python HTML parser based on the WHATWG HTML specifcation")
5233 (description
5234 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5235and written in Python.")
bd3fa666 5236 (license license:expat)))
673ab897
AE
5237
5238(define-public python2-html5lib
5239 (package-with-python2 python-html5lib))
e99f4211 5240
8ee62c97
RW
5241;; Needed for python-bleach, a dependency of python-notebook
5242(define-public python-html5lib-0.9
5243 (package
5244 (inherit python-html5lib)
5245 (version "0.999")
5246 (source
5247 (origin
5248 (method url-fetch)
5249 (uri (pypi-uri "html5lib" version))
5250 (sha256
5251 (base32
5252 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5253
5254(define-public python2-html5lib-0.9
5255 (package-with-python2 python-html5lib-0.9))
5256
adbca19e
MB
5257(define-public python-webencodings
5258 (package
5259 (name "python-webencodings")
5260 (version "0.5")
5261 (source (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "webencodings" version))
5264 (sha256
5265 (base32
5266 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5267 (build-system python-build-system)
5268 (arguments
5269 '(#:phases
5270 (modify-phases %standard-phases
5271 (replace 'check
5272 (lambda _
5273 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5274 (native-inputs
5275 `(("python-pytest" ,python-pytest)))
5276 (home-page "https://github.com/SimonSapin/python-webencodings")
5277 (synopsis "Character encoding aliases for legacy web content")
5278 (description
5279 "In order to be compatible with legacy web content when interpreting
5280something like @code{Content-Type: text/html; charset=latin1}, tools need
5281to use a particular set of aliases for encoding labels as well as some
5282overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5283the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5284or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5285The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5286defines all such details so that implementations do not have to
5287reverse-engineer each other.
5288
5289This module implements the Encoding standard and has encoding labels and
5290BOM detection, but the actual implementation for encoders and decoders
5291is Python’s.")
5292 (license license:bsd-3)))
5293
5294(define-public python2-webencodings
5295 (package-with-python2 python-webencodings))
5296
e99f4211
MW
5297(define-public python-urwid
5298 (package
5299 (name "python-urwid")
51ff41f6 5300 (version "1.3.1")
e99f4211
MW
5301 (source
5302 (origin
5303 (method url-fetch)
b97c1bfd 5304 (uri (pypi-uri "urwid" version))
e99f4211
MW
5305 (sha256
5306 (base32
51ff41f6 5307 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5308 (build-system python-build-system)
b97c1bfd
LF
5309 (arguments
5310 `(#:phases
5311 (modify-phases %standard-phases
5312 ;; Disable failing test. Bug filed upstream:
5313 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5314 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5315 (add-after 'unpack 'disable-failing-test
5316 (lambda _
5317 (substitute* "urwid/tests/test_event_loops.py"
5318 (("test_remove_watch_file")
5319 "disable_remove_watch_file")))))))
e99f4211
MW
5320 (home-page "http://urwid.org")
5321 (synopsis "Console user interface library for Python")
5322 (description
5323 "Urwid is a curses-based UI/widget library for Python. It includes many
5324features useful for text console applications.")
3f641af0 5325 (license license:lgpl2.1+)))
e99f4211
MW
5326
5327(define-public python2-urwid
5328 (package-with-python2 python-urwid))
d95a56c6 5329
5220022a
JL
5330(define-public python-openid
5331 (package
5332 (name "python-openid")
5333 (version "3.0.10")
5334 (source
5335 (origin
5336 (method url-fetch)
5337 (uri (pypi-uri "python3-openid" version))
5338 (sha256
5339 (base32
5340 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5341 (build-system python-build-system)
5342 (home-page "https://github.com/necaris/python3-openid")
5343 (synopsis "OpenID support for servers and consumers")
5344 (description "This library provides OpenID authentication for Python, both
5345for clients and servers.")
5346 (license license:asl2.0)))
5347
3ef00f56 5348(define-public python2-openid
5349 (package
5350 (name "python2-openid")
5351 (version "2.2.5")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "python-openid" version))
5356 (sha256
5357 (base32
5358 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5359 (build-system python-build-system)
5360 (arguments
5361 ;; Python 3 support is in `python3-openid`, a separate package.
5362 `(#:python ,python-2))
5363 (home-page "https://github.com/openid/python-openid")
5364 (synopsis "OpenID support for servers and consumers")
5365 (description "This library provides OpenID authentication for Python, both
5366for clients and servers.")
5367 (license license:asl2.0)))
5368
47d0b292
TS
5369(define-public python-urwidtrees
5370 (package
5371 (name "python-urwidtrees")
37ec4623 5372 (version "1.0.2")
47d0b292
TS
5373 (source
5374 (origin
5375 (method url-fetch)
37ec4623
TS
5376 ;; package author intends on distributing via github rather than pypi:
5377 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5378 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5379 version ".tar.gz"))
5380 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5381 (sha256
5382 (base32
37ec4623 5383 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5384 (build-system python-build-system)
5385 (arguments
5386 '(#:tests? #f)) ; no tests
f22efa01 5387 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5388 (home-page "https://github.com/pazz/urwidtrees")
5389 (synopsis "Tree widgets for urwid")
5390 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5391toolkit. Use it to build trees of widgets.")
3f641af0 5392 (license license:gpl3+)))
47d0b292
TS
5393
5394(define-public python2-urwidtrees
5395 (package-with-python2 python-urwidtrees))
5396
d95a56c6
PAR
5397(define-public python-dbus
5398 (package
5399 (name "python-dbus")
5400 (version "1.2.0")
5401 (source
5402 (origin
5403 (method url-fetch)
5404 (uri (string-append
5cc3096c 5405 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5406 version ".tar.gz"))
5407 (sha256
5408 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5409 (build-system gnu-build-system)
6717c879
SB
5410 (arguments
5411 '(#:phases
5412 (modify-phases %standard-phases
5413 (add-before
5414 'check 'pre-check
5415 (lambda _
5416 ;; XXX: For the missing '/etc/machine-id'.
5417 (substitute* "test/run-test.sh"
5418 (("DBUS_FATAL_WARNINGS=1")
5419 "DBUS_FATAL_WARNINGS=0"))
5420 #t)))))
d95a56c6
PAR
5421 (native-inputs
5422 `(("pkg-config" ,pkg-config)))
5423 (inputs
5424 `(("python" ,python)
2e88d113 5425 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5426 (synopsis "Python bindings for D-bus")
5427 (description "python-dbus provides bindings for libdbus, the reference
5428implementation of D-Bus.")
5429 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5430 (license license:expat)))
b52af02b
MW
5431
5432(define-public python2-dbus
5433 (package (inherit python-dbus)
5434 (name "python2-dbus")
5435 (inputs `(("python" ,python-2)
5436 ,@(alist-delete "python"
5437 (package-inputs python-dbus)
5438 equal?)))
5439 ;; FIXME: on Python 2, the test_utf8 fails with:
5440 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5441 (arguments `(#:tests? #f))))
a6ac8332
AE
5442
5443(define-public python-apsw
5444 (package
5445 (name "python-apsw")
917708c2 5446 (version "3.9.2-r1")
a6ac8332
AE
5447 (source
5448 (origin
5449 (method url-fetch)
917708c2 5450 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5451 (sha256
5452 (base32
917708c2 5453 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5454 (build-system python-build-system)
5455 (inputs
f3b98f4f 5456 `(("sqlite" ,sqlite)))
a6ac8332
AE
5457 (arguments
5458 `(#:phases
154d207c
MB
5459 (modify-phases %standard-phases
5460 (delete 'check)
5461 (add-after 'install 'check
5462 (lambda* (#:key inputs outputs #:allow-other-keys)
5463 (add-installed-pythonpath inputs outputs)
5464 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5465 (home-page "https://github.com/rogerbinns/apsw/")
5466 (synopsis "Another Python SQLite Wrapper")
5467 (description "APSW is a Python wrapper for the SQLite
5468embedded relational database engine. In contrast to other wrappers such as
5469pysqlite it focuses on being a minimal layer over SQLite attempting just to
5470translate the complete SQLite API into Python.")
abde5f37 5471 (license license:zlib)))
a6ac8332
AE
5472
5473(define-public python2-apsw
5474 (package-with-python2 python-apsw))
26b307e2
AE
5475
5476(define-public python-lxml
5477 (package
5478 (name "python-lxml")
d58a3203 5479 (version "3.6.0")
26b307e2
AE
5480 (source
5481 (origin
5482 (method url-fetch)
97bbc480 5483 (uri (pypi-uri "lxml" version))
26b307e2 5484 (sha256
d58a3203
EF
5485 (base32
5486 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5487 (build-system python-build-system)
5488 (inputs
5489 `(("libxml2" ,libxml2)
f3b98f4f 5490 ("libxslt" ,libxslt)))
26b307e2
AE
5491 (home-page "http://lxml.de/")
5492 (synopsis
5493 "Python XML processing library")
5494 (description
5495 "The lxml XML toolkit is a Pythonic binding for the C libraries
5496libxml2 and libxslt.")
3f641af0 5497 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5498
5499(define-public python2-lxml
5500 (package-with-python2 python-lxml))
4ed20663 5501
b32a1e47
CAW
5502;; beautifulsoup4 has a totally different namespace than 3.x,
5503;; and pypi seems to put it under its own name, so I guess we should too
5504(define-public python-beautifulsoup4
5505 (package
5506 (name "python-beautifulsoup4")
67fd4a12 5507 (version "4.5.1")
b32a1e47
CAW
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (pypi-uri "beautifulsoup4" version))
5512 (sha256
5513 (base32
67fd4a12 5514 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5515 (build-system python-build-system)
5f37f0b6
LF
5516 (arguments
5517 `(#:phases
5518 (modify-phases %standard-phases
5519 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5520 ;; must use this conversion script when building with Python 3. The
5521 ;; conversion script also runs the tests.
5522 ;; For more information, see the file 'convert-py3k' in the source
5523 ;; distribution.
5524 (replace 'check
5525 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5526 (home-page
5527 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5528 (synopsis
5529 "Python screen-scraping library")
5530 (description
5531 "Beautiful Soup is a Python library designed for rapidly setting up
5532screen-scraping projects. It offers Pythonic idioms for navigating,
5533searching, and modifying a parse tree, providing a toolkit for
5534dissecting a document and extracting what you need. It automatically
5535converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5536 (license license:expat)
5537 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5538
5539(define-public python2-beautifulsoup4
5540 (package
5541 (inherit (package-with-python2
5542 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5543 (arguments `(#:python ,python-2))))
b32a1e47 5544
092e86f5
AE
5545(define-public python2-cssutils
5546 (package
5547 (name "python2-cssutils")
58d1d816 5548 (version "1.0.1")
092e86f5
AE
5549 (source
5550 (origin
5551 (method url-fetch)
58d1d816 5552 (uri (pypi-uri "cssutils" version))
092e86f5 5553 (sha256
58d1d816
EF
5554 (base32
5555 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5556 (build-system python-build-system)
5557 (native-inputs
5558 `(("python2-mock" ,python2-mock) ; for the tests
5559 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5560 (arguments
5561 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5562 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5563 ))
092e86f5
AE
5564 (home-page "http://cthedot.de/cssutils/")
5565 (synopsis
5566 "CSS Cascading Style Sheets library for Python")
5567 (description
5568 "Cssutils is a Python package for parsing and building CSS
5569Cascading Style Sheets. Currently it provides a DOM only and no rendering
5570options.")
3f641af0 5571 (license license:lgpl3+)))
880ff77c
AE
5572
5573(define-public python-cssselect
5574 (package
5575 (name "python-cssselect")
d5ccd9ab 5576 (version "0.9.2")
880ff77c
AE
5577 (source
5578 (origin
5579 (method url-fetch)
d5ccd9ab 5580 (uri (pypi-uri "cssselect" version))
880ff77c 5581 (sha256
d5ccd9ab
EF
5582 (base32
5583 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5584 (build-system python-build-system)
880ff77c
AE
5585 (arguments
5586 ;; tests fail with message
5587 ;; AttributeError: 'module' object has no attribute 'tests'
5588 `(#:tests? #f))
5589 (home-page
5590 "https://pythonhosted.org/cssselect/")
5591 (synopsis
5592 "CSS3 selector parser and translator to XPath 1.0")
5593 (description
5594 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5595them to XPath 1.0 expressions. Such expressions can be used in lxml or
5596another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5597 (license license:bsd-3)))
880ff77c
AE
5598
5599(define-public python2-cssselect
5600 (package-with-python2 python-cssselect))
60357f99 5601
03702173 5602(define-public python-openid-cla
5603 (package
5604 (name "python-openid-cla")
5605 (version "1.2")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "python-openid-cla" version))
5610 (sha256
5611 (base32
5612 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5613 (build-system python-build-system)
019ccdb6 5614 (arguments '(#:tests? #f)) ; No tests.
03702173 5615 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5616 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5617 (description "@code{openid-cla} is an implementation of the OpenID
5618contributor license agreement extension for python-openid.")
5619 (license license:bsd-3)))
5620
5621(define-public python2-openid-cla
5622 (package-with-python2 python-openid-cla))
5623
a0e41de4 5624(define-public python-openid-teams
5625 (package
5626 (name "python-openid-teams")
5627 (version "1.1")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "python-openid-teams" version))
5632 (sha256
5633 (base32
5634 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5635 (build-system python-build-system)
ac72d3d2 5636 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 5637 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5638 (synopsis "Implementation of the OpenID teams extension for python-openid")
5639 (description
5640 "@code{openid-teams} is an implementation of the OpenID
5641teams extension for python-openid.")
5642 (license license:bsd-3)))
5643
5644(define-public python2-openid-teams
5645 (package-with-python2 python-openid-teams))
5646
60357f99
AE
5647(define-public python-netifaces
5648 (package
5649 (name "python-netifaces")
5650 (version "0.10.4")
5651 (source
5652 (origin
5653 (method url-fetch)
5654 (uri (string-append
5655 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5656 version
5657 ".tar.gz"))
5658 (sha256
5659 (base32
5660 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5661 (build-system python-build-system)
60357f99
AE
5662 (home-page
5663 "https://bitbucket.org/al45tair/netifaces")
5664 (synopsis
5665 "Python module for portable network interface information")
5666 (description
5667 "Netifaces is a Python module providing information on network
5668interfaces in an easy and portable manner.")
5669 (license license:expat)))
5670
5671(define-public python2-netifaces
5672 (package-with-python2 python-netifaces))
92cb152b 5673
32f77c04
RW
5674(define-public python-networkx
5675 (package
5676 (name "python-networkx")
a4d9609c 5677 (version "1.11")
32f77c04
RW
5678 (source
5679 (origin
5680 (method url-fetch)
a4d9609c 5681 (uri (pypi-uri "networkx" version))
32f77c04 5682 (sha256
a4d9609c 5683 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5684 (build-system python-build-system)
5685 ;; python-decorator is needed at runtime
5686 (propagated-inputs
5687 `(("python-decorator" ,python-decorator)))
5688 (native-inputs
f3b98f4f 5689 `(("python-nose" ,python-nose)))
32f77c04
RW
5690 (home-page "http://networkx.github.io/")
5691 (synopsis "Python module for creating and manipulating graphs and networks")
5692 (description
5693 "NetworkX is a Python package for the creation, manipulation, and study
5694of the structure, dynamics, and functions of complex networks.")
3f641af0 5695 (license license:bsd-3)))
32f77c04
RW
5696
5697(define-public python2-networkx
5698 (package-with-python2 python-networkx))
5699
92cb152b
RW
5700(define-public snakemake
5701 (package
5702 (name "snakemake")
7b93d866 5703 (version "3.9.0")
92cb152b
RW
5704 (source
5705 (origin
5706 (method url-fetch)
7b93d866 5707 (uri (pypi-uri "snakemake" version))
92cb152b 5708 (sha256
7b93d866 5709 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5710 (build-system python-build-system)
7b93d866
MB
5711 (arguments
5712 ;; TODO: Package missing test dependencies.
5713 '(#:tests? #f))
5714 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5715 (synopsis "Python-based execution environment for make-like workflows")
5716 (description
5717 "Snakemake aims to reduce the complexity of creating workflows by
5718providing a clean and modern domain specific specification language (DSL) in
5719Python style, together with a fast and comfortable execution environment.")
5720 (license license:expat)))
a1920bc9 5721
35de1fbd
RW
5722(define-public python-seaborn
5723 (package
5724 (name "python-seaborn")
ccc18762 5725 (version "0.7.1")
35de1fbd
RW
5726 (source
5727 (origin
5728 (method url-fetch)
fc899d4f 5729 (uri (pypi-uri "seaborn" version))
35de1fbd 5730 (sha256
ccc18762 5731 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 5732 (build-system python-build-system)
6f976df6
MB
5733 (arguments
5734 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5735 (propagated-inputs
5736 `(("python-pandas" ,python-pandas)
5737 ("python-matplotlib" ,python-matplotlib)
5738 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5739 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5740 (synopsis "Statistical data visualization")
5741 (description
5742 "Seaborn is a library for making attractive and informative statistical
5743graphics in Python. It is built on top of matplotlib and tightly integrated
5744with the PyData stack, including support for numpy and pandas data structures
5745and statistical routines from scipy and statsmodels.")
3f641af0 5746 (license license:bsd-3)
fc899d4f 5747 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5748
5749(define-public python2-seaborn
fc899d4f
EF
5750 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5751 (package
5752 (inherit base)
5753 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5754 ,@(package-propagated-inputs base))))))
35de1fbd 5755
58a35665
MB
5756(define-public python-mpmath
5757 (package
5758 (name "python-mpmath")
5759 (version "0.19")
5760 (source (origin
5761 (method url-fetch)
5762 (uri (string-append "http://mpmath.org/files/mpmath-"
5763 version ".tar.gz"))
5764 (sha256
5765 (base32
5766 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5767 (build-system python-build-system)
5768 (arguments
5769 '(#:phases
5770 (modify-phases %standard-phases
5771 (replace 'check
5772 (lambda _
5773 (zero?
5774 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5775 (home-page "http://mpmath.org")
5776 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5777 (description
5778 "@code{mpmath} can be used as an arbitrary-precision substitute for
5779Python's float/complex types and math/cmath modules, but also does much
5780more advanced mathematics.")
5781 (license license:bsd-3)))
5782
5783(define-public python2-mpmath
5784 (package-with-python2 python-mpmath))
5785
90fc547f
RW
5786(define-public python-sympy
5787 (package
5788 (name "python-sympy")
52f622ef 5789 (version "1.0")
90fc547f
RW
5790 (source
5791 (origin
5792 (method url-fetch)
5793 (uri (string-append
5794 "https://github.com/sympy/sympy/releases/download/sympy-"
5795 version "/sympy-" version ".tar.gz"))
5796 (sha256
52f622ef 5797 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5798 (build-system python-build-system)
52f622ef
MB
5799 (propagated-inputs
5800 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5801 (home-page "http://www.sympy.org/")
5802 (synopsis "Python library for symbolic mathematics")
5803 (description
5804 "SymPy is a Python library for symbolic mathematics. It aims to become a
5805full-featured computer algebra system (CAS) while keeping the code as simple
5806as possible in order to be comprehensible and easily extensible.")
3f641af0 5807 (license license:bsd-3)))
90fc547f
RW
5808
5809(define-public python2-sympy
5810 (package-with-python2 python-sympy))
5811
e8c9b010
SR
5812(define-public python-q
5813 (package
5814 (name "python-q")
5815 (version "2.6")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (pypi-uri "q" version))
5820 (sha256
5821 (base32
5822 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5823 (build-system python-build-system)
5824 (home-page "https://github.com/zestyping/q")
5825 (synopsis "Quick-and-dirty debugging output for tired programmers")
5826 (description
5827 "q is a Python module for \"print\" style of debugging Python code. It
5828provides convenient short API for print out of values, tracebacks, and
5829falling into the Python interpreter.")
f210e944 5830 (license license:asl2.0)))
e8c9b010
SR
5831
5832(define-public python2-q
f210e944 5833 (package-with-python2 python-q))
e8c9b010 5834
a1920bc9
FB
5835(define-public python-testlib
5836 (package
5837 (name "python-testlib")
5838 (version "0.6.5")
5839 (source
5840 (origin
5841 (method url-fetch)
5842 (uri (string-append
5843 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5844 version ".zip"))
5845 (sha256
5846 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5847 (build-system python-build-system)
a1920bc9 5848 (native-inputs
632735f2 5849 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5850 (synopsis "Python micro test suite harness")
5851 (description "A micro unittest suite harness for Python.")
5852 (home-page "https://github.com/trentm/testlib")
1cb9c006 5853 (license license:expat)))
a1920bc9
FB
5854
5855(define-public python2-testlib
5856 (package-with-python2 python-testlib))
db62afa5
LC
5857
5858(define-public python2-xlib
5859 (package
5860 (name "python2-xlib")
5861 (version "0.14")
5862 (source (origin
5863 (method url-fetch)
de67e922
LF
5864 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5865 "/" version "/"
db62afa5
LC
5866 "python-xlib-" version ".tar.gz"))
5867 (sha256
5868 (base32
5869 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5870 (build-system python-build-system)
5871 (arguments
5872 `(#:python ,python-2 ;Python 2 only
5873 #:tests? #f)) ;no tests
db62afa5
LC
5874 (home-page "http://python-xlib.sourceforge.net/")
5875 (synopsis "Python X11 client library")
5876 (description
5877 "The Python X Library is intended to be a fully functional X client
5878library for Python programs. It is useful to implement low-level X clients.
5879It is written entirely in Python.")
3f641af0 5880 (license license:gpl2+)))
0234ca06
DT
5881
5882(define-public python-singledispatch
5883 (package
5884 (name "python-singledispatch")
5885 (version "3.4.0.3")
5886 (source
5887 (origin
5888 (method url-fetch)
bdb67d84 5889 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5890 (sha256
5891 (base32
5892 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5893 (build-system python-build-system)
5e1c9d24
HG
5894 (native-inputs
5895 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5896 (home-page
5897 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5898 (synopsis "Backport of singledispatch feature from Python 3.4")
5899 (description
5900 "This library brings functools.singledispatch from Python 3.4 to Python
59012.6-3.3.")
5902 (license license:expat)))
5903
5904(define-public python2-singledispatch
5905 (package-with-python2 python-singledispatch))
feaae484 5906
310d218f
RW
5907(define-public python-tornado
5908 (package
5909 (name "python-tornado")
a724924b 5910 (version "4.3")
310d218f
RW
5911 (source
5912 (origin
5913 (method url-fetch)
a724924b 5914 (uri (pypi-uri "tornado" version))
310d218f 5915 (sha256
a724924b 5916 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5917 (build-system python-build-system)
3fe2c209
MB
5918 (arguments
5919 '(;; FIXME: Two tests error out with:
5920 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5921 ;; #:phases
5922 ;; (modify-phases %standard-phases
5923 ;; (replace 'check
5924 ;; (lambda _
5925 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5926 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5927 ;; (zero? (system* "python" "-m" "tornado.test")))))
5928 #:tests? #f))
310d218f 5929 (native-inputs
b455439b 5930 `(("python-certifi" ,python-certifi)))
f22efa01 5931 (propagated-inputs
b455439b 5932 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5933 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5934 (synopsis "Python web framework and asynchronous networking library")
5935 (description
5936 "Tornado is a Python web framework and asynchronous networking library,
5937originally developed at FriendFeed. By using non-blocking network I/O,
5938Tornado can scale to tens of thousands of open connections, making it ideal
5939for long polling, WebSockets, and other applications that require a long-lived
5940connection to each user.")
3f641af0 5941 (license license:asl2.0)
b455439b 5942 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5943
5944(define-public python2-tornado
b455439b 5945 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5946 (package (inherit tornado)
f22efa01 5947 (propagated-inputs
310d218f
RW
5948 `(("python2-backport-ssl-match-hostname"
5949 ,python2-backport-ssl-match-hostname)
b455439b 5950 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5951 ,@(package-propagated-inputs tornado))))))
310d218f 5952
6b59fc10
EF
5953;; the python- version can be removed with python-3.5
5954(define-public python-backports-abc
5955 (package
5956 (name "python-backports-abc")
27f9148e 5957 (version "0.5")
6b59fc10
EF
5958 (source
5959 (origin
5960 (method url-fetch)
5961 (uri (pypi-uri "backports_abc" version))
5962 (sha256
5963 (base32
27f9148e 5964 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 5965 (build-system python-build-system)
6b59fc10 5966 (home-page "https://github.com/cython/backports_abc")
66e07664 5967 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5968 (description
5969 "Python-backports-abc provides a backport of additions to the
5970'collections.abc' module in Python-3.5.")
3f641af0 5971 (license license:psfl)))
6b59fc10
EF
5972
5973(define-public python2-backports-abc
5974 (package-with-python2 python-backports-abc))
5975
feaae484
SB
5976(define-public python-waf
5977 (package
5978 (name "python-waf")
7dd55dfe 5979 (version "1.9.5")
feaae484
SB
5980 (source (origin
5981 (method url-fetch)
bae67829 5982 (uri (string-append "https://waf.io/"
feaae484
SB
5983 "waf-" version ".tar.bz2"))
5984 (sha256
5985 (base32
7dd55dfe 5986 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5987 (build-system python-build-system)
5988 (arguments
5989 '(#:phases
5990 (modify-phases %standard-phases
5991 (replace 'build
7dd55dfe
EF
5992 (lambda _
5993 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5994 (replace 'check
7dd55dfe
EF
5995 (lambda _
5996 (zero? (system* "python" "waf" "--version"))))
feaae484 5997 (replace 'install
7dd55dfe
EF
5998 (lambda _
5999 (copy-file "waf" %output))))))
6000 (home-page "http://waf.io/")
feaae484
SB
6001 (synopsis "Python-based build system")
6002 (description
6003 "Waf is a Python-based framework for configuring, compiling and installing
6004applications.")
3f641af0 6005 (license license:bsd-3)))
feaae484
SB
6006
6007(define-public python2-waf
6008 (package-with-python2 python-waf))
45203542
RW
6009
6010(define-public python-pyzmq
6011 (package
6012 (name "python-pyzmq")
3655ee76 6013 (version "15.1.0")
45203542
RW
6014 (source
6015 (origin
6016 (method url-fetch)
3655ee76 6017 (uri (pypi-uri "pyzmq" version))
45203542 6018 (sha256
3655ee76 6019 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6020 (build-system python-build-system)
6021 (arguments
6022 `(#:configure-flags
6023 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6024 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6025 ;; --inplace' for 'python setup.py test' to work.
6026 #:tests? #f))
6027 (inputs
6028 `(("zeromq" ,zeromq)))
6029 (native-inputs
6030 `(("pkg-config" ,pkg-config)
f3b98f4f 6031 ("python-nose" ,python-nose)))
45203542
RW
6032 (home-page "http://github.com/zeromq/pyzmq")
6033 (synopsis "Python bindings for 0MQ")
6034 (description
6035 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6036 (license license:bsd-4)))
45203542
RW
6037
6038(define-public python2-pyzmq
6039 (package-with-python2 python-pyzmq))
d889e6c4
CR
6040
6041(define-public python-pep8
6042 (package
6043 (name "python-pep8")
db251311 6044 (version "1.7.0")
d889e6c4
CR
6045 (source
6046 (origin
6047 (method url-fetch)
db251311 6048 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6049 (sha256
6050 (base32
db251311 6051 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6052 (build-system python-build-system)
d889e6c4
CR
6053 (home-page "http://pep8.readthedocs.org/")
6054 (synopsis "Python style guide checker")
6055 (description
6056 "This tools checks Python code against some of the style conventions in
6057PEP 8.")
6058 (license license:expat)))
6059
6060(define-public python2-pep8
6061 (package-with-python2 python-pep8))
e31d7f44
CR
6062
6063(define-public python-pyflakes
6064 (package
6065 (name "python-pyflakes")
2abc3972 6066 (version "1.0.0")
e31d7f44
CR
6067 (source
6068 (origin
6069 (method url-fetch)
2abc3972 6070 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6071 (sha256
6072 (base32
2abc3972 6073 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6074 (build-system python-build-system)
e31d7f44
CR
6075 (home-page
6076 "https://github.com/pyflakes/pyflakes")
6077 (synopsis "Passive checker of Python programs")
6078 (description
6079 "Pyflakes statically checks Python source code for common errors.")
6080 (license license:expat)))
a59e017c 6081
7261d9eb
CR
6082(define-public python2-pyflakes
6083 (package-with-python2 python-pyflakes))
6084
a59e017c
CR
6085(define-public python-mccabe
6086 (package
6087 (name "python-mccabe")
c6ebd40d 6088 (version "0.4.0")
a59e017c
CR
6089 (source
6090 (origin
6091 (method url-fetch)
c6ebd40d 6092 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6093 (sha256
6094 (base32
c6ebd40d 6095 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6096 (build-system python-build-system)
328bb95d 6097 (native-inputs
c6ebd40d 6098 `(("python-pytest" ,python-pytest)
f3b98f4f 6099 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6100 (home-page "https://github.com/flintwork/mccabe")
6101 (synopsis "McCabe checker, plugin for flake8")
6102 (description
6103 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6104complexity of Python source code.")
7362371d 6105 (license license:expat)))
a59e017c
CR
6106
6107(define-public python2-mccabe
6108 (package-with-python2 python-mccabe))
e8df8f47 6109
7477fbb1
CR
6110(define-public python-mccabe-0.2.1
6111 (package (inherit python-mccabe)
6112 (version "0.2.1")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "mccabe" version))
6117 (sha256
6118 (base32
f3b98f4f 6119 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6120
6121(define-public python2-mccabe-0.2.1
6122 (package-with-python2 python-mccabe-0.2.1))
6123
e8df8f47
CR
6124;; Flake8 2.4.1 requires an older version of pep8.
6125;; This should be removed ASAP.
6126(define-public python-pep8-1.5.7
6127 (package (inherit python-pep8)
6128 (version "1.5.7")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (string-append
6133 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6134 version
6135 ".tar.gz"))
6136 (sha256
6137 (base32
73e3060d
MB
6138 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6139 (arguments
6140 ;; XXX Tests not compatible with Python 3.5.
6141 '(#:tests? #f))))
e8df8f47
CR
6142
6143(define-public python2-pep8-1.5.7
6144 (package-with-python2 python-pep8-1.5.7))
6145
6146;; Flake8 2.4.1 requires an older version of pyflakes.
6147;; This should be removed ASAP.
6148(define-public python-pyflakes-0.8.1
6149 (package (inherit python-pyflakes)
6150 (version "0.8.1")
6151 (source
6152 (origin
6153 (method url-fetch)
6154 (uri (string-append
6155 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6156 version
6157 ".tar.gz"))
6158 (sha256
6159 (base32
0d84e1ef
MB
6160 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6161 (arguments
6162 ;; XXX Tests not compatible with Python 3.5.
6163 '(#:tests? #f))))
e8df8f47
CR
6164
6165(define-public python2-pyflakes-0.8.1
7261d9eb 6166 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6167
6168(define-public python-flake8
6169 (package
6170 (name "python-flake8")
43789136 6171 (version "2.5.4")
e8df8f47
CR
6172 (source
6173 (origin
6174 (method url-fetch)
1b995533 6175 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6176 (sha256
6177 (base32
011271c7
HG
6178 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6179 (modules '((guix build utils)))
6180 (snippet
6181 '(begin
6182 ;; Remove pre-compiled .pyc files from source.
6183 (for-each delete-file-recursively
6184 (find-files "." "__pycache__" #:directories? #t))
6185 (for-each delete-file (find-files "." "\\.pyc$"))
6186 #t))))
e8df8f47 6187 (build-system python-build-system)
482d9591 6188 (propagated-inputs
f3b98f4f 6189 `(("python-pep8" ,python-pep8)
43789136 6190 ("python-pyflakes" ,python-pyflakes)
482d9591 6191 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6192 (native-inputs
6193 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6194 ("python-nose" ,python-nose)))
6195 (home-page "https://gitlab.com/pycqa/flake8")
6196 (synopsis
6197 "The modular source code checker: pep8, pyflakes and co")
6198 (description
6199 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6200 (license license:expat)))
6201
6202(define-public python2-flake8
6203 (package-with-python2 python-flake8))
61b9ac53 6204
abf21efc
CR
6205;; This will only be needed by the python-hacking package and will not be
6206;; necessary once python-hacking > 0.10.2 is released.
6207(define-public python-flake8-2.2.4
6208 (package (inherit python-flake8)
482d9591 6209 (propagated-inputs
f3b98f4f 6210 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 6211 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 6212 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 6213 (native-inputs
482d9591 6214 `(("python-mock" ,python-mock)
abf21efc
CR
6215 ("python-nose" ,python-nose)))
6216 (version "2.2.4")
6217 (source
6218 (origin
6219 (method url-fetch)
6220 (uri (pypi-uri "flake8" version))
6221 (sha256
6222 (base32
b9c8ccce
HG
6223 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6224 (modules '((guix build utils)))
6225 (snippet
6226 '(begin
6227 ;; Remove pre-compiled .pyc files from source.
6228 (for-each delete-file-recursively
6229 (find-files "." "__pycache__" #:directories? #t))
6230 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
6231 #t))))
6232 (arguments
6233 ;; XXX Fails with Python 3.5.
6234 '(#:tests? #f))))
abf21efc
CR
6235
6236(define-public python2-flake8-2.2.4
6237 (package-with-python2 python-flake8-2.2.4))
6238
1f42d824
MFM
6239(define-public python-flake8-polyfill
6240 (package
6241 (name "python-flake8-polyfill")
6242 (version "1.0.1")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (pypi-uri "flake8-polyfill" version))
6247 (sha256
6248 (base32
6249 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6250 (build-system python-build-system)
6251 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6252 (synopsis "Polyfill package for Flake8 plugins")
6253 (description
6254 "This package that provides some compatibility helpers for Flake8
6255plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6256 (license license:expat)))
6257
6258(define-public python2-flake8-polyfill
6259 (package-with-python2 python-flake8-polyfill))
6260
61b9ac53
FB
6261(define-public python-mistune
6262 (package
6263 (name "python-mistune")
08b81336 6264 (version "0.7.3")
61b9ac53
FB
6265 (source
6266 (origin
6267 (method url-fetch)
eff8d773 6268 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6269 (sha256
6270 (base32
08b81336 6271 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6272 (build-system python-build-system)
328bb95d 6273 (native-inputs
f3b98f4f 6274 `(("python-nose" ,python-nose)
61b9ac53
FB
6275 ("python-cython" ,python-cython)))
6276 (home-page "https://github.com/lepture/mistune")
6277 (synopsis "Markdown parser in pure Python")
6278 (description "This package provides a fast markdown parser in pure
6279Python.")
3f641af0 6280 (license license:bsd-3)))
61b9ac53
FB
6281
6282(define-public python2-mistune
6283 (package-with-python2 python-mistune))
6d992d07 6284
b9893908
EE
6285(define-public python-markdown
6286 (package
6287 (name "python-markdown")
791ac6a6 6288 (version "2.6.7")
b9893908
EE
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "Markdown" version))
6293 (sha256
6294 (base32
791ac6a6 6295 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
b9893908
EE
6296 (build-system python-build-system)
6297 (arguments
6298 `(#:phases
6299 (modify-phases %standard-phases
6300 (replace 'check
6301 (lambda _
6302 (zero? (system* "python" "run-tests.py")))))))
6303 (native-inputs
6304 `(("python-nose" ,python-nose)
6305 ("python-pyyaml" ,python-pyyaml)))
6306 (home-page "https://pythonhosted.org/Markdown/")
6307 (synopsis "Python implementation of Markdown")
6308 (description
6309 "This package provides a Python implementation of John Gruber's
6310Markdown. The library features international input, various Markdown
6311extensions, and several HTML output formats. A command line wrapper
6312markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6313 (license license:bsd-3)))
b9893908
EE
6314
6315(define-public python2-markdown
6316 (package-with-python2 python-markdown))
6317
6d992d07
FB
6318(define-public python-ptyprocess
6319 (package
6320 (name "python-ptyprocess")
6321 (version "0.5")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (string-append
6326 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6327 version ".tar.gz"))
6328 (sha256
6329 (base32
6330 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6331 (build-system python-build-system)
328bb95d 6332 (native-inputs
f3b98f4f 6333 `(("python-nose" ,python-nose)))
6d992d07
FB
6334 (arguments
6335 `(#:phases
6336 (modify-phases %standard-phases
6337 (replace 'check
6338 (lambda _
6339 (zero? (system* "nosetests")))))))
6340 (home-page "https://github.com/pexpect/ptyprocess")
6341 (synopsis "Run a subprocess in a pseudo terminal")
6342 (description
6343 "This package provides a Python library used to launch a subprocess in a
6344pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6345 (license license:isc)))
6d992d07
FB
6346
6347(define-public python2-ptyprocess
6348 (package-with-python2 python-ptyprocess))
4aadb1df 6349
df893a38
MB
6350(define-public python-cram
6351 (package
6352 (name "python-cram")
6353 (version "0.7")
6354 (home-page "https://bitheap.org/cram/")
6355 (source (origin
6356 (method url-fetch)
6357 (uri (list (string-append home-page "cram-"
6358 version ".tar.gz")
6359 (pypi-uri "cram" version)))
6360 (sha256
6361 (base32
6362 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6363 (arguments
6364 '(#:phases
6365 (modify-phases %standard-phases
6366 (add-after 'unpack 'patch-source
6367 (lambda _
6368 (substitute* (find-files "cram" ".*\\.py$")
6369 ;; Replace default shell path.
6370 (("/bin/sh") (which "sh")))
6371 (substitute* (find-files "tests" ".*\\.t$")
6372 (("md5") "md5sum")
6373 (("/bin/bash") (which "bash"))
6374 (("/bin/sh") (which "sh")))
6375 (substitute* "cram/_test.py"
6376 ;; This hack works around a bug triggered by substituting
6377 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6378 ;; "cram -h", which breaks the output at 80 characters. This
6379 ;; causes the line showing the default shell to break into two
6380 ;; lines, but the test expects a single line...
6381 (("env\\['COLUMNS'\\] = '80'")
6382 "env['COLUMNS'] = '160'"))
6383 #t))
6384 (delete 'check)
6385 (add-after 'install 'check
6386 ;; The test phase uses the built library and executable.
6387 ;; It's easier to run it after install since the build
6388 ;; directory contains version-specific PATH.
6389 (lambda* (#:key inputs outputs #:allow-other-keys)
6390 (add-installed-pythonpath inputs outputs)
6391 (setenv "PATH" (string-append (getenv "PATH") ":"
6392 (assoc-ref outputs "out") "/bin"))
6393 (zero? (system* "make" "test")))))))
6394 (build-system python-build-system)
6395 (native-inputs
6396 `(("python-coverage" ,python-coverage)
6397 ("which" ,which)))
6398 (synopsis "Simple testing framework for command line applications")
6399 (description
6400 "Cram is a functional testing framework for command line applications.
6401Cram tests look like snippets of interactive shell sessions. Cram runs each
6402command and compares the command output in the test with the command’s actual
6403output.")
6404 (license license:gpl2+)))
6405
6406(define-public python2-cram
6407 (package-with-python2 python-cram))
6408
4aadb1df
FB
6409(define-public python-terminado
6410 (package
6411 (name "python-terminado")
783fb0a3 6412 (version "0.6")
4aadb1df
FB
6413 (source
6414 (origin
6415 (method url-fetch)
783fb0a3 6416 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6417 (sha256
6418 (base32
783fb0a3 6419 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6420 (build-system python-build-system)
6421 (propagated-inputs
6422 `(("python-tornado" ,python-tornado)
6423 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6424 (native-inputs
6425 `(("python-nose" ,python-nose)))
4aadb1df
FB
6426 (arguments
6427 `(#:phases
6428 (modify-phases %standard-phases
6429 (replace 'check
6430 (lambda _
6431 (zero? (system* "nosetests")))))))
6432 (home-page "https://github.com/takluyver/terminado")
6433 (synopsis "Terminals served to term.js using Tornado websockets")
6434 (description "This package provides a Tornado websocket backend for the
6435term.js Javascript terminal emulator library.")
3f641af0 6436 (license license:bsd-2)
783fb0a3 6437 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6438
6439(define-public python2-terminado
783fb0a3 6440 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6441 (package (inherit terminado)
783fb0a3
EF
6442 (propagated-inputs
6443 `(("python2-backport-ssl-match-hostname"
6444 ,python2-backport-ssl-match-hostname)
00e10c6e 6445 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6446
789de5e2 6447(define-public python-straight-plugin
6448 (package
6449 (name "python-straight-plugin")
6450 (version "1.4.1")
6451 (source
6452 (origin
6453 (method url-fetch)
6454 (uri (pypi-uri "straight.plugin" version))
6455 (sha256
6456 (base32
6457 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6458 (build-system python-build-system)
6459 (home-page "https://github.com/ironfroggy/straight.plugin")
6460 (synopsis "Simple namespaced plugin facility")
6461 (description "Straight Plugin provides a type of plugin you can create from
6462almost any existing Python modules, and an easy way for outside developers to
6463add functionality and customization to your projects with their own plugins.")
6464 (license license:expat)))
6465
6466(define-public python2-straight-plugin
6467 (package-with-python2 python-straight-plugin))
6468
d582eaac
SB
6469(define-public python-fonttools
6470 (package
6471 (name "python-fonttools")
6472 (version "2.5")
6473 (source (origin
6474 (method url-fetch)
6475 (uri (string-append
6476 "https://pypi.python.org/packages/source/F/FontTools/"
6477 "fonttools-" version ".tar.gz"))
6478 (sha256
6479 (base32
6480 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6481 (build-system python-build-system)
9e8c6a37
HG
6482 (arguments
6483 '(#:test-target "check"
6484 #:phases
6485 (modify-phases %standard-phases
6486 (add-after 'unpack 'patch-setuppy
6487 ;; Remove the undocumented "extra_path" argument, which adds an
6488 ;; intervening directories between site-packages and the package
6489 ;; directory.
6490 (lambda _
6491 (substitute* "setup.py"
6492 (("^[ \t]*extra_path *= *'FontTools',") ""))
6493 #t)))))
d582eaac
SB
6494 (home-page "http://github.com/behdad/fonttools")
6495 (synopsis "Tools to manipulate font files")
6496 (description
6497 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6498supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6499of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6500also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6501from an XML-based format.")
3f641af0
DC
6502 (license (license:non-copyleft
6503 "file://LICENSE.txt"
6504 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6505
6506(define-public python2-fonttools
6507 (package-with-python2 python-fonttools))
75710da6 6508
5faa5ce4
RW
6509(define-public python-ly
6510 (package
6511 (name "python-ly")
5135354f 6512 (version "0.9.4")
5faa5ce4
RW
6513 (source
6514 (origin
6515 (method url-fetch)
5135354f
RW
6516 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6517 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6518 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6519 (sha256
6520 (base32
5135354f 6521 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6522 (build-system python-build-system)
972cf9be
MB
6523 (arguments
6524 ;; FIXME: Some tests need network access.
6525 '(#:tests? #f))
5faa5ce4
RW
6526 (synopsis "Tool and library for manipulating LilyPond files")
6527 (description "This package provides a Python library to parse, manipulate
6528or create documents in LilyPond format. A command line program ly is also
6529provided that can be used to do various manipulations with LilyPond files.")
6530 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6531 (license license:gpl2+)))
7e7b27d9
CR
6532
6533(define-public python-appdirs
6534 (package
6535 (name "python-appdirs")
6536 (version "1.4.0")
6537 (source
6538 (origin
6539 (method url-fetch)
6540 (uri (string-append
6541 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6542 version
6543 ".tar.gz"))
6544 (sha256
6545 (base32
6546 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6547 (build-system python-build-system)
7e7b27d9
CR
6548 (home-page "http://github.com/ActiveState/appdirs")
6549 (synopsis
6550 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6551 (description
6552 "This module provides a portable way of finding out where user data
6553should be stored on various operating systems.")
6554 (license license:expat)))
6555
6556(define-public python2-appdirs
6557 (package-with-python2 python-appdirs))
89b2e0b0
LF
6558
6559(define-public python-llfuse
6560 (package
6561 (name "python-llfuse")
e36ace36 6562 (version "1.1.1")
89b2e0b0
LF
6563 (source (origin
6564 (method url-fetch)
6565 (uri (string-append
6566 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6567 "llfuse-" version ".tar.bz2"))
6568 (sha256
6569 (base32
e36ace36 6570 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6571 (build-system python-build-system)
6572 (inputs
6573 `(("fuse" ,fuse)
6574 ("attr" ,attr)))
6575 (native-inputs
f3b98f4f 6576 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6577 (synopsis "Python bindings for FUSE")
6578 (description
6579 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6580 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6581 (license license:lgpl2.0+)
cd0569c4 6582 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6583
6584(define-public python2-llfuse
cd0569c4
LF
6585 (package (inherit (package-with-python2
6586 (strip-python2-variant python-llfuse)))
6587 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6588
6589;; For attic-0.16
6590(define-public python-llfuse-0.41
6591 (package (inherit python-llfuse)
229b3661 6592 (version "0.41.1")
cd0569c4
LF
6593 (source (origin
6594 (method url-fetch)
6595 (uri (string-append
6596 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6597 "llfuse-" version ".tar.bz2"))
6598 (sha256
6599 (base32
229b3661 6600 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6601 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6602 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6603 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6604
6605(define-public python-msgpack
6606 (package
6607 (name "python-msgpack")
aed625bd 6608 (version "0.4.8")
641c9871
LF
6609 (source (origin
6610 (method url-fetch)
ae831df4 6611 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6612 (sha256
6613 (base32
aed625bd 6614 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6615 (build-system python-build-system)
641c9871
LF
6616 (synopsis "MessagePack (de)serializer")
6617 (description "MessagePack is a fast, compact binary serialization format,
6618suitable for similar data to JSON. This package provides CPython bindings for
6619reading and writing MessagePack data.")
6620 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6621 (license license:asl2.0)))
bd74be7b
LF
6622
6623(define-public python2-msgpack
f210e944 6624 (package-with-python2 python-msgpack))
641c9871 6625
6e5e39f4
CR
6626(define-public python-netaddr
6627 (package
6628 (name "python-netaddr")
6629 (version "0.7.18")
6630 (source
6631 (origin
6632 (method url-fetch)
6633 (uri (string-append
6634 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6635 version
6636 ".tar.gz"))
6637 (sha256
6638 (base32
6639 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6640 (build-system python-build-system)
6641 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6642 (home-page "https://github.com/drkjam/netaddr/")
6643 (synopsis "Pythonic manipulation of network addresses")
6644 (description
6645 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6646and MAC network addresses.")
3f641af0 6647 (license license:bsd-3)))
6e5e39f4
CR
6648
6649(define-public python2-netaddr
6650 (package-with-python2 python-netaddr))
8c692a52
CR
6651
6652(define-public python-wrapt
6653 (package
6654 (name "python-wrapt")
6655 (version "1.10.5")
6656 (source
6657 (origin
6658 (method url-fetch)
6659 (uri (string-append
6660 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6661 version
6662 ".tar.gz"))
6663 (sha256
6664 (base32
6665 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6666 (build-system python-build-system)
6667 (arguments
6668 ;; Tests are not included in the tarball, they are only available in the
6669 ;; git repository.
6670 `(#:tests? #f))
8c692a52
CR
6671 (home-page "https://github.com/GrahamDumpleton/wrapt")
6672 (synopsis "Module for decorators, wrappers and monkey patching")
6673 (description
6674 "The aim of the wrapt module is to provide a transparent object proxy for
6675 Python, which can be used as the basis for the construction of function
6676 wrappers and decorator functions.")
3f641af0 6677 (license license:bsd-2)))
8c692a52
CR
6678
6679(define-public python2-wrapt
6680 (package-with-python2 python-wrapt))
b85c85be
CR
6681
6682(define-public python-iso8601
6683 (package
6684 (name "python-iso8601")
fe84bc9a 6685 (version "0.1.11")
b85c85be
CR
6686 (source
6687 (origin
6688 (method url-fetch)
fe84bc9a 6689 (uri (pypi-uri "iso8601" version))
b85c85be 6690 (sha256
fe84bc9a
EF
6691 (base32
6692 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6693 (build-system python-build-system)
63b02364
MB
6694 (native-inputs
6695 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6696 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6697 (synopsis "Module to parse ISO 8601 dates")
6698 (description
6699 "This module parses the most common forms of ISO 8601 date strings (e.g.
6700@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6701 (license license:expat)))
6702
6703(define-public python2-iso8601
6704 (package-with-python2 python-iso8601))
5e412b63
CR
6705
6706(define-public python-monotonic
6707 (package
6708 (name "python-monotonic")
6709 (version "0.3")
6710 (source
6711 (origin
6712 (method url-fetch)
6713 (uri (string-append
6714 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6715 version
6716 ".tar.gz"))
6717 (sha256
6718 (base32
6719 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6720 (build-system python-build-system)
5e412b63
CR
6721 (home-page "https://github.com/atdt/monotonic")
6722 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6723 (description
6724 "This module provides a monotonic() function which returns the value (in
6725fractional seconds) of a clock which never goes backwards.")
3f641af0 6726 (license license:asl2.0)))
5e412b63
CR
6727
6728(define-public python2-monotonic
6729 (package-with-python2 python-monotonic))
de34afac
CR
6730
6731(define-public python-webob
6732 (package
6733 (name "python-webob")
b8834c21 6734 (version "1.5.1")
de34afac
CR
6735 (source
6736 (origin
6737 (method url-fetch)
b8834c21 6738 (uri (pypi-uri "WebOb" version))
de34afac
CR
6739 (sha256
6740 (base32
b8834c21 6741 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6742 (build-system python-build-system)
328bb95d 6743 (native-inputs
f3b98f4f 6744 `(("python-nose" ,python-nose)))
de34afac
CR
6745 (home-page "http://webob.org/")
6746 (synopsis "WSGI request and response object")
6747 (description
6748 "WebOb provides wrappers around the WSGI request environment, and an
6749object to help create WSGI responses.")
6750 (license license:expat)))
6751
6752(define-public python2-webob
6753 (package-with-python2 python-webob))
350ba0a3 6754
02a8a187
BW
6755(define-public python-xlrd
6756 (package
6757 (name "python-xlrd")
c2ad4d70 6758 (version "1.0.0")
02a8a187
BW
6759 (source (origin
6760 (method url-fetch)
e775f48e 6761 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6762 (sha256
6763 (base32
c2ad4d70 6764 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6765 (build-system python-build-system)
6766 (arguments
6767 `(#:phases
6768 (modify-phases %standard-phases
c2ad4d70 6769 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6770 ;; run tests instead for now.
6771 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6772 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6773 (home-page "http://www.python-excel.org/")
6774 (synopsis "Library for extracting data from Excel files")
6775 (description "This packages provides a library to extract data from
c598e35c 6776spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6777@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6778Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6779 (license license:bsd-3)))
02a8a187
BW
6780
6781(define-public python2-xlrd
6782 (package-with-python2 python-xlrd))
6783
350ba0a3
CR
6784(define-public python-prettytable
6785 (package
6786 (name "python-prettytable")
6787 (version "0.7.2")
6788 (source
6789 (origin
6790 (method url-fetch)
6791 (uri (string-append
6792 "https://pypi.python.org/packages/source/P/PrettyTable/"
6793 "prettytable-" version ".tar.bz2"))
6794 (sha256
6795 (base32
6796 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6797 (build-system python-build-system)
350ba0a3
CR
6798 (home-page "http://code.google.com/p/prettytable/")
6799 (synopsis "Display tabular data in an ASCII table format")
6800 (description
6801 "A library designed to represent tabular data in visually appealing ASCII
6802tables. PrettyTable allows for selection of which columns are to be printed,
6803independent alignment of columns (left or right justified or centred) and
6804printing of sub-tables by specifying a row range.")
3f641af0 6805 (license license:bsd-3)))
350ba0a3
CR
6806
6807(define-public python2-prettytable
6808 (package-with-python2 python-prettytable))
7a8ac75a 6809
9f8ee3fe
RW
6810(define-public python-tables
6811 (package
6812 (name "python-tables")
6813 (version "3.2.2")
6814 (source
6815 (origin
6816 (method url-fetch)
6817 (uri (pypi-uri "tables" version))
6818 (sha256
6819 (base32
bac23672
HG
6820 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6821 (modules '((guix build utils)))
6822 (snippet
6823 '(begin
6824 ;; Remove pre-compiled .pyc files from source.
6825 (for-each delete-file-recursively
6826 (find-files "." "__pycache__" #:directories? #t))
6827 (for-each delete-file (find-files "." "\\.pyc$"))
6828 #t))))
9f8ee3fe
RW
6829 (build-system python-build-system)
6830 (arguments
6831 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6832 ;; or "check", so we must override the build and check phases.
6833 #:phases
6834 (modify-phases %standard-phases
6835 (add-after 'unpack 'use-gcc
6836 (lambda _
6837 (substitute* "setup.py"
6838 (("compiler = new_compiler\\(\\)" line)
6839 (string-append line
6840 "\ncompiler.set_executables(compiler='gcc',"
6841 "compiler_so='gcc',"
6842 "linker_exe='gcc',"
6843 "linker_so='gcc -shared')")))
6844 #t))
6845 (replace 'build
6846 (lambda* (#:key inputs #:allow-other-keys)
6847 (zero? (system* "python" "setup.py" "build"
6848 (string-append "--hdf5="
6849 (assoc-ref inputs "hdf5"))))))
6850 (replace 'check
6851 (lambda* (#:key inputs #:allow-other-keys)
6852 (zero? (system* "python" "setup.py" "check"
6853 (string-append "--hdf5="
6854 (assoc-ref inputs "hdf5")))))))))
6855 (propagated-inputs
6856 `(("python-numexpr" ,python-numexpr)
6857 ("python-numpy" ,python-numpy)))
6858 (native-inputs
f3b98f4f 6859 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6860 ("pkg-config" ,pkg-config)))
6861 (inputs
6862 `(("hdf5" ,hdf5)
6863 ("bzip2" ,bzip2)
6864 ("zlib" ,zlib)))
6865 (home-page "http://www.pytables.org/")
6866 (synopsis "Hierarchical datasets for Python")
6867 (description "PyTables is a package for managing hierarchical datasets and
6868designed to efficently cope with extremely large amounts of data.")
3f641af0 6869 (license license:bsd-3)))
9f8ee3fe
RW
6870
6871(define-public python2-tables
6872 (package-with-python2 python-tables))
6873
7a8ac75a
RW
6874(define-public python-pyasn1
6875 (package
6876 (name "python-pyasn1")
caa0edb3 6877 (version "0.1.9")
7a8ac75a
RW
6878 (source
6879 (origin
6880 (method url-fetch)
caa0edb3 6881 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6882 (sha256
6883 (base32
caa0edb3 6884 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6885 (build-system python-build-system)
6886 (home-page "http://pyasn1.sourceforge.net/")
6887 (synopsis "ASN.1 types and codecs")
6888 (description
6889 "This is an implementation of ASN.1 types and codecs in Python. It is
6890suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6891 (license license:bsd-2)))
7a8ac75a
RW
6892
6893(define-public python2-pyasn1
6894 (package-with-python2 python-pyasn1))
9a49a535 6895
5988c299
EF
6896(define-public python-pyasn1-modules
6897 (package
6898 (name "python-pyasn1-modules")
6899 (version "0.0.8")
6900 (source
6901 (origin
6902 (method url-fetch)
6903 (uri (pypi-uri "pyasn1-modules" version))
6904 (sha256
6905 (base32
6906 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6907 (build-system python-build-system)
5988c299
EF
6908 (propagated-inputs
6909 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 6910 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
6911 (synopsis "ASN.1 codec implementations")
6912 (description
6913 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6914implementations of ASN.1-based codecs and protocols.")
3f641af0 6915 (license license:bsd-3)))
5988c299
EF
6916
6917(define-public python2-pyasn1-modules
6918 (package-with-python2 python-pyasn1-modules))
6919
520af157 6920(define-public python-ipaddress
9a49a535 6921 (package
520af157
DC
6922 (name "python-ipaddress")
6923 (version "1.0.16")
6924 (source (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "ipaddress" version))
6927 (sha256
6928 (base32
6929 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6930 (build-system python-build-system)
9a49a535
RW
6931 (home-page "https://github.com/phihag/ipaddress")
6932 (synopsis "IP address manipulation library")
6933 (description
520af157
DC
6934 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6935 in Python. This library is used to create, poke at, and manipulate IPv4 and
6936 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6937 module to older versions of Python.")
f210e944 6938 (license license:psfl)))
520af157
DC
6939
6940(define-public python2-ipaddress
f210e944 6941 (package-with-python2 python-ipaddress))
3f00e078 6942
4a238186
HG
6943(define-public python2-ipaddr
6944 (package
6945 (name "python2-ipaddr")
6946 (version "2.1.11")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (pypi-uri "ipaddr" version))
6951 (sha256
6952 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6953 (build-system python-build-system)
6954 (arguments
6955 `(#:python ,python-2 ;version 2 only
6956 #:phases
6957 (modify-phases %standard-phases
6958 (replace 'check
6959 (lambda* _
6960 (zero? (system* "python" "ipaddr_test.py")))))))
6961 (home-page "https://github.com/google/ipaddr-py")
6962 (synopsis "IP address manipulation library")
6963 (description
6964 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6965IPv6 addresses and networks.
6966
6967For new implementations you may prefer to use the standard module
6968@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6969versions of Python.")
3f641af0 6970 (license license:asl2.0)))
4a238186 6971
3f00e078
RW
6972(define-public python-idna
6973 (package
6974 (name "python-idna")
6975 (version "2.0")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (string-append "https://pypi.python.org/packages/source/i/"
6980 "idna/idna-" version ".tar.gz"))
6981 (sha256
6982 (base32
6983 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6984 (build-system python-build-system)
3f00e078
RW
6985 (home-page "https://github.com/kjd/idna")
6986 (synopsis "Internationalized domain names in applications")
6987 (description
6988 "This is a library to support the Internationalised Domain Names in
6989Applications (IDNA) protocol as specified in RFC 5891. This version of the
6990protocol is often referred to as “IDNA2008” and can produce different results
6991from the earlier standard from 2003. The library is also intended to act as a
6992suitable drop-in replacement for the “encodings.idna” module that comes with
6993the Python standard library but currently only supports the older 2003
6994specification.")
3f641af0 6995 (license license:bsd-4)))
3f00e078
RW
6996
6997(define-public python2-idna
6998 (package-with-python2 python-idna))
36ebf972
RW
6999
7000(define-public python-pretend
7001 (package
7002 (name "python-pretend")
7003 (version "1.0.8")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (string-append "https://pypi.python.org/packages/source/p/"
7008 "pretend/pretend-" version ".tar.gz"))
7009 (sha256
7010 (base32
7011 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7012 (build-system python-build-system)
36ebf972
RW
7013 (home-page "https://github.com/alex/pretend")
7014 (synopsis "Library for stubbing in Python")
7015 (description
7016 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7017technique for writing tests. You may hear the term mixed up with mocks,
7018fakes, or doubles. Basically, a stub is an object that returns pre-canned
7019responses, rather than doing any computation.")
3f641af0 7020 (license license:bsd-3)))
36ebf972
RW
7021
7022(define-public python2-pretend
7023 (package-with-python2 python-pretend))
aa759a51
RW
7024
7025(define-public python-cryptography-vectors
7026 (package
7027 (name "python-cryptography-vectors")
27fab2bf 7028 (version "1.7.1")
aa759a51
RW
7029 (source
7030 (origin
7031 (method url-fetch)
9c509ca9 7032 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7033 (sha256
7034 (base32
27fab2bf 7035 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 7036 (build-system python-build-system)
aa759a51 7037 (home-page "https://github.com/pyca/cryptography")
66e07664 7038 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7039 (description
7040 "This package contains test vectors for the cryptography package.")
7041 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7042 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7043
7044(define-public python2-cryptography-vectors
7045 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7046
7047(define-public python-cryptography
7048 (package
7049 (name "python-cryptography")
27fab2bf 7050 (version "1.7.1")
88b47cb0
RW
7051 (source
7052 (origin
7053 (method url-fetch)
9c509ca9 7054 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7055 (sha256
7056 (base32
27fab2bf 7057 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
7058 (build-system python-build-system)
7059 (inputs
7060 `(("openssl" ,openssl)))
7061 (propagated-inputs
7062 `(("python-cffi" ,python-cffi)
7063 ("python-six" ,python-six)
7064 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
7065 ("python-idna" ,python-idna)
7066 ("python-iso8601" ,python-iso8601)))
7067 (native-inputs
7068 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7069 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7070 ("python-pretend" ,python-pretend)
ce6c13ee
EF
7071 ("python-pyasn1" ,python-pyasn1)
7072 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
7073 ("python-pytz" ,python-pytz)
7074 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
7075 (home-page "https://github.com/pyca/cryptography")
7076 (synopsis "Cryptographic recipes and primitives for Python")
7077 (description
7078 "cryptography is a package which provides cryptographic recipes and
7079primitives to Python developers. It aims to be the “cryptographic standard
7080library” for Python. The package includes both high level recipes, and low
7081level interfaces to common cryptographic algorithms such as symmetric ciphers,
7082message digests and key derivation functions.")
7083 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7084 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7085 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7086
7087(define-public python2-cryptography
519e2f4f
LF
7088 (let ((crypto (package-with-python2
7089 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7090 (package (inherit crypto)
7091 (propagated-inputs
7092 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7093 ("python2-backport-ssl-match-hostname"
7094 ,python2-backport-ssl-match-hostname)
68f1cdec 7095 ("python2-enum34" ,python2-enum34)
88b47cb0 7096 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7097
7098(define-public python-pyopenssl
7099 (package
7100 (name "python-pyopenssl")
61684de2 7101 (version "16.2.0")
5af999b8
RW
7102 (source
7103 (origin
7104 (method url-fetch)
eb68d268 7105 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7106 (sha256
7107 (base32
7c6bf660
MB
7108 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7109 (patches
7110 (search-patches "python-pyopenssl-skip-network-test.patch"))))
5af999b8 7111 (build-system python-build-system)
30e0229a 7112 (arguments
7c6bf660
MB
7113 '(#:phases
7114 (modify-phases %standard-phases
7115 (delete 'check)
7116 (add-after 'install 'check
7117 (lambda* (#:key inputs outputs #:allow-other-keys)
7118 (add-installed-pythonpath inputs outputs)
7119 (zero? (system* "py.test" "-v")))))))
5af999b8
RW
7120 (propagated-inputs
7121 `(("python-cryptography" ,python-cryptography)
7122 ("python-six" ,python-six)))
7123 (inputs
7124 `(("openssl" ,openssl)))
30e0229a
MB
7125 (native-inputs
7126 `(("python-pytest" ,python-pytest)))
5af999b8
RW
7127 (home-page "https://github.com/pyca/pyopenssl")
7128 (synopsis "Python wrapper module around the OpenSSL library")
7129 (description
7130 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7131library.")
3f641af0 7132 (license license:asl2.0)))
5af999b8
RW
7133
7134(define-public python2-pyopenssl
519e2f4f 7135 (package-with-python2 python-pyopenssl))
643725a1
CR
7136
7137(define-public python-pip
7138 (package
7139 (name "python-pip")
392c26b0 7140 (version "9.0.1")
643725a1
CR
7141 (source
7142 (origin
7143 (method url-fetch)
6fb54e3b 7144 (uri (pypi-uri "pip" version))
643725a1
CR
7145 (sha256
7146 (base32
392c26b0 7147 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7148 (build-system python-build-system)
392c26b0
MC
7149 (arguments
7150 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7151 (home-page "https://pip.pypa.io/")
392c26b0 7152 (synopsis "Package manager for Python software")
643725a1 7153 (description
392c26b0 7154 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7155Python Package Index (PyPI).")
7156 (license license:expat)))
7157
7158(define-public python2-pip
7159 (package-with-python2 python-pip))
d8c4998f
LC
7160
7161(define-public python-tlsh
7162 (package
7163 (name "python-tlsh")
99b00dc7 7164 (version "3.4.4")
d8c4998f
LC
7165 (home-page "https://github.com/trendmicro/tlsh")
7166 (source (origin
99b00dc7
EF
7167 (method url-fetch)
7168 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7169 version ".tar.gz"))
d8c4998f
LC
7170 (sha256
7171 (base32
99b00dc7
EF
7172 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7173 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7174 (build-system cmake-build-system)
7175 (arguments
7176 '(#:out-of-source? #f
7177 #:phases (modify-phases %standard-phases
7178 (replace
7179 'install
7180 (lambda* (#:key outputs #:allow-other-keys)
7181 ;; Build and install the Python bindings. The underlying
7182 ;; C++ library is apparently not meant to be installed.
7183 (let ((out (assoc-ref outputs "out")))
7184 (with-directory-excursion "py_ext"
7185 (and (system* "python" "setup.py" "build")
7186 (system* "python" "setup.py" "install"
7187 (string-append "--prefix=" out))))))))))
7188 (inputs `(("python" ,python-wrapper))) ;for the bindings
7189 (synopsis "Fuzzy matching library for Python")
7190 (description
7191 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7192Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7193value which can be used for similarity comparisons. Similar objects have
7194similar hash values, which allows for the detection of similar objects by
7195comparing their hash values. The byte stream should have a sufficient amount
7196of complexity; for example, a byte stream of identical bytes will not generate
7197a hash value.")
3f641af0 7198 (license license:asl2.0)))
d8c4998f
LC
7199
7200(define-public python2-tlsh
7201 (package
7202 (inherit python-tlsh)
7203 (name "python2-tlsh")
7204 (inputs `(("python" ,python-2)))))
d96034ed 7205
67f66812
BW
7206(define-public python-termcolor
7207 (package
7208 (name "python-termcolor")
7209 (version "1.1.0")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri "python-termcolor" version))
7214 (sha256
7215 (base32
7216 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7217 (build-system python-build-system)
7218 (arguments
7219 ;; There are no tests.
7220 `(#:tests? #f))
7221 (home-page "http://pypi.python.org/pypi/termcolor")
7222 (synopsis "ANSII Color formatting for terminal output")
7223 (description
7224 "This package provides ANSII Color formatting for output in terminals.")
7225 (license license:expat)))
7226
7227(define-public python2-termcolor
7228 (package-with-python2 python-termcolor))
7229
d96034ed
LC
7230(define-public python-libarchive-c
7231 (package
7232 (name "python-libarchive-c")
03fd001c 7233 (version "2.2")
d96034ed
LC
7234 (source (origin
7235 (method url-fetch)
03fd001c 7236 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7237 (sha256
7238 (base32
03fd001c 7239 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7240 (build-system python-build-system)
7241 (arguments
7242 '(#:phases (modify-phases %standard-phases
7243 (add-before
7244 'build 'reference-libarchive
7245 (lambda* (#:key inputs #:allow-other-keys)
7246 ;; Retain the absolute file name of libarchive.so.
7247 (let ((libarchive (assoc-ref inputs "libarchive")))
7248 (substitute* "libarchive/ffi.py"
7249 (("find_library\\('archive'\\)")
7250 (string-append "'" libarchive
b41a05ce 7251 "/lib/libarchive.so'")))))))))
d96034ed 7252 (inputs
f3b98f4f 7253 `(("libarchive" ,libarchive)))
d96034ed
LC
7254 (home-page "https://github.com/Changaco/python-libarchive-c")
7255 (synopsis "Python interface to libarchive")
7256 (description
7257 "This package provides Python bindings to libarchive, a C library to
7258access possibly compressed archives in many different formats. It uses
7259Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7260 (license license:lgpl2.0+)))
d96034ed
LC
7261
7262(define-public python2-libarchive-c
7263 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7264
7265(define-public python-file
7266 (package
7267 (inherit file)
7268 (name "python-file")
7ffa5d4a
LF
7269 (source (origin
7270 (inherit (package-source file))
7271 ;; This patch should not be applied to python2-file.
7272 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7273 (build-system python-build-system)
7274 (arguments
7275 '(#:tests? #f ;no tests
00bf74be 7276 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7277 #:phases (modify-phases %standard-phases
7278 (add-before 'build 'change-directory
7279 (lambda _
7280 (chdir "python")
7281 #t))
7282 (add-before 'build 'set-library-file-name
7283 (lambda* (#:key inputs #:allow-other-keys)
7284 (let ((file (assoc-ref inputs "file")))
7285 (substitute* "magic.py"
7286 (("find_library\\('magic'\\)")
7287 (string-append "'" file "/lib/libmagic.so'")))
7288 #t))))))
7289 (inputs `(("file" ,file)))
7290 (self-native-input? #f)
daeeea71
CM
7291 (synopsis "Python bindings to the libmagic file type guesser. Note that
7292this module and the python-magic module both provide a \"magic.py\" file;
7293these two modules, which are different and were developed separately, both
f210e944 7294serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7295
7296(define-public python2-file
f210e944 7297 (package-with-python2 python-file))
85d4aeac
LC
7298
7299(define-public python-debian
7300 (package
7301 (name "python-debian")
02d7f337 7302 (version "0.1.28")
85d4aeac
LC
7303 (source
7304 (origin
7305 (method url-fetch)
5e217a8b 7306 (uri (pypi-uri name version))
85d4aeac
LC
7307 (sha256
7308 (base32
02d7f337 7309 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7310 (build-system python-build-system)
f22efa01 7311 (propagated-inputs
85d4aeac 7312 `(("python-six" ,python-six)))
85d4aeac
LC
7313 (home-page "http://packages.debian.org/sid/python-debian")
7314 (synopsis "Debian package related modules")
7315 (description
5c7bdc9a
LC
7316 ;; XXX: Use @enumerate instead of @itemize to work around
7317 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7318 "This package provides Python modules that abstract many formats of
7319Debian-related files, such as:
7320
5c7bdc9a 7321@enumerate
85d4aeac
LC
7322@item Debtags information;
7323@item @file{debian/changelog} files;
7324@item packages files, pdiffs;
7325@item control files of single or multiple RFC822-style paragraphs---e.g.
7326 @file{debian/control}, @file{.changes}, @file{.dsc};
7327@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7328 contained files and meta-information.
5c7bdc9a 7329@end enumerate\n")
85d4aeac
LC
7330
7331 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7332 (license license:gpl3+)))
85d4aeac
LC
7333
7334(define-public python2-debian
7335 (package-with-python2 python-debian))
816a6538 7336
2d321bb2
RW
7337(define-public python-nbformat
7338 (package
7339 (name "python-nbformat")
7340 (version "4.1.0")
7341 (source
7342 (origin
7343 (method url-fetch)
7344 (uri (pypi-uri "nbformat" version))
7345 (sha256
7346 (base32
7347 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7348 (build-system python-build-system)
7349 (arguments `(#:tests? #f)) ; no test target
7350 (propagated-inputs
7351 `(("python-ipython-genutils" ,python-ipython-genutils)
7352 ("python-jsonschema" ,python-jsonschema)
7353 ("python-jupyter-core" ,python-jupyter-core)
7354 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7355 (home-page "http://jupyter.org")
7356 (synopsis "Jupyter Notebook format")
7357 (description "This package provides the reference implementation of the
7358Jupyter Notebook format and Python APIs for working with notebooks.")
7359 (license license:bsd-3)))
7360
7361(define-public python2-nbformat
7362 (package-with-python2 python-nbformat))
7363
55436048
RW
7364(define-public python-bleach
7365 (package
7366 (name "python-bleach")
7367 (version "1.4.3")
7368 (source
7369 (origin
7370 (method url-fetch)
7371 (uri (pypi-uri "bleach" version))
7372 (sha256
7373 (base32
7374 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7375 (build-system python-build-system)
7376 (propagated-inputs
7377 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7378 ("python-six" ,python-six)))
7379 (native-inputs
7380 `(("python-nose" ,python-nose)))
7381 (home-page "http://github.com/jsocol/bleach")
7382 (synopsis "Whitelist-based HTML-sanitizing tool")
7383 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7384 (license license:asl2.0)))
7385
7386(define-public python2-bleach
7387 (package-with-python2 python-bleach))
7388
60590a3a
RW
7389(define-public python-entrypoints
7390 (package
7391 (name "python-entrypoints")
7392 (version "0.2.2")
7393 (source
7394 (origin
7395 (method url-fetch)
7396 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7397 version ".tar.gz"))
7398 (file-name (string-append name "-" version ".tar.gz"))
7399 (sha256
7400 (base32
7401 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7402 (build-system python-build-system)
7403 ;; The package does not come with a setup.py file, so we have to generate
7404 ;; one ourselves.
7405 (arguments
7406 `(#:tests? #f
7407 #:phases
7408 (modify-phases %standard-phases
7409 (add-after 'unpack 'create-setup.py
7410 (lambda _
7411 (call-with-output-file "setup.py"
7412 (lambda (port)
7413 (format port "\
7414from setuptools import setup
7415setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7416" ,version))))))))
7417 (home-page "https://github.com/takluyver/entrypoints")
7418 (synopsis "Discover and load entry points from installed Python packages")
7419 (description "Entry points are a way for Python packages to advertise
7420objects with some common interface. The most common examples are
7421@code{console_scripts} entry points, which define shell commands by
7422identifying a Python function to run. The @code{entrypoints} module contains
7423functions to find and load entry points.")
7424 (license license:expat)))
7425
7426(define-public python2-entrypoints
7427 (package-with-python2 python-entrypoints))
7428
c60898a8
RW
7429(define-public python-nbconvert
7430 (package
7431 (name "python-nbconvert")
7432 (version "5.0.0b1")
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "nbconvert" version))
7437 (sha256
7438 (base32
7439 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7440 (build-system python-build-system)
497355dc
MB
7441 (arguments
7442 `(;; The "bdist_egg" target is disabled by default, causing the installation
7443 ;; to fail.
7444 #:configure-flags (list "bdist_egg")
7445 ;; FIXME: 5 failures, 40 errors.
7446 #:tests? #f))
7447 ;; #:phases
7448 ;; (modify-phases %standard-phases
7449 ;; (replace 'check
7450 ;; (lambda _
7451 ;; (zero? (system* "py.test" "-v")))))
7452 (native-inputs
7453 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7454 (propagated-inputs
7455 `(("python-bleach" ,python-bleach)
7456 ("python-entrypoints" ,python-entrypoints)
7457 ("python-jinja2" ,python-jinja2)
7458 ("python-jupyter-core" ,python-jupyter-core)
7459 ("python-mistune" ,python-mistune)
7460 ("python-nbformat" ,python-nbformat)
7461 ("python-pygments" ,python-pygments)
c60898a8
RW
7462 ("python-traitlets" ,python-traitlets)))
7463 (home-page "http://jupyter.org")
7464 (synopsis "Converting Jupyter Notebooks")
7465 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7466notebooks to various other formats via Jinja templates. It allows you to
7467convert an @code{.ipynb} notebook file into various static formats including:
7468
7469@enumerate
7470@item HTML
7471@item LaTeX
7472@item PDF
7473@item Reveal JS
7474@item Markdown (md)
7475@item ReStructured Text (rst)
7476@item executable script
7477@end enumerate\n")
7478 (license license:bsd-3)))
7479
7480(define-public python2-nbconvert
7481 (package-with-python2 python-nbconvert))
7482
a0d62280
RW
7483(define-public python-notebook
7484 (package
7485 (name "python-notebook")
7486 (version "4.2.3")
7487 (source (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "notebook" version))
7490 (sha256
7491 (base32
7492 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7493 (build-system python-build-system)
7494 (arguments
7495 `(#:phases
7496 (modify-phases %standard-phases
7497 (replace 'check
7498 (lambda _
7499 ;; HOME must be set for tests
7500 (setenv "HOME" "/tmp")
7501 (zero? (system* "nosetests")))))))
7502 (propagated-inputs
7503 `(("python-jupyter-core" ,python-jupyter-core)
7504 ("python-nbformat" ,python-nbformat)
7505 ("python-nbconvert" ,python-nbconvert)
7506 ("python-ipython" ,python-ipython)))
7507 (native-inputs
7508 `(("python-nose" ,python-nose)
7509 ("python-sphinx" ,python-sphinx)
7510 ("python-requests" ,python-requests)))
7511 (home-page "http://jupyter.org/")
7512 (synopsis "Web-based notebook environment for interactive computing")
7513 (description
7514 "The Jupyter HTML notebook is a web-based notebook environment for
7515interactive computing.")
3a735ecf 7516 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7517 (license license:bsd-3)))
7518
7519(define-public python2-notebook
3a735ecf
HG
7520 (let ((base (package-with-python2
7521 (strip-python2-variant python-notebook))))
7522 (package (inherit base)
7523 (native-inputs
7524 `(("python2-mock" ,python2-mock)
7525 ,@(package-native-inputs base)))
7526 (arguments
7527 (substitute-keyword-arguments (package-arguments base)
7528 ((#:phases phases)
7529 `(modify-phases ,phases
7530 (add-before 'check 'disable-test-case
7531 ;; The test requires network access to localhost. Curiously it
7532 ;; fails with Python 2 only. Simply make the test-case return
7533 ;; immediately.
7534 (lambda _
7535 (substitute*
7536 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7537 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7538
d55724ed
RW
7539(define-public python-widgetsnbextension
7540 (package
7541 (name "python-widgetsnbextension")
7542 (version "1.2.6")
7543 (source
7544 (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "widgetsnbextension" version))
7547 (sha256
7548 (base32
7549 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7550 (build-system python-build-system)
7551 (propagated-inputs
7552 `(("python-notebook" ,python-notebook)))
7553 (native-inputs
58f5fae7
MB
7554 `(("python-certifi" ,python-certifi)
7555 ("python-nose" ,python-nose)))
d55724ed
RW
7556 (home-page "http://ipython.org")
7557 (synopsis "IPython HTML widgets for Jupyter")
7558 (description "This package provides interactive HTML widgets for Jupyter
7559notebooks.")
7560 (license license:bsd-3)))
7561
7562(define-public python2-widgetsnbextension
7563 (package-with-python2 python-widgetsnbextension))
7564
4fe2e344
RW
7565(define-public python-ipywidgets
7566 (package
7567 (name "python-ipywidgets")
7568 (version "5.2.2")
7569 (source
7570 (origin
7571 (method url-fetch)
7572 (uri (pypi-uri "ipywidgets" version))
7573 (sha256
7574 (base32
7575 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7576 (build-system python-build-system)
7577 ;; FIXME: it's not clear how to run the tests.
7578 (arguments `(#:tests? #f))
7579 (propagated-inputs
7580 `(("python-ipykernel" ,python-ipykernel)
7581 ("python-ipython" ,python-ipython)
4fe2e344
RW
7582 ("python-traitlets" ,python-traitlets)
7583 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7584 (home-page "http://ipython.org")
7585 (synopsis "IPython HTML widgets for Jupyter")
7586 (description "Ipywidgets are interactive HTML widgets for Jupyter
7587notebooks and the IPython kernel. Notebooks come alive when interactive
7588widgets are used. Users gain control of their data and can visualize changes
7589in the data.")
7590 (license license:bsd-3)))
7591
7592(define-public python2-ipywidgets
7593 (package-with-python2 python-ipywidgets))
7594
8ceebf8f
RW
7595(define-public python-jupyter-console
7596 (package
7597 (name "python-jupyter-console")
7598 (version "5.0.0")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "jupyter_console" version))
7603 (sha256
7604 (base32
7605 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7606 (build-system python-build-system)
7607 ;; FIXME: it's not clear how to run the tests.
7608 (arguments `(#:tests? #f))
7609 (propagated-inputs
7610 `(("python-ipykernel" ,python-ipykernel)
7611 ("python-ipython" ,python-ipython)
7612 ("python-jupyter-client" ,python-jupyter-client)
7613 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7614 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7615 (home-page "https://jupyter.org")
7616 (synopsis "Jupyter terminal console")
7617 (description "This package provides a terminal-based console frontend for
7618Jupyter kernels. It also allows for console-based interaction with non-Python
7619Jupyter kernels such as IJulia and IRKernel.")
7620 (license license:bsd-3)))
7621
7622(define-public python2-jupyter-console
7623 (package-with-python2 python-jupyter-console))
7624
c27ae827
RW
7625(define-public jupyter
7626 (package
7627 (name "jupyter")
7628 (version "1.0.0")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "jupyter" version))
7633 (sha256
7634 (base32
7635 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7636 (build-system python-build-system)
7637 ;; FIXME: it's not clear how to run the tests.
7638 (arguments `(#:tests? #f))
7639 (propagated-inputs
7640 `(("python-ipykernel" ,python-ipykernel)
7641 ("python-ipywidgets" ,python-ipywidgets)
7642 ("python-jupyter-console" ,python-jupyter-console)
7643 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7644 ("python-notebook" ,python-notebook)))
c27ae827
RW
7645 (home-page "http://jupyter.org")
7646 (synopsis "Web application for interactive documents")
7647 (description
7648 "The Jupyter Notebook is a web application that allows you to create and
7649share documents that contain live code, equations, visualizations and
7650explanatory text. Uses include: data cleaning and transformation, numerical
7651simulation, statistical modeling, machine learning and much more.")
7652 (license license:bsd-3)))
7653
816a6538
LC
7654(define-public python-chardet
7655 (package
7656 (name "python-chardet")
7657 (version "2.3.0")
7658 (source
7659 (origin
7660 (method url-fetch)
7661 (uri (string-append
7662 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7663 version
7664 ".tar.gz"))
7665 (sha256
7666 (base32
7667 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7668 (build-system python-build-system)
816a6538
LC
7669 (home-page "https://github.com/chardet/chardet")
7670 (synopsis "Universal encoding detector for Python 2 and 3")
7671 (description
7672 "This package provides @code{chardet}, a Python module that can
7673automatically detect a wide range of file encodings.")
3f641af0 7674 (license license:lgpl2.1+)))
816a6538
LC
7675
7676(define-public python2-chardet
7677 (package-with-python2 python-chardet))
2fc5f186 7678
1872f1bb
KM
7679(define-public python-docopt
7680 (package
7681 (name "python-docopt")
7682 (version "0.6.2")
7683 (source
7684 (origin
7685 (method url-fetch)
7686 ;; The release on PyPI does not include tests.
7687 (uri (string-append
7688 "https://github.com/docopt/docopt/archive/"
7689 version ".tar.gz"))
7690 (file-name (string-append name "-" version ".tar.gz"))
7691 (sha256
7692 (base32
7693 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7694 (build-system python-build-system)
7695 (native-inputs
f3b98f4f 7696 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7697 (arguments
7698 `(#:phases (alist-replace
7699 'check
7700 (lambda _ (zero? (system* "py.test")))
7701 %standard-phases)))
7702 (home-page "http://docopt.org")
7703 (synopsis "Command-line interface description language for Python")
7704 (description "This library allows the user to define a command-line
7705interface from a program's help message rather than specifying it
7706programatically with command-line parsers like @code{getopt} and
7707@code{argparse}.")
7708 (license license:expat)))
7709
7710(define-public python2-docopt
7711 (package-with-python2 python-docopt))
7712
2fc5f186
LF
7713(define-public python-zope-event
7714 (package
7715 (name "python-zope-event")
7716 (version "4.1.0")
7717 (source
7718 (origin
7719 (method url-fetch)
7720 (uri (string-append "https://pypi.python.org/packages/source/z"
7721 "/zope.event/zope.event-" version ".tar.gz"))
7722 (sha256
7723 (base32
7724 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7725 (build-system python-build-system)
2fc5f186
LF
7726 (home-page "http://pypi.python.org/pypi/zope.event")
7727 (synopsis "Event publishing system for Python")
7728 (description "Zope.event provides an event publishing API, intended for
7729use by applications which are unaware of any subscribers to their events. It
7730is a simple event-dispatching system on which more sophisticated event
7731dispatching systems can be built.")
3f641af0 7732 (license license:zpl2.1)))
2fc5f186
LF
7733
7734(define-public python2-zope-event
7735 (package-with-python2 python-zope-event))
97abe268
LF
7736
7737(define-public python-zope-interface
7738 (package
7739 (name "python-zope-interface")
7740 (version "4.1.3")
7741 (source
7742 (origin
7743 (method url-fetch)
7744 (uri (string-append "https://pypi.python.org/packages/source/z"
7745 "/zope.interface/zope.interface-" version ".tar.gz"))
7746 (sha256
7747 (base32
7748 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7749 (build-system python-build-system)
38d480a8 7750 (native-inputs
97abe268
LF
7751 `(("python-zope-event" ,python-zope-event)))
7752 (home-page "https://github.com/zopefoundation/zope.interface")
7753 (synopsis "Python implementation of the \"design by contract\"
7754methodology")
7755 (description "Zope.interface provides an implementation of \"object
7756interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7757conforming to a given API or contract.")
3f641af0 7758 (license license:zpl2.1)))
97abe268
LF
7759
7760(define-public python2-zope-interface
7761 (package-with-python2 python-zope-interface))
81f2373c
LF
7762
7763(define-public python-zope-exceptions
7764 (package
7765 (name "python-zope-exceptions")
7766 (version "4.0.8")
7767 (source
7768 (origin
7769 (method url-fetch)
7770 (uri (string-append "https://pypi.python.org/packages/source/z"
7771 "/zope.exceptions/zope.exceptions-"
7772 version ".tar.gz"))
7773 (sha256
7774 (base32
7775 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7776 (build-system python-build-system)
7777 (arguments
7778 '(#:tests? #f)) ; circular dependency with zope.testrunner
7779 (propagated-inputs
7780 `(("python-zope-interface" ,python-zope-interface)))
7781 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7782 (synopsis "Zope exceptions")
7783 (description "Zope.exceptions provides general-purpose exception types
7784that have uses outside of the Zope framework.")
3f641af0 7785 (license license:zpl2.1)))
81f2373c
LF
7786
7787(define-public python2-zope-exceptions
7788 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7789
7790(define-public python-zope-testing
7791 (package
7792 (name "python-zope-testing")
7793 (version "4.5.0")
7794 (source
7795 (origin
7796 (method url-fetch)
7797 (uri (string-append "https://pypi.python.org/packages/source/z"
7798 "/zope.testing/zope.testing-" version ".tar.gz"))
7799 (sha256
7800 (base32
b02f7a21
HG
7801 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7802 (modules '((guix build utils)))
7803 (snippet
7804 '(begin
7805 ;; Remove pre-compiled .pyc files backup files from source.
7806 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7807 #t))))
900e3c0e
LF
7808 (build-system python-build-system)
7809 (native-inputs
7810 `(("python-zope-exceptions" ,python-zope-exceptions)))
7811 (propagated-inputs
7812 `(("python-zope-interface" ,python-zope-interface)))
7813 (home-page "http://pypi.python.org/pypi/zope.testing")
7814 (synopsis "Zope testing helpers")
7815 (description "Zope.testing provides a number of testing utilities for HTML
7816forms, HTTP servers, regular expressions, and more.")
3f641af0 7817 (license license:zpl2.1)))
900e3c0e
LF
7818
7819(define-public python2-zope-testing
7820 (package-with-python2 python-zope-testing))
01614c4f
LF
7821
7822(define-public python-zope-testrunner
7823 (package
7824 (name "python-zope-testrunner")
7825 (version "4.4.9")
7826 (source
7827 (origin
7828 (method url-fetch)
7829 (uri (string-append "https://pypi.python.org/packages/source/z"
7830 "/zope.testrunner/zope.testrunner-"
7831 version ".zip"))
7832 (sha256
7833 (base32
7834 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7835 (build-system python-build-system)
385871e5
MB
7836 (arguments
7837 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7838 (native-inputs
7839 `(("python-six" ,python-six)
e408ffc3 7840 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7841 ("python-zope-exceptions" ,python-zope-exceptions)
7842 ("python-zope-testing" ,python-zope-testing)
7843 ("unzip" ,unzip)))
7844 (propagated-inputs
7845 `(("python-zope-interface" ,python-zope-interface)))
7846 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7847 (synopsis "Zope testrunner script")
7848 (description "Zope.testrunner provides a script for running Python
7849tests.")
3f641af0 7850 (license license:zpl2.1)))
01614c4f
LF
7851
7852(define-public python2-zope-testrunner
7853 (let ((base (package-with-python2 python-zope-testrunner)))
7854 (package
7855 (inherit base)
7856 (native-inputs
7857 (append (package-native-inputs base)
7858 `(("python2-subunit" ,python2-subunit)
7859 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7860
7861(define-public python-zope-i18nmessageid
7862 (package
7863 (name "python-zope-i18nmessageid")
7864 (version "4.0.3")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (string-append
7869 "https://pypi.python.org/packages/source/z"
7870 "/zope.i18nmessageid/zope.i18nmessageid-"
7871 version ".tar.gz"))
7872 (sha256
7873 (base32
7874 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7875 (build-system python-build-system)
6a5c710c
LF
7876 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7877 (synopsis "Message identifiers for internationalization")
7878 (description "Zope.i18nmessageid provides facilities for declaring
7879internationalized messages within program source text.")
3f641af0 7880 (license license:zpl2.1)))
6a5c710c
LF
7881
7882(define-public python2-zope-i18nmessageid
7883 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7884
7885(define-public python-zope-schema
7886 (package
7887 (name "python-zope-schema")
7888 (version "4.4.2")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (string-append "https://pypi.python.org/packages/source/z"
7893 "/zope.schema/zope.schema-" version ".tar.gz"))
7894 (sha256
7895 (base32
7896 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7897 (build-system python-build-system)
22dba2ef
MB
7898 (arguments
7899 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7900 (propagated-inputs
7901 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7902 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7903 ("python-zope-interface" ,python-zope-interface)))
7904 (native-inputs
47f77210
HG
7905 `(("python-zope-testing" ,python-zope-testing)
7906 ("python-coverage" ,python-coverage)
7907 ("python-nose" ,python-nose)))
71fb09f3
LF
7908 (home-page "http://pypi.python.org/pypi/zope.schema")
7909 (synopsis "Zope data schemas")
7910 (description "Zope.scheme provides extensions to zope.interface for
7911defining data schemas.")
3f641af0 7912 (license license:zpl2.1)))
71fb09f3
LF
7913
7914(define-public python2-zope-schema
7915 (package-with-python2 python-zope-schema))
fbac9b17
LF
7916
7917(define-public python-zope-configuration
7918 (package
7919 (name "python-zope-configuration")
7920 (version "4.0.3")
7921 (source (origin
7922 (method url-fetch)
7923 (uri (string-append "https://pypi.python.org/packages/source/z"
7924 "/zope.configuration/zope.configuration-"
7925 version ".tar.gz"))
7926 (sha256
7927 (base32
7928 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7929 (build-system python-build-system)
7e8b1bfa
MB
7930 (arguments
7931 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7932 (propagated-inputs
7933 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7934 ("python-zope-schema" ,python-zope-schema)))
7935 (home-page "http://pypi.python.org/pypi/zope.configuration")
7936 (synopsis "Zope Configuration Markup Language")
7937 (description "Zope.configuration implements ZCML, the Zope Configuration
7938Markup Language.")
3f641af0 7939 (license license:zpl2.1)))
fbac9b17
LF
7940
7941(define-public python2-zope-configuration
7942 (package-with-python2 python-zope-configuration))
2ad52086
LF
7943
7944(define-public python-zope-proxy
7945 (package
7946 (name "python-zope-proxy")
7947 (version "4.1.6")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (string-append "https://pypi.python.org/packages/source/z"
7952 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7953 (sha256
7954 (base32
7955 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7956 (build-system python-build-system)
66b3aadb
MB
7957 (arguments
7958 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7959 (propagated-inputs
7960 `(("python-zope-interface" ,python-zope-interface)))
7961 (home-page "http://pypi.python.org/pypi/zope.proxy")
7962 (synopsis "Generic, transparent proxies")
7963 (description "Zope.proxy provides generic, transparent proxies for Python.
7964Proxies are special objects which serve as mostly-transparent wrappers around
7965another object, intervening in the apparent behavior of the wrapped object
7966only when necessary to apply the policy (e.g., access checking, location
7967brokering, etc.) for which the proxy is responsible.")
3f641af0 7968 (license license:zpl2.1)))
2ad52086
LF
7969
7970(define-public python2-zope-proxy
7971 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7972
7973(define-public python-zope-location
7974 (package
7975 (name "python-zope-location")
7976 (version "4.0.3")
7977 (source
7978 (origin
7979 (method url-fetch)
7980 (uri (string-append "https://pypi.python.org/packages/source/z"
7981 "/zope.location/zope.location-" version ".tar.gz"))
7982 (sha256
7983 (base32
7984 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7985 (build-system python-build-system)
40bb8e07
MB
7986 (arguments
7987 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7988 (propagated-inputs
f404b5ea
LF
7989 `(("python-zope-proxy" ,python-zope-proxy)
7990 ("python-zope-schema" ,python-zope-schema)))
7991 (home-page "http://pypi.python.org/pypi/zope.location/")
7992 (synopsis "Zope location library")
7993 (description "Zope.location implements the concept of \"locations\" in
7994Zope3, which are are special objects that have a structural location.")
3f641af0 7995 (license license:zpl2.1)))
f404b5ea
LF
7996
7997(define-public python2-zope-location
7998 (package-with-python2 python-zope-location))
d4b77f36
LF
7999
8000(define-public python-zope-security
8001 (package
8002 (name "python-zope-security")
8003 (version "4.0.3")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (string-append "https://pypi.python.org/packages/source/z"
8008 "/zope.security/zope.security-" version ".tar.gz"))
8009 (sha256
8010 (base32
8011 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8012 (build-system python-build-system)
a74f9b12
MB
8013 (arguments
8014 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8015 (propagated-inputs
8016 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8017 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8018 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8019 (native-inputs
8020 `(("python-six" ,python-six)
8021 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8022 ("python-zope-configuration" ,python-zope-configuration)
8023 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8024 ("python-zope-testrunner" ,python-zope-testrunner)
8025 ("python-zope-testing" ,python-zope-testing)))
8026 (home-page "http://pypi.python.org/pypi/zope.security")
8027 (synopsis "Zope security framework")
8028 (description "Zope.security provides a generic mechanism to implement
8029security policies on Python objects.")
3f641af0 8030 (license license:zpl2.1)))
d4b77f36
LF
8031
8032(define-public python2-zope-security
04417662
EF
8033 (let ((zope-security (package-with-python2 python-zope-security)))
8034 (package (inherit zope-security)
8035 (propagated-inputs
8036 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8037 ,@(alist-delete
8038 "python-zope-testrunner"
8039 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8040
8041(define-public python-zope-component
8042 (package
8043 (name "python-zope-component")
8044 (version "4.2.2")
8045 (source
8046 (origin
8047 (method url-fetch)
8048 (uri (string-append "https://pypi.python.org/packages/source/z"
8049 "/zope.component/zope.component-" version ".tar.gz"))
8050 (sha256
8051 (base32
8052 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8053 (build-system python-build-system)
8054 (arguments
8055 ;; Skip tests due to circular dependency with python-zope-security.
8056 '(#:tests? #f))
8057 (native-inputs
8058 `(("python-zope-testing" ,python-zope-testing)))
8059 (propagated-inputs
8060 `(("python-zope-event" ,python-zope-event)
8061 ("python-zope-interface" ,python-zope-interface)
8062 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8063 ("python-zope-configuration" ,python-zope-configuration)))
8064 (home-page "https://github.com/zopefoundation/zope.component")
8065 (synopsis "Zope Component Architecture")
8066 (description "Zope.component represents the core of the Zope Component
8067Architecture. Together with the zope.interface package, it provides
8068facilities for defining, registering and looking up components.")
3f641af0 8069 (license license:zpl2.1)))
a6b61b27
LF
8070
8071(define-public python2-zope-component
8072 (package-with-python2 python-zope-component))
3859ac12 8073
1ae44b80 8074(define-public python-pythondialog
b5f218be 8075 (package
1ae44b80 8076 (name "python-pythondialog")
42c4b246 8077 (version "3.4.0")
b5f218be
LF
8078 (source
8079 (origin
8080 (method url-fetch)
1ae44b80 8081 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8082 (sha256
8083 (base32
1ae44b80 8084 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8085 (build-system python-build-system)
8086 (arguments
8087 `(#:phases
8088 (modify-phases %standard-phases
8089 (add-after 'unpack 'patch-path
8090 (lambda* (#:key inputs #:allow-other-keys)
8091 (let* ((dialog (assoc-ref inputs "dialog")))
8092 ;; Since this library really wants to grovel the search path, we
8093 ;; must hardcode dialog's store path into it.
8094 (substitute* "dialog.py"
8095 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8096 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8097 #t))))
b5f218be
LF
8098 #:tests? #f)) ; no test suite
8099 (propagated-inputs
8100 `(("dialog" ,dialog)))
8101 (home-page "http://pythondialog.sourceforge.net/")
8102 (synopsis "Python interface to the UNIX dialog utility")
8103 (description "A Python wrapper for the dialog utility. Its purpose is to
8104provide an easy to use, pythonic and comprehensive Python interface to dialog.
8105This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8106 (license license:lgpl2.1)
1ae44b80
LF
8107 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8108
8109(define-public python2-pythondialog
8110 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8111 (package
8112 (inherit base)
8113 (version (package-version python-pythondialog))
8114 (source (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "python2-pythondialog" version))
8117 (sha256
8118 (base32
8119 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8120
3859ac12
LF
8121(define-public python-pyrfc3339
8122 (package
8123 (name "python-pyrfc3339")
d9aa097b 8124 (version "1.0")
3859ac12
LF
8125 (source
8126 (origin
8127 (method url-fetch)
d9aa097b 8128 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8129 (sha256
8130 (base32
d9aa097b 8131 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8132 (build-system python-build-system)
8133 (propagated-inputs
8134 `(("python-pytz" ,python-pytz)))
8135 (native-inputs
f3b98f4f 8136 `(("python-nose" ,python-nose)))
3859ac12
LF
8137 (home-page "https://github.com/kurtraschke/pyRFC3339")
8138 (synopsis "Python timestamp library")
8139 (description "Python library for generating and parsing RFC 3339-compliant
8140timestamps.")
8141 (license license:expat)))
8142
8143(define-public python2-pyrfc3339
8144 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8145
8146(define-public python-werkzeug
8147 (package
8148 (name "python-werkzeug")
bbb99d6b 8149 (version "0.11.15")
5eea2005
LF
8150 (source
8151 (origin
8152 (method url-fetch)
4b47cbfa 8153 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8154 (sha256
8155 (base32
bbb99d6b 8156 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8157 (build-system python-build-system)
8158 (native-inputs
8159 `(("python-pytest" ,python-pytest)))
8160 (home-page "http://werkzeug.pocoo.org/")
8161 (synopsis "Utilities for WSGI applications")
8162 (description "One of the most advanced WSGI utility modules. It includes a
8163powerful debugger, full-featured request and response objects, HTTP utilities to
8164handle entity tags, cache control headers, HTTP dates, cookie handling, file
8165uploads, a powerful URL routing system and a bunch of community-contributed
8166addon modules.")
3f641af0 8167 (license license:x11)))
5eea2005
LF
8168
8169(define-public python2-werkzeug
8170 (package-with-python2 python-werkzeug))
99fffa8a
LF
8171
8172(define-public python-configobj
8173 (package
8174 (name "python-configobj")
8175 (version "5.0.6")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (string-append
8179 "https://pypi.python.org/packages/source/c/configobj/"
8180 "configobj-" version ".tar.gz"))
8181 (sha256
8182 (base32
8183 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8184 ;; Patch setup.py so it looks for python-setuptools, which is
8185 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8186 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8187 (build-system python-build-system)
861f70c9 8188 (propagated-inputs
f3b98f4f 8189 `(("python-six" ,python-six)))
99fffa8a
LF
8190 (synopsis "Config file reading, writing and validation")
8191 (description "ConfigObj is a simple but powerful config file reader and
8192writer: an ini file round tripper. Its main feature is that it is very easy to
8193use, with a straightforward programmer’s interface and a simple syntax for
8194config files.")
8195 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8196 (license license:bsd-3)))
99fffa8a
LF
8197
8198(define-public python2-configobj
8199 (package-with-python2 python-configobj))
79e8a291
LF
8200
8201(define-public python-configargparse
8202 (package
8203 (name "python-configargparse")
8204 (version "0.10.0")
8205 (source (origin
8206 (method url-fetch)
8207 (uri (string-append
8208 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8209 "ConfigArgParse-" version ".tar.gz"))
8210 (sha256
8211 (base32
8212 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8213 (build-system python-build-system)
8214 (arguments
8215 ;; FIXME: Bug in test suite filed upstream:
8216 ;; https://github.com/bw2/ConfigArgParse/issues/32
8217 '(#:tests? #f))
8218 (synopsis "Replacement for argparse")
8219 (description "A drop-in replacement for argparse that allows options to also
8220be set via config files and/or environment variables.")
8221 (home-page "https://github.com/bw2/ConfigArgParse")
8222 (license license:expat)))
8223
8224(define-public python2-configargparse
8225 (package-with-python2 python-configargparse))
ab41f979
LF
8226
8227(define-public python-ndg-httpsclient
8228 (package
8229 (name "python-ndg-httpsclient")
ae476d01 8230 (version "0.4.2")
ab41f979
LF
8231 (source (origin
8232 (method url-fetch)
7be13d00 8233 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8234 (sha256
8235 (base32
ae476d01 8236 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8237 (build-system python-build-system)
a39cc016
LF
8238 (arguments
8239 '(;; The tests appear to require networking.
8240 #:tests? #f))
ab41f979
LF
8241 (propagated-inputs
8242 `(("python-pyopenssl" ,python-pyopenssl)))
8243 (synopsis "HTTPS support for Python's httplib and urllib2")
8244 (description "This is a HTTPS client implementation for httplib and urllib2
8245based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8246over the default provided with Python and importantly enables full verification
8247of the SSL peer.")
8248 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8249 (license license:bsd-3)))
ab41f979
LF
8250
8251;; python2-openssl requires special care, so package-with-python2 is
8252;; insufficient.
8253(define-public python2-ndg-httpsclient
8254 (package (inherit python-ndg-httpsclient)
8255 (name "python2-ndg-httpsclient")
8256 (arguments `(#:python ,python-2))
8257 (propagated-inputs
8258 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8259
8260(define-public python-contextlib2
8261 (package
8262 (name "python-contextlib2")
8263 (version "0.4.0")
8264 (source
8265 (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "contextlib2" version))
8268 (sha256
8269 (base32
8270 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8271 (build-system python-build-system)
8272 (arguments
8273 `(#:phases
8274 (modify-phases %standard-phases
8275 (replace 'check
8276 (lambda _ (zero?
8277 (system*
b3546174 8278 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8279 (home-page "http://contextlib2.readthedocs.org/")
8280 (synopsis "Tools for decorators and context managers")
8281 (description "This module is primarily a backport of the Python
82823.2 contextlib to earlier Python versions. Like contextlib, it
8283provides utilities for common tasks involving decorators and context
8284managers. It also contains additional features that are not part of
8285the standard library.")
3f641af0 8286 (license license:psfl)))
03f964a5
CM
8287
8288(define-public python2-contextlib2
8289 (package-with-python2 python-contextlib2))
210bf497
DT
8290
8291(define-public python-texttable
8292 (package
8293 (name "python-texttable")
8294 (version "0.8.4")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "texttable" version))
8299 (sha256
8300 (base32
8301 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8302 (build-system python-build-system)
8303 (arguments '(#:tests? #f)) ; no tests
8304 (home-page "https://github.com/foutaise/texttable/")
8305 (synopsis "Python module for creating simple ASCII tables")
8306 (description "Texttable is a Python module for creating simple ASCII
8307tables.")
3f641af0 8308 (license license:lgpl2.1+)))
210bf497
DT
8309
8310(define-public python2-texttable
8311 (package-with-python2 python-texttable))
67c52bb3
DT
8312
8313(define-public python-websocket-client
8314 (package
8315 (name "python-websocket-client")
6b810897 8316 (version "0.37.0")
67c52bb3
DT
8317 (source
8318 (origin
8319 (method url-fetch)
6b810897 8320 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8321 (sha256
8322 (base32
6b810897 8323 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8324 (build-system python-build-system)
a5333f7c
HG
8325 (propagated-inputs
8326 `(("python-six" ,python-six)))
67c52bb3
DT
8327 (home-page "https://github.com/liris/websocket-client")
8328 (synopsis "WebSocket client for Python")
8329 (description "The Websocket-client module provides the low level APIs for
8330WebSocket usage in Python programs.")
3f641af0 8331 (license license:lgpl2.1+)))
67c52bb3
DT
8332
8333(define-public python2-websocket-client
8334 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8335
8336(define-public python-atomicwrites
8337 (package
8338 (name "python-atomicwrites")
4e92d76a 8339 (version "1.1.0")
5c6eea2a
LF
8340 (source (origin
8341 (method url-fetch)
8342 (uri (pypi-uri "atomicwrites" version))
8343 (sha256
8344 (base32
4e92d76a 8345 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
8346 (build-system python-build-system)
8347 (synopsis "Atomic file writes in Python")
8348 (description "Library for atomic file writes using platform dependent tools
8f65585b 8349for atomic file system operations.")
5c6eea2a 8350 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8351 (license license:expat)))
9bb6d184
LF
8352
8353(define-public python2-atomicwrites
f210e944 8354 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8355
8356(define-public python-requests-toolbelt
8357 (package
8358 (name "python-requests-toolbelt")
c02af1c8 8359 (version "0.6.2")
561bb3cb
LF
8360 (source (origin
8361 (method url-fetch)
c02af1c8
LF
8362 (uri (string-append
8363 "https://pypi.python.org/packages/"
8364 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8365 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8366 (sha256
8367 (base32
c02af1c8 8368 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8369 (build-system python-build-system)
759aadd4
LF
8370 (native-inputs
8371 `(("python-betamax" ,python-betamax)
8372 ("python-mock" ,python-mock)
8373 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8374 (propagated-inputs
8375 `(("python-requests" ,python-requests)))
8376 (synopsis "Extensions to python-requests")
8377 (description "This is a toolbelt of useful classes and functions to be used
8378with python-requests.")
8379 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8380 (license license:asl2.0)))
d1deb90b
LF
8381
8382(define-public python-click-threading
8383 (package
8384 (name "python-click-threading")
3d2e0dbc 8385 (version "0.2.0")
d1deb90b
LF
8386 (source (origin
8387 (method url-fetch)
3d2e0dbc
LF
8388 (uri (string-append
8389 "https://pypi.python.org/packages/"
8390 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8391 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8392 (sha256
8393 (base32
3d2e0dbc 8394 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8395 (build-system python-build-system)
8396 (propagated-inputs
8397 `(("python-click" ,python-click)))
8398 (synopsis "Utilities for multithreading in Click")
8399 (description "This package provides utilities for multithreading in Click
8400applications.")
8401 (home-page "https://github.com/click-contrib/click-threading")
8402 (license license:expat)))
7b17cab9
LF
8403
8404(define-public python-click-log
8405 (package
8406 (name "python-click-log")
42734b9a 8407 (version "0.1.8")
7b17cab9
LF
8408 (source (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "click-log" version))
8411 (sha256
8412 (base32
42734b9a 8413 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8414 (build-system python-build-system)
8415 (propagated-inputs
8416 `(("python-click" ,python-click)))
8417 (synopsis "Logging for click applications")
8418 (description "This package provides a Python library for logging Click
8419applications.")
8420 (home-page "https://github.com/click-contrib/click-log")
8421 (license license:expat)))
7b3a4ee4
LF
8422
8423(define-public python-apipkg
8424 (package
8425 (name "python-apipkg")
8426 (version "1.4")
8427 (source (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "apipkg" version))
8430 (sha256
8431 (base32
8432 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8433 (build-system python-build-system)
328bb95d 8434 (native-inputs
7b3a4ee4
LF
8435 `(("python-pytest" ,python-pytest)))
8436 (synopsis "Namespace control and lazy-import mechanism")
8437 (description "With apipkg you can control the exported namespace of a Python
8438package and greatly reduce the number of imports for your users. It is a small
8439pure Python module that works on virtually all Python versions.")
8440 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8441 (license license:expat)))
e08739c3
CAW
8442
8443(define-public python2-apipkg
f210e944 8444 (package-with-python2 python-apipkg))
848964fe
LF
8445
8446(define-public python-execnet
8447 (package
8448 (name "python-execnet")
8449 (version "1.4.1")
8450 (source (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "execnet" version))
8453 (sha256
8454 (base32
8455 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8456 (build-system python-build-system)
ca0eee9d
LF
8457 (arguments
8458 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8459 ;; The two test failures are caused by the lack of an `ssh` executable.
8460 ;; The test suite can be run with pytest after the 'install' phase.
8461 #:tests? #f))
848964fe 8462 (native-inputs
ca0eee9d
LF
8463 `(("python-pytest" ,python-pytest)
8464 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8465 (propagated-inputs
848964fe
LF
8466 `(("python-apipkg" ,python-apipkg)))
8467 (synopsis "Rapid multi-Python deployment")
8468 (description "Execnet provides a share-nothing model with
8469channel-send/receive communication for distributing execution across many
8470Python interpreters across version, platform and network barriers. It has a
8471minimal and fast API targetting the following uses:
8472@enumerate
8473@item distribute tasks to (many) local or remote CPUs
8474@item write and deploy hybrid multi-process applications
8475@item write scripts to administer multiple environments
8476@end enumerate")
8477 (home-page "http://codespeak.net/execnet/")
f210e944 8478 (license license:expat)))
16c84f90
CAW
8479
8480(define-public python2-execnet
f210e944 8481 (package-with-python2 python-execnet))
6720dbb4 8482
d5bbf806 8483(define-public python-trollius-redis
8484 (package
8485 (name "python-trollius-redis")
8486 (version "0.1.4")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "trollius_redis" version))
8491 (sha256
8492 (base32
8493 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8494 (build-system python-build-system)
97b62eb0
MB
8495 ;; TODO: Tests require packaging 'hiredis'.
8496 (arguments '(#:tests? #f))
d5bbf806 8497 (home-page "https://github.com/benjolitz/trollius-redis")
8498 (synopsis "Port of asyncio-redis to trollius")
8499 (description "@code{trollius-redis} is a Redis client for Python
8500 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8501 Redis protocol.")
8502 (license license:bsd-2)))
8503
8504(define-public python2-trollius-redis
8505 (package-with-python2 python-trollius-redis))
8506
6720dbb4
LF
8507;;; The software provided by this package was integrated into pytest 2.8.
8508(define-public python-pytest-cache
8509 (package
8510 (name "python-pytest-cache")
8511 (version "1.0")
8512 (source (origin
8513 (method url-fetch)
8514 (uri (pypi-uri "pytest-cache" version))
8515 (sha256
8516 (base32
8517 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8518 (build-system python-build-system)
f22efa01 8519 (propagated-inputs
630d938f
EF
8520 `(("python-apipkg" ,python-apipkg)
8521 ("python-execnet" ,python-execnet)
8522 ("python-py" ,python-py)
8523 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8524 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8525 (description "The pytest-cache plugin provides tools to rerun failures from
8526the last py.test invocation.")
8527 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8528 (license license:expat)))
0adc21c2
EF
8529
8530(define-public python2-pytest-cache
f210e944 8531 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8532
8533(define-public python-pytest-localserver
8534 (package
8535 (name "python-pytest-localserver")
29f20168 8536 (version "0.3.5")
d7e729fe
LF
8537 (source (origin
8538 (method url-fetch)
29f20168 8539 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8540 (sha256
8541 (base32
29f20168 8542 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8543 (build-system python-build-system)
8544 (arguments
8545 `(#:phases (modify-phases %standard-phases
8546 (replace 'check
8547 (lambda _
8548 (zero? (system* "py.test" "--genscript=runtests.py"))
8549 (zero? (system* "py.test")))))))
8550 (native-inputs
d7e729fe
LF
8551 `(("python-pytest" ,python-pytest)
8552 ("python-requests" ,python-requests)
9ba40f05 8553 ("python-six" ,python-six)))
f22efa01 8554 (propagated-inputs
9ba40f05 8555 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8556 (synopsis "Py.test plugin to test server connections locally")
8557 (description "Pytest-localserver is a plugin for the pytest testing
8558framework which enables you to test server connections locally.")
8559 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8560 (license license:expat)))
28cecbb7
LF
8561
8562(define-public python-wsgi-intercept
8563 (package
8564 (name "python-wsgi-intercept")
909fbd2b 8565 (version "1.2.2")
28cecbb7
LF
8566 (source (origin
8567 (method url-fetch)
909fbd2b
LF
8568 (uri (string-append
8569 "https://pypi.python.org/packages/"
8570 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8571 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8572 (sha256
8573 (base32
909fbd2b 8574 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8575 (build-system python-build-system)
b9fc496f
HG
8576 (propagated-inputs
8577 `(("python-six" ,python-six)))
28cecbb7 8578 (native-inputs
9d813ec1 8579 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8580 ("python-httplib2" ,python-httplib2)
8581 ("python-requests" ,python-requests)
8757f050 8582 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8583 (synopsis "Puts a WSGI application in place of a real URI for testing")
8584 (description "Wsgi_intercept installs a WSGI application in place of a real
8585URI for testing. Testing a WSGI application normally involves starting a
8586server at a local host and port, then pointing your test code to that address.
8587Instead, this library lets you intercept calls to any specific host/port
8588combination and redirect them into a WSGI application importable by your test
8589program. Thus, you can avoid spawning multiple processes or threads to test
8590your Web app.")
8591 (home-page "https://github.com/cdent/wsgi-intercept")
8592 (license license:expat)))
89b8a551
LF
8593
8594(define-public python-pytest-xprocess
8595 (package
8596 (name "python-pytest-xprocess")
8597 (version "0.9.1")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "pytest-xprocess" version))
8601 (sha256
8602 (base32
8603 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8604 (build-system python-build-system)
8605 (propagated-inputs
8606 `(("python-pytest" ,python-pytest)
8607 ("python-pytest-cache" ,python-pytest-cache)
8608 ("python-psutil" ,python-psutil)))
8609 (synopsis "Pytest plugin to manage external processes across test runs")
8610 (description "Pytest-xprocess is an experimental py.test plugin for managing
8611processes across test runs.")
8612 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8613 (license license:expat)))
5c299bf0
LF
8614
8615(define-public python-icalendar
8616 (package
8617 (name "python-icalendar")
268e8ad8 8618 (version "3.11.2")
5c299bf0
LF
8619 (source (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "icalendar" version))
8622 (sha256
8623 (base32
268e8ad8 8624 "17rcy6rb9kqjf4p707ivmx7phjq7ngcz3bf7zriwxrqgrjagj7ag"))))
5c299bf0
LF
8625 (build-system python-build-system)
8626 (propagated-inputs
22d7360b 8627 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8628 ("python-pytz" ,python-pytz)))
8629 (synopsis "Python library for parsing iCalendar files")
8630 (description "The icalendar package is a parser/generator of iCalendar
8631files for use with Python.")
8632 (home-page "https://github.com/collective/icalendar")
3f641af0 8633 (license license:bsd-2)))
6bbbb53e
LF
8634
8635(define-public python-sphinxcontrib-newsfeed
8636 (package
8637 (name "python-sphinxcontrib-newsfeed")
8638 (version "0.1.4")
8639 (source (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8642 (sha256
8643 (base32
8644 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8645 (build-system python-build-system)
8646 (propagated-inputs
251ed7f2 8647 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8648 (synopsis "News Feed extension for Sphinx")
8649 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8650Blog, News or Announcements section to a Sphinx website.")
8651 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8652 (license license:bsd-2)))
2216e15c
SB
8653
8654(define-public python-args
8655 (package
8656 (name "python-args")
8657 (version "0.1.0")
8658 (source (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "args" version))
8661 (sha256
8662 (base32
8663 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8664 (build-system python-build-system)
2216e15c
SB
8665 (home-page "https://github.com/kennethreitz/args")
8666 (synopsis "Command-line argument parser")
8667 (description
8668 "This library provides a Python module to parse command-line arguments.")
3f641af0 8669 (license license:bsd-3)))
2216e15c
SB
8670
8671(define-public python2-args
8672 (package-with-python2 python-args))
c06a3de9
SB
8673
8674(define-public python-clint
8675 (package
8676 (name "python-clint")
8677 (version "0.5.1")
8678 (source (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "clint" version))
8681 (sha256
8682 (base32
8683 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8684 (build-system python-build-system)
6145b604
MB
8685 (arguments
8686 '(#:phases
8687 (modify-phases %standard-phases
8688 (replace 'check
8689 (lambda _
8690 (zero? (system* "py.test" "-v")))))))
8691 (native-inputs
8692 `(("python-pytest" ,python-pytest)))
f22efa01 8693 (propagated-inputs
f3b98f4f 8694 `(("python-args" ,python-args)))
c06a3de9
SB
8695 (home-page "https://github.com/kennethreitz/clint")
8696 (synopsis "Command-line interface tools")
8697 (description
8698 "Clint is a Python module filled with a set of tools for developing
8699command-line applications, including tools for colored and indented
8700output, progress bar display, and pipes.")
3f641af0 8701 (license license:isc)))
c06a3de9
SB
8702
8703(define-public python2-clint
8704 (package-with-python2 python-clint))
4ecdeef8
SB
8705
8706(define-public python-astor
8707 (package
8708 (name "python-astor")
8709 (version "0.5")
8710 (source (origin
8711 (method url-fetch)
8712 (uri (pypi-uri "astor" version))
8713 (sha256
8714 (base32
8715 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8716 (build-system python-build-system)
4ecdeef8
SB
8717 (home-page "https://github.com/berkerpeksag/astor")
8718 (synopsis "Read and write Python ASTs")
8719 (description
8720 "Astor is designed to allow easy manipulation of Python source via the
8721Abstract Syntax Tree.")
3f641af0 8722 (license license:bsd-3)))
4ecdeef8
SB
8723
8724(define-public python2-astor
8725 (package-with-python2 python-astor))
e224b7d0
SB
8726
8727(define-public python-rply
8728 (package
8729 (name "python-rply")
8730 (version "0.7.4")
8731 (source (origin
8732 (method url-fetch)
8733 (uri (pypi-uri "rply" version))
8734 (sha256
8735 (base32
8736 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8737 (build-system python-build-system)
f22efa01 8738 (propagated-inputs
f3b98f4f 8739 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8740 (home-page "https://github.com/alex/rply")
8741 (synopsis "Parser generator for Python")
8742 (description
8743 "This package provides a pure Python based parser generator, that also
8744works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8745with a new public API, and RPython support.")
3f641af0 8746 (license license:bsd-3)))
e224b7d0
SB
8747
8748(define-public python2-rply
8749 (package-with-python2 python-rply))
c3e919d7
SB
8750
8751(define-public python-hy
8752 (package
8753 (name "python-hy")
8754 (version "0.11.1")
8755 (source (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "hy" version))
8758 (sha256
8759 (base32
8760 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8761 (build-system python-build-system)
15c37077
MB
8762 (arguments
8763 '(#:phases
8764 (modify-phases %standard-phases
8765 (replace 'check
8766 (lambda _
8767 ;; Tests require write access to HOME.
8768 (setenv "HOME" "/tmp")
8769 (zero? (system* "nosetests")))))))
8770 (native-inputs
8771 `(("python-coverage" ,python-coverage)
8772 ("python-nose" ,python-nose)))
f22efa01 8773 (propagated-inputs
c3e919d7
SB
8774 `(("python-astor" ,python-astor)
8775 ("python-clint" ,python-clint)
f3b98f4f 8776 ("python-rply" ,python-rply)))
c3e919d7
SB
8777 (home-page "http://hylang.org/")
8778 (synopsis "Lisp frontend to Python")
8779 (description
8780 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8781its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8782Python at your fingertips, in Lisp form.")
8783 (license license:expat)))
8784
8785(define-public python2-hy
8786 (package-with-python2 python-hy))
7a5b944e 8787
81f7f297
EF
8788(define-public python-rauth
8789 (package
8790 (name "python-rauth")
8791 (version "0.7.2")
8792 (source
8793 (origin
8794 (method url-fetch)
8795 (uri (pypi-uri "rauth" version))
8796 (sha256
8797 (base32
8798 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8799 (build-system python-build-system)
8800 (arguments
8801 `(#:test-target "check"))
f22efa01 8802 (propagated-inputs
81f7f297
EF
8803 `(("python-requests" ,python-requests)))
8804 (home-page "https://github.com/litl/rauth")
8805 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8806 (description
8807 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8808provides service wrappers for convenient connection initialization and
8809authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8810 (license license:expat)
8811 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8812
8813(define-public python2-rauth
0848d8d3
EF
8814 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8815 (package
8816 (inherit base)
00e10c6e 8817 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8818 ,@(package-native-inputs base))))))
81f7f297 8819
1abe448d
EF
8820(define-public python2-functools32
8821 (package
8822 (name "python2-functools32")
8823 (version "3.2.3-2")
8824 (source
8825 (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "functools32" version))
8828 (sha256
8829 (base32
8830 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8831 (build-system python-build-system)
8832 (arguments
8833 `(#:python ,python-2
8834 #:tests? #f)) ; no test target
1abe448d
EF
8835 (home-page "https://github.com/MiCHiLU/python-functools32")
8836 (synopsis
8837 "Backport of the functools module from Python 3.2.3")
8838 (description
8839 "This package is a backport of the @code{functools} module from Python
88403.2.3 for use with older versions of Python and PyPy.")
8841 (license license:expat)))
8842
877889f3 8843(define-public python2-futures
7a5b944e 8844 (package
877889f3 8845 (name "python2-futures")
7a5b944e
EF
8846 (version "3.0.3")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "futures" version))
8851 (sha256
8852 (base32
8853 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8854 (build-system python-build-system)
877889f3 8855 (arguments `(#:python ,python-2))
7a5b944e
EF
8856 (home-page "https://github.com/agronholm/pythonfutures")
8857 (synopsis
8858 "Backport of the concurrent.futures package from Python 3.2")
8859 (description
8860 "The concurrent.futures module provides a high-level interface for
8861asynchronously executing callables. This package backports the
8862concurrent.futures package from Python 3.2")
3f641af0 8863 (license license:bsd-3)))
7a5b944e 8864
5cb2fe44
EF
8865(define-public python-promise
8866 (package
8867 (name "python-promise")
8868 (version "0.4.2")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "promise" version))
8873 (sha256
8874 (base32
8875 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8876 (build-system python-build-system)
8877 ;; Tests wants python-futures, which is a python2 only program, and
8878 ;; can't be found by python-promise at test time.
8879 (arguments `(#:tests? #f))
8880 (home-page "https://github.com/syrusakbary/promise")
8881 (synopsis "Promises/A+ implementation for Python")
8882 (description
8883 "Promises/A+ implementation for Python")
8884 (properties `((python2-variant . ,(delay python2-promise))))
8885 (license license:expat)))
8886
8887(define-public python2-promise
8888 (let ((promise (package-with-python2
8889 (strip-python2-variant python-promise))))
8890 (package (inherit promise)
8891 (arguments (substitute-keyword-arguments (package-arguments promise)
8892 ((#:tests? _) #t)))
8893 (native-inputs
8894 `(("python2-futures" ,python2-futures)
8895 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8896 ,@(package-native-inputs promise))))))
8897
c18f6368
EF
8898(define-public python-urllib3
8899 (package
8900 (name "python-urllib3")
6178274d 8901 (version "1.18.1")
c18f6368
EF
8902 (source
8903 (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "urllib3" version))
8906 (sha256
8907 (base32
6178274d 8908 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8909 (build-system python-build-system)
8910 (arguments `(#:tests? #f))
8911 (native-inputs
f3b98f4f 8912 `(;; some packages for tests
c18f6368
EF
8913 ("python-nose" ,python-nose)
8914 ("python-mock" ,python-mock)
8915 ("python-tornado" ,python-tornado)))
8916 (propagated-inputs
8322749a 8917 `(;; extra packages for https security
c18f6368
EF
8918 ("python-certifi" ,python-certifi)
8919 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8920 ("python-pyasn1" ,python-pyasn1)
8921 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8922 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8923 (synopsis "HTTP library with thread-safe connection pooling")
8924 (description
8925 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8926can reuse the same socket connection for multiple requests, it can POST files,
8927supports url redirection and retries, and also gzip and deflate decoding.")
8928 (license license:expat)))
8929
8930(define-public python2-urllib3
8931 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8932
8933(define-public python-colorama
8934 (package
8935 (name "python-colorama")
f92576f9 8936 (version "0.3.7")
2b2f2fc1
DT
8937 (source
8938 (origin
8939 (method url-fetch)
8940 (uri (pypi-uri "colorama" version))
8941 (sha256
8942 (base32
f92576f9 8943 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 8944 (build-system python-build-system)
46e110cc 8945 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
8946 (description "Colorama is a Python library for rendering colored terminal
8947text.")
8948 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8949 (license license:bsd-3)))
2b2f2fc1
DT
8950
8951(define-public python2-colorama
8952 (package-with-python2 python-colorama))
f5bcec6e
DT
8953
8954(define-public python-rsa
8955 (package
8956 (name "python-rsa")
ecd68c53 8957 (version "3.4.2")
f5bcec6e
DT
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "rsa" version))
8962 (sha256
8963 (base32
ecd68c53 8964 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8965 (build-system python-build-system)
f22efa01 8966 (propagated-inputs
f3b98f4f 8967 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8968 (synopsis "Pure-Python RSA implementation")
8969 (description "Python-RSA is a pure-Python RSA implementation. It supports
8970encryption and decryption, signing and verifying signatures, and key
8971generation according to PKCS#1 version 1.5. It can be used as a Python
8972library as well as on the command line.")
8973 (home-page "http://stuvel.eu/rsa")
3f641af0 8974 (license license:asl2.0)))
f5bcec6e
DT
8975
8976(define-public python2-rsa
8977 (package-with-python2 python-rsa))
c0aacfa5
DT
8978
8979(define-public python-pluggy
8980 (package
8981 (name "python-pluggy")
8982 (version "0.3.1")
8983 (source
8984 (origin
8985 (method url-fetch)
8986 (uri (pypi-uri "pluggy" version))
8987 (sha256
8988 (base32
8989 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8990 (build-system python-build-system)
c0aacfa5
DT
8991 (synopsis "Plugin and hook calling mechanism for Python")
8992 (description "Pluggy is an extraction of the plugin manager as used by
8993Pytest but stripped of Pytest specific details.")
8994 (home-page "https://pypi.python.org/pypi/pluggy")
8995 (license license:expat)))
8996
8997(define-public python2-pluggy
8998 (package-with-python2 python-pluggy))
a4af21ca
DT
8999
9000(define-public python-tox
9001 (package
9002 (name "python-tox")
9003 (version "2.3.1")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "tox" version))
9008 (sha256
9009 (base32
9010 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9011 (build-system python-build-system)
9012 (arguments
7ba07edf
HG
9013 ;; FIXME: Tests require pytest-timeout, which itself requires
9014 ;; pytest>=2.8.0 for installation.
a4af21ca 9015 '(#:tests? #f))
482d9591
HG
9016 (propagated-inputs
9017 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9018 ("python-py" ,python-py)
482d9591 9019 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9020 (native-inputs
7ba07edf
HG
9021 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9022 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9023 (home-page "http://tox.testrun.org/")
9024 (synopsis "Virtualenv-based automation of test activities")
9025 (description "Tox is a generic virtualenv management and test command line
9026tool. It can be used to check that a package installs correctly with
9027different Python versions and interpreters, or run tests in each type of
9028supported environment, or act as a frontend to continuous integration
9029servers.")
9030 (license license:expat)))
9031
9032(define-public python2-tox
9033 (package-with-python2 python-tox))
ba9da248
DT
9034
9035(define-public python-jmespath
9036 (package
9037 (name "python-jmespath")
9038 (version "0.9.0")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "jmespath" version))
9043 (sha256
9044 (base32
9045 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9046 (build-system python-build-system)
52a75a83
MB
9047 (native-inputs
9048 `(("python-nose" ,python-nose)))
ba9da248
DT
9049 (synopsis "JSON Matching Expressions")
9050 (description "JMESPath (pronounced “james path”) is a Python library that
9051allows one to declaratively specify how to extract elements from a JSON
9052document.")
9053 (home-page "https://github.com/jmespath/jmespath.py")
9054 (license license:expat)))
9055
9056(define-public python2-jmespath
9057 (package-with-python2 python-jmespath))
935fcd5c
DT
9058
9059(define-public python-botocore
9060 (package
9061 (name "python-botocore")
e09f952d 9062 (version "1.4.62")
935fcd5c
DT
9063 (source
9064 (origin
9065 (method url-fetch)
9066 (uri (pypi-uri "botocore" version))
9067 (sha256
9068 (base32
e09f952d 9069 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 9070 (build-system python-build-system)
877fdac9
MB
9071 (arguments
9072 ;; FIXME: Many tests are failing.
9073 '(#:tests? #f))
482d9591 9074 (propagated-inputs
22d7360b 9075 `(("python-dateutil" ,python-dateutil)
935fcd5c 9076 ("python-docutils" ,python-docutils)
482d9591 9077 ("python-jmespath" ,python-jmespath)))
8fa6890b 9078 (native-inputs
482d9591 9079 `(("python-mock" ,python-mock)
935fcd5c 9080 ("python-nose" ,python-nose)
482d9591 9081 ("behave" ,behave)
935fcd5c 9082 ("python-tox" ,python-tox)
482d9591 9083 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9084 (home-page "https://github.com/boto/botocore")
9085 (synopsis "Low-level interface to AWS")
9086 (description "Botocore is a Python library that provides a low-level
9087interface to the Amazon Web Services (AWS) API.")
3f641af0 9088 (license license:asl2.0)))
935fcd5c
DT
9089
9090(define-public python2-botocore
9091 (package-with-python2 python-botocore))
f861b8b8
DT
9092
9093(define-public awscli
9094 (package
9095 (name "awscli")
60a8be3a 9096 (version "1.11.43")
f861b8b8
DT
9097 (source
9098 (origin
9099 (method url-fetch)
d5ccf71e 9100 (uri (pypi-uri name version))
f861b8b8
DT
9101 (sha256
9102 (base32
60a8be3a 9103 "1x94jmy8ygld8g4pf35zdankh4dx8g8qn3q9j3hrbawqw0vkrp3y"))))
f861b8b8 9104 (build-system python-build-system)
482d9591 9105 (propagated-inputs
f861b8b8 9106 `(("python-colorama" ,python-colorama)
482d9591
HG
9107 ("python-botocore" ,python-botocore)
9108 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9109 ("python-docutils" ,python-docutils)
482d9591 9110 ("python-rsa" ,python-rsa)))
d4649177 9111 (native-inputs
482d9591 9112 `(("python-mock" ,python-mock)
f861b8b8 9113 ("python-nose" ,python-nose)
f861b8b8
DT
9114 ("python-sphinx" ,python-sphinx)
9115 ("python-tox" ,python-tox)
482d9591 9116 ("python-wheel" ,python-wheel)))
60a8be3a 9117 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9118 (synopsis "Command line client for AWS")
9119 (description "AWS CLI provides a unified command line interface to the
9120Amazon Web Services (AWS) API.")
3f641af0 9121 (license license:asl2.0)))
6a44697d
LF
9122
9123(define-public python-hypothesis
9124 (package
9125 (name "python-hypothesis")
bea6d94d 9126 (version "3.1.0")
6a44697d
LF
9127 (source (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "hypothesis" version))
9130 (sha256
9131 (base32
bea6d94d 9132 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9133 (build-system python-build-system)
bd100c71 9134 (native-inputs
6a44697d
LF
9135 `(("python-flake8" ,python-flake8)
9136 ("python-pytest" ,python-pytest)))
9137 (synopsis "Library for property based testing")
9138 (description "Hypothesis is a library for testing your Python code against a
9139much larger range of examples than you would ever want to write by hand. It’s
9140based on the Haskell library, Quickcheck, and is designed to integrate
9141seamlessly into your existing Python unit testing work flow.")
9142 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9143 (license license:mpl2.0)
6f068e08 9144 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9145
9146(define-public python2-hypothesis
6f068e08
EF
9147 (let ((hypothesis (package-with-python2
9148 (strip-python2-variant python-hypothesis))))
9149 (package (inherit hypothesis)
9150 (native-inputs
bd100c71
MB
9151 `(("python2-enum34" ,python2-enum34)
9152 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9153
9154(define-public python-pytest-subtesthack
9155 (package
9156 (name "python-pytest-subtesthack")
9157 (version "0.1.1")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "pytest-subtesthack" version))
9161 (sha256
9162 (base32
9163 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9164 (build-system python-build-system)
7517e73c
LF
9165 (propagated-inputs
9166 `(("python-pytest" ,python-pytest)))
9167 (synopsis "Set-up and tear-down fixtures for unit tests")
9168 (description "This plugin allows you to set up and tear down fixtures within
9169unit test functions that use @code{py.test}. This is useful for using
9170@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9171function multiple times, without setting up or tearing down fixture state as is
9172normally the case.")
9173 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9174 (license license:unlicense)))
7517e73c
LF
9175
9176(define-public python2-pytest-subtesthack
9177 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9178
7637de23 9179(define-public python-xdo
0bdc1671 9180 (package
7637de23 9181 (name "python-xdo")
e871c332 9182 (version "0.3")
0bdc1671
CAW
9183 (source (origin
9184 (method url-fetch)
9185 (uri (string-append
9186 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9187 "python-xdo_" version ".orig.tar.gz"))
9188 (sha256
9189 (base32
e871c332 9190 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9191 (build-system python-build-system)
9192 (arguments
736cfc10
SB
9193 '(#:phases
9194 (modify-phases %standard-phases
9195 (add-before 'install 'patch-libxdo-path
9196 ;; Hardcode the path of dynamically loaded libxdo library.
9197 (lambda* (#:key inputs #:allow-other-keys)
9198 (let ((libxdo (string-append
9199 (assoc-ref inputs "xdotool")
9200 "/lib/libxdo.so")))
9201 (substitute* "xdo/_xdo.py"
9202 (("find_library\\(\"xdo\"\\)")
9203 (simple-format #f "\"~a\"" libxdo)))
9204 #t))))
9205 #:tests? #f)) ; no tests provided
0b5e0863
SB
9206 (propagated-inputs
9207 `(("python-six" ,python-six)))
0bdc1671
CAW
9208 (inputs
9209 `(("xdotool" ,xdotool)
9210 ("libX11" ,libx11)))
9211 (home-page "https://tracker.debian.org/pkg/python-xdo")
9212 (synopsis "Python library for simulating X11 keyboard/mouse input")
9213 (description "Provides bindings to libxdo for manipulating X11 via simulated
9214input. (Note that this is mostly a legacy library; you may wish to look at
9215python-xdo for newer bindings.)")
3f641af0 9216 (license license:bsd-3)))
0bdc1671 9217
7637de23
LF
9218(define-public python2-xdo
9219 (package-with-python2 python-xdo))
9220
cb34dc6c
CAW
9221(define-public python-wtforms
9222 (package
9223 (name "python-wtforms")
9224 (version "2.1")
9225 (source
9226 (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "WTForms" version ".zip"))
9229 (sha256
9230 (base32
9231 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9232 (build-system python-build-system)
13c4d874
EF
9233 (arguments
9234 '(#:phases
9235 (modify-phases %standard-phases
9236 (add-after 'unpack 'remove-django-test
9237 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9238 (lambda _
9239 (substitute*
9240 "tests/runtests.py"
9241 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9242 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9243 #t)))))
cb34dc6c
CAW
9244 (native-inputs
9245 `(("unzip" ,unzip)))
9246 (home-page "http://wtforms.simplecodes.com/")
9247 (synopsis
9248 "Form validation and rendering library for Python web development")
9249 (description
9250 "WTForms is a flexible forms validation and rendering library
9251for Python web development. It is very similar to the web form API
9252available in Django, but is a standalone package.")
f210e944 9253 (license license:bsd-3)))
cb34dc6c
CAW
9254
9255(define-public python2-wtforms
f210e944 9256 (package-with-python2 python-wtforms))
50aaec25
DT
9257
9258(define-public python-mako
9259 (package
9260 (name "python-mako")
3753f2e6 9261 (version "1.0.6")
50aaec25
DT
9262 (source
9263 (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "Mako" version))
9266 (sha256
9267 (base32
3753f2e6 9268 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9269 (build-system python-build-system)
482d9591
HG
9270 (propagated-inputs
9271 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9272 (native-inputs
482d9591 9273 `(("python-mock" ,python-mock)
50aaec25
DT
9274 ("python-nose" ,python-nose)))
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)
9768 (propagated-inputs
a0a09859 9769 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9770 (synopsis "Sphinx extension to include program output")
9771 (description "A Sphinx extension to literally insert the output of arbitrary
9772commands into documents, helping you to keep your command examples up to date.")
9773 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9774 (license license:bsd-2)))
3276517c
LF
9775
9776(define-public python2-sphinxcontrib-programoutput
f210e944 9777 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9778
9779(define-public python-sphinx-repoze-autointerface
9780 (package
9781 (name "python-sphinx-repoze-autointerface")
328ae341 9782 (version "0.8")
548d7165
LF
9783 (source (origin
9784 (method url-fetch)
9785 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9786 (sha256
9787 (base32
328ae341 9788 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9789 (build-system python-build-system)
9790 (propagated-inputs
47c7dc4a 9791 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9792 ("python-zope-interface" ,python-zope-interface)))
9793 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9794 (description "This package defines an extension for the Sphinx documentation
9795system. The extension allows generation of API documentation by
9796introspection of @code{zope.interface} instances in code.")
9797 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9798 (license license:repoze)))
548d7165
LF
9799
9800(define-public python2-sphinx-repoze-autointerface
9801 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9802
9803(define-public python-psycopg2
9804 (package
9805 (name "python-psycopg2")
9806 (version "2.6.1")
9807 (source
9808 (origin
9809 (method url-fetch)
9810 (uri (pypi-uri "psycopg2" version))
9811 (sha256
9812 (base32
9813 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9814 (build-system python-build-system)
9815 (arguments
9816 ;; Tests would require a postgresql database "psycopg2_test"
9817 ;; and a running postgresql database management service.
9818 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9819 (inputs
9820 `(("postgresql" ,postgresql))) ; libpq
9821 (home-page "http://initd.org/psycopg/")
9822 (synopsis "Python PostgreSQL adapter")
9823 (description
9824 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9825 (license license:lgpl3+)))
b31fbea5
DM
9826
9827(define-public python2-psycopg2
f210e944 9828 (package-with-python2 python-psycopg2))
eed1a61f
LF
9829
9830(define-public python-vobject
9831 (package
9832 (name "python-vobject")
9bed9b15 9833 (version "0.9.2")
eed1a61f
LF
9834 (source (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "vobject" version))
9837 (sha256
9838 (base32
9bed9b15 9839 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9840 (build-system python-build-system)
a9871b7b
LF
9841 (arguments
9842 '(;; The test suite relies on some non-portable Windows interfaces.
9843 #:tests? #f))
f22efa01 9844 (propagated-inputs
22d7360b 9845 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
9846 ("python-pyicu" ,python-pyicu)))
9847 (synopsis "Parse and generate vCard and vCalendar files")
9848 (description "Vobject is intended to be a full featured Python package for
9849parsing and generating vCard and vCalendar files. Currently, iCalendar files
9850are supported and well tested. vCard 3.0 files are supported, and all data
9851should be imported, but only a few components are understood in a sophisticated
9852way.")
9853 (home-page "http://eventable.github.io/vobject/")
f210e944 9854 (license license:asl2.0)))
eed1a61f
LF
9855
9856(define-public python2-vobject
f210e944 9857 (package-with-python2 python-vobject))
cedac813
LF
9858
9859(define-public python-munkres
9860 (package
9861 (name "python-munkres")
38e81a2c 9862 (version "1.0.8")
cedac813
LF
9863 (source (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "munkres" version))
9866 (sha256
9867 (base32
38e81a2c 9868 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9869 (build-system python-build-system)
9870 (arguments
9871 '(#:tests? #f)) ; no test suite
9872 (home-page "http://software.clapper.org/munkres/")
9873 (synopsis "Implementation of the Munkres algorithm")
9874 (description "The Munkres module provides an implementation of the Munkres
9875algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9876useful for solving the Assignment Problem.")
3f641af0 9877 (license license:bsd-3)))
cedac813
LF
9878
9879(define-public python2-munkres
9880 (package-with-python2 python-munkres))
f3b3d78f
LF
9881
9882(define-public python-flask
9883 (package
9884 (name "python-flask")
c6c80104 9885 (version "0.11.1")
f3b3d78f
LF
9886 (source (origin
9887 (method url-fetch)
9888 (uri (pypi-uri "Flask" version))
9889 (sha256
9890 (base32
c6c80104 9891 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9892 (build-system python-build-system)
9893 (propagated-inputs
9894 `(("python-itsdangerous" ,python-itsdangerous)
9895 ("python-jinja2" ,python-jinja2)
8f35c030 9896 ("python-click" ,python-click)
f3b3d78f
LF
9897 ("python-werkzeug" ,python-werkzeug)))
9898 (home-page "https://github.com/mitsuhiko/flask/")
9899 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9900 (description "Flask is a micro web framework based on the Werkzeug toolkit
9901and Jinja2 template engine. It is called a micro framework because it does not
9902presume or force a developer to use a particular tool or library.")
f210e944 9903 (license license:bsd-3)))
f3b3d78f
LF
9904
9905(define-public python2-flask
f210e944 9906 (package-with-python2 python-flask))
603d665b 9907
a7ad802b 9908(define-public python-flask-wtf
9909 (package
9910 (name "python-flask-wtf")
9911 (version "0.13.1")
9912 (source
9913 (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "Flask-WTF" version))
9916 (sha256
9917 (base32
9918 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9919 (build-system python-build-system)
9920 (propagated-inputs
9921 `(("python-flask-babel" ,python-flask-babel)
9922 ("python-babel" ,python-babel)
9923 ("python-wtforms" ,python-wtforms)))
9924 (native-inputs
9925 `(("python-nose" ,python-nose)))
9926 (home-page "https://github.com/lepture/flask-wtf")
9927 (synopsis "Simple integration of Flask and WTForms")
9928 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9929upload, and reCAPTCHA.")
9930 (license license:bsd-3)))
9931
9932(define-public python2-flask-wtf
9933 (package-with-python2 python-flask-wtf))
9934
a2c7d88e 9935(define-public python-flask-multistatic
9936 (package
9937 (name "python-flask-multistatic")
9938 (version "1.0")
9939 (source
9940 (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "flask-multistatic" version))
9943 (sha256
9944 (base32
9945 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9946 (build-system python-build-system)
9947 (propagated-inputs
9948 `(("python-flask" ,python-flask)))
9949 (home-page "https://pagure.io/flask-multistatic")
9950 (synopsis "Flask plugin to allow overriding static files")
9951 (description "@code{flask-multistatic} is a flask plugin that adds support
9952for overriding static files.")
9953 (license license:gpl3+)))
9954
9955(define-public python2-flask-multistatic
9956 (package-with-python2 python-flask-multistatic))
9957
603d665b
LF
9958(define-public python-cookies
9959 (package
9960 (name "python-cookies")
9961 (version "2.2.1")
9962 (source (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "cookies" version))
9965 (sha256
9966 (base32
9967 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9968 (build-system python-build-system)
9969 (arguments
9970 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9971 #:tests? #f))
9972 (native-inputs
9973 `(("python-pytest" ,python2-pytest)))
9974 (synopsis "HTTP cookie parser and renderer")
9975 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9976Python.")
9977 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9978 (license license:expat)))
603d665b
LF
9979
9980(define-public python2-cookies
f210e944 9981 (package-with-python2 python-cookies))
0efde7d6
LF
9982
9983(define-public python-responses
9984 (package
9985 (name "python-responses")
9986 (version "0.5.1")
9987 (source (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "responses" version))
9990 (sha256
9991 (base32
9992 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9993 (build-system python-build-system)
9994 (arguments
9995 `(;; Test suite is not distributed:
9996 ;; https://github.com/getsentry/responses/issues/38
9997 #:tests? #f))
9998 (native-inputs
d8ea5f2f 9999 `(("python-mock" ,python-mock)))
0efde7d6
LF
10000 (propagated-inputs
10001 `(("python-requests" ,python-requests)
d8ea5f2f 10002 ("python-cookies" ,python-cookies)
0efde7d6
LF
10003 ("python-six" ,python-six)))
10004 (home-page "https://github.com/getsentry/responses")
10005 (synopsis "Utility for mocking out the `requests` Python library")
10006 (description "A utility library for mocking out the `requests` Python
10007library.")
f210e944 10008 (license license:asl2.0)))
0efde7d6
LF
10009
10010(define-public python2-responses
f210e944 10011 (package-with-python2 python-responses))
76b94885 10012
b7afd018
RW
10013(define-public python-whoosh
10014 (package
10015 (name "python-whoosh")
10016 (version "2.7.4")
10017 (source
10018 (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "Whoosh" version))
10021 (sha256
10022 (base32
10023 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10024 (build-system python-build-system)
10025 (native-inputs
f3b98f4f 10026 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10027 (home-page "http://bitbucket.org/mchaput/whoosh")
10028 (synopsis "Full text indexing, search, and spell checking library")
10029 (description
10030 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10031checking library.")
10032 (license license:bsd-2)))
10033
10034(define-public python2-whoosh
10035 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10036 (package (inherit whoosh)
10037 (propagated-inputs
10038 `(("python2-backport-ssl-match-hostname"
10039 ,python2-backport-ssl-match-hostname)
10040 ,@(package-propagated-inputs whoosh))))))
10041
76b94885
LF
10042(define-public python-pathlib
10043 (package
10044 (name "python-pathlib")
10045 (version "1.0.1")
10046 (source (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "pathlib" version))
10049 (sha256
10050 (base32
10051 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10052 (build-system python-build-system)
92a312dc
RW
10053 ;; The tests depend on the internal "test" module, which does not provide
10054 ;; a stable interface.
10055 (arguments `(#:tests? #f))
76b94885 10056 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10057 (synopsis "Object-oriented file system paths")
10058 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10059It offers the following advantages over using string objects:
10060
10061@enumerate
10062@item No more cumbersome use of os and os.path functions. Everything can
10063be done easily through operators, attribute accesses, and method calls.
10064@item Embodies the semantics of different path types. For example,
10065comparing Windows paths ignores casing.
10066@item Well-defined semantics, eliminating any inconsistencies or
10067ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10068@end enumerate
10069
10070Note: In Python 3.4, pathlib is now part of the standard library. For other
10071Python versions please consider python-pathlib2 instead, which tracks the
10072standard library module. This module (python-pathlib) isn't maintained
10073anymore.")
76b94885
LF
10074 (license license:expat)))
10075
10076(define-public python2-pathlib
10077 (package-with-python2 python-pathlib))
25a7db0a 10078
b7703c81
HG
10079(define-public python2-pathlib2
10080 (package
10081 (name "python2-pathlib2")
10082 (version "2.1.0")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "pathlib2" version))
10086 (sha256
10087 (base32
10088 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10089 (build-system python-build-system)
49a531f5
HG
10090 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10091 ;; version is 3.4 which already includes this package as part of the
10092 ;; standard library.
b7703c81
HG
10093 (arguments
10094 `(#:python ,python-2))
10095 (native-inputs
f3b98f4f 10096 `(("python2-six" ,python2-six)))
b7703c81
HG
10097 (home-page "http://pypi.python.org/pypi/pathlib2/")
10098 (synopsis "Object-oriented file system paths - backport of standard
10099pathlib module")
10100 (description "The goal of pathlib2 is to provide a backport of standard
10101pathlib module which tracks the standard library module, so all the newest
10102features of the standard pathlib can be used also on older Python versions.
10103
10104Pathlib offers a set of classes to handle file system paths. It offers the
10105following advantages over using string objects:
10106
10107@enumerate
10108@item No more cumbersome use of os and os.path functions. Everything can
10109be done easily through operators, attribute accesses, and method calls.
10110@item Embodies the semantics of different path types. For example,
10111comparing Windows paths ignores casing.
10112@item Well-defined semantics, eliminating any inconsistencies or
10113ambiguities (forward vs. backward slashes, etc.).
10114@end enumerate")
10115 (license license:expat)))
10116
25a7db0a
LF
10117(define-public python-jellyfish
10118 (package
10119 (name "python-jellyfish")
8c4964dd 10120 (version "0.5.6")
25a7db0a
LF
10121 (source (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "jellyfish" version))
10124 (sha256
10125 (base32
8c4964dd 10126 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10127 (build-system python-build-system)
10128 (native-inputs
10129 `(("python-pytest" ,python-pytest)))
10130 (home-page "https://github.com/jamesturk/jellyfish")
10131 (synopsis "Approximate and phonetic matching of strings")
10132 (description "Jellyfish uses a variety of string comparison and phonetic
10133encoding algorithms to do fuzzy string matching.")
3f641af0 10134 (license license:bsd-2)
25a7db0a
LF
10135 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10136
10137(define-public python2-jellyfish
10138 (let ((jellyfish (package-with-python2
10139 (strip-python2-variant python-jellyfish))))
10140 (package (inherit jellyfish)
00e10c6e 10141 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10142 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10143
10144(define-public python2-unicodecsv
10145 (package
10146 (name "python2-unicodecsv")
10147 (version "0.14.1")
10148 (source (origin
10149 (method url-fetch)
10150 ;; The test suite is not included in the PyPi release.
10151 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10152 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10153 "archive/" version ".tar.gz"))
10154 (file-name (string-append name "-" version ".tar.gz"))
10155 (sha256
10156 (base32
10157 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10158 (build-system python-build-system)
10159 (arguments
10160 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10161 #:python ,python-2))
10162 (native-inputs
f3b98f4f 10163 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10164 (home-page "https://github.com/jdunck/python-unicodecsv")
10165 (synopsis "Unicode CSV module for Python 2")
10166 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10167module, adding support for Unicode strings.")
3f641af0 10168 (license license:bsd-2)))
064503aa
LF
10169
10170(define-public python-rarfile
10171 (package
10172 (name "python-rarfile")
67824447 10173 (version "2.8")
064503aa
LF
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "rarfile" version))
10177 (sha256
10178 (base32
67824447 10179 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10180 (build-system python-build-system)
10181 (arguments
10182 '(#:phases
10183 (modify-phases %standard-phases
10184 (replace 'check
10185 ;; Many tests fail, but the installation proceeds.
10186 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10187 (native-inputs
10188 `(("which" ,which))) ; required for tests
10189 (propagated-inputs
10190 `(("libarchive" ,libarchive)))
10191 (home-page "https://github.com/markokr/rarfile")
10192 (synopsis "RAR archive reader for Python")
10193 (description "This is Python module for RAR archive reading. The interface
10194is made as zipfile like as possible.")
3f641af0 10195 (license license:isc)))
064503aa
LF
10196
10197(define-public python2-rarfile
10198 (package-with-python2 python-rarfile))
daeeea71
CM
10199
10200(define-public python-magic
10201 (package
10202 (name "python-magic")
10203 (version "0.4.3")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10208 version ".tar.gz"))
10209 (sha256
10210 (base32
10211 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10212 (file-name (string-append name "-" version "-checkout"))))
10213 (build-system python-build-system)
10214 (arguments
10215 ;; The tests are unreliable, so don't run them. The tests fail
10216 ;; under Python3 because they were written for Python2 and
10217 ;; contain import statements that do not work in Python3. One of
10218 ;; the tests fails under Python2 because its assertions are
10219 ;; overly stringent; it relies on comparing output strings which
10220 ;; are brittle and can change depending on the version of
10221 ;; libmagic being used and the system on which the test is
10222 ;; running. In my case, under GuixSD 0.10.0, only one test
10223 ;; failed, and it seems to have failed only because the version
10224 ;; of libmagic that is packaged in Guix outputs a slightly
10225 ;; different (but not wrong) string than the one that the test
10226 ;; expected.
10227 '(#:tests? #f
10228 #:phases (modify-phases %standard-phases
10229 ;; Replace a specific method call with a hard-coded
10230 ;; path to the necessary libmagic.so file in the
10231 ;; store. If we don't do this, then the method call
10232 ;; will fail to find the libmagic.so file, which in
10233 ;; turn will cause any application using
10234 ;; python-magic to fail.
10235 (add-before 'build 'hard-code-path-to-libmagic
10236 (lambda* (#:key inputs #:allow-other-keys)
10237 (let ((file (assoc-ref inputs "file")))
10238 (substitute* "magic.py"
10239 (("ctypes.util.find_library\\('magic'\\)")
10240 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10241 #t)))
10242 (add-before 'install 'disable-egg-compression
10243 (lambda _
10244 (let ((port (open-file "setup.cfg" "a")))
10245 (display "\n[easy_install]\nzip_ok = 0\n"
10246 port)
10247 (close-port port)
10248 #t))))))
daeeea71
CM
10249 (inputs
10250 ;; python-magic needs to be able to find libmagic.so.
10251 `(("file" ,file)))
10252 (home-page "https://github.com/ahupp/python-magic")
10253 (synopsis "File type identification using libmagic")
10254 (description
10255 "This module uses ctypes to access the libmagic file type
10256identification library. It makes use of the local magic database and
10257supports both textual and MIME-type output. Note that this module and
10258the python-file module both provide a \"magic.py\" file; these two
10259modules, which are different and were developed separately, both serve
10260the same purpose: to provide Python bindings for libmagic.")
10261 (license license:expat)))
10262
10263(define-public python2-magic
10264 (package-with-python2 python-magic))
12af303f
CM
10265
10266(define-public python2-s3cmd
10267 (package
10268 (name "python2-s3cmd")
10269 (version "1.6.1")
10270 (source
10271 (origin
10272 (method url-fetch)
de67e922 10273 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10274 "s3cmd-" version ".tar.gz"))
10275 (sha256
10276 (base32
10277 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10278 (build-system python-build-system)
10279 (arguments
10280 ;; s3cmd is written for python2 only and contains no tests.
10281 `(#:python ,python-2
10282 #:tests? #f))
f22efa01 10283 (propagated-inputs
12af303f
CM
10284 `(("python2-dateutil" ,python2-dateutil)
10285 ;; The python-file package also provides a magic.py module.
10286 ;; This is an unfortunate state of affairs; however, s3cmd
10287 ;; fails to install if it cannot find specifically the
10288 ;; python-magic package. Thus we include it, instead of using
10289 ;; python-file. Ironically, s3cmd sometimes works better
10290 ;; without libmagic bindings at all:
10291 ;; https://github.com/s3tools/s3cmd/issues/198
10292 ("python2-magic" ,python2-magic)))
10293 (home-page "http://s3tools.org/s3cmd")
10294 (synopsis "Command line tool for S3-compatible storage services")
10295 (description
10296 "S3cmd is a command line tool for uploading, retrieving and managing data
10297in storage services that are compatible with the Amazon Simple Storage
10298Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10299GnuPG encryption, and more. It also supports management of Amazon's
10300CloudFront content delivery network.")
3f641af0 10301 (license license:gpl2+)))
4323a5f0
AE
10302
10303(define-public python-pkgconfig
10304 (package
10305 (name "python-pkgconfig")
10306 (version "1.1.0")
10307 (source
10308 (origin
10309 (method url-fetch)
10310 (uri (pypi-uri "pkgconfig" version))
10311 (sha256
10312 (base32
10313 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10314 (build-system python-build-system)
10315 (native-inputs
f3b98f4f 10316 `(("python-nose" ,python-nose)))
4323a5f0
AE
10317 (inputs
10318 `(("pkg-config" ,pkg-config)))
10319 (arguments
10320 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10321 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10322 #:tests? #f
4323a5f0
AE
10323 ;; Hard-code the path to pkg-config.
10324 #:phases
10325 (modify-phases %standard-phases
10326 (add-before
10327 'build 'patch
10328 (lambda _
10329 (substitute* "pkgconfig/pkgconfig.py"
10330 (("cmd = 'pkg-config")
10331 (string-append "cmd = '" (which "pkg-config"))))
10332 #t)))))
10333 (home-page "http://github.com/matze/pkgconfig")
10334 (synopsis "Python interface for pkg-config")
10335 (description "This module provides a Python interface to pkg-config. It
10336can be used to find all pkg-config packages, check if a package exists,
10337check if a package meets certain version requirements, query CFLAGS and
10338LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10339 (license license:expat)))
4323a5f0
AE
10340
10341(define-public python2-pkgconfig
10342 (package-with-python2 python-pkgconfig))
10343
2e697322
BW
10344(define-public python-bz2file
10345 (package
10346 (name "python-bz2file")
10347 (version "0.98")
10348 (source
10349 (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "bz2file" version))
10352 (sha256
10353 (base32
10354 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10355 (build-system python-build-system)
10356 (arguments
124df723 10357 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10358 (home-page "https://github.com/nvawda/bz2file")
10359 (synopsis "Read and write bzip2-compressed files")
10360 (description
10361 "Bz2file is a Python library for reading and writing bzip2-compressed
10362files. It contains a drop-in replacement for the I/O interface in the
10363standard library's @code{bz2} module, including features from the latest
10364development version of CPython that are not available in older releases.")
3f641af0 10365 (license license:asl2.0)
2e697322
BW
10366 (properties `((python2-variant . ,(delay python2-bz2file))))))
10367
10368(define-public python2-bz2file
10369 (let ((base (package-with-python2
10370 (strip-python2-variant python-bz2file))))
10371 (package
10372 (inherit base)
124df723 10373 (arguments
752bb447
BW
10374 `(#:python ,python-2
10375 #:phases
124df723
BW
10376 (modify-phases %standard-phases
10377 ;; 'python setup.py test' does not work as of 0.98.
10378 ;; There is only the one test file, so we run it directly.
10379 (replace 'check
10380 (lambda _ (zero? (system* "python"
10381 "test_bz2file.py"))))))))))
2e697322 10382
da4ac1aa
BW
10383(define-public python-future
10384 (package
10385 (name "python-future")
10386 (version "0.15.2")
10387 (source
10388 (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "future" version))
10391 (sha256
10392 (base32
10393 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10394 (build-system python-build-system)
10395 ;; Many tests connect to the network or are otherwise flawed.
10396 ;; https://github.com/PythonCharmers/python-future/issues/210
10397 (arguments
10398 `(#:tests? #f))
10399 (home-page "http://python-future.org")
10400 (synopsis "Single-source support for Python 3 and 2")
10401 (description
10402 "@code{python-future} is the missing compatibility layer between Python 2 and
10403Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10404to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10405 (license license:expat)))
da4ac1aa
BW
10406
10407(define-public python2-future
f210e944 10408 (package-with-python2 python-future))
da4ac1aa 10409
8e451885
AE
10410(define-public python-cysignals
10411 (package
10412 (name "python-cysignals")
10413 (version "1.1.0")
10414 (source
10415 (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10418 (sha256
10419 (base32
10420 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10421 (build-system python-build-system)
10422 (native-inputs
10423 `(("python-cython" ,python-cython)
8e451885
AE
10424 ("python-sphinx" ,python-sphinx)))
10425 (inputs
10426 `(("pari-gp" ,pari-gp)))
10427 (arguments
10428 `(#:modules ((guix build python-build-system)
10429 ((guix build gnu-build-system) #:prefix gnu:)
10430 (guix build utils))
10431 ;; FIXME: Tests are executed after installation and currently fail
10432 ;; when not installing into standard locations; the author is working
10433 ;; on a fix.
10434 #:tests? #f
10435 #:phases
10436 (modify-phases %standard-phases
10437 (add-before
10438 'build 'configure
10439 (assoc-ref gnu:%standard-phases 'configure)))))
10440 (home-page
10441 "https://github.com/sagemath/cysignals")
10442 (synopsis
10443 "Handling of interrupts and signals for Cython")
10444 (description
10445 "The cysignals package provides mechanisms to handle interrupts (and
10446other signals and errors) in Cython code, using two related approaches,
10447for mixed Cython/Python code or external C libraries and pure Cython code,
10448respectively.")
3f641af0 10449 (license license:lgpl3+)))
8e451885
AE
10450
10451(define-public python2-cysignals
10452 (package-with-python2 python-cysignals))
10453
63bcec71
DM
10454(define-public python2-shedskin
10455 (package
10456 (name "python2-shedskin")
10457 (version "0.9.4")
10458 (source
10459 (origin
10460 (method url-fetch)
10461 (uri (string-append "https://github.com/shedskin/shedskin/"
10462 "releases/download/v" version
10463 "/shedskin-" version ".tgz"))
10464 (sha256
10465 (base32
10466 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10467 (build-system python-build-system)
10468 (arguments
10469 `(#:python ,python-2
10470 #:phases (modify-phases %standard-phases
10471 (add-after 'unpack 'fix-resulting-include-libs
10472 (lambda* (#:key inputs #:allow-other-keys)
10473 (let ((libgc (assoc-ref inputs "libgc"))
10474 (pcre (assoc-ref inputs "pcre")))
10475 (substitute* "shedskin/makefile.py"
10476 (("variable == 'CCFLAGS':[ ]*")
10477 (string-append "variable == 'CCFLAGS':\n"
10478 " line += ' -I " pcre "/include"
10479 " -I " libgc "/include'"))
10480 (("variable == 'LFLAGS':[ ]*")
10481 (string-append "variable == 'LFLAGS':\n"
10482 " line += ' -L" pcre "/lib"
10483 " -L " libgc "/lib'")))
10484 #t))))))
63bcec71
DM
10485 (inputs `(("pcre" ,pcre)
10486 ("libgc" ,libgc)))
10487 (home-page "https://shedskin.github.io/")
10488 (synopsis "Experimental Python-2 to C++ Compiler")
10489 (description (string-append "This is an experimental compiler for a subset of
10490Python. It generates C++ code and a Makefile."))
3f641af0 10491 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10492
10493(define-public python2-rope
10494 (package
10495 (name "python2-rope")
10496 (version "0.10.3")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "rope" version))
10501 (sha256
10502 (base32
10503 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10504 (arguments
10505 ;; Rope is currently python-2 only.
10506 ;; https://github.com/python-rope/rope/issues/57
10507 `(#:python ,python-2))
10508 (build-system python-build-system)
10509 (native-inputs
f3b98f4f 10510 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10511 (home-page "https://github.com/python-rope/rope")
10512 (synopsis "Refactoring library for Python")
10513 (description "Rope is a refactoring library for Python. It facilitates
10514the renaming, moving and extracting of attributes, functions, modules, fields
10515and parameters in Python 2 source code. These refactorings can also be applied
10516to occurences in strings and comments.")
3f641af0 10517 (license license:gpl2)))
6ba8ca17
10518
10519(define-public python-py3status
10520 (package
10521 (name "python-py3status")
d2262d70 10522 (version "3.1")
6ba8ca17
10523 (source
10524 (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "py3status" version))
10527 (sha256
10528 (base32
d2262d70 10529 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10530 (build-system python-build-system)
8653c1d5
MB
10531 (arguments
10532 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10533 (home-page "https://github.com/ultrabug/py3status")
10534 (synopsis "Extensible i3status wrapper written in Python")
10535 (description "py3status is an i3status wrapper which extends i3status
10536functionality in a modular way, allowing you to extend your panel with your
10537own code, responding to click events and updating clock every second.")
3f641af0 10538 (license license:bsd-3)))
b8fdbca3
HG
10539
10540(define-public python-tblib
10541 (package
10542 (name "python-tblib")
10543 (version "1.3.0")
10544 (source (origin
10545 (method url-fetch)
10546 (uri (pypi-uri "tblib" version))
10547 (sha256 (base32
10548 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10549 (build-system python-build-system)
10550 (arguments
10551 `(#:phases
10552 (modify-phases %standard-phases
10553 (replace 'check
10554 (lambda _
10555 ;; Upstream runs tests after installation and the package itself
10556 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10557 ;; found.
10558 (setenv "PYTHONPATH"
10559 (string-append (getcwd) "/build/lib:"
10560 (getenv "PYTHONPATH")))
10561 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10562 (native-inputs
10563 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10564 ("python-six" ,python-six)))
10565 (home-page "https://github.com/ionelmc/python-tblib")
10566 (synopsis "Traceback serialization library")
10567 (description
10568 "Traceback serialization allows you to:
10569
10570@enumerate
10571@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10572different processes. This allows better error handling when running code over
10573multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10574
10575@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 10576@end enumerate\n")
3f641af0 10577 (license license:bsd-3)))
b8fdbca3
HG
10578
10579(define-public python2-tblib
10580 (package-with-python2 python-tblib))
1a024de4
HG
10581
10582(define-public python-sqlparse
10583 (package
10584 (name "python-sqlparse")
10585 (version "0.1.19")
10586 (source (origin
10587 (method url-fetch)
10588 (uri (pypi-uri "sqlparse" version))
10589 (sha256
10590 (base32
10591 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10592 (build-system python-build-system)
10593 (arguments
10594 `(#:phases
10595 (modify-phases %standard-phases
10596 (replace 'check
10597 (lambda* _
10598 ;; setup.py-integrated 2to3 only affects the build files, but
10599 ;; py.test is using the source files. So we need to convert them
10600 ;; manually.
10601 (when (zero? (system* "python3"))
10602 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10603 (zero? (system* "py.test")))))))
10604 (native-inputs
f3b98f4f 10605 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10606 (home-page "https://github.com/andialbrecht/sqlparse")
10607 (synopsis "Non-validating SQL parser")
10608 (description "Sqlparse is a non-validating SQL parser for Python. It
10609provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10610 (license license:bsd-3)))
1a024de4
HG
10611
10612(define-public python2-sqlparse
10613 (package-with-python2 python-sqlparse))
68b9d242
SB
10614
10615(define-public python-greenlet
10616 (package
10617 (name "python-greenlet")
1f89fb16 10618 (version "0.4.11")
68b9d242
SB
10619 (source (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "greenlet" version))
10622 (sha256
10623 (base32
1f89fb16 10624 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 10625 (build-system python-build-system)
68b9d242
SB
10626 (home-page "https://greenlet.readthedocs.io/")
10627 (synopsis "Lightweight in-process concurrent programming")
10628 (description
10629 "Greenlet package is a spin-off of Stackless, a version of CPython
10630that supports micro-threads called \"tasklets\". Tasklets run
10631pseudo-concurrently (typically in a single or a few OS-level threads) and
10632are synchronized with data exchanges on \"channels\".")
3f641af0 10633 (license (list license:psfl license:expat))))
68b9d242
SB
10634
10635(define-public python2-greenlet
10636 (package-with-python2 python-greenlet))
d79a343b
SB
10637
10638(define-public python-gevent
10639 (package
10640 (name "python-gevent")
10641 (version "1.1.1")
10642 (source (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "gevent" version))
10645 (sha256
10646 (base32
10647 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10648 (modules '((guix build utils)))
10649 (snippet
10650 '(begin
10651 ;; unbunding libev and c-ares
10652 (for-each delete-file-recursively '("libev" "c-ares"))
10653 ;; fixing testsuite
10654 (call-with-output-file "greentest/__init__.py" noop)
10655 (substitute* "greentest/testrunner.py"
10656 (("import util") "from . import util")
10657 (("from util import log") "from .util import log"))))))
10658 (build-system python-build-system)
10659 (propagated-inputs
10660 `(("python-greenlet" ,python-greenlet)))
10661 (native-inputs
f3b98f4f 10662 `(("python-six" ,python-six)))
d79a343b
SB
10663 (inputs
10664 `(("c-ares" ,c-ares)
10665 ("libev" ,libev)))
10666 (home-page "http://www.gevent.org/")
10667 (synopsis "Coroutine-based network library")
10668 (description
10669 "gevent is a coroutine-based Python networking library that uses greenlet
10670to provide a high-level synchronous API on top of the libev event loop.")
10671 (license license:expat)))
10672
10673(define-public python2-gevent
10674 (package-with-python2 python-gevent))
da3aeeb6 10675
c9a18125
MB
10676(define-public python-geventhttpclient
10677 (package
10678 (name "python-geventhttpclient")
10679 (version "1.3.1")
10680 (source (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "geventhttpclient" version))
10683 (sha256
10684 (base32
10685 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10686 (modules '((guix build utils)))
10687 (snippet
10688 '(begin
10689 ;; Delete pre-compiled files.
10690 (for-each delete-file (find-files "src/geventhttpclient"
10691 ".*\\.pyc"))
10692 #t))))
10693 (build-system python-build-system)
10694 (arguments
10695 '(#:phases
10696 (modify-phases %standard-phases
10697 (add-after 'unpack 'delete-network-tests
10698 (lambda _
10699 (delete-file "src/geventhttpclient/tests/test_client.py")
10700 #t))
10701 (delete 'check)
10702 (add-after 'install 'check
10703 (lambda* (#:key inputs outputs #:allow-other-keys)
10704 (add-installed-pythonpath inputs outputs)
10705 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10706 (native-inputs
10707 `(("python-pytest" ,python-pytest)))
10708 (propagated-inputs
10709 `(("python-certifi" ,python-certifi)
10710 ("python-gevent" ,python-gevent)
10711 ("python-six" ,python-six)))
10712 (home-page "https://github.com/gwik/geventhttpclient")
10713 (synopsis "HTTP client library for gevent")
10714 (description "@code{python-geventhttpclient} is a high performance,
10715concurrent HTTP client library for python using @code{gevent}.")
10716 (license license:expat)))
10717
10718(define-public python2-geventhttpclient
10719 (package-with-python2 python-geventhttpclient))
10720
b585e361
DM
10721(define-public python-fastimport
10722 (package
10723 (name "python-fastimport")
10724 (version "0.9.6")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "fastimport" version))
10729 (sha256
10730 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10731 (build-system python-build-system)
10732 (home-page "https://github.com/jelmer/python-fastimport")
10733 (synopsis "VCS fastimport parser and generator in Python")
10734 (description "This package provides a parser for and generator of the Git
10735@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10736format.")
10737 (license license:gpl2+)))
10738
10739(define-public python2-fastimport
10740 (package-with-python2 python-fastimport))
10741
da3aeeb6
SB
10742(define-public python-twisted
10743 (package
10744 (name "python-twisted")
10745 (version "16.2.0")
10746 (source (origin
10747 (method url-fetch)
8ea8e8d3 10748 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10749 (sha256
10750 (base32
10751 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10752 (build-system python-build-system)
a960e73f
MB
10753 (arguments
10754 '(#:tests? #f)) ; FIXME: Some tests are failing.
10755 ;; #:phases
10756 ;; (modify-phases %standard-phases
10757 ;; (replace 'check
10758 ;; (lambda _
10759 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10760 (propagated-inputs
10761 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10762 (home-page "https://twistedmatrix.com/")
10763 (synopsis "Asynchronous networking framework written in Python")
10764 (description
10765 "Twisted is an extensible framework for Python programming, with special
10766focus on event-based network programming and multiprotocol integration.")
10767 (license license:expat)))
10768
10769(define-public python2-twisted
10770 (package-with-python2 python-twisted))
d0b6fed6 10771
4d3fa5a4
EF
10772(define-public python-pika
10773 (package
10774 (name "python-pika")
10775 (version "0.10.0")
10776 (source
10777 (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "pika" version))
10780 (sha256
10781 (base32
10782 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10783 (build-system python-build-system)
10784 (native-inputs
269d9172
LF
10785 `(("python-pyev" ,python-pyev)
10786 ("python-tornado" ,python-tornado)
10787 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10788 (home-page "https://pika.readthedocs.org")
10789 (synopsis "Pure Python AMQP Client Library")
10790 (description
10791 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10792Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10793network support library.")
10794 (license license:bsd-3)))
10795
10796(define-public python2-pika
10797 (package-with-python2 python-pika))
10798
d0b6fed6
DM
10799(define-public python-ply
10800 (package
10801 (name "python-ply")
234ade2d 10802 (version "3.9")
d0b6fed6
DM
10803 (source
10804 (origin
10805 (method url-fetch)
234ade2d 10806 (uri (pypi-uri "ply" version))
d0b6fed6
DM
10807 (sha256
10808 (base32
234ade2d 10809 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
10810 (build-system python-build-system)
10811 (home-page "http://www.dabeaz.com/ply/")
10812 (synopsis "Python Lex & Yacc")
10813 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10814It uses LR parsing and does extensive error checking.")
f210e944 10815 (license license:bsd-3)))
d0b6fed6
DM
10816
10817(define-public python2-ply
f210e944 10818 (package-with-python2 python-ply))
d951bd54
SB
10819
10820(define-public python-tabulate
10821 (package
10822 (name "python-tabulate")
e6ace98d 10823 (version "0.7.7")
d951bd54
SB
10824 (source (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "tabulate" version))
10827 (sha256
10828 (base32
e6ace98d 10829 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))
d951bd54
SB
10830 ;; Fix tests
10831 (modules '((guix build utils)))
10832 (snippet '(substitute* '("test/test_cli.py"
10833 "test/test_input.py"
10834 "test/test_output.py"
10835 "test/test_regression.py")
10836 (("from common") "from nose.tools")))))
10837 (build-system python-build-system)
10838 (native-inputs
f3b98f4f 10839 `(;; For testing
d951bd54
SB
10840 ("python-nose" ,python-nose)))
10841 (home-page "https://bitbucket.org/astanin/python-tabulate")
10842 (synopsis "Pretty-print tabular data")
10843 (description
10844 "Tabulate is a library and command-line utility to pretty-print tabular
10845data in Python.")
10846 (license license:expat)))
10847
10848(define-public python2-tabulate
10849 (package-with-python2 python-tabulate))
1c4c8a33
SB
10850
10851(define-public python-kazoo
10852 (package
10853 (name "python-kazoo")
10854 (version "2.2.1")
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "kazoo" version))
10859 (sha256
10860 (base32
10861 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10862 (build-system python-build-system)
10863 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10864 (propagated-inputs
10865 `(("python-six" ,python-six)))
1c4c8a33
SB
10866 (home-page "https://kazoo.readthedocs.org")
10867 (synopsis "High-level Zookeeper client library")
10868 (description
10869 "Kazoo is a Python client library for the Apache Zookeeper distributed
10870application service. It is designed to be easy to use and to avoid common
10871programming errors.")
3f641af0 10872 (license license:asl2.0)))
1c4c8a33
SB
10873
10874(define-public python2-kazoo
10875 (package-with-python2 python-kazoo))
45dda35e
SB
10876
10877(define-public python-pykafka
10878 (package
10879 (name "python-pykafka")
10880 (version "2.4.0")
10881 (source (origin
10882 (method url-fetch)
c6bccf71
EF
10883 (uri (string-append
10884 "https://pypi.python.org/packages/8b/3e/"
10885 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10886 "pykafka-" version ".tar.gz"))
45dda35e
SB
10887 (sha256
10888 (base32
10889 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10890 (build-system python-build-system)
10891 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10892 (propagated-inputs
45dda35e
SB
10893 `(("python-gevent" ,python-gevent)
10894 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10895 ("python-tabulate" ,python-tabulate)))
10896 (inputs
10897 `(("librdkafka" ,librdkafka)))
10898 (home-page "https://pykafka.readthedocs.io/")
10899 (synopsis "Apache Kafka client for Python")
10900 (description
10901 "PyKafka is a client for the Apache Kafka distributed messaging system.
10902It includes Python implementations of Kafka producers and consumers, which
10903are optionally backed by a C extension built on librdkafka.")
3f641af0 10904 (license license:asl2.0)))
45dda35e
SB
10905
10906(define-public python2-pykafka
10907 (package-with-python2 python-pykafka))
a44fd439
DM
10908
10909(define-public python-wcwidth
10910 (package
10911 (name "python-wcwidth")
10912 (version "0.1.6")
10913 (source
10914 (origin
10915 (method url-fetch)
10916 (uri (string-append
10917 "https://pypi.python.org/packages/"
10918 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10919 "wcwidth-" version ".tar.gz"))
10920 (sha256
10921 (base32
10922 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10923 (build-system python-build-system)
10924 (home-page "https://github.com/jquast/wcwidth")
66e07664 10925 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10926 (description "Wcwidth measures the number of terminal column cells of
10927wide-character codes. It is useful for those implementing a terminal emulator,
10928or programs that carefully produce output to be interpreted by one. It is a
10929Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10930specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10931 (license license:expat)))
a44fd439
DM
10932
10933(define-public python2-wcwidth
f210e944 10934 (package-with-python2 python-wcwidth))
0de78c95
DP
10935
10936(define-public python2-jsonrpclib
10937 (package
10938 (name "python2-jsonrpclib")
10939 (version "0.1.7")
10940 (source (origin
10941 (method url-fetch)
10942 (uri (string-append
10943 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10944 "jsonrpclib-" version ".tar.gz"))
10945 (sha256
10946 (base32
10947 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10948 (build-system python-build-system)
0de78c95
DP
10949 (arguments
10950 `(#:tests? #f
10951 #:python ,python-2))
10952 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10953 (synopsis "Implementation of JSON-RPC specification for Python")
10954 (description
10955 "This library is an implementation of the JSON-RPC specification.
10956It supports both the original 1.0 specification, as well as the
10957new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10958etc.")
3f641af0 10959 (license license:asl2.0)))
9250b0f3
SB
10960
10961(define-public python-chai
10962 (package
10963 (name "python-chai")
10964 (version "1.1.1")
10965 (source (origin
10966 (method url-fetch)
10967 (uri (pypi-uri "chai" version))
10968 (sha256
10969 (base32
10970 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10971 (build-system python-build-system)
9250b0f3
SB
10972 (home-page "https://github.com/agoragames/chai")
10973 (synopsis "Mocking framework for Python")
10974 (description
10975 "Chai provides an api for mocking, stubbing and spying your python
10976objects, patterned after the Mocha library for Ruby.")
3f641af0 10977 (license license:bsd-3)))
9250b0f3
SB
10978
10979(define-public python2-chai
10980 (package-with-python2 python-chai))
10981
ae43baa8
SB
10982(define-public python-arrow
10983 (package
10984 (name "python-arrow")
10985 (version "0.8.0")
10986 (source (origin
10987 (method url-fetch)
10988 (uri (pypi-uri "arrow" version))
10989 (sha256
10990 (base32
10991 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10992 (build-system python-build-system)
10993 (native-inputs
f3b98f4f 10994 `(;; For testing
ae43baa8
SB
10995 ("python-chai" ,python-chai)
10996 ("python-simplejson" ,python-simplejson)))
36aed736 10997 (propagated-inputs
22d7360b 10998 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
10999 (home-page "https://github.com/crsmithdev/arrow/")
11000 (synopsis "Dates and times for Python")
11001 (description
11002 "Arrow is a Python library to creating, manipulating, formatting and
11003converting dates, times, and timestamps. It implements and updates the
11004datetime type.")
3f641af0 11005 (license license:asl2.0)))
ae43baa8
SB
11006
11007(define-public python2-arrow
11008 (package-with-python2 python-arrow))
11009
1f2b62a4
SB
11010(define-public python-inflection
11011 (package
11012 (name "python-inflection")
11013 (version "0.3.1")
11014 (source
11015 (origin (method url-fetch)
11016 (uri (pypi-uri "inflection" version))
11017 (sha256
11018 (base32
11019 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11020 (build-system python-build-system)
e9127525
MB
11021 (native-inputs
11022 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
11023 (home-page "http://github.com/jpvanhal/inflection")
11024 (synopsis "Python string transformation library")
11025 (description
11026 "Inflection is a string transformation library. It singularizes
11027and pluralizes English words, and transforms strings from CamelCase to
11028underscored string.")
11029 (license license:expat)))
11030
11031(define-public python2-inflection
11032 (package-with-python2 python-inflection))
11033
18995566
SB
11034(define-public python-pylev
11035 (package
11036 (name "python-pylev")
11037 (version "1.3.0")
11038 (source (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "pylev" version))
11041 (sha256
11042 (base32
11043 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11044 (build-system python-build-system)
18995566
SB
11045 (home-page "http://github.com/toastdriven/pylev")
11046 (synopsis "Levenshtein distance implementation in Python")
11047 (description "Pure Python Levenshtein implementation, based off the
11048Wikipedia code samples at
11049@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11050 (license license:bsd-3)))
18995566
SB
11051
11052(define-public python2-pylev
11053 (package-with-python2 python-pylev))
11054
f5deff7a
SB
11055(define-public python-cleo
11056 (package
11057 (name "python-cleo")
11058 (version "0.4.1")
11059 (source (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "cleo" version))
11062 (sha256
11063 (base32
11064 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11065 (build-system python-build-system)
11066 (native-inputs
f3b98f4f 11067 `(;; For testing
f5deff7a
SB
11068 ("python-mock" ,python-mock)
11069 ("python-pytest" ,python-pytest)))
9403150a
SB
11070 (propagated-inputs
11071 `(("python-psutil" ,python-psutil)
11072 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11073 (home-page "https://github.com/sdispater/cleo")
11074 (synopsis "Command-line arguments library for Python")
11075 (description
11076 "Cleo allows you to create command-line commands with signature in
11077docstring and colored output.")
11078 (license license:expat)))
11079
11080(define-public python2-cleo
11081 (package-with-python2 python-cleo))
11082
77cadb43
SB
11083(define-public python-lazy-object-proxy
11084 (package
11085 (name "python-lazy-object-proxy")
11086 (version "1.2.2")
11087 (source (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "lazy-object-proxy" version))
11090 (sha256
11091 (base32
11092 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11093 (build-system python-build-system)
77cadb43
SB
11094 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11095 (synopsis "Lazy object proxy for python")
11096 (description
11097 "Lazy object proxy is an object that wraps a callable but defers the call
11098until the object is actually required, and caches the result of said call.")
3f641af0 11099 (license license:bsd-2)))
77cadb43
SB
11100
11101(define-public python2-lazy-object-proxy
11102 (package-with-python2 python-lazy-object-proxy))
11103
5477e05f
SB
11104(define-public python-dnspython
11105 (package
11106 (name "python-dnspython")
6c514128 11107 (version "1.15.0")
5477e05f
SB
11108 (source (origin
11109 (method url-fetch)
11110 (uri (string-append "http://www.dnspython.org/kits/"
11111 version "/dnspython-" version ".tar.gz"))
11112 (sha256
11113 (base32
6c514128 11114 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11115 (build-system python-build-system)
11116 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11117 (home-page "http://www.dnspython.org")
11118 (synopsis "DNS toolkit for Python")
11119 (description
11120 "dnspython is a DNS toolkit for Python. It supports almost all record
11121types. It can be used for queries, zone transfers, and dynamic updates.
11122It supports TSIG authenticated messages and EDNS0.")
11123 (license license:expat)))
11124
11125(define-public python2-dnspython
11126 (package-with-python2 python-dnspython))
11127
22711e25
SB
11128(define-public python-email-validator
11129 (package
11130 (name "python-email-validator")
b165c215 11131 (version "1.0.2")
22711e25
SB
11132 (source
11133 (origin (method url-fetch)
11134 (uri (pypi-uri "email_validator" version))
11135 (sha256
11136 (base32
b165c215 11137 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11138 (build-system python-build-system)
11139 (arguments
11140 '(#:phases
11141 (modify-phases %standard-phases
11142 (add-before 'build 'use-dnspython
11143 (lambda _
11144 (substitute* "setup.py"
11145 (("dnspython3") "dnspython"))
11146 #t)))))
d42560bd 11147 (propagated-inputs
22711e25 11148 `(("python-dnspython" ,python-dnspython)
d42560bd 11149 ("python-idna" ,python-idna)))
22711e25
SB
11150 (home-page "https://github.com/JoshData/python-email-validator")
11151 (synopsis "Email address validation library for Python")
11152 (description
11153 "This library validates email address syntax and deliverability.")
3f641af0 11154 (license license:cc0)))
22711e25
SB
11155
11156(define-public python2-email-validator
11157 (package-with-python2 python-email-validator))
11158
8987d91e
SB
11159(define-public python-ukpostcodeparser
11160 (package
11161 (name "python-ukpostcodeparser")
11162 (version "1.0.3")
11163 (source (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "UkPostcodeParser" version))
11166 (sha256
11167 (base32
11168 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11169 (build-system python-build-system)
8987d91e
SB
11170 (home-page "https://github.com/hamstah/ukpostcodeparser")
11171 (synopsis "UK Postcode parser for Python")
11172 (description
11173 "This library provides the @code{parse_uk_postcode} function for
11174parsing UK postcodes.")
11175 (license license:expat)))
11176
11177(define-public python2-ukpostcodeparser
11178 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
11179
11180(define-public python-fake-factory
11181 (package
11182 (name "python-fake-factory")
7adc698f 11183 (version "0.7.2")
ea92ae01
SB
11184 (source (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "fake-factory" version))
11187 (sha256
11188 (base32
7adc698f 11189 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 11190 (build-system python-build-system)
b7f3ea95
MB
11191 (arguments
11192 '(#:phases
11193 (modify-phases %standard-phases
11194 (replace 'check
11195 (lambda _
11196 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11197 (native-inputs
f3b98f4f 11198 `(;; For testing
ea92ae01
SB
11199 ("python-email-validator" ,python-email-validator)
11200 ("python-mock" ,python-mock)
11201 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11202 (propagated-inputs
22d7360b 11203 `(("python-dateutil" ,python-dateutil)
bbcd7297 11204 ("python-six" ,python-six)))
7adc698f 11205 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11206 (synopsis "Python package that generates fake data")
11207 (description
11208 "Faker is a Python package that generates fake data such as names,
11209addresses, and phone numbers.")
11210 (license license:expat)
11211 (properties `((python2-variant . ,(delay python2-fake-factory))))))
11212
11213(define-public python2-fake-factory
11214 (let ((base (package-with-python2 (strip-python2-variant
11215 python-fake-factory))))
11216 (package
11217 (inherit base)
24c9aa18 11218 (propagated-inputs
ea92ae01 11219 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11220 ,@(package-propagated-inputs base))))))
ea92ae01 11221
b49504fd
SB
11222(define-public python-pyaml
11223 (package
11224 (name "python-pyaml")
11225 (version "15.8.2")
11226 (source (origin
11227 (method url-fetch)
11228 (uri (pypi-uri "pyaml" version))
11229 (sha256
11230 (base32
11231 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11232 (build-system python-build-system)
f620311a
MB
11233 (native-inputs
11234 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11235 (propagated-inputs
11236 `(("python-pyyaml" ,python-pyyaml)))
11237 (home-page "https://github.com/mk-fg/pretty-yaml")
11238 (synopsis "YAML pretty-print library for Python")
11239 (description
11240 "pyaml is a PyYAML based python module to produce pretty and readable
11241YAML-serialized data.")
3f641af0 11242 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11243
11244(define-public python2-pyaml
11245 (package-with-python2 python-pyaml))
11246
347175a2
SB
11247(define-public python-flexmock
11248 (package
11249 (name "python-flexmock")
11250 (version "0.10.2")
11251 (source (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "flexmock" version))
11254 (sha256
11255 (base32
11256 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11257 (build-system python-build-system)
347175a2
SB
11258 (home-page "https://flexmock.readthedocs.org")
11259 (synopsis "Testing library for Python")
11260 (description
11261 "flexmock is a testing library for Python that makes it easy to create
11262mocks, stubs and fakes.")
3f641af0 11263 (license license:bsd-3)))
347175a2
SB
11264
11265(define-public python2-flexmock
11266 (package-with-python2 python-flexmock))
11267
5a744191
SB
11268(define-public python-orator
11269 (package
11270 (name "python-orator")
11271 (version "0.8.2")
11272 (source (origin
11273 (method url-fetch)
11274 (uri (pypi-uri "orator" version))
11275 (sha256
11276 (base32
11277 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11278 (build-system python-build-system)
11279 (arguments '(#:tests? #f)) ; no tests
b2676030 11280 (propagated-inputs
5a744191
SB
11281 `(("python-arrow" ,python-arrow)
11282 ("python-blinker" ,python-blinker)
11283 ("python-cleo" ,python-cleo)
11284 ("python-fake-factory" ,python-fake-factory)
11285 ("python-inflection" ,python-inflection)
11286 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11287 ("python-pyaml" ,python-pyaml)
5a744191
SB
11288 ("python-simplejson" ,python-simplejson)
11289 ("python-wrapt" ,python-wrapt)))
11290 (home-page "https://orator-orm.com/")
11291 (synopsis "ActiveRecord ORM for Python")
11292 (description
11293 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11294implementation for Python.")
11295 (license license:expat)
11296 (properties `((python2-variant . ,(delay python2-orator))))))
11297
11298(define-public python2-orator
11299 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11300 (package
11301 (inherit base)
06961617 11302 (propagated-inputs
5a744191 11303 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11304 ,@(package-propagated-inputs base))))))
f4155188
DM
11305
11306(define-public python-prompt-toolkit
11307 (package
11308 (name "python-prompt-toolkit")
6a34f4cc 11309 (version "1.0.9")
f4155188
DM
11310 (source
11311 (origin
11312 (method url-fetch)
d15e2ef0 11313 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11314 (sha256
11315 (base32
6a34f4cc 11316 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11317 (build-system python-build-system)
bae18710
LF
11318 (arguments
11319 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11320 (propagated-inputs
11321 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11322 ("python-six" ,python-six)
f22efa01 11323 ("python-pygments" ,python-pygments)))
f4155188
DM
11324 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11325 (synopsis "Library for building command line interfaces in Python")
11326 (description
11327 "Prompt-Toolkit is a library for building interactive command line
11328interfaces in Python. It's like GNU Readline but it also features syntax
11329highlighting while typing, out-of-the-box multi-line input editing, advanced
11330code completion, incremental search, support for Chinese double-width
11331characters, mouse support, and auto suggestions.")
f210e944 11332 (license license:bsd-3)))
f4155188
DM
11333
11334(define-public python2-prompt-toolkit
f210e944 11335 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11336
11337(define-public python-jedi
11338 (package
11339 (name "python-jedi")
11340 (version "0.9.0")
11341 (source
11342 (origin
11343 (method url-fetch)
11344 (uri (pypi-uri "jedi" version))
11345 (sha256
11346 (base32
11347 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11348 (build-system python-build-system)
bfce8a34
MB
11349 (arguments
11350 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11351 '(#:tests? #f))
11352 (native-inputs
11353 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11354 (home-page "https://github.com/davidhalter/jedi")
11355 (synopsis
11356 "Autocompletion for Python that can be used for text editors")
11357 (description
11358 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11359 (license license:expat)))
a502dfbf
DM
11360
11361(define-public python2-jedi
f210e944 11362 (package-with-python2 python-jedi))
c2f0dc6e
DM
11363
11364(define-public ptpython
11365 (package
11366 (name "ptpython")
11367 (version "0.34")
11368 (source (origin
11369 (method url-fetch)
11370 (uri (pypi-uri "ptpython" version))
11371 (sha256
11372 (base32
11373 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11374 (build-system python-build-system)
32955348
MB
11375 (arguments
11376 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11377 (propagated-inputs
c2f0dc6e
DM
11378 `(("python-docopt" ,python-docopt)
11379 ("python-jedi" ,python-jedi)
11380 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11381 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11382 (home-page "https://github.com/jonathanslenders/ptpython")
11383 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11384 (description
11385 "ptpython is a Python read-eval-print loop with IDE-like features.
11386It supports syntax highlighting, multiline editing, autocompletion, mouse,
11387color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11388etc.")
3f641af0 11389 (license license:bsd-3)
c2f0dc6e
DM
11390 (properties `((python2-variant . ,(delay ptpython-2))))))
11391
11392(define-public ptpython-2
11393 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11394 (package
11395 (inherit base)
11396 (name "ptpython2"))))
b227f0be 11397
b04a52a6
DJ
11398(define-public python-requests-oauthlib
11399 (package
11400 (name "python-requests-oauthlib")
11401 (version "0.6.2")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 (uri (pypi-uri "requests-oauthlib" version))
11406 (sha256
11407 (base32
11408 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11409 (build-system python-build-system)
11410 (arguments
11411 `(#:phases
11412 (modify-phases %standard-phases
11413 ;; removes tests that require network access
11414 (add-before 'check 'pre-check
11415 (lambda _
11416 (delete-file "tests/test_core.py")
11417 #t)))))
11418 (native-inputs
11419 `(("python-requests-mock" ,python-requests-mock)
11420 ("python-mock" ,python-mock)))
f22efa01 11421 (propagated-inputs
b04a52a6
DJ
11422 `(("python-oauthlib" ,python-oauthlib)
11423 ("python-requests" ,python-requests)))
11424 (home-page
11425 "https://github.com/requests/requests-oauthlib")
11426 (synopsis
11427 "OAuthlib authentication support for Requests")
11428 (description
11429 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11430provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11431 (license license:isc)))
b04a52a6
DJ
11432
11433(define-public python2-requests-oauthlib
f210e944 11434 (package-with-python2 python-requests-oauthlib))
b04a52a6 11435
b227f0be 11436(define-public python-stem
11437 (package
11438 (name "python-stem")
0bb1c35a 11439 (version "1.5.4")
b227f0be 11440 (source
11441 (origin
11442 (method url-fetch)
c976b319 11443 (uri (pypi-uri "stem" version))
b227f0be 11444 (sha256
11445 (base32
0bb1c35a 11446 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11447 (build-system python-build-system)
11448 (arguments
11449 `(#:phases
11450 (modify-phases %standard-phases
11451 (replace 'check
11452 (lambda _
11453 (zero? (system* "./run_tests.py" "--unit")))))))
11454 (native-inputs
11455 `(("python-mock" ,python-mock)
11456 ("python-pep8" ,python-pep8)
11457 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11458 (home-page "https://stem.torproject.org/")
11459 (synopsis
11460 "Python controller library that allows applications to interact with Tor")
11461 (description
11462 "Stem is a Python controller library for Tor. With it you can use Tor's
11463control protocol to script against the Tor process and read descriptor data
11464relays publish about themselves.")
3f641af0 11465 (license license:lgpl3)))
b227f0be 11466
11467(define-public python2-stem
11468 (package-with-python2 python-stem))
517a6c0c
DM
11469
11470(define-public python-pyserial
11471 (package
11472 (name "python-pyserial")
11473 (version "3.1.1")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (pypi-uri "pyserial" version))
11478 (sha256
11479 (base32
11480 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11481 (build-system python-build-system)
0a702009
MB
11482 (arguments
11483 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11484 ;; #:phases
11485 ;; (modify-phases %standard-phases
11486 ;; (replace 'check
11487 ;; (lambda _
11488 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
11489 (home-page
11490 "https://github.com/pyserial/pyserial")
11491 (synopsis "Python Serial Port Bindings")
11492 (description "@code{pyserial} provide serial port bindings for Python. It
11493supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11494and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 11495 (license license:bsd-3)))
517a6c0c
DM
11496
11497(define-public python2-pyserial
f210e944 11498 (package-with-python2 python-pyserial))
6eb7af2a
DJ
11499
11500(define-public python-kivy
11501 (package
11502 (name "python-kivy")
11503 (version "1.9.1")
11504 (source
11505 (origin
11506 (method url-fetch)
11507 (uri (pypi-uri "kivy" version))
11508 (file-name (string-append name "-" version ".tar.gz"))
11509 (sha256
11510 (base32
11511 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11512 (build-system python-build-system)
11513 (arguments
11514 `(#:tests? #f ; Tests require many optional packages
11515 #:phases
11516 (modify-phases %standard-phases
11517 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11518 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11519 (lambda* (#:key inputs #:allow-other-keys)
11520 (setenv "KIVY_SDL2_PATH"
11521 (string-append (assoc-ref inputs "sdl-union")
11522 "/include/SDL2"))
11523 #t)))))
11524 (native-inputs
f2516de2
HG
11525 `(("pkg-config" ,pkg-config)
11526 ("python-cython" ,python-cython)))
6eb7af2a 11527 (inputs
f2516de2 11528 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
11529 ("mesa" ,mesa)
11530 ("sdl-union"
11531 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11532 (home-page "http://kivy.org")
11533 (synopsis
11534 "Multitouch application framework")
11535 (description
11536 "A software library for rapid development of
11537hardware-accelerated multitouch applications.")
11538 (license license:expat)))
11539
11540(define-public python2-kivy
11541 (package-with-python2 python-kivy))
11542
11543(define-public python-kivy-next
11544 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11545 (revision "1"))
11546 (package (inherit python-kivy)
11547 (name "python-kivy-next")
d80a71eb 11548 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11549 (string-take commit 7)))
11550 (source
11551 (origin
11552 (method git-fetch)
11553 (uri (git-reference
11554 (url "https://github.com/kivy/kivy")
11555 (commit commit)))
11556 (file-name (string-append name "-" version "-checkout"))
11557 (sha256
11558 (base32
11559 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11560
11561(define-public python2-kivy-next
11562 (package-with-python2 python-kivy-next))
8794bd8b
DC
11563
11564(define-public python-binaryornot
11565 (package
11566 (name "python-binaryornot")
11567 (version "0.4.0")
11568 (source (origin
11569 (method url-fetch)
11570 (uri (pypi-uri "binaryornot" version))
11571 (sha256
11572 (base32
11573 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11574 (build-system python-build-system)
f22efa01 11575 (propagated-inputs
8794bd8b
DC
11576 `(("python-chardet" ,python-chardet)
11577 ("python-hypothesis" ,python-hypothesis)))
11578 (home-page "https://github.com/audreyr/binaryornot")
11579 (synopsis "Package to check if a file is binary or text")
11580 (description "Ultra-lightweight pure Python package to check if a file is
11581binary or text.")
11582 (license license:bsd-3)
11583 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11584
11585(define-public python2-binaryornot
11586 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11587 (package (inherit base)
f22efa01 11588 (propagated-inputs
8794bd8b 11589 `(("python2-enum34" ,python2-enum34)
f22efa01 11590 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11591
11592(define-public python-nltk
11593 (package
11594 (name "python-nltk")
11595 (version "3.2.1")
11596 (source (origin
11597 (method url-fetch)
11598 (uri (pypi-uri "nltk" version))
11599 (sha256
11600 (base32
11601 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11602 (build-system python-build-system)
59f12985
LF
11603 (arguments
11604 '(;; The tests require some extra resources to be downloaded.
11605 ;; TODO Try packaging these resources.
11606 #:tests? #f))
a9ac982a
DC
11607 (home-page "http://nltk.org/")
11608 (synopsis "Natural Language Toolkit")
11609 (description "It provides interfaces to over 50 corpora and lexical
11610resources such as WordNet, along with a suite of text processing libraries
11611for classification, tokenization, stemming, tagging, parsing, and semantic
11612reasoning, wrappers for natural language processing libraries.")
f210e944 11613 (license license:asl2.0)))
a9ac982a
DC
11614
11615(define-public python2-nltk
f210e944 11616 (package-with-python2 python-nltk))
691cd90d
DC
11617
11618(define-public python-pymongo
11619 (package
11620 (name "python-pymongo")
11621 (version "3.3.0")
11622 (source (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "pymongo" version))
11625 (sha256
11626 (base32
11627 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11628 (build-system python-build-system)
f22efa01 11629 (propagated-inputs
691cd90d
DC
11630 `(("python-certifi" ,python-certifi)))
11631 (home-page "http://github.com/mongodb/mongo-python-driver")
11632 (synopsis "Python driver for MongoDB")
11633 (description "Python driver for MongoDB.")
f210e944 11634 (license license:asl2.0)))
691cd90d
DC
11635
11636(define-public python2-pymongo
f210e944 11637 (package-with-python2 python-pymongo))
6a6c9d43
DC
11638
11639(define-public python-sh
11640 (package
11641 (name "python-sh")
11642 (version "1.11")
11643 (source (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "sh" version))
11646 (sha256
11647 (base32
11648 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11649 (build-system python-build-system)
11650 (arguments
11651 `(#:tests? #f)) ; no tests
11652 (home-page "https://github.com/amoffat/sh")
11653 (synopsis "Python subprocess interface")
11654 (description "Abstracts process invocation by providing a function
11655interface for programs.")
f210e944 11656 (license license:expat)))
6a6c9d43
DC
11657
11658(define-public python2-sh
f210e944 11659 (package-with-python2 python-sh))
05b59190 11660
25702397
EF
11661(define-public python-consul
11662 (package
11663 (name "python-consul")
11664 (version "0.6.1")
11665 (source
11666 (origin
11667 (method url-fetch)
11668 (uri (pypi-uri "python-consul" version))
11669 (sha256
11670 (base32
11671 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11672 (build-system python-build-system)
11673 (native-inputs
fd1d6de7
HG
11674 `(("python-pytest" ,python-pytest)))
11675 (propagated-inputs
11676 `(("python-requests" ,python-requests)
25702397
EF
11677 ("python-six" ,python-six)))
11678 (home-page "https://github.com/cablehead/python-consul")
11679 (synopsis "Python client for Consul")
11680 (description
11681 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11682discovery, monitoring and configuration.")
11683 (license license:expat)))
11684
11685(define-public python2-consul
f210e944 11686 (package-with-python2 python-consul))
25702397 11687
05b59190
DC
11688(define-public python-schematics
11689 (package
11690 (name "python-schematics")
11691 (version "1.1.1")
11692 (source
11693 (origin
11694 (method url-fetch)
11695 (uri (string-append
11696 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11697 (file-name (string-append name "-" version ".tar.gz"))
11698 (sha256
11699 (base32
11700 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11701 (build-system python-build-system)
f22efa01 11702 (propagated-inputs
05b59190
DC
11703 `(("python-six" ,python-six)))
11704 (arguments
11705 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11706 ; version requirements (eg python-coveralls)
11707 (home-page "https://github.com/schematics/schematics")
11708 (synopsis "Python Data Structures for Humans")
11709 (description "Python Data Structures for Humans.")
f210e944 11710 (license license:bsd-3)))
05b59190
DC
11711
11712(define-public python2-schematics
f210e944 11713 (package-with-python2 python-schematics))
d6907ff7
DC
11714
11715(define-public python-publicsuffix
11716 (package
11717 (name "python-publicsuffix")
11718 (version "1.1.0")
11719 (source (origin
11720 (method url-fetch)
11721 (uri (pypi-uri "publicsuffix" version))
11722 (sha256
11723 (base32
11724 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11725 (build-system python-build-system)
11726 (arguments
11727 `(#:tests? #f)) ; tests use the internet
11728 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11729 (synopsis "Get suffix for a domain name")
11730 (description "Get a public suffix for a domain name using the Public Suffix
11731List.")
f210e944 11732 (license license:expat)))
d6907ff7
DC
11733
11734(define-public python2-publicsuffix
f210e944 11735 (package-with-python2 python-publicsuffix))
b2319996
DC
11736
11737(define-public python-publicsuffix2
11738 (package
11739 (name "python-publicsuffix2")
11740 (version "2.20160621")
11741 (source
11742 (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11745 (sha256
11746 (base32
11747 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11748 (build-system python-build-system)
10797a0a
LF
11749 (arguments
11750 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11751 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11752 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11753 (description "Get a public suffix for a domain name using the Public Suffix
11754List. Forked from and using the same API as the publicsuffix package.")
f210e944 11755 (license (list license:expat license:mpl2.0))))
b2319996
DC
11756
11757(define-public python2-publicsuffix2
f210e944 11758 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11759
11760(define-public python-url
11761 (package
11762 (name "python-url")
11763 (version "0.2.0")
11764 (source (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "url" version))
11767 (sha256
11768 (base32
11769 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11770 (build-system python-build-system)
f22efa01 11771 (propagated-inputs
81f1515d
DC
11772 `(("python-publicsuffix" ,python-publicsuffix)))
11773 (native-inputs
11774 `(("python-coverage" ,python-coverage)
11775 ("python-nose" ,python-nose)))
11776 (arguments
11777 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11778 (home-page "http://github.com/seomoz/url-py")
11779 (synopsis "URL Parsing")
11780 (description "Library for parsing urls.")
11781 (license license:expat)
11782 (properties `((python2-variant . ,(delay python2-url))))))
11783
11784(define-public python2-url
11785 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11786 (package (inherit base)
f22efa01 11787 (propagated-inputs
f210e944 11788 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11789
11790(define-public python-freezegun
11791 (package
11792 (name "python-freezegun")
0c315fb3 11793 (version "0.3.8")
974ee2c1
TS
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "freezegun" version))
11798 (sha256
11799 (base32
0c315fb3 11800 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
11801 (build-system python-build-system)
11802 (native-inputs
11803 `(("python-mock" ,python-mock)
11804 ("python-nose" ,python-nose)
4e096968 11805 ("python-coverage" ,python-coverage)))
f22efa01 11806 (propagated-inputs
4e096968 11807 `(("python-six" ,python-six)
22d7360b 11808 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
11809 (arguments
11810 `(#:phases (modify-phases %standard-phases
11811 ;; The tests are normally executed via `make test`, but the PyPi
11812 ;; package does not include the Makefile.
11813 (replace 'check
11814 (lambda _
11815 (zero? (system* "nosetests" "./tests/")))))))
11816 (home-page "https://github.com/spulec/freezegun")
11817 (synopsis "Test utility for mocking the datetime module")
11818 (description
11819 "FreezeGun is a library that allows your python tests to travel through
11820time by mocking the datetime module.")
11821 (license license:asl2.0)))
11822
11823(define-public python2-freezegun
f210e944
HG
11824 (package-with-python2 python-freezegun))
11825
dddcb25c
MB
11826
11827(define-public python-odfpy
11828 (package
11829 (name "python-odfpy")
11830 (version "1.3.3")
11831 (source (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "odfpy" version))
11834 (sha256
11835 (base32
11836 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11837 (arguments
11838 `(#:modules ((srfi srfi-1)
11839 (guix build python-build-system)
11840 (guix build utils))
11841 #:phases
11842 (modify-phases %standard-phases
11843 (replace 'check
11844 ;; The test runner invokes python2 and python3 for test*.py.
11845 ;; To avoid having both in inputs, we replicate it here.
11846 (lambda _
11847 (every (lambda (test-file)
11848 (zero? (system* "python" test-file)))
11849 (find-files "tests" "^test.*\\.py$")))))))
11850 (build-system python-build-system)
11851 (home-page "https://github.com/eea/odfpy")
11852 (synopsis "Python API and tools to manipulate OpenDocument files")
11853 (description "Collection of libraries and utility programs written in
11854Python to manipulate OpenDocument 1.2 files.")
11855 (license
11856 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11857 ;; number of files with other licenses.
11858 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11859
11860(define-public python2-odfpy
11861 (package-with-python2 python-odfpy))
b30565bd
MB
11862
11863(define-public python-cachecontrol
11864 (package
11865 (name "python-cachecontrol")
11866 (version "0.11.6")
11867 (source
11868 (origin
11869 (method url-fetch)
11870 ;; Pypi does not have tests.
11871 (uri (string-append
11872 "https://github.com/ionrock/cachecontrol/archive/v"
11873 version ".tar.gz"))
11874 (file-name (string-append name "-" version ".tar.gz"))
11875 (sha256
11876 (base32
11877 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11878 (build-system python-build-system)
11879 (arguments
11880 `(#:phases
11881 (modify-phases %standard-phases
11882 (replace 'check
11883 (lambda _
11884 ;; Drop test that requires internet access.
11885 (delete-file "tests/test_regressions.py")
11886 (setenv "PYTHONPATH"
11887 (string-append (getcwd) "/build/lib:"
11888 (getenv "PYTHONPATH")))
11889 (zero? (system* "py.test" "-vv")))))))
11890 (native-inputs
11891 `(("python-pytest" ,python-pytest)
11892 ("python-redis" ,python-redis)
11893 ("python-webtest" ,python-webtest)
11894 ("python-mock" ,python-mock)))
11895 (propagated-inputs
11896 `(("python-requests" ,python-requests)
11897 ("python-lockfile" ,python-lockfile)))
11898 (home-page "https://github.com/ionrock/cachecontrol")
11899 (synopsis "The httplib2 caching algorithms for use with requests")
11900 (description "CacheControl is a port of the caching algorithms in
11901@code{httplib2} for use with @code{requests} session objects.")
f210e944 11902 (license license:asl2.0)))
b30565bd
MB
11903
11904(define-public python2-cachecontrol
f210e944 11905 (package-with-python2 python-cachecontrol))
243db824
DM
11906
11907(define-public python-lit
11908 (package
11909 (name "python-lit")
11910 (version "0.5.0")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "lit" version))
11915 (sha256
11916 (base32
11917 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11918 (build-system python-build-system)
11919 (home-page "http://llvm.org/")
11920 (synopsis "LLVM Software Testing Tool")
11921 (description "@code{lit} is a portable tool for executing LLVM and Clang
11922style test suites, summarizing their results, and providing indication of
11923failures.")
f210e944 11924 (license license:ncsa)))
243db824
DM
11925
11926(define-public python2-lit
f210e944 11927 (package-with-python2 python-lit))
66f95b20
MB
11928
11929(define-public python-pytest-pep8
11930 (package
11931 (name "python-pytest-pep8")
11932 (version "1.0.6")
11933 (source (origin
11934 (method url-fetch)
11935 (uri (pypi-uri "pytest-pep8" version))
11936 (sha256
11937 (base32
11938 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11939 (build-system python-build-system)
11940 (arguments
b41a05ce 11941 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11942 (native-inputs
11943 `(("python-pytest" ,python-pytest)))
11944 (propagated-inputs
11945 `(("python-pep8" ,python-pep8)))
11946 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11947 (synopsis "Py.test plugin to check PEP8 requirements")
11948 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11949 (license license:expat)))
66f95b20
MB
11950
11951(define-public python2-pytest-pep8
f210e944 11952 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11953
11954(define-public python-pytest-flakes
11955 (package
11956 (name "python-pytest-flakes")
11957 (version "1.0.1")
11958 (source (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "pytest-flakes" version))
11961 (sha256
11962 (base32
11963 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11964 (build-system python-build-system)
11965 (arguments
b41a05ce 11966 `(#:phases
df94a6b5
MB
11967 (modify-phases %standard-phases
11968 (delete 'check)
11969 (add-after 'install 'check
05c2fd36
HG
11970 (lambda* (#:key outputs inputs #:allow-other-keys)
11971 ;; It's easier to run tests after install.
11972 ;; Make installed package available for running the tests
11973 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11974 (zero? (system* "py.test" "-vv")))))))
11975 (native-inputs
11976 `(("python-coverage" ,python-coverage)
11977 ("python-pytest" ,python-pytest)
11978 ("python-pytest-cache" ,python-pytest-cache)
11979 ("python-pytest-pep8" ,python-pytest-pep8)))
11980 (propagated-inputs
11981 `(("python-pyflakes" ,python-pyflakes)))
11982 (home-page "https://github.com/fschulze/pytest-flakes")
11983 (synopsis "Py.test plugin to check source code with pyflakes")
11984 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11985 (license license:expat)))
df94a6b5
MB
11986
11987(define-public python2-pytest-flakes
f210e944 11988 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11989
11990(define-public python-natsort
11991 (package
11992 (name "python-natsort")
11993 (version "5.0.1")
11994 (source (origin
11995 (method url-fetch)
11996 (uri (pypi-uri "natsort" version))
11997 (sha256
11998 (base32
11999 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12000 (build-system python-build-system)
12001 (arguments
12002 `(#:phases
12003 (modify-phases %standard-phases
12004 (add-before 'check 'set-cachedir
12005 ;; Tests require write access to $HOME by default
12006 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12007 (native-inputs
12008 `(("python-hypothesis" ,python-hypothesis)
12009 ("python-pytest-cache" ,python-pytest-cache)
12010 ("python-pytest-cov" ,python-pytest-cov)
12011 ("python-pytest-flakes" ,python-pytest-flakes)
12012 ("python-pytest-pep8" ,python-pytest-pep8)))
12013 (propagated-inputs ; TODO: Add python-fastnumbers.
12014 `(("python-pyicu" ,python-pyicu)))
12015 (home-page "https://github.com/SethMMorton/natsort")
12016 (synopsis "Natural sorting for python and shell")
12017 (description
12018 "Natsort lets you apply natural sorting on lists instead of
12019lexicographical. If you use the built-in @code{sorted} method in python
12020on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12021returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12022function @code{natsorted} that identifies numbers and sorts them separately
12023from strings. It can also sort version numbers, real numbers, mixed types
12024and more, and comes with a shell command @command{natsort} that exposes this
12025functionality in the command line.")
12026 (license license:expat)
12027 (properties `((python2-variant . ,(delay python2-natsort))))))
12028
12029(define-public python2-natsort
12030 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12031 (package (inherit base)
12032 (native-inputs
00e10c6e 12033 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12034 ("python2-mock" ,python2-mock)
12035 ("python2-enum34" ,python2-enum34)
12036 ,@(package-native-inputs base))))))
4efb9c54
SR
12037
12038(define-public python-glances
12039 (package
12040 (name "python-glances")
12041 (version "2.7.1")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "Glances" version))
12046 (sha256
12047 (base32
12048 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12049 (build-system python-build-system)
f22efa01 12050 (propagated-inputs
4efb9c54
SR
12051 `(("python-psutil" ,python-psutil)))
12052 (home-page
12053 "https://github.com/nicolargo/glances")
12054 (synopsis
12055 "A cross-platform curses-based monitoring tool")
12056 (description
12057 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12058Glances uses the PsUtil library to get information from your system. It monitors
12059CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12060 (license license:lgpl3+)))
4efb9c54
SR
12061
12062(define-public python2-glances
f210e944 12063 (package-with-python2 python-glances))
05b7a593
EF
12064
12065(define-public python-graphql-core
12066 (package
12067 (name "python-graphql-core")
12068 (version "0.5.3")
12069 (source
12070 (origin
12071 (method url-fetch)
12072 (uri (pypi-uri "graphql-core" version))
12073 (sha256
12074 (base32
12075 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12076 (build-system python-build-system)
12077 (arguments
326f8285
LF
12078 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12079 #:phases
05b7a593
EF
12080 (modify-phases %standard-phases
12081 (add-after 'unpack 'patch-hardcoded-version
12082 (lambda _ (substitute*
12083 "setup.py"
12084 (("'gevent==1.1rc1'") "'gevent'"))
12085 #t)))))
12086 (native-inputs
12087 `(("python-gevent" ,python-gevent)
12088 ("python-mock" ,python-mock)
12089 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12090 (propagated-inputs
05b7a593
EF
12091 `(("python-promise" ,python-promise)
12092 ("python-six" ,python-six)))
12093 (home-page "https://github.com/graphql-python/graphql-core")
12094 (synopsis "GraphQL implementation for Python")
12095 (description
12096 "GraphQL implementation for Python. GraphQL is a data query language and
12097runtime designed and used to request and deliver data to mobile and web apps.
12098This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12099to Python.")
05b7a593
EF
12100 (license license:expat)))
12101
12102(define-public python2-graphql-core
f210e944 12103 (package-with-python2 python-graphql-core))
7ee51575
EF
12104
12105(define-public python-graphql-relay
12106 (package
12107 (name "python-graphql-relay")
b13a5b4d 12108 (version "0.4.5")
7ee51575
EF
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (pypi-uri "graphql-relay" version))
12113 (sha256
12114 (base32
b13a5b4d 12115 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12116 (build-system python-build-system)
12117 (native-inputs
12118 `(("python-pytest" ,python-pytest)))
f22efa01 12119 (propagated-inputs
7ee51575
EF
12120 `(("python-graphql-core" ,python-graphql-core)
12121 ("python-promise" ,python-promise)
12122 ("python-six" ,python-six)))
12123 (home-page "https://github.com/graphql-python/graphql-relay-py")
12124 (synopsis "Relay implementation for Python")
12125 (description
12126 "This is a library to allow the easy creation of Relay-compliant servers
12127using the GraphQL Python reference implementation of a GraphQL server. It
12128should be noted that the code is a exact port of the original
12129@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12130from Facebook.")
7ee51575
EF
12131 (license license:expat)))
12132
12133(define-public python2-graphql-relay
f210e944 12134 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12135
12136(define-public python-graphene
12137 (package
12138 (name "python-graphene")
12139 (version "0.10.2")
12140 (source
12141 (origin
12142 (method url-fetch)
12143 (uri (pypi-uri "graphene" version))
12144 (sha256
12145 (base32
12146 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12147 (build-system python-build-system)
12148 (native-inputs
12149 `(("python-django-filter" ,python-django-filter)
12150 ("python-mock" ,python-mock)
12151 ("python-psycopg2" ,python-psycopg2)
12152 ("python-pytest-django" ,python-pytest-django)
12153 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12154 (propagated-inputs
ddc63a56
EF
12155 `(("python-graphql-core" ,python-graphql-core)
12156 ("python-graphql-relay" ,python-graphql-relay)
12157 ("python-iso8601" ,python-iso8601)
12158 ("python-promise" ,python-promise)
12159 ("python-six" ,python-six)))
12160 (home-page "http://graphene-python.org/")
12161 (synopsis "GraphQL Framework for Python")
12162 (description
12163 "Graphene is a Python library for building GraphQL schemas/types.
12164A GraphQL schema describes your data model, and provides a GraphQL server
12165with an associated set of resolve methods that know how to fetch data.")
12166 (properties `((python2-variant . ,(delay python2-graphene))))
12167 (license license:expat)))
12168
12169(define-public python2-graphene
12170 (let ((base (package-with-python2
12171 (strip-python2-variant python-graphene))))
12172 (package (inherit base)
12173 (native-inputs
00e10c6e 12174 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12175 ,@(package-native-inputs base))))))
d488d5d6
EF
12176
12177(define-public python-nautilus
12178 (package
12179 (name "python-nautilus")
12180 (version "0.4.9")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "nautilus" version))
12185 (sha256
12186 (base32
12187 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12188 (build-system python-build-system)
12189 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12190 (propagated-inputs
d488d5d6
EF
12191 `(("python-bcrypt" ,python-bcrypt)
12192 ("python-click" ,python-click)
12193 ("python-consul" ,python-consul)
d488d5d6
EF
12194 ("python-graphene" ,python-graphene)
12195 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12196 ("python-peewee" ,python-peewee)
12197 ("python-pika" ,python-pika)
d488d5d6
EF
12198 ("python-tornado" ,python-tornado)
12199 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12200 (native-inputs
12201 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12202 (home-page "https://github.com/AlecAivazis/nautilus")
12203 (synopsis "Library for creating microservice applications")
12204 (description
12205 "Nautilus is a framework for flux based microservices that looks to
12206provide extendible implementations of common aspects of a cloud so that you can
12207focus on building massively scalable web applications.")
12208 (license license:expat)))
94cffc63 12209
89cd988b
DM
12210(define-public python-snowballstemmer
12211 (package
12212 (name "python-snowballstemmer")
12213 (version "1.2.1")
12214 (source (origin
1bd858cc
MB
12215 (method url-fetch)
12216 (uri (pypi-uri "snowballstemmer" version))
12217 (sha256
12218 (base32
12219 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12220 (build-system python-build-system)
12221 (arguments
12222 `(;; No tests exist
12223 #:tests? #f))
12224 (home-page "https://github.com/shibukawa/snowball_py")
12225 (synopsis "Snowball stemming library collection for Python")
12226 (description "This package provides 16 word stemmer algorithms generated
12227from Snowball algorithms. It includes the 15 original ones plus the Poerter
12228English stemmer.")
12229 (license license:bsd-3)))
12230
12231(define-public python2-snowballstemmer
12232 (package-with-python2 python-snowballstemmer))
12233
754bfd70
DM
12234(define-public python-sphinx-cloud-sptheme
12235 (package
12236 (name "python-sphinx-cloud-sptheme")
12237 (version "1.7.1")
12238 (source (origin
1bd858cc
MB
12239 (method url-fetch)
12240 (uri (pypi-uri "cloud_sptheme" version))
12241 (sha256
12242 (base32
12243 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12244 (build-system python-build-system)
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)))