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