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