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