gnu: python-py: Update to 1.4.31.
[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")
71c8a804 1567 (version "1.4.31")
542ad60f
DT
1568 (source
1569 (origin
1570 (method url-fetch)
71c8a804 1571 (uri (pypi-uri "py" version))
542ad60f
DT
1572 (sha256
1573 (base32
71c8a804 1574 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1575 (build-system python-build-system)
1576 (inputs
1577 `(("python-setuptools" ,python-setuptools)))
1578 (home-page "http://pylib.readthedocs.org/")
1579 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1580 (description
1581 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1582code introspection, and logging.")
bd3fa666 1583 (license license:expat)))
542ad60f
DT
1584
1585(define-public python2-py
1586 (package-with-python2 python-py))
1587
855d4761
DT
1588(define-public python-pytest
1589 (package
1590 (name "python-pytest")
1591 (version "2.6.1")
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (string-append
1596 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1597 version ".tar.gz"))
1598 (sha256
1599 (base32
1600 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1601 (modules '((guix build utils)))
1602 (snippet
1603 ;; One of the tests involves the /usr directory, so it fails.
1604 '(substitute* "testing/test_argcomplete.py"
1605 (("def test_remove_dir_prefix\\(self\\):")
1606 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1607 (build-system python-build-system)
1608 (inputs
1609 `(("python-setuptools" ,python-setuptools)
1610 ("python-py" ,python-py)
1611 ("python-nose" ,python-nose)
1612 ("python-mock" ,python-mock)))
1613 (home-page "http://pytest.org")
1614 (synopsis "Python testing library")
1615 (description
1616 "Pytest is a testing tool that provides auto-discovery of test modules
1617and functions, detailed info on failing assert statements, modular fixtures,
1618and many external plugins.")
bd3fa666 1619 (license license:expat)))
855d4761
DT
1620
1621(define-public python2-pytest
1622 (package-with-python2 python-pytest))
1623
358c3d61
EF
1624(define-public python-pytest-cov
1625 (package
1626 (name "python-pytest-cov")
1627 (version "2.2.0")
1628 (source
1629 (origin
1630 (method url-fetch)
1631 (uri (pypi-uri "pytest-cov" version))
1632 (sha256
1633 (base32
1634 "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
1635 (build-system python-build-system)
1636 (propagated-inputs
1637 `(("python-coverage" ,python-coverage)
1638 ("python-pytest" ,python-pytest)))
1639 (native-inputs
1640 `(("python-setuptools" ,python-setuptools)))
1641 (home-page "https://github.com/pytest-dev/pytest-cov")
1642 (synopsis "Pytest plugin for measuring coverage")
1643 (description
1644 "Pytest-cov produces coverage reports. It supports centralised testing and
1645distributed testing in both load and each modes. It also supports coverage
1646of subprocesses.")
1647 (license license:expat)))
1648
1649(define-public python2-pytest-cov
1650 (package-with-python2 python-pytest-cov))
1651
6784f2e3
RW
1652(define-public python-pytest-runner
1653 (package
1654 (name "python-pytest-runner")
1655 (version "2.6.2")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (string-append "https://pypi.python.org/packages/source/p/"
1660 "pytest-runner/pytest-runner-"
1661 version ".tar.gz"))
1662 (sha256
1663 (base32
1664 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1665 (build-system python-build-system)
1666 (arguments
1667 `(#:phases
1668 (modify-phases %standard-phases
1669 ;; The fancy way of setting the version with setuptools_scm does not
1670 ;; seem to work here.
1671 (add-after 'unpack 'set-version
1672 (lambda _
1673 (substitute* "docs/conf.py"
1674 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1675 (string-append "version = \"" ,version "\"")))
1676 #t)))))
1677 (native-inputs
1678 `(("python-pytest" ,python-pytest)
d50d097d 1679 ("python-setuptools" ,python-setuptools)
6784f2e3
RW
1680 ("python-setuptools-scm" ,python-setuptools-scm)))
1681 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1682 (synopsis "Invoke py.test as a distutils command")
1683 (description
1684 "This package provides a @command{pytest-runner} command that
1685@file{setup.py} files can use to run tests.")
1686 (license license:expat)))
1687
1688(define-public python2-pytest-runner
1689 (package-with-python2 python-pytest-runner))
1690
84d24017
DT
1691(define-public python-scripttest
1692 (package
1693 (name "python-scripttest")
1694 (version "1.3")
1695 (source
1696 (origin
1697 (method url-fetch)
1698 (uri (string-append
1699 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1700 version ".tar.gz"))
1701 (sha256
1702 (base32
1703 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1704 (build-system python-build-system)
1705 (inputs
1706 `(("python-setuptools" ,python-setuptools)
1707 ("python-pytest" ,python-pytest)))
1708 (home-page "http://pythonpaste.org/scripttest/")
1709 (synopsis "Python library to test command-line scripts")
1710 (description "Scripttest is a Python helper library for testing
1711interactive command-line applications. With it you can run a script in a
1712subprocess and see the output as well as any file modifications.")
bd3fa666 1713 (license license:expat)))
84d24017
DT
1714
1715(define-public python2-scripttest
1716 (package-with-python2 python-scripttest))
1717
d8fa80e1
DT
1718(define-public python-testtools
1719 (package
1720 (name "python-testtools")
1721 (version "1.0.0")
1722 (source
1723 (origin
1724 (method url-fetch)
1725 (uri (string-append
1726 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1727 version ".tar.gz"))
1728 (sha256
1729 (base32
1730 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1731 (build-system python-build-system)
0e88cbf8
CR
1732 (propagated-inputs
1733 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1734 (inputs
1735 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1736 ("python-extras" ,python-extras)))
1737 (home-page "https://github.com/testing-cabal/testtools")
1738 (synopsis
1739 "Extensions to the Python standard library unit testing framework")
1740 (description
1741 "Testtools extends the Python standard library unit testing framework to
1742provide matchers, more debugging information, and cross-Python
1743compatibility.")
1744 (license psfl)))
1745
1746(define-public python2-testtools
1747 (package-with-python2 python-testtools))
1748
5bf3afea
DT
1749(define-public python-testscenarios
1750 (package
1751 (name "python-testscenarios")
1752 (version "0.4")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (string-append
1757 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1758 version ".tar.gz"))
1759 (sha256
1760 (base32
1761 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1762 (build-system python-build-system)
1763 (inputs
1764 `(("python-setuptools" ,python-setuptools)
1765 ("python-testtools" ,python-testtools)
1766 ("python-mimeparse" ,python-mimeparse)))
1767 (home-page "https://launchpad.net/testscenarios")
1768 (synopsis "Pyunit extension for dependency injection")
1769 (description
1770 "Testscenarios provides clean dependency injection for Python unittest
1771style tests.")
1772 (license (list bsd-3 asl2.0)))) ; at the user's option
1773
1774(define-public python2-testscenarios
1775 (package-with-python2 python-testscenarios))
1776
dac79ecc
DT
1777(define-public python-testresources
1778 (package
1779 (name "python-testresources")
1780 (version "0.2.7")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (string-append
1785 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1786 version ".tar.gz"))
1787 (sha256
1788 (base32
1789 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1790 (build-system python-build-system)
1791 (inputs
1792 `(("python-setuptools" ,python-setuptools)))
1793 (home-page "https://launchpad.net/testresources")
1794 (synopsis
1795 "Pyunit extension for managing test resources")
1796 (description
1797 "Testresources is an extension to Python's unittest to allow declarative
1798use of resources by test cases.")
1799 (license (list bsd-3 asl2.0)))) ; at the user's option
1800
1801(define-public python2-testresources
1802 (package-with-python2 python-testresources))
1803
070ab058
DT
1804(define-public python-subunit
1805 (package
1806 (name "python-subunit")
1807 (version "0.0.21")
1808 (source
1809 (origin
1810 (method url-fetch)
1811 (uri (string-append
1812 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1813 version ".tar.gz"))
1814 (sha256
1815 (base32
1816 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1817 (build-system python-build-system)
1818 (inputs
1819 `(("python-setuptools" ,python-setuptools)
1820 ("python-testtools" ,python-testtools)
1821 ("python-mimeparse" ,python-mimeparse)
1822 ("python-testscenarios" ,python-testscenarios)))
1823 (home-page "http://launchpad.net/subunit")
1824 (synopsis "Python implementation of the subunit protocol")
1825 (description
1826 "Python-subunit is a Python implementation of the subunit test streaming
1827protocol.")
1828 (license (list bsd-3 asl2.0)))) ; at the user's option
1829
1830(define-public python2-subunit
1831 (package-with-python2 python-subunit))
1832
7787ef76
CR
1833;; Recent versions of python-fixtures need a recent version of python-pbr,
1834;; which needs a recent version of python-fixtures. To fix this circular
1835;; dependency, we keep old versions of python-fixtures and python-pbr to
1836;; bootstrap the whole thing:
1837;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1838;; - python-pbr-0.11 is used to build python-fixtures
1839;; - python-fixtures is used to build python-pbr
1840(define-public python-fixtures-0.3.16
cd49454b
DT
1841 (package
1842 (name "python-fixtures")
1843 (version "0.3.16")
1844 (source
1845 (origin
1846 (method url-fetch)
1847 (uri (string-append
1848 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1849 version ".tar.gz"))
1850 (sha256
1851 (base32
1852 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1853 (build-system python-build-system)
1854 (inputs
1855 `(("python-setuptools" ,python-setuptools)))
1856 (arguments
1857 '(#:tests? #f)) ; no setup.py test command
1858 (home-page "https://launchpad.net/python-fixtures")
1859 (synopsis "Python test fixture library")
1860 (description
1861 "Fixtures provides a way to create reusable state, useful when writing
1862Python tests.")
1863 (license (list bsd-3 asl2.0)))) ; at user's option
1864
7787ef76
CR
1865(define-public python2-fixtures-0.3.16
1866 (package-with-python2 python-fixtures-0.3.16))
1867
1868(define-public python-pbr-0.11
1869 (package
1870 (name "python-pbr")
1871 (version "0.11.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (string-append
1876 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1877 version ".tar.gz"))
1878 (sha256
1879 (base32
1880 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1881 (build-system python-build-system)
1882 (arguments
1883 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1884 (inputs
1885 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1886 ("python-pip" ,python-pip)
1887 ("python-setuptools" ,python-setuptools)))
1888 (home-page "https://launchpad.net/pbr")
1889 (synopsis "Change the default behavior of Python’s setuptools")
1890 (description
1891 "Python Build Reasonableness (PBR) is a library that injects some useful
1892and sensible default behaviors into your setuptools run.")
1893 (license asl2.0)))
1894
1895(define-public python2-pbr-0.11
1896 (package-with-python2 python-pbr-0.11))
1897
1898(define-public python-fixtures
1899 (package
1900 (name "python-fixtures")
1901 (version "1.3.1")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (string-append
1906 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1907 version ".tar.gz"))
1908 (sha256
1909 (base32
1910 "1khpywdh91ijryhxjxiyyi5rmbimhl8hwbbf8lazhgzq6yxz6g5n"))))
1911 (build-system python-build-system)
1912 (propagated-inputs
1913 `(("python-six" ,python-six)
1914 ("python-pbr-0.11" ,python-pbr-0.11)))
1915 (inputs
1916 `(("python-pip" ,python-pip)
1917 ("python-setuptools" ,python-setuptools)
1918 ;; Tests
1919 ("python-testtools" ,python-testtools)))
1920 (arguments
1921 '(#:tests? #f)) ; no setup.py test command
1922 (home-page "https://launchpad.net/python-fixtures")
1923 (synopsis "Python test fixture library")
1924 (description
1925 "Fixtures provides a way to create reusable state, useful when writing
1926Python tests.")
1927 (license (list bsd-3 asl2.0)))) ; at user's option
1928
cd49454b
DT
1929(define-public python2-fixtures
1930 (package-with-python2 python-fixtures))
1931
b24a0c00
DT
1932(define-public python-testrepository
1933 (package
1934 (name "python-testrepository")
1935 (version "0.0.20")
1936 (source
1937 (origin
1938 (method url-fetch)
1939 (uri (string-append
1940 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1941 version ".tar.gz"))
1942 (sha256
1943 (base32
1944 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1945 (build-system python-build-system)
05de40c5 1946 (propagated-inputs
7787ef76 1947 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 1948 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1949 (inputs
1950 `(("python-setuptools" ,python-setuptools)
b24a0c00 1951 ("python-subunit" ,python-subunit)
b24a0c00
DT
1952 ("python-mimeparse" ,python-mimeparse)))
1953 (home-page "https://launchpad.net/testrepository")
1954 (synopsis "Database for Python test results")
1955 (description "Testrepository provides a database of test results which can
1956be used as part of a developer's workflow to check things such as what tests
1957have failed since the last commit or what tests are currently failing.")
1958 (license (list bsd-3 asl2.0)))) ; at user's option
1959
1960(define-public python2-testrepository
1961 (package-with-python2 python-testrepository))
1962
243a009a
DT
1963(define-public python-coverage
1964 (package
1965 (name "python-coverage")
1966 (version "3.7.1")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (string-append
1971 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1972 version ".tar.gz"))
1973 (sha256
1974 (base32
1975 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1976 (build-system python-build-system)
1977 (inputs
1978 `(("python-setuptools" ,python-setuptools)))
1979 (home-page "http://nedbatchelder.com/code/coverage")
1980 (synopsis "Code coverage measurement for Python")
1981 (description
1982 "Coverage measures code coverage, typically during test execution. It
1983uses the code analysis tools and tracing hooks provided in the Python standard
1984library to determine which lines are executable, and which have been
1985executed.")
1986 (license bsd-3)))
1987
1988(define-public python2-coverage
1989 (package-with-python2 python-coverage))
1990
041358fb
DT
1991(define-public python-discover
1992 (package
1993 (name "python-discover")
1994 (version "0.4.0")
1995 (source
1996 (origin
1997 (method url-fetch)
1998 (uri (string-append
1999 "https://pypi.python.org/packages/source/d/discover/discover-"
2000 version ".tar.gz"))
2001 (sha256
2002 (base32
2003 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2004 (build-system python-build-system)
2005 (inputs
2006 `(("python-setuptools" ,python-setuptools)))
2007 (home-page "http://pypi.python.org/pypi/discover/")
2008 (synopsis
2009 "Python test discovery for unittest")
2010 (description
2011 "Discover provides test discovery for unittest, a feature that has been
e881752c 2012backported from Python 2.7 for Python 2.4+.")
041358fb
DT
2013 (license bsd-3)))
2014
2015(define-public python2-discover
2016 (package-with-python2 python-discover))
2017
a480bc41
EB
2018(define-public behave
2019 (package
2020 (name "behave")
2021 (version "1.2.4")
2022 (source (origin
2023 (method url-fetch)
2024 (uri (string-append "https://pypi.python.org/packages/source/b/"
2025 name "/" name "-" version ".tar.gz"))
2026 (sha256
2027 (base32
2028 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2029 (build-system python-build-system)
2030 (inputs
2031 `(("python-setuptools" ,python-setuptools)
2032 ("python-six" ,python-six)
2033 ("python-enum43" ,python-enum34)
2034 ("python-parse" ,python-parse)
2035 ("python-parse-type" ,python-parse-type)))
2036 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2037 ;PyHamcrest>=1.8
2038 (home-page "http://github.com/behave/behave")
2039 (synopsis "Python behavior-driven development")
2040 (description
2041 "Behave is a tool for behavior-driven development in python.
2042Behavior-driven development (or BDD) is an agile software development
2043technique that encourages collaboration between developers, QA and
2044non-technical or business participants in a software project. Behave uses
2045tests written in a natural language style, backed up by Python code.")
2046 (license x11)))
c7303d3c
DT
2047
2048(define-public python-exif-read
2049 (package
2050 (name "python-exif-read")
2051 (version "1.4.2")
2052 (source (origin
2053 (method url-fetch)
2054 (uri
2055 (string-append
2056 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
2057 version ".tar.gz"))
2058 (sha256
2059 (base32
2060 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
2061 (build-system python-build-system)
2062 (inputs
2063 `(("python-setuptools" ,python-setuptools)))
2064 (arguments `(#:tests? #f)) ; no tests
2065 (home-page "https://github.com/ianare/exif-py")
2066 (synopsis "Python library to extract EXIF data from image files")
2067 (description
2068 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2069files.")
2070 (license bsd-3)))
2071
2072(define-public python2-exif-read
2073 (package-with-python2 python-exif-read))
d5f89b22
DT
2074
2075(define-public python-pyld
2076 (package
2077 (name "python-pyld")
2078 (version "0.6.0")
2079 (source (origin
2080 (method url-fetch)
2081 (uri
2082 (string-append
2083 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
2084 version ".tar.gz"))
2085 (sha256
2086 (base32
2087 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
2088 (build-system python-build-system)
2089 (inputs
2090 `(("python-setuptools" ,python-setuptools)))
2091 (arguments `(#:tests? #f)) ; no tests
2092 (home-page "http://github.com/digitalbazaar/pyld")
2093 (synopsis "Python implementation of the JSON-LD specification")
2094 (description
2095 "PyLD is an implementation of the JSON-LD specification.")
2096 (license bsd-3)))
2097
2098(define-public python2-pyld
2099 (package-with-python2 python-pyld))
3a1f9a68
DT
2100
2101(define-public python-certifi
2102 (package
2103 (name "python-certifi")
9a41f443 2104 (version "2015.11.20.1")
3a1f9a68
DT
2105 (source (origin
2106 (method url-fetch)
9a41f443 2107 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2108 (sha256
2109 (base32
9a41f443 2110 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2111 (build-system python-build-system)
2112 (inputs
2113 `(("python-setuptools" ,python-setuptools)))
2114 (arguments `(#:tests? #f)) ; no tests
2115 (home-page "http://python-requests.org/")
2116 (synopsis "Python CA certificate bundle")
2117 (description
2118 "Certifi is a Python library that contains a CA certificate bundle, which
2119is used by the Requests library to verify HTTPS requests.")
2120 (license asl2.0)))
2121
2122(define-public python2-certifi
2123 (package-with-python2 python-certifi))
e6cfbd36 2124
12c270dd
RW
2125(define-public python-click
2126 (package
2127 (name "python-click")
5bd88cf1 2128 (version "6.2")
12c270dd
RW
2129 (source
2130 (origin
2131 (method url-fetch)
5bd88cf1 2132 (uri (pypi-uri "click" version))
12c270dd 2133 (sha256
5bd88cf1 2134 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
12c270dd
RW
2135 (build-system python-build-system)
2136 (native-inputs
2137 `(("python-setuptools" ,python-setuptools)))
2138 (home-page "http://click.pocoo.org")
2139 (synopsis "Command line library for Python")
2140 (description
2141 "Click is a Python package for creating command line interfaces in a
2142composable way with as little code as necessary. Its name stands for
2143\"Command Line Interface Creation Kit\". It's highly configurable but comes
2144with sensible defaults out of the box.")
2145 (license bsd-3)))
2146
2147(define-public python2-click
2148 (package-with-python2 python-click))
2149
addc808d
EF
2150(define-public python-wheel
2151 (package
2152 (name "python-wheel")
2153 (version "0.26.0")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "wheel" version))
2158 (sha256
2159 (base32
2160 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2161 (build-system python-build-system)
2162 (native-inputs
2163 `(("python-setuptools" ,python-setuptools)
2164 ("python-jsonschema" ,python-jsonschema)
2165 ("python-pytest-cov" ,python-pytest-cov)))
2166 (home-page "https://bitbucket.org/pypa/wheel/")
2167 (synopsis "Built-package format for Python")
2168 (description
2169 "A wheel is a ZIP-format archive with a specially formatted filename and the
2170.whl extension. It is designed to contain all the files for a PEP 376
2171compatible install in a way that is very close to the on-disk format.")
2172 (license license:expat)))
2173
2174(define-public python2-wheel
2175 (package-with-python2 python-wheel))
2176
ae641128 2177(define-public python-requests
e6cfbd36 2178 (package
ae641128 2179 (name "python-requests")
5d691657 2180 (version "2.8.1")
e6cfbd36
DT
2181 (source (origin
2182 (method url-fetch)
5d691657 2183 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2184 (sha256
2185 (base32
5d691657 2186 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
e6cfbd36 2187 (build-system python-build-system)
5d691657
EF
2188 (native-inputs
2189 `(("python-setuptools" ,python-setuptools)))
2190 (propagated-inputs
2191 `(("python-py" ,python-py)
2192 ("python-pytest" ,python-pytest)
2193 ("python-pytest-cov" ,python-pytest-cov)
2194 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2195 (home-page "http://python-requests.org/")
2196 (synopsis "Python HTTP library")
2197 (description
2198 "Requests is a Python HTTP client library. It aims to be easier to use
2199than Python’s urllib2 library.")
2200 (license asl2.0)))
864b5211 2201
ae641128
DT
2202(define-public python2-requests
2203 (package-with-python2 python-requests))
2204
864b5211
DT
2205(define-public python-jsonschema
2206 (package
2207 (name "python-jsonschema")
2208 (version "2.4.0")
2209 (source (origin
2210 (method url-fetch)
2211 (uri
2212 (string-append
2213 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2214 version ".tar.gz"))
2215 (sha256
2216 (base32
2217 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
2218 (build-system python-build-system)
2219 (inputs
2220 `(("python-setuptools" ,python-setuptools)))
2221 (home-page "http://github.com/Julian/jsonschema")
2222 (synopsis "Implementation of JSON Schema for Python")
2223 (description
2224 "Jsonschema is an implementation of JSON Schema for Python.")
bd3fa666 2225 (license license:expat)))
864b5211
DT
2226
2227(define-public python2-jsonschema
2228 (package-with-python2 python-jsonschema))
850189b8
DT
2229
2230(define-public python-unidecode
2231 (package
2232 (name "python-unidecode")
2233 (version "0.04.16")
2234 (source (origin
2235 (method url-fetch)
2236 (uri
2237 (string-append
2238 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
2239 version ".tar.gz"))
2240 (sha256
2241 (base32
2242 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
2243 (build-system python-build-system)
2244 (inputs
2245 `(("python-setuptools" ,python-setuptools)))
2246 (home-page "https://pypi.python.org/pypi/Unidecode")
2247 (synopsis "ASCII transliterations of Unicode text")
2248 (description
2249 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2250useful when integrating with legacy code that doesn't support Unicode, or for
2251ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2252machine identifiers from human-readable Unicode strings that should still be
2253somewhat intelligeble.")
2254 (license gpl2+)))
2255
2256(define-public python2-unidecode
2257 (package-with-python2 python-unidecode))
6d45fef4
DT
2258
2259(define-public python-pyjwt
2260 (package
2261 (name "python-pyjwt")
eb31d4b4 2262 (version "1.4.0")
6d45fef4
DT
2263 (source
2264 (origin
2265 (method url-fetch)
eb31d4b4 2266 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2267 (sha256
2268 (base32
eb31d4b4 2269 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2270 (build-system python-build-system)
eb31d4b4
EF
2271 (native-inputs
2272 `(("python-setuptools" ,python-setuptools)
2273 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2274 (arguments
2275 '(#:tests? #f)) ; test suite doesn't work
2276 (home-page "http://github.com/progrium/pyjwt")
2277 (synopsis "JSON Web Token implementation in Python")
2278 (description
2279 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2280 (license license:expat)))
6d45fef4
DT
2281
2282(define-public python2-pyjwt
2283 (package-with-python2 python-pyjwt))
2284
2cec1f6f
DT
2285(define-public python-oauthlib
2286 (package
2287 (name "python-oauthlib")
bde2171d 2288 (version "1.0.3")
2cec1f6f
DT
2289 (source (origin
2290 (method url-fetch)
bde2171d 2291 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2292 (sha256
2293 (base32
bde2171d 2294 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2295 (build-system python-build-system)
bde2171d 2296 (native-inputs
2cec1f6f 2297 `(("python-setuptools" ,python-setuptools)
bde2171d 2298 ("python-coverage", python-coverage)
2cec1f6f
DT
2299 ("python-nose" ,python-nose)
2300 ("python-mock" ,python-mock)))
bde2171d
EF
2301 (inputs
2302 `(("python-blinker" ,python-blinker)
2303 ("python-cryptography" ,python-cryptography)
2304 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2305 (home-page "https://github.com/idan/oauthlib")
2306 (synopsis "OAuth implementation for Python")
2307 (description
2308 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2309OAuth request-signing logic.")
2310 (license bsd-3)))
2311
2312(define-public python2-oauthlib
2313 (let ((base (package-with-python2 python-oauthlib)))
2314 (package
2315 (inherit base)
2cec1f6f 2316 (inputs
0066de6f
EF
2317 `(("python2-unittest2" ,python2-unittest2)
2318 ("python2-cryptography" ,python2-cryptography)
2319 ,@(alist-delete "python-cryptography"
2320 (package-inputs base)))))))
ec5dbb5c
DT
2321
2322(define-public python-itsdangerous
2323 (package
2324 (name "python-itsdangerous")
2325 (version "0.24")
2326 (source
2327 (origin
2328 (method url-fetch)
2329 (uri (string-append
2330 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2331 version ".tar.gz"))
2332 (sha256
2333 (base32
2334 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2335 (build-system python-build-system)
2336 (inputs
2337 `(("python-setuptools" ,python-setuptools)))
2338 (home-page "http://github.com/mitsuhiko/itsdangerous")
2339 (synopsis "Python library for passing data to/from untrusted environments")
2340 (description
2341 "Itsdangerous provides various helpers to pass trusted data to untrusted
2342environments and back.")
2343 (license bsd-3)))
2344
2345(define-public python2-itsdangerous
2346 (package-with-python2 python-itsdangerous))
5731cae3 2347
8d12be1e
RW
2348(define-public python-pyyaml
2349 (package
2350 (name "python-pyyaml")
2351 (version "3.11")
2352 (source
2353 (origin
2354 (method url-fetch)
2355 (uri (string-append
2356 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2357 version ".tar.gz"))
2358 (sha256
2359 (base32
2360 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2361 (build-system python-build-system)
2362 (inputs
2363 `(("libyaml" ,libyaml)))
2364 (native-inputs
2365 `(("python-setuptools" ,python-setuptools)))
2366 (home-page "http://pyyaml.org/wiki/PyYAML")
2367 (synopsis "YAML parser and emitter for Python")
2368 (description
2369 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2370complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2371API, and sensible error messages. PyYAML supports standard YAML tags and
2372provides Python-specific tags that allow to represent an arbitrary Python
2373object.")
2374 (license license:expat)))
2375
2376(define-public python2-pyyaml
2377 (package-with-python2 python-pyyaml))
2378
5731cae3
DT
2379(define-public python-virtualenv
2380 (package
2381 (name "python-virtualenv")
2382 (version "1.11.6")
2383 (source
2384 (origin
2385 (method url-fetch)
2386 (uri (string-append
2387 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
2388 version ".tar.gz"))
2389 (sha256
2390 (base32
2391 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
2392 (build-system python-build-system)
2393 (inputs
2394 `(("python-setuptools" ,python-setuptools)
2395 ("python-mock" ,python-mock)
2396 ("python-nose" ,python-nose)))
2397 (home-page "https://virtualenv.pypa.io/")
2398 (synopsis "Virtual Python environment builder")
2399 (description
2400 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2401 (license license:expat)))
5731cae3
DT
2402
2403(define-public python2-virtualenv
2404 (package-with-python2 python-virtualenv))
8176d4d5
DT
2405
2406(define-public python-markupsafe
2407 (package
2408 (name "python-markupsafe")
2409 (version "0.23")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (string-append
2414 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2415 version ".tar.gz"))
2416 (sha256
2417 (base32
2418 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2419 (build-system python-build-system)
2420 (inputs
2421 `(("python-setuptools" ,python-setuptools)))
2422 (home-page "http://github.com/mitsuhiko/markupsafe")
2423 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2424 (description
2425 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2426for Python.")
2427 (license bsd-3)))
2428
2429(define-public python2-markupsafe
2430 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2431
2432(define-public python-jinja2
2433 (package
2434 (name "python-jinja2")
2435 (version "2.7.3")
2436 (source
2437 (origin
2438 (method url-fetch)
2439 (uri (string-append
2440 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
2441 version ".tar.gz"))
2442 (sha256
2443 (base32
2444 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
2445 (build-system python-build-system)
2446 (inputs
2447 `(("python-setuptools" ,python-setuptools)
2448 ("python-markupsafe" ,python-markupsafe)))
2449 (home-page "http://jinja.pocoo.org/")
2450 (synopsis "Python template engine")
2451 (description
2452 "Jinja2 is a small but fast and easy to use stand-alone template engine
2453written in pure Python.")
2454 (license bsd-3)))
2455
2456(define-public python2-jinja2
2457 (package-with-python2 python-jinja2))
3580ab8b 2458
f7d17ac7
EE
2459(define-public python-pystache
2460 (package
2461 (name "python-pystache")
2462 (version "0.5.4")
2463 (source (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "pystache" version))
2466 (sha256
2467 (base32
2468 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2469 (build-system python-build-system)
2470 (native-inputs
2471 `(("python-setuptools" ,python-setuptools)))
2472 (home-page "http://defunkt.io/pystache/")
2473 (synopsis "Python logic-less template engine")
2474 (description
2475 "Pystache is a Python implementation of the framework agnostic,
2476logic-free templating system Mustache.")
2477 (license license:expat)))
2478
2479(define-public python2-pystache
2480 (package-with-python2 python-pystache))
2481
1285119b
RW
2482(define-public python-joblib
2483 (package
2484 (name "python-joblib")
2485 (version "0.9.0b4")
2486 (source (origin
2487 (method url-fetch)
2488 (uri (string-append "https://pypi.python.org/packages/source/"
2489 "j/joblib/joblib-" version ".tar.gz"))
2490 (sha256
2491 (base32
2492 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2493 (build-system python-build-system)
2494 (native-inputs
2495 `(("python-setuptools" ,python-setuptools)
2496 ("python-nose" ,python-nose)))
2497 (home-page "http://pythonhosted.org/joblib/")
2498 (synopsis "Using Python functions as pipeline jobs")
2499 (description
2500 "Joblib is a set of tools to provide lightweight pipelining in Python.
2501In particular, joblib offers: transparent disk-caching of the output values
2502and lazy re-evaluation (memoize pattern), easy simple parallel computing
2503logging and tracing of the execution.")
2504 (license bsd-3)))
2505
2506(define-public python2-joblib
2507 (package-with-python2 python-joblib))
2508
3580ab8b
DT
2509(define-public python-docutils
2510 (package
2511 (name "python-docutils")
2512 (version "0.12")
2513 (source
2514 (origin
2515 (method url-fetch)
2516 (uri (string-append
2517 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2518 version ".tar.gz"))
2519 (sha256
2520 (base32
2521 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2522 (build-system python-build-system)
2523 (inputs
2524 `(("python-setuptools" ,python-setuptools)))
2525 (arguments
2526 '(#:tests? #f)) ; no setup.py test command
2527 (home-page "http://docutils.sourceforge.net/")
2528 (synopsis "Python Documentation Utilities")
2529 (description
2530 "Docutils is a modular system for processing documentation into useful
2531formats, such as HTML, XML, and LaTeX. For input Docutils supports
2532reStructuredText.")
2533 ;; Most of the source code is public domain, but some source files are
2534 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2535 (license (list public-domain psfl bsd-2 gpl3+))))
2536
2537(define-public python2-docutils
2538 (package-with-python2 python-docutils))
fb35b7c0
DT
2539
2540(define-public python-pygments
2541 (package
2542 (name "python-pygments")
2543 (version "1.6")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (string-append
2548 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2549 version ".tar.gz"))
2550 (sha256
2551 (base32
2552 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2553 (build-system python-build-system)
2554 (inputs
2555 `(("python-setuptools" ,python-setuptools)))
2556 (home-page "http://pygments.org/")
2557 (synopsis "Syntax highlighting")
2558 (description
2559 "Pygments is a syntax highlighting package written in Python.")
2560 (license bsd-2)))
2561
2562(define-public python2-pygments
2563 (package-with-python2 python-pygments))
9dd6078d
DT
2564
2565(define-public python-sphinx
2566 (package
2567 (name "python-sphinx")
2568 (version "1.2.3")
2569 (source
2570 (origin
2571 (method url-fetch)
2572 (uri (string-append
2573 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2574 version ".tar.gz"))
2575 (sha256
2576 (base32
2577 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2578 (build-system python-build-system)
2579 (inputs
2580 `(("python-setuptools" ,python-setuptools)
2581 ("python-jinja2" ,python-jinja2)
2582 ("python-docutils" ,python-docutils)
2583 ("python-pygments" ,python-pygments)))
2584 (home-page "http://sphinx-doc.org/")
2585 (synopsis "Python documentation generator")
2586 (description "Sphinx is a tool that makes it easy to create documentation
2587for Python projects or other documents consisting of multiple reStructuredText
2588sources.")
2589 (license bsd-3)))
2590
2591(define-public python2-sphinx
2592 (package-with-python2 python-sphinx))
6888830b 2593
ad320b20
RW
2594(define-public python-sphinx-rtd-theme
2595 (package
2596 (name "python-sphinx-rtd-theme")
2597 (version "0.1.6")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (string-append "https://pypi.python.org/packages/source/s/"
2602 "sphinx_rtd_theme/sphinx_rtd_theme-"
2603 version ".tar.gz"))
2604 (sha256
2605 (base32
2606 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2607 (build-system python-build-system)
2608 (arguments
2609 `(;; With standard flags, the install phase attempts to create a zip'd
2610 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2611 ;; before 1980'
2612 #:configure-flags '("--single-version-externally-managed"
2613 "--record=sphinx-rtd-theme.txt")))
2614 (native-inputs
2615 `(("python-setuptools" ,python-setuptools)))
2616 (inputs
2617 `(("python-docutils" ,python-docutils)
2618 ("python-sphinx" ,python-sphinx)))
2619 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2620 (synopsis "ReadTheDocs.org theme for Sphinx")
2621 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2622 (license license:expat)))
ad320b20
RW
2623
2624(define-public python2-sphinx-rtd-theme
2625 (package-with-python2 python-sphinx-rtd-theme))
2626
f4de5b3b
CAW
2627(define-public python-feedgenerator
2628 (package
2629 (name "python-feedgenerator")
2630 (version "20150710.97185b7")
2631 (source
2632 ;; Using the git checkout for now because license file not added till
2633 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2634 (origin
2635 (method git-fetch)
2636 (uri (git-reference
2637 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2638 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2639 (sha256
2640 (base32
2641 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2642 (arguments
2643 `(;; With standard flags, the install phase attempts to create a zip'd
2644 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2645 ;; before 1980'
2646 #:configure-flags '("--single-version-externally-managed"
2647 "--record=feedgenerator.txt")))
2648 (build-system python-build-system)
2649 (inputs
2650 `(("python-setuptools" ,python-setuptools)
2651 ("python-pytz" ,python-pytz)
2652 ("python-six" ,python-six)))
2653 (home-page
2654 "https://github.com/dmdm/feedgenerator-py3k.git")
2655 (synopsis
2656 "Standalone version of Django's Atom/RSS feed generator")
2657 (description
2658 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2659which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2660 (license bsd-3)))
2661
2662(define-public python2-feedgenerator
2663 (package-with-python2 python-feedgenerator))
2664
59ad30e3
CAW
2665(define-public python-blinker
2666 (package
2667 (name "python-blinker")
2668 (version "1.3")
2669 (source
2670 (origin
2671 (method url-fetch)
2672 (uri (string-append
2673 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2674 version ".tar.gz"))
2675 (sha256
2676 (base32
2677 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2678 (build-system python-build-system)
2679 (native-inputs
2680 `(("python-setuptools" ,python-setuptools)))
2681 ;; No "test" command supplied to setuptools, so unless there's another way
2682 ;; to run tests, we're skipping them!
2683 (arguments '(#:tests? #f))
2684 (home-page "http://pythonhosted.org/blinker/")
2685 (synopsis "Fast, simple object-to-object and broadcast signaling")
2686 (description
2687 "Blinker provides a fast dispatching system that allows any number of
2688interested parties to subscribe to events, or \"signals\".")
2689 (license license:expat)))
2690
2691(define-public python2-blinker
2692 (package-with-python2 python-blinker))
2693
b8050e71
CAW
2694(define-public pelican
2695 (package
2696 (name "pelican")
2697 (version "3.6.0")
2698 (source
2699 (origin
2700 (method url-fetch)
2701 (uri (string-append
2702 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2703 version ".tar.gz"))
2704 (sha256
2705 (base32
2706 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2707 (build-system python-build-system)
2708 (native-inputs
2709 `(("python-setuptools" ,python-setuptools)))
2710 (propagated-inputs
2711 `(("python-feedgenerator" ,python-feedgenerator)
2712 ("python-jinja2" ,python-jinja2)
2713 ("python-pygments" ,python-pygments)
2714 ("python-docutils" ,python-docutils)
2715 ("python-pytz" ,python-pytz)
2716 ("python-blinker" ,python-blinker)
2717 ("python-unidecode" ,python-unidecode)
2718 ("python-six" ,python-six)
2719 ("python-dateutil-2" ,python-dateutil-2)))
2720 (home-page "http://getpelican.com/")
2721 (arguments
2722 `(;; XXX Requires a lot more packages to do unit tests :P
2723 #:tests? #f
2724 #:phases (modify-phases %standard-phases
2725 (add-before
2726 'install 'adjust-requires
2727 ;; Since feedgenerator is installed from git, it doesn't
2728 ;; conform to the version requirements.
2729 ;;
2730 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2731 ;; version requirement so setuptools doesn't get confused.
2732 (lambda _
2733 (substitute* "setup.py"
2734 (("['\"]feedgenerator.*?['\"]")
2735 "'feedgenerator'")))))))
2736 (synopsis "Python-based static site publishing system")
2737 (description
2738 "Pelican is a tool to generate a static blog from reStructuredText,
2739Markdown input files, and more. Pelican uses Jinja2 for templating
2740and is very extensible.")
2741 (license agpl3+)))
2742
240ca4aa
RW
2743(define-public python-scikit-learn
2744 (package
2745 (name "python-scikit-learn")
be0a4c26 2746 (version "0.16.1")
240ca4aa
RW
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (string-append
2751 "https://github.com/scikit-learn/scikit-learn/archive/"
2752 version ".tar.gz"))
2753 (sha256
2754 (base32
be0a4c26 2755 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2756 (build-system python-build-system)
2757 (arguments
2758 `(#:phases
2759 (alist-cons-before
2f6b3d2e
RW
2760 'check 'set-HOME
2761 ;; some tests require access to "$HOME"
2762 (lambda _ (setenv "HOME" "/tmp"))
2763 ;; Tests can only be run after the library has been installed and not
2764 ;; within the source directory.
2765 (alist-cons-after
2766 'install 'check
2767 (lambda _
2768 (with-directory-excursion "/tmp"
2769 ;; With Python 3 one test of 3334 fails
2770 ;; (sklearn.tests.test_common.test_transformers); see
2771 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2772 (system* "nosetests" "-v" "sklearn")))
2773 (alist-delete 'check %standard-phases)))))
240ca4aa 2774 (inputs
2f6b3d2e 2775 `(("openblas" ,openblas)
240ca4aa
RW
2776 ("python-nose" ,python-nose)))
2777 (propagated-inputs
2778 `(("python-numpy" ,python-numpy)
2779 ("python-scipy" ,python-scipy)))
2780 (home-page "http://scikit-learn.org/")
2781 (synopsis "Machine Learning in Python")
2782 (description
2783 "Scikit-learn provides simple and efficient tools for data
2784mining and data analysis.")
2785 (license bsd-3)))
2786
2787(define-public python2-scikit-learn
2788 (let ((scikit (package-with-python2 python-scikit-learn)))
2789 (package (inherit scikit)
2790 (propagated-inputs
2791 `(("python2-numpy" ,python2-numpy)
2792 ("python2-scipy" ,python2-scipy)
2793 ,@(alist-delete
2794 "python-numpy"
2795 (alist-delete
2796 "python-scipy" (package-propagated-inputs scikit))))))))
2797
12f8f9bb
RW
2798(define-public python-scikit-image
2799 (package
2800 (name "python-scikit-image")
2801 (version "0.11.3")
2802 (source
2803 (origin
2804 (method url-fetch)
2805 (uri (string-append
2806 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2807 version ".tar.gz"))
2808 (sha256
2809 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2810 (build-system python-build-system)
2811 (propagated-inputs
2812 `(("python-matplotlib" ,python-matplotlib)
2813 ("python-networkx" ,python-networkx)
2814 ("python-numpy" ,python-numpy)
2815 ("python-scipy" ,python-scipy)
2816 ("python-six" ,python-six)
2817 ("python-pillow" ,python-pillow)))
2818 (native-inputs
2819 `(("python-cython" ,python-cython)
2820 ("python-setuptools" ,python-setuptools)))
2821 (home-page "http://scikit-image.org/")
2822 (synopsis "Image processing in Python")
2823 (description
e881752c 2824 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2825 (license bsd-3)))
2826
2827(define-public python2-scikit-image
2828 (let ((scikit-image (package-with-python2 python-scikit-image)))
2829 (package (inherit scikit-image)
2830 (native-inputs
2831 `(("python2-mock" ,python2-mock)
2832 ,@(package-native-inputs scikit-image)))
2833 (propagated-inputs
2834 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2835 ("python2-matplotlib" ,python2-matplotlib)
2836 ("python2-numpy" ,python2-numpy)
2837 ("python2-scipy" ,python2-scipy)
2838 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2839 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2840
5394a6a6
RW
2841(define-public python-redis
2842 (package
2843 (name "python-redis")
2844 (version "2.10.3")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (string-append
2849 "https://pypi.python.org/packages/source/r/redis/redis-"
2850 version ".tar.gz"))
2851 (sha256
2852 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2853 (build-system python-build-system)
2854 ;; Tests require a running Redis server
2855 (arguments '(#:tests? #f))
2856 (native-inputs
2857 `(("python-setuptools" ,python-setuptools)
2858 ("python-pytest" ,python-pytest)))
2859 (home-page "https://github.com/andymccurdy/redis-py")
2860 (synopsis "Redis Python client")
2861 (description
2862 "This package provides a Python interface to the Redis key-value store.")
2863 (license license:expat)))
2864
2865(define-public python2-redis
2866 (package-with-python2 python-redis))
2867
748cef5b
RW
2868(define-public python-rq
2869 (package
2870 (name "python-rq")
2871 (version "0.5.2")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (string-append
2876 "https://pypi.python.org/packages/source/r/rq/rq-"
2877 version ".tar.gz"))
2878 (sha256
2879 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2880 (build-system python-build-system)
2881 (propagated-inputs
2882 `(("python-click" ,python-click)
2883 ("python-redis" ,python-redis)))
2884 (native-inputs
2885 `(("python-setuptools" ,python-setuptools)))
2886 (home-page "http://python-rq.org/")
2887 (synopsis "Simple job queues for Python")
2888 (description
2889 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2890processing them in the background with workers. It is backed by Redis and it
2891is designed to have a low barrier to entry.")
2892 (license bsd-2)))
2893
2894(define-public python2-rq
2895 (package-with-python2 python-rq))
2896
6888830b
FB
2897(define-public python-cython
2898 (package
2899 (name "python-cython")
56918e26 2900 (version "0.23.4")
6888830b
FB
2901 (source
2902 (origin
2903 (method url-fetch)
56918e26 2904 (uri (pypi-uri "Cython" version))
6888830b
FB
2905 (sha256
2906 (base32
56918e26 2907 "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
6888830b
FB
2908 (build-system python-build-system)
2909 ;; we need the full python package and not just the python-wrapper
2910 ;; because we need libpython3.3m.so
2911 (inputs
2912 `(("python" ,python)))
2913 (arguments
2914 `(#:phases
2915 (alist-cons-before
2916 'check 'set-HOME
2917 ;; some tests require access to "$HOME/.cython"
2918 (lambda* _ (setenv "HOME" "/tmp"))
2919 (alist-replace
2920 'check
2921 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2922 %standard-phases))))
2923 (home-page "http://cython.org/")
2924 (synopsis "C extensions for Python")
2925 (description "Cython is an optimising static compiler for both the Python
2926programming language and the extended Cython programming language. It makes
2927writing C extensions for Python as easy as Python itself.")
2928 (license asl2.0)))
2929
2930(define-public python2-cython
2931 (package (inherit (package-with-python2 python-cython))
2932 (name "python2-cython")
2933 (inputs
2934 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2935
2936;; This version of numpy is missing the documentation and is only used to
2937;; build matplotlib which is required to build numpy's documentation.
2938(define python-numpy-bootstrap
2939 (package
2940 (name "python-numpy-bootstrap")
2941 (version "1.9.1")
2942 (source
2943 (origin
2944 (method url-fetch)
2945 (uri (string-append "mirror://sourceforge/numpy"
2946 "/numpy-" version ".tar.gz"))
2947 (sha256
2948 (base32
2949 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2950 (build-system python-build-system)
2951 (inputs
2952 `(("python-nose" ,python-nose)
cba256f8
RW
2953 ("openblas" ,openblas)
2954 ("lapack" ,lapack)))
0da98533 2955 (native-inputs
19afbea1 2956 `(("gfortran" ,gfortran)))
0da98533
FB
2957 (arguments
2958 `(#:phases
2959 (alist-cons-before
2960 'build 'set-environment-variables
2961 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2962 (call-with-output-file "site.cfg"
2963 (lambda (port)
cba256f8
RW
2964 (format port
2965 "[openblas]
dbdfe515
RW
2966libraries = openblas
2967library_dirs = ~a/lib
2968include_dirs = ~a/include
cba256f8
RW
2969
2970[lapack]
2971lapack_libs = lapack
2972library_dirs = ~a/lib
2973include_dirs = ~a/include
2974"
2975 (assoc-ref inputs "openblas")
2976 (assoc-ref inputs "openblas")
2977 (assoc-ref inputs "lapack")
2978 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2979 ;; Use "gcc" executable, not "cc".
2980 (substitute* "numpy/distutils/system_info.py"
2981 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2982 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2983 #t)
6a843168
FB
2984 ;; Tests can only be run after the library has been installed and not
2985 ;; within the source directory.
2986 (alist-cons-after
2987 'install 'check
89b5c60e 2988 (lambda _
6a843168 2989 (with-directory-excursion "/tmp"
89b5c60e 2990 (zero? (system* "python" "-c"
6a843168 2991 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
2992 (alist-delete
2993 'check
6a843168 2994 %standard-phases)))))
0da98533
FB
2995 (home-page "http://www.numpy.org/")
2996 (synopsis "Fundamental package for scientific computing with Python")
2997 (description "NumPy is the fundamental package for scientific computing
e881752c 2998with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
2999object, sophisticated (broadcasting) functions, tools for integrating C/C++
3000and Fortran code, useful linear algebra, Fourier transform, and random number
3001capabilities.")
3002 (license bsd-3)))
3003
3004(define python2-numpy-bootstrap
3005 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3006
3a1bfe18
RW
3007(define-public python2-fastlmm
3008 (package
3009 (name "python2-fastlmm")
3010 (version "0.2.14")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (string-append
3015 "https://pypi.python.org/packages/source/f/fastlmm"
3016 "/fastlmm-" version ".zip"))
3017 (sha256
3018 (base32
3019 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
3020 (build-system python-build-system)
3021 (arguments
3022 `(#:python ,python-2)) ; only Python 2.7 is supported
3023 (propagated-inputs
3024 `(("python2-numpy" ,python2-numpy)
3025 ("python2-scipy" ,python2-scipy)
3026 ("python2-matplotlib" ,python2-matplotlib)
3027 ("python2-pandas" ,python2-pandas)
3028 ("python2-scikit-learn" ,python2-scikit-learn)
3029 ("python2-cython" ,python2-cython)
3030 ("python2-pysnptools" ,python2-pysnptools)))
3031 (native-inputs
3032 `(("unzip" ,unzip)
3033 ("python2-mock" ,python2-mock)
3034 ("python2-setuptools" ,python2-setuptools)))
3035 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3036 (synopsis "Perform genome-wide association studies on large data sets")
3037 (description
3038 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3039Models, is a program for performing both single-SNP and SNP-set genome-wide
3040association studies (GWAS) on extremely large data sets.")
3041 (license asl2.0)))
3042
2ee8869a
FB
3043(define-public python-numpy
3044 (package (inherit python-numpy-bootstrap)
3045 (name "python-numpy")
3046 (outputs '("out" "doc"))
89b5c60e 3047 (inputs
2ee8869a
FB
3048 `(("which" ,which)
3049 ("python-setuptools" ,python-setuptools)
3050 ("python-matplotlib" ,python-matplotlib)
3051 ("python-sphinx" ,python-sphinx)
3052 ("python-pyparsing" ,python-pyparsing)
3053 ("python-numpydoc" ,python-numpydoc)
3054 ,@(package-inputs python-numpy-bootstrap)))
3055 (native-inputs
3056 `(("pkg-config" ,pkg-config)
3057 ("texlive" ,texlive)
3058 ("texinfo" ,texinfo)
3059 ("perl" ,perl)
3060 ,@(package-native-inputs python-numpy-bootstrap)))
3061 (arguments
89b5c60e 3062 `(,@(substitute-keyword-arguments
2ee8869a
FB
3063 (package-arguments python-numpy-bootstrap)
3064 ((#:phases phases)
3065 `(alist-cons-after
3066 'install 'install-doc
3067 (lambda* (#:key outputs #:allow-other-keys)
3068 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3069 (doc (string-append
3070 data "/doc/" ,name "-"
2ee8869a
FB
3071 ,(package-version python-numpy-bootstrap)))
3072 (info (string-append data "/info"))
3073 (html (string-append doc "/html"))
3074 (pyver ,(string-append "PYVER=")))
3075 (with-directory-excursion "doc"
3076 (mkdir-p html)
3077 (system* "make" "html" pyver)
3078 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3079 (system* "make" "-C" "build/latex"
2ee8869a
FB
3080 "all-pdf" "PAPER=a4" pyver)
3081 ;; FIXME: Generation of the info file fails.
3082 ;; (system* "make" "info" pyver)
3083 ;; (mkdir-p info)
3084 ;; (copy-file "build/texinfo/numpy.info"
3085 ;; (string-append info "/numpy.info"))
3086 (for-each (lambda (file)
3087 (copy-file (string-append "build/latex" file)
3088 (string-append doc file)))
3089 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3090 (with-directory-excursion "build/html"
3091 (for-each (lambda (file)
3092 (let* ((dir (dirname file))
3093 (tgt-dir (string-append html "/" dir)))
3094 (unless (equal? "." dir)
3095 (mkdir-p tgt-dir))
96c46210 3096 (install-file file html)))
2ee8869a
FB
3097 (find-files "." ".*"))))))
3098 ,phases)))))))
3099
764c077b
LC
3100(define-public python2-numpy
3101 (let ((numpy (package-with-python2 python-numpy)))
3102 (package (inherit numpy)
88c26834
AE
3103 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3104 ;; Python 2.
3105 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3106 ,@(alist-delete "python-matplotlib"
3107 (package-inputs numpy)))))))
2ee8869a 3108
15bfe6d6
FB
3109(define-public python-pyparsing
3110 (package
3111 (name "python-pyparsing")
e0669289 3112 (version "2.0.3")
15bfe6d6
FB
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (string-append "mirror://sourceforge/pyparsing"
3117 "/pyparsing-" version ".tar.gz"))
3118 (sha256
3119 (base32
e0669289 3120 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3121 (build-system python-build-system)
3122 (outputs '("out" "doc"))
3123 (arguments
3124 `(#:tests? #f ; no test target
3125 #:modules ((guix build python-build-system)
3126 (guix build utils))
3127 #:phases
3128 (alist-cons-after
3129 'install 'install-doc
3130 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3131 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3132 "/share/doc/" ,name "-" ,version))
3133 (html-doc (string-append doc "/html"))
3134 (examples (string-append doc "/examples")))
3135 (mkdir-p html-doc)
3136 (mkdir-p examples)
89b5c60e 3137 (for-each
15bfe6d6 3138 (lambda (dir tgt)
89b5c60e 3139 (map (lambda (file)
96c46210 3140 (install-file file tgt))
15bfe6d6
FB
3141 (find-files dir ".*")))
3142 (list "docs" "htmldoc" "examples")
3143 (list doc html-doc examples))))
3144 %standard-phases)))
3145 (home-page "http://pyparsing.wikispaces.com")
3146 (synopsis "Python parsing class library")
3147 (description
3148 "The pyparsing module is an alternative approach to creating and
3149executing simple grammars, vs. the traditional lex/yacc approach, or the use
3150of regular expressions. The pyparsing module provides a library of classes
3151that client code uses to construct the grammar directly in Python code.")
bd3fa666 3152 (license license:expat)))
15bfe6d6
FB
3153
3154(define-public python2-pyparsing
3155 (package-with-python2 python-pyparsing))
3156
ec00de35
FB
3157(define-public python-numpydoc
3158 (package
3159 (name "python-numpydoc")
3160 (version "0.5")
3161 (source
3162 (origin
3163 (method url-fetch)
89b5c60e 3164 (uri (string-append
ec00de35
FB
3165 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3166 version ".tar.gz"))
3167 (sha256
3168 (base32
5e4d8f67
AE
3169 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3170 (modules '((guix build utils)))
3171 (snippet
3172 '(begin
3173 ;; Drop a test requiring matplotlib, which we cannot add as an
3174 ;; input since it would create a circular dependency: Extend the
3175 ;; test for Python 3, where it is already dropped, to Python 2.
3176 (substitute* "numpydoc/tests/test_plot_directive.py"
3177 (("3") "2"))))))
ec00de35
FB
3178 (build-system python-build-system)
3179 (inputs
3180 `(("python-setuptools" ,python-setuptools)
3181 ("python-docutils" ,python-docutils)
3182 ("python-sphinx" ,python-sphinx)
3183 ("python-nose" ,python-nose)))
3184 (home-page "https://pypi.python.org/pypi/numpydoc")
3185 (synopsis
3186 "Numpy's Sphinx extensions")
3187 (description
3188 "Sphinx extension to support docstrings in Numpy format.")
3189 (license bsd-2)))
3190
3191(define-public python2-numpydoc
5e4d8f67 3192 (package-with-python2 python-numpydoc))
1c65314c 3193
1e656049
RW
3194(define-public python-numexpr
3195 (package
3196 (name "python-numexpr")
3197 (version "2.4.4")
3198 (source
3199 (origin
3200 (method url-fetch)
3201 (uri (string-append "https://pypi.python.org/packages/source/"
3202 "n/numexpr/numexpr-" version ".tar.gz"))
3203 (sha256
3204 (base32
3205 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3206 (build-system python-build-system)
3207 (arguments `(#:tests? #f)) ; no tests included
3208 (propagated-inputs
3209 `(("python-numpy" ,python-numpy)))
3210 (home-page "https://github.com/pydata/numexpr")
3211 (synopsis "Fast numerical expression evaluator for NumPy")
3212 (description
3213 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3214expressions that operate on arrays are accelerated and use less memory than
3215doing the same calculation in Python. In addition, its multi-threaded
3216capabilities can make use of all your cores, which may accelerate
3217computations, most specially if they are not memory-bounded (e.g. those using
3218transcendental functions).")
3219 (license license:expat)))
3220
3221(define-public python2-numexpr
3222 (let ((numexpr (package-with-python2 python-numexpr)))
3223 (package (inherit numexpr)
3224 ;; Make sure to use special packages for Python 2 instead
3225 ;; of those automatically rewritten by package-with-python2.
3226 (propagated-inputs
3227 `(("python2-numpy" ,python2-numpy)
3228 ,@(alist-delete "python-numpy"
3229 (package-propagated-inputs numexpr)))))))
3230
1c65314c
FB
3231(define-public python-matplotlib
3232 (package
3233 (name "python-matplotlib")
1bbc659f 3234 (version "1.4.3")
1c65314c
FB
3235 (source
3236 (origin
3237 (method url-fetch)
3238 (uri (string-append "mirror://sourceforge/matplotlib"
3239 "/matplotlib-" version ".tar.gz"))
3240 (sha256
3241 (base32
1bbc659f
FB
3242 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3243 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
1c65314c
FB
3244 (build-system python-build-system)
3245 (outputs '("out" "doc"))
25f9a068
FB
3246 (propagated-inputs ; the following packages are all needed at run time
3247 `(("python-pyparsing" ,python-pyparsing)
3248 ("python-pygobject" ,python-pygobject)
3249 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3250 ("python-tkinter" ,python "tk")
25f9a068
FB
3251 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3252 ;; from 'gtk+') provides the required 'typelib' files used by
3253 ;; 'gobject-introspection'. The location of these files is set with the
3254 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3255 ;; is done automatically by a 'native-search-path' procedure. However,
3256 ;; at run-time the user must set this variable as follows:
3257 ;;
3258 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3259 ("gtk+" ,gtk+)
3260 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3261 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3262 ;; object. For this reason we need to import both libraries.
3263 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3264 ("python-pycairo" ,python-pycairo)
3265 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3266 (inputs
3267 `(("python-setuptools" ,python-setuptools)
3268 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3269 ("python-six" ,python-six)
3270 ("python-pytz" ,python-pytz)
3271 ("python-numpy" ,python-numpy-bootstrap)
3272 ("python-sphinx" ,python-sphinx)
3273 ("python-numpydoc" ,python-numpydoc)
3274 ("python-nose" ,python-nose)
3275 ("python-mock" ,python-mock)
3276 ("libpng" ,libpng)
3277 ("imagemagick" ,imagemagick)
3278 ("freetype" ,freetype)
25f9a068
FB
3279 ("cairo" ,cairo)
3280 ("glib" ,glib)
4e7a137a 3281 ("python-pillow" ,python-pillow)
1c65314c 3282 ;; FIXME: Add backends when available.
1c65314c
FB
3283 ;("python-wxpython" ,python-wxpython)
3284 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3285 ("tcl" ,tcl)
3286 ("tk" ,tk)))
1c65314c
FB
3287 (native-inputs
3288 `(("pkg-config" ,pkg-config)
3289 ("texlive" ,texlive)
3290 ("texinfo" ,texinfo)))
3291 (arguments
3292 `(#:phases
25f9a068
FB
3293 (alist-cons-before
3294 'build 'configure-environment
3295 (lambda* (#:key outputs inputs #:allow-other-keys)
3296 (let ((cairo (assoc-ref inputs "cairo"))
3297 (gtk+ (assoc-ref inputs "gtk+")))
3298 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3299 ;; has not effect.
25f9a068
FB
3300 (setenv "LD_LIBRARY_PATH"
3301 (string-append cairo "/lib:" gtk+ "/lib"))
3302 (setenv "HOME" (getcwd))
3303 (call-with-output-file "setup.cfg"
3304 (lambda (port)
1bbc659f
FB
3305 (format port "[directories]~%
3306basedirlist = ~a,~a~%
3307[rc_options]~%
3308backend = TkAgg~%"
3309 (assoc-ref inputs "tcl")
3310 (assoc-ref inputs "tk"))))))
25f9a068
FB
3311 (alist-cons-after
3312 'install 'install-doc
3313 (lambda* (#:key outputs #:allow-other-keys)
3314 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3315 (doc (string-append data "/doc/" ,name "-" ,version))
3316 (info (string-append data "/info"))
3317 (html (string-append doc "/html")))
3318 (with-directory-excursion "doc"
25f9a068
FB
3319 ;; Produce pdf in 'A4' format.
3320 (substitute* (find-files "." "conf\\.py")
3321 (("latex_paper_size = 'letter'")
3322 "latex_paper_size = 'a4'"))
3323 (mkdir-p html)
3324 (mkdir-p info)
3325 ;; The doc recommends to run the 'html' target twice.
3326 (system* "python" "make.py" "html")
3327 (system* "python" "make.py" "html")
18b31516 3328 (copy-recursively "build/html" html)
25f9a068
FB
3329 (system* "python" "make.py" "latex")
3330 (system* "python" "make.py" "texinfo")
18b31516
FB
3331 (symlink (string-append html "/_images")
3332 (string-append info "/matplotlib-figures"))
3333 (with-directory-excursion "build/texinfo"
3334 (substitute* "matplotlib.texi"
3335 (("@image\\{([^,]*)" all file)
3336 (string-append "@image{matplotlib-figures/" file)))
3337 (symlink (string-append html "/_images")
3338 "./matplotlib-figures")
3339 (system* "makeinfo" "--no-split"
3340 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3341 (copy-file "build/texinfo/matplotlib.info"
3342 (string-append info "/matplotlib.info"))
3343 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3344 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3345 %standard-phases))))
1c65314c
FB
3346 (home-page "http://matplotlib.org")
3347 (synopsis "2D plotting library for Python")
3348 (description
3349 "Matplotlib is a Python 2D plotting library which produces publication
3350quality figures in a variety of hardcopy formats and interactive environments
3351across platforms. Matplotlib can be used in Python scripts, the python and
3352ipython shell, web application servers, and six graphical user interface
3353toolkits.")
3354 (license psfl)))
3355
764c077b
LC
3356(define-public python2-matplotlib
3357 (let ((matplotlib (package-with-python2 python-matplotlib)))
3358 (package (inherit matplotlib)
88c26834
AE
3359 ;; Make sure to use special packages for Python 2 instead
3360 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3361 (propagated-inputs
7ca0dbc3 3362 `(("python2-pycairo" ,python2-pycairo)
764c077b 3363 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3364 ("python2-tkinter" ,python-2 "tk")
3365 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3366 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3367
0dde6232
RW
3368(define-public python2-pysnptools
3369 (package
3370 (name "python2-pysnptools")
3371 (version "0.2.13")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (string-append
3376 "https://pypi.python.org/packages/source/p/pysnptools"
3377 "/pysnptools-" version ".zip"))
3378 (sha256
3379 (base32
3380 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3381 (build-system python-build-system)
3382 (arguments
3383 `(#:python ,python-2)) ; only Python 2.7 is supported
3384 (propagated-inputs
3385 `(("python2-numpy" ,python2-numpy)
3386 ("python2-scipy" ,python2-scipy)
3387 ("python2-pandas" ,python2-pandas)
3388 ("python2-cython" ,python2-cython)))
3389 (native-inputs
3390 `(("unzip" ,unzip)
3391 ("python2-setuptools" ,python2-setuptools)))
3392 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3393 (synopsis "Library for reading and manipulating genetic data")
3394 (description
3395 "PySnpTools is a library for reading and manipulating genetic data. It
3396can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3397those files. It can also efficiently manipulate ranges of integers using set
3398operators such as union, intersection, and difference.")
3399 (license asl2.0)))
3400
c9b1b4f9
RW
3401(define-public python-rpy2
3402 (package
3403 (name "python-rpy2")
3404 (version "2.6.0")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
3409 "/rpy2-" version ".tar.gz"))
3410 (sha256
3411 (base32
3412 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
3413 (build-system python-build-system)
3414 (inputs
3415 `(("python-six" ,python-six)
3416 ("readline" ,readline)
3417 ("icu4c" ,icu4c)
3418 ("pcre" ,pcre)
3419 ("r" ,r)))
3420 (native-inputs
5ff6575b
RW
3421 `(("python-setuptools" ,python-setuptools)
3422 ("zlib" ,zlib)))
c9b1b4f9
RW
3423 (home-page "http://rpy.sourceforge.net/")
3424 (synopsis "Python interface to the R language")
3425 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3426low-level interface to R from Python, a proposed high-level interface,
3427including wrappers to graphical libraries, as well as R-like structures and
3428functions.")
3429 (license gpl3+)))
3430
3431(define-public python2-rpy2
3432 (let ((rpy2 (package-with-python2 python-rpy2)))
3433 (package (inherit rpy2)
3434 (native-inputs
3435 `(("python2-singledispatch" ,python2-singledispatch)
3436 ,@(package-native-inputs rpy2))))))
3437
bb986599
FB
3438(define-public python-scipy
3439 (package
3440 (name "python-scipy")
ba8a0824 3441 (version "0.16.0")
bb986599
FB
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3446 "/scipy-" version ".tar.xz"))
bb986599
FB
3447 (sha256
3448 (base32
ba8a0824 3449 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3450 (build-system python-build-system)
dd86c0d1 3451 (propagated-inputs
bb986599
FB
3452 `(("python-numpy" ,python-numpy)
3453 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3454 ("python-pyparsing" ,python-pyparsing)))
3455 (inputs
3456 `(("lapack" ,lapack)
719b01c1 3457 ("openblas" ,openblas)))
bb986599 3458 (native-inputs
dd86c0d1
RW
3459 `(("python-nose" ,python-nose)
3460 ("python-sphinx" ,python-sphinx)
5248d49e 3461 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3462 ("gfortran" ,gfortran)
bb986599
FB
3463 ("texlive" ,texlive)
3464 ("perl" ,perl)))
3465 (outputs '("out" "doc"))
3466 (arguments
3467 `(#:phases
3468 (alist-cons-before
719b01c1 3469 'build 'configure-openblas
bb986599 3470 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3471 (call-with-output-file "site.cfg"
3472 (lambda (port)
3473 (format port
3474 "[blas]
3475libraries = openblas
3476library_dirs = ~a/lib
3477include_dirs = ~a/include
3478[atlas]
3479library_dirs = ~a/lib
3480atlas_libs = openblas
3481"
3482 (assoc-ref inputs "openblas")
3483 (assoc-ref inputs "openblas")
3484 (assoc-ref inputs "openblas"))))
3485 #t)
bb986599
FB
3486 (alist-cons-after
3487 'install 'install-doc
3488 (lambda* (#:key outputs #:allow-other-keys)
3489 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3490 (doc (string-append data "/doc/" ,name "-" ,version))
3491 (html (string-append doc "/html"))
3492 (pyver ,(string-append "PYVER=")))
3493 (with-directory-excursion "doc"
bb986599
FB
3494 ;; Fix generation of images for mathematical expressions.
3495 (substitute* (find-files "source" "conf\\.py")
3496 (("pngmath_use_preview = True")
3497 "pngmath_use_preview = False"))
3498 (mkdir-p html)
3499 (system* "make" "html" pyver)
3500 (system* "make" "latex" "PAPER=a4" pyver)
3501 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3502 (copy-file "build/latex/scipy-ref.pdf"
3503 (string-append doc "/scipy-ref.pdf"))
3504 (with-directory-excursion "build/html"
3505 (for-each (lambda (file)
3506 (let* ((dir (dirname file))
3507 (tgt-dir (string-append html "/" dir)))
96c46210 3508 (install-file file html)))
bb986599
FB
3509 (find-files "." ".*"))))))
3510 ;; Tests can only be run after the library has been installed and not
3511 ;; within the source directory.
3512 (alist-cons-after
3513 'install 'check
89b5c60e 3514 (lambda _
bb986599
FB
3515 (with-directory-excursion "/tmp"
3516 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3517 (alist-delete
3518 'check
4f9ff21e
RW
3519 (alist-cons-after
3520 'unpack 'fix-tests
3521 (lambda _
3522 (substitute* "scipy/integrate/tests/test_quadpack.py"
3523 (("libm.so") "libm.so.6"))
3524 #t)
3525 %standard-phases)))))))
bb986599
FB
3526 (home-page "http://www.scipy.org/")
3527 (synopsis "The Scipy library provides efficient numerical routines")
3528 (description "The SciPy library is one of the core packages that make up
3529the SciPy stack. It provides many user-friendly and efficient numerical
3530routines such as routines for numerical integration and optimization.")
3531 (license bsd-3)))
3532
764c077b
LC
3533(define-public python2-scipy
3534 (let ((scipy (package-with-python2 python-scipy)))
3535 (package (inherit scipy)
3536 ;; Use packages customized for python-2.
dd86c0d1
RW
3537 (propagated-inputs
3538 `(("python2-matplotlib" ,python2-matplotlib)
3539 ("python2-numpy" ,python2-numpy)
3540 ,@(alist-delete "python-matplotlib"
3541 (alist-delete "python-numpy"
3542 (package-propagated-inputs scipy))))))))
bb986599 3543
94914805
EB
3544(define-public python-sqlalchemy
3545 (package
3546 (name "python-sqlalchemy")
3547 (version "0.9.7")
3548 (source
3549 (origin
3550 (method url-fetch)
3551 (uri (string-append "https://pypi.python.org/packages/source/S/"
3552 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3553 (sha256
3554 (base32
3555 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3556 (build-system python-build-system)
3557 (native-inputs
3558 `(("python-cython" ,python-cython) ;for c extensions
3559 ("python-pytest" ,python-pytest)
3560 ("python-mock" ,python-mock))) ;for tests
3561 (arguments
3562 `(#:phases (alist-replace
3563 'check
3564 (lambda _ (zero? (system* "py.test")))
3565 %standard-phases)))
3566 (home-page "http://www.sqlalchemy.org")
3567 (synopsis "Database abstraction library")
3568 (description
3569 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3570gives application developers the full power and flexibility of SQL. It
3571provides a full suite of well known enterprise-level persistence patterns,
3572designed for efficient and high-performing database access, adapted into a
3573simple and Pythonic domain language.")
3574 (license x11)))
3575
3576(define-public python2-sqlalchemy
3577 (package-with-python2 python-sqlalchemy))
c937562e 3578
1671c07c
EB
3579(define-public python-distutils-extra
3580 (package
3581 (name "python-distutils-extra")
3582 (version "2.38")
3583 (source
3584 (origin
3585 (method url-fetch)
3586 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3587 version "/+download/python-distutils-extra-"
3588 version ".tar.gz"))
3589 (sha256
3590 (base32
3591 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3592 (build-system python-build-system)
3593 (native-inputs
3594 `(("python-setuptools" ,python-setuptools)))
3595 (home-page "https://launchpad.net/python-distutils-extra/")
3596 (synopsis "Enhancements to Python's distutils")
3597 (description
3598 "The python-distutils-extra module enables you to easily integrate
3599gettext support, themed icons, and scrollkeeper-based documentation into
3600Python's distutils.")
3601 (license gpl2)))
3602
3603(define-public python2-distutils-extra
3604 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3605
3606(define-public python2-elib.intl
3607 (package
3608 (name "python2-elib.intl")
3609 (version "0.0.3")
3610 (source
3611 (origin
3612 ;; This project doesn't tag releases or publish tarballs, so we take
3613 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3614 (method git-fetch)
3615 (uri (git-reference
3616 (url "https://github.com/dieterv/elib.intl.git")
3617 (commit "d09997cfef")))
3618 (sha256
3619 (base32
3620 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3621 (build-system python-build-system)
3622 (native-inputs
3623 `(("python2-setuptools" ,python2-setuptools)))
3624 (arguments
3625 ;; incompatible with Python 3 (exception syntax)
3626 `(#:python ,python-2
3627 #:tests? #f
3628 ;; With standard flags, the install phase attempts to create a zip'd
3629 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3630 ;; before 1980'
3631 #:configure-flags '("--single-version-externally-managed"
3632 "--record=elib.txt")))
3633 (home-page "https://github.com/dieterv/elib.intl")
3634 (synopsis "Enhanced internationalization for Python")
3635 (description
3636 "The elib.intl module provides enhanced internationalization (I18N)
3637services for your Python modules and applications.")
3638 (license lgpl3+)))
3639
c937562e
EB
3640(define-public python-pillow
3641 (package
3642 (name "python-pillow")
7fbee931 3643 (version "3.0.0")
c937562e
EB
3644 (source
3645 (origin
3646 (method url-fetch)
3647 (uri (string-append "https://pypi.python.org/packages/source/P/"
3648 "Pillow/Pillow-" version ".tar.gz"))
3649 (sha256
3650 (base32
7fbee931 3651 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
c937562e
EB
3652 (build-system python-build-system)
3653 (native-inputs
3654 `(("python-setuptools" ,python-setuptools)
3655 ("python-nose" ,python-nose)))
3656 (inputs
5ff408d9
SB
3657 `(("freetype" ,freetype)
3658 ("lcms" ,lcms)
c937562e
EB
3659 ("zlib" ,zlib)
3660 ("libjpeg" ,libjpeg)
3661 ("openjpeg" ,openjpeg)
5ff408d9
SB
3662 ("libtiff" ,libtiff)
3663 ("libwebp" ,libwebp)))
c937562e
EB
3664 (propagated-inputs
3665 `(;; Used at runtime for pkg_resources
3666 ("python-setuptools" ,python-setuptools)))
3667 (arguments
e5358a6b
LC
3668 `(#:phases (modify-phases %standard-phases
3669 (add-before
3670 'install 'disable-egg-compression
3671 (lambda _
3672 ;; Leave the .egg uncompressed since compressing it would
3673 ;; prevent the GC from identifying run-time dependencies.
3674 ;; See <http://bugs.gnu.org/20765>.
3675 (let ((port (open-file "setup.cfg" "a")))
3676 (display "\n[easy_install]\nzip_ok = 0\n"
3677 port)
3678 (close-port port)
3679 #t)))
3680 (add-after
3681 'install 'check-installed
3682 (lambda _
3683 (begin
3684 (setenv "HOME" (getcwd))
3685 (and (zero? (system* "python" "selftest.py"
3686 "--installed"))
3687 (zero? (system* "python" "test-installed.py"))))))
3688 (delete 'check))))
c937562e
EB
3689 (home-page "https://pypi.python.org/pypi/Pillow")
3690 (synopsis "Fork of the Python Imaging Library")
3691 (description
3692 "The Python Imaging Library adds image processing capabilities to your
3693Python interpreter. This library provides extensive file format support, an
3694efficient internal representation, and fairly powerful image processing
3695capabilities. The core image library is designed for fast access to data
3696stored in a few basic pixel formats. It should provide a solid foundation for
3697a general image processing tool.")
3698 (license (x11-style
3699 "http://www.pythonware.com/products/pil/license.htm"
3700 "The PIL Software License"))))
3701
3702(define-public python2-pillow
3703 (package-with-python2 python-pillow))
bb986599 3704
a415f036
FB
3705(define-public python-pycparser
3706 (package
3707 (name "python-pycparser")
3708 (version "2.10")
3709 (source
3710 (origin
3711 (method url-fetch)
3712 (uri (string-append "https://pypi.python.org/packages/source/p/"
3713 "pycparser/pycparser-" version ".tar.gz"))
3714 (sha256
3715 (base32
3716 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3717 (outputs '("out" "doc"))
3718 (build-system python-build-system)
3719 (native-inputs
3720 `(("pkg-config" ,pkg-config)
3721 ("python-setuptools" ,python-setuptools)))
3722 (arguments
89b5c60e 3723 `(#:phases
a415f036
FB
3724 (alist-replace
3725 'check
3726 (lambda _
3727 (with-directory-excursion "tests"
3728 (zero? (system* "python" "all_tests.py"))))
3729 (alist-cons-after
3730 'install 'install-doc
3731 (lambda* (#:key outputs #:allow-other-keys)
3732 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3733 (doc (string-append data "/doc/" ,name "-" ,version))
3734 (examples (string-append doc "/examples")))
3735 (mkdir-p examples)
3736 (for-each (lambda (file)
3737 (copy-file (string-append "." file)
3738 (string-append doc file)))
3739 '("/README.rst" "/CHANGES" "/LICENSE"))
3740 (copy-recursively "examples" examples)))
3741 %standard-phases))))
3742 (home-page "https://github.com/eliben/pycparser")
3743 (synopsis "C parser in Python")
3744 (description
3745 "Pycparser is a complete parser of the C language, written in pure Python
3746using the PLY parsing library. It parses C code into an AST and can serve as
3747a front-end for C compilers or analysis tools.")
3748 (license bsd-3)))
3749
3750(define-public python2-pycparser
3751 (package-with-python2 python-pycparser))
57c3f716
FB
3752
3753(define-public python-cffi
3754 (package
3755 (name "python-cffi")
4179f952 3756 (version "1.2.1")
57c3f716
FB
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (string-append "https://pypi.python.org/packages/source/c/"
3761 "cffi/cffi-" version ".tar.gz"))
89b5c60e 3762 (sha256
4179f952 3763 (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga"))))
57c3f716
FB
3764 (build-system python-build-system)
3765 (outputs '("out" "doc"))
3766 (inputs
3767 `(("libffi" ,libffi)))
3768 (propagated-inputs ; required at run-time
3769 `(("python-pycparser" ,python-pycparser)))
3770 (native-inputs
3771 `(("pkg-config" ,pkg-config)
3772 ("python-sphinx" ,python-sphinx)
4179f952 3773 ("python-pytest" ,python-pytest)
57c3f716
FB
3774 ("python-setuptools" ,python-setuptools)))
3775 (arguments
4179f952 3776 `(#:phases
57c3f716
FB
3777 (alist-cons-after
3778 'install 'install-doc
3779 (lambda* (#:key outputs #:allow-other-keys)
3780 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3781 (doc (string-append data "/doc/" ,name "-" ,version))
3782 (html (string-append doc "/html")))
3783 (with-directory-excursion "doc"
3784 (system* "make" "html")
3785 (mkdir-p html)
3786 (copy-recursively "build/html" html))
3787 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3788 %standard-phases)))
3789 (home-page "http://cffi.readthedocs.org")
3790 (synopsis "Foreign function interface for Python")
3791 (description
3792 "Foreign Function Interface for Python calling C code.")
bd3fa666 3793 (license license:expat)))
57c3f716
FB
3794
3795(define-public python2-cffi
3796 (package-with-python2 python-cffi))
6fa14469
FB
3797
3798(define-public python-xcffib
3799 (package
3800 (name "python-xcffib")
3801 (version "0.1.9")
3802 (source
3803 (origin
3804 (method url-fetch)
3805 (uri (string-append "https://pypi.python.org/packages/source/x/"
3806 "xcffib/xcffib-" version ".tar.gz"))
3807 (sha256
3808 (base32
3809 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3810 (build-system python-build-system)
3811 (inputs
3812 `(("libxcb" ,libxcb)
3813 ("python-six" ,python-six)))
3814 (native-inputs
3815 `(("python-setuptools" ,python-setuptools)))
3816 (propagated-inputs
3817 `(("python-cffi" ,python-cffi))) ; used at run time
3818 (arguments
89b5c60e 3819 `(#:phases
6fa14469
FB
3820 (alist-cons-after
3821 'install 'install-doc
3822 (lambda* (#:key outputs #:allow-other-keys)
3823 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3824 "/doc/" ,name "-" ,version)))
3825 (mkdir-p doc)
3826 (copy-file "README.md"
3827 (string-append doc "/README.md"))))
3828 %standard-phases)))
3829 (home-page "https://github.com/tych0/xcffib")
3830 (synopsis "XCB Python bindings")
3831 (description
3832 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3833support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3834 (license license:expat)))
6fa14469
FB
3835
3836(define-public python2-xcffib
3837 (package-with-python2 python-xcffib))
3838
9e099723
FB
3839(define-public python-cairocffi
3840 (package
3841 (name "python-cairocffi")
3842 (version "0.6")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 ;; The archive on pypi is missing the 'utils' directory!
3847 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3848 version ".tar.gz"))
f586c877 3849 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3850 (sha256
3851 (base32
3852 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3853 (build-system python-build-system)
3854 (outputs '("out" "doc"))
3855 (inputs
3856 `(("gdk-pixbuf" ,gdk-pixbuf)
3857 ("cairo" ,cairo)))
3858 (native-inputs
3859 `(("pkg-config" ,pkg-config)
3860 ("python-sphinx" ,python-sphinx)
3861 ("python-docutils" ,python-docutils)
3862 ("python-setuptools" ,python-setuptools)))
3863 (propagated-inputs
3864 `(("python-xcffib" ,python-xcffib))) ; used at run time
3865 (arguments
89b5c60e 3866 `(#:phases
9e099723
FB
3867 (alist-cons-after
3868 'install 'install-doc
3869 (lambda* (#:key inputs outputs #:allow-other-keys)
3870 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3871 (doc (string-append data "/doc/" ,name "-" ,version))
3872 (html (string-append doc "/html")))
89b5c60e 3873 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3874 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3875 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3876 (setenv "LANG" "en_US.UTF-8")
3877 (mkdir-p html)
3878 (for-each (lambda (file)
3879 (copy-file (string-append "." file)
3880 (string-append doc file)))
3881 '("/README.rst" "/CHANGES" "/LICENSE"))
3882 (system* "python" "setup.py" "build_sphinx")
3883 (copy-recursively "docs/_build/html" html)))
3884 %standard-phases)))
3885 (home-page "https://github.com/SimonSapin/cairocffi")
3886 (synopsis "Python bindings and object-oriented API for Cairo")
3887 (description
3888 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3889Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3890graphics library with support for multiple backends including image buffers,
3891PNG, PostScript, PDF, and SVG file output.")
3892 (license bsd-3)))
3893
3894(define-public python2-cairocffi
3895 (package-with-python2 python-cairocffi))
3896
3cff95cb
RW
3897(define-public python-decorator
3898 (package
3899 (name "python-decorator")
3900 (version "3.4.2")
3901 (source
3902 (origin
3903 (method url-fetch)
3904 (uri (string-append
3905 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3906 version ".tar.gz"))
3907 (sha256
3908 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3909 (build-system python-build-system)
3910 (arguments '(#:tests? #f)) ; no test target
3911 (native-inputs
3912 `(("python-setuptools" ,python-setuptools)))
3913 (home-page "http://pypi.python.org/pypi/decorator/")
3914 (synopsis "Python module to simplify usage of decorators")
3915 (description
3916 "The aim of the decorator module is to simplify the usage of decorators
3917for the average programmer, and to popularize decorators usage giving examples
3918of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3919etc. The core of this module is a decorator factory.")
3920 (license license:expat)))
3921
3922(define-public python2-decorator
3923 (package-with-python2 python-decorator))
3924
2c0499ad
RW
3925(define-public python-drmaa
3926 (package
3927 (name "python-drmaa")
3928 (version "0.7.6")
3929 (source
3930 (origin
3931 (method url-fetch)
3932 (uri (string-append
3933 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3934 version ".tar.gz"))
3935 (sha256
3936 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3937 (build-system python-build-system)
3938 ;; The test suite requires libdrmaa which is provided by the cluster
3939 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3940 ;; should be set to the path of the libdrmaa library.
3941 (arguments '(#:tests? #f))
3942 (native-inputs
3943 `(("python-nose" ,python-nose)
3944 ("python-setuptools" ,python-setuptools)))
3945 (home-page "https://pypi.python.org/pypi/drmaa")
3946 (synopsis "Python bindings for the DRMAA library")
3947 (description
3948 "A Python package for Distributed Resource Management (DRM) job
3949submission and control. This package is an implementation of the DRMAA 1.0
3950Python language binding specification.")
3951 (license bsd-3)))
3952
3953(define-public python2-drmaa
3954 (package-with-python2 python-drmaa))
3955
d05c6da0
RW
3956(define-public python-gridmap
3957 (package
3958 (name "python-gridmap")
3959 (version "0.13.0")
3960 (source
3961 (origin
3962 (method url-fetch)
3963 (uri (string-append
3964 "https://github.com/pygridtools/gridmap/archive/v"
3965 version ".tar.gz"))
3966 (file-name (string-append name "-" version ".tar.gz"))
3967 (sha256
3968 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3969 (build-system python-build-system)
3970 (inputs
3971 `(("python-psutil" ,python-psutil)
3972 ("python-drmaa" ,python-drmaa)
3973 ("python-pyzmq" ,python-pyzmq)))
3974 (native-inputs
3975 `(("python-setuptools" ,python-setuptools)))
3976 (home-page "https://github.com/pygridtools/gridmap")
3977 (synopsis "Create jobs on a cluster directly from Python")
3978 (description
3979 "Gridmap is a Python package to allow you to easily create jobs on the
3980cluster directly from Python. You can directly map Python functions onto the
3981cluster without needing to write any wrapper code yourself.")
3982 (license gpl3+)))
3983
3984(define-public python2-gridmap
3985 (package-with-python2 python-gridmap))
3986
cb6d5c54
RW
3987(define-public python-pexpect
3988 (package
3989 (name "python-pexpect")
3990 (version "3.3")
3991 (source
3992 (origin
3993 (method url-fetch)
3994 (uri (string-append "https://pypi.python.org/packages/source/p/"
3995 "pexpect/pexpect-" version ".tar.gz"))
3996 (sha256
3997 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
3998 (build-system python-build-system)
3999 (arguments
4000 `(#:phases
4001 (modify-phases %standard-phases
4002 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4003 (native-inputs
4004 `(("python-nose" ,python-nose)))
4005 (home-page "http://pexpect.readthedocs.org/")
4006 (synopsis "Controlling interactive console applications")
4007 (description
4008 "Pexpect is a pure Python module for spawning child applications;
4009controlling them; and responding to expected patterns in their output.
4010Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4011child application and control it as if a human were typing commands.")
4012 (license isc)))
4013
4014(define-public python2-pexpect
4015 (package-with-python2 python-pexpect))
4016
229ad120
RW
4017(define-public python-setuptools-scm
4018 (package
4019 (name "python-setuptools-scm")
383af6b0 4020 (version "1.9.0")
229ad120
RW
4021 (source (origin
4022 (method url-fetch)
383af6b0 4023 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4024 (sha256
4025 (base32
383af6b0 4026 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4027 (build-system python-build-system)
383af6b0 4028 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4029 (home-page "https://github.com/pypa/setuptools_scm/")
4030 (synopsis "Manage Python package versions in SCM metadata")
4031 (description
383af6b0 4032 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4033@dfn{software configuration management} (SCM) metadata instead of declaring
4034them as the version argument or in a SCM managed file.")
4035 (license license:expat)))
4036
4037(define-public python2-setuptools-scm
4038 (package-with-python2 python-setuptools-scm))
4039
b74270ee
RW
4040(define-public python-pathpy
4041 (package
4042 (name "python-pathpy")
4043 (version "8.1.1")
4044 (source
4045 (origin
4046 (method url-fetch)
4047 (uri (string-append "https://pypi.python.org/packages/source/p/"
4048 "path.py/path.py-" version ".tar.gz"))
4049 (sha256
4050 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4051 (build-system python-build-system)
4052 (propagated-inputs
4053 `(("python-appdirs" ,python-appdirs)))
4054 (native-inputs
553b709b
EF
4055 `(("python-setuptools" ,python-setuptools)
4056 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4057 ("python-pytest" ,python-pytest)
4058 ("python-pytest-runner" ,python-pytest-runner)))
4059 (home-page "http://github.com/jaraco/path.py")
4060 (synopsis "Python module wrapper for built-in os.path")
4061 (description
4062 "@code{path.py} implements path objects as first-class entities, allowing
4063common operations on files to be invoked on those path objects directly.")
4064 (license license:expat)))
4065
4066(define-public python2-pathpy
4067 (package-with-python2 python-pathpy))
4068
0d34e01b
RW
4069(define-public python-pickleshare
4070 (package
4071 (name "python-pickleshare")
4072 (version "0.5")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (string-append "https://pypi.python.org/packages/source/p/"
4077 "pickleshare/pickleshare-" version ".tar.gz"))
4078 (sha256
4079 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4080 (build-system python-build-system)
4081 (propagated-inputs
4082 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4083 (native-inputs
4084 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4085 (home-page "https://github.com/vivainio/pickleshare")
4086 (synopsis "Tiny key value database with concurrency support")
4087 (description
4088 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4089Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4090shelve, many processes can access the database simultaneously. Changing a
4091value in database is immediately visible to other processes accessing the same
4092database. Concurrency is possible because the values are stored in separate
4093files. Hence the “database” is a directory where all files are governed by
4094PickleShare.")
4095 (license license:expat)))
4096
4097(define-public python2-pickleshare
4098 (package-with-python2 python-pickleshare))
4099
cd6e5189
RW
4100(define-public python-simplegeneric
4101 (package
4102 (name "python-simplegeneric")
4103 (version "0.8.1")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (string-append "https://pypi.python.org/packages/source/s/"
4108 "simplegeneric/simplegeneric-" version ".zip"))
4109 (sha256
4110 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4111 (build-system python-build-system)
4112 (native-inputs
69b96e5e
RW
4113 `(("python-setuptools" ,python-setuptools)
4114 ("unzip" ,unzip)))
cd6e5189
RW
4115 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4116 (synopsis "Python module for simple generic functions")
4117 (description
4118 "The simplegeneric module lets you define simple single-dispatch generic
4119functions, akin to Python’s built-in generic functions like @code{len()},
4120@code{iter()} and so on. However, instead of using specially-named methods,
4121these generic functions use simple lookup tables, akin to those used by
4122e.g. @code{pickle.dump()} and other generic functions found in the Python
4123standard library.")
4124 (license zpl2.1)))
4125
4126(define-public python2-simplegeneric
4127 (package-with-python2 python-simplegeneric))
4128
ddc7d8ed
RW
4129(define-public python-ipython-genutils
4130 (package
4131 (name "python-ipython-genutils")
4132 (version "0.1.0")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (string-append "https://pypi.python.org/packages/source/i/"
4137 "ipython_genutils/ipython_genutils-"
4138 version ".tar.gz"))
4139 (sha256
4140 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4141 (build-system python-build-system)
4142 (arguments `(#:tests? #f)) ; no tests
4143 (home-page "http://ipython.org")
4144 (synopsis "Vestigial utilities from IPython")
4145 (description
4146 "This package provides retired utilities from IPython.")
4147 (license bsd-3)))
4148
4149(define-public python2-ipython-genutils
4150 (package-with-python2 python-ipython-genutils))
4151
2b10eb48
RW
4152(define-public python-traitlets
4153 (package
4154 (name "python-traitlets")
4155 (version "4.0.0")
4156 (source
4157 (origin
4158 (method url-fetch)
4159 (uri (string-append "https://pypi.python.org/packages/source/t/"
4160 "traitlets/traitlets-" version ".tar.gz"))
4161 (sha256
4162 (base32
4163 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4164 (build-system python-build-system)
4165 (arguments
4166 `(#:phases
4167 (modify-phases %standard-phases
4168 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4169 (propagated-inputs
4170 `(("python-ipython-genutils" ,python-ipython-genutils)
4171 ("python-decorator" ,python-decorator)))
4172 (native-inputs
4173 `(("python-nose" ,python-nose)))
4174 (home-page "http://ipython.org")
4175 (synopsis "Configuration system for Python applications")
4176 (description
4177 "Traitlets is a framework that lets Python classes have attributes with
4178type checking, dynamically calculated default values, and ‘on change’
4179callbacks. The package also includes a mechanism to use traitlets for
4180configuration, loading values from files or from command line arguments. This
4181is a distinct layer on top of traitlets, so you can use traitlets in your code
4182without using the configuration machinery.")
4183 (license bsd-3)))
4184
4185(define-public python2-traitlets
4186 (package-with-python2 python-traitlets))
4187
ae1ab9fe
FB
4188(define-public python-ipython
4189 (package
4190 (name "python-ipython")
3a0b1b9a 4191 (version "3.2.1")
ae1ab9fe
FB
4192 (source
4193 (origin
fceac880
FB
4194 (method url-fetch)
4195 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4196 (uri (string-append "https://pypi.python.org/packages/source/i/"
4197 "ipython/ipython-" version ".tar.gz"))
4198 (sha256
4199 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4200 (build-system python-build-system)
4201 (outputs '("out" "doc"))
3a0b1b9a
FB
4202 (propagated-inputs
4203 `(("python-pyzmq" ,python-pyzmq)
4204 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4205 (inputs
4206 `(("readline" ,readline)
3a0b1b9a 4207 ("which" ,which)
ae1ab9fe 4208 ("python-matplotlib" ,python-matplotlib)
5d26e542 4209 ("python-numpy" ,python-numpy)
ae1ab9fe 4210 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4211 ("python-jinja2" ,python-jinja2)
4212 ("python-mistune" ,python-mistune)
4213 ("python-jsonschema" ,python-jsonschema)
4214 ("python-pygments" ,python-pygments)
4215 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4216 ("python-nose" ,python-nose)))
4217 (native-inputs
4218 `(("pkg-config" ,pkg-config)
4219 ("python-sphinx" ,python-sphinx)
4220 ("texlive" ,texlive)
4221 ("texinfo" ,texinfo)
4222 ("python-setuptools" ,python-setuptools)))
4223 (arguments
89b5c60e 4224 `(#:phases
3a0b1b9a
FB
4225 (modify-phases %standard-phases
4226 (add-after
4227 'install 'install-doc
4228 (lambda* (#:key inputs outputs #:allow-other-keys)
4229 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4230 (doc (string-append data "/doc/" ,name "-" ,version))
4231 (html (string-append doc "/html"))
4232 (man1 (string-append data "/man/man1"))
4233 (info (string-append data "/info"))
4234 (examples (string-append doc "/examples")))
afd3d931 4235 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4236 (with-directory-excursion "docs"
4237 ;; FIXME: html and pdf fail to build
4238 ;; (system* "make" "html")
4239 ;; (system* "make" "pdf" "PAPER=a4")
4240 (system* "make" "info"))
4241 (copy-recursively "docs/man" man1)
4242 (copy-recursively "examples" examples)
4243 ;; (copy-recursively "docs/build/html" html)
4244 ;; (copy-file "docs/build/latex/ipython.pdf"
4245 ;; (string-append doc "/ipython.pdf"))
4246 (mkdir-p info)
4247 (copy-file "docs/build/texinfo/ipython.info"
4248 (string-append info "/ipython.info"))
4249 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4250 ;; Tests can only be run after the library has been installed and not
4251 ;; within the source directory.
4252 (delete 'check)
4253 (add-after
4254 'install 'check
4255 (lambda* (#:key outputs tests? #:allow-other-keys)
4256 (if tests?
4257 (with-directory-excursion "/tmp"
4258 (setenv "HOME" "/tmp/") ;; required by a test
4259 (zero? (system* (string-append (assoc-ref outputs "out")
4260 "/bin/iptest"))))
4261 #t)))
4262 (add-before
4263 'install 'fix-tests
4264 (lambda* (#:key inputs #:allow-other-keys)
4265 (substitute* "./IPython/utils/_process_posix.py"
4266 (("/usr/bin/env', 'which") (which "which")))
4267 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4268 (("#!/usr/bin/env python")
4269 (string-append "#!" (which "python"))))
4270 ;; Disable 1 failing test
4271 (substitute* "./IPython/core/tests/test_magic.py"
4272 (("def test_dirops\\(\\):" all)
4273 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4274 (home-page "http://ipython.org")
4275 (synopsis "IPython is a tool for interactive computing in Python")
4276 (description
4277 "IPython provides a rich architecture for interactive computing with:
4278Powerful interactive shells, a browser-based notebook, support for interactive
4279data visualization, embeddable interpreters and tools for parallel
4280computing.")
4281 (license bsd-3)))
4282
4283(define-public python2-ipython
4284 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4285 (package
4286 (inherit ipython)
4287 ;; FIXME: some tests are failing
4288 (arguments
4289 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4290 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4291 ;; FIXME: add pyreadline once available.
667d90df
RW
4292 (propagated-inputs
4293 `(("python2-terminado" ,python2-terminado)
4294 ,@(alist-delete "python-terminado"
4295 (package-propagated-inputs ipython))))
89b5c60e 4296 (inputs
3a0b1b9a
FB
4297 `(("python2-mock" ,python2-mock)
4298 ("python2-matplotlib" ,python2-matplotlib)
5587253a
FB
4299 ("python2-numpy" ,python2-numpy)
4300 ,@(fold alist-delete (package-inputs ipython)
4301 '("python-matplotlib" "python-numpy")))))))
03411993
AE
4302
4303(define-public python-isodate
4304 (package
4305 (name "python-isodate")
4306 (version "0.5.1")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (string-append
4311 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4312 version
4313 ".tar.gz"))
4314 (sha256
4315 (base32
4316 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4317 (build-system python-build-system)
4318 (inputs
4319 `(("python-setuptools" ,python-setuptools)))
4320 (home-page
4321 "http://cheeseshop.python.org/pypi/isodate")
4322 (synopsis
4323 "Python date parser and formatter")
4324 (description
4325 "Python-isodate is a python module for parsing and formatting
4326ISO 8601 dates, time and duration.")
4327 (license bsd-3)))
4328
4329(define-public python2-isodate
4330 (package-with-python2 python-isodate))
673ab897
AE
4331
4332(define-public python-html5lib
4333 (package
4334 (name "python-html5lib")
4335 (version "1.0b3")
4336 (source
4337 (origin
4338 (method url-fetch)
4339 (uri (string-append
4340 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4341 version
4342 ".tar.gz"))
4343 (sha256
4344 (base32
4345 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4346 (build-system python-build-system)
3dd75476
AE
4347 (propagated-inputs
4348 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4349 (inputs
4350 `(("python-setuptools" ,python-setuptools)))
4351 (arguments
4352 `(#:test-target "check"))
4353 (home-page
4354 "https://github.com/html5lib/html5lib-python")
4355 (synopsis
4356 "Python HTML parser based on the WHATWG HTML specifcation")
4357 (description
4358 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4359and written in Python.")
bd3fa666 4360 (license license:expat)))
673ab897
AE
4361
4362(define-public python2-html5lib
4363 (package-with-python2 python-html5lib))
e99f4211
MW
4364
4365(define-public python-urwid
4366 (package
4367 (name "python-urwid")
4368 (version "1.3.0")
4369 (source
4370 (origin
4371 (method url-fetch)
be1f44bb
MW
4372 (uri (string-append
4373 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4374 version ".tar.gz"))
e99f4211
MW
4375 (sha256
4376 (base32
4377 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4378 (build-system python-build-system)
4379 (native-inputs `(("python-setuptools" ,python-setuptools)))
4380 (home-page "http://urwid.org")
4381 (synopsis "Console user interface library for Python")
4382 (description
4383 "Urwid is a curses-based UI/widget library for Python. It includes many
4384features useful for text console applications.")
4385 (license lgpl2.1+)))
4386
4387(define-public python2-urwid
4388 (package-with-python2 python-urwid))
d95a56c6
PAR
4389
4390(define-public python-dbus
4391 (package
4392 (name "python-dbus")
4393 (version "1.2.0")
4394 (source
4395 (origin
4396 (method url-fetch)
4397 (uri (string-append
4398 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4399 version ".tar.gz"))
4400 (sha256
4401 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4402 (build-system gnu-build-system)
6717c879
SB
4403 (arguments
4404 '(#:phases
4405 (modify-phases %standard-phases
4406 (add-before
4407 'check 'pre-check
4408 (lambda _
4409 ;; XXX: For the missing '/etc/machine-id'.
4410 (substitute* "test/run-test.sh"
4411 (("DBUS_FATAL_WARNINGS=1")
4412 "DBUS_FATAL_WARNINGS=0"))
4413 #t)))))
d95a56c6
PAR
4414 (native-inputs
4415 `(("pkg-config" ,pkg-config)))
4416 (inputs
4417 `(("python" ,python)
2e88d113 4418 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4419 (synopsis "Python bindings for D-bus")
4420 (description "python-dbus provides bindings for libdbus, the reference
4421implementation of D-Bus.")
4422 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4423 (license license:expat)))
b52af02b
MW
4424
4425(define-public python2-dbus
4426 (package (inherit python-dbus)
4427 (name "python2-dbus")
4428 (inputs `(("python" ,python-2)
4429 ,@(alist-delete "python"
4430 (package-inputs python-dbus)
4431 equal?)))
4432 ;; FIXME: on Python 2, the test_utf8 fails with:
4433 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4434 (arguments `(#:tests? #f))))
a6ac8332
AE
4435
4436(define-public python-apsw
4437 (package
4438 (name "python-apsw")
4439 (version "3.8.7.3-r1")
4440 (source
4441 (origin
4442 (method url-fetch)
4443 (uri (string-append
4444 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4445 version
4446 ".tar.gz"))
4447 (sha256
4448 (base32
4449 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4450 (build-system python-build-system)
4451 (inputs
4452 `(("python-setuptools" ,python-setuptools)
4453 ("sqlite" ,sqlite)))
4454 (arguments
4455 `(#:phases
4456 ;; swap check and install phases
4457 (alist-cons-after
4458 'install 'check
4459 (assoc-ref %standard-phases 'check)
4460 (alist-delete
4461 'check
4462 %standard-phases))))
4463 (home-page "https://github.com/rogerbinns/apsw/")
4464 (synopsis "Another Python SQLite Wrapper")
4465 (description "APSW is a Python wrapper for the SQLite
4466embedded relational database engine. In contrast to other wrappers such as
4467pysqlite it focuses on being a minimal layer over SQLite attempting just to
4468translate the complete SQLite API into Python.")
abde5f37 4469 (license license:zlib)))
a6ac8332
AE
4470
4471(define-public python2-apsw
4472 (package-with-python2 python-apsw))
26b307e2
AE
4473
4474(define-public python-lxml
4475 (package
4476 (name "python-lxml")
4477 (version "3.4.2")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (string-append
4482 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4483 version
4484 ".tar.gz"))
4485 (sha256
4486 (base32
4487 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4488 (build-system python-build-system)
4489 (inputs
4490 `(("libxml2" ,libxml2)
4491 ("libxslt" ,libxslt)
4492 ("python-setuptools" ,python-setuptools)))
4493 (home-page "http://lxml.de/")
4494 (synopsis
4495 "Python XML processing library")
4496 (description
4497 "The lxml XML toolkit is a Pythonic binding for the C libraries
4498libxml2 and libxslt.")
4499 (license bsd-3))) ; and a few more, see LICENSES.txt
4500
4501(define-public python2-lxml
4502 (package-with-python2 python-lxml))
4ed20663 4503
bec07a7c
AE
4504(define-public python2-pil
4505 (package
4506 (name "python2-pil")
4507 (version "1.1.7")
4508 (source
4509 (origin
4510 (method url-fetch)
4511 (uri (string-append
4512 "http://effbot.org/downloads/Imaging-"
4513 version ".tar.gz"))
4514 (sha256
4515 (base32
516277cb
AE
4516 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4517 (modules '((guix build utils)))
4518 (snippet
4519 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4520 ;; there is no use in creating a patch and reporting it.
4521 '(substitute* "_imagingft.c"
4522 (("freetype/")
4523 "freetype2/")))))
bec07a7c
AE
4524 (build-system python-build-system)
4525 (inputs
4526 `(("freetype" ,freetype)
4527 ("libjpeg" ,libjpeg)
4528 ("libtiff" ,libtiff)
4529 ("python-setuptools" ,python-setuptools)
4530 ("zlib" ,zlib)))
4531 (arguments
4532 ;; Only the fork python-pillow works with Python 3.
4533 `(#:python ,python-2
4534 #:tests? #f ; no check target
4535 #:phases
4536 (alist-cons-before
4537 'build 'configure
4538 ;; According to README and setup.py, manual configuration is
4539 ;; the preferred way of "searching" for inputs.
4540 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4541 (lambda* (#:key inputs #:allow-other-keys)
4542 (let ((jpeg (assoc-ref inputs "libjpeg"))
4543 (zlib (assoc-ref inputs "zlib"))
4544 (tiff (assoc-ref inputs "libtiff"))
4545 (freetype (assoc-ref inputs "freetype")))
4546 (substitute* "setup.py"
4547 (("JPEG_ROOT = None")
4548 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4549 (("ZLIB_ROOT = None")
4550 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4551 (("TIFF_ROOT = None")
4552 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4553 (("FREETYPE_ROOT = None")
4554 (string-append "FREETYPE_ROOT = libinclude(\""
4555 freetype "\")")))))
4556 %standard-phases)))
4557 (home-page "http://www.pythonware.com/products/pil/")
4558 (synopsis "Python Imaging Library")
4559 (description "The Python Imaging Library (PIL) adds image processing
4560capabilities to the Python interpreter.")
4561 (license (x11-style
4562 "file://README"
4563 "See 'README' in the distribution."))))
092e86f5
AE
4564
4565(define-public python2-cssutils
4566 (package
4567 (name "python2-cssutils")
4568 (version "1.0")
4569 (source
4570 (origin
4571 (method url-fetch)
4572 (uri (string-append
4573 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4574 version
4575 ".zip"))
4576 (sha256
4577 (base32
4578 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4579 (build-system python-build-system)
4580 (native-inputs
4581 `(("python2-mock" ,python2-mock) ; for the tests
4582 ("unzip" ,unzip))) ; for unpacking the source
4583 (inputs
4584 `(("python2-setuptools" ,python2-setuptools)))
4585 (arguments
4586 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4587 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4588 ))
092e86f5
AE
4589 (home-page "http://cthedot.de/cssutils/")
4590 (synopsis
4591 "CSS Cascading Style Sheets library for Python")
4592 (description
4593 "Cssutils is a Python package for parsing and building CSS
4594Cascading Style Sheets. Currently it provides a DOM only and no rendering
4595options.")
4596 (license lgpl3+)))
880ff77c
AE
4597
4598(define-public python-cssselect
4599 (package
4600 (name "python-cssselect")
4601 (version "0.9.1")
4602 (source
4603 (origin
4604 (method url-fetch)
4605 (uri (string-append
4606 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4607 version
4608 ".tar.gz"))
4609 (sha256
4610 (base32
4611 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4612 (build-system python-build-system)
4613 (inputs
4614 `(("python-setuptools" ,python-setuptools)))
4615 (arguments
4616 ;; tests fail with message
4617 ;; AttributeError: 'module' object has no attribute 'tests'
4618 `(#:tests? #f))
4619 (home-page
4620 "https://pythonhosted.org/cssselect/")
4621 (synopsis
4622 "CSS3 selector parser and translator to XPath 1.0")
4623 (description
4624 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4625them to XPath 1.0 expressions. Such expressions can be used in lxml or
4626another XPath engine to find the matching elements in an XML or HTML document.")
4627 (license bsd-3)))
4628
4629(define-public python2-cssselect
4630 (package-with-python2 python-cssselect))
60357f99
AE
4631
4632(define-public python-netifaces
4633 (package
4634 (name "python-netifaces")
4635 (version "0.10.4")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (string-append
4640 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4641 version
4642 ".tar.gz"))
4643 (sha256
4644 (base32
4645 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4646 (build-system python-build-system)
4647 (inputs
4648 `(("python-setuptools" ,python-setuptools)))
4649 (home-page
4650 "https://bitbucket.org/al45tair/netifaces")
4651 (synopsis
4652 "Python module for portable network interface information")
4653 (description
4654 "Netifaces is a Python module providing information on network
4655interfaces in an easy and portable manner.")
4656 (license license:expat)))
4657
4658(define-public python2-netifaces
4659 (package-with-python2 python-netifaces))
92cb152b 4660
32f77c04
RW
4661(define-public python-networkx
4662 (package
4663 (name "python-networkx")
4664 (version "1.9.1")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (string-append
4669 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4670 version ".tar.gz"))
4671 (sha256
4672 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4673 (build-system python-build-system)
4674 ;; python-decorator is needed at runtime
4675 (propagated-inputs
4676 `(("python-decorator" ,python-decorator)))
4677 (native-inputs
4678 `(("python-setuptools" ,python-setuptools)
4679 ("python-nose" ,python-nose)))
4680 (home-page "http://networkx.github.io/")
4681 (synopsis "Python module for creating and manipulating graphs and networks")
4682 (description
4683 "NetworkX is a Python package for the creation, manipulation, and study
4684of the structure, dynamics, and functions of complex networks.")
4685 (license bsd-3)))
4686
4687(define-public python2-networkx
4688 (package-with-python2 python-networkx))
4689
92cb152b
RW
4690(define-public snakemake
4691 (package
4692 (name "snakemake")
4693 (version "3.2.1")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (string-append
4698 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4699 version ".tar.gz"))
4700 (sha256
4701 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4702 (build-system python-build-system)
4703 (inputs `(("python-setuptools" ,python-setuptools)))
4704 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4705 (synopsis "Python-based execution environment for make-like workflows")
4706 (description
4707 "Snakemake aims to reduce the complexity of creating workflows by
4708providing a clean and modern domain specific specification language (DSL) in
4709Python style, together with a fast and comfortable execution environment.")
4710 (license license:expat)))
a1920bc9 4711
35de1fbd
RW
4712(define-public python-seaborn
4713 (package
4714 (name "python-seaborn")
4715 (version "0.5.1")
4716 (source
4717 (origin
4718 (method url-fetch)
4719 (uri (string-append
4720 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4721 version ".tar.gz"))
4722 (sha256
4723 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4724 (build-system python-build-system)
4725 (propagated-inputs
4726 `(("python-pandas" ,python-pandas)
4727 ("python-matplotlib" ,python-matplotlib)
4728 ("python-scipy" ,python-scipy)))
4729 (native-inputs
4730 `(("python-setuptools" ,python-setuptools)))
4731 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4732 (synopsis "Statistical data visualization")
4733 (description
4734 "Seaborn is a library for making attractive and informative statistical
4735graphics in Python. It is built on top of matplotlib and tightly integrated
4736with the PyData stack, including support for numpy and pandas data structures
4737and statistical routines from scipy and statsmodels.")
4738 (license bsd-3)))
4739
4740(define-public python2-seaborn
4741 (let ((seaborn (package-with-python2 python-seaborn)))
4742 (package (inherit seaborn)
4743 (propagated-inputs
4744 `(("python2-pytz" ,python2-pytz)
dab8ebd9
FB
4745 ("python2-pandas" ,python2-pandas)
4746 ("python2-matplotlib" ,python2-matplotlib)
4747 ("python2-scipy" ,python2-scipy))))))
35de1fbd 4748
90fc547f
RW
4749(define-public python-sympy
4750 (package
4751 (name "python-sympy")
4752 (version "0.7.6")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (string-append
4757 "https://github.com/sympy/sympy/releases/download/sympy-"
4758 version "/sympy-" version ".tar.gz"))
4759 (sha256
4760 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4761 (build-system python-build-system)
4762 (native-inputs
4763 `(("python-setuptools" ,python-setuptools)))
4764 (home-page "http://www.sympy.org/")
4765 (synopsis "Python library for symbolic mathematics")
4766 (description
4767 "SymPy is a Python library for symbolic mathematics. It aims to become a
4768full-featured computer algebra system (CAS) while keeping the code as simple
4769as possible in order to be comprehensible and easily extensible.")
4770 (license bsd-3)))
4771
4772(define-public python2-sympy
4773 (package-with-python2 python-sympy))
4774
a1920bc9
FB
4775(define-public python-testlib
4776 (package
4777 (name "python-testlib")
4778 (version "0.6.5")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (string-append
4783 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4784 version ".zip"))
4785 (sha256
4786 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4787 (build-system python-build-system)
4788 (inputs
4789 `(("python-setuptools" ,python-setuptools)))
4790 (native-inputs
4791 `(("unzip" ,unzip)))
4792 (arguments
4793 `(#:phases
4794 (alist-replace
4795 'unpack
4796 (lambda* (#:key inputs outputs #:allow-other-keys)
4797 (let ((unzip (string-append (assoc-ref inputs "unzip")
4798 "/bin/unzip"))
4799 (source (assoc-ref inputs "source")))
4800 (and (zero? (system* unzip source))
4801 (chdir (string-append "testlib-" ,version)))))
4802 %standard-phases)))
4803 (synopsis "Python micro test suite harness")
4804 (description "A micro unittest suite harness for Python.")
4805 (home-page "https://github.com/trentm/testlib")
1cb9c006 4806 (license license:expat)))
a1920bc9
FB
4807
4808(define-public python2-testlib
4809 (package-with-python2 python-testlib))
db62afa5
LC
4810
4811(define-public python2-xlib
4812 (package
4813 (name "python2-xlib")
4814 (version "0.14")
4815 (source (origin
4816 (method url-fetch)
4817 (uri (string-append "mirror://sourceforge/python-xlib/"
4818 "python-xlib-" version ".tar.gz"))
4819 (sha256
4820 (base32
4821 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4822 (build-system python-build-system)
4823 (arguments
4824 `(#:python ,python-2 ;Python 2 only
4825 #:tests? #f)) ;no tests
4826 (inputs
4827 `(("python-setuptools" ,python-setuptools)))
4828 (home-page "http://python-xlib.sourceforge.net/")
4829 (synopsis "Python X11 client library")
4830 (description
4831 "The Python X Library is intended to be a fully functional X client
4832library for Python programs. It is useful to implement low-level X clients.
4833It is written entirely in Python.")
4834 (license gpl2+)))
0234ca06
DT
4835
4836(define-public python-singledispatch
4837 (package
4838 (name "python-singledispatch")
4839 (version "3.4.0.3")
4840 (source
4841 (origin
4842 (method url-fetch)
4843 (uri (string-append
4844 "https://pypi.python.org/packages/source/s/singledispatch/"
4845 "singledispatch-" version ".tar.gz"))
4846 (sha256
4847 (base32
4848 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4849 (build-system python-build-system)
4850 (native-inputs
4851 `(("python-setuptools" ,python-setuptools)))
4852 (propagated-inputs
4853 `(("python-six" ,python-six)))
4854 (home-page
4855 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4856 (synopsis "Backport of singledispatch feature from Python 3.4")
4857 (description
4858 "This library brings functools.singledispatch from Python 3.4 to Python
48592.6-3.3.")
4860 (license license:expat)))
4861
4862(define-public python2-singledispatch
4863 (package-with-python2 python-singledispatch))
feaae484 4864
310d218f
RW
4865(define-public python-tornado
4866 (package
4867 (name "python-tornado")
4868 (version "4.1")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (string-append
4873 "https://pypi.python.org/packages/source/t/tornado/"
4874 "tornado-" version ".tar.gz"))
4875 (sha256
4876 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4877 (build-system python-build-system)
4878 (inputs
4879 `(("python-certifi" ,python-certifi)))
4880 (native-inputs
4881 `(("python-setuptools" ,python-setuptools)))
f4a4a718 4882 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4883 (synopsis "Python web framework and asynchronous networking library")
4884 (description
4885 "Tornado is a Python web framework and asynchronous networking library,
4886originally developed at FriendFeed. By using non-blocking network I/O,
4887Tornado can scale to tens of thousands of open connections, making it ideal
4888for long polling, WebSockets, and other applications that require a long-lived
4889connection to each user.")
4890 (license asl2.0)))
4891
4892(define-public python2-tornado
4893 (let ((tornado (package-with-python2 python-tornado)))
4894 (package (inherit tornado)
4895 (inputs
4896 `(("python2-backport-ssl-match-hostname"
4897 ,python2-backport-ssl-match-hostname)
4898 ,@(package-inputs tornado))))))
4899
feaae484
SB
4900(define-public python-waf
4901 (package
4902 (name "python-waf")
4903 (version "1.8.8")
4904 (source (origin
4905 (method url-fetch)
4906 (uri (string-append "https://waf.io/"
4907 "waf-" version ".tar.bz2"))
4908 (sha256
4909 (base32
4910 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4911 (build-system python-build-system)
4912 (arguments
4913 '(#:phases
4914 (modify-phases %standard-phases
4915 (replace 'build
4916 (lambda _
4917 (zero? (begin
4918 (system* "python" "waf-light" "configure")
4919 (system* "python" "waf-light" "build")))))
4920 (replace 'check
4921 (lambda _
4922 (zero? (system* "python" "waf" "--version"))))
4923 (replace 'install
4924 (lambda _
4925 (copy-file "waf" %output))))))
4926 (home-page "https://waf.io/")
4927 (synopsis "Python-based build system")
4928 (description
4929 "Waf is a Python-based framework for configuring, compiling and installing
4930applications.")
4931 (license bsd-3)))
4932
4933(define-public python2-waf
4934 (package-with-python2 python-waf))
45203542
RW
4935
4936(define-public python-pyzmq
4937 (package
4938 (name "python-pyzmq")
4939 (version "14.6.0")
4940 (source
4941 (origin
4942 (method url-fetch)
4943 (uri (string-append
4944 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4945 version ".tar.gz"))
4946 (sha256
4947 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4948 (build-system python-build-system)
4949 (arguments
4950 `(#:configure-flags
4951 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4952 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4953 ;; --inplace' for 'python setup.py test' to work.
4954 #:tests? #f))
4955 (inputs
4956 `(("zeromq" ,zeromq)))
4957 (native-inputs
4958 `(("pkg-config" ,pkg-config)
4959 ("python-nose" ,python-nose)
4960 ("python-setuptools" ,python-setuptools)))
4961 (home-page "http://github.com/zeromq/pyzmq")
4962 (synopsis "Python bindings for 0MQ")
4963 (description
4964 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4965 (license bsd-4)))
4966
4967(define-public python2-pyzmq
4968 (package-with-python2 python-pyzmq))
d889e6c4
CR
4969
4970(define-public python-pep8
4971 (package
4972 (name "python-pep8")
4973 (version "1.6.2")
4974 (source
4975 (origin
4976 (method url-fetch)
4977 (uri (string-append
4978 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4979 version
4980 ".tar.gz"))
4981 (sha256
4982 (base32
4983 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4984 (build-system python-build-system)
4985 (inputs
4986 `(("python-setuptools" ,python-setuptools)))
4987 (home-page "http://pep8.readthedocs.org/")
4988 (synopsis "Python style guide checker")
4989 (description
4990 "This tools checks Python code against some of the style conventions in
4991PEP 8.")
4992 (license license:expat)))
4993
4994(define-public python2-pep8
4995 (package-with-python2 python-pep8))
e31d7f44
CR
4996
4997(define-public python-pyflakes
4998 (package
4999 (name "python-pyflakes")
5000 (version "0.9.2")
5001 (source
5002 (origin
5003 (method url-fetch)
5004 (uri (string-append
5005 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5006 version
5007 ".tar.gz"))
5008 (sha256
5009 (base32
5010 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
5011 (build-system python-build-system)
5012 (inputs
5013 `(("python-setuptools" ,python-setuptools)))
5014 (home-page
5015 "https://github.com/pyflakes/pyflakes")
5016 (synopsis "Passive checker of Python programs")
5017 (description
5018 "Pyflakes statically checks Python source code for common errors.")
5019 (license license:expat)))
a59e017c 5020
7261d9eb
CR
5021(define-public python2-pyflakes
5022 (package-with-python2 python-pyflakes))
5023
a59e017c
CR
5024(define-public python-mccabe
5025 (package
5026 (name "python-mccabe")
5027 (version "0.3.1")
5028 (source
5029 (origin
5030 (method url-fetch)
5031 (uri (string-append
5032 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5033 version
5034 ".tar.gz"))
5035 (sha256
5036 (base32
5037 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5038 (build-system python-build-system)
5039 (inputs
5040 `(("python-setuptools" ,python-setuptools)))
5041 (home-page "https://github.com/flintwork/mccabe")
5042 (synopsis "McCabe checker, plugin for flake8")
5043 (description
5044 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5045complexity of Python source code.")
7362371d 5046 (license license:expat)))
a59e017c
CR
5047
5048(define-public python2-mccabe
5049 (package-with-python2 python-mccabe))
e8df8f47 5050
7477fbb1
CR
5051(define-public python-mccabe-0.2.1
5052 (package (inherit python-mccabe)
5053 (version "0.2.1")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "mccabe" version))
5058 (sha256
5059 (base32
5060 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5061
5062(define-public python2-mccabe-0.2.1
5063 (package-with-python2 python-mccabe-0.2.1))
5064
e8df8f47
CR
5065;; Flake8 2.4.1 requires an older version of pep8.
5066;; This should be removed ASAP.
5067(define-public python-pep8-1.5.7
5068 (package (inherit python-pep8)
5069 (version "1.5.7")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (string-append
5074 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5075 version
5076 ".tar.gz"))
5077 (sha256
5078 (base32
5079 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5080
5081(define-public python2-pep8-1.5.7
5082 (package-with-python2 python-pep8-1.5.7))
5083
5084;; Flake8 2.4.1 requires an older version of pyflakes.
5085;; This should be removed ASAP.
5086(define-public python-pyflakes-0.8.1
5087 (package (inherit python-pyflakes)
5088 (version "0.8.1")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (string-append
5093 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5094 version
5095 ".tar.gz"))
5096 (sha256
5097 (base32
5098 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5099
5100(define-public python2-pyflakes-0.8.1
7261d9eb 5101 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5102
5103(define-public python-flake8
5104 (package
5105 (name "python-flake8")
5106 (version "2.4.1")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (string-append
5111 "https://pypi.python.org/packages/source/f/flake8/flake8-"
5112 version
5113 ".tar.gz"))
5114 (sha256
5115 (base32
5116 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
5117 (build-system python-build-system)
5118 (inputs
5119 `(("python-setuptools" ,python-setuptools)
5120 ("python-pep8" ,python-pep8-1.5.7)
5121 ("python-pyflakes" ,python-pyflakes-0.8.1)
5122 ("python-mccabe" ,python-mccabe)
5123 ("python-mock" ,python-mock)
5124 ("python-nose" ,python-nose)))
5125 (home-page "https://gitlab.com/pycqa/flake8")
5126 (synopsis
5127 "The modular source code checker: pep8, pyflakes and co")
5128 (description
5129 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5130 (license license:expat)))
5131
5132(define-public python2-flake8
5133 (package-with-python2 python-flake8))
61b9ac53 5134
abf21efc
CR
5135;; This will only be needed by the python-hacking package and will not be
5136;; necessary once python-hacking > 0.10.2 is released.
5137(define-public python-flake8-2.2.4
5138 (package (inherit python-flake8)
5139 (inputs
5140 `(("python-setuptools" ,python-setuptools)
5141 ("python-pep8" ,python-pep8-1.5.7)
5142 ("python-pyflakes" ,python-pyflakes-0.8.1)
5143 ("python-mccabe" ,python-mccabe-0.2.1)
5144 ("python-mock" ,python-mock)
5145 ("python-nose" ,python-nose)))
5146 (version "2.2.4")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "flake8" version))
5151 (sha256
5152 (base32
5153 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5154
5155(define-public python2-flake8-2.2.4
5156 (package-with-python2 python-flake8-2.2.4))
5157
61b9ac53
FB
5158(define-public python-mistune
5159 (package
5160 (name "python-mistune")
5161 (version "0.7")
5162 (source
5163 (origin
5164 (method url-fetch)
5165 (uri (string-append
5166 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5167 version
5168 ".tar.gz"))
5169 (sha256
5170 (base32
5171 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5172 (build-system python-build-system)
5173 (inputs
5174 `(("python-setuptools" ,python-setuptools)
5175 ("python-nose" ,python-nose)
5176 ("python-cython" ,python-cython)))
5177 (home-page "https://github.com/lepture/mistune")
5178 (synopsis "Markdown parser in pure Python")
5179 (description "This package provides a fast markdown parser in pure
5180Python.")
5181 (license bsd-3)))
5182
5183(define-public python2-mistune
5184 (package-with-python2 python-mistune))
6d992d07
FB
5185
5186(define-public python-ptyprocess
5187 (package
5188 (name "python-ptyprocess")
5189 (version "0.5")
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (string-append
5194 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5195 version ".tar.gz"))
5196 (sha256
5197 (base32
5198 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5199 (build-system python-build-system)
5200 (inputs
5201 `(("python-setuptools" ,python-setuptools)
5202 ("python-nose" ,python-nose)))
5203 (arguments
5204 `(#:phases
5205 (modify-phases %standard-phases
5206 (replace 'check
5207 (lambda _
5208 (zero? (system* "nosetests")))))))
5209 (home-page "https://github.com/pexpect/ptyprocess")
5210 (synopsis "Run a subprocess in a pseudo terminal")
5211 (description
5212 "This package provides a Python library used to launch a subprocess in a
5213pseudo terminal (pty), and interact with both the process and its pty.")
5214 (license isc)))
5215
5216(define-public python2-ptyprocess
5217 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5218
5219(define-public python-terminado
5220 (package
5221 (name "python-terminado")
5222 (version "0.5")
5223 (source
5224 (origin
5225 (method url-fetch)
5226 (uri (string-append
5227 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5228 version ".tar.gz"))
5229 (sha256
5230 (base32
5231 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5232 (build-system python-build-system)
5233 (propagated-inputs
5234 `(("python-tornado" ,python-tornado)
5235 ("python-ptyprocess" ,python-ptyprocess)))
5236 (inputs
5237 `(("python-setuptools" ,python-setuptools)
5238 ("python-nose" ,python-nose)))
5239 (arguments
5240 `(#:phases
5241 (modify-phases %standard-phases
5242 (replace 'check
5243 (lambda _
5244 (zero? (system* "nosetests")))))))
5245 (home-page "https://github.com/takluyver/terminado")
5246 (synopsis "Terminals served to term.js using Tornado websockets")
5247 (description "This package provides a Tornado websocket backend for the
5248term.js Javascript terminal emulator library.")
5249 (license bsd-2)))
5250
5251(define-public python2-terminado
5252 (let ((terminado (package-with-python2 python-terminado)))
5253 (package (inherit terminado)
5254 (propagated-inputs
5255 `(("python2-tornado" ,python2-tornado)
5256 ("python2-backport-ssl-match-hostname"
5257 ,python2-backport-ssl-match-hostname)
5258 ,@(alist-delete "python-tornado"
5259 (package-propagated-inputs terminado)))))))
5faa5ce4 5260
d582eaac
SB
5261(define-public python-fonttools
5262 (package
5263 (name "python-fonttools")
5264 (version "2.5")
5265 (source (origin
5266 (method url-fetch)
5267 (uri (string-append
5268 "https://pypi.python.org/packages/source/F/FontTools/"
5269 "fonttools-" version ".tar.gz"))
5270 (sha256
5271 (base32
5272 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5273 (build-system python-build-system)
5274 (arguments '(#:test-target "check"))
5275 (propagated-inputs
5276 ;; XXX: module not found if setuptools is not available.
5277 `(("python-setuptools" ,python-setuptools)))
5278 (home-page "http://github.com/behdad/fonttools")
5279 (synopsis "Tools to manipulate font files")
5280 (description
5281 "FontTools/TTX is a library to manipulate font files from Python. It
5282supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5283of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5284also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5285from an XML-based format.")
5286 (license (non-copyleft "file://LICENSE.txt"
5287 "See LICENSE.txt in the distribution."))))
5288
5289(define-public python2-fonttools
5290 (package-with-python2 python-fonttools))
75710da6 5291
5faa5ce4
RW
5292(define-public python-ly
5293 (package
5294 (name "python-ly")
5295 (version "0.9.2")
5296 (source
5297 (origin
5298 (method url-fetch)
5299 (uri (string-append
5300 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5301 version ".tar.gz"))
5302 (sha256
5303 (base32
5304 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5305 (build-system python-build-system)
5306 (native-inputs
5307 `(("python-setuptools" ,python-setuptools)))
5308 (synopsis "Tool and library for manipulating LilyPond files")
5309 (description "This package provides a Python library to parse, manipulate
5310or create documents in LilyPond format. A command line program ly is also
5311provided that can be used to do various manipulations with LilyPond files.")
5312 (home-page "https://pypi.python.org/pypi/python-ly")
5313 (license gpl2+)))
7e7b27d9
CR
5314
5315(define-public python-appdirs
5316 (package
5317 (name "python-appdirs")
5318 (version "1.4.0")
5319 (source
5320 (origin
5321 (method url-fetch)
5322 (uri (string-append
5323 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5324 version
5325 ".tar.gz"))
5326 (sha256
5327 (base32
5328 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5329 (build-system python-build-system)
5330 (inputs
5331 `(("python-setuptools" ,python-setuptools)))
5332 (home-page "http://github.com/ActiveState/appdirs")
5333 (synopsis
5334 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5335 (description
5336 "This module provides a portable way of finding out where user data
5337should be stored on various operating systems.")
5338 (license license:expat)))
5339
5340(define-public python2-appdirs
5341 (package-with-python2 python-appdirs))
89b2e0b0
LF
5342
5343(define-public python-llfuse
5344 (package
5345 (name "python-llfuse")
5346 (version "0.41")
5347 (source (origin
5348 (method url-fetch)
5349 (uri (string-append
5350 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5351 "llfuse-" version ".tar.bz2"))
5352 (sha256
5353 (base32
5354 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5355 (build-system python-build-system)
5356 (inputs
5357 `(("fuse" ,fuse)
5358 ("attr" ,attr)))
5359 (native-inputs
5360 `(("pkg-config" ,pkg-config)
5361 ("python-setuptools" ,python-setuptools)))
5362 (synopsis "Python bindings for FUSE")
5363 (description
5364 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5365 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5366 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5367 ;; The rest of the package is licensed under LGPL2.0 or later.
5368 (license (list license:expat lgpl2.0+))))
5369
5370(define-public python2-llfuse
5371 (package-with-python2 python-llfuse))
641c9871
LF
5372
5373(define-public python-msgpack
5374 (package
5375 (name "python-msgpack")
5376 (version "0.4.6")
5377 (source (origin
5378 (method url-fetch)
5379 (uri (string-append
5380 "https://pypi.python.org/packages/source/m/"
5381 "msgpack-python/msgpack-python-" version ".tar.gz"))
5382 (sha256
5383 (base32
5384 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5385 (build-system python-build-system)
5386 (native-inputs
5387 `(("python-setuptools" ,python-setuptools)))
5388 (synopsis "MessagePack (de)serializer")
5389 (description "MessagePack is a fast, compact binary serialization format,
5390suitable for similar data to JSON. This package provides CPython bindings for
5391reading and writing MessagePack data.")
5392 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5393 (license asl2.0)))
5394
5395(define-public python2-msgpack
5396 (package-with-python2 python-msgpack))
6e5e39f4
CR
5397
5398(define-public python-netaddr
5399 (package
5400 (name "python-netaddr")
5401 (version "0.7.18")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (string-append
5406 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5407 version
5408 ".tar.gz"))
5409 (sha256
5410 (base32
5411 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5412 (build-system python-build-system)
5413 (arguments `(#:tests? #f)) ;; No tests.
5414 (inputs
5415 `(("python-setuptools" ,python-setuptools)))
5416 (home-page "https://github.com/drkjam/netaddr/")
5417 (synopsis "Pythonic manipulation of network addresses")
5418 (description
5419 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5420and MAC network addresses.")
5421 (license bsd-3)))
5422
5423(define-public python2-netaddr
5424 (package-with-python2 python-netaddr))
8c692a52
CR
5425
5426(define-public python-wrapt
5427 (package
5428 (name "python-wrapt")
5429 (version "1.10.5")
5430 (source
5431 (origin
5432 (method url-fetch)
5433 (uri (string-append
5434 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5435 version
5436 ".tar.gz"))
5437 (sha256
5438 (base32
5439 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5440 (build-system python-build-system)
5441 (arguments
5442 ;; Tests are not included in the tarball, they are only available in the
5443 ;; git repository.
5444 `(#:tests? #f))
5445 (inputs
5446 `(("python-setuptools" ,python-setuptools)))
5447 (home-page "https://github.com/GrahamDumpleton/wrapt")
5448 (synopsis "Module for decorators, wrappers and monkey patching")
5449 (description
5450 "The aim of the wrapt module is to provide a transparent object proxy for
5451 Python, which can be used as the basis for the construction of function
5452 wrappers and decorator functions.")
5453 (license bsd-2)))
5454
5455(define-public python2-wrapt
5456 (package-with-python2 python-wrapt))
b85c85be
CR
5457
5458(define-public python-iso8601
5459 (package
5460 (name "python-iso8601")
5461 (version "0.1.10")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (string-append
5466 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5467 version
5468 ".tar.gz"))
5469 (sha256
5470 (base32
5471 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5472 (build-system python-build-system)
5473 (inputs
5474 `(("python-setuptools" ,python-setuptools)))
5475 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5476 (synopsis "Module to parse ISO 8601 dates")
5477 (description
5478 "This module parses the most common forms of ISO 8601 date strings (e.g.
5479@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5480 (license license:expat)))
5481
5482(define-public python2-iso8601
5483 (package-with-python2 python-iso8601))
5e412b63
CR
5484
5485(define-public python-monotonic
5486 (package
5487 (name "python-monotonic")
5488 (version "0.3")
5489 (source
5490 (origin
5491 (method url-fetch)
5492 (uri (string-append
5493 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5494 version
5495 ".tar.gz"))
5496 (sha256
5497 (base32
5498 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5499 (build-system python-build-system)
5500 (inputs
5501 `(("python-setuptools" ,python-setuptools)))
5502 (home-page "https://github.com/atdt/monotonic")
5503 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5504 (description
5505 "This module provides a monotonic() function which returns the value (in
5506fractional seconds) of a clock which never goes backwards.")
5507 (license asl2.0)))
5508
5509(define-public python2-monotonic
5510 (package-with-python2 python-monotonic))
de34afac
CR
5511
5512(define-public python-webob
5513 (package
5514 (name "python-webob")
5515 (version "1.5.0b0")
5516 (source
5517 (origin
5518 (method url-fetch)
5519 (uri (string-append
5520 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
5521 version ".tar.gz"))
5522 (sha256
5523 (base32
5524 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
5525 (build-system python-build-system)
5526 (inputs
5527 `(("python-nose" ,python-nose)
5528 ("python-setuptools" ,python-setuptools)))
5529 (home-page "http://webob.org/")
5530 (synopsis "WSGI request and response object")
5531 (description
5532 "WebOb provides wrappers around the WSGI request environment, and an
5533object to help create WSGI responses.")
5534 (license license:expat)))
5535
5536(define-public python2-webob
5537 (package-with-python2 python-webob))
350ba0a3 5538
02a8a187
BW
5539(define-public python-xlrd
5540 (package
5541 (name "python-xlrd")
5542 (version "0.9.4")
5543 (source (origin
5544 (method url-fetch)
5545 (uri (string-append "https://pypi.python.org/packages/source/x/"
5546 "xlrd/xlrd-" version ".tar.gz"))
5547 (sha256
5548 (base32
5549 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5550 (build-system python-build-system)
5551 (arguments
5552 `(#:phases
5553 (modify-phases %standard-phases
5554 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5555 ;; run tests instead for now.
5556 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5557 (native-inputs `(("python-nose" ,python-nose)
5558 ("python-setuptools" ,python-setuptools)))
5559 (home-page "http://www.python-excel.org/")
5560 (synopsis "Library for extracting data from Excel files")
5561 (description "This packages provides a library to extract data from
5562spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5563@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5564Unicode-aware. It is not intended as an end-user tool.")
5565 (license bsd-3)))
5566
5567(define-public python2-xlrd
5568 (package-with-python2 python-xlrd))
5569
350ba0a3
CR
5570(define-public python-prettytable
5571 (package
5572 (name "python-prettytable")
5573 (version "0.7.2")
5574 (source
5575 (origin
5576 (method url-fetch)
5577 (uri (string-append
5578 "https://pypi.python.org/packages/source/P/PrettyTable/"
5579 "prettytable-" version ".tar.bz2"))
5580 (sha256
5581 (base32
5582 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5583 (build-system python-build-system)
5584 (inputs
5585 `(("python-setuptools" ,python-setuptools)))
5586 (home-page "http://code.google.com/p/prettytable/")
5587 (synopsis "Display tabular data in an ASCII table format")
5588 (description
5589 "A library designed to represent tabular data in visually appealing ASCII
5590tables. PrettyTable allows for selection of which columns are to be printed,
5591independent alignment of columns (left or right justified or centred) and
5592printing of sub-tables by specifying a row range.")
5593 (license bsd-3)))
5594
5595(define-public python2-prettytable
5596 (package-with-python2 python-prettytable))
7a8ac75a
RW
5597
5598(define-public python-pyasn1
5599 (package
5600 (name "python-pyasn1")
5601 (version "0.1.8")
5602 (source
5603 (origin
5604 (method url-fetch)
5605 (uri (string-append "https://pypi.python.org/packages/source/p/"
5606 "pyasn1/pyasn1-" version ".tar.gz"))
5607 (sha256
5608 (base32
5609 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5610 (build-system python-build-system)
5611 (home-page "http://pyasn1.sourceforge.net/")
5612 (synopsis "ASN.1 types and codecs")
5613 (description
5614 "This is an implementation of ASN.1 types and codecs in Python. It is
5615suitable for a wide range of protocols based on the ASN.1 specification.")
5616 (license bsd-2)))
5617
5618(define-public python2-pyasn1
5619 (package-with-python2 python-pyasn1))
9a49a535
RW
5620
5621(define-public python2-ipaddress
5622 (package
5623 (name "python2-ipaddress")
5624 (version "1.0.14")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (string-append "https://pypi.python.org/packages/source/i/"
5629 "ipaddress/ipaddress-" version ".tar.gz"))
5630 (sha256
5631 (base32
5632 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5633 (build-system python-build-system)
5634 (arguments
5635 `(#:tests? #f ; no tests
5636 #:python ,python-2))
5637 (home-page "https://github.com/phihag/ipaddress")
5638 (synopsis "IP address manipulation library")
5639 (description
5640 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5641in Python. This library is used to create, poke at, and manipulate IPv4 and
5642IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5643module to older versions of Python.")
5644 (license psfl)))
3f00e078
RW
5645
5646(define-public python-idna
5647 (package
5648 (name "python-idna")
5649 (version "2.0")
5650 (source
5651 (origin
5652 (method url-fetch)
5653 (uri (string-append "https://pypi.python.org/packages/source/i/"
5654 "idna/idna-" version ".tar.gz"))
5655 (sha256
5656 (base32
5657 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5658 (build-system python-build-system)
5659 (native-inputs
5660 `(("python-setuptools" ,python-setuptools)))
5661 (home-page "https://github.com/kjd/idna")
5662 (synopsis "Internationalized domain names in applications")
5663 (description
5664 "This is a library to support the Internationalised Domain Names in
5665Applications (IDNA) protocol as specified in RFC 5891. This version of the
5666protocol is often referred to as “IDNA2008” and can produce different results
5667from the earlier standard from 2003. The library is also intended to act as a
5668suitable drop-in replacement for the “encodings.idna” module that comes with
5669the Python standard library but currently only supports the older 2003
5670specification.")
5671 (license bsd-4)))
5672
5673(define-public python2-idna
5674 (package-with-python2 python-idna))
36ebf972
RW
5675
5676(define-public python-pretend
5677 (package
5678 (name "python-pretend")
5679 (version "1.0.8")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (string-append "https://pypi.python.org/packages/source/p/"
5684 "pretend/pretend-" version ".tar.gz"))
5685 (sha256
5686 (base32
5687 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5688 (build-system python-build-system)
5689 (native-inputs
5690 `(("python-setuptools" ,python-setuptools)))
5691 (home-page "https://github.com/alex/pretend")
5692 (synopsis "Library for stubbing in Python")
5693 (description
5694 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5695technique for writing tests. You may hear the term mixed up with mocks,
5696fakes, or doubles. Basically, a stub is an object that returns pre-canned
5697responses, rather than doing any computation.")
5698 (license bsd-3)))
5699
5700(define-public python2-pretend
5701 (package-with-python2 python-pretend))
aa759a51
RW
5702
5703(define-public python-cryptography-vectors
5704 (package
5705 (name "python-cryptography-vectors")
3698a775 5706 (version "1.0.2")
aa759a51
RW
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (string-append "https://pypi.python.org/packages/source/c/"
5711 "cryptography-vectors/cryptography_vectors-"
5712 version ".tar.gz"))
5713 (sha256
5714 (base32
3698a775 5715 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
aa759a51
RW
5716 (build-system python-build-system)
5717 (native-inputs
5718 `(("python-setuptools" ,python-setuptools)))
5719 (home-page "https://github.com/pyca/cryptography")
5720 (synopsis "Test vectors for the cryptography package.")
5721 (description
5722 "This package contains test vectors for the cryptography package.")
5723 ;; Distributed under either BSD-3 or ASL2.0
5724 (license (list bsd-3 asl2.0))))
5725
5726(define-public python2-cryptography-vectors
5727 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5728
5729(define-public python-cryptography
5730 (package
5731 (name "python-cryptography")
7f51b663 5732 (version "1.0.2")
88b47cb0
RW
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (string-append "https://pypi.python.org/packages/source/c/"
5737 "cryptography/cryptography-" version ".tar.gz"))
5738 (sha256
5739 (base32
7f51b663 5740 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
88b47cb0
RW
5741 (build-system python-build-system)
5742 (inputs
5743 `(("openssl" ,openssl)))
5744 (propagated-inputs
5745 `(("python-cffi" ,python-cffi)
5746 ("python-six" ,python-six)
5747 ("python-pyasn1" ,python-pyasn1)
5748 ("python-enum34" ,python-enum34)
5749 ("python-idna" ,python-idna)
5750 ("python-iso8601" ,python-iso8601)))
5751 (native-inputs
5752 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5753 ("python-setuptools" ,python-setuptools)
5754 ("python-pretend" ,python-pretend)
5755 ("python-pytest" ,python-pytest)))
5756 (home-page "https://github.com/pyca/cryptography")
5757 (synopsis "Cryptographic recipes and primitives for Python")
5758 (description
5759 "cryptography is a package which provides cryptographic recipes and
5760primitives to Python developers. It aims to be the “cryptographic standard
5761library” for Python. The package includes both high level recipes, and low
5762level interfaces to common cryptographic algorithms such as symmetric ciphers,
5763message digests and key derivation functions.")
5764 ;; Distributed under either BSD-3 or ASL2.0
5765 (license (list bsd-3 asl2.0))))
5766
5767(define-public python2-cryptography
5768 (let ((crypto (package-with-python2 python-cryptography)))
5769 (package (inherit crypto)
5770 (propagated-inputs
5771 `(("python2-ipaddress" ,python2-ipaddress)
5772 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5773
5774(define-public python-pyopenssl
5775 (package
5776 (name "python-pyopenssl")
5777 (version "0.15.1")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (string-append "https://pypi.python.org/packages/source/p/"
5782 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5783 (sha256
5784 (base32
5785 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5786 (build-system python-build-system)
5787 (arguments
5788 `(#:phases
5789 (modify-phases %standard-phases
5790 (add-after 'unpack 'fix-tests
5791 (lambda* (#:key inputs #:allow-other-keys)
5792 (substitute* "OpenSSL/test/test_ssl.py"
5793 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5794 "return True")
5795 ;; FIXME: disable broken test
5796 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5797 (substitute* "OpenSSL/test/test_crypto.py"
5798 (("command = b\"openssl \"")
5799 (string-append "command = b\""
5800 (assoc-ref inputs "openssl")
5801 "/bin/openssl" " \""))
5802 ;; FIXME: disable four broken tests
5803 (("test_der") "disabled__der")
5804 (("test_digest") "disabled__digest")
5805 (("test_get_extension") "disabled__get_extension")
5806 (("test_extension_count") "disabled__extension_count"))
5807 #t)))))
5808 (propagated-inputs
5809 `(("python-cryptography" ,python-cryptography)
5810 ("python-six" ,python-six)))
5811 (inputs
5812 `(("openssl" ,openssl)))
5813 (native-inputs
5814 `(("python-setuptools" ,python-setuptools)))
5815 (home-page "https://github.com/pyca/pyopenssl")
5816 (synopsis "Python wrapper module around the OpenSSL library")
5817 (description
5818 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5819library.")
5820 (license asl2.0)))
5821
5822(define-public python2-pyopenssl
5823 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5824 (package (inherit pyopenssl)
5825 (propagated-inputs
5826 `(("python2-cryptography" ,python2-cryptography)
5827 ,@(alist-delete "python-cryptography"
5828 (package-propagated-inputs pyopenssl)))))))
643725a1
CR
5829
5830(define-public python-pip
5831 (package
5832 (name "python-pip")
5833 (version "7.1.2")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (string-append
5838 "https://pypi.python.org/packages/source/p/pip/pip-"
5839 version ".tar.gz"))
5840 (sha256
5841 (base32
5842 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5843 (build-system python-build-system)
5844 (inputs
5845 `(("python-setuptools" ,python-setuptools)
5846 ("python-virtualenv" ,python-virtualenv)
5847 ;; Tests
5848 ("python-mock" ,python-mock)
5849 ("python-pytest" ,python-pytest)
5850 ("python-scripttest" ,python-scripttest)))
5851 (home-page "https://pip.pypa.io/")
5852 (synopsis
5853 "Package manager for Python software")
5854 (description
5855 "Pip is a package manager for Python software, that finds packages on the
5856Python Package Index (PyPI).")
5857 (license license:expat)))
5858
5859(define-public python2-pip
5860 (package-with-python2 python-pip))
d8c4998f
LC
5861
5862(define-public python-tlsh
5863 (package
5864 (name "python-tlsh")
5865 (version "3.4.1") ;according to CMakeLists.txt
5866 (home-page "https://github.com/trendmicro/tlsh")
5867 (source (origin
5868 (method git-fetch)
5869 (uri (git-reference
5870 (url home-page)
5871 ;; This is a commit right after 3.4.1; see
5872 ;; <https://github.com/trendmicro/tlsh/issues/9>.
5873 (commit "3ae3f1f")))
5874 (sha256
5875 (base32
5876 "12cvnr5ndm5cg6i7lch93id90kgwgrigjgrj8f186nh3h4bf9chj"))
5877 (file-name (string-append name "-" version "-checkout"))))
5878 (build-system cmake-build-system)
5879 (arguments
5880 '(#:out-of-source? #f
5881 #:phases (modify-phases %standard-phases
5882 (replace
5883 'install
5884 (lambda* (#:key outputs #:allow-other-keys)
5885 ;; Build and install the Python bindings. The underlying
5886 ;; C++ library is apparently not meant to be installed.
5887 (let ((out (assoc-ref outputs "out")))
5888 (with-directory-excursion "py_ext"
5889 (and (system* "python" "setup.py" "build")
5890 (system* "python" "setup.py" "install"
5891 (string-append "--prefix=" out))))))))))
5892 (inputs `(("python" ,python-wrapper))) ;for the bindings
5893 (synopsis "Fuzzy matching library for Python")
5894 (description
5895 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5896Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5897value which can be used for similarity comparisons. Similar objects have
5898similar hash values, which allows for the detection of similar objects by
5899comparing their hash values. The byte stream should have a sufficient amount
5900of complexity; for example, a byte stream of identical bytes will not generate
5901a hash value.")
5902 (license asl2.0)))
5903
5904(define-public python2-tlsh
5905 (package
5906 (inherit python-tlsh)
5907 (name "python2-tlsh")
5908 (inputs `(("python" ,python-2)))))
d96034ed
LC
5909
5910(define-public python-libarchive-c
5911 (package
5912 (name "python-libarchive-c")
5913 (version "2.1")
5914 (source (origin
5915 (method url-fetch)
5916 (uri (string-append
5917 "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-"
5918 version ".tar.gz"))
5919 (sha256
5920 (base32
5921 "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n"))))
5922 (build-system python-build-system)
5923 (arguments
5924 '(#:phases (modify-phases %standard-phases
5925 (add-before
5926 'build 'reference-libarchive
5927 (lambda* (#:key inputs #:allow-other-keys)
5928 ;; Retain the absolute file name of libarchive.so.
5929 (let ((libarchive (assoc-ref inputs "libarchive")))
5930 (substitute* "libarchive/ffi.py"
5931 (("find_library\\('archive'\\)")
5932 (string-append "'" libarchive
5933 "/lib/libarchive.so'"))))
5934
5935 ;; Do not make a compressed egg (see
5936 ;; <http://bugs.gnu.org/20765>).
5937 (let ((port (open-file "setup.cfg" "a")))
5938 (display "\n[easy_install]\nzip_ok = 0\n"
5939 port)
5940 (close-port port)
5941 #t))))))
5942 (inputs
5943 `(("python-setuptools" ,python-setuptools)
5944 ("libarchive" ,libarchive)))
5945 (home-page "https://github.com/Changaco/python-libarchive-c")
5946 (synopsis "Python interface to libarchive")
5947 (description
5948 "This package provides Python bindings to libarchive, a C library to
5949access possibly compressed archives in many different formats. It uses
5950Python's @code{ctypes} foreign function interface (FFI).")
5951 (license lgpl2.0+)))
5952
5953(define-public python2-libarchive-c
5954 (package-with-python2 python-libarchive-c))
5e1c9367
LC
5955
5956(define-public python-file
5957 (package
5958 (inherit file)
5959 (name "python-file")
5960 (build-system python-build-system)
5961 (arguments
5962 '(#:tests? #f ;no tests
5963 #:phases (modify-phases %standard-phases
5964 (add-before 'build 'change-directory
5965 (lambda _
5966 (chdir "python")
5967 #t))
5968 (add-before 'build 'set-library-file-name
5969 (lambda* (#:key inputs #:allow-other-keys)
5970 (let ((file (assoc-ref inputs "file")))
5971 (substitute* "magic.py"
5972 (("find_library\\('magic'\\)")
5973 (string-append "'" file "/lib/libmagic.so'")))
5974 #t))))))
5975 (inputs `(("file" ,file)))
5976 (self-native-input? #f)
5977 (synopsis "Python bindings to the libmagic file type guesser")))
5978
5979(define-public python2-file
5980 (package-with-python2 python-file))
85d4aeac
LC
5981
5982(define-public python-debian
5983 (package
5984 (name "python-debian")
5985 (version "0.1.23")
5986 (source
5987 (origin
5988 (method url-fetch)
5989 (uri (string-append
5990 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
5991 version ".tar.gz"))
5992 (sha256
5993 (base32
5994 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
5995 (build-system python-build-system)
5996 (inputs
5997 `(("python-six" ,python-six)))
5998 (native-inputs
5999 `(("python-setuptools" ,python-setuptools)))
6000 (home-page "http://packages.debian.org/sid/python-debian")
6001 (synopsis "Debian package related modules")
6002 (description
5c7bdc9a
LC
6003 ;; XXX: Use @enumerate instead of @itemize to work around
6004 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6005 "This package provides Python modules that abstract many formats of
6006Debian-related files, such as:
6007
5c7bdc9a 6008@enumerate
85d4aeac
LC
6009@item Debtags information;
6010@item @file{debian/changelog} files;
6011@item packages files, pdiffs;
6012@item control files of single or multiple RFC822-style paragraphs---e.g.
6013 @file{debian/control}, @file{.changes}, @file{.dsc};
6014@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6015 contained files and meta-information.
5c7bdc9a 6016@end enumerate\n")
85d4aeac
LC
6017
6018 ;; Modules are either GPLv2+ or GPLv3+.
6019 (license gpl3+)))
6020
6021(define-public python2-debian
6022 (package-with-python2 python-debian))
816a6538
LC
6023
6024(define-public python-chardet
6025 (package
6026 (name "python-chardet")
6027 (version "2.3.0")
6028 (source
6029 (origin
6030 (method url-fetch)
6031 (uri (string-append
6032 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6033 version
6034 ".tar.gz"))
6035 (sha256
6036 (base32
6037 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6038 (build-system python-build-system)
6039 (native-inputs
6040 `(("python-setuptools" ,python-setuptools)))
6041 (home-page "https://github.com/chardet/chardet")
6042 (synopsis "Universal encoding detector for Python 2 and 3")
6043 (description
6044 "This package provides @code{chardet}, a Python module that can
6045automatically detect a wide range of file encodings.")
6046 (license lgpl2.1+)))
6047
6048(define-public python2-chardet
6049 (package-with-python2 python-chardet))
2fc5f186 6050
1872f1bb
KM
6051(define-public python-docopt
6052 (package
6053 (name "python-docopt")
6054 (version "0.6.2")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 ;; The release on PyPI does not include tests.
6059 (uri (string-append
6060 "https://github.com/docopt/docopt/archive/"
6061 version ".tar.gz"))
6062 (file-name (string-append name "-" version ".tar.gz"))
6063 (sha256
6064 (base32
6065 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6066 (build-system python-build-system)
6067 (native-inputs
6068 `(("python-pytest" ,python-pytest)
6069 ("python-setuptools" ,python-setuptools)))
6070 (arguments
6071 `(#:phases (alist-replace
6072 'check
6073 (lambda _ (zero? (system* "py.test")))
6074 %standard-phases)))
6075 (home-page "http://docopt.org")
6076 (synopsis "Command-line interface description language for Python")
6077 (description "This library allows the user to define a command-line
6078interface from a program's help message rather than specifying it
6079programatically with command-line parsers like @code{getopt} and
6080@code{argparse}.")
6081 (license license:expat)))
6082
6083(define-public python2-docopt
6084 (package-with-python2 python-docopt))
6085
2fc5f186
LF
6086(define-public python-zope-event
6087 (package
6088 (name "python-zope-event")
6089 (version "4.1.0")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (string-append "https://pypi.python.org/packages/source/z"
6094 "/zope.event/zope.event-" version ".tar.gz"))
6095 (sha256
6096 (base32
6097 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6098 (build-system python-build-system)
6099 (inputs
6100 `(("python-setuptools" ,python-setuptools)))
6101 (home-page "http://pypi.python.org/pypi/zope.event")
6102 (synopsis "Event publishing system for Python")
6103 (description "Zope.event provides an event publishing API, intended for
6104use by applications which are unaware of any subscribers to their events. It
6105is a simple event-dispatching system on which more sophisticated event
6106dispatching systems can be built.")
6107 (license zpl2.1)))
6108
6109(define-public python2-zope-event
6110 (package-with-python2 python-zope-event))
97abe268
LF
6111
6112(define-public python-zope-interface
6113 (package
6114 (name "python-zope-interface")
6115 (version "4.1.3")
6116 (source
6117 (origin
6118 (method url-fetch)
6119 (uri (string-append "https://pypi.python.org/packages/source/z"
6120 "/zope.interface/zope.interface-" version ".tar.gz"))
6121 (sha256
6122 (base32
6123 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6124 (build-system python-build-system)
6125 (propagated-inputs
6126 `(("python-zope-event" ,python-zope-event)))
6127 (home-page "https://github.com/zopefoundation/zope.interface")
6128 (synopsis "Python implementation of the \"design by contract\"
6129methodology")
6130 (description "Zope.interface provides an implementation of \"object
6131interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6132conforming to a given API or contract.")
6133 (license zpl2.1)))
6134
6135(define-public python2-zope-interface
6136 (package-with-python2 python-zope-interface))
81f2373c
LF
6137
6138(define-public python-zope-exceptions
6139 (package
6140 (name "python-zope-exceptions")
6141 (version "4.0.8")
6142 (source
6143 (origin
6144 (method url-fetch)
6145 (uri (string-append "https://pypi.python.org/packages/source/z"
6146 "/zope.exceptions/zope.exceptions-"
6147 version ".tar.gz"))
6148 (sha256
6149 (base32
6150 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6151 (build-system python-build-system)
6152 (arguments
6153 '(#:tests? #f)) ; circular dependency with zope.testrunner
6154 (propagated-inputs
6155 `(("python-zope-interface" ,python-zope-interface)))
6156 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6157 (synopsis "Zope exceptions")
6158 (description "Zope.exceptions provides general-purpose exception types
6159that have uses outside of the Zope framework.")
6160 (license zpl2.1)))
6161
6162(define-public python2-zope-exceptions
6163 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6164
6165(define-public python-zope-testing
6166 (package
6167 (name "python-zope-testing")
6168 (version "4.5.0")
6169 (source
6170 (origin
6171 (method url-fetch)
6172 (uri (string-append "https://pypi.python.org/packages/source/z"
6173 "/zope.testing/zope.testing-" version ".tar.gz"))
6174 (sha256
6175 (base32
6176 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6177 (build-system python-build-system)
6178 (native-inputs
6179 `(("python-zope-exceptions" ,python-zope-exceptions)))
6180 (propagated-inputs
6181 `(("python-zope-interface" ,python-zope-interface)))
6182 (home-page "http://pypi.python.org/pypi/zope.testing")
6183 (synopsis "Zope testing helpers")
6184 (description "Zope.testing provides a number of testing utilities for HTML
6185forms, HTTP servers, regular expressions, and more.")
6186 (license zpl2.1)))
6187
6188(define-public python2-zope-testing
6189 (package-with-python2 python-zope-testing))
01614c4f
LF
6190
6191(define-public python-zope-testrunner
6192 (package
6193 (name "python-zope-testrunner")
6194 (version "4.4.9")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (string-append "https://pypi.python.org/packages/source/z"
6199 "/zope.testrunner/zope.testrunner-"
6200 version ".zip"))
6201 (sha256
6202 (base32
6203 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6204 (build-system python-build-system)
6205 (native-inputs
6206 `(("python-six" ,python-six)
6207 ("python-zope-exceptions" ,python-zope-exceptions)
6208 ("python-zope-testing" ,python-zope-testing)
6209 ("unzip" ,unzip)))
6210 (propagated-inputs
6211 `(("python-zope-interface" ,python-zope-interface)))
6212 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6213 (synopsis "Zope testrunner script")
6214 (description "Zope.testrunner provides a script for running Python
6215tests.")
6216 (license zpl2.1)))
6217
6218(define-public python2-zope-testrunner
6219 (let ((base (package-with-python2 python-zope-testrunner)))
6220 (package
6221 (inherit base)
6222 (native-inputs
6223 (append (package-native-inputs base)
6224 `(("python2-subunit" ,python2-subunit)
6225 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6226
6227(define-public python-zope-i18nmessageid
6228 (package
6229 (name "python-zope-i18nmessageid")
6230 (version "4.0.3")
6231 (source
6232 (origin
6233 (method url-fetch)
6234 (uri (string-append
6235 "https://pypi.python.org/packages/source/z"
6236 "/zope.i18nmessageid/zope.i18nmessageid-"
6237 version ".tar.gz"))
6238 (sha256
6239 (base32
6240 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6241 (build-system python-build-system)
6242 (inputs
6243 `(("python-setuptools" ,python-setuptools)))
6244 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6245 (synopsis "Message identifiers for internationalization")
6246 (description "Zope.i18nmessageid provides facilities for declaring
6247internationalized messages within program source text.")
6248 (license zpl2.1)))
6249
6250(define-public python2-zope-i18nmessageid
6251 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6252
6253(define-public python-zope-schema
6254 (package
6255 (name "python-zope-schema")
6256 (version "4.4.2")
6257 (source
6258 (origin
6259 (method url-fetch)
6260 (uri (string-append "https://pypi.python.org/packages/source/z"
6261 "/zope.schema/zope.schema-" version ".tar.gz"))
6262 (sha256
6263 (base32
6264 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6265 (build-system python-build-system)
6266 (propagated-inputs
6267 `(("python-zope-event" ,python-zope-event)
6268 ("python-zope-interface" ,python-zope-interface)))
6269 (native-inputs
6270 `(("python-zope-testing" ,python-zope-testing)))
6271 (home-page "http://pypi.python.org/pypi/zope.schema")
6272 (synopsis "Zope data schemas")
6273 (description "Zope.scheme provides extensions to zope.interface for
6274defining data schemas.")
6275 (license zpl2.1)))
6276
6277(define-public python2-zope-schema
6278 (package-with-python2 python-zope-schema))
fbac9b17
LF
6279
6280(define-public python-zope-configuration
6281 (package
6282 (name "python-zope-configuration")
6283 (version "4.0.3")
6284 (source (origin
6285 (method url-fetch)
6286 (uri (string-append "https://pypi.python.org/packages/source/z"
6287 "/zope.configuration/zope.configuration-"
6288 version ".tar.gz"))
6289 (sha256
6290 (base32
6291 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6292 (build-system python-build-system)
6293 (propagated-inputs
6294 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6295 ("python-zope-schema" ,python-zope-schema)))
6296 (home-page "http://pypi.python.org/pypi/zope.configuration")
6297 (synopsis "Zope Configuration Markup Language")
6298 (description "Zope.configuration implements ZCML, the Zope Configuration
6299Markup Language.")
6300 (license zpl2.1)))
6301
6302(define-public python2-zope-configuration
6303 (package-with-python2 python-zope-configuration))
2ad52086
LF
6304
6305(define-public python-zope-proxy
6306 (package
6307 (name "python-zope-proxy")
6308 (version "4.1.6")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (string-append "https://pypi.python.org/packages/source/z"
6313 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6314 (sha256
6315 (base32
6316 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6317 (build-system python-build-system)
6318 (propagated-inputs
6319 `(("python-zope-interface" ,python-zope-interface)))
6320 (home-page "http://pypi.python.org/pypi/zope.proxy")
6321 (synopsis "Generic, transparent proxies")
6322 (description "Zope.proxy provides generic, transparent proxies for Python.
6323Proxies are special objects which serve as mostly-transparent wrappers around
6324another object, intervening in the apparent behavior of the wrapped object
6325only when necessary to apply the policy (e.g., access checking, location
6326brokering, etc.) for which the proxy is responsible.")
6327 (license zpl2.1)))
6328
6329(define-public python2-zope-proxy
6330 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6331
6332(define-public python-zope-location
6333 (package
6334 (name "python-zope-location")
6335 (version "4.0.3")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (string-append "https://pypi.python.org/packages/source/z"
6340 "/zope.location/zope.location-" version ".tar.gz"))
6341 (sha256
6342 (base32
6343 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6344 (build-system python-build-system)
6345 (native-inputs
6346 `(("python-zope-proxy" ,python-zope-proxy)
6347 ("python-zope-schema" ,python-zope-schema)))
6348 (home-page "http://pypi.python.org/pypi/zope.location/")
6349 (synopsis "Zope location library")
6350 (description "Zope.location implements the concept of \"locations\" in
6351Zope3, which are are special objects that have a structural location.")
6352 (license zpl2.1)))
6353
6354(define-public python2-zope-location
6355 (package-with-python2 python-zope-location))
d4b77f36
LF
6356
6357(define-public python-zope-security
6358 (package
6359 (name "python-zope-security")
6360 (version "4.0.3")
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (string-append "https://pypi.python.org/packages/source/z"
6365 "/zope.security/zope.security-" version ".tar.gz"))
6366 (sha256
6367 (base32
6368 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6369 (build-system python-build-system)
6370 (propagated-inputs
6371 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6372 ("python-zope-component" ,python-zope-component)
6373 ("python-zope-location" ,python-zope-location)
6374 ("python-zope-proxy" ,python-zope-proxy)
6375 ("python-zope-schema" ,python-zope-schema)
6376 ("python-zope-testrunner" ,python-zope-testrunner)
6377 ("python-zope-testing" ,python-zope-testing)))
6378 (home-page "http://pypi.python.org/pypi/zope.security")
6379 (synopsis "Zope security framework")
6380 (description "Zope.security provides a generic mechanism to implement
6381security policies on Python objects.")
6382 (license zpl2.1)))
6383
6384(define-public python2-zope-security
04417662
EF
6385 (let ((zope-security (package-with-python2 python-zope-security)))
6386 (package (inherit zope-security)
6387 (propagated-inputs
6388 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6389 ,@(alist-delete
6390 "python-zope-testrunner"
6391 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6392
6393(define-public python-zope-component
6394 (package
6395 (name "python-zope-component")
6396 (version "4.2.2")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (string-append "https://pypi.python.org/packages/source/z"
6401 "/zope.component/zope.component-" version ".tar.gz"))
6402 (sha256
6403 (base32
6404 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6405 (build-system python-build-system)
6406 (arguments
6407 ;; Skip tests due to circular dependency with python-zope-security.
6408 '(#:tests? #f))
6409 (native-inputs
6410 `(("python-zope-testing" ,python-zope-testing)))
6411 (propagated-inputs
6412 `(("python-zope-event" ,python-zope-event)
6413 ("python-zope-interface" ,python-zope-interface)
6414 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6415 ("python-zope-configuration" ,python-zope-configuration)))
6416 (home-page "https://github.com/zopefoundation/zope.component")
6417 (synopsis "Zope Component Architecture")
6418 (description "Zope.component represents the core of the Zope Component
6419Architecture. Together with the zope.interface package, it provides
6420facilities for defining, registering and looking up components.")
6421 (license zpl2.1)))
6422
6423(define-public python2-zope-component
6424 (package-with-python2 python-zope-component))
3859ac12 6425
b5f218be
LF
6426(define-public python2-pythondialog
6427 (package
6428 (name "python2-pythondialog")
6429 (version "3.3.0")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (string-append "https://pypi.python.org/packages/source/p/"
6434 "python2-pythondialog/python2-pythondialog-"
6435 version ".tar.gz"))
6436 (sha256
6437 (base32
6438 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6439 (build-system python-build-system)
6440 (arguments
6441 `(#:phases
6442 (modify-phases %standard-phases
6443 (add-after 'unpack 'patch-path
6444 (lambda* (#:key inputs #:allow-other-keys)
6445 (let* ((dialog (assoc-ref inputs "dialog")))
6446 ;; Since this library really wants to grovel the search path, we
6447 ;; must hardcode dialog's store path into it.
6448 (substitute* "dialog.py"
6449 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6450 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6451 #t))))
6452 #:python ,python-2
6453 #:tests? #f)) ; no test suite
6454 (propagated-inputs
6455 `(("dialog" ,dialog)))
6456 (home-page "http://pythondialog.sourceforge.net/")
6457 (synopsis "Python interface to the UNIX dialog utility")
6458 (description "A Python wrapper for the dialog utility. Its purpose is to
6459provide an easy to use, pythonic and comprehensive Python interface to dialog.
6460This allows one to make simple text-mode user interfaces on Unix-like systems")
6461 (license lgpl2.1)))
6462
3859ac12
LF
6463(define-public python-pyrfc3339
6464 (package
6465 (name "python-pyrfc3339")
6466 (version "0.2")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (string-append "https://pypi.python.org/packages/source/p/"
6471 "pyRFC3339/pyRFC3339-" version ".tar.gz"))
6472 (sha256
6473 (base32
6474 "1pp648xsjaw9h1xq2mgwzda5wis2ypjmzxlksc1a8grnrdmzy155"))))
6475 (build-system python-build-system)
6476 (propagated-inputs
6477 `(("python-pytz" ,python-pytz)))
6478 (native-inputs
6479 `(("python-nose" ,python-nose)
6480 ("python-setuptools" ,python-setuptools)))
6481 (home-page "https://github.com/kurtraschke/pyRFC3339")
6482 (synopsis "Python timestamp library")
6483 (description "Python library for generating and parsing RFC 3339-compliant
6484timestamps.")
6485 (license license:expat)))
6486
6487(define-public python2-pyrfc3339
6488 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6489
6490(define-public python-werkzeug
6491 (package
6492 (name "python-werkzeug")
6493 (version "0.11.2")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6498 "/Werkzeug-" version ".tar.gz"))
6499 (file-name (string-append name "-" version ".tar.gz"))
6500 (sha256
6501 (base32
6502 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6503 (build-system python-build-system)
6504 (native-inputs
6505 `(("python-pytest" ,python-pytest)))
6506 (home-page "http://werkzeug.pocoo.org/")
6507 (synopsis "Utilities for WSGI applications")
6508 (description "One of the most advanced WSGI utility modules. It includes a
6509powerful debugger, full-featured request and response objects, HTTP utilities to
6510handle entity tags, cache control headers, HTTP dates, cookie handling, file
6511uploads, a powerful URL routing system and a bunch of community-contributed
6512addon modules.")
6513 (license x11)))
6514
6515(define-public python2-werkzeug
6516 (package-with-python2 python-werkzeug))
99fffa8a
LF
6517
6518(define-public python-configobj
6519 (package
6520 (name "python-configobj")
6521 (version "5.0.6")
6522 (source (origin
6523 (method url-fetch)
6524 (uri (string-append
6525 "https://pypi.python.org/packages/source/c/configobj/"
6526 "configobj-" version ".tar.gz"))
6527 (sha256
6528 (base32
6529 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6530 ;; Patch setup.py so it looks for python-setuptools, which is
6531 ;; required to parse the keyword 'install_requires' in setup.py.
6532 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6533 (build-system python-build-system)
6534 (native-inputs
6535 `(("python-setuptools" ,python-setuptools)
6536 ("python-six" ,python-six)))
6537 (synopsis "Config file reading, writing and validation")
6538 (description "ConfigObj is a simple but powerful config file reader and
6539writer: an ini file round tripper. Its main feature is that it is very easy to
6540use, with a straightforward programmer’s interface and a simple syntax for
6541config files.")
6542 (home-page "https://github.com/DiffSK/configobj")
6543 (license bsd-3)))
6544
6545(define-public python2-configobj
6546 (package-with-python2 python-configobj))
79e8a291
LF
6547
6548(define-public python-configargparse
6549 (package
6550 (name "python-configargparse")
6551 (version "0.10.0")
6552 (source (origin
6553 (method url-fetch)
6554 (uri (string-append
6555 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6556 "ConfigArgParse-" version ".tar.gz"))
6557 (sha256
6558 (base32
6559 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6560 (build-system python-build-system)
6561 (arguments
6562 ;; FIXME: Bug in test suite filed upstream:
6563 ;; https://github.com/bw2/ConfigArgParse/issues/32
6564 '(#:tests? #f))
6565 (synopsis "Replacement for argparse")
6566 (description "A drop-in replacement for argparse that allows options to also
6567be set via config files and/or environment variables.")
6568 (home-page "https://github.com/bw2/ConfigArgParse")
6569 (license license:expat)))
6570
6571(define-public python2-configargparse
6572 (package-with-python2 python-configargparse))
ab41f979
LF
6573
6574(define-public python-ndg-httpsclient
6575 (package
6576 (name "python-ndg-httpsclient")
6577 (version "0.4.0")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (string-append
6581 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6582 "ndg_httpsclient-" version ".tar.gz"))
6583 (sha256
6584 (base32
6585 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6586 (build-system python-build-system)
6587 (propagated-inputs
6588 `(("python-pyopenssl" ,python-pyopenssl)))
6589 (synopsis "HTTPS support for Python's httplib and urllib2")
6590 (description "This is a HTTPS client implementation for httplib and urllib2
6591based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6592over the default provided with Python and importantly enables full verification
6593of the SSL peer.")
6594 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6595 (license bsd-3)))
6596
6597;; python2-openssl requires special care, so package-with-python2 is
6598;; insufficient.
6599(define-public python2-ndg-httpsclient
6600 (package (inherit python-ndg-httpsclient)
6601 (name "python2-ndg-httpsclient")
6602 (arguments `(#:python ,python-2))
6603 (propagated-inputs
6604 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6605
6606(define-public python-contextlib2
6607 (package
6608 (name "python-contextlib2")
6609 (version "0.4.0")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "contextlib2" version))
6614 (sha256
6615 (base32
6616 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6617 (build-system python-build-system)
6618 (arguments
6619 `(#:phases
6620 (modify-phases %standard-phases
6621 (replace 'check
6622 (lambda _ (zero?
6623 (system*
6624 "python" "test_contextlib2.py", "-v")))))))
6625 (home-page "http://contextlib2.readthedocs.org/")
6626 (synopsis "Tools for decorators and context managers")
6627 (description "This module is primarily a backport of the Python
66283.2 contextlib to earlier Python versions. Like contextlib, it
6629provides utilities for common tasks involving decorators and context
6630managers. It also contains additional features that are not part of
6631the standard library.")
6632 (license psfl)))
6633
6634(define-public python2-contextlib2
6635 (package-with-python2 python-contextlib2))