Commit | Line | Data |
---|---|---|
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> |
a01b6da7 NK |
11 | ;;; |
12 | ;;; This file is part of GNU Guix. | |
13 | ;;; | |
14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
15 | ;;; under the terms of the GNU General Public License as published by | |
16 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
17 | ;;; your option) any later version. | |
18 | ;;; | |
19 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;;; GNU General Public License for more details. | |
23 | ;;; | |
24 | ;;; You should have received a copy of the GNU General Public License | |
25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
26 | ||
1ffa7090 | 27 | (define-module (gnu packages python) |
011b18c3 | 28 | #:use-module ((guix licenses) |
166191b3 | 29 | #:select (asl2.0 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style |
fbcfa730 | 30 | gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ |
4ed20663 | 31 | psfl public-domain x11-style)) |
bd3fa666 | 32 | #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) |
3fdc99da | 33 | #:use-module (gnu packages) |
1ffa7090 | 34 | #:use-module (gnu packages compression) |
4ed20663 AE |
35 | #:use-module (gnu packages databases) |
36 | #:use-module (gnu packages elf) | |
37 | #:use-module (gnu packages fontutils) | |
3fdc99da | 38 | #:use-module (gnu packages gdbm) |
4ed20663 AE |
39 | #:use-module (gnu packages gcc) |
40 | #:use-module (gnu packages ghostscript) | |
41 | #:use-module (gnu packages glib) | |
42 | #:use-module (gnu packages gtk) | |
421a80a2 | 43 | #:use-module (gnu packages icu4c) |
c937562e | 44 | #:use-module (gnu packages image) |
4ed20663 | 45 | #:use-module (gnu packages imagemagick) |
b10ab723 | 46 | #:use-module (gnu packages libffi) |
0da98533 | 47 | #:use-module (gnu packages maths) |
4ed20663 | 48 | #:use-module (gnu packages multiprecision) |
be7134bf | 49 | #:use-module (gnu packages ncurses) |
4ed20663 AE |
50 | #:use-module (gnu packages openssl) |
51 | #:use-module (gnu packages perl) | |
b10ab723 | 52 | #:use-module (gnu packages pkg-config) |
4ed20663 | 53 | #:use-module (gnu packages readline) |
1c65314c FB |
54 | #:use-module (gnu packages texlive) |
55 | #:use-module (gnu packages texinfo) | |
8d12be1e | 56 | #:use-module (gnu packages web) |
ce0614dd | 57 | #:use-module (gnu packages base) |
26b307e2 | 58 | #:use-module (gnu packages xml) |
6fa14469 | 59 | #:use-module (gnu packages xorg) |
4ed20663 | 60 | #:use-module (gnu packages zip) |
a01b6da7 NK |
61 | #:use-module (guix packages) |
62 | #:use-module (guix download) | |
ea5456c8 | 63 | #:use-module (guix git-download) |
11bb85a1 | 64 | #:use-module (guix utils) |
acc26ff1 | 65 | #:use-module (guix build-system gnu) |
898238b9 | 66 | #:use-module (guix build-system python) |
1c65314c FB |
67 | #:use-module (guix build-system trivial) |
68 | #:use-module (srfi srfi-1)) | |
a01b6da7 | 69 | |
b24d1cfc | 70 | (define-public python-2 |
a01b6da7 NK |
71 | (package |
72 | (name "python") | |
ee2b5109 | 73 | (version "2.7.6") |
a01b6da7 NK |
74 | (source |
75 | (origin | |
76 | (method url-fetch) | |
9b43a0ff | 77 | (uri (string-append "https://www.python.org/ftp/python/" |
a01b6da7 | 78 | version "/Python-" version ".tar.xz")) |
b88e1b0a EB |
79 | (patches (list (search-patch "python-libffi-mips-n32-fix.patch") |
80 | (search-patch "python2-sqlite-3.8.4-test-fix.patch"))) | |
32d5c729 | 81 | (patch-flags '("-p0")) |
a01b6da7 NK |
82 | (sha256 |
83 | (base32 | |
ee2b5109 | 84 | "18gnpyh071dxa0rv3silrz92jw9qpblswzwv4gzqcwxzz20qxmhz")))) |
a01b6da7 | 85 | (build-system gnu-build-system) |
3fdc99da | 86 | (arguments |
af807dea AE |
87 | `(#:tests? #f |
88 | ;; 258 tests OK. | |
89 | ;; 103 tests failed: | |
90 | ;; test_bz2 test_distutils test_file test_file2k test_popen2 | |
91 | ;; test_shutil test_signal test_site test_slice test_smtplib | |
92 | ;; test_smtpnet test_socket test_socketserver test_softspace | |
93 | ;; test_sort test_sqlite test_ssl test_startfile test_str | |
94 | ;; test_strftime test_string test_stringprep test_strop test_strptime | |
95 | ;; test_strtod test_struct test_structmembers test_structseq | |
96 | ;; test_subprocess test_sunaudiodev test_sundry test_symtable | |
97 | ;; test_syntax test_sys test_sys_setprofile test_sys_settrace | |
98 | ;; test_sysconfig test_tarfile test_tcl test_telnetlib test_tempfile | |
99 | ;; test_textwrap test_thread test_threaded_import | |
100 | ;; test_threadedtempfile test_threading test_threading_local | |
101 | ;; test_threadsignals test_time test_timeout test_tk test_tokenize | |
102 | ;; test_tools test_trace test_traceback test_transformer | |
103 | ;; test_ttk_guionly test_ttk_textonly test_tuple test_typechecks | |
104 | ;; test_ucn test_unary test_undocumented_details test_unicode | |
105 | ;; test_unicode_file test_unicodedata test_univnewlines | |
106 | ;; test_univnewlines2k test_unpack test_urllib test_urllib2 | |
107 | ;; test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse | |
108 | ;; test_userdict test_userlist test_userstring test_uu test_uuid | |
109 | ;; test_wait3 test_wait4 test_warnings test_wave test_weakref | |
110 | ;; test_weakset test_whichdb test_winreg test_winsound test_with | |
111 | ;; test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c | |
112 | ;; test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile | |
113 | ;; test_zipfile64 test_zipimport test_zipimport_support test_zlib | |
114 | ;; 31 tests skipped: | |
115 | ;; test_aepack test_al test_applesingle test_ascii_formatd test_bsddb | |
116 | ;; test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn | |
117 | ;; test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr | |
118 | ;; test_codecmaps_tw test_ctypes test_curses test_dl test_gdb test_gl | |
119 | ;; test_imageop test_imgfile test_ioctl test_kqueue | |
120 | ;; test_linuxaudiodev test_macos test_macostools test_msilib | |
121 | ;; test_multiprocessing test_ossaudiodev test_pep277 | |
122 | ;; test_scriptpackages | |
123 | ;; 7 skips unexpected on linux2: | |
124 | ;; test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_gdb | |
125 | ;; test_ioctl test_multiprocessing | |
126 | ;; One of the typical errors: | |
127 | ;; test_unicode | |
128 | ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No such file or directory | |
129 | #:test-target "test" | |
3fdc99da CR |
130 | #:configure-flags |
131 | (let ((bz2 (assoc-ref %build-inputs "bzip2")) | |
132 | (gdbm (assoc-ref %build-inputs "gdbm")) | |
b10ab723 | 133 | (libffi (assoc-ref %build-inputs "libffi")) |
b88e1b0a | 134 | (sqlite (assoc-ref %build-inputs "sqlite")) |
3fdc99da CR |
135 | (openssl (assoc-ref %build-inputs "openssl")) |
136 | (readline (assoc-ref %build-inputs "readline")) | |
137 | (zlib (assoc-ref %build-inputs "zlib"))) | |
fd982732 | 138 | (list "--enable-shared" ; allow embedding |
b10ab723 | 139 | "--with-system-ffi" ; build ctypes |
fd982732 | 140 | (string-append "CPPFLAGS=" |
3fdc99da CR |
141 | "-I" bz2 "/include " |
142 | "-I" gdbm "/include " | |
b88e1b0a | 143 | "-I" sqlite "/include " |
3fdc99da CR |
144 | "-I" openssl "/include " |
145 | "-I" readline "/include " | |
146 | "-I" zlib "/include") | |
147 | (string-append "LDFLAGS=" | |
148 | "-L" bz2 "/lib " | |
149 | "-L" gdbm "/lib " | |
b10ab723 | 150 | "-L" libffi "/lib " |
b88e1b0a | 151 | "-L" sqlite "/lib " |
3fdc99da CR |
152 | "-L" openssl "/lib " |
153 | "-L" readline "/lib " | |
fd982732 LC |
154 | "-L" zlib "/lib"))) |
155 | ||
156 | #:modules ((guix build gnu-build-system) | |
157 | (guix build utils) | |
3309e3a1 | 158 | (guix build rpath) |
fd982732 | 159 | (srfi srfi-26)) |
3309e3a1 LC |
160 | #:imported-modules ((guix build gnu-build-system) |
161 | (guix build utils) | |
162 | (guix build rpath)) | |
fd982732 LC |
163 | |
164 | #:phases | |
165 | (alist-cons-after | |
166 | 'strip 'add-lib-to-runpath | |
167 | (lambda* (#:key outputs #:allow-other-keys) | |
fd982732 LC |
168 | (let* ((out (assoc-ref outputs "out")) |
169 | (lib (string-append out "/lib"))) | |
170 | ;; Add LIB to the RUNPATH of all the executables. | |
171 | (with-directory-excursion out | |
172 | (for-each (cut augment-rpath <> lib) | |
173 | (find-files "bin" ".*"))))) | |
d4bf49b1 EB |
174 | (alist-cons-before |
175 | 'configure 'patch-lib-shells | |
176 | (lambda _ | |
bb184d98 EB |
177 | ;; Filter for existing files, since some may not exist in all |
178 | ;; versions of python that are built with this recipe. | |
179 | (substitute* (filter file-exists? | |
180 | '("Lib/subprocess.py" | |
181 | "Lib/popen2.py" | |
182 | "Lib/distutils/tests/test_spawn.py" | |
183 | "Lib/test/test_subprocess.py")) | |
d4bf49b1 | 184 | (("/bin/sh") (which "sh")))) |
9a9a3adf CR |
185 | (alist-cons-before |
186 | 'check 'pre-check | |
187 | (lambda _ | |
188 | ;; 'Lib/test/test_site.py' needs a valid $HOME | |
189 | (setenv "HOME" (getcwd))) | |
190 | %standard-phases))))) | |
a01b6da7 | 191 | (inputs |
3fdc99da CR |
192 | `(("bzip2" ,bzip2) |
193 | ("gdbm" ,gdbm) | |
b10ab723 | 194 | ("libffi" ,libffi) ; for ctypes |
b88e1b0a | 195 | ("sqlite" ,sqlite) ; for sqlite extension |
a01b6da7 | 196 | ("openssl" ,openssl) |
3fdc99da | 197 | ("readline" ,readline) |
fd982732 | 198 | ("zlib" ,zlib) |
3309e3a1 | 199 | ("patchelf" ,patchelf))) ; for (guix build rpath) |
b10ab723 CR |
200 | (native-inputs |
201 | `(("pkg-config" ,pkg-config))) | |
9be8d7c8 LC |
202 | (native-search-paths |
203 | (list (search-path-specification | |
204 | (variable "PYTHONPATH") | |
af070955 | 205 | (files '("lib/python2.7/site-packages"))))) |
a01b6da7 NK |
206 | (home-page "http://python.org") |
207 | (synopsis | |
35b9e423 | 208 | "High-level, dynamically-typed programming language") |
a01b6da7 NK |
209 | (description |
210 | "Python is a remarkably powerful dynamic programming language that | |
211 | is used in a wide variety of application domains. Some of its key | |
212 | distinguishing features include: clear, readable syntax; strong | |
213 | introspection capabilities; intuitive object orientation; natural | |
214 | expression of procedural code; full modularity, supporting hierarchical | |
215 | packages; exception-based error handling; and very high level dynamic | |
216 | data types.") | |
217 | (license psfl))) | |
acc26ff1 | 218 | |
b24d1cfc AE |
219 | (define-public python |
220 | (package (inherit python-2) | |
717003e3 LC |
221 | (version "3.3.5") |
222 | (source (origin | |
223 | (method url-fetch) | |
224 | (uri (string-append "https://www.python.org/ftp/python/" | |
225 | version "/Python-" version ".tar.xz")) | |
32d5c729 | 226 | (patches (list (search-patch "python-fix-tests.patch") |
b88e1b0a | 227 | (search-patch "python-sqlite-3.8.4-test-fix.patch") |
32d5c729 | 228 | (search-patch "python-libffi-mips-n32-fix.patch"))) |
717003e3 LC |
229 | (patch-flags '("-p0")) |
230 | (sha256 | |
231 | (base32 | |
232 | "1rdncc7g8g6f3lfdg33rli1yffbiq8z283xy4f5ksl1l8i49psdb")))) | |
9a9a3adf CR |
233 | (arguments |
234 | (let ((args `(#:modules ((guix build gnu-build-system) | |
235 | (guix build utils) | |
236 | (srfi srfi-1) | |
237 | (srfi srfi-26)) | |
238 | ,@(package-arguments python-2)))) | |
239 | (substitute-keyword-arguments args | |
240 | ((#:tests? _) #t)))) | |
1aebc0cb AE |
241 | (native-search-paths |
242 | (list (search-path-specification | |
243 | (variable "PYTHONPATH") | |
af070955 | 244 | (files '("lib/python3.3/site-packages"))))))) |
f26a77ff | 245 | |
898238b9 AE |
246 | (define-public python-wrapper |
247 | (package (inherit python) | |
248 | (name "python-wrapper") | |
249 | (source #f) | |
250 | (build-system trivial-build-system) | |
3c0f2329 | 251 | (propagated-inputs `(("python" ,python))) |
898238b9 AE |
252 | (arguments |
253 | `(#:modules ((guix build utils)) | |
254 | #:builder | |
255 | (begin | |
256 | (use-modules (guix build utils)) | |
257 | (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
258 | (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) | |
259 | (mkdir-p bin) | |
260 | (for-each | |
261 | (lambda (old new) | |
262 | (symlink (string-append python old) | |
263 | (string-append bin "/" new))) | |
264 | `("python3", "pydoc3", "idle3") | |
265 | `("python", "pydoc", "idle")))))) | |
266 | (description (string-append (package-description python) | |
267 | "\n\nThis wrapper package provides symbolic links to the python binaries | |
268 | without version suffix.")))) | |
269 | ||
270 | ||
89114f39 | 271 | (define-public python-pytz |
acc26ff1 | 272 | (package |
89114f39 | 273 | (name "python-pytz") |
acc26ff1 CR |
274 | (version "2013b") |
275 | (source | |
276 | (origin | |
277 | (method url-fetch) | |
278 | (uri (string-append "https://launchpad.net/pytz/main/" version | |
279 | "/+download/pytz-" version ".tar.bz2")) | |
280 | (sha256 | |
281 | (base32 | |
282 | "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5")))) | |
283 | (build-system python-build-system) | |
8498b8cf | 284 | (arguments `(#:tests? #f)) ; no test target |
acc26ff1 | 285 | (home-page "https://launchpad.net/pytz") |
9e771e3b | 286 | (synopsis "Python timezone library") |
acc26ff1 CR |
287 | (description |
288 | "This library allows accurate and cross platform timezone calculations | |
289 | using Python 2.4 or higher and provides access to the Olson timezone database.") | |
290 | (license x11))) | |
5ace6e2f | 291 | |
89114f39 | 292 | (define-public python2-pytz |
11bb85a1 | 293 | (package-with-python2 python-pytz)) |
89114f39 | 294 | |
fc50e9c6 | 295 | |
89114f39 | 296 | (define-public python-babel |
5ace6e2f | 297 | (package |
89114f39 | 298 | (name "python-babel") |
e1804763 | 299 | (version "1.3") |
5ace6e2f CR |
300 | (source |
301 | (origin | |
302 | (method url-fetch) | |
e1804763 | 303 | (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-" |
5ace6e2f CR |
304 | version ".tar.gz")) |
305 | (sha256 | |
306 | (base32 | |
e1804763 | 307 | "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz")))) |
5ace6e2f CR |
308 | (build-system python-build-system) |
309 | (inputs | |
e1804763 AE |
310 | `(("python-pytz" ,python-pytz) |
311 | ("python-setuptools" ,python-setuptools))) | |
8498b8cf | 312 | (arguments `(#:tests? #f)) ; no test target |
e1804763 | 313 | (home-page "http://babel.pocoo.org/") |
5ace6e2f CR |
314 | (synopsis |
315 | "Tools for internationalizing Python applications") | |
316 | (description | |
317 | "Babel is composed of two major parts: | |
318 | - tools to build and work with gettext message catalogs | |
319 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
320 | access to various locale display names, localized number and date formatting, | |
321 | etc. ") | |
322 | (license bsd-3))) | |
89114f39 AE |
323 | |
324 | (define-public python2-babel | |
11bb85a1 | 325 | (package-with-python2 python-babel)) |
73adf220 | 326 | |
c1448c69 EB |
327 | (define-public python-lockfile |
328 | (package | |
329 | (name "python-lockfile") | |
330 | (version "0.9.1") | |
331 | (source | |
332 | (origin | |
333 | (method url-fetch) | |
334 | (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/" | |
335 | "lockfile-" version ".tar.gz")) | |
336 | (sha256 | |
337 | (base32 | |
338 | "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3")))) | |
339 | (build-system python-build-system) | |
340 | (arguments '(#:test-target "check")) | |
341 | (home-page "http://code.google.com/p/pylockfile/") | |
342 | (synopsis "Platform-independent file locking module") | |
343 | (description | |
344 | "The lockfile package exports a LockFile class which provides a simple | |
345 | API for locking files.") | |
bd3fa666 | 346 | (license license:expat))) |
c1448c69 EB |
347 | |
348 | (define-public python2-lockfile | |
349 | (package-with-python2 python-lockfile)) | |
350 | ||
5a1a4bf6 EB |
351 | (define-public python-mock |
352 | (package | |
353 | (name "python-mock") | |
354 | (version "1.0.1") | |
355 | (source | |
356 | (origin | |
357 | (method url-fetch) | |
358 | (uri (string-append "https://pypi.python.org/packages/source/m/mock/" | |
359 | "mock-" version ".tar.gz")) | |
360 | (sha256 | |
361 | (base32 | |
362 | "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq")))) | |
363 | (build-system python-build-system) | |
364 | (arguments '(#:test-target "check")) | |
07af3e5e | 365 | (home-page "http://code.google.com/p/mock/") |
9e771e3b | 366 | (synopsis "Python mocking and patching library for testing") |
5a1a4bf6 EB |
367 | (description |
368 | "Mock is a library for testing in Python. It allows you to replace parts | |
369 | of your system under test with mock objects and make assertions about how they | |
370 | have been used.") | |
bd3fa666 | 371 | (license license:expat))) |
5a1a4bf6 EB |
372 | |
373 | (define-public python2-mock | |
374 | (package-with-python2 python-mock)) | |
375 | ||
fc50e9c6 | 376 | |
73adf220 AE |
377 | (define-public python-setuptools |
378 | (package | |
379 | (name "python-setuptools") | |
d3d656c5 | 380 | (version "12.1") |
73adf220 AE |
381 | (source |
382 | (origin | |
383 | (method url-fetch) | |
384 | (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-" | |
385 | version ".tar.gz")) | |
386 | (sha256 | |
387 | (base32 | |
d3d656c5 | 388 | "04bfk7si1pwj3b5k2b1x9b1zkiclybmzpw6alrs5bciri56lg9zs")))) |
73adf220 | 389 | (build-system python-build-system) |
d3d656c5 AE |
390 | ;; FIXME: Tests require pytest, which itself relies on setuptools. |
391 | ;; One could bootstrap with an internal untested setuptools. | |
73adf220 | 392 | (arguments |
824af8ca | 393 | `(#:tests? #f)) |
73adf220 AE |
394 | (home-page "https://pypi.python.org/pypi/setuptools") |
395 | (synopsis | |
396 | "Library designed to facilitate packaging Python projects") | |
397 | (description | |
398 | "Setuptools is a fully-featured, stable library designed to facilitate | |
399 | packaging Python projects, where packaging includes: | |
400 | Python package and module definitions, | |
401 | distribution package metadata, | |
402 | test hooks, | |
403 | project installation, | |
404 | platform-specific details, | |
405 | Python 3 support.") | |
406 | (license psfl))) | |
407 | ||
408 | (define-public python2-setuptools | |
409 | (package-with-python2 python-setuptools)) | |
fc50e9c6 AE |
410 | |
411 | ||
cafc3f5a EB |
412 | (define-public python-pycrypto |
413 | (package | |
414 | (name "python-pycrypto") | |
415 | (version "2.6.1") | |
416 | (source | |
417 | (origin | |
418 | (method url-fetch) | |
419 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
420 | "pycrypto/pycrypto-" version ".tar.gz")) | |
421 | (sha256 | |
422 | (base32 | |
423 | "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj")))) | |
424 | (build-system python-build-system) | |
425 | (native-inputs | |
426 | `(("python-setuptools" ,python-setuptools))) | |
427 | (inputs | |
428 | `(("python" ,python) | |
429 | ("gmp" ,gmp))) | |
430 | (arguments | |
431 | `(#:phases | |
432 | (alist-cons-before | |
433 | 'build 'set-build-env | |
434 | ;; pycrypto runs an autoconf configure script behind the scenes | |
435 | (lambda _ | |
436 | (setenv "CONFIG_SHELL" (which "bash"))) | |
437 | %standard-phases))) | |
438 | (home-page "http://www.pycrypto.org/") | |
439 | (synopsis "Cryptographic modules for Python") | |
440 | (description | |
441 | "Pycrypto is a collection of both secure hash functions (such as SHA256 | |
442 | and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, | |
35b9e423 | 443 | etc.). The package is structured to make adding new modules easy.") |
cafc3f5a EB |
444 | (license public-domain))) |
445 | ||
446 | (define-public python-keyring | |
447 | (package | |
448 | (name "python-keyring") | |
449 | (version "3.8") | |
450 | (source | |
451 | (origin | |
452 | (method url-fetch) | |
453 | (uri (string-append "https://pypi.python.org/packages/source/k/" | |
454 | "keyring/keyring-" version ".zip")) | |
455 | (sha256 | |
456 | (base32 | |
457 | "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg")))) | |
458 | (build-system python-build-system) | |
459 | (native-inputs | |
460 | `(("unzip" ,unzip) | |
461 | ("python-setuptools" ,python-setuptools) | |
462 | ("python-mock" ,python-mock))) | |
463 | (inputs | |
464 | `(("python-pycrypto" ,python-pycrypto))) | |
465 | (arguments | |
466 | `(#:tests? #f ;TODO: tests require pytest | |
467 | #:phases | |
468 | (alist-replace | |
469 | 'unpack | |
470 | (lambda _ | |
471 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
472 | "/bin/unzip")) | |
473 | (source (assoc-ref %build-inputs "source"))) | |
474 | (and (zero? (system* unzip source)) | |
475 | (chdir (string-append "keyring-" ,version))))) | |
476 | %standard-phases))) | |
477 | (home-page "http://bitbucket.org/kang/python-keyring-lib") | |
478 | (synopsis "Store and access your passwords safely") | |
479 | (description | |
480 | "The Python keyring lib provides a easy way to access the system keyring | |
35b9e423 | 481 | service from python. It can be used in any application that needs safe |
cafc3f5a EB |
482 | password storage.") |
483 | ;; "MIT" and PSF dual license | |
484 | (license x11))) | |
485 | ||
a480bc41 EB |
486 | (define-public python-six |
487 | (package | |
488 | (name "python-six") | |
489 | (version "1.7.2") | |
490 | (source | |
491 | (origin | |
492 | (method url-fetch) | |
493 | (uri (string-append "https://pypi.python.org/packages/source/s/" | |
494 | "six/six-" version ".tar.gz")) | |
495 | (sha256 | |
496 | (base32 | |
497 | "164rns26aqfqx2hwi0qq3scl50s69japn0fvgvrjsbyg7r1mxf67")))) | |
498 | (build-system python-build-system) | |
499 | (inputs | |
500 | `(("python-setuptools" ,python-setuptools))) | |
501 | (home-page "http://pypi.python.org/pypi/six/") | |
502 | (synopsis "Python 2 and 3 compatibility utilities") | |
503 | (description | |
35b9e423 | 504 | "Six is a Python 2 and 3 compatibility library. It provides utility |
a480bc41 EB |
505 | functions for smoothing over the differences between the Python versions with |
506 | the goal of writing Python code that is compatible on both Python versions. | |
35b9e423 | 507 | Six supports every Python version since 2.5. It is contained in only one |
a480bc41 EB |
508 | Python file, so it can be easily copied into your project.") |
509 | (license x11))) | |
510 | ||
0c20025c AE |
511 | (define-public python2-six |
512 | (package-with-python2 python-six)) | |
513 | ||
cafc3f5a EB |
514 | (define-public python-dateutil-2 |
515 | (package | |
516 | (name "python-dateutil") | |
517 | (version "2.2") | |
518 | (source | |
519 | (origin | |
520 | (method url-fetch) | |
521 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
522 | name "/" name "-" version ".tar.gz")) | |
523 | (sha256 | |
524 | (base32 | |
525 | "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f")))) | |
526 | (build-system python-build-system) | |
527 | (inputs | |
528 | `(("python-setuptools" ,python-setuptools) | |
529 | ("python-six" ,python-six))) | |
530 | (home-page "http://labix.org/python-dateutil") | |
531 | (synopsis "Extensions to the standard datetime module") | |
532 | (description | |
533 | "The dateutil module provides powerful extensions to the standard | |
534 | datetime module, available in Python 2.3+.") | |
535 | (license bsd-3))) | |
536 | ||
537 | (define-public python2-dateutil-2 | |
538 | (package-with-python2 python-dateutil-2)) | |
539 | ||
fc50e9c6 AE |
540 | (define-public python-dateutil |
541 | (package | |
542 | (name "python-dateutil") | |
543 | (version "1.5") ; last version for python < 3 | |
544 | (source | |
545 | (origin | |
546 | (method url-fetch) | |
cafc3f5a EB |
547 | (uri (string-append "http://labix.org/download/python-dateutil/" |
548 | "python-dateutil-" version ".tar.gz")) | |
fc50e9c6 AE |
549 | (sha256 |
550 | (base32 | |
551 | "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0")))) | |
552 | (build-system python-build-system) | |
553 | (inputs | |
554 | `(("python-setuptools" ,python-setuptools))) | |
555 | (home-page "http://labix.org/python-dateutil") | |
cafc3f5a | 556 | (synopsis "Extensions to the standard datetime module") |
fc50e9c6 AE |
557 | (description |
558 | "The dateutil module provides powerful extensions to the standard | |
559 | datetime module, available in Python 2.3+.") | |
560 | (license psfl))) | |
561 | ||
562 | (define-public python2-dateutil | |
563 | (package-with-python2 python-dateutil)) | |
1d08c01f | 564 | |
cafc3f5a EB |
565 | (define-public python-parsedatetime |
566 | (package | |
567 | (name "python-parsedatetime") | |
568 | (version "1.2") | |
569 | (source | |
570 | (origin | |
571 | (method url-fetch) | |
572 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
573 | "parsedatetime/parsedatetime-" version ".tar.gz")) | |
574 | (sha256 | |
575 | (base32 | |
576 | "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv")))) | |
577 | (build-system python-build-system) | |
578 | (native-inputs | |
579 | `(("python-setuptools" ,python-setuptools))) | |
580 | (arguments `(#:tests? #f)) ;no test target | |
581 | (home-page "http://github.com/bear/parsedatetime/") | |
582 | (synopsis | |
583 | "Parse human-readable date/time text") | |
584 | (description | |
585 | "Parse human-readable date/time text") | |
586 | (license asl2.0))) | |
587 | ||
588 | (define-public python-tzlocal | |
589 | (package | |
590 | (name "python-tzlocal") | |
591 | (version "1.1.1") | |
592 | (source | |
593 | (origin | |
594 | (method url-fetch) | |
595 | (uri (string-append "https://pypi.python.org/packages/source/t/" | |
596 | "tzlocal/tzlocal-" version ".zip")) | |
597 | (sha256 | |
598 | (base32 | |
599 | "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9")))) | |
600 | (build-system python-build-system) | |
601 | (native-inputs | |
602 | `(("unzip" ,unzip) | |
603 | ("python-setuptools" ,python-setuptools))) | |
604 | (inputs `(("python-pytz" ,python-pytz))) | |
605 | (arguments | |
606 | `(#:phases | |
607 | (alist-replace | |
608 | 'unpack | |
609 | (lambda _ | |
610 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
611 | "/bin/unzip")) | |
612 | (source (assoc-ref %build-inputs "source"))) | |
613 | (and (zero? (system* unzip source)) | |
614 | (chdir (string-append "tzlocal-" ,version))))) | |
615 | %standard-phases))) | |
616 | (home-page "https://github.com/regebro/tzlocal") | |
617 | (synopsis | |
35b9e423 | 618 | "Local timezone information for Python") |
cafc3f5a EB |
619 | (description |
620 | "Tzlocal returns a tzinfo object with the local timezone information. | |
621 | This module attempts to fix a glaring hole in pytz, that there is no way to | |
622 | get the local timezone information, unless you know the zoneinfo name, and | |
623 | under several distributions that's hard or impossible to figure out.") | |
624 | (license cc0))) | |
625 | ||
be7134bf RW |
626 | (define-public python-pysam |
627 | (package | |
628 | (name "python-pysam") | |
629 | (version "0.8.1") | |
630 | (source | |
631 | (origin | |
632 | (method url-fetch) | |
633 | (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-" | |
634 | version ".tar.gz")) | |
635 | (sha256 | |
636 | (base32 | |
637 | "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459")))) | |
638 | (build-system python-build-system) | |
639 | (arguments | |
640 | `(#:tests? #f ; tests are excluded in the manifest | |
641 | #:phases | |
642 | (alist-cons-before | |
643 | 'build 'set-flags | |
644 | (lambda _ | |
645 | (setenv "LDFLAGS" "-lncurses") | |
646 | (setenv "CFLAGS" "-D_CURSES_LIB=1")) | |
647 | %standard-phases))) | |
648 | (inputs | |
649 | `(("python-cython" ,python-cython) | |
650 | ("python-setuptools" ,python-setuptools) | |
651 | ("ncurses" ,ncurses) | |
652 | ("zlib" ,zlib))) | |
653 | (home-page "https://github.com/pysam-developers/pysam") | |
654 | (synopsis "Python bindings to the SAMtools C API") | |
655 | (description | |
656 | "Pysam is a Python module for reading and manipulating files in the | |
657 | SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It | |
658 | also includes an interface for tabix.") | |
bd3fa666 | 659 | (license license:expat))) |
be7134bf RW |
660 | |
661 | (define-public python2-pysam | |
662 | (package-with-python2 python-pysam)) | |
1d08c01f AE |
663 | |
664 | (define-public python2-pysqlite | |
665 | (package | |
666 | (name "python2-pysqlite") | |
7a03af70 | 667 | (version "2.6.3a") ; see below |
1d08c01f AE |
668 | (source |
669 | (origin | |
670 | (method url-fetch) | |
7a03af70 LC |
671 | ;; During the switch from code.google.com to pypi.python.org, the 2.6.3 |
672 | ;; tarball was modified, but the version number was kept: | |
673 | ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>. | |
674 | ;; Here we want to refer to the pypi-hosted 2.6.3 tarball. | |
675 | (uri (string-append | |
676 | "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-" | |
677 | "2.6.3" ".tar.gz")) | |
1d08c01f AE |
678 | (sha256 |
679 | (base32 | |
7a03af70 | 680 | "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y")))) |
1d08c01f AE |
681 | (build-system python-build-system) |
682 | (inputs | |
683 | `(("sqlite" ,sqlite))) | |
684 | (arguments | |
685 | `(#:python ,python-2 ; incompatible with Python 3 | |
686 | #:tests? #f)) ; no test target | |
7a03af70 LC |
687 | (home-page "https://pypi.python.org/pypi/pysqlite") |
688 | (synopsis "SQLite bindings for Python") | |
1d08c01f AE |
689 | (description |
690 | "Pysqlite provides SQLite bindings for Python that comply to the | |
691 | Database API 2.0T.") | |
ed0cdf83 | 692 | (license license:zlib))) |
1d08c01f | 693 | |
2875caf5 AE |
694 | |
695 | (define-public python2-mechanize | |
696 | (package | |
697 | (name "python2-mechanize") | |
698 | (version "0.2.5") | |
699 | (source | |
700 | (origin | |
701 | (method url-fetch) | |
702 | (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-" | |
703 | version ".tar.gz")) | |
704 | (sha256 | |
705 | (base32 | |
706 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
707 | (build-system python-build-system) | |
708 | (inputs | |
709 | `(("python2-setuptools" ,python2-setuptools))) | |
710 | (arguments | |
711 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
712 | #:tests? #f)) | |
713 | ;; test fails with message | |
714 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
715 | ;; (python-3.3.2) or | |
716 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
717 | ;; (python-2.7.5). | |
718 | ;; The source code is from March 2011 and probably not up-to-date | |
719 | ;; with respect to python unit tests. | |
720 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
721 | (synopsis | |
722 | "Stateful programmatic web browsing in Python") | |
723 | (description | |
724 | "Mechanize implements stateful programmatic web browsing in Python, | |
725 | after Andy Lester’s Perl module WWW::Mechanize.") | |
166191b3 | 726 | (license (non-copyleft "file://COPYING" |
2875caf5 AE |
727 | "See COPYING in the distribution.")))) |
728 | ||
0352532e AE |
729 | |
730 | (define-public python-simplejson | |
731 | (package | |
732 | (name "python-simplejson") | |
733 | (version "3.3.0") | |
734 | (source | |
735 | (origin | |
736 | (method url-fetch) | |
737 | (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-" | |
738 | version ".tar.gz")) | |
739 | (sha256 | |
740 | (base32 | |
741 | "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks")))) | |
742 | (build-system python-build-system) | |
743 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
744 | (synopsis | |
745 | "Json library for Python") | |
746 | (description | |
747 | "JSON (JavaScript Object Notation) is a subset of JavaScript syntax | |
cc20a22a | 748 | (ECMA-262 3rd edition) used as a lightweight data interchange format. |
0352532e AE |
749 | |
750 | Simplejson exposes an API familiar to users of the standard library marshal | |
751 | and pickle modules. It is the externally maintained version of the json | |
752 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
753 | and (currently) has significant performance advantages, even without using | |
754 | the optional C extension for speedups. Simplejson is also supported on | |
755 | Python 3.3+.") | |
756 | (license x11))) | |
757 | ||
758 | (define-public python2-simplejson | |
759 | (package-with-python2 python-simplejson)) | |
421a80a2 AE |
760 | |
761 | ||
762 | (define-public python2-pyicu | |
763 | (package | |
764 | (name "python2-pyicu") | |
569ac046 | 765 | (version "1.8") |
421a80a2 AE |
766 | (source |
767 | (origin | |
768 | (method url-fetch) | |
769 | (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-" | |
770 | version ".tar.gz")) | |
771 | (sha256 | |
772 | (base32 | |
569ac046 | 773 | "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw")))) |
421a80a2 AE |
774 | (build-system python-build-system) |
775 | (inputs | |
776 | `(("icu4c" ,icu4c))) | |
777 | (arguments | |
778 | `(#:python ,python-2 ; Python 3 works also, but needs special care for | |
779 | ; linking with libpython3.3m | |
780 | #:tests? #f)) ; no check target | |
781 | (home-page "http://pyicu.osafoundation.org/") | |
9e771e3b | 782 | (synopsis "Python extension wrapping the ICU C++ API") |
421a80a2 AE |
783 | (description |
784 | "PyICU is a python extension wrapping the ICU C++ API.") | |
785 | (license x11))) | |
cc20a22a LC |
786 | |
787 | (define-public python2-dogtail | |
788 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
789 | ;; spaces in indentation" with Python 3. | |
790 | (package | |
791 | (name "python2-dogtail") | |
792 | (version "0.8.2") | |
793 | (source (origin | |
794 | (method url-fetch) | |
795 | (uri (string-append | |
796 | "https://fedorahosted.org/released/dogtail/dogtail-" | |
797 | version ".tar.gz")) | |
798 | (sha256 | |
799 | (base32 | |
800 | "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1")))) | |
801 | (build-system python-build-system) | |
802 | (arguments `(#:python ,python-2 | |
803 | #:tests? #f)) ; invalid command "test" | |
804 | (home-page "https://fedorahosted.org/dogtail/") | |
805 | (synopsis "GUI test tool and automation framework written in Python") | |
806 | (description | |
35b9e423 | 807 | "Dogtail is a GUI test tool and automation framework written in Python. |
cc20a22a LC |
808 | It uses Accessibility (a11y) technologies to communicate with desktop |
809 | applications. dogtail scripts are written in Python and executed like any | |
810 | other Python program.") | |
811 | (license gpl2+))) | |
515e6878 | 812 | |
011b18c3 LC |
813 | (define-public python2-empy |
814 | (package | |
815 | (name "python2-empy") | |
816 | (version "3.3") | |
817 | (source (origin | |
818 | (method url-fetch) | |
819 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
820 | version ".tar.gz")) | |
821 | (sha256 | |
822 | (base32 | |
823 | "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6")))) | |
824 | (build-system python-build-system) | |
825 | (arguments | |
826 | `(#:python ,python-2 | |
827 | #:phases (alist-replace | |
828 | 'check | |
829 | (lambda _ | |
830 | (zero? (system* "./test.sh"))) | |
831 | %standard-phases))) | |
832 | (home-page "http://www.alcyone.com/software/empy/") | |
833 | (synopsis "Templating system for Python") | |
834 | (description | |
835 | "EmPy is a system for embedding Python expressions and statements in | |
836 | template text; it takes an EmPy source file, processes it, and produces | |
837 | output. This is accomplished via expansions, which are special signals to the | |
838 | EmPy system and are set off by a special prefix (by default the at sign, @). | |
839 | EmPy can expand arbitrary Python expressions and statements in this way, as | |
840 | well as a variety of special forms. Textual data not explicitly delimited in | |
841 | this way is sent unaffected to the output, allowing Python to be used in | |
842 | effect as a markup language. Also supported are callbacks via hooks, | |
843 | recording and playback via diversions, and dynamic, chainable filters. The | |
844 | system is highly configurable via command line options and embedded | |
845 | commands.") | |
846 | (license lgpl2.1+))) | |
847 | ||
8deeda0c LC |
848 | (define-public python2-element-tree |
849 | (package | |
850 | (name "python2-element-tree") | |
851 | (version "1.2.6") | |
852 | (source (origin | |
853 | (method url-fetch) | |
854 | (uri (string-append | |
855 | "http://effbot.org/media/downloads/elementtree-" | |
856 | version "-20050316.tar.gz")) | |
857 | (sha256 | |
858 | (base32 | |
859 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
860 | (build-system python-build-system) | |
861 | (arguments | |
862 | `(#:python ,python-2 ; seems to be part of Python 3 | |
863 | #:tests? #f)) ; no 'test' sub-command | |
864 | (synopsis "Toolkit for XML processing in Python") | |
865 | (description | |
866 | "ElementTree is a Python library supporting lightweight XML processing.") | |
867 | (home-page "http://effbot.org/zone/element-index.htm") | |
868 | (license (x11-style "http://docs.python.org/2/license.html" | |
869 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON \ | |
870 | 0.9.0 THROUGH 1.2\".")))) | |
871 | ||
872 | (define-public python2-pybugz | |
873 | (package | |
874 | (name "python2-pybugz") | |
875 | (version "0.6.11") | |
876 | (source (origin | |
877 | (method url-fetch) | |
878 | (uri (string-append | |
879 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
880 | version ".tar.gz")) | |
881 | (sha256 | |
882 | (base32 | |
6f194a1e LC |
883 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) |
884 | (patches (map search-patch | |
885 | (list "pybugz-stty.patch" | |
886 | "pybugz-encode-error.patch"))))) | |
8deeda0c LC |
887 | (build-system python-build-system) |
888 | (arguments | |
889 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
890 | #:tests? #f)) ; no 'test' sub-command | |
891 | (inputs `(("element-tree" ,python2-element-tree))) | |
892 | (synopsis "Python and command-line interface to Bugzilla") | |
893 | (description | |
894 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
895 | bug tracking system. It is meant as an aid to speed up interaction with the | |
896 | bug tracker.") | |
897 | (home-page "http://www.liquidx.net/pybugz/") | |
898 | (license gpl2))) | |
899 | ||
a480bc41 EB |
900 | (define-public python-enum34 |
901 | (package | |
902 | (name "python-enum34") | |
903 | (version "1.0") | |
904 | (source | |
905 | (origin | |
906 | (method url-fetch) | |
907 | (uri (string-append "https://pypi.python.org/packages/source/e/" | |
908 | "enum34/enum34-" version ".tar.gz")) | |
909 | (sha256 | |
910 | (base32 | |
911 | "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq")))) | |
912 | (build-system python-build-system) | |
913 | (inputs | |
914 | `(("python-setuptools" ,python-setuptools))) | |
915 | (arguments | |
916 | `(#:phases | |
917 | (alist-replace | |
918 | 'check | |
919 | (lambda _ (zero? (system* "python" "enum/test_enum.py"))) | |
920 | %standard-phases))) | |
921 | (home-page "https://pypi.python.org/pypi/enum34") | |
922 | (synopsis "Backported Python 3.4 Enum") | |
923 | (description | |
924 | "Enum34 is the new Python stdlib enum module available in Python 3.4 | |
925 | backported for previous versions of Python from 2.4 to 3.3.") | |
926 | (license bsd-3))) | |
927 | ||
928 | (define-public python-parse-type | |
929 | (package | |
930 | (name "python-parse-type") | |
931 | (version "0.3.4") | |
932 | (source | |
933 | (origin | |
934 | (method url-fetch) | |
935 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
936 | "parse_type/parse_type-" version ".tar.gz")) | |
937 | (sha256 | |
938 | (base32 | |
939 | "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x")))) | |
940 | (build-system python-build-system) | |
941 | (inputs | |
942 | `(("python-setuptools" ,python-setuptools) | |
943 | ("python-six" ,python-six) | |
944 | ("python-parse" ,python-parse) | |
945 | ("python-enum34" ,python-enum34))) ;required for python<3.4 | |
946 | (arguments '(#:tests? #f)) ;TODO: tests require pytest | |
947 | (home-page "https://github.com/jenisys/parse_type") | |
948 | (synopsis "Extended parse module") | |
949 | (description | |
950 | "Parse_type extends the python parse module.") | |
951 | (license bsd-3))) | |
952 | ||
953 | (define-public python-parse | |
954 | (package | |
955 | (name "python-parse") | |
956 | (version "1.6.4") | |
957 | (source | |
958 | (origin | |
959 | (method url-fetch) | |
960 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
961 | "parse/parse-" version ".tar.gz")) | |
962 | (sha256 | |
963 | (base32 | |
964 | "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57")))) | |
965 | (build-system python-build-system) | |
966 | (arguments | |
967 | `(#:phases | |
968 | (alist-replace | |
969 | 'check | |
970 | (lambda _ (zero? (system* "python" "test_parse.py"))) | |
971 | %standard-phases))) | |
972 | (home-page "https://github.com/r1chardj0n3s/parse") | |
973 | (synopsis "Parse strings") | |
974 | (description | |
975 | "Parse strings using a specification based on the Python format() | |
976 | syntax.") | |
977 | (license x11))) | |
978 | ||
979 | ||
515e6878 LC |
980 | (define-public scons |
981 | (package | |
982 | (name "scons") | |
983 | (version "2.1.0") | |
984 | (source (origin | |
985 | (method url-fetch) | |
986 | (uri (string-append "mirror://sourceforge/scons/scons-" | |
987 | version ".tar.gz")) | |
988 | (sha256 | |
989 | (base32 | |
990 | "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1")))) | |
991 | (build-system python-build-system) | |
992 | (arguments | |
993 | ;; With Python 3.x, fails to build with a syntax error. | |
994 | `(#:python ,python-2 | |
995 | #:tests? #f)) ; no 'python setup.py test' command | |
996 | (home-page "http://scons.org/") | |
997 | (synopsis "Software construction tool written in Python") | |
998 | (description | |
999 | "SCons is a software construction tool. Think of SCons as an improved, | |
1000 | cross-platform substitute for the classic Make utility with integrated | |
1001 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
1002 | In short, SCons is an easier, more reliable and faster way to build | |
1003 | software.") | |
1004 | (license x11))) | |
011b18c3 | 1005 | |
c15a5c0e DT |
1006 | (define-public python-extras |
1007 | (package | |
1008 | (name "python-extras") | |
1009 | (version "0.0.3") | |
1010 | (source | |
1011 | (origin | |
1012 | (method url-fetch) | |
1013 | (uri (string-append | |
1014 | "https://pypi.python.org/packages/source/e/extras/extras-" | |
1015 | version ".tar.gz")) | |
1016 | (sha256 | |
1017 | (base32 | |
1018 | "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s")))) | |
1019 | (build-system python-build-system) | |
1020 | (inputs | |
1021 | `(("python-setuptools" ,python-setuptools))) | |
1022 | (arguments | |
1023 | ;; error in setup.cfg: command 'test' has no such option 'buffer' | |
1024 | '(#:tests? #f)) | |
1025 | (home-page "https://github.com/testing-cabal/extras") | |
1026 | (synopsis "Useful extensions to the Python standard library") | |
1027 | (description | |
1028 | "Extras is a set of extensions to the Python standard library.") | |
bd3fa666 | 1029 | (license license:expat))) |
c15a5c0e DT |
1030 | |
1031 | (define-public python2-extras | |
1032 | (package-with-python2 python-extras)) | |
1033 | ||
56ea0efd DT |
1034 | (define-public python-mimeparse |
1035 | (package | |
1036 | (name "python-mimeparse") | |
1037 | (version "0.1.4") | |
1038 | (source | |
1039 | (origin | |
1040 | (method url-fetch) | |
1041 | (uri (string-append | |
1042 | "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-" | |
1043 | version ".tar.gz")) | |
1044 | (sha256 | |
1045 | (base32 | |
1046 | "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w")))) | |
1047 | (build-system python-build-system) | |
1048 | (inputs | |
1049 | `(("python-setuptools" ,python-setuptools))) | |
1050 | (arguments | |
1051 | '(#:tests? #f)) ; no setup.py test command | |
1052 | (home-page | |
1053 | "https://github.com/dbtsai/python-mimeparse") | |
9e771e3b | 1054 | (synopsis "Python library for parsing MIME types") |
56ea0efd DT |
1055 | (description |
1056 | "Mimeparse provides basic functions for parsing MIME type names and | |
1057 | matching them against a list of media-ranges.") | |
bd3fa666 | 1058 | (license license:expat))) |
56ea0efd DT |
1059 | |
1060 | (define-public python2-mimeparse | |
1061 | (package-with-python2 python-mimeparse)) | |
1062 | ||
4435427e DT |
1063 | (define-public python-nose |
1064 | (package | |
1065 | (name "python-nose") | |
1066 | (version "1.3.4") | |
1067 | (source | |
1068 | (origin | |
1069 | (method url-fetch) | |
1070 | (uri (string-append | |
1071 | "https://pypi.python.org/packages/source/n/nose/nose-" | |
1072 | version ".tar.gz")) | |
1073 | (sha256 | |
1074 | (base32 | |
1075 | "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n")))) | |
1076 | (build-system python-build-system) | |
1077 | (inputs | |
1078 | `(("python-setuptools" ,python-setuptools))) | |
1079 | (arguments | |
1080 | '(#:tests? #f)) ; FIXME: test suite fails | |
1081 | (home-page "http://readthedocs.org/docs/nose/") | |
1082 | (synopsis "Python testing library") | |
1083 | (description | |
1084 | "Nose extends the unittest library to make testing easier.") | |
1085 | (license lgpl2.0+))) | |
1086 | ||
1087 | (define-public python2-nose | |
1088 | (package-with-python2 python-nose)) | |
1089 | ||
6cd9c356 DT |
1090 | (define-public python-unittest2 |
1091 | (package | |
1092 | (name "python-unittest2") | |
1093 | (version "0.5.1") | |
1094 | (source | |
1095 | (origin | |
1096 | (method url-fetch) | |
1097 | (uri (string-append | |
1098 | "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-" | |
1099 | version ".tar.gz")) | |
1100 | (sha256 | |
1101 | (base32 | |
1102 | "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q")))) | |
1103 | (build-system python-build-system) | |
1104 | (inputs | |
1105 | `(("python-setuptools" ,python-setuptools))) | |
1106 | (home-page "http://pypi.python.org/pypi/unittest2") | |
1107 | (synopsis "Python unit testing library") | |
1108 | (description | |
1109 | "Unittest2 is a replacement for the unittest module in the Python | |
1110 | standard library.") | |
1111 | (license psfl))) | |
1112 | ||
1113 | (define-public python2-unittest2 | |
1114 | (package (inherit python-unittest2) | |
1115 | (name "python2-unittest2") | |
1116 | (version "0.5.1") | |
1117 | (source | |
1118 | (origin | |
1119 | (method url-fetch) | |
1120 | (uri (string-append | |
1121 | "https://pypi.python.org/packages/source/u/unittest2/unittest2-" | |
1122 | version ".tar.gz")) | |
1123 | (sha256 | |
1124 | (base32 | |
1125 | "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda")))) | |
1126 | (inputs | |
1127 | `(("python2-setuptools" ,python-setuptools))) | |
1128 | (arguments | |
1129 | `(#:python ,python-2 | |
1130 | #:tests? #f)))) ; no setup.py test command | |
1131 | ||
542ad60f DT |
1132 | (define-public python-py |
1133 | (package | |
1134 | (name "python-py") | |
1135 | (version "1.4.23") | |
1136 | (source | |
1137 | (origin | |
1138 | (method url-fetch) | |
1139 | (uri (string-append | |
1140 | "https://pypi.python.org/packages/source/p/py/py-" | |
1141 | version ".tar.gz")) | |
1142 | (sha256 | |
1143 | (base32 | |
1144 | "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs")))) | |
1145 | (build-system python-build-system) | |
1146 | (inputs | |
1147 | `(("python-setuptools" ,python-setuptools))) | |
1148 | (home-page "http://pylib.readthedocs.org/") | |
1149 | (synopsis "Python library for parsing, I/O, instrospection, and logging") | |
1150 | (description | |
1151 | "Py is a Python library for file name parsing, .ini file parsing, I/O, | |
1152 | code introspection, and logging.") | |
bd3fa666 | 1153 | (license license:expat))) |
542ad60f DT |
1154 | |
1155 | (define-public python2-py | |
1156 | (package-with-python2 python-py)) | |
1157 | ||
855d4761 DT |
1158 | (define-public python-pytest |
1159 | (package | |
1160 | (name "python-pytest") | |
1161 | (version "2.6.1") | |
1162 | (source | |
1163 | (origin | |
1164 | (method url-fetch) | |
1165 | (uri (string-append | |
1166 | "https://pypi.python.org/packages/source/p/pytest/pytest-" | |
1167 | version ".tar.gz")) | |
1168 | (sha256 | |
1169 | (base32 | |
1170 | "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr")) | |
1171 | (modules '((guix build utils))) | |
1172 | (snippet | |
1173 | ;; One of the tests involves the /usr directory, so it fails. | |
1174 | '(substitute* "testing/test_argcomplete.py" | |
1175 | (("def test_remove_dir_prefix\\(self\\):") | |
1176 | "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))))) | |
1177 | (build-system python-build-system) | |
1178 | (inputs | |
1179 | `(("python-setuptools" ,python-setuptools) | |
1180 | ("python-py" ,python-py) | |
1181 | ("python-nose" ,python-nose) | |
1182 | ("python-mock" ,python-mock))) | |
1183 | (home-page "http://pytest.org") | |
1184 | (synopsis "Python testing library") | |
1185 | (description | |
1186 | "Pytest is a testing tool that provides auto-discovery of test modules | |
1187 | and functions, detailed info on failing assert statements, modular fixtures, | |
1188 | and many external plugins.") | |
bd3fa666 | 1189 | (license license:expat))) |
855d4761 DT |
1190 | |
1191 | (define-public python2-pytest | |
1192 | (package-with-python2 python-pytest)) | |
1193 | ||
84d24017 DT |
1194 | (define-public python-scripttest |
1195 | (package | |
1196 | (name "python-scripttest") | |
1197 | (version "1.3") | |
1198 | (source | |
1199 | (origin | |
1200 | (method url-fetch) | |
1201 | (uri (string-append | |
1202 | "https://pypi.python.org/packages/source/s/scripttest/scripttest-" | |
1203 | version ".tar.gz")) | |
1204 | (sha256 | |
1205 | (base32 | |
1206 | "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m")))) | |
1207 | (build-system python-build-system) | |
1208 | (inputs | |
1209 | `(("python-setuptools" ,python-setuptools) | |
1210 | ("python-pytest" ,python-pytest))) | |
1211 | (home-page "http://pythonpaste.org/scripttest/") | |
1212 | (synopsis "Python library to test command-line scripts") | |
1213 | (description "Scripttest is a Python helper library for testing | |
1214 | interactive command-line applications. With it you can run a script in a | |
1215 | subprocess and see the output as well as any file modifications.") | |
bd3fa666 | 1216 | (license license:expat))) |
84d24017 DT |
1217 | |
1218 | (define-public python2-scripttest | |
1219 | (package-with-python2 python-scripttest)) | |
1220 | ||
d8fa80e1 DT |
1221 | (define-public python-testtools |
1222 | (package | |
1223 | (name "python-testtools") | |
1224 | (version "1.0.0") | |
1225 | (source | |
1226 | (origin | |
1227 | (method url-fetch) | |
1228 | (uri (string-append | |
1229 | "https://pypi.python.org/packages/source/t/testtools/testtools-" | |
1230 | version ".tar.gz")) | |
1231 | (sha256 | |
1232 | (base32 | |
1233 | "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx")))) | |
1234 | (build-system python-build-system) | |
1235 | (inputs | |
1236 | `(("python-setuptools" ,python-setuptools) | |
1237 | ("python-mimeparse" ,python-mimeparse) | |
1238 | ("python-extras" ,python-extras))) | |
1239 | (home-page "https://github.com/testing-cabal/testtools") | |
1240 | (synopsis | |
1241 | "Extensions to the Python standard library unit testing framework") | |
1242 | (description | |
1243 | "Testtools extends the Python standard library unit testing framework to | |
1244 | provide matchers, more debugging information, and cross-Python | |
1245 | compatibility.") | |
1246 | (license psfl))) | |
1247 | ||
1248 | (define-public python2-testtools | |
1249 | (package-with-python2 python-testtools)) | |
1250 | ||
5bf3afea DT |
1251 | (define-public python-testscenarios |
1252 | (package | |
1253 | (name "python-testscenarios") | |
1254 | (version "0.4") | |
1255 | (source | |
1256 | (origin | |
1257 | (method url-fetch) | |
1258 | (uri (string-append | |
1259 | "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-" | |
1260 | version ".tar.gz")) | |
1261 | (sha256 | |
1262 | (base32 | |
1263 | "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg")))) | |
1264 | (build-system python-build-system) | |
1265 | (inputs | |
1266 | `(("python-setuptools" ,python-setuptools) | |
1267 | ("python-testtools" ,python-testtools) | |
1268 | ("python-mimeparse" ,python-mimeparse))) | |
1269 | (home-page "https://launchpad.net/testscenarios") | |
1270 | (synopsis "Pyunit extension for dependency injection") | |
1271 | (description | |
1272 | "Testscenarios provides clean dependency injection for Python unittest | |
1273 | style tests.") | |
1274 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1275 | ||
1276 | (define-public python2-testscenarios | |
1277 | (package-with-python2 python-testscenarios)) | |
1278 | ||
dac79ecc DT |
1279 | (define-public python-testresources |
1280 | (package | |
1281 | (name "python-testresources") | |
1282 | (version "0.2.7") | |
1283 | (source | |
1284 | (origin | |
1285 | (method url-fetch) | |
1286 | (uri (string-append | |
1287 | "https://pypi.python.org/packages/source/t/testresources/testresources-" | |
1288 | version ".tar.gz")) | |
1289 | (sha256 | |
1290 | (base32 | |
1291 | "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md")))) | |
1292 | (build-system python-build-system) | |
1293 | (inputs | |
1294 | `(("python-setuptools" ,python-setuptools))) | |
1295 | (home-page "https://launchpad.net/testresources") | |
1296 | (synopsis | |
1297 | "Pyunit extension for managing test resources") | |
1298 | (description | |
1299 | "Testresources is an extension to Python's unittest to allow declarative | |
1300 | use of resources by test cases.") | |
1301 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1302 | ||
1303 | (define-public python2-testresources | |
1304 | (package-with-python2 python-testresources)) | |
1305 | ||
070ab058 DT |
1306 | (define-public python-subunit |
1307 | (package | |
1308 | (name "python-subunit") | |
1309 | (version "0.0.21") | |
1310 | (source | |
1311 | (origin | |
1312 | (method url-fetch) | |
1313 | (uri (string-append | |
1314 | "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-" | |
1315 | version ".tar.gz")) | |
1316 | (sha256 | |
1317 | (base32 | |
1318 | "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv")))) | |
1319 | (build-system python-build-system) | |
1320 | (inputs | |
1321 | `(("python-setuptools" ,python-setuptools) | |
1322 | ("python-testtools" ,python-testtools) | |
1323 | ("python-mimeparse" ,python-mimeparse) | |
1324 | ("python-testscenarios" ,python-testscenarios))) | |
1325 | (home-page "http://launchpad.net/subunit") | |
1326 | (synopsis "Python implementation of the subunit protocol") | |
1327 | (description | |
1328 | "Python-subunit is a Python implementation of the subunit test streaming | |
1329 | protocol.") | |
1330 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1331 | ||
1332 | (define-public python2-subunit | |
1333 | (package-with-python2 python-subunit)) | |
1334 | ||
cd49454b DT |
1335 | (define-public python-fixtures |
1336 | (package | |
1337 | (name "python-fixtures") | |
1338 | (version "0.3.16") | |
1339 | (source | |
1340 | (origin | |
1341 | (method url-fetch) | |
1342 | (uri (string-append | |
1343 | "https://pypi.python.org/packages/source/f/fixtures/fixtures-" | |
1344 | version ".tar.gz")) | |
1345 | (sha256 | |
1346 | (base32 | |
1347 | "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc")))) | |
1348 | (build-system python-build-system) | |
1349 | (inputs | |
1350 | `(("python-setuptools" ,python-setuptools))) | |
1351 | (arguments | |
1352 | '(#:tests? #f)) ; no setup.py test command | |
1353 | (home-page "https://launchpad.net/python-fixtures") | |
1354 | (synopsis "Python test fixture library") | |
1355 | (description | |
1356 | "Fixtures provides a way to create reusable state, useful when writing | |
1357 | Python tests.") | |
1358 | (license (list bsd-3 asl2.0)))) ; at user's option | |
1359 | ||
1360 | (define-public python2-fixtures | |
1361 | (package-with-python2 python-fixtures)) | |
1362 | ||
b24a0c00 DT |
1363 | (define-public python-testrepository |
1364 | (package | |
1365 | (name "python-testrepository") | |
1366 | (version "0.0.20") | |
1367 | (source | |
1368 | (origin | |
1369 | (method url-fetch) | |
1370 | (uri (string-append | |
1371 | "https://pypi.python.org/packages/source/t/testrepository/testrepository-" | |
1372 | version ".tar.gz")) | |
1373 | (sha256 | |
1374 | (base32 | |
1375 | "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m")))) | |
1376 | (build-system python-build-system) | |
1377 | (inputs | |
1378 | `(("python-setuptools" ,python-setuptools) | |
1379 | ("python-testtools" ,python-testtools) | |
1380 | ("python-subunit" ,python-subunit) | |
1381 | ("python-fixtures" ,python-fixtures) | |
1382 | ("python-mimeparse" ,python-mimeparse))) | |
1383 | (home-page "https://launchpad.net/testrepository") | |
1384 | (synopsis "Database for Python test results") | |
1385 | (description "Testrepository provides a database of test results which can | |
1386 | be used as part of a developer's workflow to check things such as what tests | |
1387 | have failed since the last commit or what tests are currently failing.") | |
1388 | (license (list bsd-3 asl2.0)))) ; at user's option | |
1389 | ||
1390 | (define-public python2-testrepository | |
1391 | (package-with-python2 python-testrepository)) | |
1392 | ||
243a009a DT |
1393 | (define-public python-coverage |
1394 | (package | |
1395 | (name "python-coverage") | |
1396 | (version "3.7.1") | |
1397 | (source | |
1398 | (origin | |
1399 | (method url-fetch) | |
1400 | (uri (string-append | |
1401 | "https://pypi.python.org/packages/source/c/coverage/coverage-" | |
1402 | version ".tar.gz")) | |
1403 | (sha256 | |
1404 | (base32 | |
1405 | "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni")))) | |
1406 | (build-system python-build-system) | |
1407 | (inputs | |
1408 | `(("python-setuptools" ,python-setuptools))) | |
1409 | (home-page "http://nedbatchelder.com/code/coverage") | |
1410 | (synopsis "Code coverage measurement for Python") | |
1411 | (description | |
1412 | "Coverage measures code coverage, typically during test execution. It | |
1413 | uses the code analysis tools and tracing hooks provided in the Python standard | |
1414 | library to determine which lines are executable, and which have been | |
1415 | executed.") | |
1416 | (license bsd-3))) | |
1417 | ||
1418 | (define-public python2-coverage | |
1419 | (package-with-python2 python-coverage)) | |
1420 | ||
041358fb DT |
1421 | (define-public python-discover |
1422 | (package | |
1423 | (name "python-discover") | |
1424 | (version "0.4.0") | |
1425 | (source | |
1426 | (origin | |
1427 | (method url-fetch) | |
1428 | (uri (string-append | |
1429 | "https://pypi.python.org/packages/source/d/discover/discover-" | |
1430 | version ".tar.gz")) | |
1431 | (sha256 | |
1432 | (base32 | |
1433 | "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5")))) | |
1434 | (build-system python-build-system) | |
1435 | (inputs | |
1436 | `(("python-setuptools" ,python-setuptools))) | |
1437 | (home-page "http://pypi.python.org/pypi/discover/") | |
1438 | (synopsis | |
1439 | "Python test discovery for unittest") | |
1440 | (description | |
1441 | "Discover provides test discovery for unittest, a feature that has been | |
1442 | backported from Python 2.7 for Python 2.4+") | |
1443 | (license bsd-3))) | |
1444 | ||
1445 | (define-public python2-discover | |
1446 | (package-with-python2 python-discover)) | |
1447 | ||
a480bc41 EB |
1448 | (define-public behave |
1449 | (package | |
1450 | (name "behave") | |
1451 | (version "1.2.4") | |
1452 | (source (origin | |
1453 | (method url-fetch) | |
1454 | (uri (string-append "https://pypi.python.org/packages/source/b/" | |
1455 | name "/" name "-" version ".tar.gz")) | |
1456 | (sha256 | |
1457 | (base32 | |
1458 | "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14")))) | |
1459 | (build-system python-build-system) | |
1460 | (inputs | |
1461 | `(("python-setuptools" ,python-setuptools) | |
1462 | ("python-six" ,python-six) | |
1463 | ("python-enum43" ,python-enum34) | |
1464 | ("python-parse" ,python-parse) | |
1465 | ("python-parse-type" ,python-parse-type))) | |
1466 | (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and | |
1467 | ;PyHamcrest>=1.8 | |
1468 | (home-page "http://github.com/behave/behave") | |
1469 | (synopsis "Python behavior-driven development") | |
1470 | (description | |
1471 | "Behave is a tool for behavior-driven development in python. | |
1472 | Behavior-driven development (or BDD) is an agile software development | |
1473 | technique that encourages collaboration between developers, QA and | |
1474 | non-technical or business participants in a software project. Behave uses | |
1475 | tests written in a natural language style, backed up by Python code.") | |
1476 | (license x11))) | |
c7303d3c DT |
1477 | |
1478 | (define-public python-exif-read | |
1479 | (package | |
1480 | (name "python-exif-read") | |
1481 | (version "1.4.2") | |
1482 | (source (origin | |
1483 | (method url-fetch) | |
1484 | (uri | |
1485 | (string-append | |
1486 | "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-" | |
1487 | version ".tar.gz")) | |
1488 | (sha256 | |
1489 | (base32 | |
1490 | "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1")))) | |
1491 | (build-system python-build-system) | |
1492 | (inputs | |
1493 | `(("python-setuptools" ,python-setuptools))) | |
1494 | (arguments `(#:tests? #f)) ; no tests | |
1495 | (home-page "https://github.com/ianare/exif-py") | |
1496 | (synopsis "Python library to extract EXIF data from image files") | |
1497 | (description | |
1498 | "ExifRead is a Python library to extract EXIF data from tiff and jpeg | |
1499 | files.") | |
1500 | (license bsd-3))) | |
1501 | ||
1502 | (define-public python2-exif-read | |
1503 | (package-with-python2 python-exif-read)) | |
d5f89b22 DT |
1504 | |
1505 | (define-public python-pyld | |
1506 | (package | |
1507 | (name "python-pyld") | |
1508 | (version "0.6.0") | |
1509 | (source (origin | |
1510 | (method url-fetch) | |
1511 | (uri | |
1512 | (string-append | |
1513 | "https://pypi.python.org/packages/source/P/PyLD/PyLD-" | |
1514 | version ".tar.gz")) | |
1515 | (sha256 | |
1516 | (base32 | |
1517 | "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8")))) | |
1518 | (build-system python-build-system) | |
1519 | (inputs | |
1520 | `(("python-setuptools" ,python-setuptools))) | |
1521 | (arguments `(#:tests? #f)) ; no tests | |
1522 | (home-page "http://github.com/digitalbazaar/pyld") | |
1523 | (synopsis "Python implementation of the JSON-LD specification") | |
1524 | (description | |
1525 | "PyLD is an implementation of the JSON-LD specification.") | |
1526 | (license bsd-3))) | |
1527 | ||
1528 | (define-public python2-pyld | |
1529 | (package-with-python2 python-pyld)) | |
3a1f9a68 DT |
1530 | |
1531 | (define-public python-certifi | |
1532 | (package | |
1533 | (name "python-certifi") | |
1534 | (version "14.05.14") | |
1535 | (source (origin | |
1536 | (method url-fetch) | |
1537 | (uri | |
1538 | (string-append | |
1539 | "https://pypi.python.org/packages/source/c/certifi/certifi-" | |
1540 | version ".tar.gz")) | |
1541 | (sha256 | |
1542 | (base32 | |
1543 | "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy")))) | |
1544 | (build-system python-build-system) | |
1545 | (inputs | |
1546 | `(("python-setuptools" ,python-setuptools))) | |
1547 | (arguments `(#:tests? #f)) ; no tests | |
1548 | (home-page "http://python-requests.org/") | |
1549 | (synopsis "Python CA certificate bundle") | |
1550 | (description | |
1551 | "Certifi is a Python library that contains a CA certificate bundle, which | |
1552 | is used by the Requests library to verify HTTPS requests.") | |
1553 | (license asl2.0))) | |
1554 | ||
1555 | (define-public python2-certifi | |
1556 | (package-with-python2 python-certifi)) | |
e6cfbd36 DT |
1557 | |
1558 | (define-public python2-requests | |
1559 | (package | |
1560 | (name "python2-requests") | |
1561 | (version "2.4.0") | |
1562 | (source (origin | |
1563 | (method url-fetch) | |
1564 | (uri | |
1565 | (string-append | |
1566 | "https://pypi.python.org/packages/source/r/requests/requests-" | |
1567 | version ".tar.gz")) | |
1568 | (sha256 | |
1569 | (base32 | |
1570 | "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh")))) | |
1571 | (build-system python-build-system) | |
1572 | (inputs | |
1573 | `(("python-setuptools" ,python-setuptools) | |
1574 | ("python-certifi" ,python-certifi))) | |
1575 | (arguments `(#:tests? #f ; no tests | |
1576 | #:python ,python-2)) | |
1577 | (home-page "http://python-requests.org/") | |
1578 | (synopsis "Python HTTP library") | |
1579 | (description | |
1580 | "Requests is a Python HTTP client library. It aims to be easier to use | |
1581 | than Python’s urllib2 library.") | |
1582 | (license asl2.0))) | |
864b5211 DT |
1583 | |
1584 | (define-public python-jsonschema | |
1585 | (package | |
1586 | (name "python-jsonschema") | |
1587 | (version "2.4.0") | |
1588 | (source (origin | |
1589 | (method url-fetch) | |
1590 | (uri | |
1591 | (string-append | |
1592 | "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-" | |
1593 | version ".tar.gz")) | |
1594 | (sha256 | |
1595 | (base32 | |
1596 | "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j")))) | |
1597 | (build-system python-build-system) | |
1598 | (inputs | |
1599 | `(("python-setuptools" ,python-setuptools))) | |
1600 | (home-page "http://github.com/Julian/jsonschema") | |
1601 | (synopsis "Implementation of JSON Schema for Python") | |
1602 | (description | |
1603 | "Jsonschema is an implementation of JSON Schema for Python.") | |
bd3fa666 | 1604 | (license license:expat))) |
864b5211 DT |
1605 | |
1606 | (define-public python2-jsonschema | |
1607 | (package-with-python2 python-jsonschema)) | |
850189b8 DT |
1608 | |
1609 | (define-public python-unidecode | |
1610 | (package | |
1611 | (name "python-unidecode") | |
1612 | (version "0.04.16") | |
1613 | (source (origin | |
1614 | (method url-fetch) | |
1615 | (uri | |
1616 | (string-append | |
1617 | "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-" | |
1618 | version ".tar.gz")) | |
1619 | (sha256 | |
1620 | (base32 | |
1621 | "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc")))) | |
1622 | (build-system python-build-system) | |
1623 | (inputs | |
1624 | `(("python-setuptools" ,python-setuptools))) | |
1625 | (home-page "https://pypi.python.org/pypi/Unidecode") | |
1626 | (synopsis "ASCII transliterations of Unicode text") | |
1627 | (description | |
1628 | "Unidecode provides ASCII transliterations of Unicode text. Unidecode is | |
1629 | useful when integrating with legacy code that doesn't support Unicode, or for | |
1630 | ease of entry of non-Roman names on a US keyboard, or when constructing ASCII | |
1631 | machine identifiers from human-readable Unicode strings that should still be | |
1632 | somewhat intelligeble.") | |
1633 | (license gpl2+))) | |
1634 | ||
1635 | (define-public python2-unidecode | |
1636 | (package-with-python2 python-unidecode)) | |
6d45fef4 DT |
1637 | |
1638 | (define-public python-pyjwt | |
1639 | (package | |
1640 | (name "python-pyjwt") | |
1641 | (version "0.2.1") | |
1642 | (source | |
1643 | (origin | |
1644 | (method url-fetch) | |
1645 | (uri (string-append | |
1646 | "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-" | |
1647 | version ".tar.gz")) | |
1648 | (sha256 | |
1649 | (base32 | |
1650 | "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g")))) | |
1651 | (build-system python-build-system) | |
1652 | (inputs | |
1653 | `(("python-setuptools" ,python-setuptools))) | |
1654 | (arguments | |
1655 | '(#:tests? #f)) ; test suite doesn't work | |
1656 | (home-page "http://github.com/progrium/pyjwt") | |
1657 | (synopsis "JSON Web Token implementation in Python") | |
1658 | (description | |
1659 | "PyJWT is a JSON Web Token implementation written in Python.") | |
bd3fa666 | 1660 | (license license:expat))) |
6d45fef4 DT |
1661 | |
1662 | (define-public python2-pyjwt | |
1663 | (package-with-python2 python-pyjwt)) | |
1664 | ||
2cec1f6f DT |
1665 | (define-public python-oauthlib |
1666 | (package | |
1667 | (name "python-oauthlib") | |
1668 | (version "0.6.3") | |
1669 | (source (origin | |
1670 | (method url-fetch) | |
1671 | (uri | |
1672 | (string-append | |
1673 | "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-" | |
1674 | version ".tar.gz")) | |
1675 | (sha256 | |
1676 | (base32 | |
1677 | "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a")))) | |
1678 | (build-system python-build-system) | |
1679 | (inputs | |
1680 | `(("python-setuptools" ,python-setuptools) | |
1681 | ("python-pyjwt" ,python-pyjwt) | |
1682 | ("python-pycrypto" ,python-pycrypto) | |
1683 | ("python-nose" ,python-nose) | |
1684 | ("python-mock" ,python-mock))) | |
1685 | (home-page "https://github.com/idan/oauthlib") | |
1686 | (synopsis "OAuth implementation for Python") | |
1687 | (description | |
1688 | "Oauthlib is a generic, spec-compliant, thorough implementation of the | |
1689 | OAuth request-signing logic.") | |
1690 | (license bsd-3))) | |
1691 | ||
1692 | (define-public python2-oauthlib | |
1693 | (let ((base (package-with-python2 python-oauthlib))) | |
1694 | (package | |
1695 | (inherit base) | |
2cec1f6f DT |
1696 | (inputs |
1697 | (append (package-inputs base) | |
1698 | `(("python2-unittest2" ,python2-unittest2))))))) | |
ec5dbb5c DT |
1699 | |
1700 | (define-public python-itsdangerous | |
1701 | (package | |
1702 | (name "python-itsdangerous") | |
1703 | (version "0.24") | |
1704 | (source | |
1705 | (origin | |
1706 | (method url-fetch) | |
1707 | (uri (string-append | |
1708 | "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-" | |
1709 | version ".tar.gz")) | |
1710 | (sha256 | |
1711 | (base32 | |
1712 | "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb")))) | |
1713 | (build-system python-build-system) | |
1714 | (inputs | |
1715 | `(("python-setuptools" ,python-setuptools))) | |
1716 | (home-page "http://github.com/mitsuhiko/itsdangerous") | |
1717 | (synopsis "Python library for passing data to/from untrusted environments") | |
1718 | (description | |
1719 | "Itsdangerous provides various helpers to pass trusted data to untrusted | |
1720 | environments and back.") | |
1721 | (license bsd-3))) | |
1722 | ||
1723 | (define-public python2-itsdangerous | |
1724 | (package-with-python2 python-itsdangerous)) | |
5731cae3 | 1725 | |
8d12be1e RW |
1726 | (define-public python-pyyaml |
1727 | (package | |
1728 | (name "python-pyyaml") | |
1729 | (version "3.11") | |
1730 | (source | |
1731 | (origin | |
1732 | (method url-fetch) | |
1733 | (uri (string-append | |
1734 | "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-" | |
1735 | version ".tar.gz")) | |
1736 | (sha256 | |
1737 | (base32 | |
1738 | "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63")))) | |
1739 | (build-system python-build-system) | |
1740 | (inputs | |
1741 | `(("libyaml" ,libyaml))) | |
1742 | (native-inputs | |
1743 | `(("python-setuptools" ,python-setuptools))) | |
1744 | (home-page "http://pyyaml.org/wiki/PyYAML") | |
1745 | (synopsis "YAML parser and emitter for Python") | |
1746 | (description | |
1747 | "PyYAML is a YAML parser and emitter for Python. PyYAML features a | |
1748 | complete YAML 1.1 parser, Unicode support, pickle support, capable extension | |
1749 | API, and sensible error messages. PyYAML supports standard YAML tags and | |
1750 | provides Python-specific tags that allow to represent an arbitrary Python | |
1751 | object.") | |
1752 | (license license:expat))) | |
1753 | ||
1754 | (define-public python2-pyyaml | |
1755 | (package-with-python2 python-pyyaml)) | |
1756 | ||
5731cae3 DT |
1757 | (define-public python-virtualenv |
1758 | (package | |
1759 | (name "python-virtualenv") | |
1760 | (version "1.11.6") | |
1761 | (source | |
1762 | (origin | |
1763 | (method url-fetch) | |
1764 | (uri (string-append | |
1765 | "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-" | |
1766 | version ".tar.gz")) | |
1767 | (sha256 | |
1768 | (base32 | |
1769 | "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy")))) | |
1770 | (build-system python-build-system) | |
1771 | (inputs | |
1772 | `(("python-setuptools" ,python-setuptools) | |
1773 | ("python-mock" ,python-mock) | |
1774 | ("python-nose" ,python-nose))) | |
1775 | (home-page "https://virtualenv.pypa.io/") | |
1776 | (synopsis "Virtual Python environment builder") | |
1777 | (description | |
1778 | "Virtualenv is a tool to create isolated Python environments.") | |
bd3fa666 | 1779 | (license license:expat))) |
5731cae3 DT |
1780 | |
1781 | (define-public python2-virtualenv | |
1782 | (package-with-python2 python-virtualenv)) | |
8176d4d5 DT |
1783 | |
1784 | (define-public python-markupsafe | |
1785 | (package | |
1786 | (name "python-markupsafe") | |
1787 | (version "0.23") | |
1788 | (source | |
1789 | (origin | |
1790 | (method url-fetch) | |
1791 | (uri (string-append | |
1792 | "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-" | |
1793 | version ".tar.gz")) | |
1794 | (sha256 | |
1795 | (base32 | |
1796 | "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54")))) | |
1797 | (build-system python-build-system) | |
1798 | (inputs | |
1799 | `(("python-setuptools" ,python-setuptools))) | |
1800 | (home-page "http://github.com/mitsuhiko/markupsafe") | |
1801 | (synopsis "XML/HTML/XHTML markup safe string implementation for Python") | |
1802 | (description | |
1803 | "Markupsafe provides an XML/HTML/XHTML markup safe string implementation | |
1804 | for Python.") | |
1805 | (license bsd-3))) | |
1806 | ||
1807 | (define-public python2-markupsafe | |
1808 | (package-with-python2 python-markupsafe)) | |
fe34f0d1 DT |
1809 | |
1810 | (define-public python-jinja2 | |
1811 | (package | |
1812 | (name "python-jinja2") | |
1813 | (version "2.7.3") | |
1814 | (source | |
1815 | (origin | |
1816 | (method url-fetch) | |
1817 | (uri (string-append | |
1818 | "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-" | |
1819 | version ".tar.gz")) | |
1820 | (sha256 | |
1821 | (base32 | |
1822 | "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f")))) | |
1823 | (build-system python-build-system) | |
1824 | (inputs | |
1825 | `(("python-setuptools" ,python-setuptools) | |
1826 | ("python-markupsafe" ,python-markupsafe))) | |
1827 | (home-page "http://jinja.pocoo.org/") | |
1828 | (synopsis "Python template engine") | |
1829 | (description | |
1830 | "Jinja2 is a small but fast and easy to use stand-alone template engine | |
1831 | written in pure Python.") | |
1832 | (license bsd-3))) | |
1833 | ||
1834 | (define-public python2-jinja2 | |
1835 | (package-with-python2 python-jinja2)) | |
3580ab8b DT |
1836 | |
1837 | (define-public python-docutils | |
1838 | (package | |
1839 | (name "python-docutils") | |
1840 | (version "0.12") | |
1841 | (source | |
1842 | (origin | |
1843 | (method url-fetch) | |
1844 | (uri (string-append | |
1845 | "https://pypi.python.org/packages/source/d/docutils/docutils-" | |
1846 | version ".tar.gz")) | |
1847 | (sha256 | |
1848 | (base32 | |
1849 | "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7")))) | |
1850 | (build-system python-build-system) | |
1851 | (inputs | |
1852 | `(("python-setuptools" ,python-setuptools))) | |
1853 | (arguments | |
1854 | '(#:tests? #f)) ; no setup.py test command | |
1855 | (home-page "http://docutils.sourceforge.net/") | |
1856 | (synopsis "Python Documentation Utilities") | |
1857 | (description | |
1858 | "Docutils is a modular system for processing documentation into useful | |
1859 | formats, such as HTML, XML, and LaTeX. For input Docutils supports | |
1860 | reStructuredText.") | |
1861 | ;; Most of the source code is public domain, but some source files are | |
1862 | ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. | |
1863 | (license (list public-domain psfl bsd-2 gpl3+)))) | |
1864 | ||
1865 | (define-public python2-docutils | |
1866 | (package-with-python2 python-docutils)) | |
fb35b7c0 DT |
1867 | |
1868 | (define-public python-pygments | |
1869 | (package | |
1870 | (name "python-pygments") | |
1871 | (version "1.6") | |
1872 | (source | |
1873 | (origin | |
1874 | (method url-fetch) | |
1875 | (uri (string-append | |
1876 | "https://pypi.python.org/packages/source/P/Pygments/Pygments-" | |
1877 | version ".tar.gz")) | |
1878 | (sha256 | |
1879 | (base32 | |
1880 | "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr")))) | |
1881 | (build-system python-build-system) | |
1882 | (inputs | |
1883 | `(("python-setuptools" ,python-setuptools))) | |
1884 | (home-page "http://pygments.org/") | |
1885 | (synopsis "Syntax highlighting") | |
1886 | (description | |
1887 | "Pygments is a syntax highlighting package written in Python.") | |
1888 | (license bsd-2))) | |
1889 | ||
1890 | (define-public python2-pygments | |
1891 | (package-with-python2 python-pygments)) | |
9dd6078d DT |
1892 | |
1893 | (define-public python-sphinx | |
1894 | (package | |
1895 | (name "python-sphinx") | |
1896 | (version "1.2.3") | |
1897 | (source | |
1898 | (origin | |
1899 | (method url-fetch) | |
1900 | (uri (string-append | |
1901 | "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-" | |
1902 | version ".tar.gz")) | |
1903 | (sha256 | |
1904 | (base32 | |
1905 | "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl")))) | |
1906 | (build-system python-build-system) | |
1907 | (inputs | |
1908 | `(("python-setuptools" ,python-setuptools) | |
1909 | ("python-jinja2" ,python-jinja2) | |
1910 | ("python-docutils" ,python-docutils) | |
1911 | ("python-pygments" ,python-pygments))) | |
1912 | (home-page "http://sphinx-doc.org/") | |
1913 | (synopsis "Python documentation generator") | |
1914 | (description "Sphinx is a tool that makes it easy to create documentation | |
1915 | for Python projects or other documents consisting of multiple reStructuredText | |
1916 | sources.") | |
1917 | (license bsd-3))) | |
1918 | ||
1919 | (define-public python2-sphinx | |
1920 | (package-with-python2 python-sphinx)) | |
6888830b | 1921 | |
ad320b20 RW |
1922 | (define-public python-sphinx-rtd-theme |
1923 | (package | |
1924 | (name "python-sphinx-rtd-theme") | |
1925 | (version "0.1.6") | |
1926 | (source | |
1927 | (origin | |
1928 | (method url-fetch) | |
1929 | (uri (string-append "https://pypi.python.org/packages/source/s/" | |
1930 | "sphinx_rtd_theme/sphinx_rtd_theme-" | |
1931 | version ".tar.gz")) | |
1932 | (sha256 | |
1933 | (base32 | |
1934 | "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g")))) | |
1935 | (build-system python-build-system) | |
1936 | (arguments | |
1937 | `(;; With standard flags, the install phase attempts to create a zip'd | |
1938 | ;; egg file, and fails with an error: 'ZIP does not support timestamps | |
1939 | ;; before 1980' | |
1940 | #:configure-flags '("--single-version-externally-managed" | |
1941 | "--record=sphinx-rtd-theme.txt"))) | |
1942 | (native-inputs | |
1943 | `(("python-setuptools" ,python-setuptools))) | |
1944 | (inputs | |
1945 | `(("python-docutils" ,python-docutils) | |
1946 | ("python-sphinx" ,python-sphinx))) | |
1947 | (home-page "https://github.com/snide/sphinx_rtd_theme/") | |
1948 | (synopsis "ReadTheDocs.org theme for Sphinx") | |
1949 | (description "A theme for Sphinx used by ReadTheDocs.org.") | |
bd3fa666 | 1950 | (license license:expat))) |
ad320b20 RW |
1951 | |
1952 | (define-public python2-sphinx-rtd-theme | |
1953 | (package-with-python2 python-sphinx-rtd-theme)) | |
1954 | ||
240ca4aa RW |
1955 | (define-public python-scikit-learn |
1956 | (package | |
1957 | (name "python-scikit-learn") | |
1958 | (version "0.15.2") | |
1959 | (source | |
1960 | (origin | |
1961 | (method url-fetch) | |
1962 | (uri (string-append | |
1963 | "https://github.com/scikit-learn/scikit-learn/archive/" | |
1964 | version ".tar.gz")) | |
1965 | (sha256 | |
1966 | (base32 | |
1967 | "1rb93h2q15f219sz60sczjb65rg70xjmnp0q4pkkaairx5s05q55")))) | |
1968 | (build-system python-build-system) | |
1969 | (arguments | |
1970 | `(#:phases | |
1971 | (alist-cons-before | |
1972 | 'build 'set-environment-variables | |
1973 | (lambda* (#:key inputs #:allow-other-keys) | |
1974 | (let* ((atlas-threaded | |
1975 | (string-append (assoc-ref inputs "atlas") | |
1976 | "/lib/libtatlas.so")) | |
1977 | ;; On single core CPUs only the serial library is created. | |
1978 | (atlas-lib | |
1979 | (if (file-exists? atlas-threaded) | |
1980 | atlas-threaded | |
1981 | (string-append (assoc-ref inputs "atlas") | |
1982 | "/lib/libsatlas.so")))) | |
1983 | (setenv "ATLAS" atlas-lib))) | |
1984 | (alist-cons-before | |
1985 | 'check 'set-HOME | |
1986 | ;; some tests require access to "$HOME" | |
1987 | (lambda _ (setenv "HOME" "/tmp")) | |
1988 | ;; Tests can only be run after the library has been installed and not | |
1989 | ;; within the source directory. | |
1990 | (alist-cons-after | |
1991 | 'install 'check | |
1992 | (lambda _ | |
1993 | (with-directory-excursion "/tmp" | |
1994 | ;; With Python 3 one test of 3334 fails | |
1995 | ;; (sklearn.tests.test_common.test_transformers); see | |
1996 | ;; https://github.com/scikit-learn/scikit-learn/issues/3693 | |
1997 | (system* "nosetests" "-v" "sklearn"))) | |
1998 | (alist-delete 'check %standard-phases)))))) | |
1999 | (inputs | |
2000 | `(("atlas" ,atlas) | |
2001 | ("python-nose" ,python-nose))) | |
2002 | (propagated-inputs | |
2003 | `(("python-numpy" ,python-numpy) | |
2004 | ("python-scipy" ,python-scipy))) | |
2005 | (home-page "http://scikit-learn.org/") | |
2006 | (synopsis "Machine Learning in Python") | |
2007 | (description | |
2008 | "Scikit-learn provides simple and efficient tools for data | |
2009 | mining and data analysis.") | |
2010 | (license bsd-3))) | |
2011 | ||
2012 | (define-public python2-scikit-learn | |
2013 | (let ((scikit (package-with-python2 python-scikit-learn))) | |
2014 | (package (inherit scikit) | |
2015 | (propagated-inputs | |
2016 | `(("python2-numpy" ,python2-numpy) | |
2017 | ("python2-scipy" ,python2-scipy) | |
2018 | ,@(alist-delete | |
2019 | "python-numpy" | |
2020 | (alist-delete | |
2021 | "python-scipy" (package-propagated-inputs scikit)))))))) | |
2022 | ||
6888830b FB |
2023 | (define-public python-cython |
2024 | (package | |
2025 | (name "python-cython") | |
2026 | (version "0.21.1") | |
2027 | (source | |
2028 | (origin | |
2029 | (method url-fetch) | |
2030 | (uri (string-append "http://cython.org/release/Cython-" | |
2031 | version ".tar.gz")) | |
2032 | (sha256 | |
2033 | (base32 | |
2034 | "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3")))) | |
2035 | (build-system python-build-system) | |
2036 | ;; we need the full python package and not just the python-wrapper | |
2037 | ;; because we need libpython3.3m.so | |
2038 | (inputs | |
2039 | `(("python" ,python))) | |
2040 | (arguments | |
2041 | `(#:phases | |
2042 | (alist-cons-before | |
2043 | 'check 'set-HOME | |
2044 | ;; some tests require access to "$HOME/.cython" | |
2045 | (lambda* _ (setenv "HOME" "/tmp")) | |
2046 | (alist-replace | |
2047 | 'check | |
2048 | (lambda _ (zero? (system* "python" "runtests.py" "-vv"))) | |
2049 | %standard-phases)))) | |
2050 | (home-page "http://cython.org/") | |
2051 | (synopsis "C extensions for Python") | |
2052 | (description "Cython is an optimising static compiler for both the Python | |
2053 | programming language and the extended Cython programming language. It makes | |
2054 | writing C extensions for Python as easy as Python itself.") | |
2055 | (license asl2.0))) | |
2056 | ||
2057 | (define-public python2-cython | |
2058 | (package (inherit (package-with-python2 python-cython)) | |
2059 | (name "python2-cython") | |
2060 | (inputs | |
2061 | `(("python-2" ,python-2))))) ; this is not automatically changed | |
0da98533 FB |
2062 | |
2063 | ;; This version of numpy is missing the documentation and is only used to | |
2064 | ;; build matplotlib which is required to build numpy's documentation. | |
2065 | (define python-numpy-bootstrap | |
2066 | (package | |
2067 | (name "python-numpy-bootstrap") | |
2068 | (version "1.9.1") | |
2069 | (source | |
2070 | (origin | |
2071 | (method url-fetch) | |
2072 | (uri (string-append "mirror://sourceforge/numpy" | |
2073 | "/numpy-" version ".tar.gz")) | |
2074 | (sha256 | |
2075 | (base32 | |
2076 | "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80")))) | |
2077 | (build-system python-build-system) | |
2078 | (inputs | |
2079 | `(("python-nose" ,python-nose) | |
2080 | ("atlas" ,atlas))) | |
2081 | (native-inputs | |
2082 | `(("gfortran" ,gfortran-4.8))) | |
2083 | (arguments | |
2084 | `(#:phases | |
2085 | (alist-cons-before | |
2086 | 'build 'set-environment-variables | |
2087 | (lambda* (#:key inputs #:allow-other-keys) | |
2088 | (let* ((atlas-threaded | |
89b5c60e | 2089 | (string-append (assoc-ref inputs "atlas") |
0da98533 FB |
2090 | "/lib/libtatlas.so")) |
2091 | ;; On single core CPUs only the serial library is created. | |
2092 | (atlas-lib | |
2093 | (if (file-exists? atlas-threaded) | |
2094 | atlas-threaded | |
89b5c60e | 2095 | (string-append (assoc-ref inputs "atlas") |
0da98533 FB |
2096 | "/lib/libsatlas.so")))) |
2097 | (setenv "ATLAS" atlas-lib))) | |
6a843168 FB |
2098 | ;; Tests can only be run after the library has been installed and not |
2099 | ;; within the source directory. | |
2100 | (alist-cons-after | |
2101 | 'install 'check | |
89b5c60e | 2102 | (lambda _ |
6a843168 | 2103 | (with-directory-excursion "/tmp" |
89b5c60e | 2104 | (zero? (system* "python" "-c" |
6a843168 | 2105 | "import numpy; numpy.test(verbose=2)")))) |
89b5c60e AE |
2106 | (alist-delete |
2107 | 'check | |
6a843168 | 2108 | %standard-phases))))) |
0da98533 FB |
2109 | (home-page "http://www.numpy.org/") |
2110 | (synopsis "Fundamental package for scientific computing with Python") | |
2111 | (description "NumPy is the fundamental package for scientific computing | |
2112 | with Python. It contains among other things: a powerful N-dimensional array | |
2113 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ | |
2114 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
2115 | capabilities.") | |
2116 | (license bsd-3))) | |
2117 | ||
2118 | (define python2-numpy-bootstrap | |
2119 | (package-with-python2 python-numpy-bootstrap)) | |
15bfe6d6 | 2120 | |
2ee8869a FB |
2121 | (define-public python-numpy |
2122 | (package (inherit python-numpy-bootstrap) | |
2123 | (name "python-numpy") | |
2124 | (outputs '("out" "doc")) | |
89b5c60e | 2125 | (inputs |
2ee8869a FB |
2126 | `(("which" ,which) |
2127 | ("python-setuptools" ,python-setuptools) | |
2128 | ("python-matplotlib" ,python-matplotlib) | |
2129 | ("python-sphinx" ,python-sphinx) | |
2130 | ("python-pyparsing" ,python-pyparsing) | |
2131 | ("python-numpydoc" ,python-numpydoc) | |
2132 | ,@(package-inputs python-numpy-bootstrap))) | |
2133 | (native-inputs | |
2134 | `(("pkg-config" ,pkg-config) | |
2135 | ("texlive" ,texlive) | |
2136 | ("texinfo" ,texinfo) | |
2137 | ("perl" ,perl) | |
2138 | ,@(package-native-inputs python-numpy-bootstrap))) | |
2139 | (arguments | |
89b5c60e | 2140 | `(,@(substitute-keyword-arguments |
2ee8869a FB |
2141 | (package-arguments python-numpy-bootstrap) |
2142 | ((#:phases phases) | |
2143 | `(alist-cons-after | |
2144 | 'install 'install-doc | |
2145 | (lambda* (#:key outputs #:allow-other-keys) | |
2146 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
89b5c60e AE |
2147 | (doc (string-append |
2148 | data "/doc/" ,name "-" | |
2ee8869a FB |
2149 | ,(package-version python-numpy-bootstrap))) |
2150 | (info (string-append data "/info")) | |
2151 | (html (string-append doc "/html")) | |
2152 | (pyver ,(string-append "PYVER="))) | |
2153 | (with-directory-excursion "doc" | |
2154 | (mkdir-p html) | |
2155 | (system* "make" "html" pyver) | |
2156 | (system* "make" "latex" "PAPER=a4" pyver) | |
89b5c60e | 2157 | (system* "make" "-C" "build/latex" |
2ee8869a FB |
2158 | "all-pdf" "PAPER=a4" pyver) |
2159 | ;; FIXME: Generation of the info file fails. | |
2160 | ;; (system* "make" "info" pyver) | |
2161 | ;; (mkdir-p info) | |
2162 | ;; (copy-file "build/texinfo/numpy.info" | |
2163 | ;; (string-append info "/numpy.info")) | |
2164 | (for-each (lambda (file) | |
2165 | (copy-file (string-append "build/latex" file) | |
2166 | (string-append doc file))) | |
2167 | '("/numpy-ref.pdf" "/numpy-user.pdf")) | |
2168 | (with-directory-excursion "build/html" | |
2169 | (for-each (lambda (file) | |
2170 | (let* ((dir (dirname file)) | |
2171 | (tgt-dir (string-append html "/" dir))) | |
2172 | (unless (equal? "." dir) | |
2173 | (mkdir-p tgt-dir)) | |
2174 | (copy-file file (string-append html "/" file)))) | |
2175 | (find-files "." ".*")))))) | |
2176 | ,phases))))))) | |
2177 | ||
764c077b LC |
2178 | (define-public python2-numpy |
2179 | (let ((numpy (package-with-python2 python-numpy))) | |
2180 | (package (inherit numpy) | |
88c26834 AE |
2181 | ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for |
2182 | ;; Python 2. | |
2183 | (inputs `(("python2-matplotlib" ,python2-matplotlib) | |
2184 | ,@(alist-delete "python-matplotlib" | |
2185 | (package-inputs numpy))))))) | |
2ee8869a | 2186 | |
15bfe6d6 FB |
2187 | (define-public python-pyparsing |
2188 | (package | |
2189 | (name "python-pyparsing") | |
e0669289 | 2190 | (version "2.0.3") |
15bfe6d6 FB |
2191 | (source |
2192 | (origin | |
2193 | (method url-fetch) | |
2194 | (uri (string-append "mirror://sourceforge/pyparsing" | |
2195 | "/pyparsing-" version ".tar.gz")) | |
2196 | (sha256 | |
2197 | (base32 | |
e0669289 | 2198 | "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6")))) |
15bfe6d6 FB |
2199 | (build-system python-build-system) |
2200 | (outputs '("out" "doc")) | |
2201 | (arguments | |
2202 | `(#:tests? #f ; no test target | |
2203 | #:modules ((guix build python-build-system) | |
2204 | (guix build utils)) | |
2205 | #:phases | |
2206 | (alist-cons-after | |
2207 | 'install 'install-doc | |
2208 | (lambda* (#:key outputs #:allow-other-keys) | |
89b5c60e | 2209 | (let* ((doc (string-append (assoc-ref outputs "doc") |
15bfe6d6 FB |
2210 | "/share/doc/" ,name "-" ,version)) |
2211 | (html-doc (string-append doc "/html")) | |
2212 | (examples (string-append doc "/examples"))) | |
2213 | (mkdir-p html-doc) | |
2214 | (mkdir-p examples) | |
89b5c60e | 2215 | (for-each |
15bfe6d6 | 2216 | (lambda (dir tgt) |
89b5c60e | 2217 | (map (lambda (file) |
15bfe6d6 FB |
2218 | (copy-file file (string-append tgt "/" (basename file)))) |
2219 | (find-files dir ".*"))) | |
2220 | (list "docs" "htmldoc" "examples") | |
2221 | (list doc html-doc examples)))) | |
2222 | %standard-phases))) | |
2223 | (home-page "http://pyparsing.wikispaces.com") | |
2224 | (synopsis "Python parsing class library") | |
2225 | (description | |
2226 | "The pyparsing module is an alternative approach to creating and | |
2227 | executing simple grammars, vs. the traditional lex/yacc approach, or the use | |
2228 | of regular expressions. The pyparsing module provides a library of classes | |
2229 | that client code uses to construct the grammar directly in Python code.") | |
bd3fa666 | 2230 | (license license:expat))) |
15bfe6d6 FB |
2231 | |
2232 | (define-public python2-pyparsing | |
2233 | (package-with-python2 python-pyparsing)) | |
2234 | ||
ec00de35 FB |
2235 | (define-public python-numpydoc |
2236 | (package | |
2237 | (name "python-numpydoc") | |
2238 | (version "0.5") | |
2239 | (source | |
2240 | (origin | |
2241 | (method url-fetch) | |
89b5c60e | 2242 | (uri (string-append |
ec00de35 FB |
2243 | "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-" |
2244 | version ".tar.gz")) | |
2245 | (sha256 | |
2246 | (base32 | |
5e4d8f67 AE |
2247 | "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k")) |
2248 | (modules '((guix build utils))) | |
2249 | (snippet | |
2250 | '(begin | |
2251 | ;; Drop a test requiring matplotlib, which we cannot add as an | |
2252 | ;; input since it would create a circular dependency: Extend the | |
2253 | ;; test for Python 3, where it is already dropped, to Python 2. | |
2254 | (substitute* "numpydoc/tests/test_plot_directive.py" | |
2255 | (("3") "2")))))) | |
ec00de35 FB |
2256 | (build-system python-build-system) |
2257 | (inputs | |
2258 | `(("python-setuptools" ,python-setuptools) | |
2259 | ("python-docutils" ,python-docutils) | |
2260 | ("python-sphinx" ,python-sphinx) | |
2261 | ("python-nose" ,python-nose))) | |
2262 | (home-page "https://pypi.python.org/pypi/numpydoc") | |
2263 | (synopsis | |
2264 | "Numpy's Sphinx extensions") | |
2265 | (description | |
2266 | "Sphinx extension to support docstrings in Numpy format.") | |
2267 | (license bsd-2))) | |
2268 | ||
2269 | (define-public python2-numpydoc | |
5e4d8f67 | 2270 | (package-with-python2 python-numpydoc)) |
1c65314c FB |
2271 | |
2272 | (define-public python-matplotlib | |
2273 | (package | |
2274 | (name "python-matplotlib") | |
2275 | (version "1.4.2") | |
2276 | (source | |
2277 | (origin | |
2278 | (method url-fetch) | |
2279 | (uri (string-append "mirror://sourceforge/matplotlib" | |
2280 | "/matplotlib-" version ".tar.gz")) | |
2281 | (sha256 | |
2282 | (base32 | |
2283 | "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp")))) | |
2284 | (build-system python-build-system) | |
2285 | (outputs '("out" "doc")) | |
25f9a068 FB |
2286 | (propagated-inputs ; the following packages are all needed at run time |
2287 | `(("python-pyparsing" ,python-pyparsing) | |
2288 | ("python-pygobject" ,python-pygobject) | |
2289 | ("gobject-introspection" ,gobject-introspection) | |
2290 | ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated | |
2291 | ;; from 'gtk+') provides the required 'typelib' files used by | |
2292 | ;; 'gobject-introspection'. The location of these files is set with the | |
2293 | ;; help of the environment variable GI_TYPELIB_PATH. At build time this | |
2294 | ;; is done automatically by a 'native-search-path' procedure. However, | |
2295 | ;; at run-time the user must set this variable as follows: | |
2296 | ;; | |
2297 | ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0 | |
25f9a068 FB |
2298 | ("gtk+" ,gtk+) |
2299 | ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of | |
2300 | ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' | |
2301 | ;; object. For this reason we need to import both libraries. | |
2302 | ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo | |
2303 | ("python-pycairo" ,python-pycairo) | |
2304 | ("python-cairocffi" ,python-cairocffi))) | |
1c65314c FB |
2305 | (inputs |
2306 | `(("python-setuptools" ,python-setuptools) | |
2307 | ("python-dateutil" ,python-dateutil-2) | |
1c65314c FB |
2308 | ("python-six" ,python-six) |
2309 | ("python-pytz" ,python-pytz) | |
2310 | ("python-numpy" ,python-numpy-bootstrap) | |
2311 | ("python-sphinx" ,python-sphinx) | |
2312 | ("python-numpydoc" ,python-numpydoc) | |
2313 | ("python-nose" ,python-nose) | |
2314 | ("python-mock" ,python-mock) | |
2315 | ("libpng" ,libpng) | |
2316 | ("imagemagick" ,imagemagick) | |
2317 | ("freetype" ,freetype) | |
25f9a068 FB |
2318 | ("cairo" ,cairo) |
2319 | ("glib" ,glib) | |
4e7a137a | 2320 | ("python-pillow" ,python-pillow) |
1c65314c | 2321 | ;; FIXME: Add backends when available. |
1c65314c FB |
2322 | ;("python-wxpython" ,python-wxpython) |
2323 | ;("python-pyqt" ,python-pyqt) | |
2324 | )) | |
2325 | (native-inputs | |
2326 | `(("pkg-config" ,pkg-config) | |
2327 | ("texlive" ,texlive) | |
2328 | ("texinfo" ,texinfo))) | |
2329 | (arguments | |
2330 | `(#:phases | |
25f9a068 FB |
2331 | (alist-cons-before |
2332 | 'build 'configure-environment | |
2333 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2334 | (let ((cairo (assoc-ref inputs "cairo")) | |
2335 | (gtk+ (assoc-ref inputs "gtk+"))) | |
2336 | ;; Setting these directories in the 'basedirlist' of 'setup.cfg' | |
2337 | ;; has not effect. | |
25f9a068 FB |
2338 | (setenv "LD_LIBRARY_PATH" |
2339 | (string-append cairo "/lib:" gtk+ "/lib")) | |
2340 | (setenv "HOME" (getcwd)) | |
2341 | (call-with-output-file "setup.cfg" | |
2342 | (lambda (port) | |
2343 | (format port "[rc_options]~% | |
2344 | backend = GTK3Agg~%"))))) | |
2345 | (alist-cons-after | |
2346 | 'install 'install-doc | |
2347 | (lambda* (#:key outputs #:allow-other-keys) | |
2348 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2349 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2350 | (info (string-append data "/info")) | |
2351 | (html (string-append doc "/html"))) | |
2352 | (with-directory-excursion "doc" | |
25f9a068 FB |
2353 | ;; Produce pdf in 'A4' format. |
2354 | (substitute* (find-files "." "conf\\.py") | |
2355 | (("latex_paper_size = 'letter'") | |
2356 | "latex_paper_size = 'a4'")) | |
2357 | (mkdir-p html) | |
2358 | (mkdir-p info) | |
2359 | ;; The doc recommends to run the 'html' target twice. | |
2360 | (system* "python" "make.py" "html") | |
2361 | (system* "python" "make.py" "html") | |
2362 | (system* "python" "make.py" "latex") | |
2363 | (system* "python" "make.py" "texinfo") | |
2364 | (copy-file "build/texinfo/matplotlib.info" | |
2365 | (string-append info "/matplotlib.info")) | |
2366 | (copy-file "build/latex/Matplotlib.pdf" | |
2367 | (string-append doc "/Matplotlib.pdf")) | |
2368 | (copy-recursively "build/html" html)))) | |
2369 | %standard-phases)))) | |
1c65314c FB |
2370 | (home-page "http://matplotlib.org") |
2371 | (synopsis "2D plotting library for Python") | |
2372 | (description | |
2373 | "Matplotlib is a Python 2D plotting library which produces publication | |
2374 | quality figures in a variety of hardcopy formats and interactive environments | |
2375 | across platforms. Matplotlib can be used in Python scripts, the python and | |
2376 | ipython shell, web application servers, and six graphical user interface | |
2377 | toolkits.") | |
2378 | (license psfl))) | |
2379 | ||
764c077b LC |
2380 | (define-public python2-matplotlib |
2381 | (let ((matplotlib (package-with-python2 python-matplotlib))) | |
2382 | (package (inherit matplotlib) | |
88c26834 AE |
2383 | ;; Make sure to use special packages for Python 2 instead |
2384 | ;; of those automatically rewritten by package-with-python2. | |
89b5c60e | 2385 | (propagated-inputs |
7ca0dbc3 | 2386 | `(("python2-pycairo" ,python2-pycairo) |
764c077b LC |
2387 | ("python2-pygobject-2" ,python2-pygobject-2) |
2388 | ,@(alist-delete "python-pycairo" | |
2389 | (alist-delete "python-pygobject" | |
89b5c60e | 2390 | (package-propagated-inputs |
88c26834 | 2391 | matplotlib)))))))) |
94914805 | 2392 | |
bb986599 FB |
2393 | (define-public python-scipy |
2394 | (package | |
2395 | (name "python-scipy") | |
da6ce3f1 | 2396 | (version "0.15.0") |
bb986599 FB |
2397 | (source |
2398 | (origin | |
2399 | (method url-fetch) | |
2400 | (uri (string-append "mirror://sourceforge/scipy" | |
da6ce3f1 | 2401 | "/scipy-" version ".tar.xz")) |
bb986599 FB |
2402 | (sha256 |
2403 | (base32 | |
da6ce3f1 | 2404 | "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf")))) |
bb986599 FB |
2405 | (build-system python-build-system) |
2406 | (inputs | |
2407 | `(("python-numpy" ,python-numpy) | |
2408 | ("python-matplotlib" ,python-matplotlib) | |
2409 | ("python-pyparsing" ,python-pyparsing) | |
2410 | ("python-nose" ,python-nose) | |
2411 | ("python-sphinx" ,python-sphinx) | |
2412 | ("atlas" ,atlas))) | |
2413 | (native-inputs | |
2414 | `(("gfortran" ,gfortran-4.8) | |
2415 | ("texlive" ,texlive) | |
2416 | ("perl" ,perl))) | |
2417 | (outputs '("out" "doc")) | |
2418 | (arguments | |
2419 | `(#:phases | |
2420 | (alist-cons-before | |
2421 | 'build 'set-environment-variables | |
2422 | (lambda* (#:key inputs #:allow-other-keys) | |
2423 | (let* ((atlas-threaded | |
89b5c60e | 2424 | (string-append (assoc-ref inputs "atlas") |
bb986599 FB |
2425 | "/lib/libtatlas.so")) |
2426 | ;; On single core CPUs only the serial library is created. | |
2427 | (atlas-lib | |
2428 | (if (file-exists? atlas-threaded) | |
2429 | atlas-threaded | |
89b5c60e | 2430 | (string-append (assoc-ref inputs "atlas") |
bb986599 FB |
2431 | "/lib/libsatlas.so")))) |
2432 | (setenv "ATLAS" atlas-lib))) | |
2433 | (alist-cons-after | |
2434 | 'install 'install-doc | |
2435 | (lambda* (#:key outputs #:allow-other-keys) | |
2436 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2437 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2438 | (html (string-append doc "/html")) | |
2439 | (pyver ,(string-append "PYVER="))) | |
2440 | (with-directory-excursion "doc" | |
bb986599 FB |
2441 | ;; Fix generation of images for mathematical expressions. |
2442 | (substitute* (find-files "source" "conf\\.py") | |
2443 | (("pngmath_use_preview = True") | |
2444 | "pngmath_use_preview = False")) | |
2445 | (mkdir-p html) | |
2446 | (system* "make" "html" pyver) | |
2447 | (system* "make" "latex" "PAPER=a4" pyver) | |
2448 | (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver) | |
2449 | (copy-file "build/latex/scipy-ref.pdf" | |
2450 | (string-append doc "/scipy-ref.pdf")) | |
2451 | (with-directory-excursion "build/html" | |
2452 | (for-each (lambda (file) | |
2453 | (let* ((dir (dirname file)) | |
2454 | (tgt-dir (string-append html "/" dir))) | |
2455 | (unless (equal? "." dir) | |
2456 | (mkdir-p tgt-dir)) | |
2457 | (copy-file file (string-append html "/" file)))) | |
2458 | (find-files "." ".*")))))) | |
2459 | ;; Tests can only be run after the library has been installed and not | |
2460 | ;; within the source directory. | |
2461 | (alist-cons-after | |
2462 | 'install 'check | |
89b5c60e | 2463 | (lambda _ |
bb986599 FB |
2464 | (with-directory-excursion "/tmp" |
2465 | (zero? (system* "python" "-c" "import scipy; scipy.test()")))) | |
89b5c60e AE |
2466 | (alist-delete |
2467 | 'check | |
bb986599 FB |
2468 | %standard-phases)))))) |
2469 | (home-page "http://www.scipy.org/") | |
2470 | (synopsis "The Scipy library provides efficient numerical routines") | |
2471 | (description "The SciPy library is one of the core packages that make up | |
2472 | the SciPy stack. It provides many user-friendly and efficient numerical | |
2473 | routines such as routines for numerical integration and optimization.") | |
2474 | (license bsd-3))) | |
2475 | ||
764c077b LC |
2476 | (define-public python2-scipy |
2477 | (let ((scipy (package-with-python2 python-scipy))) | |
2478 | (package (inherit scipy) | |
2479 | ;; Use packages customized for python-2. | |
2480 | (inputs `(("python2-matplotlib" ,python2-matplotlib) | |
2481 | ("python2-numpy" ,python2-numpy) | |
89b5c60e AE |
2482 | ,@(alist-delete "python-matplotlib" |
2483 | (alist-delete "python-numpy" | |
764c077b | 2484 | (package-inputs scipy)))))))) |
bb986599 | 2485 | |
94914805 EB |
2486 | (define-public python-sqlalchemy |
2487 | (package | |
2488 | (name "python-sqlalchemy") | |
2489 | (version "0.9.7") | |
2490 | (source | |
2491 | (origin | |
2492 | (method url-fetch) | |
2493 | (uri (string-append "https://pypi.python.org/packages/source/S/" | |
2494 | "SQLAlchemy/SQLAlchemy-" version ".tar.gz")) | |
2495 | (sha256 | |
2496 | (base32 | |
2497 | "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz")))) | |
2498 | (build-system python-build-system) | |
2499 | (native-inputs | |
2500 | `(("python-cython" ,python-cython) ;for c extensions | |
2501 | ("python-pytest" ,python-pytest) | |
2502 | ("python-mock" ,python-mock))) ;for tests | |
2503 | (arguments | |
2504 | `(#:phases (alist-replace | |
2505 | 'check | |
2506 | (lambda _ (zero? (system* "py.test"))) | |
2507 | %standard-phases))) | |
2508 | (home-page "http://www.sqlalchemy.org") | |
2509 | (synopsis "Database abstraction library") | |
2510 | (description | |
2511 | "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that | |
2512 | gives application developers the full power and flexibility of SQL. It | |
2513 | provides a full suite of well known enterprise-level persistence patterns, | |
2514 | designed for efficient and high-performing database access, adapted into a | |
2515 | simple and Pythonic domain language.") | |
2516 | (license x11))) | |
2517 | ||
2518 | (define-public python2-sqlalchemy | |
2519 | (package-with-python2 python-sqlalchemy)) | |
c937562e | 2520 | |
1671c07c EB |
2521 | (define-public python-distutils-extra |
2522 | (package | |
2523 | (name "python-distutils-extra") | |
2524 | (version "2.38") | |
2525 | (source | |
2526 | (origin | |
2527 | (method url-fetch) | |
2528 | (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/" | |
2529 | version "/+download/python-distutils-extra-" | |
2530 | version ".tar.gz")) | |
2531 | (sha256 | |
2532 | (base32 | |
2533 | "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x")))) | |
2534 | (build-system python-build-system) | |
2535 | (native-inputs | |
2536 | `(("python-setuptools" ,python-setuptools))) | |
2537 | (home-page "https://launchpad.net/python-distutils-extra/") | |
2538 | (synopsis "Enhancements to Python's distutils") | |
2539 | (description | |
2540 | "The python-distutils-extra module enables you to easily integrate | |
2541 | gettext support, themed icons, and scrollkeeper-based documentation into | |
2542 | Python's distutils.") | |
2543 | (license gpl2))) | |
2544 | ||
2545 | (define-public python2-distutils-extra | |
2546 | (package-with-python2 python-distutils-extra)) | |
ea5456c8 EB |
2547 | |
2548 | (define-public python2-elib.intl | |
2549 | (package | |
2550 | (name "python2-elib.intl") | |
2551 | (version "0.0.3") | |
2552 | (source | |
2553 | (origin | |
2554 | ;; This project doesn't tag releases or publish tarballs, so we take | |
2555 | ;; source from a (semi-arbitrary, i.e. latest as of now) git commit. | |
2556 | (method git-fetch) | |
2557 | (uri (git-reference | |
2558 | (url "https://github.com/dieterv/elib.intl.git") | |
2559 | (commit "d09997cfef"))) | |
2560 | (sha256 | |
2561 | (base32 | |
2562 | "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d")))) | |
2563 | (build-system python-build-system) | |
2564 | (native-inputs | |
2565 | `(("python2-setuptools" ,python2-setuptools))) | |
2566 | (arguments | |
2567 | ;; incompatible with Python 3 (exception syntax) | |
2568 | `(#:python ,python-2 | |
2569 | #:tests? #f | |
2570 | ;; With standard flags, the install phase attempts to create a zip'd | |
2571 | ;; egg file, and fails with an error: 'ZIP does not support timestamps | |
2572 | ;; before 1980' | |
2573 | #:configure-flags '("--single-version-externally-managed" | |
2574 | "--record=elib.txt"))) | |
2575 | (home-page "https://github.com/dieterv/elib.intl") | |
2576 | (synopsis "Enhanced internationalization for Python") | |
2577 | (description | |
2578 | "The elib.intl module provides enhanced internationalization (I18N) | |
2579 | services for your Python modules and applications.") | |
2580 | (license lgpl3+))) | |
2581 | ||
c937562e EB |
2582 | (define-public python-pillow |
2583 | (package | |
2584 | (name "python-pillow") | |
2585 | (version "2.6.1") | |
2586 | (source | |
2587 | (origin | |
2588 | (method url-fetch) | |
2589 | (uri (string-append "https://pypi.python.org/packages/source/P/" | |
2590 | "Pillow/Pillow-" version ".tar.gz")) | |
2591 | (sha256 | |
2592 | (base32 | |
2593 | "0iw36c73wkhz88wa78v6l43llsb080ihw8yq7adhfqxdib7l4hzr")))) | |
2594 | (build-system python-build-system) | |
2595 | (native-inputs | |
2596 | `(("python-setuptools" ,python-setuptools) | |
2597 | ("python-nose" ,python-nose))) | |
2598 | (inputs | |
2599 | `(("lcms" ,lcms) | |
2600 | ("zlib" ,zlib) | |
2601 | ("libjpeg" ,libjpeg) | |
2602 | ("openjpeg" ,openjpeg) | |
2603 | ("libtiff" ,libtiff))) | |
2604 | (propagated-inputs | |
2605 | `(;; Used at runtime for pkg_resources | |
2606 | ("python-setuptools" ,python-setuptools))) | |
2607 | (arguments | |
2608 | `(#:phases (alist-cons-after | |
2609 | 'install 'check-installed | |
2610 | (lambda _ | |
2611 | (begin | |
2612 | (setenv "HOME" (getcwd)) | |
2613 | (and (zero? (system* "python" "selftest.py" "--installed")) | |
2614 | (zero? (system* "python" "test-installed.py"))))) | |
2615 | (alist-delete 'check %standard-phases)))) | |
2616 | (home-page "https://pypi.python.org/pypi/Pillow") | |
2617 | (synopsis "Fork of the Python Imaging Library") | |
2618 | (description | |
2619 | "The Python Imaging Library adds image processing capabilities to your | |
2620 | Python interpreter. This library provides extensive file format support, an | |
2621 | efficient internal representation, and fairly powerful image processing | |
2622 | capabilities. The core image library is designed for fast access to data | |
2623 | stored in a few basic pixel formats. It should provide a solid foundation for | |
2624 | a general image processing tool.") | |
2625 | (license (x11-style | |
2626 | "http://www.pythonware.com/products/pil/license.htm" | |
2627 | "The PIL Software License")))) | |
2628 | ||
2629 | (define-public python2-pillow | |
2630 | (package-with-python2 python-pillow)) | |
bb986599 | 2631 | |
a415f036 FB |
2632 | (define-public python-pycparser |
2633 | (package | |
2634 | (name "python-pycparser") | |
2635 | (version "2.10") | |
2636 | (source | |
2637 | (origin | |
2638 | (method url-fetch) | |
2639 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
2640 | "pycparser/pycparser-" version ".tar.gz")) | |
2641 | (sha256 | |
2642 | (base32 | |
2643 | "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm")))) | |
2644 | (outputs '("out" "doc")) | |
2645 | (build-system python-build-system) | |
2646 | (native-inputs | |
2647 | `(("pkg-config" ,pkg-config) | |
2648 | ("python-setuptools" ,python-setuptools))) | |
2649 | (arguments | |
89b5c60e | 2650 | `(#:phases |
a415f036 FB |
2651 | (alist-replace |
2652 | 'check | |
2653 | (lambda _ | |
2654 | (with-directory-excursion "tests" | |
2655 | (zero? (system* "python" "all_tests.py")))) | |
2656 | (alist-cons-after | |
2657 | 'install 'install-doc | |
2658 | (lambda* (#:key outputs #:allow-other-keys) | |
2659 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2660 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2661 | (examples (string-append doc "/examples"))) | |
2662 | (mkdir-p examples) | |
2663 | (for-each (lambda (file) | |
2664 | (copy-file (string-append "." file) | |
2665 | (string-append doc file))) | |
2666 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
2667 | (copy-recursively "examples" examples))) | |
2668 | %standard-phases)))) | |
2669 | (home-page "https://github.com/eliben/pycparser") | |
2670 | (synopsis "C parser in Python") | |
2671 | (description | |
2672 | "Pycparser is a complete parser of the C language, written in pure Python | |
2673 | using the PLY parsing library. It parses C code into an AST and can serve as | |
2674 | a front-end for C compilers or analysis tools.") | |
2675 | (license bsd-3))) | |
2676 | ||
2677 | (define-public python2-pycparser | |
2678 | (package-with-python2 python-pycparser)) | |
57c3f716 FB |
2679 | |
2680 | (define-public python-cffi | |
2681 | (package | |
2682 | (name "python-cffi") | |
2683 | (version "0.8.6") | |
2684 | (source | |
2685 | (origin | |
2686 | (method url-fetch) | |
2687 | (uri (string-append "https://pypi.python.org/packages/source/c/" | |
2688 | "cffi/cffi-" version ".tar.gz")) | |
89b5c60e | 2689 | (sha256 |
57c3f716 FB |
2690 | (base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5")))) |
2691 | (build-system python-build-system) | |
2692 | (outputs '("out" "doc")) | |
2693 | (inputs | |
2694 | `(("libffi" ,libffi))) | |
2695 | (propagated-inputs ; required at run-time | |
2696 | `(("python-pycparser" ,python-pycparser))) | |
2697 | (native-inputs | |
2698 | `(("pkg-config" ,pkg-config) | |
2699 | ("python-sphinx" ,python-sphinx) | |
2700 | ("python-setuptools" ,python-setuptools))) | |
2701 | (arguments | |
2702 | `(#:tests? #f ; FIXME: requires pytest | |
89b5c60e | 2703 | #:phases |
57c3f716 FB |
2704 | (alist-cons-after |
2705 | 'install 'install-doc | |
2706 | (lambda* (#:key outputs #:allow-other-keys) | |
2707 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2708 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2709 | (html (string-append doc "/html"))) | |
2710 | (with-directory-excursion "doc" | |
2711 | (system* "make" "html") | |
2712 | (mkdir-p html) | |
2713 | (copy-recursively "build/html" html)) | |
2714 | (copy-file "LICENSE" (string-append doc "/LICENSE")))) | |
2715 | %standard-phases))) | |
2716 | (home-page "http://cffi.readthedocs.org") | |
2717 | (synopsis "Foreign function interface for Python") | |
2718 | (description | |
2719 | "Foreign Function Interface for Python calling C code.") | |
bd3fa666 | 2720 | (license license:expat))) |
57c3f716 FB |
2721 | |
2722 | (define-public python2-cffi | |
2723 | (package-with-python2 python-cffi)) | |
6fa14469 FB |
2724 | |
2725 | (define-public python-xcffib | |
2726 | (package | |
2727 | (name "python-xcffib") | |
2728 | (version "0.1.9") | |
2729 | (source | |
2730 | (origin | |
2731 | (method url-fetch) | |
2732 | (uri (string-append "https://pypi.python.org/packages/source/x/" | |
2733 | "xcffib/xcffib-" version ".tar.gz")) | |
2734 | (sha256 | |
2735 | (base32 | |
2736 | "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81")))) | |
2737 | (build-system python-build-system) | |
2738 | (inputs | |
2739 | `(("libxcb" ,libxcb) | |
2740 | ("python-six" ,python-six))) | |
2741 | (native-inputs | |
2742 | `(("python-setuptools" ,python-setuptools))) | |
2743 | (propagated-inputs | |
2744 | `(("python-cffi" ,python-cffi))) ; used at run time | |
2745 | (arguments | |
89b5c60e | 2746 | `(#:phases |
6fa14469 FB |
2747 | (alist-cons-after |
2748 | 'install 'install-doc | |
2749 | (lambda* (#:key outputs #:allow-other-keys) | |
2750 | (let ((doc (string-append (assoc-ref outputs "out") "/share" | |
2751 | "/doc/" ,name "-" ,version))) | |
2752 | (mkdir-p doc) | |
2753 | (copy-file "README.md" | |
2754 | (string-append doc "/README.md")))) | |
2755 | %standard-phases))) | |
2756 | (home-page "https://github.com/tych0/xcffib") | |
2757 | (synopsis "XCB Python bindings") | |
2758 | (description | |
2759 | "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds | |
2760 | support for Python 3 and PyPy. It is based on cffi.") | |
bd3fa666 | 2761 | (license license:expat))) |
6fa14469 FB |
2762 | |
2763 | (define-public python2-xcffib | |
2764 | (package-with-python2 python-xcffib)) | |
2765 | ||
9e099723 FB |
2766 | (define-public python-cairocffi |
2767 | (package | |
2768 | (name "python-cairocffi") | |
2769 | (version "0.6") | |
2770 | (source | |
2771 | (origin | |
2772 | (method url-fetch) | |
2773 | ;; The archive on pypi is missing the 'utils' directory! | |
2774 | (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v" | |
2775 | version ".tar.gz")) | |
f586c877 | 2776 | (file-name (string-append name "-" version ".tar.gz")) |
9e099723 FB |
2777 | (sha256 |
2778 | (base32 | |
2779 | "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51")))) | |
2780 | (build-system python-build-system) | |
2781 | (outputs '("out" "doc")) | |
2782 | (inputs | |
2783 | `(("gdk-pixbuf" ,gdk-pixbuf) | |
2784 | ("cairo" ,cairo))) | |
2785 | (native-inputs | |
2786 | `(("pkg-config" ,pkg-config) | |
2787 | ("python-sphinx" ,python-sphinx) | |
2788 | ("python-docutils" ,python-docutils) | |
2789 | ("python-setuptools" ,python-setuptools))) | |
2790 | (propagated-inputs | |
2791 | `(("python-xcffib" ,python-xcffib))) ; used at run time | |
2792 | (arguments | |
89b5c60e | 2793 | `(#:phases |
9e099723 FB |
2794 | (alist-cons-after |
2795 | 'install 'install-doc | |
2796 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2797 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2798 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2799 | (html (string-append doc "/html"))) | |
89b5c60e | 2800 | (setenv "LD_LIBRARY_PATH" |
9e099723 FB |
2801 | (string-append (assoc-ref inputs "cairo") "/lib" ":" |
2802 | (assoc-ref inputs "gdk-pixbuf") "/lib")) | |
2803 | (setenv "LANG" "en_US.UTF-8") | |
2804 | (mkdir-p html) | |
2805 | (for-each (lambda (file) | |
2806 | (copy-file (string-append "." file) | |
2807 | (string-append doc file))) | |
2808 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
2809 | (system* "python" "setup.py" "build_sphinx") | |
2810 | (copy-recursively "docs/_build/html" html))) | |
2811 | %standard-phases))) | |
2812 | (home-page "https://github.com/SimonSapin/cairocffi") | |
2813 | (synopsis "Python bindings and object-oriented API for Cairo") | |
2814 | (description | |
2815 | "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of | |
2816 | Python bindings and object-oriented API for cairo. Cairo is a 2D vector | |
2817 | graphics library with support for multiple backends including image buffers, | |
2818 | PNG, PostScript, PDF, and SVG file output.") | |
2819 | (license bsd-3))) | |
2820 | ||
2821 | (define-public python2-cairocffi | |
2822 | (package-with-python2 python-cairocffi)) | |
2823 | ||
ae1ab9fe FB |
2824 | (define-public python-ipython |
2825 | (package | |
2826 | (name "python-ipython") | |
2827 | (version "2.3.1") | |
2828 | (source | |
2829 | (origin | |
2830 | (method url-fetch) | |
2831 | (uri (string-append "https://pypi.python.org/packages/source/i/" | |
2832 | "ipython/ipython-" version ".tar.gz")) | |
2833 | (sha256 | |
2834 | (base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y")))) | |
2835 | (build-system python-build-system) | |
2836 | (outputs '("out" "doc")) | |
2837 | ;; FIXME: add optional dependencies when available: pyzmq, tornado, ... | |
2838 | (inputs | |
2839 | `(("readline" ,readline) | |
2840 | ("python-matplotlib" ,python-matplotlib) | |
2841 | ("python-numpy" ,python-numpy-bootstrap) | |
2842 | ("python-numpydoc" ,python-numpydoc) | |
2843 | ("python-nose" ,python-nose))) | |
2844 | (native-inputs | |
2845 | `(("pkg-config" ,pkg-config) | |
2846 | ("python-sphinx" ,python-sphinx) | |
2847 | ("texlive" ,texlive) | |
2848 | ("texinfo" ,texinfo) | |
2849 | ("python-setuptools" ,python-setuptools))) | |
2850 | (arguments | |
89b5c60e | 2851 | `(#:phases |
ae1ab9fe FB |
2852 | (alist-cons-after |
2853 | 'install 'install-doc | |
2854 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2855 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2856 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2857 | (html (string-append doc "/html")) | |
2858 | (man1 (string-append data "/man/man1")) | |
2859 | (info (string-append data "/info")) | |
2860 | (examples (string-append doc "/examples"))) | |
2861 | (setenv "LANG" "en_US.UTF-8") | |
2862 | (with-directory-excursion "docs" | |
2863 | ;; FIXME: html and pdf fail to build without optional pyzmq | |
2864 | ;(system* "make" "html") | |
2865 | ;(system* "make" "pdf" "PAPER=a4") | |
2866 | (system* "make" "info")) | |
2867 | (copy-recursively "docs/man" man1) | |
2868 | (copy-recursively "examples" examples) | |
2869 | ;; (copy-recursively "docs/build/html" html) | |
2870 | ;; (copy-file "docs/build/latex/ipython.pdf" | |
2871 | ;; (string-append doc "/ipython.pdf")) | |
2872 | (mkdir-p info) | |
2873 | (copy-file "docs/build/texinfo/ipython.info" | |
2874 | (string-append info "/ipython.info")) | |
2875 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))) | |
2876 | ;; Tests can only be run after the library has been installed and not | |
2877 | ;; within the source directory. | |
2878 | (alist-cons-after | |
2879 | 'install 'check | |
2880 | (lambda* (#:key outputs #:allow-other-keys) | |
2881 | ;; The test procedure appears to miss the fact that some optional | |
2882 | ;; dependencies are missing. | |
2883 | ;; (with-directory-excursion "/tmp" | |
2884 | ;; (zero? (system* (string-append (assoc-ref outputs "out") | |
2885 | ;; "/bin/iptest")))) | |
2886 | #t) | |
89b5c60e AE |
2887 | (alist-delete |
2888 | 'check | |
ae1ab9fe FB |
2889 | %standard-phases))))) |
2890 | (home-page "http://ipython.org") | |
2891 | (synopsis "IPython is a tool for interactive computing in Python") | |
2892 | (description | |
2893 | "IPython provides a rich architecture for interactive computing with: | |
2894 | Powerful interactive shells, a browser-based notebook, support for interactive | |
2895 | data visualization, embeddable interpreters and tools for parallel | |
2896 | computing.") | |
2897 | (license bsd-3))) | |
2898 | ||
2899 | (define-public python2-ipython | |
2900 | (let ((ipython (package-with-python2 python-ipython))) | |
2901 | (package (inherit ipython) | |
2902 | ;; Make sure we use custom python2-NAME packages. | |
89b5c60e | 2903 | (inputs |
88c26834 AE |
2904 | `(("python2-matplotlib" ,python2-matplotlib) |
2905 | ,@(alist-delete "python-matplotlib" | |
2906 | (package-inputs ipython))))))) | |
03411993 AE |
2907 | |
2908 | (define-public python-isodate | |
2909 | (package | |
2910 | (name "python-isodate") | |
2911 | (version "0.5.1") | |
2912 | (source | |
2913 | (origin | |
2914 | (method url-fetch) | |
2915 | (uri (string-append | |
2916 | "https://pypi.python.org/packages/source/i/isodate/isodate-" | |
2917 | version | |
2918 | ".tar.gz")) | |
2919 | (sha256 | |
2920 | (base32 | |
2921 | "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami")))) | |
2922 | (build-system python-build-system) | |
2923 | (inputs | |
2924 | `(("python-setuptools" ,python-setuptools))) | |
2925 | (home-page | |
2926 | "http://cheeseshop.python.org/pypi/isodate") | |
2927 | (synopsis | |
2928 | "Python date parser and formatter") | |
2929 | (description | |
2930 | "Python-isodate is a python module for parsing and formatting | |
2931 | ISO 8601 dates, time and duration.") | |
2932 | (license bsd-3))) | |
2933 | ||
2934 | (define-public python2-isodate | |
2935 | (package-with-python2 python-isodate)) | |
673ab897 AE |
2936 | |
2937 | (define-public python-html5lib | |
2938 | (package | |
2939 | (name "python-html5lib") | |
2940 | (version "1.0b3") | |
2941 | (source | |
2942 | (origin | |
2943 | (method url-fetch) | |
2944 | (uri (string-append | |
2945 | "https://pypi.python.org/packages/source/h/html5lib/html5lib-" | |
2946 | version | |
2947 | ".tar.gz")) | |
2948 | (sha256 | |
2949 | (base32 | |
2950 | "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln")))) | |
2951 | (build-system python-build-system) | |
3dd75476 AE |
2952 | (propagated-inputs |
2953 | `(("python-six" ,python-six))) ; required to "import html5lib" | |
673ab897 AE |
2954 | (inputs |
2955 | `(("python-setuptools" ,python-setuptools))) | |
2956 | (arguments | |
2957 | `(#:test-target "check")) | |
2958 | (home-page | |
2959 | "https://github.com/html5lib/html5lib-python") | |
2960 | (synopsis | |
2961 | "Python HTML parser based on the WHATWG HTML specifcation") | |
2962 | (description | |
2963 | "Html5lib is an HTML parser based on the WHATWG HTML specifcation | |
2964 | and written in Python.") | |
bd3fa666 | 2965 | (license license:expat))) |
673ab897 AE |
2966 | |
2967 | (define-public python2-html5lib | |
2968 | (package-with-python2 python-html5lib)) | |
e99f4211 MW |
2969 | |
2970 | (define-public python-urwid | |
2971 | (package | |
2972 | (name "python-urwid") | |
2973 | (version "1.3.0") | |
2974 | (source | |
2975 | (origin | |
2976 | (method url-fetch) | |
be1f44bb MW |
2977 | (uri (string-append |
2978 | "https://pypi.python.org/packages/source/u/urwid/urwid-" | |
2979 | version ".tar.gz")) | |
e99f4211 MW |
2980 | (sha256 |
2981 | (base32 | |
2982 | "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19")))) | |
2983 | (build-system python-build-system) | |
2984 | (native-inputs `(("python-setuptools" ,python-setuptools))) | |
2985 | (home-page "http://urwid.org") | |
2986 | (synopsis "Console user interface library for Python") | |
2987 | (description | |
2988 | "Urwid is a curses-based UI/widget library for Python. It includes many | |
2989 | features useful for text console applications.") | |
2990 | (license lgpl2.1+))) | |
2991 | ||
2992 | (define-public python2-urwid | |
2993 | (package-with-python2 python-urwid)) | |
d95a56c6 PAR |
2994 | |
2995 | (define-public python-dbus | |
2996 | (package | |
2997 | (name "python-dbus") | |
2998 | (version "1.2.0") | |
2999 | (source | |
3000 | (origin | |
3001 | (method url-fetch) | |
3002 | (uri (string-append | |
3003 | "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-" | |
3004 | version ".tar.gz")) | |
3005 | (sha256 | |
3006 | (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71")))) | |
3007 | (build-system gnu-build-system) | |
3008 | (native-inputs | |
3009 | `(("pkg-config" ,pkg-config))) | |
3010 | (inputs | |
3011 | `(("python" ,python) | |
3012 | ("dbus" ,dbus) | |
3013 | ("dbus-glib" ,dbus-glib) | |
3014 | ("glib" ,glib))) | |
3015 | (synopsis "Python bindings for D-bus") | |
3016 | (description "python-dbus provides bindings for libdbus, the reference | |
3017 | implementation of D-Bus.") | |
3018 | (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/") | |
bd3fa666 | 3019 | (license license:expat))) |
b52af02b MW |
3020 | |
3021 | (define-public python2-dbus | |
3022 | (package (inherit python-dbus) | |
3023 | (name "python2-dbus") | |
3024 | (inputs `(("python" ,python-2) | |
3025 | ,@(alist-delete "python" | |
3026 | (package-inputs python-dbus) | |
3027 | equal?))) | |
3028 | ;; FIXME: on Python 2, the test_utf8 fails with: | |
3029 | ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)" | |
3030 | (arguments `(#:tests? #f)))) | |
a6ac8332 AE |
3031 | |
3032 | (define-public python-apsw | |
3033 | (package | |
3034 | (name "python-apsw") | |
3035 | (version "3.8.7.3-r1") | |
3036 | (source | |
3037 | (origin | |
3038 | (method url-fetch) | |
3039 | (uri (string-append | |
3040 | "https://pypi.python.org/packages/source/a/apsw/apsw-" | |
3041 | version | |
3042 | ".tar.gz")) | |
3043 | (sha256 | |
3044 | (base32 | |
3045 | "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l")))) | |
3046 | (build-system python-build-system) | |
3047 | (inputs | |
3048 | `(("python-setuptools" ,python-setuptools) | |
3049 | ("sqlite" ,sqlite))) | |
3050 | (arguments | |
3051 | `(#:phases | |
3052 | ;; swap check and install phases | |
3053 | (alist-cons-after | |
3054 | 'install 'check | |
3055 | (assoc-ref %standard-phases 'check) | |
3056 | (alist-delete | |
3057 | 'check | |
3058 | %standard-phases)))) | |
3059 | (home-page "https://github.com/rogerbinns/apsw/") | |
3060 | (synopsis "Another Python SQLite Wrapper") | |
3061 | (description "APSW is a Python wrapper for the SQLite | |
3062 | embedded relational database engine. In contrast to other wrappers such as | |
3063 | pysqlite it focuses on being a minimal layer over SQLite attempting just to | |
3064 | translate the complete SQLite API into Python.") | |
abde5f37 | 3065 | (license license:zlib))) |
a6ac8332 AE |
3066 | |
3067 | (define-public python2-apsw | |
3068 | (package-with-python2 python-apsw)) | |
26b307e2 AE |
3069 | |
3070 | (define-public python-lxml | |
3071 | (package | |
3072 | (name "python-lxml") | |
3073 | (version "3.4.2") | |
3074 | (source | |
3075 | (origin | |
3076 | (method url-fetch) | |
3077 | (uri (string-append | |
3078 | "https://pypi.python.org/packages/source/l/lxml/lxml-" | |
3079 | version | |
3080 | ".tar.gz")) | |
3081 | (sha256 | |
3082 | (base32 | |
3083 | "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7")))) | |
3084 | (build-system python-build-system) | |
3085 | (inputs | |
3086 | `(("libxml2" ,libxml2) | |
3087 | ("libxslt" ,libxslt) | |
3088 | ("python-setuptools" ,python-setuptools))) | |
3089 | (home-page "http://lxml.de/") | |
3090 | (synopsis | |
3091 | "Python XML processing library") | |
3092 | (description | |
3093 | "The lxml XML toolkit is a Pythonic binding for the C libraries | |
3094 | libxml2 and libxslt.") | |
3095 | (license bsd-3))) ; and a few more, see LICENSES.txt | |
3096 | ||
3097 | (define-public python2-lxml | |
3098 | (package-with-python2 python-lxml)) | |
4ed20663 AE |
3099 | |
3100 | (define-public python-pillow | |
3101 | (package | |
3102 | (name "python-pillow") | |
3103 | (version "2.7.0") | |
3104 | (source | |
3105 | (origin | |
3106 | (method url-fetch) | |
3107 | (uri (string-append | |
3108 | "https://pypi.python.org/packages/source/P/Pillow/Pillow-" | |
3109 | version | |
3110 | ".tar.gz")) | |
3111 | (sha256 | |
3112 | (base32 | |
3113 | "1y0rysgd7vqpl5lh0lsra7j2k30azwxqlh5jnqk1i0pmfc735s96")))) | |
3114 | (build-system python-build-system) | |
3115 | (inputs | |
3116 | `(("freetype" ,freetype) | |
3117 | ("lcms" ,lcms) | |
3118 | ("libjpeg" ,libjpeg) | |
3119 | ("libtiff" ,libtiff) | |
3120 | ("openjpeg" ,openjpeg) | |
3121 | ("python-setuptools" ,python-setuptools) | |
3122 | ("zlib" ,zlib))) | |
3123 | (arguments | |
3124 | `(#:tests? #f)) ; no check target | |
3125 | (home-page "http://python-pillow.github.io/") | |
3126 | (synopsis "Pillow fork of Python Imaging Library") | |
3127 | (description "Pillow is a fork of the Python Imaging Library (PIL).") | |
3128 | ;; PIL license, see | |
3129 | ;; http://www.pythonware.com/products/pil/license.htm | |
3130 | (license (x11-style | |
3131 | "file://PKG-INFO" | |
3132 | "See http://www.pythonware.com/products/pil/license.htm")))) | |
3133 | ||
3134 | (define-public python2-pillow | |
3135 | (package-with-python2 python-pillow)) | |
bec07a7c AE |
3136 | |
3137 | (define-public python2-pil | |
3138 | (package | |
3139 | (name "python2-pil") | |
3140 | (version "1.1.7") | |
3141 | (source | |
3142 | (origin | |
3143 | (method url-fetch) | |
3144 | (uri (string-append | |
3145 | "http://effbot.org/downloads/Imaging-" | |
3146 | version ".tar.gz")) | |
3147 | (sha256 | |
3148 | (base32 | |
516277cb AE |
3149 | "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9")) |
3150 | (modules '((guix build utils))) | |
3151 | (snippet | |
3152 | ;; Adapt to newer freetype. As the package is unmaintained upstream, | |
3153 | ;; there is no use in creating a patch and reporting it. | |
3154 | '(substitute* "_imagingft.c" | |
3155 | (("freetype/") | |
3156 | "freetype2/"))))) | |
bec07a7c AE |
3157 | (build-system python-build-system) |
3158 | (inputs | |
3159 | `(("freetype" ,freetype) | |
3160 | ("libjpeg" ,libjpeg) | |
3161 | ("libtiff" ,libtiff) | |
3162 | ("python-setuptools" ,python-setuptools) | |
3163 | ("zlib" ,zlib))) | |
3164 | (arguments | |
3165 | ;; Only the fork python-pillow works with Python 3. | |
3166 | `(#:python ,python-2 | |
3167 | #:tests? #f ; no check target | |
3168 | #:phases | |
3169 | (alist-cons-before | |
3170 | 'build 'configure | |
3171 | ;; According to README and setup.py, manual configuration is | |
3172 | ;; the preferred way of "searching" for inputs. | |
3173 | ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter. | |
3174 | (lambda* (#:key inputs #:allow-other-keys) | |
3175 | (let ((jpeg (assoc-ref inputs "libjpeg")) | |
3176 | (zlib (assoc-ref inputs "zlib")) | |
3177 | (tiff (assoc-ref inputs "libtiff")) | |
3178 | (freetype (assoc-ref inputs "freetype"))) | |
3179 | (substitute* "setup.py" | |
3180 | (("JPEG_ROOT = None") | |
3181 | (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")")) | |
3182 | (("ZLIB_ROOT = None") | |
3183 | (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")")) | |
3184 | (("TIFF_ROOT = None") | |
3185 | (string-append "TIFF_ROOT = libinclude(\"" tiff "\")")) | |
3186 | (("FREETYPE_ROOT = None") | |
3187 | (string-append "FREETYPE_ROOT = libinclude(\"" | |
3188 | freetype "\")"))))) | |
3189 | %standard-phases))) | |
3190 | (home-page "http://www.pythonware.com/products/pil/") | |
3191 | (synopsis "Python Imaging Library") | |
3192 | (description "The Python Imaging Library (PIL) adds image processing | |
3193 | capabilities to the Python interpreter.") | |
3194 | (license (x11-style | |
3195 | "file://README" | |
3196 | "See 'README' in the distribution.")))) | |
092e86f5 AE |
3197 | |
3198 | (define-public python2-cssutils | |
3199 | (package | |
3200 | (name "python2-cssutils") | |
3201 | (version "1.0") | |
3202 | (source | |
3203 | (origin | |
3204 | (method url-fetch) | |
3205 | (uri (string-append | |
3206 | "https://pypi.python.org/packages/source/c/cssutils/cssutils-" | |
3207 | version | |
3208 | ".zip")) | |
3209 | (sha256 | |
3210 | (base32 | |
3211 | "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125")))) | |
3212 | (build-system python-build-system) | |
3213 | (native-inputs | |
3214 | `(("python2-mock" ,python2-mock) ; for the tests | |
3215 | ("unzip" ,unzip))) ; for unpacking the source | |
3216 | (inputs | |
3217 | `(("python2-setuptools" ,python2-setuptools))) | |
3218 | (arguments | |
3219 | `(#:python ,python-2 ; Otherwise tests fail with a syntax error. | |
3220 | #:tests? #f ; The tests apparently download an external URL. | |
da6dd842 | 3221 | )) |
092e86f5 AE |
3222 | (home-page "http://cthedot.de/cssutils/") |
3223 | (synopsis | |
3224 | "CSS Cascading Style Sheets library for Python") | |
3225 | (description | |
3226 | "Cssutils is a Python package for parsing and building CSS | |
3227 | Cascading Style Sheets. Currently it provides a DOM only and no rendering | |
3228 | options.") | |
3229 | (license lgpl3+))) | |
880ff77c AE |
3230 | |
3231 | (define-public python-cssselect | |
3232 | (package | |
3233 | (name "python-cssselect") | |
3234 | (version "0.9.1") | |
3235 | (source | |
3236 | (origin | |
3237 | (method url-fetch) | |
3238 | (uri (string-append | |
3239 | "https://pypi.python.org/packages/source/c/cssselect/cssselect-" | |
3240 | version | |
3241 | ".tar.gz")) | |
3242 | (sha256 | |
3243 | (base32 | |
3244 | "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85")))) | |
3245 | (build-system python-build-system) | |
3246 | (inputs | |
3247 | `(("python-setuptools" ,python-setuptools))) | |
3248 | (arguments | |
3249 | ;; tests fail with message | |
3250 | ;; AttributeError: 'module' object has no attribute 'tests' | |
3251 | `(#:tests? #f)) | |
3252 | (home-page | |
3253 | "https://pythonhosted.org/cssselect/") | |
3254 | (synopsis | |
3255 | "CSS3 selector parser and translator to XPath 1.0") | |
3256 | (description | |
3257 | "Cssselect ia a Python module that parses CSS3 Selectors and translates | |
3258 | them to XPath 1.0 expressions. Such expressions can be used in lxml or | |
3259 | another XPath engine to find the matching elements in an XML or HTML document.") | |
3260 | (license bsd-3))) | |
3261 | ||
3262 | (define-public python2-cssselect | |
3263 | (package-with-python2 python-cssselect)) | |
60357f99 AE |
3264 | |
3265 | (define-public python-netifaces | |
3266 | (package | |
3267 | (name "python-netifaces") | |
3268 | (version "0.10.4") | |
3269 | (source | |
3270 | (origin | |
3271 | (method url-fetch) | |
3272 | (uri (string-append | |
3273 | "https://pypi.python.org/packages/source/n/netifaces/netifaces-" | |
3274 | version | |
3275 | ".tar.gz")) | |
3276 | (sha256 | |
3277 | (base32 | |
3278 | "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln")))) | |
3279 | (build-system python-build-system) | |
3280 | (inputs | |
3281 | `(("python-setuptools" ,python-setuptools))) | |
3282 | (home-page | |
3283 | "https://bitbucket.org/al45tair/netifaces") | |
3284 | (synopsis | |
3285 | "Python module for portable network interface information") | |
3286 | (description | |
3287 | "Netifaces is a Python module providing information on network | |
3288 | interfaces in an easy and portable manner.") | |
3289 | (license license:expat))) | |
3290 | ||
3291 | (define-public python2-netifaces | |
3292 | (package-with-python2 python-netifaces)) | |
92cb152b RW |
3293 | |
3294 | (define-public snakemake | |
3295 | (package | |
3296 | (name "snakemake") | |
3297 | (version "3.2.1") | |
3298 | (source | |
3299 | (origin | |
3300 | (method url-fetch) | |
3301 | (uri (string-append | |
3302 | "https://pypi.python.org/packages/source/s/snakemake/snakemake-" | |
3303 | version ".tar.gz")) | |
3304 | (sha256 | |
3305 | (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91")))) | |
3306 | (build-system python-build-system) | |
3307 | (inputs `(("python-setuptools" ,python-setuptools))) | |
3308 | (home-page "https://bitbucket.org/johanneskoester/snakemake") | |
3309 | (synopsis "Python-based execution environment for make-like workflows") | |
3310 | (description | |
3311 | "Snakemake aims to reduce the complexity of creating workflows by | |
3312 | providing a clean and modern domain specific specification language (DSL) in | |
3313 | Python style, together with a fast and comfortable execution environment.") | |
3314 | (license license:expat))) | |
a1920bc9 FB |
3315 | |
3316 | (define-public python-testlib | |
3317 | (package | |
3318 | (name "python-testlib") | |
3319 | (version "0.6.5") | |
3320 | (source | |
3321 | (origin | |
3322 | (method url-fetch) | |
3323 | (uri (string-append | |
3324 | "https://pypi.python.org/packages/source/t/testlib/testlib-" | |
3325 | version ".zip")) | |
3326 | (sha256 | |
3327 | (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y")))) | |
3328 | (build-system python-build-system) | |
3329 | (inputs | |
3330 | `(("python-setuptools" ,python-setuptools))) | |
3331 | (native-inputs | |
3332 | `(("unzip" ,unzip))) | |
3333 | (arguments | |
3334 | `(#:phases | |
3335 | (alist-replace | |
3336 | 'unpack | |
3337 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3338 | (let ((unzip (string-append (assoc-ref inputs "unzip") | |
3339 | "/bin/unzip")) | |
3340 | (source (assoc-ref inputs "source"))) | |
3341 | (and (zero? (system* unzip source)) | |
3342 | (chdir (string-append "testlib-" ,version))))) | |
3343 | %standard-phases))) | |
3344 | (synopsis "Python micro test suite harness") | |
3345 | (description "A micro unittest suite harness for Python.") | |
3346 | (home-page "https://github.com/trentm/testlib") | |
1cb9c006 | 3347 | (license license:expat))) |
a1920bc9 FB |
3348 | |
3349 | (define-public python2-testlib | |
3350 | (package-with-python2 python-testlib)) |