Commit | Line | Data |
---|---|---|
a01b6da7 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
7a03af70 | 3 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
af807dea | 4 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
32d5c729 | 5 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
a01b6da7 NK |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
1ffa7090 | 22 | (define-module (gnu packages python) |
011b18c3 | 23 | #:use-module ((guix licenses) |
c1448c69 | 24 | #:select (bsd-3 bsd-style expat psfl x11 x11-style |
8deeda0c | 25 | gpl2 gpl2+ lgpl2.1+)) |
1d08c01f | 26 | #:use-module ((guix licenses) #:select (zlib) |
ed0cdf83 | 27 | #:renamer (symbol-prefix-proc 'license:)) |
3fdc99da | 28 | #:use-module (gnu packages) |
1ffa7090 | 29 | #:use-module (gnu packages compression) |
3fdc99da | 30 | #:use-module (gnu packages gdbm) |
421a80a2 | 31 | #:use-module (gnu packages icu4c) |
b10ab723 | 32 | #:use-module (gnu packages libffi) |
3fdc99da | 33 | #:use-module (gnu packages readline) |
1ffa7090 | 34 | #:use-module (gnu packages openssl) |
3e778ad3 | 35 | #:use-module (gnu packages elf) |
b10ab723 | 36 | #:use-module (gnu packages pkg-config) |
1d08c01f | 37 | #:use-module (gnu packages sqlite) |
a01b6da7 NK |
38 | #:use-module (guix packages) |
39 | #:use-module (guix download) | |
11bb85a1 | 40 | #:use-module (guix utils) |
acc26ff1 | 41 | #:use-module (guix build-system gnu) |
898238b9 AE |
42 | #:use-module (guix build-system python) |
43 | #:use-module (guix build-system trivial)) | |
a01b6da7 | 44 | |
b24d1cfc | 45 | (define-public python-2 |
a01b6da7 NK |
46 | (package |
47 | (name "python") | |
ee2b5109 | 48 | (version "2.7.6") |
a01b6da7 NK |
49 | (source |
50 | (origin | |
51 | (method url-fetch) | |
9b43a0ff | 52 | (uri (string-append "https://www.python.org/ftp/python/" |
a01b6da7 | 53 | version "/Python-" version ".tar.xz")) |
32d5c729 MW |
54 | (patches (list (search-patch "python-libffi-mips-n32-fix.patch"))) |
55 | (patch-flags '("-p0")) | |
a01b6da7 NK |
56 | (sha256 |
57 | (base32 | |
ee2b5109 | 58 | "18gnpyh071dxa0rv3silrz92jw9qpblswzwv4gzqcwxzz20qxmhz")))) |
a01b6da7 | 59 | (build-system gnu-build-system) |
3fdc99da | 60 | (arguments |
af807dea AE |
61 | `(#:tests? #f |
62 | ;; 258 tests OK. | |
63 | ;; 103 tests failed: | |
64 | ;; test_bz2 test_distutils test_file test_file2k test_popen2 | |
65 | ;; test_shutil test_signal test_site test_slice test_smtplib | |
66 | ;; test_smtpnet test_socket test_socketserver test_softspace | |
67 | ;; test_sort test_sqlite test_ssl test_startfile test_str | |
68 | ;; test_strftime test_string test_stringprep test_strop test_strptime | |
69 | ;; test_strtod test_struct test_structmembers test_structseq | |
70 | ;; test_subprocess test_sunaudiodev test_sundry test_symtable | |
71 | ;; test_syntax test_sys test_sys_setprofile test_sys_settrace | |
72 | ;; test_sysconfig test_tarfile test_tcl test_telnetlib test_tempfile | |
73 | ;; test_textwrap test_thread test_threaded_import | |
74 | ;; test_threadedtempfile test_threading test_threading_local | |
75 | ;; test_threadsignals test_time test_timeout test_tk test_tokenize | |
76 | ;; test_tools test_trace test_traceback test_transformer | |
77 | ;; test_ttk_guionly test_ttk_textonly test_tuple test_typechecks | |
78 | ;; test_ucn test_unary test_undocumented_details test_unicode | |
79 | ;; test_unicode_file test_unicodedata test_univnewlines | |
80 | ;; test_univnewlines2k test_unpack test_urllib test_urllib2 | |
81 | ;; test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse | |
82 | ;; test_userdict test_userlist test_userstring test_uu test_uuid | |
83 | ;; test_wait3 test_wait4 test_warnings test_wave test_weakref | |
84 | ;; test_weakset test_whichdb test_winreg test_winsound test_with | |
85 | ;; test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c | |
86 | ;; test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile | |
87 | ;; test_zipfile64 test_zipimport test_zipimport_support test_zlib | |
88 | ;; 31 tests skipped: | |
89 | ;; test_aepack test_al test_applesingle test_ascii_formatd test_bsddb | |
90 | ;; test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn | |
91 | ;; test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr | |
92 | ;; test_codecmaps_tw test_ctypes test_curses test_dl test_gdb test_gl | |
93 | ;; test_imageop test_imgfile test_ioctl test_kqueue | |
94 | ;; test_linuxaudiodev test_macos test_macostools test_msilib | |
95 | ;; test_multiprocessing test_ossaudiodev test_pep277 | |
96 | ;; test_scriptpackages | |
97 | ;; 7 skips unexpected on linux2: | |
98 | ;; test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_gdb | |
99 | ;; test_ioctl test_multiprocessing | |
100 | ;; One of the typical errors: | |
101 | ;; test_unicode | |
102 | ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No such file or directory | |
103 | #:test-target "test" | |
3fdc99da CR |
104 | #:configure-flags |
105 | (let ((bz2 (assoc-ref %build-inputs "bzip2")) | |
106 | (gdbm (assoc-ref %build-inputs "gdbm")) | |
b10ab723 | 107 | (libffi (assoc-ref %build-inputs "libffi")) |
3fdc99da CR |
108 | (openssl (assoc-ref %build-inputs "openssl")) |
109 | (readline (assoc-ref %build-inputs "readline")) | |
110 | (zlib (assoc-ref %build-inputs "zlib"))) | |
fd982732 | 111 | (list "--enable-shared" ; allow embedding |
b10ab723 | 112 | "--with-system-ffi" ; build ctypes |
fd982732 | 113 | (string-append "CPPFLAGS=" |
3fdc99da CR |
114 | "-I" bz2 "/include " |
115 | "-I" gdbm "/include " | |
116 | "-I" openssl "/include " | |
117 | "-I" readline "/include " | |
118 | "-I" zlib "/include") | |
119 | (string-append "LDFLAGS=" | |
120 | "-L" bz2 "/lib " | |
121 | "-L" gdbm "/lib " | |
b10ab723 | 122 | "-L" libffi "/lib " |
3fdc99da CR |
123 | "-L" openssl "/lib " |
124 | "-L" readline "/lib " | |
fd982732 LC |
125 | "-L" zlib "/lib"))) |
126 | ||
127 | #:modules ((guix build gnu-build-system) | |
128 | (guix build utils) | |
3309e3a1 | 129 | (guix build rpath) |
fd982732 | 130 | (srfi srfi-26)) |
3309e3a1 LC |
131 | #:imported-modules ((guix build gnu-build-system) |
132 | (guix build utils) | |
133 | (guix build rpath)) | |
fd982732 LC |
134 | |
135 | #:phases | |
136 | (alist-cons-after | |
137 | 'strip 'add-lib-to-runpath | |
138 | (lambda* (#:key outputs #:allow-other-keys) | |
fd982732 LC |
139 | (let* ((out (assoc-ref outputs "out")) |
140 | (lib (string-append out "/lib"))) | |
141 | ;; Add LIB to the RUNPATH of all the executables. | |
142 | (with-directory-excursion out | |
143 | (for-each (cut augment-rpath <> lib) | |
144 | (find-files "bin" ".*"))))) | |
d4bf49b1 EB |
145 | (alist-cons-before |
146 | 'configure 'patch-lib-shells | |
147 | (lambda _ | |
bb184d98 EB |
148 | ;; Filter for existing files, since some may not exist in all |
149 | ;; versions of python that are built with this recipe. | |
150 | (substitute* (filter file-exists? | |
151 | '("Lib/subprocess.py" | |
152 | "Lib/popen2.py" | |
153 | "Lib/distutils/tests/test_spawn.py" | |
154 | "Lib/test/test_subprocess.py")) | |
d4bf49b1 | 155 | (("/bin/sh") (which "sh")))) |
9a9a3adf CR |
156 | (alist-cons-before |
157 | 'check 'pre-check | |
158 | (lambda _ | |
159 | ;; 'Lib/test/test_site.py' needs a valid $HOME | |
160 | (setenv "HOME" (getcwd))) | |
161 | %standard-phases))))) | |
a01b6da7 | 162 | (inputs |
3fdc99da CR |
163 | `(("bzip2" ,bzip2) |
164 | ("gdbm" ,gdbm) | |
b10ab723 | 165 | ("libffi" ,libffi) ; for ctypes |
a01b6da7 | 166 | ("openssl" ,openssl) |
3fdc99da | 167 | ("readline" ,readline) |
fd982732 | 168 | ("zlib" ,zlib) |
3309e3a1 | 169 | ("patchelf" ,patchelf))) ; for (guix build rpath) |
b10ab723 CR |
170 | (native-inputs |
171 | `(("pkg-config" ,pkg-config))) | |
9be8d7c8 LC |
172 | (native-search-paths |
173 | (list (search-path-specification | |
174 | (variable "PYTHONPATH") | |
175 | (directories '("lib/python2.7/site-packages"))))) | |
a01b6da7 NK |
176 | (home-page "http://python.org") |
177 | (synopsis | |
178 | "Python, a high-level dynamically-typed programming language") | |
179 | (description | |
180 | "Python is a remarkably powerful dynamic programming language that | |
181 | is used in a wide variety of application domains. Some of its key | |
182 | distinguishing features include: clear, readable syntax; strong | |
183 | introspection capabilities; intuitive object orientation; natural | |
184 | expression of procedural code; full modularity, supporting hierarchical | |
185 | packages; exception-based error handling; and very high level dynamic | |
186 | data types.") | |
187 | (license psfl))) | |
acc26ff1 | 188 | |
b24d1cfc AE |
189 | (define-public python |
190 | (package (inherit python-2) | |
717003e3 LC |
191 | (version "3.3.5") |
192 | (source (origin | |
193 | (method url-fetch) | |
194 | (uri (string-append "https://www.python.org/ftp/python/" | |
195 | version "/Python-" version ".tar.xz")) | |
32d5c729 MW |
196 | (patches (list (search-patch "python-fix-tests.patch") |
197 | (search-patch "python-libffi-mips-n32-fix.patch"))) | |
717003e3 LC |
198 | (patch-flags '("-p0")) |
199 | (sha256 | |
200 | (base32 | |
201 | "1rdncc7g8g6f3lfdg33rli1yffbiq8z283xy4f5ksl1l8i49psdb")))) | |
9a9a3adf CR |
202 | (arguments |
203 | (let ((args `(#:modules ((guix build gnu-build-system) | |
204 | (guix build utils) | |
205 | (srfi srfi-1) | |
206 | (srfi srfi-26)) | |
207 | ,@(package-arguments python-2)))) | |
208 | (substitute-keyword-arguments args | |
209 | ((#:tests? _) #t)))) | |
1aebc0cb AE |
210 | (native-search-paths |
211 | (list (search-path-specification | |
212 | (variable "PYTHONPATH") | |
213 | (directories '("lib/python3.3/site-packages"))))))) | |
f26a77ff | 214 | |
898238b9 AE |
215 | (define-public python-wrapper |
216 | (package (inherit python) | |
217 | (name "python-wrapper") | |
218 | (source #f) | |
219 | (build-system trivial-build-system) | |
220 | (inputs `(("python" ,python))) | |
221 | (arguments | |
222 | `(#:modules ((guix build utils)) | |
223 | #:builder | |
224 | (begin | |
225 | (use-modules (guix build utils)) | |
226 | (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
227 | (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) | |
228 | (mkdir-p bin) | |
229 | (for-each | |
230 | (lambda (old new) | |
231 | (symlink (string-append python old) | |
232 | (string-append bin "/" new))) | |
233 | `("python3", "pydoc3", "idle3") | |
234 | `("python", "pydoc", "idle")))))) | |
235 | (description (string-append (package-description python) | |
236 | "\n\nThis wrapper package provides symbolic links to the python binaries | |
237 | without version suffix.")))) | |
238 | ||
239 | ||
89114f39 | 240 | (define-public python-pytz |
acc26ff1 | 241 | (package |
89114f39 | 242 | (name "python-pytz") |
acc26ff1 CR |
243 | (version "2013b") |
244 | (source | |
245 | (origin | |
246 | (method url-fetch) | |
247 | (uri (string-append "https://launchpad.net/pytz/main/" version | |
248 | "/+download/pytz-" version ".tar.bz2")) | |
249 | (sha256 | |
250 | (base32 | |
251 | "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5")))) | |
252 | (build-system python-build-system) | |
8498b8cf | 253 | (arguments `(#:tests? #f)) ; no test target |
acc26ff1 CR |
254 | (home-page "https://launchpad.net/pytz") |
255 | (synopsis "The Python timezone library.") | |
256 | (description | |
257 | "This library allows accurate and cross platform timezone calculations | |
258 | using Python 2.4 or higher and provides access to the Olson timezone database.") | |
259 | (license x11))) | |
5ace6e2f | 260 | |
89114f39 | 261 | (define-public python2-pytz |
11bb85a1 | 262 | (package-with-python2 python-pytz)) |
89114f39 | 263 | |
fc50e9c6 | 264 | |
89114f39 | 265 | (define-public python-babel |
5ace6e2f | 266 | (package |
89114f39 | 267 | (name "python-babel") |
e1804763 | 268 | (version "1.3") |
5ace6e2f CR |
269 | (source |
270 | (origin | |
271 | (method url-fetch) | |
e1804763 | 272 | (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-" |
5ace6e2f CR |
273 | version ".tar.gz")) |
274 | (sha256 | |
275 | (base32 | |
e1804763 | 276 | "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz")))) |
5ace6e2f CR |
277 | (build-system python-build-system) |
278 | (inputs | |
e1804763 AE |
279 | `(("python-pytz" ,python-pytz) |
280 | ("python-setuptools" ,python-setuptools))) | |
8498b8cf | 281 | (arguments `(#:tests? #f)) ; no test target |
e1804763 | 282 | (home-page "http://babel.pocoo.org/") |
5ace6e2f CR |
283 | (synopsis |
284 | "Tools for internationalizing Python applications") | |
285 | (description | |
286 | "Babel is composed of two major parts: | |
287 | - tools to build and work with gettext message catalogs | |
288 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
289 | access to various locale display names, localized number and date formatting, | |
290 | etc. ") | |
291 | (license bsd-3))) | |
89114f39 AE |
292 | |
293 | (define-public python2-babel | |
11bb85a1 | 294 | (package-with-python2 python-babel)) |
73adf220 | 295 | |
c1448c69 EB |
296 | (define-public python-lockfile |
297 | (package | |
298 | (name "python-lockfile") | |
299 | (version "0.9.1") | |
300 | (source | |
301 | (origin | |
302 | (method url-fetch) | |
303 | (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/" | |
304 | "lockfile-" version ".tar.gz")) | |
305 | (sha256 | |
306 | (base32 | |
307 | "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3")))) | |
308 | (build-system python-build-system) | |
309 | (arguments '(#:test-target "check")) | |
310 | (home-page "http://code.google.com/p/pylockfile/") | |
311 | (synopsis "Platform-independent file locking module") | |
312 | (description | |
313 | "The lockfile package exports a LockFile class which provides a simple | |
314 | API for locking files.") | |
315 | (license expat))) | |
316 | ||
317 | (define-public python2-lockfile | |
318 | (package-with-python2 python-lockfile)) | |
319 | ||
5a1a4bf6 EB |
320 | (define-public python-mock |
321 | (package | |
322 | (name "python-mock") | |
323 | (version "1.0.1") | |
324 | (source | |
325 | (origin | |
326 | (method url-fetch) | |
327 | (uri (string-append "https://pypi.python.org/packages/source/m/mock/" | |
328 | "mock-" version ".tar.gz")) | |
329 | (sha256 | |
330 | (base32 | |
331 | "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq")))) | |
332 | (build-system python-build-system) | |
333 | (arguments '(#:test-target "check")) | |
334 | (home-page "http://code.google.com/m/mock/") | |
335 | (synopsis "A Python Mocking and Patching Library for Testing") | |
336 | (description | |
337 | "Mock is a library for testing in Python. It allows you to replace parts | |
338 | of your system under test with mock objects and make assertions about how they | |
339 | have been used.") | |
340 | (license expat))) | |
341 | ||
342 | (define-public python2-mock | |
343 | (package-with-python2 python-mock)) | |
344 | ||
fc50e9c6 | 345 | |
73adf220 AE |
346 | (define-public python-setuptools |
347 | (package | |
348 | (name "python-setuptools") | |
349 | (version "1.1.4") | |
350 | (source | |
351 | (origin | |
352 | (method url-fetch) | |
353 | (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-" | |
354 | version ".tar.gz")) | |
355 | (sha256 | |
356 | (base32 | |
357 | "0hl9sa5xr9bi2ifq51wy1bawsjv5nzvpbac7m9z1ciz778874csf")))) | |
358 | (build-system python-build-system) | |
359 | (arguments | |
824af8ca | 360 | `(#:tests? #f)) |
73adf220 AE |
361 | ;;FIXME: test_sdist_with_utf8_encoded_filename fails in |
362 | ;; /tmp/nix-build-python2-setuptools-1.1.4.drv-0/setuptools-1.1.4/setuptools/tests/test_sdist.py" | |
363 | ;; line 354 | |
364 | ;; The tests pass with Python 2.7.5. | |
73adf220 AE |
365 | (home-page "https://pypi.python.org/pypi/setuptools") |
366 | (synopsis | |
367 | "Library designed to facilitate packaging Python projects") | |
368 | (description | |
369 | "Setuptools is a fully-featured, stable library designed to facilitate | |
370 | packaging Python projects, where packaging includes: | |
371 | Python package and module definitions, | |
372 | distribution package metadata, | |
373 | test hooks, | |
374 | project installation, | |
375 | platform-specific details, | |
376 | Python 3 support.") | |
377 | (license psfl))) | |
378 | ||
379 | (define-public python2-setuptools | |
380 | (package-with-python2 python-setuptools)) | |
fc50e9c6 AE |
381 | |
382 | ||
383 | (define-public python-dateutil | |
384 | (package | |
385 | (name "python-dateutil") | |
386 | (version "1.5") ; last version for python < 3 | |
387 | (source | |
388 | (origin | |
389 | (method url-fetch) | |
390 | (uri (string-append "http://labix.org/download/python-dateutil/python-dateutil-" | |
391 | version ".tar.gz")) | |
392 | (sha256 | |
393 | (base32 | |
394 | "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0")))) | |
395 | (build-system python-build-system) | |
396 | (inputs | |
397 | `(("python-setuptools" ,python-setuptools))) | |
398 | (home-page "http://labix.org/python-dateutil") | |
399 | (synopsis | |
400 | "Extensions to the standard datetime module, available in Python 2.3+") | |
401 | (description | |
402 | "The dateutil module provides powerful extensions to the standard | |
403 | datetime module, available in Python 2.3+.") | |
404 | (license psfl))) | |
405 | ||
406 | (define-public python2-dateutil | |
407 | (package-with-python2 python-dateutil)) | |
1d08c01f AE |
408 | |
409 | ||
410 | (define-public python2-pysqlite | |
411 | (package | |
412 | (name "python2-pysqlite") | |
7a03af70 | 413 | (version "2.6.3a") ; see below |
1d08c01f AE |
414 | (source |
415 | (origin | |
416 | (method url-fetch) | |
7a03af70 LC |
417 | ;; During the switch from code.google.com to pypi.python.org, the 2.6.3 |
418 | ;; tarball was modified, but the version number was kept: | |
419 | ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>. | |
420 | ;; Here we want to refer to the pypi-hosted 2.6.3 tarball. | |
421 | (uri (string-append | |
422 | "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-" | |
423 | "2.6.3" ".tar.gz")) | |
1d08c01f AE |
424 | (sha256 |
425 | (base32 | |
7a03af70 | 426 | "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y")))) |
1d08c01f AE |
427 | (build-system python-build-system) |
428 | (inputs | |
429 | `(("sqlite" ,sqlite))) | |
430 | (arguments | |
431 | `(#:python ,python-2 ; incompatible with Python 3 | |
432 | #:tests? #f)) ; no test target | |
7a03af70 LC |
433 | (home-page "https://pypi.python.org/pypi/pysqlite") |
434 | (synopsis "SQLite bindings for Python") | |
1d08c01f AE |
435 | (description |
436 | "Pysqlite provides SQLite bindings for Python that comply to the | |
437 | Database API 2.0T.") | |
ed0cdf83 | 438 | (license license:zlib))) |
1d08c01f | 439 | |
2875caf5 AE |
440 | |
441 | (define-public python2-mechanize | |
442 | (package | |
443 | (name "python2-mechanize") | |
444 | (version "0.2.5") | |
445 | (source | |
446 | (origin | |
447 | (method url-fetch) | |
448 | (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-" | |
449 | version ".tar.gz")) | |
450 | (sha256 | |
451 | (base32 | |
452 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
453 | (build-system python-build-system) | |
454 | (inputs | |
455 | `(("python2-setuptools" ,python2-setuptools))) | |
456 | (arguments | |
457 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
458 | #:tests? #f)) | |
459 | ;; test fails with message | |
460 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
461 | ;; (python-3.3.2) or | |
462 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
463 | ;; (python-2.7.5). | |
464 | ;; The source code is from March 2011 and probably not up-to-date | |
465 | ;; with respect to python unit tests. | |
466 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
467 | (synopsis | |
468 | "Stateful programmatic web browsing in Python") | |
469 | (description | |
470 | "Mechanize implements stateful programmatic web browsing in Python, | |
471 | after Andy Lester’s Perl module WWW::Mechanize.") | |
472 | (license (bsd-style "file://COPYING" | |
473 | "See COPYING in the distribution.")))) | |
474 | ||
0352532e AE |
475 | |
476 | (define-public python-simplejson | |
477 | (package | |
478 | (name "python-simplejson") | |
479 | (version "3.3.0") | |
480 | (source | |
481 | (origin | |
482 | (method url-fetch) | |
483 | (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-" | |
484 | version ".tar.gz")) | |
485 | (sha256 | |
486 | (base32 | |
487 | "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks")))) | |
488 | (build-system python-build-system) | |
489 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
490 | (synopsis | |
491 | "Json library for Python") | |
492 | (description | |
493 | "JSON (JavaScript Object Notation) is a subset of JavaScript syntax | |
cc20a22a | 494 | (ECMA-262 3rd edition) used as a lightweight data interchange format. |
0352532e AE |
495 | |
496 | Simplejson exposes an API familiar to users of the standard library marshal | |
497 | and pickle modules. It is the externally maintained version of the json | |
498 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
499 | and (currently) has significant performance advantages, even without using | |
500 | the optional C extension for speedups. Simplejson is also supported on | |
501 | Python 3.3+.") | |
502 | (license x11))) | |
503 | ||
504 | (define-public python2-simplejson | |
505 | (package-with-python2 python-simplejson)) | |
421a80a2 AE |
506 | |
507 | ||
508 | (define-public python2-pyicu | |
509 | (package | |
510 | (name "python2-pyicu") | |
511 | (version "1.5") | |
512 | (source | |
513 | (origin | |
514 | (method url-fetch) | |
515 | (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-" | |
516 | version ".tar.gz")) | |
517 | (sha256 | |
518 | (base32 | |
519 | "011vwflpir8wvh48mvi6d9a7vw0f43bkwv0w6bzxbzmvz20ax5vm")))) | |
520 | (build-system python-build-system) | |
521 | (inputs | |
522 | `(("icu4c" ,icu4c))) | |
523 | (arguments | |
524 | `(#:python ,python-2 ; Python 3 works also, but needs special care for | |
525 | ; linking with libpython3.3m | |
526 | #:tests? #f)) ; no check target | |
527 | (home-page "http://pyicu.osafoundation.org/") | |
528 | (synopsis | |
529 | "Python extension wrapping the ICU C++ API.") | |
530 | (description | |
531 | "PyICU is a python extension wrapping the ICU C++ API.") | |
532 | (license x11))) | |
cc20a22a LC |
533 | |
534 | (define-public python2-dogtail | |
535 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
536 | ;; spaces in indentation" with Python 3. | |
537 | (package | |
538 | (name "python2-dogtail") | |
539 | (version "0.8.2") | |
540 | (source (origin | |
541 | (method url-fetch) | |
542 | (uri (string-append | |
543 | "https://fedorahosted.org/released/dogtail/dogtail-" | |
544 | version ".tar.gz")) | |
545 | (sha256 | |
546 | (base32 | |
547 | "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1")))) | |
548 | (build-system python-build-system) | |
549 | (arguments `(#:python ,python-2 | |
550 | #:tests? #f)) ; invalid command "test" | |
551 | (home-page "https://fedorahosted.org/dogtail/") | |
552 | (synopsis "GUI test tool and automation framework written in Python") | |
553 | (description | |
554 | "dogtail is a GUI test tool and automation framework written in Python. | |
555 | It uses Accessibility (a11y) technologies to communicate with desktop | |
556 | applications. dogtail scripts are written in Python and executed like any | |
557 | other Python program.") | |
558 | (license gpl2+))) | |
515e6878 | 559 | |
011b18c3 LC |
560 | (define-public python2-empy |
561 | (package | |
562 | (name "python2-empy") | |
563 | (version "3.3") | |
564 | (source (origin | |
565 | (method url-fetch) | |
566 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
567 | version ".tar.gz")) | |
568 | (sha256 | |
569 | (base32 | |
570 | "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6")))) | |
571 | (build-system python-build-system) | |
572 | (arguments | |
573 | `(#:python ,python-2 | |
574 | #:phases (alist-replace | |
575 | 'check | |
576 | (lambda _ | |
577 | (zero? (system* "./test.sh"))) | |
578 | %standard-phases))) | |
579 | (home-page "http://www.alcyone.com/software/empy/") | |
580 | (synopsis "Templating system for Python") | |
581 | (description | |
582 | "EmPy is a system for embedding Python expressions and statements in | |
583 | template text; it takes an EmPy source file, processes it, and produces | |
584 | output. This is accomplished via expansions, which are special signals to the | |
585 | EmPy system and are set off by a special prefix (by default the at sign, @). | |
586 | EmPy can expand arbitrary Python expressions and statements in this way, as | |
587 | well as a variety of special forms. Textual data not explicitly delimited in | |
588 | this way is sent unaffected to the output, allowing Python to be used in | |
589 | effect as a markup language. Also supported are callbacks via hooks, | |
590 | recording and playback via diversions, and dynamic, chainable filters. The | |
591 | system is highly configurable via command line options and embedded | |
592 | commands.") | |
593 | (license lgpl2.1+))) | |
594 | ||
8deeda0c LC |
595 | (define-public python2-element-tree |
596 | (package | |
597 | (name "python2-element-tree") | |
598 | (version "1.2.6") | |
599 | (source (origin | |
600 | (method url-fetch) | |
601 | (uri (string-append | |
602 | "http://effbot.org/media/downloads/elementtree-" | |
603 | version "-20050316.tar.gz")) | |
604 | (sha256 | |
605 | (base32 | |
606 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
607 | (build-system python-build-system) | |
608 | (arguments | |
609 | `(#:python ,python-2 ; seems to be part of Python 3 | |
610 | #:tests? #f)) ; no 'test' sub-command | |
611 | (synopsis "Toolkit for XML processing in Python") | |
612 | (description | |
613 | "ElementTree is a Python library supporting lightweight XML processing.") | |
614 | (home-page "http://effbot.org/zone/element-index.htm") | |
615 | (license (x11-style "http://docs.python.org/2/license.html" | |
616 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON \ | |
617 | 0.9.0 THROUGH 1.2\".")))) | |
618 | ||
619 | (define-public python2-pybugz | |
620 | (package | |
621 | (name "python2-pybugz") | |
622 | (version "0.6.11") | |
623 | (source (origin | |
624 | (method url-fetch) | |
625 | (uri (string-append | |
626 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
627 | version ".tar.gz")) | |
628 | (sha256 | |
629 | (base32 | |
6f194a1e LC |
630 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) |
631 | (patches (map search-patch | |
632 | (list "pybugz-stty.patch" | |
633 | "pybugz-encode-error.patch"))))) | |
8deeda0c LC |
634 | (build-system python-build-system) |
635 | (arguments | |
636 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
637 | #:tests? #f)) ; no 'test' sub-command | |
638 | (inputs `(("element-tree" ,python2-element-tree))) | |
639 | (synopsis "Python and command-line interface to Bugzilla") | |
640 | (description | |
641 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
642 | bug tracking system. It is meant as an aid to speed up interaction with the | |
643 | bug tracker.") | |
644 | (home-page "http://www.liquidx.net/pybugz/") | |
645 | (license gpl2))) | |
646 | ||
515e6878 LC |
647 | (define-public scons |
648 | (package | |
649 | (name "scons") | |
650 | (version "2.1.0") | |
651 | (source (origin | |
652 | (method url-fetch) | |
653 | (uri (string-append "mirror://sourceforge/scons/scons-" | |
654 | version ".tar.gz")) | |
655 | (sha256 | |
656 | (base32 | |
657 | "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1")))) | |
658 | (build-system python-build-system) | |
659 | (arguments | |
660 | ;; With Python 3.x, fails to build with a syntax error. | |
661 | `(#:python ,python-2 | |
662 | #:tests? #f)) ; no 'python setup.py test' command | |
663 | (home-page "http://scons.org/") | |
664 | (synopsis "Software construction tool written in Python") | |
665 | (description | |
666 | "SCons is a software construction tool. Think of SCons as an improved, | |
667 | cross-platform substitute for the classic Make utility with integrated | |
668 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
669 | In short, SCons is an easier, more reliable and faster way to build | |
670 | software.") | |
671 | (license x11))) | |
011b18c3 | 672 |