gnu: python-rpy2: Update to 2.7.6.
[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")
ec3bcbc7 3388 (version "2.7.6")
c9b1b4f9
RW
3389 (source
3390 (origin
3391 (method url-fetch)
ec3bcbc7 3392 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3393 (sha256
3394 (base32
ec3bcbc7 3395 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3396 (build-system python-build-system)
3397 (inputs
3398 `(("python-six" ,python-six)
3399 ("readline" ,readline)
3400 ("icu4c" ,icu4c)
3401 ("pcre" ,pcre)
3402 ("r" ,r)))
3403 (native-inputs
5ff6575b
RW
3404 `(("python-setuptools" ,python-setuptools)
3405 ("zlib" ,zlib)))
c9b1b4f9
RW
3406 (home-page "http://rpy.sourceforge.net/")
3407 (synopsis "Python interface to the R language")
3408 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3409low-level interface to R from Python, a proposed high-level interface,
3410including wrappers to graphical libraries, as well as R-like structures and
3411functions.")
3412 (license gpl3+)))
3413
3414(define-public python2-rpy2
3415 (let ((rpy2 (package-with-python2 python-rpy2)))
3416 (package (inherit rpy2)
3417 (native-inputs
3418 `(("python2-singledispatch" ,python2-singledispatch)
3419 ,@(package-native-inputs rpy2))))))
3420
bb986599
FB
3421(define-public python-scipy
3422 (package
3423 (name "python-scipy")
ba8a0824 3424 (version "0.16.0")
bb986599
FB
3425 (source
3426 (origin
3427 (method url-fetch)
3428 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3429 "/scipy-" version ".tar.xz"))
bb986599
FB
3430 (sha256
3431 (base32
ba8a0824 3432 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3433 (build-system python-build-system)
dd86c0d1 3434 (propagated-inputs
bb986599
FB
3435 `(("python-numpy" ,python-numpy)
3436 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3437 ("python-pyparsing" ,python-pyparsing)))
3438 (inputs
3439 `(("lapack" ,lapack)
719b01c1 3440 ("openblas" ,openblas)))
bb986599 3441 (native-inputs
dd86c0d1
RW
3442 `(("python-nose" ,python-nose)
3443 ("python-sphinx" ,python-sphinx)
5248d49e 3444 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3445 ("gfortran" ,gfortran)
bb986599
FB
3446 ("texlive" ,texlive)
3447 ("perl" ,perl)))
3448 (outputs '("out" "doc"))
3449 (arguments
3450 `(#:phases
3451 (alist-cons-before
719b01c1 3452 'build 'configure-openblas
bb986599 3453 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3454 (call-with-output-file "site.cfg"
3455 (lambda (port)
3456 (format port
3457 "[blas]
3458libraries = openblas
3459library_dirs = ~a/lib
3460include_dirs = ~a/include
3461[atlas]
3462library_dirs = ~a/lib
3463atlas_libs = openblas
3464"
3465 (assoc-ref inputs "openblas")
3466 (assoc-ref inputs "openblas")
3467 (assoc-ref inputs "openblas"))))
3468 #t)
bb986599
FB
3469 (alist-cons-after
3470 'install 'install-doc
3471 (lambda* (#:key outputs #:allow-other-keys)
3472 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3473 (doc (string-append data "/doc/" ,name "-" ,version))
3474 (html (string-append doc "/html"))
3475 (pyver ,(string-append "PYVER=")))
3476 (with-directory-excursion "doc"
bb986599
FB
3477 ;; Fix generation of images for mathematical expressions.
3478 (substitute* (find-files "source" "conf\\.py")
3479 (("pngmath_use_preview = True")
3480 "pngmath_use_preview = False"))
3481 (mkdir-p html)
3482 (system* "make" "html" pyver)
3483 (system* "make" "latex" "PAPER=a4" pyver)
3484 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3485 (copy-file "build/latex/scipy-ref.pdf"
3486 (string-append doc "/scipy-ref.pdf"))
3487 (with-directory-excursion "build/html"
3488 (for-each (lambda (file)
3489 (let* ((dir (dirname file))
3490 (tgt-dir (string-append html "/" dir)))
96c46210 3491 (install-file file html)))
bb986599
FB
3492 (find-files "." ".*"))))))
3493 ;; Tests can only be run after the library has been installed and not
3494 ;; within the source directory.
3495 (alist-cons-after
3496 'install 'check
89b5c60e 3497 (lambda _
bb986599
FB
3498 (with-directory-excursion "/tmp"
3499 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3500 (alist-delete
3501 'check
4f9ff21e
RW
3502 (alist-cons-after
3503 'unpack 'fix-tests
3504 (lambda _
3505 (substitute* "scipy/integrate/tests/test_quadpack.py"
3506 (("libm.so") "libm.so.6"))
3507 #t)
3508 %standard-phases)))))))
bb986599
FB
3509 (home-page "http://www.scipy.org/")
3510 (synopsis "The Scipy library provides efficient numerical routines")
3511 (description "The SciPy library is one of the core packages that make up
3512the SciPy stack. It provides many user-friendly and efficient numerical
3513routines such as routines for numerical integration and optimization.")
3514 (license bsd-3)))
3515
764c077b
LC
3516(define-public python2-scipy
3517 (let ((scipy (package-with-python2 python-scipy)))
3518 (package (inherit scipy)
3519 ;; Use packages customized for python-2.
dd86c0d1
RW
3520 (propagated-inputs
3521 `(("python2-matplotlib" ,python2-matplotlib)
3522 ("python2-numpy" ,python2-numpy)
3523 ,@(alist-delete "python-matplotlib"
3524 (alist-delete "python-numpy"
3525 (package-propagated-inputs scipy))))))))
bb986599 3526
94914805
EB
3527(define-public python-sqlalchemy
3528 (package
3529 (name "python-sqlalchemy")
3530 (version "0.9.7")
3531 (source
3532 (origin
3533 (method url-fetch)
3534 (uri (string-append "https://pypi.python.org/packages/source/S/"
3535 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3536 (sha256
3537 (base32
3538 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3539 (build-system python-build-system)
3540 (native-inputs
3541 `(("python-cython" ,python-cython) ;for c extensions
3542 ("python-pytest" ,python-pytest)
3543 ("python-mock" ,python-mock))) ;for tests
3544 (arguments
3545 `(#:phases (alist-replace
3546 'check
3547 (lambda _ (zero? (system* "py.test")))
3548 %standard-phases)))
3549 (home-page "http://www.sqlalchemy.org")
3550 (synopsis "Database abstraction library")
3551 (description
3552 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3553gives application developers the full power and flexibility of SQL. It
3554provides a full suite of well known enterprise-level persistence patterns,
3555designed for efficient and high-performing database access, adapted into a
3556simple and Pythonic domain language.")
3557 (license x11)))
3558
3559(define-public python2-sqlalchemy
3560 (package-with-python2 python-sqlalchemy))
c937562e 3561
1671c07c
EB
3562(define-public python-distutils-extra
3563 (package
3564 (name "python-distutils-extra")
3565 (version "2.38")
3566 (source
3567 (origin
3568 (method url-fetch)
3569 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3570 version "/+download/python-distutils-extra-"
3571 version ".tar.gz"))
3572 (sha256
3573 (base32
3574 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3575 (build-system python-build-system)
3576 (native-inputs
3577 `(("python-setuptools" ,python-setuptools)))
3578 (home-page "https://launchpad.net/python-distutils-extra/")
3579 (synopsis "Enhancements to Python's distutils")
3580 (description
3581 "The python-distutils-extra module enables you to easily integrate
3582gettext support, themed icons, and scrollkeeper-based documentation into
3583Python's distutils.")
3584 (license gpl2)))
3585
3586(define-public python2-distutils-extra
3587 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3588
3589(define-public python2-elib.intl
3590 (package
3591 (name "python2-elib.intl")
3592 (version "0.0.3")
3593 (source
3594 (origin
3595 ;; This project doesn't tag releases or publish tarballs, so we take
3596 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3597 (method git-fetch)
3598 (uri (git-reference
3599 (url "https://github.com/dieterv/elib.intl.git")
3600 (commit "d09997cfef")))
3601 (sha256
3602 (base32
3603 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3604 (build-system python-build-system)
3605 (native-inputs
3606 `(("python2-setuptools" ,python2-setuptools)))
3607 (arguments
3608 ;; incompatible with Python 3 (exception syntax)
3609 `(#:python ,python-2
3610 #:tests? #f
3611 ;; With standard flags, the install phase attempts to create a zip'd
3612 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3613 ;; before 1980'
3614 #:configure-flags '("--single-version-externally-managed"
3615 "--record=elib.txt")))
3616 (home-page "https://github.com/dieterv/elib.intl")
3617 (synopsis "Enhanced internationalization for Python")
3618 (description
3619 "The elib.intl module provides enhanced internationalization (I18N)
3620services for your Python modules and applications.")
3621 (license lgpl3+)))
3622
c937562e
EB
3623(define-public python-pillow
3624 (package
3625 (name "python-pillow")
7fbee931 3626 (version "3.0.0")
c937562e
EB
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (string-append "https://pypi.python.org/packages/source/P/"
3631 "Pillow/Pillow-" version ".tar.gz"))
3632 (sha256
3633 (base32
7fbee931 3634 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
c937562e
EB
3635 (build-system python-build-system)
3636 (native-inputs
3637 `(("python-setuptools" ,python-setuptools)
3638 ("python-nose" ,python-nose)))
3639 (inputs
5ff408d9
SB
3640 `(("freetype" ,freetype)
3641 ("lcms" ,lcms)
c937562e
EB
3642 ("zlib" ,zlib)
3643 ("libjpeg" ,libjpeg)
3644 ("openjpeg" ,openjpeg)
5ff408d9
SB
3645 ("libtiff" ,libtiff)
3646 ("libwebp" ,libwebp)))
c937562e
EB
3647 (propagated-inputs
3648 `(;; Used at runtime for pkg_resources
3649 ("python-setuptools" ,python-setuptools)))
3650 (arguments
e5358a6b
LC
3651 `(#:phases (modify-phases %standard-phases
3652 (add-before
3653 'install 'disable-egg-compression
3654 (lambda _
3655 ;; Leave the .egg uncompressed since compressing it would
3656 ;; prevent the GC from identifying run-time dependencies.
3657 ;; See <http://bugs.gnu.org/20765>.
3658 (let ((port (open-file "setup.cfg" "a")))
3659 (display "\n[easy_install]\nzip_ok = 0\n"
3660 port)
3661 (close-port port)
3662 #t)))
3663 (add-after
3664 'install 'check-installed
3665 (lambda _
3666 (begin
3667 (setenv "HOME" (getcwd))
3668 (and (zero? (system* "python" "selftest.py"
3669 "--installed"))
3670 (zero? (system* "python" "test-installed.py"))))))
3671 (delete 'check))))
c937562e
EB
3672 (home-page "https://pypi.python.org/pypi/Pillow")
3673 (synopsis "Fork of the Python Imaging Library")
3674 (description
3675 "The Python Imaging Library adds image processing capabilities to your
3676Python interpreter. This library provides extensive file format support, an
3677efficient internal representation, and fairly powerful image processing
3678capabilities. The core image library is designed for fast access to data
3679stored in a few basic pixel formats. It should provide a solid foundation for
3680a general image processing tool.")
3681 (license (x11-style
3682 "http://www.pythonware.com/products/pil/license.htm"
3683 "The PIL Software License"))))
3684
3685(define-public python2-pillow
3686 (package-with-python2 python-pillow))
bb986599 3687
a415f036
FB
3688(define-public python-pycparser
3689 (package
3690 (name "python-pycparser")
3691 (version "2.10")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (string-append "https://pypi.python.org/packages/source/p/"
3696 "pycparser/pycparser-" version ".tar.gz"))
3697 (sha256
3698 (base32
3699 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3700 (outputs '("out" "doc"))
3701 (build-system python-build-system)
3702 (native-inputs
3703 `(("pkg-config" ,pkg-config)
3704 ("python-setuptools" ,python-setuptools)))
3705 (arguments
89b5c60e 3706 `(#:phases
a415f036
FB
3707 (alist-replace
3708 'check
3709 (lambda _
3710 (with-directory-excursion "tests"
3711 (zero? (system* "python" "all_tests.py"))))
3712 (alist-cons-after
3713 'install 'install-doc
3714 (lambda* (#:key outputs #:allow-other-keys)
3715 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3716 (doc (string-append data "/doc/" ,name "-" ,version))
3717 (examples (string-append doc "/examples")))
3718 (mkdir-p examples)
3719 (for-each (lambda (file)
3720 (copy-file (string-append "." file)
3721 (string-append doc file)))
3722 '("/README.rst" "/CHANGES" "/LICENSE"))
3723 (copy-recursively "examples" examples)))
3724 %standard-phases))))
3725 (home-page "https://github.com/eliben/pycparser")
3726 (synopsis "C parser in Python")
3727 (description
3728 "Pycparser is a complete parser of the C language, written in pure Python
3729using the PLY parsing library. It parses C code into an AST and can serve as
3730a front-end for C compilers or analysis tools.")
3731 (license bsd-3)))
3732
3733(define-public python2-pycparser
3734 (package-with-python2 python-pycparser))
57c3f716
FB
3735
3736(define-public python-cffi
3737 (package
3738 (name "python-cffi")
2d3a437c 3739 (version "1.4.2")
57c3f716
FB
3740 (source
3741 (origin
3742 (method url-fetch)
2d3a437c 3743 (uri (pypi-uri "cffi" version))
89b5c60e 3744 (sha256
2d3a437c 3745 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
3746 (build-system python-build-system)
3747 (outputs '("out" "doc"))
3748 (inputs
3749 `(("libffi" ,libffi)))
3750 (propagated-inputs ; required at run-time
3751 `(("python-pycparser" ,python-pycparser)))
3752 (native-inputs
3753 `(("pkg-config" ,pkg-config)
3754 ("python-sphinx" ,python-sphinx)
4179f952 3755 ("python-pytest" ,python-pytest)
57c3f716
FB
3756 ("python-setuptools" ,python-setuptools)))
3757 (arguments
4179f952 3758 `(#:phases
57c3f716
FB
3759 (alist-cons-after
3760 'install 'install-doc
3761 (lambda* (#:key outputs #:allow-other-keys)
3762 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3763 (doc (string-append data "/doc/" ,name "-" ,version))
3764 (html (string-append doc "/html")))
3765 (with-directory-excursion "doc"
3766 (system* "make" "html")
3767 (mkdir-p html)
3768 (copy-recursively "build/html" html))
3769 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3770 %standard-phases)))
3771 (home-page "http://cffi.readthedocs.org")
3772 (synopsis "Foreign function interface for Python")
3773 (description
3774 "Foreign Function Interface for Python calling C code.")
bd3fa666 3775 (license license:expat)))
57c3f716
FB
3776
3777(define-public python2-cffi
3778 (package-with-python2 python-cffi))
6fa14469
FB
3779
3780(define-public python-xcffib
3781 (package
3782 (name "python-xcffib")
3783 (version "0.1.9")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (string-append "https://pypi.python.org/packages/source/x/"
3788 "xcffib/xcffib-" version ".tar.gz"))
3789 (sha256
3790 (base32
3791 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3792 (build-system python-build-system)
3793 (inputs
3794 `(("libxcb" ,libxcb)
3795 ("python-six" ,python-six)))
3796 (native-inputs
3797 `(("python-setuptools" ,python-setuptools)))
3798 (propagated-inputs
3799 `(("python-cffi" ,python-cffi))) ; used at run time
3800 (arguments
89b5c60e 3801 `(#:phases
6fa14469
FB
3802 (alist-cons-after
3803 'install 'install-doc
3804 (lambda* (#:key outputs #:allow-other-keys)
3805 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3806 "/doc/" ,name "-" ,version)))
3807 (mkdir-p doc)
3808 (copy-file "README.md"
3809 (string-append doc "/README.md"))))
3810 %standard-phases)))
3811 (home-page "https://github.com/tych0/xcffib")
3812 (synopsis "XCB Python bindings")
3813 (description
3814 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3815support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3816 (license license:expat)))
6fa14469
FB
3817
3818(define-public python2-xcffib
3819 (package-with-python2 python-xcffib))
3820
9e099723
FB
3821(define-public python-cairocffi
3822 (package
3823 (name "python-cairocffi")
3824 (version "0.6")
3825 (source
3826 (origin
3827 (method url-fetch)
3828 ;; The archive on pypi is missing the 'utils' directory!
3829 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3830 version ".tar.gz"))
f586c877 3831 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3832 (sha256
3833 (base32
3834 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3835 (build-system python-build-system)
3836 (outputs '("out" "doc"))
3837 (inputs
3838 `(("gdk-pixbuf" ,gdk-pixbuf)
3839 ("cairo" ,cairo)))
3840 (native-inputs
3841 `(("pkg-config" ,pkg-config)
3842 ("python-sphinx" ,python-sphinx)
3843 ("python-docutils" ,python-docutils)
3844 ("python-setuptools" ,python-setuptools)))
3845 (propagated-inputs
3846 `(("python-xcffib" ,python-xcffib))) ; used at run time
3847 (arguments
89b5c60e 3848 `(#:phases
9e099723
FB
3849 (alist-cons-after
3850 'install 'install-doc
3851 (lambda* (#:key inputs outputs #:allow-other-keys)
3852 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3853 (doc (string-append data "/doc/" ,name "-" ,version))
3854 (html (string-append doc "/html")))
89b5c60e 3855 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3856 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3857 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3858 (setenv "LANG" "en_US.UTF-8")
3859 (mkdir-p html)
3860 (for-each (lambda (file)
3861 (copy-file (string-append "." file)
3862 (string-append doc file)))
3863 '("/README.rst" "/CHANGES" "/LICENSE"))
3864 (system* "python" "setup.py" "build_sphinx")
3865 (copy-recursively "docs/_build/html" html)))
3866 %standard-phases)))
3867 (home-page "https://github.com/SimonSapin/cairocffi")
3868 (synopsis "Python bindings and object-oriented API for Cairo")
3869 (description
3870 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3871Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3872graphics library with support for multiple backends including image buffers,
3873PNG, PostScript, PDF, and SVG file output.")
3874 (license bsd-3)))
3875
3876(define-public python2-cairocffi
3877 (package-with-python2 python-cairocffi))
3878
3cff95cb
RW
3879(define-public python-decorator
3880 (package
3881 (name "python-decorator")
e21338be 3882 (version "4.0.6")
3cff95cb
RW
3883 (source
3884 (origin
3885 (method url-fetch)
e21338be 3886 (uri (pypi-uri "decorator" version))
3cff95cb 3887 (sha256
e21338be 3888 (base32 "1710cwsbwr8fkiq59w2min7rwgdz7ly51yz8l8yh1zbpfxcm8qhw"))))
3cff95cb
RW
3889 (build-system python-build-system)
3890 (arguments '(#:tests? #f)) ; no test target
3891 (native-inputs
3892 `(("python-setuptools" ,python-setuptools)))
3893 (home-page "http://pypi.python.org/pypi/decorator/")
3894 (synopsis "Python module to simplify usage of decorators")
3895 (description
3896 "The aim of the decorator module is to simplify the usage of decorators
3897for the average programmer, and to popularize decorators usage giving examples
3898of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3899etc. The core of this module is a decorator factory.")
3900 (license license:expat)))
3901
3902(define-public python2-decorator
3903 (package-with-python2 python-decorator))
3904
2c0499ad
RW
3905(define-public python-drmaa
3906 (package
3907 (name "python-drmaa")
3908 (version "0.7.6")
3909 (source
3910 (origin
3911 (method url-fetch)
3912 (uri (string-append
3913 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3914 version ".tar.gz"))
3915 (sha256
3916 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3917 (build-system python-build-system)
3918 ;; The test suite requires libdrmaa which is provided by the cluster
3919 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3920 ;; should be set to the path of the libdrmaa library.
3921 (arguments '(#:tests? #f))
3922 (native-inputs
3923 `(("python-nose" ,python-nose)
3924 ("python-setuptools" ,python-setuptools)))
3925 (home-page "https://pypi.python.org/pypi/drmaa")
3926 (synopsis "Python bindings for the DRMAA library")
3927 (description
3928 "A Python package for Distributed Resource Management (DRM) job
3929submission and control. This package is an implementation of the DRMAA 1.0
3930Python language binding specification.")
3931 (license bsd-3)))
3932
3933(define-public python2-drmaa
3934 (package-with-python2 python-drmaa))
3935
d05c6da0
RW
3936(define-public python-gridmap
3937 (package
3938 (name "python-gridmap")
3939 (version "0.13.0")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (string-append
3944 "https://github.com/pygridtools/gridmap/archive/v"
3945 version ".tar.gz"))
3946 (file-name (string-append name "-" version ".tar.gz"))
3947 (sha256
3948 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3949 (build-system python-build-system)
3950 (inputs
3951 `(("python-psutil" ,python-psutil)
3952 ("python-drmaa" ,python-drmaa)
3953 ("python-pyzmq" ,python-pyzmq)))
3954 (native-inputs
3955 `(("python-setuptools" ,python-setuptools)))
3956 (home-page "https://github.com/pygridtools/gridmap")
3957 (synopsis "Create jobs on a cluster directly from Python")
3958 (description
3959 "Gridmap is a Python package to allow you to easily create jobs on the
3960cluster directly from Python. You can directly map Python functions onto the
3961cluster without needing to write any wrapper code yourself.")
3962 (license gpl3+)))
3963
3964(define-public python2-gridmap
3965 (package-with-python2 python-gridmap))
3966
cb6d5c54
RW
3967(define-public python-pexpect
3968 (package
3969 (name "python-pexpect")
3970 (version "3.3")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (string-append "https://pypi.python.org/packages/source/p/"
3975 "pexpect/pexpect-" version ".tar.gz"))
3976 (sha256
3977 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
3978 (build-system python-build-system)
3979 (arguments
3980 `(#:phases
3981 (modify-phases %standard-phases
3982 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
3983 (native-inputs
3984 `(("python-nose" ,python-nose)))
3985 (home-page "http://pexpect.readthedocs.org/")
3986 (synopsis "Controlling interactive console applications")
3987 (description
3988 "Pexpect is a pure Python module for spawning child applications;
3989controlling them; and responding to expected patterns in their output.
3990Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
3991child application and control it as if a human were typing commands.")
3992 (license isc)))
3993
3994(define-public python2-pexpect
3995 (package-with-python2 python-pexpect))
3996
229ad120
RW
3997(define-public python-setuptools-scm
3998 (package
3999 (name "python-setuptools-scm")
383af6b0 4000 (version "1.9.0")
229ad120
RW
4001 (source (origin
4002 (method url-fetch)
383af6b0 4003 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4004 (sha256
4005 (base32
383af6b0 4006 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4007 (build-system python-build-system)
383af6b0 4008 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4009 (home-page "https://github.com/pypa/setuptools_scm/")
4010 (synopsis "Manage Python package versions in SCM metadata")
4011 (description
383af6b0 4012 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4013@dfn{software configuration management} (SCM) metadata instead of declaring
4014them as the version argument or in a SCM managed file.")
4015 (license license:expat)))
4016
4017(define-public python2-setuptools-scm
4018 (package-with-python2 python-setuptools-scm))
4019
b74270ee
RW
4020(define-public python-pathpy
4021 (package
4022 (name "python-pathpy")
4023 (version "8.1.1")
4024 (source
4025 (origin
4026 (method url-fetch)
4027 (uri (string-append "https://pypi.python.org/packages/source/p/"
4028 "path.py/path.py-" version ".tar.gz"))
4029 (sha256
4030 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4031 (build-system python-build-system)
4032 (propagated-inputs
4033 `(("python-appdirs" ,python-appdirs)))
4034 (native-inputs
553b709b
EF
4035 `(("python-setuptools" ,python-setuptools)
4036 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4037 ("python-pytest" ,python-pytest)
4038 ("python-pytest-runner" ,python-pytest-runner)))
4039 (home-page "http://github.com/jaraco/path.py")
4040 (synopsis "Python module wrapper for built-in os.path")
4041 (description
4042 "@code{path.py} implements path objects as first-class entities, allowing
4043common operations on files to be invoked on those path objects directly.")
4044 (license license:expat)))
4045
4046(define-public python2-pathpy
4047 (package-with-python2 python-pathpy))
4048
0d34e01b
RW
4049(define-public python-pickleshare
4050 (package
4051 (name "python-pickleshare")
4052 (version "0.5")
4053 (source
4054 (origin
4055 (method url-fetch)
4056 (uri (string-append "https://pypi.python.org/packages/source/p/"
4057 "pickleshare/pickleshare-" version ".tar.gz"))
4058 (sha256
4059 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4060 (build-system python-build-system)
4061 (propagated-inputs
4062 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4063 (native-inputs
4064 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4065 (home-page "https://github.com/vivainio/pickleshare")
4066 (synopsis "Tiny key value database with concurrency support")
4067 (description
4068 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4069Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4070shelve, many processes can access the database simultaneously. Changing a
4071value in database is immediately visible to other processes accessing the same
4072database. Concurrency is possible because the values are stored in separate
4073files. Hence the “database” is a directory where all files are governed by
4074PickleShare.")
4075 (license license:expat)))
4076
4077(define-public python2-pickleshare
4078 (package-with-python2 python-pickleshare))
4079
cd6e5189
RW
4080(define-public python-simplegeneric
4081 (package
4082 (name "python-simplegeneric")
4083 (version "0.8.1")
4084 (source
4085 (origin
4086 (method url-fetch)
4087 (uri (string-append "https://pypi.python.org/packages/source/s/"
4088 "simplegeneric/simplegeneric-" version ".zip"))
4089 (sha256
4090 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4091 (build-system python-build-system)
4092 (native-inputs
69b96e5e
RW
4093 `(("python-setuptools" ,python-setuptools)
4094 ("unzip" ,unzip)))
cd6e5189
RW
4095 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4096 (synopsis "Python module for simple generic functions")
4097 (description
4098 "The simplegeneric module lets you define simple single-dispatch generic
4099functions, akin to Python’s built-in generic functions like @code{len()},
4100@code{iter()} and so on. However, instead of using specially-named methods,
4101these generic functions use simple lookup tables, akin to those used by
4102e.g. @code{pickle.dump()} and other generic functions found in the Python
4103standard library.")
4104 (license zpl2.1)))
4105
4106(define-public python2-simplegeneric
4107 (package-with-python2 python-simplegeneric))
4108
ddc7d8ed
RW
4109(define-public python-ipython-genutils
4110 (package
4111 (name "python-ipython-genutils")
4112 (version "0.1.0")
4113 (source
4114 (origin
4115 (method url-fetch)
4116 (uri (string-append "https://pypi.python.org/packages/source/i/"
4117 "ipython_genutils/ipython_genutils-"
4118 version ".tar.gz"))
4119 (sha256
4120 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4121 (build-system python-build-system)
4122 (arguments `(#:tests? #f)) ; no tests
4123 (home-page "http://ipython.org")
4124 (synopsis "Vestigial utilities from IPython")
4125 (description
4126 "This package provides retired utilities from IPython.")
4127 (license bsd-3)))
4128
4129(define-public python2-ipython-genutils
4130 (package-with-python2 python-ipython-genutils))
4131
2b10eb48
RW
4132(define-public python-traitlets
4133 (package
4134 (name "python-traitlets")
4135 (version "4.0.0")
4136 (source
4137 (origin
4138 (method url-fetch)
4139 (uri (string-append "https://pypi.python.org/packages/source/t/"
4140 "traitlets/traitlets-" version ".tar.gz"))
4141 (sha256
4142 (base32
4143 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4144 (build-system python-build-system)
4145 (arguments
4146 `(#:phases
4147 (modify-phases %standard-phases
4148 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4149 (propagated-inputs
4150 `(("python-ipython-genutils" ,python-ipython-genutils)
4151 ("python-decorator" ,python-decorator)))
4152 (native-inputs
4153 `(("python-nose" ,python-nose)))
4154 (home-page "http://ipython.org")
4155 (synopsis "Configuration system for Python applications")
4156 (description
4157 "Traitlets is a framework that lets Python classes have attributes with
4158type checking, dynamically calculated default values, and ‘on change’
4159callbacks. The package also includes a mechanism to use traitlets for
4160configuration, loading values from files or from command line arguments. This
4161is a distinct layer on top of traitlets, so you can use traitlets in your code
4162without using the configuration machinery.")
4163 (license bsd-3)))
4164
4165(define-public python2-traitlets
4166 (package-with-python2 python-traitlets))
4167
ae1ab9fe
FB
4168(define-public python-ipython
4169 (package
4170 (name "python-ipython")
3a0b1b9a 4171 (version "3.2.1")
ae1ab9fe
FB
4172 (source
4173 (origin
fceac880
FB
4174 (method url-fetch)
4175 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4176 (uri (string-append "https://pypi.python.org/packages/source/i/"
4177 "ipython/ipython-" version ".tar.gz"))
4178 (sha256
4179 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4180 (build-system python-build-system)
4181 (outputs '("out" "doc"))
3a0b1b9a
FB
4182 (propagated-inputs
4183 `(("python-pyzmq" ,python-pyzmq)
4184 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4185 (inputs
4186 `(("readline" ,readline)
3a0b1b9a 4187 ("which" ,which)
ae1ab9fe 4188 ("python-matplotlib" ,python-matplotlib)
5d26e542 4189 ("python-numpy" ,python-numpy)
ae1ab9fe 4190 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4191 ("python-jinja2" ,python-jinja2)
4192 ("python-mistune" ,python-mistune)
4193 ("python-jsonschema" ,python-jsonschema)
4194 ("python-pygments" ,python-pygments)
4195 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4196 ("python-nose" ,python-nose)))
4197 (native-inputs
4198 `(("pkg-config" ,pkg-config)
4199 ("python-sphinx" ,python-sphinx)
4200 ("texlive" ,texlive)
4201 ("texinfo" ,texinfo)
4202 ("python-setuptools" ,python-setuptools)))
4203 (arguments
89b5c60e 4204 `(#:phases
3a0b1b9a
FB
4205 (modify-phases %standard-phases
4206 (add-after
4207 'install 'install-doc
4208 (lambda* (#:key inputs outputs #:allow-other-keys)
4209 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4210 (doc (string-append data "/doc/" ,name "-" ,version))
4211 (html (string-append doc "/html"))
4212 (man1 (string-append data "/man/man1"))
4213 (info (string-append data "/info"))
4214 (examples (string-append doc "/examples")))
afd3d931 4215 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4216 (with-directory-excursion "docs"
4217 ;; FIXME: html and pdf fail to build
4218 ;; (system* "make" "html")
4219 ;; (system* "make" "pdf" "PAPER=a4")
4220 (system* "make" "info"))
4221 (copy-recursively "docs/man" man1)
4222 (copy-recursively "examples" examples)
4223 ;; (copy-recursively "docs/build/html" html)
4224 ;; (copy-file "docs/build/latex/ipython.pdf"
4225 ;; (string-append doc "/ipython.pdf"))
4226 (mkdir-p info)
4227 (copy-file "docs/build/texinfo/ipython.info"
4228 (string-append info "/ipython.info"))
4229 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4230 ;; Tests can only be run after the library has been installed and not
4231 ;; within the source directory.
4232 (delete 'check)
4233 (add-after
4234 'install 'check
4235 (lambda* (#:key outputs tests? #:allow-other-keys)
4236 (if tests?
4237 (with-directory-excursion "/tmp"
4238 (setenv "HOME" "/tmp/") ;; required by a test
4239 (zero? (system* (string-append (assoc-ref outputs "out")
4240 "/bin/iptest"))))
4241 #t)))
4242 (add-before
4243 'install 'fix-tests
4244 (lambda* (#:key inputs #:allow-other-keys)
4245 (substitute* "./IPython/utils/_process_posix.py"
4246 (("/usr/bin/env', 'which") (which "which")))
4247 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4248 (("#!/usr/bin/env python")
4249 (string-append "#!" (which "python"))))
4250 ;; Disable 1 failing test
4251 (substitute* "./IPython/core/tests/test_magic.py"
4252 (("def test_dirops\\(\\):" all)
4253 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4254 (home-page "http://ipython.org")
4255 (synopsis "IPython is a tool for interactive computing in Python")
4256 (description
4257 "IPython provides a rich architecture for interactive computing with:
4258Powerful interactive shells, a browser-based notebook, support for interactive
4259data visualization, embeddable interpreters and tools for parallel
4260computing.")
4261 (license bsd-3)))
4262
4263(define-public python2-ipython
4264 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4265 (package
4266 (inherit ipython)
4267 ;; FIXME: some tests are failing
4268 (arguments
4269 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4270 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4271 ;; FIXME: add pyreadline once available.
667d90df
RW
4272 (propagated-inputs
4273 `(("python2-terminado" ,python2-terminado)
4274 ,@(alist-delete "python-terminado"
4275 (package-propagated-inputs ipython))))
89b5c60e 4276 (inputs
3a0b1b9a
FB
4277 `(("python2-mock" ,python2-mock)
4278 ("python2-matplotlib" ,python2-matplotlib)
5587253a
FB
4279 ("python2-numpy" ,python2-numpy)
4280 ,@(fold alist-delete (package-inputs ipython)
4281 '("python-matplotlib" "python-numpy")))))))
03411993
AE
4282
4283(define-public python-isodate
4284 (package
4285 (name "python-isodate")
4286 (version "0.5.1")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (string-append
4291 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4292 version
4293 ".tar.gz"))
4294 (sha256
4295 (base32
4296 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4297 (build-system python-build-system)
4298 (inputs
4299 `(("python-setuptools" ,python-setuptools)))
4300 (home-page
4301 "http://cheeseshop.python.org/pypi/isodate")
4302 (synopsis
4303 "Python date parser and formatter")
4304 (description
4305 "Python-isodate is a python module for parsing and formatting
4306ISO 8601 dates, time and duration.")
4307 (license bsd-3)))
4308
4309(define-public python2-isodate
4310 (package-with-python2 python-isodate))
673ab897
AE
4311
4312(define-public python-html5lib
4313 (package
4314 (name "python-html5lib")
4315 (version "1.0b3")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (string-append
4320 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4321 version
4322 ".tar.gz"))
4323 (sha256
4324 (base32
4325 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4326 (build-system python-build-system)
3dd75476
AE
4327 (propagated-inputs
4328 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4329 (inputs
4330 `(("python-setuptools" ,python-setuptools)))
4331 (arguments
4332 `(#:test-target "check"))
4333 (home-page
4334 "https://github.com/html5lib/html5lib-python")
4335 (synopsis
4336 "Python HTML parser based on the WHATWG HTML specifcation")
4337 (description
4338 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4339and written in Python.")
bd3fa666 4340 (license license:expat)))
673ab897
AE
4341
4342(define-public python2-html5lib
4343 (package-with-python2 python-html5lib))
e99f4211
MW
4344
4345(define-public python-urwid
4346 (package
4347 (name "python-urwid")
4348 (version "1.3.0")
4349 (source
4350 (origin
4351 (method url-fetch)
be1f44bb
MW
4352 (uri (string-append
4353 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4354 version ".tar.gz"))
e99f4211
MW
4355 (sha256
4356 (base32
4357 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4358 (build-system python-build-system)
4359 (native-inputs `(("python-setuptools" ,python-setuptools)))
4360 (home-page "http://urwid.org")
4361 (synopsis "Console user interface library for Python")
4362 (description
4363 "Urwid is a curses-based UI/widget library for Python. It includes many
4364features useful for text console applications.")
4365 (license lgpl2.1+)))
4366
4367(define-public python2-urwid
4368 (package-with-python2 python-urwid))
d95a56c6
PAR
4369
4370(define-public python-dbus
4371 (package
4372 (name "python-dbus")
4373 (version "1.2.0")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (string-append
4378 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4379 version ".tar.gz"))
4380 (sha256
4381 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4382 (build-system gnu-build-system)
6717c879
SB
4383 (arguments
4384 '(#:phases
4385 (modify-phases %standard-phases
4386 (add-before
4387 'check 'pre-check
4388 (lambda _
4389 ;; XXX: For the missing '/etc/machine-id'.
4390 (substitute* "test/run-test.sh"
4391 (("DBUS_FATAL_WARNINGS=1")
4392 "DBUS_FATAL_WARNINGS=0"))
4393 #t)))))
d95a56c6
PAR
4394 (native-inputs
4395 `(("pkg-config" ,pkg-config)))
4396 (inputs
4397 `(("python" ,python)
2e88d113 4398 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4399 (synopsis "Python bindings for D-bus")
4400 (description "python-dbus provides bindings for libdbus, the reference
4401implementation of D-Bus.")
4402 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4403 (license license:expat)))
b52af02b
MW
4404
4405(define-public python2-dbus
4406 (package (inherit python-dbus)
4407 (name "python2-dbus")
4408 (inputs `(("python" ,python-2)
4409 ,@(alist-delete "python"
4410 (package-inputs python-dbus)
4411 equal?)))
4412 ;; FIXME: on Python 2, the test_utf8 fails with:
4413 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4414 (arguments `(#:tests? #f))))
a6ac8332
AE
4415
4416(define-public python-apsw
4417 (package
4418 (name "python-apsw")
4419 (version "3.8.7.3-r1")
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (string-append
4424 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4425 version
4426 ".tar.gz"))
4427 (sha256
4428 (base32
4429 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4430 (build-system python-build-system)
4431 (inputs
4432 `(("python-setuptools" ,python-setuptools)
4433 ("sqlite" ,sqlite)))
4434 (arguments
4435 `(#:phases
4436 ;; swap check and install phases
4437 (alist-cons-after
4438 'install 'check
4439 (assoc-ref %standard-phases 'check)
4440 (alist-delete
4441 'check
4442 %standard-phases))))
4443 (home-page "https://github.com/rogerbinns/apsw/")
4444 (synopsis "Another Python SQLite Wrapper")
4445 (description "APSW is a Python wrapper for the SQLite
4446embedded relational database engine. In contrast to other wrappers such as
4447pysqlite it focuses on being a minimal layer over SQLite attempting just to
4448translate the complete SQLite API into Python.")
abde5f37 4449 (license license:zlib)))
a6ac8332
AE
4450
4451(define-public python2-apsw
4452 (package-with-python2 python-apsw))
26b307e2
AE
4453
4454(define-public python-lxml
4455 (package
4456 (name "python-lxml")
4457 (version "3.4.2")
4458 (source
4459 (origin
4460 (method url-fetch)
4461 (uri (string-append
4462 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4463 version
4464 ".tar.gz"))
4465 (sha256
4466 (base32
4467 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4468 (build-system python-build-system)
4469 (inputs
4470 `(("libxml2" ,libxml2)
4471 ("libxslt" ,libxslt)
4472 ("python-setuptools" ,python-setuptools)))
4473 (home-page "http://lxml.de/")
4474 (synopsis
4475 "Python XML processing library")
4476 (description
4477 "The lxml XML toolkit is a Pythonic binding for the C libraries
4478libxml2 and libxslt.")
4479 (license bsd-3))) ; and a few more, see LICENSES.txt
4480
4481(define-public python2-lxml
4482 (package-with-python2 python-lxml))
4ed20663 4483
bec07a7c
AE
4484(define-public python2-pil
4485 (package
4486 (name "python2-pil")
4487 (version "1.1.7")
4488 (source
4489 (origin
4490 (method url-fetch)
4491 (uri (string-append
4492 "http://effbot.org/downloads/Imaging-"
4493 version ".tar.gz"))
4494 (sha256
4495 (base32
516277cb
AE
4496 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4497 (modules '((guix build utils)))
4498 (snippet
4499 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4500 ;; there is no use in creating a patch and reporting it.
4501 '(substitute* "_imagingft.c"
4502 (("freetype/")
4503 "freetype2/")))))
bec07a7c
AE
4504 (build-system python-build-system)
4505 (inputs
4506 `(("freetype" ,freetype)
4507 ("libjpeg" ,libjpeg)
4508 ("libtiff" ,libtiff)
4509 ("python-setuptools" ,python-setuptools)
4510 ("zlib" ,zlib)))
4511 (arguments
4512 ;; Only the fork python-pillow works with Python 3.
4513 `(#:python ,python-2
4514 #:tests? #f ; no check target
4515 #:phases
4516 (alist-cons-before
4517 'build 'configure
4518 ;; According to README and setup.py, manual configuration is
4519 ;; the preferred way of "searching" for inputs.
4520 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4521 (lambda* (#:key inputs #:allow-other-keys)
4522 (let ((jpeg (assoc-ref inputs "libjpeg"))
4523 (zlib (assoc-ref inputs "zlib"))
4524 (tiff (assoc-ref inputs "libtiff"))
4525 (freetype (assoc-ref inputs "freetype")))
4526 (substitute* "setup.py"
4527 (("JPEG_ROOT = None")
4528 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4529 (("ZLIB_ROOT = None")
4530 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4531 (("TIFF_ROOT = None")
4532 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4533 (("FREETYPE_ROOT = None")
4534 (string-append "FREETYPE_ROOT = libinclude(\""
4535 freetype "\")")))))
4536 %standard-phases)))
4537 (home-page "http://www.pythonware.com/products/pil/")
4538 (synopsis "Python Imaging Library")
4539 (description "The Python Imaging Library (PIL) adds image processing
4540capabilities to the Python interpreter.")
4541 (license (x11-style
4542 "file://README"
4543 "See 'README' in the distribution."))))
092e86f5
AE
4544
4545(define-public python2-cssutils
4546 (package
4547 (name "python2-cssutils")
4548 (version "1.0")
4549 (source
4550 (origin
4551 (method url-fetch)
4552 (uri (string-append
4553 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4554 version
4555 ".zip"))
4556 (sha256
4557 (base32
4558 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4559 (build-system python-build-system)
4560 (native-inputs
4561 `(("python2-mock" ,python2-mock) ; for the tests
4562 ("unzip" ,unzip))) ; for unpacking the source
4563 (inputs
4564 `(("python2-setuptools" ,python2-setuptools)))
4565 (arguments
4566 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4567 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4568 ))
092e86f5
AE
4569 (home-page "http://cthedot.de/cssutils/")
4570 (synopsis
4571 "CSS Cascading Style Sheets library for Python")
4572 (description
4573 "Cssutils is a Python package for parsing and building CSS
4574Cascading Style Sheets. Currently it provides a DOM only and no rendering
4575options.")
4576 (license lgpl3+)))
880ff77c
AE
4577
4578(define-public python-cssselect
4579 (package
4580 (name "python-cssselect")
4581 (version "0.9.1")
4582 (source
4583 (origin
4584 (method url-fetch)
4585 (uri (string-append
4586 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4587 version
4588 ".tar.gz"))
4589 (sha256
4590 (base32
4591 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4592 (build-system python-build-system)
4593 (inputs
4594 `(("python-setuptools" ,python-setuptools)))
4595 (arguments
4596 ;; tests fail with message
4597 ;; AttributeError: 'module' object has no attribute 'tests'
4598 `(#:tests? #f))
4599 (home-page
4600 "https://pythonhosted.org/cssselect/")
4601 (synopsis
4602 "CSS3 selector parser and translator to XPath 1.0")
4603 (description
4604 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4605them to XPath 1.0 expressions. Such expressions can be used in lxml or
4606another XPath engine to find the matching elements in an XML or HTML document.")
4607 (license bsd-3)))
4608
4609(define-public python2-cssselect
4610 (package-with-python2 python-cssselect))
60357f99
AE
4611
4612(define-public python-netifaces
4613 (package
4614 (name "python-netifaces")
4615 (version "0.10.4")
4616 (source
4617 (origin
4618 (method url-fetch)
4619 (uri (string-append
4620 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4621 version
4622 ".tar.gz"))
4623 (sha256
4624 (base32
4625 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4626 (build-system python-build-system)
4627 (inputs
4628 `(("python-setuptools" ,python-setuptools)))
4629 (home-page
4630 "https://bitbucket.org/al45tair/netifaces")
4631 (synopsis
4632 "Python module for portable network interface information")
4633 (description
4634 "Netifaces is a Python module providing information on network
4635interfaces in an easy and portable manner.")
4636 (license license:expat)))
4637
4638(define-public python2-netifaces
4639 (package-with-python2 python-netifaces))
92cb152b 4640
32f77c04
RW
4641(define-public python-networkx
4642 (package
4643 (name "python-networkx")
4644 (version "1.9.1")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (string-append
4649 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4650 version ".tar.gz"))
4651 (sha256
4652 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4653 (build-system python-build-system)
4654 ;; python-decorator is needed at runtime
4655 (propagated-inputs
4656 `(("python-decorator" ,python-decorator)))
4657 (native-inputs
4658 `(("python-setuptools" ,python-setuptools)
4659 ("python-nose" ,python-nose)))
4660 (home-page "http://networkx.github.io/")
4661 (synopsis "Python module for creating and manipulating graphs and networks")
4662 (description
4663 "NetworkX is a Python package for the creation, manipulation, and study
4664of the structure, dynamics, and functions of complex networks.")
4665 (license bsd-3)))
4666
4667(define-public python2-networkx
4668 (package-with-python2 python-networkx))
4669
92cb152b
RW
4670(define-public snakemake
4671 (package
4672 (name "snakemake")
4673 (version "3.2.1")
4674 (source
4675 (origin
4676 (method url-fetch)
4677 (uri (string-append
4678 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4679 version ".tar.gz"))
4680 (sha256
4681 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4682 (build-system python-build-system)
4683 (inputs `(("python-setuptools" ,python-setuptools)))
4684 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4685 (synopsis "Python-based execution environment for make-like workflows")
4686 (description
4687 "Snakemake aims to reduce the complexity of creating workflows by
4688providing a clean and modern domain specific specification language (DSL) in
4689Python style, together with a fast and comfortable execution environment.")
4690 (license license:expat)))
a1920bc9 4691
35de1fbd
RW
4692(define-public python-seaborn
4693 (package
4694 (name "python-seaborn")
4695 (version "0.5.1")
4696 (source
4697 (origin
4698 (method url-fetch)
4699 (uri (string-append
4700 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4701 version ".tar.gz"))
4702 (sha256
4703 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4704 (build-system python-build-system)
4705 (propagated-inputs
4706 `(("python-pandas" ,python-pandas)
4707 ("python-matplotlib" ,python-matplotlib)
4708 ("python-scipy" ,python-scipy)))
4709 (native-inputs
4710 `(("python-setuptools" ,python-setuptools)))
4711 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4712 (synopsis "Statistical data visualization")
4713 (description
4714 "Seaborn is a library for making attractive and informative statistical
4715graphics in Python. It is built on top of matplotlib and tightly integrated
4716with the PyData stack, including support for numpy and pandas data structures
4717and statistical routines from scipy and statsmodels.")
4718 (license bsd-3)))
4719
4720(define-public python2-seaborn
4721 (let ((seaborn (package-with-python2 python-seaborn)))
4722 (package (inherit seaborn)
4723 (propagated-inputs
4724 `(("python2-pytz" ,python2-pytz)
dab8ebd9
FB
4725 ("python2-pandas" ,python2-pandas)
4726 ("python2-matplotlib" ,python2-matplotlib)
4727 ("python2-scipy" ,python2-scipy))))))
35de1fbd 4728
90fc547f
RW
4729(define-public python-sympy
4730 (package
4731 (name "python-sympy")
4732 (version "0.7.6")
4733 (source
4734 (origin
4735 (method url-fetch)
4736 (uri (string-append
4737 "https://github.com/sympy/sympy/releases/download/sympy-"
4738 version "/sympy-" version ".tar.gz"))
4739 (sha256
4740 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4741 (build-system python-build-system)
4742 (native-inputs
4743 `(("python-setuptools" ,python-setuptools)))
4744 (home-page "http://www.sympy.org/")
4745 (synopsis "Python library for symbolic mathematics")
4746 (description
4747 "SymPy is a Python library for symbolic mathematics. It aims to become a
4748full-featured computer algebra system (CAS) while keeping the code as simple
4749as possible in order to be comprehensible and easily extensible.")
4750 (license bsd-3)))
4751
4752(define-public python2-sympy
4753 (package-with-python2 python-sympy))
4754
a1920bc9
FB
4755(define-public python-testlib
4756 (package
4757 (name "python-testlib")
4758 (version "0.6.5")
4759 (source
4760 (origin
4761 (method url-fetch)
4762 (uri (string-append
4763 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4764 version ".zip"))
4765 (sha256
4766 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4767 (build-system python-build-system)
4768 (inputs
4769 `(("python-setuptools" ,python-setuptools)))
4770 (native-inputs
4771 `(("unzip" ,unzip)))
4772 (arguments
4773 `(#:phases
4774 (alist-replace
4775 'unpack
4776 (lambda* (#:key inputs outputs #:allow-other-keys)
4777 (let ((unzip (string-append (assoc-ref inputs "unzip")
4778 "/bin/unzip"))
4779 (source (assoc-ref inputs "source")))
4780 (and (zero? (system* unzip source))
4781 (chdir (string-append "testlib-" ,version)))))
4782 %standard-phases)))
4783 (synopsis "Python micro test suite harness")
4784 (description "A micro unittest suite harness for Python.")
4785 (home-page "https://github.com/trentm/testlib")
1cb9c006 4786 (license license:expat)))
a1920bc9
FB
4787
4788(define-public python2-testlib
4789 (package-with-python2 python-testlib))
db62afa5
LC
4790
4791(define-public python2-xlib
4792 (package
4793 (name "python2-xlib")
4794 (version "0.14")
4795 (source (origin
4796 (method url-fetch)
4797 (uri (string-append "mirror://sourceforge/python-xlib/"
4798 "python-xlib-" version ".tar.gz"))
4799 (sha256
4800 (base32
4801 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4802 (build-system python-build-system)
4803 (arguments
4804 `(#:python ,python-2 ;Python 2 only
4805 #:tests? #f)) ;no tests
4806 (inputs
4807 `(("python-setuptools" ,python-setuptools)))
4808 (home-page "http://python-xlib.sourceforge.net/")
4809 (synopsis "Python X11 client library")
4810 (description
4811 "The Python X Library is intended to be a fully functional X client
4812library for Python programs. It is useful to implement low-level X clients.
4813It is written entirely in Python.")
4814 (license gpl2+)))
0234ca06
DT
4815
4816(define-public python-singledispatch
4817 (package
4818 (name "python-singledispatch")
4819 (version "3.4.0.3")
4820 (source
4821 (origin
4822 (method url-fetch)
4823 (uri (string-append
4824 "https://pypi.python.org/packages/source/s/singledispatch/"
4825 "singledispatch-" version ".tar.gz"))
4826 (sha256
4827 (base32
4828 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4829 (build-system python-build-system)
4830 (native-inputs
4831 `(("python-setuptools" ,python-setuptools)))
4832 (propagated-inputs
4833 `(("python-six" ,python-six)))
4834 (home-page
4835 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4836 (synopsis "Backport of singledispatch feature from Python 3.4")
4837 (description
4838 "This library brings functools.singledispatch from Python 3.4 to Python
48392.6-3.3.")
4840 (license license:expat)))
4841
4842(define-public python2-singledispatch
4843 (package-with-python2 python-singledispatch))
feaae484 4844
310d218f
RW
4845(define-public python-tornado
4846 (package
4847 (name "python-tornado")
4848 (version "4.1")
4849 (source
4850 (origin
4851 (method url-fetch)
4852 (uri (string-append
4853 "https://pypi.python.org/packages/source/t/tornado/"
4854 "tornado-" version ".tar.gz"))
4855 (sha256
4856 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4857 (build-system python-build-system)
4858 (inputs
4859 `(("python-certifi" ,python-certifi)))
4860 (native-inputs
4861 `(("python-setuptools" ,python-setuptools)))
f4a4a718 4862 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4863 (synopsis "Python web framework and asynchronous networking library")
4864 (description
4865 "Tornado is a Python web framework and asynchronous networking library,
4866originally developed at FriendFeed. By using non-blocking network I/O,
4867Tornado can scale to tens of thousands of open connections, making it ideal
4868for long polling, WebSockets, and other applications that require a long-lived
4869connection to each user.")
4870 (license asl2.0)))
4871
4872(define-public python2-tornado
4873 (let ((tornado (package-with-python2 python-tornado)))
4874 (package (inherit tornado)
4875 (inputs
4876 `(("python2-backport-ssl-match-hostname"
4877 ,python2-backport-ssl-match-hostname)
4878 ,@(package-inputs tornado))))))
4879
feaae484
SB
4880(define-public python-waf
4881 (package
4882 (name "python-waf")
4883 (version "1.8.8")
4884 (source (origin
4885 (method url-fetch)
4886 (uri (string-append "https://waf.io/"
4887 "waf-" version ".tar.bz2"))
4888 (sha256
4889 (base32
4890 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4891 (build-system python-build-system)
4892 (arguments
4893 '(#:phases
4894 (modify-phases %standard-phases
4895 (replace 'build
4896 (lambda _
4897 (zero? (begin
4898 (system* "python" "waf-light" "configure")
4899 (system* "python" "waf-light" "build")))))
4900 (replace 'check
4901 (lambda _
4902 (zero? (system* "python" "waf" "--version"))))
4903 (replace 'install
4904 (lambda _
4905 (copy-file "waf" %output))))))
4906 (home-page "https://waf.io/")
4907 (synopsis "Python-based build system")
4908 (description
4909 "Waf is a Python-based framework for configuring, compiling and installing
4910applications.")
4911 (license bsd-3)))
4912
4913(define-public python2-waf
4914 (package-with-python2 python-waf))
45203542
RW
4915
4916(define-public python-pyzmq
4917 (package
4918 (name "python-pyzmq")
4919 (version "14.6.0")
4920 (source
4921 (origin
4922 (method url-fetch)
4923 (uri (string-append
4924 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4925 version ".tar.gz"))
4926 (sha256
4927 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4928 (build-system python-build-system)
4929 (arguments
4930 `(#:configure-flags
4931 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4932 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4933 ;; --inplace' for 'python setup.py test' to work.
4934 #:tests? #f))
4935 (inputs
4936 `(("zeromq" ,zeromq)))
4937 (native-inputs
4938 `(("pkg-config" ,pkg-config)
4939 ("python-nose" ,python-nose)
4940 ("python-setuptools" ,python-setuptools)))
4941 (home-page "http://github.com/zeromq/pyzmq")
4942 (synopsis "Python bindings for 0MQ")
4943 (description
4944 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4945 (license bsd-4)))
4946
4947(define-public python2-pyzmq
4948 (package-with-python2 python-pyzmq))
d889e6c4
CR
4949
4950(define-public python-pep8
4951 (package
4952 (name "python-pep8")
4953 (version "1.6.2")
4954 (source
4955 (origin
4956 (method url-fetch)
4957 (uri (string-append
4958 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4959 version
4960 ".tar.gz"))
4961 (sha256
4962 (base32
4963 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4964 (build-system python-build-system)
4965 (inputs
4966 `(("python-setuptools" ,python-setuptools)))
4967 (home-page "http://pep8.readthedocs.org/")
4968 (synopsis "Python style guide checker")
4969 (description
4970 "This tools checks Python code against some of the style conventions in
4971PEP 8.")
4972 (license license:expat)))
4973
4974(define-public python2-pep8
4975 (package-with-python2 python-pep8))
e31d7f44
CR
4976
4977(define-public python-pyflakes
4978 (package
4979 (name "python-pyflakes")
4980 (version "0.9.2")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (string-append
4985 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4986 version
4987 ".tar.gz"))
4988 (sha256
4989 (base32
4990 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
4991 (build-system python-build-system)
4992 (inputs
4993 `(("python-setuptools" ,python-setuptools)))
4994 (home-page
4995 "https://github.com/pyflakes/pyflakes")
4996 (synopsis "Passive checker of Python programs")
4997 (description
4998 "Pyflakes statically checks Python source code for common errors.")
4999 (license license:expat)))
a59e017c 5000
7261d9eb
CR
5001(define-public python2-pyflakes
5002 (package-with-python2 python-pyflakes))
5003
a59e017c
CR
5004(define-public python-mccabe
5005 (package
5006 (name "python-mccabe")
5007 (version "0.3.1")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (string-append
5012 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5013 version
5014 ".tar.gz"))
5015 (sha256
5016 (base32
5017 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5018 (build-system python-build-system)
5019 (inputs
5020 `(("python-setuptools" ,python-setuptools)))
5021 (home-page "https://github.com/flintwork/mccabe")
5022 (synopsis "McCabe checker, plugin for flake8")
5023 (description
5024 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5025complexity of Python source code.")
7362371d 5026 (license license:expat)))
a59e017c
CR
5027
5028(define-public python2-mccabe
5029 (package-with-python2 python-mccabe))
e8df8f47 5030
7477fbb1
CR
5031(define-public python-mccabe-0.2.1
5032 (package (inherit python-mccabe)
5033 (version "0.2.1")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "mccabe" version))
5038 (sha256
5039 (base32
5040 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5041
5042(define-public python2-mccabe-0.2.1
5043 (package-with-python2 python-mccabe-0.2.1))
5044
e8df8f47
CR
5045;; Flake8 2.4.1 requires an older version of pep8.
5046;; This should be removed ASAP.
5047(define-public python-pep8-1.5.7
5048 (package (inherit python-pep8)
5049 (version "1.5.7")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (string-append
5054 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5055 version
5056 ".tar.gz"))
5057 (sha256
5058 (base32
5059 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5060
5061(define-public python2-pep8-1.5.7
5062 (package-with-python2 python-pep8-1.5.7))
5063
5064;; Flake8 2.4.1 requires an older version of pyflakes.
5065;; This should be removed ASAP.
5066(define-public python-pyflakes-0.8.1
5067 (package (inherit python-pyflakes)
5068 (version "0.8.1")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (string-append
5073 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5074 version
5075 ".tar.gz"))
5076 (sha256
5077 (base32
5078 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5079
5080(define-public python2-pyflakes-0.8.1
7261d9eb 5081 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5082
5083(define-public python-flake8
5084 (package
5085 (name "python-flake8")
5086 (version "2.4.1")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (string-append
5091 "https://pypi.python.org/packages/source/f/flake8/flake8-"
5092 version
5093 ".tar.gz"))
5094 (sha256
5095 (base32
5096 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
5097 (build-system python-build-system)
5098 (inputs
5099 `(("python-setuptools" ,python-setuptools)
5100 ("python-pep8" ,python-pep8-1.5.7)
5101 ("python-pyflakes" ,python-pyflakes-0.8.1)
5102 ("python-mccabe" ,python-mccabe)
5103 ("python-mock" ,python-mock)
5104 ("python-nose" ,python-nose)))
5105 (home-page "https://gitlab.com/pycqa/flake8")
5106 (synopsis
5107 "The modular source code checker: pep8, pyflakes and co")
5108 (description
5109 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5110 (license license:expat)))
5111
5112(define-public python2-flake8
5113 (package-with-python2 python-flake8))
61b9ac53 5114
abf21efc
CR
5115;; This will only be needed by the python-hacking package and will not be
5116;; necessary once python-hacking > 0.10.2 is released.
5117(define-public python-flake8-2.2.4
5118 (package (inherit python-flake8)
5119 (inputs
5120 `(("python-setuptools" ,python-setuptools)
5121 ("python-pep8" ,python-pep8-1.5.7)
5122 ("python-pyflakes" ,python-pyflakes-0.8.1)
5123 ("python-mccabe" ,python-mccabe-0.2.1)
5124 ("python-mock" ,python-mock)
5125 ("python-nose" ,python-nose)))
5126 (version "2.2.4")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "flake8" version))
5131 (sha256
5132 (base32
5133 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5134
5135(define-public python2-flake8-2.2.4
5136 (package-with-python2 python-flake8-2.2.4))
5137
61b9ac53
FB
5138(define-public python-mistune
5139 (package
5140 (name "python-mistune")
5141 (version "0.7")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (string-append
5146 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5147 version
5148 ".tar.gz"))
5149 (sha256
5150 (base32
5151 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5152 (build-system python-build-system)
5153 (inputs
5154 `(("python-setuptools" ,python-setuptools)
5155 ("python-nose" ,python-nose)
5156 ("python-cython" ,python-cython)))
5157 (home-page "https://github.com/lepture/mistune")
5158 (synopsis "Markdown parser in pure Python")
5159 (description "This package provides a fast markdown parser in pure
5160Python.")
5161 (license bsd-3)))
5162
5163(define-public python2-mistune
5164 (package-with-python2 python-mistune))
6d992d07
FB
5165
5166(define-public python-ptyprocess
5167 (package
5168 (name "python-ptyprocess")
5169 (version "0.5")
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (string-append
5174 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5175 version ".tar.gz"))
5176 (sha256
5177 (base32
5178 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5179 (build-system python-build-system)
5180 (inputs
5181 `(("python-setuptools" ,python-setuptools)
5182 ("python-nose" ,python-nose)))
5183 (arguments
5184 `(#:phases
5185 (modify-phases %standard-phases
5186 (replace 'check
5187 (lambda _
5188 (zero? (system* "nosetests")))))))
5189 (home-page "https://github.com/pexpect/ptyprocess")
5190 (synopsis "Run a subprocess in a pseudo terminal")
5191 (description
5192 "This package provides a Python library used to launch a subprocess in a
5193pseudo terminal (pty), and interact with both the process and its pty.")
5194 (license isc)))
5195
5196(define-public python2-ptyprocess
5197 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5198
5199(define-public python-terminado
5200 (package
5201 (name "python-terminado")
5202 (version "0.5")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (string-append
5207 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5208 version ".tar.gz"))
5209 (sha256
5210 (base32
5211 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5212 (build-system python-build-system)
5213 (propagated-inputs
5214 `(("python-tornado" ,python-tornado)
5215 ("python-ptyprocess" ,python-ptyprocess)))
5216 (inputs
5217 `(("python-setuptools" ,python-setuptools)
5218 ("python-nose" ,python-nose)))
5219 (arguments
5220 `(#:phases
5221 (modify-phases %standard-phases
5222 (replace 'check
5223 (lambda _
5224 (zero? (system* "nosetests")))))))
5225 (home-page "https://github.com/takluyver/terminado")
5226 (synopsis "Terminals served to term.js using Tornado websockets")
5227 (description "This package provides a Tornado websocket backend for the
5228term.js Javascript terminal emulator library.")
5229 (license bsd-2)))
5230
5231(define-public python2-terminado
5232 (let ((terminado (package-with-python2 python-terminado)))
5233 (package (inherit terminado)
5234 (propagated-inputs
5235 `(("python2-tornado" ,python2-tornado)
5236 ("python2-backport-ssl-match-hostname"
5237 ,python2-backport-ssl-match-hostname)
5238 ,@(alist-delete "python-tornado"
5239 (package-propagated-inputs terminado)))))))
5faa5ce4 5240
d582eaac
SB
5241(define-public python-fonttools
5242 (package
5243 (name "python-fonttools")
5244 (version "2.5")
5245 (source (origin
5246 (method url-fetch)
5247 (uri (string-append
5248 "https://pypi.python.org/packages/source/F/FontTools/"
5249 "fonttools-" version ".tar.gz"))
5250 (sha256
5251 (base32
5252 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5253 (build-system python-build-system)
5254 (arguments '(#:test-target "check"))
5255 (propagated-inputs
5256 ;; XXX: module not found if setuptools is not available.
5257 `(("python-setuptools" ,python-setuptools)))
5258 (home-page "http://github.com/behdad/fonttools")
5259 (synopsis "Tools to manipulate font files")
5260 (description
5261 "FontTools/TTX is a library to manipulate font files from Python. It
5262supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5263of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5264also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5265from an XML-based format.")
5266 (license (non-copyleft "file://LICENSE.txt"
5267 "See LICENSE.txt in the distribution."))))
5268
5269(define-public python2-fonttools
5270 (package-with-python2 python-fonttools))
75710da6 5271
5faa5ce4
RW
5272(define-public python-ly
5273 (package
5274 (name "python-ly")
5275 (version "0.9.2")
5276 (source
5277 (origin
5278 (method url-fetch)
5279 (uri (string-append
5280 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5281 version ".tar.gz"))
5282 (sha256
5283 (base32
5284 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5285 (build-system python-build-system)
5286 (native-inputs
5287 `(("python-setuptools" ,python-setuptools)))
5288 (synopsis "Tool and library for manipulating LilyPond files")
5289 (description "This package provides a Python library to parse, manipulate
5290or create documents in LilyPond format. A command line program ly is also
5291provided that can be used to do various manipulations with LilyPond files.")
5292 (home-page "https://pypi.python.org/pypi/python-ly")
5293 (license gpl2+)))
7e7b27d9
CR
5294
5295(define-public python-appdirs
5296 (package
5297 (name "python-appdirs")
5298 (version "1.4.0")
5299 (source
5300 (origin
5301 (method url-fetch)
5302 (uri (string-append
5303 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5304 version
5305 ".tar.gz"))
5306 (sha256
5307 (base32
5308 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5309 (build-system python-build-system)
5310 (inputs
5311 `(("python-setuptools" ,python-setuptools)))
5312 (home-page "http://github.com/ActiveState/appdirs")
5313 (synopsis
5314 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5315 (description
5316 "This module provides a portable way of finding out where user data
5317should be stored on various operating systems.")
5318 (license license:expat)))
5319
5320(define-public python2-appdirs
5321 (package-with-python2 python-appdirs))
89b2e0b0
LF
5322
5323(define-public python-llfuse
5324 (package
5325 (name "python-llfuse")
5326 (version "0.41")
5327 (source (origin
5328 (method url-fetch)
5329 (uri (string-append
5330 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5331 "llfuse-" version ".tar.bz2"))
5332 (sha256
5333 (base32
5334 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5335 (build-system python-build-system)
5336 (inputs
5337 `(("fuse" ,fuse)
5338 ("attr" ,attr)))
5339 (native-inputs
5340 `(("pkg-config" ,pkg-config)
5341 ("python-setuptools" ,python-setuptools)))
5342 (synopsis "Python bindings for FUSE")
5343 (description
5344 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5345 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5346 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5347 ;; The rest of the package is licensed under LGPL2.0 or later.
5348 (license (list license:expat lgpl2.0+))))
5349
5350(define-public python2-llfuse
5351 (package-with-python2 python-llfuse))
641c9871
LF
5352
5353(define-public python-msgpack
5354 (package
5355 (name "python-msgpack")
5356 (version "0.4.6")
5357 (source (origin
5358 (method url-fetch)
5359 (uri (string-append
5360 "https://pypi.python.org/packages/source/m/"
5361 "msgpack-python/msgpack-python-" version ".tar.gz"))
5362 (sha256
5363 (base32
5364 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5365 (build-system python-build-system)
5366 (native-inputs
5367 `(("python-setuptools" ,python-setuptools)))
5368 (synopsis "MessagePack (de)serializer")
5369 (description "MessagePack is a fast, compact binary serialization format,
5370suitable for similar data to JSON. This package provides CPython bindings for
5371reading and writing MessagePack data.")
5372 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5373 (license asl2.0)))
5374
5375(define-public python2-msgpack
5376 (package-with-python2 python-msgpack))
6e5e39f4
CR
5377
5378(define-public python-netaddr
5379 (package
5380 (name "python-netaddr")
5381 (version "0.7.18")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (string-append
5386 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5387 version
5388 ".tar.gz"))
5389 (sha256
5390 (base32
5391 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5392 (build-system python-build-system)
5393 (arguments `(#:tests? #f)) ;; No tests.
5394 (inputs
5395 `(("python-setuptools" ,python-setuptools)))
5396 (home-page "https://github.com/drkjam/netaddr/")
5397 (synopsis "Pythonic manipulation of network addresses")
5398 (description
5399 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5400and MAC network addresses.")
5401 (license bsd-3)))
5402
5403(define-public python2-netaddr
5404 (package-with-python2 python-netaddr))
8c692a52
CR
5405
5406(define-public python-wrapt
5407 (package
5408 (name "python-wrapt")
5409 (version "1.10.5")
5410 (source
5411 (origin
5412 (method url-fetch)
5413 (uri (string-append
5414 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5415 version
5416 ".tar.gz"))
5417 (sha256
5418 (base32
5419 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5420 (build-system python-build-system)
5421 (arguments
5422 ;; Tests are not included in the tarball, they are only available in the
5423 ;; git repository.
5424 `(#:tests? #f))
5425 (inputs
5426 `(("python-setuptools" ,python-setuptools)))
5427 (home-page "https://github.com/GrahamDumpleton/wrapt")
5428 (synopsis "Module for decorators, wrappers and monkey patching")
5429 (description
5430 "The aim of the wrapt module is to provide a transparent object proxy for
5431 Python, which can be used as the basis for the construction of function
5432 wrappers and decorator functions.")
5433 (license bsd-2)))
5434
5435(define-public python2-wrapt
5436 (package-with-python2 python-wrapt))
b85c85be
CR
5437
5438(define-public python-iso8601
5439 (package
5440 (name "python-iso8601")
5441 (version "0.1.10")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (string-append
5446 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5447 version
5448 ".tar.gz"))
5449 (sha256
5450 (base32
5451 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5452 (build-system python-build-system)
5453 (inputs
5454 `(("python-setuptools" ,python-setuptools)))
5455 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5456 (synopsis "Module to parse ISO 8601 dates")
5457 (description
5458 "This module parses the most common forms of ISO 8601 date strings (e.g.
5459@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5460 (license license:expat)))
5461
5462(define-public python2-iso8601
5463 (package-with-python2 python-iso8601))
5e412b63
CR
5464
5465(define-public python-monotonic
5466 (package
5467 (name "python-monotonic")
5468 (version "0.3")
5469 (source
5470 (origin
5471 (method url-fetch)
5472 (uri (string-append
5473 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5474 version
5475 ".tar.gz"))
5476 (sha256
5477 (base32
5478 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5479 (build-system python-build-system)
5480 (inputs
5481 `(("python-setuptools" ,python-setuptools)))
5482 (home-page "https://github.com/atdt/monotonic")
5483 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5484 (description
5485 "This module provides a monotonic() function which returns the value (in
5486fractional seconds) of a clock which never goes backwards.")
5487 (license asl2.0)))
5488
5489(define-public python2-monotonic
5490 (package-with-python2 python-monotonic))
de34afac
CR
5491
5492(define-public python-webob
5493 (package
5494 (name "python-webob")
5495 (version "1.5.0b0")
5496 (source
5497 (origin
5498 (method url-fetch)
5499 (uri (string-append
5500 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
5501 version ".tar.gz"))
5502 (sha256
5503 (base32
5504 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
5505 (build-system python-build-system)
5506 (inputs
5507 `(("python-nose" ,python-nose)
5508 ("python-setuptools" ,python-setuptools)))
5509 (home-page "http://webob.org/")
5510 (synopsis "WSGI request and response object")
5511 (description
5512 "WebOb provides wrappers around the WSGI request environment, and an
5513object to help create WSGI responses.")
5514 (license license:expat)))
5515
5516(define-public python2-webob
5517 (package-with-python2 python-webob))
350ba0a3 5518
02a8a187
BW
5519(define-public python-xlrd
5520 (package
5521 (name "python-xlrd")
5522 (version "0.9.4")
5523 (source (origin
5524 (method url-fetch)
5525 (uri (string-append "https://pypi.python.org/packages/source/x/"
5526 "xlrd/xlrd-" version ".tar.gz"))
5527 (sha256
5528 (base32
5529 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5530 (build-system python-build-system)
5531 (arguments
5532 `(#:phases
5533 (modify-phases %standard-phases
5534 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5535 ;; run tests instead for now.
5536 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5537 (native-inputs `(("python-nose" ,python-nose)
5538 ("python-setuptools" ,python-setuptools)))
5539 (home-page "http://www.python-excel.org/")
5540 (synopsis "Library for extracting data from Excel files")
5541 (description "This packages provides a library to extract data from
5542spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5543@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5544Unicode-aware. It is not intended as an end-user tool.")
5545 (license bsd-3)))
5546
5547(define-public python2-xlrd
5548 (package-with-python2 python-xlrd))
5549
350ba0a3
CR
5550(define-public python-prettytable
5551 (package
5552 (name "python-prettytable")
5553 (version "0.7.2")
5554 (source
5555 (origin
5556 (method url-fetch)
5557 (uri (string-append
5558 "https://pypi.python.org/packages/source/P/PrettyTable/"
5559 "prettytable-" version ".tar.bz2"))
5560 (sha256
5561 (base32
5562 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5563 (build-system python-build-system)
5564 (inputs
5565 `(("python-setuptools" ,python-setuptools)))
5566 (home-page "http://code.google.com/p/prettytable/")
5567 (synopsis "Display tabular data in an ASCII table format")
5568 (description
5569 "A library designed to represent tabular data in visually appealing ASCII
5570tables. PrettyTable allows for selection of which columns are to be printed,
5571independent alignment of columns (left or right justified or centred) and
5572printing of sub-tables by specifying a row range.")
5573 (license bsd-3)))
5574
5575(define-public python2-prettytable
5576 (package-with-python2 python-prettytable))
7a8ac75a
RW
5577
5578(define-public python-pyasn1
5579 (package
5580 (name "python-pyasn1")
5581 (version "0.1.8")
5582 (source
5583 (origin
5584 (method url-fetch)
5585 (uri (string-append "https://pypi.python.org/packages/source/p/"
5586 "pyasn1/pyasn1-" version ".tar.gz"))
5587 (sha256
5588 (base32
5589 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5590 (build-system python-build-system)
5591 (home-page "http://pyasn1.sourceforge.net/")
5592 (synopsis "ASN.1 types and codecs")
5593 (description
5594 "This is an implementation of ASN.1 types and codecs in Python. It is
5595suitable for a wide range of protocols based on the ASN.1 specification.")
5596 (license bsd-2)))
5597
5598(define-public python2-pyasn1
5599 (package-with-python2 python-pyasn1))
9a49a535
RW
5600
5601(define-public python2-ipaddress
5602 (package
5603 (name "python2-ipaddress")
5604 (version "1.0.14")
5605 (source
5606 (origin
5607 (method url-fetch)
5608 (uri (string-append "https://pypi.python.org/packages/source/i/"
5609 "ipaddress/ipaddress-" version ".tar.gz"))
5610 (sha256
5611 (base32
5612 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5613 (build-system python-build-system)
5614 (arguments
5615 `(#:tests? #f ; no tests
5616 #:python ,python-2))
5617 (home-page "https://github.com/phihag/ipaddress")
5618 (synopsis "IP address manipulation library")
5619 (description
5620 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5621in Python. This library is used to create, poke at, and manipulate IPv4 and
5622IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5623module to older versions of Python.")
5624 (license psfl)))
3f00e078
RW
5625
5626(define-public python-idna
5627 (package
5628 (name "python-idna")
5629 (version "2.0")
5630 (source
5631 (origin
5632 (method url-fetch)
5633 (uri (string-append "https://pypi.python.org/packages/source/i/"
5634 "idna/idna-" version ".tar.gz"))
5635 (sha256
5636 (base32
5637 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5638 (build-system python-build-system)
5639 (native-inputs
5640 `(("python-setuptools" ,python-setuptools)))
5641 (home-page "https://github.com/kjd/idna")
5642 (synopsis "Internationalized domain names in applications")
5643 (description
5644 "This is a library to support the Internationalised Domain Names in
5645Applications (IDNA) protocol as specified in RFC 5891. This version of the
5646protocol is often referred to as “IDNA2008” and can produce different results
5647from the earlier standard from 2003. The library is also intended to act as a
5648suitable drop-in replacement for the “encodings.idna” module that comes with
5649the Python standard library but currently only supports the older 2003
5650specification.")
5651 (license bsd-4)))
5652
5653(define-public python2-idna
5654 (package-with-python2 python-idna))
36ebf972
RW
5655
5656(define-public python-pretend
5657 (package
5658 (name "python-pretend")
5659 (version "1.0.8")
5660 (source
5661 (origin
5662 (method url-fetch)
5663 (uri (string-append "https://pypi.python.org/packages/source/p/"
5664 "pretend/pretend-" version ".tar.gz"))
5665 (sha256
5666 (base32
5667 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5668 (build-system python-build-system)
5669 (native-inputs
5670 `(("python-setuptools" ,python-setuptools)))
5671 (home-page "https://github.com/alex/pretend")
5672 (synopsis "Library for stubbing in Python")
5673 (description
5674 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5675technique for writing tests. You may hear the term mixed up with mocks,
5676fakes, or doubles. Basically, a stub is an object that returns pre-canned
5677responses, rather than doing any computation.")
5678 (license bsd-3)))
5679
5680(define-public python2-pretend
5681 (package-with-python2 python-pretend))
aa759a51
RW
5682
5683(define-public python-cryptography-vectors
5684 (package
5685 (name "python-cryptography-vectors")
3698a775 5686 (version "1.0.2")
aa759a51
RW
5687 (source
5688 (origin
5689 (method url-fetch)
5690 (uri (string-append "https://pypi.python.org/packages/source/c/"
5691 "cryptography-vectors/cryptography_vectors-"
5692 version ".tar.gz"))
5693 (sha256
5694 (base32
3698a775 5695 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
aa759a51
RW
5696 (build-system python-build-system)
5697 (native-inputs
5698 `(("python-setuptools" ,python-setuptools)))
5699 (home-page "https://github.com/pyca/cryptography")
5700 (synopsis "Test vectors for the cryptography package.")
5701 (description
5702 "This package contains test vectors for the cryptography package.")
5703 ;; Distributed under either BSD-3 or ASL2.0
5704 (license (list bsd-3 asl2.0))))
5705
5706(define-public python2-cryptography-vectors
5707 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5708
5709(define-public python-cryptography
5710 (package
5711 (name "python-cryptography")
7f51b663 5712 (version "1.0.2")
88b47cb0
RW
5713 (source
5714 (origin
5715 (method url-fetch)
5716 (uri (string-append "https://pypi.python.org/packages/source/c/"
5717 "cryptography/cryptography-" version ".tar.gz"))
5718 (sha256
5719 (base32
7f51b663 5720 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
88b47cb0
RW
5721 (build-system python-build-system)
5722 (inputs
5723 `(("openssl" ,openssl)))
5724 (propagated-inputs
5725 `(("python-cffi" ,python-cffi)
5726 ("python-six" ,python-six)
5727 ("python-pyasn1" ,python-pyasn1)
5728 ("python-enum34" ,python-enum34)
5729 ("python-idna" ,python-idna)
5730 ("python-iso8601" ,python-iso8601)))
5731 (native-inputs
5732 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5733 ("python-setuptools" ,python-setuptools)
5734 ("python-pretend" ,python-pretend)
5735 ("python-pytest" ,python-pytest)))
5736 (home-page "https://github.com/pyca/cryptography")
5737 (synopsis "Cryptographic recipes and primitives for Python")
5738 (description
5739 "cryptography is a package which provides cryptographic recipes and
5740primitives to Python developers. It aims to be the “cryptographic standard
5741library” for Python. The package includes both high level recipes, and low
5742level interfaces to common cryptographic algorithms such as symmetric ciphers,
5743message digests and key derivation functions.")
5744 ;; Distributed under either BSD-3 or ASL2.0
5745 (license (list bsd-3 asl2.0))))
5746
5747(define-public python2-cryptography
5748 (let ((crypto (package-with-python2 python-cryptography)))
5749 (package (inherit crypto)
5750 (propagated-inputs
5751 `(("python2-ipaddress" ,python2-ipaddress)
5752 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5753
5754(define-public python-pyopenssl
5755 (package
5756 (name "python-pyopenssl")
5757 (version "0.15.1")
5758 (source
5759 (origin
5760 (method url-fetch)
5761 (uri (string-append "https://pypi.python.org/packages/source/p/"
5762 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5763 (sha256
5764 (base32
5765 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5766 (build-system python-build-system)
5767 (arguments
5768 `(#:phases
5769 (modify-phases %standard-phases
5770 (add-after 'unpack 'fix-tests
5771 (lambda* (#:key inputs #:allow-other-keys)
5772 (substitute* "OpenSSL/test/test_ssl.py"
5773 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5774 "return True")
5775 ;; FIXME: disable broken test
5776 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5777 (substitute* "OpenSSL/test/test_crypto.py"
5778 (("command = b\"openssl \"")
5779 (string-append "command = b\""
5780 (assoc-ref inputs "openssl")
5781 "/bin/openssl" " \""))
5782 ;; FIXME: disable four broken tests
5783 (("test_der") "disabled__der")
5784 (("test_digest") "disabled__digest")
5785 (("test_get_extension") "disabled__get_extension")
5786 (("test_extension_count") "disabled__extension_count"))
5787 #t)))))
5788 (propagated-inputs
5789 `(("python-cryptography" ,python-cryptography)
5790 ("python-six" ,python-six)))
5791 (inputs
5792 `(("openssl" ,openssl)))
5793 (native-inputs
5794 `(("python-setuptools" ,python-setuptools)))
5795 (home-page "https://github.com/pyca/pyopenssl")
5796 (synopsis "Python wrapper module around the OpenSSL library")
5797 (description
5798 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5799library.")
5800 (license asl2.0)))
5801
5802(define-public python2-pyopenssl
5803 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5804 (package (inherit pyopenssl)
5805 (propagated-inputs
5806 `(("python2-cryptography" ,python2-cryptography)
5807 ,@(alist-delete "python-cryptography"
5808 (package-propagated-inputs pyopenssl)))))))
643725a1
CR
5809
5810(define-public python-pip
5811 (package
5812 (name "python-pip")
5813 (version "7.1.2")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (string-append
5818 "https://pypi.python.org/packages/source/p/pip/pip-"
5819 version ".tar.gz"))
5820 (sha256
5821 (base32
5822 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5823 (build-system python-build-system)
5824 (inputs
5825 `(("python-setuptools" ,python-setuptools)
5826 ("python-virtualenv" ,python-virtualenv)
5827 ;; Tests
5828 ("python-mock" ,python-mock)
5829 ("python-pytest" ,python-pytest)
5830 ("python-scripttest" ,python-scripttest)))
5831 (home-page "https://pip.pypa.io/")
5832 (synopsis
5833 "Package manager for Python software")
5834 (description
5835 "Pip is a package manager for Python software, that finds packages on the
5836Python Package Index (PyPI).")
5837 (license license:expat)))
5838
5839(define-public python2-pip
5840 (package-with-python2 python-pip))
d8c4998f
LC
5841
5842(define-public python-tlsh
5843 (package
5844 (name "python-tlsh")
5845 (version "3.4.1") ;according to CMakeLists.txt
5846 (home-page "https://github.com/trendmicro/tlsh")
5847 (source (origin
5848 (method git-fetch)
5849 (uri (git-reference
5850 (url home-page)
5851 ;; This is a commit right after 3.4.1; see
5852 ;; <https://github.com/trendmicro/tlsh/issues/9>.
5853 (commit "3ae3f1f")))
5854 (sha256
5855 (base32
5856 "12cvnr5ndm5cg6i7lch93id90kgwgrigjgrj8f186nh3h4bf9chj"))
5857 (file-name (string-append name "-" version "-checkout"))))
5858 (build-system cmake-build-system)
5859 (arguments
5860 '(#:out-of-source? #f
5861 #:phases (modify-phases %standard-phases
5862 (replace
5863 'install
5864 (lambda* (#:key outputs #:allow-other-keys)
5865 ;; Build and install the Python bindings. The underlying
5866 ;; C++ library is apparently not meant to be installed.
5867 (let ((out (assoc-ref outputs "out")))
5868 (with-directory-excursion "py_ext"
5869 (and (system* "python" "setup.py" "build")
5870 (system* "python" "setup.py" "install"
5871 (string-append "--prefix=" out))))))))))
5872 (inputs `(("python" ,python-wrapper))) ;for the bindings
5873 (synopsis "Fuzzy matching library for Python")
5874 (description
5875 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5876Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5877value which can be used for similarity comparisons. Similar objects have
5878similar hash values, which allows for the detection of similar objects by
5879comparing their hash values. The byte stream should have a sufficient amount
5880of complexity; for example, a byte stream of identical bytes will not generate
5881a hash value.")
5882 (license asl2.0)))
5883
5884(define-public python2-tlsh
5885 (package
5886 (inherit python-tlsh)
5887 (name "python2-tlsh")
5888 (inputs `(("python" ,python-2)))))
d96034ed
LC
5889
5890(define-public python-libarchive-c
5891 (package
5892 (name "python-libarchive-c")
5893 (version "2.1")
5894 (source (origin
5895 (method url-fetch)
5896 (uri (string-append
5897 "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-"
5898 version ".tar.gz"))
5899 (sha256
5900 (base32
5901 "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n"))))
5902 (build-system python-build-system)
5903 (arguments
5904 '(#:phases (modify-phases %standard-phases
5905 (add-before
5906 'build 'reference-libarchive
5907 (lambda* (#:key inputs #:allow-other-keys)
5908 ;; Retain the absolute file name of libarchive.so.
5909 (let ((libarchive (assoc-ref inputs "libarchive")))
5910 (substitute* "libarchive/ffi.py"
5911 (("find_library\\('archive'\\)")
5912 (string-append "'" libarchive
5913 "/lib/libarchive.so'"))))
5914
5915 ;; Do not make a compressed egg (see
5916 ;; <http://bugs.gnu.org/20765>).
5917 (let ((port (open-file "setup.cfg" "a")))
5918 (display "\n[easy_install]\nzip_ok = 0\n"
5919 port)
5920 (close-port port)
5921 #t))))))
5922 (inputs
5923 `(("python-setuptools" ,python-setuptools)
5924 ("libarchive" ,libarchive)))
5925 (home-page "https://github.com/Changaco/python-libarchive-c")
5926 (synopsis "Python interface to libarchive")
5927 (description
5928 "This package provides Python bindings to libarchive, a C library to
5929access possibly compressed archives in many different formats. It uses
5930Python's @code{ctypes} foreign function interface (FFI).")
5931 (license lgpl2.0+)))
5932
5933(define-public python2-libarchive-c
5934 (package-with-python2 python-libarchive-c))
5e1c9367
LC
5935
5936(define-public python-file
5937 (package
5938 (inherit file)
5939 (name "python-file")
5940 (build-system python-build-system)
5941 (arguments
5942 '(#:tests? #f ;no tests
5943 #:phases (modify-phases %standard-phases
5944 (add-before 'build 'change-directory
5945 (lambda _
5946 (chdir "python")
5947 #t))
5948 (add-before 'build 'set-library-file-name
5949 (lambda* (#:key inputs #:allow-other-keys)
5950 (let ((file (assoc-ref inputs "file")))
5951 (substitute* "magic.py"
5952 (("find_library\\('magic'\\)")
5953 (string-append "'" file "/lib/libmagic.so'")))
5954 #t))))))
5955 (inputs `(("file" ,file)))
5956 (self-native-input? #f)
5957 (synopsis "Python bindings to the libmagic file type guesser")))
5958
5959(define-public python2-file
5960 (package-with-python2 python-file))
85d4aeac
LC
5961
5962(define-public python-debian
5963 (package
5964 (name "python-debian")
5965 (version "0.1.23")
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (string-append
5970 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
5971 version ".tar.gz"))
5972 (sha256
5973 (base32
5974 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
5975 (build-system python-build-system)
5976 (inputs
5977 `(("python-six" ,python-six)))
5978 (native-inputs
5979 `(("python-setuptools" ,python-setuptools)))
5980 (home-page "http://packages.debian.org/sid/python-debian")
5981 (synopsis "Debian package related modules")
5982 (description
5c7bdc9a
LC
5983 ;; XXX: Use @enumerate instead of @itemize to work around
5984 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
5985 "This package provides Python modules that abstract many formats of
5986Debian-related files, such as:
5987
5c7bdc9a 5988@enumerate
85d4aeac
LC
5989@item Debtags information;
5990@item @file{debian/changelog} files;
5991@item packages files, pdiffs;
5992@item control files of single or multiple RFC822-style paragraphs---e.g.
5993 @file{debian/control}, @file{.changes}, @file{.dsc};
5994@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
5995 contained files and meta-information.
5c7bdc9a 5996@end enumerate\n")
85d4aeac
LC
5997
5998 ;; Modules are either GPLv2+ or GPLv3+.
5999 (license gpl3+)))
6000
6001(define-public python2-debian
6002 (package-with-python2 python-debian))
816a6538
LC
6003
6004(define-public python-chardet
6005 (package
6006 (name "python-chardet")
6007 (version "2.3.0")
6008 (source
6009 (origin
6010 (method url-fetch)
6011 (uri (string-append
6012 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6013 version
6014 ".tar.gz"))
6015 (sha256
6016 (base32
6017 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6018 (build-system python-build-system)
6019 (native-inputs
6020 `(("python-setuptools" ,python-setuptools)))
6021 (home-page "https://github.com/chardet/chardet")
6022 (synopsis "Universal encoding detector for Python 2 and 3")
6023 (description
6024 "This package provides @code{chardet}, a Python module that can
6025automatically detect a wide range of file encodings.")
6026 (license lgpl2.1+)))
6027
6028(define-public python2-chardet
6029 (package-with-python2 python-chardet))
2fc5f186 6030
1872f1bb
KM
6031(define-public python-docopt
6032 (package
6033 (name "python-docopt")
6034 (version "0.6.2")
6035 (source
6036 (origin
6037 (method url-fetch)
6038 ;; The release on PyPI does not include tests.
6039 (uri (string-append
6040 "https://github.com/docopt/docopt/archive/"
6041 version ".tar.gz"))
6042 (file-name (string-append name "-" version ".tar.gz"))
6043 (sha256
6044 (base32
6045 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6046 (build-system python-build-system)
6047 (native-inputs
6048 `(("python-pytest" ,python-pytest)
6049 ("python-setuptools" ,python-setuptools)))
6050 (arguments
6051 `(#:phases (alist-replace
6052 'check
6053 (lambda _ (zero? (system* "py.test")))
6054 %standard-phases)))
6055 (home-page "http://docopt.org")
6056 (synopsis "Command-line interface description language for Python")
6057 (description "This library allows the user to define a command-line
6058interface from a program's help message rather than specifying it
6059programatically with command-line parsers like @code{getopt} and
6060@code{argparse}.")
6061 (license license:expat)))
6062
6063(define-public python2-docopt
6064 (package-with-python2 python-docopt))
6065
2fc5f186
LF
6066(define-public python-zope-event
6067 (package
6068 (name "python-zope-event")
6069 (version "4.1.0")
6070 (source
6071 (origin
6072 (method url-fetch)
6073 (uri (string-append "https://pypi.python.org/packages/source/z"
6074 "/zope.event/zope.event-" version ".tar.gz"))
6075 (sha256
6076 (base32
6077 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6078 (build-system python-build-system)
6079 (inputs
6080 `(("python-setuptools" ,python-setuptools)))
6081 (home-page "http://pypi.python.org/pypi/zope.event")
6082 (synopsis "Event publishing system for Python")
6083 (description "Zope.event provides an event publishing API, intended for
6084use by applications which are unaware of any subscribers to their events. It
6085is a simple event-dispatching system on which more sophisticated event
6086dispatching systems can be built.")
6087 (license zpl2.1)))
6088
6089(define-public python2-zope-event
6090 (package-with-python2 python-zope-event))
97abe268
LF
6091
6092(define-public python-zope-interface
6093 (package
6094 (name "python-zope-interface")
6095 (version "4.1.3")
6096 (source
6097 (origin
6098 (method url-fetch)
6099 (uri (string-append "https://pypi.python.org/packages/source/z"
6100 "/zope.interface/zope.interface-" version ".tar.gz"))
6101 (sha256
6102 (base32
6103 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6104 (build-system python-build-system)
6105 (propagated-inputs
6106 `(("python-zope-event" ,python-zope-event)))
6107 (home-page "https://github.com/zopefoundation/zope.interface")
6108 (synopsis "Python implementation of the \"design by contract\"
6109methodology")
6110 (description "Zope.interface provides an implementation of \"object
6111interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6112conforming to a given API or contract.")
6113 (license zpl2.1)))
6114
6115(define-public python2-zope-interface
6116 (package-with-python2 python-zope-interface))
81f2373c
LF
6117
6118(define-public python-zope-exceptions
6119 (package
6120 (name "python-zope-exceptions")
6121 (version "4.0.8")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (string-append "https://pypi.python.org/packages/source/z"
6126 "/zope.exceptions/zope.exceptions-"
6127 version ".tar.gz"))
6128 (sha256
6129 (base32
6130 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6131 (build-system python-build-system)
6132 (arguments
6133 '(#:tests? #f)) ; circular dependency with zope.testrunner
6134 (propagated-inputs
6135 `(("python-zope-interface" ,python-zope-interface)))
6136 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6137 (synopsis "Zope exceptions")
6138 (description "Zope.exceptions provides general-purpose exception types
6139that have uses outside of the Zope framework.")
6140 (license zpl2.1)))
6141
6142(define-public python2-zope-exceptions
6143 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6144
6145(define-public python-zope-testing
6146 (package
6147 (name "python-zope-testing")
6148 (version "4.5.0")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (string-append "https://pypi.python.org/packages/source/z"
6153 "/zope.testing/zope.testing-" version ".tar.gz"))
6154 (sha256
6155 (base32
6156 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6157 (build-system python-build-system)
6158 (native-inputs
6159 `(("python-zope-exceptions" ,python-zope-exceptions)))
6160 (propagated-inputs
6161 `(("python-zope-interface" ,python-zope-interface)))
6162 (home-page "http://pypi.python.org/pypi/zope.testing")
6163 (synopsis "Zope testing helpers")
6164 (description "Zope.testing provides a number of testing utilities for HTML
6165forms, HTTP servers, regular expressions, and more.")
6166 (license zpl2.1)))
6167
6168(define-public python2-zope-testing
6169 (package-with-python2 python-zope-testing))
01614c4f
LF
6170
6171(define-public python-zope-testrunner
6172 (package
6173 (name "python-zope-testrunner")
6174 (version "4.4.9")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (string-append "https://pypi.python.org/packages/source/z"
6179 "/zope.testrunner/zope.testrunner-"
6180 version ".zip"))
6181 (sha256
6182 (base32
6183 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6184 (build-system python-build-system)
6185 (native-inputs
6186 `(("python-six" ,python-six)
6187 ("python-zope-exceptions" ,python-zope-exceptions)
6188 ("python-zope-testing" ,python-zope-testing)
6189 ("unzip" ,unzip)))
6190 (propagated-inputs
6191 `(("python-zope-interface" ,python-zope-interface)))
6192 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6193 (synopsis "Zope testrunner script")
6194 (description "Zope.testrunner provides a script for running Python
6195tests.")
6196 (license zpl2.1)))
6197
6198(define-public python2-zope-testrunner
6199 (let ((base (package-with-python2 python-zope-testrunner)))
6200 (package
6201 (inherit base)
6202 (native-inputs
6203 (append (package-native-inputs base)
6204 `(("python2-subunit" ,python2-subunit)
6205 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6206
6207(define-public python-zope-i18nmessageid
6208 (package
6209 (name "python-zope-i18nmessageid")
6210 (version "4.0.3")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (string-append
6215 "https://pypi.python.org/packages/source/z"
6216 "/zope.i18nmessageid/zope.i18nmessageid-"
6217 version ".tar.gz"))
6218 (sha256
6219 (base32
6220 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6221 (build-system python-build-system)
6222 (inputs
6223 `(("python-setuptools" ,python-setuptools)))
6224 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6225 (synopsis "Message identifiers for internationalization")
6226 (description "Zope.i18nmessageid provides facilities for declaring
6227internationalized messages within program source text.")
6228 (license zpl2.1)))
6229
6230(define-public python2-zope-i18nmessageid
6231 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6232
6233(define-public python-zope-schema
6234 (package
6235 (name "python-zope-schema")
6236 (version "4.4.2")
6237 (source
6238 (origin
6239 (method url-fetch)
6240 (uri (string-append "https://pypi.python.org/packages/source/z"
6241 "/zope.schema/zope.schema-" version ".tar.gz"))
6242 (sha256
6243 (base32
6244 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6245 (build-system python-build-system)
6246 (propagated-inputs
6247 `(("python-zope-event" ,python-zope-event)
6248 ("python-zope-interface" ,python-zope-interface)))
6249 (native-inputs
6250 `(("python-zope-testing" ,python-zope-testing)))
6251 (home-page "http://pypi.python.org/pypi/zope.schema")
6252 (synopsis "Zope data schemas")
6253 (description "Zope.scheme provides extensions to zope.interface for
6254defining data schemas.")
6255 (license zpl2.1)))
6256
6257(define-public python2-zope-schema
6258 (package-with-python2 python-zope-schema))
fbac9b17
LF
6259
6260(define-public python-zope-configuration
6261 (package
6262 (name "python-zope-configuration")
6263 (version "4.0.3")
6264 (source (origin
6265 (method url-fetch)
6266 (uri (string-append "https://pypi.python.org/packages/source/z"
6267 "/zope.configuration/zope.configuration-"
6268 version ".tar.gz"))
6269 (sha256
6270 (base32
6271 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6272 (build-system python-build-system)
6273 (propagated-inputs
6274 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6275 ("python-zope-schema" ,python-zope-schema)))
6276 (home-page "http://pypi.python.org/pypi/zope.configuration")
6277 (synopsis "Zope Configuration Markup Language")
6278 (description "Zope.configuration implements ZCML, the Zope Configuration
6279Markup Language.")
6280 (license zpl2.1)))
6281
6282(define-public python2-zope-configuration
6283 (package-with-python2 python-zope-configuration))
2ad52086
LF
6284
6285(define-public python-zope-proxy
6286 (package
6287 (name "python-zope-proxy")
6288 (version "4.1.6")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (string-append "https://pypi.python.org/packages/source/z"
6293 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6294 (sha256
6295 (base32
6296 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6297 (build-system python-build-system)
6298 (propagated-inputs
6299 `(("python-zope-interface" ,python-zope-interface)))
6300 (home-page "http://pypi.python.org/pypi/zope.proxy")
6301 (synopsis "Generic, transparent proxies")
6302 (description "Zope.proxy provides generic, transparent proxies for Python.
6303Proxies are special objects which serve as mostly-transparent wrappers around
6304another object, intervening in the apparent behavior of the wrapped object
6305only when necessary to apply the policy (e.g., access checking, location
6306brokering, etc.) for which the proxy is responsible.")
6307 (license zpl2.1)))
6308
6309(define-public python2-zope-proxy
6310 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6311
6312(define-public python-zope-location
6313 (package
6314 (name "python-zope-location")
6315 (version "4.0.3")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (string-append "https://pypi.python.org/packages/source/z"
6320 "/zope.location/zope.location-" version ".tar.gz"))
6321 (sha256
6322 (base32
6323 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6324 (build-system python-build-system)
6325 (native-inputs
6326 `(("python-zope-proxy" ,python-zope-proxy)
6327 ("python-zope-schema" ,python-zope-schema)))
6328 (home-page "http://pypi.python.org/pypi/zope.location/")
6329 (synopsis "Zope location library")
6330 (description "Zope.location implements the concept of \"locations\" in
6331Zope3, which are are special objects that have a structural location.")
6332 (license zpl2.1)))
6333
6334(define-public python2-zope-location
6335 (package-with-python2 python-zope-location))
d4b77f36
LF
6336
6337(define-public python-zope-security
6338 (package
6339 (name "python-zope-security")
6340 (version "4.0.3")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (string-append "https://pypi.python.org/packages/source/z"
6345 "/zope.security/zope.security-" version ".tar.gz"))
6346 (sha256
6347 (base32
6348 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6349 (build-system python-build-system)
6350 (propagated-inputs
6351 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6352 ("python-zope-component" ,python-zope-component)
6353 ("python-zope-location" ,python-zope-location)
6354 ("python-zope-proxy" ,python-zope-proxy)
6355 ("python-zope-schema" ,python-zope-schema)
6356 ("python-zope-testrunner" ,python-zope-testrunner)
6357 ("python-zope-testing" ,python-zope-testing)))
6358 (home-page "http://pypi.python.org/pypi/zope.security")
6359 (synopsis "Zope security framework")
6360 (description "Zope.security provides a generic mechanism to implement
6361security policies on Python objects.")
6362 (license zpl2.1)))
6363
6364(define-public python2-zope-security
04417662
EF
6365 (let ((zope-security (package-with-python2 python-zope-security)))
6366 (package (inherit zope-security)
6367 (propagated-inputs
6368 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6369 ,@(alist-delete
6370 "python-zope-testrunner"
6371 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6372
6373(define-public python-zope-component
6374 (package
6375 (name "python-zope-component")
6376 (version "4.2.2")
6377 (source
6378 (origin
6379 (method url-fetch)
6380 (uri (string-append "https://pypi.python.org/packages/source/z"
6381 "/zope.component/zope.component-" version ".tar.gz"))
6382 (sha256
6383 (base32
6384 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6385 (build-system python-build-system)
6386 (arguments
6387 ;; Skip tests due to circular dependency with python-zope-security.
6388 '(#:tests? #f))
6389 (native-inputs
6390 `(("python-zope-testing" ,python-zope-testing)))
6391 (propagated-inputs
6392 `(("python-zope-event" ,python-zope-event)
6393 ("python-zope-interface" ,python-zope-interface)
6394 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6395 ("python-zope-configuration" ,python-zope-configuration)))
6396 (home-page "https://github.com/zopefoundation/zope.component")
6397 (synopsis "Zope Component Architecture")
6398 (description "Zope.component represents the core of the Zope Component
6399Architecture. Together with the zope.interface package, it provides
6400facilities for defining, registering and looking up components.")
6401 (license zpl2.1)))
6402
6403(define-public python2-zope-component
6404 (package-with-python2 python-zope-component))
3859ac12 6405
b5f218be
LF
6406(define-public python2-pythondialog
6407 (package
6408 (name "python2-pythondialog")
6409 (version "3.3.0")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (string-append "https://pypi.python.org/packages/source/p/"
6414 "python2-pythondialog/python2-pythondialog-"
6415 version ".tar.gz"))
6416 (sha256
6417 (base32
6418 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6419 (build-system python-build-system)
6420 (arguments
6421 `(#:phases
6422 (modify-phases %standard-phases
6423 (add-after 'unpack 'patch-path
6424 (lambda* (#:key inputs #:allow-other-keys)
6425 (let* ((dialog (assoc-ref inputs "dialog")))
6426 ;; Since this library really wants to grovel the search path, we
6427 ;; must hardcode dialog's store path into it.
6428 (substitute* "dialog.py"
6429 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6430 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6431 #t))))
6432 #:python ,python-2
6433 #:tests? #f)) ; no test suite
6434 (propagated-inputs
6435 `(("dialog" ,dialog)))
6436 (home-page "http://pythondialog.sourceforge.net/")
6437 (synopsis "Python interface to the UNIX dialog utility")
6438 (description "A Python wrapper for the dialog utility. Its purpose is to
6439provide an easy to use, pythonic and comprehensive Python interface to dialog.
6440This allows one to make simple text-mode user interfaces on Unix-like systems")
6441 (license lgpl2.1)))
6442
3859ac12
LF
6443(define-public python-pyrfc3339
6444 (package
6445 (name "python-pyrfc3339")
6446 (version "0.2")
6447 (source
6448 (origin
6449 (method url-fetch)
6450 (uri (string-append "https://pypi.python.org/packages/source/p/"
6451 "pyRFC3339/pyRFC3339-" version ".tar.gz"))
6452 (sha256
6453 (base32
6454 "1pp648xsjaw9h1xq2mgwzda5wis2ypjmzxlksc1a8grnrdmzy155"))))
6455 (build-system python-build-system)
6456 (propagated-inputs
6457 `(("python-pytz" ,python-pytz)))
6458 (native-inputs
6459 `(("python-nose" ,python-nose)
6460 ("python-setuptools" ,python-setuptools)))
6461 (home-page "https://github.com/kurtraschke/pyRFC3339")
6462 (synopsis "Python timestamp library")
6463 (description "Python library for generating and parsing RFC 3339-compliant
6464timestamps.")
6465 (license license:expat)))
6466
6467(define-public python2-pyrfc3339
6468 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6469
6470(define-public python-werkzeug
6471 (package
6472 (name "python-werkzeug")
6473 (version "0.11.2")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6478 "/Werkzeug-" version ".tar.gz"))
6479 (file-name (string-append name "-" version ".tar.gz"))
6480 (sha256
6481 (base32
6482 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6483 (build-system python-build-system)
6484 (native-inputs
6485 `(("python-pytest" ,python-pytest)))
6486 (home-page "http://werkzeug.pocoo.org/")
6487 (synopsis "Utilities for WSGI applications")
6488 (description "One of the most advanced WSGI utility modules. It includes a
6489powerful debugger, full-featured request and response objects, HTTP utilities to
6490handle entity tags, cache control headers, HTTP dates, cookie handling, file
6491uploads, a powerful URL routing system and a bunch of community-contributed
6492addon modules.")
6493 (license x11)))
6494
6495(define-public python2-werkzeug
6496 (package-with-python2 python-werkzeug))
99fffa8a
LF
6497
6498(define-public python-configobj
6499 (package
6500 (name "python-configobj")
6501 (version "5.0.6")
6502 (source (origin
6503 (method url-fetch)
6504 (uri (string-append
6505 "https://pypi.python.org/packages/source/c/configobj/"
6506 "configobj-" version ".tar.gz"))
6507 (sha256
6508 (base32
6509 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6510 ;; Patch setup.py so it looks for python-setuptools, which is
6511 ;; required to parse the keyword 'install_requires' in setup.py.
6512 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6513 (build-system python-build-system)
6514 (native-inputs
6515 `(("python-setuptools" ,python-setuptools)
6516 ("python-six" ,python-six)))
6517 (synopsis "Config file reading, writing and validation")
6518 (description "ConfigObj is a simple but powerful config file reader and
6519writer: an ini file round tripper. Its main feature is that it is very easy to
6520use, with a straightforward programmer’s interface and a simple syntax for
6521config files.")
6522 (home-page "https://github.com/DiffSK/configobj")
6523 (license bsd-3)))
6524
6525(define-public python2-configobj
6526 (package-with-python2 python-configobj))
79e8a291
LF
6527
6528(define-public python-configargparse
6529 (package
6530 (name "python-configargparse")
6531 (version "0.10.0")
6532 (source (origin
6533 (method url-fetch)
6534 (uri (string-append
6535 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6536 "ConfigArgParse-" version ".tar.gz"))
6537 (sha256
6538 (base32
6539 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6540 (build-system python-build-system)
6541 (arguments
6542 ;; FIXME: Bug in test suite filed upstream:
6543 ;; https://github.com/bw2/ConfigArgParse/issues/32
6544 '(#:tests? #f))
6545 (synopsis "Replacement for argparse")
6546 (description "A drop-in replacement for argparse that allows options to also
6547be set via config files and/or environment variables.")
6548 (home-page "https://github.com/bw2/ConfigArgParse")
6549 (license license:expat)))
6550
6551(define-public python2-configargparse
6552 (package-with-python2 python-configargparse))
ab41f979
LF
6553
6554(define-public python-ndg-httpsclient
6555 (package
6556 (name "python-ndg-httpsclient")
6557 (version "0.4.0")
6558 (source (origin
6559 (method url-fetch)
6560 (uri (string-append
6561 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6562 "ndg_httpsclient-" version ".tar.gz"))
6563 (sha256
6564 (base32
6565 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6566 (build-system python-build-system)
6567 (propagated-inputs
6568 `(("python-pyopenssl" ,python-pyopenssl)))
6569 (synopsis "HTTPS support for Python's httplib and urllib2")
6570 (description "This is a HTTPS client implementation for httplib and urllib2
6571based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6572over the default provided with Python and importantly enables full verification
6573of the SSL peer.")
6574 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6575 (license bsd-3)))
6576
6577;; python2-openssl requires special care, so package-with-python2 is
6578;; insufficient.
6579(define-public python2-ndg-httpsclient
6580 (package (inherit python-ndg-httpsclient)
6581 (name "python2-ndg-httpsclient")
6582 (arguments `(#:python ,python-2))
6583 (propagated-inputs
6584 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6585
6586(define-public python-contextlib2
6587 (package
6588 (name "python-contextlib2")
6589 (version "0.4.0")
6590 (source
6591 (origin
6592 (method url-fetch)
6593 (uri (pypi-uri "contextlib2" version))
6594 (sha256
6595 (base32
6596 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6597 (build-system python-build-system)
6598 (arguments
6599 `(#:phases
6600 (modify-phases %standard-phases
6601 (replace 'check
6602 (lambda _ (zero?
6603 (system*
6604 "python" "test_contextlib2.py", "-v")))))))
6605 (home-page "http://contextlib2.readthedocs.org/")
6606 (synopsis "Tools for decorators and context managers")
6607 (description "This module is primarily a backport of the Python
66083.2 contextlib to earlier Python versions. Like contextlib, it
6609provides utilities for common tasks involving decorators and context
6610managers. It also contains additional features that are not part of
6611the standard library.")
6612 (license psfl)))
6613
6614(define-public python2-contextlib2
6615 (package-with-python2 python-contextlib2))