gnu: tinyproxy: Update source URL.
[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>
da6dd842 3;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
03411993 4;;; Copyright © 2013, 2014, 2015 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>
ad320b20 10;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
f4de5b3b 11;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2fc5f186 13;;; Copyright © 2015 David Thompson <davet@gnu.org>
89b2e0b0 14;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
f7d17ac7 16;;; Copyright © 2015 Erik Edrosa <erik.edrosa@gmail.com>
383af6b0 17;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
03f964a5 19;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
a01b6da7
NK
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
1ffa7090 36(define-module (gnu packages python)
011b18c3 37 #:use-module ((guix licenses)
45203542 38 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
b8050e71 39 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
cd6e5189 40 isc psfl public-domain x11-style zpl2.1))
bd3fa666 41 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 42 #:use-module (gnu packages)
89b2e0b0 43 #:use-module (gnu packages attr)
d96034ed 44 #:use-module (gnu packages backup)
1ffa7090 45 #:use-module (gnu packages compression)
4ed20663 46 #:use-module (gnu packages databases)
5e1c9367 47 #:use-module (gnu packages file)
4ed20663 48 #:use-module (gnu packages fontutils)
4ed20663
AE
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages ghostscript)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gtk)
421a80a2 53 #:use-module (gnu packages icu4c)
c937562e 54 #:use-module (gnu packages image)
4ed20663 55 #:use-module (gnu packages imagemagick)
b10ab723 56 #:use-module (gnu packages libffi)
89b2e0b0 57 #:use-module (gnu packages linux)
0da98533 58 #:use-module (gnu packages maths)
4ed20663 59 #:use-module (gnu packages multiprecision)
45203542 60 #:use-module (gnu packages networking)
be7134bf 61 #:use-module (gnu packages ncurses)
c9b1b4f9 62 #:use-module (gnu packages pcre)
4ed20663 63 #:use-module (gnu packages perl)
b10ab723 64 #:use-module (gnu packages pkg-config)
4ed20663 65 #:use-module (gnu packages readline)
c9b1b4f9 66 #:use-module (gnu packages statistics)
1c65314c
FB
67 #:use-module (gnu packages texlive)
68 #:use-module (gnu packages texinfo)
cc2b77df 69 #:use-module (gnu packages tls)
8d12be1e 70 #:use-module (gnu packages web)
ce0614dd 71 #:use-module (gnu packages base)
26b307e2 72 #:use-module (gnu packages xml)
6fa14469 73 #:use-module (gnu packages xorg)
4ed20663 74 #:use-module (gnu packages zip)
afa181ff 75 #:use-module (gnu packages tcl)
a01b6da7
NK
76 #:use-module (guix packages)
77 #:use-module (guix download)
ea5456c8 78 #:use-module (guix git-download)
11bb85a1 79 #:use-module (guix utils)
acc26ff1 80 #:use-module (guix build-system gnu)
d8c4998f 81 #:use-module (guix build-system cmake)
898238b9 82 #:use-module (guix build-system python)
1c65314c
FB
83 #:use-module (guix build-system trivial)
84 #:use-module (srfi srfi-1))
a01b6da7 85
b24d1cfc 86(define-public python-2
a01b6da7
NK
87 (package
88 (name "python")
ff6f33cf 89 (version "2.7.10")
a01b6da7
NK
90 (source
91 (origin
92 (method url-fetch)
9b43a0ff 93 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
94 version "/Python-" version ".tar.xz"))
95 (sha256
96 (base32
6a20289d 97 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
dedc8320
LC
98 (patches (map search-patch
99 '("python-2.7-search-paths.patch"
9820a6d4 100 "python-2-deterministic-build-info.patch"
dedc8320 101 "python-2.7-source-date-epoch.patch")))))
02f0c3b2
LC
102 (outputs '("out"
103 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 104 (build-system gnu-build-system)
3fdc99da 105 (arguments
af807dea 106 `(#:tests? #f
ff6f33cf
ED
107 ;; 268 tests OK.
108 ;; 103 tests failed:
109 ;; test_distutils test_shutil test_signal test_site test_slice
110 ;; test_smtplib test_smtpnet test_socket test_socketserver
111 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
112 ;; test_startfile test_stat test_str test_strftime test_string
113 ;; test_stringprep test_strop test_strptime test_strtod test_struct
114 ;; test_structmembers test_structseq test_subprocess test_sunau
115 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
116 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
117 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
118 ;; test_threaded_import test_threadedtempfile test_threading
119 ;; test_threading_local test_threadsignals test_time test_timeit
120 ;; test_timeout test_tk test_tokenize test_tools test_trace
121 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
122 ;; test_tuple test_typechecks test_ucn test_unary
123 ;; test_undocumented_details test_unicode test_unicode_file
124 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
125 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
126 ;; test_urllibnet test_urlparse test_userdict test_userlist
127 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
128 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
129 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
130 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
131 ;; test_xpickle test_xrange test_zipfile test_zipfile64
132 ;; test_zipimport test_zipimport_support test_zlib
133 ;; 30 tests skipped:
134 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
135 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
136 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
137 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
138 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
139 ;; test_macostools test_msilib test_nis test_ossaudiodev
140 ;; test_scriptpackages
141 ;; 6 skips unexpected on linux2:
142 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
143 ;; One of the typical errors:
144 ;; test_unicode
145 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
146 ;; such file or directory
af807dea 147 #:test-target "test"
3fdc99da 148 #:configure-flags
6a20289d
LC
149 (list "--enable-shared" ;allow embedding
150 "--with-system-ffi" ;build ctypes
151 (string-append "LDFLAGS=-Wl,-rpath="
152 (assoc-ref %outputs "out") "/lib"))
fd982732 153
d2cc9c7c
LC
154 #:modules ((ice-9 ftw) (ice-9 match)
155 (guix build utils) (guix build gnu-build-system))
fd982732 156 #:phases
46472ecd
MW
157 (modify-phases %standard-phases
158 (add-before
159 'configure 'patch-lib-shells
160 (lambda _
161 ;; Filter for existing files, since some may not exist in all
162 ;; versions of python that are built with this recipe.
163 (substitute* (filter file-exists?
164 '("Lib/subprocess.py"
165 "Lib/popen2.py"
166 "Lib/distutils/tests/test_spawn.py"
167 "Lib/test/test_subprocess.py"))
168 (("/bin/sh") (which "sh")))
dedc8320
LC
169
170 ;; Use zero as the timestamp in .pyc files so that builds are
171 ;; deterministic. TODO: Remove it when this variable is set in
172 ;; gnu-build-system.scm.
a665996f 173 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 174 #t))
5b4e2791
LC
175 (add-before 'configure 'do-not-record-configure-flags
176 (lambda* (#:key configure-flags #:allow-other-keys)
177 ;; Remove configure flags from the installed '_sysconfigdata.py'
178 ;; and 'Makefile' so we don't end up keeping references to the
179 ;; build tools.
180 ;;
181 ;; Preserve at least '--with-system-ffi' since otherwise the
182 ;; thing tries to build libffi, fails, and we end up with a
183 ;; Python that lacks ctypes.
184 (substitute* "configure"
185 (("^CONFIG_ARGS=.*$")
186 (format #f "CONFIG_ARGS='~a'\n"
187 (if (member "--with-system-ffi" configure-flags)
188 "--with-system-ffi"
189 ""))))
190 #t))
46472ecd
MW
191 (add-before
192 'check 'pre-check
193 (lambda _
194 ;; 'Lib/test/test_site.py' needs a valid $HOME
195 (setenv "HOME" (getcwd))
196 #t))
197 (add-after
198 'unpack 'set-source-file-times-to-1980
199 ;; XXX One of the tests uses a ZIP library to pack up some of the
200 ;; source tree, and fails with "ZIP does not support timestamps
201 ;; before 1980". Work around this by setting the file times in the
202 ;; source tree to sometime in early 1980.
203 (lambda _
204 (let ((circa-1980 (* 10 366 24 60 60)))
205 (ftw "." (lambda (file stat flag)
206 (utime file circa-1980 circa-1980)
207 #t))
02f0c3b2
LC
208 #t)))
209 (add-after 'install 'move-tk-inter
210 (lambda* (#:key outputs #:allow-other-keys)
211 ;; When Tkinter support is built move it to a separate output so
212 ;; that the main output doesn't contain a reference to Tcl/Tk.
213 (let ((out (assoc-ref outputs "out"))
214 (tk (assoc-ref outputs "tk")))
215 (when tk
216 (match (find-files out "tkinter.*\\.so")
217 ((tkinter.so)
218 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
219 ;; want it under TK/lib/pythonX.Y/site-packages.
220 (let* ((len (string-length out))
221 (target (string-append
222 tk "/"
223 (string-drop
224 (dirname (dirname tkinter.so))
225 len)
226 "/site-packages")))
227 (install-file tkinter.so target)
228 (delete-file tkinter.so)))))
229 #t))))))
a01b6da7 230 (inputs
3fdc99da
CR
231 `(("bzip2" ,bzip2)
232 ("gdbm" ,gdbm)
b10ab723 233 ("libffi" ,libffi) ; for ctypes
b88e1b0a 234 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 235 ("openssl" ,openssl)
3fdc99da 236 ("readline" ,readline)
afa181ff
LC
237 ("zlib" ,zlib)
238 ("tcl" ,tcl)
239 ("tk" ,tk))) ; for tkinter
b10ab723
CR
240 (native-inputs
241 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
242 (native-search-paths
243 (list (search-path-specification
244 (variable "PYTHONPATH")
af070955 245 (files '("lib/python2.7/site-packages")))))
a01b6da7 246 (home-page "http://python.org")
afa181ff 247 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
248 (description
249 "Python is a remarkably powerful dynamic programming language that
250is used in a wide variety of application domains. Some of its key
251distinguishing features include: clear, readable syntax; strong
252introspection capabilities; intuitive object orientation; natural
253expression of procedural code; full modularity, supporting hierarchical
254packages; exception-based error handling; and very high level dynamic
255data types.")
256 (license psfl)))
acc26ff1 257
b24d1cfc
AE
258(define-public python
259 (package (inherit python-2)
08c04509 260 (version "3.4.3")
717003e3
LC
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "https://www.python.org/ftp/python/"
264 version "/Python-" version ".tar.xz"))
6a20289d
LC
265 (patches (map search-patch
266 '("python-fix-tests.patch"
267 ;; XXX Try removing this patch for python > 3.4.3
268 "python-disable-ssl-test.patch"
9820a6d4 269 "python-3-deterministic-build-info.patch"
6a20289d 270 "python-3-search-paths.patch")))
717003e3
LC
271 (patch-flags '("-p0"))
272 (sha256
273 (base32
08c04509 274 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
275 (arguments (substitute-keyword-arguments (package-arguments python-2)
276 ((#:tests? _) #t)))
1aebc0cb
AE
277 (native-search-paths
278 (list (search-path-specification
279 (variable "PYTHONPATH")
0e05d01e
SB
280 (files (list (string-append "lib/python"
281 (version-major+minor version)
282 "/site-packages"))))))))
f26a77ff 283
95288fcc
LC
284;; Minimal variants of Python, mostly used to break the cycle between Tk and
285;; Python (Tk -> libxcb -> Python.)
286
287(define-public python2-minimal
288 (package (inherit python-2)
289 (name "python-minimal")
02f0c3b2 290 (outputs '("out"))
95288fcc
LC
291 (arguments
292 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
293 ((#:configure-flags cf)
294 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
295 (inputs '()))) ;none of the optional dependencies
296
297(define-public python-minimal
898238b9 298 (package (inherit python)
95288fcc 299 (name "python-minimal")
02f0c3b2 300 (outputs '("out"))
95288fcc
LC
301 (arguments
302 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
303 ((#:configure-flags cf)
304 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
305
306 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
307 ;; zlib is required by 'zipimport', used by pip.
308 (inputs `(("openssl" ,openssl)
309 ("zlib" ,zlib)))))
310
311(define* (wrap-python3 python #:optional (name "python-wrapper"))
898238b9 312 (package (inherit python)
95288fcc 313 (name name)
898238b9
AE
314 (source #f)
315 (build-system trivial-build-system)
02f0c3b2 316 (outputs '("out"))
3c0f2329 317 (propagated-inputs `(("python" ,python)))
898238b9
AE
318 (arguments
319 `(#:modules ((guix build utils))
320 #:builder
321 (begin
322 (use-modules (guix build utils))
323 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
324 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
325 (mkdir-p bin)
326 (for-each
327 (lambda (old new)
328 (symlink (string-append python old)
329 (string-append bin "/" new)))
330 `("python3", "pydoc3", "idle3")
331 `("python", "pydoc", "idle"))))))
0d56e3e1
LC
332 (synopsis "Wrapper for the Python 3 commands")
333 (description
334 "This package provides wrappers for the commands of Python@tie{}3.x such
335that they can be invoked under their usual name---e.g., @command{python}
336instead of @command{python3}.")))
337
95288fcc
LC
338(define-public python-wrapper (wrap-python3 python))
339(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 340
aaf625b8
RW
341(define-public python-psutil
342 (package
343 (name "python-psutil")
344 (version "3.0.1")
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append
349 "https://pypi.python.org/packages/source/p/psutil/psutil-"
350 version ".tar.gz"))
351 (sha256
352 (base32
353 "00c8h1mzqysih99z8pnbmdv117d2naldf11yjy50dhykxsf3n89z"))))
354 (build-system python-build-system)
355 (native-inputs
356 `(("python-setuptools" ,python-setuptools)))
357 (home-page "https://pypi.python.org/pypi/psutil/")
358 (synopsis "Library for retrieving information on running processes")
359 (description
360 "psutil (Python system and process utilities) is a library for retrieving
361information on running processes and system utilization (CPU, memory, disks,
362network) in Python. It is useful mainly for system monitoring, profiling and
363limiting process resources and management of running processes. It implements
364many functionalities offered by command line tools such as: ps, top, lsof,
365netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
366pidof, tty, taskset, pmap.")
367 (license bsd-3)))
368
369(define-public python2-psutil
370 (package-with-python2 python-psutil))
898238b9 371
f9da1d8a
ED
372(define-public python-passlib
373 (package
374 (name "python-passlib")
375 (version "1.6.2")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (string-append
380 "https://pypi.python.org/packages/source/p/passlib/passlib-"
381 version
382 ".tar.gz"))
383 (sha256
384 (base32
385 "0b9rd161b3mmiwd7nx1v599yh9sp07mlfwac65sjy9qn1l0gd1z9"))))
386 (build-system python-build-system)
387 (native-inputs
388 `(("python-nose" ,python-nose)
389 ("python-setuptools" ,python-setuptools)))
390 (inputs
391 `(("python-py-bcrypt" ,python-py-bcrypt)))
392 (arguments
393 `(#:phases
394 (alist-cons-before
395 'check 'set-PYTHON_EGG_CACHE
396 ;; some tests require access to "$HOME/.cython"
397 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
398 %standard-phases)))
399 (home-page "https://bitbucket.org/ecollins/passlib")
400 (synopsis
401 "Comprehensive password hashing framework")
402 (description
403 "Passlib is a password hashing library for Python 2 & 3, which provides
404cross-platform implementations of over 30 password hashing algorithms, as well
405as a framework for managing existing password hashes. It's designed to be
406useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
407to providing full-strength password hashing for multi-user application.")
408 (license bsd-3)))
409
410(define-public python2-passlib
411 (package-with-python2 python-passlib))
412
feb0d9c3
ED
413(define-public python-py-bcrypt
414 (package
415 (name "python-py-bcrypt")
416 (version "0.4")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (string-append
421 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
422 version
423 ".tar.gz"))
424 (sha256
425 (base32
426 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
427 (build-system python-build-system)
428 (native-inputs
429 `(("python-setuptools" ,python-setuptools)))
430 (home-page "https://code.google.com/p/py-bcrypt")
431 (synopsis
432 "Bcrypt password hashing and key derivation")
433 (description
434 "A python wrapper of OpenBSD's Blowfish password hashing code. This
435system hashes passwords using a version of Bruce Schneier's Blowfish block
436cipher with modifications designed to raise the cost of off-line password
437cracking and frustrate fast hardware implementation. The computation cost of
438the algorithm is parametised, so it can be increased as computers get faster.
439The intent is to make a compromise of a password database less likely to
440result in an attacker gaining knowledge of the plaintext passwords (e.g. using
441John the Ripper).")
442 ;; "sha2.c" is under BSD-3;
443 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
444 ;; the rest is under ISC.
445 (license (list isc bsd-3 bsd-4))))
446
447(define-public python2-py-bcrypt
448 (package-with-python2 python-py-bcrypt))
449
450
429fdea1
ED
451(define-public python-paramiko
452 (package
453 (name "python-paramiko")
454 (version "1.15.2")
455 (source
456 (origin
457 (method url-fetch)
458 (uri (string-append
459 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
460 version
461 ".tar.gz"))
462 (sha256
463 (base32
464 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
465 (build-system python-build-system)
466 (native-inputs
467 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
468 (propagated-inputs
469 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 470 (inputs
a3fc12da 471 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
472 (home-page "http://www.paramiko.org/")
473 (synopsis "SSHv2 protocol library")
474 (description "Paramiko is a python implementation of the SSHv2 protocol,
475providing both client and server functionality. While it leverages a Python C
476extension for low level cryptography (PyCrypto), Paramiko itself is a pure
477Python interface around SSH networking concepts.")
478 (license lgpl2.1+)))
479
480(define-public python2-paramiko
481 (package-with-python2 python-paramiko))
482
483
de73dbf6
ED
484(define-public python-httplib2
485 (package
486 (name "python-httplib2")
487 (version "0.9.1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (string-append
492 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
493 version
494 ".tar.gz"))
495 (sha256
496 (base32
497 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
498 (build-system python-build-system)
499 (native-inputs
500 `(("python-setuptools" ,python-setuptools)))
501 (home-page
502 "https://github.com/jcgregorio/httplib2")
503 (synopsis "Comprehensive HTTP client library")
504 (description
505 "A comprehensive HTTP client library supporting many features left out of
506other HTTP libraries.")
507 (license license:expat)))
508
509(define-public python2-httplib2
510 (package-with-python2 python-httplib2))
511
67039875
ED
512(define-public python-ecdsa
513 (package
514 (name "python-ecdsa")
515 (version "0.13")
516 (source
517 (origin
518 (method url-fetch)
519 (uri (string-append
520 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
521 version
522 ".tar.gz"))
523 (sha256
524 (base32
525 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
526 (build-system python-build-system)
527 (native-inputs
528 `(("python-setuptools" ,python-setuptools)))
529 (inputs
530 `(("openssl" ,openssl)))
531 (home-page
532 "http://github.com/warner/python-ecdsa")
533 (synopsis
534 "ECDSA cryptographic signature library (pure python)")
535 (description
536 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
537Curve Digital Signature Algorithm), implemented purely in Python. With this
538library, you can quickly create keypairs (signing key and verifying key), sign
539messages, and verify the signatures. The keys and signatures are very short,
540making them easy to handle and incorporate into other protocols.")
541 (license license:expat)))
542
543(define-public python2-ecdsa
544 (package-with-python2 python-ecdsa))
545
52323f32
ED
546(define-public python-ccm
547 (package
548 (name "python-ccm")
549 (version "2.0.4.1")
550 (source
551 (origin
552 (method url-fetch)
553 (uri (string-append
554 "https://pypi.python.org/packages/source/c/ccm/ccm-"
555 version
556 ".tar.gz"))
557 (sha256
558 (base32
559 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
560 (build-system python-build-system)
561 (native-inputs
562 `(("python-setuptools" ,python-setuptools)))
563 (inputs
564 `(("python-pyyaml" ,python-pyyaml)
565 ("python-six" ,python-six)))
566 (home-page "https://github.com/pcmanus/ccm")
567 (synopsis "Cassandra Cluster Manager")
568 (description "A script/library to create, launch and remove an Apache
569Cassandra cluster on localhost.")
570 (license asl2.0)))
571
572(define-public python2-ccm
573 (package-with-python2 python-ccm))
574
89114f39 575(define-public python-pytz
acc26ff1 576 (package
89114f39 577 (name "python-pytz")
b01bbbcf 578 (version "2015.7")
acc26ff1
CR
579 (source
580 (origin
581 (method url-fetch)
b01bbbcf 582 (uri (pypi-uri "pytz" version))
acc26ff1
CR
583 (sha256
584 (base32
b01bbbcf 585 "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
acc26ff1 586 (build-system python-build-system)
8498b8cf 587 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 588 (home-page "http://pythonhosted.org/pytz")
9e771e3b 589 (synopsis "Python timezone library")
acc26ff1
CR
590 (description
591 "This library allows accurate and cross platform timezone calculations
592using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 593 (license license:expat)))
5ace6e2f 594
89114f39 595(define-public python2-pytz
11bb85a1 596 (package-with-python2 python-pytz))
89114f39 597
fc50e9c6 598
89114f39 599(define-public python-babel
5ace6e2f 600 (package
89114f39 601 (name "python-babel")
b850a6d8 602 (version "2.1.1")
5ace6e2f
CR
603 (source
604 (origin
605 (method url-fetch)
b850a6d8 606 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
607 (sha256
608 (base32
b850a6d8 609 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
5ace6e2f
CR
610 (build-system python-build-system)
611 (inputs
e1804763
AE
612 `(("python-pytz" ,python-pytz)
613 ("python-setuptools" ,python-setuptools)))
8498b8cf 614 (arguments `(#:tests? #f)) ; no test target
e1804763 615 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
616 (synopsis
617 "Tools for internationalizing Python applications")
618 (description
619 "Babel is composed of two major parts:
620- tools to build and work with gettext message catalogs
621- a Python interface to the CLDR (Common Locale Data Repository), providing
622access to various locale display names, localized number and date formatting,
623etc. ")
624 (license bsd-3)))
89114f39
AE
625
626(define-public python2-babel
11bb85a1 627 (package-with-python2 python-babel))
73adf220 628
ed377cc6
RW
629(define-public python2-backport-ssl-match-hostname
630 (package
631 (name "python2-backport-ssl-match-hostname")
632 (version "3.4.0.2")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (string-append
637 "https://pypi.python.org/packages/source/b/"
638 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
639 version ".tar.gz"))
640 (sha256
641 (base32
642 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
643 (build-system python-build-system)
644 (arguments `(#:python ,python-2))
645 (inputs
646 `(("python2-setuptools" ,python2-setuptools)))
647 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
648 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
649 (description
650 "This backport brings the ssl.match_hostname() function to users of
651earlier versions of Python. The function checks the hostname in the
652certificate returned by the server to which a connection has been established,
653and verifies that it matches the intended target hostname.")
654 (license psfl)))
655
ef5cbf9b
RW
656(define-public python-h5py
657 (package
658 (name "python-h5py")
659 (version "2.4.0")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
664 version ".tar.gz"))
665 (sha256
666 (base32
667 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
668 (build-system python-build-system)
797e1401
RW
669 (arguments
670 `(#:tests? #f ; no test target
671 #:phases
672 (modify-phases %standard-phases
673 (add-after 'unpack 'fix-hdf5-paths
674 (lambda* (#:key inputs #:allow-other-keys)
675 (let ((prefix (assoc-ref inputs "hdf5")))
676 (substitute* "setup_build.py"
677 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
678 (string-append "['" prefix "/lib" "']"))
679 (("'/opt/local/include', '/usr/local/include'")
680 (string-append "'" prefix "/include" "'")))
681 (substitute* "setup_configure.py"
682 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
683 (string-append "['" prefix "/lib" "']")))
684 #t))))))
3c4010b1
RW
685 (propagated-inputs
686 `(("python-numpy" ,python-numpy)))
ef5cbf9b 687 (inputs
3c4010b1 688 `(("hdf5" ,hdf5)))
ef5cbf9b 689 (native-inputs
3c4010b1 690 `(("python-cython" ,python-cython)))
ef5cbf9b
RW
691 (home-page "http://www.h5py.org/")
692 (synopsis "Read and write HDF5 files from Python")
693 (description
694 "The h5py package provides both a high- and low-level interface to the
695HDF5 library from Python. The low-level interface is intended to be a
696complete wrapping of the HDF5 API, while the high-level component supports
697access to HDF5 files, datasets and groups using established Python and NumPy
698concepts.")
699 (license bsd-3)))
700
701(define-public python2-h5py
702 (let ((h5py (package-with-python2 python-h5py)))
703 (package (inherit h5py)
3c4010b1 704 (propagated-inputs
ef5cbf9b
RW
705 `(("python2-numpy" ,python2-numpy)
706 ,@(alist-delete
707 "python-numpy"
3c4010b1 708 (package-propagated-inputs h5py)))))))
ef5cbf9b 709
c1448c69
EB
710(define-public python-lockfile
711 (package
712 (name "python-lockfile")
713 (version "0.9.1")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
718 "lockfile-" version ".tar.gz"))
719 (sha256
720 (base32
721 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
722 (build-system python-build-system)
723 (arguments '(#:test-target "check"))
724 (home-page "http://code.google.com/p/pylockfile/")
725 (synopsis "Platform-independent file locking module")
726 (description
727 "The lockfile package exports a LockFile class which provides a simple
728API for locking files.")
bd3fa666 729 (license license:expat)))
c1448c69
EB
730
731(define-public python2-lockfile
732 (package-with-python2 python-lockfile))
733
5a1a4bf6
EB
734(define-public python-mock
735 (package
736 (name "python-mock")
737 (version "1.0.1")
738 (source
739 (origin
740 (method url-fetch)
741 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
742 "mock-" version ".tar.gz"))
743 (sha256
744 (base32
745 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
746 (build-system python-build-system)
747 (arguments '(#:test-target "check"))
07af3e5e 748 (home-page "http://code.google.com/p/mock/")
9e771e3b 749 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
750 (description
751 "Mock is a library for testing in Python. It allows you to replace parts
752of your system under test with mock objects and make assertions about how they
753have been used.")
bd3fa666 754 (license license:expat)))
5a1a4bf6
EB
755
756(define-public python2-mock
757 (package-with-python2 python-mock))
758
fc50e9c6 759
73adf220
AE
760(define-public python-setuptools
761 (package
762 (name "python-setuptools")
62a9a23b 763 (version "18.3.1")
73adf220
AE
764 (source
765 (origin
766 (method url-fetch)
767 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
768 version ".tar.gz"))
769 (sha256
770 (base32
62a9a23b 771 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 772 (build-system python-build-system)
d3d656c5
AE
773 ;; FIXME: Tests require pytest, which itself relies on setuptools.
774 ;; One could bootstrap with an internal untested setuptools.
73adf220 775 (arguments
824af8ca 776 `(#:tests? #f))
73adf220
AE
777 (home-page "https://pypi.python.org/pypi/setuptools")
778 (synopsis
779 "Library designed to facilitate packaging Python projects")
780 (description
781 "Setuptools is a fully-featured, stable library designed to facilitate
782packaging Python projects, where packaging includes:
783Python package and module definitions,
784distribution package metadata,
785test hooks,
786project installation,
787platform-specific details,
788Python 3 support.")
789 (license psfl)))
790
791(define-public python2-setuptools
792 (package-with-python2 python-setuptools))
fc50e9c6
AE
793
794
cafc3f5a
EB
795(define-public python-pycrypto
796 (package
797 (name "python-pycrypto")
798 (version "2.6.1")
799 (source
800 (origin
801 (method url-fetch)
802 (uri (string-append "https://pypi.python.org/packages/source/p/"
803 "pycrypto/pycrypto-" version ".tar.gz"))
804 (sha256
805 (base32
806 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
807 (build-system python-build-system)
808 (native-inputs
809 `(("python-setuptools" ,python-setuptools)))
810 (inputs
811 `(("python" ,python)
812 ("gmp" ,gmp)))
813 (arguments
814 `(#:phases
815 (alist-cons-before
816 'build 'set-build-env
817 ;; pycrypto runs an autoconf configure script behind the scenes
818 (lambda _
819 (setenv "CONFIG_SHELL" (which "bash")))
820 %standard-phases)))
821 (home-page "http://www.pycrypto.org/")
822 (synopsis "Cryptographic modules for Python")
823 (description
824 "Pycrypto is a collection of both secure hash functions (such as SHA256
825and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 826etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
827 (license public-domain)))
828
345f0611 829(define-public python2-pycrypto
1c0059da
EF
830 (let ((pycrypto (package-with-python2 python-pycrypto)))
831 (package (inherit pycrypto)
832 (inputs
833 `(("python" ,python-2)
834 ,@(alist-delete
835 "python"
836 (package-inputs pycrypto)))))))
345f0611 837
cafc3f5a
EB
838(define-public python-keyring
839 (package
840 (name "python-keyring")
664e6c3a 841 (version "5.7.1")
cafc3f5a
EB
842 (source
843 (origin
844 (method url-fetch)
664e6c3a 845 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
846 (sha256
847 (base32
664e6c3a 848 "1h7a1r9ick7wdd0xb5p63413nvjadna2xawrsvmklsl5ddhm5wrx"))))
cafc3f5a
EB
849 (build-system python-build-system)
850 (native-inputs
664e6c3a
EF
851 `(("python-setuptools" ,python-setuptools)
852 ("python-setuptools-scm" ,python-setuptools-scm)
cafc3f5a
EB
853 ("python-mock" ,python-mock)))
854 (inputs
855 `(("python-pycrypto" ,python-pycrypto)))
856 (arguments
664e6c3a 857 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
858 (home-page "http://bitbucket.org/kang/python-keyring-lib")
859 (synopsis "Store and access your passwords safely")
860 (description
861 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 862service from python. It can be used in any application that needs safe
cafc3f5a
EB
863password storage.")
864 ;; "MIT" and PSF dual license
865 (license x11)))
866
d7af1069 867(define-public python2-keyring
44e30a76
EF
868 (let ((keyring (package-with-python2 python-keyring)))
869 (package (inherit keyring)
870 (inputs
871 `(("python2-pycrypto" ,python2-pycrypto))))))
d7af1069 872
a480bc41
EB
873(define-public python-six
874 (package
875 (name "python-six")
b6ab89ef 876 (version "1.10.0")
a480bc41
EB
877 (source
878 (origin
879 (method url-fetch)
b6ab89ef 880 (uri (pypi-uri "six" version))
a480bc41
EB
881 (sha256
882 (base32
b6ab89ef 883 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
884 (build-system python-build-system)
885 (inputs
886 `(("python-setuptools" ,python-setuptools)))
887 (home-page "http://pypi.python.org/pypi/six/")
888 (synopsis "Python 2 and 3 compatibility utilities")
889 (description
35b9e423 890 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
891functions for smoothing over the differences between the Python versions with
892the goal of writing Python code that is compatible on both Python versions.
35b9e423 893Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
894Python file, so it can be easily copied into your project.")
895 (license x11)))
896
0c20025c
AE
897(define-public python2-six
898 (package-with-python2 python-six))
899
cafc3f5a
EB
900(define-public python-dateutil-2
901 (package
902 (name "python-dateutil")
903 (version "2.2")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (string-append "https://pypi.python.org/packages/source/p/"
908 name "/" name "-" version ".tar.gz"))
909 (sha256
910 (base32
911 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
912 (build-system python-build-system)
913 (inputs
914 `(("python-setuptools" ,python-setuptools)
915 ("python-six" ,python-six)))
916 (home-page "http://labix.org/python-dateutil")
917 (synopsis "Extensions to the standard datetime module")
918 (description
919 "The dateutil module provides powerful extensions to the standard
920datetime module, available in Python 2.3+.")
921 (license bsd-3)))
922
923(define-public python2-dateutil-2
924 (package-with-python2 python-dateutil-2))
925
fc50e9c6
AE
926(define-public python-dateutil
927 (package
928 (name "python-dateutil")
929 (version "1.5") ; last version for python < 3
930 (source
931 (origin
932 (method url-fetch)
cafc3f5a
EB
933 (uri (string-append "http://labix.org/download/python-dateutil/"
934 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
935 (sha256
936 (base32
937 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
938 (build-system python-build-system)
939 (inputs
940 `(("python-setuptools" ,python-setuptools)))
941 (home-page "http://labix.org/python-dateutil")
cafc3f5a 942 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
943 (description
944 "The dateutil module provides powerful extensions to the standard
945datetime module, available in Python 2.3+.")
946 (license psfl)))
947
948(define-public python2-dateutil
949 (package-with-python2 python-dateutil))
1d08c01f 950
cafc3f5a
EB
951(define-public python-parsedatetime
952 (package
953 (name "python-parsedatetime")
4df1e30d 954 (version "1.5")
cafc3f5a
EB
955 (source
956 (origin
957 (method url-fetch)
958 (uri (string-append "https://pypi.python.org/packages/source/p/"
959 "parsedatetime/parsedatetime-" version ".tar.gz"))
960 (sha256
961 (base32
4df1e30d 962 "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
cafc3f5a
EB
963 (build-system python-build-system)
964 (native-inputs
965 `(("python-setuptools" ,python-setuptools)))
cafc3f5a
EB
966 (home-page "http://github.com/bear/parsedatetime/")
967 (synopsis
968 "Parse human-readable date/time text")
969 (description
e881752c 970 "Parse human-readable date/time text.")
cafc3f5a
EB
971 (license asl2.0)))
972
38b8f9b2
LF
973(define-public python2-parsedatetime
974 (package-with-python2 python-parsedatetime))
975
d072efcb
RW
976(define-public python-pandas
977 (package
978 (name "python-pandas")
979 (version "0.16.0")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (string-append "https://pypi.python.org/packages/source/p/"
984 "pandas/pandas-" version ".tar.gz"))
985 (sha256
986 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
987 (build-system python-build-system)
988 (arguments
989 `(;; Three tests fail:
990 ;; - test_read_google
991 ;; - test_read_yahoo
992 ;; - test_month_range_union_tz_dateutil
993 #:tests? #f))
994 (propagated-inputs
995 `(("python-numpy" ,python-numpy)
996 ("python-pytz" ,python-pytz)
997 ("python-dateutil" ,python-dateutil-2)))
998 (native-inputs
999 `(("python-nose" ,python-nose)
1000 ("python-setuptools" ,python-setuptools)))
1001 (home-page "http://pandas.pydata.org")
1002 (synopsis "Data structures for data analysis, time series, and statistics")
1003 (description
1004 "Pandas is a Python package providing fast, flexible, and expressive data
1005structures designed to make working with structured (tabular,
1006multidimensional, potentially heterogeneous) and time series data both easy
1007and intuitive. It aims to be the fundamental high-level building block for
1008doing practical, real world data analysis in Python.")
1009 (license bsd-3)))
1010
1011(define-public python2-pandas
3cbe7d5e
FB
1012 (let ((pandas (package-with-python2 python-pandas)))
1013 (package (inherit pandas)
1014 (propagated-inputs
1015 `(("python2-numpy" ,python2-numpy)
1016 ,@(alist-delete "python-numpy"
1017 (package-propagated-inputs pandas)))))))
d072efcb 1018
cafc3f5a
EB
1019(define-public python-tzlocal
1020 (package
1021 (name "python-tzlocal")
1022 (version "1.1.1")
1023 (source
1024 (origin
1025 (method url-fetch)
1026 (uri (string-append "https://pypi.python.org/packages/source/t/"
1027 "tzlocal/tzlocal-" version ".zip"))
1028 (sha256
1029 (base32
1030 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
1031 (build-system python-build-system)
1032 (native-inputs
1033 `(("unzip" ,unzip)
1034 ("python-setuptools" ,python-setuptools)))
1035 (inputs `(("python-pytz" ,python-pytz)))
1036 (arguments
1037 `(#:phases
1038 (alist-replace
1039 'unpack
1040 (lambda _
1041 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1042 "/bin/unzip"))
1043 (source (assoc-ref %build-inputs "source")))
1044 (and (zero? (system* unzip source))
1045 (chdir (string-append "tzlocal-" ,version)))))
1046 %standard-phases)))
1047 (home-page "https://github.com/regebro/tzlocal")
1048 (synopsis
35b9e423 1049 "Local timezone information for Python")
cafc3f5a
EB
1050 (description
1051 "Tzlocal returns a tzinfo object with the local timezone information.
1052This module attempts to fix a glaring hole in pytz, that there is no way to
1053get the local timezone information, unless you know the zoneinfo name, and
1054under several distributions that's hard or impossible to figure out.")
1055 (license cc0)))
1056
be7134bf
RW
1057(define-public python-pysam
1058 (package
1059 (name "python-pysam")
1060 (version "0.8.1")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1065 version ".tar.gz"))
1066 (sha256
1067 (base32
1068 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1069 (build-system python-build-system)
1070 (arguments
1071 `(#:tests? #f ; tests are excluded in the manifest
1072 #:phases
1073 (alist-cons-before
1074 'build 'set-flags
1075 (lambda _
1076 (setenv "LDFLAGS" "-lncurses")
1077 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1078 %standard-phases)))
1079 (inputs
1080 `(("python-cython" ,python-cython)
1081 ("python-setuptools" ,python-setuptools)
1082 ("ncurses" ,ncurses)
1083 ("zlib" ,zlib)))
1084 (home-page "https://github.com/pysam-developers/pysam")
1085 (synopsis "Python bindings to the SAMtools C API")
1086 (description
1087 "Pysam is a Python module for reading and manipulating files in the
1088SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1089also includes an interface for tabix.")
bd3fa666 1090 (license license:expat)))
be7134bf
RW
1091
1092(define-public python2-pysam
1093 (package-with-python2 python-pysam))
1d08c01f
AE
1094
1095(define-public python2-pysqlite
1096 (package
1097 (name "python2-pysqlite")
7a03af70 1098 (version "2.6.3a") ; see below
1d08c01f
AE
1099 (source
1100 (origin
1101 (method url-fetch)
7a03af70
LC
1102 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
1103 ;; tarball was modified, but the version number was kept:
1104 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
1105 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
1106 (uri (string-append
1107 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
1108 "2.6.3" ".tar.gz"))
1d08c01f
AE
1109 (sha256
1110 (base32
7a03af70 1111 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1d08c01f
AE
1112 (build-system python-build-system)
1113 (inputs
1114 `(("sqlite" ,sqlite)))
1115 (arguments
1116 `(#:python ,python-2 ; incompatible with Python 3
1117 #:tests? #f)) ; no test target
7a03af70
LC
1118 (home-page "https://pypi.python.org/pypi/pysqlite")
1119 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1120 (description
1121 "Pysqlite provides SQLite bindings for Python that comply to the
1122Database API 2.0T.")
ed0cdf83 1123 (license license:zlib)))
1d08c01f 1124
2875caf5
AE
1125
1126(define-public python2-mechanize
1127 (package
1128 (name "python2-mechanize")
1129 (version "0.2.5")
1130 (source
1131 (origin
1132 (method url-fetch)
1133 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1134 version ".tar.gz"))
1135 (sha256
1136 (base32
1137 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1138 (build-system python-build-system)
1139 (inputs
1140 `(("python2-setuptools" ,python2-setuptools)))
1141 (arguments
1142 `(#:python ,python-2 ; apparently incompatible with Python 3
1143 #:tests? #f))
1144 ;; test fails with message
1145 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1146 ;; (python-3.3.2) or
1147 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1148 ;; (python-2.7.5).
1149 ;; The source code is from March 2011 and probably not up-to-date
1150 ;; with respect to python unit tests.
1151 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1152 (synopsis
1153 "Stateful programmatic web browsing in Python")
1154 (description
1155 "Mechanize implements stateful programmatic web browsing in Python,
1156after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 1157 (license (non-copyleft "file://COPYING"
e881752c 1158 "See COPYING in the distribution."))))
2875caf5 1159
0352532e
AE
1160
1161(define-public python-simplejson
1162 (package
1163 (name "python-simplejson")
1164 (version "3.3.0")
1165 (source
1166 (origin
1167 (method url-fetch)
1168 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1169 version ".tar.gz"))
1170 (sha256
1171 (base32
1172 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1173 (build-system python-build-system)
1174 (home-page "http://simplejson.readthedocs.org/en/latest/")
1175 (synopsis
1176 "Json library for Python")
1177 (description
e881752c
AK
1178 "JSON (JavaScript Object Notation) is a subset of JavaScript
1179syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1180format.
0352532e
AE
1181
1182Simplejson exposes an API familiar to users of the standard library marshal
1183and pickle modules. It is the externally maintained version of the json
1184library contained in Python 2.6, but maintains compatibility with Python 2.5
1185and (currently) has significant performance advantages, even without using
1186the optional C extension for speedups. Simplejson is also supported on
1187Python 3.3+.")
1188 (license x11)))
1189
1190(define-public python2-simplejson
1191 (package-with-python2 python-simplejson))
421a80a2
AE
1192
1193
1194(define-public python2-pyicu
1195 (package
1196 (name "python2-pyicu")
569ac046 1197 (version "1.8")
421a80a2
AE
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1202 version ".tar.gz"))
1203 (sha256
1204 (base32
569ac046 1205 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
421a80a2
AE
1206 (build-system python-build-system)
1207 (inputs
1208 `(("icu4c" ,icu4c)))
1209 (arguments
1210 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1211 ; linking with libpython3.3m
1212 #:tests? #f)) ; no check target
1213 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1214 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1215 (description
1216 "PyICU is a python extension wrapping the ICU C++ API.")
1217 (license x11)))
cc20a22a
LC
1218
1219(define-public python2-dogtail
1220 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1221 ;; spaces in indentation" with Python 3.
1222 (package
1223 (name "python2-dogtail")
1224 (version "0.8.2")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (string-append
1228 "https://fedorahosted.org/released/dogtail/dogtail-"
1229 version ".tar.gz"))
1230 (sha256
1231 (base32
1232 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1233 (build-system python-build-system)
1234 (arguments `(#:python ,python-2
1235 #:tests? #f)) ; invalid command "test"
1236 (home-page "https://fedorahosted.org/dogtail/")
1237 (synopsis "GUI test tool and automation framework written in ​Python")
1238 (description
35b9e423 1239 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1240It uses Accessibility (a11y) technologies to communicate with desktop
1241applications. dogtail scripts are written in Python and executed like any
1242other Python program.")
1243 (license gpl2+)))
515e6878 1244
011b18c3
LC
1245(define-public python2-empy
1246 (package
1247 (name "python2-empy")
1248 (version "3.3")
1249 (source (origin
1250 (method url-fetch)
1251 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1252 version ".tar.gz"))
1253 (sha256
1254 (base32
1255 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1256 (build-system python-build-system)
1257 (arguments
1258 `(#:python ,python-2
1259 #:phases (alist-replace
1260 'check
1261 (lambda _
1262 (zero? (system* "./test.sh")))
1263 %standard-phases)))
1264 (home-page "http://www.alcyone.com/software/empy/")
1265 (synopsis "Templating system for Python")
1266 (description
1267 "EmPy is a system for embedding Python expressions and statements in
1268template text; it takes an EmPy source file, processes it, and produces
1269output. This is accomplished via expansions, which are special signals to the
1cd4027c 1270EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1271EmPy can expand arbitrary Python expressions and statements in this way, as
1272well as a variety of special forms. Textual data not explicitly delimited in
1273this way is sent unaffected to the output, allowing Python to be used in
1274effect as a markup language. Also supported are callbacks via hooks,
1275recording and playback via diversions, and dynamic, chainable filters. The
1276system is highly configurable via command line options and embedded
1277commands.")
1278 (license lgpl2.1+)))
1279
8deeda0c
LC
1280(define-public python2-element-tree
1281 (package
1282 (name "python2-element-tree")
1283 (version "1.2.6")
1284 (source (origin
1285 (method url-fetch)
1286 (uri (string-append
1287 "http://effbot.org/media/downloads/elementtree-"
1288 version "-20050316.tar.gz"))
1289 (sha256
1290 (base32
1291 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1292 (build-system python-build-system)
1293 (arguments
1294 `(#:python ,python-2 ; seems to be part of Python 3
1295 #:tests? #f)) ; no 'test' sub-command
1296 (synopsis "Toolkit for XML processing in Python")
1297 (description
1298 "ElementTree is a Python library supporting lightweight XML processing.")
1299 (home-page "http://effbot.org/zone/element-index.htm")
1300 (license (x11-style "http://docs.python.org/2/license.html"
1301 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
13020.9.0 THROUGH 1.2\"."))))
1303
1304(define-public python2-pybugz
1305 (package
1306 (name "python2-pybugz")
1307 (version "0.6.11")
1308 (source (origin
1309 (method url-fetch)
1310 (uri (string-append
1311 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
6f194a1e
LC
1315 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1316 (patches (map search-patch
1317 (list "pybugz-stty.patch"
1318 "pybugz-encode-error.patch")))))
8deeda0c
LC
1319 (build-system python-build-system)
1320 (arguments
1321 `(#:python ,python-2 ; SyntaxError with Python 3
1322 #:tests? #f)) ; no 'test' sub-command
1323 (inputs `(("element-tree" ,python2-element-tree)))
1324 (synopsis "Python and command-line interface to Bugzilla")
1325 (description
1326 "PyBugz is a Python library and command-line tool to query the Bugzilla
1327bug tracking system. It is meant as an aid to speed up interaction with the
1328bug tracker.")
1329 (home-page "http://www.liquidx.net/pybugz/")
1330 (license gpl2)))
1331
a480bc41
EB
1332(define-public python-enum34
1333 (package
1334 (name "python-enum34")
1335 (version "1.0")
1336 (source
1337 (origin
1338 (method url-fetch)
1339 (uri (string-append "https://pypi.python.org/packages/source/e/"
1340 "enum34/enum34-" version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1344 (build-system python-build-system)
1345 (inputs
1346 `(("python-setuptools" ,python-setuptools)))
1347 (arguments
1348 `(#:phases
1349 (alist-replace
1350 'check
1351 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1352 %standard-phases)))
1353 (home-page "https://pypi.python.org/pypi/enum34")
1354 (synopsis "Backported Python 3.4 Enum")
1355 (description
1356 "Enum34 is the new Python stdlib enum module available in Python 3.4
1357backported for previous versions of Python from 2.4 to 3.3.")
1358 (license bsd-3)))
1359
1360(define-public python-parse-type
1361 (package
1362 (name "python-parse-type")
1363 (version "0.3.4")
1364 (source
1365 (origin
1366 (method url-fetch)
1367 (uri (string-append "https://pypi.python.org/packages/source/p/"
1368 "parse_type/parse_type-" version ".tar.gz"))
1369 (sha256
1370 (base32
1371 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1372 (build-system python-build-system)
1373 (inputs
1374 `(("python-setuptools" ,python-setuptools)
1375 ("python-six" ,python-six)
1376 ("python-parse" ,python-parse)
1377 ("python-enum34" ,python-enum34))) ;required for python<3.4
1378 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1379 (home-page "https://github.com/jenisys/parse_type")
1380 (synopsis "Extended parse module")
1381 (description
1382 "Parse_type extends the python parse module.")
1383 (license bsd-3)))
1384
1385(define-public python-parse
1386 (package
1387 (name "python-parse")
1388 (version "1.6.4")
1389 (source
1390 (origin
1391 (method url-fetch)
1392 (uri (string-append "https://pypi.python.org/packages/source/p/"
1393 "parse/parse-" version ".tar.gz"))
1394 (sha256
1395 (base32
1396 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1397 (build-system python-build-system)
1398 (arguments
1399 `(#:phases
1400 (alist-replace
1401 'check
1402 (lambda _ (zero? (system* "python" "test_parse.py")))
1403 %standard-phases)))
1404 (home-page "https://github.com/r1chardj0n3s/parse")
1405 (synopsis "Parse strings")
1406 (description
1407 "Parse strings using a specification based on the Python format()
1408syntax.")
1409 (license x11)))
1410
1411
515e6878
LC
1412(define-public scons
1413 (package
1414 (name "scons")
a3f61425 1415 (version "2.3.4")
515e6878
LC
1416 (source (origin
1417 (method url-fetch)
1418 (uri (string-append "mirror://sourceforge/scons/scons-"
1419 version ".tar.gz"))
1420 (sha256
1421 (base32
a3f61425 1422 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1423 (build-system python-build-system)
1424 (arguments
1425 ;; With Python 3.x, fails to build with a syntax error.
1426 `(#:python ,python-2
1427 #:tests? #f)) ; no 'python setup.py test' command
1428 (home-page "http://scons.org/")
1429 (synopsis "Software construction tool written in Python")
1430 (description
1431 "SCons is a software construction tool. Think of SCons as an improved,
1432cross-platform substitute for the classic Make utility with integrated
1433functionality similar to autoconf/automake and compiler caches such as ccache.
1434In short, SCons is an easier, more reliable and faster way to build
1435software.")
1436 (license x11)))
011b18c3 1437
c15a5c0e
DT
1438(define-public python-extras
1439 (package
1440 (name "python-extras")
1441 (version "0.0.3")
1442 (source
1443 (origin
1444 (method url-fetch)
1445 (uri (string-append
1446 "https://pypi.python.org/packages/source/e/extras/extras-"
1447 version ".tar.gz"))
1448 (sha256
1449 (base32
1450 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1451 (build-system python-build-system)
1452 (inputs
1453 `(("python-setuptools" ,python-setuptools)))
1454 (arguments
1455 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1456 '(#:tests? #f))
1457 (home-page "https://github.com/testing-cabal/extras")
1458 (synopsis "Useful extensions to the Python standard library")
1459 (description
1460 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1461 (license license:expat)))
c15a5c0e
DT
1462
1463(define-public python2-extras
1464 (package-with-python2 python-extras))
1465
56ea0efd
DT
1466(define-public python-mimeparse
1467 (package
1468 (name "python-mimeparse")
1469 (version "0.1.4")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (string-append
1474 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1475 version ".tar.gz"))
1476 (sha256
1477 (base32
1478 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1479 (build-system python-build-system)
1480 (inputs
1481 `(("python-setuptools" ,python-setuptools)))
1482 (arguments
1483 '(#:tests? #f)) ; no setup.py test command
1484 (home-page
1485 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1486 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1487 (description
1488 "Mimeparse provides basic functions for parsing MIME type names and
1489matching them against a list of media-ranges.")
bd3fa666 1490 (license license:expat)))
56ea0efd
DT
1491
1492(define-public python2-mimeparse
1493 (package-with-python2 python-mimeparse))
1494
4435427e
DT
1495(define-public python-nose
1496 (package
1497 (name "python-nose")
1498 (version "1.3.4")
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (string-append
1503 "https://pypi.python.org/packages/source/n/nose/nose-"
1504 version ".tar.gz"))
1505 (sha256
1506 (base32
1507 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1508 (build-system python-build-system)
1509 (inputs
1510 `(("python-setuptools" ,python-setuptools)))
1511 (arguments
1512 '(#:tests? #f)) ; FIXME: test suite fails
1513 (home-page "http://readthedocs.org/docs/nose/")
1514 (synopsis "Python testing library")
1515 (description
1516 "Nose extends the unittest library to make testing easier.")
1517 (license lgpl2.0+)))
1518
1519(define-public python2-nose
1520 (package-with-python2 python-nose))
1521
6cd9c356
DT
1522(define-public python-unittest2
1523 (package
1524 (name "python-unittest2")
1525 (version "0.5.1")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (string-append
1530 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1531 version ".tar.gz"))
1532 (sha256
1533 (base32
1534 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1535 (build-system python-build-system)
1536 (inputs
1537 `(("python-setuptools" ,python-setuptools)))
1538 (home-page "http://pypi.python.org/pypi/unittest2")
1539 (synopsis "Python unit testing library")
1540 (description
1541 "Unittest2 is a replacement for the unittest module in the Python
1542standard library.")
1543 (license psfl)))
1544
1545(define-public python2-unittest2
1546 (package (inherit python-unittest2)
1547 (name "python2-unittest2")
1548 (version "0.5.1")
1549 (source
1550 (origin
1551 (method url-fetch)
1552 (uri (string-append
1553 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1554 version ".tar.gz"))
1555 (sha256
1556 (base32
1557 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1558 (inputs
7957fe6c 1559 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1560 (arguments
1561 `(#:python ,python-2
1562 #:tests? #f)))) ; no setup.py test command
1563
542ad60f
DT
1564(define-public python-py
1565 (package
1566 (name "python-py")
1567 (version "1.4.23")
1568 (source
1569 (origin
1570 (method url-fetch)
1571 (uri (string-append
1572 "https://pypi.python.org/packages/source/p/py/py-"
1573 version ".tar.gz"))
1574 (sha256
1575 (base32
1576 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1577 (build-system python-build-system)
1578 (inputs
1579 `(("python-setuptools" ,python-setuptools)))
1580 (home-page "http://pylib.readthedocs.org/")
1581 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1582 (description
1583 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1584code introspection, and logging.")
bd3fa666 1585 (license license:expat)))
542ad60f
DT
1586
1587(define-public python2-py
1588 (package-with-python2 python-py))
1589
855d4761
DT
1590(define-public python-pytest
1591 (package
1592 (name "python-pytest")
1593 (version "2.6.1")
1594 (source
1595 (origin
1596 (method url-fetch)
1597 (uri (string-append
1598 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1599 version ".tar.gz"))
1600 (sha256
1601 (base32
1602 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1603 (modules '((guix build utils)))
1604 (snippet
1605 ;; One of the tests involves the /usr directory, so it fails.
1606 '(substitute* "testing/test_argcomplete.py"
1607 (("def test_remove_dir_prefix\\(self\\):")
1608 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1609 (build-system python-build-system)
1610 (inputs
1611 `(("python-setuptools" ,python-setuptools)
1612 ("python-py" ,python-py)
1613 ("python-nose" ,python-nose)
1614 ("python-mock" ,python-mock)))
1615 (home-page "http://pytest.org")
1616 (synopsis "Python testing library")
1617 (description
1618 "Pytest is a testing tool that provides auto-discovery of test modules
1619and functions, detailed info on failing assert statements, modular fixtures,
1620and many external plugins.")
bd3fa666 1621 (license license:expat)))
855d4761
DT
1622
1623(define-public python2-pytest
1624 (package-with-python2 python-pytest))
1625
358c3d61
EF
1626(define-public python-pytest-cov
1627 (package
1628 (name "python-pytest-cov")
1629 (version "2.2.0")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "pytest-cov" version))
1634 (sha256
1635 (base32
1636 "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
1637 (build-system python-build-system)
1638 (propagated-inputs
1639 `(("python-coverage" ,python-coverage)
1640 ("python-pytest" ,python-pytest)))
1641 (native-inputs
1642 `(("python-setuptools" ,python-setuptools)))
1643 (home-page "https://github.com/pytest-dev/pytest-cov")
1644 (synopsis "Pytest plugin for measuring coverage")
1645 (description
1646 "Pytest-cov produces coverage reports. It supports centralised testing and
1647distributed testing in both load and each modes. It also supports coverage
1648of subprocesses.")
1649 (license license:expat)))
1650
1651(define-public python2-pytest-cov
1652 (package-with-python2 python-pytest-cov))
1653
6784f2e3
RW
1654(define-public python-pytest-runner
1655 (package
1656 (name "python-pytest-runner")
1657 (version "2.6.2")
1658 (source
1659 (origin
1660 (method url-fetch)
1661 (uri (string-append "https://pypi.python.org/packages/source/p/"
1662 "pytest-runner/pytest-runner-"
1663 version ".tar.gz"))
1664 (sha256
1665 (base32
1666 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1667 (build-system python-build-system)
1668 (arguments
1669 `(#:phases
1670 (modify-phases %standard-phases
1671 ;; The fancy way of setting the version with setuptools_scm does not
1672 ;; seem to work here.
1673 (add-after 'unpack 'set-version
1674 (lambda _
1675 (substitute* "docs/conf.py"
1676 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1677 (string-append "version = \"" ,version "\"")))
1678 #t)))))
1679 (native-inputs
1680 `(("python-pytest" ,python-pytest)
d50d097d 1681 ("python-setuptools" ,python-setuptools)
6784f2e3
RW
1682 ("python-setuptools-scm" ,python-setuptools-scm)))
1683 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1684 (synopsis "Invoke py.test as a distutils command")
1685 (description
1686 "This package provides a @command{pytest-runner} command that
1687@file{setup.py} files can use to run tests.")
1688 (license license:expat)))
1689
1690(define-public python2-pytest-runner
1691 (package-with-python2 python-pytest-runner))
1692
84d24017
DT
1693(define-public python-scripttest
1694 (package
1695 (name "python-scripttest")
1696 (version "1.3")
1697 (source
1698 (origin
1699 (method url-fetch)
1700 (uri (string-append
1701 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1702 version ".tar.gz"))
1703 (sha256
1704 (base32
1705 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1706 (build-system python-build-system)
1707 (inputs
1708 `(("python-setuptools" ,python-setuptools)
1709 ("python-pytest" ,python-pytest)))
1710 (home-page "http://pythonpaste.org/scripttest/")
1711 (synopsis "Python library to test command-line scripts")
1712 (description "Scripttest is a Python helper library for testing
1713interactive command-line applications. With it you can run a script in a
1714subprocess and see the output as well as any file modifications.")
bd3fa666 1715 (license license:expat)))
84d24017
DT
1716
1717(define-public python2-scripttest
1718 (package-with-python2 python-scripttest))
1719
d8fa80e1
DT
1720(define-public python-testtools
1721 (package
1722 (name "python-testtools")
1723 (version "1.0.0")
1724 (source
1725 (origin
1726 (method url-fetch)
1727 (uri (string-append
1728 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1729 version ".tar.gz"))
1730 (sha256
1731 (base32
1732 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1733 (build-system python-build-system)
0e88cbf8
CR
1734 (propagated-inputs
1735 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1736 (inputs
1737 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1738 ("python-extras" ,python-extras)))
1739 (home-page "https://github.com/testing-cabal/testtools")
1740 (synopsis
1741 "Extensions to the Python standard library unit testing framework")
1742 (description
1743 "Testtools extends the Python standard library unit testing framework to
1744provide matchers, more debugging information, and cross-Python
1745compatibility.")
1746 (license psfl)))
1747
1748(define-public python2-testtools
1749 (package-with-python2 python-testtools))
1750
5bf3afea
DT
1751(define-public python-testscenarios
1752 (package
1753 (name "python-testscenarios")
1754 (version "0.4")
1755 (source
1756 (origin
1757 (method url-fetch)
1758 (uri (string-append
1759 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1760 version ".tar.gz"))
1761 (sha256
1762 (base32
1763 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1764 (build-system python-build-system)
1765 (inputs
1766 `(("python-setuptools" ,python-setuptools)
1767 ("python-testtools" ,python-testtools)
1768 ("python-mimeparse" ,python-mimeparse)))
1769 (home-page "https://launchpad.net/testscenarios")
1770 (synopsis "Pyunit extension for dependency injection")
1771 (description
1772 "Testscenarios provides clean dependency injection for Python unittest
1773style tests.")
1774 (license (list bsd-3 asl2.0)))) ; at the user's option
1775
1776(define-public python2-testscenarios
1777 (package-with-python2 python-testscenarios))
1778
dac79ecc
DT
1779(define-public python-testresources
1780 (package
1781 (name "python-testresources")
1782 (version "0.2.7")
1783 (source
1784 (origin
1785 (method url-fetch)
1786 (uri (string-append
1787 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1788 version ".tar.gz"))
1789 (sha256
1790 (base32
1791 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1792 (build-system python-build-system)
1793 (inputs
1794 `(("python-setuptools" ,python-setuptools)))
1795 (home-page "https://launchpad.net/testresources")
1796 (synopsis
1797 "Pyunit extension for managing test resources")
1798 (description
1799 "Testresources is an extension to Python's unittest to allow declarative
1800use of resources by test cases.")
1801 (license (list bsd-3 asl2.0)))) ; at the user's option
1802
1803(define-public python2-testresources
1804 (package-with-python2 python-testresources))
1805
070ab058
DT
1806(define-public python-subunit
1807 (package
1808 (name "python-subunit")
1809 (version "0.0.21")
1810 (source
1811 (origin
1812 (method url-fetch)
1813 (uri (string-append
1814 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1815 version ".tar.gz"))
1816 (sha256
1817 (base32
1818 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1819 (build-system python-build-system)
1820 (inputs
1821 `(("python-setuptools" ,python-setuptools)
1822 ("python-testtools" ,python-testtools)
1823 ("python-mimeparse" ,python-mimeparse)
1824 ("python-testscenarios" ,python-testscenarios)))
1825 (home-page "http://launchpad.net/subunit")
1826 (synopsis "Python implementation of the subunit protocol")
1827 (description
1828 "Python-subunit is a Python implementation of the subunit test streaming
1829protocol.")
1830 (license (list bsd-3 asl2.0)))) ; at the user's option
1831
1832(define-public python2-subunit
1833 (package-with-python2 python-subunit))
1834
7787ef76
CR
1835;; Recent versions of python-fixtures need a recent version of python-pbr,
1836;; which needs a recent version of python-fixtures. To fix this circular
1837;; dependency, we keep old versions of python-fixtures and python-pbr to
1838;; bootstrap the whole thing:
1839;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1840;; - python-pbr-0.11 is used to build python-fixtures
1841;; - python-fixtures is used to build python-pbr
1842(define-public python-fixtures-0.3.16
cd49454b
DT
1843 (package
1844 (name "python-fixtures")
1845 (version "0.3.16")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (string-append
1850 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1851 version ".tar.gz"))
1852 (sha256
1853 (base32
1854 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1855 (build-system python-build-system)
1856 (inputs
1857 `(("python-setuptools" ,python-setuptools)))
1858 (arguments
1859 '(#:tests? #f)) ; no setup.py test command
1860 (home-page "https://launchpad.net/python-fixtures")
1861 (synopsis "Python test fixture library")
1862 (description
1863 "Fixtures provides a way to create reusable state, useful when writing
1864Python tests.")
1865 (license (list bsd-3 asl2.0)))) ; at user's option
1866
7787ef76
CR
1867(define-public python2-fixtures-0.3.16
1868 (package-with-python2 python-fixtures-0.3.16))
1869
1870(define-public python-pbr-0.11
1871 (package
1872 (name "python-pbr")
1873 (version "0.11.0")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (string-append
1878 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1879 version ".tar.gz"))
1880 (sha256
1881 (base32
1882 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1883 (build-system python-build-system)
1884 (arguments
1885 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1886 (inputs
1887 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1888 ("python-pip" ,python-pip)
1889 ("python-setuptools" ,python-setuptools)))
1890 (home-page "https://launchpad.net/pbr")
1891 (synopsis "Change the default behavior of Python’s setuptools")
1892 (description
1893 "Python Build Reasonableness (PBR) is a library that injects some useful
1894and sensible default behaviors into your setuptools run.")
1895 (license asl2.0)))
1896
1897(define-public python2-pbr-0.11
1898 (package-with-python2 python-pbr-0.11))
1899
1900(define-public python-fixtures
1901 (package
1902 (name "python-fixtures")
1903 (version "1.3.1")
1904 (source
1905 (origin
1906 (method url-fetch)
1907 (uri (string-append
1908 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1909 version ".tar.gz"))
1910 (sha256
1911 (base32
1912 "1khpywdh91ijryhxjxiyyi5rmbimhl8hwbbf8lazhgzq6yxz6g5n"))))
1913 (build-system python-build-system)
1914 (propagated-inputs
1915 `(("python-six" ,python-six)
1916 ("python-pbr-0.11" ,python-pbr-0.11)))
1917 (inputs
1918 `(("python-pip" ,python-pip)
1919 ("python-setuptools" ,python-setuptools)
1920 ;; Tests
1921 ("python-testtools" ,python-testtools)))
1922 (arguments
1923 '(#:tests? #f)) ; no setup.py test command
1924 (home-page "https://launchpad.net/python-fixtures")
1925 (synopsis "Python test fixture library")
1926 (description
1927 "Fixtures provides a way to create reusable state, useful when writing
1928Python tests.")
1929 (license (list bsd-3 asl2.0)))) ; at user's option
1930
cd49454b
DT
1931(define-public python2-fixtures
1932 (package-with-python2 python-fixtures))
1933
b24a0c00
DT
1934(define-public python-testrepository
1935 (package
1936 (name "python-testrepository")
1937 (version "0.0.20")
1938 (source
1939 (origin
1940 (method url-fetch)
1941 (uri (string-append
1942 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1943 version ".tar.gz"))
1944 (sha256
1945 (base32
1946 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1947 (build-system python-build-system)
05de40c5 1948 (propagated-inputs
7787ef76 1949 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 1950 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1951 (inputs
1952 `(("python-setuptools" ,python-setuptools)
b24a0c00 1953 ("python-subunit" ,python-subunit)
b24a0c00
DT
1954 ("python-mimeparse" ,python-mimeparse)))
1955 (home-page "https://launchpad.net/testrepository")
1956 (synopsis "Database for Python test results")
1957 (description "Testrepository provides a database of test results which can
1958be used as part of a developer's workflow to check things such as what tests
1959have failed since the last commit or what tests are currently failing.")
1960 (license (list bsd-3 asl2.0)))) ; at user's option
1961
1962(define-public python2-testrepository
1963 (package-with-python2 python-testrepository))
1964
243a009a
DT
1965(define-public python-coverage
1966 (package
1967 (name "python-coverage")
1968 (version "3.7.1")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (string-append
1973 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1974 version ".tar.gz"))
1975 (sha256
1976 (base32
1977 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1978 (build-system python-build-system)
1979 (inputs
1980 `(("python-setuptools" ,python-setuptools)))
1981 (home-page "http://nedbatchelder.com/code/coverage")
1982 (synopsis "Code coverage measurement for Python")
1983 (description
1984 "Coverage measures code coverage, typically during test execution. It
1985uses the code analysis tools and tracing hooks provided in the Python standard
1986library to determine which lines are executable, and which have been
1987executed.")
1988 (license bsd-3)))
1989
1990(define-public python2-coverage
1991 (package-with-python2 python-coverage))
1992
041358fb
DT
1993(define-public python-discover
1994 (package
1995 (name "python-discover")
1996 (version "0.4.0")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (string-append
2001 "https://pypi.python.org/packages/source/d/discover/discover-"
2002 version ".tar.gz"))
2003 (sha256
2004 (base32
2005 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2006 (build-system python-build-system)
2007 (inputs
2008 `(("python-setuptools" ,python-setuptools)))
2009 (home-page "http://pypi.python.org/pypi/discover/")
2010 (synopsis
2011 "Python test discovery for unittest")
2012 (description
2013 "Discover provides test discovery for unittest, a feature that has been
e881752c 2014backported from Python 2.7 for Python 2.4+.")
041358fb
DT
2015 (license bsd-3)))
2016
2017(define-public python2-discover
2018 (package-with-python2 python-discover))
2019
a480bc41
EB
2020(define-public behave
2021 (package
2022 (name "behave")
2023 (version "1.2.4")
2024 (source (origin
2025 (method url-fetch)
2026 (uri (string-append "https://pypi.python.org/packages/source/b/"
2027 name "/" name "-" version ".tar.gz"))
2028 (sha256
2029 (base32
2030 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2031 (build-system python-build-system)
2032 (inputs
2033 `(("python-setuptools" ,python-setuptools)
2034 ("python-six" ,python-six)
2035 ("python-enum43" ,python-enum34)
2036 ("python-parse" ,python-parse)
2037 ("python-parse-type" ,python-parse-type)))
2038 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2039 ;PyHamcrest>=1.8
2040 (home-page "http://github.com/behave/behave")
2041 (synopsis "Python behavior-driven development")
2042 (description
2043 "Behave is a tool for behavior-driven development in python.
2044Behavior-driven development (or BDD) is an agile software development
2045technique that encourages collaboration between developers, QA and
2046non-technical or business participants in a software project. Behave uses
2047tests written in a natural language style, backed up by Python code.")
2048 (license x11)))
c7303d3c
DT
2049
2050(define-public python-exif-read
2051 (package
2052 (name "python-exif-read")
2053 (version "1.4.2")
2054 (source (origin
2055 (method url-fetch)
2056 (uri
2057 (string-append
2058 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
2059 version ".tar.gz"))
2060 (sha256
2061 (base32
2062 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
2063 (build-system python-build-system)
2064 (inputs
2065 `(("python-setuptools" ,python-setuptools)))
2066 (arguments `(#:tests? #f)) ; no tests
2067 (home-page "https://github.com/ianare/exif-py")
2068 (synopsis "Python library to extract EXIF data from image files")
2069 (description
2070 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2071files.")
2072 (license bsd-3)))
2073
2074(define-public python2-exif-read
2075 (package-with-python2 python-exif-read))
d5f89b22
DT
2076
2077(define-public python-pyld
2078 (package
2079 (name "python-pyld")
2080 (version "0.6.0")
2081 (source (origin
2082 (method url-fetch)
2083 (uri
2084 (string-append
2085 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
2086 version ".tar.gz"))
2087 (sha256
2088 (base32
2089 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
2090 (build-system python-build-system)
2091 (inputs
2092 `(("python-setuptools" ,python-setuptools)))
2093 (arguments `(#:tests? #f)) ; no tests
2094 (home-page "http://github.com/digitalbazaar/pyld")
2095 (synopsis "Python implementation of the JSON-LD specification")
2096 (description
2097 "PyLD is an implementation of the JSON-LD specification.")
2098 (license bsd-3)))
2099
2100(define-public python2-pyld
2101 (package-with-python2 python-pyld))
3a1f9a68
DT
2102
2103(define-public python-certifi
2104 (package
2105 (name "python-certifi")
9a41f443 2106 (version "2015.11.20.1")
3a1f9a68
DT
2107 (source (origin
2108 (method url-fetch)
9a41f443 2109 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2110 (sha256
2111 (base32
9a41f443 2112 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2113 (build-system python-build-system)
2114 (inputs
2115 `(("python-setuptools" ,python-setuptools)))
2116 (arguments `(#:tests? #f)) ; no tests
2117 (home-page "http://python-requests.org/")
2118 (synopsis "Python CA certificate bundle")
2119 (description
2120 "Certifi is a Python library that contains a CA certificate bundle, which
2121is used by the Requests library to verify HTTPS requests.")
2122 (license asl2.0)))
2123
2124(define-public python2-certifi
2125 (package-with-python2 python-certifi))
e6cfbd36 2126
12c270dd
RW
2127(define-public python-click
2128 (package
2129 (name "python-click")
5bd88cf1 2130 (version "6.2")
12c270dd
RW
2131 (source
2132 (origin
2133 (method url-fetch)
5bd88cf1 2134 (uri (pypi-uri "click" version))
12c270dd 2135 (sha256
5bd88cf1 2136 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
12c270dd
RW
2137 (build-system python-build-system)
2138 (native-inputs
2139 `(("python-setuptools" ,python-setuptools)))
2140 (home-page "http://click.pocoo.org")
2141 (synopsis "Command line library for Python")
2142 (description
2143 "Click is a Python package for creating command line interfaces in a
2144composable way with as little code as necessary. Its name stands for
2145\"Command Line Interface Creation Kit\". It's highly configurable but comes
2146with sensible defaults out of the box.")
2147 (license bsd-3)))
2148
2149(define-public python2-click
2150 (package-with-python2 python-click))
2151
addc808d
EF
2152(define-public python-wheel
2153 (package
2154 (name "python-wheel")
2155 (version "0.26.0")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (pypi-uri "wheel" version))
2160 (sha256
2161 (base32
2162 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2163 (build-system python-build-system)
2164 (native-inputs
2165 `(("python-setuptools" ,python-setuptools)
2166 ("python-jsonschema" ,python-jsonschema)
2167 ("python-pytest-cov" ,python-pytest-cov)))
2168 (home-page "https://bitbucket.org/pypa/wheel/")
2169 (synopsis "Built-package format for Python")
2170 (description
2171 "A wheel is a ZIP-format archive with a specially formatted filename and the
2172.whl extension. It is designed to contain all the files for a PEP 376
2173compatible install in a way that is very close to the on-disk format.")
2174 (license license:expat)))
2175
2176(define-public python2-wheel
2177 (package-with-python2 python-wheel))
2178
ae641128 2179(define-public python-requests
e6cfbd36 2180 (package
ae641128 2181 (name "python-requests")
5d691657 2182 (version "2.8.1")
e6cfbd36
DT
2183 (source (origin
2184 (method url-fetch)
5d691657 2185 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2186 (sha256
2187 (base32
5d691657 2188 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
e6cfbd36 2189 (build-system python-build-system)
5d691657
EF
2190 (native-inputs
2191 `(("python-setuptools" ,python-setuptools)))
2192 (propagated-inputs
2193 `(("python-py" ,python-py)
2194 ("python-pytest" ,python-pytest)
2195 ("python-pytest-cov" ,python-pytest-cov)
2196 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2197 (home-page "http://python-requests.org/")
2198 (synopsis "Python HTTP library")
2199 (description
2200 "Requests is a Python HTTP client library. It aims to be easier to use
2201than Python’s urllib2 library.")
2202 (license asl2.0)))
864b5211 2203
ae641128
DT
2204(define-public python2-requests
2205 (package-with-python2 python-requests))
2206
864b5211
DT
2207(define-public python-jsonschema
2208 (package
2209 (name "python-jsonschema")
2210 (version "2.4.0")
2211 (source (origin
2212 (method url-fetch)
2213 (uri
2214 (string-append
2215 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2216 version ".tar.gz"))
2217 (sha256
2218 (base32
2219 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
2220 (build-system python-build-system)
2221 (inputs
2222 `(("python-setuptools" ,python-setuptools)))
2223 (home-page "http://github.com/Julian/jsonschema")
2224 (synopsis "Implementation of JSON Schema for Python")
2225 (description
2226 "Jsonschema is an implementation of JSON Schema for Python.")
bd3fa666 2227 (license license:expat)))
864b5211
DT
2228
2229(define-public python2-jsonschema
2230 (package-with-python2 python-jsonschema))
850189b8
DT
2231
2232(define-public python-unidecode
2233 (package
2234 (name "python-unidecode")
2235 (version "0.04.16")
2236 (source (origin
2237 (method url-fetch)
2238 (uri
2239 (string-append
2240 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
2241 version ".tar.gz"))
2242 (sha256
2243 (base32
2244 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
2245 (build-system python-build-system)
2246 (inputs
2247 `(("python-setuptools" ,python-setuptools)))
2248 (home-page "https://pypi.python.org/pypi/Unidecode")
2249 (synopsis "ASCII transliterations of Unicode text")
2250 (description
2251 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2252useful when integrating with legacy code that doesn't support Unicode, or for
2253ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2254machine identifiers from human-readable Unicode strings that should still be
2255somewhat intelligeble.")
2256 (license gpl2+)))
2257
2258(define-public python2-unidecode
2259 (package-with-python2 python-unidecode))
6d45fef4
DT
2260
2261(define-public python-pyjwt
2262 (package
2263 (name "python-pyjwt")
eb31d4b4 2264 (version "1.4.0")
6d45fef4
DT
2265 (source
2266 (origin
2267 (method url-fetch)
eb31d4b4 2268 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2269 (sha256
2270 (base32
eb31d4b4 2271 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2272 (build-system python-build-system)
eb31d4b4
EF
2273 (native-inputs
2274 `(("python-setuptools" ,python-setuptools)
2275 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2276 (arguments
2277 '(#:tests? #f)) ; test suite doesn't work
2278 (home-page "http://github.com/progrium/pyjwt")
2279 (synopsis "JSON Web Token implementation in Python")
2280 (description
2281 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2282 (license license:expat)))
6d45fef4
DT
2283
2284(define-public python2-pyjwt
2285 (package-with-python2 python-pyjwt))
2286
2cec1f6f
DT
2287(define-public python-oauthlib
2288 (package
2289 (name "python-oauthlib")
bde2171d 2290 (version "1.0.3")
2cec1f6f
DT
2291 (source (origin
2292 (method url-fetch)
bde2171d 2293 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2294 (sha256
2295 (base32
bde2171d 2296 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2297 (build-system python-build-system)
bde2171d 2298 (native-inputs
2cec1f6f 2299 `(("python-setuptools" ,python-setuptools)
bde2171d 2300 ("python-coverage", python-coverage)
2cec1f6f
DT
2301 ("python-nose" ,python-nose)
2302 ("python-mock" ,python-mock)))
bde2171d
EF
2303 (inputs
2304 `(("python-blinker" ,python-blinker)
2305 ("python-cryptography" ,python-cryptography)
2306 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2307 (home-page "https://github.com/idan/oauthlib")
2308 (synopsis "OAuth implementation for Python")
2309 (description
2310 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2311OAuth request-signing logic.")
2312 (license bsd-3)))
2313
2314(define-public python2-oauthlib
2315 (let ((base (package-with-python2 python-oauthlib)))
2316 (package
2317 (inherit base)
2cec1f6f 2318 (inputs
0066de6f
EF
2319 `(("python2-unittest2" ,python2-unittest2)
2320 ("python2-cryptography" ,python2-cryptography)
2321 ,@(alist-delete "python-cryptography"
2322 (package-inputs base)))))))
ec5dbb5c
DT
2323
2324(define-public python-itsdangerous
2325 (package
2326 (name "python-itsdangerous")
2327 (version "0.24")
2328 (source
2329 (origin
2330 (method url-fetch)
2331 (uri (string-append
2332 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2333 version ".tar.gz"))
2334 (sha256
2335 (base32
2336 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2337 (build-system python-build-system)
2338 (inputs
2339 `(("python-setuptools" ,python-setuptools)))
2340 (home-page "http://github.com/mitsuhiko/itsdangerous")
2341 (synopsis "Python library for passing data to/from untrusted environments")
2342 (description
2343 "Itsdangerous provides various helpers to pass trusted data to untrusted
2344environments and back.")
2345 (license bsd-3)))
2346
2347(define-public python2-itsdangerous
2348 (package-with-python2 python-itsdangerous))
5731cae3 2349
8d12be1e
RW
2350(define-public python-pyyaml
2351 (package
2352 (name "python-pyyaml")
2353 (version "3.11")
2354 (source
2355 (origin
2356 (method url-fetch)
2357 (uri (string-append
2358 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2359 version ".tar.gz"))
2360 (sha256
2361 (base32
2362 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2363 (build-system python-build-system)
2364 (inputs
2365 `(("libyaml" ,libyaml)))
2366 (native-inputs
2367 `(("python-setuptools" ,python-setuptools)))
2368 (home-page "http://pyyaml.org/wiki/PyYAML")
2369 (synopsis "YAML parser and emitter for Python")
2370 (description
2371 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2372complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2373API, and sensible error messages. PyYAML supports standard YAML tags and
2374provides Python-specific tags that allow to represent an arbitrary Python
2375object.")
2376 (license license:expat)))
2377
2378(define-public python2-pyyaml
2379 (package-with-python2 python-pyyaml))
2380
5731cae3
DT
2381(define-public python-virtualenv
2382 (package
2383 (name "python-virtualenv")
2384 (version "1.11.6")
2385 (source
2386 (origin
2387 (method url-fetch)
2388 (uri (string-append
2389 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
2390 version ".tar.gz"))
2391 (sha256
2392 (base32
2393 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
2394 (build-system python-build-system)
2395 (inputs
2396 `(("python-setuptools" ,python-setuptools)
2397 ("python-mock" ,python-mock)
2398 ("python-nose" ,python-nose)))
2399 (home-page "https://virtualenv.pypa.io/")
2400 (synopsis "Virtual Python environment builder")
2401 (description
2402 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2403 (license license:expat)))
5731cae3
DT
2404
2405(define-public python2-virtualenv
2406 (package-with-python2 python-virtualenv))
8176d4d5
DT
2407
2408(define-public python-markupsafe
2409 (package
2410 (name "python-markupsafe")
2411 (version "0.23")
2412 (source
2413 (origin
2414 (method url-fetch)
2415 (uri (string-append
2416 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2417 version ".tar.gz"))
2418 (sha256
2419 (base32
2420 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2421 (build-system python-build-system)
2422 (inputs
2423 `(("python-setuptools" ,python-setuptools)))
2424 (home-page "http://github.com/mitsuhiko/markupsafe")
2425 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2426 (description
2427 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2428for Python.")
2429 (license bsd-3)))
2430
2431(define-public python2-markupsafe
2432 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2433
2434(define-public python-jinja2
2435 (package
2436 (name "python-jinja2")
2437 (version "2.7.3")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (string-append
2442 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
2443 version ".tar.gz"))
2444 (sha256
2445 (base32
2446 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
2447 (build-system python-build-system)
2448 (inputs
2449 `(("python-setuptools" ,python-setuptools)
2450 ("python-markupsafe" ,python-markupsafe)))
2451 (home-page "http://jinja.pocoo.org/")
2452 (synopsis "Python template engine")
2453 (description
2454 "Jinja2 is a small but fast and easy to use stand-alone template engine
2455written in pure Python.")
2456 (license bsd-3)))
2457
2458(define-public python2-jinja2
2459 (package-with-python2 python-jinja2))
3580ab8b 2460
f7d17ac7
EE
2461(define-public python-pystache
2462 (package
2463 (name "python-pystache")
2464 (version "0.5.4")
2465 (source (origin
2466 (method url-fetch)
2467 (uri (pypi-uri "pystache" version))
2468 (sha256
2469 (base32
2470 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2471 (build-system python-build-system)
2472 (native-inputs
2473 `(("python-setuptools" ,python-setuptools)))
2474 (home-page "http://defunkt.io/pystache/")
2475 (synopsis "Python logic-less template engine")
2476 (description
2477 "Pystache is a Python implementation of the framework agnostic,
2478logic-free templating system Mustache.")
2479 (license license:expat)))
2480
2481(define-public python2-pystache
2482 (package-with-python2 python-pystache))
2483
1285119b
RW
2484(define-public python-joblib
2485 (package
2486 (name "python-joblib")
2487 (version "0.9.0b4")
2488 (source (origin
2489 (method url-fetch)
2490 (uri (string-append "https://pypi.python.org/packages/source/"
2491 "j/joblib/joblib-" version ".tar.gz"))
2492 (sha256
2493 (base32
2494 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2495 (build-system python-build-system)
2496 (native-inputs
2497 `(("python-setuptools" ,python-setuptools)
2498 ("python-nose" ,python-nose)))
2499 (home-page "http://pythonhosted.org/joblib/")
2500 (synopsis "Using Python functions as pipeline jobs")
2501 (description
2502 "Joblib is a set of tools to provide lightweight pipelining in Python.
2503In particular, joblib offers: transparent disk-caching of the output values
2504and lazy re-evaluation (memoize pattern), easy simple parallel computing
2505logging and tracing of the execution.")
2506 (license bsd-3)))
2507
2508(define-public python2-joblib
2509 (package-with-python2 python-joblib))
2510
3580ab8b
DT
2511(define-public python-docutils
2512 (package
2513 (name "python-docutils")
2514 (version "0.12")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (string-append
2519 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2520 version ".tar.gz"))
2521 (sha256
2522 (base32
2523 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2524 (build-system python-build-system)
2525 (inputs
2526 `(("python-setuptools" ,python-setuptools)))
2527 (arguments
2528 '(#:tests? #f)) ; no setup.py test command
2529 (home-page "http://docutils.sourceforge.net/")
2530 (synopsis "Python Documentation Utilities")
2531 (description
2532 "Docutils is a modular system for processing documentation into useful
2533formats, such as HTML, XML, and LaTeX. For input Docutils supports
2534reStructuredText.")
2535 ;; Most of the source code is public domain, but some source files are
2536 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2537 (license (list public-domain psfl bsd-2 gpl3+))))
2538
2539(define-public python2-docutils
2540 (package-with-python2 python-docutils))
fb35b7c0
DT
2541
2542(define-public python-pygments
2543 (package
2544 (name "python-pygments")
2545 (version "1.6")
2546 (source
2547 (origin
2548 (method url-fetch)
2549 (uri (string-append
2550 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2551 version ".tar.gz"))
2552 (sha256
2553 (base32
2554 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2555 (build-system python-build-system)
2556 (inputs
2557 `(("python-setuptools" ,python-setuptools)))
2558 (home-page "http://pygments.org/")
2559 (synopsis "Syntax highlighting")
2560 (description
2561 "Pygments is a syntax highlighting package written in Python.")
2562 (license bsd-2)))
2563
2564(define-public python2-pygments
2565 (package-with-python2 python-pygments))
9dd6078d
DT
2566
2567(define-public python-sphinx
2568 (package
2569 (name "python-sphinx")
2570 (version "1.2.3")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (string-append
2575 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2576 version ".tar.gz"))
2577 (sha256
2578 (base32
2579 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2580 (build-system python-build-system)
2581 (inputs
2582 `(("python-setuptools" ,python-setuptools)
2583 ("python-jinja2" ,python-jinja2)
2584 ("python-docutils" ,python-docutils)
2585 ("python-pygments" ,python-pygments)))
2586 (home-page "http://sphinx-doc.org/")
2587 (synopsis "Python documentation generator")
2588 (description "Sphinx is a tool that makes it easy to create documentation
2589for Python projects or other documents consisting of multiple reStructuredText
2590sources.")
2591 (license bsd-3)))
2592
2593(define-public python2-sphinx
2594 (package-with-python2 python-sphinx))
6888830b 2595
ad320b20
RW
2596(define-public python-sphinx-rtd-theme
2597 (package
2598 (name "python-sphinx-rtd-theme")
2599 (version "0.1.6")
2600 (source
2601 (origin
2602 (method url-fetch)
2603 (uri (string-append "https://pypi.python.org/packages/source/s/"
2604 "sphinx_rtd_theme/sphinx_rtd_theme-"
2605 version ".tar.gz"))
2606 (sha256
2607 (base32
2608 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2609 (build-system python-build-system)
2610 (arguments
2611 `(;; With standard flags, the install phase attempts to create a zip'd
2612 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2613 ;; before 1980'
2614 #:configure-flags '("--single-version-externally-managed"
2615 "--record=sphinx-rtd-theme.txt")))
2616 (native-inputs
2617 `(("python-setuptools" ,python-setuptools)))
2618 (inputs
2619 `(("python-docutils" ,python-docutils)
2620 ("python-sphinx" ,python-sphinx)))
2621 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2622 (synopsis "ReadTheDocs.org theme for Sphinx")
2623 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2624 (license license:expat)))
ad320b20
RW
2625
2626(define-public python2-sphinx-rtd-theme
2627 (package-with-python2 python-sphinx-rtd-theme))
2628
f4de5b3b
CAW
2629(define-public python-feedgenerator
2630 (package
2631 (name "python-feedgenerator")
2632 (version "20150710.97185b7")
2633 (source
2634 ;; Using the git checkout for now because license file not added till
2635 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2636 (origin
2637 (method git-fetch)
2638 (uri (git-reference
2639 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2640 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2641 (sha256
2642 (base32
2643 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2644 (arguments
2645 `(;; With standard flags, the install phase attempts to create a zip'd
2646 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2647 ;; before 1980'
2648 #:configure-flags '("--single-version-externally-managed"
2649 "--record=feedgenerator.txt")))
2650 (build-system python-build-system)
2651 (inputs
2652 `(("python-setuptools" ,python-setuptools)
2653 ("python-pytz" ,python-pytz)
2654 ("python-six" ,python-six)))
2655 (home-page
2656 "https://github.com/dmdm/feedgenerator-py3k.git")
2657 (synopsis
2658 "Standalone version of Django's Atom/RSS feed generator")
2659 (description
2660 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2661which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2662 (license bsd-3)))
2663
2664(define-public python2-feedgenerator
2665 (package-with-python2 python-feedgenerator))
2666
59ad30e3
CAW
2667(define-public python-blinker
2668 (package
2669 (name "python-blinker")
2670 (version "1.3")
2671 (source
2672 (origin
2673 (method url-fetch)
2674 (uri (string-append
2675 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2676 version ".tar.gz"))
2677 (sha256
2678 (base32
2679 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2680 (build-system python-build-system)
2681 (native-inputs
2682 `(("python-setuptools" ,python-setuptools)))
2683 ;; No "test" command supplied to setuptools, so unless there's another way
2684 ;; to run tests, we're skipping them!
2685 (arguments '(#:tests? #f))
2686 (home-page "http://pythonhosted.org/blinker/")
2687 (synopsis "Fast, simple object-to-object and broadcast signaling")
2688 (description
2689 "Blinker provides a fast dispatching system that allows any number of
2690interested parties to subscribe to events, or \"signals\".")
2691 (license license:expat)))
2692
2693(define-public python2-blinker
2694 (package-with-python2 python-blinker))
2695
b8050e71
CAW
2696(define-public pelican
2697 (package
2698 (name "pelican")
2699 (version "3.6.0")
2700 (source
2701 (origin
2702 (method url-fetch)
2703 (uri (string-append
2704 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2705 version ".tar.gz"))
2706 (sha256
2707 (base32
2708 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2709 (build-system python-build-system)
2710 (native-inputs
2711 `(("python-setuptools" ,python-setuptools)))
2712 (propagated-inputs
2713 `(("python-feedgenerator" ,python-feedgenerator)
2714 ("python-jinja2" ,python-jinja2)
2715 ("python-pygments" ,python-pygments)
2716 ("python-docutils" ,python-docutils)
2717 ("python-pytz" ,python-pytz)
2718 ("python-blinker" ,python-blinker)
2719 ("python-unidecode" ,python-unidecode)
2720 ("python-six" ,python-six)
2721 ("python-dateutil-2" ,python-dateutil-2)))
2722 (home-page "http://getpelican.com/")
2723 (arguments
2724 `(;; XXX Requires a lot more packages to do unit tests :P
2725 #:tests? #f
2726 #:phases (modify-phases %standard-phases
2727 (add-before
2728 'install 'adjust-requires
2729 ;; Since feedgenerator is installed from git, it doesn't
2730 ;; conform to the version requirements.
2731 ;;
2732 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2733 ;; version requirement so setuptools doesn't get confused.
2734 (lambda _
2735 (substitute* "setup.py"
2736 (("['\"]feedgenerator.*?['\"]")
2737 "'feedgenerator'")))))))
2738 (synopsis "Python-based static site publishing system")
2739 (description
2740 "Pelican is a tool to generate a static blog from reStructuredText,
2741Markdown input files, and more. Pelican uses Jinja2 for templating
2742and is very extensible.")
2743 (license agpl3+)))
2744
240ca4aa
RW
2745(define-public python-scikit-learn
2746 (package
2747 (name "python-scikit-learn")
be0a4c26 2748 (version "0.16.1")
240ca4aa
RW
2749 (source
2750 (origin
2751 (method url-fetch)
2752 (uri (string-append
2753 "https://github.com/scikit-learn/scikit-learn/archive/"
2754 version ".tar.gz"))
2755 (sha256
2756 (base32
be0a4c26 2757 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2758 (build-system python-build-system)
2759 (arguments
2760 `(#:phases
2761 (alist-cons-before
2f6b3d2e
RW
2762 'check 'set-HOME
2763 ;; some tests require access to "$HOME"
2764 (lambda _ (setenv "HOME" "/tmp"))
2765 ;; Tests can only be run after the library has been installed and not
2766 ;; within the source directory.
2767 (alist-cons-after
2768 'install 'check
2769 (lambda _
2770 (with-directory-excursion "/tmp"
2771 ;; With Python 3 one test of 3334 fails
2772 ;; (sklearn.tests.test_common.test_transformers); see
2773 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2774 (system* "nosetests" "-v" "sklearn")))
2775 (alist-delete 'check %standard-phases)))))
240ca4aa 2776 (inputs
2f6b3d2e 2777 `(("openblas" ,openblas)
240ca4aa
RW
2778 ("python-nose" ,python-nose)))
2779 (propagated-inputs
2780 `(("python-numpy" ,python-numpy)
2781 ("python-scipy" ,python-scipy)))
2782 (home-page "http://scikit-learn.org/")
2783 (synopsis "Machine Learning in Python")
2784 (description
2785 "Scikit-learn provides simple and efficient tools for data
2786mining and data analysis.")
2787 (license bsd-3)))
2788
2789(define-public python2-scikit-learn
2790 (let ((scikit (package-with-python2 python-scikit-learn)))
2791 (package (inherit scikit)
2792 (propagated-inputs
2793 `(("python2-numpy" ,python2-numpy)
2794 ("python2-scipy" ,python2-scipy)
2795 ,@(alist-delete
2796 "python-numpy"
2797 (alist-delete
2798 "python-scipy" (package-propagated-inputs scikit))))))))
2799
12f8f9bb
RW
2800(define-public python-scikit-image
2801 (package
2802 (name "python-scikit-image")
2803 (version "0.11.3")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (string-append
2808 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2809 version ".tar.gz"))
2810 (sha256
2811 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2812 (build-system python-build-system)
2813 (propagated-inputs
2814 `(("python-matplotlib" ,python-matplotlib)
2815 ("python-networkx" ,python-networkx)
2816 ("python-numpy" ,python-numpy)
2817 ("python-scipy" ,python-scipy)
2818 ("python-six" ,python-six)
2819 ("python-pillow" ,python-pillow)))
2820 (native-inputs
2821 `(("python-cython" ,python-cython)
2822 ("python-setuptools" ,python-setuptools)))
2823 (home-page "http://scikit-image.org/")
2824 (synopsis "Image processing in Python")
2825 (description
e881752c 2826 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2827 (license bsd-3)))
2828
2829(define-public python2-scikit-image
2830 (let ((scikit-image (package-with-python2 python-scikit-image)))
2831 (package (inherit scikit-image)
2832 (native-inputs
2833 `(("python2-mock" ,python2-mock)
2834 ,@(package-native-inputs scikit-image)))
2835 (propagated-inputs
2836 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2837 ("python2-matplotlib" ,python2-matplotlib)
2838 ("python2-numpy" ,python2-numpy)
2839 ("python2-scipy" ,python2-scipy)
2840 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2841 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2842
5394a6a6
RW
2843(define-public python-redis
2844 (package
2845 (name "python-redis")
2846 (version "2.10.3")
2847 (source
2848 (origin
2849 (method url-fetch)
2850 (uri (string-append
2851 "https://pypi.python.org/packages/source/r/redis/redis-"
2852 version ".tar.gz"))
2853 (sha256
2854 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2855 (build-system python-build-system)
2856 ;; Tests require a running Redis server
2857 (arguments '(#:tests? #f))
2858 (native-inputs
2859 `(("python-setuptools" ,python-setuptools)
2860 ("python-pytest" ,python-pytest)))
2861 (home-page "https://github.com/andymccurdy/redis-py")
2862 (synopsis "Redis Python client")
2863 (description
2864 "This package provides a Python interface to the Redis key-value store.")
2865 (license license:expat)))
2866
2867(define-public python2-redis
2868 (package-with-python2 python-redis))
2869
748cef5b
RW
2870(define-public python-rq
2871 (package
2872 (name "python-rq")
2873 (version "0.5.2")
2874 (source
2875 (origin
2876 (method url-fetch)
2877 (uri (string-append
2878 "https://pypi.python.org/packages/source/r/rq/rq-"
2879 version ".tar.gz"))
2880 (sha256
2881 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2882 (build-system python-build-system)
2883 (propagated-inputs
2884 `(("python-click" ,python-click)
2885 ("python-redis" ,python-redis)))
2886 (native-inputs
2887 `(("python-setuptools" ,python-setuptools)))
2888 (home-page "http://python-rq.org/")
2889 (synopsis "Simple job queues for Python")
2890 (description
2891 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2892processing them in the background with workers. It is backed by Redis and it
2893is designed to have a low barrier to entry.")
2894 (license bsd-2)))
2895
2896(define-public python2-rq
2897 (package-with-python2 python-rq))
2898
6888830b
FB
2899(define-public python-cython
2900 (package
2901 (name "python-cython")
56918e26 2902 (version "0.23.4")
6888830b
FB
2903 (source
2904 (origin
2905 (method url-fetch)
56918e26 2906 (uri (pypi-uri "Cython" version))
6888830b
FB
2907 (sha256
2908 (base32
56918e26 2909 "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
6888830b
FB
2910 (build-system python-build-system)
2911 ;; we need the full python package and not just the python-wrapper
2912 ;; because we need libpython3.3m.so
2913 (inputs
2914 `(("python" ,python)))
2915 (arguments
2916 `(#:phases
2917 (alist-cons-before
2918 'check 'set-HOME
2919 ;; some tests require access to "$HOME/.cython"
2920 (lambda* _ (setenv "HOME" "/tmp"))
2921 (alist-replace
2922 'check
2923 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2924 %standard-phases))))
2925 (home-page "http://cython.org/")
2926 (synopsis "C extensions for Python")
2927 (description "Cython is an optimising static compiler for both the Python
2928programming language and the extended Cython programming language. It makes
2929writing C extensions for Python as easy as Python itself.")
2930 (license asl2.0)))
2931
2932(define-public python2-cython
2933 (package (inherit (package-with-python2 python-cython))
2934 (name "python2-cython")
2935 (inputs
2936 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2937
2938;; This version of numpy is missing the documentation and is only used to
2939;; build matplotlib which is required to build numpy's documentation.
2940(define python-numpy-bootstrap
2941 (package
2942 (name "python-numpy-bootstrap")
2943 (version "1.9.1")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (string-append "mirror://sourceforge/numpy"
2948 "/numpy-" version ".tar.gz"))
2949 (sha256
2950 (base32
2951 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2952 (build-system python-build-system)
2953 (inputs
2954 `(("python-nose" ,python-nose)
cba256f8
RW
2955 ("openblas" ,openblas)
2956 ("lapack" ,lapack)))
0da98533 2957 (native-inputs
19afbea1 2958 `(("gfortran" ,gfortran)))
0da98533
FB
2959 (arguments
2960 `(#:phases
2961 (alist-cons-before
2962 'build 'set-environment-variables
2963 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2964 (call-with-output-file "site.cfg"
2965 (lambda (port)
cba256f8
RW
2966 (format port
2967 "[openblas]
dbdfe515
RW
2968libraries = openblas
2969library_dirs = ~a/lib
2970include_dirs = ~a/include
cba256f8
RW
2971
2972[lapack]
2973lapack_libs = lapack
2974library_dirs = ~a/lib
2975include_dirs = ~a/include
2976"
2977 (assoc-ref inputs "openblas")
2978 (assoc-ref inputs "openblas")
2979 (assoc-ref inputs "lapack")
2980 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2981 ;; Use "gcc" executable, not "cc".
2982 (substitute* "numpy/distutils/system_info.py"
2983 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2984 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2985 #t)
6a843168
FB
2986 ;; Tests can only be run after the library has been installed and not
2987 ;; within the source directory.
2988 (alist-cons-after
2989 'install 'check
89b5c60e 2990 (lambda _
6a843168 2991 (with-directory-excursion "/tmp"
89b5c60e 2992 (zero? (system* "python" "-c"
6a843168 2993 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
2994 (alist-delete
2995 'check
6a843168 2996 %standard-phases)))))
0da98533
FB
2997 (home-page "http://www.numpy.org/")
2998 (synopsis "Fundamental package for scientific computing with Python")
2999 (description "NumPy is the fundamental package for scientific computing
e881752c 3000with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3001object, sophisticated (broadcasting) functions, tools for integrating C/C++
3002and Fortran code, useful linear algebra, Fourier transform, and random number
3003capabilities.")
3004 (license bsd-3)))
3005
3006(define python2-numpy-bootstrap
3007 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3008
3a1bfe18
RW
3009(define-public python2-fastlmm
3010 (package
3011 (name "python2-fastlmm")
3012 (version "0.2.14")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (string-append
3017 "https://pypi.python.org/packages/source/f/fastlmm"
3018 "/fastlmm-" version ".zip"))
3019 (sha256
3020 (base32
3021 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:python ,python-2)) ; only Python 2.7 is supported
3025 (propagated-inputs
3026 `(("python2-numpy" ,python2-numpy)
3027 ("python2-scipy" ,python2-scipy)
3028 ("python2-matplotlib" ,python2-matplotlib)
3029 ("python2-pandas" ,python2-pandas)
3030 ("python2-scikit-learn" ,python2-scikit-learn)
3031 ("python2-cython" ,python2-cython)
3032 ("python2-pysnptools" ,python2-pysnptools)))
3033 (native-inputs
3034 `(("unzip" ,unzip)
3035 ("python2-mock" ,python2-mock)
3036 ("python2-setuptools" ,python2-setuptools)))
3037 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3038 (synopsis "Perform genome-wide association studies on large data sets")
3039 (description
3040 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3041Models, is a program for performing both single-SNP and SNP-set genome-wide
3042association studies (GWAS) on extremely large data sets.")
3043 (license asl2.0)))
3044
2ee8869a
FB
3045(define-public python-numpy
3046 (package (inherit python-numpy-bootstrap)
3047 (name "python-numpy")
3048 (outputs '("out" "doc"))
89b5c60e 3049 (inputs
2ee8869a
FB
3050 `(("which" ,which)
3051 ("python-setuptools" ,python-setuptools)
3052 ("python-matplotlib" ,python-matplotlib)
3053 ("python-sphinx" ,python-sphinx)
3054 ("python-pyparsing" ,python-pyparsing)
3055 ("python-numpydoc" ,python-numpydoc)
3056 ,@(package-inputs python-numpy-bootstrap)))
3057 (native-inputs
3058 `(("pkg-config" ,pkg-config)
3059 ("texlive" ,texlive)
3060 ("texinfo" ,texinfo)
3061 ("perl" ,perl)
3062 ,@(package-native-inputs python-numpy-bootstrap)))
3063 (arguments
89b5c60e 3064 `(,@(substitute-keyword-arguments
2ee8869a
FB
3065 (package-arguments python-numpy-bootstrap)
3066 ((#:phases phases)
3067 `(alist-cons-after
3068 'install 'install-doc
3069 (lambda* (#:key outputs #:allow-other-keys)
3070 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3071 (doc (string-append
3072 data "/doc/" ,name "-"
2ee8869a
FB
3073 ,(package-version python-numpy-bootstrap)))
3074 (info (string-append data "/info"))
3075 (html (string-append doc "/html"))
3076 (pyver ,(string-append "PYVER=")))
3077 (with-directory-excursion "doc"
3078 (mkdir-p html)
3079 (system* "make" "html" pyver)
3080 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3081 (system* "make" "-C" "build/latex"
2ee8869a
FB
3082 "all-pdf" "PAPER=a4" pyver)
3083 ;; FIXME: Generation of the info file fails.
3084 ;; (system* "make" "info" pyver)
3085 ;; (mkdir-p info)
3086 ;; (copy-file "build/texinfo/numpy.info"
3087 ;; (string-append info "/numpy.info"))
3088 (for-each (lambda (file)
3089 (copy-file (string-append "build/latex" file)
3090 (string-append doc file)))
3091 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3092 (with-directory-excursion "build/html"
3093 (for-each (lambda (file)
3094 (let* ((dir (dirname file))
3095 (tgt-dir (string-append html "/" dir)))
3096 (unless (equal? "." dir)
3097 (mkdir-p tgt-dir))
96c46210 3098 (install-file file html)))
2ee8869a
FB
3099 (find-files "." ".*"))))))
3100 ,phases)))))))
3101
764c077b
LC
3102(define-public python2-numpy
3103 (let ((numpy (package-with-python2 python-numpy)))
3104 (package (inherit numpy)
88c26834
AE
3105 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3106 ;; Python 2.
3107 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3108 ,@(alist-delete "python-matplotlib"
3109 (package-inputs numpy)))))))
2ee8869a 3110
15bfe6d6
FB
3111(define-public python-pyparsing
3112 (package
3113 (name "python-pyparsing")
e0669289 3114 (version "2.0.3")
15bfe6d6
FB
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (string-append "mirror://sourceforge/pyparsing"
3119 "/pyparsing-" version ".tar.gz"))
3120 (sha256
3121 (base32
e0669289 3122 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3123 (build-system python-build-system)
3124 (outputs '("out" "doc"))
3125 (arguments
3126 `(#:tests? #f ; no test target
3127 #:modules ((guix build python-build-system)
3128 (guix build utils))
3129 #:phases
3130 (alist-cons-after
3131 'install 'install-doc
3132 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3133 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3134 "/share/doc/" ,name "-" ,version))
3135 (html-doc (string-append doc "/html"))
3136 (examples (string-append doc "/examples")))
3137 (mkdir-p html-doc)
3138 (mkdir-p examples)
89b5c60e 3139 (for-each
15bfe6d6 3140 (lambda (dir tgt)
89b5c60e 3141 (map (lambda (file)
96c46210 3142 (install-file file tgt))
15bfe6d6
FB
3143 (find-files dir ".*")))
3144 (list "docs" "htmldoc" "examples")
3145 (list doc html-doc examples))))
3146 %standard-phases)))
3147 (home-page "http://pyparsing.wikispaces.com")
3148 (synopsis "Python parsing class library")
3149 (description
3150 "The pyparsing module is an alternative approach to creating and
3151executing simple grammars, vs. the traditional lex/yacc approach, or the use
3152of regular expressions. The pyparsing module provides a library of classes
3153that client code uses to construct the grammar directly in Python code.")
bd3fa666 3154 (license license:expat)))
15bfe6d6
FB
3155
3156(define-public python2-pyparsing
3157 (package-with-python2 python-pyparsing))
3158
ec00de35
FB
3159(define-public python-numpydoc
3160 (package
3161 (name "python-numpydoc")
3162 (version "0.5")
3163 (source
3164 (origin
3165 (method url-fetch)
89b5c60e 3166 (uri (string-append
ec00de35
FB
3167 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3168 version ".tar.gz"))
3169 (sha256
3170 (base32
5e4d8f67
AE
3171 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3172 (modules '((guix build utils)))
3173 (snippet
3174 '(begin
3175 ;; Drop a test requiring matplotlib, which we cannot add as an
3176 ;; input since it would create a circular dependency: Extend the
3177 ;; test for Python 3, where it is already dropped, to Python 2.
3178 (substitute* "numpydoc/tests/test_plot_directive.py"
3179 (("3") "2"))))))
ec00de35
FB
3180 (build-system python-build-system)
3181 (inputs
3182 `(("python-setuptools" ,python-setuptools)
3183 ("python-docutils" ,python-docutils)
3184 ("python-sphinx" ,python-sphinx)
3185 ("python-nose" ,python-nose)))
3186 (home-page "https://pypi.python.org/pypi/numpydoc")
3187 (synopsis
3188 "Numpy's Sphinx extensions")
3189 (description
3190 "Sphinx extension to support docstrings in Numpy format.")
3191 (license bsd-2)))
3192
3193(define-public python2-numpydoc
5e4d8f67 3194 (package-with-python2 python-numpydoc))
1c65314c 3195
1e656049
RW
3196(define-public python-numexpr
3197 (package
3198 (name "python-numexpr")
3199 (version "2.4.4")
3200 (source
3201 (origin
3202 (method url-fetch)
3203 (uri (string-append "https://pypi.python.org/packages/source/"
3204 "n/numexpr/numexpr-" version ".tar.gz"))
3205 (sha256
3206 (base32
3207 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3208 (build-system python-build-system)
3209 (arguments `(#:tests? #f)) ; no tests included
3210 (propagated-inputs
3211 `(("python-numpy" ,python-numpy)))
3212 (home-page "https://github.com/pydata/numexpr")
3213 (synopsis "Fast numerical expression evaluator for NumPy")
3214 (description
3215 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3216expressions that operate on arrays are accelerated and use less memory than
3217doing the same calculation in Python. In addition, its multi-threaded
3218capabilities can make use of all your cores, which may accelerate
3219computations, most specially if they are not memory-bounded (e.g. those using
3220transcendental functions).")
3221 (license license:expat)))
3222
3223(define-public python2-numexpr
3224 (let ((numexpr (package-with-python2 python-numexpr)))
3225 (package (inherit numexpr)
3226 ;; Make sure to use special packages for Python 2 instead
3227 ;; of those automatically rewritten by package-with-python2.
3228 (propagated-inputs
3229 `(("python2-numpy" ,python2-numpy)
3230 ,@(alist-delete "python-numpy"
3231 (package-propagated-inputs numexpr)))))))
3232
1c65314c
FB
3233(define-public python-matplotlib
3234 (package
3235 (name "python-matplotlib")
1bbc659f 3236 (version "1.4.3")
1c65314c
FB
3237 (source
3238 (origin
3239 (method url-fetch)
3240 (uri (string-append "mirror://sourceforge/matplotlib"
3241 "/matplotlib-" version ".tar.gz"))
3242 (sha256
3243 (base32
1bbc659f
FB
3244 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3245 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
1c65314c
FB
3246 (build-system python-build-system)
3247 (outputs '("out" "doc"))
25f9a068
FB
3248 (propagated-inputs ; the following packages are all needed at run time
3249 `(("python-pyparsing" ,python-pyparsing)
3250 ("python-pygobject" ,python-pygobject)
3251 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3252 ("python-tkinter" ,python "tk")
25f9a068
FB
3253 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3254 ;; from 'gtk+') provides the required 'typelib' files used by
3255 ;; 'gobject-introspection'. The location of these files is set with the
3256 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3257 ;; is done automatically by a 'native-search-path' procedure. However,
3258 ;; at run-time the user must set this variable as follows:
3259 ;;
3260 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3261 ("gtk+" ,gtk+)
3262 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3263 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3264 ;; object. For this reason we need to import both libraries.
3265 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3266 ("python-pycairo" ,python-pycairo)
3267 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3268 (inputs
3269 `(("python-setuptools" ,python-setuptools)
3270 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3271 ("python-six" ,python-six)
3272 ("python-pytz" ,python-pytz)
3273 ("python-numpy" ,python-numpy-bootstrap)
3274 ("python-sphinx" ,python-sphinx)
3275 ("python-numpydoc" ,python-numpydoc)
3276 ("python-nose" ,python-nose)
3277 ("python-mock" ,python-mock)
3278 ("libpng" ,libpng)
3279 ("imagemagick" ,imagemagick)
3280 ("freetype" ,freetype)
25f9a068
FB
3281 ("cairo" ,cairo)
3282 ("glib" ,glib)
4e7a137a 3283 ("python-pillow" ,python-pillow)
1c65314c 3284 ;; FIXME: Add backends when available.
1c65314c
FB
3285 ;("python-wxpython" ,python-wxpython)
3286 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3287 ("tcl" ,tcl)
3288 ("tk" ,tk)))
1c65314c
FB
3289 (native-inputs
3290 `(("pkg-config" ,pkg-config)
3291 ("texlive" ,texlive)
3292 ("texinfo" ,texinfo)))
3293 (arguments
3294 `(#:phases
25f9a068
FB
3295 (alist-cons-before
3296 'build 'configure-environment
3297 (lambda* (#:key outputs inputs #:allow-other-keys)
3298 (let ((cairo (assoc-ref inputs "cairo"))
3299 (gtk+ (assoc-ref inputs "gtk+")))
3300 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3301 ;; has not effect.
25f9a068
FB
3302 (setenv "LD_LIBRARY_PATH"
3303 (string-append cairo "/lib:" gtk+ "/lib"))
3304 (setenv "HOME" (getcwd))
3305 (call-with-output-file "setup.cfg"
3306 (lambda (port)
1bbc659f
FB
3307 (format port "[directories]~%
3308basedirlist = ~a,~a~%
3309[rc_options]~%
3310backend = TkAgg~%"
3311 (assoc-ref inputs "tcl")
3312 (assoc-ref inputs "tk"))))))
25f9a068
FB
3313 (alist-cons-after
3314 'install 'install-doc
3315 (lambda* (#:key outputs #:allow-other-keys)
3316 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3317 (doc (string-append data "/doc/" ,name "-" ,version))
3318 (info (string-append data "/info"))
3319 (html (string-append doc "/html")))
3320 (with-directory-excursion "doc"
25f9a068
FB
3321 ;; Produce pdf in 'A4' format.
3322 (substitute* (find-files "." "conf\\.py")
3323 (("latex_paper_size = 'letter'")
3324 "latex_paper_size = 'a4'"))
3325 (mkdir-p html)
3326 (mkdir-p info)
3327 ;; The doc recommends to run the 'html' target twice.
3328 (system* "python" "make.py" "html")
3329 (system* "python" "make.py" "html")
18b31516 3330 (copy-recursively "build/html" html)
25f9a068
FB
3331 (system* "python" "make.py" "latex")
3332 (system* "python" "make.py" "texinfo")
18b31516
FB
3333 (symlink (string-append html "/_images")
3334 (string-append info "/matplotlib-figures"))
3335 (with-directory-excursion "build/texinfo"
3336 (substitute* "matplotlib.texi"
3337 (("@image\\{([^,]*)" all file)
3338 (string-append "@image{matplotlib-figures/" file)))
3339 (symlink (string-append html "/_images")
3340 "./matplotlib-figures")
3341 (system* "makeinfo" "--no-split"
3342 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3343 (copy-file "build/texinfo/matplotlib.info"
3344 (string-append info "/matplotlib.info"))
3345 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3346 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3347 %standard-phases))))
1c65314c
FB
3348 (home-page "http://matplotlib.org")
3349 (synopsis "2D plotting library for Python")
3350 (description
3351 "Matplotlib is a Python 2D plotting library which produces publication
3352quality figures in a variety of hardcopy formats and interactive environments
3353across platforms. Matplotlib can be used in Python scripts, the python and
3354ipython shell, web application servers, and six graphical user interface
3355toolkits.")
3356 (license psfl)))
3357
764c077b
LC
3358(define-public python2-matplotlib
3359 (let ((matplotlib (package-with-python2 python-matplotlib)))
3360 (package (inherit matplotlib)
88c26834
AE
3361 ;; Make sure to use special packages for Python 2 instead
3362 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3363 (propagated-inputs
7ca0dbc3 3364 `(("python2-pycairo" ,python2-pycairo)
764c077b 3365 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3366 ("python2-tkinter" ,python-2 "tk")
3367 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3368 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3369
0dde6232
RW
3370(define-public python2-pysnptools
3371 (package
3372 (name "python2-pysnptools")
3373 (version "0.2.13")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (string-append
3378 "https://pypi.python.org/packages/source/p/pysnptools"
3379 "/pysnptools-" version ".zip"))
3380 (sha256
3381 (base32
3382 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3383 (build-system python-build-system)
3384 (arguments
3385 `(#:python ,python-2)) ; only Python 2.7 is supported
3386 (propagated-inputs
3387 `(("python2-numpy" ,python2-numpy)
3388 ("python2-scipy" ,python2-scipy)
3389 ("python2-pandas" ,python2-pandas)
3390 ("python2-cython" ,python2-cython)))
3391 (native-inputs
3392 `(("unzip" ,unzip)
3393 ("python2-setuptools" ,python2-setuptools)))
3394 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3395 (synopsis "Library for reading and manipulating genetic data")
3396 (description
3397 "PySnpTools is a library for reading and manipulating genetic data. It
3398can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3399those files. It can also efficiently manipulate ranges of integers using set
3400operators such as union, intersection, and difference.")
3401 (license asl2.0)))
3402
c9b1b4f9
RW
3403(define-public python-rpy2
3404 (package
3405 (name "python-rpy2")
3406 (version "2.6.0")
3407 (source
3408 (origin
3409 (method url-fetch)
3410 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
3411 "/rpy2-" version ".tar.gz"))
3412 (sha256
3413 (base32
3414 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
3415 (build-system python-build-system)
3416 (inputs
3417 `(("python-six" ,python-six)
3418 ("readline" ,readline)
3419 ("icu4c" ,icu4c)
3420 ("pcre" ,pcre)
3421 ("r" ,r)))
3422 (native-inputs
5ff6575b
RW
3423 `(("python-setuptools" ,python-setuptools)
3424 ("zlib" ,zlib)))
c9b1b4f9
RW
3425 (home-page "http://rpy.sourceforge.net/")
3426 (synopsis "Python interface to the R language")
3427 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3428low-level interface to R from Python, a proposed high-level interface,
3429including wrappers to graphical libraries, as well as R-like structures and
3430functions.")
3431 (license gpl3+)))
3432
3433(define-public python2-rpy2
3434 (let ((rpy2 (package-with-python2 python-rpy2)))
3435 (package (inherit rpy2)
3436 (native-inputs
3437 `(("python2-singledispatch" ,python2-singledispatch)
3438 ,@(package-native-inputs rpy2))))))
3439
bb986599
FB
3440(define-public python-scipy
3441 (package
3442 (name "python-scipy")
ba8a0824 3443 (version "0.16.0")
bb986599
FB
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3448 "/scipy-" version ".tar.xz"))
bb986599
FB
3449 (sha256
3450 (base32
ba8a0824 3451 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3452 (build-system python-build-system)
dd86c0d1 3453 (propagated-inputs
bb986599
FB
3454 `(("python-numpy" ,python-numpy)
3455 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3456 ("python-pyparsing" ,python-pyparsing)))
3457 (inputs
3458 `(("lapack" ,lapack)
719b01c1 3459 ("openblas" ,openblas)))
bb986599 3460 (native-inputs
dd86c0d1
RW
3461 `(("python-nose" ,python-nose)
3462 ("python-sphinx" ,python-sphinx)
5248d49e 3463 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3464 ("gfortran" ,gfortran)
bb986599
FB
3465 ("texlive" ,texlive)
3466 ("perl" ,perl)))
3467 (outputs '("out" "doc"))
3468 (arguments
3469 `(#:phases
3470 (alist-cons-before
719b01c1 3471 'build 'configure-openblas
bb986599 3472 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3473 (call-with-output-file "site.cfg"
3474 (lambda (port)
3475 (format port
3476 "[blas]
3477libraries = openblas
3478library_dirs = ~a/lib
3479include_dirs = ~a/include
3480[atlas]
3481library_dirs = ~a/lib
3482atlas_libs = openblas
3483"
3484 (assoc-ref inputs "openblas")
3485 (assoc-ref inputs "openblas")
3486 (assoc-ref inputs "openblas"))))
3487 #t)
bb986599
FB
3488 (alist-cons-after
3489 'install 'install-doc
3490 (lambda* (#:key outputs #:allow-other-keys)
3491 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3492 (doc (string-append data "/doc/" ,name "-" ,version))
3493 (html (string-append doc "/html"))
3494 (pyver ,(string-append "PYVER=")))
3495 (with-directory-excursion "doc"
bb986599
FB
3496 ;; Fix generation of images for mathematical expressions.
3497 (substitute* (find-files "source" "conf\\.py")
3498 (("pngmath_use_preview = True")
3499 "pngmath_use_preview = False"))
3500 (mkdir-p html)
3501 (system* "make" "html" pyver)
3502 (system* "make" "latex" "PAPER=a4" pyver)
3503 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3504 (copy-file "build/latex/scipy-ref.pdf"
3505 (string-append doc "/scipy-ref.pdf"))
3506 (with-directory-excursion "build/html"
3507 (for-each (lambda (file)
3508 (let* ((dir (dirname file))
3509 (tgt-dir (string-append html "/" dir)))
96c46210 3510 (install-file file html)))
bb986599
FB
3511 (find-files "." ".*"))))))
3512 ;; Tests can only be run after the library has been installed and not
3513 ;; within the source directory.
3514 (alist-cons-after
3515 'install 'check
89b5c60e 3516 (lambda _
bb986599
FB
3517 (with-directory-excursion "/tmp"
3518 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3519 (alist-delete
3520 'check
4f9ff21e
RW
3521 (alist-cons-after
3522 'unpack 'fix-tests
3523 (lambda _
3524 (substitute* "scipy/integrate/tests/test_quadpack.py"
3525 (("libm.so") "libm.so.6"))
3526 #t)
3527 %standard-phases)))))))
bb986599
FB
3528 (home-page "http://www.scipy.org/")
3529 (synopsis "The Scipy library provides efficient numerical routines")
3530 (description "The SciPy library is one of the core packages that make up
3531the SciPy stack. It provides many user-friendly and efficient numerical
3532routines such as routines for numerical integration and optimization.")
3533 (license bsd-3)))
3534
764c077b
LC
3535(define-public python2-scipy
3536 (let ((scipy (package-with-python2 python-scipy)))
3537 (package (inherit scipy)
3538 ;; Use packages customized for python-2.
dd86c0d1
RW
3539 (propagated-inputs
3540 `(("python2-matplotlib" ,python2-matplotlib)
3541 ("python2-numpy" ,python2-numpy)
3542 ,@(alist-delete "python-matplotlib"
3543 (alist-delete "python-numpy"
3544 (package-propagated-inputs scipy))))))))
bb986599 3545
94914805
EB
3546(define-public python-sqlalchemy
3547 (package
3548 (name "python-sqlalchemy")
3549 (version "0.9.7")
3550 (source
3551 (origin
3552 (method url-fetch)
3553 (uri (string-append "https://pypi.python.org/packages/source/S/"
3554 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3555 (sha256
3556 (base32
3557 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3558 (build-system python-build-system)
3559 (native-inputs
3560 `(("python-cython" ,python-cython) ;for c extensions
3561 ("python-pytest" ,python-pytest)
3562 ("python-mock" ,python-mock))) ;for tests
3563 (arguments
3564 `(#:phases (alist-replace
3565 'check
3566 (lambda _ (zero? (system* "py.test")))
3567 %standard-phases)))
3568 (home-page "http://www.sqlalchemy.org")
3569 (synopsis "Database abstraction library")
3570 (description
3571 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3572gives application developers the full power and flexibility of SQL. It
3573provides a full suite of well known enterprise-level persistence patterns,
3574designed for efficient and high-performing database access, adapted into a
3575simple and Pythonic domain language.")
3576 (license x11)))
3577
3578(define-public python2-sqlalchemy
3579 (package-with-python2 python-sqlalchemy))
c937562e 3580
1671c07c
EB
3581(define-public python-distutils-extra
3582 (package
3583 (name "python-distutils-extra")
3584 (version "2.38")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3589 version "/+download/python-distutils-extra-"
3590 version ".tar.gz"))
3591 (sha256
3592 (base32
3593 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3594 (build-system python-build-system)
3595 (native-inputs
3596 `(("python-setuptools" ,python-setuptools)))
3597 (home-page "https://launchpad.net/python-distutils-extra/")
3598 (synopsis "Enhancements to Python's distutils")
3599 (description
3600 "The python-distutils-extra module enables you to easily integrate
3601gettext support, themed icons, and scrollkeeper-based documentation into
3602Python's distutils.")
3603 (license gpl2)))
3604
3605(define-public python2-distutils-extra
3606 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3607
3608(define-public python2-elib.intl
3609 (package
3610 (name "python2-elib.intl")
3611 (version "0.0.3")
3612 (source
3613 (origin
3614 ;; This project doesn't tag releases or publish tarballs, so we take
3615 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3616 (method git-fetch)
3617 (uri (git-reference
3618 (url "https://github.com/dieterv/elib.intl.git")
3619 (commit "d09997cfef")))
3620 (sha256
3621 (base32
3622 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3623 (build-system python-build-system)
3624 (native-inputs
3625 `(("python2-setuptools" ,python2-setuptools)))
3626 (arguments
3627 ;; incompatible with Python 3 (exception syntax)
3628 `(#:python ,python-2
3629 #:tests? #f
3630 ;; With standard flags, the install phase attempts to create a zip'd
3631 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3632 ;; before 1980'
3633 #:configure-flags '("--single-version-externally-managed"
3634 "--record=elib.txt")))
3635 (home-page "https://github.com/dieterv/elib.intl")
3636 (synopsis "Enhanced internationalization for Python")
3637 (description
3638 "The elib.intl module provides enhanced internationalization (I18N)
3639services for your Python modules and applications.")
3640 (license lgpl3+)))
3641
c937562e
EB
3642(define-public python-pillow
3643 (package
3644 (name "python-pillow")
7fbee931 3645 (version "3.0.0")
c937562e
EB
3646 (source
3647 (origin
3648 (method url-fetch)
3649 (uri (string-append "https://pypi.python.org/packages/source/P/"
3650 "Pillow/Pillow-" version ".tar.gz"))
3651 (sha256
3652 (base32
7fbee931 3653 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
c937562e
EB
3654 (build-system python-build-system)
3655 (native-inputs
3656 `(("python-setuptools" ,python-setuptools)
3657 ("python-nose" ,python-nose)))
3658 (inputs
5ff408d9
SB
3659 `(("freetype" ,freetype)
3660 ("lcms" ,lcms)
c937562e
EB
3661 ("zlib" ,zlib)
3662 ("libjpeg" ,libjpeg)
3663 ("openjpeg" ,openjpeg)
5ff408d9
SB
3664 ("libtiff" ,libtiff)
3665 ("libwebp" ,libwebp)))
c937562e
EB
3666 (propagated-inputs
3667 `(;; Used at runtime for pkg_resources
3668 ("python-setuptools" ,python-setuptools)))
3669 (arguments
e5358a6b
LC
3670 `(#:phases (modify-phases %standard-phases
3671 (add-before
3672 'install 'disable-egg-compression
3673 (lambda _
3674 ;; Leave the .egg uncompressed since compressing it would
3675 ;; prevent the GC from identifying run-time dependencies.
3676 ;; See <http://bugs.gnu.org/20765>.
3677 (let ((port (open-file "setup.cfg" "a")))
3678 (display "\n[easy_install]\nzip_ok = 0\n"
3679 port)
3680 (close-port port)
3681 #t)))
3682 (add-after
3683 'install 'check-installed
3684 (lambda _
3685 (begin
3686 (setenv "HOME" (getcwd))
3687 (and (zero? (system* "python" "selftest.py"
3688 "--installed"))
3689 (zero? (system* "python" "test-installed.py"))))))
3690 (delete 'check))))
c937562e
EB
3691 (home-page "https://pypi.python.org/pypi/Pillow")
3692 (synopsis "Fork of the Python Imaging Library")
3693 (description
3694 "The Python Imaging Library adds image processing capabilities to your
3695Python interpreter. This library provides extensive file format support, an
3696efficient internal representation, and fairly powerful image processing
3697capabilities. The core image library is designed for fast access to data
3698stored in a few basic pixel formats. It should provide a solid foundation for
3699a general image processing tool.")
3700 (license (x11-style
3701 "http://www.pythonware.com/products/pil/license.htm"
3702 "The PIL Software License"))))
3703
3704(define-public python2-pillow
3705 (package-with-python2 python-pillow))
bb986599 3706
a415f036
FB
3707(define-public python-pycparser
3708 (package
3709 (name "python-pycparser")
3710 (version "2.10")
3711 (source
3712 (origin
3713 (method url-fetch)
3714 (uri (string-append "https://pypi.python.org/packages/source/p/"
3715 "pycparser/pycparser-" version ".tar.gz"))
3716 (sha256
3717 (base32
3718 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3719 (outputs '("out" "doc"))
3720 (build-system python-build-system)
3721 (native-inputs
3722 `(("pkg-config" ,pkg-config)
3723 ("python-setuptools" ,python-setuptools)))
3724 (arguments
89b5c60e 3725 `(#:phases
a415f036
FB
3726 (alist-replace
3727 'check
3728 (lambda _
3729 (with-directory-excursion "tests"
3730 (zero? (system* "python" "all_tests.py"))))
3731 (alist-cons-after
3732 'install 'install-doc
3733 (lambda* (#:key outputs #:allow-other-keys)
3734 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3735 (doc (string-append data "/doc/" ,name "-" ,version))
3736 (examples (string-append doc "/examples")))
3737 (mkdir-p examples)
3738 (for-each (lambda (file)
3739 (copy-file (string-append "." file)
3740 (string-append doc file)))
3741 '("/README.rst" "/CHANGES" "/LICENSE"))
3742 (copy-recursively "examples" examples)))
3743 %standard-phases))))
3744 (home-page "https://github.com/eliben/pycparser")
3745 (synopsis "C parser in Python")
3746 (description
3747 "Pycparser is a complete parser of the C language, written in pure Python
3748using the PLY parsing library. It parses C code into an AST and can serve as
3749a front-end for C compilers or analysis tools.")
3750 (license bsd-3)))
3751
3752(define-public python2-pycparser
3753 (package-with-python2 python-pycparser))
57c3f716
FB
3754
3755(define-public python-cffi
3756 (package
3757 (name "python-cffi")
4179f952 3758 (version "1.2.1")
57c3f716
FB
3759 (source
3760 (origin
3761 (method url-fetch)
3762 (uri (string-append "https://pypi.python.org/packages/source/c/"
3763 "cffi/cffi-" version ".tar.gz"))
89b5c60e 3764 (sha256
4179f952 3765 (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga"))))
57c3f716
FB
3766 (build-system python-build-system)
3767 (outputs '("out" "doc"))
3768 (inputs
3769 `(("libffi" ,libffi)))
3770 (propagated-inputs ; required at run-time
3771 `(("python-pycparser" ,python-pycparser)))
3772 (native-inputs
3773 `(("pkg-config" ,pkg-config)
3774 ("python-sphinx" ,python-sphinx)
4179f952 3775 ("python-pytest" ,python-pytest)
57c3f716
FB
3776 ("python-setuptools" ,python-setuptools)))
3777 (arguments
4179f952 3778 `(#:phases
57c3f716
FB
3779 (alist-cons-after
3780 'install 'install-doc
3781 (lambda* (#:key outputs #:allow-other-keys)
3782 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3783 (doc (string-append data "/doc/" ,name "-" ,version))
3784 (html (string-append doc "/html")))
3785 (with-directory-excursion "doc"
3786 (system* "make" "html")
3787 (mkdir-p html)
3788 (copy-recursively "build/html" html))
3789 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3790 %standard-phases)))
3791 (home-page "http://cffi.readthedocs.org")
3792 (synopsis "Foreign function interface for Python")
3793 (description
3794 "Foreign Function Interface for Python calling C code.")
bd3fa666 3795 (license license:expat)))
57c3f716
FB
3796
3797(define-public python2-cffi
3798 (package-with-python2 python-cffi))
6fa14469
FB
3799
3800(define-public python-xcffib
3801 (package
3802 (name "python-xcffib")
3803 (version "0.1.9")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (string-append "https://pypi.python.org/packages/source/x/"
3808 "xcffib/xcffib-" version ".tar.gz"))
3809 (sha256
3810 (base32
3811 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3812 (build-system python-build-system)
3813 (inputs
3814 `(("libxcb" ,libxcb)
3815 ("python-six" ,python-six)))
3816 (native-inputs
3817 `(("python-setuptools" ,python-setuptools)))
3818 (propagated-inputs
3819 `(("python-cffi" ,python-cffi))) ; used at run time
3820 (arguments
89b5c60e 3821 `(#:phases
6fa14469
FB
3822 (alist-cons-after
3823 'install 'install-doc
3824 (lambda* (#:key outputs #:allow-other-keys)
3825 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3826 "/doc/" ,name "-" ,version)))
3827 (mkdir-p doc)
3828 (copy-file "README.md"
3829 (string-append doc "/README.md"))))
3830 %standard-phases)))
3831 (home-page "https://github.com/tych0/xcffib")
3832 (synopsis "XCB Python bindings")
3833 (description
3834 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3835support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3836 (license license:expat)))
6fa14469
FB
3837
3838(define-public python2-xcffib
3839 (package-with-python2 python-xcffib))
3840
9e099723
FB
3841(define-public python-cairocffi
3842 (package
3843 (name "python-cairocffi")
3844 (version "0.6")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 ;; The archive on pypi is missing the 'utils' directory!
3849 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3850 version ".tar.gz"))
f586c877 3851 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3852 (sha256
3853 (base32
3854 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3855 (build-system python-build-system)
3856 (outputs '("out" "doc"))
3857 (inputs
3858 `(("gdk-pixbuf" ,gdk-pixbuf)
3859 ("cairo" ,cairo)))
3860 (native-inputs
3861 `(("pkg-config" ,pkg-config)
3862 ("python-sphinx" ,python-sphinx)
3863 ("python-docutils" ,python-docutils)
3864 ("python-setuptools" ,python-setuptools)))
3865 (propagated-inputs
3866 `(("python-xcffib" ,python-xcffib))) ; used at run time
3867 (arguments
89b5c60e 3868 `(#:phases
9e099723
FB
3869 (alist-cons-after
3870 'install 'install-doc
3871 (lambda* (#:key inputs outputs #:allow-other-keys)
3872 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3873 (doc (string-append data "/doc/" ,name "-" ,version))
3874 (html (string-append doc "/html")))
89b5c60e 3875 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3876 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3877 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3878 (setenv "LANG" "en_US.UTF-8")
3879 (mkdir-p html)
3880 (for-each (lambda (file)
3881 (copy-file (string-append "." file)
3882 (string-append doc file)))
3883 '("/README.rst" "/CHANGES" "/LICENSE"))
3884 (system* "python" "setup.py" "build_sphinx")
3885 (copy-recursively "docs/_build/html" html)))
3886 %standard-phases)))
3887 (home-page "https://github.com/SimonSapin/cairocffi")
3888 (synopsis "Python bindings and object-oriented API for Cairo")
3889 (description
3890 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3891Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3892graphics library with support for multiple backends including image buffers,
3893PNG, PostScript, PDF, and SVG file output.")
3894 (license bsd-3)))
3895
3896(define-public python2-cairocffi
3897 (package-with-python2 python-cairocffi))
3898
3cff95cb
RW
3899(define-public python-decorator
3900 (package
3901 (name "python-decorator")
3902 (version "3.4.2")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (string-append
3907 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3908 version ".tar.gz"))
3909 (sha256
3910 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3911 (build-system python-build-system)
3912 (arguments '(#:tests? #f)) ; no test target
3913 (native-inputs
3914 `(("python-setuptools" ,python-setuptools)))
3915 (home-page "http://pypi.python.org/pypi/decorator/")
3916 (synopsis "Python module to simplify usage of decorators")
3917 (description
3918 "The aim of the decorator module is to simplify the usage of decorators
3919for the average programmer, and to popularize decorators usage giving examples
3920of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3921etc. The core of this module is a decorator factory.")
3922 (license license:expat)))
3923
3924(define-public python2-decorator
3925 (package-with-python2 python-decorator))
3926
2c0499ad
RW
3927(define-public python-drmaa
3928 (package
3929 (name "python-drmaa")
3930 (version "0.7.6")
3931 (source
3932 (origin
3933 (method url-fetch)
3934 (uri (string-append
3935 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3936 version ".tar.gz"))
3937 (sha256
3938 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3939 (build-system python-build-system)
3940 ;; The test suite requires libdrmaa which is provided by the cluster
3941 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3942 ;; should be set to the path of the libdrmaa library.
3943 (arguments '(#:tests? #f))
3944 (native-inputs
3945 `(("python-nose" ,python-nose)
3946 ("python-setuptools" ,python-setuptools)))
3947 (home-page "https://pypi.python.org/pypi/drmaa")
3948 (synopsis "Python bindings for the DRMAA library")
3949 (description
3950 "A Python package for Distributed Resource Management (DRM) job
3951submission and control. This package is an implementation of the DRMAA 1.0
3952Python language binding specification.")
3953 (license bsd-3)))
3954
3955(define-public python2-drmaa
3956 (package-with-python2 python-drmaa))
3957
d05c6da0
RW
3958(define-public python-gridmap
3959 (package
3960 (name "python-gridmap")
3961 (version "0.13.0")
3962 (source
3963 (origin
3964 (method url-fetch)
3965 (uri (string-append
3966 "https://github.com/pygridtools/gridmap/archive/v"
3967 version ".tar.gz"))
3968 (file-name (string-append name "-" version ".tar.gz"))
3969 (sha256
3970 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3971 (build-system python-build-system)
3972 (inputs
3973 `(("python-psutil" ,python-psutil)
3974 ("python-drmaa" ,python-drmaa)
3975 ("python-pyzmq" ,python-pyzmq)))
3976 (native-inputs
3977 `(("python-setuptools" ,python-setuptools)))
3978 (home-page "https://github.com/pygridtools/gridmap")
3979 (synopsis "Create jobs on a cluster directly from Python")
3980 (description
3981 "Gridmap is a Python package to allow you to easily create jobs on the
3982cluster directly from Python. You can directly map Python functions onto the
3983cluster without needing to write any wrapper code yourself.")
3984 (license gpl3+)))
3985
3986(define-public python2-gridmap
3987 (package-with-python2 python-gridmap))
3988
cb6d5c54
RW
3989(define-public python-pexpect
3990 (package
3991 (name "python-pexpect")
3992 (version "3.3")
3993 (source
3994 (origin
3995 (method url-fetch)
3996 (uri (string-append "https://pypi.python.org/packages/source/p/"
3997 "pexpect/pexpect-" version ".tar.gz"))
3998 (sha256
3999 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4000 (build-system python-build-system)
4001 (arguments
4002 `(#:phases
4003 (modify-phases %standard-phases
4004 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4005 (native-inputs
4006 `(("python-nose" ,python-nose)))
4007 (home-page "http://pexpect.readthedocs.org/")
4008 (synopsis "Controlling interactive console applications")
4009 (description
4010 "Pexpect is a pure Python module for spawning child applications;
4011controlling them; and responding to expected patterns in their output.
4012Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4013child application and control it as if a human were typing commands.")
4014 (license isc)))
4015
4016(define-public python2-pexpect
4017 (package-with-python2 python-pexpect))
4018
229ad120
RW
4019(define-public python-setuptools-scm
4020 (package
4021 (name "python-setuptools-scm")
383af6b0 4022 (version "1.9.0")
229ad120
RW
4023 (source (origin
4024 (method url-fetch)
383af6b0 4025 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4026 (sha256
4027 (base32
383af6b0 4028 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4029 (build-system python-build-system)
383af6b0 4030 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4031 (home-page "https://github.com/pypa/setuptools_scm/")
4032 (synopsis "Manage Python package versions in SCM metadata")
4033 (description
383af6b0 4034 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4035@dfn{software configuration management} (SCM) metadata instead of declaring
4036them as the version argument or in a SCM managed file.")
4037 (license license:expat)))
4038
4039(define-public python2-setuptools-scm
4040 (package-with-python2 python-setuptools-scm))
4041
b74270ee
RW
4042(define-public python-pathpy
4043 (package
4044 (name "python-pathpy")
4045 (version "8.1.1")
4046 (source
4047 (origin
4048 (method url-fetch)
4049 (uri (string-append "https://pypi.python.org/packages/source/p/"
4050 "path.py/path.py-" version ".tar.gz"))
4051 (sha256
4052 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4053 (build-system python-build-system)
4054 (propagated-inputs
4055 `(("python-appdirs" ,python-appdirs)))
4056 (native-inputs
553b709b
EF
4057 `(("python-setuptools" ,python-setuptools)
4058 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4059 ("python-pytest" ,python-pytest)
4060 ("python-pytest-runner" ,python-pytest-runner)))
4061 (home-page "http://github.com/jaraco/path.py")
4062 (synopsis "Python module wrapper for built-in os.path")
4063 (description
4064 "@code{path.py} implements path objects as first-class entities, allowing
4065common operations on files to be invoked on those path objects directly.")
4066 (license license:expat)))
4067
4068(define-public python2-pathpy
4069 (package-with-python2 python-pathpy))
4070
0d34e01b
RW
4071(define-public python-pickleshare
4072 (package
4073 (name "python-pickleshare")
4074 (version "0.5")
4075 (source
4076 (origin
4077 (method url-fetch)
4078 (uri (string-append "https://pypi.python.org/packages/source/p/"
4079 "pickleshare/pickleshare-" version ".tar.gz"))
4080 (sha256
4081 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4082 (build-system python-build-system)
4083 (propagated-inputs
4084 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4085 (native-inputs
4086 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4087 (home-page "https://github.com/vivainio/pickleshare")
4088 (synopsis "Tiny key value database with concurrency support")
4089 (description
4090 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4091Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4092shelve, many processes can access the database simultaneously. Changing a
4093value in database is immediately visible to other processes accessing the same
4094database. Concurrency is possible because the values are stored in separate
4095files. Hence the “database” is a directory where all files are governed by
4096PickleShare.")
4097 (license license:expat)))
4098
4099(define-public python2-pickleshare
4100 (package-with-python2 python-pickleshare))
4101
cd6e5189
RW
4102(define-public python-simplegeneric
4103 (package
4104 (name "python-simplegeneric")
4105 (version "0.8.1")
4106 (source
4107 (origin
4108 (method url-fetch)
4109 (uri (string-append "https://pypi.python.org/packages/source/s/"
4110 "simplegeneric/simplegeneric-" version ".zip"))
4111 (sha256
4112 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4113 (build-system python-build-system)
4114 (native-inputs
69b96e5e
RW
4115 `(("python-setuptools" ,python-setuptools)
4116 ("unzip" ,unzip)))
cd6e5189
RW
4117 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4118 (synopsis "Python module for simple generic functions")
4119 (description
4120 "The simplegeneric module lets you define simple single-dispatch generic
4121functions, akin to Python’s built-in generic functions like @code{len()},
4122@code{iter()} and so on. However, instead of using specially-named methods,
4123these generic functions use simple lookup tables, akin to those used by
4124e.g. @code{pickle.dump()} and other generic functions found in the Python
4125standard library.")
4126 (license zpl2.1)))
4127
4128(define-public python2-simplegeneric
4129 (package-with-python2 python-simplegeneric))
4130
ddc7d8ed
RW
4131(define-public python-ipython-genutils
4132 (package
4133 (name "python-ipython-genutils")
4134 (version "0.1.0")
4135 (source
4136 (origin
4137 (method url-fetch)
4138 (uri (string-append "https://pypi.python.org/packages/source/i/"
4139 "ipython_genutils/ipython_genutils-"
4140 version ".tar.gz"))
4141 (sha256
4142 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4143 (build-system python-build-system)
4144 (arguments `(#:tests? #f)) ; no tests
4145 (home-page "http://ipython.org")
4146 (synopsis "Vestigial utilities from IPython")
4147 (description
4148 "This package provides retired utilities from IPython.")
4149 (license bsd-3)))
4150
4151(define-public python2-ipython-genutils
4152 (package-with-python2 python-ipython-genutils))
4153
2b10eb48
RW
4154(define-public python-traitlets
4155 (package
4156 (name "python-traitlets")
4157 (version "4.0.0")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (string-append "https://pypi.python.org/packages/source/t/"
4162 "traitlets/traitlets-" version ".tar.gz"))
4163 (sha256
4164 (base32
4165 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4166 (build-system python-build-system)
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4171 (propagated-inputs
4172 `(("python-ipython-genutils" ,python-ipython-genutils)
4173 ("python-decorator" ,python-decorator)))
4174 (native-inputs
4175 `(("python-nose" ,python-nose)))
4176 (home-page "http://ipython.org")
4177 (synopsis "Configuration system for Python applications")
4178 (description
4179 "Traitlets is a framework that lets Python classes have attributes with
4180type checking, dynamically calculated default values, and ‘on change’
4181callbacks. The package also includes a mechanism to use traitlets for
4182configuration, loading values from files or from command line arguments. This
4183is a distinct layer on top of traitlets, so you can use traitlets in your code
4184without using the configuration machinery.")
4185 (license bsd-3)))
4186
4187(define-public python2-traitlets
4188 (package-with-python2 python-traitlets))
4189
ae1ab9fe
FB
4190(define-public python-ipython
4191 (package
4192 (name "python-ipython")
3a0b1b9a 4193 (version "3.2.1")
ae1ab9fe
FB
4194 (source
4195 (origin
fceac880
FB
4196 (method url-fetch)
4197 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4198 (uri (string-append "https://pypi.python.org/packages/source/i/"
4199 "ipython/ipython-" version ".tar.gz"))
4200 (sha256
4201 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4202 (build-system python-build-system)
4203 (outputs '("out" "doc"))
3a0b1b9a
FB
4204 (propagated-inputs
4205 `(("python-pyzmq" ,python-pyzmq)
4206 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4207 (inputs
4208 `(("readline" ,readline)
3a0b1b9a 4209 ("which" ,which)
ae1ab9fe 4210 ("python-matplotlib" ,python-matplotlib)
5d26e542 4211 ("python-numpy" ,python-numpy)
ae1ab9fe 4212 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4213 ("python-jinja2" ,python-jinja2)
4214 ("python-mistune" ,python-mistune)
4215 ("python-jsonschema" ,python-jsonschema)
4216 ("python-pygments" ,python-pygments)
4217 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4218 ("python-nose" ,python-nose)))
4219 (native-inputs
4220 `(("pkg-config" ,pkg-config)
4221 ("python-sphinx" ,python-sphinx)
4222 ("texlive" ,texlive)
4223 ("texinfo" ,texinfo)
4224 ("python-setuptools" ,python-setuptools)))
4225 (arguments
89b5c60e 4226 `(#:phases
3a0b1b9a
FB
4227 (modify-phases %standard-phases
4228 (add-after
4229 'install 'install-doc
4230 (lambda* (#:key inputs outputs #:allow-other-keys)
4231 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4232 (doc (string-append data "/doc/" ,name "-" ,version))
4233 (html (string-append doc "/html"))
4234 (man1 (string-append data "/man/man1"))
4235 (info (string-append data "/info"))
4236 (examples (string-append doc "/examples")))
afd3d931 4237 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4238 (with-directory-excursion "docs"
4239 ;; FIXME: html and pdf fail to build
4240 ;; (system* "make" "html")
4241 ;; (system* "make" "pdf" "PAPER=a4")
4242 (system* "make" "info"))
4243 (copy-recursively "docs/man" man1)
4244 (copy-recursively "examples" examples)
4245 ;; (copy-recursively "docs/build/html" html)
4246 ;; (copy-file "docs/build/latex/ipython.pdf"
4247 ;; (string-append doc "/ipython.pdf"))
4248 (mkdir-p info)
4249 (copy-file "docs/build/texinfo/ipython.info"
4250 (string-append info "/ipython.info"))
4251 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4252 ;; Tests can only be run after the library has been installed and not
4253 ;; within the source directory.
4254 (delete 'check)
4255 (add-after
4256 'install 'check
4257 (lambda* (#:key outputs tests? #:allow-other-keys)
4258 (if tests?
4259 (with-directory-excursion "/tmp"
4260 (setenv "HOME" "/tmp/") ;; required by a test
4261 (zero? (system* (string-append (assoc-ref outputs "out")
4262 "/bin/iptest"))))
4263 #t)))
4264 (add-before
4265 'install 'fix-tests
4266 (lambda* (#:key inputs #:allow-other-keys)
4267 (substitute* "./IPython/utils/_process_posix.py"
4268 (("/usr/bin/env', 'which") (which "which")))
4269 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4270 (("#!/usr/bin/env python")
4271 (string-append "#!" (which "python"))))
4272 ;; Disable 1 failing test
4273 (substitute* "./IPython/core/tests/test_magic.py"
4274 (("def test_dirops\\(\\):" all)
4275 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4276 (home-page "http://ipython.org")
4277 (synopsis "IPython is a tool for interactive computing in Python")
4278 (description
4279 "IPython provides a rich architecture for interactive computing with:
4280Powerful interactive shells, a browser-based notebook, support for interactive
4281data visualization, embeddable interpreters and tools for parallel
4282computing.")
4283 (license bsd-3)))
4284
4285(define-public python2-ipython
4286 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4287 (package
4288 (inherit ipython)
4289 ;; FIXME: some tests are failing
4290 (arguments
4291 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4292 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4293 ;; FIXME: add pyreadline once available.
667d90df
RW
4294 (propagated-inputs
4295 `(("python2-terminado" ,python2-terminado)
4296 ,@(alist-delete "python-terminado"
4297 (package-propagated-inputs ipython))))
89b5c60e 4298 (inputs
3a0b1b9a
FB
4299 `(("python2-mock" ,python2-mock)
4300 ("python2-matplotlib" ,python2-matplotlib)
5587253a
FB
4301 ("python2-numpy" ,python2-numpy)
4302 ,@(fold alist-delete (package-inputs ipython)
4303 '("python-matplotlib" "python-numpy")))))))
03411993
AE
4304
4305(define-public python-isodate
4306 (package
4307 (name "python-isodate")
4308 (version "0.5.1")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (string-append
4313 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4314 version
4315 ".tar.gz"))
4316 (sha256
4317 (base32
4318 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4319 (build-system python-build-system)
4320 (inputs
4321 `(("python-setuptools" ,python-setuptools)))
4322 (home-page
4323 "http://cheeseshop.python.org/pypi/isodate")
4324 (synopsis
4325 "Python date parser and formatter")
4326 (description
4327 "Python-isodate is a python module for parsing and formatting
4328ISO 8601 dates, time and duration.")
4329 (license bsd-3)))
4330
4331(define-public python2-isodate
4332 (package-with-python2 python-isodate))
673ab897
AE
4333
4334(define-public python-html5lib
4335 (package
4336 (name "python-html5lib")
4337 (version "1.0b3")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append
4342 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4343 version
4344 ".tar.gz"))
4345 (sha256
4346 (base32
4347 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4348 (build-system python-build-system)
3dd75476
AE
4349 (propagated-inputs
4350 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4351 (inputs
4352 `(("python-setuptools" ,python-setuptools)))
4353 (arguments
4354 `(#:test-target "check"))
4355 (home-page
4356 "https://github.com/html5lib/html5lib-python")
4357 (synopsis
4358 "Python HTML parser based on the WHATWG HTML specifcation")
4359 (description
4360 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4361and written in Python.")
bd3fa666 4362 (license license:expat)))
673ab897
AE
4363
4364(define-public python2-html5lib
4365 (package-with-python2 python-html5lib))
e99f4211
MW
4366
4367(define-public python-urwid
4368 (package
4369 (name "python-urwid")
4370 (version "1.3.0")
4371 (source
4372 (origin
4373 (method url-fetch)
be1f44bb
MW
4374 (uri (string-append
4375 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4376 version ".tar.gz"))
e99f4211
MW
4377 (sha256
4378 (base32
4379 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4380 (build-system python-build-system)
4381 (native-inputs `(("python-setuptools" ,python-setuptools)))
4382 (home-page "http://urwid.org")
4383 (synopsis "Console user interface library for Python")
4384 (description
4385 "Urwid is a curses-based UI/widget library for Python. It includes many
4386features useful for text console applications.")
4387 (license lgpl2.1+)))
4388
4389(define-public python2-urwid
4390 (package-with-python2 python-urwid))
d95a56c6
PAR
4391
4392(define-public python-dbus
4393 (package
4394 (name "python-dbus")
4395 (version "1.2.0")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (string-append
4400 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4401 version ".tar.gz"))
4402 (sha256
4403 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4404 (build-system gnu-build-system)
6717c879
SB
4405 (arguments
4406 '(#:phases
4407 (modify-phases %standard-phases
4408 (add-before
4409 'check 'pre-check
4410 (lambda _
4411 ;; XXX: For the missing '/etc/machine-id'.
4412 (substitute* "test/run-test.sh"
4413 (("DBUS_FATAL_WARNINGS=1")
4414 "DBUS_FATAL_WARNINGS=0"))
4415 #t)))))
d95a56c6
PAR
4416 (native-inputs
4417 `(("pkg-config" ,pkg-config)))
4418 (inputs
4419 `(("python" ,python)
2e88d113 4420 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4421 (synopsis "Python bindings for D-bus")
4422 (description "python-dbus provides bindings for libdbus, the reference
4423implementation of D-Bus.")
4424 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4425 (license license:expat)))
b52af02b
MW
4426
4427(define-public python2-dbus
4428 (package (inherit python-dbus)
4429 (name "python2-dbus")
4430 (inputs `(("python" ,python-2)
4431 ,@(alist-delete "python"
4432 (package-inputs python-dbus)
4433 equal?)))
4434 ;; FIXME: on Python 2, the test_utf8 fails with:
4435 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4436 (arguments `(#:tests? #f))))
a6ac8332
AE
4437
4438(define-public python-apsw
4439 (package
4440 (name "python-apsw")
4441 (version "3.8.7.3-r1")
4442 (source
4443 (origin
4444 (method url-fetch)
4445 (uri (string-append
4446 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4447 version
4448 ".tar.gz"))
4449 (sha256
4450 (base32
4451 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4452 (build-system python-build-system)
4453 (inputs
4454 `(("python-setuptools" ,python-setuptools)
4455 ("sqlite" ,sqlite)))
4456 (arguments
4457 `(#:phases
4458 ;; swap check and install phases
4459 (alist-cons-after
4460 'install 'check
4461 (assoc-ref %standard-phases 'check)
4462 (alist-delete
4463 'check
4464 %standard-phases))))
4465 (home-page "https://github.com/rogerbinns/apsw/")
4466 (synopsis "Another Python SQLite Wrapper")
4467 (description "APSW is a Python wrapper for the SQLite
4468embedded relational database engine. In contrast to other wrappers such as
4469pysqlite it focuses on being a minimal layer over SQLite attempting just to
4470translate the complete SQLite API into Python.")
abde5f37 4471 (license license:zlib)))
a6ac8332
AE
4472
4473(define-public python2-apsw
4474 (package-with-python2 python-apsw))
26b307e2
AE
4475
4476(define-public python-lxml
4477 (package
4478 (name "python-lxml")
4479 (version "3.4.2")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 (uri (string-append
4484 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4485 version
4486 ".tar.gz"))
4487 (sha256
4488 (base32
4489 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4490 (build-system python-build-system)
4491 (inputs
4492 `(("libxml2" ,libxml2)
4493 ("libxslt" ,libxslt)
4494 ("python-setuptools" ,python-setuptools)))
4495 (home-page "http://lxml.de/")
4496 (synopsis
4497 "Python XML processing library")
4498 (description
4499 "The lxml XML toolkit is a Pythonic binding for the C libraries
4500libxml2 and libxslt.")
4501 (license bsd-3))) ; and a few more, see LICENSES.txt
4502
4503(define-public python2-lxml
4504 (package-with-python2 python-lxml))
4ed20663 4505
bec07a7c
AE
4506(define-public python2-pil
4507 (package
4508 (name "python2-pil")
4509 (version "1.1.7")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (string-append
4514 "http://effbot.org/downloads/Imaging-"
4515 version ".tar.gz"))
4516 (sha256
4517 (base32
516277cb
AE
4518 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4519 (modules '((guix build utils)))
4520 (snippet
4521 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4522 ;; there is no use in creating a patch and reporting it.
4523 '(substitute* "_imagingft.c"
4524 (("freetype/")
4525 "freetype2/")))))
bec07a7c
AE
4526 (build-system python-build-system)
4527 (inputs
4528 `(("freetype" ,freetype)
4529 ("libjpeg" ,libjpeg)
4530 ("libtiff" ,libtiff)
4531 ("python-setuptools" ,python-setuptools)
4532 ("zlib" ,zlib)))
4533 (arguments
4534 ;; Only the fork python-pillow works with Python 3.
4535 `(#:python ,python-2
4536 #:tests? #f ; no check target
4537 #:phases
4538 (alist-cons-before
4539 'build 'configure
4540 ;; According to README and setup.py, manual configuration is
4541 ;; the preferred way of "searching" for inputs.
4542 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4543 (lambda* (#:key inputs #:allow-other-keys)
4544 (let ((jpeg (assoc-ref inputs "libjpeg"))
4545 (zlib (assoc-ref inputs "zlib"))
4546 (tiff (assoc-ref inputs "libtiff"))
4547 (freetype (assoc-ref inputs "freetype")))
4548 (substitute* "setup.py"
4549 (("JPEG_ROOT = None")
4550 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4551 (("ZLIB_ROOT = None")
4552 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4553 (("TIFF_ROOT = None")
4554 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4555 (("FREETYPE_ROOT = None")
4556 (string-append "FREETYPE_ROOT = libinclude(\""
4557 freetype "\")")))))
4558 %standard-phases)))
4559 (home-page "http://www.pythonware.com/products/pil/")
4560 (synopsis "Python Imaging Library")
4561 (description "The Python Imaging Library (PIL) adds image processing
4562capabilities to the Python interpreter.")
4563 (license (x11-style
4564 "file://README"
4565 "See 'README' in the distribution."))))
092e86f5
AE
4566
4567(define-public python2-cssutils
4568 (package
4569 (name "python2-cssutils")
4570 (version "1.0")
4571 (source
4572 (origin
4573 (method url-fetch)
4574 (uri (string-append
4575 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4576 version
4577 ".zip"))
4578 (sha256
4579 (base32
4580 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4581 (build-system python-build-system)
4582 (native-inputs
4583 `(("python2-mock" ,python2-mock) ; for the tests
4584 ("unzip" ,unzip))) ; for unpacking the source
4585 (inputs
4586 `(("python2-setuptools" ,python2-setuptools)))
4587 (arguments
4588 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4589 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4590 ))
092e86f5
AE
4591 (home-page "http://cthedot.de/cssutils/")
4592 (synopsis
4593 "CSS Cascading Style Sheets library for Python")
4594 (description
4595 "Cssutils is a Python package for parsing and building CSS
4596Cascading Style Sheets. Currently it provides a DOM only and no rendering
4597options.")
4598 (license lgpl3+)))
880ff77c
AE
4599
4600(define-public python-cssselect
4601 (package
4602 (name "python-cssselect")
4603 (version "0.9.1")
4604 (source
4605 (origin
4606 (method url-fetch)
4607 (uri (string-append
4608 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4609 version
4610 ".tar.gz"))
4611 (sha256
4612 (base32
4613 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4614 (build-system python-build-system)
4615 (inputs
4616 `(("python-setuptools" ,python-setuptools)))
4617 (arguments
4618 ;; tests fail with message
4619 ;; AttributeError: 'module' object has no attribute 'tests'
4620 `(#:tests? #f))
4621 (home-page
4622 "https://pythonhosted.org/cssselect/")
4623 (synopsis
4624 "CSS3 selector parser and translator to XPath 1.0")
4625 (description
4626 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4627them to XPath 1.0 expressions. Such expressions can be used in lxml or
4628another XPath engine to find the matching elements in an XML or HTML document.")
4629 (license bsd-3)))
4630
4631(define-public python2-cssselect
4632 (package-with-python2 python-cssselect))
60357f99
AE
4633
4634(define-public python-netifaces
4635 (package
4636 (name "python-netifaces")
4637 (version "0.10.4")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (string-append
4642 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4643 version
4644 ".tar.gz"))
4645 (sha256
4646 (base32
4647 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4648 (build-system python-build-system)
4649 (inputs
4650 `(("python-setuptools" ,python-setuptools)))
4651 (home-page
4652 "https://bitbucket.org/al45tair/netifaces")
4653 (synopsis
4654 "Python module for portable network interface information")
4655 (description
4656 "Netifaces is a Python module providing information on network
4657interfaces in an easy and portable manner.")
4658 (license license:expat)))
4659
4660(define-public python2-netifaces
4661 (package-with-python2 python-netifaces))
92cb152b 4662
32f77c04
RW
4663(define-public python-networkx
4664 (package
4665 (name "python-networkx")
4666 (version "1.9.1")
4667 (source
4668 (origin
4669 (method url-fetch)
4670 (uri (string-append
4671 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4672 version ".tar.gz"))
4673 (sha256
4674 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4675 (build-system python-build-system)
4676 ;; python-decorator is needed at runtime
4677 (propagated-inputs
4678 `(("python-decorator" ,python-decorator)))
4679 (native-inputs
4680 `(("python-setuptools" ,python-setuptools)
4681 ("python-nose" ,python-nose)))
4682 (home-page "http://networkx.github.io/")
4683 (synopsis "Python module for creating and manipulating graphs and networks")
4684 (description
4685 "NetworkX is a Python package for the creation, manipulation, and study
4686of the structure, dynamics, and functions of complex networks.")
4687 (license bsd-3)))
4688
4689(define-public python2-networkx
4690 (package-with-python2 python-networkx))
4691
92cb152b
RW
4692(define-public snakemake
4693 (package
4694 (name "snakemake")
4695 (version "3.2.1")
4696 (source
4697 (origin
4698 (method url-fetch)
4699 (uri (string-append
4700 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4701 version ".tar.gz"))
4702 (sha256
4703 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4704 (build-system python-build-system)
4705 (inputs `(("python-setuptools" ,python-setuptools)))
4706 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4707 (synopsis "Python-based execution environment for make-like workflows")
4708 (description
4709 "Snakemake aims to reduce the complexity of creating workflows by
4710providing a clean and modern domain specific specification language (DSL) in
4711Python style, together with a fast and comfortable execution environment.")
4712 (license license:expat)))
a1920bc9 4713
35de1fbd
RW
4714(define-public python-seaborn
4715 (package
4716 (name "python-seaborn")
4717 (version "0.5.1")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (string-append
4722 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4723 version ".tar.gz"))
4724 (sha256
4725 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4726 (build-system python-build-system)
4727 (propagated-inputs
4728 `(("python-pandas" ,python-pandas)
4729 ("python-matplotlib" ,python-matplotlib)
4730 ("python-scipy" ,python-scipy)))
4731 (native-inputs
4732 `(("python-setuptools" ,python-setuptools)))
4733 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4734 (synopsis "Statistical data visualization")
4735 (description
4736 "Seaborn is a library for making attractive and informative statistical
4737graphics in Python. It is built on top of matplotlib and tightly integrated
4738with the PyData stack, including support for numpy and pandas data structures
4739and statistical routines from scipy and statsmodels.")
4740 (license bsd-3)))
4741
4742(define-public python2-seaborn
4743 (let ((seaborn (package-with-python2 python-seaborn)))
4744 (package (inherit seaborn)
4745 (propagated-inputs
4746 `(("python2-pytz" ,python2-pytz)
dab8ebd9
FB
4747 ("python2-pandas" ,python2-pandas)
4748 ("python2-matplotlib" ,python2-matplotlib)
4749 ("python2-scipy" ,python2-scipy))))))
35de1fbd 4750
90fc547f
RW
4751(define-public python-sympy
4752 (package
4753 (name "python-sympy")
4754 (version "0.7.6")
4755 (source
4756 (origin
4757 (method url-fetch)
4758 (uri (string-append
4759 "https://github.com/sympy/sympy/releases/download/sympy-"
4760 version "/sympy-" version ".tar.gz"))
4761 (sha256
4762 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4763 (build-system python-build-system)
4764 (native-inputs
4765 `(("python-setuptools" ,python-setuptools)))
4766 (home-page "http://www.sympy.org/")
4767 (synopsis "Python library for symbolic mathematics")
4768 (description
4769 "SymPy is a Python library for symbolic mathematics. It aims to become a
4770full-featured computer algebra system (CAS) while keeping the code as simple
4771as possible in order to be comprehensible and easily extensible.")
4772 (license bsd-3)))
4773
4774(define-public python2-sympy
4775 (package-with-python2 python-sympy))
4776
a1920bc9
FB
4777(define-public python-testlib
4778 (package
4779 (name "python-testlib")
4780 (version "0.6.5")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (string-append
4785 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4786 version ".zip"))
4787 (sha256
4788 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4789 (build-system python-build-system)
4790 (inputs
4791 `(("python-setuptools" ,python-setuptools)))
4792 (native-inputs
4793 `(("unzip" ,unzip)))
4794 (arguments
4795 `(#:phases
4796 (alist-replace
4797 'unpack
4798 (lambda* (#:key inputs outputs #:allow-other-keys)
4799 (let ((unzip (string-append (assoc-ref inputs "unzip")
4800 "/bin/unzip"))
4801 (source (assoc-ref inputs "source")))
4802 (and (zero? (system* unzip source))
4803 (chdir (string-append "testlib-" ,version)))))
4804 %standard-phases)))
4805 (synopsis "Python micro test suite harness")
4806 (description "A micro unittest suite harness for Python.")
4807 (home-page "https://github.com/trentm/testlib")
1cb9c006 4808 (license license:expat)))
a1920bc9
FB
4809
4810(define-public python2-testlib
4811 (package-with-python2 python-testlib))
db62afa5
LC
4812
4813(define-public python2-xlib
4814 (package
4815 (name "python2-xlib")
4816 (version "0.14")
4817 (source (origin
4818 (method url-fetch)
4819 (uri (string-append "mirror://sourceforge/python-xlib/"
4820 "python-xlib-" version ".tar.gz"))
4821 (sha256
4822 (base32
4823 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4824 (build-system python-build-system)
4825 (arguments
4826 `(#:python ,python-2 ;Python 2 only
4827 #:tests? #f)) ;no tests
4828 (inputs
4829 `(("python-setuptools" ,python-setuptools)))
4830 (home-page "http://python-xlib.sourceforge.net/")
4831 (synopsis "Python X11 client library")
4832 (description
4833 "The Python X Library is intended to be a fully functional X client
4834library for Python programs. It is useful to implement low-level X clients.
4835It is written entirely in Python.")
4836 (license gpl2+)))
0234ca06
DT
4837
4838(define-public python-singledispatch
4839 (package
4840 (name "python-singledispatch")
4841 (version "3.4.0.3")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (string-append
4846 "https://pypi.python.org/packages/source/s/singledispatch/"
4847 "singledispatch-" version ".tar.gz"))
4848 (sha256
4849 (base32
4850 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4851 (build-system python-build-system)
4852 (native-inputs
4853 `(("python-setuptools" ,python-setuptools)))
4854 (propagated-inputs
4855 `(("python-six" ,python-six)))
4856 (home-page
4857 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4858 (synopsis "Backport of singledispatch feature from Python 3.4")
4859 (description
4860 "This library brings functools.singledispatch from Python 3.4 to Python
48612.6-3.3.")
4862 (license license:expat)))
4863
4864(define-public python2-singledispatch
4865 (package-with-python2 python-singledispatch))
feaae484 4866
310d218f
RW
4867(define-public python-tornado
4868 (package
4869 (name "python-tornado")
4870 (version "4.1")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (string-append
4875 "https://pypi.python.org/packages/source/t/tornado/"
4876 "tornado-" version ".tar.gz"))
4877 (sha256
4878 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4879 (build-system python-build-system)
4880 (inputs
4881 `(("python-certifi" ,python-certifi)))
4882 (native-inputs
4883 `(("python-setuptools" ,python-setuptools)))
f4a4a718 4884 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4885 (synopsis "Python web framework and asynchronous networking library")
4886 (description
4887 "Tornado is a Python web framework and asynchronous networking library,
4888originally developed at FriendFeed. By using non-blocking network I/O,
4889Tornado can scale to tens of thousands of open connections, making it ideal
4890for long polling, WebSockets, and other applications that require a long-lived
4891connection to each user.")
4892 (license asl2.0)))
4893
4894(define-public python2-tornado
4895 (let ((tornado (package-with-python2 python-tornado)))
4896 (package (inherit tornado)
4897 (inputs
4898 `(("python2-backport-ssl-match-hostname"
4899 ,python2-backport-ssl-match-hostname)
4900 ,@(package-inputs tornado))))))
4901
feaae484
SB
4902(define-public python-waf
4903 (package
4904 (name "python-waf")
4905 (version "1.8.8")
4906 (source (origin
4907 (method url-fetch)
4908 (uri (string-append "https://waf.io/"
4909 "waf-" version ".tar.bz2"))
4910 (sha256
4911 (base32
4912 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4913 (build-system python-build-system)
4914 (arguments
4915 '(#:phases
4916 (modify-phases %standard-phases
4917 (replace 'build
4918 (lambda _
4919 (zero? (begin
4920 (system* "python" "waf-light" "configure")
4921 (system* "python" "waf-light" "build")))))
4922 (replace 'check
4923 (lambda _
4924 (zero? (system* "python" "waf" "--version"))))
4925 (replace 'install
4926 (lambda _
4927 (copy-file "waf" %output))))))
4928 (home-page "https://waf.io/")
4929 (synopsis "Python-based build system")
4930 (description
4931 "Waf is a Python-based framework for configuring, compiling and installing
4932applications.")
4933 (license bsd-3)))
4934
4935(define-public python2-waf
4936 (package-with-python2 python-waf))
45203542
RW
4937
4938(define-public python-pyzmq
4939 (package
4940 (name "python-pyzmq")
4941 (version "14.6.0")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (string-append
4946 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4947 version ".tar.gz"))
4948 (sha256
4949 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4950 (build-system python-build-system)
4951 (arguments
4952 `(#:configure-flags
4953 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4954 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4955 ;; --inplace' for 'python setup.py test' to work.
4956 #:tests? #f))
4957 (inputs
4958 `(("zeromq" ,zeromq)))
4959 (native-inputs
4960 `(("pkg-config" ,pkg-config)
4961 ("python-nose" ,python-nose)
4962 ("python-setuptools" ,python-setuptools)))
4963 (home-page "http://github.com/zeromq/pyzmq")
4964 (synopsis "Python bindings for 0MQ")
4965 (description
4966 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4967 (license bsd-4)))
4968
4969(define-public python2-pyzmq
4970 (package-with-python2 python-pyzmq))
d889e6c4
CR
4971
4972(define-public python-pep8
4973 (package
4974 (name "python-pep8")
4975 (version "1.6.2")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (string-append
4980 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4981 version
4982 ".tar.gz"))
4983 (sha256
4984 (base32
4985 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4986 (build-system python-build-system)
4987 (inputs
4988 `(("python-setuptools" ,python-setuptools)))
4989 (home-page "http://pep8.readthedocs.org/")
4990 (synopsis "Python style guide checker")
4991 (description
4992 "This tools checks Python code against some of the style conventions in
4993PEP 8.")
4994 (license license:expat)))
4995
4996(define-public python2-pep8
4997 (package-with-python2 python-pep8))
e31d7f44
CR
4998
4999(define-public python-pyflakes
5000 (package
5001 (name "python-pyflakes")
5002 (version "0.9.2")
5003 (source
5004 (origin
5005 (method url-fetch)
5006 (uri (string-append
5007 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5008 version
5009 ".tar.gz"))
5010 (sha256
5011 (base32
5012 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
5013 (build-system python-build-system)
5014 (inputs
5015 `(("python-setuptools" ,python-setuptools)))
5016 (home-page
5017 "https://github.com/pyflakes/pyflakes")
5018 (synopsis "Passive checker of Python programs")
5019 (description
5020 "Pyflakes statically checks Python source code for common errors.")
5021 (license license:expat)))
a59e017c 5022
7261d9eb
CR
5023(define-public python2-pyflakes
5024 (package-with-python2 python-pyflakes))
5025
a59e017c
CR
5026(define-public python-mccabe
5027 (package
5028 (name "python-mccabe")
5029 (version "0.3.1")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (string-append
5034 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5035 version
5036 ".tar.gz"))
5037 (sha256
5038 (base32
5039 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5040 (build-system python-build-system)
5041 (inputs
5042 `(("python-setuptools" ,python-setuptools)))
5043 (home-page "https://github.com/flintwork/mccabe")
5044 (synopsis "McCabe checker, plugin for flake8")
5045 (description
5046 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5047complexity of Python source code.")
7362371d 5048 (license license:expat)))
a59e017c
CR
5049
5050(define-public python2-mccabe
5051 (package-with-python2 python-mccabe))
e8df8f47 5052
7477fbb1
CR
5053(define-public python-mccabe-0.2.1
5054 (package (inherit python-mccabe)
5055 (version "0.2.1")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "mccabe" version))
5060 (sha256
5061 (base32
5062 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5063
5064(define-public python2-mccabe-0.2.1
5065 (package-with-python2 python-mccabe-0.2.1))
5066
e8df8f47
CR
5067;; Flake8 2.4.1 requires an older version of pep8.
5068;; This should be removed ASAP.
5069(define-public python-pep8-1.5.7
5070 (package (inherit python-pep8)
5071 (version "1.5.7")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (string-append
5076 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5077 version
5078 ".tar.gz"))
5079 (sha256
5080 (base32
5081 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5082
5083(define-public python2-pep8-1.5.7
5084 (package-with-python2 python-pep8-1.5.7))
5085
5086;; Flake8 2.4.1 requires an older version of pyflakes.
5087;; This should be removed ASAP.
5088(define-public python-pyflakes-0.8.1
5089 (package (inherit python-pyflakes)
5090 (version "0.8.1")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (string-append
5095 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5096 version
5097 ".tar.gz"))
5098 (sha256
5099 (base32
5100 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5101
5102(define-public python2-pyflakes-0.8.1
7261d9eb 5103 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5104
5105(define-public python-flake8
5106 (package
5107 (name "python-flake8")
5108 (version "2.4.1")
5109 (source
5110 (origin
5111 (method url-fetch)
5112 (uri (string-append
5113 "https://pypi.python.org/packages/source/f/flake8/flake8-"
5114 version
5115 ".tar.gz"))
5116 (sha256
5117 (base32
5118 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
5119 (build-system python-build-system)
5120 (inputs
5121 `(("python-setuptools" ,python-setuptools)
5122 ("python-pep8" ,python-pep8-1.5.7)
5123 ("python-pyflakes" ,python-pyflakes-0.8.1)
5124 ("python-mccabe" ,python-mccabe)
5125 ("python-mock" ,python-mock)
5126 ("python-nose" ,python-nose)))
5127 (home-page "https://gitlab.com/pycqa/flake8")
5128 (synopsis
5129 "The modular source code checker: pep8, pyflakes and co")
5130 (description
5131 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5132 (license license:expat)))
5133
5134(define-public python2-flake8
5135 (package-with-python2 python-flake8))
61b9ac53 5136
abf21efc
CR
5137;; This will only be needed by the python-hacking package and will not be
5138;; necessary once python-hacking > 0.10.2 is released.
5139(define-public python-flake8-2.2.4
5140 (package (inherit python-flake8)
5141 (inputs
5142 `(("python-setuptools" ,python-setuptools)
5143 ("python-pep8" ,python-pep8-1.5.7)
5144 ("python-pyflakes" ,python-pyflakes-0.8.1)
5145 ("python-mccabe" ,python-mccabe-0.2.1)
5146 ("python-mock" ,python-mock)
5147 ("python-nose" ,python-nose)))
5148 (version "2.2.4")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (pypi-uri "flake8" version))
5153 (sha256
5154 (base32
5155 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5156
5157(define-public python2-flake8-2.2.4
5158 (package-with-python2 python-flake8-2.2.4))
5159
61b9ac53
FB
5160(define-public python-mistune
5161 (package
5162 (name "python-mistune")
5163 (version "0.7")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (string-append
5168 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5169 version
5170 ".tar.gz"))
5171 (sha256
5172 (base32
5173 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5174 (build-system python-build-system)
5175 (inputs
5176 `(("python-setuptools" ,python-setuptools)
5177 ("python-nose" ,python-nose)
5178 ("python-cython" ,python-cython)))
5179 (home-page "https://github.com/lepture/mistune")
5180 (synopsis "Markdown parser in pure Python")
5181 (description "This package provides a fast markdown parser in pure
5182Python.")
5183 (license bsd-3)))
5184
5185(define-public python2-mistune
5186 (package-with-python2 python-mistune))
6d992d07
FB
5187
5188(define-public python-ptyprocess
5189 (package
5190 (name "python-ptyprocess")
5191 (version "0.5")
5192 (source
5193 (origin
5194 (method url-fetch)
5195 (uri (string-append
5196 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5197 version ".tar.gz"))
5198 (sha256
5199 (base32
5200 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5201 (build-system python-build-system)
5202 (inputs
5203 `(("python-setuptools" ,python-setuptools)
5204 ("python-nose" ,python-nose)))
5205 (arguments
5206 `(#:phases
5207 (modify-phases %standard-phases
5208 (replace 'check
5209 (lambda _
5210 (zero? (system* "nosetests")))))))
5211 (home-page "https://github.com/pexpect/ptyprocess")
5212 (synopsis "Run a subprocess in a pseudo terminal")
5213 (description
5214 "This package provides a Python library used to launch a subprocess in a
5215pseudo terminal (pty), and interact with both the process and its pty.")
5216 (license isc)))
5217
5218(define-public python2-ptyprocess
5219 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5220
5221(define-public python-terminado
5222 (package
5223 (name "python-terminado")
5224 (version "0.5")
5225 (source
5226 (origin
5227 (method url-fetch)
5228 (uri (string-append
5229 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5230 version ".tar.gz"))
5231 (sha256
5232 (base32
5233 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5234 (build-system python-build-system)
5235 (propagated-inputs
5236 `(("python-tornado" ,python-tornado)
5237 ("python-ptyprocess" ,python-ptyprocess)))
5238 (inputs
5239 `(("python-setuptools" ,python-setuptools)
5240 ("python-nose" ,python-nose)))
5241 (arguments
5242 `(#:phases
5243 (modify-phases %standard-phases
5244 (replace 'check
5245 (lambda _
5246 (zero? (system* "nosetests")))))))
5247 (home-page "https://github.com/takluyver/terminado")
5248 (synopsis "Terminals served to term.js using Tornado websockets")
5249 (description "This package provides a Tornado websocket backend for the
5250term.js Javascript terminal emulator library.")
5251 (license bsd-2)))
5252
5253(define-public python2-terminado
5254 (let ((terminado (package-with-python2 python-terminado)))
5255 (package (inherit terminado)
5256 (propagated-inputs
5257 `(("python2-tornado" ,python2-tornado)
5258 ("python2-backport-ssl-match-hostname"
5259 ,python2-backport-ssl-match-hostname)
5260 ,@(alist-delete "python-tornado"
5261 (package-propagated-inputs terminado)))))))
5faa5ce4 5262
d582eaac
SB
5263(define-public python-fonttools
5264 (package
5265 (name "python-fonttools")
5266 (version "2.5")
5267 (source (origin
5268 (method url-fetch)
5269 (uri (string-append
5270 "https://pypi.python.org/packages/source/F/FontTools/"
5271 "fonttools-" version ".tar.gz"))
5272 (sha256
5273 (base32
5274 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5275 (build-system python-build-system)
5276 (arguments '(#:test-target "check"))
5277 (propagated-inputs
5278 ;; XXX: module not found if setuptools is not available.
5279 `(("python-setuptools" ,python-setuptools)))
5280 (home-page "http://github.com/behdad/fonttools")
5281 (synopsis "Tools to manipulate font files")
5282 (description
5283 "FontTools/TTX is a library to manipulate font files from Python. It
5284supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5285of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5286also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5287from an XML-based format.")
5288 (license (non-copyleft "file://LICENSE.txt"
5289 "See LICENSE.txt in the distribution."))))
5290
5291(define-public python2-fonttools
5292 (package-with-python2 python-fonttools))
75710da6 5293
5faa5ce4
RW
5294(define-public python-ly
5295 (package
5296 (name "python-ly")
5297 (version "0.9.2")
5298 (source
5299 (origin
5300 (method url-fetch)
5301 (uri (string-append
5302 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5303 version ".tar.gz"))
5304 (sha256
5305 (base32
5306 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5307 (build-system python-build-system)
5308 (native-inputs
5309 `(("python-setuptools" ,python-setuptools)))
5310 (synopsis "Tool and library for manipulating LilyPond files")
5311 (description "This package provides a Python library to parse, manipulate
5312or create documents in LilyPond format. A command line program ly is also
5313provided that can be used to do various manipulations with LilyPond files.")
5314 (home-page "https://pypi.python.org/pypi/python-ly")
5315 (license gpl2+)))
7e7b27d9
CR
5316
5317(define-public python-appdirs
5318 (package
5319 (name "python-appdirs")
5320 (version "1.4.0")
5321 (source
5322 (origin
5323 (method url-fetch)
5324 (uri (string-append
5325 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5326 version
5327 ".tar.gz"))
5328 (sha256
5329 (base32
5330 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5331 (build-system python-build-system)
5332 (inputs
5333 `(("python-setuptools" ,python-setuptools)))
5334 (home-page "http://github.com/ActiveState/appdirs")
5335 (synopsis
5336 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5337 (description
5338 "This module provides a portable way of finding out where user data
5339should be stored on various operating systems.")
5340 (license license:expat)))
5341
5342(define-public python2-appdirs
5343 (package-with-python2 python-appdirs))
89b2e0b0
LF
5344
5345(define-public python-llfuse
5346 (package
5347 (name "python-llfuse")
5348 (version "0.41")
5349 (source (origin
5350 (method url-fetch)
5351 (uri (string-append
5352 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5353 "llfuse-" version ".tar.bz2"))
5354 (sha256
5355 (base32
5356 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5357 (build-system python-build-system)
5358 (inputs
5359 `(("fuse" ,fuse)
5360 ("attr" ,attr)))
5361 (native-inputs
5362 `(("pkg-config" ,pkg-config)
5363 ("python-setuptools" ,python-setuptools)))
5364 (synopsis "Python bindings for FUSE")
5365 (description
5366 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5367 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5368 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5369 ;; The rest of the package is licensed under LGPL2.0 or later.
5370 (license (list license:expat lgpl2.0+))))
5371
5372(define-public python2-llfuse
5373 (package-with-python2 python-llfuse))
641c9871
LF
5374
5375(define-public python-msgpack
5376 (package
5377 (name "python-msgpack")
5378 (version "0.4.6")
5379 (source (origin
5380 (method url-fetch)
5381 (uri (string-append
5382 "https://pypi.python.org/packages/source/m/"
5383 "msgpack-python/msgpack-python-" version ".tar.gz"))
5384 (sha256
5385 (base32
5386 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5387 (build-system python-build-system)
5388 (native-inputs
5389 `(("python-setuptools" ,python-setuptools)))
5390 (synopsis "MessagePack (de)serializer")
5391 (description "MessagePack is a fast, compact binary serialization format,
5392suitable for similar data to JSON. This package provides CPython bindings for
5393reading and writing MessagePack data.")
5394 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5395 (license asl2.0)))
5396
5397(define-public python2-msgpack
5398 (package-with-python2 python-msgpack))
6e5e39f4
CR
5399
5400(define-public python-netaddr
5401 (package
5402 (name "python-netaddr")
5403 (version "0.7.18")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (string-append
5408 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5409 version
5410 ".tar.gz"))
5411 (sha256
5412 (base32
5413 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5414 (build-system python-build-system)
5415 (arguments `(#:tests? #f)) ;; No tests.
5416 (inputs
5417 `(("python-setuptools" ,python-setuptools)))
5418 (home-page "https://github.com/drkjam/netaddr/")
5419 (synopsis "Pythonic manipulation of network addresses")
5420 (description
5421 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5422and MAC network addresses.")
5423 (license bsd-3)))
5424
5425(define-public python2-netaddr
5426 (package-with-python2 python-netaddr))
8c692a52
CR
5427
5428(define-public python-wrapt
5429 (package
5430 (name "python-wrapt")
5431 (version "1.10.5")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (string-append
5436 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5437 version
5438 ".tar.gz"))
5439 (sha256
5440 (base32
5441 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5442 (build-system python-build-system)
5443 (arguments
5444 ;; Tests are not included in the tarball, they are only available in the
5445 ;; git repository.
5446 `(#:tests? #f))
5447 (inputs
5448 `(("python-setuptools" ,python-setuptools)))
5449 (home-page "https://github.com/GrahamDumpleton/wrapt")
5450 (synopsis "Module for decorators, wrappers and monkey patching")
5451 (description
5452 "The aim of the wrapt module is to provide a transparent object proxy for
5453 Python, which can be used as the basis for the construction of function
5454 wrappers and decorator functions.")
5455 (license bsd-2)))
5456
5457(define-public python2-wrapt
5458 (package-with-python2 python-wrapt))
b85c85be
CR
5459
5460(define-public python-iso8601
5461 (package
5462 (name "python-iso8601")
5463 (version "0.1.10")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (string-append
5468 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5469 version
5470 ".tar.gz"))
5471 (sha256
5472 (base32
5473 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5474 (build-system python-build-system)
5475 (inputs
5476 `(("python-setuptools" ,python-setuptools)))
5477 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5478 (synopsis "Module to parse ISO 8601 dates")
5479 (description
5480 "This module parses the most common forms of ISO 8601 date strings (e.g.
5481@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5482 (license license:expat)))
5483
5484(define-public python2-iso8601
5485 (package-with-python2 python-iso8601))
5e412b63
CR
5486
5487(define-public python-monotonic
5488 (package
5489 (name "python-monotonic")
5490 (version "0.3")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (string-append
5495 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5496 version
5497 ".tar.gz"))
5498 (sha256
5499 (base32
5500 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5501 (build-system python-build-system)
5502 (inputs
5503 `(("python-setuptools" ,python-setuptools)))
5504 (home-page "https://github.com/atdt/monotonic")
5505 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5506 (description
5507 "This module provides a monotonic() function which returns the value (in
5508fractional seconds) of a clock which never goes backwards.")
5509 (license asl2.0)))
5510
5511(define-public python2-monotonic
5512 (package-with-python2 python-monotonic))
de34afac
CR
5513
5514(define-public python-webob
5515 (package
5516 (name "python-webob")
5517 (version "1.5.0b0")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (string-append
5522 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
5523 version ".tar.gz"))
5524 (sha256
5525 (base32
5526 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
5527 (build-system python-build-system)
5528 (inputs
5529 `(("python-nose" ,python-nose)
5530 ("python-setuptools" ,python-setuptools)))
5531 (home-page "http://webob.org/")
5532 (synopsis "WSGI request and response object")
5533 (description
5534 "WebOb provides wrappers around the WSGI request environment, and an
5535object to help create WSGI responses.")
5536 (license license:expat)))
5537
5538(define-public python2-webob
5539 (package-with-python2 python-webob))
350ba0a3 5540
02a8a187
BW
5541(define-public python-xlrd
5542 (package
5543 (name "python-xlrd")
5544 (version "0.9.4")
5545 (source (origin
5546 (method url-fetch)
5547 (uri (string-append "https://pypi.python.org/packages/source/x/"
5548 "xlrd/xlrd-" version ".tar.gz"))
5549 (sha256
5550 (base32
5551 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5552 (build-system python-build-system)
5553 (arguments
5554 `(#:phases
5555 (modify-phases %standard-phases
5556 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5557 ;; run tests instead for now.
5558 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5559 (native-inputs `(("python-nose" ,python-nose)
5560 ("python-setuptools" ,python-setuptools)))
5561 (home-page "http://www.python-excel.org/")
5562 (synopsis "Library for extracting data from Excel files")
5563 (description "This packages provides a library to extract data from
5564spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5565@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5566Unicode-aware. It is not intended as an end-user tool.")
5567 (license bsd-3)))
5568
5569(define-public python2-xlrd
5570 (package-with-python2 python-xlrd))
5571
350ba0a3
CR
5572(define-public python-prettytable
5573 (package
5574 (name "python-prettytable")
5575 (version "0.7.2")
5576 (source
5577 (origin
5578 (method url-fetch)
5579 (uri (string-append
5580 "https://pypi.python.org/packages/source/P/PrettyTable/"
5581 "prettytable-" version ".tar.bz2"))
5582 (sha256
5583 (base32
5584 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5585 (build-system python-build-system)
5586 (inputs
5587 `(("python-setuptools" ,python-setuptools)))
5588 (home-page "http://code.google.com/p/prettytable/")
5589 (synopsis "Display tabular data in an ASCII table format")
5590 (description
5591 "A library designed to represent tabular data in visually appealing ASCII
5592tables. PrettyTable allows for selection of which columns are to be printed,
5593independent alignment of columns (left or right justified or centred) and
5594printing of sub-tables by specifying a row range.")
5595 (license bsd-3)))
5596
5597(define-public python2-prettytable
5598 (package-with-python2 python-prettytable))
7a8ac75a
RW
5599
5600(define-public python-pyasn1
5601 (package
5602 (name "python-pyasn1")
5603 (version "0.1.8")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (string-append "https://pypi.python.org/packages/source/p/"
5608 "pyasn1/pyasn1-" version ".tar.gz"))
5609 (sha256
5610 (base32
5611 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5612 (build-system python-build-system)
5613 (home-page "http://pyasn1.sourceforge.net/")
5614 (synopsis "ASN.1 types and codecs")
5615 (description
5616 "This is an implementation of ASN.1 types and codecs in Python. It is
5617suitable for a wide range of protocols based on the ASN.1 specification.")
5618 (license bsd-2)))
5619
5620(define-public python2-pyasn1
5621 (package-with-python2 python-pyasn1))
9a49a535
RW
5622
5623(define-public python2-ipaddress
5624 (package
5625 (name "python2-ipaddress")
5626 (version "1.0.14")
5627 (source
5628 (origin
5629 (method url-fetch)
5630 (uri (string-append "https://pypi.python.org/packages/source/i/"
5631 "ipaddress/ipaddress-" version ".tar.gz"))
5632 (sha256
5633 (base32
5634 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5635 (build-system python-build-system)
5636 (arguments
5637 `(#:tests? #f ; no tests
5638 #:python ,python-2))
5639 (home-page "https://github.com/phihag/ipaddress")
5640 (synopsis "IP address manipulation library")
5641 (description
5642 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5643in Python. This library is used to create, poke at, and manipulate IPv4 and
5644IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5645module to older versions of Python.")
5646 (license psfl)))
3f00e078
RW
5647
5648(define-public python-idna
5649 (package
5650 (name "python-idna")
5651 (version "2.0")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (string-append "https://pypi.python.org/packages/source/i/"
5656 "idna/idna-" version ".tar.gz"))
5657 (sha256
5658 (base32
5659 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5660 (build-system python-build-system)
5661 (native-inputs
5662 `(("python-setuptools" ,python-setuptools)))
5663 (home-page "https://github.com/kjd/idna")
5664 (synopsis "Internationalized domain names in applications")
5665 (description
5666 "This is a library to support the Internationalised Domain Names in
5667Applications (IDNA) protocol as specified in RFC 5891. This version of the
5668protocol is often referred to as “IDNA2008” and can produce different results
5669from the earlier standard from 2003. The library is also intended to act as a
5670suitable drop-in replacement for the “encodings.idna” module that comes with
5671the Python standard library but currently only supports the older 2003
5672specification.")
5673 (license bsd-4)))
5674
5675(define-public python2-idna
5676 (package-with-python2 python-idna))
36ebf972
RW
5677
5678(define-public python-pretend
5679 (package
5680 (name "python-pretend")
5681 (version "1.0.8")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (string-append "https://pypi.python.org/packages/source/p/"
5686 "pretend/pretend-" version ".tar.gz"))
5687 (sha256
5688 (base32
5689 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5690 (build-system python-build-system)
5691 (native-inputs
5692 `(("python-setuptools" ,python-setuptools)))
5693 (home-page "https://github.com/alex/pretend")
5694 (synopsis "Library for stubbing in Python")
5695 (description
5696 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5697technique for writing tests. You may hear the term mixed up with mocks,
5698fakes, or doubles. Basically, a stub is an object that returns pre-canned
5699responses, rather than doing any computation.")
5700 (license bsd-3)))
5701
5702(define-public python2-pretend
5703 (package-with-python2 python-pretend))
aa759a51
RW
5704
5705(define-public python-cryptography-vectors
5706 (package
5707 (name "python-cryptography-vectors")
3698a775 5708 (version "1.0.2")
aa759a51
RW
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (string-append "https://pypi.python.org/packages/source/c/"
5713 "cryptography-vectors/cryptography_vectors-"
5714 version ".tar.gz"))
5715 (sha256
5716 (base32
3698a775 5717 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
aa759a51
RW
5718 (build-system python-build-system)
5719 (native-inputs
5720 `(("python-setuptools" ,python-setuptools)))
5721 (home-page "https://github.com/pyca/cryptography")
5722 (synopsis "Test vectors for the cryptography package.")
5723 (description
5724 "This package contains test vectors for the cryptography package.")
5725 ;; Distributed under either BSD-3 or ASL2.0
5726 (license (list bsd-3 asl2.0))))
5727
5728(define-public python2-cryptography-vectors
5729 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5730
5731(define-public python-cryptography
5732 (package
5733 (name "python-cryptography")
7f51b663 5734 (version "1.0.2")
88b47cb0
RW
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (string-append "https://pypi.python.org/packages/source/c/"
5739 "cryptography/cryptography-" version ".tar.gz"))
5740 (sha256
5741 (base32
7f51b663 5742 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
88b47cb0
RW
5743 (build-system python-build-system)
5744 (inputs
5745 `(("openssl" ,openssl)))
5746 (propagated-inputs
5747 `(("python-cffi" ,python-cffi)
5748 ("python-six" ,python-six)
5749 ("python-pyasn1" ,python-pyasn1)
5750 ("python-enum34" ,python-enum34)
5751 ("python-idna" ,python-idna)
5752 ("python-iso8601" ,python-iso8601)))
5753 (native-inputs
5754 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5755 ("python-setuptools" ,python-setuptools)
5756 ("python-pretend" ,python-pretend)
5757 ("python-pytest" ,python-pytest)))
5758 (home-page "https://github.com/pyca/cryptography")
5759 (synopsis "Cryptographic recipes and primitives for Python")
5760 (description
5761 "cryptography is a package which provides cryptographic recipes and
5762primitives to Python developers. It aims to be the “cryptographic standard
5763library” for Python. The package includes both high level recipes, and low
5764level interfaces to common cryptographic algorithms such as symmetric ciphers,
5765message digests and key derivation functions.")
5766 ;; Distributed under either BSD-3 or ASL2.0
5767 (license (list bsd-3 asl2.0))))
5768
5769(define-public python2-cryptography
5770 (let ((crypto (package-with-python2 python-cryptography)))
5771 (package (inherit crypto)
5772 (propagated-inputs
5773 `(("python2-ipaddress" ,python2-ipaddress)
5774 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5775
5776(define-public python-pyopenssl
5777 (package
5778 (name "python-pyopenssl")
5779 (version "0.15.1")
5780 (source
5781 (origin
5782 (method url-fetch)
5783 (uri (string-append "https://pypi.python.org/packages/source/p/"
5784 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5785 (sha256
5786 (base32
5787 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5788 (build-system python-build-system)
5789 (arguments
5790 `(#:phases
5791 (modify-phases %standard-phases
5792 (add-after 'unpack 'fix-tests
5793 (lambda* (#:key inputs #:allow-other-keys)
5794 (substitute* "OpenSSL/test/test_ssl.py"
5795 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5796 "return True")
5797 ;; FIXME: disable broken test
5798 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5799 (substitute* "OpenSSL/test/test_crypto.py"
5800 (("command = b\"openssl \"")
5801 (string-append "command = b\""
5802 (assoc-ref inputs "openssl")
5803 "/bin/openssl" " \""))
5804 ;; FIXME: disable four broken tests
5805 (("test_der") "disabled__der")
5806 (("test_digest") "disabled__digest")
5807 (("test_get_extension") "disabled__get_extension")
5808 (("test_extension_count") "disabled__extension_count"))
5809 #t)))))
5810 (propagated-inputs
5811 `(("python-cryptography" ,python-cryptography)
5812 ("python-six" ,python-six)))
5813 (inputs
5814 `(("openssl" ,openssl)))
5815 (native-inputs
5816 `(("python-setuptools" ,python-setuptools)))
5817 (home-page "https://github.com/pyca/pyopenssl")
5818 (synopsis "Python wrapper module around the OpenSSL library")
5819 (description
5820 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5821library.")
5822 (license asl2.0)))
5823
5824(define-public python2-pyopenssl
5825 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5826 (package (inherit pyopenssl)
5827 (propagated-inputs
5828 `(("python2-cryptography" ,python2-cryptography)
5829 ,@(alist-delete "python-cryptography"
5830 (package-propagated-inputs pyopenssl)))))))
643725a1
CR
5831
5832(define-public python-pip
5833 (package
5834 (name "python-pip")
5835 (version "7.1.2")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (string-append
5840 "https://pypi.python.org/packages/source/p/pip/pip-"
5841 version ".tar.gz"))
5842 (sha256
5843 (base32
5844 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5845 (build-system python-build-system)
5846 (inputs
5847 `(("python-setuptools" ,python-setuptools)
5848 ("python-virtualenv" ,python-virtualenv)
5849 ;; Tests
5850 ("python-mock" ,python-mock)
5851 ("python-pytest" ,python-pytest)
5852 ("python-scripttest" ,python-scripttest)))
5853 (home-page "https://pip.pypa.io/")
5854 (synopsis
5855 "Package manager for Python software")
5856 (description
5857 "Pip is a package manager for Python software, that finds packages on the
5858Python Package Index (PyPI).")
5859 (license license:expat)))
5860
5861(define-public python2-pip
5862 (package-with-python2 python-pip))
d8c4998f
LC
5863
5864(define-public python-tlsh
5865 (package
5866 (name "python-tlsh")
5867 (version "3.4.1") ;according to CMakeLists.txt
5868 (home-page "https://github.com/trendmicro/tlsh")
5869 (source (origin
5870 (method git-fetch)
5871 (uri (git-reference
5872 (url home-page)
5873 ;; This is a commit right after 3.4.1; see
5874 ;; <https://github.com/trendmicro/tlsh/issues/9>.
5875 (commit "3ae3f1f")))
5876 (sha256
5877 (base32
5878 "12cvnr5ndm5cg6i7lch93id90kgwgrigjgrj8f186nh3h4bf9chj"))
5879 (file-name (string-append name "-" version "-checkout"))))
5880 (build-system cmake-build-system)
5881 (arguments
5882 '(#:out-of-source? #f
5883 #:phases (modify-phases %standard-phases
5884 (replace
5885 'install
5886 (lambda* (#:key outputs #:allow-other-keys)
5887 ;; Build and install the Python bindings. The underlying
5888 ;; C++ library is apparently not meant to be installed.
5889 (let ((out (assoc-ref outputs "out")))
5890 (with-directory-excursion "py_ext"
5891 (and (system* "python" "setup.py" "build")
5892 (system* "python" "setup.py" "install"
5893 (string-append "--prefix=" out))))))))))
5894 (inputs `(("python" ,python-wrapper))) ;for the bindings
5895 (synopsis "Fuzzy matching library for Python")
5896 (description
5897 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5898Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5899value which can be used for similarity comparisons. Similar objects have
5900similar hash values, which allows for the detection of similar objects by
5901comparing their hash values. The byte stream should have a sufficient amount
5902of complexity; for example, a byte stream of identical bytes will not generate
5903a hash value.")
5904 (license asl2.0)))
5905
5906(define-public python2-tlsh
5907 (package
5908 (inherit python-tlsh)
5909 (name "python2-tlsh")
5910 (inputs `(("python" ,python-2)))))
d96034ed
LC
5911
5912(define-public python-libarchive-c
5913 (package
5914 (name "python-libarchive-c")
5915 (version "2.1")
5916 (source (origin
5917 (method url-fetch)
5918 (uri (string-append
5919 "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-"
5920 version ".tar.gz"))
5921 (sha256
5922 (base32
5923 "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n"))))
5924 (build-system python-build-system)
5925 (arguments
5926 '(#:phases (modify-phases %standard-phases
5927 (add-before
5928 'build 'reference-libarchive
5929 (lambda* (#:key inputs #:allow-other-keys)
5930 ;; Retain the absolute file name of libarchive.so.
5931 (let ((libarchive (assoc-ref inputs "libarchive")))
5932 (substitute* "libarchive/ffi.py"
5933 (("find_library\\('archive'\\)")
5934 (string-append "'" libarchive
5935 "/lib/libarchive.so'"))))
5936
5937 ;; Do not make a compressed egg (see
5938 ;; <http://bugs.gnu.org/20765>).
5939 (let ((port (open-file "setup.cfg" "a")))
5940 (display "\n[easy_install]\nzip_ok = 0\n"
5941 port)
5942 (close-port port)
5943 #t))))))
5944 (inputs
5945 `(("python-setuptools" ,python-setuptools)
5946 ("libarchive" ,libarchive)))
5947 (home-page "https://github.com/Changaco/python-libarchive-c")
5948 (synopsis "Python interface to libarchive")
5949 (description
5950 "This package provides Python bindings to libarchive, a C library to
5951access possibly compressed archives in many different formats. It uses
5952Python's @code{ctypes} foreign function interface (FFI).")
5953 (license lgpl2.0+)))
5954
5955(define-public python2-libarchive-c
5956 (package-with-python2 python-libarchive-c))
5e1c9367
LC
5957
5958(define-public python-file
5959 (package
5960 (inherit file)
5961 (name "python-file")
5962 (build-system python-build-system)
5963 (arguments
5964 '(#:tests? #f ;no tests
5965 #:phases (modify-phases %standard-phases
5966 (add-before 'build 'change-directory
5967 (lambda _
5968 (chdir "python")
5969 #t))
5970 (add-before 'build 'set-library-file-name
5971 (lambda* (#:key inputs #:allow-other-keys)
5972 (let ((file (assoc-ref inputs "file")))
5973 (substitute* "magic.py"
5974 (("find_library\\('magic'\\)")
5975 (string-append "'" file "/lib/libmagic.so'")))
5976 #t))))))
5977 (inputs `(("file" ,file)))
5978 (self-native-input? #f)
5979 (synopsis "Python bindings to the libmagic file type guesser")))
5980
5981(define-public python2-file
5982 (package-with-python2 python-file))
85d4aeac
LC
5983
5984(define-public python-debian
5985 (package
5986 (name "python-debian")
5987 (version "0.1.23")
5988 (source
5989 (origin
5990 (method url-fetch)
5991 (uri (string-append
5992 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
5993 version ".tar.gz"))
5994 (sha256
5995 (base32
5996 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
5997 (build-system python-build-system)
5998 (inputs
5999 `(("python-six" ,python-six)))
6000 (native-inputs
6001 `(("python-setuptools" ,python-setuptools)))
6002 (home-page "http://packages.debian.org/sid/python-debian")
6003 (synopsis "Debian package related modules")
6004 (description
5c7bdc9a
LC
6005 ;; XXX: Use @enumerate instead of @itemize to work around
6006 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6007 "This package provides Python modules that abstract many formats of
6008Debian-related files, such as:
6009
5c7bdc9a 6010@enumerate
85d4aeac
LC
6011@item Debtags information;
6012@item @file{debian/changelog} files;
6013@item packages files, pdiffs;
6014@item control files of single or multiple RFC822-style paragraphs---e.g.
6015 @file{debian/control}, @file{.changes}, @file{.dsc};
6016@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6017 contained files and meta-information.
5c7bdc9a 6018@end enumerate\n")
85d4aeac
LC
6019
6020 ;; Modules are either GPLv2+ or GPLv3+.
6021 (license gpl3+)))
6022
6023(define-public python2-debian
6024 (package-with-python2 python-debian))
816a6538
LC
6025
6026(define-public python-chardet
6027 (package
6028 (name "python-chardet")
6029 (version "2.3.0")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (string-append
6034 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6035 version
6036 ".tar.gz"))
6037 (sha256
6038 (base32
6039 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6040 (build-system python-build-system)
6041 (native-inputs
6042 `(("python-setuptools" ,python-setuptools)))
6043 (home-page "https://github.com/chardet/chardet")
6044 (synopsis "Universal encoding detector for Python 2 and 3")
6045 (description
6046 "This package provides @code{chardet}, a Python module that can
6047automatically detect a wide range of file encodings.")
6048 (license lgpl2.1+)))
6049
6050(define-public python2-chardet
6051 (package-with-python2 python-chardet))
2fc5f186 6052
1872f1bb
KM
6053(define-public python-docopt
6054 (package
6055 (name "python-docopt")
6056 (version "0.6.2")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 ;; The release on PyPI does not include tests.
6061 (uri (string-append
6062 "https://github.com/docopt/docopt/archive/"
6063 version ".tar.gz"))
6064 (file-name (string-append name "-" version ".tar.gz"))
6065 (sha256
6066 (base32
6067 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6068 (build-system python-build-system)
6069 (native-inputs
6070 `(("python-pytest" ,python-pytest)
6071 ("python-setuptools" ,python-setuptools)))
6072 (arguments
6073 `(#:phases (alist-replace
6074 'check
6075 (lambda _ (zero? (system* "py.test")))
6076 %standard-phases)))
6077 (home-page "http://docopt.org")
6078 (synopsis "Command-line interface description language for Python")
6079 (description "This library allows the user to define a command-line
6080interface from a program's help message rather than specifying it
6081programatically with command-line parsers like @code{getopt} and
6082@code{argparse}.")
6083 (license license:expat)))
6084
6085(define-public python2-docopt
6086 (package-with-python2 python-docopt))
6087
2fc5f186
LF
6088(define-public python-zope-event
6089 (package
6090 (name "python-zope-event")
6091 (version "4.1.0")
6092 (source
6093 (origin
6094 (method url-fetch)
6095 (uri (string-append "https://pypi.python.org/packages/source/z"
6096 "/zope.event/zope.event-" version ".tar.gz"))
6097 (sha256
6098 (base32
6099 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6100 (build-system python-build-system)
6101 (inputs
6102 `(("python-setuptools" ,python-setuptools)))
6103 (home-page "http://pypi.python.org/pypi/zope.event")
6104 (synopsis "Event publishing system for Python")
6105 (description "Zope.event provides an event publishing API, intended for
6106use by applications which are unaware of any subscribers to their events. It
6107is a simple event-dispatching system on which more sophisticated event
6108dispatching systems can be built.")
6109 (license zpl2.1)))
6110
6111(define-public python2-zope-event
6112 (package-with-python2 python-zope-event))
97abe268
LF
6113
6114(define-public python-zope-interface
6115 (package
6116 (name "python-zope-interface")
6117 (version "4.1.3")
6118 (source
6119 (origin
6120 (method url-fetch)
6121 (uri (string-append "https://pypi.python.org/packages/source/z"
6122 "/zope.interface/zope.interface-" version ".tar.gz"))
6123 (sha256
6124 (base32
6125 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6126 (build-system python-build-system)
6127 (propagated-inputs
6128 `(("python-zope-event" ,python-zope-event)))
6129 (home-page "https://github.com/zopefoundation/zope.interface")
6130 (synopsis "Python implementation of the \"design by contract\"
6131methodology")
6132 (description "Zope.interface provides an implementation of \"object
6133interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6134conforming to a given API or contract.")
6135 (license zpl2.1)))
6136
6137(define-public python2-zope-interface
6138 (package-with-python2 python-zope-interface))
81f2373c
LF
6139
6140(define-public python-zope-exceptions
6141 (package
6142 (name "python-zope-exceptions")
6143 (version "4.0.8")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (string-append "https://pypi.python.org/packages/source/z"
6148 "/zope.exceptions/zope.exceptions-"
6149 version ".tar.gz"))
6150 (sha256
6151 (base32
6152 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6153 (build-system python-build-system)
6154 (arguments
6155 '(#:tests? #f)) ; circular dependency with zope.testrunner
6156 (propagated-inputs
6157 `(("python-zope-interface" ,python-zope-interface)))
6158 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6159 (synopsis "Zope exceptions")
6160 (description "Zope.exceptions provides general-purpose exception types
6161that have uses outside of the Zope framework.")
6162 (license zpl2.1)))
6163
6164(define-public python2-zope-exceptions
6165 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6166
6167(define-public python-zope-testing
6168 (package
6169 (name "python-zope-testing")
6170 (version "4.5.0")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (string-append "https://pypi.python.org/packages/source/z"
6175 "/zope.testing/zope.testing-" version ".tar.gz"))
6176 (sha256
6177 (base32
6178 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6179 (build-system python-build-system)
6180 (native-inputs
6181 `(("python-zope-exceptions" ,python-zope-exceptions)))
6182 (propagated-inputs
6183 `(("python-zope-interface" ,python-zope-interface)))
6184 (home-page "http://pypi.python.org/pypi/zope.testing")
6185 (synopsis "Zope testing helpers")
6186 (description "Zope.testing provides a number of testing utilities for HTML
6187forms, HTTP servers, regular expressions, and more.")
6188 (license zpl2.1)))
6189
6190(define-public python2-zope-testing
6191 (package-with-python2 python-zope-testing))
01614c4f
LF
6192
6193(define-public python-zope-testrunner
6194 (package
6195 (name "python-zope-testrunner")
6196 (version "4.4.9")
6197 (source
6198 (origin
6199 (method url-fetch)
6200 (uri (string-append "https://pypi.python.org/packages/source/z"
6201 "/zope.testrunner/zope.testrunner-"
6202 version ".zip"))
6203 (sha256
6204 (base32
6205 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6206 (build-system python-build-system)
6207 (native-inputs
6208 `(("python-six" ,python-six)
6209 ("python-zope-exceptions" ,python-zope-exceptions)
6210 ("python-zope-testing" ,python-zope-testing)
6211 ("unzip" ,unzip)))
6212 (propagated-inputs
6213 `(("python-zope-interface" ,python-zope-interface)))
6214 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6215 (synopsis "Zope testrunner script")
6216 (description "Zope.testrunner provides a script for running Python
6217tests.")
6218 (license zpl2.1)))
6219
6220(define-public python2-zope-testrunner
6221 (let ((base (package-with-python2 python-zope-testrunner)))
6222 (package
6223 (inherit base)
6224 (native-inputs
6225 (append (package-native-inputs base)
6226 `(("python2-subunit" ,python2-subunit)
6227 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6228
6229(define-public python-zope-i18nmessageid
6230 (package
6231 (name "python-zope-i18nmessageid")
6232 (version "4.0.3")
6233 (source
6234 (origin
6235 (method url-fetch)
6236 (uri (string-append
6237 "https://pypi.python.org/packages/source/z"
6238 "/zope.i18nmessageid/zope.i18nmessageid-"
6239 version ".tar.gz"))
6240 (sha256
6241 (base32
6242 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6243 (build-system python-build-system)
6244 (inputs
6245 `(("python-setuptools" ,python-setuptools)))
6246 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6247 (synopsis "Message identifiers for internationalization")
6248 (description "Zope.i18nmessageid provides facilities for declaring
6249internationalized messages within program source text.")
6250 (license zpl2.1)))
6251
6252(define-public python2-zope-i18nmessageid
6253 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6254
6255(define-public python-zope-schema
6256 (package
6257 (name "python-zope-schema")
6258 (version "4.4.2")
6259 (source
6260 (origin
6261 (method url-fetch)
6262 (uri (string-append "https://pypi.python.org/packages/source/z"
6263 "/zope.schema/zope.schema-" version ".tar.gz"))
6264 (sha256
6265 (base32
6266 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6267 (build-system python-build-system)
6268 (propagated-inputs
6269 `(("python-zope-event" ,python-zope-event)
6270 ("python-zope-interface" ,python-zope-interface)))
6271 (native-inputs
6272 `(("python-zope-testing" ,python-zope-testing)))
6273 (home-page "http://pypi.python.org/pypi/zope.schema")
6274 (synopsis "Zope data schemas")
6275 (description "Zope.scheme provides extensions to zope.interface for
6276defining data schemas.")
6277 (license zpl2.1)))
6278
6279(define-public python2-zope-schema
6280 (package-with-python2 python-zope-schema))
fbac9b17
LF
6281
6282(define-public python-zope-configuration
6283 (package
6284 (name "python-zope-configuration")
6285 (version "4.0.3")
6286 (source (origin
6287 (method url-fetch)
6288 (uri (string-append "https://pypi.python.org/packages/source/z"
6289 "/zope.configuration/zope.configuration-"
6290 version ".tar.gz"))
6291 (sha256
6292 (base32
6293 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6294 (build-system python-build-system)
6295 (propagated-inputs
6296 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6297 ("python-zope-schema" ,python-zope-schema)))
6298 (home-page "http://pypi.python.org/pypi/zope.configuration")
6299 (synopsis "Zope Configuration Markup Language")
6300 (description "Zope.configuration implements ZCML, the Zope Configuration
6301Markup Language.")
6302 (license zpl2.1)))
6303
6304(define-public python2-zope-configuration
6305 (package-with-python2 python-zope-configuration))
2ad52086
LF
6306
6307(define-public python-zope-proxy
6308 (package
6309 (name "python-zope-proxy")
6310 (version "4.1.6")
6311 (source
6312 (origin
6313 (method url-fetch)
6314 (uri (string-append "https://pypi.python.org/packages/source/z"
6315 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6316 (sha256
6317 (base32
6318 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6319 (build-system python-build-system)
6320 (propagated-inputs
6321 `(("python-zope-interface" ,python-zope-interface)))
6322 (home-page "http://pypi.python.org/pypi/zope.proxy")
6323 (synopsis "Generic, transparent proxies")
6324 (description "Zope.proxy provides generic, transparent proxies for Python.
6325Proxies are special objects which serve as mostly-transparent wrappers around
6326another object, intervening in the apparent behavior of the wrapped object
6327only when necessary to apply the policy (e.g., access checking, location
6328brokering, etc.) for which the proxy is responsible.")
6329 (license zpl2.1)))
6330
6331(define-public python2-zope-proxy
6332 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6333
6334(define-public python-zope-location
6335 (package
6336 (name "python-zope-location")
6337 (version "4.0.3")
6338 (source
6339 (origin
6340 (method url-fetch)
6341 (uri (string-append "https://pypi.python.org/packages/source/z"
6342 "/zope.location/zope.location-" version ".tar.gz"))
6343 (sha256
6344 (base32
6345 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6346 (build-system python-build-system)
6347 (native-inputs
6348 `(("python-zope-proxy" ,python-zope-proxy)
6349 ("python-zope-schema" ,python-zope-schema)))
6350 (home-page "http://pypi.python.org/pypi/zope.location/")
6351 (synopsis "Zope location library")
6352 (description "Zope.location implements the concept of \"locations\" in
6353Zope3, which are are special objects that have a structural location.")
6354 (license zpl2.1)))
6355
6356(define-public python2-zope-location
6357 (package-with-python2 python-zope-location))
d4b77f36
LF
6358
6359(define-public python-zope-security
6360 (package
6361 (name "python-zope-security")
6362 (version "4.0.3")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (string-append "https://pypi.python.org/packages/source/z"
6367 "/zope.security/zope.security-" version ".tar.gz"))
6368 (sha256
6369 (base32
6370 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6371 (build-system python-build-system)
6372 (propagated-inputs
6373 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6374 ("python-zope-component" ,python-zope-component)
6375 ("python-zope-location" ,python-zope-location)
6376 ("python-zope-proxy" ,python-zope-proxy)
6377 ("python-zope-schema" ,python-zope-schema)
6378 ("python-zope-testrunner" ,python-zope-testrunner)
6379 ("python-zope-testing" ,python-zope-testing)))
6380 (home-page "http://pypi.python.org/pypi/zope.security")
6381 (synopsis "Zope security framework")
6382 (description "Zope.security provides a generic mechanism to implement
6383security policies on Python objects.")
6384 (license zpl2.1)))
6385
6386(define-public python2-zope-security
04417662
EF
6387 (let ((zope-security (package-with-python2 python-zope-security)))
6388 (package (inherit zope-security)
6389 (propagated-inputs
6390 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6391 ,@(alist-delete
6392 "python-zope-testrunner"
6393 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6394
6395(define-public python-zope-component
6396 (package
6397 (name "python-zope-component")
6398 (version "4.2.2")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (string-append "https://pypi.python.org/packages/source/z"
6403 "/zope.component/zope.component-" version ".tar.gz"))
6404 (sha256
6405 (base32
6406 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6407 (build-system python-build-system)
6408 (arguments
6409 ;; Skip tests due to circular dependency with python-zope-security.
6410 '(#:tests? #f))
6411 (native-inputs
6412 `(("python-zope-testing" ,python-zope-testing)))
6413 (propagated-inputs
6414 `(("python-zope-event" ,python-zope-event)
6415 ("python-zope-interface" ,python-zope-interface)
6416 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6417 ("python-zope-configuration" ,python-zope-configuration)))
6418 (home-page "https://github.com/zopefoundation/zope.component")
6419 (synopsis "Zope Component Architecture")
6420 (description "Zope.component represents the core of the Zope Component
6421Architecture. Together with the zope.interface package, it provides
6422facilities for defining, registering and looking up components.")
6423 (license zpl2.1)))
6424
6425(define-public python2-zope-component
6426 (package-with-python2 python-zope-component))
3859ac12 6427
b5f218be
LF
6428(define-public python2-pythondialog
6429 (package
6430 (name "python2-pythondialog")
6431 (version "3.3.0")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (string-append "https://pypi.python.org/packages/source/p/"
6436 "python2-pythondialog/python2-pythondialog-"
6437 version ".tar.gz"))
6438 (sha256
6439 (base32
6440 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6441 (build-system python-build-system)
6442 (arguments
6443 `(#:phases
6444 (modify-phases %standard-phases
6445 (add-after 'unpack 'patch-path
6446 (lambda* (#:key inputs #:allow-other-keys)
6447 (let* ((dialog (assoc-ref inputs "dialog")))
6448 ;; Since this library really wants to grovel the search path, we
6449 ;; must hardcode dialog's store path into it.
6450 (substitute* "dialog.py"
6451 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6452 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6453 #t))))
6454 #:python ,python-2
6455 #:tests? #f)) ; no test suite
6456 (propagated-inputs
6457 `(("dialog" ,dialog)))
6458 (home-page "http://pythondialog.sourceforge.net/")
6459 (synopsis "Python interface to the UNIX dialog utility")
6460 (description "A Python wrapper for the dialog utility. Its purpose is to
6461provide an easy to use, pythonic and comprehensive Python interface to dialog.
6462This allows one to make simple text-mode user interfaces on Unix-like systems")
6463 (license lgpl2.1)))
6464
3859ac12
LF
6465(define-public python-pyrfc3339
6466 (package
6467 (name "python-pyrfc3339")
6468 (version "0.2")
6469 (source
6470 (origin
6471 (method url-fetch)
6472 (uri (string-append "https://pypi.python.org/packages/source/p/"
6473 "pyRFC3339/pyRFC3339-" version ".tar.gz"))
6474 (sha256
6475 (base32
6476 "1pp648xsjaw9h1xq2mgwzda5wis2ypjmzxlksc1a8grnrdmzy155"))))
6477 (build-system python-build-system)
6478 (propagated-inputs
6479 `(("python-pytz" ,python-pytz)))
6480 (native-inputs
6481 `(("python-nose" ,python-nose)
6482 ("python-setuptools" ,python-setuptools)))
6483 (home-page "https://github.com/kurtraschke/pyRFC3339")
6484 (synopsis "Python timestamp library")
6485 (description "Python library for generating and parsing RFC 3339-compliant
6486timestamps.")
6487 (license license:expat)))
6488
6489(define-public python2-pyrfc3339
6490 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6491
6492(define-public python-werkzeug
6493 (package
6494 (name "python-werkzeug")
6495 (version "0.11.2")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6500 "/Werkzeug-" version ".tar.gz"))
6501 (file-name (string-append name "-" version ".tar.gz"))
6502 (sha256
6503 (base32
6504 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6505 (build-system python-build-system)
6506 (native-inputs
6507 `(("python-pytest" ,python-pytest)))
6508 (home-page "http://werkzeug.pocoo.org/")
6509 (synopsis "Utilities for WSGI applications")
6510 (description "One of the most advanced WSGI utility modules. It includes a
6511powerful debugger, full-featured request and response objects, HTTP utilities to
6512handle entity tags, cache control headers, HTTP dates, cookie handling, file
6513uploads, a powerful URL routing system and a bunch of community-contributed
6514addon modules.")
6515 (license x11)))
6516
6517(define-public python2-werkzeug
6518 (package-with-python2 python-werkzeug))
99fffa8a
LF
6519
6520(define-public python-configobj
6521 (package
6522 (name "python-configobj")
6523 (version "5.0.6")
6524 (source (origin
6525 (method url-fetch)
6526 (uri (string-append
6527 "https://pypi.python.org/packages/source/c/configobj/"
6528 "configobj-" version ".tar.gz"))
6529 (sha256
6530 (base32
6531 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6532 ;; Patch setup.py so it looks for python-setuptools, which is
6533 ;; required to parse the keyword 'install_requires' in setup.py.
6534 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6535 (build-system python-build-system)
6536 (native-inputs
6537 `(("python-setuptools" ,python-setuptools)
6538 ("python-six" ,python-six)))
6539 (synopsis "Config file reading, writing and validation")
6540 (description "ConfigObj is a simple but powerful config file reader and
6541writer: an ini file round tripper. Its main feature is that it is very easy to
6542use, with a straightforward programmer’s interface and a simple syntax for
6543config files.")
6544 (home-page "https://github.com/DiffSK/configobj")
6545 (license bsd-3)))
6546
6547(define-public python2-configobj
6548 (package-with-python2 python-configobj))
79e8a291
LF
6549
6550(define-public python-configargparse
6551 (package
6552 (name "python-configargparse")
6553 (version "0.10.0")
6554 (source (origin
6555 (method url-fetch)
6556 (uri (string-append
6557 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6558 "ConfigArgParse-" version ".tar.gz"))
6559 (sha256
6560 (base32
6561 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6562 (build-system python-build-system)
6563 (arguments
6564 ;; FIXME: Bug in test suite filed upstream:
6565 ;; https://github.com/bw2/ConfigArgParse/issues/32
6566 '(#:tests? #f))
6567 (synopsis "Replacement for argparse")
6568 (description "A drop-in replacement for argparse that allows options to also
6569be set via config files and/or environment variables.")
6570 (home-page "https://github.com/bw2/ConfigArgParse")
6571 (license license:expat)))
6572
6573(define-public python2-configargparse
6574 (package-with-python2 python-configargparse))
ab41f979
LF
6575
6576(define-public python-ndg-httpsclient
6577 (package
6578 (name "python-ndg-httpsclient")
6579 (version "0.4.0")
6580 (source (origin
6581 (method url-fetch)
6582 (uri (string-append
6583 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6584 "ndg_httpsclient-" version ".tar.gz"))
6585 (sha256
6586 (base32
6587 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6588 (build-system python-build-system)
6589 (propagated-inputs
6590 `(("python-pyopenssl" ,python-pyopenssl)))
6591 (synopsis "HTTPS support for Python's httplib and urllib2")
6592 (description "This is a HTTPS client implementation for httplib and urllib2
6593based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6594over the default provided with Python and importantly enables full verification
6595of the SSL peer.")
6596 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6597 (license bsd-3)))
6598
6599;; python2-openssl requires special care, so package-with-python2 is
6600;; insufficient.
6601(define-public python2-ndg-httpsclient
6602 (package (inherit python-ndg-httpsclient)
6603 (name "python2-ndg-httpsclient")
6604 (arguments `(#:python ,python-2))
6605 (propagated-inputs
6606 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6607
6608(define-public python-contextlib2
6609 (package
6610 (name "python-contextlib2")
6611 (version "0.4.0")
6612 (source
6613 (origin
6614 (method url-fetch)
6615 (uri (pypi-uri "contextlib2" version))
6616 (sha256
6617 (base32
6618 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6619 (build-system python-build-system)
6620 (arguments
6621 `(#:phases
6622 (modify-phases %standard-phases
6623 (replace 'check
6624 (lambda _ (zero?
6625 (system*
6626 "python" "test_contextlib2.py", "-v")))))))
6627 (home-page "http://contextlib2.readthedocs.org/")
6628 (synopsis "Tools for decorators and context managers")
6629 (description "This module is primarily a backport of the Python
66303.2 contextlib to earlier Python versions. Like contextlib, it
6631provides utilities for common tasks involving decorators and context
6632managers. It also contains additional features that are not part of
6633the standard library.")
6634 (license psfl)))
6635
6636(define-public python2-contextlib2
6637 (package-with-python2 python-contextlib2))