gnu: Add python-pygments.
[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>
7a03af70 3;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
af807dea 4;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
32d5c729 5;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
a01b6da7
NK
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
1ffa7090 23(define-module (gnu packages python)
011b18c3 24 #:use-module ((guix licenses)
3580ab8b
DT
25 #:select (asl2.0 bsd-3 bsd-2 bsd-style cc0 expat x11 x11-style
26 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1+
cafc3f5a 27 psfl public-domain))
1d08c01f 28 #:use-module ((guix licenses) #:select (zlib)
ed0cdf83 29 #:renamer (symbol-prefix-proc 'license:))
3fdc99da 30 #:use-module (gnu packages)
1ffa7090 31 #:use-module (gnu packages compression)
3fdc99da 32 #:use-module (gnu packages gdbm)
421a80a2 33 #:use-module (gnu packages icu4c)
b10ab723 34 #:use-module (gnu packages libffi)
3fdc99da 35 #:use-module (gnu packages readline)
1ffa7090 36 #:use-module (gnu packages openssl)
3e778ad3 37 #:use-module (gnu packages elf)
b10ab723 38 #:use-module (gnu packages pkg-config)
1d08c01f 39 #:use-module (gnu packages sqlite)
3a100e79 40 #:use-module (gnu packages zip)
cafc3f5a 41 #:use-module (gnu packages multiprecision)
a01b6da7
NK
42 #:use-module (guix packages)
43 #:use-module (guix download)
11bb85a1 44 #:use-module (guix utils)
acc26ff1 45 #:use-module (guix build-system gnu)
898238b9
AE
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system trivial))
a01b6da7 48
b24d1cfc 49(define-public python-2
a01b6da7
NK
50 (package
51 (name "python")
ee2b5109 52 (version "2.7.6")
a01b6da7
NK
53 (source
54 (origin
55 (method url-fetch)
9b43a0ff 56 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7 57 version "/Python-" version ".tar.xz"))
32d5c729
MW
58 (patches (list (search-patch "python-libffi-mips-n32-fix.patch")))
59 (patch-flags '("-p0"))
a01b6da7
NK
60 (sha256
61 (base32
ee2b5109 62 "18gnpyh071dxa0rv3silrz92jw9qpblswzwv4gzqcwxzz20qxmhz"))))
a01b6da7 63 (build-system gnu-build-system)
3fdc99da 64 (arguments
af807dea
AE
65 `(#:tests? #f
66;; 258 tests OK.
67;; 103 tests failed:
68;; test_bz2 test_distutils test_file test_file2k test_popen2
69;; test_shutil test_signal test_site test_slice test_smtplib
70;; test_smtpnet test_socket test_socketserver test_softspace
71;; test_sort test_sqlite test_ssl test_startfile test_str
72;; test_strftime test_string test_stringprep test_strop test_strptime
73;; test_strtod test_struct test_structmembers test_structseq
74;; test_subprocess test_sunaudiodev test_sundry test_symtable
75;; test_syntax test_sys test_sys_setprofile test_sys_settrace
76;; test_sysconfig test_tarfile test_tcl test_telnetlib test_tempfile
77;; test_textwrap test_thread test_threaded_import
78;; test_threadedtempfile test_threading test_threading_local
79;; test_threadsignals test_time test_timeout test_tk test_tokenize
80;; test_tools test_trace test_traceback test_transformer
81;; test_ttk_guionly test_ttk_textonly test_tuple test_typechecks
82;; test_ucn test_unary test_undocumented_details test_unicode
83;; test_unicode_file test_unicodedata test_univnewlines
84;; test_univnewlines2k test_unpack test_urllib test_urllib2
85;; test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse
86;; test_userdict test_userlist test_userstring test_uu test_uuid
87;; test_wait3 test_wait4 test_warnings test_wave test_weakref
88;; test_weakset test_whichdb test_winreg test_winsound test_with
89;; test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c
90;; test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile
91;; test_zipfile64 test_zipimport test_zipimport_support test_zlib
92;; 31 tests skipped:
93;; test_aepack test_al test_applesingle test_ascii_formatd test_bsddb
94;; test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn
95;; test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
96;; test_codecmaps_tw test_ctypes test_curses test_dl test_gdb test_gl
97;; test_imageop test_imgfile test_ioctl test_kqueue
98;; test_linuxaudiodev test_macos test_macostools test_msilib
99;; test_multiprocessing test_ossaudiodev test_pep277
100;; test_scriptpackages
101;; 7 skips unexpected on linux2:
102;; test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_gdb
103;; test_ioctl test_multiprocessing
104;; One of the typical errors:
105;; test_unicode
106;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No such file or directory
107 #:test-target "test"
3fdc99da
CR
108 #:configure-flags
109 (let ((bz2 (assoc-ref %build-inputs "bzip2"))
110 (gdbm (assoc-ref %build-inputs "gdbm"))
b10ab723 111 (libffi (assoc-ref %build-inputs "libffi"))
3fdc99da
CR
112 (openssl (assoc-ref %build-inputs "openssl"))
113 (readline (assoc-ref %build-inputs "readline"))
114 (zlib (assoc-ref %build-inputs "zlib")))
fd982732 115 (list "--enable-shared" ; allow embedding
b10ab723 116 "--with-system-ffi" ; build ctypes
fd982732 117 (string-append "CPPFLAGS="
3fdc99da
CR
118 "-I" bz2 "/include "
119 "-I" gdbm "/include "
120 "-I" openssl "/include "
121 "-I" readline "/include "
122 "-I" zlib "/include")
123 (string-append "LDFLAGS="
124 "-L" bz2 "/lib "
125 "-L" gdbm "/lib "
b10ab723 126 "-L" libffi "/lib "
3fdc99da
CR
127 "-L" openssl "/lib "
128 "-L" readline "/lib "
fd982732
LC
129 "-L" zlib "/lib")))
130
131 #:modules ((guix build gnu-build-system)
132 (guix build utils)
3309e3a1 133 (guix build rpath)
fd982732 134 (srfi srfi-26))
3309e3a1
LC
135 #:imported-modules ((guix build gnu-build-system)
136 (guix build utils)
137 (guix build rpath))
fd982732
LC
138
139 #:phases
140 (alist-cons-after
141 'strip 'add-lib-to-runpath
142 (lambda* (#:key outputs #:allow-other-keys)
fd982732
LC
143 (let* ((out (assoc-ref outputs "out"))
144 (lib (string-append out "/lib")))
145 ;; Add LIB to the RUNPATH of all the executables.
146 (with-directory-excursion out
147 (for-each (cut augment-rpath <> lib)
148 (find-files "bin" ".*")))))
d4bf49b1
EB
149 (alist-cons-before
150 'configure 'patch-lib-shells
151 (lambda _
bb184d98
EB
152 ;; Filter for existing files, since some may not exist in all
153 ;; versions of python that are built with this recipe.
154 (substitute* (filter file-exists?
155 '("Lib/subprocess.py"
156 "Lib/popen2.py"
157 "Lib/distutils/tests/test_spawn.py"
158 "Lib/test/test_subprocess.py"))
d4bf49b1 159 (("/bin/sh") (which "sh"))))
9a9a3adf
CR
160 (alist-cons-before
161 'check 'pre-check
162 (lambda _
163 ;; 'Lib/test/test_site.py' needs a valid $HOME
164 (setenv "HOME" (getcwd)))
165 %standard-phases)))))
a01b6da7 166 (inputs
3fdc99da
CR
167 `(("bzip2" ,bzip2)
168 ("gdbm" ,gdbm)
b10ab723 169 ("libffi" ,libffi) ; for ctypes
a01b6da7 170 ("openssl" ,openssl)
3fdc99da 171 ("readline" ,readline)
fd982732 172 ("zlib" ,zlib)
3309e3a1 173 ("patchelf" ,patchelf))) ; for (guix build rpath)
b10ab723
CR
174 (native-inputs
175 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
176 (native-search-paths
177 (list (search-path-specification
178 (variable "PYTHONPATH")
179 (directories '("lib/python2.7/site-packages")))))
a01b6da7
NK
180 (home-page "http://python.org")
181 (synopsis
182 "Python, a high-level dynamically-typed programming language")
183 (description
184 "Python is a remarkably powerful dynamic programming language that
185is used in a wide variety of application domains. Some of its key
186distinguishing features include: clear, readable syntax; strong
187introspection capabilities; intuitive object orientation; natural
188expression of procedural code; full modularity, supporting hierarchical
189packages; exception-based error handling; and very high level dynamic
190data types.")
191 (license psfl)))
acc26ff1 192
b24d1cfc
AE
193(define-public python
194 (package (inherit python-2)
717003e3
LC
195 (version "3.3.5")
196 (source (origin
197 (method url-fetch)
198 (uri (string-append "https://www.python.org/ftp/python/"
199 version "/Python-" version ".tar.xz"))
32d5c729
MW
200 (patches (list (search-patch "python-fix-tests.patch")
201 (search-patch "python-libffi-mips-n32-fix.patch")))
717003e3
LC
202 (patch-flags '("-p0"))
203 (sha256
204 (base32
205 "1rdncc7g8g6f3lfdg33rli1yffbiq8z283xy4f5ksl1l8i49psdb"))))
9a9a3adf
CR
206 (arguments
207 (let ((args `(#:modules ((guix build gnu-build-system)
208 (guix build utils)
209 (srfi srfi-1)
210 (srfi srfi-26))
211 ,@(package-arguments python-2))))
212 (substitute-keyword-arguments args
213 ((#:tests? _) #t))))
1aebc0cb
AE
214 (native-search-paths
215 (list (search-path-specification
216 (variable "PYTHONPATH")
217 (directories '("lib/python3.3/site-packages")))))))
f26a77ff 218
898238b9
AE
219(define-public python-wrapper
220 (package (inherit python)
221 (name "python-wrapper")
222 (source #f)
223 (build-system trivial-build-system)
224 (inputs `(("python" ,python)))
225 (arguments
226 `(#:modules ((guix build utils))
227 #:builder
228 (begin
229 (use-modules (guix build utils))
230 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
231 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
232 (mkdir-p bin)
233 (for-each
234 (lambda (old new)
235 (symlink (string-append python old)
236 (string-append bin "/" new)))
237 `("python3", "pydoc3", "idle3")
238 `("python", "pydoc", "idle"))))))
239 (description (string-append (package-description python)
240 "\n\nThis wrapper package provides symbolic links to the python binaries
241 without version suffix."))))
242
243
89114f39 244(define-public python-pytz
acc26ff1 245 (package
89114f39 246 (name "python-pytz")
acc26ff1
CR
247 (version "2013b")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (string-append "https://launchpad.net/pytz/main/" version
252 "/+download/pytz-" version ".tar.bz2"))
253 (sha256
254 (base32
255 "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
256 (build-system python-build-system)
8498b8cf 257 (arguments `(#:tests? #f)) ; no test target
acc26ff1
CR
258 (home-page "https://launchpad.net/pytz")
259 (synopsis "The Python timezone library.")
260 (description
261 "This library allows accurate and cross platform timezone calculations
262using Python 2.4 or higher and provides access to the Olson timezone database.")
263 (license x11)))
5ace6e2f 264
89114f39 265(define-public python2-pytz
11bb85a1 266 (package-with-python2 python-pytz))
89114f39 267
fc50e9c6 268
89114f39 269(define-public python-babel
5ace6e2f 270 (package
89114f39 271 (name "python-babel")
e1804763 272 (version "1.3")
5ace6e2f
CR
273 (source
274 (origin
275 (method url-fetch)
e1804763 276 (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-"
5ace6e2f
CR
277 version ".tar.gz"))
278 (sha256
279 (base32
e1804763 280 "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz"))))
5ace6e2f
CR
281 (build-system python-build-system)
282 (inputs
e1804763
AE
283 `(("python-pytz" ,python-pytz)
284 ("python-setuptools" ,python-setuptools)))
8498b8cf 285 (arguments `(#:tests? #f)) ; no test target
e1804763 286 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
287 (synopsis
288 "Tools for internationalizing Python applications")
289 (description
290 "Babel is composed of two major parts:
291- tools to build and work with gettext message catalogs
292- a Python interface to the CLDR (Common Locale Data Repository), providing
293access to various locale display names, localized number and date formatting,
294etc. ")
295 (license bsd-3)))
89114f39
AE
296
297(define-public python2-babel
11bb85a1 298 (package-with-python2 python-babel))
73adf220 299
c1448c69
EB
300(define-public python-lockfile
301 (package
302 (name "python-lockfile")
303 (version "0.9.1")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
308 "lockfile-" version ".tar.gz"))
309 (sha256
310 (base32
311 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
312 (build-system python-build-system)
313 (arguments '(#:test-target "check"))
314 (home-page "http://code.google.com/p/pylockfile/")
315 (synopsis "Platform-independent file locking module")
316 (description
317 "The lockfile package exports a LockFile class which provides a simple
318API for locking files.")
319 (license expat)))
320
321(define-public python2-lockfile
322 (package-with-python2 python-lockfile))
323
5a1a4bf6
EB
324(define-public python-mock
325 (package
326 (name "python-mock")
327 (version "1.0.1")
328 (source
329 (origin
330 (method url-fetch)
331 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
332 "mock-" version ".tar.gz"))
333 (sha256
334 (base32
335 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
336 (build-system python-build-system)
337 (arguments '(#:test-target "check"))
338 (home-page "http://code.google.com/m/mock/")
339 (synopsis "A Python Mocking and Patching Library for Testing")
340 (description
341 "Mock is a library for testing in Python. It allows you to replace parts
342of your system under test with mock objects and make assertions about how they
343have been used.")
344 (license expat)))
345
346(define-public python2-mock
347 (package-with-python2 python-mock))
348
fc50e9c6 349
73adf220
AE
350(define-public python-setuptools
351 (package
352 (name "python-setuptools")
353 (version "1.1.4")
354 (source
355 (origin
356 (method url-fetch)
357 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
358 version ".tar.gz"))
359 (sha256
360 (base32
361 "0hl9sa5xr9bi2ifq51wy1bawsjv5nzvpbac7m9z1ciz778874csf"))))
362 (build-system python-build-system)
363 (arguments
824af8ca 364 `(#:tests? #f))
73adf220
AE
365 ;;FIXME: test_sdist_with_utf8_encoded_filename fails in
366 ;; /tmp/nix-build-python2-setuptools-1.1.4.drv-0/setuptools-1.1.4/setuptools/tests/test_sdist.py"
367 ;; line 354
368 ;; The tests pass with Python 2.7.5.
73adf220
AE
369 (home-page "https://pypi.python.org/pypi/setuptools")
370 (synopsis
371 "Library designed to facilitate packaging Python projects")
372 (description
373 "Setuptools is a fully-featured, stable library designed to facilitate
374packaging Python projects, where packaging includes:
375Python package and module definitions,
376distribution package metadata,
377test hooks,
378project installation,
379platform-specific details,
380Python 3 support.")
381 (license psfl)))
382
383(define-public python2-setuptools
384 (package-with-python2 python-setuptools))
fc50e9c6
AE
385
386
cafc3f5a
EB
387(define-public python-pycrypto
388 (package
389 (name "python-pycrypto")
390 (version "2.6.1")
391 (source
392 (origin
393 (method url-fetch)
394 (uri (string-append "https://pypi.python.org/packages/source/p/"
395 "pycrypto/pycrypto-" version ".tar.gz"))
396 (sha256
397 (base32
398 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
399 (build-system python-build-system)
400 (native-inputs
401 `(("python-setuptools" ,python-setuptools)))
402 (inputs
403 `(("python" ,python)
404 ("gmp" ,gmp)))
405 (arguments
406 `(#:phases
407 (alist-cons-before
408 'build 'set-build-env
409 ;; pycrypto runs an autoconf configure script behind the scenes
410 (lambda _
411 (setenv "CONFIG_SHELL" (which "bash")))
412 %standard-phases)))
413 (home-page "http://www.pycrypto.org/")
414 (synopsis "Cryptographic modules for Python")
415 (description
416 "Pycrypto is a collection of both secure hash functions (such as SHA256
417and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
418etc.). The package is structured to make adding new modules easy.")
419 (license public-domain)))
420
421(define-public python-keyring
422 (package
423 (name "python-keyring")
424 (version "3.8")
425 (source
426 (origin
427 (method url-fetch)
428 (uri (string-append "https://pypi.python.org/packages/source/k/"
429 "keyring/keyring-" version ".zip"))
430 (sha256
431 (base32
432 "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
433 (build-system python-build-system)
434 (native-inputs
435 `(("unzip" ,unzip)
436 ("python-setuptools" ,python-setuptools)
437 ("python-mock" ,python-mock)))
438 (inputs
439 `(("python-pycrypto" ,python-pycrypto)))
440 (arguments
441 `(#:tests? #f ;TODO: tests require pytest
442 #:phases
443 (alist-replace
444 'unpack
445 (lambda _
446 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
447 "/bin/unzip"))
448 (source (assoc-ref %build-inputs "source")))
449 (and (zero? (system* unzip source))
450 (chdir (string-append "keyring-" ,version)))))
451 %standard-phases)))
452 (home-page "http://bitbucket.org/kang/python-keyring-lib")
453 (synopsis "Store and access your passwords safely")
454 (description
455 "The Python keyring lib provides a easy way to access the system keyring
456service from python. It can be used in any application that needs safe
457password storage.")
458 ;; "MIT" and PSF dual license
459 (license x11)))
460
a480bc41
EB
461(define-public python-six
462 (package
463 (name "python-six")
464 (version "1.7.2")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (string-append "https://pypi.python.org/packages/source/s/"
469 "six/six-" version ".tar.gz"))
470 (sha256
471 (base32
472 "164rns26aqfqx2hwi0qq3scl50s69japn0fvgvrjsbyg7r1mxf67"))))
473 (build-system python-build-system)
474 (inputs
475 `(("python-setuptools" ,python-setuptools)))
476 (home-page "http://pypi.python.org/pypi/six/")
477 (synopsis "Python 2 and 3 compatibility utilities")
478 (description
479 "Six is a Python 2 and 3 compatibility library. It provides utility
480functions for smoothing over the differences between the Python versions with
481the goal of writing Python code that is compatible on both Python versions.
482Six supports every Python version since 2.5. It is contained in only one
483Python file, so it can be easily copied into your project.")
484 (license x11)))
485
cafc3f5a
EB
486(define-public python-dateutil-2
487 (package
488 (name "python-dateutil")
489 (version "2.2")
490 (source
491 (origin
492 (method url-fetch)
493 (uri (string-append "https://pypi.python.org/packages/source/p/"
494 name "/" name "-" version ".tar.gz"))
495 (sha256
496 (base32
497 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
498 (build-system python-build-system)
499 (inputs
500 `(("python-setuptools" ,python-setuptools)
501 ("python-six" ,python-six)))
502 (home-page "http://labix.org/python-dateutil")
503 (synopsis "Extensions to the standard datetime module")
504 (description
505 "The dateutil module provides powerful extensions to the standard
506datetime module, available in Python 2.3+.")
507 (license bsd-3)))
508
509(define-public python2-dateutil-2
510 (package-with-python2 python-dateutil-2))
511
fc50e9c6
AE
512(define-public python-dateutil
513 (package
514 (name "python-dateutil")
515 (version "1.5") ; last version for python < 3
516 (source
517 (origin
518 (method url-fetch)
cafc3f5a
EB
519 (uri (string-append "http://labix.org/download/python-dateutil/"
520 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
521 (sha256
522 (base32
523 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
524 (build-system python-build-system)
525 (inputs
526 `(("python-setuptools" ,python-setuptools)))
527 (home-page "http://labix.org/python-dateutil")
cafc3f5a 528 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
529 (description
530 "The dateutil module provides powerful extensions to the standard
531datetime module, available in Python 2.3+.")
532 (license psfl)))
533
534(define-public python2-dateutil
535 (package-with-python2 python-dateutil))
1d08c01f 536
cafc3f5a
EB
537(define-public python-parsedatetime
538 (package
539 (name "python-parsedatetime")
540 (version "1.2")
541 (source
542 (origin
543 (method url-fetch)
544 (uri (string-append "https://pypi.python.org/packages/source/p/"
545 "parsedatetime/parsedatetime-" version ".tar.gz"))
546 (sha256
547 (base32
548 "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
549 (build-system python-build-system)
550 (native-inputs
551 `(("python-setuptools" ,python-setuptools)))
552 (arguments `(#:tests? #f)) ;no test target
553 (home-page "http://github.com/bear/parsedatetime/")
554 (synopsis
555 "Parse human-readable date/time text")
556 (description
557 "Parse human-readable date/time text")
558 (license asl2.0)))
559
560(define-public python-tzlocal
561 (package
562 (name "python-tzlocal")
563 (version "1.1.1")
564 (source
565 (origin
566 (method url-fetch)
567 (uri (string-append "https://pypi.python.org/packages/source/t/"
568 "tzlocal/tzlocal-" version ".zip"))
569 (sha256
570 (base32
571 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
572 (build-system python-build-system)
573 (native-inputs
574 `(("unzip" ,unzip)
575 ("python-setuptools" ,python-setuptools)))
576 (inputs `(("python-pytz" ,python-pytz)))
577 (arguments
578 `(#:phases
579 (alist-replace
580 'unpack
581 (lambda _
582 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
583 "/bin/unzip"))
584 (source (assoc-ref %build-inputs "source")))
585 (and (zero? (system* unzip source))
586 (chdir (string-append "tzlocal-" ,version)))))
587 %standard-phases)))
588 (home-page "https://github.com/regebro/tzlocal")
589 (synopsis
590 "tzinfo object for the local timezone")
591 (description
592 "Tzlocal returns a tzinfo object with the local timezone information.
593This module attempts to fix a glaring hole in pytz, that there is no way to
594get the local timezone information, unless you know the zoneinfo name, and
595under several distributions that's hard or impossible to figure out.")
596 (license cc0)))
597
1d08c01f
AE
598
599(define-public python2-pysqlite
600 (package
601 (name "python2-pysqlite")
7a03af70 602 (version "2.6.3a") ; see below
1d08c01f
AE
603 (source
604 (origin
605 (method url-fetch)
7a03af70
LC
606 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
607 ;; tarball was modified, but the version number was kept:
608 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
609 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
610 (uri (string-append
611 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
612 "2.6.3" ".tar.gz"))
1d08c01f
AE
613 (sha256
614 (base32
7a03af70 615 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1d08c01f
AE
616 (build-system python-build-system)
617 (inputs
618 `(("sqlite" ,sqlite)))
619 (arguments
620 `(#:python ,python-2 ; incompatible with Python 3
621 #:tests? #f)) ; no test target
7a03af70
LC
622 (home-page "https://pypi.python.org/pypi/pysqlite")
623 (synopsis "SQLite bindings for Python")
1d08c01f
AE
624 (description
625 "Pysqlite provides SQLite bindings for Python that comply to the
626Database API 2.0T.")
ed0cdf83 627 (license license:zlib)))
1d08c01f 628
2875caf5
AE
629
630(define-public python2-mechanize
631 (package
632 (name "python2-mechanize")
633 (version "0.2.5")
634 (source
635 (origin
636 (method url-fetch)
637 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
638 version ".tar.gz"))
639 (sha256
640 (base32
641 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
642 (build-system python-build-system)
643 (inputs
644 `(("python2-setuptools" ,python2-setuptools)))
645 (arguments
646 `(#:python ,python-2 ; apparently incompatible with Python 3
647 #:tests? #f))
648 ;; test fails with message
649 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
650 ;; (python-3.3.2) or
651 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
652 ;; (python-2.7.5).
653 ;; The source code is from March 2011 and probably not up-to-date
654 ;; with respect to python unit tests.
655 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
656 (synopsis
657 "Stateful programmatic web browsing in Python")
658 (description
659 "Mechanize implements stateful programmatic web browsing in Python,
660after Andy Lester’s Perl module WWW::Mechanize.")
661 (license (bsd-style "file://COPYING"
662 "See COPYING in the distribution."))))
663
0352532e
AE
664
665(define-public python-simplejson
666 (package
667 (name "python-simplejson")
668 (version "3.3.0")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
673 version ".tar.gz"))
674 (sha256
675 (base32
676 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
677 (build-system python-build-system)
678 (home-page "http://simplejson.readthedocs.org/en/latest/")
679 (synopsis
680 "Json library for Python")
681 (description
682 "JSON (JavaScript Object Notation) is a subset of JavaScript syntax
cc20a22a 683 (ECMA-262 3rd edition) used as a lightweight data interchange format.
0352532e
AE
684
685Simplejson exposes an API familiar to users of the standard library marshal
686and pickle modules. It is the externally maintained version of the json
687library contained in Python 2.6, but maintains compatibility with Python 2.5
688and (currently) has significant performance advantages, even without using
689the optional C extension for speedups. Simplejson is also supported on
690Python 3.3+.")
691 (license x11)))
692
693(define-public python2-simplejson
694 (package-with-python2 python-simplejson))
421a80a2
AE
695
696
697(define-public python2-pyicu
698 (package
699 (name "python2-pyicu")
700 (version "1.5")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
705 version ".tar.gz"))
706 (sha256
707 (base32
708 "011vwflpir8wvh48mvi6d9a7vw0f43bkwv0w6bzxbzmvz20ax5vm"))))
709 (build-system python-build-system)
710 (inputs
711 `(("icu4c" ,icu4c)))
712 (arguments
713 `(#:python ,python-2 ; Python 3 works also, but needs special care for
714 ; linking with libpython3.3m
715 #:tests? #f)) ; no check target
716 (home-page "http://pyicu.osafoundation.org/")
717 (synopsis
718 "Python extension wrapping the ICU C++ API.")
719 (description
720 "PyICU is a python extension wrapping the ICU C++ API.")
721 (license x11)))
cc20a22a
LC
722
723(define-public python2-dogtail
724 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
725 ;; spaces in indentation" with Python 3.
726 (package
727 (name "python2-dogtail")
728 (version "0.8.2")
729 (source (origin
730 (method url-fetch)
731 (uri (string-append
732 "https://fedorahosted.org/released/dogtail/dogtail-"
733 version ".tar.gz"))
734 (sha256
735 (base32
736 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
737 (build-system python-build-system)
738 (arguments `(#:python ,python-2
739 #:tests? #f)) ; invalid command "test"
740 (home-page "https://fedorahosted.org/dogtail/")
741 (synopsis "GUI test tool and automation framework written in ​Python")
742 (description
743 "dogtail is a GUI test tool and automation framework written in Python.
744It uses Accessibility (a11y) technologies to communicate with desktop
745applications. dogtail scripts are written in Python and executed like any
746other Python program.")
747 (license gpl2+)))
515e6878 748
011b18c3
LC
749(define-public python2-empy
750 (package
751 (name "python2-empy")
752 (version "3.3")
753 (source (origin
754 (method url-fetch)
755 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
756 version ".tar.gz"))
757 (sha256
758 (base32
759 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
760 (build-system python-build-system)
761 (arguments
762 `(#:python ,python-2
763 #:phases (alist-replace
764 'check
765 (lambda _
766 (zero? (system* "./test.sh")))
767 %standard-phases)))
768 (home-page "http://www.alcyone.com/software/empy/")
769 (synopsis "Templating system for Python")
770 (description
771 "EmPy is a system for embedding Python expressions and statements in
772template text; it takes an EmPy source file, processes it, and produces
773output. This is accomplished via expansions, which are special signals to the
774EmPy system and are set off by a special prefix (by default the at sign, @).
775EmPy can expand arbitrary Python expressions and statements in this way, as
776well as a variety of special forms. Textual data not explicitly delimited in
777this way is sent unaffected to the output, allowing Python to be used in
778effect as a markup language. Also supported are callbacks via hooks,
779recording and playback via diversions, and dynamic, chainable filters. The
780system is highly configurable via command line options and embedded
781commands.")
782 (license lgpl2.1+)))
783
8deeda0c
LC
784(define-public python2-element-tree
785 (package
786 (name "python2-element-tree")
787 (version "1.2.6")
788 (source (origin
789 (method url-fetch)
790 (uri (string-append
791 "http://effbot.org/media/downloads/elementtree-"
792 version "-20050316.tar.gz"))
793 (sha256
794 (base32
795 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
796 (build-system python-build-system)
797 (arguments
798 `(#:python ,python-2 ; seems to be part of Python 3
799 #:tests? #f)) ; no 'test' sub-command
800 (synopsis "Toolkit for XML processing in Python")
801 (description
802 "ElementTree is a Python library supporting lightweight XML processing.")
803 (home-page "http://effbot.org/zone/element-index.htm")
804 (license (x11-style "http://docs.python.org/2/license.html"
805 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
8060.9.0 THROUGH 1.2\"."))))
807
808(define-public python2-pybugz
809 (package
810 (name "python2-pybugz")
811 (version "0.6.11")
812 (source (origin
813 (method url-fetch)
814 (uri (string-append
815 "http://bits.liquidx.net/projects/pybugz/pybugz-"
816 version ".tar.gz"))
817 (sha256
818 (base32
6f194a1e
LC
819 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
820 (patches (map search-patch
821 (list "pybugz-stty.patch"
822 "pybugz-encode-error.patch")))))
8deeda0c
LC
823 (build-system python-build-system)
824 (arguments
825 `(#:python ,python-2 ; SyntaxError with Python 3
826 #:tests? #f)) ; no 'test' sub-command
827 (inputs `(("element-tree" ,python2-element-tree)))
828 (synopsis "Python and command-line interface to Bugzilla")
829 (description
830 "PyBugz is a Python library and command-line tool to query the Bugzilla
831bug tracking system. It is meant as an aid to speed up interaction with the
832bug tracker.")
833 (home-page "http://www.liquidx.net/pybugz/")
834 (license gpl2)))
835
a480bc41
EB
836(define-public python-enum34
837 (package
838 (name "python-enum34")
839 (version "1.0")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (string-append "https://pypi.python.org/packages/source/e/"
844 "enum34/enum34-" version ".tar.gz"))
845 (sha256
846 (base32
847 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
848 (build-system python-build-system)
849 (inputs
850 `(("python-setuptools" ,python-setuptools)))
851 (arguments
852 `(#:phases
853 (alist-replace
854 'check
855 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
856 %standard-phases)))
857 (home-page "https://pypi.python.org/pypi/enum34")
858 (synopsis "Backported Python 3.4 Enum")
859 (description
860 "Enum34 is the new Python stdlib enum module available in Python 3.4
861backported for previous versions of Python from 2.4 to 3.3.")
862 (license bsd-3)))
863
864(define-public python-parse-type
865 (package
866 (name "python-parse-type")
867 (version "0.3.4")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/p/"
872 "parse_type/parse_type-" version ".tar.gz"))
873 (sha256
874 (base32
875 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
876 (build-system python-build-system)
877 (inputs
878 `(("python-setuptools" ,python-setuptools)
879 ("python-six" ,python-six)
880 ("python-parse" ,python-parse)
881 ("python-enum34" ,python-enum34))) ;required for python<3.4
882 (arguments '(#:tests? #f)) ;TODO: tests require pytest
883 (home-page "https://github.com/jenisys/parse_type")
884 (synopsis "Extended parse module")
885 (description
886 "Parse_type extends the python parse module.")
887 (license bsd-3)))
888
889(define-public python-parse
890 (package
891 (name "python-parse")
892 (version "1.6.4")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (string-append "https://pypi.python.org/packages/source/p/"
897 "parse/parse-" version ".tar.gz"))
898 (sha256
899 (base32
900 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
901 (build-system python-build-system)
902 (arguments
903 `(#:phases
904 (alist-replace
905 'check
906 (lambda _ (zero? (system* "python" "test_parse.py")))
907 %standard-phases)))
908 (home-page "https://github.com/r1chardj0n3s/parse")
909 (synopsis "Parse strings")
910 (description
911 "Parse strings using a specification based on the Python format()
912syntax.")
913 (license x11)))
914
915
515e6878
LC
916(define-public scons
917 (package
918 (name "scons")
919 (version "2.1.0")
920 (source (origin
921 (method url-fetch)
922 (uri (string-append "mirror://sourceforge/scons/scons-"
923 version ".tar.gz"))
924 (sha256
925 (base32
926 "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1"))))
927 (build-system python-build-system)
928 (arguments
929 ;; With Python 3.x, fails to build with a syntax error.
930 `(#:python ,python-2
931 #:tests? #f)) ; no 'python setup.py test' command
932 (home-page "http://scons.org/")
933 (synopsis "Software construction tool written in Python")
934 (description
935 "SCons is a software construction tool. Think of SCons as an improved,
936cross-platform substitute for the classic Make utility with integrated
937functionality similar to autoconf/automake and compiler caches such as ccache.
938In short, SCons is an easier, more reliable and faster way to build
939software.")
940 (license x11)))
011b18c3 941
c15a5c0e
DT
942(define-public python-extras
943 (package
944 (name "python-extras")
945 (version "0.0.3")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (string-append
950 "https://pypi.python.org/packages/source/e/extras/extras-"
951 version ".tar.gz"))
952 (sha256
953 (base32
954 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
955 (build-system python-build-system)
956 (inputs
957 `(("python-setuptools" ,python-setuptools)))
958 (arguments
959 ;; error in setup.cfg: command 'test' has no such option 'buffer'
960 '(#:tests? #f))
961 (home-page "https://github.com/testing-cabal/extras")
962 (synopsis "Useful extensions to the Python standard library")
963 (description
964 "Extras is a set of extensions to the Python standard library.")
965 (license expat)))
966
967(define-public python2-extras
968 (package-with-python2 python-extras))
969
56ea0efd
DT
970(define-public python-mimeparse
971 (package
972 (name "python-mimeparse")
973 (version "0.1.4")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (string-append
978 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
979 version ".tar.gz"))
980 (sha256
981 (base32
982 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
983 (build-system python-build-system)
984 (inputs
985 `(("python-setuptools" ,python-setuptools)))
986 (arguments
987 '(#:tests? #f)) ; no setup.py test command
988 (home-page
989 "https://github.com/dbtsai/python-mimeparse")
990 (synopsis "Python library for parsing MIME types.")
991 (description
992 "Mimeparse provides basic functions for parsing MIME type names and
993matching them against a list of media-ranges.")
994 (license expat)))
995
996(define-public python2-mimeparse
997 (package-with-python2 python-mimeparse))
998
4435427e
DT
999(define-public python-nose
1000 (package
1001 (name "python-nose")
1002 (version "1.3.4")
1003 (source
1004 (origin
1005 (method url-fetch)
1006 (uri (string-append
1007 "https://pypi.python.org/packages/source/n/nose/nose-"
1008 version ".tar.gz"))
1009 (sha256
1010 (base32
1011 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1012 (build-system python-build-system)
1013 (inputs
1014 `(("python-setuptools" ,python-setuptools)))
1015 (arguments
1016 '(#:tests? #f)) ; FIXME: test suite fails
1017 (home-page "http://readthedocs.org/docs/nose/")
1018 (synopsis "Python testing library")
1019 (description
1020 "Nose extends the unittest library to make testing easier.")
1021 (license lgpl2.0+)))
1022
1023(define-public python2-nose
1024 (package-with-python2 python-nose))
1025
6cd9c356
DT
1026(define-public python-unittest2
1027 (package
1028 (name "python-unittest2")
1029 (version "0.5.1")
1030 (source
1031 (origin
1032 (method url-fetch)
1033 (uri (string-append
1034 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1035 version ".tar.gz"))
1036 (sha256
1037 (base32
1038 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1039 (build-system python-build-system)
1040 (inputs
1041 `(("python-setuptools" ,python-setuptools)))
1042 (home-page "http://pypi.python.org/pypi/unittest2")
1043 (synopsis "Python unit testing library")
1044 (description
1045 "Unittest2 is a replacement for the unittest module in the Python
1046standard library.")
1047 (license psfl)))
1048
1049(define-public python2-unittest2
1050 (package (inherit python-unittest2)
1051 (name "python2-unittest2")
1052 (version "0.5.1")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (string-append
1057 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1058 version ".tar.gz"))
1059 (sha256
1060 (base32
1061 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1062 (inputs
1063 `(("python2-setuptools" ,python-setuptools)))
1064 (arguments
1065 `(#:python ,python-2
1066 #:tests? #f)))) ; no setup.py test command
1067
542ad60f
DT
1068(define-public python-py
1069 (package
1070 (name "python-py")
1071 (version "1.4.23")
1072 (source
1073 (origin
1074 (method url-fetch)
1075 (uri (string-append
1076 "https://pypi.python.org/packages/source/p/py/py-"
1077 version ".tar.gz"))
1078 (sha256
1079 (base32
1080 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1081 (build-system python-build-system)
1082 (inputs
1083 `(("python-setuptools" ,python-setuptools)))
1084 (home-page "http://pylib.readthedocs.org/")
1085 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1086 (description
1087 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1088code introspection, and logging.")
1089 (license expat)))
1090
1091(define-public python2-py
1092 (package-with-python2 python-py))
1093
855d4761
DT
1094(define-public python-pytest
1095 (package
1096 (name "python-pytest")
1097 (version "2.6.1")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (string-append
1102 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1103 version ".tar.gz"))
1104 (sha256
1105 (base32
1106 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1107 (modules '((guix build utils)))
1108 (snippet
1109 ;; One of the tests involves the /usr directory, so it fails.
1110 '(substitute* "testing/test_argcomplete.py"
1111 (("def test_remove_dir_prefix\\(self\\):")
1112 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1113 (build-system python-build-system)
1114 (inputs
1115 `(("python-setuptools" ,python-setuptools)
1116 ("python-py" ,python-py)
1117 ("python-nose" ,python-nose)
1118 ("python-mock" ,python-mock)))
1119 (home-page "http://pytest.org")
1120 (synopsis "Python testing library")
1121 (description
1122 "Pytest is a testing tool that provides auto-discovery of test modules
1123and functions, detailed info on failing assert statements, modular fixtures,
1124and many external plugins.")
1125 (license expat)))
1126
1127(define-public python2-pytest
1128 (package-with-python2 python-pytest))
1129
84d24017
DT
1130(define-public python-scripttest
1131 (package
1132 (name "python-scripttest")
1133 (version "1.3")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (string-append
1138 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1139 version ".tar.gz"))
1140 (sha256
1141 (base32
1142 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1143 (build-system python-build-system)
1144 (inputs
1145 `(("python-setuptools" ,python-setuptools)
1146 ("python-pytest" ,python-pytest)))
1147 (home-page "http://pythonpaste.org/scripttest/")
1148 (synopsis "Python library to test command-line scripts")
1149 (description "Scripttest is a Python helper library for testing
1150interactive command-line applications. With it you can run a script in a
1151subprocess and see the output as well as any file modifications.")
1152 (license expat)))
1153
1154(define-public python2-scripttest
1155 (package-with-python2 python-scripttest))
1156
d8fa80e1
DT
1157(define-public python-testtools
1158 (package
1159 (name "python-testtools")
1160 (version "1.0.0")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (string-append
1165 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1166 version ".tar.gz"))
1167 (sha256
1168 (base32
1169 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1170 (build-system python-build-system)
1171 (inputs
1172 `(("python-setuptools" ,python-setuptools)
1173 ("python-mimeparse" ,python-mimeparse)
1174 ("python-extras" ,python-extras)))
1175 (home-page "https://github.com/testing-cabal/testtools")
1176 (synopsis
1177 "Extensions to the Python standard library unit testing framework")
1178 (description
1179 "Testtools extends the Python standard library unit testing framework to
1180provide matchers, more debugging information, and cross-Python
1181compatibility.")
1182 (license psfl)))
1183
1184(define-public python2-testtools
1185 (package-with-python2 python-testtools))
1186
5bf3afea
DT
1187(define-public python-testscenarios
1188 (package
1189 (name "python-testscenarios")
1190 (version "0.4")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append
1195 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1196 version ".tar.gz"))
1197 (sha256
1198 (base32
1199 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1200 (build-system python-build-system)
1201 (inputs
1202 `(("python-setuptools" ,python-setuptools)
1203 ("python-testtools" ,python-testtools)
1204 ("python-mimeparse" ,python-mimeparse)))
1205 (home-page "https://launchpad.net/testscenarios")
1206 (synopsis "Pyunit extension for dependency injection")
1207 (description
1208 "Testscenarios provides clean dependency injection for Python unittest
1209style tests.")
1210 (license (list bsd-3 asl2.0)))) ; at the user's option
1211
1212(define-public python2-testscenarios
1213 (package-with-python2 python-testscenarios))
1214
dac79ecc
DT
1215(define-public python-testresources
1216 (package
1217 (name "python-testresources")
1218 (version "0.2.7")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (string-append
1223 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1224 version ".tar.gz"))
1225 (sha256
1226 (base32
1227 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1228 (build-system python-build-system)
1229 (inputs
1230 `(("python-setuptools" ,python-setuptools)))
1231 (home-page "https://launchpad.net/testresources")
1232 (synopsis
1233 "Pyunit extension for managing test resources")
1234 (description
1235 "Testresources is an extension to Python's unittest to allow declarative
1236use of resources by test cases.")
1237 (license (list bsd-3 asl2.0)))) ; at the user's option
1238
1239(define-public python2-testresources
1240 (package-with-python2 python-testresources))
1241
070ab058
DT
1242(define-public python-subunit
1243 (package
1244 (name "python-subunit")
1245 (version "0.0.21")
1246 (source
1247 (origin
1248 (method url-fetch)
1249 (uri (string-append
1250 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1251 version ".tar.gz"))
1252 (sha256
1253 (base32
1254 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1255 (build-system python-build-system)
1256 (inputs
1257 `(("python-setuptools" ,python-setuptools)
1258 ("python-testtools" ,python-testtools)
1259 ("python-mimeparse" ,python-mimeparse)
1260 ("python-testscenarios" ,python-testscenarios)))
1261 (home-page "http://launchpad.net/subunit")
1262 (synopsis "Python implementation of the subunit protocol")
1263 (description
1264 "Python-subunit is a Python implementation of the subunit test streaming
1265protocol.")
1266 (license (list bsd-3 asl2.0)))) ; at the user's option
1267
1268(define-public python2-subunit
1269 (package-with-python2 python-subunit))
1270
cd49454b
DT
1271(define-public python-fixtures
1272 (package
1273 (name "python-fixtures")
1274 (version "0.3.16")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (string-append
1279 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1280 version ".tar.gz"))
1281 (sha256
1282 (base32
1283 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1284 (build-system python-build-system)
1285 (inputs
1286 `(("python-setuptools" ,python-setuptools)))
1287 (arguments
1288 '(#:tests? #f)) ; no setup.py test command
1289 (home-page "https://launchpad.net/python-fixtures")
1290 (synopsis "Python test fixture library")
1291 (description
1292 "Fixtures provides a way to create reusable state, useful when writing
1293Python tests.")
1294 (license (list bsd-3 asl2.0)))) ; at user's option
1295
1296(define-public python2-fixtures
1297 (package-with-python2 python-fixtures))
1298
b24a0c00
DT
1299(define-public python-testrepository
1300 (package
1301 (name "python-testrepository")
1302 (version "0.0.20")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri (string-append
1307 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1308 version ".tar.gz"))
1309 (sha256
1310 (base32
1311 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1312 (build-system python-build-system)
1313 (inputs
1314 `(("python-setuptools" ,python-setuptools)
1315 ("python-testtools" ,python-testtools)
1316 ("python-subunit" ,python-subunit)
1317 ("python-fixtures" ,python-fixtures)
1318 ("python-mimeparse" ,python-mimeparse)))
1319 (home-page "https://launchpad.net/testrepository")
1320 (synopsis "Database for Python test results")
1321 (description "Testrepository provides a database of test results which can
1322be used as part of a developer's workflow to check things such as what tests
1323have failed since the last commit or what tests are currently failing.")
1324 (license (list bsd-3 asl2.0)))) ; at user's option
1325
1326(define-public python2-testrepository
1327 (package-with-python2 python-testrepository))
1328
243a009a
DT
1329(define-public python-coverage
1330 (package
1331 (name "python-coverage")
1332 (version "3.7.1")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1338 version ".tar.gz"))
1339 (sha256
1340 (base32
1341 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1342 (build-system python-build-system)
1343 (inputs
1344 `(("python-setuptools" ,python-setuptools)))
1345 (home-page "http://nedbatchelder.com/code/coverage")
1346 (synopsis "Code coverage measurement for Python")
1347 (description
1348 "Coverage measures code coverage, typically during test execution. It
1349uses the code analysis tools and tracing hooks provided in the Python standard
1350library to determine which lines are executable, and which have been
1351executed.")
1352 (license bsd-3)))
1353
1354(define-public python2-coverage
1355 (package-with-python2 python-coverage))
1356
041358fb
DT
1357(define-public python-discover
1358 (package
1359 (name "python-discover")
1360 (version "0.4.0")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (string-append
1365 "https://pypi.python.org/packages/source/d/discover/discover-"
1366 version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1370 (build-system python-build-system)
1371 (inputs
1372 `(("python-setuptools" ,python-setuptools)))
1373 (home-page "http://pypi.python.org/pypi/discover/")
1374 (synopsis
1375 "Python test discovery for unittest")
1376 (description
1377 "Discover provides test discovery for unittest, a feature that has been
1378backported from Python 2.7 for Python 2.4+")
1379 (license bsd-3)))
1380
1381(define-public python2-discover
1382 (package-with-python2 python-discover))
1383
a480bc41
EB
1384(define-public behave
1385 (package
1386 (name "behave")
1387 (version "1.2.4")
1388 (source (origin
1389 (method url-fetch)
1390 (uri (string-append "https://pypi.python.org/packages/source/b/"
1391 name "/" name "-" version ".tar.gz"))
1392 (sha256
1393 (base32
1394 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
1395 (build-system python-build-system)
1396 (inputs
1397 `(("python-setuptools" ,python-setuptools)
1398 ("python-six" ,python-six)
1399 ("python-enum43" ,python-enum34)
1400 ("python-parse" ,python-parse)
1401 ("python-parse-type" ,python-parse-type)))
1402 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
1403 ;PyHamcrest>=1.8
1404 (home-page "http://github.com/behave/behave")
1405 (synopsis "Python behavior-driven development")
1406 (description
1407 "Behave is a tool for behavior-driven development in python.
1408Behavior-driven development (or BDD) is an agile software development
1409technique that encourages collaboration between developers, QA and
1410non-technical or business participants in a software project. Behave uses
1411tests written in a natural language style, backed up by Python code.")
1412 (license x11)))
c7303d3c
DT
1413
1414(define-public python-exif-read
1415 (package
1416 (name "python-exif-read")
1417 (version "1.4.2")
1418 (source (origin
1419 (method url-fetch)
1420 (uri
1421 (string-append
1422 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
1423 version ".tar.gz"))
1424 (sha256
1425 (base32
1426 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
1427 (build-system python-build-system)
1428 (inputs
1429 `(("python-setuptools" ,python-setuptools)))
1430 (arguments `(#:tests? #f)) ; no tests
1431 (home-page "https://github.com/ianare/exif-py")
1432 (synopsis "Python library to extract EXIF data from image files")
1433 (description
1434 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1435files.")
1436 (license bsd-3)))
1437
1438(define-public python2-exif-read
1439 (package-with-python2 python-exif-read))
d5f89b22
DT
1440
1441(define-public python-pyld
1442 (package
1443 (name "python-pyld")
1444 (version "0.6.0")
1445 (source (origin
1446 (method url-fetch)
1447 (uri
1448 (string-append
1449 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
1450 version ".tar.gz"))
1451 (sha256
1452 (base32
1453 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
1454 (build-system python-build-system)
1455 (inputs
1456 `(("python-setuptools" ,python-setuptools)))
1457 (arguments `(#:tests? #f)) ; no tests
1458 (home-page "http://github.com/digitalbazaar/pyld")
1459 (synopsis "Python implementation of the JSON-LD specification")
1460 (description
1461 "PyLD is an implementation of the JSON-LD specification.")
1462 (license bsd-3)))
1463
1464(define-public python2-pyld
1465 (package-with-python2 python-pyld))
3a1f9a68
DT
1466
1467(define-public python-certifi
1468 (package
1469 (name "python-certifi")
1470 (version "14.05.14")
1471 (source (origin
1472 (method url-fetch)
1473 (uri
1474 (string-append
1475 "https://pypi.python.org/packages/source/c/certifi/certifi-"
1476 version ".tar.gz"))
1477 (sha256
1478 (base32
1479 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
1480 (build-system python-build-system)
1481 (inputs
1482 `(("python-setuptools" ,python-setuptools)))
1483 (arguments `(#:tests? #f)) ; no tests
1484 (home-page "http://python-requests.org/")
1485 (synopsis "Python CA certificate bundle")
1486 (description
1487 "Certifi is a Python library that contains a CA certificate bundle, which
1488is used by the Requests library to verify HTTPS requests.")
1489 (license asl2.0)))
1490
1491(define-public python2-certifi
1492 (package-with-python2 python-certifi))
e6cfbd36
DT
1493
1494(define-public python2-requests
1495 (package
1496 (name "python2-requests")
1497 (version "2.4.0")
1498 (source (origin
1499 (method url-fetch)
1500 (uri
1501 (string-append
1502 "https://pypi.python.org/packages/source/r/requests/requests-"
1503 version ".tar.gz"))
1504 (sha256
1505 (base32
1506 "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh"))))
1507 (build-system python-build-system)
1508 (inputs
1509 `(("python-setuptools" ,python-setuptools)
1510 ("python-certifi" ,python-certifi)))
1511 (arguments `(#:tests? #f ; no tests
1512 #:python ,python-2))
1513 (home-page "http://python-requests.org/")
1514 (synopsis "Python HTTP library")
1515 (description
1516 "Requests is a Python HTTP client library. It aims to be easier to use
1517than Python’s urllib2 library.")
1518 (license asl2.0)))
864b5211
DT
1519
1520(define-public python-jsonschema
1521 (package
1522 (name "python-jsonschema")
1523 (version "2.4.0")
1524 (source (origin
1525 (method url-fetch)
1526 (uri
1527 (string-append
1528 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1529 version ".tar.gz"))
1530 (sha256
1531 (base32
1532 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
1533 (build-system python-build-system)
1534 (inputs
1535 `(("python-setuptools" ,python-setuptools)))
1536 (home-page "http://github.com/Julian/jsonschema")
1537 (synopsis "Implementation of JSON Schema for Python")
1538 (description
1539 "Jsonschema is an implementation of JSON Schema for Python.")
1540 (license expat)))
1541
1542(define-public python2-jsonschema
1543 (package-with-python2 python-jsonschema))
850189b8
DT
1544
1545(define-public python-unidecode
1546 (package
1547 (name "python-unidecode")
1548 (version "0.04.16")
1549 (source (origin
1550 (method url-fetch)
1551 (uri
1552 (string-append
1553 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
1554 version ".tar.gz"))
1555 (sha256
1556 (base32
1557 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
1558 (build-system python-build-system)
1559 (inputs
1560 `(("python-setuptools" ,python-setuptools)))
1561 (home-page "https://pypi.python.org/pypi/Unidecode")
1562 (synopsis "ASCII transliterations of Unicode text")
1563 (description
1564 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1565useful when integrating with legacy code that doesn't support Unicode, or for
1566ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1567machine identifiers from human-readable Unicode strings that should still be
1568somewhat intelligeble.")
1569 (license gpl2+)))
1570
1571(define-public python2-unidecode
1572 (package-with-python2 python-unidecode))
6d45fef4
DT
1573
1574(define-public python-pyjwt
1575 (package
1576 (name "python-pyjwt")
1577 (version "0.2.1")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-"
1583 version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g"))))
1587 (build-system python-build-system)
1588 (inputs
1589 `(("python-setuptools" ,python-setuptools)))
1590 (arguments
1591 '(#:tests? #f)) ; test suite doesn't work
1592 (home-page "http://github.com/progrium/pyjwt")
1593 (synopsis "JSON Web Token implementation in Python")
1594 (description
1595 "PyJWT is a JSON Web Token implementation written in Python.")
1596 (license expat)))
1597
1598(define-public python2-pyjwt
1599 (package-with-python2 python-pyjwt))
1600
2cec1f6f
DT
1601(define-public python-oauthlib
1602 (package
1603 (name "python-oauthlib")
1604 (version "0.6.3")
1605 (source (origin
1606 (method url-fetch)
1607 (uri
1608 (string-append
1609 "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
1610 version ".tar.gz"))
1611 (sha256
1612 (base32
1613 "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
1614 (build-system python-build-system)
1615 (inputs
1616 `(("python-setuptools" ,python-setuptools)
1617 ("python-pyjwt" ,python-pyjwt)
1618 ("python-pycrypto" ,python-pycrypto)
1619 ("python-nose" ,python-nose)
1620 ("python-mock" ,python-mock)))
1621 (home-page "https://github.com/idan/oauthlib")
1622 (synopsis "OAuth implementation for Python")
1623 (description
1624 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1625OAuth request-signing logic.")
1626 (license bsd-3)))
1627
1628(define-public python2-oauthlib
1629 (let ((base (package-with-python2 python-oauthlib)))
1630 (package
1631 (inherit base)
1632 (name "python2-oauthlib")
1633 (version "0.6.3")
1634 (source (origin
1635 (method url-fetch)
1636 (uri
1637 (string-append
1638 "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
1639 version ".tar.gz"))
1640 (sha256
1641 (base32
1642 "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
1643 (inputs
1644 (append (package-inputs base)
1645 `(("python2-unittest2" ,python2-unittest2)))))))
ec5dbb5c
DT
1646
1647(define-public python-itsdangerous
1648 (package
1649 (name "python-itsdangerous")
1650 (version "0.24")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (string-append
1655 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1656 version ".tar.gz"))
1657 (sha256
1658 (base32
1659 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1660 (build-system python-build-system)
1661 (inputs
1662 `(("python-setuptools" ,python-setuptools)))
1663 (home-page "http://github.com/mitsuhiko/itsdangerous")
1664 (synopsis "Python library for passing data to/from untrusted environments")
1665 (description
1666 "Itsdangerous provides various helpers to pass trusted data to untrusted
1667environments and back.")
1668 (license bsd-3)))
1669
1670(define-public python2-itsdangerous
1671 (package-with-python2 python-itsdangerous))
5731cae3
DT
1672
1673(define-public python-virtualenv
1674 (package
1675 (name "python-virtualenv")
1676 (version "1.11.6")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (string-append
1681 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
1682 version ".tar.gz"))
1683 (sha256
1684 (base32
1685 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
1686 (build-system python-build-system)
1687 (inputs
1688 `(("python-setuptools" ,python-setuptools)
1689 ("python-mock" ,python-mock)
1690 ("python-nose" ,python-nose)))
1691 (home-page "https://virtualenv.pypa.io/")
1692 (synopsis "Virtual Python environment builder")
1693 (description
1694 "Virtualenv is a tool to create isolated Python environments.")
1695 (license expat)))
1696
1697(define-public python2-virtualenv
1698 (package-with-python2 python-virtualenv))
8176d4d5
DT
1699
1700(define-public python-markupsafe
1701 (package
1702 (name "python-markupsafe")
1703 (version "0.23")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (string-append
1708 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
1709 version ".tar.gz"))
1710 (sha256
1711 (base32
1712 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
1713 (build-system python-build-system)
1714 (inputs
1715 `(("python-setuptools" ,python-setuptools)))
1716 (home-page "http://github.com/mitsuhiko/markupsafe")
1717 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
1718 (description
1719 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
1720for Python.")
1721 (license bsd-3)))
1722
1723(define-public python2-markupsafe
1724 (package-with-python2 python-markupsafe))
fe34f0d1
DT
1725
1726(define-public python-jinja2
1727 (package
1728 (name "python-jinja2")
1729 (version "2.7.3")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
1739 (build-system python-build-system)
1740 (inputs
1741 `(("python-setuptools" ,python-setuptools)
1742 ("python-markupsafe" ,python-markupsafe)))
1743 (home-page "http://jinja.pocoo.org/")
1744 (synopsis "Python template engine")
1745 (description
1746 "Jinja2 is a small but fast and easy to use stand-alone template engine
1747written in pure Python.")
1748 (license bsd-3)))
1749
1750(define-public python2-jinja2
1751 (package-with-python2 python-jinja2))
3580ab8b
DT
1752
1753(define-public python-docutils
1754 (package
1755 (name "python-docutils")
1756 (version "0.12")
1757 (source
1758 (origin
1759 (method url-fetch)
1760 (uri (string-append
1761 "https://pypi.python.org/packages/source/d/docutils/docutils-"
1762 version ".tar.gz"))
1763 (sha256
1764 (base32
1765 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
1766 (build-system python-build-system)
1767 (inputs
1768 `(("python-setuptools" ,python-setuptools)))
1769 (arguments
1770 '(#:tests? #f)) ; no setup.py test command
1771 (home-page "http://docutils.sourceforge.net/")
1772 (synopsis "Python Documentation Utilities")
1773 (description
1774 "Docutils is a modular system for processing documentation into useful
1775formats, such as HTML, XML, and LaTeX. For input Docutils supports
1776reStructuredText.")
1777 ;; Most of the source code is public domain, but some source files are
1778 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
1779 (license (list public-domain psfl bsd-2 gpl3+))))
1780
1781(define-public python2-docutils
1782 (package-with-python2 python-docutils))
fb35b7c0
DT
1783
1784(define-public python-pygments
1785 (package
1786 (name "python-pygments")
1787 (version "1.6")
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (string-append
1792 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
1793 version ".tar.gz"))
1794 (sha256
1795 (base32
1796 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
1797 (build-system python-build-system)
1798 (inputs
1799 `(("python-setuptools" ,python-setuptools)))
1800 (home-page "http://pygments.org/")
1801 (synopsis "Syntax highlighting")
1802 (description
1803 "Pygments is a syntax highlighting package written in Python.")
1804 (license bsd-2)))
1805
1806(define-public python2-pygments
1807 (package-with-python2 python-pygments))