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